getGatewayVaults
getGatewayVaults
is a method on the ARIO
class that retrieves all vaults across all gateways for a specific address, paginated and sorted by the specified criteria. The cursor
used for pagination is the last vaultId from the previous request.
getGatewayVaults
does not require authentication.
Parameters
Parameter | Type | Description | Optional |
---|---|---|---|
address | string - WalletAddress | Public wallet address for which to receive vaults. | false |
cursor | string | Cursor used for paginated results | true |
limit | number | Max number of results to return in a single search. Max is 1000. | true |
sortBy | string | Property used to sort returned results | true |
sortOrder | string | Order in which sorted results are returned. valid values are `desc` or `asc` | true |
Example
getGatewayVaults
const { ARIO } = require('@ar.io/sdk');
async function main() {
const ario = ARIO.init();
const vaults = await ario.getGatewayVaults({
address: '"PZ5vIhHf8VY969TxBPQN-rYY9CNFP9ggNsMBqlWUzWM',
});
console.log(vaults);
}
main();
Output
{
"sortOrder": "desc",
"hasMore": false,
"totalItems": 1,
"limit": 100,
"sortBy": "endTimestamp",
"items": [
{
"cursorId": "PZ5vIhHf8VY969TxBPQN-rYY9CNFP9ggNsMBqlWUzWM_1728067635857",
"startTimestamp": 1728067635857,
"balance": 50000000000,
"vaultId": "PZ5vIhHf8VY969TxBPQN-rYY9CNFP9ggNsMBqlWUzWM",
"endTimestamp": 1735843635857
}
]
}