@fetcch/aptos-pay
v0.0.13
Published
QR code based payment protocol for aptos
Downloads
9
Readme
Aptos Pay
A standard way to represent APTOS payment requests within URLs. The goal is to make it easy for users to make payments by clicking on links on web pages or scanning QR codes.
Specification
- Transfer Request
aptos:<recipient>
?amount=<amount>
&token=<token>
&label=<label>
&message=<message>
&chain_id=<chain_id>
- amount ⇒ Amount is the number of tokens to be sent. The value must be a non-negative integer.
- token ⇒ Token is the address of the token that will be sent. This should be valid aptos address and is optional in case of native transfers.
- label ⇒ Label is a string that describes the source of the transfer request. This might be the name of a brand, store, application, or the individual making the request, for example.
- message ⇒ Message is a string that describes the nature of transfer request. This might be the name of the item being purchased, an order ID, or a thank you letter.
- chain_id ⇒ Chain id is optional and contains the decimal chain ID, such that transactions on various test- and private networks can be requested. If no chain_id is present, the client’s current network setting remains effective.
- Transaction Request
aptos:<recipient>
?transaction=<serialized-transaction>
&label=<label>
&message=<message>
&chain_id=<chain_id>
- transaction ⇒ Transaction is base64 version of BCS serialized aptos transaction.