@ar.io/sdk 1.2.0-alpha.2 → 1.2.0-alpha.20

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.
Files changed (54) hide show
  1. package/README.md +96 -423
  2. package/bundles/web.bundle.min.js +246 -160
  3. package/lib/cjs/common/ant-ao.js +297 -0
  4. package/lib/cjs/common/ant.js +13 -3
  5. package/lib/cjs/common/ar-io.js +9 -0
  6. package/lib/cjs/common/contracts/ao-process.js +128 -72
  7. package/lib/cjs/common/index.js +3 -2
  8. package/lib/cjs/common/io.js +122 -97
  9. package/lib/cjs/constants.js +8 -2
  10. package/lib/cjs/contract-state.js +1 -0
  11. package/lib/cjs/io.js +5 -1
  12. package/lib/cjs/node/index.js +1 -0
  13. package/lib/cjs/utils/ao.js +62 -0
  14. package/lib/cjs/utils/graphql/index.js +1 -0
  15. package/lib/cjs/utils/graphql/processes.js +130 -0
  16. package/lib/cjs/utils/index.js +2 -0
  17. package/lib/cjs/utils/json.js +28 -0
  18. package/lib/cjs/version.js +1 -1
  19. package/lib/cjs/web/index.js +1 -0
  20. package/lib/esm/common/ant-ao.js +292 -0
  21. package/lib/esm/common/ant.js +15 -5
  22. package/lib/esm/common/ar-io.js +9 -0
  23. package/lib/esm/common/contracts/ao-process.js +128 -72
  24. package/lib/esm/common/index.js +3 -2
  25. package/lib/esm/common/io.js +122 -97
  26. package/lib/esm/constants.js +7 -1
  27. package/lib/esm/contract-state.js +1 -0
  28. package/lib/esm/io.js +3 -0
  29. package/lib/esm/node/index.js +1 -0
  30. package/lib/esm/utils/ao.js +58 -0
  31. package/lib/esm/utils/graphql/index.js +1 -0
  32. package/lib/esm/utils/graphql/processes.js +122 -0
  33. package/lib/esm/utils/index.js +2 -0
  34. package/lib/esm/utils/json.js +24 -0
  35. package/lib/esm/version.js +1 -1
  36. package/lib/esm/web/index.js +1 -0
  37. package/lib/types/common/ant-ao.d.ts +194 -0
  38. package/lib/types/common/ant.d.ts +5 -1
  39. package/lib/types/common/ar-io.d.ts +9 -0
  40. package/lib/types/common/contracts/ao-process.d.ts +8 -12
  41. package/lib/types/common/index.d.ts +2 -1
  42. package/lib/types/common/io.d.ts +25 -1
  43. package/lib/types/common.d.ts +12 -1
  44. package/lib/types/constants.d.ts +5 -0
  45. package/lib/types/io.d.ts +104 -8
  46. package/lib/types/node/index.d.ts +1 -0
  47. package/lib/types/utils/ao.d.ts +11 -0
  48. package/lib/types/utils/graphql/index.d.ts +1 -0
  49. package/lib/types/utils/graphql/processes.d.ts +35 -0
  50. package/lib/types/utils/index.d.ts +2 -0
  51. package/lib/types/utils/json.d.ts +17 -0
  52. package/lib/types/version.d.ts +1 -1
  53. package/lib/types/web/index.d.ts +1 -0
  54. package/package.json +6 -1
package/README.md CHANGED
@@ -2,7 +2,7 @@
2
2
 
