Skip to main content
Version: 0.6

Confirm Token Lift

Triggers the AvN confirmation of a lift operation that has previously occurred on Ethereum.

await api.send.confirmTokenLift(
AVN_RELAYER,
ETHEREUM_TRANSACTION_HASH_FROM_LIFT
);
info

This operation uses a relayer account that the sender authorizes to submit the transfer transaction. You can learn more about relayers HERE.

Contact us here to request a relayer address.

Example

const AVN_API = require("avn-api");
// Replace the endpoint_url with the url received from Aventus.
const AVN_GATEWAY_URL = "<endpoint_url>";
const API = new AVN_API(AVN_GATEWAY_URL);

// Please, request the address or public key from Aventus.
const AVN_RELAYER = "5Fb...yTh";

// 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
(
AVN_RELAYER,
ETHEREUM_TRANSACTION_HASH_FROM_LIFT
);
// Returns a request id
console.log(result);
}

(async () => {
await main();
})();

Example Result

f1710fe7-141f-43c1-b1bb-6ec33d9b3e9a
tip

You can query the state of your transaction here using the returned request id.

JSON-RPC

REQUEST
POST <https://AVN-API-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.
  • 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.
  • 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":"5F...Th", "user":"5DA...dMr", "eventType": 1, "ethereumTransactionHash": "0xad7...ca", "proxySignature":"0x362f3e1f9f8f8802b84a54562be6ae1451a959b84b037f98604d9fa78d4f9ab068d6385baeaa16cd3a060829d5f776444af59d07c0755483acca220007422319", "feePaymentSignature":"0x5f3f0ca4ed32b4172998f816cf5e296553b29ec042a7b564c493568d3cf89687f08b9b48b17ca84f1935e8d844a9f133a239df12d7fa3d0fda58bb9a9d65eb10", "paymentNonce":"314"}, "id":1}'

result 👇🏽 - a request ID that can be queried for the transaction's status

Example Output

{
"jsonrpc": "2.0",
"id": 1,
"result": "8f7f76c8-a06e-11ec-b909-0242ac120002"
}