@ar.io/sdk 3.3.0-alpha.1 → 3.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.
- package/bundles/web.bundle.min.js +89 -90
- package/lib/cjs/common/io.js +2 -24
- package/lib/cjs/version.js +1 -1
- package/lib/esm/common/io.js +2 -21
- package/lib/esm/version.js +1 -1
- 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/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/version.js
CHANGED
package/lib/types/version.d.ts
CHANGED