@ar.io/sdk 3.3.0-alpha.1 → 3.3.0-alpha.10
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 +46 -0
- package/bundles/web.bundle.min.js +92 -91
- package/lib/cjs/cli/cli.js +20 -0
- package/lib/cjs/cli/commands/readCommands.js +6 -1
- package/lib/cjs/common/ant-registry.js +14 -21
- package/lib/cjs/common/ant.js +5 -8
- package/lib/cjs/common/contracts/ao-process.js +27 -20
- package/lib/cjs/common/io.js +21 -56
- package/lib/cjs/constants.js +2 -2
- package/lib/cjs/utils/ao.js +14 -0
- package/lib/cjs/version.js +1 -1
- package/lib/esm/cli/cli.js +23 -3
- package/lib/esm/cli/commands/readCommands.js +4 -0
- package/lib/esm/common/ant-registry.js +14 -21
- package/lib/esm/common/ant.js +5 -8
- package/lib/esm/common/contracts/ao-process.js +27 -20
- package/lib/esm/common/io.js +21 -53
- package/lib/esm/constants.js +2 -2
- package/lib/esm/utils/ao.js +15 -1
- package/lib/esm/version.js +1 -1
- package/lib/types/cli/commands/readCommands.d.ts +3 -0
- package/lib/types/common/ant-registry.d.ts +5 -4
- package/lib/types/common/ant.d.ts +9 -10
- package/lib/types/common/io.d.ts +10 -28
- package/lib/types/constants.d.ts +2 -2
- package/lib/types/types/common.d.ts +4 -0
- package/lib/types/types/io.d.ts +23 -13
- package/lib/types/version.d.ts +1 -1
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -51,6 +51,7 @@ This is the home of [ar.io] SDK. This SDK provides functionality for interacting
|
|
|
51
51
|
- [`decreaseOperatorStake({ qty })`](#decreaseoperatorstake-qty-)
|
|
52
52
|
- [`redelegateStake({ target, source, stakeQty, vaultId })`](#redelegatestake-target-source-stakeqty-vaultid-)
|
|
53
53
|
- [`getRedelegationFee({ address })`](#getredelegationfee-address-)
|
|
54
|
+
- [`getAllDelegates({ cursor, limit, sortBy, sortOrder })`](#getalldelegates-cursor-limit-sortby-sortorder-)
|
|
54
55
|
- [Arweave Name System (ArNS)](#arweave-name-system-arns)
|
|
55
56
|
- [`buyRecord({ name, type, years, processId })`](#buyrecord-name-type-years-processid-)
|
|
56
57
|
- [`getArNSRecord({ name })`](#getarnsrecord-name-)
|
|
@@ -1028,6 +1029,51 @@ const fee = await ario.getRedelegationFee({
|
|
|
1028
1029
|
|
|
1029
1030
|
</details>
|
|
1030
1031
|
|
|
1032
|
+
#### `getAllDelegates({ cursor, limit, sortBy, sortOrder })`
|
|
1033
|
+
|
|
1034
|
+
Retrieves all delegates across all gateways, paginated and sorted by the specified criteria. The `cursor` used for pagination is a `cursorId` derived from delegate address and the gatewayAddress from the previous request. e.g `address_gatewayAddress`.
|
|
1035
|
+
|
|
1036
|
+
```typescript
|
|
1037
|
+
const ario = ARIO.init();
|
|
1038
|
+
const delegates = await ario.getAllDelegates({
|
|
1039
|
+
limit: 2,
|
|
1040
|
+
sortBy: 'startTimestamp',
|
|
1041
|
+
sortOrder: 'desc',
|
|
1042
|
+
});
|
|
1043
|
+
```
|
|
1044
|
+
|
|
1045
|
+
<details>
|
|
1046
|
+
<summary>Output</summary>
|
|
1047
|
+
|
|
1048
|
+
```json
|
|
1049
|
+
{
|
|
1050
|
+
"sortOrder": "desc",
|
|
1051
|
+
"hasMore": true,
|
|
1052
|
+
"totalItems": 95,
|
|
1053
|
+
"limit": 2,
|
|
1054
|
+
"sortBy": "startTimestamp",
|
|
1055
|
+
"items": [
|
|
1056
|
+
{
|
|
1057
|
+
"startTimestamp": 1734709397622,
|
|
1058
|
+
"cursorId": "9jfM0uzGNc9Mkhjo1ixGoqM7ygSem9wx_EokiVgi0Bs_E-QVU3dta36Wia2uQw6tQLjQk7Qw5uN0Z6fUzsoqzUc",
|
|
1059
|
+
"gatewayAddress": "E-QVU3dta36Wia2uQw6tQLjQk7Qw5uN0Z6fUzsoqzUc",
|
|
1060
|
+
"address": "9jfM0uzGNc9Mkhjo1ixGoqM7ygSem9wx_EokiVgi0Bs",
|
|
1061
|
+
"delegatedStake": 2521349108,
|
|
1062
|
+
"vaultedStake": 0
|
|
1063
|
+
},
|
|
1064
|
+
{
|
|
1065
|
+
"startTimestamp": 1734593229454,
|
|
1066
|
+
"cursorId": "LtV0aSqgK3YI7c5FmfvZd-wG95TJ9sezj_a4syaLMS8_M0WP8KSzCvKpzC-HPF1WcddLgGaL9J4DGi76iMnhrN4",
|
|
1067
|
+
"gatewayAddress": "M0WP8KSzCvKpzC-HPF1WcddLgGaL9J4DGi76iMnhrN4",
|
|
1068
|
+
"address": "LtV0aSqgK3YI7c5FmfvZd-wG95TJ9sezj_a4syaLMS8",
|
|
1069
|
+
"delegatedStake": 1685148110,
|
|
1070
|
+
"vaultedStake": 10000000
|
|
1071
|
+
}
|
|
1072
|
+
],
|
|
1073
|
+
"nextCursor": "PZ5vIhHf8VY969TxBPQN-rYY9CNFP9ggNsMBqlWUzWM_QGWqtJdLLgm2ehFWiiPzMaoFLD50CnGuzZIPEdoDRGQ"
|
|
1074
|
+
}
|
|
1075
|
+
```
|
|
1076
|
+
|
|
1031
1077
|
### Arweave Name System (ArNS)
|
|
1032
1078
|
|
|
1033
1079
|
#### `buyRecord({ name, type, years, processId })`
|