Skip to content

Commit

Permalink
Merge pull request #217 from ar-io/alpha
Browse files Browse the repository at this point in the history
chore: release v2.3.0
  • Loading branch information
dtfiedler authored Oct 8, 2024
2 parents 4ba3cca + 22c8f08 commit 0958f30
Show file tree
Hide file tree
Showing 15 changed files with 378 additions and 246 deletions.
9 changes: 1 addition & 8 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -14,17 +14,10 @@

## [2.2.3](https://github.com/ar-io/ar-io-sdk/compare/v2.2.2...v2.2.3) (2024-09-25)


### Bug Fixes

* **ants:** bump lua id to zeglqubvIKvBEZaxAUuenLGGtQ1pJp9LZjd5hDe0-J0 ([ba6101d](https://github.com/ar-io/ar-io-sdk/commit/ba6101da59e889ef47d5980eca155e4d172ca121))

## [2.2.3-alpha.1](https://github.com/ar-io/ar-io-sdk/compare/v2.2.2...v2.2.3-alpha.1) (2024-09-25)


### Bug Fixes
* **types:** update type and tests ([877b03f](https://github.com/ar-io/ar-io-sdk/commit/877b03f4124894cafbd0bc60b9d55b8803365cec))

* **ants:** bump lua id to zeglqubvIKvBEZaxAUuenLGGtQ1pJp9LZjd5hDe0-J0 ([ba6101d](https://github.com/ar-io/ar-io-sdk/commit/ba6101da59e889ef47d5980eca155e4d172ca121))

## [2.2.2](https://github.com/ar-io/ar-io-sdk/compare/v2.2.1...v2.2.2) (2024-09-23)

Expand Down
33 changes: 29 additions & 4 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -50,6 +50,7 @@ This is the home of [ar.io] SDK. This SDK provides functionality for interacting
- [`transfer({ target, qty })`](#transfer-target-qty-)
- [`increaseUndernameLimit({ name, qty })`](#increaseundernamelimit-name-qty-)
- [`extendLease({ name, years })`](#extendlease-name-years-)
- [`cancelDelegateWithdrawal({ address, vaultId })`](#canceldelegatewithdrawal-address-vaultid-)
- [Configuration](#configuration)
- [Arweave Name Tokens (ANT's)](#arweave-name-tokens-ants)
- [ANT APIs](#ant-apis)
Expand Down Expand Up @@ -98,9 +99,12 @@ npm install @ar.io/sdk
or

```shell
yarn add @ar.io/sdk
yarn add @ar.io/sdk --ignore-engines
```

> [!Info]
> 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.
## Quick Start

```typescript
Expand Down Expand Up @@ -997,9 +1001,29 @@ const { id: txId } = await io.extendLease(
);
```

#### `cancelDelegateWithdrawal({ address, vaultId })`

Cancels a pending delegate withdrawal.

_Note: Requires `signer` to be provided on `IO.init` to sign the transaction._

```typescript
const io = IO.init({ signer: new ArweaveSigner(jwk) });
const { id: txId } = await io.cancelDelegateWithdrawal(
{
// gateway address where vault exists
address: 't4Xr0_J4Iurt7caNST02cMotaz2FIbWQ4Kbj616RHl3',
// vault id to cancel
vaultId: 'fDrr0_J4Iurt7caNST02cMotaz2FIbWQ4Kcj616RHl3',
},
// optional additional tags
{ tags: [{ name: 'App-Name', value: 'My-Awesome-App' }] },
);
```

### Configuration

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.
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.

```typescript
// provide a custom ao infrastructure and process id
Expand Down Expand Up @@ -1416,14 +1440,15 @@ For more information on how to contribute, please see [CONTRIBUTING.md].
<!-- ADD ALL LINK REFERENCES BELOW -->

[ar.io]: https://ar.io
[permaweb/aoconnect]: https://github.com/permaweb/aoconnect
[package.json]: ./package.json
[examples]: ./examples
[examples/webpack]: ./examples/webpack
[examples/vite]: ./examples/vite
[CONTRIBUTING.md]: ./CONTRIBUTING.md
[AO Connect]: https://github.com/permaweb/ao/tree/main/connect
[IO testnet process]: https://www.ao.link/#/entity/agYcCFJtrMG6cqMuZfskIkFTGvUPddICmtQSBIoPdiA
[IO Network spec]: https://github.com/ar-io/ar-io-network-process?tab=readme-ov-file#contract-spec
[IO Testnet Process]: https://www.ao.link/#/entity/agYcCFJtrMG6cqMuZfskIkFTGvUPddICmtQSBIoPdiA
[IO Network Spec]: https://github.com/ar-io/ar-io-network-process?tab=readme-ov-file#contract-spec
[Winston]: https://www.npmjs.com/package/winston
[AO]: https://github.com/permaweb/ao
[ar-io-node repository]: https://github.com/ar-io/ar-io-node
Expand Down
196 changes: 98 additions & 98 deletions examples/vite/yarn.lock
Original file line number Diff line number Diff line change
Expand Up @@ -784,85 +784,85 @@
estree-walker "^2.0.2"
picomatch "^2.3.1"

"@rollup/rollup-android-arm-eabi@4.17.2":
version "4.17.2"
resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.17.2.tgz#1a32112822660ee104c5dd3a7c595e26100d4c2d"
integrity sha512-NM0jFxY8bB8QLkoKxIQeObCaDlJKewVlIEkuyYKm5An1tdVZ966w2+MPQ2l8LBZLjR+SgyV+nRkTIunzOYBMLQ==

"@rollup/rollup-android-arm64@4.17.2":
version "4.17.2"
resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.17.2.tgz#5aeef206d65ff4db423f3a93f71af91b28662c5b"
integrity sha512-yeX/Usk7daNIVwkq2uGoq2BYJKZY1JfyLTaHO/jaiSwi/lsf8fTFoQW/n6IdAsx5tx+iotu2zCJwz8MxI6D/Bw==

"@rollup/rollup-darwin-arm64@4.17.2":
version "4.17.2"
resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.17.2.tgz#6b66aaf003c70454c292cd5f0236ebdc6ffbdf1a"
integrity sha512-kcMLpE6uCwls023+kknm71ug7MZOrtXo+y5p/tsg6jltpDtgQY1Eq5sGfHcQfb+lfuKwhBmEURDga9N0ol4YPw==

"@rollup/rollup-darwin-x64@4.17.2":
version "4.17.2"
resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.17.2.tgz#f64fc51ed12b19f883131ccbcea59fc68cbd6c0b"
integrity sha512-AtKwD0VEx0zWkL0ZjixEkp5tbNLzX+FCqGG1SvOu993HnSz4qDI6S4kGzubrEJAljpVkhRSlg5bzpV//E6ysTQ==

"@rollup/rollup-linux-arm-gnueabihf@4.17.2":
version "4.17.2"
resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.17.2.tgz#1a7641111be67c10111f7122d1e375d1226cbf14"
integrity sha512-3reX2fUHqN7sffBNqmEyMQVj/CKhIHZd4y631duy0hZqI8Qoqf6lTtmAKvJFYa6bhU95B1D0WgzHkmTg33In0A==

"@rollup/rollup-linux-arm-musleabihf@4.17.2":
version "4.17.2"
resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.17.2.tgz#c93fd632923e0fee25aacd2ae414288d0b7455bb"
integrity sha512-uSqpsp91mheRgw96xtyAGP9FW5ChctTFEoXP0r5FAzj/3ZRv3Uxjtc7taRQSaQM/q85KEKjKsZuiZM3GyUivRg==

"@rollup/rollup-linux-arm64-gnu@4.17.2":
version "4.17.2"
resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.17.2.tgz#fa531425dd21d058a630947527b4612d9d0b4a4a"
integrity sha512-EMMPHkiCRtE8Wdk3Qhtciq6BndLtstqZIroHiiGzB3C5LDJmIZcSzVtLRbwuXuUft1Cnv+9fxuDtDxz3k3EW2A==

"@rollup/rollup-linux-arm64-musl@4.17.2":
version "4.17.2"
resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.17.2.tgz#8acc16f095ceea5854caf7b07e73f7d1802ac5af"
integrity sha512-NMPylUUZ1i0z/xJUIx6VUhISZDRT+uTWpBcjdv0/zkp7b/bQDF+NfnfdzuTiB1G6HTodgoFa93hp0O1xl+/UbA==

"@rollup/rollup-linux-powerpc64le-gnu@4.17.2":
version "4.17.2"
resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.17.2.tgz#94e69a8499b5cf368911b83a44bb230782aeb571"
integrity sha512-T19My13y8uYXPw/L/k0JYaX1fJKFT/PWdXiHr8mTbXWxjVF1t+8Xl31DgBBvEKclw+1b00Chg0hxE2O7bTG7GQ==

"@rollup/rollup-linux-riscv64-gnu@4.17.2":
version "4.17.2"
resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.17.2.tgz#7ef1c781c7e59e85a6ce261cc95d7f1e0b56db0f"
integrity sha512-BOaNfthf3X3fOWAB+IJ9kxTgPmMqPPH5f5k2DcCsRrBIbWnaJCgX2ll77dV1TdSy9SaXTR5iDXRL8n7AnoP5cg==

"@rollup/rollup-linux-s390x-gnu@4.17.2":
version "4.17.2"
resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.17.2.tgz#f15775841c3232fca9b78cd25a7a0512c694b354"
integrity sha512-W0UP/x7bnn3xN2eYMql2T/+wpASLE5SjObXILTMPUBDB/Fg/FxC+gX4nvCfPBCbNhz51C+HcqQp2qQ4u25ok6g==

"@rollup/rollup-linux-x64-gnu@4.17.2":
version "4.17.2"
resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.17.2.tgz#b521d271798d037ad70c9f85dd97d25f8a52e811"
integrity sha512-Hy7pLwByUOuyaFC6mAr7m+oMC+V7qyifzs/nW2OJfC8H4hbCzOX07Ov0VFk/zP3kBsELWNFi7rJtgbKYsav9QQ==

"@rollup/rollup-linux-x64-musl@4.17.2":
version "4.17.2"
resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.17.2.tgz#9254019cc4baac35800991315d133cc9fd1bf385"
integrity sha512-h1+yTWeYbRdAyJ/jMiVw0l6fOOm/0D1vNLui9iPuqgRGnXA0u21gAqOyB5iHjlM9MMfNOm9RHCQ7zLIzT0x11Q==

"@rollup/rollup-win32-arm64-msvc@4.17.2":
version "4.17.2"
resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.17.2.tgz#27f65a89f6f52ee9426ec11e3571038e4671790f"
integrity sha512-tmdtXMfKAjy5+IQsVtDiCfqbynAQE/TQRpWdVataHmhMb9DCoJxp9vLcCBjEQWMiUYxO1QprH/HbY9ragCEFLA==

"@rollup/rollup-win32-ia32-msvc@4.17.2":
version "4.17.2"
resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.17.2.tgz#a2fbf8246ed0bb014f078ca34ae6b377a90cb411"
integrity sha512-7II/QCSTAHuE5vdZaQEwJq2ZACkBpQDOmQsE6D6XUbnBHW8IAhm4eTufL6msLJorzrHDFv3CF8oCA/hSIRuZeQ==

"@rollup/rollup-win32-x64-msvc@4.17.2":
version "4.17.2"
resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.17.2.tgz#5a2d08b81e8064b34242d5cc9973ef8dd1e60503"
integrity sha512-TGGO7v7qOq4CYmSBVEYpI1Y5xDuCEnbVC5Vth8mOsW0gDSzxNrVERPc790IGHsrT2dQSimgMr9Ub3Y1Jci5/8w==
"@rollup/rollup-android-arm-eabi@4.22.4":
version "4.22.4"
resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm-eabi/-/rollup-android-arm-eabi-4.22.4.tgz#8b613b9725e8f9479d142970b106b6ae878610d5"
integrity sha512-Fxamp4aEZnfPOcGA8KSNEohV8hX7zVHOemC8jVBoBUHu5zpJK/Eu3uJwt6BMgy9fkvzxDaurgj96F/NiLukF2w==

"@rollup/rollup-android-arm64@4.22.4":
version "4.22.4"
resolved "https://registry.yarnpkg.com/@rollup/rollup-android-arm64/-/rollup-android-arm64-4.22.4.tgz#654ca1049189132ff602bfcf8df14c18da1f15fb"
integrity sha512-VXoK5UMrgECLYaMuGuVTOx5kcuap1Jm8g/M83RnCHBKOqvPPmROFJGQaZhGccnsFtfXQ3XYa4/jMCJvZnbJBdA==

"@rollup/rollup-darwin-arm64@4.22.4":
version "4.22.4"
resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.22.4.tgz#6d241d099d1518ef0c2205d96b3fa52e0fe1954b"
integrity sha512-xMM9ORBqu81jyMKCDP+SZDhnX2QEVQzTcC6G18KlTQEzWK8r/oNZtKuZaCcHhnsa6fEeOBionoyl5JsAbE/36Q==

"@rollup/rollup-darwin-x64@4.22.4":
version "4.22.4"
resolved "https://registry.yarnpkg.com/@rollup/rollup-darwin-x64/-/rollup-darwin-x64-4.22.4.tgz#42bd19d292a57ee11734c980c4650de26b457791"
integrity sha512-aJJyYKQwbHuhTUrjWjxEvGnNNBCnmpHDvrb8JFDbeSH3m2XdHcxDd3jthAzvmoI8w/kSjd2y0udT+4okADsZIw==

"@rollup/rollup-linux-arm-gnueabihf@4.22.4":
version "4.22.4"
resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-gnueabihf/-/rollup-linux-arm-gnueabihf-4.22.4.tgz#f23555ee3d8fe941c5c5fd458cd22b65eb1c2232"
integrity sha512-j63YtCIRAzbO+gC2L9dWXRh5BFetsv0j0va0Wi9epXDgU/XUi5dJKo4USTttVyK7fGw2nPWK0PbAvyliz50SCQ==

"@rollup/rollup-linux-arm-musleabihf@4.22.4":
version "4.22.4"
resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm-musleabihf/-/rollup-linux-arm-musleabihf-4.22.4.tgz#f3bbd1ae2420f5539d40ac1fde2b38da67779baa"
integrity sha512-dJnWUgwWBX1YBRsuKKMOlXCzh2Wu1mlHzv20TpqEsfdZLb3WoJW2kIEsGwLkroYf24IrPAvOT/ZQ2OYMV6vlrg==

"@rollup/rollup-linux-arm64-gnu@4.22.4":
version "4.22.4"
resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-gnu/-/rollup-linux-arm64-gnu-4.22.4.tgz#7abe900120113e08a1f90afb84c7c28774054d15"
integrity sha512-AdPRoNi3NKVLolCN/Sp4F4N1d98c4SBnHMKoLuiG6RXgoZ4sllseuGioszumnPGmPM2O7qaAX/IJdeDU8f26Aw==

"@rollup/rollup-linux-arm64-musl@4.22.4":
version "4.22.4"
resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-arm64-musl/-/rollup-linux-arm64-musl-4.22.4.tgz#9e655285c8175cd44f57d6a1e8e5dedfbba1d820"
integrity sha512-Gl0AxBtDg8uoAn5CCqQDMqAx22Wx22pjDOjBdmG0VIWX3qUBHzYmOKh8KXHL4UpogfJ14G4wk16EQogF+v8hmA==

"@rollup/rollup-linux-powerpc64le-gnu@4.22.4":
version "4.22.4"
resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-powerpc64le-gnu/-/rollup-linux-powerpc64le-gnu-4.22.4.tgz#9a79ae6c9e9d8fe83d49e2712ecf4302db5bef5e"
integrity sha512-3aVCK9xfWW1oGQpTsYJJPF6bfpWfhbRnhdlyhak2ZiyFLDaayz0EP5j9V1RVLAAxlmWKTDfS9wyRyY3hvhPoOg==

"@rollup/rollup-linux-riscv64-gnu@4.22.4":
version "4.22.4"
resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-riscv64-gnu/-/rollup-linux-riscv64-gnu-4.22.4.tgz#67ac70eca4ace8e2942fabca95164e8874ab8128"
integrity sha512-ePYIir6VYnhgv2C5Xe9u+ico4t8sZWXschR6fMgoPUK31yQu7hTEJb7bCqivHECwIClJfKgE7zYsh1qTP3WHUA==

"@rollup/rollup-linux-s390x-gnu@4.22.4":
version "4.22.4"
resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-s390x-gnu/-/rollup-linux-s390x-gnu-4.22.4.tgz#9f883a7440f51a22ed7f99e1d070bd84ea5005fc"
integrity sha512-GqFJ9wLlbB9daxhVlrTe61vJtEY99/xB3C8e4ULVsVfflcpmR6c8UZXjtkMA6FhNONhj2eA5Tk9uAVw5orEs4Q==

"@rollup/rollup-linux-x64-gnu@4.22.4":
version "4.22.4"
resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-gnu/-/rollup-linux-x64-gnu-4.22.4.tgz#70116ae6c577fe367f58559e2cffb5641a1dd9d0"
integrity sha512-87v0ol2sH9GE3cLQLNEy0K/R0pz1nvg76o8M5nhMR0+Q+BBGLnb35P0fVz4CQxHYXaAOhE8HhlkaZfsdUOlHwg==

"@rollup/rollup-linux-x64-musl@4.22.4":
version "4.22.4"
resolved "https://registry.yarnpkg.com/@rollup/rollup-linux-x64-musl/-/rollup-linux-x64-musl-4.22.4.tgz#f473f88219feb07b0b98b53a7923be716d1d182f"
integrity sha512-UV6FZMUgePDZrFjrNGIWzDo/vABebuXBhJEqrHxrGiU6HikPy0Z3LfdtciIttEUQfuDdCn8fqh7wiFJjCNwO+g==

"@rollup/rollup-win32-arm64-msvc@4.22.4":
version "4.22.4"
resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-arm64-msvc/-/rollup-win32-arm64-msvc-4.22.4.tgz#4349482d17f5d1c58604d1c8900540d676f420e0"
integrity sha512-BjI+NVVEGAXjGWYHz/vv0pBqfGoUH0IGZ0cICTn7kB9PyjrATSkX+8WkguNjWoj2qSr1im/+tTGRaY+4/PdcQw==

"@rollup/rollup-win32-ia32-msvc@4.22.4":
version "4.22.4"
resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-ia32-msvc/-/rollup-win32-ia32-msvc-4.22.4.tgz#a6fc39a15db618040ec3c2a24c1e26cb5f4d7422"
integrity sha512-SiWG/1TuUdPvYmzmYnmd3IEifzR61Tragkbx9D3+R8mzQqDBz8v+BvZNDlkiTtI9T15KYZhP0ehn3Dld4n9J5g==

"@rollup/rollup-win32-x64-msvc@4.22.4":
version "4.22.4"
resolved "https://registry.yarnpkg.com/@rollup/rollup-win32-x64-msvc/-/rollup-win32-x64-msvc-4.22.4.tgz#3dd5d53e900df2a40841882c02e56f866c04d202"
integrity sha512-j8pPKp53/lq9lMXN57S8cFz0MynJk8OWNuUnXct/9KCpKU7DgU3bYMJhwWmcqC0UU29p8Lr0/7KEVcaM6bf47Q==

"@sinclair/typebox@^0.27.8":
version "0.27.8"
Expand Down Expand Up @@ -4189,28 +4189,28 @@ ripemd160@^2.0.0, ripemd160@^2.0.1:
inherits "^2.0.1"

rollup@^4.13.0:
version "4.17.2"
resolved "https://registry.yarnpkg.com/rollup/-/rollup-4.17.2.tgz#26d1785d0144122277fdb20ab3a24729ae68301f"
integrity sha512-/9ClTJPByC0U4zNLowV1tMBe8yMEAxewtR3cUNX5BoEpGH3dQEWpJLr6CLp0fPdYRF/fzVOgvDb1zXuakwF5kQ==
version "4.22.4"
resolved "https://registry.yarnpkg.com/rollup/-/rollup-4.22.4.tgz#4135a6446671cd2a2453e1ad42a45d5973ec3a0f"
integrity sha512-vD8HJ5raRcWOyymsR6Z3o6+RzfEPCnVLMFJ6vRslO1jt4LO6dUo5Qnpg7y4RkZFM2DMe3WUirkI5c16onjrc6A==
dependencies:
"@types/estree" "1.0.5"
optionalDependencies:
"@rollup/rollup-android-arm-eabi" "4.17.2"
"@rollup/rollup-android-arm64" "4.17.2"
"@rollup/rollup-darwin-arm64" "4.17.2"
"@rollup/rollup-darwin-x64" "4.17.2"
"@rollup/rollup-linux-arm-gnueabihf" "4.17.2"
"@rollup/rollup-linux-arm-musleabihf" "4.17.2"
"@rollup/rollup-linux-arm64-gnu" "4.17.2"
"@rollup/rollup-linux-arm64-musl" "4.17.2"
"@rollup/rollup-linux-powerpc64le-gnu" "4.17.2"
"@rollup/rollup-linux-riscv64-gnu" "4.17.2"
"@rollup/rollup-linux-s390x-gnu" "4.17.2"
"@rollup/rollup-linux-x64-gnu" "4.17.2"
"@rollup/rollup-linux-x64-musl" "4.17.2"
"@rollup/rollup-win32-arm64-msvc" "4.17.2"
"@rollup/rollup-win32-ia32-msvc" "4.17.2"
"@rollup/rollup-win32-x64-msvc" "4.17.2"
"@rollup/rollup-android-arm-eabi" "4.22.4"
"@rollup/rollup-android-arm64" "4.22.4"
"@rollup/rollup-darwin-arm64" "4.22.4"
"@rollup/rollup-darwin-x64" "4.22.4"
"@rollup/rollup-linux-arm-gnueabihf" "4.22.4"
"@rollup/rollup-linux-arm-musleabihf" "4.22.4"
"@rollup/rollup-linux-arm64-gnu" "4.22.4"
"@rollup/rollup-linux-arm64-musl" "4.22.4"
"@rollup/rollup-linux-powerpc64le-gnu" "4.22.4"
"@rollup/rollup-linux-riscv64-gnu" "4.22.4"
"@rollup/rollup-linux-s390x-gnu" "4.22.4"
"@rollup/rollup-linux-x64-gnu" "4.22.4"
"@rollup/rollup-linux-x64-musl" "4.22.4"
"@rollup/rollup-win32-arm64-msvc" "4.22.4"
"@rollup/rollup-win32-ia32-msvc" "4.22.4"
"@rollup/rollup-win32-x64-msvc" "4.22.4"
fsevents "~2.3.2"

run-parallel-limit@^1.1.0:
Expand Down
2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "@ar.io/sdk",
"version": "2.2.5",
"version": "2.3.0-alpha.9",
"repository": {
"type": "git",
"url": "git+https://github.com/ar-io/ar-io-sdk.git"
Expand Down
17 changes: 3 additions & 14 deletions src/common/ant.ts
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,7 @@
* limitations under the License.
*/
import {
AoANTInfo,
AoANTRead,
AoANTRecord,
AoANTState,
Expand Down Expand Up @@ -78,21 +79,9 @@ export class AoANTReadable implements AoANTRead {
return res;
}

async getInfo(): Promise<{
Name: string;
Ticker: string;
Denomination: number;
Owner: string;
['Source-Code-TX-ID']?: string;
}> {
async getInfo(): Promise<AoANTInfo> {
const tags = [{ name: 'Action', value: 'Info' }];
const info = await this.process.read<{
Name: string;
Ticker: string;
Denomination: number;
Owner: string;
['Source-Code-TX-ID']?: string;
}>({
const info = await this.process.read<AoANTInfo>({
tags,
});
return info;
Expand Down
2 changes: 1 addition & 1 deletion src/common/contracts/ao-process.ts
Original file line number Diff line number Diff line change
Expand Up @@ -60,7 +60,7 @@ export class AOProcess implements AOContract {
tags,
});

if (result.Messages.length === 0) {
if (result.Messages === undefined || result.Messages.length === 0) {
throw new Error(
`Process ${this.processId} does not support provided action.`,
);
Expand Down
23 changes: 23 additions & 0 deletions src/common/io.ts
Original file line number Diff line number Diff line change
Expand Up @@ -23,6 +23,7 @@ import {
AoGateway,
AoIORead,
AoIOWrite,
AoRegistrationFees,
EpochInput,
isProcessConfiguration,
isProcessIdConfiguration,
Expand Down Expand Up @@ -576,6 +577,12 @@ export class IOReadable implements AoIORead {
tags: prunedTags,
});
}

async getRegistrationFees(): Promise<AoRegistrationFees> {
return this.process.read<AoRegistrationFees>({
tags: [{ name: 'Action', value: 'Get-Registration-Fees' }],
});
}
}

export class IOWriteable extends IOReadable implements AoIOWrite {
Expand Down Expand Up @@ -953,4 +960,20 @@ export class IOWriteable extends IOReadable implements AoIOWrite {
],
});
}

async cancelDelegateWithdrawal(
params: { address: string; vaultId: string },
options?: WriteOptions | undefined,
): Promise<AoMessageResult> {
const { tags = [] } = options || {};
return this.process.send({
signer: this.signer,
tags: [
...tags,
{ name: 'Action', value: 'Cancel-Delegate-Withdrawal' },
{ name: 'Address', value: params.address },
{ name: 'Vault-Id', value: params.vaultId },
],
});
}
}
Loading

0 comments on commit 0958f30

Please sign in to comment.