@ar.io/sdk 2.3.0-alpha.8 → 2.3.0

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 CHANGED
@@ -50,6 +50,7 @@ This is the home of [ar.io] SDK. This SDK provides functionality for interacting
50
50
  - [`transfer({ target, qty })`](#transfer-target-qty-)
51
51
  - [`increaseUndernameLimit({ name, qty })`](#increaseundernamelimit-name-qty-)
52
52
  - [`extendLease({ name, years })`](#extendlease-name-years-)
53
+ - [`cancelDelegateWithdrawal({ address, vaultId })`](#canceldelegatewithdrawal-address-vaultid-)
53
54
  - [Configuration](#configuration)
54
55
  - [Arweave Name Tokens (ANT's)](#arweave-name-tokens-ants)
55
56
  - [ANT APIs](#ant-apis)
@@ -98,9 +99,12 @@ npm install @ar.io/sdk
98
99
  or
99
100
 
100
101
  ```shell
101
- yarn add @ar.io/sdk
102
+ yarn add @ar.io/sdk --ignore-engines
102
103
  ```
103
104
 
105
+ > [!Info]
106
+ > The `--ignore-engines` flag is required when using yarn, as [permaweb/aoconnect] recommends only the use of npm. Alternatively, you can add a `.yarnrc.yml` file to your project containing `ignore-engines true` to ignore the engines check.
107
+
104
108
  ## Quick Start
105
109
 
106
110
  ```typescript
@@ -997,9 +1001,29 @@ const { id: txId } = await io.extendLease(
997
1001
  );
998
1002
  ```
999
1003
 
1004
+ #### `cancelDelegateWithdrawal({ address, vaultId })`
1005
+
1006
+ Cancels a pending delegate withdrawal.
1007
+
1008
+ _Note: Requires `signer` to be provided on `IO.init` to sign the transaction._
1009
+
1010
+ ```typescript
1011
+ const io = IO.init({ signer: new ArweaveSigner(jwk) });
1012
+ const { id: txId } = await io.cancelDelegateWithdrawal(
1013
+ {
1014
+ // gateway address where vault exists
1015
+ address: 't4Xr0_J4Iurt7caNST02cMotaz2FIbWQ4Kbj616RHl3',
1016
+ // vault id to cancel
1017
+ vaultId: 'fDrr0_J4Iurt7caNST02cMotaz2FIbWQ4Kcj616RHl3',
1018
+ },
1019
+ // optional additional tags
1020
+ { tags: [{ name: 'App-Name', value: 'My-Awesome-App' }] },
1021
+ );
1022
+ ```
1023
+
1000
1024
  ### Configuration
1001
1025
 
1002
- The IO client class exposes APIs relevant to the ar.io process. It can be configured to use any AO Process ID that adheres to the [IO Network Spec]. By default, it will use the current [IO testnet process]. Refer to [AO Connect] for more information on how to configure an IO process to use specific AO infrastructure.
1026
+ The IO client class exposes APIs relevant to the ar.io process. It can be configured to use any AO Process ID that adheres to the [IO Network Spec]. By default, it will use the current [IO Testnet Process]. Refer to [AO Connect] for more information on how to configure an IO process to use specific AO infrastructure.
1003
1027
 
1004
1028
  ```typescript
1005
1029
  // provide a custom ao infrastructure and process id
@@ -1416,14 +1440,15 @@ For more information on how to contribute, please see [CONTRIBUTING.md].
1416
1440
  <!-- ADD ALL LINK REFERENCES BELOW -->
1417
1441
 
1418
1442
  [ar.io]: https://ar.io
1443
+ [permaweb/aoconnect]: https://github.com/permaweb/aoconnect
1419
1444
  [package.json]: ./package.json
1420
1445
  [examples]: ./examples
1421
1446
  [examples/webpack]: ./examples/webpack
1422
1447
  [examples/vite]: ./examples/vite
1423
1448
  [CONTRIBUTING.md]: ./CONTRIBUTING.md
1424
1449
  [AO Connect]: https://github.com/permaweb/ao/tree/main/connect
1425
- [IO testnet process]: https://www.ao.link/#/entity/agYcCFJtrMG6cqMuZfskIkFTGvUPddICmtQSBIoPdiA
1426
- [IO Network spec]: https://github.com/ar-io/ar-io-network-process?tab=readme-ov-file#contract-spec
1450
+ [IO Testnet Process]: https://www.ao.link/#/entity/agYcCFJtrMG6cqMuZfskIkFTGvUPddICmtQSBIoPdiA
1451
+ [IO Network Spec]: https://github.com/ar-io/ar-io-network-process?tab=readme-ov-file#contract-spec
1427
1452
  [Winston]: https://www.npmjs.com/package/winston
1428
1453
  [AO]: https://github.com/permaweb/ao
1429
1454
  [ar-io-node repository]: https://github.com/ar-io/ar-io-node