- tags: Blockchain
Sign Message
Links to this note
Starcoin Signing Message
tags: Starcoin Web3 StarTrek, Sign Message Invocation Path Dapp request personal_sign1 const msg = `0x${Buffer.from(exampleMessage, 'utf8').toString('hex')}` console.log({ msg }) const networkId = networkDiv.innerHTML const extraParams = { networkId } const sign = await window.starcoin.request({ method: 'personal_sign', // params: [msg, from, 'Example password'], // extraParams = params[2] || {}; means it should be an object: // params: [msg, from, { pwd: 'Example password' }], params: [msg, from, extraParams], }) Starmask handling request signPersonalMessage keyringController.signPersonalMessage(cleanMsgParams) 2 , 3 3 types of keyring:4 SimpleKeyring.signPersonalMessage HdKeyring.signPersonalMessage HdKeyringAptos.signPersonalMessage utils.signedMessage.generateSignedMessage5 ...
Aptos Signing Message
tags: Sign Message The starmask has implemented about signing message of APTOS.
Tron Signing Data
tags: Tron, Sign Message Three methods tronweb.trx.signMessageV11 tronweb.trx.signMessageV22 tronweb.trx._signtypeddata3, 4 https://github.com/tronprotocol/tronweb/blob/859253856c79d3aff26ec6c89afefc73840d648d/src/lib/trx.js#L727-L739 ↩︎ https://github.com/tronprotocol/tronweb/blob/859253856c79d3aff26ec6c89afefc73840d648d/src/utils/message.js#L8-L18 ↩︎ https://github.com/tronprotocol/tronweb/blob/859253856c79d3aff26ec6c89afefc73840d648d/src/utils/crypto.js#L89 ↩︎ TIP 104 ↩︎
Ethereum Signing Data
tags: Ethereum, Sign Message source: “Signing Data | MetaMask Docs.” Accessed April 6, 2023. https://docs.metamask.io/guide/signing-data.html#signtypeddata-v4. Five Methods1 eth_sign allow to sign arbitrary hash.2 personal_sign add prefix to data and human readable text that encoded UFT-8.3 signTypedData or signTypedData_v1 first release that lacked some later security improvements. signTypedData_v3 signTypedData_v4 compatible with V3. Differences Between V3 and V44 Some input types that V3 doesn’t support but V4 does: Custom type array Custom type with null input Some input types that V4 doesn’t support but V3 does: ...