@ar.io/sdk 2.7.0-alpha.7 → 3.0.0-alpha.1
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 +147 -147
- package/bundles/web.bundle.min.js +2 -2
- package/lib/cjs/cli/cli.js +26 -26
- package/lib/cjs/cli/commands/gatewayWriteCommands.js +39 -39
- package/lib/cjs/cli/commands/readCommands.js +19 -19
- package/lib/cjs/cli/commands/transfer.js +7 -7
- package/lib/cjs/cli/options.js +3 -3
- package/lib/cjs/cli/utils.js +22 -22
- package/lib/cjs/common/ant.js +18 -14
- package/lib/cjs/common/io.js +11 -11
- package/lib/cjs/constants.js +5 -5
- package/lib/cjs/types/token.js +14 -14
- package/lib/cjs/utils/processes.js +4 -4
- package/lib/cjs/version.js +1 -1
- package/lib/esm/cli/cli.js +28 -28
- package/lib/esm/cli/commands/gatewayWriteCommands.js +41 -41
- package/lib/esm/cli/commands/readCommands.js +21 -21
- package/lib/esm/cli/commands/transfer.js +8 -8
- package/lib/esm/cli/options.js +3 -3
- package/lib/esm/cli/utils.js +18 -18
- package/lib/esm/common/ant.js +18 -14
- package/lib/esm/common/io.js +8 -8
- package/lib/esm/constants.js +4 -4
- package/lib/esm/types/token.js +12 -12
- package/lib/esm/utils/processes.js +6 -6
- package/lib/esm/version.js +1 -1
- package/lib/types/cli/options.d.ts +1 -1
- package/lib/types/cli/types.d.ts +1 -1
- package/lib/types/cli/utils.d.ts +10 -10
- package/lib/types/common/ant.d.ts +14 -14
- package/lib/types/common/io.d.ts +16 -16
- package/lib/types/constants.d.ts +4 -4
- package/lib/types/types/ant.d.ts +8 -8
- package/lib/types/types/io.d.ts +9 -9
- package/lib/types/types/token.d.ts +8 -8
- package/lib/types/utils/processes.d.ts +4 -4
- package/lib/types/version.d.ts +1 -1
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -20,9 +20,9 @@ This is the home of [ar.io] SDK. This SDK provides functionality for interacting
|
|
|
20
20
|
- [ESM (NodeNext)](#esm-nodenext)
|
|
21
21
|
- [CJS](#cjs)
|
|
22
22
|
- [Typescript](#typescript)
|
|
23
|
-
- [
|
|
24
|
-
- [Converting
|
|
25
|
-
- [
|
|
23
|
+
- [ARIOToken & mARIOToken](#ariotoken--mariotoken)
|
|
24
|
+
- [Converting ARIO to mARIO](#converting-ario-to-mario)
|
|
25
|
+
- [ARIO Process](#ario-process)
|
|
26
26
|
- [General](#general)
|
|
27
27
|
- [`init({ signer })`](#init-signer-)
|
|
28
28
|
- [`getInfo()`](#getinfo)
|
|
@@ -93,10 +93,10 @@ This is the home of [ar.io] SDK. This SDK provides functionality for interacting
|
|
|
93
93
|
- [`setDescription({ description })`](#setdescription-description-)
|
|
94
94
|
- [`setKeywords({ keywords })`](#setkeywords-keywords-)
|
|
95
95
|
- [`setLogo({ txId })`](#setlogo-txid-)
|
|
96
|
-
- [`releaseName({ name,
|
|
97
|
-
- [`reassignName({ name,
|
|
98
|
-
- [`approvePrimaryNameRequest({ name, address,
|
|
99
|
-
- [`removePrimaryNames({ names,
|
|
96
|
+
- [`releaseName({ name, arioProcessId })`](#releasename-name-arioprocessid-)
|
|
97
|
+
- [`reassignName({ name, arioProcessId, antProcessId })`](#reassignname-name-arioprocessid-antprocessid-)
|
|
98
|
+
- [`approvePrimaryNameRequest({ name, address, arioProcessId })`](#approveprimarynamerequest-name-address-arioprocessid-)
|
|
99
|
+
- [`removePrimaryNames({ names, arioProcessId })`](#removeprimarynames-names-arioprocessid-)
|
|
100
100
|
- [Configuration](#configuration-1)
|
|
101
101
|
- [Logging](#logging)
|
|
102
102
|
- [Configuration](#configuration-2)
|
|
@@ -138,10 +138,10 @@ yarn add @ar.io/sdk --ignore-engines
|
|
|
138
138
|
## Quick Start
|
|
139
139
|
|
|
140
140
|
```typescript
|
|
141
|
-
import {
|
|
141
|
+
import { ARIO } from '@ar.io/sdk';
|
|
142
142
|
|
|
143
|
-
const
|
|
144
|
-
const gateways = await
|
|
143
|
+
const ario = ARIO.init();
|
|
144
|
+
const gateways = await ario.getGateways();
|
|
145
145
|
```
|
|
146
146
|
|
|
147
147
|
<details>
|
|
@@ -204,9 +204,9 @@ The SDK is provided in both CommonJS and ESM formats and is compatible with bund
|
|
|
204
204
|
import { IO } from '@ar.io/sdk/web';
|
|
205
205
|
|
|
206
206
|
// set up client
|
|
207
|
-
const
|
|
207
|
+
const ario = ARIO.init();
|
|
208
208
|
// fetch gateways
|
|
209
|
-
const gateways = await
|
|
209
|
+
const gateways = await ario.getGateways();
|
|
210
210
|
```
|
|
211
211
|
|
|
212
212
|
> [!WARNING]
|
|
@@ -219,9 +219,9 @@ const gateways = await io.getGateways();
|
|
|
219
219
|
import { IO } from 'https://unpkg.com/@ar.io/sdk';
|
|
220
220
|
|
|
221
221
|
// set up client
|
|
222
|
-
const
|
|
222
|
+
const ario = ARIO.init();
|
|
223
223
|
// fetch gateways
|
|
224
|
-
const gateways = await
|
|
224
|
+
const gateways = await ario.getGateways();
|
|
225
225
|
</script>
|
|
226
226
|
```
|
|
227
227
|
|
|
@@ -233,20 +233,20 @@ const gateways = await io.getGateways();
|
|
|
233
233
|
import { IO } from '@ar.io/sdk/node';
|
|
234
234
|
|
|
235
235
|
// set up client
|
|
236
|
-
const
|
|
236
|
+
const ario = ARIO.init();
|
|
237
237
|
// fetch gateways
|
|
238
|
-
const gateways = await
|
|
238
|
+
const gateways = await ario.getGateways();
|
|
239
239
|
```
|
|
240
240
|
|
|
241
241
|
#### CJS
|
|
242
242
|
|
|
243
243
|
```javascript
|
|
244
|
-
import {
|
|
244
|
+
import { ARIO } from '@ar.io/sdk';
|
|
245
245
|
|
|
246
246
|
// set up client
|
|
247
|
-
const
|
|
247
|
+
const ario = ARIO.init();
|
|
248
248
|
// fetch gateways
|
|
249
|
-
const gateways = await
|
|
249
|
+
const gateways = await ario.getGateways();
|
|
250
250
|
```
|
|
251
251
|
|
|
252
252
|
### Typescript
|
|
@@ -256,25 +256,25 @@ The SDK provides TypeScript types. When you import the SDK in a TypeScript proje
|
|
|
256
256
|
> [!NOTE]
|
|
257
257
|
> Typescript version 5.3 or higher is recommended.
|
|
258
258
|
|
|
259
|
-
##
|
|
259
|
+
## ARIOToken & mARIOToken
|
|
260
260
|
|
|
261
|
-
The
|
|
261
|
+
The ARIO process stores all values as mARIO (milli-ARIO) to avoid floating-point arithmetic issues. The SDK provides an `ARIOToken` and `mARIOToken` classes to handle the conversion between ARIO and mARIO, along with rounding logic for precision.
|
|
262
262
|
|
|
263
|
-
**All process interactions expect values in
|
|
263
|
+
**All process interactions expect values in mARIO. If numbers are provided as inputs, they are assumed to be in raw mARIO values.**
|
|
264
264
|
|
|
265
|
-
### Converting
|
|
265
|
+
### Converting ARIO to mARIO
|
|
266
266
|
|
|
267
267
|
```typescript
|
|
268
|
-
import {
|
|
268
|
+
import { ARIOToken, mARIOToken } from '@ar.io/sdk';
|
|
269
269
|
|
|
270
|
-
const
|
|
271
|
-
const
|
|
270
|
+
const arioValue = 1;
|
|
271
|
+
const mARIOValue = new ARIOToken(arioValue).toMARIO();
|
|
272
272
|
|
|
273
|
-
const
|
|
274
|
-
const
|
|
273
|
+
const mARIOValue = 1_000_000;
|
|
274
|
+
const arioValue = new mARIOToken(mARIOValue).toARIO();
|
|
275
275
|
```
|
|
276
276
|
|
|
277
|
-
##
|
|
277
|
+
## ARIO Process
|
|
278
278
|
|
|
279
279
|
### General
|
|
280
280
|
|
|
@@ -284,23 +284,23 @@ Factory function to that creates a read-only or writeable client. By providing a
|
|
|
284
284
|
|
|
285
285
|
```typescript
|
|
286
286
|
// read-only client
|
|
287
|
-
const
|
|
287
|
+
const ario = ARIO.init()
|
|
288
288
|
|
|
289
289
|
// read-write client for browser environments
|
|
290
|
-
const
|
|
290
|
+
const ario = ARIO.init({ signer: new ArConnectSigner(window.arweaveWallet, Arweave.init({}))});
|
|
291
291
|
|
|
292
292
|
// read-write client for node environments
|
|
293
|
-
const
|
|
293
|
+
const ario = ARIO.init({ signer: new ArweaveSigner(JWK) });
|
|
294
294
|
|
|
295
295
|
```
|
|
296
296
|
|
|
297
297
|
#### `getInfo()`
|
|
298
298
|
|
|
299
|
-
Retrieves the information of the
|
|
299
|
+
Retrieves the information of the ARIO process.
|
|
300
300
|
|
|
301
301
|
```typescript
|
|
302
|
-
const
|
|
303
|
-
const info = await
|
|
302
|
+
const ario = ARIO.init();
|
|
303
|
+
const info = await ario.getInfo();
|
|
304
304
|
```
|
|
305
305
|
|
|
306
306
|
<details>
|
|
@@ -308,8 +308,8 @@ const info = await io.getInfo();
|
|
|
308
308
|
|
|
309
309
|
```json
|
|
310
310
|
{
|
|
311
|
-
"Name": "Testnet
|
|
312
|
-
"Ticker": "
|
|
311
|
+
"Name": "Testnet ARIO",
|
|
312
|
+
"Ticker": "tARIO",
|
|
313
313
|
"Owner": "QGWqtJdLLgm2ehFWiiPzMaoFLD50CnGuzZIPEdoDRGQ",
|
|
314
314
|
"Denomination": 6,
|
|
315
315
|
"Handlers": ["_eval", "_default_"], // full list of handlers, useful for debugging
|
|
@@ -332,8 +332,8 @@ Retrieves the total supply of tokens, returned in mIO. The total supply includes
|
|
|
332
332
|
- `protocolBalance` - tokens that are held in the protocol's treasury. This is included in the circulating supply.
|
|
333
333
|
|
|
334
334
|
```typescript
|
|
335
|
-
const
|
|
336
|
-
const supply = await
|
|
335
|
+
const ario = ARIO.init();
|
|
336
|
+
const supply = await ario.getTokenSupply();
|
|
337
337
|
```
|
|
338
338
|
|
|
339
339
|
<details>
|
|
@@ -358,13 +358,13 @@ const supply = await io.getTokenSupply();
|
|
|
358
358
|
Retrieves the balance of the specified wallet address.
|
|
359
359
|
|
|
360
360
|
```typescript
|
|
361
|
-
const
|
|
361
|
+
const ario = ARIO.init();
|
|
362
362
|
// the balance will be returned in mIO as a value
|
|
363
|
-
const balance = await
|
|
363
|
+
const balance = await ario
|
|
364
364
|
.getBalance({
|
|
365
365
|
address: 'QGWqtJdLLgm2ehFWiiPzMaoFLD50CnGuzZIPEdoDRGQ',
|
|
366
366
|
})
|
|
367
|
-
.then((balance: number) => new
|
|
367
|
+
.then((balance: number) => new mARIOToken(balance).toARIO()); // convert it to IO for readability
|
|
368
368
|
```
|
|
369
369
|
|
|
370
370
|
<details>
|
|
@@ -381,8 +381,8 @@ const balance = await io
|
|
|
381
381
|
Retrieves the balances of the IO process in `mIO`, paginated and sorted by the specified criteria. The `cursor` used for pagination is the last wallet address from the previous request.
|
|
382
382
|
|
|
383
383
|
```typescript
|
|
384
|
-
const
|
|
385
|
-
const balances = await
|
|
384
|
+
const ario = ARIO.init();
|
|
385
|
+
const balances = await ario.getBalances({
|
|
386
386
|
cursor: '-4xgjroXENKYhTWqrBo57HQwvDL51mMdfsdsxJy6Y2Z_sA',
|
|
387
387
|
limit: 100,
|
|
388
388
|
sortBy: 'balance',
|
|
@@ -423,11 +423,11 @@ Transfers `mIO` to the designated `target` recipient address. Requires `signer`
|
|
|
423
423
|
_Note: Requires `signer` to be provided on `IO.init` to sign the transaction._
|
|
424
424
|
|
|
425
425
|
```typescript
|
|
426
|
-
const
|
|
427
|
-
const { id: txId } = await
|
|
426
|
+
const ario = ARIO.init({ signer: new ArweaveSigner(jwk) });
|
|
427
|
+
const { id: txId } = await ario.transfer(
|
|
428
428
|
{
|
|
429
429
|
target: '-5dV7nk7waR8v4STuwPnTck1zFVkQqJh5K9q9Zik4Y5',
|
|
430
|
-
qty: new
|
|
430
|
+
qty: new ARIOToken(1000).toMARIO(),
|
|
431
431
|
},
|
|
432
432
|
// optional additional tags
|
|
433
433
|
{ tags: [{ name: 'App-Name', value: 'My-Awesome-App' }] },
|
|
@@ -441,8 +441,8 @@ const { id: txId } = await io.transfer(
|
|
|
441
441
|
Retrieves the locked-balance user vault of the IO process by the specified wallet address and vault ID.
|
|
442
442
|
|
|
443
443
|
```typescript
|
|
444
|
-
const
|
|
445
|
-
const vault = await
|
|
444
|
+
const ario = ARIO.init();
|
|
445
|
+
const vault = await ario.getVault({
|
|
446
446
|
address: 'QGWqtJdLLgm2ehFWiiPzMaoFLD50CnGuzZIPEdoDRGQ',
|
|
447
447
|
vaultId: 'vaultIdOne',
|
|
448
448
|
});
|
|
@@ -466,8 +466,8 @@ const vault = await io.getVault({
|
|
|
466
466
|
Retrieves all locked-balance user vaults of the IO process, paginated and sorted by the specified criteria. The `cursor` used for pagination is the last wallet address from the previous request.
|
|
467
467
|
|
|
468
468
|
```typescript
|
|
469
|
-
const
|
|
470
|
-
const vaults = await
|
|
469
|
+
const ario = ARIO.init();
|
|
470
|
+
const vaults = await ario.getVaults({
|
|
471
471
|
cursor: '0',
|
|
472
472
|
limit: 100,
|
|
473
473
|
sortBy: 'balance',
|
|
@@ -514,8 +514,8 @@ const vaults = await io.getVaults({
|
|
|
514
514
|
Retrieves a gateway's info by its staking wallet address.
|
|
515
515
|
|
|
516
516
|
```typescript
|
|
517
|
-
const
|
|
518
|
-
const gateway = await
|
|
517
|
+
const ario = ARIO.init();
|
|
518
|
+
const gateway = await ario.getGateway({
|
|
519
519
|
address: '-7vXsQZQDk8TMDlpiSLy3CnLi5PDPlAaN2DaynORpck',
|
|
520
520
|
});
|
|
521
521
|
```
|
|
@@ -563,8 +563,8 @@ const gateway = await io.getGateway({
|
|
|
563
563
|
Retrieves registered gateways of the IO process, using pagination and sorting by the specified criteria. The `cursor` used for pagination is the last gateway address from the previous request.
|
|
564
564
|
|
|
565
565
|
```typescript
|
|
566
|
-
const
|
|
567
|
-
const gateways = await
|
|
566
|
+
const ario = ARIO.init();
|
|
567
|
+
const gateways = await ario.getGateways({
|
|
568
568
|
limit: 100,
|
|
569
569
|
sortOrder: 'desc',
|
|
570
570
|
sortBy: 'operatorStake',
|
|
@@ -626,8 +626,8 @@ Available `sortBy` options are any of the keys on the gateway object, e.g. `oper
|
|
|
626
626
|
Retrieves all delegates for a specific gateway, paginated and sorted by the specified criteria. The `cursor` used for pagination is the last delegate address from the previous request.
|
|
627
627
|
|
|
628
628
|
```typescript
|
|
629
|
-
const
|
|
630
|
-
const delegates = await
|
|
629
|
+
const ario = ARIO.init();
|
|
630
|
+
const delegates = await ario.getGatewayDelegates({
|
|
631
631
|
address: 'QGWqtJdLLgm2ehFWiiPzMaoFLD50CnGuzZIPEdoDRGQ',
|
|
632
632
|
limit: 3,
|
|
633
633
|
sortBy: 'startTimestamp',
|
|
@@ -675,13 +675,13 @@ Joins a gateway to the ar.io network via its associated wallet.
|
|
|
675
675
|
_Note: Requires `signer` to be provided on `IO.init` to sign the transaction._
|
|
676
676
|
|
|
677
677
|
```typescript
|
|
678
|
-
const
|
|
679
|
-
const { id: txId } = await
|
|
678
|
+
const ario = ARIO.init({ signer: new ArweaveSigner(jwk) });
|
|
679
|
+
const { id: txId } = await ario.joinNetwork(
|
|
680
680
|
{
|
|
681
|
-
qty: new
|
|
681
|
+
qty: new ARIOToken(10_000).toMARIO(), // minimum operator stake allowed
|
|
682
682
|
autoStake: true, // auto-stake operator rewards to the gateway
|
|
683
683
|
allowDelegatedStaking: true, // allows delegated staking
|
|
684
|
-
minDelegatedStake: new
|
|
684
|
+
minDelegatedStake: new ARIOToken(100).toMARIO(), // minimum delegated stake allowed
|
|
685
685
|
delegateRewardShareRatio: 10, // percentage of rewards to share with delegates (e.g. 10%)
|
|
686
686
|
label: 'john smith', // min 1, max 64 characters
|
|
687
687
|
note: 'The example gateway', // max 256 characters
|
|
@@ -703,9 +703,9 @@ Sets the gateway as `leaving` on the ar.io network. Requires `signer` to be prov
|
|
|
703
703
|
_Note: Requires `signer` to be provided on `IO.init` to sign the transaction._
|
|
704
704
|
|
|
705
705
|
```typescript
|
|
706
|
-
const
|
|
706
|
+
const ario = ARIO.init({ signer: new ArweaveSigner(jwk) });
|
|
707
707
|
|
|
708
|
-
const { id: txId } = await
|
|
708
|
+
const { id: txId } = await ario.leaveNetwork(
|
|
709
709
|
// optional additional tags
|
|
710
710
|
{ tags: [{ name: 'App-Name', value: 'My-Awesome-App' }] },
|
|
711
711
|
);
|
|
@@ -718,11 +718,11 @@ Writes new gateway settings to the callers gateway configuration.
|
|
|
718
718
|
_Note: Requires `signer` to be provided on `IO.init` to sign the transaction._
|
|
719
719
|
|
|
720
720
|
```typescript
|
|
721
|
-
const
|
|
722
|
-
const { id: txId } = await
|
|
721
|
+
const ario = ARIO.init({ signer: new ArweaveSigner(jwk) });
|
|
722
|
+
const { id: txId } = await ario.updateGatewaySettings(
|
|
723
723
|
{
|
|
724
724
|
// any other settings you want to update
|
|
725
|
-
minDelegatedStake: new
|
|
725
|
+
minDelegatedStake: new ARIOToken(100).toMARIO(),
|
|
726
726
|
},
|
|
727
727
|
// optional additional tags
|
|
728
728
|
{ tags: [{ name: 'App-Name', value: 'My-Awesome-App' }] },
|
|
@@ -736,11 +736,11 @@ Increases the callers stake on the target gateway.
|
|
|
736
736
|
_Note: Requires `signer` to be provided on `IO.init` to sign the transaction._
|
|
737
737
|
|
|
738
738
|
```typescript
|
|
739
|
-
const
|
|
740
|
-
const { id: txId } = await
|
|
739
|
+
const ario = ARIO.init({ signer: new ArweaveSigner(jwk) });
|
|
740
|
+
const { id: txId } = await ario.increaseDelegateStake(
|
|
741
741
|
{
|
|
742
742
|
target: 't4Xr0_J4Iurt7caNST02cMotaz2FIbWQ4Kbj616RHl3',
|
|
743
|
-
qty: new
|
|
743
|
+
qty: new ARIOToken(100).toMARIO(),
|
|
744
744
|
},
|
|
745
745
|
// optional additional tags
|
|
746
746
|
{ tags: [{ name: 'App-Name', value: 'My-Awesome-App' }] },
|
|
@@ -754,11 +754,11 @@ Decreases the callers stake on the target gateway. Can instantly decrease stake
|
|
|
754
754
|
_Note: Requires `signer` to be provided on `IO.init` to sign the transaction._
|
|
755
755
|
|
|
756
756
|
```typescript
|
|
757
|
-
const
|
|
758
|
-
const { id: txId } = await
|
|
757
|
+
const ario = ARIO.init({ signer: new ArweaveSigner(jwk) });
|
|
758
|
+
const { id: txId } = await ario.decreaseDelegateStake(
|
|
759
759
|
{
|
|
760
760
|
target: 't4Xr0_J4Iurt7caNST02cMotaz2FIbWQ4Kbj616RHl3',
|
|
761
|
-
qty: new
|
|
761
|
+
qty: new ARIOToken(100).toMARIO(),
|
|
762
762
|
},
|
|
763
763
|
{
|
|
764
764
|
tags: [{ name: 'App-Name', value: 'My-Awesome-App' }],
|
|
@@ -769,10 +769,10 @@ const { id: txId } = await io.decreaseDelegateStake(
|
|
|
769
769
|
Pay the early withdrawal fee and withdraw instantly.
|
|
770
770
|
|
|
771
771
|
```typescript
|
|
772
|
-
const
|
|
773
|
-
const { id: txId } = await
|
|
772
|
+
const ario = ARIO.init({ signer: new ArweaveSigner(jwk) });
|
|
773
|
+
const { id: txId } = await ario.decreaseDelegateStake({
|
|
774
774
|
target: 't4Xr0_J4Iurt7caNST02cMotaz2FIbWQ4Kbj616RHl3',
|
|
775
|
-
qty: new
|
|
775
|
+
qty: new ARIOToken(100).toMARIO(),
|
|
776
776
|
instant: true, // Immediately withdraw this stake and pay the instant withdrawal fee
|
|
777
777
|
});
|
|
778
778
|
```
|
|
@@ -782,8 +782,8 @@ const { id: txId } = await io.decreaseDelegateStake({
|
|
|
782
782
|
Retrieves all active and vaulted stakes across all gateways for a specific address, paginated and sorted by the specified criteria. The `cursor` used for pagination is the last delegationId (concatenated gateway and startTimestamp of the delgation) from the previous request.
|
|
783
783
|
|
|
784
784
|
```typescript
|
|
785
|
-
const
|
|
786
|
-
const vaults = await
|
|
785
|
+
const ario = ARIO.init();
|
|
786
|
+
const vaults = await ario.getDelegations({
|
|
787
787
|
address: 't4Xr0_J4Iurt7caNST02cMotaz2FIbWQ4Kbj616RHl3',
|
|
788
788
|
cursor: 'QGWqtJdLLgm2ehFWiiPzMaoFLD50CnGuzZIPEdoDRGQ_123456789',
|
|
789
789
|
limit: 2,
|
|
@@ -833,9 +833,9 @@ Instantly withdraws an existing vault on a gateway. If no `gatewayAddress` is pr
|
|
|
833
833
|
_Note: Requires `signer` to be provided on `IO.init` to sign the transaction._
|
|
834
834
|
|
|
835
835
|
```typescript
|
|
836
|
-
const
|
|
836
|
+
const ario = ARIO.init({ signer: new ArweaveSigner(jwk) });
|
|
837
837
|
// removes a delegated vault from a gateway
|
|
838
|
-
const { id: txId } = await
|
|
838
|
+
const { id: txId } = await ario.instantWithdrawal(
|
|
839
839
|
{
|
|
840
840
|
// gateway address where delegate vault exists
|
|
841
841
|
gatewayAddress: 't4Xr0_J4Iurt7caNST02cMotaz2FIbWQ4Kbj616RHl3',
|
|
@@ -848,7 +848,7 @@ const { id: txId } = await io.instantWithdrawal(
|
|
|
848
848
|
},
|
|
849
849
|
);
|
|
850
850
|
// removes an operator vault from a gateway
|
|
851
|
-
const { id: txId } = await
|
|
851
|
+
const { id: txId } = await ario.instantWithdrawal(
|
|
852
852
|
{
|
|
853
853
|
vaultId: 'fDrr0_J4Iurt7caNST02cMotaz2FIbWQ4Kcj616RHl3',
|
|
854
854
|
},
|
|
@@ -862,9 +862,9 @@ Cancels an existing vault on a gateway. The vaulted stake will be returned to th
|
|
|
862
862
|
_Note: Requires `signer` to be provided on `IO.init` to sign the transaction._
|
|
863
863
|
|
|
864
864
|
```typescript
|
|
865
|
-
const
|
|
865
|
+
const ario = ARIO.init({ signer: new ArweaveSigner(jwk) });
|
|
866
866
|
// cancels a delegated vault from a gateway
|
|
867
|
-
const { id: txId } = await
|
|
867
|
+
const { id: txId } = await ario.cancelWithdrawal(
|
|
868
868
|
{
|
|
869
869
|
// gateway address where vault exists
|
|
870
870
|
gatewayAddress: 't4Xr0_J4Iurt7caNST02cMotaz2FIbWQ4Kbj616RHl3',
|
|
@@ -875,7 +875,7 @@ const { id: txId } = await io.cancelWithdrawal(
|
|
|
875
875
|
{ tags: [{ name: 'App-Name', value: 'My-Awesome-App' }] },
|
|
876
876
|
);
|
|
877
877
|
// cancels an operator vault from a gateway
|
|
878
|
-
const { id: txId } = await
|
|
878
|
+
const { id: txId } = await ario.cancelWithdrawal(
|
|
879
879
|
{
|
|
880
880
|
// operator vault id to cancel
|
|
881
881
|
vaultId: 'fDrr0_J4Iurt7caNST02cMotaz2FIbWQ4Kcj616RHl3',
|
|
@@ -888,8 +888,8 @@ const { id: txId } = await io.cancelWithdrawal(
|
|
|
888
888
|
Retrieves all allowed delegates for a specific address. The `cursor` used for pagination is the last address from the previous request.
|
|
889
889
|
|
|
890
890
|
```typescript
|
|
891
|
-
const
|
|
892
|
-
const allowedDelegates = await
|
|
891
|
+
const ario = ARIO.init();
|
|
892
|
+
const allowedDelegates = await ario.getAllowedDelegates({
|
|
893
893
|
address: 'QGWqtJdLLgm2ehFWiiPzMaoFLD50CnGuzZIPEdoDRGQ',
|
|
894
894
|
});
|
|
895
895
|
```
|
|
@@ -919,8 +919,8 @@ const allowedDelegates = await io.getAllowedDelegates({
|
|
|
919
919
|
Retrieves all vaults across all gateways for a specific address, paginated and sorted by the specified criteria. The `cursor` used for pagination is the last vaultId from the previous request.
|
|
920
920
|
|
|
921
921
|
```typescript
|
|
922
|
-
const
|
|
923
|
-
const vaults = await
|
|
922
|
+
const ario = ARIO.init();
|
|
923
|
+
const vaults = await ario.getGatewayVaults({
|
|
924
924
|
address: '"PZ5vIhHf8VY969TxBPQN-rYY9CNFP9ggNsMBqlWUzWM',
|
|
925
925
|
});
|
|
926
926
|
```
|
|
@@ -956,10 +956,10 @@ Increases the callers operator stake. Must be executed with a wallet registered
|
|
|
956
956
|
_Note: Requires `signer` to be provided on `IO.init` to sign the transaction._
|
|
957
957
|
|
|
958
958
|
```typescript
|
|
959
|
-
const
|
|
960
|
-
const { id: txId } = await
|
|
959
|
+
const ario = ARIO.init({ signer: new ArweaveSigner(jwk) });
|
|
960
|
+
const { id: txId } = await ario.increaseOperatorStake(
|
|
961
961
|
{
|
|
962
|
-
qty: new
|
|
962
|
+
qty: new ARIOToken(100).toMARIO(),
|
|
963
963
|
},
|
|
964
964
|
{
|
|
965
965
|
tags: [{ name: 'App-Name', value: 'My-Awesome-App' }],
|
|
@@ -974,10 +974,10 @@ Decreases the callers operator stake. Must be executed with a wallet registered
|
|
|
974
974
|
_Note: Requires `signer` to be provided on `IO.init` to sign the transaction._
|
|
975
975
|
|
|
976
976
|
```typescript
|
|
977
|
-
const
|
|
978
|
-
const { id: txId } = await
|
|
977
|
+
const ario = ARIO.init({ signer: new ArweaveSigner(jwk) });
|
|
978
|
+
const { id: txId } = await ario.decreaseOperatorStake(
|
|
979
979
|
{
|
|
980
|
-
qty: new
|
|
980
|
+
qty: new ARIOToken(100).toMARIO(),
|
|
981
981
|
},
|
|
982
982
|
{
|
|
983
983
|
tags: [{ name: 'App-Name', value: 'My-Awesome-App' }],
|
|
@@ -992,12 +992,12 @@ Redelegates the stake of a specific address to a new gateway. Vault ID may be op
|
|
|
992
992
|
e.g: If 1000 mIO is redelegated and the fee rate is 10%, the fee will be 100 mIO. Resulting in 900 mIO being redelegated to the new gateway and 100 mIO being deducted back to the protocol balance.
|
|
993
993
|
|
|
994
994
|
```typescript
|
|
995
|
-
const
|
|
995
|
+
const ario = ARIO.init({ signer: new ArweaveSigner(jwk) });
|
|
996
996
|
|
|
997
|
-
const { id: txId } = await
|
|
997
|
+
const { id: txId } = await ario.redelegateStake({
|
|
998
998
|
target: 't4Xr0_J4Iurt7caNST02cMotaz2FIbWQ4Kbj616RHl3',
|
|
999
999
|
source: 'HwFceQaMQnOBgKDpnFqCqgwKwEU5LBme1oXRuQOWSRA',
|
|
1000
|
-
stakeQty: new
|
|
1000
|
+
stakeQty: new ARIOToken(1000).toMARIO(),
|
|
1001
1001
|
vaultId: 'fDrr0_J4Iurt7caNST02cMotaz2FIbWQ4Kcj616RHl3',
|
|
1002
1002
|
});
|
|
1003
1003
|
```
|
|
@@ -1007,9 +1007,9 @@ const { id: txId } = await io.redelegateStake({
|
|
|
1007
1007
|
Retrieves the fee rate as percentage required to redelegate the stake of a specific address. Fee rate ranges from 0% to 60% based on the number of redelegations since the last fee reset.
|
|
1008
1008
|
|
|
1009
1009
|
```typescript
|
|
1010
|
-
const
|
|
1010
|
+
const ario = ARIO.init();
|
|
1011
1011
|
|
|
1012
|
-
const fee = await
|
|
1012
|
+
const fee = await ario.getRedelegationFee({
|
|
1013
1013
|
address: 't4Xr0_J4Iurt7caNST02cMotaz2FIbWQ4Kbj616RHl3',
|
|
1014
1014
|
});
|
|
1015
1015
|
```
|
|
@@ -1035,8 +1035,8 @@ Purchases a new ArNS record with the specified name, type, and duration.
|
|
|
1035
1035
|
_Note: Requires `signer` to be provided on `IO.init` to sign the transaction._
|
|
1036
1036
|
|
|
1037
1037
|
```typescript
|
|
1038
|
-
const
|
|
1039
|
-
const record = await
|
|
1038
|
+
const ario = ARIO.init({ processId: IO_DEVNET_PROCESS_ID, signer });
|
|
1039
|
+
const record = await ario.buyRecord(
|
|
1040
1040
|
{ name: 'ardrive', type: 'lease', years: 1 },
|
|
1041
1041
|
{
|
|
1042
1042
|
// optional tags
|
|
@@ -1050,8 +1050,8 @@ const record = await io.buyRecord(
|
|
|
1050
1050
|
Retrieves the record info of the specified ArNS name.
|
|
1051
1051
|
|
|
1052
1052
|
```typescript
|
|
1053
|
-
const
|
|
1054
|
-
const record = await
|
|
1053
|
+
const ario = ARIO.init();
|
|
1054
|
+
const record = await ario.getArNSRecord({ name: 'ardrive' });
|
|
1055
1055
|
```
|
|
1056
1056
|
|
|
1057
1057
|
<details>
|
|
@@ -1074,9 +1074,9 @@ const record = await io.getArNSRecord({ name: 'ardrive' });
|
|
|
1074
1074
|
Retrieves all registered ArNS records of the IO process, paginated and sorted by the specified criteria. The `cursor` used for pagination is the last ArNS name from the previous request.
|
|
1075
1075
|
|
|
1076
1076
|
```typescript
|
|
1077
|
-
const
|
|
1077
|
+
const ario = ARIO.init();
|
|
1078
1078
|
// get the newest 100 names
|
|
1079
|
-
const records = await
|
|
1079
|
+
const records = await ario.getArNSRecords({
|
|
1080
1080
|
limit: 100,
|
|
1081
1081
|
sortBy: 'startTimestamp',
|
|
1082
1082
|
sortOrder: 'desc',
|
|
@@ -1150,8 +1150,8 @@ Increases the undername support of a domain up to a maximum of 10k. Domains, by
|
|
|
1150
1150
|
_Note: Requires `signer` to be provided on `IO.init` to sign the transaction._
|
|
1151
1151
|
|
|
1152
1152
|
```typescript
|
|
1153
|
-
const
|
|
1154
|
-
const { id: txId } = await
|
|
1153
|
+
const ario = ARIO.init({ signer: new ArweaveSigner(jwk) });
|
|
1154
|
+
const { id: txId } = await ario.increaseUndernameLimit(
|
|
1155
1155
|
{
|
|
1156
1156
|
name: 'ar-io',
|
|
1157
1157
|
qty: 420,
|
|
@@ -1166,8 +1166,8 @@ const { id: txId } = await io.increaseUndernameLimit(
|
|
|
1166
1166
|
Extends the lease of a registered ArNS domain, with an extension of 1-5 years depending on grace period status. Permanently registered domains cannot be extended.
|
|
1167
1167
|
|
|
1168
1168
|
```typescript
|
|
1169
|
-
const
|
|
1170
|
-
const { id: txId } = await
|
|
1169
|
+
const ario = ARIO.init({ signer: new ArweaveSigner(jwk) });
|
|
1170
|
+
const { id: txId } = await ario.extendLease(
|
|
1171
1171
|
{
|
|
1172
1172
|
name: 'ar-io',
|
|
1173
1173
|
years: 1,
|
|
@@ -1182,13 +1182,13 @@ const { id: txId } = await io.extendLease(
|
|
|
1182
1182
|
Calculates the price in mIO to perform the interaction in question, eg a 'Buy-record' interaction, where args are the specific params for that interaction.
|
|
1183
1183
|
|
|
1184
1184
|
```typescript
|
|
1185
|
-
const price = await
|
|
1185
|
+
const price = await ario
|
|
1186
1186
|
.getTokenCost({
|
|
1187
1187
|
intent: 'Buy-Record',
|
|
1188
1188
|
name: 'ar-io',
|
|
1189
1189
|
type: 'permabuy',
|
|
1190
1190
|
})
|
|
1191
|
-
.then((p) => new
|
|
1191
|
+
.then((p) => new mARIOToken(p).toARIO()); // convert to IO for readability
|
|
1192
1192
|
```
|
|
1193
1193
|
|
|
1194
1194
|
<details>
|
|
@@ -1205,8 +1205,8 @@ const price = await io
|
|
|
1205
1205
|
Retrieves the current demand factor of the network. The demand factor is a multiplier applied to the cost of ArNS interactions based on the current network demand.
|
|
1206
1206
|
|
|
1207
1207
|
```typescript
|
|
1208
|
-
const
|
|
1209
|
-
const demandFactor = await
|
|
1208
|
+
const ario = ARIO.init();
|
|
1209
|
+
const demandFactor = await ario.getDemandFactor();
|
|
1210
1210
|
```
|
|
1211
1211
|
|
|
1212
1212
|
<details>
|
|
@@ -1223,8 +1223,8 @@ const demandFactor = await io.getDemandFactor();
|
|
|
1223
1223
|
Retrieves all active returned names of the IO process, paginated and sorted by the specified criteria. The `cursor` used for pagination is the last returned name from the previous request.
|
|
1224
1224
|
|
|
1225
1225
|
```typescript
|
|
1226
|
-
const
|
|
1227
|
-
const returnedNames = await
|
|
1226
|
+
const ario = ARIO.init();
|
|
1227
|
+
const returnedNames = await ario.getArNSReturnedNames({
|
|
1228
1228
|
limit: 100,
|
|
1229
1229
|
sortBy: 'endTimestamp',
|
|
1230
1230
|
sortOrder: 'asc', // return the returned names ending soonest first
|
|
@@ -1266,8 +1266,8 @@ const returnedNames = await io.getArNSReturnedNames({
|
|
|
1266
1266
|
Retrieves the returned name data for the specified returned name.
|
|
1267
1267
|
|
|
1268
1268
|
```typescript
|
|
1269
|
-
const
|
|
1270
|
-
const returnedName = await
|
|
1269
|
+
const ario = ARIO.init();
|
|
1270
|
+
const returnedName = await ario.getArNSReturnedName({ name: 'permalink' });
|
|
1271
1271
|
```
|
|
1272
1272
|
|
|
1273
1273
|
<details>
|
|
@@ -1299,8 +1299,8 @@ const returnedName = await io.getArNSReturnedName({ name: 'permalink' });
|
|
|
1299
1299
|
Returns the current epoch data.
|
|
1300
1300
|
|
|
1301
1301
|
```typescript
|
|
1302
|
-
const
|
|
1303
|
-
const epoch = await
|
|
1302
|
+
const ario = ARIO.init();
|
|
1303
|
+
const epoch = await ario.getCurrentEpoch();
|
|
1304
1304
|
```
|
|
1305
1305
|
|
|
1306
1306
|
<details>
|
|
@@ -1355,8 +1355,8 @@ const epoch = await io.getCurrentEpoch();
|
|
|
1355
1355
|
Returns the epoch data for the specified block height. If no epoch index is provided, the current epoch is used.
|
|
1356
1356
|
|
|
1357
1357
|
```typescript
|
|
1358
|
-
const
|
|
1359
|
-
const epoch = await
|
|
1358
|
+
const ario = ARIO.init();
|
|
1359
|
+
const epoch = await ario.getEpoch({ epochIndex: 0 });
|
|
1360
1360
|
```
|
|
1361
1361
|
|
|
1362
1362
|
<details>
|
|
@@ -1423,8 +1423,8 @@ const epoch = await io.getEpoch({ epochIndex: 0 });
|
|
|
1423
1423
|
Returns the epoch-indexed observation list. If no epoch index is provided, the current epoch is used.
|
|
1424
1424
|
|
|
1425
1425
|
```typescript
|
|
1426
|
-
const
|
|
1427
|
-
const observations = await
|
|
1426
|
+
const ario = ARIO.init();
|
|
1427
|
+
const observations = await ario.getObservations();
|
|
1428
1428
|
```
|
|
1429
1429
|
|
|
1430
1430
|
<details>
|
|
@@ -1456,8 +1456,8 @@ const observations = await io.getObservations();
|
|
|
1456
1456
|
Returns the current rewards distribution information. If no epoch index is provided, the current epoch is used.
|
|
1457
1457
|
|
|
1458
1458
|
```typescript
|
|
1459
|
-
const
|
|
1460
|
-
const distributions = await
|
|
1459
|
+
const ario = ARIO.init();
|
|
1460
|
+
const distributions = await ario.getDistributions({ epochIndex: 0 });
|
|
1461
1461
|
```
|
|
1462
1462
|
|
|
1463
1463
|
<details>
|
|
@@ -1492,8 +1492,8 @@ Saves the observations of the current epoch. Requires `signer` to be provided on
|
|
|
1492
1492
|
_Note: Requires `signer` to be provided on `IO.init` to sign the transaction._
|
|
1493
1493
|
|
|
1494
1494
|
```typescript
|
|
1495
|
-
const
|
|
1496
|
-
const { id: txId } = await
|
|
1495
|
+
const ario = ARIO.init({ signer: new ArweaveSigner(jwk) });
|
|
1496
|
+
const { id: txId } = await ario.saveObservations(
|
|
1497
1497
|
{
|
|
1498
1498
|
reportTxId: 'fDrr0_J4Iurt7caNST02cMotaz2FIbWQ4Kcj616RHl3',
|
|
1499
1499
|
failedGateways: ['t4Xr0_J4Iurt7caNST02cMotaz2FIbWQ4Kbj616RHl3'],
|
|
@@ -1511,8 +1511,8 @@ const { id: txId } = await io.saveObservations(
|
|
|
1511
1511
|
Retrieves the prescribed observers of the IO process. To fetch prescribed observers for a previous epoch set the `epochIndex` to the desired epoch index.
|
|
1512
1512
|
|
|
1513
1513
|
```typescript
|
|
1514
|
-
const
|
|
1515
|
-
const observers = await
|
|
1514
|
+
const ario = ARIO.init();
|
|
1515
|
+
const observers = await ario.getPrescribedObservers({ epochIndex: 0 });
|
|
1516
1516
|
```
|
|
1517
1517
|
|
|
1518
1518
|
<details>
|
|
@@ -1544,8 +1544,8 @@ const observers = await io.getPrescribedObservers({ epochIndex: 0 });
|
|
|
1544
1544
|
Retrieves all primary names paginated and sorted by the specified criteria. The `cursor` used for pagination is the last name from the previous request.
|
|
1545
1545
|
|
|
1546
1546
|
```typescript
|
|
1547
|
-
const
|
|
1548
|
-
const names = await
|
|
1547
|
+
const ario = ARIO.init();
|
|
1548
|
+
const names = await ario.getPrimaryNames({
|
|
1549
1549
|
cursor: 'ao', // this is the last name from the previous request
|
|
1550
1550
|
limit: 1,
|
|
1551
1551
|
sortBy: 'startTimestamp',
|
|
@@ -1581,12 +1581,12 @@ const names = await io.getPrimaryNames({
|
|
|
1581
1581
|
Retrieves the primary name for a given name or address.
|
|
1582
1582
|
|
|
1583
1583
|
```typescript
|
|
1584
|
-
const
|
|
1585
|
-
const name = await
|
|
1584
|
+
const ario = ARIO.init();
|
|
1585
|
+
const name = await ario.getPrimaryName({
|
|
1586
1586
|
name: 'arns',
|
|
1587
1587
|
});
|
|
1588
1588
|
// or
|
|
1589
|
-
const name = await
|
|
1589
|
+
const name = await ario.getPrimaryName({
|
|
1590
1590
|
address: 't4Xr0_J4Iurt7caNST02cMotaz2FIbWQ4Kbj616RHl3',
|
|
1591
1591
|
});
|
|
1592
1592
|
```
|
|
@@ -1611,8 +1611,8 @@ Requests a primary name for the caller's address. The request must be approved b
|
|
|
1611
1611
|
_Note: Requires `signer` to be provided on `IO.init` to sign the transaction._
|
|
1612
1612
|
|
|
1613
1613
|
```typescript
|
|
1614
|
-
const
|
|
1615
|
-
const { id: txId } = await
|
|
1614
|
+
const ario = ARIO.init({ signer: new ArweaveSigner(jwk) });
|
|
1615
|
+
const { id: txId } = await ario.requestPrimaryName({
|
|
1616
1616
|
name: 'arns',
|
|
1617
1617
|
});
|
|
1618
1618
|
```
|
|
@@ -1622,8 +1622,8 @@ const { id: txId } = await io.requestPrimaryName({
|
|
|
1622
1622
|
Retrieves the primary name request for a a wallet address.
|
|
1623
1623
|
|
|
1624
1624
|
```typescript
|
|
1625
|
-
const
|
|
1626
|
-
const request = await
|
|
1625
|
+
const ario = ARIO.init();
|
|
1626
|
+
const request = await ario.getPrimaryNameRequest({
|
|
1627
1627
|
initiator: 't4Xr0_J4Iurt7caNST02cMotaz2FIbWQ4Kbj616RHl3',
|
|
1628
1628
|
});
|
|
1629
1629
|
```
|
|
@@ -1648,7 +1648,7 @@ The IO client class exposes APIs relevant to the ar.io process. It can be config
|
|
|
1648
1648
|
|
|
1649
1649
|
```typescript
|
|
1650
1650
|
// provide a custom ao infrastructure and process id
|
|
1651
|
-
const
|
|
1651
|
+
const ario = ARIO.init({
|
|
1652
1652
|
process: new AoProcess({
|
|
1653
1653
|
processId: 'IO_PROCESS_ID'
|
|
1654
1654
|
ao: connect({
|
|
@@ -2001,7 +2001,7 @@ const { id: txId } = await ant.setLogo(
|
|
|
2001
2001
|
);
|
|
2002
2002
|
```
|
|
2003
2003
|
|
|
2004
|
-
#### `releaseName({ name,
|
|
2004
|
+
#### `releaseName({ name, arioProcessId })`
|
|
2005
2005
|
|
|
2006
2006
|
Releases a name from the current owner and makes it available for purchase on the IO contract. The name must be permanently owned by the releasing wallet. If purchased within the recently returned name period (14 epochs), 50% of the purchase amount will be distributed to the ANT owner at the time of release. If no purchases in the recently returned name period, the name can be reregistered by anyone for the normal fee.
|
|
2007
2007
|
|
|
@@ -2010,11 +2010,11 @@ _Note: Requires `signer` to be provided on `ANT.init` to sign the transaction._
|
|
|
2010
2010
|
```typescript
|
|
2011
2011
|
const { id: txId } = await ant.releaseName({
|
|
2012
2012
|
name: 'permalink',
|
|
2013
|
-
|
|
2013
|
+
arioProcessId: ARIO_TESTNET_PROCESS_ID, // releases the name owned by the ANT and sends it to recently returned names on the IO contract
|
|
2014
2014
|
});
|
|
2015
2015
|
```
|
|
2016
2016
|
|
|
2017
|
-
#### `reassignName({ name,
|
|
2017
|
+
#### `reassignName({ name, arioProcessId, antProcessId })`
|
|
2018
2018
|
|
|
2019
2019
|
Reassigns a name to a new ANT. This can only be done by the current owner of the ANT.
|
|
2020
2020
|
|
|
@@ -2023,12 +2023,12 @@ _Note: Requires `signer` to be provided on `ANT.init` to sign the transaction._
|
|
|
2023
2023
|
```typescript
|
|
2024
2024
|
const { id: txId } = await ant.reassignName({
|
|
2025
2025
|
name: 'ardrive',
|
|
2026
|
-
|
|
2026
|
+
arioProcessId: ARIO_TESTNET_PROCESS_ID,
|
|
2027
2027
|
antProcessId: NEW_ANT_PROCESS_ID, // the new ANT process id that will take over ownership of the name
|
|
2028
2028
|
});
|
|
2029
2029
|
```
|
|
2030
2030
|
|
|
2031
|
-
#### `approvePrimaryNameRequest({ name, address,
|
|
2031
|
+
#### `approvePrimaryNameRequest({ name, address, arioProcessId })`
|
|
2032
2032
|
|
|
2033
2033
|
Approves a primary name request for a given name or address.
|
|
2034
2034
|
|
|
@@ -2038,11 +2038,11 @@ _Note: Requires `signer` to be provided on `ANT.init` to sign the transaction._
|
|
|
2038
2038
|
const { id: txId } = await ant.approvePrimaryNameRequest({
|
|
2039
2039
|
name: 'arns',
|
|
2040
2040
|
address: 't4Xr0_J4Iurt7caNST02cMotaz2FIbWQ4Kbj616RHl3', // must match the request initiator address
|
|
2041
|
-
|
|
2041
|
+
arioProcessId: ARIO_TESTNET_PROCESS_ID, // the ARIO process id to use for the request
|
|
2042
2042
|
});
|
|
2043
2043
|
```
|
|
2044
2044
|
|
|
2045
|
-
#### `removePrimaryNames({ names,
|
|
2045
|
+
#### `removePrimaryNames({ names, arioProcessId })`
|
|
2046
2046
|
|
|
2047
2047
|
Removes primary names from the ANT process.
|
|
2048
2048
|
|
|
@@ -2051,7 +2051,7 @@ _Note: Requires `signer` to be provided on `ANT.init` to sign the transaction._
|
|
|
2051
2051
|
```typescript
|
|
2052
2052
|
const { id: txId } = await ant.removePrimaryNames({
|
|
2053
2053
|
names: ['arns', 'test_arns'], // any primary names associated with a base name controlled by this ANT will be removed
|
|
2054
|
-
|
|
2054
|
+
arioProcessId: ARIO_TESTNET_PROCESS_ID,
|
|
2055
2055
|
});
|
|
2056
2056
|
```
|
|
2057
2057
|
|
|
@@ -2110,7 +2110,7 @@ let hasMore = true;
|
|
|
2110
2110
|
let cursor: string | undefined;
|
|
2111
2111
|
const gateaways = [];
|
|
2112
2112
|
while (hasMore) {
|
|
2113
|
-
const page = await
|
|
2113
|
+
const page = await ario.getGateways({ limit: 100, cursor });
|
|
2114
2114
|
gateaways.push(...items);
|
|
2115
2115
|
cursor = page.nextCursor;
|
|
2116
2116
|
hasMore = page.hasMore;
|