@ar.io/sdk 3.18.3 → 3.19.0-alpha.2

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.
@@ -18,7 +18,7 @@ import { connect } from '@permaweb/aoconnect';
18
18
  import { program } from 'commander';
19
19
  import { readFileSync } from 'fs';
20
20
  import prompts from 'prompts';
21
- import { ANT, ANTRegistry, ANT_REGISTRY_ID, AOProcess, ARIO, ARIOToken, ARIO_DEVNET_PROCESS_ID, ARIO_MAINNET_PROCESS_ID, ARIO_TESTNET_PROCESS_ID, ArweaveSigner, Logger, createAoSigner, fromB64Url, fundFromOptions, initANTStateForAddress, isValidFundFrom, isValidIntent, mARIOToken, sha256B64Url, validIntents, } from '../node/index.js';
21
+ import { ANT, ANTRegistry, ANT_REGISTRY_ID, ANT_REGISTRY_TESTNET_ID, AOProcess, ARIO, ARIOToken, ARIO_DEVNET_PROCESS_ID, ARIO_MAINNET_PROCESS_ID, ARIO_TESTNET_PROCESS_ID, ArweaveSigner, Logger, createAoSigner, fromB64Url, fundFromOptions, initANTStateForAddress, isValidFundFrom, isValidIntent, mARIOToken, sha256B64Url, validIntents, } from '../node/index.js';
22
22
  import { globalOptions } from './options.js';
23
23
  export const defaultTtlSecondsCLI = 3600;
24
24
  export function stringifyJsonForCLIDisplay(json) {
@@ -78,6 +78,15 @@ export function arioProcessIdFromOptions({ arioProcessId, devnet, testnet, }) {
78
78
  }
79
79
  return ARIO_MAINNET_PROCESS_ID;
80
80
  }
81
+ export function antRegistryIdFromOptions({ antRegistryProcessId, testnet, }) {
82
+ if (antRegistryProcessId !== undefined) {
83
+ return antRegistryProcessId;
84
+ }
85
+ if (testnet) {
86
+ return ANT_REGISTRY_TESTNET_ID;
87
+ }
88
+ return ANT_REGISTRY_ID;
89
+ }
81
90
  function walletFromOptions({ privateKey, walletFile, }) {
82
91
  if (privateKey !== undefined) {
83
92
  return JSON.parse(privateKey);
@@ -125,18 +134,9 @@ export function readARIOFromOptions(options) {
125
134
  paymentUrl: options.paymentUrl,
126
135
  });
127
136
  }
128
- export function ANTRegistryProcessFromOptions(options) {
129
- return new AOProcess({
130
- processId: options.antRegistryProcessId ?? ANT_REGISTRY_ID,
131
- ao: connect({
132
- MODE: 'legacy',
133
- CU_URL: options.cuUrl,
134
- }),
135
- });
136
- }
137
137
  export function readANTRegistryFromOptions(options) {
138
138
  return ANTRegistry.init({
139
- process: ANTRegistryProcessFromOptions(options),
139
+ process: aoProcessFromOptions(options),
140
140
  hyperbeamUrl: options.hyperbeamUrl,
141
141
  });
142
142
  }
@@ -14,13 +14,15 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  import { z } from 'zod';
17
+ import { ARIO_MAINNET_PROCESS_ID } from '../constants.js';
18
+ import { ANT_REGISTRY_ID } from '../constants.js';
17
19
  import { AntBalancesSchema, AntControllersSchema, AntInfoSchema, AntRecordSchema, AntRecordsSchema, AntStateSchema, } from '../types/ant.js';
18
20
  import { isProcessConfiguration, isProcessIdConfiguration, } from '../types/index.js';
19
21
  import { convertHyperBeamStateToAoANTState, isHyperBeamANTState, sortANTRecords, } from '../utils/ant.js';
20
- import { createAoSigner, spawnANT } from '../utils/ao.js';
22
+ import { createAoSigner, forkANT, spawnANT } from '../utils/ao.js';
21
23
  import { parseSchemaResult } from '../utils/schema.js';
22
24
  import { ANTVersions } from './ant-versions.js';
