@ar.io/sdk 2.0.0-alpha.6 → 2.0.0-alpha.7
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 +92 -93
- package/lib/cjs/common/io.js +2 -21
- package/lib/cjs/version.js +1 -1
- package/lib/esm/common/io.js +2 -18
- 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,28 +1,9 @@
|
|
|
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.IOWriteable = exports.IOReadable = exports.IO = void 0;
|
|
7
|
-
/**
|
|
8
|
-
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc. All Rights Reserved.
|
|
9
|
-
*
|
|
10
|
-
* This program is free software: you can redistribute it and/or modify
|
|
11
|
-
* it under the terms of the GNU Affero General Public License as published by
|
|
12
|
-
* the Free Software Foundation, either version 3 of the License, or
|
|
13
|
-
* (at your option) any later version.
|
|
14
|
-
*
|
|
15
|
-
* This program is distributed in the hope that it will be useful,
|
|
16
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
17
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
18
|
-
* GNU Affero General Public License for more details.
|
|
19
|
-
*
|
|
20
|
-
* You should have received a copy of the GNU Affero General Public License
|
|
21
|
-
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
22
|
-
*/
|
|
23
|
-
const arweave_1 = __importDefault(require("arweave"));
|
|
24
4
|
const constants_js_1 = require("../constants.js");
|
|
25
5
|
const io_js_1 = require("../io.js");
|
|
6
|
+
const arweave_js_1 = require("./arweave.js");
|
|
26
7
|
const ao_process_js_1 = require("./contracts/ao-process.js");
|
|
27
8
|
const error_js_1 = require("./error.js");
|
|
28
9
|
class IO {
|
|
@@ -41,7 +22,7 @@ exports.IO = IO;
|
|
|
41
22
|
class IOReadable {
|
|
42
23
|
process;
|
|
43
24
|
arweave;
|
|
44
|
-
constructor(config, arweave =
|
|
25
|
+
constructor(config, arweave = arweave_js_1.defaultArweave) {
|
|
45
26
|
if (!config) {
|
|
46
27
|
this.process = new ao_process_js_1.AOProcess({
|
|
47
28
|
processId: constants_js_1.IO_TESTNET_PROCESS_ID,
|
package/lib/cjs/version.js
CHANGED
package/lib/esm/common/io.js
CHANGED
|
@@ -1,22 +1,6 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc. All Rights Reserved.
|
|
3
|
-
*
|
|
4
|
-
* This program is free software: you can redistribute it and/or modify
|
|
5
|
-
* it under the terms of the GNU Affero General Public License as published by
|
|
6
|
-
* the Free Software Foundation, either version 3 of the License, or
|
|
7
|
-
* (at your option) any later version.
|
|
8
|
-
*
|
|
9
|
-
* This program is distributed in the hope that it will be useful,
|
|
10
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
11
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
12
|
-
* GNU Affero General Public License for more details.
|
|
13
|
-
*
|
|
14
|
-
* You should have received a copy of the GNU Affero General Public License
|
|
15
|
-
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
16
|
-
*/
|
|
17
|
-
import Arweave from 'arweave';
|
|
18
1
|
import { IO_TESTNET_PROCESS_ID } from '../constants.js';
|
|
19
2
|
import { isProcessConfiguration, isProcessIdConfiguration, } from '../io.js';
|
|
3
|
+
import { defaultArweave } from './arweave.js';
|
|
20
4
|
import { AOProcess } from './contracts/ao-process.js';
|
|
21
5
|
import { InvalidContractConfigurationError } from './error.js';
|
|
22
6
|
export class IO {
|
|
@@ -34,7 +18,7 @@ export class IO {
|
|
|
34
18
|
export class IOReadable {
|
|
35
19
|
process;
|
|
36
20
|
arweave;
|
|
37
|
-
constructor(config, arweave =
|
|
21
|
+
constructor(config, arweave = defaultArweave) {
|
|
38
22
|
if (!config) {
|
|
39
23
|
this.process = new AOProcess({
|
|
40
24
|
processId: IO_TESTNET_PROCESS_ID,
|
package/lib/esm/version.js
CHANGED
package/lib/types/version.d.ts
CHANGED