@ar.io/sdk 2.7.0-alpha.6 → 3.0.0-alpha.1

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 (39) hide show
  1. package/README.md +155 -239
  2. package/bundles/web.bundle.min.js +74 -74
  3. package/lib/cjs/cli/cli.js +32 -38
  4. package/lib/cjs/cli/commands/gatewayWriteCommands.js +39 -39
  5. package/lib/cjs/cli/commands/readCommands.js +28 -45
  6. package/lib/cjs/cli/commands/transfer.js +7 -7
  7. package/lib/cjs/cli/options.js +4 -11
  8. package/lib/cjs/cli/utils.js +22 -22
  9. package/lib/cjs/common/ant.js +18 -14
  10. package/lib/cjs/common/io.js +15 -68
  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 +36 -42
  16. package/lib/esm/cli/commands/gatewayWriteCommands.js +41 -41
  17. package/lib/esm/cli/commands/readCommands.js +27 -43
  18. package/lib/esm/cli/commands/transfer.js +8 -8
  19. package/lib/esm/cli/options.js +3 -10
  20. package/lib/esm/cli/utils.js +18 -18
  21. package/lib/esm/common/ant.js +18 -14
  22. package/lib/esm/common/io.js +12 -65
  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/commands/readCommands.d.ts +3 -4
  28. package/lib/types/cli/options.d.ts +1 -5
  29. package/lib/types/cli/types.d.ts +2 -4
  30. package/lib/types/cli/utils.d.ts +10 -10
  31. package/lib/types/common/ant.d.ts +14 -14
  32. package/lib/types/common/io.d.ts +20 -45
  33. package/lib/types/constants.d.ts +4 -4
  34. package/lib/types/types/ant.d.ts +8 -8
  35. package/lib/types/types/io.d.ts +14 -49
  36. package/lib/types/types/token.d.ts +8 -8
  37. package/lib/types/utils/processes.d.ts +4 -4
  38. package/lib/types/version.d.ts +1 -1
  39. package/package.json +1 -1
@@ -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(io: AoARIORead, address: string, ioQuantity: 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 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.
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
  }
@@ -14,30 +14,30 @@
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';
19
- import { mIOToken } from '../types/token.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 { 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);
@@ -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>>;
@@ -161,7 +143,7 @@ export declare class IOReadable implements AoIORead {
161
143
  }): Promise<AoRedelegationFeeInfo>;
162
144
  getGatewayRegistrySettings(): Promise<AoGatewayRegistrySettings>;
163
145
  }
