@sky-mavis/tanto-widget
Version:
Tanto Widget
31 lines (25 loc) • 797 B
JavaScript
;
var viem = require('viem');
function generateSiweMessage({
address,
nonce,
issuedAt,
expirationTime,
notBefore,
chainId,
version = 1,
domain = window.location.host,
uri = window.location.origin
}) {
return `${domain} wants you to sign in with your Ethereum account:
${viem.getAddress(address)}
By signing, you confirm ownership of this wallet, agree to the Terms of Use (https://wallet.roninchain.com/terms) & Privacy Policy (https://wallet.roninchain.com/privacy), and proceed with login. This action does not initiate any transaction or incur fees.
URI: ${uri}
Version: ${version}
Chain ID: ${chainId}
Nonce: ${nonce}
Issued At: ${issuedAt}
Expiration Time: ${expirationTime}
Not Before: ${notBefore}`;
}
exports.generateSiweMessage = generateSiweMessage;