@ar.io/sdk 2.4.0-alpha.3 → 2.4.0-alpha.4

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.
@@ -667,16 +667,27 @@ class IOWriteable extends IOReadable {
667
667
  ],
668
668
  });
669
669
  }
670
- async cancelDelegateWithdrawal(params, options) {
670
+ /**
671
+ * Cancel a withdrawal from a gateway.
672
+ *
673
+ * @param {Object} params - The parameters for cancelling a withdrawal
674
+ * @param {string} [params.address] - The address of the withdrawal (optional). If not provided, the signer's address will be used.
675
+ * @param {string} params.vaultId - The vault ID of the withdrawal.
676
+ * @param {Object} [options] - The options for the cancellation
677
+ * @returns {Promise<AoMessageResult>} The result of the cancellation
678
+ */
679
+ async cancelWithdrawal(params, options) {
671
680
  const { tags = [] } = options || {};
681
+ const allTags = [
682
+ ...tags,
683
+ { name: 'Action', value: 'Cancel-Withdrawal' },
684
+ { name: 'Address', value: params.address },
685
+ { name: 'Vault-Id', value: params.vaultId },
686
+ ];
687
+ const prunedTags = allTags.filter((tag) => tag.value !== undefined);
672
688
  return this.process.send({
673
689
  signer: this.signer,
674
- tags: [
675
- ...tags,
676
- { name: 'Action', value: 'Cancel-Delegate-Withdrawal' },
677
- { name: 'Address', value: params.address },
678
- { name: 'Vault-Id', value: params.vaultId },
679
- ],
690
+ tags: prunedTags,
680
691
  });
681
692
  }
682
693
  async submitAuctionBid(params, options) {
@@ -17,4 +17,4 @@
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
18
  exports.version = void 0;
19
19
  // AUTOMATICALLY GENERATED FILE - DO NOT TOUCH
20
- exports.version = '2.4.0-alpha.3';
20
+ exports.version = '2.4.0-alpha.4';
@@ -662,16 +662,27 @@ export class IOWriteable extends IOReadable {
662
662
  ],
663
663
  });
664
664
  }
665
- async cancelDelegateWithdrawal(params, options) {
665
+ /**
666
+ * Cancel a withdrawal from a gateway.
667
+ *
668
+ * @param {Object} params - The parameters for cancelling a withdrawal
669
+ * @param {string} [params.address] - The address of the withdrawal (optional). If not provided, the signer's address will be used.
670
+ * @param {string} params.vaultId - The vault ID of the withdrawal.
671
+ * @param {Object} [options] - The options for the cancellation
672
+ * @returns {Promise<AoMessageResult>} The result of the cancellation
673
+ */
674
+ async cancelWithdrawal(params, options) {
666
675
  const { tags = [] } = options || {};
676
+ const allTags = [
677
+ ...tags,
678
+ { name: 'Action', value: 'Cancel-Withdrawal' },
679
+ { name: 'Address', value: params.address },
680
+ { name: 'Vault-Id', value: params.vaultId },
681
+ ];
682
+ const prunedTags = allTags.filter((tag) => tag.value !== undefined);
667
683
  return this.process.send({
668
684
  signer: this.signer,
669
- tags: [
670
- ...tags,
671
- { name: 'Action', value: 'Cancel-Delegate-Withdrawal' },
672
- { name: 'Address', value: params.address },
673
- { name: 'Vault-Id', value: params.vaultId },
674
- ],
685
+ tags: prunedTags,
675
686
  });
676
687
  }
677
688
  async submitAuctionBid(params, options) {
@@ -14,4 +14,4 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  // AUTOMATICALLY GENERATED FILE - DO NOT TOUCH
17
- export const version = '2.4.0-alpha.3';
17
+ export const version = '2.4.0-alpha.4';
@@ -166,8 +166,17 @@ export declare class IOWriteable extends IOReadable implements AoIOWrite {
166
166
  name: string;
167
167
  increaseCount: number;
168
168
  }, options?: WriteOptions): Promise<AoMessageResult>;
169
- cancelDelegateWithdrawal(params: {
170
- address: string;
169
+ /**
170
+ * Cancel a withdrawal from a gateway.
171
+ *
172
+ * @param {Object} params - The parameters for cancelling a withdrawal
173
+ * @param {string} [params.address] - The address of the withdrawal (optional). If not provided, the signer's address will be used.
174
+ * @param {string} params.vaultId - The vault ID of the withdrawal.
175
+ * @param {Object} [options] - The options for the cancellation
176
+ * @returns {Promise<AoMessageResult>} The result of the cancellation
177
+ */
178
+ cancelWithdrawal(params: {
179
+ address?: WalletAddress;
171
180
  vaultId: string;
172
181
  }, options?: WriteOptions | undefined): Promise<AoMessageResult>;
173
182
  submitAuctionBid(params: {
@@ -325,8 +325,8 @@ export interface AoIOWrite extends AoIORead {
325
325
  name: string;
326
326
  increaseCount: number;
327
327
  }, options?: WriteOptions): Promise<AoMessageResult>;
328
- cancelDelegateWithdrawal(params: {
329
- address: string;
328
+ cancelWithdrawal(params: {
329
+ address?: WalletAddress;
330
330
  vaultId: string;
331
331
  }, options?: WriteOptions): Promise<AoMessageResult>;
332
332
  submitAuctionBid(params: {
@@ -13,4 +13,4 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- export declare const version = "2.4.0-alpha.2";
16
+ export declare const version = "2.4.0-alpha.3";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ar.io/sdk",
3
- "version": "2.4.0-alpha.3",
3
+ "version": "2.4.0-alpha.4",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/ar-io/ar-io-sdk.git"