@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.
- package/bundles/web.bundle.min.js +2 -2
- package/lib/cjs/common/io.js +18 -7
- package/lib/cjs/version.js +1 -1
- package/lib/esm/common/io.js +18 -7
- package/lib/esm/version.js +1 -1
- package/lib/types/common/io.d.ts +11 -2
- package/lib/types/types/io.d.ts +2 -2
- package/lib/types/version.d.ts +1 -1
- package/package.json +1 -1
package/lib/cjs/common/io.js
CHANGED
|
@@ -667,16 +667,27 @@ class IOWriteable extends IOReadable {
|
|
|
667
667
|
],
|
|
668
668
|
});
|
|
669
669
|
}
|
|
670
|
-
|
|
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) {
|
package/lib/cjs/version.js
CHANGED
package/lib/esm/common/io.js
CHANGED
|
@@ -662,16 +662,27 @@ export class IOWriteable extends IOReadable {
|
|
|
662
662
|
],
|
|
663
663
|
});
|
|
664
664
|
}
|
|
665
|
-
|
|
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) {
|
package/lib/esm/version.js
CHANGED
package/lib/types/common/io.d.ts
CHANGED
|
@@ -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
|
-
|
|
170
|
-
|
|
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: {
|
package/lib/types/types/io.d.ts
CHANGED
|
@@ -325,8 +325,8 @@ export interface AoIOWrite extends AoIORead {
|
|
|
325
325
|
name: string;
|
|
326
326
|
increaseCount: number;
|
|
327
327
|
}, options?: WriteOptions): Promise<AoMessageResult>;
|
|
328
|
-
|
|
329
|
-
address
|
|
328
|
+
cancelWithdrawal(params: {
|
|
329
|
+
address?: WalletAddress;
|
|
330
330
|
vaultId: string;
|
|
331
331
|
}, options?: WriteOptions): Promise<AoMessageResult>;
|
|
332
332
|
submitAuctionBid(params: {
|
package/lib/types/version.d.ts
CHANGED