@ar.io/sdk 2.2.5 → 2.3.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.
@@ -336,6 +336,11 @@ class IOReadable {
336
336
  tags: prunedTags,
337
337
  });
338
338
  }
339
+ async getRegistrationFees() {
340
+ return this.process.read({
341
+ tags: [{ name: 'Action', value: 'Get-Registration-Fees' }],
342
+ });
343
+ }
339
344
  }
340
345
  exports.IOReadable = IOReadable;
341
346
  class IOWriteable extends IOReadable {
package/lib/cjs/io.js CHANGED
@@ -2,6 +2,12 @@
2
2
  Object.defineProperty(exports, "__esModule", { value: true });
3
3
  exports.isLeasedArNSRecord = exports.isProcessIdConfiguration = exports.isProcessConfiguration = void 0;
4
4
  const arweave_js_1 = require("./utils/arweave.js");
5
+ const nameLengthArray = [
6
+ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
7
+ 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
8
+ 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
9
+ ];
10
+ const leaseLengthArray = [1, 2, 3, 4, 5];
5
11
  // Typeguard functions
6
12
  function isProcessConfiguration(config) {
7
13
  return 'process' in config;
@@ -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.2.5';
20
+ exports.version = '2.3.0-alpha.2';
@@ -332,6 +332,11 @@ export class IOReadable {
332
332
  tags: prunedTags,
333
333
  });
334
334
  }
335
+ async getRegistrationFees() {
336
+ return this.process.read({
337
+ tags: [{ name: 'Action', value: 'Get-Registration-Fees' }],
338
+ });
339
+ }
335
340
  }
336
341
  export class IOWriteable extends IOReadable {
337
342
  signer;
package/lib/esm/io.js CHANGED
@@ -1,4 +1,10 @@
1
1
  import { validateArweaveId } from './utils/arweave.js';
2
+ const nameLengthArray = [
3
+ 1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22,
4
+ 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41,
5
+ 42, 43, 44, 45, 46, 47, 48, 49, 50, 51,
6
+ ];
7
+ const leaseLengthArray = [1, 2, 3, 4, 5];
2
8
  // Typeguard functions
3
9
  export function isProcessConfiguration(config) {
4
10
  return 'process' in config;
@@ -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.2.5';
17
+ export const version = '2.3.0-alpha.2';
@@ -14,7 +14,7 @@
14
14
  * limitations under the License.
15
15
  */
16
16
  import Arweave from 'arweave';
17
- import { AoArNSNameData, AoEpochData, AoEpochSettings, AoGateway, AoIORead, AoIOWrite, EpochInput } from '../io.js';
17
+ import { AoArNSNameData, AoEpochData, AoEpochSettings, AoGateway, AoIORead, AoIOWrite, AoRegistrationFees, EpochInput } from '../io.js';
18
18
  import { mIOToken } from '../token.js';
19
19
  import { AoArNSNameDataWithName, AoArNSReservedNameData, AoBalanceWithAddress, AoEpochDistributionData, AoEpochObservationData, AoGatewayWithAddress, AoJoinNetworkParams, AoMessageResult, AoUpdateGatewaySettingsParams, AoWeightedObserver, ContractSigner, PaginationParams, PaginationResult, ProcessConfiguration, TransactionId, WalletAddress, WithSigner, WriteOptions } from '../types.js';
20
20
  import { AOProcess } from './contracts/ao-process.js';
@@ -89,6 +89,7 @@ export declare class IOReadable implements AoIORead {
89
89
  quantity: number;
90
90
  name: string;
91
91
  }): Promise<number>;
92
+ getRegistrationFees(): Promise<AoRegistrationFees>;
92
93
  }
93
94
  export declare class IOWriteable extends IOReadable implements AoIOWrite {
94
95
  protected process: AOProcess;
package/lib/types/io.d.ts CHANGED
@@ -41,7 +41,12 @@ export type EpochInput = {
41
41
  timestamp: Timestamp;
42
42
  } | undefined;
43
43
  export type AoBalances = Record<WalletAddress, number>;
44
- export type AoFees = Record<string, number>;
44
+ declare const nameLengthArray: readonly [1, 2, 3, 4, 5, 6, 7, 8, 9, 10, 11, 12, 13, 14, 15, 16, 17, 18, 19, 20, 21, 22, 23, 24, 25, 26, 27, 28, 29, 30, 31, 32, 33, 34, 35, 36, 37, 38, 39, 40, 41, 42, 43, 44, 45, 46, 47, 48, 49, 50, 51];
45
+ declare const leaseLengthArray: readonly [1, 2, 3, 4, 5];
46
+ export type AoRegistrationFees = Record<(typeof nameLengthArray)[number], {
47
+ lease: Record<(typeof leaseLengthArray)[number], number>;
48
+ permabuy: number;
49
+ }>;
45
50
  export type AoObservations = Record<number, AoEpochObservationData>;
46
51
  export type AoEpochIndex = number;
47
52
  export interface AoIOState {
@@ -259,6 +264,7 @@ export interface AoIORead {
259
264
  name?: string;
260
265
  quantity?: number;
261
266
  }): Promise<number>;
267
+ getRegistrationFees(): Promise<AoRegistrationFees>;
262
268
  }
263
269
  export interface AoIOWrite extends AoIORead {
264
270
  transfer({ target, qty, }: {
@@ -368,3 +374,4 @@ export declare function isProcessIdConfiguration(config: object): config is {
368
374
  processId: string;
369
375
  };
370
376
  export declare function isLeasedArNSRecord(record: AoArNSNameData): record is AoArNSLeaseData;
377
+ export {};
@@ -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.2.4";
16
+ export declare const version = "2.3.0-alpha.1";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ar.io/sdk",
3
- "version": "2.2.5",
3
+ "version": "2.3.0-alpha.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/ar-io/ar-io-sdk.git"