@ar.io/sdk 3.3.0-alpha.9 → 3.3.0
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/README.md +38 -0
- package/bundles/web.bundle.min.js +60 -60
- package/lib/cjs/cli/cli.js +7 -0
- package/lib/cjs/cli/commands/readCommands.js +10 -1
- package/lib/cjs/cli/utils.js +1 -1
- package/lib/cjs/common/contracts/ao-process.js +3 -17
- package/lib/cjs/common/io.js +8 -0
- package/lib/cjs/constants.js +2 -1
- package/lib/cjs/utils/ao.js +34 -2
- package/lib/cjs/utils/arweave.js +29 -11
- package/lib/cjs/utils/processes.js +9 -2
- package/lib/cjs/version.js +1 -1
- package/lib/esm/cli/cli.js +8 -1
- package/lib/esm/cli/commands/readCommands.js +8 -0
- package/lib/esm/cli/utils.js +1 -1
- package/lib/esm/common/contracts/ao-process.js +1 -15
- package/lib/esm/common/io.js +8 -0
- package/lib/esm/constants.js +1 -0
- package/lib/esm/utils/ao.js +32 -2
- package/lib/esm/utils/arweave.js +29 -11
- package/lib/esm/utils/processes.js +9 -2
- package/lib/esm/version.js +1 -1
- package/lib/types/cli/commands/readCommands.d.ts +7 -4
- package/lib/types/cli/utils.d.ts +1 -3
- package/lib/types/common/io.d.ts +2 -1
- package/lib/types/constants.d.ts +1 -0
- package/lib/types/types/io.d.ts +19 -11
- package/lib/types/utils/ao.d.ts +12 -1
- package/lib/types/utils/arweave.d.ts +9 -1
- package/lib/types/utils/processes.d.ts +4 -17
- package/lib/types/version.d.ts +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -47,6 +47,7 @@ This is the home of [ar.io] SDK. This SDK provides functionality for interacting
|
|
|
47
47
|
- [`cancelWithdrawal({ gatewayAddress, vaultId })`](#cancelwithdrawal-gatewayaddress-vaultid-)
|
|
48
48
|
- [`getAllowedDelegates({ address, cursor, limit, sortBy, sortOrder })`](#getalloweddelegates-address-cursor-limit-sortby-sortorder-)
|
|
49
49
|
- [`getGatewayVaults({ address, cursor, limit, sortBy, sortOrder })`](#getgatewayvaults-address-cursor-limit-sortby-sortorder-)
|
|
50
|
+
- [`getAllGatewayVaults({ cursor, limit, sortBy, sortOrder })`](#getallgatewayvaults-cursor-limit-sortby-sortorder-)
|
|
50
51
|
- [`increaseOperatorStake({ qty })`](#increaseoperatorstake-qty-)
|
|
51
52
|
- [`decreaseOperatorStake({ qty })`](#decreaseoperatorstake-qty-)
|
|
52
53
|
- [`redelegateStake({ target, source, stakeQty, vaultId })`](#redelegatestake-target-source-stakeqty-vaultid-)
|
|
@@ -952,6 +953,43 @@ const vaults = await ario.getGatewayVaults({
|
|
|
952
953
|
|
|
953
954
|
</details>
|
|
954
955
|
|
|
956
|
+
#### `getAllGatewayVaults({ cursor, limit, sortBy, sortOrder })`
|
|
957
|
+
|
|
958
|
+
Retrieves all vaults across all gateways, paginated and sorted by the specified criteria. The `cursor` used for pagination is the last vaultId from the previous request.
|
|
959
|
+
|
|
960
|
+
```typescript
|
|
961
|
+
const ario = ARIO.init();
|
|
962
|
+
const vaults = await ario.getAllGatewayVaults({
|
|
963
|
+
limit: 1,
|
|
964
|
+
sortBy: 'endTimestamp',
|
|
965
|
+
sortOrder: 'desc',
|
|
966
|
+
});
|
|
967
|
+
```
|
|
968
|
+
|
|
969
|
+
<details>
|
|
970
|
+
<summary>Output</summary>
|
|
971
|
+
|
|
972
|
+
```json
|
|
973
|
+
{
|
|
974
|
+
"sortOrder": "desc",
|
|
975
|
+
"hasMore": true,
|
|
976
|
+
"totalItems": 95,
|
|
977
|
+
"limit": 1,
|
|
978
|
+
"sortBy": "endTimestamp",
|
|
979
|
+
"items": [
|
|
980
|
+
{
|
|
981
|
+
"cursorId": "PZ5vIhHf8VY969TxBPQN-rYY9CNFP9ggNsMBqlWUzWM_E-QVU3dta36Wia2uQw6tQLjQk7Qw5uN0Z6fUzsoqzUc",
|
|
982
|
+
"gatewayAddress": "PZ5vIhHf8VY969TxBPQN-rYY9CNFP9ggNsMBqlWUzWM",
|
|
983
|
+
"startTimestamp": 1728067635857,
|
|
984
|
+
"balance": 50000000000,
|
|
985
|
+
"vaultId": "E-QVU3dta36Wia2uQw6tQLjQk7Qw5uN0Z6fUzsoqzUc",
|
|
986
|
+
"endTimestamp": 1735843635857
|
|
987
|
+
}
|
|
988
|
+
],
|
|
989
|
+
"nextCursor": "PZ5vIhHf8VY969TxBPQN-rYY9CNFP9ggNsMBqlWUzWM_E-QVU3dta36Wia2uQw6tQLjQk7Qw5uN0Z6fUzsoqzUc"
|
|
990
|
+
}
|
|
991
|
+
```
|
|
992
|
+
|
|
955
993
|
#### `increaseOperatorStake({ qty })`
|
|
956
994
|
|
|
957
995
|
Increases the callers operator stake. Must be executed with a wallet registered as a gateway operator.
|