Untitled

@startbahn/startrail-sdk-js

README for Staging README for Production
https://www.npmjs.com/package/@startbahn/startrail-sdk-js/v/next https://www.npmjs.com/package/@startbahn/startrail-sdk-js/v/latest

What can you do with the SDK?

System flow to get EOA + to authenticate

auth-sdk-backend.png

Implementation Details of above Flow at No9. 上記フローチャートNo9の詳細

// ① DBからEOAを元に最初に生成し文字列を取り出す
// ① Fetch the originally generated string that was passed to the user
const originalMessage = await this.findOne(eoa)

let messageToBeSigned
if (prefix) {
	// ② DBから取得したoriginalMessageを基に実際に署名を行った文字列を復元する
	// ② Restore the messageToBeSigned, from the originalMessage, that was signed inside Startrail-sdk-js.
  messageToBeSigned = `${prefix}${originalMessage.length.toString()}${originalMessage}`;
} else {
	// ポップアップを隠さない場合も考慮し、prefixがundefinedである場合のロジックも記述
	// Write the logic in case the prefix is undefined given the usecase that popup is not hidden
  messageToBeSigned = originalMessage
}

// HTTP call to Validator-API (message: messageToBeSigned, signature, address )

Wallet

Available Method To Login Documents to check
Google
Email&Password
MetaMask

About Page reload and data persistency/ページのリロードとデータの持続性

Functions

approveSRRByCommitment()