An ERC-681 compliant URI
Payment request
toERC681({ address: '0x0000000000000000000000000000000000000000', value: 1000000n })
// => "ethereum:0x0000000000000000000000000000000000000000?value=1000000"
Function call with chain ID
toERC681({
address: '0x0000000000000000000000000000000000000000',
functionName: 'transfer',
args: ['0x0000000000000000000000000000000000000000', '1000'],
chainId: 1
})
// => "ethereum:0x0000000000000000000000000000000000000000@1/transfer?address=0x0000000000000000000000000000000000000000&uint256=1000"
Creates an ERC-681 compliant URI for Ethereum payment or function call requests.