<aside> 📌 MetaMask extension on desktop browser or MetaMask native app on mobile must be installed in advance. / ユーザはブラウザであればMetaMaskのプラグイン、モバイルであればMetaMaskアプリがインストールされている必要があります。
</aside>
// 本番環境用
sdk = new Startrail({
env: 'production',
wallet: 'metamask'
})
// 開発環境用
sdk = new Startrail({
apiPath: 'SAMPLE_API_PATH',
env: 'staging',
wallet: 'metamask'
})
// Sometimes Mumbai test net RPC endpoint is unstable. If all of the endpoints failed, it’s possible to designate a particular endpoint in config file.
// MumbaiテストネットのRPCエンドポイントは不安定な状態になることが散見されます。その際は下記のように特定のエンドポイントを指定することも可能です。
sdk = new Startrail({
...
rpcEndpoint: '<https://matic-mumbai.chainstacklabs.com>' // example
})
<aside> ⚠️ It’s strongly recommend to check that currently active EOA in MetaMask is equal to the one user logged in or signed up with before requesting signing action because MetaMask are always open to users’ action regardless of Startrail-sdk-js state. ie. It is possible for users to change the EOA account on MetaMask whenever they like. ユーザに署名などを求める前には、MetaMask上のEOAがログイン時のそれと同じであることを確認することをお勧めします。MetaMaskはその仕様上、Startrail-sdk-jsの状態に関係なくユーザによって自由に操作が可能となっています。
</aside>
Blockchain Network per env setting
sdk.getUserInfo()
{
email: ""
name: ""
profileImage: ""
typeOfLogin: ""
verifier: ""
verifierId: ""
wallet: "metamask"
isNewUser: '
}
For the first time user connects to the web-application(URL) with MetaMask. / ユーザのMetaMaskが特定のURLに初めて接続する場合
Popup request opens up for users. /下記のポップアップが立ち上がります
When users login to Metamask. / ユーザがMetaMaskにログインした瞬間

