@ar.io/sdk 2.2.1 → 2.2.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/LICENSE.md +201 -661
- package/README.md +43 -5
- package/bundles/web.bundle.min.js +143 -139
- package/lib/cjs/common/ant-registry.js +10 -11
- package/lib/cjs/common/ant.js +10 -11
- package/lib/cjs/common/arweave.js +10 -11
- package/lib/cjs/common/contracts/ao-process.js +10 -11
- package/lib/cjs/common/error.js +10 -11
- package/lib/cjs/common/index.js +10 -11
- package/lib/cjs/common/logger.js +10 -11
- package/lib/cjs/constants.js +11 -12
- package/lib/cjs/node/index.js +11 -12
- package/lib/cjs/token.js +10 -11
- package/lib/cjs/types.js +10 -11
- package/lib/cjs/utils/ao.js +11 -12
- package/lib/cjs/utils/base64.js +10 -11
- package/lib/cjs/utils/http-client.js +10 -11
- package/lib/cjs/utils/index.js +10 -11
- package/lib/cjs/utils/json.js +10 -11
- package/lib/cjs/utils/processes.js +10 -11
- package/lib/cjs/version.js +11 -12
- package/lib/cjs/web/index.js +11 -12
- package/lib/esm/common/ant-registry.js +10 -11
- package/lib/esm/common/ant.js +10 -11
- package/lib/esm/common/arweave.js +10 -11
- package/lib/esm/common/contracts/ao-process.js +10 -11
- package/lib/esm/common/error.js +10 -11
- package/lib/esm/common/index.js +10 -11
- package/lib/esm/common/logger.js +10 -11
- package/lib/esm/constants.js +11 -12
- package/lib/esm/node/index.js +11 -12
- package/lib/esm/token.js +10 -11
- package/lib/esm/types.js +10 -11
- package/lib/esm/utils/ao.js +11 -12
- package/lib/esm/utils/base64.js +10 -11
- package/lib/esm/utils/http-client.js +10 -11
- package/lib/esm/utils/index.js +10 -11
- package/lib/esm/utils/json.js +10 -11
- package/lib/esm/utils/processes.js +10 -11
- package/lib/esm/version.js +11 -12
- package/lib/esm/web/index.js +11 -12
- package/lib/types/common/ant.d.ts +10 -11
- package/lib/types/common/arweave.d.ts +10 -11
- package/lib/types/common/error.d.ts +10 -11
- package/lib/types/common/index.d.ts +10 -11
- package/lib/types/common/io.d.ts +10 -11
- package/lib/types/common.d.ts +11 -12
- package/lib/types/constants.d.ts +11 -12
- package/lib/types/io.d.ts +10 -11
- package/lib/types/node/index.d.ts +11 -12
- package/lib/types/types.d.ts +10 -11
- package/lib/types/utils/arweave.d.ts +10 -11
- package/lib/types/utils/http-client.d.ts +10 -11
- package/lib/types/utils/index.d.ts +10 -11
- package/lib/types/utils/json.d.ts +10 -11
- package/lib/types/utils/processes.d.ts +10 -11
- package/lib/types/version.d.ts +11 -12
- package/lib/types/web/index.d.ts +11 -12
- package/package.json +4 -4
package/README.md
CHANGED
|
@@ -70,6 +70,11 @@ This is the home of [ar.io] SDK. This SDK provides functionality for interacting
|
|
|
70
70
|
- [Logging](#logging)
|
|
71
71
|
- [Configuration](#configuration-2)
|
|
72
72
|
- [Pagination](#pagination)
|
|
73
|
+
- [Resources](#resources)
|
|
74
|
+
- [Bundling](#bundling)
|
|
75
|
+
- [Gateways](#gateways)
|
|
76
|
+
- [Running a Gateway](#running-a-gateway)
|
|
77
|
+
- [AO](#ao)
|
|
73
78
|
- [Developers](#developers)
|
|
74
79
|
- [Requirements](#requirements)
|
|
75
80
|
- [Setup & Build](#setup--build)
|
|
@@ -318,7 +323,7 @@ Retrieves the balances of the IO process in `mIO`, paginated and sorted by the s
|
|
|
318
323
|
const io = IO.init();
|
|
319
324
|
const balances = await io.getBalances({
|
|
320
325
|
cursor: '-4xgjroXENKYhTWqrBo57HQwvDL51mMdfsdsxJy6Y2Z_sA',
|
|
321
|
-
limit:
|
|
326
|
+
limit: 100,
|
|
322
327
|
sortBy: 'balance',
|
|
323
328
|
sortOrder: 'desc',
|
|
324
329
|
});
|
|
@@ -333,7 +338,12 @@ const balances = await io.getBalances({
|
|
|
333
338
|
{
|
|
334
339
|
"address": "-4xgjroXENKYhTWqrBo57HQwvDL51mMvSxJy6Y2Z_sA",
|
|
335
340
|
"balance": 1000000
|
|
341
|
+
},
|
|
342
|
+
{
|
|
343
|
+
"address": "-7vXsQZQDk8TMDlpiSLy3CnLi5PDPlAaN2DaynORpck",
|
|
344
|
+
"balance": 1000000
|
|
336
345
|
}
|
|
346
|
+
// ...98 other balances
|
|
337
347
|
],
|
|
338
348
|
"hasMore": true,
|
|
339
349
|
"nextCursor": "-7vXsQZQDk8TMDlpiSLy3CnLi5PDPlAaN2DaynORpck",
|
|
@@ -401,7 +411,7 @@ Retrieves registered gateways of the IO process, using pagination and sorting by
|
|
|
401
411
|
```typescript
|
|
402
412
|
const io = IO.init();
|
|
403
413
|
const gateways = await io.getGateways({
|
|
404
|
-
limit:
|
|
414
|
+
limit: 100,
|
|
405
415
|
sortOrder: 'desc',
|
|
406
416
|
sortBy: 'operatorStake',
|
|
407
417
|
});
|
|
@@ -487,9 +497,9 @@ Retrieves all registered ArNS records of the IO process, paginated and sorted by
|
|
|
487
497
|
|
|
488
498
|
```typescript
|
|
489
499
|
const io = IO.init();
|
|
490
|
-
// get the
|
|
500
|
+
// get the newest 100 names
|
|
491
501
|
const records = await io.getArNSRecords({
|
|
492
|
-
limit:
|
|
502
|
+
limit: 100,
|
|
493
503
|
sortBy: 'startTimestamp',
|
|
494
504
|
sortOrder: 'desc',
|
|
495
505
|
});
|
|
@@ -543,6 +553,7 @@ Available `sortBy` options are any of the keys on the record object, e.g. `name`
|
|
|
543
553
|
"type": "lease",
|
|
544
554
|
"undernames": 100
|
|
545
555
|
}
|
|
556
|
+
// ...95 other records
|
|
546
557
|
],
|
|
547
558
|
"hasMore": true,
|
|
548
559
|
"nextCursor": "fwdresearch",
|
|
@@ -1331,13 +1342,36 @@ let hasMore = true;
|
|
|
1331
1342
|
let cursor: string | undefined;
|
|
1332
1343
|
const gateaways = [];
|
|
1333
1344
|
while (hasMore) {
|
|
1334
|
-
const page = await io.getGateways({ limit:
|
|
1345
|
+
const page = await io.getGateways({ limit: 100, cursor });
|
|
1335
1346
|
gateaways.push(...items);
|
|
1336
1347
|
cursor = page.nextCursor;
|
|
1337
1348
|
hasMore = page.hasMore;
|
|
1338
1349
|
}
|
|
1339
1350
|
```
|
|
1340
1351
|
|
|
1352
|
+
## Resources
|
|
1353
|
+
|
|
1354
|
+
### Bundling
|
|
1355
|
+
|
|
1356
|
+
For [ANS-104] bundling compatible with ar.io gateways, we recommend using [turbo-sdk](https://github.com/ardriveapp/turbo-sdk). Turbo SDK provides efficient and reliable methods for creating and uploading data bundles to the Arweave network, which are fully compatible with ar.io gateways. Turbo supports fiat and crypto bundling and uploading with a focus on ease of use and reliability.
|
|
1357
|
+
|
|
1358
|
+
### Gateways
|
|
1359
|
+
|
|
1360
|
+
### Running a Gateway
|
|
1361
|
+
|
|
1362
|
+
To run your own ar.io gateway, you can refer to the following resources:
|
|
1363
|
+
|
|
1364
|
+
- [ar-io-node repository]: This repository contains the source code and instructions for setting up and running an ar.io gateway node.
|
|
1365
|
+
- [ar.io Gateway Documentation]: This comprehensive guide provides detailed information on gateway setup, configuration, and management.
|
|
1366
|
+
|
|
1367
|
+
Running your own gateway allows you to participate in the ar.io network, serve Arweave data, and potentially earn rewards. Make sure to follow the official documentation for the most up-to-date and accurate information on gateway operation.
|
|
1368
|
+
|
|
1369
|
+
### AO
|
|
1370
|
+
|
|
1371
|
+
This library integrates with [AO], a decentralized compute platform built on Arweave. We utilize [AO Connect] to interact with AO processes and messages. This integration allows for seamless communication with the AO network, enabling developers to leverage decentralized computation and storage capabilities in their applications.
|
|
1372
|
+
|
|
1373
|
+
For more information on how to use AO and AO Connect within this library, please refer to our documentation and examples.
|
|
1374
|
+
|
|
1341
1375
|
## Developers
|
|
1342
1376
|
|
|
1343
1377
|
### Requirements
|
|
@@ -1389,3 +1423,7 @@ For more information on how to contribute, please see [CONTRIBUTING.md].
|
|
|
1389
1423
|
[IO testnet process]: https://www.ao.link/#/entity/agYcCFJtrMG6cqMuZfskIkFTGvUPddICmtQSBIoPdiA
|
|
1390
1424
|
[IO Network spec]: https://github.com/ar-io/ar-io-network-process?tab=readme-ov-file#contract-spec
|
|
1391
1425
|
[Winston]: https://www.npmjs.com/package/winston
|
|
1426
|
+
[AO]: https://github.com/permaweb/ao
|
|
1427
|
+
[ar-io-node repository]: https://github.com/ar-io/ar-io-node
|
|
1428
|
+
[ar.io Gateway Documentation]: https://docs.ar.io/gateways/ar-io-node/overview/
|
|
1429
|
+
[ANS-104]: https://github.com/ArweaveTeam/arweave-standards/blob/master/ans/ANS-104.md
|