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

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.
Files changed (38) hide show
  1. package/README.md +186 -186
  2. package/bundles/web.bundle.min.js +2 -2
  3. package/lib/cjs/cli/cli.js +26 -26
  4. package/lib/cjs/cli/commands/gatewayWriteCommands.js +39 -39
  5. package/lib/cjs/cli/commands/readCommands.js +19 -19
  6. package/lib/cjs/cli/commands/transfer.js +7 -7
  7. package/lib/cjs/cli/options.js +4 -4
  8. package/lib/cjs/cli/utils.js +25 -25
  9. package/lib/cjs/common/ant.js +18 -14
  10. package/lib/cjs/common/io.js +11 -11
  11. package/lib/cjs/constants.js +5 -5
  12. package/lib/cjs/types/token.js +14 -14
  13. package/lib/cjs/utils/processes.js +4 -4
  14. package/lib/cjs/version.js +1 -1
  15. package/lib/esm/cli/cli.js +28 -28
  16. package/lib/esm/cli/commands/gatewayWriteCommands.js +41 -41
  17. package/lib/esm/cli/commands/readCommands.js +21 -21
  18. package/lib/esm/cli/commands/transfer.js +8 -8
  19. package/lib/esm/cli/options.js +4 -4
  20. package/lib/esm/cli/utils.js +21 -21
  21. package/lib/esm/common/ant.js +18 -14
  22. package/lib/esm/common/io.js +8 -8
  23. package/lib/esm/constants.js +4 -4
  24. package/lib/esm/types/token.js +12 -12
  25. package/lib/esm/utils/processes.js +6 -6
  26. package/lib/esm/version.js +1 -1
  27. package/lib/types/cli/options.d.ts +1 -1
  28. package/lib/types/cli/types.d.ts +1 -1
  29. package/lib/types/cli/utils.d.ts +10 -10
  30. package/lib/types/common/ant.d.ts +14 -14
  31. package/lib/types/common/io.d.ts +16 -16
  32. package/lib/types/constants.d.ts +4 -4
  33. package/lib/types/types/ant.d.ts +8 -8
  34. package/lib/types/types/io.d.ts +9 -9
  35. package/lib/types/types/token.d.ts +8 -8
  36. package/lib/types/utils/processes.d.ts +4 -4
  37. package/lib/types/version.d.ts +1 -1
  38. package/package.json +1 -1
@@ -1,29 +1,29 @@
1
- import { IO_TESTNET_PROCESS_ID } from '../constants.js';
1
+ import { ARIO_TESTNET_PROCESS_ID } from '../constants.js';
2
2
  import { isProcessConfiguration, isProcessIdConfiguration, } from '../types/io.js';
3
3
  import { createAoSigner } from '../utils/ao.js';
4
4
  import { getCurrentBlockUnixTimestampMs, paginationParamsToTags, pruneTags, } from '../utils/arweave.js';
5
5
  import { defaultArweave } from './arweave.js';
6
6
  import { AOProcess } from './contracts/ao-process.js';
7
7
  import { InvalidContractConfigurationError } from './error.js';
