@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.
- package/bundles/web.bundle.min.js +89 -90
- package/lib/cjs/common/io.js +2 -24
- package/lib/cjs/constants.js +2 -2
- package/lib/cjs/version.js +1 -1
- package/lib/esm/common/io.js +2 -21
- package/lib/esm/constants.js +2 -2
- package/lib/esm/version.js +1 -1
- package/lib/types/constants.d.ts +2 -2
- package/lib/types/version.d.ts +1 -1
- package/package.json +1 -1
package/lib/cjs/common/io.js
CHANGED
|
@@ -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 =
|
|
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,
|
package/lib/cjs/constants.js
CHANGED
|
@@ -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 = '
|
|
33
|
-
exports.ANT_LUA_ID = '
|
|
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';
|
package/lib/cjs/version.js
CHANGED
package/lib/esm/common/io.js
CHANGED
|
@@ -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 =
|
|
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,
|
package/lib/esm/constants.js
CHANGED
|
@@ -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 = '
|
|
30
|
-
export const ANT_LUA_ID = '
|
|
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';
|
package/lib/esm/version.js
CHANGED
package/lib/types/constants.d.ts
CHANGED
|
@@ -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 = "
|
|
28
|
-
export declare const ANT_LUA_ID = "
|
|
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";
|
package/lib/types/version.d.ts
CHANGED