@ar.io/sdk 3.23.0-alpha.1 → 3.23.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.
@@ -52,6 +52,22 @@ exports.fundFromFromOptions = fundFromFromOptions;
52
52
  exports.referrerFromOptions = referrerFromOptions;
53
53
  exports.assertLockLengthInRange = assertLockLengthInRange;
54
54
  exports.antRecordMetadataFromOptions = antRecordMetadataFromOptions;
55
+ /**
56
+ * Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
57
+ *
58
+ * Licensed under the Apache License, Version 2.0 (the "License");
59
+ * you may not use this file except in compliance with the License.
60
+ * You may obtain a copy of the License at
61
+ *
62
+ * http://www.apache.org/licenses/LICENSE-2.0
63
+ *
64
+ * Unless required by applicable law or agreed to in writing, software
65
+ * distributed under the License is distributed on an "AS IS" BASIS,
66
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
67
+ * See the License for the specific language governing permissions and
68
+ * limitations under the License.
69
+ */
70
+ const fs_1 = require("fs");
55
71
  /**
56
72
  * Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
57
73
  *
@@ -70,7 +86,6 @@ exports.antRecordMetadataFromOptions = antRecordMetadataFromOptions;
70
86
  const arbundles_1 = require("@dha-team/arbundles");
71
87
  const aoconnect_1 = require("@permaweb/aoconnect");
72
88
  const commander_1 = require("commander");
73
- const fs_1 = require("fs");
74
89
  const prompts_1 = __importDefault(require("prompts"));
75
90
  const index_js_1 = require("../node/index.js");
76
91
  const options_js_1 = require("./options.js");
@@ -112,7 +112,7 @@ class AoANTRegistryReadable {
112
112
  Controlled: json.Controlled,
113
113
  };
114
114
  }
115
- catch (error) {
115
+ catch (_error) {
116
116
  retries++;
117
117
  this.logger.debug('Failed to fetch ant registry acl for address from hyperbeam', address, retries);
118
118
  await new Promise((resolve) => setTimeout(resolve, 1000 * retries ** 2));
@@ -25,7 +25,7 @@ class WinstonLogger {
25
25
  // eslint-disable-next-line @typescript-eslint/no-var-requires
26
26
  this.winston = require('winston');
27
27
  }
28
- catch (error) {
28
+ catch (_error) {
29
29
  throw new Error('Winston is not installed. Install it with: npm install winston');
30
30
  }
31
31
  this.logger = this.winston.createLogger({
@@ -397,6 +397,7 @@ function parseAoEpochData(value) {
397
397
  prescribedNames: zod_1.z.array(zod_1.z.string()),
398
398
  observations: zod_1.z.any(),
399
399
  epochIndex: zod_1.z.number(),
400
+ arnsStats: zod_1.z.any(),
400
401
  });
401
402
  return epochDataSchema.parse(value);
402
403
  }
@@ -20,7 +20,7 @@ function safeDecode(data) {
20
20
  try {
21
21
  return JSON.parse(data);
22
22
  }
23
- catch (e) {
23
+ catch (_e) {
24
24
  return data;
25
25
  }
26
26
  }
@@ -85,7 +85,7 @@ class ArNSEventEmitter extends eventemitter3_1.EventEmitter {
85
85
  .then((records) => {
86
86
  Object.entries(records).forEach(([name, arnsRecord]) => {
87
87
  if (antIds.has(arnsRecord.processId)) {
88
- if (uniqueContractProcessIds[arnsRecord.processId] == undefined) {
88
+ if (uniqueContractProcessIds[arnsRecord.processId] === undefined) {
89
89
  uniqueContractProcessIds[arnsRecord.processId] = {
90
90
  state: undefined,
91
91
  names: {},
@@ -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 = '3.23.0-alpha.1';
20
+ exports.version = '3.23.0-alpha.2';
@@ -1,3 +1,19 @@
1
+ /**
2
+ * Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
3
+ *
4
+ * Licensed under the Apache License, Version 2.0 (the "License");
5
+ * you may not use this file except in compliance with the License.
6
+ * You may obtain a copy of the License at
7
+ *
8
+ * http://www.apache.org/licenses/LICENSE-2.0
9
+ *
10
+ * Unless required by applicable law or agreed to in writing, software
11
+ * distributed under the License is distributed on an "AS IS" BASIS,
12
+ * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
13
+ * See the License for the specific language governing permissions and
14
+ * limitations under the License.
15
+ */
16
+ import { readFileSync } from 'fs';
1
17
  /**
2
18
  * Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
3
19
  *
@@ -16,7 +32,6 @@
16
32
  import { EthereumSigner } from '@dha-team/arbundles';
17
33
  import { connect } from '@permaweb/aoconnect';
18
34
  import { program } from 'commander';
19
- import { readFileSync } from 'fs';
20
35
  import prompts from 'prompts';
21
36
  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
37
  import { globalOptions } from './options.js';
@@ -108,7 +108,7 @@ export class AoANTRegistryReadable {
108
108
  Controlled: json.Controlled,
109
109
  };
110
110
  }
111
- catch (error) {
111
+ catch (_error) {
112
112
  retries++;
113
113
  this.logger.debug('Failed to fetch ant registry acl for address from hyperbeam', address, retries);
114
114
  await new Promise((resolve) => setTimeout(resolve, 1000 * retries ** 2));
@@ -22,7 +22,7 @@ export class WinstonLogger {
22
22
  // eslint-disable-next-line @typescript-eslint/no-var-requires
23
23
  this.winston = require('winston');
24
24
  }
25
- catch (error) {
25
+ catch (_error) {
26
26
  throw new Error('Winston is not installed. Install it with: npm install winston');
27
27
  }
28
28
  this.logger = this.winston.createLogger({
@@ -385,6 +385,7 @@ export function parseAoEpochData(value) {
385
385
  prescribedNames: z.array(z.string()),
386
386
  observations: z.any(),
387
387
  epochIndex: z.number(),
388
+ arnsStats: z.any(),
388
389
  });
389
390
  return epochDataSchema.parse(value);
390
391
  }
@@ -17,7 +17,7 @@ export function safeDecode(data) {
17
17
  try {
18
18
  return JSON.parse(data);
19
19
  }
20
- catch (e) {
20
+ catch (_e) {
21
21
  return data;
22
22
  }
23
23
  }
@@ -81,7 +81,7 @@ export class ArNSEventEmitter extends EventEmitter {
81
81
  .then((records) => {
82
82
  Object.entries(records).forEach(([name, arnsRecord]) => {
83
83
  if (antIds.has(arnsRecord.processId)) {
84
- if (uniqueContractProcessIds[arnsRecord.processId] == undefined) {
84
+ if (uniqueContractProcessIds[arnsRecord.processId] === undefined) {
85
85
  uniqueContractProcessIds[arnsRecord.processId] = {
86
86
  state: undefined,
87
87
  names: {},
@@ -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.23.0-alpha.1';
17
+ export const version = '3.23.0-alpha.2';
@@ -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 = "3.22.1";
16
+ export declare const version = "3.23.0-alpha.1";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ar.io/sdk",
3
- "version": "3.23.0-alpha.1",
3
+ "version": "3.23.0-alpha.2",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/ar-io/ar-io-sdk.git"
@@ -13,12 +13,7 @@
13
13
  "node": ">=18"
14
14
  },
15
15
  "license": "Apache-2.0",
16
- "files": [
17
- "lib",
18
- "LICENSE",
19
- "README.md",
20
- "package.json"
21
- ],
16
+ "files": ["lib", "LICENSE", "README.md", "package.json"],
22
17
  "publishConfig": {
23
18
  "access": "public"
24
19
  },
@@ -27,13 +22,7 @@
27
22
  "email": "info@ar.io",
28
23
  "website": "https://ar.io"
29
24
  },
30
- "keywords": [
31
- "arweave",
32
- "ar",
33
- "blockchain",
34
- "ar.io",
35
- "ao"
36
- ],
25
+ "keywords": ["arweave", "ar", "blockchain", "ar.io", "ao"],
37
26
  "exports": {
38
27
  ".": {
39
28
  "types": "./lib/types/node/index.d.ts",
@@ -60,10 +49,10 @@
60
49
  "build:cjs": "yarn tsc -p tsconfig.cjs.json && echo \"{\\\"type\\\": \\\"commonjs\\\"}\" > lib/cjs/package.json",
61
50
  "build": "yarn clean && yarn build:web && yarn build:esm && yarn build:cjs",
62
51
  "clean": "rimraf [ lib bundles coverage tests/contracts tests/wallets ]",
63
- "lint": "eslint src",
64
- "lint:fix": "eslint src --fix",
65
- "format": "prettier --check .",
66
- "format:fix": "prettier --write . && yarn docs:update",
52
+ "lint:fix": "biome check --write --unsafe",
53
+ "lint:check": "biome check --unsafe",
54
+ "format:fix": "biome format --write",
55
+ "format:check": "biome format",
67
56
  "test": "yarn test:unit && yarn test:e2e",
68
57
  "test:cjs": "yarn build:cjs && yarn link && cd ./tests/e2e/cjs && yarn && yarn test",
69
58
  "test:esm": "yarn build:esm && yarn link && cd ./tests/e2e/esm && yarn && yarn test",
@@ -81,6 +70,7 @@
81
70
  "cli:local": "node lib/esm/cli/cli.js"
82
71
  },
83
72
  "devDependencies": {
73
+ "@biomejs/biome": "1.9.4",
84
74
  "@commitlint/cli": "^17.1.2",
85
75
  "@commitlint/config-conventional": "^17.1.0",
86
76
  "@esbuild-plugins/node-modules-polyfill": "^0.2.2",
@@ -134,11 +124,7 @@
134
124
  "prompts": "^2.4.2"
135
125
  },
136
126
  "lint-staged": {
137
- "**/*.{ts,js,mjs,cjs,md,json}": [
138
- "prettier --write ."
139
- ],
140
- "**/README.md": [
141
- "markdown-toc-gen insert --max-depth 2"
142
- ]
127
+ "**/*.{ts,js,mjs,cjs,md,json}": ["biome format --write"],
128
+ "**/README.md": ["markdown-toc-gen insert --max-depth 2"]
143
129
  }
144
130
  }