@ar.io/sdk 2.4.0-alpha.2 → 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,26 +667,39 @@ 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) {
683
694
  const { tags = [] } = options || {};
684
695
  const allTags = [
685
696
  ...tags,
686
- { name: 'Action', value: 'Submit-Auction-Bid' },
697
+ { name: 'Action', value: 'Auction-Bid' },
687
698
  { name: 'Name', value: params.name },
688
699
  { name: 'Process-Id', value: params.processId },
689
700
  { name: 'Quantity', value: params.quantity?.toString() ?? undefined },
701
+ { name: 'Purchase-Type', value: params.type || 'lease' },
702
+ { name: 'Years', value: params.years?.toString() ?? undefined },
690
703
  ];
691
704
  const prunedTags = allTags.filter((tag) => tag.value !== undefined);
692
705
  return this.process.send({
@@ -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.2';
20
+ exports.version = '2.4.0-alpha.4';
@@ -662,26 +662,39 @@ 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) {
678
689
  const { tags = [] } = options || {};
679
690
  const allTags = [
680
691
  ...tags,
681
- { name: 'Action', value: 'Submit-Auction-Bid' },
692
+ { name: 'Action', value: 'Auction-Bid' },
682
693
  { name: 'Name', value: params.name },
683
694
  { name: 'Process-Id', value: params.processId },
684
695
  { name: 'Quantity', value: params.quantity?.toString() ?? undefined },
696
+ { name: 'Purchase-Type', value: params.type || 'lease' },
697
+ { name: 'Years', value: params.years?.toString() ?? undefined },
685
698
  ];
686
699
  const prunedTags = allTags.filter((tag) => tag.value !== undefined);
687
700
  return this.process.send({
@@ -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.2';
17
+ export const version = '2.4.0-alpha.4';
@@ -166,13 +166,24 @@ 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: {
174
183
  name: string;
175
184
  processId: string;
176
185
  quantity?: number;
186
+ type?: 'lease' | 'permabuy';
187
+ years?: number;
177
188
  }, options?: WriteOptions): Promise<AoMessageResult>;
178
189
  }
@@ -325,14 +325,16 @@ 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: {
333
333
  name: string;
334
334
  processId: string;
335
335
  quantity?: number;
336
+ type?: 'lease' | 'permabuy';
337
+ years?: number;
336
338
  }, options?: WriteOptions): Promise<AoMessageResult>;
337
339
  }
338
340
  export declare function isProcessConfiguration(config: object): config is {
@@ -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.1";
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.2",
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"