@ar.io/sdk 2.1.0-alpha.1 → 2.1.0-alpha.3
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 +13 -3
- package/bundles/web.bundle.min.js +3 -3
- package/lib/cjs/common/io.js +5 -0
- package/lib/cjs/utils/processes.js +4 -4
- package/lib/cjs/version.js +1 -1
- package/lib/esm/common/io.js +5 -0
- package/lib/esm/utils/processes.js +4 -4
- package/lib/esm/version.js +1 -1
- package/lib/types/common/io.d.ts +1 -0
- package/lib/types/contract-state.d.ts +1 -1
- package/lib/types/io.d.ts +2 -1
- package/lib/types/utils/processes.d.ts +4 -2
- package/lib/types/version.d.ts +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -20,6 +20,7 @@ This is the home of [ar.io] SDK. This SDK provides functionality for interacting
|
|
|
20
20
|
- [IO APIs](#apis)
|
|
21
21
|
- [`init({ signer })`](#init-signer-)
|
|
22
22
|
- [`getInfo()`](#getinfo)
|
|
23
|
+
- [`getTokenSupply()`](#gettokensupply)
|
|
23
24
|
- [`getBalance({ address })`](#getbalance-address-)
|
|
24
25
|
- [`getBalances({ cursor, limit, sortBy, sortOrder })`](#getbalances-cursor-limit-sortby-sortorder-)
|
|
25
26
|
- [`getGateway({ address })`](#getgateway-address-)
|
|
@@ -123,7 +124,7 @@ const gateways = await io.getGateways();
|
|
|
123
124
|
"failedConsecutiveEpochs": 0,
|
|
124
125
|
"passedEpochCount": 30,
|
|
125
126
|
"submittedEpochCount": 30,
|
|
126
|
-
"
|
|
127
|
+
"totalEpochCount": 31,
|
|
127
128
|
"totalEpochsPrescribedCount": 31
|
|
128
129
|
},
|
|
129
130
|
"status": "joined",
|
|
@@ -265,6 +266,15 @@ const info = await io.getInfo();
|
|
|
265
266
|
|
|
266
267
|
</details>
|
|
267
268
|
|
|
269
|
+
#### `getTokenSupply()`
|
|
270
|
+
|
|
271
|
+
Retrieves the total supply of tokens, returned in mIO.
|
|
272
|
+
|
|
273
|
+
```typescript
|
|
274
|
+
const io = IO.init();
|
|
275
|
+
const supply = await io.getTokenSupply().then((s) => new mIOToken(s).toIO()); // convert it to IO for readability
|
|
276
|
+
```
|
|
277
|
+
|
|
268
278
|
#### `getBalance({ address })`
|
|
269
279
|
|
|
270
280
|
Retrieves the balance of the specified wallet address.
|
|
@@ -354,7 +364,7 @@ const gateway = await io.getGateway({
|
|
|
354
364
|
"failedConsecutiveEpochs": 0,
|
|
355
365
|
"passedEpochCount": 30,
|
|
356
366
|
"submittedEpochCount": 30,
|
|
357
|
-
"
|
|
367
|
+
"totalEpochCount": 31,
|
|
358
368
|
"totalEpochsPrescribedCount": 31
|
|
359
369
|
},
|
|
360
370
|
"status": "joined",
|
|
@@ -402,7 +412,7 @@ Available `sortBy` options are any of the keys on the gateway object, e.g. `oper
|
|
|
402
412
|
"failedConsecutiveEpochs": 0,
|
|
403
413
|
"passedEpochCount": 30,
|
|
404
414
|
"submittedEpochCount": 30,
|
|
405
|
-
"
|
|
415
|
+
"totalEpochCount": 31,
|
|
406
416
|
"totalEpochsPrescribedCount": 31
|
|
407
417
|
},
|
|
408
418
|
"status": "joined",
|