Getting Started
Use core TDK functionality from any JavaScript or TypeScript-based application.
Installation
Quick Start
Connect to Treasure Account
Call the logIn
function to connect to the Treasure Account and start a user session.
Connect with email
Connect a user wallet based on email address and one-time password sent to that email.
When using the core package, applications must implement their own interfaces for logging in to the Treasure Account, including the multistep verification code flow for logging in with email.
Connect with social
Connect a user wallet with one of the support social login options.
Connect with custom auth
Connect a user wallet with a custom auth endpoint and allow compatibility with existing authentication systems. Please contact the Treasure team to enable this feature for your project.
See the logIn docs for more configuration options.
Ecosystem game partners should contact Treasure to obtain values for
clientId
, ecosystemId
, ecosystemPartnerId
and backendWallet
.
Call contract write
After starting a user session with approved target contract addresses, you can now use the TDKAPI
object to call contract writes:
See the connect-core example application for the full end-to-end source code.