🏃Getting Started
To start development with Startrail-Sdk-Js
NPM Package
Env | Tag |
---|---|
Staging | |
Production | |
Add Packages
Script Tag
Please ensure to check and update to the latest version when you are developing.
Import
Constructor
Configure and construct your Startrail SDK instance
Properties
All the properties listed below are optional.
Parameter | Type | Description |
---|---|---|
apiPath |
| Only define it if you want to do testing. For testing use the
For production purpose do not define it. |
wallet |
| Wallet to activate. Default is
|
env |
| The environment of Startrail-Api endpoint, blockchain network and Web3Auth environment.
|
authAction | true hashes the preimage with keccak256 | |
auth0ClientId |
| Client ID of Auth0 account |
auth0Domain |
| Domain URL of Auth0 |
auth0TorusConfigKey |
| 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 | login providers for connecting wallet, more detail here. | |
customUi | Values to customise UI only under Startrail wallet powered by Web3Auth. See more details in Whitelabeling/Customizing section. | |
callbackUrl |
| A URL that a user is redirected to after verification completed from the email. |
withModal |
| Startrail modal powered by Web3Auth is opened instead of direct procedure with a specific login action. |
rpcEndpoint |
| An |
chainId |
| An |
mfaLevel |
| default is |
Things To Do In Advance
You need to give the Startbahn team your callbackUrl's base URL for approval to use it in the production environment. This isn't necessary for the staging environment. The base URL can look like this: https://YOUR_DOMAIN.com
In the whitelist, the validation checks if the base URL ends with the given string. So, you can use a dynamic value for the URL (e.g.https://DYNAMIC_VALUE.YOUR_SERVICE_NAME.vercel.com/login
) as long as the last string of the base URL, the postfix, matches what's in the whitelist.
* whatever after "YOUR_DOMAIN.com" is not checked.
Sample Config Values For Each Login Method
To connect to your wallet, use login
method
See more details in Wallet Methods
Auth0 managed by Startbahn is used under the hood for some authentication method such as Email Password and LINE.
Last updated