UNPKG

@ceramicnetwork/blockchain-utils-linking

Version:

Blockchain utils for linking blockchain accounts to DID

22 lines 626 B
export function getConsentMessage(did, addTimestamp = true) { const res = { message: 'Link this account to your identity' + '\n\n' + did, }; if (addTimestamp) { res.timestamp = Math.floor(Date.now() / 1000); res.message += ' \n' + 'Timestamp: ' + res.timestamp; } return res; } export function encodeRpcMessage(method, params) { return { jsonrpc: '2.0', id: 1, method, params, }; } export function asOldCaipString(input) { return `${input.address}@${input.chainId.namespace}:${input.chainId.reference}`; } //# sourceMappingURL=util.js.map