@ardrive/turbo-sdk 1.17.0-alpha.2 → 1.18.0-alpha.1
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/LICENSE.md +201 -661
- package/README.md +2 -0
- package/bundles/web.bundle.min.js +62 -62
- package/lib/cjs/cli/commands/balance.js +10 -11
- package/lib/cjs/cli/commands/cryptoFund.js +10 -11
- package/lib/cjs/cli/commands/index.js +10 -11
- package/lib/cjs/cli/commands/price.js +10 -11
- package/lib/cjs/cli/commands/topUp.js +10 -11
- package/lib/cjs/cli/commands/uploadFile.js +10 -11
- package/lib/cjs/cli/commands/uploadFolder.js +10 -11
- package/lib/cjs/cli/constants.js +10 -11
- package/lib/cjs/cli/errors.js +10 -11
- package/lib/cjs/cli/options.js +22 -11
- package/lib/cjs/cli/types.js +10 -11
- package/lib/cjs/cli/utils.js +34 -18
- package/lib/cjs/common/index.js +10 -11
- package/lib/cjs/common/logger.js +10 -11
- package/lib/cjs/common/payment.js +10 -11
- package/lib/cjs/common/signer.js +11 -12
- package/lib/cjs/common/token/arweave.js +10 -11
- package/lib/cjs/common/token/ethereum.js +10 -11
- package/lib/cjs/common/token/kyve.js +11 -12
- package/lib/cjs/common/token/solana.js +10 -11
- package/lib/cjs/common/upload.js +10 -11
- package/lib/cjs/node/factory.js +11 -12
- package/lib/cjs/node/index.js +10 -11
- package/lib/cjs/node/signer.js +11 -12
- package/lib/cjs/node/upload.js +10 -11
- package/lib/cjs/utils/axiosClient.js +10 -11
- package/lib/cjs/utils/base64.js +10 -11
- package/lib/cjs/utils/common.js +11 -12
- package/lib/cjs/utils/errors.js +10 -11
- package/lib/cjs/utils/readableStream.js +10 -11
- package/lib/cjs/version.js +11 -12
- package/lib/cjs/web/factory.js +11 -12
- package/lib/cjs/web/index.js +10 -11
- package/lib/cjs/web/signer.js +11 -12
- package/lib/cjs/web/upload.js +10 -11
- package/lib/esm/cli/commands/balance.js +10 -11
- package/lib/esm/cli/commands/cryptoFund.js +10 -11
- package/lib/esm/cli/commands/index.js +10 -11
- package/lib/esm/cli/commands/price.js +10 -11
- package/lib/esm/cli/commands/topUp.js +10 -11
- package/lib/esm/cli/commands/uploadFile.js +10 -11
- package/lib/esm/cli/commands/uploadFolder.js +10 -11
- package/lib/esm/cli/constants.js +10 -11
- package/lib/esm/cli/errors.js +10 -11
- package/lib/esm/cli/options.js +22 -11
- package/lib/esm/cli/types.js +10 -11
- package/lib/esm/cli/utils.js +34 -18
- package/lib/esm/common/index.js +10 -11
- package/lib/esm/common/logger.js +10 -11
- package/lib/esm/common/payment.js +10 -11
- package/lib/esm/common/signer.js +11 -12
- package/lib/esm/common/token/arweave.js +10 -11
- package/lib/esm/common/token/ethereum.js +10 -11
- package/lib/esm/common/token/kyve.js +11 -12
- package/lib/esm/common/token/solana.js +10 -11
- package/lib/esm/common/upload.js +10 -11
- package/lib/esm/node/factory.js +11 -12
- package/lib/esm/node/index.js +10 -11
- package/lib/esm/node/signer.js +11 -12
- package/lib/esm/node/upload.js +10 -11
- package/lib/esm/utils/axiosClient.js +10 -11
- package/lib/esm/utils/base64.js +10 -11
- package/lib/esm/utils/common.js +11 -12
- package/lib/esm/utils/errors.js +10 -11
- package/lib/esm/utils/readableStream.js +10 -11
- package/lib/esm/version.js +11 -12
- package/lib/esm/web/factory.js +11 -12
- package/lib/esm/web/index.js +10 -11
- package/lib/esm/web/signer.js +11 -12
- package/lib/esm/web/upload.js +10 -11
- package/lib/types/cli/commands/balance.d.ts.map +1 -1
- package/lib/types/cli/commands/cryptoFund.d.ts.map +1 -1
- package/lib/types/cli/commands/index.d.ts +10 -11
- package/lib/types/cli/commands/index.d.ts.map +1 -1
- package/lib/types/cli/commands/price.d.ts.map +1 -1
- package/lib/types/cli/commands/topUp.d.ts.map +1 -1
- package/lib/types/cli/commands/uploadFile.d.ts.map +1 -1
- package/lib/types/cli/commands/uploadFolder.d.ts.map +1 -1
- package/lib/types/cli/constants.d.ts.map +1 -1
- package/lib/types/cli/errors.d.ts +10 -11
- package/lib/types/cli/errors.d.ts.map +1 -1
- package/lib/types/cli/options.d.ts +28 -11
- package/lib/types/cli/options.d.ts.map +1 -1
- package/lib/types/cli/types.d.ts +12 -11
- package/lib/types/cli/types.d.ts.map +1 -1
- package/lib/types/cli/utils.d.ts.map +1 -1
- package/lib/types/common/currency.d.ts +10 -11
- package/lib/types/common/currency.d.ts.map +1 -1
- package/lib/types/common/factory.d.ts +10 -11
- package/lib/types/common/factory.d.ts.map +1 -1
- package/lib/types/common/http.d.ts +10 -11
- package/lib/types/common/http.d.ts.map +1 -1
- package/lib/types/common/index.d.ts +10 -11
- package/lib/types/common/index.d.ts.map +1 -1
- package/lib/types/common/jwk.d.ts +10 -11
- package/lib/types/common/jwk.d.ts.map +1 -1
- package/lib/types/common/logger.d.ts +10 -11
- package/lib/types/common/logger.d.ts.map +1 -1
- package/lib/types/common/payment.d.ts.map +1 -1
- package/lib/types/common/signer.d.ts.map +1 -1
- package/lib/types/common/token/arweave.d.ts +10 -11
- package/lib/types/common/token/arweave.d.ts.map +1 -1
- package/lib/types/common/token/ethereum.d.ts +10 -11
- package/lib/types/common/token/ethereum.d.ts.map +1 -1
- package/lib/types/common/token/index.d.ts +10 -11
- package/lib/types/common/token/index.d.ts.map +1 -1
- package/lib/types/common/token/kyve.d.ts.map +1 -1
- package/lib/types/common/token/polygon.d.ts +10 -11
- package/lib/types/common/token/polygon.d.ts.map +1 -1
- package/lib/types/common/token/solana.d.ts +10 -11
- package/lib/types/common/token/solana.d.ts.map +1 -1
- package/lib/types/common/turbo.d.ts +10 -11
- package/lib/types/common/turbo.d.ts.map +1 -1
- package/lib/types/common/upload.d.ts +10 -11
- package/lib/types/common/upload.d.ts.map +1 -1
- package/lib/types/node/factory.d.ts.map +1 -1
- package/lib/types/node/index.d.ts +10 -11
- package/lib/types/node/index.d.ts.map +1 -1
- package/lib/types/node/signer.d.ts +11 -12
- package/lib/types/node/signer.d.ts.map +1 -1
- package/lib/types/node/upload.d.ts.map +1 -1
- package/lib/types/types.d.ts +11 -12
- package/lib/types/types.d.ts.map +1 -1
- package/lib/types/utils/axiosClient.d.ts +10 -11
- package/lib/types/utils/axiosClient.d.ts.map +1 -1
- package/lib/types/utils/base64.d.ts.map +1 -1
- package/lib/types/utils/common.d.ts.map +1 -1
- package/lib/types/utils/errors.d.ts +10 -11
- package/lib/types/utils/errors.d.ts.map +1 -1
- package/lib/types/utils/readableStream.d.ts +10 -11
- package/lib/types/utils/readableStream.d.ts.map +1 -1
- package/lib/types/version.d.ts +11 -12
- package/lib/types/version.d.ts.map +1 -1
- package/lib/types/web/factory.d.ts.map +1 -1
- package/lib/types/web/index.d.ts +10 -11
- package/lib/types/web/index.d.ts.map +1 -1
- package/lib/types/web/signer.d.ts +11 -12
- package/lib/types/web/signer.d.ts.map +1 -1
- package/lib/types/web/upload.d.ts +10 -11
- package/lib/types/web/upload.d.ts.map +1 -1
- package/package.json +3 -3
@@ -2,20 +2,19 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.topUp = topUp;
|
4
4
|
/**
|
5
|
-
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
5
|
+
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
6
6
|
*
|
7
|
-
*
|
8
|
-
*
|
9
|
-
*
|
10
|
-
* (at your option) any later version.
|
7
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
* you may not use this file except in compliance with the License.
|
9
|
+
* You may obtain a copy of the License at
|
11
10
|
*
|
12
|
-
*
|
13
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15
|
-
* GNU Affero General Public License for more details.
|
11
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
16
12
|
*
|
17
|
-
*
|
18
|
-
*
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
* See the License for the specific language governing permissions and
|
17
|
+
* limitations under the License.
|
19
18
|
*/
|
20
19
|
const child_process_1 = require("child_process");
|
21
20
|
const currency_js_1 = require("../../common/currency.js");
|
@@ -2,20 +2,19 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.uploadFile = uploadFile;
|
4
4
|
/**
|
5
|
-
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
5
|
+
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
6
6
|
*
|
7
|
-
*
|
8
|
-
*
|
9
|
-
*
|
10
|
-
* (at your option) any later version.
|
7
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
* you may not use this file except in compliance with the License.
|
9
|
+
* You may obtain a copy of the License at
|
11
10
|
*
|
12
|
-
*
|
13
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15
|
-
* GNU Affero General Public License for more details.
|
11
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
16
12
|
*
|
17
|
-
*
|
18
|
-
*
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
* See the License for the specific language governing permissions and
|
17
|
+
* limitations under the License.
|
19
18
|
*/
|
20
19
|
const fs_1 = require("fs");
|
21
20
|
const constants_js_1 = require("../constants.js");
|
@@ -2,20 +2,19 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.uploadFolder = uploadFolder;
|
4
4
|
/**
|
5
|
-
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
5
|
+
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
6
6
|
*
|
7
|
-
*
|
8
|
-
*
|
9
|
-
*
|
10
|
-
* (at your option) any later version.
|
7
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
* you may not use this file except in compliance with the License.
|
9
|
+
* You may obtain a copy of the License at
|
11
10
|
*
|
12
|
-
*
|
13
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15
|
-
* GNU Affero General Public License for more details.
|
11
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
16
12
|
*
|
17
|
-
*
|
18
|
-
*
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
* See the License for the specific language governing permissions and
|
17
|
+
* limitations under the License.
|
19
18
|
*/
|
20
19
|
const constants_js_1 = require("../constants.js");
|
21
20
|
const utils_js_1 = require("../utils.js");
|
package/lib/cjs/cli/constants.js
CHANGED
@@ -2,20 +2,19 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.turboCliTags = void 0;
|
4
4
|
/**
|
5
|
-
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
5
|
+
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
6
6
|
*
|
7
|
-
*
|
8
|
-
*
|
9
|
-
*
|
10
|
-
* (at your option) any later version.
|
7
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
* you may not use this file except in compliance with the License.
|
9
|
+
* You may obtain a copy of the License at
|
11
10
|
*
|
12
|
-
*
|
13
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15
|
-
* GNU Affero General Public License for more details.
|
11
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
16
12
|
*
|
17
|
-
*
|
18
|
-
*
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
* See the License for the specific language governing permissions and
|
17
|
+
* limitations under the License.
|
19
18
|
*/
|
20
19
|
const version_js_1 = require("../version.js");
|
21
20
|
exports.turboCliTags = [
|
package/lib/cjs/cli/errors.js
CHANGED
@@ -2,20 +2,19 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.NoWalletProvidedError = void 0;
|
4
4
|
/**
|
5
|
-
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
5
|
+
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
6
6
|
*
|
7
|
-
*
|
8
|
-
*
|
9
|
-
*
|
10
|
-
* (at your option) any later version.
|
7
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
* you may not use this file except in compliance with the License.
|
9
|
+
* You may obtain a copy of the License at
|
11
10
|
*
|
12
|
-
*
|
13
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15
|
-
* GNU Affero General Public License for more details.
|
11
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
16
12
|
*
|
17
|
-
*
|
18
|
-
*
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
* See the License for the specific language governing permissions and
|
17
|
+
* limitations under the License.
|
19
18
|
*/
|
20
19
|
const errors_js_1 = require("../utils/errors.js");
|
21
20
|
class NoWalletProvidedError extends errors_js_1.BaseError {
|
package/lib/cjs/cli/options.js
CHANGED
@@ -1,19 +1,18 @@
|
|
1
1
|
"use strict";
|
2
2
|
/**
|
3
|
-
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
3
|
+
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
4
4
|
*
|
5
|
-
*
|
6
|
-
*
|
7
|
-
*
|
8
|
-
* (at your option) any later version.
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
* you may not use this file except in compliance with the License.
|
7
|
+
* You may obtain a copy of the License at
|
9
8
|
*
|
10
|
-
*
|
11
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13
|
-
* GNU Affero General Public License for more details.
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
14
10
|
*
|
15
|
-
*
|
16
|
-
*
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
* See the License for the specific language governing permissions and
|
15
|
+
* limitations under the License.
|
17
16
|
*/
|
18
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
19
18
|
exports.uploadFileOptions = exports.uploadFolderOptions = exports.globalOptions = exports.walletOptions = exports.optionMap = void 0;
|
@@ -62,6 +61,16 @@ exports.optionMap = {
|
|
62
61
|
description: 'Set a custom crypto gateway URL',
|
63
62
|
default: undefined,
|
64
63
|
},
|
64
|
+
uploadUrl: {
|
65
|
+
alias: '--upload-url <url>',
|
66
|
+
description: 'Set a custom upload service URL',
|
67
|
+
default: undefined,
|
68
|
+
},
|
69
|
+
paymentUrl: {
|
70
|
+
alias: '--payment-url <url>',
|
71
|
+
description: 'Set a custom payment service URL',
|
72
|
+
default: undefined,
|
73
|
+
},
|
65
74
|
dev: {
|
66
75
|
alias: '--dev',
|
67
76
|
description: 'Enable development endpoints',
|
@@ -122,6 +131,8 @@ exports.globalOptions = [
|
|
122
131
|
exports.optionMap.quiet,
|
123
132
|
exports.optionMap.token,
|
124
133
|
exports.optionMap.skipConfirmation,
|
134
|
+
exports.optionMap.paymentUrl,
|
135
|
+
exports.optionMap.uploadUrl,
|
125
136
|
];
|
126
137
|
exports.uploadFolderOptions = [
|
127
138
|
...exports.walletOptions,
|
package/lib/cjs/cli/types.js
CHANGED
@@ -1,18 +1,17 @@
|
|
1
1
|
"use strict";
|
2
2
|
/**
|
3
|
-
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
3
|
+
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
4
4
|
*
|
5
|
-
*
|
6
|
-
*
|
7
|
-
*
|
8
|
-
* (at your option) any later version.
|
5
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
6
|
+
* you may not use this file except in compliance with the License.
|
7
|
+
* You may obtain a copy of the License at
|
9
8
|
*
|
10
|
-
*
|
11
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
12
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
13
|
-
* GNU Affero General Public License for more details.
|
9
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
14
10
|
*
|
15
|
-
*
|
16
|
-
*
|
11
|
+
* Unless required by applicable law or agreed to in writing, software
|
12
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
13
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
14
|
+
* See the License for the specific language governing permissions and
|
15
|
+
* limitations under the License.
|
17
16
|
*/
|
18
17
|
Object.defineProperty(exports, "__esModule", { value: true });
|
package/lib/cjs/cli/utils.js
CHANGED
@@ -16,20 +16,19 @@ exports.configFromOptions = configFromOptions;
|
|
16
16
|
exports.turboFromOptions = turboFromOptions;
|
17
17
|
exports.getUploadFolderOptions = getUploadFolderOptions;
|
18
18
|
/**
|
19
|
-
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
19
|
+
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
20
20
|
*
|
21
|
-
*
|
22
|
-
*
|
23
|
-
*
|
24
|
-
* (at your option) any later version.
|
21
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
22
|
+
* you may not use this file except in compliance with the License.
|
23
|
+
* You may obtain a copy of the License at
|
25
24
|
*
|
26
|
-
*
|
27
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
28
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
29
|
-
* GNU Affero General Public License for more details.
|
25
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
30
26
|
*
|
31
|
-
*
|
32
|
-
*
|
27
|
+
* Unless required by applicable law or agreed to in writing, software
|
28
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
29
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
30
|
+
* See the License for the specific language governing permissions and
|
31
|
+
* limitations under the License.
|
33
32
|
*/
|
34
33
|
const bs58_1 = __importDefault(require("bs58"));
|
35
34
|
const fs_1 = require("fs");
|
@@ -135,20 +134,37 @@ const tokenToDevGatewayMap = {
|
|
135
134
|
pol: 'https://rpc-amoy.polygon.technology',
|
136
135
|
};
|
137
136
|
function configFromOptions(options) {
|
138
|
-
let config = {};
|
139
137
|
const token = tokenFromOptions(options);
|
138
|
+
let paymentUrl = undefined;
|
139
|
+
let uploadUrl = undefined;
|
140
|
+
let gatewayUrl = undefined;
|
140
141
|
if (options.dev) {
|
141
|
-
|
142
|
-
|
142
|
+
// Use development endpoints
|
143
|
+
paymentUrl = index_js_1.developmentTurboConfiguration.paymentServiceConfig.url;
|
144
|
+
uploadUrl = index_js_1.developmentTurboConfiguration.uploadServiceConfig.url;
|
145
|
+
gatewayUrl = tokenToDevGatewayMap[token];
|
143
146
|
}
|
144
147
|
else {
|
145
|
-
|
148
|
+
// Use default endpoints
|
149
|
+
paymentUrl = index_js_1.defaultTurboConfiguration.paymentServiceConfig.url;
|
150
|
+
uploadUrl = index_js_1.defaultTurboConfiguration.uploadServiceConfig.url;
|
146
151
|
}
|
147
|
-
//
|
152
|
+
// Override gateway, payment, and upload service default endpoints if provided
|
148
153
|
if (options.gateway !== undefined) {
|
149
|
-
|
154
|
+
gatewayUrl = options.gateway;
|
150
155
|
}
|
151
|
-
|
156
|
+
if (options.paymentUrl !== undefined) {
|
157
|
+
paymentUrl = options.paymentUrl;
|
158
|
+
}
|
159
|
+
if (options.uploadUrl !== undefined) {
|
160
|
+
uploadUrl = options.uploadUrl;
|
161
|
+
}
|
162
|
+
const config = {
|
163
|
+
paymentServiceConfig: { url: paymentUrl },
|
164
|
+
uploadServiceConfig: { url: uploadUrl },
|
165
|
+
gatewayUrl,
|
166
|
+
token,
|
167
|
+
};
|
152
168
|
return config;
|
153
169
|
}
|
154
170
|
async function turboFromOptions(options) {
|
package/lib/cjs/common/index.js
CHANGED
@@ -15,20 +15,19 @@ var __exportStar = (this && this.__exportStar) || function(m, exports) {
|
|
15
15
|
};
|
16
16
|
Object.defineProperty(exports, "__esModule", { value: true });
|
17
17
|
/**
|
18
|
-
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
18
|
+
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
19
19
|
*
|
20
|
-
*
|
21
|
-
*
|
22
|
-
*
|
23
|
-
* (at your option) any later version.
|
20
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
21
|
+
* you may not use this file except in compliance with the License.
|
22
|
+
* You may obtain a copy of the License at
|
24
23
|
*
|
25
|
-
*
|
26
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
27
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
28
|
-
* GNU Affero General Public License for more details.
|
24
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
29
25
|
*
|
30
|
-
*
|
31
|
-
*
|
26
|
+
* Unless required by applicable law or agreed to in writing, software
|
27
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
28
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
29
|
+
* See the License for the specific language governing permissions and
|
30
|
+
* limitations under the License.
|
32
31
|
*/
|
33
32
|
__exportStar(require("./upload.js"), exports);
|
34
33
|
__exportStar(require("./payment.js"), exports);
|
package/lib/cjs/common/logger.js
CHANGED
@@ -2,20 +2,19 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.TurboWinstonLogger = void 0;
|
4
4
|
/**
|
5
|
-
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
5
|
+
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
6
6
|
*
|
7
|
-
*
|
8
|
-
*
|
9
|
-
*
|
10
|
-
* (at your option) any later version.
|
7
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
* you may not use this file except in compliance with the License.
|
9
|
+
* You may obtain a copy of the License at
|
11
10
|
*
|
12
|
-
*
|
13
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15
|
-
* GNU Affero General Public License for more details.
|
11
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
16
12
|
*
|
17
|
-
*
|
18
|
-
*
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
* See the License for the specific language governing permissions and
|
17
|
+
* limitations under the License.
|
19
18
|
*/
|
20
19
|
const winston_1 = require("winston");
|
21
20
|
const version_js_1 = require("../version.js");
|
@@ -2,20 +2,19 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.TurboAuthenticatedPaymentService = exports.TurboUnauthenticatedPaymentService = exports.defaultPaymentServiceURL = exports.developmentPaymentServiceURL = void 0;
|
4
4
|
/**
|
5
|
-
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
5
|
+
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
6
6
|
*
|
7
|
-
*
|
8
|
-
*
|
9
|
-
*
|
10
|
-
* (at your option) any later version.
|
7
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
* you may not use this file except in compliance with the License.
|
9
|
+
* You may obtain a copy of the License at
|
11
10
|
*
|
12
|
-
*
|
13
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15
|
-
* GNU Affero General Public License for more details.
|
11
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
16
12
|
*
|
17
|
-
*
|
18
|
-
*
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
* See the License for the specific language governing permissions and
|
17
|
+
* limitations under the License.
|
19
18
|
*/
|
20
19
|
const bignumber_js_1 = require("bignumber.js");
|
21
20
|
const node_buffer_1 = require("node:buffer");
|
package/lib/cjs/common/signer.js
CHANGED
@@ -5,25 +5,24 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
6
|
exports.TurboDataItemAbstractSigner = void 0;
|
7
7
|
/**
|
8
|
-
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
8
|
+
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
9
9
|
*
|
10
|
-
*
|
11
|
-
*
|
12
|
-
*
|
13
|
-
* (at your option) any later version.
|
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
|
14
13
|
*
|
15
|
-
*
|
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.
|
14
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
19
15
|
*
|
20
|
-
*
|
21
|
-
*
|
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.
|
22
21
|
*/
|
23
|
-
const arbundles_1 = require("@ar.io/arbundles");
|
24
22
|
const amino_1 = require("@cosmjs/amino");
|
25
23
|
const crypto_1 = require("@cosmjs/crypto");
|
26
24
|
const encoding_1 = require("@cosmjs/encoding");
|
25
|
+
const arbundles_1 = require("@dha-team/arbundles");
|
27
26
|
const signing_key_1 = require("@ethersproject/signing-key");
|
28
27
|
const sdk_js_1 = require("@kyvejs/sdk/dist/sdk.js");
|
29
28
|
const bs58_1 = __importDefault(require("bs58"));
|
@@ -5,20 +5,19 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
6
|
exports.ARToTokenAmount = exports.WinstonToTokenAmount = exports.ArweaveToken = void 0;
|
7
7
|
/**
|
8
|
-
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
8
|
+
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
9
9
|
*
|
10
|
-
*
|
11
|
-
*
|
12
|
-
*
|
13
|
-
* (at your option) any later version.
|
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
|
14
13
|
*
|
15
|
-
*
|
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.
|
14
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
19
15
|
*
|
20
|
-
*
|
21
|
-
*
|
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.
|
22
21
|
*/
|
23
22
|
const arweave_1 = __importDefault(require("arweave"));
|
24
23
|
const bignumber_js_1 = require("bignumber.js");
|
@@ -2,20 +2,19 @@
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
3
3
|
exports.EthereumToken = exports.ETHToTokenAmount = exports.weiToTokenAmount = void 0;
|
4
4
|
/**
|
5
|
-
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
5
|
+
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
6
6
|
*
|
7
|
-
*
|
8
|
-
*
|
9
|
-
*
|
10
|
-
* (at your option) any later version.
|
7
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
8
|
+
* you may not use this file except in compliance with the License.
|
9
|
+
* You may obtain a copy of the License at
|
11
10
|
*
|
12
|
-
*
|
13
|
-
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
14
|
-
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
15
|
-
* GNU Affero General Public License for more details.
|
11
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
16
12
|
*
|
17
|
-
*
|
18
|
-
*
|
13
|
+
* Unless required by applicable law or agreed to in writing, software
|
14
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
15
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
16
|
+
* See the License for the specific language governing permissions and
|
17
|
+
* limitations under the License.
|
19
18
|
*/
|
20
19
|
const bignumber_js_1 = require("bignumber.js");
|
21
20
|
const ethers_1 = require("ethers");
|
@@ -5,25 +5,24 @@ exports.signerFromKyvePrivateKey = signerFromKyvePrivateKey;
|
|
5
5
|
exports.privateKeyFromKyveMnemonic = privateKeyFromKyveMnemonic;
|
6
6
|
exports.signerFromKyveMnemonic = signerFromKyveMnemonic;
|
7
7
|
/**
|
8
|
-
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
8
|
+
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
9
9
|
*
|
10
|
-
*
|
11
|
-
*
|
12
|
-
*
|
13
|
-
* (at your option) any later version.
|
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
|
14
13
|
*
|
15
|
-
*
|
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.
|
14
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
19
15
|
*
|
20
|
-
*
|
21
|
-
*
|
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.
|
22
21
|
*/
|
23
|
-
const arbundles_1 = require("@ar.io/arbundles");
|
24
22
|
const amino_1 = require("@cosmjs/amino");
|
25
23
|
const crypto_1 = require("@cosmjs/crypto");
|
26
24
|
const encoding_1 = require("@cosmjs/encoding");
|
25
|
+
const arbundles_1 = require("@dha-team/arbundles");
|
27
26
|
const bignumber_js_1 = require("bignumber.js");
|
28
27
|
const axiosClient_js_1 = require("../../utils/axiosClient.js");
|
29
28
|
const common_js_1 = require("../../utils/common.js");
|
@@ -5,20 +5,19 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
6
6
|
exports.SolanaToken = exports.SOLToTokenAmount = exports.lamportToTokenAmount = void 0;
|
7
7
|
/**
|
8
|
-
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
8
|
+
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
9
9
|
*
|
10
|
-
*
|
11
|
-
*
|
12
|
-
*
|
13
|
-
* (at your option) any later version.
|
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
|
14
13
|
*
|
15
|
-
*
|
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.
|
14
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
19
15
|
*
|
20
|
-
*
|
21
|
-
*
|
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.
|
22
21
|
*/
|
23
22
|
const web3_js_1 = require("@solana/web3.js");
|
24
23
|
const bignumber_js_1 = require("bignumber.js");
|