@ar.io/sdk 3.3.0-alpha.1 → 3.3.0-alpha.3

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.
@@ -1,29 +1,11 @@
1
1
  "use strict";
2
- var __importDefault = (this && this.__importDefault) || function (mod) {
3
- return (mod && mod.__esModule) ? mod : { "default": mod };
4
- };
5
2
  Object.defineProperty(exports, "__esModule", { value: true });
6
3
  exports.ARIOWriteable = exports.ARIOReadable = exports.ARIO = void 0;
7
- /**
8
- * Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
9
- *
10
- * Licensed under the Apache License, Version 2.0 (the "License");
11
- * you may not use this file except in compliance with the License.
12
- * You may obtain a copy of the License at
13
- *
14
- * http://www.apache.org/licenses/LICENSE-2.0
15
- *
16
- * Unless required by applicable law or agreed to in writing, software
17
- * distributed under the License is distributed on an "AS IS" BASIS,
18
- * WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
19
- * See the License for the specific language governing permissions and
20
- * limitations under the License.
21
- */
22
- const arweave_1 = __importDefault(require("arweave"));
23
4
  const constants_js_1 = require("../constants.js");
24
5
  const io_js_1 = require("../types/io.js");
25
6
  const ao_js_1 = require("../utils/ao.js");
26
7
  const arweave_js_1 = require("../utils/arweave.js");
8
+ const arweave_js_2 = require("./arweave.js");
27
9
  const ao_process_js_1 = require("./contracts/ao-process.js");
28
10
  const error_js_1 = require("./error.js");