3
3
  [![codecov](https://codecov.io/gh/ar-io/ar-io-sdk/graph/badge.svg?token=7dXKcT7dJy)](https://codecov.io/gh/ar-io/ar-io-sdk)
4
4
 
5
- This is the home of [ar.io] SDK. This SDK provides functionality for interacting with the ar.io ecosystem of services (e.g. gateways and observers) and protocols (e.g. ArNS). It is available for both NodeJS and Web environments.
5
+ This is the home of [ar.io] SDK. This SDK provides functionality for interacting with the ar.io ecosystem of services (e.g. gateways and observers) and protocols (e.g. ArNS and AO). It is available for both NodeJS and Web environments.
6
6
 
7
7
  ## Table of Contents
8
8
 
@@ -15,11 +15,10 @@ This is the home of [ar.io] SDK. This SDK provides functionality for interacting
15
15
  - [Typescript](#typescript)
16
16
  - [IOToken & mIOToken](#iotoken--miotoken)
17
17
  - [Converting IO to mIO](#converting-io-to-mio)
18
- - [ArIO Contract](#ario-contract)
18
+ - [ArIO Process](#ario-process)
19
19
 
20
20
  - [APIs](#apis)
21
21
  - [`init({ signer })`](#init-signer-)
22
- - [`getState({ evaluationOptions })`](#getstate-evaluationoptions-)
23
22
  - [`getBalance({ address, evaluationOptions })`](#getbalance-address-evaluationoptions-)
24
23
  - [`getBalances({ evaluationOptions })`](#getbalances-evaluationoptions-)
25
24
  - [`getGateway({ address, evaluationOptions })`](#getgateway-address-evaluationoptions-)
@@ -31,8 +30,6 @@ This is the home of [ar.io] SDK. This SDK provides functionality for interacting
31
30
  - [`getEpoch({ evaluationOptions })`](#getepoch-evaluationoptions-)
32
31
  - [`getCurrentEpoch({ evaluationOptions })`](#getcurrentepoch-evaluationoptions-)
33
32
  - [`getPrescribedObservers({ evaluationOptions })`](#getprescribedobservers-evaluationoptions-)
34
- - [`getAuction({ domain, evaluationOptions })`](#getauction-domain-evaluationoptions-)
35
- - [`getAuctions({ evauluationOptions })`](#getauctions-evauluationoptions-)
36
33
  - [`joinNetwork(params)`](#joinnetworkparams)
37
34
  - [`updateGatewaySettings(gatewaySettings)`](#updategatewaysettingsgatewaysettings)
38
35
  - [`increaseDelegateStake({ target, qty })`](#increasedelegatestake-target-qty-)
@@ -41,12 +38,11 @@ This is the home of [ar.io] SDK. This SDK provides functionality for interacting
41
38
  - [`decreaseOperatorStake({ qty })`](#decreaseoperatorstake-qty-)
42
39
  - [`saveObservations({ reportTxId, failedGateways })`](#saveobservations-reporttxid-failedgateways-)
43
40
  - [`transfer({ target, qty, denomination })`](#transfer-target-qty-denomination-)
44
- - [Custom Contracts](#custom-contracts)
41
+ - [Custom Processes](#custom-processes)
45
42
 
46
43
  - [Arweave Name Tokens (ANT's)](#arweave-name-tokens-ants)
47
44
  - [APIs](#apis-1)
48
45
  - [`init({ signer })`](#init-signer-)
49
- - [`getState({ evaluationOptions })`](#getstate-evaluationoptions-)
50
46
  - [`getOwner({ evaluationOptions })`](#getowner-evaluationoptions-)
51
47
  - [`getControllers({ evaluationOptions })`](#getcontrollers-evaluationoptions-)
52
48
  - [`getRecords({ evaluationOptions })`](#getrecords-evaluationoptions-)
@@ -85,9 +81,9 @@ yarn add @ar.io/sdk
85
81
  ## Quick Start
86
82
 
87
83
  ```typescript
88
- import { ArIO } from '@ar.io/sdk';
84
+ import { IO } from '@ar.io/sdk';
89
85
 
90
- const arIO = ArIO.init();
86
+ const arIO = IO.init();
91
87
  const gateways = await arIO.getGateways();
92
88
  ```
93
89
 
@@ -141,10 +137,10 @@ The SDK is provided in both CommonJS and ESM formats and is compatible with bund
141
137
  #### Bundlers (Webpack, Rollup, ESbuild, etc.)
142
138
 
143
139
  ```javascript
144
- import { ArIO } from '@ar.io/sdk';
140
+ import { IO } from '@ar.io/sdk';
145
141
 
146
142
  // set up client
147
- const arIO = ArIO.init();
143
+ const arIO = IO.init();
148
144
  // fetch gateways
149
145
  const gateways = await arIO.getGateways();
150
146
  ```
@@ -155,10 +151,10 @@ const gateways = await arIO.getGateways();
155
151
 
156
152
  ```html
157
153
  <script type="module">
158
- import { ArIO } from 'https://unpkg.com/@ar.io/sdk';
154
+ import { IO } from 'https://unpkg.com/@ar.io/sdk';
159
155
 
160
156
  // set up client
161
- const arIO = ArIO.init();
157
+ const arIO = IO.init();
162
158
  // fetch gateways
163
159
  const gateways = await arIO.getGateways();
164
160
  </script>
@@ -169,10 +165,10 @@ const gateways = await arIO.getGateways();
169
165
  #### ESM (NodeNext)
170
166
 
171
167
  ```javascript
172
- import { ArIO } from '@ar.io/sdk/node';
168
+ import { IO } from '@ar.io/sdk/node';
173
169
 
174
170
  // set up client
175
- const arIO = ArIO.init();
171
+ const arIO = IO.init();
176
172
  // fetch gateways
177
173
  const gateways = await arIO.getGateways();
178
174
  ```
@@ -180,10 +176,10 @@ const gateways = await arIO.getGateways();
180
176
  #### CJS
181
177
 
182
178
  ```javascript
183
- import { ArIO } from '@ar.io/sdk';
179
+ import { IO } from '@ar.io/sdk';
184
180
 
185
181
  // set up client
186
- const arIO = ArIO.init();
182
+ const arIO = IO.init();
187
183
  // fetch gateways
188
184
  const gateways = await arIO.getGateways();
189
185
  ```
@@ -194,9 +190,9 @@ The SDK provides TypeScript types. When you import the SDK in a TypeScript proje
194
190
 
195
191
  ## IOToken & mIOToken
196
192
 
197
- The ArIO contract stores all values as mIO (milli-IO) to avoid floating-point arithmetic issues. The SDK provides an `IOToken` and `mIOToken` classes to handle the conversion between IO and mIO, along with rounding logic for precision.
193
+ The ArIO process stores all values as mIO (milli-IO) to avoid floating-point arithmetic issues. The SDK provides an `IOToken` and `mIOToken` classes to handle the conversion between IO and mIO, along with rounding logic for precision.
198
194
 
199
- **All contract interactions expect values in mIO. If numbers are provided as inputs, they are assumed to be in raw mIO values.**
195
+ **All process interactions expect values in mIO. If numbers are provided as inputs, they are assumed to be in raw mIO values.**
200
196
 
201
197
  ### Converting IO to mIO
202
198
 
@@ -212,7 +208,7 @@ const ioValue = new mIOToken(mIOValue).toIO();
212
208
  console.log(ioValue); // 1 (IO)
213
209
  ```
214
210
 
215
- ## ArIO Contract
211
+ ## ArIO Process
216
212
 
217
213
  ### APIs
218
214
 
@@ -222,7 +218,7 @@ Factory function to that creates a read-only or writeable client. By providing a
222
218
 
223
219
  ```typescript
224
220
  // read-only client that has access to all read APIs
225
- const arIOReadable = ArIO.init()
221
+ const arIOReadable = IO.init()
226
222
 
227
223
  const arweave = Arweave.init({
228
224
  host: 'ar-io.dev',
@@ -231,118 +227,20 @@ const arweave = Arweave.init({
231
227
  })
232
228
  // for browser environments
233
229
  const browserSigner = new ArConnectSigner(window.arweaveWallet, arweave);
234
- const arIOWriteable = ArIO.init({ signer: browserSigner});
230
+ const arIOWriteable = IO.init({ signer: browserSigner});
235
231
 
236
232
  // for node environments
237
233
  const nodeSigner = new ArweaveSigner(JWK);
238
- const arIOWriteable = ArIO.init({ signer: nodeSigner});
234
+ const arIOWriteable = IO.init({ signer: nodeSigner});
239
235
 
240
236
  ```
241
237
 
242
- ### `getState({ evaluationOptions })`
243
-
244
- Retrieves the current state of the ArIO contract.
245
-
246
- ```typescript
247
- const arIO = ArIO.init();
248
- const state = await arIO.getState();
249
- ```
250
-
251
- <details>
252
- <summary>Output</summary>
253
-
254
- ```json
255
- {
256
- "lastTickedHeight": 1415568, // current block height
257
- "evolve": "92MCDWn0LihmWXKVnOeMDEQxPbiV4Y3bRjnTet7J3eg",
258
- "auctions": {
259
- // auctions
260
- },
261
- "balances": {
262
- // balances
263
- },
264
- "distributions": {
265
- // epoch distribution info
266
- },
267
- "gateways": {
268
- // gateways
269
- },
270
- "observations": {
271
- // observations
272
- },
273
- "prescribedObservers": {
274
- // prescribedObservers
275
- },
276
- "records": {
277
- // records
278
- },
279
- "demandFactoring": {
280
- // demandFactoring
281
- },
282
- "vaults": {
283
- // vaults
284
- }
285
- }
286
- ```
287
-
288
- </details>
289
-
290
- Alternatively, you can get the contract at a specific block height or sort key by providing `evaluationOptions`:
291
-
292
- ```typescript
293
- const arIO = ArIO.init();
294
- const state = await arIO.getState({
295
- evaluationOptions: {
296
- evalTo: { blockHeight: 1382230 }, // alternatively, use evalTo: { sortKey: 'SORT_KEY' }
297
- },
298
- });
299
- ```
300
-
301
- <details>
302
- <summary>Output</summary>
303
-
304
- ```json
305
- {
306
- "lastTickedHeight": 1382230, // evaluated block height
307
- "evolve": "92MCDWn0LihmWXKVnOeMDEQxPbiV4Y3bRjnTet7J3eg",
308
- "auctions": {
309
- // auctions
310
- },
311
- "balances": {
312
- // balances
313
- },
314
- "distributions": {
315
- // epoch distribution info
316
- },
317
- "gateways": {
318
- // gateways
319
- },
320
- "observations": {
321
- // observations
322
- },
323
- "prescribedObservers": {
324
- // prescribedObservers
325
- },
326
- "records": {
327
- // records
328
- },
329
- "demandFactoring": {
330
- // demandFactoring
331
- },
332
- "vaults": {
333
- // vaults
334
- }
335
- }
336
- ```
337
-
338
- </details>
339
-
340
238
  #### `getBalance({ address, evaluationOptions })`
341
239
 
342
240
  Retrieves the balance of the specified wallet address.
343
241
 
344
242
  ```typescript
345
- const arIO = ArIO.init();
243
+ const arIO = IO.init();
346
244
  // the balance will be returned in mIO as a value
347
245
  const balance = await arIO
348
246
  .getBalance({
@@ -365,7 +263,7 @@ console.log(balance.valueOf());
365
263
 
366
264
  #### `getBalances({ evaluationOptions })`
367
265
 
368
- Retrieves the balances of the ArIO contract in `mIO`
266
+ Retrieves the balances of the ArIO process in `mIO`
369
267
 
370
268
  <!--
371
269
  // ALM - A part of me wonders whether streaming JSON might be beneficial in the future
@@ -374,7 +272,7 @@ Retrieves the balances of the ArIO contract in `mIO`
374
272
  -->
375
273
 
376
274
  ```typescript
377
- const arIO = ArIO.init();
275
+ const arIO = IO.init();
378
276
  const balances = await arIO.getBalances();
379
277
  ```
380
278
 
@@ -396,7 +294,7 @@ const balances = await arIO.getBalances();
396
294
  Retrieves a gateway's info by its staking wallet address.
397
295
 
398
296
  ```typescript
399
- const arIO = ArIO.init();
297
+ const arIO = IO.init();
400
298
  const gateway = await arIO.getGateway({
401
299
  address: 'INSERT_GATEWAY_ADDRESS',
402
300
  });
@@ -443,10 +341,10 @@ const gateway = await arIO.getGateway({
443
341
 
444
342
  #### `getGateways({ evaluationOptions })`
445
343
 
446
- Retrieves the registered gateways of the ArIO contract.
344
+ Retrieves the registered gateways of the ArIO process.
447
345
 
448
346
  ```typescript
449
- const arIO = ArIO.init();
347
+ const arIO = IO.init();
450
348
  const gateways = await arIO.getGateways();
451
349
  ```
452
350
 
@@ -496,7 +394,7 @@ const gateways = await arIO.getGateways();
496
394
  Retrieves the record info of the specified ArNS name.
497
395
 
498
396
  ```typescript
499
- const arIO = ArIO.init();
397
+ const arIO = IO.init();
500
398
  const record = await arIO.getArNSRecord({ domain: 'ardrive' });
501
399
  ```
502
400
 
@@ -505,7 +403,7 @@ const record = await arIO.getArNSRecord({ domain: 'ardrive' });
505
403
 
506
404
  ```json
507
405
  {
508
- "contractTxId": "bh9l1cy0aksiL_x9M359faGzM_yjralacHIUo8_nQXM",
406
+ "processId": "bh9l1cy0aksiL_x9M359faGzM_yjralacHIUo8_nQXM",
509
407
  "endTimestamp": 1711122739,
510
408
  "startTimestamp": 1694101828,
511
409
  "type": "lease",
@@ -517,10 +415,10 @@ const record = await arIO.getArNSRecord({ domain: 'ardrive' });
517
415
 
518
416
  #### `getArNSRecords({ evaluationOptions })`
519
417
 
520
- Retrieves all registered ArNS records of the ArIO contract.
418
+ Retrieves all registered ArNS records of the ArIO process.
521
419
 
522
420
  ```typescript
523
- const arIO = ArIO.init();
421
+ const arIO = IO.init();
524
422
  const records = await arIO.getArNSRecords();
525
423
  ```
526
424
 
@@ -530,14 +428,14 @@ const records = await arIO.getArNSRecords();
530
428
  ```json
531
429
  {
532
430
  "ardrive": {
533
- "contractTxId": "bh9l1cy0aksiL_x9M359faGzM_yjralacHIUo8_nQXM",
431
+ "processId": "bh9l1cy0aksiL_x9M359faGzM_yjralacHIUo8_nQXM",
534
432
  "endTimestamp": 1711122739,
535
433
  "startTimestamp": 1694101828,
536
434
  "type": "lease",
537
435
  "undernames": 100
538
436
  },
539
437
  "ar-io": {
540
- "contractTxId": "eNey-H9RB9uCdoJUvPULb35qhZVXZcEXv8xds4aHhkQ",
438
+ "processId": "eNey-H9RB9uCdoJUvPULb35qhZVXZcEXv8xds4aHhkQ",
541
439
  "purchasePrice": 75541282285, // value in mIO
542
440
  "startTimestamp": 1706747215,
543
441
  "type": "permabuy",
@@ -553,7 +451,7 @@ const records = await arIO.getArNSRecords();
553
451
  Returns the epoch-indexed observation list.
554
452
 
555
453
  ```typescript
556
- const arIO = ArIO.init();
454
+ const arIO = IO.init();
557
455
  const observations = await arIO.getObservations();
558
456
  ```
559
457
 
@@ -586,7 +484,7 @@ const observations = await arIO.getObservations();
586
484
  Returns the current rewards distribution information. The resulting object is pruned, to get older distributions use the `evaluationOptions` to `evalTo` a previous state.
587
485
 
588
486
  ```typescript
589
- const arIO = ArIO.init();
487
+ const arIO = IO.init();
590
488
  const distributions = await arIO.getDistributions();
591
489
  ```
592
490
 
@@ -610,7 +508,7 @@ const distributions = await arIO.getDistributions();
610
508
  Returns the epoch data for the specified block height.
611
509
 
612
510
  ```typescript
613
- const arIO = ArIO.init();
511
+ const arIO = IO.init();
614
512
  const epoch = await arIO.getEpoch({ blockHeight: 1382230 });
615
513
  ```
616
514
 
@@ -635,7 +533,7 @@ const epoch = await arIO.getEpoch({ blockHeight: 1382230 });
635
533
  Returns the current epoch data.
636
534
 
637
535
  ```typescript
638
- const arIO = ArIO.init();
536
+ const arIO = IO.init();
639
537
  const epoch = await arIO.getCurrentEpoch();
640
538
  ```
641
539
 
@@ -656,10 +554,10 @@ const epoch = await arIO.getCurrentEpoch();
656
554
 
657
555
  #### `getPrescribedObservers({ evaluationOptions })`
658
556
 
659
- Retrieves the prescribed observers of the ArIO contract. To fetch prescribed observers for a previous epoch set the `evaluationOptions` to the desired epoch.
557
+ Retrieves the prescribed observers of the ArIO process. To fetch prescribed observers for a previous epoch set the `evaluationOptions` to the desired epoch.
660
558
 
661
559
  ```typescript
662
- const arIO = ArIO.init();
560
+ const arIO = IO.init();
663
561
  const observers = await arIO.getPrescribedObservers();
664
562
  ```
665
563
 
@@ -684,7 +582,7 @@ const observers = await arIO.getPrescribedObservers();
684
582
  ```
685
583
 
686
584
  </details>
687
-
585
+
688
586
  Fetch the prescribed observers for a previous epoch by setting the `evaluationOptions` to the desired epoch.
689
587
 
690
588
  ```typescript
@@ -718,81 +616,6 @@ const previousEpochObservers = await arIO.getPrescribedObservers({
718
616
 
719
617
  </details>
720
618
 
721
- #### `getAuction({ domain, evaluationOptions })`
722
-
723
- Return the auction info for the supplied domain, be it in auction, registered, or available to auction.
724
-
725
- ```typescript
726
- const auction = await arIO.getAuction({ domain });
727
- ```
728
-
729
- <details>
730
- <summary>Output</summary>
731
-
732
- ```json
733
- {
734
- "name": "ardrive",
735
- "initiator": "",
736
- "contractTxId": "",
737
- "startPrice": 89950,
738
- "floorPrice": 1799,
739
- "startHeight": 1384196,
740
- "endHeight": 1394276,
741
- "type": "lease",
742
- "years": 1,
743
- "isActive": false,
744
- "isAvailableForAuction": false,
745
- "isRequiredToBeAuctioned": false,
746
- "currentPrice": 1799,
747
- "prices": {
748
- "1384196": 89950,
749
- "1384226": 88930,
750
- "1384256": 87922,
751
- "1394286": 1921,
752
- "1394306": 1899,
753
- "1394336": 1877
754
- }
755
- }
756
- ```
757
-
758
- </details>
759
-
760
- #### `getAuctions({ evauluationOptions })`
761
-
762
- Retrieves all active auctions.
763
-
764
- ```typescript
765
- const auctions = await arIO.getAuctions({ evaluationOptions });
766
- ```
767
-
768
- <details>
769
- <summary>Output</summary>
770
-
771
- ```json
772
- {
773
- "cyprien": {
774
- "contractTxId": "Fmhdc4f1rWK6Zn1W__7GNvWvo4d1FSze7rLK5AOnO5E",
775
- "endHeight": 1386879,
776
- "floorPrice": 4758777913,
777
- "initiator": "UPJHTNsaKcC6baqLFHMAMI7daWPIG3NDDfFQ2s2h8T0",
778
- "startHeight": 1376799,
779
- "startPrice": 237938895627,
780
- "type": "permabuy"
781
- },
782
- "saktinaga": {
783
- "contractTxId": "nl8heYyDxKowujaDqbsPkjALzULYG8T0z3J91CdWDIM",
784
- "endHeight": 1386834,
785
- "floorPrice": 2379388956,
786
- "initiator": "TE0zVR32RF5qFAO8K50-pEivZpM_s35HK-dex-5d-IU",
787
- "startHeight": 1376754,
788
- "startPrice": 118969447813,
789
- "type": "permabuy"
790
- }
791
- }
792
- ```
793
-
794
- </details>
795
-
796
619
  #### `getPriceForInteraction({ interactionName, payload })`
797
620
 
798
621
  Calculates the price in mIO to perform the interaction in question, eg a 'buyRecord' interaction, where payload is the specific params for that interaction.
@@ -819,7 +642,7 @@ console.log({ price: price.valueOf() });
819
642
 
820
643
  #### `joinNetwork(params)`
821
644
 
822
- Joins a gateway to the ar.io network via its associated wallet. Requires `signer` to be provided on `ArIO.init` to sign the transaction.
645
+ Joins a gateway to the ar.io network via its associated wallet. Requires `signer` to be provided on `IO.init` to sign the transaction.
823
646
 
824
647
  ```typescript
825
648
  const joinNetworkParams = {
@@ -838,7 +661,7 @@ const joinNetworkParams = {
838
661
  };
839
662
  const signer = new ArweaveSigner(jwk);
840
663
  // signer required for write interactions APIs
841
- const authenticatedArIO = ArIO.init({ signer });
664
+ const authenticatedArIO = IO.init({ signer });
842
665
  const { id: txId } = await authenticatedArIO.joinNetwork(
843
666
  joinNetworkParams,
844
667
  // optional additional tags
@@ -848,7 +671,7 @@ const { id: txId } = await authenticatedArIO.joinNetwork(
848
671
 
849
672
  #### `updateGatewaySettings(gatewaySettings)`
850
673
 
851
- Writes new gateway settings to the callers gateway configuration. Requires `signer` to be provided on `ArIO.init` to sign the transaction.
674
+ Writes new gateway settings to the callers gateway configuration. Requires `signer` to be provided on `IO.init` to sign the transaction.
852
675
 
853
676
  ```typescript
854
677
  const updateGatewaySettingsParams = {
@@ -857,7 +680,7 @@ const updateGatewaySettingsParams = {
857
680
 
858
681
  const signer = new ArweaveSigner(jwk);
859
682
  // signer required for write interactions APIs
860
- const authenticatedArIO = ArIO.init({ signer });
683
+ const authenticatedArIO = IO.init({ signer });
861
684
  const { id: txId } = await authenticatedArIO.updateGatewaySettings(
862
685
  updateGatewaySettingsParams,
863
686
  // optional additional tags
@@ -867,7 +690,7 @@ const { id: txId } = await authenticatedArIO.updateGatewaySettings(
867
690
 
868
691
  #### `increaseDelegateStake({ target, qty })`
869
692
 
870
- Increases the callers stake on the target gateway. Requires `signer` to be provided on `ArIO.init` to sign the transaction.
693
+ Increases the callers stake on the target gateway. Requires `signer` to be provided on `IO.init` to sign the transaction.
871
694
 
872
695
  ```typescript
873
696
  const params = {
@@ -877,7 +700,7 @@ const params = {
877
700
 
878
701
  const signer = new ArweaveSigner(jwk);
879
702
  // signer required for write interactions APIs
880
- const authenticatedArIO = ArIO.init({ signer });
703
+ const authenticatedArIO = IO.init({ signer });
881
704
  const { id: txId } = await authenticatedArIO.increaseDelegateStake(
882
705
  params,
883
706
  // optional additional tags
@@ -887,7 +710,7 @@ const { id: txId } = await authenticatedArIO.increaseDelegateStake(
887
710
 
888
711
  #### `decreaseDelegateStake({ target, qty })`
889
712
 
890
- Decreases the callers stake on the target gateway. Requires `signer` to be provided on `ArIO.init` to sign the transaction.
713
+ Decreases the callers stake on the target gateway. Requires `signer` to be provided on `IO.init` to sign the transaction.
891
714
 
892
715
  ```typescript
893
716
  const params = {
@@ -897,7 +720,7 @@ const params = {
897
720
 
898
721
  const signer = new ArweaveSigner(jwk);
899
722
  // signer required for write interactions APIs
900
- const authenticatedArIO = ArIO.init({ signer });
723
+ const authenticatedArIO = IO.init({ signer });
901
724
  const { id: txId } = await authenticatedArIO.decreaseDelegateStake(params, {
902
725
  tags: [{ name: 'App-Name', value: 'My-Awesome-App' }],
903
726
  });
@@ -905,7 +728,7 @@ const { id: txId } = await authenticatedArIO.decreaseDelegateStake(params, {
905
728
 
906
729
  #### `increaseOperatorStake({ qty })`
907
730
 
908
- Increases the callers operator stake. Must be executed with a wallet registered as a gateway operator. Requires `signer` to be provided on `ArIO.init` to sign the transaction.
731
+ Increases the callers operator stake. Must be executed with a wallet registered as a gateway operator. Requires `signer` to be provided on `IO.init` to sign the transaction.
909
732
 
910
733
  ```typescript
911
734
  const params = {
@@ -914,7 +737,7 @@ const params = {
914
737
 
915
738
  const signer = new ArweaveSigner(jwk);
916
739
  // signer required for write interactions APIs
917
- const authenticatedArIO = ArIO.init({ signer });
740
+ const authenticatedArIO = IO.init({ signer });
918
741
  const { id: txId } = await authenticatedArIO.increaseOperatorStake(params, {
919
742
  tags: [{ name: 'App-Name', value: 'My-Awesome-App' }],
920
743
  });
@@ -922,7 +745,7 @@ const { id: txId } = await authenticatedArIO.increaseOperatorStake(params, {
922
745
 
923
746
  #### `decreaseOperatorStake({ qty })`
924
747
 
925
- Decreases the callers operator stake. Must be executed with a wallet registered as a gateway operator. Requires `signer` to be provided on `ArIO.init` to sign the transaction.
748
+ Decreases the callers operator stake. Must be executed with a wallet registered as a gateway operator. Requires `signer` to be provided on `IO.init` to sign the transaction.
926
749
 
927
750
  ```typescript
928
751
  const params = {
@@ -931,7 +754,7 @@ const params = {
931
754
 
932
755
  const signer = new ArweaveSigner(jwk);
933
756
  // signer required for write interactions APIs
934
- const authenticatedArIO = ArIO.init({ signer });
757
+ const authenticatedArIO = IO.init({ signer });
935
758
  const { id: txId } = await authenticatedArIO.decreaseOperatorStake(params, {
936
759
  tags: [{ name: 'App-Name', value: 'My-Awesome-App' }],
937
760
  });
@@ -939,7 +762,7 @@ const { id: txId } = await authenticatedArIO.decreaseOperatorStake(params, {
939
762
 
940
763
  #### `saveObservations({ reportTxId, failedGateways })`
941
764
 
942
- Saves the observations of the current epoch. Requires `signer` to be provided on `ArIO.init` to sign the transaction.
765
+ Saves the observations of the current epoch. Requires `signer` to be provided on `IO.init` to sign the transaction.
943
766
 
944
767
  ```typescript
945
768
  const params = {
@@ -949,7 +772,7 @@ const params = {
949
772
 
950
773
  const signer = new ArweaveSigner(jwk);
951
774
  // signer required for write interactions APIs
952
- const authenticatedArIO = ArIO.init({ signer });
775
+ const authenticatedArIO = IO.init({ signer });
953
776
  const { id: txId } = await authenticatedArIO.saveObservations(params, {
954
777
  tags: [{ name: 'App-Name', value: 'My-Awesome-App' }],
955
778
  });
@@ -957,11 +780,11 @@ const { id: txId } = await authenticatedArIO.saveObservations(params, {
957
780
 
958
781
  #### `transfer({ target, qty, denomination })`
959
782
 
960
- Transfers `IO` or `mIO` depending on the `denomination` selected, defaulting as `IO`, to the designated `target` recipient address. Requires `signer` to be provided on `ArIO.init` to sign the transaction.
783
+ Transfers `IO` or `mIO` depending on the `denomination` selected, defaulting as `IO`, to the designated `target` recipient address. Requires `signer` to be provided on `IO.init` to sign the transaction.
961
784
 
962
785
  ```typescript
963
786
  // signer required for write interactions APIs
964
- const authenticatedArIO = ArIO.init({ signer });
787
+ const authenticatedArIO = IO.init({ signer });
965
788
  const { id: txId } = await authenticatedArIO.transfer(
966
789
  {
967
790
  target: '-5dV7nk7waR8v4STuwPnTck1zFVkQqJh5K9q9Zik4Y5',
@@ -978,7 +801,7 @@ const { id: txId } = await authenticatedArIO.transfer(
978
801
  Increases the undername support of a domain up to a maximum of 10k. Domains, by default, support up to 10 undernames.
979
802
 
980
803
  ```typescript
981
- const authenticatedArIO = ArIO.init({ signer });
804
+ const authenticatedArIO = IO.init({ signer });
982
805
  const { id: txId } = await authenticatedArIO.increaseUndernameLimit(
983
806
  {
984
807
  domain: 'ar-io',
@@ -994,7 +817,7 @@ const { id: txId } = await authenticatedArIO.increaseUndernameLimit(
994
817
  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.
995
818
 
996
819
  ```typescript
997
- const authenticatedArIO = ArIO.init({ signer });
820
+ const authenticatedArIO = IO.init({ signer });
998
821
  const { id: txId } = await authenticatedArIO.extendLease(
999
822
  {
1000
823
  domain: 'ar-io',
@@ -1005,34 +828,20 @@ const { id: txId } = await authenticatedArIO.extendLease(
1005
828
  );
1006
829
  ```
1007
830
 
1008
- ### Custom Contracts
831
+ ### Custom Processes
1009
832
 
1010
- The ArIO contract client class exposes APIs relevant to the ar.io contract. It can be configured to use any contract ID that adheres to the spec of the ar.io contract. In the default case, it will automatically build and utilize a contract data provider interface that is configured to point the the known mainnet contract ID at construction time. You can provide custom contract data provider or, alternatively, a `contractTxId` to the ArIO constructor to use a different, ar.io-spec-compatible contract.
833
+ The ArIO client class exposes APIs relevant to the ar.io process. It can be configured to use any AO Process ID that adheres to the spec of the ar.io process. In the default case, it will automatically build and utilize a process data provider interface that is configured to point the the known ar.io mainnet process ID at construction time. You can provide custom process data provider or, alternatively, a `processId` to the ArIO constructor to use a different, ar.io-spec-compatible process.
1011
834
 
1012
835
  ```typescript
1013
- // provide a custom contractTxId to the client and default to remote evaluation
1014
- const remoteCustomArIO = ArIO.init({
1015
- contractTxId: 'TESTNET_CONTRACT_TX_ID',
1016
- });
1017
-
1018
- // provide a custom contract to the client, and specify local evaluation using warp
1019
- const localCustomArIO = ArIO.init({
1020
- contract: new WarpContract<ArIOState>({
1021
- contractTxId: 'TESTNET_CONTRACT_TX_ID',
1022
- }),
1023
- });
1024
-
1025
- // provide a custom contract to the client, and specify local evaluation using remote cache
1026
- const remoteCacheCustomArIO = ArIO.init({
1027
- contract: new RemoteContract<ArIOState>({
1028
- contractTxId: 'TESTNET_CONTRACT_TX_ID',
1029
- }),
836
+ // provide a custom processId to the client and default to remote evaluation
837
+ const remoteCustomArIO = IO.init({
838
+ processId: 'TESTNET_PROCESS_ID',
1030
839
  });
1031
840
  ```
1032
841
 
1033
842
  ## Arweave Name Tokens (ANT's)
1034
843
 
1035
- The ANT contract client class exposes APIs relevant to compliant Arweave Name Token contracts. It can be configured to use any contract ID that adheres to the ANT contract spec. You must provide either a custom contract data provider or a contractTxId to the ANT class constructor to use.
844
+ The ANT client class exposes APIs relevant to compliant Arweave Name Token processes. It can be configured to use any process ID that adheres to the ANT process spec. You must provide either a custom process data provider or a processId to the ANT class constructor to use.
1036
845
 
1037
846
  ### APIs
1038
847
 
@@ -1050,143 +859,25 @@ const arweave = Arweave.init({
1050
859
  const browserSigner = new ArConnectSigner(window.arweaveWallet, arweave);
1051
860
  const ant = ANT.init({
1052
861
  signer: browserSigner,
1053
- contractTxId: 'bh9l1cy0aksiL_x9M359faGzM_yjralacHIUo8_nQXM'
862
+ processId: 'bh9l1cy0aksiL_x9M359faGzM_yjralacHIUo8_nQXM'
1054
863
  });
1055
864
 
1056
865
  // in a node environment
1057
866
  const nodeSigner = new ArweaveSigner(JWK);
1058
867
  const ant = ANT.init({
1059
868
  signer: nodeSigner,
1060
- contractTxId: 'bh9l1cy0aksiL_x9M359faGzM_yjralacHIUo8_nQXM'
869
+ processId: 'bh9l1cy0aksiL_x9M359faGzM_yjralacHIUo8_nQXM'
1061
870
  });
1062
871
 
1063
872
  ```
1064
873
 
1065
- ### `getState({ evaluationOptions })`
1066
-
1067
- Retrieves the current state of the ANT contract.
1068
-
1069
- ```typescript
1070
- const ant = ANT.init({
1071
- contractTxId: 'bh9l1cy0aksiL_x9M359faGzM_yjralacHIUo8_nQXM',
1072
- });
1073
- const state = await ant.getState();
1074
- ```
1075
-
1076
- <details>
1077
- <summary>Output</summary>
1078
-
1079
- ```json
1080
- {
1081
- "balances": {
1082
- "ccp3blG__gKUvG3hsGC2u06aDmqv4CuhuDJGOIg0jw4": 1
1083
- },
1084
- "controller": "6Z-ifqgVi1jOwMvSNwKWs6ewUEQ0gU9eo4aHYC3rN1M",
1085
- "evolve": null,
1086
- "name": "ArDrive.io",
1087
- "owner": "ccp3blG__gKUvG3hsGC2u06aDmqv4CuhuDJGOIg0jw4",
1088
- "records": {
1089
- "@": {
1090
- "transactionId": "nOXJjj_vk0Dc1yCgdWD8kti_1iHruGzLQLNNBHVpN0Y",
1091
- "ttlSeconds": 3600
1092
- },
1093
- "cn": {
1094
- "transactionId": "_HquerT6pfGFXrVxRxQTkJ7PV5RciZCqvMjLtUY0C1k",
1095
- "ttlSeconds": 3300
1096
- },
1097
- "dapp": {
1098
- "transactionId": "hxlxVgAG0K4o3fVD9T6Q4VBWpPmMZwMWgRh1kcuh3WU",
1099
- "ttlSeconds": 3600
1100
- },
1101
- "logo": {
1102
- "transactionId": "KKmRbIfrc7wiLcG0zvY1etlO0NBx1926dSCksxCIN3A",
1103
- "ttlSeconds": 3600
1104
- },
1105
- "og": {
1106
- "transactionId": "YzD_Pm5VAfYpMD3zQCgMUcKKuleGhEH7axlrnrDCKBo",
1107
- "ttlSeconds": 3600
1108
- },
1109
- "og_dapp": {
1110
- "transactionId": "5iR4wBu4KUV1pUz1YpYE1ARXSRHUT5G2ptMuoN2JDlI",
1111
- "ttlSeconds": 3600
1112
- },
1113
- "og_logo": {
1114
- "transactionId": "TB2wJyKrPnkAW79DAwlJYwpgdHKpijEJWQfcwX715Co",
1115
- "ttlSeconds": 3600
1116
- }
1117
- }
1118
- }
1119
- ```
1120
-
1121
- </details>
1122
-
1123
- Alternatively, you can get the contract at a specific block height or sort key by providing `evaluationOptions`:
1124
-
1125
- ```typescript
1126
- const ant = ANT.init({
1127
- contractTxId: 'bh9l1cy0aksiL_x9M359faGzM_yjralacHIUo8_nQXM',
1128
- });
1129
- const state = await ant.getState({
1130
- evaluationOptions: {
1131
- evalTo: { blockHeight: 1382230 },
1132
- },
1133
- });
1134
- ```
1135
-
1136
- <details>
1137
- <summary>Output</summary>
1138
-
1139
- ```json
1140
- {
1141
- "balances": {
1142
- "ccp3blG__gKUvG3hsGC2u06aDmqv4CuhuDJGOIg0jw4": 1
1143
- },
1144
- "controller": "6Z-ifqgVi1jOwMvSNwKWs6ewUEQ0gU9eo4aHYC3rN1M",
1145
- "evolve": null,
1146
- "name": "ArDrive.io",
1147
- "owner": "ccp3blG__gKUvG3hsGC2u06aDmqv4CuhuDJGOIg0jw4",
1148
- "records": {
1149
- "@": {
1150
- "transactionId": "nOXJjj_vk0Dc1yCgdWD8kti_1iHruGzLQLNNBHVpN0Y",
1151
- "ttlSeconds": 3600
1152
- },
1153
- "cn": {
1154
- "transactionId": "_HquerT6pfGFXrVxRxQTkJ7PV5RciZCqvMjLtUY0C1k",
1155
- "ttlSeconds": 3300
1156
- },
1157
- "dapp": {
1158
- "transactionId": "hxlxVgAG0K4o3fVD9T6Q4VBWpPmMZwMWgRh1kcuh3WU",
1159
- "ttlSeconds": 3600
1160
- },
1161
- "logo": {
1162
- "transactionId": "KKmRbIfrc7wiLcG0zvY1etlO0NBx1926dSCksxCIN3A",
1163
- "ttlSeconds": 3600
1164
- },
1165
- "og": {
1166
- "transactionId": "YzD_Pm5VAfYpMD3zQCgMUcKKuleGhEH7axlrnrDCKBo",
1167
- "ttlSeconds": 3600
1168
- },
1169
- "og_dapp": {
1170
- "transactionId": "5iR4wBu4KUV1pUz1YpYE1ARXSRHUT5G2ptMuoN2JDlI",
1171
- "ttlSeconds": 3600
1172
- },
1173
- "og_logo": {
1174
- "transactionId": "TB2wJyKrPnkAW79DAwlJYwpgdHKpijEJWQfcwX715Co",
1175
- "ttlSeconds": 3600
1176
- }
1177
- }
1178
- }
1179
- ```
1180
-
1181
- </details>
1182
-
1183
874
  #### `getOwner({ evaluationOptions })`
1184
875
 
1185
- Returns the owner of the configured ANT contract.
876
+ Returns the owner of the configured ANT process.
1186
877
 
1187
878
  ```typescript
1188
- const contractTxId = 'bh9l1cy0aksiL_x9M359faGzM_yjralacHIUo8_nQXM';
1189
- const ant = ANT.init({ contractTxId });
879
+ const processId = 'bh9l1cy0aksiL_x9M359faGzM_yjralacHIUo8_nQXM';
880
+ const ant = ANT.init({ processId });
1190
881
  const owner = await ant.getOwner();
1191
882
  ```
1192
883
 
@@ -1201,11 +892,11 @@ const owner = await ant.getOwner();
1201
892
 
1202
893
  #### `getControllers({ evaluationOptions })`
1203
894
 
1204
- Returns the controllers of the configured ANT contract.
895
+ Returns the controllers of the configured ANT process.
1205
896
 
1206
897
  ```typescript
1207
- const contractTxId = 'bh9l1cy0aksiL_x9M359faGzM_yjralacHIUo8_nQXM';
1208
- const ant = ANT.init({ contractTxId });
898
+ const processId = 'bh9l1cy0aksiL_x9M359faGzM_yjralacHIUo8_nQXM';
899
+ const ant = ANT.init({ processId });
1209
900
  const controllers = await ant.getControllers();
1210
901
  ```
1211
902
 
@@ -1220,11 +911,11 @@ const controllers = await ant.getControllers();
1220
911
 
1221
912
  #### `getRecords({ evaluationOptions })`
1222
913
 
1223
- Returns all records on the configured ANT contract, including the required `@` record that resolve connected ArNS names.
914
+ Returns all records on the configured ANT process, including the required `@` record that resolve connected ArNS names.
1224
915
 
1225
916
  ```typescript
1226
- const contractTxId = 'bh9l1cy0aksiL_x9M359faGzM_yjralacHIUo8_nQXM';
1227
- const ant = ANT.init({ contractTxId });
917
+ const processId = 'bh9l1cy0aksiL_x9M359faGzM_yjralacHIUo8_nQXM';
918
+ const ant = ANT.init({ processId });
1228
919
  const records = await ant.getRecords();
1229
920
  ```
1230
921
 
@@ -1271,8 +962,8 @@ const records = await ant.getRecords();
1271
962
  Transfers ownership of the ANT to a new target address. Target MUST be an Arweave address.
1272
963
 
1273
964
  ```typescript
1274
- const contractTxId = 'bh9l1cy0aksiL_x9M359faGzM_yjralacHIUo8_nQXM';
1275
- const ant = ANT.init({ contractTxId });
965
+ const processId = 'bh9l1cy0aksiL_x9M359faGzM_yjralacHIUo8_nQXM';
966
+ const ant = ANT.init({ processId });
1276
967
  const recipient = 'aGzM_yjralacHIUo8_nQXMbh9l1cy0aksiL_x9M359f';
1277
968
  const { id: txId } = await ant.transfer(
1278
969
  { target: recipient },
@@ -1283,11 +974,11 @@ const { id: txId } = await ant.transfer(
1283
974
 
1284
975
  #### `setController({ controller })`
1285
976
 
1286
- Adds a new controller to the list of approved controllers on the ANT. Controllers can set records and change the ticker and name of the ANT contract.
977
+ Adds a new controller to the list of approved controllers on the ANT. Controllers can set records and change the ticker and name of the ANT process.
1287
978
 
1288
979
  ```typescript
1289
- const contractTxId = 'bh9l1cy0aksiL_x9M359faGzM_yjralacHIUo8_nQXM';
1290
- const ant = ANT.init({ contractTxId });
980
+ const processId = 'bh9l1cy0aksiL_x9M359faGzM_yjralacHIUo8_nQXM';
981
+ const ant = ANT.init({ processId });
1291
982
  const controller = 'aGzM_yjralacHIUo8_nQXMbh9l1cy0aksiL_x9M359f';
1292
983
  const { id: txId } = await ant.setController(
1293
984
  { controller },
@@ -1301,8 +992,8 @@ const { id: txId } = await ant.setController(
1301
992
  Removes a controller from the list of approved controllers on the ANT.
1302
993
 
1303
994
  ```typescript
1304
- const contractTxId = 'bh9l1cy0aksiL_x9M359faGzM_yjralacHIUo8_nQXM';
1305
- const ant = ANT.init({ contractTxId });
995
+ const processId = 'bh9l1cy0aksiL_x9M359faGzM_yjralacHIUo8_nQXM';
996
+ const ant = ANT.init({ processId });
1306
997
  const controller = 'aGzM_yjralacHIUo8_nQXMbh9l1cy0aksiL_x9M359f';
1307
998
  const { id: txId } = await ant.removeController(
1308
999
  { controller },
@@ -1313,13 +1004,13 @@ const { id: txId } = await ant.removeController(
1313
1004
 
1314
1005
  #### `setRecord({ subDomain, transactionId, ttlSeconds })`
1315
1006
 
1316
- Updates or creates a record in the ANT contract.
1007
+ Updates or creates a record in the ANT process.
1317
1008
 
1318
1009
  > Records, or `undernames` are configured with the `transactionId` - the arweave transaction id the record resolves - and `ttlSeconds`, the Time To Live in the cache of client applications.
1319
1010
 
1320
1011
  ```typescript
1321
- const contractTxId = 'bh9l1cy0aksiL_x9M359faGzM_yjralacHIUo8_nQXM';
1322
- const ant = ANT.init({ contractTxId });
1012
+ const processId = 'bh9l1cy0aksiL_x9M359faGzM_yjralacHIUo8_nQXM';
1013
+ const ant = ANT.init({ processId });
1323
1014
  const subDomain = 'test-domain';
1324
1015
  const transactionId = '432l1cy0aksiL_x9M359faGzM_yjralacHIUo8_nQXM';
1325
1016
  const ttlSeconds = 900;
@@ -1336,11 +1027,11 @@ const { id: txId } = await ant.setRecord(
1336
1027
 
1337
1028
  #### `removeRecord({ subDomain })`
1338
1029
 
1339
- Removes a record from the ANT contract.
1030
+ Removes a record from the ANT process.
1340
1031
 
1341
1032
  ```typescript
1342
- const contractTxId = 'bh9l1cy0aksiL_x9M359faGzM_yjralacHIUo8_nQXM';
1343
- const ant = ANT.init({ contractTxId });
1033
+ const processId = 'bh9l1cy0aksiL_x9M359faGzM_yjralacHIUo8_nQXM';
1034
+ const ant = ANT.init({ processId });
1344
1035
  const subDomain = 'test-domain';
1345
1036
  const { id: txId } = await ant.removeRecord(
1346
1037
  { subDomain },
@@ -1351,11 +1042,11 @@ const { id: txId } = await ant.removeRecord(
1351
1042
 
1352
1043
  #### `setName({ name })`
1353
1044
 
1354
- Sets the name of the ANT contract.
1045
+ Sets the name of the ANT process.
1355
1046
 
1356
1047
  ```typescript
1357
- const contractTxId = 'bh9l1cy0aksiL_x9M359faGzM_yjralacHIUo8_nQXM';
1358
- const ant = ANT.init({ contractTxId });
1048
+ const processId = 'bh9l1cy0aksiL_x9M359faGzM_yjralacHIUo8_nQXM';
1049
+ const ant = ANT.init({ processId });
1359
1050
  const name = 'chumbawumba';
1360
1051
  const { id: txId } = await ant.setName(
1361
1052
  { name },
@@ -1366,11 +1057,11 @@ const { id: txId } = await ant.setName(
1366
1057
 
1367
1058
  #### `setTicker({ ticker })`
1368
1059
 
1369
- Sets the ticker of the ANT contract.
1060
+ Sets the ticker of the ANT process.
1370
1061
 
1371
1062
  ```typescript
1372
- const contractTxId = 'bh9l1cy0aksiL_x9M359faGzM_yjralacHIUo8_nQXM';
1373
- const ant = ANT.init({ contractTxId });
1063
+ const processId = 'bh9l1cy0aksiL_x9M359faGzM_yjralacHIUo8_nQXM';
1064
+ const ant = ANT.init({ processId });
1374
1065
  const ticker = 'ANT-WUMBA';
1375
1066
  const { id: txId } = await ant.setTicker(
1376
1067
  { ticker },
@@ -1380,29 +1071,12 @@ const { id: txId } = await ant.setTicker(
1380
1071
 
1381
1072
  ### Configuration
1382
1073
 
1383
- ANT clients can be configured to use custom contract evaluator. By default they will use the remote evaluator that leverages the [arns-service].
1074
+ ANT clients can be configured to use custom process evaluator. By default they will use the AO Testnet located at ao-testnet.xyz
1384
1075
 
1385
1076
  ```typescript
1386
- // provide a contractTxId to the client and default to remote evaluation
1077
+ // provide a processId to the client and default to remote evaluation
1387
1078
  const remoteANT = ANT.init({
1388
- contractTxId: 'ANT_CONTRACT_TX_ID',
1389
- });
1390
-
1391
- // provide a custom contract to the client, and specify local evaluation using warp
1392
- const warpEvaluatedANT = ANT.init({
1393
- contract: new WarpContract<ANTState>({
1394
- contractTxId: 'ANT_CONTRACT_TX_ID',
1395
- }),
1396
- signer, // signer is required when created warp-contract instances
1397
- });
1398
-
1399
- // provide a custom contract to the client, and specify local evaluation using remote cache
1400
- const remoteANTContract = ANT.init({
1401
- contract: new RemoteContract<ANTState>({
1402
- contractTxId: 'ANT_CONTRACT_TX_ID',
1403
- // the remote api that returns warp compliant contract evaluation
1404
- url: 'https://api.arns.app/v1/contract',
1405
- }),
1079
+ processId: 'ANT_PROCESS_ID',
1406
1080
  });
1407
1081
  ```
1408
1082
 
@@ -1422,7 +1096,7 @@ const remoteANTContract = ANT.init({
1422
1096
 
1423
1097
  ### Testing
1424
1098
 
1425
- - `yarn test:integration` - runs integration tests against a local [arns-service]
1099
+ - `yarn test:integration` - runs integration tests against a local AO testnet
1426
1100
  - `yarn example:web` - opens up the example web page
1427
1101
  - `yarn example:cjs` - runs example CJS node script
1428
1102
  - `yarn example:esm` - runs example ESM node script
@@ -1450,5 +1124,4 @@ For more information on how to contribute, please see [CONTRIBUTING.md].
1450
1124
  [examples]: ./examples
1451
1125
  [examples/webpack]: ./examples/webpack
1452
1126
  [examples/vite]: ./examples/vite
1453
- [arns-service]: https://github.com/ar-io/arns-service
1454
1127
  [CONTRIBUTING.md]: ./CONTRIBUTING.md