Skip to main content
Version: 2.0

Get Outstanding Lowers For Account

Get all available lowers and the data to complete them. This accepts either an Ethereum recipient address or AvN sender address.

await API.query.getOutstandingLowersForAccount(<params>)
important

You can get the AVN_GATEWAY_URL here.

Expected Results

  • token- The Ethereum address of the token being lowered.
  • from: The public key of the sending Aventus account.
  • to: The address on Ethereum specified to receive the lowered token amount.
  • amount: The amount of the token lowered.
  • claimData: An object containing the lowered data required to complete step 2 of the lower process.

Using The Recipient Ethereum Addresss

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);

// The below Ethereum address is just an example
const RECIPIENT_ETHEREUM_ADDRESS = "0x0aa4a0f15864e2c1c3aa17d505faa0f997b4bdf9"

async function main() {
await API.init();

const result = await API.query.getOutstandingLowersForAccount(RECIPIENT_ETHEREUM_ADDRESS)
console.log(result);
}

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

Using The Sender's Public Key

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);
// the below public key is just an example
const SENDER_PUBLIC_KEY = "0x5e3791f8f33eaf8b2b28aac472bd7782e175413afcad5b939d3773fe8b9c4677"

async function main() {
await API.init();

// Replace "acct" with the Aventus address or public key
const result = await API.query.getOutstandingLowersForAccount(SENDER_PUBLIC_KEY)
console.log(result);
}

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