8
- export class IO {
8
+ export class ARIO {
9
9
  static init(config) {
10
10
  if (config && config.signer) {
11
11
  const { signer, ...rest } = config;
12
- return new IOWriteable({
12
+ return new ARIOWriteable({
13
13
  ...rest,
14
14
  signer,
15
15
  });
16
16
  }
17
- return new IOReadable(config);
17
+ return new ARIOReadable(config);
18
18
  }
19
19
  }
20
- export class IOReadable {
20
+ export class ARIOReadable {
21
21
  process;
22
22
  arweave;
23
23
  constructor(config, arweave = defaultArweave) {
24
24
  if (!config) {
25
25
  this.process = new AOProcess({
26
- processId: IO_TESTNET_PROCESS_ID,
26
+ processId: ARIO_TESTNET_PROCESS_ID,
27
27
  });
28
28
  }
29
29
  else if (isProcessConfiguration(config)) {
@@ -416,13 +416,13 @@ export class IOReadable {
416
416
  });
417
417
  }
418
418
  }
419
- export class IOWriteable extends IOReadable {
419
+ export class ARIOWriteable extends ARIOReadable {
420
420
  signer;
421
421
  constructor({ signer, ...config }) {
422
422
  if (Object.keys(config).length === 0) {
423
423
  super({
424
424
  process: new AOProcess({
425
- processId: IO_TESTNET_PROCESS_ID,
425
+ processId: ARIO_TESTNET_PROCESS_ID,
426
426
  }),
427
427
  });
428
428
  this.signer = createAoSigner(signer);
@@ -20,12 +20,12 @@ export const FQDN_REGEX = new RegExp('^(?:(?!-)[A-Za-z0-9-]{1,63}(?<!-)\\.)+[A-Z
20
20
  export const SORT_KEY_REGEX = new RegExp('^[0-9]{12},[0-9]{13},[a-fA-F0-9]{64}$');
21
21
  export const ARNS_TESTNET_REGISTRY_TX = process.env.ARNS_REGISTRY_TX ?? 'bLAgYxAdX2Ry-nt6aH2ixgvJXbpsEYm28NgJgyqfs-U';
22
22
  export const ARNS_DEVNET_REGISTRY_TX = '_NctcA2sRy1-J4OmIQZbYFPM17piNcbdBPH2ncX2RL8';
23
- export const IO_DEVNET_PROCESS_ID = 'GaQrvEMKBpkjofgnBi_B3IgIDmY_XYelVLB6GcRGrHc';
23
+ export const ARIO_DEVNET_PROCESS_ID = 'GaQrvEMKBpkjofgnBi_B3IgIDmY_XYelVLB6GcRGrHc';
24
24
  // backwards compatibility - TODO: remove in v2.0.0
25
- export const ioDevnetProcessId = IO_DEVNET_PROCESS_ID;
26
- export const IO_TESTNET_PROCESS_ID = 'agYcCFJtrMG6cqMuZfskIkFTGvUPddICmtQSBIoPdiA';
25
+ export const arioDevnetProcessId = ARIO_DEVNET_PROCESS_ID;
26
+ export const ARIO_TESTNET_PROCESS_ID = 'agYcCFJtrMG6cqMuZfskIkFTGvUPddICmtQSBIoPdiA';
27
27
  export const ANT_REGISTRY_ID = 'i_le_yKKPVstLTDSmkHRqf-wYphMnwB9OhleiTgMkWc';
28
- export const MIO_PER_IO = 1_000_000;
28
+ export const MARIO_PER_ARIO = 1_000_000;
29
29
  export const AOS_MODULE_ID = 'cbn0KKrBZH7hdNkNokuXLtGryrWM--PjSTBqIzw9Kkk';
30
30
  export const ANT_LUA_ID = '16_FyX-V2QU0RPSh1GIaEETSaUjNb0oVjCFpVbAfQq4';
31
31
  export const DEFAULT_SCHEDULER_ID = '_GQ33BkPtZrqxA84vM8Zk-N2aO0toNNu_C-l-rawrBA';
@@ -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 { MIO_PER_IO } from '../constants.js';
16
+ import { MARIO_PER_ARIO } from '../constants.js';
17
17
  class PositiveFiniteInteger {
18
18
  positiveFiniteInteger;
19
19
  constructor(positiveFiniteInteger) {
@@ -61,32 +61,32 @@ class PositiveFiniteInteger {
61
61
  return this.positiveFiniteInteger === other.positiveFiniteInteger;
62
62
  }
63
63
  }
64
- export class IOToken {
64
+ export class ARIOToken {
65
65
  value;
66
66
  constructor(value) {
67
67
  if (!Number.isFinite(value) || value < 0) {
68
- throw new Error('IOToken must be a non-negative finite number');
68
+ throw new Error('ARIOToken must be a non-negative finite number');
69
69
  }
70
70
  this.value = +value.toFixed(6);
71
71
  }
72
72
  valueOf() {
73
73
  return this.value;
74
74
  }
75
- toMIO() {
76
- return new mIOToken(Math.floor(this.value * MIO_PER_IO));
75
+ toMARIO() {
76
+ return new mARIOToken(Math.floor(this.value * MARIO_PER_ARIO));
77
77
  }
78
78
  toString() {
79
79
  return `${this.value}`;
80
80
  }
81
81
  }
82
- export class mIOToken extends PositiveFiniteInteger {
82
+ export class mARIOToken extends PositiveFiniteInteger {
83
83
  constructor(value) {
84
84
  super(value);
85
85
  }
86
86
  multiply(multiplier) {
87
87
  // always round down on multiplication and division
88
88
  const result = Math.floor(this.valueOf() * multiplier.valueOf());
89
- return new mIOToken(result);
89
+ return new mARIOToken(result);
90
90
  }
91
91
  divide(divisor) {
92
92
  if (divisor.valueOf() === 0) {
@@ -95,17 +95,17 @@ export class mIOToken extends PositiveFiniteInteger {
95
95
  }
96
96
  // always round down on multiplication and division
97
97
  const result = Math.floor(this.valueOf() / divisor.valueOf());
98
- return new mIOToken(result);
98
+ return new mARIOToken(result);
99
99
  }
100
100
  plus(addend) {
101
101
  const result = super.plus(addend);
102
- return new mIOToken(result.valueOf());
102
+ return new mARIOToken(result.valueOf());
103
103
  }
104
104
  minus(subtractHend) {
105
105
  const result = super.minus(subtractHend);
106
- return new mIOToken(result.valueOf());
106
+ return new mARIOToken(result.valueOf());
107
107
  }
108
- toIO() {
109
- return new IOToken(this.valueOf() / MIO_PER_IO);
108
+ toARIO() {
109
+ return new ARIOToken(this.valueOf() / MARIO_PER_ARIO);
110
110
  }
111
111
  }
@@ -17,9 +17,9 @@ import { EventEmitter } from 'eventemitter3';
17
17
  import { pLimit } from 'plimit-lit';
18
18
  import { ANTRegistry } from '../common/ant-registry.js';
19
19
  import { ANT } from '../common/ant.js';
20
- import { IO } from '../common/io.js';
20
+ import { ARIO } from '../common/io.js';
21
21
  import { Logger } from '../common/logger.js';
22
- import { IO_TESTNET_PROCESS_ID } from '../constants.js';
22
+ import { ARIO_TESTNET_PROCESS_ID } from '../constants.js';
23
23
  /**
24
24
  * @beta This API is in beta and may change in the future.
25
25
  */
@@ -49,8 +49,8 @@ export class ArNSEventEmitter extends EventEmitter {
49
49
  throttle;
50
50
  logger;
51
51
  strict;
52
- constructor({ contract = IO.init({
53
- processId: IO_TESTNET_PROCESS_ID,
52
+ constructor({ contract = ARIO.init({
53
+ processId: ARIO_TESTNET_PROCESS_ID,
54
54
  }), timeoutMs = 60_000, concurrency = 30, logger = Logger.default, strict = false, } = {}) {
55
55
  super();
56
56
  this.contract = contract;
@@ -112,8 +112,8 @@ export class ArNSEventEmitter extends EventEmitter {
112
112
  this.emit('end', uniqueContractProcessIds);
113
113
  }
114
114
  }
115
- export const fetchAllArNSRecords = async ({ contract = IO.init({
116
- processId: IO_TESTNET_PROCESS_ID,
115
+ export const fetchAllArNSRecords = async ({ contract = ARIO.init({
116
+ processId: ARIO_TESTNET_PROCESS_ID,
117
117
  }), emitter, logger = Logger.default, pageSize = 50_000, }) => {
118
118
  let cursor;
119
119
  const startTimestamp = Date.now();
@@ -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.7';
17
+ export const version = '3.0.0';
@@ -27,7 +27,7 @@ export declare const optionMap: {
27
27
  description: string;
28
28
  type: string;
29
29
  };
30
- ioProcessId: {
30
+ arioProcessId: {
31
31
  alias: string;
32
32
  description: string;
33
33
  };
@@ -21,7 +21,7 @@ export type WalletCLIOptions = {
21
21
  export type GlobalCLIOptions = WalletCLIOptions & {
22
22
  dev: boolean;
23
23
  debug: boolean;
24
- ioProcessId?: string;
24
+ arioProcessId?: string;
25
25
  cuUrl?: string;
26
26
  };
27
27
  export type WriteActionCLIOptions = GlobalCLIOptions & {
@@ -1,6 +1,6 @@
1
1
  import { JWKInterface } from 'arweave/node/lib/wallet.js';
2
2
  import { Command, OptionValues } from 'commander';
3
- import { AoANTRead, AoANTWrite, AoIORead, AoIOWrite, AoRedelegateStakeParams, AoSigner, AoUpdateGatewaySettingsParams, ContractSigner, EpochInput, IOToken, Logger, PaginationParams, SpawnANTState, WriteOptions, mIOToken } from '../node/index.js';
3
+ import { ARIOToken, AoANTRead, AoANTWrite, AoARIORead, AoARIOWrite, AoRedelegateStakeParams, AoSigner, AoUpdateGatewaySettingsParams, ContractSigner, EpochInput, Logger, PaginationParams, SpawnANTState, WriteOptions, mARIOToken } from '../node/index.js';
4
4
  import { ANTStateCLIOptions, AddressCLIOptions, EpochCLIOptions, GlobalCLIOptions, InitiatorCLIOptions, JsonSerializable, PaginationCLIOptions, ProcessIdCLIOptions, RedelegateStakeCLIOptions, TransferCLIOptions, UpdateGatewaySettingsCLIOptions, WalletCLIOptions, WriteActionCLIOptions } from './types.js';
5
5
  export declare function stringifyJsonForCLIDisplay(json: JsonSerializable | unknown): string;
6
6
  export declare function runCommand<O extends OptionValues>(command: Command, action: (options: O) => Promise<JsonSerializable>): Promise<void>;
@@ -16,21 +16,21 @@ export declare function makeCommand<O extends OptionValues = GlobalCLIOptions>({
16
16
  action?: (options: O) => Promise<JsonSerializable>;
17
17
  options?: CommanderOption[];
18
18
  }): Command;
19
- export declare function ioProcessIdFromOptions({ ioProcessId, dev, }: GlobalCLIOptions): string;
19
+ export declare function arioProcessIdFromOptions({ arioProcessId, dev, }: GlobalCLIOptions): string;
20
20
  export declare function requiredJwkFromOptions(options: WalletCLIOptions): JWKInterface;
21
21
  export declare function jwkToAddress(jwk: JWKInterface): string;
22
22
  export declare function getLoggerFromOptions(options: GlobalCLIOptions): Logger;
23
- export declare function readIOFromOptions(options: GlobalCLIOptions): AoIORead;
23
+ export declare function readARIOFromOptions(options: GlobalCLIOptions): AoARIORead;
24
24
  export declare function requiredContractSignerFromOptions(options: WalletCLIOptions): {
25
25
  signer: ContractSigner;
26
26
  signerAddress: string;
27
27
  };
28
28
  export declare function requiredAoSignerFromOptions(options: WalletCLIOptions): AoSigner;
29
- export declare function writeIOFromOptions(options: GlobalCLIOptions): {
30
- io: AoIOWrite;
29
+ export declare function writeARIOFromOptions(options: GlobalCLIOptions): {
30
+ ario: AoARIOWrite;
31
31
  signerAddress: string;
32
32
  };
33
- export declare function formatIOWithCommas(value: IOToken): string;
33
+ export declare function formatARIOWithCommas(value: ARIOToken): string;
34
34
  /** helper to get address from --address option first, then check wallet options */
35
35
  export declare function addressFromOptions<O extends AddressCLIOptions>(options: O): string | undefined;
36
36
  export declare function requiredAddressFromOptions<O extends AddressCLIOptions>(options: O): string;
@@ -43,16 +43,16 @@ export declare function writeActionTagsFromOptions<O extends WriteActionCLIOptio
43
43
  export declare function gatewaySettingsFromOptions({ allowDelegatedStaking, autoStake, delegateRewardShareRatio, fqdn, label, minDelegatedStake, note, observerAddress, port, properties, allowedDelegates, }: UpdateGatewaySettingsCLIOptions): AoUpdateGatewaySettingsParams;
44
44
  export declare function requiredTargetAndQuantityFromOptions(options: TransferCLIOptions): {
45
45
  target: string;
46
- ioQuantity: IOToken;
46
+ arioQuantity: ARIOToken;
47
47
  };
48
48
  export declare function redelegateParamsFromOptions(options: RedelegateStakeCLIOptions): AoRedelegateStakeParams & {
49
- stakeQty: mIOToken;
49
+ stakeQty: mARIOToken;
50
50
  };
51
51
  export declare function recordTypeFromOptions<O extends {
52
52
  type?: string;
53
53
  }>(options: O): 'lease' | 'permabuy';
54
- export declare function requiredMIOFromOptions<O extends GlobalCLIOptions>(options: O, key: string): mIOToken;
55
- export declare function assertEnoughBalance(io: AoIORead, address: string, ioQuantity: IOToken): Promise<void>;
54
+ export declare function requiredMIOFromOptions<O extends GlobalCLIOptions>(options: O, key: string): mARIOToken;
55
+ export declare function assertEnoughBalance(ario: AoARIORead, address: string, arioQuantity: ARIOToken): Promise<void>;
56
56
  export declare function confirmationPrompt(message: string): Promise<boolean>;
57
57
  export declare function assertConfirmationPrompt<O extends {
58
58
  skipConfirmation?: boolean;
@@ -227,44 +227,44 @@ 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 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
- * @param ioProcessId @type {string} The processId of the IO contract. This is where the ANT will send the message to release the name.
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 ARIO 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
+ * @param arioProcessId @type {string} The processId of the ARIO 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
234
234
  * ```ts
235
- * ant.releaseName({ name: "ardrive", ioProcessId: IO_TESTNET_PROCESS_ID });
235
+ * ant.releaseName({ name: "ardrive", arioProcessId: AR_TESTNET_PROCESS_ID });
236
236
  * ```
237
237
  */
238
- releaseName({ name, ioProcessId }: {
238
+ releaseName({ name, arioProcessId }: {
239
239
  name: string;
240
- ioProcessId: string;
240
+ arioProcessId: string;
241
241
  }, options?: WriteOptions): Promise<AoMessageResult>;
242
242
  /**
243
- * Sends a message to the IO contract to reassign the name to a new ANT. This can only be done by the current owner of the ANT.
243
+ * Sends a message to the ARIO contract to reassign the name to a new ANT. This can only be done by the current owner of the ANT.
244
244
  * @param name @type {string} The name you want to reassign.
245
- * @param ioProcessId @type {string} The processId of the IO contract.
245
+ * @param arioProcessId @type {string} The processId of the ARIO contract.
246
246
  * @param antProcessId @type {string} The processId of the ANT contract.
247
247
  * @returns {Promise<AoMessageResult>} The result of the interaction.
248
248
  * @example
249
249
  * ```ts
250
- * ant.reassignName({ name: "ardrive", ioProcessId: IO_TESTNET_PROCESS_ID, antProcessId: NEW_ANT_PROCESS_ID });
250
+ * ant.reassignName({ name: "ardrive", arioProcessId: ARIO_TESTNET_PROCESS_ID, antProcessId: NEW_ANT_PROCESS_ID });
251
251
  * ```
252
252
  */
253
- reassignName({ name, ioProcessId, antProcessId, }: {
253
+ reassignName({ name, arioProcessId, antProcessId, }: {
254
254
  name: string;
255
- ioProcessId: string;
255
+ arioProcessId: string;
256
256
  antProcessId: string;
257
257
  }, options?: WriteOptions): Promise<AoMessageResult>;
258
258
  /**
259
259
  * Approves a primary name request for a given name or address.
260
260
  */
261
- approvePrimaryNameRequest({ name, address, ioProcessId, }: {
261
+ approvePrimaryNameRequest({ name, address, arioProcessId, }: {
262
262
  name: string;
263
263
  address: WalletAddress;
264
- ioProcessId: string;
264
+ arioProcessId: string;
265
265
  }, options?: WriteOptions): Promise<AoMessageResult>;
266
- removePrimaryNames({ names, ioProcessId }: {
266
+ removePrimaryNames({ names, arioProcessId }: {
267
267
  names: string[];
268
- ioProcessId: string;
268
+ arioProcessId: string;
269
269
  }, options?: WriteOptions): Promise<AoMessageResult>;
270
270
  }
@@ -15,29 +15,29 @@
15
15
  */
16
16
  import Arweave from 'arweave';
17
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
- import { mIOToken } from '../types/token.js';
18
+ import { AoARIORead, AoARIOWrite, AoArNSNameData, AoArNSReservedNameDataWithName, AoDelegation, AoEpochData, AoEpochSettings, AoGateway, AoGatewayDelegateWithAddress, AoGatewayRegistrySettings, AoGatewayVault, AoPaginatedAddressParams, AoRegistrationFees, AoVaultData, AoWalletVault, DemandFactorSettings, EpochInput } from '../types/io.js';
19
+ import { mARIOToken } from '../types/token.js';
20
20
  import { AOProcess } from './contracts/ao-process.js';
21
- export declare class IO {
22
- static init(): AoIORead;
21
+ export declare class ARIO {
22
+ static init(): AoARIORead;
23
23
  static init({ process }: {
24
24
  process: AOProcess;
25
- }): AoIORead;
25
+ }): AoARIORead;
26
26
  static init({ process, signer, }: WithSigner<{
27
27
  process: AOProcess;
28
- }>): AoIOWrite;
28
+ }>): AoARIOWrite;
29
29
  static init({ processId, signer, }: WithSigner<{
30
30
  processId: string;
31
- }>): AoIOWrite;
31
+ }>): AoARIOWrite;
32
32
  static init({ processId, signer, }: {
33
33
  signer?: ContractSigner | undefined;
34
34
  processId: string;
35
35
  }): any;
36
36
  static init({ processId }: {
37
37
  processId: string;
38
- }): AoIORead;
38
+ }): AoARIORead;
39
39
  }
40
- export declare class IOReadable implements AoIORead {
40
+ export declare class ARIOReadable implements AoARIORead {
41
41
  protected process: AOProcess;
42
42
  private arweave;
43
43
  constructor(config?: ProcessConfiguration, arweave?: Arweave);
@@ -143,7 +143,7 @@ export declare class IOReadable implements AoIORead {
143
143
  }): Promise<AoRedelegationFeeInfo>;
144
144
  getGatewayRegistrySettings(): Promise<AoGatewayRegistrySettings>;
145
145
  }
146
- export declare class IOWriteable extends IOReadable implements AoIOWrite {
146
+ export declare class ARIOWriteable extends ARIOReadable implements AoARIOWrite {
147
147
  protected process: AOProcess;
148
148
  private signer;
149
149
  constructor({ signer, ...config }: WithSigner<{
@@ -153,18 +153,18 @@ export declare class IOWriteable extends IOReadable implements AoIOWrite {
153
153
  }>);
154
154
  transfer({ target, qty, }: {
155
155
  target: string;
156
- qty: number | mIOToken;
156
+ qty: number | mARIOToken;
157
157
  }, options?: WriteOptions): Promise<AoMessageResult>;
158
158
  joinNetwork({ operatorStake, allowDelegatedStaking, allowedDelegates, delegateRewardShareRatio, fqdn, label, minDelegatedStake, note, port, properties, protocol, autoStake, observerAddress, }: AoJoinNetworkParams, options?: WriteOptions): Promise<AoMessageResult>;
159
159
  leaveNetwork(options?: WriteOptions): Promise<AoMessageResult>;
160
160
  updateGatewaySettings({ allowDelegatedStaking, allowedDelegates, delegateRewardShareRatio, fqdn, label, minDelegatedStake, note, port, properties, protocol, autoStake, observerAddress, }: AoUpdateGatewaySettingsParams, options?: WriteOptions): Promise<AoMessageResult>;
161
161
  delegateStake(params: {
162
162
  target: string;
163
- stakeQty: number | mIOToken;
163
+ stakeQty: number | mARIOToken;
164
164
  }, options?: WriteOptions): Promise<AoMessageResult>;
165
165
  decreaseDelegateStake(params: {
166
166
  target: string;
167
- decreaseQty: number | mIOToken;
167
+ decreaseQty: number | mARIOToken;
168
168
  instant?: boolean;
169
169
  }, options?: WriteOptions): Promise<AoMessageResult>;
170
170
  /**
@@ -180,10 +180,10 @@ export declare class IOWriteable extends IOReadable implements AoIOWrite {
180
180
  vaultId: string;
181
181
  }, options?: WriteOptions): Promise<AoMessageResult>;
182
182
  increaseOperatorStake(params: {
183
- increaseQty: number | mIOToken;
183
+ increaseQty: number | mARIOToken;
184
184
  }, options?: WriteOptions): Promise<AoMessageResult>;
185
185
  decreaseOperatorStake(params: {
186
- decreaseQty: number | mIOToken;
186
+ decreaseQty: number | mARIOToken;
187
187
  instant?: boolean;
188
188
  }, options?: WriteOptions): Promise<AoMessageResult>;
189
189
  saveObservations(params: {
@@ -254,7 +254,7 @@ export declare class IOWriteable extends IOReadable implements AoIOWrite {
254
254
  redelegateStake(params: {
255
255
  target: string;
256
256
  source: string;
257
- stakeQty: number | mIOToken;
257
+ stakeQty: number | mARIOToken;
258
258
  vaultId?: string;
259
259
  }, options?: WriteOptions): Promise<AoMessageResult>;
260
260
  }
@@ -19,11 +19,11 @@ export declare const FQDN_REGEX: RegExp;
19
19
  export declare const SORT_KEY_REGEX: RegExp;
20
20
  export declare const ARNS_TESTNET_REGISTRY_TX: string;
21
21
  export declare const ARNS_DEVNET_REGISTRY_TX = "_NctcA2sRy1-J4OmIQZbYFPM17piNcbdBPH2ncX2RL8";
22
- export declare const IO_DEVNET_PROCESS_ID = "GaQrvEMKBpkjofgnBi_B3IgIDmY_XYelVLB6GcRGrHc";
23
- export declare const ioDevnetProcessId = "GaQrvEMKBpkjofgnBi_B3IgIDmY_XYelVLB6GcRGrHc";
24
- export declare const IO_TESTNET_PROCESS_ID = "agYcCFJtrMG6cqMuZfskIkFTGvUPddICmtQSBIoPdiA";
22
+ export declare const ARIO_DEVNET_PROCESS_ID = "GaQrvEMKBpkjofgnBi_B3IgIDmY_XYelVLB6GcRGrHc";
23
+ export declare const arioDevnetProcessId = "GaQrvEMKBpkjofgnBi_B3IgIDmY_XYelVLB6GcRGrHc";
24
+ export declare const ARIO_TESTNET_PROCESS_ID = "agYcCFJtrMG6cqMuZfskIkFTGvUPddICmtQSBIoPdiA";
25
25
  export declare const ANT_REGISTRY_ID = "i_le_yKKPVstLTDSmkHRqf-wYphMnwB9OhleiTgMkWc";
26
- export declare const MIO_PER_IO = 1000000;
26
+ export declare const MARIO_PER_ARIO = 1000000;
27
27
  export declare const AOS_MODULE_ID = "cbn0KKrBZH7hdNkNokuXLtGryrWM--PjSTBqIzw9Kkk";
28
28
  export declare const ANT_LUA_ID = "16_FyX-V2QU0RPSh1GIaEETSaUjNb0oVjCFpVbAfQq4";
29
29
  export declare const DEFAULT_SCHEDULER_ID = "_GQ33BkPtZrqxA84vM8Zk-N2aO0toNNu_C-l-rawrBA";
@@ -210,22 +210,22 @@ export interface AoANTWrite extends AoANTRead {
210
210
  setLogo({ txId }: {
211
211
  txId: string;
212
212
  }, options?: WriteOptions): Promise<AoMessageResult>;
213
- releaseName({ name, ioProcessId }: {
213
+ releaseName({ name, arioProcessId }: {
214
214
  name: string;
215
- ioProcessId: string;
215
+ arioProcessId: string;
216
216
  }, options?: WriteOptions): Promise<AoMessageResult>;
217
- reassignName({ name, ioProcessId, antProcessId, }: {
217
+ reassignName({ name, arioProcessId, antProcessId, }: {
218
218
  name: string;
219
- ioProcessId: string;
219
+ arioProcessId: string;
220
220
  antProcessId: string;
221
221
  }, options?: WriteOptions): Promise<AoMessageResult>;
222
- approvePrimaryNameRequest({ name, address, ioProcessId, }: {
222
+ approvePrimaryNameRequest({ name, address, arioProcessId, }: {
223
223
  name: string;
224
224
  address: WalletAddress;
225
- ioProcessId: string;
225
+ arioProcessId: string;
226
226
  }, options?: WriteOptions): Promise<AoMessageResult>;
227
- removePrimaryNames({ names, ioProcessId }: {
227
+ removePrimaryNames({ names, arioProcessId }: {
228
228
  names: string[];
229
- ioProcessId: string;
229
+ arioProcessId: string;
230
230
  }, options?: WriteOptions): Promise<AoMessageResult>;
231
231
  }
@@ -15,7 +15,7 @@
15
15
  */
16
16
  import { AOProcess } from '../common/index.js';
17
17
  import { AoMessageResult, AoPrimaryName, AoPrimaryNameRequest, AoRedelegationFeeInfo, AtLeastOne, BlockHeight, ProcessId, Timestamp, TransactionId, WalletAddress, WriteOptions } from './index.js';
18
- import { mIOToken } from './token.js';
18
+ import { mARIOToken } from './token.js';
19
19
  export type PaginationParams<T = Record<string, never>> = {
20
20
  cursor?: string;
21
21
  limit?: number;
@@ -243,13 +243,13 @@ export type AoBalanceParams = AoAddressParams;
243
243
  export type AoPaginatedAddressParams = PaginationParams & AoAddressParams;
244
244
  export type AoDelegateStakeParams = {
245
245
  target: WalletAddress;
246
- stakeQty: number | mIOToken;
246
+ stakeQty: number | mARIOToken;
247
247
  };
248
248
  export type AoGetArNSRecordsParams = PaginationParams<AoArNSNameDataWithName>;
249
249
  export type AoRedelegateStakeParams = {
250
250
  target: string;
251
251
  source: string;
252
- stakeQty: number | mIOToken;
252
+ stakeQty: number | mARIOToken;
253
253
  vaultId?: string;
254
254
  };
255
255
  export declare const validIntents: string[];
@@ -308,7 +308,7 @@ export type DemandFactorSettings = {
308
308
  stepDownThreshold: number;
309
309
  criteria: string;
310
310
  };
311
- export interface AoIORead {
311
+ export interface AoARIORead {
312
312
  getInfo(): Promise<{
313
313
  Ticker: string;
314
314
  Name: string;
@@ -373,7 +373,7 @@ export interface AoIORead {
373
373
  }): Promise<AoRedelegationFeeInfo>;
374
374
  getGatewayRegistrySettings(): Promise<AoGatewayRegistrySettings>;
375
375
  }
376
- export interface AoIOWrite extends AoIORead {
376
+ export interface AoARIOWrite extends AoARIORead {
377
377
  transfer({ target, qty, }: {
378
378
  target: WalletAddress;
379
379
  qty: number;
@@ -382,19 +382,19 @@ export interface AoIOWrite extends AoIORead {
382
382
  leaveNetwork(options?: WriteOptions): Promise<AoMessageResult>;
383
383
  updateGatewaySettings(params: AoUpdateGatewaySettingsParams, options?: WriteOptions): Promise<AoMessageResult>;
384
384
  increaseOperatorStake(params: {
385
- increaseQty: number | mIOToken;
385
+ increaseQty: number | mARIOToken;
386
386
  }, options?: WriteOptions): Promise<AoMessageResult>;
387
387
  decreaseOperatorStake(params: {
388
- decreaseQty: number | mIOToken;
388
+ decreaseQty: number | mARIOToken;
389
389
  instant?: boolean;
390
390
  }, options?: WriteOptions): Promise<AoMessageResult>;
391
391
  delegateStake(params: {
392
392
  target: WalletAddress;
393
- stakeQty: number | mIOToken;
393
+ stakeQty: number | mARIOToken;
394
394
  }, options?: WriteOptions): Promise<AoMessageResult>;
395
395
  decreaseDelegateStake(params: {
396
396
  target: WalletAddress;
397
- decreaseQty: number | mIOToken;
397
+ decreaseQty: number | mARIOToken;
398
398
  instant?: boolean;
399
399
  }, options?: WriteOptions): Promise<AoMessageResult>;
400
400
  instantWithdrawal(params: {
@@ -17,20 +17,20 @@ declare class PositiveFiniteInteger implements Equatable<PositiveFiniteInteger>
17
17
  toJSON(): number;
18
18
  equals(other: PositiveFiniteInteger): boolean;
19
19
  }
20
- export declare class IOToken {
20
+ export declare class ARIOToken {
21
21
  protected value: number;
22
22
  constructor(value: number);
23
23
  valueOf(): number;
24
- toMIO(): mIOToken;
24
+ toMARIO(): mARIOToken;
25
25
  toString(): string;
26
26
  }
27
- export declare class mIOToken extends PositiveFiniteInteger {
27
+ export declare class mARIOToken extends PositiveFiniteInteger {
28
28
  constructor(value: number);
29
- multiply(multiplier: mIOToken | number): mIOToken;
30
- divide(divisor: mIOToken | number): mIOToken;
31
- plus(addend: mIOToken): mIOToken;
32
- minus(subtractHend: mIOToken): mIOToken;
33
- toIO(): IOToken;
29
+ multiply(multiplier: mARIOToken | number): mARIOToken;
30
+ divide(divisor: mARIOToken | number): mARIOToken;
31
+ plus(addend: mARIOToken): mARIOToken;
32
+ minus(subtractHend: mARIOToken): mARIOToken;
33
+ toARIO(): ARIOToken;
34
34
  }
35
35
  export type AoSigner = (args: {
36
36
  data: string | Buffer;
@@ -16,7 +16,7 @@
16
16
  import { EventEmitter } from 'eventemitter3';
17
17
  import { ILogger } from '../common/logger.js';
18
18
  import { AoANTRegistryRead } from '../types/ant-registry.js';
19
- import { AoArNSNameData, AoIORead, ProcessId, WalletAddress } from '../types/index.js';
19
+ import { AoARIORead, AoArNSNameData, ProcessId, WalletAddress } from '../types/index.js';
20
20
  /**
21
21
  * @beta This API is in beta and may change in the future.
22
22
  */
@@ -25,13 +25,13 @@ export declare const getANTProcessesOwnedByWallet: ({ address, registry, }: {
25
25
  registry?: AoANTRegistryRead;
26
26
  }) => Promise<ProcessId[]>;
27
27
  export declare class ArNSEventEmitter extends EventEmitter {
28
- protected contract: AoIORead;
28
+ protected contract: AoARIORead;
29
29
  private timeoutMs;
30
30
  private throttle;
31
31
  private logger;
32
32
  private strict;
33
33
  constructor({ contract, timeoutMs, concurrency, logger, strict, }?: {
34
- contract?: AoIORead;
34
+ contract?: AoARIORead;
35
35
  timeoutMs?: number;
36
36
  concurrency?: number;
37
37
  logger?: ILogger;
@@ -44,7 +44,7 @@ export declare class ArNSEventEmitter extends EventEmitter {
44
44
  }): Promise<void>;
45
45
  }
46
46
  export declare const fetchAllArNSRecords: ({ contract, emitter, logger, pageSize, }: {
47
- contract?: AoIORead;
47
+ contract?: AoARIORead;
48
48
  emitter?: EventEmitter;
49
49
  logger?: ILogger;
50
50
  pageSize?: number;
@@ -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.7.0-alpha.6";
16
+ export declare const version = "3.0.0-alpha.1";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ar.io/sdk",
3
- "version": "2.7.0-alpha.7",
3
+ "version": "3.0.0",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/ar-io/ar-io-sdk.git"