@ar.io/sdk 2.7.0-alpha.6 → 2.7.0-alpha.7

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.
@@ -106,22 +106,16 @@ const utils_js_1 = require("./utils.js");
106
106
  action: readCommands_js_1.listArNSReservedNames,
107
107
  });
108
108
  (0, utils_js_1.makeCommand)({
109
- name: 'get-arns-auction',
110
- description: 'Get an ArNS auction by name',
109
+ name: 'get-arns-returned-name',
110
+ description: 'Get an ArNS returned name by name',
111
111
  options: options_js_1.nameOptions,
112
- action: readCommands_js_1.getArNSAuction,
112
+ action: readCommands_js_1.getArNSReturnedName,
113
113
  });
114
114
  (0, utils_js_1.makeCommand)({
115
- name: 'list-arns-auctions',
116
- description: 'Get all ArNS auctions',
115
+ name: 'list-arns-returned-names',
116
+ description: 'Get all ArNS recently returned names',
117
117
  options: options_js_1.paginationOptions,
118
- action: readCommands_js_1.listArNSAuctions,
119
- });
120
- (0, utils_js_1.makeCommand)({
121
- name: 'get-arns-auction-prices',
122
- description: 'Get ArNS auction prices',
123
- options: options_js_1.arNSAuctionPricesOptions,
124
- action: readCommands_js_1.getArNSAuctionPrices,
118
+ action: readCommands_js_1.listArNSReturnedNames,
125
119
  });
