@ar.io/sdk 2.0.3-alpha.1 → 2.1.0-alpha.2
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 +10 -0
- package/bundles/web.bundle.min.js +69 -69
- package/lib/cjs/common/io.js +5 -0
- package/lib/cjs/constants.js +1 -1
- package/lib/cjs/utils/ao.js +23 -1
- package/lib/cjs/version.js +1 -1
- package/lib/esm/common/io.js +5 -0
- package/lib/esm/constants.js +1 -1
- package/lib/esm/utils/ao.js +21 -0
- package/lib/esm/version.js +1 -1
- package/lib/types/common/ant.d.ts +1 -0
- package/lib/types/common/io.d.ts +1 -0
- package/lib/types/constants.d.ts +1 -1
- package/lib/types/io.d.ts +2 -0
- package/lib/types/utils/ao.d.ts +6 -0
- 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-)
|
|
@@ -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.
|