Confirm Token Lift
Triggers the AvN confirmation of a lift operation that has previously occurred on Ethereum.
await api.send.confirmTokenLift(ETHEREUM_TRANSACTION_HASH_FROM_LIFT);
important
- Example
- Example Result
- JSON-RPC
- JSON-RPC Output
const AVN_API = require("avn-api");
const AVN_GATEWAY_URL = "<node_url>";
const options = {
suri: "<account_suri>",
};
const API = new AVN_API(AVN_GATEWAY_URL, options);
// Hash of the successful transaction on Ethereum
const ETHEREUM_TRANSACTION_HASH_FROM_LIFT = '0x64f...f64';
async function main() {
await api.init();
let result = await api.send.confirmTokenLift
(
ETHEREUM_TRANSACTION_HASH_FROM_LIFT
);
// Returns a request id
console.log(result);
}
(async () => {
await main();
})();
f1710fe7-141f-43c1-b1bb-6ec33d9b3e9a
REQUEST
POST <https://AVN_GATEWAY_URL/send>
HEADERS
Content-Type: application/json Authorization': bearer <awtToken>
REQUEST PARAMS
- relayer [required] - a string representing the relayer's SS58 address
- user [required] - a string representing the user's SS58 address
- payer [required] - a string representing the payer's SS58 address
- eventType [required] - the integer value 1 - representing the enum value for a Lifted event type
- ethereumTransactionHash [required] - a string representing the 32 byte Ethereum transaction hash of the lift
- nonce [required] - string integer value of the current proxy nonce of type 'confirmation'
- proxySignature [required] - a proof signed by the user allowing the transaction to be proxied
- feePaymentSignature [required] - a proof signed by the payer allowing the relayer fees to be paid
- paymentNonce [required] - string integer value of the current payment nonce of the payer
JSON-RPC Example
curl https://AVN-API-URL/send \
-X POST \
-H "Content-Type: application/json" \
-H "Authorization: bearer <awtToken>" \
-d '{"jsonrpc":"2.0", "method":"proxyConfirmTokenLift", "params":{"relayer":"5FbUQ2kJWLo...yu6UoZaryTh", "user":"5DAgxVxKm...rSVJDdMr", "payer":"5DAgxVxKm...rSVJDdMr", "eventType": 1, "ethereumTransactionHash": "0xad7190f148fbd57b2a615c964b3ad2dcf17574ebf0d1c9778f6aab09657814ca", "nonce":"10", "proxySignature":"0x362f3e1f9f8f88...4f9ab068d6385baeaa16cd3a060829d5f776444af59d07c0755483acca220007422319", "feePaymentSignature":"0x5f3f0ca4ed32b4172998f...3cf89687f08b9b48b17ca84f1935e8d844a9f133a239df12d7fa3d0fda58bb9a9d65eb10", "paymentNonce":"314"}, "id":1}'
result - a request ID that can be queried for the transaction's status
{
"jsonrpc": "2.0",
"id": 1,
"result": "8f7f76c8-a06e-11ec-b909-0242ac120002"
}
tip
You can query the state of your transaction here using the returned request id.