@ardrive/turbo-sdk 1.16.1 → 1.17.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/README.md +34 -1
- package/bundles/web.bundle.min.js +43 -6
- package/lib/cjs/cli/cli.js +6 -6
- package/lib/cjs/cli/commands/balance.js +40 -0
- package/lib/cjs/cli/commands/cryptoFund.js +61 -0
- package/lib/cjs/cli/commands/index.js +37 -0
- package/lib/cjs/cli/commands/topUp.js +80 -0
- package/lib/cjs/cli/commands/uploadFile.js +36 -0
- package/lib/cjs/cli/commands/uploadFolder.js +36 -0
- package/lib/cjs/cli/constants.js +25 -0
- package/lib/cjs/cli/utils.js +2 -1
- package/lib/cjs/common/factory.js +1 -0
- package/lib/cjs/common/signer.js +2 -0
- package/lib/cjs/common/token/index.js +5 -0
- package/lib/cjs/common/token/polygon.js +16 -0
- package/lib/cjs/common/turbo.js +4 -2
- package/lib/cjs/node/factory.js +1 -0
- package/lib/cjs/types.js +8 -1
- package/lib/cjs/utils/common.js +1 -0
- package/lib/cjs/version.js +1 -1
- package/lib/cjs/web/factory.js +1 -0
- package/lib/esm/cli/cli.js +2 -2
- package/lib/esm/cli/commands/balance.js +37 -0
- package/lib/esm/cli/commands/cryptoFund.js +55 -0
- package/lib/esm/cli/commands/index.js +21 -0
- package/lib/esm/cli/commands/topUp.js +77 -0
- package/lib/esm/cli/commands/uploadFile.js +33 -0
- package/lib/esm/cli/commands/uploadFolder.js +33 -0
- package/lib/esm/cli/constants.js +22 -0
- package/lib/esm/cli/utils.js +2 -1
- package/lib/esm/common/factory.js +1 -0
- package/lib/esm/common/signer.js +2 -0
- package/lib/esm/common/token/index.js +5 -0
- package/lib/esm/common/token/polygon.js +12 -0
- package/lib/esm/common/turbo.js +4 -2
- package/lib/esm/node/factory.js +1 -0
- package/lib/esm/types.js +8 -1
- package/lib/esm/utils/common.js +1 -0
- package/lib/esm/version.js +1 -1
- package/lib/esm/web/factory.js +1 -0
- package/lib/types/cli/commands/balance.d.ts +3 -0
- package/lib/types/cli/commands/balance.d.ts.map +1 -0
- package/lib/types/cli/commands/cryptoFund.d.ts +3 -0
- package/lib/types/cli/commands/cryptoFund.d.ts.map +1 -0
- package/lib/types/cli/commands/index.d.ts +22 -0
- package/lib/types/cli/commands/index.d.ts.map +1 -0
- package/lib/types/cli/commands/topUp.d.ts +3 -0
- package/lib/types/cli/commands/topUp.d.ts.map +1 -0
- package/lib/types/cli/commands/uploadFile.d.ts +3 -0
- package/lib/types/cli/commands/uploadFile.d.ts.map +1 -0
- package/lib/types/cli/commands/uploadFolder.d.ts +3 -0
- package/lib/types/cli/commands/uploadFolder.d.ts.map +1 -0
- package/lib/types/cli/constants.d.ts +5 -0
- package/lib/types/cli/constants.d.ts.map +1 -0
- package/lib/types/cli/utils.d.ts.map +1 -1
- package/lib/types/common/factory.d.ts.map +1 -1
- package/lib/types/common/signer.d.ts.map +1 -1
- package/lib/types/common/token/index.d.ts +1 -6
- package/lib/types/common/token/index.d.ts.map +1 -1
- package/lib/types/common/token/polygon.d.ts +23 -0
- package/lib/types/common/token/polygon.d.ts.map +1 -0
- package/lib/types/common/turbo.d.ts.map +1 -1
- package/lib/types/node/factory.d.ts.map +1 -1
- package/lib/types/types.d.ts +1 -1
- package/lib/types/types.d.ts.map +1 -1
- package/lib/types/utils/common.d.ts.map +1 -1
- package/lib/types/version.d.ts +1 -1
- package/lib/types/web/factory.d.ts.map +1 -1
- package/package.json +1 -1
- package/lib/cjs/cli/commands.js +0 -178
- package/lib/esm/cli/commands.js +0 -167
- package/lib/types/cli/commands.d.ts +0 -9
- package/lib/types/cli/commands.d.ts.map +0 -1
package/lib/cjs/types.js
CHANGED
@@ -19,7 +19,14 @@ exports.fiatCurrencyTypes = [
|
|
19
19
|
function isCurrency(currency) {
|
20
20
|
return exports.fiatCurrencyTypes.includes(currency);
|
21
21
|
}
|
22
|
-
exports.tokenTypes = [
|
22
|
+
exports.tokenTypes = [
|
23
|
+
'arweave',
|
24
|
+
'solana',
|
25
|
+
'ethereum',
|
26
|
+
'kyve',
|
27
|
+
'matic',
|
28
|
+
'pol',
|
29
|
+
];
|
23
30
|
const isNodeUploadFolderParams = (p) => p.folderPath !== undefined;
|
24
31
|
exports.isNodeUploadFolderParams = isNodeUploadFolderParams;
|
25
32
|
const isWebUploadFolderParams = (p) => p.files !== undefined;
|
package/lib/cjs/utils/common.js
CHANGED
@@ -43,6 +43,7 @@ function createTurboSigner({ signer: clientProvidedSigner, privateKey: clientPro
|
|
43
43
|
case 'solana':
|
44
44
|
return new arbundles_1.HexSolanaSigner(clientProvidedPrivateKey);
|
45
45
|
case 'ethereum':
|
46
|
+
case 'matic':
|
46
47
|
if (!(0, types_js_1.isEthPrivateKey)(clientProvidedPrivateKey)) {
|
47
48
|
throw new Error('A valid Ethereum private key must be provided for EthereumSigner.');
|
48
49
|
}
|
package/lib/cjs/version.js
CHANGED
package/lib/cjs/web/factory.js
CHANGED
@@ -36,6 +36,7 @@ class TurboFactory extends factory_js_1.TurboBaseFactory {
|
|
36
36
|
});
|
37
37
|
}
|
38
38
|
static authenticated({ privateKey, signer: providedSigner, paymentServiceConfig = {}, uploadServiceConfig = {}, token, gatewayUrl, tokenMap, tokenTools, }) {
|
39
|
+
token = token === 'pol' ? 'matic' : token;
|
39
40
|
if (!token) {
|
40
41
|
if (providedSigner) {
|
41
42
|
// Derive token from signer if not provided
|
package/lib/esm/cli/cli.js
CHANGED
@@ -18,7 +18,7 @@
|
|
18
18
|
// eslint-disable-next-line header/header -- This is a CLI file
|
19
19
|
import { program } from 'commander';
|
20
20
|
import { version } from '../version.js';
|
21
|
-
import {
|
21
|
+
import { balance, cryptoFund, topUp, uploadFile, uploadFolder, } from './commands/index.js';
|
22
22
|
import { globalOptions, optionMap, uploadFileOptions, uploadFolderOptions, walletOptions, } from './options.js';
|
23
23
|
import { applyOptions, runCommand } from './utils.js';
|
24
24
|
applyOptions(program
|
@@ -27,7 +27,7 @@ applyOptions(program
|
|
27
27
|
.description('Turbo CLI')
|
28
28
|
.helpCommand(true), globalOptions);
|
29
29
|
applyOptions(program.command('balance').description('Get balance of a Turbo address'), [optionMap.address, ...walletOptions]).action(async (_commandOptions, command) => {
|
30
|
-
await runCommand(command,
|
30
|
+
await runCommand(command, balance);
|
31
31
|
});
|
32
32
|
applyOptions(program.command('top-up').description('Top up a Turbo address with Fiat'), [...walletOptions, optionMap.address, optionMap.value, optionMap.currency]).action(async (_commandOptions, command) => {
|
33
33
|
await runCommand(command, topUp);
|
@@ -0,0 +1,37 @@
|
|
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 { TurboFactory } from '../../node/factory.js';
|
18
|
+
import { addressOrPrivateKeyFromOptions, configFromOptions } from '../utils.js';
|
19
|
+
export async function balance(options) {
|
20
|
+
const config = configFromOptions(options);
|
21
|
+
const { address, privateKey } = await addressOrPrivateKeyFromOptions(options);
|
22
|
+
if (address !== undefined) {
|
23
|
+
const turbo = TurboFactory.unauthenticated(config);
|
24
|
+
const { winc } = await turbo.getBalance(address);
|
25
|
+
console.log(`Turbo Balance for Native Address "${address}"\nCredits: ${+winc / 1_000_000_000_000}`);
|
26
|
+
return;
|
27
|
+
}
|
28
|
+
if (privateKey === undefined) {
|
29
|
+
throw new Error('Must provide an (--address) or use a valid wallet');
|
30
|
+
}
|
31
|
+
const turbo = TurboFactory.authenticated({
|
32
|
+
...config,
|
33
|
+
privateKey,
|
34
|
+
});
|
35
|
+
const { winc } = await turbo.getBalance();
|
36
|
+
console.log(`Turbo Balance for Wallet Address "${await turbo.signer.getNativeAddress()}"\nCredits: ${+winc / 1_000_000_000_000}`);
|
37
|
+
}
|
@@ -0,0 +1,55 @@
|
|
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 prompts from 'prompts';
|
18
|
+
import { tokenToBaseMap } from '../../common/index.js';
|
19
|
+
import { TurboFactory } from '../../node/factory.js';
|
20
|
+
import { configFromOptions, tokenFromOptions, turboFromOptions, } from '../utils.js';
|
21
|
+
export async function cryptoFund(options) {
|
22
|
+
const value = options.value;
|
23
|
+
const txId = options.txId;
|
24
|
+
if (txId !== undefined) {
|
25
|
+
const turbo = TurboFactory.unauthenticated(configFromOptions(options));
|
26
|
+
const result = await turbo.submitFundTransaction({ txId: txId });
|
27
|
+
console.log('Submitted existing crypto fund transaction to payment service: \n', JSON.stringify(result, null, 2));
|
28
|
+
return;
|
29
|
+
}
|
30
|
+
if (value === undefined) {
|
31
|
+
throw new Error('Must provide a --value or --transaction-id for crypto-fund command');
|
32
|
+
}
|
33
|
+
const turbo = await turboFromOptions(options);
|
34
|
+
const token = tokenFromOptions(options);
|
35
|
+
const tokenAmount = tokenToBaseMap[token](value);
|
36
|
+
if (!options.skipConfirmation) {
|
37
|
+
const { winc } = await turbo.getWincForToken({ tokenAmount });
|
38
|
+
const targetWallet = (await turbo.getTurboCryptoWallets())[token];
|
39
|
+
const credits = (+winc / 1_000_000_000_000).toFixed(12);
|
40
|
+
const { confirm } = await prompts({
|
41
|
+
type: 'confirm',
|
42
|
+
name: 'confirm',
|
43
|
+
message: `\nTransaction details:\n\n Amount: ${value} ${token}\n Target: ${targetWallet}\n Credits received: ${credits}\n Credit recipient: ${await turbo.signer.getNativeAddress()}\n Network fees: (Gas fees apply)\n\nThis payment is non-refundable. Proceed with transaction?`,
|
44
|
+
initial: true,
|
45
|
+
});
|
46
|
+
if (!confirm) {
|
47
|
+
console.log('Aborted crypto fund transaction');
|
48
|
+
return;
|
49
|
+
}
|
50
|
+
}
|
51
|
+
const result = await turbo.topUpWithTokens({
|
52
|
+
tokenAmount,
|
53
|
+
});
|
54
|
+
console.log('Sent crypto fund transaction: \n', JSON.stringify(result, null, 2));
|
55
|
+
}
|
@@ -0,0 +1,21 @@
|
|
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
|
+
export * from './balance.js';
|
18
|
+
export * from './cryptoFund.js';
|
19
|
+
export * from './topUp.js';
|
20
|
+
export * from './uploadFile.js';
|
21
|
+
export * from './uploadFolder.js';
|
@@ -0,0 +1,77 @@
|
|
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 { exec } from 'child_process';
|
18
|
+
import { currencyMap } from '../../common/currency.js';
|
19
|
+
import { TurboFactory } from '../../node/factory.js';
|
20
|
+
import { fiatCurrencyTypes, isCurrency } from '../../types.js';
|
21
|
+
import { sleep } from '../../utils/common.js';
|
22
|
+
import { addressOrPrivateKeyFromOptions, configFromOptions } from '../utils.js';
|
23
|
+
function openUrl(url) {
|
24
|
+
if (process.platform === 'darwin') {
|
25
|
+
// macOS
|
26
|
+
exec(`open ${url}`);
|
27
|
+
}
|
28
|
+
else if (process.platform === 'win32') {
|
29
|
+
// Windows
|
30
|
+
exec(`start "" "${url}"`, { windowsHide: true });
|
31
|
+
}
|
32
|
+
else {
|
33
|
+
// Linux/Unix
|
34
|
+
open(url);
|
35
|
+
}
|
36
|
+
}
|
37
|
+
export async function topUp(options) {
|
38
|
+
const config = configFromOptions(options);
|
39
|
+
const { address, privateKey } = await addressOrPrivateKeyFromOptions(options);
|
40
|
+
const value = options.value;
|
41
|
+
if (value === undefined) {
|
42
|
+
throw new Error('Must provide a --value to top up');
|
43
|
+
}
|
44
|
+
const currency = (options.currency ?? 'usd').toLowerCase();
|
45
|
+
if (!isCurrency(currency)) {
|
46
|
+
throw new Error(`Invalid fiat currency type ${currency}!\nPlease use one of these:\n${JSON.stringify(fiatCurrencyTypes, null, 2)}`);
|
47
|
+
}
|
48
|
+
// TODO: Pay in CLI prompts via --cli options
|
49
|
+
const { url, paymentAmount, winc } = await (async () => {
|
50
|
+
const amount = currencyMap[currency](+value);
|
51
|
+
if (address !== undefined) {
|
52
|
+
const turbo = TurboFactory.unauthenticated(config);
|
53
|
+
return turbo.createCheckoutSession({
|
54
|
+
amount,
|
55
|
+
owner: address,
|
56
|
+
});
|
57
|
+
}
|
58
|
+
if (privateKey === undefined) {
|
59
|
+
throw new Error('Must provide a wallet to top up');
|
60
|
+
}
|
61
|
+
const turbo = TurboFactory.authenticated({
|
62
|
+
...config,
|
63
|
+
privateKey,
|
64
|
+
});
|
65
|
+
return turbo.createCheckoutSession({
|
66
|
+
amount,
|
67
|
+
owner: await turbo.signer.getNativeAddress(),
|
68
|
+
});
|
69
|
+
})();
|
70
|
+
if (url === undefined) {
|
71
|
+
throw new Error('Failed to create checkout session');
|
72
|
+
}
|
73
|
+
console.log('Got Checkout Session\n' + JSON.stringify({ url, paymentAmount, winc }));
|
74
|
+
console.log('Opening checkout session in browser...');
|
75
|
+
await sleep(2000);
|
76
|
+
openUrl(url);
|
77
|
+
}
|
@@ -0,0 +1,33 @@
|
|
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 { createReadStream, statSync } from 'fs';
|
18
|
+
import { turboCliTags } from '../constants.js';
|
19
|
+
import { turboFromOptions } from '../utils.js';
|
20
|
+
export async function uploadFile(options) {
|
21
|
+
const { filePath } = options;
|
22
|
+
if (filePath === undefined) {
|
23
|
+
throw new Error('Must provide a --file-path to upload');
|
24
|
+
}
|
25
|
+
const turbo = await turboFromOptions(options);
|
26
|
+
const fileSize = statSync(filePath).size;
|
27
|
+
const result = await turbo.uploadFile({
|
28
|
+
fileStreamFactory: () => createReadStream(filePath),
|
29
|
+
fileSizeFactory: () => fileSize,
|
30
|
+
dataItemOpts: { tags: [...turboCliTags] }, // TODO: Inject user tags
|
31
|
+
});
|
32
|
+
console.log('Uploaded file:', JSON.stringify(result, null, 2));
|
33
|
+
}
|
@@ -0,0 +1,33 @@
|
|
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 { turboCliTags } from '../constants.js';
|
18
|
+
import { getUploadFolderOptions, turboFromOptions } from '../utils.js';
|
19
|
+
export async function uploadFolder(options) {
|
20
|
+
const turbo = await turboFromOptions(options);
|
21
|
+
const { disableManifest, fallbackFile, folderPath, indexFile, maxConcurrentUploads, } = getUploadFolderOptions(options);
|
22
|
+
const result = await turbo.uploadFolder({
|
23
|
+
folderPath: folderPath,
|
24
|
+
dataItemOpts: { tags: [...turboCliTags] }, // TODO: Inject user tags
|
25
|
+
manifestOptions: {
|
26
|
+
disableManifest,
|
27
|
+
indexFile,
|
28
|
+
fallbackFile,
|
29
|
+
},
|
30
|
+
maxConcurrentUploads,
|
31
|
+
});
|
32
|
+
console.log('Uploaded folder:', JSON.stringify(result, null, 2));
|
33
|
+
}
|
@@ -0,0 +1,22 @@
|
|
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 { version } from '../version.js';
|
18
|
+
export const turboCliTags = [
|
19
|
+
{ name: 'App-Name', value: 'Turbo-CLI' },
|
20
|
+
{ name: 'App-Version', value: version },
|
21
|
+
{ name: 'App-Platform', value: process.platform },
|
22
|
+
];
|
package/lib/esm/cli/utils.js
CHANGED
@@ -114,7 +114,8 @@ const tokenToDevGatewayMap = {
|
|
114
114
|
solana: 'https://api.devnet.solana.com',
|
115
115
|
ethereum: 'https://ethereum-holesky-rpc.publicnode.com',
|
116
116
|
kyve: 'https://api.korellia.kyve.network',
|
117
|
-
|
117
|
+
matic: 'https://rpc-amoy.polygon.technology',
|
118
|
+
pol: 'https://rpc-amoy.polygon.technology',
|
118
119
|
};
|
119
120
|
export function configFromOptions(options) {
|
120
121
|
let config = {};
|
@@ -12,6 +12,7 @@ export class TurboBaseFactory {
|
|
12
12
|
this.logger.setLogFormat(format);
|
13
13
|
}
|
14
14
|
static unauthenticated({ paymentServiceConfig = {}, uploadServiceConfig = {}, token, } = {}) {
|
15
|
+
token = token === 'pol' ? 'matic' : token;
|
15
16
|
const paymentService = new TurboUnauthenticatedPaymentService({
|
16
17
|
...paymentServiceConfig,
|
17
18
|
logger: this.logger,
|
package/lib/esm/common/signer.js
CHANGED
@@ -42,6 +42,8 @@ export class TurboDataItemAbstractSigner {
|
|
42
42
|
case 'solana':
|
43
43
|
return bs58.encode(fromB64Url(owner));
|
44
44
|
case 'ethereum':
|
45
|
+
case 'matic':
|
46
|
+
case 'pol':
|
45
47
|
return computeAddress(computePublicKey(fromB64Url(owner)));
|
46
48
|
case 'kyve':
|
47
49
|
return pubkeyToAddress({
|
@@ -2,18 +2,23 @@ import { tokenTypes, } from '../../types.js';
|
|
2
2
|
import { ARToTokenAmount, ArweaveToken } from './arweave.js';
|
3
3
|
import { ETHToTokenAmount, EthereumToken } from './ethereum.js';
|
4
4
|
import { KYVEToTokenAmount, KyveToken } from './kyve.js';
|
5
|
+
import { POLToTokenAmount, PolygonToken } from './polygon.js';
|
5
6
|
import { SOLToTokenAmount, SolanaToken } from './solana.js';
|
6
7
|
export const defaultTokenMap = {
|
7
8
|
arweave: (config) => new ArweaveToken(config),
|
8
9
|
solana: (config) => new SolanaToken(config),
|
9
10
|
ethereum: (config) => new EthereumToken(config),
|
10
11
|
kyve: (config) => new KyveToken(config),
|
12
|
+
matic: (config) => new PolygonToken(config),
|
13
|
+
pol: (config) => new PolygonToken(config),
|
11
14
|
};
|
12
15
|
export const tokenToBaseMap = {
|
13
16
|
arweave: (a) => ARToTokenAmount(a),
|
14
17
|
solana: (a) => SOLToTokenAmount(a),
|
15
18
|
ethereum: (a) => ETHToTokenAmount(a),
|
16
19
|
kyve: (a) => KYVEToTokenAmount(a),
|
20
|
+
matic: (a) => POLToTokenAmount(a),
|
21
|
+
pol: (a) => POLToTokenAmount(a),
|
17
22
|
};
|
18
23
|
export function isTokenType(token) {
|
19
24
|
return tokenTypes.includes(token);
|
@@ -0,0 +1,12 @@
|
|
1
|
+
import { TurboWinstonLogger } from '../logger.js';
|
2
|
+
import { ETHToTokenAmount, EthereumToken } from './ethereum.js';
|
3
|
+
export const POLToTokenAmount = ETHToTokenAmount;
|
4
|
+
export class PolygonToken extends EthereumToken {
|
5
|
+
constructor({ logger = TurboWinstonLogger.default, gatewayUrl = 'https://polygon-rpc.com/', pollingOptions = {
|
6
|
+
maxAttempts: 10,
|
7
|
+
pollingIntervalMs: 4_000,
|
8
|
+
initialBackoffMs: 5_000,
|
9
|
+
}, } = {}) {
|
10
|
+
super({ logger, gatewayUrl, pollingOptions });
|
11
|
+
}
|
12
|
+
}
|
package/lib/esm/common/turbo.js
CHANGED
@@ -100,8 +100,10 @@ export class TurboUnauthenticatedClient {
|
|
100
100
|
/**
|
101
101
|
* Returns the connected target Turbo wallet addresses for all supported tokens.
|
102
102
|
*/
|
103
|
-
getTurboCryptoWallets() {
|
104
|
-
|
103
|
+
async getTurboCryptoWallets() {
|
104
|
+
const wallets = await this.paymentService.getTurboCryptoWallets();
|
105
|
+
wallets.pol = wallets.matic;
|
106
|
+
return wallets;
|
105
107
|
}
|
106
108
|
}
|
107
109
|
export class TurboAuthenticatedClient extends TurboUnauthenticatedClient {
|
package/lib/esm/node/factory.js
CHANGED
@@ -35,6 +35,7 @@ export class TurboFactory extends TurboBaseFactory {
|
|
35
35
|
});
|
36
36
|
}
|
37
37
|
static authenticated({ privateKey, signer: providedSigner, paymentServiceConfig = {}, uploadServiceConfig = {}, token, tokenMap, gatewayUrl, tokenTools, }) {
|
38
|
+
token = token === 'pol' ? 'matic' : token;
|
38
39
|
if (!token) {
|
39
40
|
if (providedSigner) {
|
40
41
|
// Derive token from signer if not provided
|
package/lib/esm/types.js
CHANGED
@@ -13,7 +13,14 @@ export const fiatCurrencyTypes = [
|
|
13
13
|
export function isCurrency(currency) {
|
14
14
|
return fiatCurrencyTypes.includes(currency);
|
15
15
|
}
|
16
|
-
export const tokenTypes = [
|
16
|
+
export const tokenTypes = [
|
17
|
+
'arweave',
|
18
|
+
'solana',
|
19
|
+
'ethereum',
|
20
|
+
'kyve',
|
21
|
+
'matic',
|
22
|
+
'pol',
|
23
|
+
];
|
17
24
|
export const isNodeUploadFolderParams = (p) => p.folderPath !== undefined;
|
18
25
|
export const isWebUploadFolderParams = (p) => p.files !== undefined;
|
19
26
|
export function isKyvePrivateKey(wallet) {
|
package/lib/esm/utils/common.js
CHANGED
@@ -36,6 +36,7 @@ export function createTurboSigner({ signer: clientProvidedSigner, privateKey: cl
|
|
36
36
|
case 'solana':
|
37
37
|
return new HexSolanaSigner(clientProvidedPrivateKey);
|
38
38
|
case 'ethereum':
|
39
|
+
case 'matic':
|
39
40
|
if (!isEthPrivateKey(clientProvidedPrivateKey)) {
|
40
41
|
throw new Error('A valid Ethereum private key must be provided for EthereumSigner.');
|
41
42
|
}
|
package/lib/esm/version.js
CHANGED
package/lib/esm/web/factory.js
CHANGED
@@ -33,6 +33,7 @@ export class TurboFactory extends TurboBaseFactory {
|
|
33
33
|
});
|
34
34
|
}
|
35
35
|
static authenticated({ privateKey, signer: providedSigner, paymentServiceConfig = {}, uploadServiceConfig = {}, token, gatewayUrl, tokenMap, tokenTools, }) {
|
36
|
+
token = token === 'pol' ? 'matic' : token;
|
36
37
|
if (!token) {
|
37
38
|
if (providedSigner) {
|
38
39
|
// Derive token from signer if not provided
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"balance.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/balance.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,cAAc,EAAE,MAAM,aAAa,CAAC;AAG7C,wBAAsB,OAAO,CAAC,OAAO,EAAE,cAAc,iBAgCpD"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"cryptoFund.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/cryptoFund.ts"],"names":[],"mappings":"AAoBA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAOhD,wBAAsB,UAAU,CAAC,OAAO,EAAE,iBAAiB,iBAqD1D"}
|
@@ -0,0 +1,22 @@
|
|
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
|
+
export * from './balance.js';
|
18
|
+
export * from './cryptoFund.js';
|
19
|
+
export * from './topUp.js';
|
20
|
+
export * from './uploadFile.js';
|
21
|
+
export * from './uploadFolder.js';
|
22
|
+
//# sourceMappingURL=index.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAEH,cAAc,cAAc,CAAC;AAC7B,cAAc,iBAAiB,CAAC;AAChC,cAAc,YAAY,CAAC;AAC3B,cAAc,iBAAiB,CAAC;AAChC,cAAc,mBAAmB,CAAC"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"topUp.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/topUp.ts"],"names":[],"mappings":"AAsBA,OAAO,EAAE,YAAY,EAAE,MAAM,aAAa,CAAC;AAgB3C,wBAAsB,KAAK,CAAC,OAAO,EAAE,YAAY,iBA4DhD"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"uploadFile.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/uploadFile.ts"],"names":[],"mappings":"AAmBA,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAGhD,wBAAsB,UAAU,CAAC,OAAO,EAAE,iBAAiB,GAAG,OAAO,CAAC,IAAI,CAAC,CAiB1E"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"uploadFolder.d.ts","sourceRoot":"","sources":["../../../../src/cli/commands/uploadFolder.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,mBAAmB,EAAE,MAAM,aAAa,CAAC;AAGlD,wBAAsB,YAAY,CAChC,OAAO,EAAE,mBAAmB,GAC3B,OAAO,CAAC,IAAI,CAAC,CAuBf"}
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"constants.d.ts","sourceRoot":"","sources":["../../../src/cli/constants.ts"],"names":[],"mappings":"AAkBA,eAAO,MAAM,YAAY,EAAE;IAAE,IAAI,EAAE,MAAM,CAAC;IAAC,KAAK,EAAE,MAAM,CAAA;CAAE,EAIzD,CAAC"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/cli/utils.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAGlD,OAAO,EACL,SAAS,EACT,wBAAwB,EAExB,iCAAiC,EAKlC,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,cAAc,EACd,aAAa,EACb,mBAAmB,EACnB,aAAa,EACd,MAAM,YAAY,CAAC;AAEpB,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,QAG9C;AAED,wBAAsB,UAAU,CAAC,CAAC,SAAS,YAAY,EACrD,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,iBAUtC;AAED,UAAU,eAAe;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B;AAED,wBAAgB,YAAY,CAC1B,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,eAAe,EAAE,GACzB,OAAO,CAKT;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,SAAS,CAU5D;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAMzD;AAED,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAajE;AAED,wBAAsB,8BAA8B,CAClD,OAAO,EAAE,cAAc,GACtB,OAAO,CAAC;IACT,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;CAChC,CAAC,CASD;AAED,wBAAsB,6BAA6B,CAAC,OAAO,EAAE,aAAa,+BAUzE;AAED,wBAAsB,qBAAqB,CAAC,EAC1C,QAAQ,EACR,UAAU,EACV,UAAU,EACV,KAAK,GACN,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,CAqBjC;
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/cli/utils.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,OAAO,EAAE,YAAY,EAAE,MAAM,WAAW,CAAC;AAGlD,OAAO,EACL,SAAS,EACT,wBAAwB,EAExB,iCAAiC,EAKlC,MAAM,kBAAkB,CAAC;AAE1B,OAAO,EACL,cAAc,EACd,aAAa,EACb,mBAAmB,EACnB,aAAa,EACd,MAAM,YAAY,CAAC;AAEpB,wBAAgB,gBAAgB,CAAC,KAAK,EAAE,OAAO,QAG9C;AAED,wBAAsB,UAAU,CAAC,CAAC,SAAS,YAAY,EACrD,OAAO,EAAE,OAAO,EAChB,MAAM,EAAE,CAAC,OAAO,EAAE,CAAC,KAAK,OAAO,CAAC,IAAI,CAAC,iBAUtC;AAED,UAAU,eAAe;IACvB,KAAK,EAAE,MAAM,CAAC;IACd,WAAW,EAAE,MAAM,CAAC;IACpB,OAAO,CAAC,EAAE,MAAM,GAAG,OAAO,CAAC;CAC5B;AAED,wBAAgB,YAAY,CAC1B,OAAO,EAAE,OAAO,EAChB,OAAO,EAAE,eAAe,EAAE,GACzB,OAAO,CAKT;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,SAAS,CAU5D;AAED,wBAAgB,gBAAgB,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAMzD;AAED,wBAAgB,wBAAwB,CAAC,OAAO,EAAE,OAAO,GAAG,MAAM,CAajE;AAED,wBAAsB,8BAA8B,CAClD,OAAO,EAAE,cAAc,GACtB,OAAO,CAAC;IACT,OAAO,EAAE,MAAM,GAAG,SAAS,CAAC;IAC5B,UAAU,EAAE,MAAM,GAAG,SAAS,CAAC;CAChC,CAAC,CASD;AAED,wBAAsB,6BAA6B,CAAC,OAAO,EAAE,aAAa,+BAUzE;AAED,wBAAsB,qBAAqB,CAAC,EAC1C,QAAQ,EACR,UAAU,EACV,UAAU,EACV,KAAK,GACN,EAAE,aAAa,GAAG,OAAO,CAAC,MAAM,CAAC,CAqBjC;AAWD,wBAAgB,iBAAiB,CAC/B,OAAO,EAAE,aAAa,GACrB,iCAAiC,CAmBnC;AAED,wBAAsB,gBAAgB,CACpC,OAAO,EAAE,aAAa,GACrB,OAAO,CAAC,wBAAwB,CAAC,CAOnC;AAED,wBAAgB,sBAAsB,CAAC,OAAO,EAAE,mBAAmB,GAAG;IACpE,UAAU,EAAE,MAAM,CAAC;IACnB,SAAS,EAAE,MAAM,GAAG,SAAS,CAAC;IAC9B,YAAY,EAAE,MAAM,GAAG,SAAS,CAAC;IACjC,eAAe,EAAE,OAAO,CAAC;IACzB,oBAAoB,EAAE,MAAM,CAAC;CAC9B,CAYA"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../src/common/factory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,iCAAiC,EAAE,MAAM,aAAa,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEjD,OAAO,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAC;AAGxD,8BAAsB,gBAAgB;IACpC,SAAS,CAAC,MAAM,CAAC,MAAM,qBAA8B;IAGrD,MAAM,CAAC,WAAW,CAAC,KAAK,EAAE,MAAM;IAKhC,MAAM,CAAC,YAAY,CAAC,MAAM,EAAE,MAAM;IAIlC,MAAM,CAAC,eAAe,CAAC,EACrB,oBAAyB,EACzB,mBAAwB,EACxB,KAAK,GACN,GAAE,iCAAsC;
|
1
|
+
{"version":3,"file":"factory.d.ts","sourceRoot":"","sources":["../../../src/common/factory.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,iCAAiC,EAAE,MAAM,aAAa,CAAC;AAChE,OAAO,EAAE,kBAAkB,EAAE,MAAM,aAAa,CAAC;AAEjD,OAAO,EAAE,0BAA0B,EAAE,MAAM,YAAY,CAAC;AAGxD,8BAAsB,gBAAgB;IACpC,SAAS,CAAC,MAAM,CAAC,MAAM,qBAA8B;IAGrD,MAAM,CAAC,WAAW,CAAC,KAAK,EAAE,MAAM;IAKhC,MAAM,CAAC,YAAY,CAAC,MAAM,EAAE,MAAM;IAIlC,MAAM,CAAC,eAAe,CAAC,EACrB,oBAAyB,EACzB,mBAAwB,EACxB,KAAK,GACN,GAAE,iCAAsC;CAkB1C"}
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"signer.d.ts","sourceRoot":"","sources":["../../../src/common/signer.ts"],"names":[],"mappings":"AA0BA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAGrC,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,sBAAsB,EACtB,SAAS,EACT,mBAAmB,EACnB,yBAAyB,EACzB,gBAAgB,EAChB,WAAW,EACX,0BAA0B,EAC1B,WAAW,EACZ,MAAM,aAAa,CAAC;AAQrB;;GAEG;AACH,8BAAsB,2BACpB,YAAW,mBAAmB;IAE9B,QAAQ,CAAC,YAAY,CAAC,EACpB,iBAAiB,EACjB,eAAe,EACf,YAAY,GACb,EAAE,gBAAgB,CAAC,iBAAiB,CAAC,GAAG,OAAO,CAAC,0BAA0B,CAAC;IAE5E,SAAS,CAAC,MAAM,EAAE,WAAW,CAAC;IAC9B,SAAS,CAAC,MAAM,EAAE,WAAW,CAAC;IAC9B,SAAS,CAAC,KAAK,EAAE,SAAS,CAAC;gBAEf,EACV,MAAM,EACN,MAAmC,EACnC,KAAK,GACN,EAAE,yBAAyB;IAM5B,OAAO,CAAC,oBAAoB;
|
1
|
+
{"version":3,"file":"signer.d.ts","sourceRoot":"","sources":["../../../src/common/signer.ts"],"names":[],"mappings":"AA0BA,OAAO,EAAE,MAAM,EAAE,MAAM,aAAa,CAAC;AAGrC,OAAO,EACL,iBAAiB,EACjB,aAAa,EACb,sBAAsB,EACtB,SAAS,EACT,mBAAmB,EACnB,yBAAyB,EACzB,gBAAgB,EAChB,WAAW,EACX,0BAA0B,EAC1B,WAAW,EACZ,MAAM,aAAa,CAAC;AAQrB;;GAEG;AACH,8BAAsB,2BACpB,YAAW,mBAAmB;IAE9B,QAAQ,CAAC,YAAY,CAAC,EACpB,iBAAiB,EACjB,eAAe,EACf,YAAY,GACb,EAAE,gBAAgB,CAAC,iBAAiB,CAAC,GAAG,OAAO,CAAC,0BAA0B,CAAC;IAE5E,SAAS,CAAC,MAAM,EAAE,WAAW,CAAC;IAC9B,SAAS,CAAC,MAAM,EAAE,WAAW,CAAC;IAC9B,SAAS,CAAC,KAAK,EAAE,SAAS,CAAC;gBAEf,EACV,MAAM,EACN,MAAmC,EACnC,KAAK,GACN,EAAE,yBAAyB;IAM5B,OAAO,CAAC,oBAAoB;IAyBf,4BAA4B;;;;;IAY5B,YAAY,IAAI,OAAO,CAAC,MAAM,CAAC;IAI/B,gBAAgB,IAAI,OAAO,CAAC,aAAa,CAAC;IAOvD,gGAAgG;IACnF,eAAe,CAAC,EAC3B,MAAM,EACN,MAAM,EACN,UAAU,GACX,EAAE,sBAAsB,GAAG,OAAO,CAAC,MAAM,CAAC;IA+C9B,QAAQ,CAAC,UAAU,EAAE,UAAU,GAAG,OAAO,CAAC,UAAU,CAAC;CAgBnE"}
|
@@ -17,12 +17,7 @@
|
|
17
17
|
import { BigNumber } from 'bignumber.js';
|
18
18
|
import { TokenFactory, TokenType } from '../../types.js';
|
19
19
|
export declare const defaultTokenMap: TokenFactory;
|
20
|
-
export declare const tokenToBaseMap:
|
21
|
-
readonly arweave: (a: BigNumber.Value) => string;
|
22
|
-
readonly solana: (a: BigNumber.Value) => string;
|
23
|
-
readonly ethereum: (a: BigNumber.Value) => string;
|
24
|
-
readonly kyve: (a: BigNumber.Value) => string;
|
25
|
-
};
|
20
|
+
export declare const tokenToBaseMap: Record<TokenType, (a: BigNumber.Value) => BigNumber.Value>;
|
26
21
|
export declare function isTokenType(token: string): token is TokenType;
|
27
22
|
export * from './arweave.js';
|
28
23
|
export * from './solana.js';
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/common/token/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,OAAO,EAEL,YAAY,EACZ,SAAS,EAEV,MAAM,gBAAgB,CAAC;
|
1
|
+
{"version":3,"file":"index.d.ts","sourceRoot":"","sources":["../../../../src/common/token/index.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AAEzC,OAAO,EAEL,YAAY,EACZ,SAAS,EAEV,MAAM,gBAAgB,CAAC;AAOxB,eAAO,MAAM,eAAe,EAAE,YAOpB,CAAC;AAEX,eAAO,MAAM,cAAc,EAAE,MAAM,CACjC,SAAS,EACT,CAAC,CAAC,EAAE,SAAS,CAAC,KAAK,KAAK,SAAS,CAAC,KAAK,CAQ/B,CAAC;AAEX,wBAAgB,WAAW,CAAC,KAAK,EAAE,MAAM,GAAG,KAAK,IAAI,SAAS,CAE7D;AAED,cAAc,cAAc,CAAC;AAC7B,cAAc,aAAa,CAAC;AAC5B,cAAc,eAAe,CAAC;AAC9B,cAAc,WAAW,CAAC"}
|