gana

GNUnet Assigned Numbers Authority
Log | Files | Refs | README | LICENSE

eth.txt (4501B)


      1 # Payto Payment Target Type for Ethereum-compatible Blockchain Addresses
      2 
      3 ## Target Type "eth"
      4 
      5 Name: eth
      6 
      7 Description:  Ethereum-compatible Blockchain Address
      8 
      9   The key words "MUST", "MUST NOT", "REQUIRED", "SHALL", "SHALL
     10   NOT", "SHOULD", "SHOULD NOT", "RECOMMENDED", "NOT RECOMMENDED",
     11   "MAY", and "OPTIONAL" in this document are to be interpreted as
     12   described in RFC 2119 and RFC 8174.
     13 
     14   The path consists of two components: The chain ID and the
     15   Ethereum-compatible Mixed-case checksum address.
     16 
     17   This is used to uniquely identify both the chain and the account
     18   on the chain. The chain ID is used to prevent replay attacks
     19   between different chains. If the checksum is invalid, the address
     20   and corresponding URI is invalid and the payment should not be sent.
     21   Connecting to the chain is out of scope for this specification. If
     22   the chain is not available, the payment should not be sent, but the
     23   URI is still valid.
     24 
     25   The currency type can be omitted from the amount option, leaving
     26   a simple decimal number with a maximum of 8 decimal places.
     27   If the currency type (as part of the amount) is not present,
     28   the currency is assumed to be the native currency of the chain.
     29   If the currency is present, it must be a valid ERC-55 address
     30   pointing to a valid ERC-20 token contract on the chain. If the
     31   currency is not a valid ERC-20 token, then the URI is invalid.
     32   This includes three-letter currency codes, which are not valid
     33   ERC-20 token addresses.
     34 
     35 
     36 Syntax:
     37      payto-eth-URI = "payto://eth/" addr [ "@" chain_id ] [ "?" opts ]
     38 
     39   'addr' is an Ethereum-compatible Mixed-case checksum address
     40   as defined in [ERC-55](https://eips.ethereum.org/EIPS/eip-55).
     41   It MUST not be the zero address, and the checksum MUST be valid.
     42   If either of these conditions is not met, the URI is invalid.
     43 
     44   'chain_id' is an Ethereum chain ID as defined in 
     45   [EIP-155](https://eips.ethereum.org/EIPS/eip-155).
     46   If not present, it MUST default to 1 (mainnet).
     47 
     48   'opts' is defined in
     49   [Section 2 of RFC 8905](https://tools.ietf.org/html/rfc8905#section-2).
     50 
     51 
     52 Examples:
     53 
     54       payto://eth/0x84af3D5824F0390b9510440B6ABB5CC02BB68ea1
     55       payto://eth/0x84af3D5824F0390b9510440B6ABB5CC02BB68ea1@11155111
     56       payto://eth/0x84af3D5824F0390b9510440B6ABB5CC02BB68ea1?amount=1.23
     57       payto://eth/0x84af3D5824F0390b9510440B6ABB5CC02BB68ea1?amount=0x6b175474e89094c44da98b954eedeac495271d0f:1.23
     58     
     59     The first address requests that payment be sent to the
     60     mainnet address '0x84af3D5824F0390b9510440B6ABB5CC02BB68ea1'.
     61 
     62     The second address requests that payment be sent to the
     63     Sepolia testnet address
     64     '0x84af3D5824F0390b9510440B6ABB5CC02BB68ea1'.
     65 
     66     The third address requests that 1.23 ETH (1230000000000000000
     67     wei) be sent to the mainnet address
     68     '0x84af3D5824F0390b9510440B6ABB5CC02BB68ea1'.
     69 
     70     The fourth address requests that 1.23 DAI (1230000000000000000
     71     base units of DAI, since DAI has 18 ERC-20 decimals) be sent
     72     to the mainnet address '0x84af3D5824F0390b9510440B6ABB5CC02BB68ea1'.
     73 
     74 
     75 Motivation - not normative
     76 
     77 This syntax is modeled after the ERC-681 URL format
     78 for transaction requests, commonly used in Ethereum
     79 wallets and DApps. The function and function parameters
     80 are not included in this URI type, since they are not
     81 needed for payment requests.
     82 
     83 The chain ID is included in the URI, to prevent replay
     84 attacks between different chains. The checksum address
     85 is included in the URI, to prevent typos and other
     86 errors in the address. The checksum address is also
     87 included in the URI, to prevent phishing attacks by
     88 displaying the address in a different case than the
     89 one used to create the address.
     90 
     91 The currency is included in the URI, to allow payments
     92 to be made in any ERC-20 token. Three-letter currency
     93 codes are not included, since they are not valid ERC-20
     94 token addresses. Should sending traditional currencies
     95 be desired, Stablecoins are often ERC-20 tokens, and are
     96 therefore valid currencies for this URI type.
     97 
     98 
     99 Contact:  <gavinnjohn@gmail.com>
    100 
    101 
    102 Normative References
    103 
    104 * [ERC-20] Token Standard
    105   <https://eips.ethereum.org/EIPS/eip-20>
    106 
    107 * [ERC-55] Mixed-case checksum address encoding
    108   <https://eips.ethereum.org/EIPS/eip-55>
    109 
    110 * [EIP-155] Simple replay attack protection
    111   <https://eips.ethereum.org/EIPS/eip-155>
    112 
    113 * [RFC 8905] The 'payto' URI Scheme for Payments
    114   <https://tools.ietf.org/html/rfc8905>
    115 
    116 Informative References
    117 
    118 * [EIP-681] URL Format for Transaction Requests
    119   <https://eips.ethereum.org/EIPS/eip-681>