29
11
  class ARIO {
@@ -47,11 +29,7 @@ class ARIOReadable {
47
29
  process;
48
30
  epochSettings;
49
31
  arweave;
50
- constructor({ arweave = arweave_1.default.init({
51
- host: 'arweave.net',
52
- port: 443,
53
- protocol: 'https',
54
- }), ...config }) {
32
+ constructor({ arweave = arweave_js_2.defaultArweave, ...config }) {
55
33
  if (config === undefined) {
56
34
  this.process = new ao_process_js_1.AOProcess({
57
35
  processId: constants_js_1.ARIO_TESTNET_PROCESS_ID,
@@ -29,6 +29,6 @@ exports.arioDevnetProcessId = exports.ARIO_DEVNET_PROCESS_ID;
29
29
  exports.ARIO_TESTNET_PROCESS_ID = 'agYcCFJtrMG6cqMuZfskIkFTGvUPddICmtQSBIoPdiA';
30
30
  exports.ANT_REGISTRY_ID = 'i_le_yKKPVstLTDSmkHRqf-wYphMnwB9OhleiTgMkWc';
31
31
  exports.MARIO_PER_ARIO = 1_000_000;
32
- exports.AOS_MODULE_ID = 'tyojTpJ9fIva_7BjTA9ruGM4uk2vyTfhVUulnbVxR8I';
33
- exports.ANT_LUA_ID = '16_FyX-V2QU0RPSh1GIaEETSaUjNb0oVjCFpVbAfQq4';
32
+ exports.AOS_MODULE_ID = 'EHu5-WHKqYTAMHbMAxXtJ3i8C4pYzRjknpzFM6fnIRw';
33
+ exports.ANT_LUA_ID = 'k9tQkbnFYZOGp6ist1yFuaqk_wOkzM5KUSNDtWzCLtg';
34
34
  exports.DEFAULT_SCHEDULER_ID = '_GQ33BkPtZrqxA84vM8Zk-N2aO0toNNu_C-l-rawrBA';
@@ -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.3.0-alpha.1';
20
+ exports.version = '3.3.0-alpha.3';
@@ -1,23 +1,8 @@
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 Arweave from 'arweave';
17
1
  import { ARIO_TESTNET_PROCESS_ID } from '../constants.js';
18
2
  import { isProcessConfiguration, isProcessIdConfiguration, } from '../types/io.js';
19
3
  import { createAoSigner } from '../utils/ao.js';
20
4
  import { getEpochDataFromGql, paginationParamsToTags, pruneTags, } from '../utils/arweave.js';
5
+ import { defaultArweave } from './arweave.js';
21
6
  import { AOProcess } from './contracts/ao-process.js';
22
7
  import { InvalidContractConfigurationError } from './error.js';
23
8
  export class ARIO {
@@ -40,11 +25,7 @@ export class ARIOReadable {
40
25
  process;
41
26
  epochSettings;
42
27
  arweave;
43
- constructor({ arweave = Arweave.init({
44
- host: 'arweave.net',
45
- port: 443,
46
- protocol: 'https',
47
- }), ...config }) {
28
+ constructor({ arweave = defaultArweave, ...config }) {
48
29
  if (config === undefined) {
49
30
  this.process = new AOProcess({
50
31
  processId: ARIO_TESTNET_PROCESS_ID,
@@ -26,6 +26,6 @@ export const arioDevnetProcessId = ARIO_DEVNET_PROCESS_ID;
26
26
  export const ARIO_TESTNET_PROCESS_ID = 'agYcCFJtrMG6cqMuZfskIkFTGvUPddICmtQSBIoPdiA';
27
27
  export const ANT_REGISTRY_ID = 'i_le_yKKPVstLTDSmkHRqf-wYphMnwB9OhleiTgMkWc';
28
28
  export const MARIO_PER_ARIO = 1_000_000;
29
- export const AOS_MODULE_ID = 'tyojTpJ9fIva_7BjTA9ruGM4uk2vyTfhVUulnbVxR8I';
30
- export const ANT_LUA_ID = '16_FyX-V2QU0RPSh1GIaEETSaUjNb0oVjCFpVbAfQq4';
29
+ export const AOS_MODULE_ID = 'EHu5-WHKqYTAMHbMAxXtJ3i8C4pYzRjknpzFM6fnIRw';
30
+ export const ANT_LUA_ID = 'k9tQkbnFYZOGp6ist1yFuaqk_wOkzM5KUSNDtWzCLtg';
31
31
  export const DEFAULT_SCHEDULER_ID = '_GQ33BkPtZrqxA84vM8Zk-N2aO0toNNu_C-l-rawrBA';
@@ -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.3.0-alpha.1';
17
+ export const version = '3.3.0-alpha.3';
@@ -24,6 +24,6 @@ export declare const arioDevnetProcessId = "GaQrvEMKBpkjofgnBi_B3IgIDmY_XYelVLB6
24
24
  export declare const ARIO_TESTNET_PROCESS_ID = "agYcCFJtrMG6cqMuZfskIkFTGvUPddICmtQSBIoPdiA";
25
25
  export declare const ANT_REGISTRY_ID = "i_le_yKKPVstLTDSmkHRqf-wYphMnwB9OhleiTgMkWc";
26
26
  export declare const MARIO_PER_ARIO = 1000000;
27
- export declare const AOS_MODULE_ID = "tyojTpJ9fIva_7BjTA9ruGM4uk2vyTfhVUulnbVxR8I";
28
- export declare const ANT_LUA_ID = "16_FyX-V2QU0RPSh1GIaEETSaUjNb0oVjCFpVbAfQq4";
27
+ export declare const AOS_MODULE_ID = "EHu5-WHKqYTAMHbMAxXtJ3i8C4pYzRjknpzFM6fnIRw";
28
+ export declare const ANT_LUA_ID = "k9tQkbnFYZOGp6ist1yFuaqk_wOkzM5KUSNDtWzCLtg";
29
29
  export declare const DEFAULT_SCHEDULER_ID = "_GQ33BkPtZrqxA84vM8Zk-N2aO0toNNu_C-l-rawrBA";
@@ -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.2.0";
16
+ export declare const version = "3.3.0-alpha.2";
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ar.io/sdk",
3
- "version": "3.3.0-alpha.1",
3
+ "version": "3.3.0-alpha.3",
4
4
  "repository": {
5
5
  "type": "git",
6
6
  "url": "git+https://github.com/ar-io/ar-io-sdk.git"