164
- export declare class IOWriteable extends IOReadable implements AoIOWrite {
146
+ export declare class ARIOWriteable extends ARIOReadable implements AoARIOWrite {
165
147
  protected process: AOProcess;
166
148
  private signer;
167
149
  constructor({ signer, ...config }: WithSigner<{
@@ -171,18 +153,18 @@ export declare class IOWriteable extends IOReadable implements AoIOWrite {
171
153
  }>);
172
154
  transfer({ target, qty, }: {
173
155
  target: string;
174
- qty: number | mIOToken;
156
+ qty: number | mARIOToken;
175
157
  }, options?: WriteOptions): Promise<AoMessageResult>;
176
158
  joinNetwork({ operatorStake, allowDelegatedStaking, allowedDelegates, delegateRewardShareRatio, fqdn, label, minDelegatedStake, note, port, properties, protocol, autoStake, observerAddress, }: AoJoinNetworkParams, options?: WriteOptions): Promise<AoMessageResult>;
177
159
  leaveNetwork(options?: WriteOptions): Promise<AoMessageResult>;
178
160
  updateGatewaySettings({ allowDelegatedStaking, allowedDelegates, delegateRewardShareRatio, fqdn, label, minDelegatedStake, note, port, properties, protocol, autoStake, observerAddress, }: AoUpdateGatewaySettingsParams, options?: WriteOptions): Promise<AoMessageResult>;
179
161
  delegateStake(params: {
180
162
  target: string;
181
- stakeQty: number | mIOToken;
163
+ stakeQty: number | mARIOToken;
182
164
  }, options?: WriteOptions): Promise<AoMessageResult>;
183
165
  decreaseDelegateStake(params: {
184
166
  target: string;
185
- decreaseQty: number | mIOToken;
167
+ decreaseQty: number | mARIOToken;
186
168
  instant?: boolean;
187
169
  }, options?: WriteOptions): Promise<AoMessageResult>;
188
170
  /**
@@ -198,10 +180,10 @@ export declare class IOWriteable extends IOReadable implements AoIOWrite {
198
180
  vaultId: string;
199
181
  }, options?: WriteOptions): Promise<AoMessageResult>;
200
182
  increaseOperatorStake(params: {
201
- increaseQty: number | mIOToken;
183
+ increaseQty: number | mARIOToken;
202
184
  }, options?: WriteOptions): Promise<AoMessageResult>;
203
185
  decreaseOperatorStake(params: {
204
- decreaseQty: number | mIOToken;
186
+ decreaseQty: number | mARIOToken;
205
187
  instant?: boolean;
206
188
  }, options?: WriteOptions): Promise<AoMessageResult>;
207
189
  saveObservations(params: {
@@ -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>;
@@ -279,7 +254,7 @@ export declare class IOWriteable extends IOReadable implements AoIOWrite {
279
254
  redelegateStake(params: {
280
255
  target: string;
281
256
  source: string;
282
- stakeQty: number | mIOToken;
257
+ stakeQty: number | mARIOToken;
283
258
  vaultId?: string;
284
259
  }, options?: WriteOptions): Promise<AoMessageResult>;
285
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;
@@ -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';
@@ -257,20 +243,13 @@ export type AoBalanceParams = AoAddressParams;
257
243
  export type AoPaginatedAddressParams = PaginationParams & AoAddressParams;
258
244
  export type AoDelegateStakeParams = {
259
245
  target: WalletAddress;
260
- stakeQty: number | mIOToken;
246
+ stakeQty: number | mARIOToken;
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;
273
- stakeQty: number | mIOToken;
252
+ stakeQty: number | mARIOToken;
274
253
  vaultId?: string;
275
254
  };
276
255
  export declare const validIntents: 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;
@@ -335,7 +308,7 @@ export type DemandFactorSettings = {
335
308
  stepDownThreshold: number;
336
309
  criteria: string;
337
310
  };
338
- export interface AoIORead {
311
+ export interface AoARIORead {
339
312
  getInfo(): Promise<{
340
313
  Ticker: string;
341
314
  Name: string;
@@ -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[]>;
@@ -401,7 +373,7 @@ export interface AoIORead {
401
373
  }): Promise<AoRedelegationFeeInfo>;
402
374
  getGatewayRegistrySettings(): Promise<AoGatewayRegistrySettings>;
403
375
  }
404
- export interface AoIOWrite extends AoIORead {
376
+ export interface AoARIOWrite extends AoARIORead {
405
377
  transfer({ target, qty, }: {
406
378
  target: WalletAddress;
407
379
  qty: number;
@@ -410,19 +382,19 @@ export interface AoIOWrite extends AoIORead {
410
382
  leaveNetwork(options?: WriteOptions): Promise<AoMessageResult>;
411
383
  updateGatewaySettings(params: AoUpdateGatewaySettingsParams, options?: WriteOptions): Promise<AoMessageResult>;
412
384
  increaseOperatorStake(params: {
413
- increaseQty: number | mIOToken;
385
+ increaseQty: number | mARIOToken;
414
386
  }, options?: WriteOptions): Promise<AoMessageResult>;
415
387
  decreaseOperatorStake(params: {
416
- decreaseQty: number | mIOToken;
388
+ decreaseQty: number | mARIOToken;
417
389
  instant?: boolean;
418
390
  }, options?: WriteOptions): Promise<AoMessageResult>;
419
391
  delegateStake(params: {
420
392
  target: WalletAddress;
421
- stakeQty: number | mIOToken;
393
+ stakeQty: number | mARIOToken;
422
394
  }, options?: WriteOptions): Promise<AoMessageResult>;
423
395
  decreaseDelegateStake(params: {
424
396
  target: WalletAddress;
425
- decreaseQty: number | mIOToken;
397
+ decreaseQty: number | mARIOToken;
426
398
  instant?: boolean;
427
399
  }, options?: WriteOptions): Promise<AoMessageResult>;
428
400
  instantWithdrawal(params: {
@@ -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>;
@@ -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.5";
16
+ export declare const version = "2.7.0-alpha.7";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ar.io/sdk",
3
- "version": "2.7.0-alpha.6",
3
+ "version": "3.0.0-alpha.1",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/ar-io/ar-io-sdk.git"