Getting Started
To start development with Startrail-Sdk-Js
Last updated
To start development with Startrail-Sdk-Js
Last updated
Staging
Production
Please ensure to check and update to the latest version when you are developing.
Configure and construct your Startrail SDK instance
All the properties listed below are optional.
apiPath
string
Only define it if you want to do testing. For testing use the Test
environment URL of STARTRAIL:
https://api-stg.startrail.startbahn.jp/api/v1
For production purpose do not define it.
wallet
'startrail' | 'metamask'
Wallet to activate. Default is startrail.
metamask
: Metamask wallet installed in users' environment.
startrail
: Google or Email/Password powered by Web3Auth.
env
string
The environment of Startrail-Api endpoint, blockchain network and Web3Auth environment.
production
: Matic network. TORUS production account and Startrail production Auth0 account. It is designed to communicate to Startrail production API.
staging
: Mumbai network. TORUS production account and Startrail staging Auth0 account. It is designed to communicate to Startrail for testing.
authAction
true hashes the preimage with keccak256
auth0ClientId
string
Client ID of Auth0 account
auth0Domain
string
Domain URL of Auth0
auth0TorusConfigKey
string
Config key name for TORUS initialisations to connect Auth0 domain and Web3Auth network. This key is only provided by Web3Auth
lang
Language displayed on the UI
loginProvider
customUi
callbackUrl
string
A URL to which a user is redirected after completing email verification with email_password
withModal
boolean
Startrail modal powered by Web3Auth is opened instead of direct procedure with a specific login action.
rpcEndpoint
string
chainId
number
mfaLevel
"none" | "default" | "optional" | "mandatory"
We recommend encouraging users to use this SDK in standard web browsers, such as Safari, Chrome, Firefox, etc. Some functionality of the SDK may not work properly in web-views.
To connect to your wallet, use login
method
See more details in Wallet Methods
Auth0, managed by Startbahn, is used for certain authentication methods, such as Email Password.
login providers for connecting wallet, more detail .
Values to customise UI only under Startrail wallet powered by Web3Auth. See more details in section.
An rpcEndpoint
that is accessed from the wallet you select. See for more detail .
An chainId
that is accessed from the wallet you select. See for more detail .
default is none
that is not asking for MFA. Further detail is .