23
- import { AOProcess, InvalidContractConfigurationError, Logger, } from './index.js';
25
+ import { AOProcess, ARIO, InvalidContractConfigurationError, Logger, } from './index.js';
24
26
  export class ANT {
25
27
  /**
26
28
  * Versions of ANTs according to the ANT registry.
@@ -34,7 +36,103 @@ export class ANT {
34
36
  * Spawn a new ANT.
35
37
  */
36
38
  static spawn = spawnANT;
37
- // implementation
39
+ /**
40
+ * Fork an ANT to a new process.
41
+ *
42
+ * @param config
43
+ */
44
+ static fork = forkANT;
45
+ /**
46
+ * Upgrade an ANT by forking it to the latest version and reassigning names.
47
+ *
48
+ *
49
+ * @param config Configuration object for the upgrade process
50
+ * @returns Promise resolving to the forked process ID and successfully reassigned names
51
+ */
52
+ static async upgrade({ signer, antProcessId, reassignAffiliatedNames = true, // if true, will reassign all affiliated names, otherwise will use the names parameter
53
+ names = [], arioProcessId = ARIO_MAINNET_PROCESS_ID, antRegistryId = ANT_REGISTRY_ID, ao, logger = Logger.default, skipVersionCheck = false, onSigningProgress, hyperbeamUrl, }) {
54
+ // if names is not empty but reassignAffiliatedNames it true, throw
55
+ if (names.length > 0 && reassignAffiliatedNames) {
56
+ throw new Error('Cannot reassign all affiliated names and provide specific names');
57
+ }
58
+ // get all the affiliated names if reassign all affiliated names is true
59
+ if (reassignAffiliatedNames) {
60
+ const ario = ARIO.init({
61
+ process: new AOProcess({ processId: arioProcessId, ao }),
62
+ });
63
+ onSigningProgress?.('fetching-affiliated-names', {
64
+ arioProcessId,
65
+ antProcessId,
66
+ });
67
+ const allAffiliatedNames = await ario.getArNSRecords({
68
+ filters: {
69
+ processId: antProcessId,
70
+ },
71
+ });
72
+ names.push(...allAffiliatedNames.items.map((record) => record.name));
73
+ }
74
+ // if names is empty and reassign all affiliated names is false, throw an error
75
+ if (names.length === 0) {
76
+ throw new Error('There are no names to reassign for this ANT.');
77
+ }
78
+ const existingAntProcess = ANT.init({
79
+ process: new AOProcess({
80
+ processId: antProcessId,
81
+ ao,
82
+ logger,
83
+ }),
84
+ hyperbeamUrl,
85
+ signer,
86
+ });
87
+ if (!skipVersionCheck) {
88
+ onSigningProgress?.('checking-version', {
89
+ antProcessId,
90
+ antRegistryId,
91
+ });
92
+ const isLatestVersion = await existingAntProcess.isLatestVersion({
93
+ antRegistryId,
94
+ });
95
+ if (isLatestVersion) {
96
+ return {
97
+ forkedProcessId: antProcessId,
98
+ reassignedNames: [],
99
+ failedReassignedNames: [],
100
+ };
101
+ }
102
+ }
103
+ const forkedProcessId = await ANT.fork({
104
+ signer,
105
+ antProcessId,
106
+ ao,
107
+ logger,
108
+ antRegistryId,
109
+ onSigningProgress,
110
+ });
111
+ // we could parallelize this, but then signing progress would be harder to track
112
+ const reassignedNames = [];
113
+ const failedReassignedNames = [];
114
+ for (const name of names) {
115
+ try {
116
+ onSigningProgress?.('reassigning-name', {
117
+ name,
118
+ arioProcessId,
119
+ antProcessId: forkedProcessId,
120
+ });
121
+ await existingAntProcess.reassignName({
122
+ name,
123
+ arioProcessId,
124
+ antProcessId: forkedProcessId,
125
+ });
126
+ reassignedNames.push(name);
127
+ }
128
+ catch (error) {
129
+ logger.error(`Failed to reassign name ${name}:`, { error });
130
+ // Continue with other names rather than failing completely
131
+ failedReassignedNames.push(name);
132
+ }
133
+ }
134
+ return { forkedProcessId, reassignedNames, failedReassignedNames };
135
+ }
38
136
  static init(config) {
39
137
  if (config !== undefined && 'signer' in config) {
40
138
  return new AoANTWriteable(config);
@@ -48,6 +146,8 @@ export class AoANTReadable {
48
146
  strict;
49
147
  hyperbeamUrl;
50
148
  checkHyperBeamPromise;
149
+ moduleId;
150
+ moduleIdPromise;
51
151
  logger = Logger.default;
52
152
  constructor(config) {
53
153
  this.strict = config.strict || false;
@@ -180,6 +280,184 @@ export class AoANTReadable {
180
280
  const info = await this.getInfo();
181
281
  return info.Logo;
182
282
  }
283
+ /**
284
+ * Gets the module ID of the current ANT process by querying its spawn transaction tags.
285
+ * Results are cached after the first successful fetch.
286
+ *
287
+ * @param graphqlUrl The GraphQL endpoint URL (defaults to Arweave's GraphQL endpoint)
288
+ * @param retries Number of retry attempts (defaults to 3)
289
+ * @returns Promise<string> The module ID used to spawn this ANT process
290
+ * @example
291
+ * ```ts
292
+ * const moduleId = await ant.getModuleId();
293
+ * console.log(`ANT was spawned with module: ${moduleId}`);
294
+ * ```
295
+ */
296
+ async getModuleId({
297
+ // TODO: we could use wayfinder for this
298
+ graphqlUrl = 'https://arweave.net/graphql', retries = 3, } = {}) {
299
+ // Return cached result if available
300
+ if (this.moduleId !== undefined) {
301
+ this.logger.debug('Returning cached module ID', {
302
+ processId: this.processId,
303
+ moduleId: this.moduleId,
304
+ });
305
+ return this.moduleId;
306
+ }
307
+ // Return existing promise if already in flight
308
+ if (this.moduleIdPromise) {
309
+ this.logger.debug('Returning in-flight module ID promise', {
310
+ processId: this.processId,
311
+ });
312
+ return this.moduleIdPromise;
313
+ }
314
+ // Create and cache the promise to prevent multiple concurrent requests
315
+ this.moduleIdPromise = this.fetchModuleId({ graphqlUrl, retries });
316
+ try {
317
+ const moduleId = await this.moduleIdPromise;
318
+ this.moduleId = moduleId;
319
+ this.logger.debug('Successfully fetched and cached module ID', {
320
+ processId: this.processId,
321
+ moduleId,
322
+ });
323
+ return moduleId;
324
+ }
325
+ finally {
326
+ // Clear the promise so future calls can retry if this one failed
327
+ this.moduleIdPromise = undefined;
328
+ }
329
+ }
330
+ /**
331
+ * Internal method to fetch the module ID from GraphQL.
332
+ *
333
+ * TODO: this could be more like get process headers/metadata and fetch additional details.
334
+ *
335
+ * It seems like module is the only relevant one, but scheduler and authority are also available.
336
+ */
337
+ async fetchModuleId({ graphqlUrl, retries, }) {
338
+ const query = JSON.stringify({
339
+ query: `
340
+ query {
341
+ transactions(
342
+ ids: ["${this.processId}"]
343
+ first: 1,
344
+ ) {
345
+ edges {
346
+ node {
347
+ tags {
348
+ name
349
+ value
350
+ }
351
+ }
352
+ }
353
+ }
354
+ }
355
+ `,
356
+ });
357
+ for (let i = 0; i < retries; i++) {
358
+ try {
359
+ const response = await fetch(graphqlUrl, {
360
+ method: 'POST',
361
+ body: query,
362
+ headers: {
363
+ 'Content-Type': 'application/json',
364
+ },
365
+ });
366
+ if (!response.ok) {
367
+ throw new Error(`GraphQL request failed: ${response.statusText}`);
368
+ }
369
+ const result = (await response.json());
370
+ if (result.errors) {
371
+ throw new Error(`GraphQL errors: ${result.errors.map((e) => e.message).join(', ')}`);
372
+ }
373
+ const edges = result.data?.transactions?.edges;
374
+ if (!edges || edges.length === 0) {
375
+ throw new Error(`No transaction found for process ID: ${this.processId}`);
376
+ }
377
+ const tags = edges[0].node.tags;
378
+ const moduleTag = tags.find((tag) => tag.name === 'Module');
379
+ if (!moduleTag) {
380
+ throw new Error(`No Module tag found for process ID: ${this.processId}`);
381
+ }
382
+ return moduleTag.value;
383
+ }
384
+ catch (error) {
385
+ if (i === retries - 1) {
386
+ // Final attempt failed
387
+ this.logger.error('Failed to get ANT module ID after all retries:', {
388
+ error,
389
+ });
390
+ throw new Error(`Unable to determine module ID for ANT process ${this.processId}: ${error.message}`);
391
+ }
392
+ // Exponential backoff
393
+ await new Promise((resolve) => setTimeout(resolve, Math.pow(2, i) * 1000));
394
+ }
395
+ }
396
+ throw new Error(`Unexpected error getting module ID for process ${this.processId}`);
397
+ }
398
+ /**
399
+ * Gets the version string of the current ANT by matching its module ID
400
+ * with versions from the ANT registry.
401
+ *
402
+ * @param antRegistryId The ANT registry process ID (defaults to mainnet registry)
403
+ * @param graphqlUrl The GraphQL endpoint URL for getModuleId (defaults to Arweave's GraphQL endpoint)
404
+ * @param retries Number of retry attempts for getModuleId (defaults to 3)
405
+ * @returns Promise<string> The version string (e.g., "1.0.15") or "unknown" if not found
406
+ * @example
407
+ * ```ts
408
+ * const version = await ant.getVersion();
409
+ * console.log(`ANT is running version: ${version}`);
410
+ * ```
411
+ */
412
+ async getVersion({ antRegistryId = ANT_REGISTRY_ID, graphqlUrl = 'https://arweave.net/graphql', retries = 3, } = {}) {
413
+ // Get the current ANT's module ID
414
+ const currentModuleId = await this.getModuleId({ graphqlUrl, retries });
415
+ // Get all versions from the ANT registry
416
+ const antVersions = ANTVersions.init({
417
+ processId: antRegistryId,
418
+ });
419
+ const versions = await antVersions.getANTVersions();
420
+ // Find the version that matches our module ID
421
+ for (const [version, versionInfo] of Object.entries(versions)) {
422
+ if (versionInfo.moduleId === currentModuleId) {
423
+ this.logger.debug('Found matching ANT version', {
424
+ processId: this.processId,
425
+ moduleId: currentModuleId,
426
+ version,
427
+ });
428
+ return version;
429
+ }
430
+ }
431
+ const versionForModuleId = Object.entries(versions)
432
+ .map(([version, versionInfo]) => ({
433
+ version,
434
+ ...versionInfo,
435
+ }))
436
+ .find((obj) => obj.moduleId === currentModuleId);
437
+ return versionForModuleId?.version ?? 'unknown';
438
+ }
439
+ /**
440
+ * Checks if the current ANT version is the latest according to the ANT registry.
441
+ *
442
+ * @param antRegistryId Optional ANT registry process ID. Defaults to mainnet ANT registry.
443
+ * @param graphqlUrl Optional GraphQL endpoint. Defaults to https://arweave.net/graphql.
444
+ * @param retries Optional number of retries for fetching module ID. Defaults to 3.
445
+ * @returns {Promise<boolean>} True if current ANT version is the latest, false otherwise.
446
+ */
447
+ async isLatestVersion({ antRegistryId = ANT_REGISTRY_ID, graphqlUrl = 'https://arweave.net/graphql', retries = 3, } = {}) {
448
+ // Get the current ANT's version
449
+ const currentVersion = await this.getVersion({
450
+ antRegistryId,
451
+ graphqlUrl,
452
+ retries,
453
+ });
454
+ // Get all versions from the ANT registry
455
+ const antVersions = ANTVersions.init({
456
+ processId: antRegistryId,
457
+ });
458
+ const latestVersion = await antVersions.getLatestANTVersion();
459
+ return currentVersion === latestVersion.version;
460
+ }
183
461
  /**
184
462
  * @param undername @type {string} The domain name.
185
463
  * @returns {Promise<ANTRecord>} The record of the undername domain.
@@ -711,4 +989,40 @@ export class AoANTWriteable extends AoANTReadable {
711
989
  signer: this.signer,
712
990
  });
713
991
  }
992
+ /**
993
+ * Upgrade this ANT by forking it to the latest version and reassigning names.
994
+ *
995
+ * This is a convenience method that calls the static ANT.upgrade() method
996
+ * using this instance's process ID and signer.
997
+ *
998
+ * TODO: Add version checking by implementing a getVersion API on ANTs to compare
999
+ * current version with latest ANT registry version and skip if already up to date.
1000
+ *
1001
+ * @param names @type {string[]} The ArNS names to reassign to the upgraded ANT.
1002
+ * @param arioProcessId @type {string} The processId of the ARIO contract.
1003
+ * @param antRegistryId @type {string} Optional ANT registry ID.
1004
+ * @param onSigningProgress Progress callback function.
1005
+ * @returns {Promise} The upgrade results.
1006
+ * @example
1007
+ * ```ts
1008
+ * const result = await ant.upgrade({
1009
+ * names: ["example", "test"],
1010
+ * arioProcessId: ARIO_MAINNET_PROCESS_ID
1011
+ * });
1012
+ * console.log(`Upgraded to process: ${result.forkedProcessId}`);
1013
+ * ```
1014
+ */
1015
+ async upgrade({ names, reassignAffiliatedNames, arioProcessId, antRegistryId, onSigningProgress, skipVersionCheck = false, }) {
1016
+ return ANT.upgrade({
1017
+ signer: this.signer,
1018
+ antProcessId: this.processId,
1019
+ ao: this.process.ao,
1020
+ names,
1021
+ reassignAffiliatedNames,
1022
+ arioProcessId,
1023
+ antRegistryId,
1024
+ onSigningProgress,
1025
+ skipVersionCheck,
1026
+ });
1027
+ }
714
1028
  }
@@ -680,12 +680,12 @@ export class ARIOReadable {
680
680
  * @returns {Promise<AoArNSNameData[]>} The ARNS names associated with the address
681
681
  */
682
682
  async getArNSRecordsForAddress(params) {
683
- const { antRegistryProcessId = ANT_REGISTRY_ID, address } = params;
683
+ const { antRegistryId = ANT_REGISTRY_ID, address } = params;
684
684
  const antRegistry = ANTRegistry.init({
685
685
  hyperbeamUrl: this.hyperbeamUrl,
686
686
  process: new AOProcess({
687
687
  ao: this.process.ao,
688
- processId: antRegistryProcessId,
688
+ processId: antRegistryId,
689
689
  }),
690
690
  });
691
691
  // Note: there could be a race condition here if the ACL changes during pagination requests, resulting in different results from the `getArNSRecords`.
@@ -21,6 +21,7 @@ export const ARIO_DEVNET_PROCESS_ID = 'GaQrvEMKBpkjofgnBi_B3IgIDmY_XYelVLB6GcRGr
21
21
  export const arioDevnetProcessId = ARIO_DEVNET_PROCESS_ID;
22
22
  export const ARIO_TESTNET_PROCESS_ID = 'agYcCFJtrMG6cqMuZfskIkFTGvUPddICmtQSBIoPdiA';
23
23
  export const ARIO_MAINNET_PROCESS_ID = 'qNvAoz0TgcH7DMg8BCVn8jF32QH5L6T29VjHxhHqqGE';
24
+ export const ANT_REGISTRY_TESTNET_ID = 'RR0vheYqtsKuJCWh6xj0beE35tjaEug5cejMw9n2aa8';
24
25
  export const ANT_REGISTRY_ID = 'i_le_yKKPVstLTDSmkHRqf-wYphMnwB9OhleiTgMkWc';
25
26
  export const MARIO_PER_ARIO = 1_000_000;
26
27
  /**
@@ -37,6 +37,9 @@ export const sortANTRecords = (antRecords) => {
37
37
  // now that they are sorted, add the index to each record - this is their position in the sorted list and is used to enforce undername limits
38
38
  return Object.fromEntries(sortedEntries.map(([a, aRecord], index) => [a, { ...aRecord, index }]));
39
39
  };
40
+ /**
41
+ * @deprecated - this is no longer necessary because HyperBeam now uses the AoANTState type
42
+ */
40
43
  export const isHyperBeamANTState = (state) => {
41
44
  return ('name' in state &&
42
45
  'ticker' in state &&
@@ -54,6 +57,7 @@ export const isHyperBeamANTState = (state) => {
54
57
  /**
55
58
  * Convert HyperBeam serialized ANT state to backwards compatible format.
56
59
  *
60
+ * @deprecated - this is no longer necessary because HyperBeam now uses the AOANTState type
57
61
  * @param state - The HyperBeam serialized ANT state.
58
62
  */
59
63
  export const convertHyperBeamStateToAoANTState = (initialState) => {
@@ -19,7 +19,7 @@ import { z } from 'zod';
19
19
  import { ANTRegistry } from '../common/ant-registry.js';
20
20
  import { ANTVersions } from '../common/ant-versions.js';
21
21
  import { defaultArweave } from '../common/arweave.js';
22
- import { AOProcess, Logger } from '../common/index.js';
22
+ import { ANT, AOProcess, Logger } from '../common/index.js';
23
23
  import { ANT_LUA_ID, ANT_REGISTRY_ID, AO_AUTHORITY, DEFAULT_SCHEDULER_ID, } from '../constants.js';
24
24
  import { SpawnANTStateSchema } from '../types/ant.js';
25
25
  import { parseSchemaResult } from './schema.js';
@@ -211,7 +211,40 @@ export async function spawnANT({ signer, module, ao = connect({
211
211
  }
212
212
  return processId;
213
213
  }
214
- // TODO: add a utility for forking an ANT to the latest module that leverages getState and spawnANT
214
+ export async function forkANT({ signer, antProcessId, logger = Logger.default, ao, antRegistryId = ANT_REGISTRY_ID, onSigningProgress = (name, payload) => {
215
+ logger.debug('Forking ANT', { name, payload });
216
+ }, }) {
217
+ // get the state of the current ANT and use it to spawn a new ANT
218
+ const ant = ANT.init({
219
+ process: new AOProcess({
220
+ processId: antProcessId,
221
+ ao,
222
+ logger,
223
+ }),
224
+ });
225
+ const state = await ant.getState();
226
+ if (state === undefined) {
227
+ throw new Error(`ANT state (${antProcessId}) is undefined and cannot be upgraded`);
228
+ }
229
+ const forkedProcessId = await spawnANT({
230
+ signer,
231
+ antRegistryId,
232
+ logger,
233
+ onSigningProgress,
234
+ state: {
235
+ owner: state.Owner,
236
+ name: state.Name,
237
+ ticker: state.Ticker,
238
+ description: state.Description,
239
+ keywords: state.Keywords,
240
+ controllers: state.Controllers,
241
+ records: state.Records,
242
+ balances: state.Balances,
243
+ logo: state.Logo,
244
+ },
245
+ });
246
+ return forkedProcessId;
247
+ }
215
248
  /**
216
249
  * @deprecated
217
250
  * Direct Evals are not encouraged when dealing with ANTs.
@@ -23,7 +23,7 @@ import { ARIO } from '../common/io.js';
23
23
  import { Logger } from '../common/logger.js';
24
24
  import { ARIO_MAINNET_PROCESS_ID } from '../constants.js';
25
25
  /**
26
- * @deprecated Use getArNSRecordsForAddress instead
26
+ * @beta This API is in beta and may change in the future.
27
27
  */
28
28
  export const getANTProcessesOwnedByWallet = async ({ address, registry = ANTRegistry.init(), }) => {
29
29
  const res = await registry.accessControlList({ address });
@@ -14,4 +14,4 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  // AUTOMATICALLY GENERATED FILE - DO NOT TOUCH
17
- export const version = '3.18.3';
17
+ export const version = '3.19.0-alpha.2';
@@ -19,3 +19,8 @@ import { CLIWriteOptionsFromAoAntParams } from '../types.js';
19
19
  export declare function setAntRecordCLICommand(o: CLIWriteOptionsFromAoAntParams<AoANTSetUndernameRecordParams>): Promise<import("../../types/common.js").AoMessageResult<Record<string, string | number | boolean | null>>>;
20
20
  export declare function setAntBaseNameCLICommand(o: CLIWriteOptionsFromAoAntParams<AoANTSetBaseNameRecordParams>): Promise<import("../../types/common.js").AoMessageResult<Record<string, string | number | boolean | null>>>;
21
21
  export declare function setAntUndernameCLICommand(o: CLIWriteOptionsFromAoAntParams<AoANTSetUndernameRecordParams>): Promise<import("../../types/common.js").AoMessageResult<Record<string, string | number | boolean | null>>>;
22
+ export declare function upgradeAntCLICommand(o: CLIWriteOptionsFromAoAntParams<Record<string, unknown>>): Promise<{
23
+ forkedProcessId: string;
24
+ reassignedNames: string[];
25
+ failedReassignedNames: string[];
26
+ }>;
@@ -390,3 +390,7 @@ export declare const setAntUndernameOptions: {
390
390
  alias: string;
391
391
  description: string;
392
392
  }[];
393
+ export declare const upgradeAntOptions: {
394
+ alias: string;
395
+ description: string;
396
+ }[];
@@ -1,6 +1,6 @@
1
1
  import { JWKInterface } from 'arweave/node/lib/wallet.js';
2
2
  import { Command, OptionValues } from 'commander';
3
- import { AOProcess, ARIOToken, AoANTRead, AoANTRegistryRead, AoANTWrite, AoARIORead, AoARIOWrite, AoGetCostDetailsParams, AoRedelegateStakeParams, AoSigner, AoUpdateGatewaySettingsParams, ContractSigner, EpochInput, FundFrom, Logger, PaginationParams, SpawnANTState, WriteOptions, mARIOToken } from '../node/index.js';
3
+ import { ARIOToken, AoANTRead, AoANTRegistryRead, AoANTWrite, AoARIORead, AoARIOWrite, AoGetCostDetailsParams, AoRedelegateStakeParams, AoSigner, AoUpdateGatewaySettingsParams, ContractSigner, EpochInput, FundFrom, Logger, PaginationParams, SpawnANTState, WriteOptions, mARIOToken } from '../node/index.js';
4
4
  import { ANTStateCLIOptions, AddressCLIOptions, EpochCLIOptions, GetTokenCostCLIOptions, GlobalCLIOptions, InitiatorCLIOptions, JsonSerializable, PaginationCLIOptions, ProcessIdCLIOptions, RedelegateStakeCLIOptions, TransferCLIOptions, UpdateGatewaySettingsCLIOptions, WalletCLIOptions, WriteActionCLIOptions } from './types.js';
5
5
  export declare const defaultTtlSecondsCLI = 3600;
6
6
  export declare function stringifyJsonForCLIDisplay(json: JsonSerializable | unknown): string;
@@ -18,11 +18,11 @@ export declare function makeCommand<O extends OptionValues = GlobalCLIOptions>({
18
18
  options?: CommanderOption[];
19
19
  }): Command;
20
20
  export declare function arioProcessIdFromOptions({ arioProcessId, devnet, testnet, }: GlobalCLIOptions): string;
21
+ export declare function antRegistryIdFromOptions({ antRegistryProcessId, testnet, }: GlobalCLIOptions): string;
21
22
  export declare function requiredJwkFromOptions(options: WalletCLIOptions): JWKInterface;
22
23
  export declare function jwkToAddress(jwk: JWKInterface): string;
23
24
  export declare function getLoggerFromOptions(options: GlobalCLIOptions): Logger;
24
25
  export declare function readARIOFromOptions(options: GlobalCLIOptions): AoARIORead;
25
- export declare function ANTRegistryProcessFromOptions(options: ProcessIdCLIOptions): AOProcess;
26
26
  export declare function readANTRegistryFromOptions(options: ProcessIdCLIOptions): AoANTRegistryRead;
27
27
  export declare function contractSignerFromOptions(options: WalletCLIOptions): {
28
28
  signer: ContractSigner;