@ardrive/turbo-sdk 1.17.0 → 1.18.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/LICENSE.md +201 -661
- package/README.md +2 -0
- package/bundles/web.bundle.min.js +65 -64
- 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 +15 -13
- 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 +18 -16
- 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 +15 -13
- 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 +18 -16
- 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 +13 -18
- 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 +14 -14
- 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
@@ -1,18 +1,17 @@
|
|
1
1
|
/**
|
2
|
-
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
2
|
+
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
3
3
|
*
|
4
|
-
*
|
5
|
-
*
|
6
|
-
*
|
7
|
-
* (at your option) any later version.
|
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
|
8
7
|
*
|
9
|
-
*
|
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.
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
13
9
|
*
|
14
|
-
*
|
15
|
-
*
|
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.
|
16
15
|
*/
|
17
16
|
export * from './balance.js';
|
18
17
|
export * from './cryptoFund.js';
|
@@ -1,18 +1,17 @@
|
|
1
1
|
/**
|
2
|
-
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
2
|
+
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
3
3
|
*
|
4
|
-
*
|
5
|
-
*
|
6
|
-
*
|
7
|
-
* (at your option) any later version.
|
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
|
8
7
|
*
|
9
|
-
*
|
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.
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
13
9
|
*
|
14
|
-
*
|
15
|
-
*
|
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.
|
16
15
|
*/
|
17
16
|
import { currencyMap } from '../../common/currency.js';
|
18
17
|
import { isTokenType, tokenToBaseMap } from '../../common/index.js';
|
@@ -1,18 +1,17 @@
|
|
1
1
|
/**
|
2
|
-
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
2
|
+
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
3
3
|
*
|
4
|
-
*
|
5
|
-
*
|
6
|
-
*
|
7
|
-
* (at your option) any later version.
|
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
|
8
7
|
*
|
9
|
-
*
|
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.
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
13
9
|
*
|
14
|
-
*
|
15
|
-
*
|
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.
|
16
15
|
*/
|
17
16
|
import { exec } from 'child_process';
|
18
17
|
import { currencyMap } from '../../common/currency.js';
|
@@ -1,18 +1,17 @@
|
|
1
1
|
/**
|
2
|
-
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
2
|
+
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
3
3
|
*
|
4
|
-
*
|
5
|
-
*
|
6
|
-
*
|
7
|
-
* (at your option) any later version.
|
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
|
8
7
|
*
|
9
|
-
*
|
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.
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
13
9
|
*
|
14
|
-
*
|
15
|
-
*
|
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.
|
16
15
|
*/
|
17
16
|
import { createReadStream, statSync } from 'fs';
|
18
17
|
import { turboCliTags } from '../constants.js';
|
@@ -1,18 +1,17 @@
|
|
1
1
|
/**
|
2
|
-
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
2
|
+
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
3
3
|
*
|
4
|
-
*
|
5
|
-
*
|
6
|
-
*
|
7
|
-
* (at your option) any later version.
|
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
|
8
7
|
*
|
9
|
-
*
|
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.
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
13
9
|
*
|
14
|
-
*
|
15
|
-
*
|
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.
|
16
15
|
*/
|
17
16
|
import { turboCliTags } from '../constants.js';
|
18
17
|
import { getUploadFolderOptions, turboFromOptions } from '../utils.js';
|
package/lib/esm/cli/constants.js
CHANGED
@@ -1,18 +1,17 @@
|
|
1
1
|
/**
|
2
|
-
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
2
|
+
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
3
3
|
*
|
4
|
-
*
|
5
|
-
*
|
6
|
-
*
|
7
|
-
* (at your option) any later version.
|
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
|
8
7
|
*
|
9
|
-
*
|
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.
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
13
9
|
*
|
14
|
-
*
|
15
|
-
*
|
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.
|
16
15
|
*/
|
17
16
|
import { version } from '../version.js';
|
18
17
|
export const turboCliTags = [
|
package/lib/esm/cli/errors.js
CHANGED
@@ -1,18 +1,17 @@
|
|
1
1
|
/**
|
2
|
-
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
2
|
+
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
3
3
|
*
|
4
|
-
*
|
5
|
-
*
|
6
|
-
*
|
7
|
-
* (at your option) any later version.
|
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
|
8
7
|
*
|
9
|
-
*
|
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.
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
13
9
|
*
|
14
|
-
*
|
15
|
-
*
|
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.
|
16
15
|
*/
|
17
16
|
import { BaseError } from '../utils/errors.js';
|
18
17
|
export class NoWalletProvidedError extends BaseError {
|
package/lib/esm/cli/options.js
CHANGED
@@ -1,18 +1,17 @@
|
|
1
1
|
/**
|
2
|
-
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
2
|
+
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
3
3
|
*
|
4
|
-
*
|
5
|
-
*
|
6
|
-
*
|
7
|
-
* (at your option) any later version.
|
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
|
8
7
|
*
|
9
|
-
*
|
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.
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
13
9
|
*
|
14
|
-
*
|
15
|
-
*
|
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.
|
16
15
|
*/
|
17
16
|
export const optionMap = {
|
18
17
|
token: {
|
@@ -59,6 +58,16 @@ export const optionMap = {
|
|
59
58
|
description: 'Set a custom crypto gateway URL',
|
60
59
|
default: undefined,
|
61
60
|
},
|
61
|
+
uploadUrl: {
|
62
|
+
alias: '--upload-url <url>',
|
63
|
+
description: 'Set a custom upload service URL',
|
64
|
+
default: undefined,
|
65
|
+
},
|
66
|
+
paymentUrl: {
|
67
|
+
alias: '--payment-url <url>',
|
68
|
+
description: 'Set a custom payment service URL',
|
69
|
+
default: undefined,
|
70
|
+
},
|
62
71
|
dev: {
|
63
72
|
alias: '--dev',
|
64
73
|
description: 'Enable development endpoints',
|
@@ -119,6 +128,8 @@ export const globalOptions = [
|
|
119
128
|
optionMap.quiet,
|
120
129
|
optionMap.token,
|
121
130
|
optionMap.skipConfirmation,
|
131
|
+
optionMap.paymentUrl,
|
132
|
+
optionMap.uploadUrl,
|
122
133
|
];
|
123
134
|
export const uploadFolderOptions = [
|
124
135
|
...walletOptions,
|
package/lib/esm/cli/types.js
CHANGED
@@ -1,17 +1,16 @@
|
|
1
1
|
/**
|
2
|
-
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
2
|
+
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
3
3
|
*
|
4
|
-
*
|
5
|
-
*
|
6
|
-
*
|
7
|
-
* (at your option) any later version.
|
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
|
8
7
|
*
|
9
|
-
*
|
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.
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
13
9
|
*
|
14
|
-
*
|
15
|
-
*
|
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.
|
16
15
|
*/
|
17
16
|
export {};
|
package/lib/esm/cli/utils.js
CHANGED
@@ -1,18 +1,17 @@
|
|
1
1
|
/**
|
2
|
-
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
2
|
+
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
3
3
|
*
|
4
|
-
*
|
5
|
-
*
|
6
|
-
*
|
7
|
-
* (at your option) any later version.
|
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
|
8
7
|
*
|
9
|
-
*
|
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.
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
13
9
|
*
|
14
|
-
*
|
15
|
-
*
|
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.
|
16
15
|
*/
|
17
16
|
import bs58 from 'bs58';
|
18
17
|
import { readFileSync, statSync } from 'fs';
|
@@ -118,20 +117,37 @@ const tokenToDevGatewayMap = {
|
|
118
117
|
pol: 'https://rpc-amoy.polygon.technology',
|
119
118
|
};
|
120
119
|
export function configFromOptions(options) {
|
121
|
-
let config = {};
|
122
120
|
const token = tokenFromOptions(options);
|
121
|
+
let paymentUrl = undefined;
|
122
|
+
let uploadUrl = undefined;
|
123
|
+
let gatewayUrl = undefined;
|
123
124
|
if (options.dev) {
|
124
|
-
|
125
|
-
|
125
|
+
// Use development endpoints
|
126
|
+
paymentUrl = developmentTurboConfiguration.paymentServiceConfig.url;
|
127
|
+
uploadUrl = developmentTurboConfiguration.uploadServiceConfig.url;
|
128
|
+
gatewayUrl = tokenToDevGatewayMap[token];
|
126
129
|
}
|
127
130
|
else {
|
128
|
-
|
131
|
+
// Use default endpoints
|
132
|
+
paymentUrl = defaultTurboConfiguration.paymentServiceConfig.url;
|
133
|
+
uploadUrl = defaultTurboConfiguration.uploadServiceConfig.url;
|
129
134
|
}
|
130
|
-
//
|
135
|
+
// Override gateway, payment, and upload service default endpoints if provided
|
131
136
|
if (options.gateway !== undefined) {
|
132
|
-
|
137
|
+
gatewayUrl = options.gateway;
|
133
138
|
}
|
134
|
-
|
139
|
+
if (options.paymentUrl !== undefined) {
|
140
|
+
paymentUrl = options.paymentUrl;
|
141
|
+
}
|
142
|
+
if (options.uploadUrl !== undefined) {
|
143
|
+
uploadUrl = options.uploadUrl;
|
144
|
+
}
|
145
|
+
const config = {
|
146
|
+
paymentServiceConfig: { url: paymentUrl },
|
147
|
+
uploadServiceConfig: { url: uploadUrl },
|
148
|
+
gatewayUrl,
|
149
|
+
token,
|
150
|
+
};
|
135
151
|
return config;
|
136
152
|
}
|
137
153
|
export async function turboFromOptions(options) {
|
package/lib/esm/common/index.js
CHANGED
@@ -1,18 +1,17 @@
|
|
1
1
|
/**
|
2
|
-
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
2
|
+
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
3
3
|
*
|
4
|
-
*
|
5
|
-
*
|
6
|
-
*
|
7
|
-
* (at your option) any later version.
|
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
|
8
7
|
*
|
9
|
-
*
|
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.
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
13
9
|
*
|
14
|
-
*
|
15
|
-
*
|
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.
|
16
15
|
*/
|
17
16
|
export * from './upload.js';
|
18
17
|
export * from './payment.js';
|
package/lib/esm/common/logger.js
CHANGED
@@ -1,18 +1,17 @@
|
|
1
1
|
/**
|
2
|
-
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
2
|
+
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
3
3
|
*
|
4
|
-
*
|
5
|
-
*
|
6
|
-
*
|
7
|
-
* (at your option) any later version.
|
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
|
8
7
|
*
|
9
|
-
*
|
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.
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
13
9
|
*
|
14
|
-
*
|
15
|
-
*
|
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.
|
16
15
|
*/
|
17
16
|
import { createLogger, format, transports } from 'winston';
|
18
17
|
import { version } from '../version.js';
|
@@ -1,18 +1,17 @@
|
|
1
1
|
/**
|
2
|
-
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
2
|
+
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
3
3
|
*
|
4
|
-
*
|
5
|
-
*
|
6
|
-
*
|
7
|
-
* (at your option) any later version.
|
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
|
8
7
|
*
|
9
|
-
*
|
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.
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
13
9
|
*
|
14
|
-
*
|
15
|
-
*
|
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.
|
16
15
|
*/
|
17
16
|
import { BigNumber } from 'bignumber.js';
|
18
17
|
import { Buffer } from 'node:buffer';
|
package/lib/esm/common/signer.js
CHANGED
@@ -1,23 +1,22 @@
|
|
1
1
|
/**
|
2
|
-
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
2
|
+
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
3
3
|
*
|
4
|
-
*
|
5
|
-
*
|
6
|
-
*
|
7
|
-
* (at your option) any later version.
|
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
|
8
7
|
*
|
9
|
-
*
|
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.
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
13
9
|
*
|
14
|
-
*
|
15
|
-
*
|
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.
|
16
15
|
*/
|
17
|
-
import { EthereumSigner, HexSolanaSigner } from '@ar.io/arbundles';
|
18
16
|
import { pubkeyToAddress } from '@cosmjs/amino';
|
19
17
|
import { Secp256k1 } from '@cosmjs/crypto';
|
20
18
|
import { toBase64 } from '@cosmjs/encoding';
|
19
|
+
import { EthereumSigner, HexSolanaSigner } from '@dha-team/arbundles';
|
21
20
|
import { computePublicKey } from '@ethersproject/signing-key';
|
22
21
|
import { KyveSDK } from '@kyvejs/sdk/dist/sdk.js';
|
23
22
|
import bs58 from 'bs58';
|
@@ -1,18 +1,17 @@
|
|
1
1
|
/**
|
2
|
-
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
2
|
+
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
3
3
|
*
|
4
|
-
*
|
5
|
-
*
|
6
|
-
*
|
7
|
-
* (at your option) any later version.
|
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
|
8
7
|
*
|
9
|
-
*
|
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.
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
13
9
|
*
|
14
|
-
*
|
15
|
-
*
|
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.
|
16
15
|
*/
|
17
16
|
import Arweave from 'arweave';
|
18
17
|
import { BigNumber } from 'bignumber.js';
|
@@ -1,18 +1,17 @@
|
|
1
1
|
/**
|
2
|
-
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
2
|
+
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
3
3
|
*
|
4
|
-
*
|
5
|
-
*
|
6
|
-
*
|
7
|
-
* (at your option) any later version.
|
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
|
8
7
|
*
|
9
|
-
*
|
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.
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
13
9
|
*
|
14
|
-
*
|
15
|
-
*
|
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.
|
16
15
|
*/
|
17
16
|
import { BigNumber } from 'bignumber.js';
|
18
17
|
import { ethers } from 'ethers';
|
@@ -1,23 +1,22 @@
|
|
1
1
|
/**
|
2
|
-
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
2
|
+
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc.
|
3
3
|
*
|
4
|
-
*
|
5
|
-
*
|
6
|
-
*
|
7
|
-
* (at your option) any later version.
|
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
|
8
7
|
*
|
9
|
-
*
|
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.
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
13
9
|
*
|
14
|
-
*
|
15
|
-
*
|
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.
|
16
15
|
*/
|
17
|
-
import { EthereumSigner } from '@ar.io/arbundles';
|
18
16
|
import { Secp256k1HdWallet, makeCosmoshubPath } from '@cosmjs/amino';
|
19
17
|
import { Slip10, Slip10Curve } from '@cosmjs/crypto';
|
20
18
|
import { toHex } from '@cosmjs/encoding';
|
19
|
+
import { EthereumSigner } from '@dha-team/arbundles';
|
21
20
|
import { BigNumber } from 'bignumber.js';
|
22
21
|
import { createAxiosInstance } from '../../utils/axiosClient.js';
|
23
22
|
import { sleep } from '../../utils/common.js';
|