126
120
  (0, utils_js_1.makeCommand)({
127
121
  name: 'get-epoch',
@@ -1,6 +1,6 @@
1
1
  "use strict";
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
- exports.getVault = exports.getGatewayVaults = exports.getPrimaryName = exports.getTokenCost = exports.getPrescribedNames = exports.getPrescribedObservers = exports.getEpoch = exports.getArNSAuctionPrices = exports.listArNSAuctions = exports.getArNSAuction = exports.listArNSReservedNames = exports.getArNSReservedName = exports.listArNSRecords = exports.getArNSRecord = exports.getAllowedDelegates = exports.getDelegations = exports.getGatewayDelegates = exports.listGateways = exports.getGateway = void 0;
3
+ exports.getVault = exports.getGatewayVaults = exports.getPrimaryName = exports.getTokenCost = exports.getPrescribedNames = exports.getPrescribedObservers = exports.getEpoch = exports.listArNSReturnedNames = exports.getArNSReturnedName = exports.listArNSReservedNames = exports.getArNSReservedName = exports.listArNSRecords = exports.getArNSRecord = exports.getAllowedDelegates = exports.getDelegations = exports.getGatewayDelegates = exports.listGateways = exports.getGateway = void 0;
4
4
  /**
5
5
  * Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
6
6
  *
@@ -97,36 +97,19 @@ async function listArNSReservedNames(o) {
97
97
  : { message: 'No reserved names found' };
98
98
  }
99
99
  exports.listArNSReservedNames = listArNSReservedNames;
100
- async function getArNSAuction(o) {
100
+ async function getArNSReturnedName(o) {
101
101
  const name = (0, utils_js_1.requiredStringFromOptions)(o, 'name');
102
- const result = await (0, utils_js_1.readIOFromOptions)(o).getArNSAuction({ name });
103
- return result ?? { message: `No auction found for name ${name}` };
102
+ const result = await (0, utils_js_1.readIOFromOptions)(o).getArNSReturnedName({ name });
103
+ return result ?? { message: `No returned name found for name ${name}` };
104
104
  }
105
- exports.getArNSAuction = getArNSAuction;
106
- async function listArNSAuctions(o) {
107
- const auctions = await (0, utils_js_1.readIOFromOptions)(o).getArNSAuctions((0, utils_js_1.paginationParamsFromOptions)(o));
108
- return auctions.items.length ? auctions : { message: 'No auctions found' };
105
+ exports.getArNSReturnedName = getArNSReturnedName;
106
+ async function listArNSReturnedNames(o) {
107
+ const returnedNames = await (0, utils_js_1.readIOFromOptions)(o).getArNSReturnedNames((0, utils_js_1.paginationParamsFromOptions)(o));
108
+ return returnedNames.items.length
109
+ ? returnedNames
110
+ : { message: 'No returned names found' };
109
111
  }
110
- exports.listArNSAuctions = listArNSAuctions;
111
- async function getArNSAuctionPrices(o) {
112
- o.type ??= 'lease';
113
- if (o.type !== 'lease' && o.type !== 'permabuy') {
114
- throw new Error(`Invalid type. Valid types are: lease, permabuy`);
115
- // TODY: type and years helper
116
- }
117
- const result = await (0, utils_js_1.readIOFromOptions)(o).getArNSAuctionPrices({
118
- name: (0, utils_js_1.requiredStringFromOptions)(o, 'name'),
119
- type: o.type,
120
- // TODO: intervalMS helper, assert and format
121
- intervalMs: o.intervalMs !== undefined ? +o.intervalMs : undefined,
122
- // TODO: timestamp helper, assert and format
123
- timestamp: o.timestamp !== undefined ? +o.timestamp : undefined,
124
- // todo: assert years if 'lease'
125
- years: (0, utils_js_1.positiveIntegerFromOptions)(o, 'years'),
126
- });
127
- return result ?? { message: `No auction prices found` };
128
- }
129
- exports.getArNSAuctionPrices = getArNSAuctionPrices;
112
+ exports.listArNSReturnedNames = listArNSReturnedNames;
130
113
  async function getEpoch(o) {
131
114
  const epoch = await (0, utils_js_1.readIOFromOptions)(o).getEpoch((0, utils_js_1.epochInputFromOptions)(o));
132
115
  return epoch ?? { message: `No epoch found for provided input` };
@@ -15,7 +15,7 @@
15
15
  * limitations under the License.
16
16
  */
17
17
  Object.defineProperty(exports, "__esModule", { value: true });
18
- exports.antStateOptions = exports.buyRecordOptions = exports.joinNetworkOptions = exports.updateGatewaySettingsOptions = exports.decreaseDelegateStakeOptions = exports.delegateStakeOptions = exports.redelegateStakeOptions = exports.operatorStakeOptions = exports.transferOptions = exports.arNSAuctionPricesOptions = exports.tokenCostOptions = exports.getVaultOptions = exports.paginationAddressOptions = exports.paginationOptions = exports.nameWriteOptions = exports.addressAndVaultIdOptions = exports.epochOptions = exports.initiatorOptions = exports.nameOptions = exports.addressOptions = exports.writeActionOptions = exports.globalOptions = exports.walletOptions = exports.optionMap = void 0;
18
+ exports.antStateOptions = exports.buyRecordOptions = exports.joinNetworkOptions = exports.updateGatewaySettingsOptions = exports.decreaseDelegateStakeOptions = exports.delegateStakeOptions = exports.redelegateStakeOptions = exports.operatorStakeOptions = exports.transferOptions = exports.tokenCostOptions = exports.getVaultOptions = exports.paginationAddressOptions = exports.paginationOptions = exports.nameWriteOptions = exports.addressAndVaultIdOptions = exports.epochOptions = exports.initiatorOptions = exports.nameOptions = exports.addressOptions = exports.writeActionOptions = exports.globalOptions = exports.walletOptions = exports.optionMap = void 0;
19
19
  exports.optionMap = {
20
20
  walletFile: {
21
21
  alias: '-w, --wallet-file <walletFilePath>',
@@ -275,13 +275,6 @@ exports.tokenCostOptions = [
275
275
  exports.optionMap.years,
276
276
  exports.optionMap.quantity,
277
277
  ];
278
- exports.arNSAuctionPricesOptions = [
279
- exports.optionMap.name,
280
- exports.optionMap.type,
281
- exports.optionMap.years,
282
- exports.optionMap.timestamp,
283
- exports.optionMap.intervalMs,
284
- ];
285
278
  exports.transferOptions = [
286
279
  ...exports.writeActionOptions,
287
280
  exports.optionMap.quantity,
@@ -412,7 +412,7 @@ class AoANTWriteable extends AoANTReadable {
412
412
  });
413
413
  }
414
414
  /**
415
- * @param name @type {string} The name you want to release. The name will be put up for auction on the IO contract. 50% of the winning bid will be distributed to the ANT owner at the time of release. If no bids, the name will be released and can be reregistered by anyone.
415
+ * @param name @type {string} The name you want to release. The name will be put up for as a recently returned name on the IO contract. 50% of the winning bid will be distributed to the ANT owner at the time of purchase. If no purchase in the recently returned name period (14 epochs), the name will be released and can be reregistered by anyone.
416
416
  * @param ioProcessId @type {string} The processId of the IO contract. This is where the ANT will send the message to release the name.
417
417
  * @returns {Promise<AoMessageResult>} The result of the interaction.
418
418
  * @example
@@ -319,60 +319,23 @@ class IOReadable {
319
319
  tags: [{ name: 'Action', value: 'Demand-Factor-Settings' }],
320
320
  });
321
321
  }
322
- // Auctions
323
- async getArNSAuctions(params) {
322
+ async getArNSReturnedNames(params) {
324
323
  return this.process.read({
325
324
  tags: [
326
- { name: 'Action', value: 'Auctions' },
325
+ { name: 'Action', value: 'Returned-Names' },
327
326
  ...(0, arweave_js_1.paginationParamsToTags)(params),
328
327
  ],
329
328
  });
330
329
  }
331
- async getArNSAuction({ name, }) {
330
+ async getArNSReturnedName({ name, }) {
332
331
  const allTags = [
333
- { name: 'Action', value: 'Auction-Info' },
332
+ { name: 'Action', value: 'Returned-Name' },
334
333
  { name: 'Name', value: name },
335
334
  ];
336
335
  return this.process.read({
337
336
  tags: allTags,
338
337
  });
339
338
  }
340
- /**
341
- * Get auction prices for a given auction at the provided intervals
342
- *
343
- * @param {Object} params - The parameters for fetching auction prices
344
- * @param {string} params.name - The name of the auction
345
- * @param {('permabuy'|'lease')} [params.type='lease'] - The type of purchase
346
- * @param {number} [params.years=1] - The number of years for lease (only applicable if type is 'lease')
347
- * @param {number} [params.timestamp=Date.now()] - The timestamp to fetch prices for
348
- * @param {number} [params.intervalMs=900000] - The interval in milliseconds between price points (default is 15 minutes)
349
- * @returns {Promise<AoAuctionPriceData>} The auction price data
350
- */
351
- async getArNSAuctionPrices({ name, type, years, timestamp, intervalMs, }) {
352
- const prunedPriceTags = [
353
- { name: 'Action', value: 'Auction-Prices' },
354
- { name: 'Name', value: name },
355
- {
356
- name: 'Timestamp',
357
- value: timestamp?.toString() ??
358
- (await (0, arweave_js_1.getCurrentBlockUnixTimestampMs)(this.arweave)).toString(),
359
- },
360
- { name: 'Purchase-Type', value: type ?? 'lease' },
361
- {
362
- name: 'Years',
363
- value: type == undefined || type === 'lease'
364
- ? years?.toString() ?? '1'
365
- : undefined,
366
- },
367
- {
368
- name: 'Price-Interval-Ms',
369
- value: intervalMs?.toString() ?? '900000',
370
- },
371
- ].filter((tag) => tag.value !== undefined);
372
- return this.process.read({
373
- tags: prunedPriceTags,
374
- });
375
- }
376
339
  async getDelegations(params) {
377
340
  const allTags = [
378
341
  { name: 'Action', value: 'Paginated-Delegations' },
@@ -784,22 +747,6 @@ class IOWriteable extends IOReadable {
784
747
  tags: (0, arweave_js_1.pruneTags)(allTags),
785
748
  });
786
749
  }
787
- async submitAuctionBid(params, options) {
788
- const { tags = [] } = options || {};
789
- const allTags = [
790
- ...tags,
791
- { name: 'Action', value: 'Auction-Bid' },
792
- { name: 'Name', value: params.name },
793
- { name: 'Process-Id', value: params.processId },
794
- { name: 'Quantity', value: params.quantity?.toString() ?? undefined },
795
- { name: 'Purchase-Type', value: params.type || 'lease' },
796
- { name: 'Years', value: params.years?.toString() ?? undefined },
797
- ];
798
- return this.process.send({
799
- signer: this.signer,
800
- tags: (0, arweave_js_1.pruneTags)(allTags),
801
- });
802
- }
803
750
  async requestPrimaryName(params) {
804
751
  return this.process.send({
805
752
  signer: this.signer,
@@ -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.7.0-alpha.6';
20
+ exports.version = '2.7.0-alpha.7';
@@ -20,9 +20,9 @@ import { spawnANT } from '../node/index.js';
20
20
  import { mIOToken } from '../types/token.js';
21
21
  import { version } from '../version.js';
22
22
  import { cancelWithdrawal, decreaseDelegateStake, decreaseOperatorStake, delegateStake, increaseOperatorStake, instantWithdrawal, joinNetwork, leaveNetwork, redelegateStake, saveObservations, updateGatewaySettings, } from './commands/gatewayWriteCommands.js';
23
- import { getAllowedDelegates, getArNSAuction, getArNSAuctionPrices, getArNSRecord, getArNSReservedName, getDelegations, getEpoch, getGateway, getGatewayDelegates, getGatewayVaults, getPrescribedNames, getPrescribedObservers, getPrimaryName, getTokenCost, getVault, listArNSAuctions, listArNSRecords, listArNSReservedNames, listGateways, } from './commands/readCommands.js';
23
+ import { getAllowedDelegates, getArNSRecord, getArNSReservedName, getArNSReturnedName, getDelegations, getEpoch, getGateway, getGatewayDelegates, getGatewayVaults, getPrescribedNames, getPrescribedObservers, getPrimaryName, getTokenCost, getVault, listArNSRecords, listArNSReservedNames, listArNSReturnedNames, listGateways, } from './commands/readCommands.js';
24
24
  import { transfer } from './commands/transfer.js';
25
- import { addressAndVaultIdOptions, addressOptions, antStateOptions, arNSAuctionPricesOptions, buyRecordOptions, decreaseDelegateStakeOptions, delegateStakeOptions, epochOptions, getVaultOptions, globalOptions, initiatorOptions, joinNetworkOptions, nameOptions, nameWriteOptions, operatorStakeOptions, optionMap, paginationAddressOptions, paginationOptions, redelegateStakeOptions, tokenCostOptions, transferOptions, updateGatewaySettingsOptions, writeActionOptions, } from './options.js';
25
+ import { addressAndVaultIdOptions, addressOptions, antStateOptions, buyRecordOptions, decreaseDelegateStakeOptions, delegateStakeOptions, epochOptions, getVaultOptions, globalOptions, initiatorOptions, joinNetworkOptions, nameOptions, nameWriteOptions, operatorStakeOptions, optionMap, paginationAddressOptions, paginationOptions, redelegateStakeOptions, tokenCostOptions, transferOptions, updateGatewaySettingsOptions, writeActionOptions, } from './options.js';
26
26
  import { applyOptions, assertConfirmationPrompt, epochInputFromOptions, formatIOWithCommas, getANTStateFromOptions, getLoggerFromOptions, ioProcessIdFromOptions, makeCommand, paginationParamsFromOptions, positiveIntegerFromOptions, readANTFromOptions, readIOFromOptions, recordTypeFromOptions, requiredAddressFromOptions, requiredAoSignerFromOptions, requiredPositiveIntegerFromOptions, requiredStringArrayFromOptions, requiredStringFromOptions, writeANTFromOptions, writeActionTagsFromOptions, writeIOFromOptions, } from './utils.js';
27
27
  applyOptions(program
28
28
  .name('ar.io')
@@ -104,22 +104,16 @@ makeCommand({
104
104
  action: listArNSReservedNames,
105
105
  });
106
106
  makeCommand({
107
- name: 'get-arns-auction',
108
- description: 'Get an ArNS auction by name',
107
+ name: 'get-arns-returned-name',
108
+ description: 'Get an ArNS returned name by name',
109
109
  options: nameOptions,
110
- action: getArNSAuction,
110
+ action: getArNSReturnedName,
111
111
  });
112
112
  makeCommand({
113
- name: 'list-arns-auctions',
114
- description: 'Get all ArNS auctions',
113
+ name: 'list-arns-returned-names',
114
+ description: 'Get all ArNS recently returned names',
115
115
  options: paginationOptions,
116
- action: listArNSAuctions,
117
- });
118
- makeCommand({
119
- name: 'get-arns-auction-prices',
120
- description: 'Get ArNS auction prices',
121
- options: arNSAuctionPricesOptions,
122
- action: getArNSAuctionPrices,
116
+ action: listArNSReturnedNames,
123
117
  });
124
118
  makeCommand({
125
119
  name: 'get-epoch',
@@ -15,7 +15,7 @@
15
15
  */
16
16
  import { intentsUsingYears, isValidIntent, validIntents, } from '../../types/io.js';
17
17
  import { mIOToken } from '../../types/token.js';
18
- import { addressFromOptions, epochInputFromOptions, formatIOWithCommas, paginationParamsFromOptions, positiveIntegerFromOptions, readIOFromOptions, requiredAddressFromOptions, requiredStringFromOptions, } from '../utils.js';
18
+ import { addressFromOptions, epochInputFromOptions, formatIOWithCommas, paginationParamsFromOptions, readIOFromOptions, requiredAddressFromOptions, requiredStringFromOptions, } from '../utils.js';
19
19
  export async function getGateway(o) {
20
20
  const address = requiredAddressFromOptions(o);
21
21
  const gateway = await readIOFromOptions(o).getGateway({
@@ -85,32 +85,16 @@ export async function listArNSReservedNames(o) {
85
85
  ? reservedNames
86
86
  : { message: 'No reserved names found' };
87
87
  }
88
- export async function getArNSAuction(o) {
88
+ export async function getArNSReturnedName(o) {
89
89
  const name = requiredStringFromOptions(o, 'name');
90
- const result = await readIOFromOptions(o).getArNSAuction({ name });
91
- return result ?? { message: `No auction found for name ${name}` };
92
- }
93
- export async function listArNSAuctions(o) {
94
- const auctions = await readIOFromOptions(o).getArNSAuctions(paginationParamsFromOptions(o));
95
- return auctions.items.length ? auctions : { message: 'No auctions found' };
96
- }
97
- export async function getArNSAuctionPrices(o) {
98
- o.type ??= 'lease';
99
- if (o.type !== 'lease' && o.type !== 'permabuy') {
100
- throw new Error(`Invalid type. Valid types are: lease, permabuy`);
101
- // TODY: type and years helper
102
- }
103
- const result = await readIOFromOptions(o).getArNSAuctionPrices({
104
- name: requiredStringFromOptions(o, 'name'),
105
- type: o.type,
106
- // TODO: intervalMS helper, assert and format
107
- intervalMs: o.intervalMs !== undefined ? +o.intervalMs : undefined,
108
- // TODO: timestamp helper, assert and format
109
- timestamp: o.timestamp !== undefined ? +o.timestamp : undefined,
110
- // todo: assert years if 'lease'
111
- years: positiveIntegerFromOptions(o, 'years'),
112
- });
113
- return result ?? { message: `No auction prices found` };
90
+ const result = await readIOFromOptions(o).getArNSReturnedName({ name });
91
+ return result ?? { message: `No returned name found for name ${name}` };
92
+ }
93
+ export async function listArNSReturnedNames(o) {
94
+ const returnedNames = await readIOFromOptions(o).getArNSReturnedNames(paginationParamsFromOptions(o));
95
+ return returnedNames.items.length
96
+ ? returnedNames
97
+ : { message: 'No returned names found' };
114
98
  }
115
99
  export async function getEpoch(o) {
116
100
  const epoch = await readIOFromOptions(o).getEpoch(epochInputFromOptions(o));
@@ -272,13 +272,6 @@ export const tokenCostOptions = [
272
272
  optionMap.years,
273
273
  optionMap.quantity,
274
274
  ];
275
- export const arNSAuctionPricesOptions = [
276
- optionMap.name,
277
- optionMap.type,
278
- optionMap.years,
279
- optionMap.timestamp,
280
- optionMap.intervalMs,
281
- ];
282
275
  export const transferOptions = [
283
276
  ...writeActionOptions,
284
277
  optionMap.quantity,
@@ -407,7 +407,7 @@ export class AoANTWriteable extends AoANTReadable {
407
407
  });
408
408
  }
409
409
  /**
410
- * @param name @type {string} The name you want to release. The name will be put up for auction on the IO contract. 50% of the winning bid will be distributed to the ANT owner at the time of release. If no bids, the name will be released and can be reregistered by anyone.
410
+ * @param name @type {string} The name you want to release. The name will be put up for as a recently returned name on the IO contract. 50% of the winning bid will be distributed to the ANT owner at the time of purchase. If no purchase in the recently returned name period (14 epochs), the name will be released and can be reregistered by anyone.
411
411
  * @param ioProcessId @type {string} The processId of the IO contract. This is where the ANT will send the message to release the name.
412
412
  * @returns {Promise<AoMessageResult>} The result of the interaction.
413
413
  * @example
@@ -315,60 +315,23 @@ export class IOReadable {
315
315
  tags: [{ name: 'Action', value: 'Demand-Factor-Settings' }],
316
316
  });
317
317
  }
318
- // Auctions
319
- async getArNSAuctions(params) {
318
+ async getArNSReturnedNames(params) {
320
319
  return this.process.read({
321
320
  tags: [
322
- { name: 'Action', value: 'Auctions' },
321
+ { name: 'Action', value: 'Returned-Names' },
323
322
  ...paginationParamsToTags(params),
324
323
  ],
325
324
  });
326
325
  }
327
- async getArNSAuction({ name, }) {
326
+ async getArNSReturnedName({ name, }) {
328
327
  const allTags = [
329
- { name: 'Action', value: 'Auction-Info' },
328
+ { name: 'Action', value: 'Returned-Name' },
330
329
  { name: 'Name', value: name },
331
330
  ];
332
331
  return this.process.read({
333
332
  tags: allTags,
334
333
  });
335
334
  }
336
- /**
337
- * Get auction prices for a given auction at the provided intervals
338
- *
339
- * @param {Object} params - The parameters for fetching auction prices
340
- * @param {string} params.name - The name of the auction
341
- * @param {('permabuy'|'lease')} [params.type='lease'] - The type of purchase
342
- * @param {number} [params.years=1] - The number of years for lease (only applicable if type is 'lease')
343
- * @param {number} [params.timestamp=Date.now()] - The timestamp to fetch prices for
344
- * @param {number} [params.intervalMs=900000] - The interval in milliseconds between price points (default is 15 minutes)
345
- * @returns {Promise<AoAuctionPriceData>} The auction price data
346
- */
347
- async getArNSAuctionPrices({ name, type, years, timestamp, intervalMs, }) {
348
- const prunedPriceTags = [
349
- { name: 'Action', value: 'Auction-Prices' },
350
- { name: 'Name', value: name },
351
- {
352
- name: 'Timestamp',
353
- value: timestamp?.toString() ??
354
- (await getCurrentBlockUnixTimestampMs(this.arweave)).toString(),
355
- },
356
- { name: 'Purchase-Type', value: type ?? 'lease' },
357
- {
358
- name: 'Years',
359
- value: type == undefined || type === 'lease'
360
- ? years?.toString() ?? '1'
361
- : undefined,
362
- },
363
- {
364
- name: 'Price-Interval-Ms',
365
- value: intervalMs?.toString() ?? '900000',
366
- },
367
- ].filter((tag) => tag.value !== undefined);
368
- return this.process.read({
369
- tags: prunedPriceTags,
370
- });
371
- }
372
335
  async getDelegations(params) {
373
336
  const allTags = [
374
337
  { name: 'Action', value: 'Paginated-Delegations' },
@@ -779,22 +742,6 @@ export class IOWriteable extends IOReadable {
779
742
  tags: pruneTags(allTags),
780
743
  });
781
744
  }
782
- async submitAuctionBid(params, options) {
783
- const { tags = [] } = options || {};
784
- const allTags = [
785
- ...tags,
786
- { name: 'Action', value: 'Auction-Bid' },
787
- { name: 'Name', value: params.name },
788
- { name: 'Process-Id', value: params.processId },
789
- { name: 'Quantity', value: params.quantity?.toString() ?? undefined },
790
- { name: 'Purchase-Type', value: params.type || 'lease' },
791
- { name: 'Years', value: params.years?.toString() ?? undefined },
792
- ];
793
- return this.process.send({
794
- signer: this.signer,
795
- tags: pruneTags(allTags),
796
- });
797
- }
798
745
  async requestPrimaryName(params) {
799
746
  return this.process.send({
800
747
  signer: this.signer,
@@ -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.7.0-alpha.6';
17
+ export const version = '2.7.0-alpha.7';
@@ -1,4 +1,4 @@
1
- import { AddressAndNameCLIOptions, AddressAndVaultIdCLIOptions, AddressCLIOptions, AuctionPricesCLIOptions, EpochCLIOptions, GetTokenCostCLIOptions, NameCLIOptions, PaginationAddressCLIOptions, PaginationCLIOptions } from '../types.js';
1
+ import { AddressAndNameCLIOptions, AddressAndVaultIdCLIOptions, AddressCLIOptions, EpochCLIOptions, GetTokenCostCLIOptions, NameCLIOptions, PaginationAddressCLIOptions, PaginationCLIOptions } from '../types.js';
2
2
  export declare function getGateway(o: AddressCLIOptions): Promise<import("../../types/io.js").AoGateway | {
3
3
  message: string;
4
4
  }>;
@@ -26,13 +26,12 @@ export declare function getArNSReservedName(o: NameCLIOptions): Promise<import("
26
26
  export declare function listArNSReservedNames(o: PaginationCLIOptions): Promise<import("../../types/io.js").PaginationResult<import("../../types/io.js").AoArNSReservedNameDataWithName> | {
27
27
  message: string;
28
28
  }>;
29
- export declare function getArNSAuction(o: NameCLIOptions): Promise<import("../../types/io.js").AoAuction | {
29
+ export declare function getArNSReturnedName(o: NameCLIOptions): Promise<import("../../types/io.js").AoReturnedName | {
30
30
  message: string;
31
31
  }>;
32
- export declare function listArNSAuctions(o: PaginationCLIOptions): Promise<import("../../types/io.js").PaginationResult<import("../../types/io.js").AoAuction> | {
32
+ export declare function listArNSReturnedNames(o: PaginationCLIOptions): Promise<import("../../types/io.js").PaginationResult<import("../../types/io.js").AoReturnedName> | {
33
33
  message: string;
34
34
  }>;
35
- export declare function getArNSAuctionPrices(o: AuctionPricesCLIOptions): Promise<import("../../types/io.js").AoAuctionPriceData>;
36
35
  export declare function getEpoch(o: EpochCLIOptions): Promise<import("../../types/io.js").AoEpochData | {
37
36
  message: string;
38
37
  }>;
@@ -284,10 +284,6 @@ export declare const tokenCostOptions: {
284
284
  alias: string;
285
285
  description: string;
286
286
  }[];
287
- export declare const arNSAuctionPricesOptions: {
288
- alias: string;
289
- description: string;
290
- }[];
291
287
  export declare const transferOptions: {
292
288
  alias: string;
293
289
  description: string;
@@ -13,7 +13,7 @@
13
13
  * See the License for the specific language governing permissions and
14
14
  * limitations under the License.
15
15
  */
16
- import { AoAddressParams, AoArNSAuctionPricesParams, AoArNSNameParams, AoBuyRecordParams, AoExtendLeaseParams, AoGetVaultParams, AoIncreaseUndernameLimitParams, AoJoinNetworkParams, AoSubmitAuctionBidParams, AoTokenCostParams, PaginationParams } from '../types/io.js';
16
+ import { AoAddressParams, AoArNSNameParams, AoBuyRecordParams, AoExtendLeaseParams, AoGetVaultParams, AoIncreaseUndernameLimitParams, AoJoinNetworkParams, AoTokenCostParams, PaginationParams } from '../types/io.js';
17
17
  export type WalletCLIOptions = {
18
18
  walletFile?: string;
19
19
  privateKey?: string;
@@ -64,7 +64,6 @@ export type EpochCLIOptions = GlobalCLIOptions & CLIOptionsFromAoParams<{
64
64
  timestamp: number;
65
65
  }>;
66
66
  export type GetTokenCostCLIOptions = GlobalCLIOptions & CLIOptionsFromAoParams<AoTokenCostParams>;
67
- export type AuctionPricesCLIOptions = GlobalCLIOptions & CLIOptionsFromAoParams<AoArNSAuctionPricesParams>;
68
67
  export type PaginationAddressCLIOptions = AddressCLIOptions & PaginationCLIOptions;
69
68
  export type NameCLIOptions = GlobalCLIOptions & CLIOptionsFromAoParams<AoArNSNameParams>;
70
69
  export type NameWriteCLIOptions = WriteActionCLIOptions & NameCLIOptions;
@@ -91,7 +90,6 @@ export type BuyRecordCLIOptions = WriteActionCLIOptions & CLIOptionsFromAoParams
91
90
  export type UpgradeRecordCLIOptions = NameWriteCLIOptions;
92
91
  export type ExtendLeaseCLIOptions = WriteActionCLIOptions & CLIOptionsFromAoParams<AoExtendLeaseParams>;
93
92
  export type IncreaseUndernameLimitCLIOptions = WriteActionCLIOptions & CLIOptionsFromAoParams<AoIncreaseUndernameLimitParams>;
94
- export type SubmitAuctionBidCLIOptions = WriteActionCLIOptions & CLIOptionsFromAoParams<AoSubmitAuctionBidParams>;
95
93
  export type ANTStateCLIOptions = WriteActionCLIOptions & {
96
94
  target?: string;
97
95
  keywords?: string[];
@@ -227,7 +227,7 @@ export declare class AoANTWriteable extends AoANTReadable implements AoANTWrite
227
227
  txId: string;
228
228
  }, options?: WriteOptions): Promise<AoMessageResult>;
229
229
  /**
230
- * @param name @type {string} The name you want to release. The name will be put up for auction on the IO contract. 50% of the winning bid will be distributed to the ANT owner at the time of release. If no bids, the name will be released and can be reregistered by anyone.
230
+ * @param name @type {string} The name you want to release. The name will be put up for as a recently returned name on the IO contract. 50% of the winning bid will be distributed to the ANT owner at the time of purchase. If no purchase in the recently returned name period (14 epochs), the name will be released and can be reregistered by anyone.
231
231
  * @param ioProcessId @type {string} The processId of the IO contract. This is where the ANT will send the message to release the name.
232
232
  * @returns {Promise<AoMessageResult>} The result of the interaction.
233
233
  * @example
@@ -14,8 +14,8 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  import Arweave from 'arweave';
17
- import { AoArNSNameDataWithName, AoArNSReservedNameData, AoAuction, AoBalanceWithAddress, AoEpochDistributionData, AoEpochObservationData, AoGatewayWithAddress, AoJoinNetworkParams, AoMessageResult, AoPrimaryName, AoPrimaryNameRequest, AoRedelegationFeeInfo, AoTokenSupplyData, AoUpdateGatewaySettingsParams, AoWeightedObserver, ContractSigner, PaginationParams, PaginationResult, ProcessConfiguration, TransactionId, WalletAddress, WithSigner, WriteOptions } from '../types/index.js';
18
- import { AoArNSNameData, AoArNSReservedNameDataWithName, AoAuctionPriceData, AoDelegation, AoEpochData, AoEpochSettings, AoGateway, AoGatewayDelegateWithAddress, AoGatewayRegistrySettings, AoGatewayVault, AoIORead, AoIOWrite, AoPaginatedAddressParams, AoRegistrationFees, AoVaultData, AoWalletVault, DemandFactorSettings, EpochInput } from '../types/io.js';
17
+ import { AoArNSNameDataWithName, AoArNSReservedNameData, AoBalanceWithAddress, AoEpochDistributionData, AoEpochObservationData, AoGatewayWithAddress, AoJoinNetworkParams, AoMessageResult, AoPrimaryName, AoPrimaryNameRequest, AoRedelegationFeeInfo, AoReturnedName, AoTokenSupplyData, AoUpdateGatewaySettingsParams, AoWeightedObserver, ContractSigner, PaginationParams, PaginationResult, ProcessConfiguration, TransactionId, WalletAddress, WithSigner, WriteOptions } from '../types/index.js';
18
+ import { AoArNSNameData, AoArNSReservedNameDataWithName, AoDelegation, AoEpochData, AoEpochSettings, AoGateway, AoGatewayDelegateWithAddress, AoGatewayRegistrySettings, AoGatewayVault, AoIORead, AoIOWrite, AoPaginatedAddressParams, AoRegistrationFees, AoVaultData, AoWalletVault, DemandFactorSettings, EpochInput } from '../types/io.js';
19
19
  import { mIOToken } from '../types/token.js';
20
20
  import { AOProcess } from './contracts/ao-process.js';
21
21
  export declare class IO {
@@ -110,28 +110,10 @@ export declare class IOReadable implements AoIORead {
110
110
  getRegistrationFees(): Promise<AoRegistrationFees>;
111
111
  getDemandFactor(): Promise<number>;
112
112
  getDemandFactorSettings(): Promise<DemandFactorSettings>;
113
- getArNSAuctions(params?: PaginationParams<AoAuction>): Promise<PaginationResult<AoAuction>>;
114
- getArNSAuction({ name, }: {
113
+ getArNSReturnedNames(params?: PaginationParams<AoReturnedName>): Promise<PaginationResult<AoReturnedName>>;
114
+ getArNSReturnedName({ name, }: {
115
115
  name: string;
116
- }): Promise<AoAuction | undefined>;
117
- /**
118
- * Get auction prices for a given auction at the provided intervals
119
- *
120
- * @param {Object} params - The parameters for fetching auction prices
121
- * @param {string} params.name - The name of the auction
122
- * @param {('permabuy'|'lease')} [params.type='lease'] - The type of purchase
123
- * @param {number} [params.years=1] - The number of years for lease (only applicable if type is 'lease')
124
- * @param {number} [params.timestamp=Date.now()] - The timestamp to fetch prices for
125
- * @param {number} [params.intervalMs=900000] - The interval in milliseconds between price points (default is 15 minutes)
126
- * @returns {Promise<AoAuctionPriceData>} The auction price data
127
- */
128
- getArNSAuctionPrices({ name, type, years, timestamp, intervalMs, }: {
129
- name: string;
130
- type?: 'permabuy' | 'lease';
131
- years?: number;
132
- timestamp?: number;
133
- intervalMs?: number;
134
- }): Promise<AoAuctionPriceData>;
116
+ }): Promise<AoReturnedName | undefined>;
135
117
  getDelegations(params: PaginationParams<AoDelegation> & {
136
118
  address: WalletAddress;
137
119
  }): Promise<PaginationResult<AoDelegation>>;
@@ -255,13 +237,6 @@ export declare class IOWriteable extends IOReadable implements AoIOWrite {
255
237
  gatewayAddress?: WalletAddress;
256
238
  vaultId: string;
257
239
  }, options?: WriteOptions | undefined): Promise<AoMessageResult>;
258
- submitAuctionBid(params: {
259
- name: string;
260
- processId: string;
261
- quantity?: number;
262
- type?: 'lease' | 'permabuy';
263
- years?: number;
264
- }, options?: WriteOptions): Promise<AoMessageResult>;
265
240
  requestPrimaryName(params: {
266
241
  name: string;
267
242
  }): Promise<AoMessageResult>;
@@ -200,26 +200,12 @@ export type AoBalanceWithAddress = {
200
200
  address: WalletAddress;
201
201
  balance: number;
202
202
  };
203
- export type AoAuctionSettings = {
204
- durationMs: number;
205
- decayRate: number;
206
- scalingExponent: number;
207
- startPriceMultiplier: number;
208
- };
209
- export type AoAuction = {
203
+ export type AoReturnedName = {
210
204
  name: string;
211
205
  startTimestamp: Timestamp;
212
206
  endTimestamp: Timestamp;
213
207
  initiator: string;
214
- baseFee: number;
215
- demandFactor: number;
216
- settings: AoAuctionSettings;
217
- };
218
- export type AoAuctionPriceData = {
219
- type: 'lease' | 'permabuy';
220
- years?: number;
221
- prices: Record<string, number>;
222
- currentPrice: number;
208
+ premiumMultiplier: number;
223
209
  };
224
210
  export type AoDelegationBase = {
225
211
  type: 'stake' | 'vault';
@@ -260,13 +246,6 @@ export type AoDelegateStakeParams = {
260
246
  stakeQty: number | mIOToken;
261
247
  };
262
248
  export type AoGetArNSRecordsParams = PaginationParams<AoArNSNameDataWithName>;
263
- export type AoArNSAuctionPricesParams = {
264
- name: string;
265
- type: 'lease' | 'permabuy';
266
- years?: number;
267
- timestamp?: number;
268
- intervalMs?: number;
269
- };
270
249
  export type AoRedelegateStakeParams = {
271
250
  target: string;
272
251
  source: string;
@@ -299,12 +278,6 @@ export type AoExtendLeaseParams = AoArNSNameParams & {
299
278
  export type AoIncreaseUndernameLimitParams = AoArNSNameParams & {
300
279
  increaseCount: number;
301
280
  };
302
- export type AoSubmitAuctionBidParams = AoArNSNameParams & {
303
- processId: string;
304
- quantity?: number;
305
- type?: 'lease' | 'permabuy';
306
- years?: number;
307
- };
308
281
  export type AoGatewayRegistrySettings = {
309
282
  delegates: {
310
283
  minStake: number;
@@ -369,11 +342,10 @@ export interface AoIORead {
369
342
  getArNSReservedName({ name, }: {
370
343
  name: string;
371
344
  }): Promise<AoArNSReservedNameData | undefined>;
372
- getArNSAuctions(params?: PaginationParams<AoAuction>): Promise<PaginationResult<AoAuction>>;
373
- getArNSAuction({ name }: {
345
+ getArNSReturnedNames(params?: PaginationParams<AoReturnedName>): Promise<PaginationResult<AoReturnedName>>;
346
+ getArNSReturnedName({ name, }: {
374
347
  name: string;
375
- }): Promise<AoAuction | undefined>;
376
- getArNSAuctionPrices({ name, type, years, timestamp, intervalMs, }: AoArNSAuctionPricesParams): Promise<AoAuctionPriceData>;
348
+ }): Promise<AoReturnedName | undefined>;
377
349
  getEpoch(epoch?: EpochInput): Promise<AoEpochData | undefined>;
378
350
  getCurrentEpoch(): Promise<AoEpochData>;
379
351
  getPrescribedObservers(epoch?: EpochInput): Promise<AoWeightedObserver[]>;
@@ -441,13 +413,6 @@ export interface AoIOWrite extends AoIORead {
441
413
  gatewayAddress?: WalletAddress;
442
414
  vaultId: string;
443
415
  }, options?: WriteOptions): Promise<AoMessageResult>;
444
- submitAuctionBid(params: {
445
- name: string;
446
- processId: string;
447
- quantity?: number;
448
- type?: 'lease' | 'permabuy';
449
- years?: number;
450
- }, options?: WriteOptions): Promise<AoMessageResult>;
451
416
  requestPrimaryName(params: {
452
417
  name: string;
453
418
  }): Promise<AoMessageResult>;