getGatewayVaults
getGatewayVaults
is a method on the ARIO
class that retrieves all vaults across all gateways for a specific address. Results are paginated and sorted by the specified criteria. The cursor parameter represents the last vaultId from the previous request.
getGatewayVaults
does not require authentication.
Parameters
Parameter | Type | Description | Required |
---|---|---|---|
address | string | The wallet address to query for vaults | Yes |
cursor | string | Cursor for paginated results | No |
limit | number | Maximum number of results to return (max: 1000) | No |
sortBy | string | Property to sort results by | No |
sortOrder | string | Sort direction (valid values: 'desc' or 'asc') | No |
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
}
]
}