@ardrive/turbo-sdk 1.11.0-alpha.1 → 1.11.0-alpha.3
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 +136 -10
- package/bundles/web.bundle.min.js +2 -1
- package/lib/cjs/cli/cli.js +55 -0
- package/lib/cjs/cli/commands.js +47 -0
- package/lib/cjs/cli/utils.js +161 -0
- package/lib/cjs/version.js +1 -1
- package/lib/esm/cli/cli.js +53 -0
- package/lib/esm/cli/commands.js +43 -0
- package/lib/esm/cli/utils.js +150 -0
- package/lib/esm/version.js +1 -1
- package/lib/types/cli/cli.d.ts +3 -0
- package/lib/types/cli/cli.d.ts.map +1 -0
- package/lib/types/cli/commands.d.ts +27 -0
- package/lib/types/cli/commands.d.ts.map +1 -0
- package/lib/types/cli/utils.d.ts +105 -0
- package/lib/types/cli/utils.d.ts.map +1 -0
- package/lib/types/common/turbo.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/version.d.ts +1 -1
- package/lib/types/version.d.ts.map +1 -1
- package/package.json +5 -1
package/README.md
CHANGED
@@ -31,6 +31,8 @@ Welcome to the `@ardrive/turbo-sdk`! This SDK provides functionality for interac
|
|
31
31
|
- [Ethereum Private Key](#ethereum-private-key)
|
32
32
|
- [HexSolanaSigner](#hexsolanasigner)
|
33
33
|
- [Solana Secret Key](#solana-secret-key)
|
34
|
+
- [KYVE Private Key](#kyve-private-key)
|
35
|
+
- [KYVE Mnemonic](#kyve-mnemonic)
|
34
36
|
- [TurboUnauthenticatedClient](#turbounauthenticatedclient)
|
35
37
|
- [`getSupportedCurrencies()`](#getsupportedcurrencies)
|
36
38
|
- [`getSupportedCountries()`](#getsupportedcountries)
|
@@ -40,9 +42,10 @@ Welcome to the `@ardrive/turbo-sdk`! This SDK provides functionality for interac
|
|
40
42
|
- [`getUploadCosts({ bytes })`](#getuploadcosts-bytes-)
|
41
43
|
- [`uploadSignedDataItem({ dataItemStreamFactory, dataItemSizeFactory, signal })`](#uploadsigneddataitem-dataitemstreamfactory-dataitemsizefactory-signal-)
|
42
44
|
- [`createCheckoutSession({ amount, owner })`](#createcheckoutsession-amount-owner-)
|
43
|
-
- [Arweave (AR)](#arweave-ar)
|
44
|
-
- [Ethereum (ETH)](#ethereum-eth)
|
45
|
-
- [Solana (SOL)](#solana-sol)
|
45
|
+
- [Arweave (AR) Fiat Top Up](#arweave-ar-fiat-top-up)
|
46
|
+
- [Ethereum (ETH) Fiat Top Up](#ethereum-eth-fiat-top-up)
|
47
|
+
- [Solana (SOL) Fiat Top Up](#solana-sol-fiat-top-up)
|
48
|
+
- [KYVE Fiat Top Up](#kyve-fiat-top-up)
|
46
49
|
- [`submitFundTransaction({ txId })`](#submitfundtransaction-txid-)
|
47
50
|
- [TurboAuthenticatedClient](#turboauthenticatedclient)
|
48
51
|
- [`getBalance()`](#getbalance)
|
@@ -53,8 +56,16 @@ Welcome to the `@ardrive/turbo-sdk`! This SDK provides functionality for interac
|
|
53
56
|
- [NodeJS Upload Folder](#nodejs-upload-folder)
|
54
57
|
- [Browser Upload Folder](#browser-upload-folder)
|
55
58
|
- [`topUpWithTokens({ tokenAmount, feeMultiplier })`](#topupwithtokens-tokenamount-feemultiplier-)
|
56
|
-
- [
|
57
|
-
- [
|
59
|
+
- [Arweave (AR) Crypto Top Up](#arweave-ar-crypto-top-up)
|
60
|
+
- [Ethereum (ETH) Crypto Top Up](#ethereum-eth-crypto-top-up)
|
61
|
+
- [Solana (SOL) Crypto Top Up](#solana-sol-crypto-top-up)
|
62
|
+
- [KYVE Crypto Top Up](#kyve-crypto-top-up)
|
63
|
+
- [CLI](#cli)
|
64
|
+
- [Install CLI](#install-cli)
|
65
|
+
- [CLI Usage](#cli-usage)
|
66
|
+
- [Options](#options)
|
67
|
+
- [Commands](#commands)
|
68
|
+
- [`crypto-fund`](#crypto-fund)
|
58
69
|
- [Developers](#developers)
|
59
70
|
- [Requirements](#requirements)
|
60
71
|
- [Setup & Build](#setup--build)
|
@@ -268,6 +279,26 @@ const turbo = TurboFactory.authenticated({
|
|
268
279
|
});
|
269
280
|
```
|
270
281
|
|
282
|
+
##### KYVE Private Key
|
283
|
+
|
284
|
+
```typescript
|
285
|
+
const turbo = TurboFactory.authenticated({
|
286
|
+
privateKey: kyveHexadecimalPrivateKey,
|
287
|
+
token: 'kyve',
|
288
|
+
});
|
289
|
+
```
|
290
|
+
|
291
|
+
##### KYVE Mnemonic
|
292
|
+
|
293
|
+
```typescript
|
294
|
+
import { privateKeyFromKyveMnemonic } from '@ardrive/turbo-sdk';
|
295
|
+
|
296
|
+
const turbo = TurboFactory.authenticated({
|
297
|
+
privateKey: privateKeyFromKyveMnemonic(mnemonic),
|
298
|
+
token: 'kyve',
|
299
|
+
});
|
300
|
+
```
|
301
|
+
|
271
302
|
### TurboUnauthenticatedClient
|
272
303
|
|
273
304
|
#### `getSupportedCurrencies()`
|
@@ -341,7 +372,7 @@ const uploadResponse = await turbo.uploadSignedDataItem({
|
|
341
372
|
|
342
373
|
Creates a Stripe checkout session for a Turbo Top Up with the provided amount, currency, owner. The returned URL can be opened in the browser, all payments are processed by Stripe. To leverage promo codes, see [TurboAuthenticatedClient].
|
343
374
|
|
344
|
-
##### Arweave (AR)
|
375
|
+
##### Arweave (AR) Fiat Top Up
|
345
376
|
|
346
377
|
```typescript
|
347
378
|
const { url, winc, paymentAmount, quotedPaymentAmount, adjustments } =
|
@@ -364,7 +395,7 @@ if (process.platform === 'darwin') {
|
|
364
395
|
}
|
365
396
|
```
|
366
397
|
|
367
|
-
##### Ethereum (ETH)
|
398
|
+
##### Ethereum (ETH) Fiat Top Up
|
368
399
|
|
369
400
|
```ts
|
370
401
|
const turbo = TurboFactory.unauthenticated({ token: 'ethereum' });
|
@@ -375,7 +406,7 @@ const { url, winc, paymentAmount } = await turbo.createCheckoutSession({
|
|
375
406
|
});
|
376
407
|
```
|
377
408
|
|
378
|
-
##### Solana (SOL)
|
409
|
+
##### Solana (SOL) Fiat Top Up
|
379
410
|
|
380
411
|
```ts
|
381
412
|
const turbo = TurboFactory.unauthenticated({ token: 'solana' });
|
@@ -386,6 +417,17 @@ const { url, winc, paymentAmount } = await turbo.createCheckoutSession({
|
|
386
417
|
});
|
387
418
|
```
|
388
419
|
|
420
|
+
##### KYVE Fiat Top Up
|
421
|
+
|
422
|
+
```ts
|
423
|
+
const turbo = TurboFactory.unauthenticated({ token: 'kyve' });
|
424
|
+
|
425
|
+
const { url, winc, paymentAmount } = await turbo.createCheckoutSession({
|
426
|
+
amount: USD(10.0), // $10.00 USD
|
427
|
+
owner: publicKyveAddress,
|
428
|
+
});
|
429
|
+
```
|
430
|
+
|
389
431
|
#### `submitFundTransaction({ txId })`
|
390
432
|
|
391
433
|
Submits the transaction ID of a funding transaction to Turbo Payment Service for top up processing. The `txId` is the transaction ID of the transaction to be submitted.
|
@@ -536,6 +578,8 @@ Tops up the connected wallet with Credits by submitting a payment transaction fo
|
|
536
578
|
- The `tokenAmount` is the amount of tokens in the token type's smallest unit value (e.g: Winston for arweave token type) to fund the wallet with.
|
537
579
|
- The `feeMultiplier` (optional) is the multiplier to apply to the reward for the transaction to modify its chances of being mined. Credits will be added to the wallet balance after the transaction is confirmed on the given blockchain. Defaults to 1.0, meaning no multiplier.
|
538
580
|
|
581
|
+
##### Arweave (AR) Crypto Top Up
|
582
|
+
|
539
583
|
```typescript
|
540
584
|
const turbo = TurboFactory.authenticated({ signer, token: 'arweave' });
|
541
585
|
|
@@ -545,7 +589,7 @@ const { winc, status, id, ...fundResult } = await turbo.topUpWithTokens({
|
|
545
589
|
});
|
546
590
|
```
|
547
591
|
|
548
|
-
##### Ethereum (ETH)
|
592
|
+
##### Ethereum (ETH) Crypto Top Up
|
549
593
|
|
550
594
|
```ts
|
551
595
|
const turbo = TurboFactory.authenticated({ signer, token: 'ethereum' });
|
@@ -555,7 +599,7 @@ const { winc, status, id, ...fundResult } = await turbo.topUpWithTokens({
|
|
555
599
|
});
|
556
600
|
```
|
557
601
|
|
558
|
-
##### Solana (SOL)
|
602
|
+
##### Solana (SOL) Crypto Top Up
|
559
603
|
|
560
604
|
```ts
|
561
605
|
const turbo = TurboFactory.authenticated({ signer, token: 'solana' });
|
@@ -565,6 +609,88 @@ const { winc, status, id, ...fundResult } = await turbo.topUpWithTokens({
|
|
565
609
|
});
|
566
610
|
```
|
567
611
|
|
612
|
+
##### KYVE Crypto Top Up
|
613
|
+
|
614
|
+
```ts
|
615
|
+
const turbo = TurboFactory.authenticated({ signer, token: 'kyve' });
|
616
|
+
|
617
|
+
const { winc, status, id, ...fundResult } = await turbo.topUpWithTokens({
|
618
|
+
tokenAmount: KYVEToTokenAmount(0.00001), // 0.00001 KYVE
|
619
|
+
});
|
620
|
+
```
|
621
|
+
|
622
|
+
## CLI
|
623
|
+
|
624
|
+
### Install CLI
|
625
|
+
|
626
|
+
Global installation:
|
627
|
+
|
628
|
+
```shell
|
629
|
+
npm install -g @ardrive/turbo-sdk
|
630
|
+
```
|
631
|
+
|
632
|
+
or
|
633
|
+
|
634
|
+
```shell
|
635
|
+
yarn global add @ardrive/turbo-sdk
|
636
|
+
```
|
637
|
+
|
638
|
+
or install locally as a dev dependency:
|
639
|
+
|
640
|
+
```shell
|
641
|
+
npm install --save-dev @ardrive/turbo-sdk
|
642
|
+
```
|
643
|
+
|
644
|
+
or
|
645
|
+
|
646
|
+
```shell
|
647
|
+
yarn add -D @ardrive/turbo-sdk
|
648
|
+
```
|
649
|
+
|
650
|
+
### CLI Usage
|
651
|
+
|
652
|
+
```shell
|
653
|
+
turbo --help
|
654
|
+
```
|
655
|
+
|
656
|
+
or from local installation:
|
657
|
+
|
658
|
+
```shell
|
659
|
+
yarn turbo --help
|
660
|
+
```
|
661
|
+
|
662
|
+
```shell
|
663
|
+
npx turbo --help
|
664
|
+
```
|
665
|
+
|
666
|
+
#### Options
|
667
|
+
|
668
|
+
- `-V, --version` - output the version number
|
669
|
+
- `-h, --help` - display help for command
|
670
|
+
- `--dev` - Enable development endpoints (default: false)
|
671
|
+
- `-g, --gateway <url>` - Set a custom crypto gateway URL
|
672
|
+
- `-t, --token <token>` - Token type for the command or connected wallet (default: "arweave")
|
673
|
+
|
674
|
+
- `-w, --wallet-file <filePath>` - Wallet file to use with the action. Formats accepted: JWK.json, KYVE or ETH private key as a string, or SOL Secret Key as a Uint8Array
|
675
|
+
- `-m, --mnemonic <phrase>` - Mnemonic to use with the action (KYVE only)
|
676
|
+
- `-p, --private-key <key>` - Private key to use with the action
|
677
|
+
|
678
|
+
#### Commands
|
679
|
+
|
680
|
+
##### `crypto-fund`
|
681
|
+
|
682
|
+
Fund a wallet with Turbo Credits by submitting a payment transaction for the crypto amount to the Turbo wallet and then submitting that transaction id to Turbo Payment Service for top up processing.
|
683
|
+
|
684
|
+
Command Options:
|
685
|
+
|
686
|
+
- `-v, --value <value>` - Amount of tokens in the token type's smallest unit value to fund the wallet with
|
687
|
+
|
688
|
+
e.g:
|
689
|
+
|
690
|
+
```shell
|
691
|
+
turbo crypto-fund --value 0.0001 --token kyve --private-key 'b27...45c'
|
692
|
+
```
|
693
|
+
|
568
694
|
## Developers
|
569
695
|
|
570
696
|
### Requirements
|
@@ -312251,7 +312251,7 @@ var import_winston = __toESM(require_winston(), 1);
|
|
312251
312251
|
init_dirname();
|
312252
312252
|
init_buffer2();
|
312253
312253
|
init_process2();
|
312254
|
-
var version16 = "1.
|
312254
|
+
var version16 = "1.11.0-alpha.2";
|
312255
312255
|
|
312256
312256
|
// src/common/logger.ts
|
312257
312257
|
var TurboWinstonLogger = class _TurboWinstonLogger {
|
@@ -317103,6 +317103,7 @@ var TurboAuthenticatedClient = class extends TurboUnauthenticatedClient {
|
|
317103
317103
|
topUpWithTokens(p8) {
|
317104
317104
|
return this.paymentService.topUpWithTokens(p8);
|
317105
317105
|
}
|
317106
|
+
// TODO: walletNativeAddress() {
|
317106
317107
|
};
|
317107
317108
|
|
317108
317109
|
// src/common/factory.ts
|
@@ -0,0 +1,55 @@
|
|
1
|
+
#!/usr/bin/env node
|
2
|
+
"use strict";
|
3
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
4
|
+
/**
|
5
|
+
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc. All Rights Reserved.
|
6
|
+
*
|
7
|
+
* This program is free software: you can redistribute it and/or modify
|
8
|
+
* it under the terms of the GNU Affero General Public License as published by
|
9
|
+
* the Free Software Foundation, either version 3 of the License, or
|
10
|
+
* (at your option) any later version.
|
11
|
+
*
|
12
|
+
* This program is distributed in the hope that it will be useful,
|
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.
|
16
|
+
*
|
17
|
+
* You should have received a copy of the GNU Affero General Public License
|
18
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
19
|
+
*/
|
20
|
+
// eslint-disable-next-line header/header -- This is a CLI file
|
21
|
+
const commander_1 = require("commander");
|
22
|
+
const version_js_1 = require("../version.js");
|
23
|
+
const commands_js_1 = require("./commands.js");
|
24
|
+
const utils_js_1 = require("./utils.js");
|
25
|
+
(0, utils_js_1.applyOptions)(commander_1.program
|
26
|
+
.name('turbo')
|
27
|
+
.version(version_js_1.version)
|
28
|
+
.description('Turbo CLI')
|
29
|
+
.helpCommand(true), utils_js_1.globalOptions);
|
30
|
+
(0, utils_js_1.applyOptions)(commander_1.program.command('get-balance').description('Get balance of a Turbo address'), [utils_js_1.optionMap.address, utils_js_1.optionMap.token]).action((address, options) => {
|
31
|
+
(0, commands_js_1.getBalance)(address, options.token);
|
32
|
+
});
|
33
|
+
(0, utils_js_1.applyOptions)(commander_1.program.command('top-up').description('Top up a Turbo address with Fiat'), [utils_js_1.optionMap.address, utils_js_1.optionMap.value, utils_js_1.optionMap.token]).action((options) => {
|
34
|
+
console.log('TODO: fiat top-up', options.address, options.token, options.value);
|
35
|
+
});
|
36
|
+
(0, utils_js_1.applyOptions)(commander_1.program.command('crypto-fund').description('Top up a wallet with crypto'), [...utils_js_1.walletOptions, utils_js_1.optionMap.value]).action(async (_commandOptions, command) => {
|
37
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
38
|
+
const options = command.optsWithGlobals();
|
39
|
+
const token = (0, utils_js_1.tokenFromOptions)(options);
|
40
|
+
const value = (0, utils_js_1.valueFromOptions)(options);
|
41
|
+
const privateKey = await (0, utils_js_1.privateKeyFromOptions)(options, token);
|
42
|
+
const config = (0, utils_js_1.configFromOptions)(options);
|
43
|
+
(0, commands_js_1.cryptoFund)({ privateKey, value, token, config });
|
44
|
+
});
|
45
|
+
(0, utils_js_1.applyOptions)(commander_1.program
|
46
|
+
.command('upload-folder')
|
47
|
+
.description('Upload a folder to a Turbo address')
|
48
|
+
.argument('<folderPath>', 'Directory to upload'), [...utils_js_1.walletOptions, utils_js_1.optionMap.token]).action((directory, options) => {
|
49
|
+
console.log('upload-folder TODO', directory, options);
|
50
|
+
});
|
51
|
+
if (process.argv[1].includes('bin/turbo') || // Running from global .bin
|
52
|
+
process.argv[1].includes('cli/cli') // Running from source
|
53
|
+
) {
|
54
|
+
commander_1.program.parse(process.argv);
|
55
|
+
}
|
@@ -0,0 +1,47 @@
|
|
1
|
+
"use strict";
|
2
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
3
|
+
exports.getBalance = getBalance;
|
4
|
+
exports.cryptoFund = cryptoFund;
|
5
|
+
/**
|
6
|
+
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc. All Rights Reserved.
|
7
|
+
*
|
8
|
+
* This program is free software: you can redistribute it and/or modify
|
9
|
+
* it under the terms of the GNU Affero General Public License as published by
|
10
|
+
* the Free Software Foundation, either version 3 of the License, or
|
11
|
+
* (at your option) any later version.
|
12
|
+
*
|
13
|
+
* This program is distributed in the hope that it will be useful,
|
14
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
15
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
16
|
+
* GNU Affero General Public License for more details.
|
17
|
+
*
|
18
|
+
* You should have received a copy of the GNU Affero General Public License
|
19
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
20
|
+
*/
|
21
|
+
const index_js_1 = require("../node/index.js");
|
22
|
+
async function getBalance(address, token) {
|
23
|
+
if (!(0, index_js_1.isTokenType)(token)) {
|
24
|
+
throw new Error('Invalid token type!');
|
25
|
+
}
|
26
|
+
const unauthenticatedTurbo = index_js_1.TurboFactory.unauthenticated({
|
27
|
+
paymentServiceConfig: { token },
|
28
|
+
});
|
29
|
+
console.log('unauthenticatedTurbo', unauthenticatedTurbo);
|
30
|
+
// const balance = await unauthenticatedTurbo.getBalance({
|
31
|
+
// owner: address,
|
32
|
+
// });
|
33
|
+
// TODO: Implement unauthenticated getBalance
|
34
|
+
console.log('TODO: Get balance for', address);
|
35
|
+
}
|
36
|
+
/** Fund the connected signer with crypto */
|
37
|
+
async function cryptoFund({ value, privateKey, token, config, }) {
|
38
|
+
const authenticatedTurbo = index_js_1.TurboFactory.authenticated({
|
39
|
+
...config,
|
40
|
+
privateKey: privateKey,
|
41
|
+
token,
|
42
|
+
});
|
43
|
+
const result = await authenticatedTurbo.topUpWithTokens({
|
44
|
+
tokenAmount: index_js_1.tokenToBaseMap[token](value),
|
45
|
+
});
|
46
|
+
console.log('Sent crypto fund transaction: \n', JSON.stringify(result, null, 2));
|
47
|
+
}
|
@@ -0,0 +1,161 @@
|
|
1
|
+
"use strict";
|
2
|
+
var __importDefault = (this && this.__importDefault) || function (mod) {
|
3
|
+
return (mod && mod.__esModule) ? mod : { "default": mod };
|
4
|
+
};
|
5
|
+
Object.defineProperty(exports, "__esModule", { value: true });
|
6
|
+
exports.globalOptions = exports.walletOptions = exports.optionMap = void 0;
|
7
|
+
exports.applyOptions = applyOptions;
|
8
|
+
exports.tokenFromOptions = tokenFromOptions;
|
9
|
+
exports.valueFromOptions = valueFromOptions;
|
10
|
+
exports.privateKeyFromOptions = privateKeyFromOptions;
|
11
|
+
exports.configFromOptions = configFromOptions;
|
12
|
+
/**
|
13
|
+
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc. All Rights Reserved.
|
14
|
+
*
|
15
|
+
* This program is free software: you can redistribute it and/or modify
|
16
|
+
* it under the terms of the GNU Affero General Public License as published by
|
17
|
+
* the Free Software Foundation, either version 3 of the License, or
|
18
|
+
* (at your option) any later version.
|
19
|
+
*
|
20
|
+
* This program is distributed in the hope that it will be useful,
|
21
|
+
* but WITHOUT ANY WARRANTY; without even the implied warranty of
|
22
|
+
* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
23
|
+
* GNU Affero General Public License for more details.
|
24
|
+
*
|
25
|
+
* You should have received a copy of the GNU Affero General Public License
|
26
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
27
|
+
*/
|
28
|
+
const bs58_1 = __importDefault(require("bs58"));
|
29
|
+
const fs_1 = require("fs");
|
30
|
+
const index_js_1 = require("../node/index.js");
|
31
|
+
exports.optionMap = {
|
32
|
+
token: {
|
33
|
+
alias: '-t, --token <type>',
|
34
|
+
description: 'Token type for wallet or action',
|
35
|
+
default: 'arweave',
|
36
|
+
},
|
37
|
+
currency: {
|
38
|
+
alias: '-c, --currency <currency>',
|
39
|
+
description: 'Currency type to top up with',
|
40
|
+
default: 'usd',
|
41
|
+
},
|
42
|
+
address: {
|
43
|
+
alias: '-a, --address <walletAddress>',
|
44
|
+
description: 'Wallet address to use for action',
|
45
|
+
},
|
46
|
+
value: {
|
47
|
+
alias: '-v, --value <value>',
|
48
|
+
description: 'Value of fiat currency or crypto token for action',
|
49
|
+
},
|
50
|
+
walletFile: {
|
51
|
+
alias: '-w, --wallet-file <filePath>',
|
52
|
+
description: 'Wallet file to use with the action. Formats accepted: JWK.json, KYVE or ETH private key as a string, or SOL Secret Key as a Uint8Array',
|
53
|
+
},
|
54
|
+
mnemonic: {
|
55
|
+
alias: '-m, --mnemonic <phrase>',
|
56
|
+
description: 'Mnemonic to use with the action',
|
57
|
+
},
|
58
|
+
privateKey: {
|
59
|
+
alias: '-p, --private-key <key>',
|
60
|
+
description: 'Private key to use with the action',
|
61
|
+
},
|
62
|
+
gateway: {
|
63
|
+
alias: '-g, --gateway <url>',
|
64
|
+
description: 'Set a custom crypto gateway URL',
|
65
|
+
default: undefined,
|
66
|
+
},
|
67
|
+
dev: {
|
68
|
+
alias: '--dev',
|
69
|
+
description: 'Enable development endpoints',
|
70
|
+
default: false,
|
71
|
+
},
|
72
|
+
debug: {
|
73
|
+
// TODO: Implement
|
74
|
+
alias: '--debug',
|
75
|
+
description: 'Enable verbose logging',
|
76
|
+
default: false,
|
77
|
+
},
|
78
|
+
quiet: {
|
79
|
+
// TODO: Implement
|
80
|
+
alias: '--quiet',
|
81
|
+
description: 'Disable logging',
|
82
|
+
default: false,
|
83
|
+
},
|
84
|
+
};
|
85
|
+
exports.walletOptions = [
|
86
|
+
exports.optionMap.walletFile,
|
87
|
+
exports.optionMap.mnemonic,
|
88
|
+
exports.optionMap.privateKey,
|
89
|
+
];
|
90
|
+
exports.globalOptions = [
|
91
|
+
exports.optionMap.dev,
|
92
|
+
exports.optionMap.gateway,
|
93
|
+
exports.optionMap.debug,
|
94
|
+
exports.optionMap.quiet,
|
95
|
+
exports.optionMap.token,
|
96
|
+
];
|
97
|
+
function applyOptions(command, options) {
|
98
|
+
[...options].forEach((option) => {
|
99
|
+
command.option(option.alias, option.description, option.default);
|
100
|
+
});
|
101
|
+
return command;
|
102
|
+
}
|
103
|
+
function tokenFromOptions(options) {
|
104
|
+
const token = options.token;
|
105
|
+
if (token === undefined) {
|
106
|
+
throw new Error('Token type required');
|
107
|
+
}
|
108
|
+
if (!(0, index_js_1.isTokenType)(token)) {
|
109
|
+
throw new Error('Invalid token type');
|
110
|
+
}
|
111
|
+
return token;
|
112
|
+
}
|
113
|
+
function valueFromOptions(options) {
|
114
|
+
const value = options.value;
|
115
|
+
if (value === undefined) {
|
116
|
+
throw new Error('Value is required. Use --value <value>');
|
117
|
+
}
|
118
|
+
return value;
|
119
|
+
}
|
120
|
+
async function privateKeyFromOptions({ mnemonic, privateKey, walletFile, }, token) {
|
121
|
+
if (mnemonic !== undefined) {
|
122
|
+
if (token === 'kyve') {
|
123
|
+
return (0, index_js_1.privateKeyFromKyveMnemonic)(mnemonic);
|
124
|
+
}
|
125
|
+
else {
|
126
|
+
// TODO: Implement other token types mnemonic to wallet
|
127
|
+
throw new Error('mnemonic provided but this token type mnemonic to wallet is not supported');
|
128
|
+
}
|
129
|
+
}
|
130
|
+
else if (walletFile !== undefined) {
|
131
|
+
const wallet = JSON.parse((0, fs_1.readFileSync)(walletFile, 'utf-8'));
|
132
|
+
return token === 'solana' ? bs58_1.default.encode(wallet) : wallet;
|
133
|
+
}
|
134
|
+
else if (privateKey !== undefined) {
|
135
|
+
return privateKey;
|
136
|
+
}
|
137
|
+
// TODO: Get TURBO_WALLET_FILE, TURBO_MNEMONIC, TURBO_PRIVATE_KEY or similar from ENV variables
|
138
|
+
// TODO: Add prompts for selecting wallet type and secure input
|
139
|
+
throw new Error('mnemonic or wallet file or private key is required');
|
140
|
+
}
|
141
|
+
const tokenToDevGatewayMap = {
|
142
|
+
arweave: 'https://arweave.net', // No arweave test net
|
143
|
+
solana: 'https://api.devnet.solana.com',
|
144
|
+
ethereum: 'https://ethereum-holesky-rpc.publicnode.com',
|
145
|
+
kyve: 'https://api.korellia.kyve.network',
|
146
|
+
};
|
147
|
+
function configFromOptions({ gateway, dev, token, }) {
|
148
|
+
let config = {};
|
149
|
+
if (dev) {
|
150
|
+
config = index_js_1.developmentTurboConfiguration;
|
151
|
+
config.gatewayUrl = tokenToDevGatewayMap[token];
|
152
|
+
}
|
153
|
+
else {
|
154
|
+
config = index_js_1.defaultTurboConfiguration;
|
155
|
+
}
|
156
|
+
// If gateway is provided, override the default or dev gateway
|
157
|
+
if (gateway !== undefined) {
|
158
|
+
config.gatewayUrl = gateway;
|
159
|
+
}
|
160
|
+
return config;
|
161
|
+
}
|
package/lib/cjs/version.js
CHANGED
@@ -0,0 +1,53 @@
|
|
1
|
+
#!/usr/bin/env node
|
2
|
+
/**
|
3
|
+
* Copyright (C) 2022-2024 Permanent Data Solutions, Inc. All Rights Reserved.
|
4
|
+
*
|
5
|
+
* This program is free software: you can redistribute it and/or modify
|
6
|
+
* it under the terms of the GNU Affero General Public License as published by
|
7
|
+
* the Free Software Foundation, either version 3 of the License, or
|
8
|
+
* (at your option) any later version.
|
9
|
+
*
|
10
|
+
* This program is distributed in the hope that it will be useful,
|
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.
|
14
|
+
*
|
15
|
+
* You should have received a copy of the GNU Affero General Public License
|
16
|
+
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
17
|
+
*/
|
18
|
+
// eslint-disable-next-line header/header -- This is a CLI file
|
19
|
+
import { program } from 'commander';
|
20
|
+
import { version } from '../version.js';
|
21
|
+
import { cryptoFund, getBalance } from './commands.js';
|
22
|
+
import { applyOptions, configFromOptions, globalOptions, optionMap, privateKeyFromOptions, tokenFromOptions, valueFromOptions, walletOptions, } from './utils.js';
|
23
|
+
applyOptions(program
|
24
|
+
.name('turbo')
|
25
|
+
.version(version)
|
26
|
+
.description('Turbo CLI')
|
27
|
+
.helpCommand(true), globalOptions);
|
28
|
+
applyOptions(program.command('get-balance').description('Get balance of a Turbo address'), [optionMap.address, optionMap.token]).action((address, options) => {
|
29
|
+
getBalance(address, options.token);
|
30
|
+
});
|
31
|
+
applyOptions(program.command('top-up').description('Top up a Turbo address with Fiat'), [optionMap.address, optionMap.value, optionMap.token]).action((options) => {
|
32
|
+
console.log('TODO: fiat top-up', options.address, options.token, options.value);
|
33
|
+
});
|
34
|
+
applyOptions(program.command('crypto-fund').description('Top up a wallet with crypto'), [...walletOptions, optionMap.value]).action(async (_commandOptions, command) => {
|
35
|
+
// eslint-disable-next-line @typescript-eslint/no-explicit-any
|
36
|
+
const options = command.optsWithGlobals();
|
37
|
+
const token = tokenFromOptions(options);
|
38
|
+
const value = valueFromOptions(options);
|
39
|
+
const privateKey = await privateKeyFromOptions(options, token);
|
40
|
+
const config = configFromOptions(options);
|
41
|
+
cryptoFund({ privateKey, value, token, config });
|
42
|
+
});
|
43
|
+
applyOptions(program
|
44
|
+
.command('upload-folder')
|
45
|
+
.description('Upload a folder to a Turbo address')
|
46
|
+
.argument('<folderPath>', 'Directory to upload'), [...walletOptions, optionMap.token]).action((directory, options) => {
|
47
|
+
console.log('upload-folder TODO', directory, options);
|
48
|
+
});
|
49
|
+
if (process.argv[1].includes('bin/turbo') || // Running from global .bin
|
50
|
+
process.argv[1].includes('cli/cli') // Running from source
|
51
|
+
) {
|
52
|
+
program.parse(process.argv);
|
53
|
+
}
|
@@ -0,0 +1,43 @@
|
|
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, isTokenType, tokenToBaseMap, } from '../node/index.js';
|
18
|
+
export async function getBalance(address, token) {
|
19
|
+
if (!isTokenType(token)) {
|
20
|
+
throw new Error('Invalid token type!');
|
21
|
+
}
|
22
|
+
const unauthenticatedTurbo = TurboFactory.unauthenticated({
|
23
|
+
paymentServiceConfig: { token },
|
24
|
+
});
|
25
|
+
console.log('unauthenticatedTurbo', unauthenticatedTurbo);
|
26
|
+
// const balance = await unauthenticatedTurbo.getBalance({
|
27
|
+
// owner: address,
|
28
|
+
// });
|
29
|
+
// TODO: Implement unauthenticated getBalance
|
30
|
+
console.log('TODO: Get balance for', address);
|
31
|
+
}
|
32
|
+
/** Fund the connected signer with crypto */
|
33
|
+
export async function cryptoFund({ value, privateKey, token, config, }) {
|
34
|
+
const authenticatedTurbo = TurboFactory.authenticated({
|
35
|
+
...config,
|
36
|
+
privateKey: privateKey,
|
37
|
+
token,
|
38
|
+
});
|
39
|
+
const result = await authenticatedTurbo.topUpWithTokens({
|
40
|
+
tokenAmount: tokenToBaseMap[token](value),
|
41
|
+
});
|
42
|
+
console.log('Sent crypto fund transaction: \n', JSON.stringify(result, null, 2));
|
43
|
+
}
|
@@ -0,0 +1,150 @@
|
|
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 bs58 from 'bs58';
|
18
|
+
import { readFileSync } from 'fs';
|
19
|
+
import { defaultTurboConfiguration, developmentTurboConfiguration, isTokenType, privateKeyFromKyveMnemonic, } from '../node/index.js';
|
20
|
+
export const optionMap = {
|
21
|
+
token: {
|
22
|
+
alias: '-t, --token <type>',
|
23
|
+
description: 'Token type for wallet or action',
|
24
|
+
default: 'arweave',
|
25
|
+
},
|
26
|
+
currency: {
|
27
|
+
alias: '-c, --currency <currency>',
|
28
|
+
description: 'Currency type to top up with',
|
29
|
+
default: 'usd',
|
30
|
+
},
|
31
|
+
address: {
|
32
|
+
alias: '-a, --address <walletAddress>',
|
33
|
+
description: 'Wallet address to use for action',
|
34
|
+
},
|
35
|
+
value: {
|
36
|
+
alias: '-v, --value <value>',
|
37
|
+
description: 'Value of fiat currency or crypto token for action',
|
38
|
+
},
|
39
|
+
walletFile: {
|
40
|
+
alias: '-w, --wallet-file <filePath>',
|
41
|
+
description: 'Wallet file to use with the action. Formats accepted: JWK.json, KYVE or ETH private key as a string, or SOL Secret Key as a Uint8Array',
|
42
|
+
},
|
43
|
+
mnemonic: {
|
44
|
+
alias: '-m, --mnemonic <phrase>',
|
45
|
+
description: 'Mnemonic to use with the action',
|
46
|
+
},
|
47
|
+
privateKey: {
|
48
|
+
alias: '-p, --private-key <key>',
|
49
|
+
description: 'Private key to use with the action',
|
50
|
+
},
|
51
|
+
gateway: {
|
52
|
+
alias: '-g, --gateway <url>',
|
53
|
+
description: 'Set a custom crypto gateway URL',
|
54
|
+
default: undefined,
|
55
|
+
},
|
56
|
+
dev: {
|
57
|
+
alias: '--dev',
|
58
|
+
description: 'Enable development endpoints',
|
59
|
+
default: false,
|
60
|
+
},
|
61
|
+
debug: {
|
62
|
+
// TODO: Implement
|
63
|
+
alias: '--debug',
|
64
|
+
description: 'Enable verbose logging',
|
65
|
+
default: false,
|
66
|
+
},
|
67
|
+
quiet: {
|
68
|
+
// TODO: Implement
|
69
|
+
alias: '--quiet',
|
70
|
+
description: 'Disable logging',
|
71
|
+
default: false,
|
72
|
+
},
|
73
|
+
};
|
74
|
+
export const walletOptions = [
|
75
|
+
optionMap.walletFile,
|
76
|
+
optionMap.mnemonic,
|
77
|
+
optionMap.privateKey,
|
78
|
+
];
|
79
|
+
export const globalOptions = [
|
80
|
+
optionMap.dev,
|
81
|
+
optionMap.gateway,
|
82
|
+
optionMap.debug,
|
83
|
+
optionMap.quiet,
|
84
|
+
optionMap.token,
|
85
|
+
];
|
86
|
+
export function applyOptions(command, options) {
|
87
|
+
[...options].forEach((option) => {
|
88
|
+
command.option(option.alias, option.description, option.default);
|
89
|
+
});
|
90
|
+
return command;
|
91
|
+
}
|
92
|
+
export function tokenFromOptions(options) {
|
93
|
+
const token = options.token;
|
94
|
+
if (token === undefined) {
|
95
|
+
throw new Error('Token type required');
|
96
|
+
}
|
97
|
+
if (!isTokenType(token)) {
|
98
|
+
throw new Error('Invalid token type');
|
99
|
+
}
|
100
|
+
return token;
|
101
|
+
}
|
102
|
+
export function valueFromOptions(options) {
|
103
|
+
const value = options.value;
|
104
|
+
if (value === undefined) {
|
105
|
+
throw new Error('Value is required. Use --value <value>');
|
106
|
+
}
|
107
|
+
return value;
|
108
|
+
}
|
109
|
+
export async function privateKeyFromOptions({ mnemonic, privateKey, walletFile, }, token) {
|
110
|
+
if (mnemonic !== undefined) {
|
111
|
+
if (token === 'kyve') {
|
112
|
+
return privateKeyFromKyveMnemonic(mnemonic);
|
113
|
+
}
|
114
|
+
else {
|
115
|
+
// TODO: Implement other token types mnemonic to wallet
|
116
|
+
throw new Error('mnemonic provided but this token type mnemonic to wallet is not supported');
|
117
|
+
}
|
118
|
+
}
|
119
|
+
else if (walletFile !== undefined) {
|
120
|
+
const wallet = JSON.parse(readFileSync(walletFile, 'utf-8'));
|
121
|
+
return token === 'solana' ? bs58.encode(wallet) : wallet;
|
122
|
+
}
|
123
|
+
else if (privateKey !== undefined) {
|
124
|
+
return privateKey;
|
125
|
+
}
|
126
|
+
// TODO: Get TURBO_WALLET_FILE, TURBO_MNEMONIC, TURBO_PRIVATE_KEY or similar from ENV variables
|
127
|
+
// TODO: Add prompts for selecting wallet type and secure input
|
128
|
+
throw new Error('mnemonic or wallet file or private key is required');
|
129
|
+
}
|
130
|
+
const tokenToDevGatewayMap = {
|
131
|
+
arweave: 'https://arweave.net', // No arweave test net
|
132
|
+
solana: 'https://api.devnet.solana.com',
|
133
|
+
ethereum: 'https://ethereum-holesky-rpc.publicnode.com',
|
134
|
+
kyve: 'https://api.korellia.kyve.network',
|
135
|
+
};
|
136
|
+
export function configFromOptions({ gateway, dev, token, }) {
|
137
|
+
let config = {};
|
138
|
+
if (dev) {
|
139
|
+
config = developmentTurboConfiguration;
|
140
|
+
config.gatewayUrl = tokenToDevGatewayMap[token];
|
141
|
+
}
|
142
|
+
else {
|
143
|
+
config = defaultTurboConfiguration;
|
144
|
+
}
|
145
|
+
// If gateway is provided, override the default or dev gateway
|
146
|
+
if (gateway !== undefined) {
|
147
|
+
config.gatewayUrl = gateway;
|
148
|
+
}
|
149
|
+
return config;
|
150
|
+
}
|
package/lib/esm/version.js
CHANGED
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"cli.d.ts","sourceRoot":"","sources":["../../../src/cli/cli.ts"],"names":[],"mappings":""}
|
@@ -0,0 +1,27 @@
|
|
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 { TokenType, TurboUnauthenticatedConfiguration, TurboWallet } from '../node/index.js';
|
18
|
+
export declare function getBalance(address: string, token: string): Promise<void>;
|
19
|
+
export interface CryptoFundParams {
|
20
|
+
token: TokenType;
|
21
|
+
value: string;
|
22
|
+
privateKey: TurboWallet;
|
23
|
+
config: TurboUnauthenticatedConfiguration;
|
24
|
+
}
|
25
|
+
/** Fund the connected signer with crypto */
|
26
|
+
export declare function cryptoFund({ value, privateKey, token, config, }: CryptoFundParams): Promise<void>;
|
27
|
+
//# sourceMappingURL=commands.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"commands.d.ts","sourceRoot":"","sources":["../../../src/cli/commands.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EACL,SAAS,EAET,iCAAiC,EACjC,WAAW,EAGZ,MAAM,kBAAkB,CAAC;AAE1B,wBAAsB,UAAU,CAAC,OAAO,EAAE,MAAM,EAAE,KAAK,EAAE,MAAM,iBAc9D;AAED,MAAM,WAAW,gBAAgB;IAC/B,KAAK,EAAE,SAAS,CAAC;IACjB,KAAK,EAAE,MAAM,CAAC;IACd,UAAU,EAAE,WAAW,CAAC;IACxB,MAAM,EAAE,iCAAiC,CAAC;CAC3C;AACD,4CAA4C;AAC5C,wBAAsB,UAAU,CAAC,EAC/B,KAAK,EACL,UAAU,EACV,KAAK,EACL,MAAM,GACP,EAAE,gBAAgB,iBAelB"}
|
@@ -0,0 +1,105 @@
|
|
1
|
+
import { Command } from 'commander';
|
2
|
+
import { TokenType, TurboUnauthenticatedConfiguration } from '../node/index.js';
|
3
|
+
interface CommanderOption {
|
4
|
+
alias: string;
|
5
|
+
description: string;
|
6
|
+
default?: string | boolean;
|
7
|
+
}
|
8
|
+
export declare const optionMap: {
|
9
|
+
readonly token: {
|
10
|
+
readonly alias: "-t, --token <type>";
|
11
|
+
readonly description: "Token type for wallet or action";
|
12
|
+
readonly default: "arweave";
|
13
|
+
};
|
14
|
+
readonly currency: {
|
15
|
+
readonly alias: "-c, --currency <currency>";
|
16
|
+
readonly description: "Currency type to top up with";
|
17
|
+
readonly default: "usd";
|
18
|
+
};
|
19
|
+
readonly address: {
|
20
|
+
readonly alias: "-a, --address <walletAddress>";
|
21
|
+
readonly description: "Wallet address to use for action";
|
22
|
+
};
|
23
|
+
readonly value: {
|
24
|
+
readonly alias: "-v, --value <value>";
|
25
|
+
readonly description: "Value of fiat currency or crypto token for action";
|
26
|
+
};
|
27
|
+
readonly walletFile: {
|
28
|
+
readonly alias: "-w, --wallet-file <filePath>";
|
29
|
+
readonly description: "Wallet file to use with the action. Formats accepted: JWK.json, KYVE or ETH private key as a string, or SOL Secret Key as a Uint8Array";
|
30
|
+
};
|
31
|
+
readonly mnemonic: {
|
32
|
+
readonly alias: "-m, --mnemonic <phrase>";
|
33
|
+
readonly description: "Mnemonic to use with the action";
|
34
|
+
};
|
35
|
+
readonly privateKey: {
|
36
|
+
readonly alias: "-p, --private-key <key>";
|
37
|
+
readonly description: "Private key to use with the action";
|
38
|
+
};
|
39
|
+
readonly gateway: {
|
40
|
+
readonly alias: "-g, --gateway <url>";
|
41
|
+
readonly description: "Set a custom crypto gateway URL";
|
42
|
+
readonly default: undefined;
|
43
|
+
};
|
44
|
+
readonly dev: {
|
45
|
+
readonly alias: "--dev";
|
46
|
+
readonly description: "Enable development endpoints";
|
47
|
+
readonly default: false;
|
48
|
+
};
|
49
|
+
readonly debug: {
|
50
|
+
readonly alias: "--debug";
|
51
|
+
readonly description: "Enable verbose logging";
|
52
|
+
readonly default: false;
|
53
|
+
};
|
54
|
+
readonly quiet: {
|
55
|
+
readonly alias: "--quiet";
|
56
|
+
readonly description: "Disable logging";
|
57
|
+
readonly default: false;
|
58
|
+
};
|
59
|
+
};
|
60
|
+
export declare const walletOptions: ({
|
61
|
+
readonly alias: "-w, --wallet-file <filePath>";
|
62
|
+
readonly description: "Wallet file to use with the action. Formats accepted: JWK.json, KYVE or ETH private key as a string, or SOL Secret Key as a Uint8Array";
|
63
|
+
} | {
|
64
|
+
readonly alias: "-m, --mnemonic <phrase>";
|
65
|
+
readonly description: "Mnemonic to use with the action";
|
66
|
+
} | {
|
67
|
+
readonly alias: "-p, --private-key <key>";
|
68
|
+
readonly description: "Private key to use with the action";
|
69
|
+
})[];
|
70
|
+
export declare const globalOptions: ({
|
71
|
+
readonly alias: "-t, --token <type>";
|
72
|
+
readonly description: "Token type for wallet or action";
|
73
|
+
readonly default: "arweave";
|
74
|
+
} | {
|
75
|
+
readonly alias: "-g, --gateway <url>";
|
76
|
+
readonly description: "Set a custom crypto gateway URL";
|
77
|
+
readonly default: undefined;
|
78
|
+
} | {
|
79
|
+
readonly alias: "--dev";
|
80
|
+
readonly description: "Enable development endpoints";
|
81
|
+
readonly default: false;
|
82
|
+
} | {
|
83
|
+
readonly alias: "--debug";
|
84
|
+
readonly description: "Enable verbose logging";
|
85
|
+
readonly default: false;
|
86
|
+
} | {
|
87
|
+
readonly alias: "--quiet";
|
88
|
+
readonly description: "Disable logging";
|
89
|
+
readonly default: false;
|
90
|
+
})[];
|
91
|
+
export declare function applyOptions(command: Command, options: CommanderOption[]): Command;
|
92
|
+
export declare function tokenFromOptions(options: unknown): TokenType;
|
93
|
+
export declare function valueFromOptions(options: unknown): string;
|
94
|
+
export declare function privateKeyFromOptions({ mnemonic, privateKey, walletFile, }: {
|
95
|
+
walletFile: string | undefined;
|
96
|
+
mnemonic: string | undefined;
|
97
|
+
privateKey: string | undefined;
|
98
|
+
}, token: TokenType): Promise<string>;
|
99
|
+
export declare function configFromOptions({ gateway, dev, token, }: {
|
100
|
+
gateway: string | undefined;
|
101
|
+
dev: boolean | undefined;
|
102
|
+
token: TokenType;
|
103
|
+
}): TurboUnauthenticatedConfiguration;
|
104
|
+
export {};
|
105
|
+
//# sourceMappingURL=utils.d.ts.map
|
@@ -0,0 +1 @@
|
|
1
|
+
{"version":3,"file":"utils.d.ts","sourceRoot":"","sources":["../../../src/cli/utils.ts"],"names":[],"mappings":"AAiBA,OAAO,EAAE,OAAO,EAAE,MAAM,WAAW,CAAC;AAGpC,OAA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ACnB,MAAM,EAAE,0BAA0B,GACjC,OAAO,CAAC,4BAA4B,CAAC;IAIxC;;OAEG;IACH,qBAAqB,CAAC,CAAC,EAAE;QACvB,IAAI,EAAE,MAAM,CAAC;KACd,GAAG,OAAO,CAAC,yBAAyB,CAAC;CAGvC;AAED,qBAAa,wBACX,SAAQ,0BACR,YAAW,iCAAiC;IAG5C,SAAS,CAAC,cAAc,EAAE,yCAAyC,CAAC;IACpE,SAAS,CAAC,aAAa,EAAE,wCAAwC,CAAC;gBAEtD,EACV,cAAc,EACd,aAAa,GACd,EAAE,qCAAqC;IAIxC;;OAEG;IACH,UAAU,IAAI,OAAO,CAAC,oBAAoB,CAAC;IAI3C;;OAEG;IACH,UAAU,CAAC,EACT,iBAAiB,EACjB,eAAe,EACf,MAAM,EACN,YAAY,GACb,EAAE,gBAAgB,GACjB,gBAAgB,GAAG,OAAO,CAAC,2BAA2B,CAAC;IASzD,YAAY,CAAC,CAAC,EAAE,uBAAuB,GAAG,OAAO,CAAC,yBAAyB,CAAC;IAI5E;;;OAGG;IACH,eAAe,CACb,CAAC,EAAE,yBAAyB,GAC3B,OAAO,CAAC,uBAAuB,CAAC;CAKpC"}
|
package/lib/types/types.d.ts
CHANGED
@@ -215,6 +215,7 @@ export type TurboUnauthenticatedConfiguration = {
|
|
215
215
|
paymentServiceConfig?: TurboUnauthenticatedPaymentServiceConfiguration;
|
216
216
|
uploadServiceConfig?: TurboUnauthenticatedUploadServiceConfiguration;
|
217
217
|
token?: TokenType;
|
218
|
+
gatewayUrl?: string;
|
218
219
|
};
|
219
220
|
export interface TurboLogger {
|
220
221
|
setLogLevel: (level: string) => void;
|
@@ -237,7 +238,6 @@ export type TurboAuthenticatedConfiguration = TurboUnauthenticatedConfiguration
|
|
237
238
|
/** @deprecated -- This parameter was added in release v1.5 for injecting an arweave TokenTool. Instead, the SDK now accepts `tokenTools` and/or `gatewayUrl` directly in the Factory constructor. This type will be removed in a v2 release */
|
238
239
|
tokenMap?: TokenMap;
|
239
240
|
tokenTools?: TokenTools;
|
240
|
-
gatewayUrl?: string;
|
241
241
|
};
|
242
242
|
export type TurboUnauthenticatedClientConfiguration = {
|
243
243
|
paymentService: TurboUnauthenticatedPaymentServiceInterface;
|
package/lib/types/types.d.ts.map
CHANGED
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/types.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AACH,OAAO,EACL,eAAe,EACf,aAAa,EACb,qBAAqB,EACrB,cAAc,EACd,eAAe,EAChB,MAAM,WAAW,CAAC;AACnB,OAAO,EAAE,iBAAiB,EAAE,MAAM,aAAa,CAAC;AAChD,OAAO,EAAE,SAAS,EAAE,MAAM,cAAc,CAAC;AACzC,OAAO,EAAE,QAAQ,EAAE,MAAM,aAAa,CAAC;AACvC,OAAO,EAAE,cAAc,EAAE,MAAM,iBAAiB,CAAC;AAEjD,OAAO,EAAE,WAAW,EAAE,MAAM,sBAAsB,CAAC;AACnD,OAAO,EAAE,YAAY,EAAE,MAAM,iBAAiB,CAAC;AAE/C,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC;AAClC,MAAM,MAAM,oBAAoB,GAAG,YAAY,CAAC;AAChD,MAAM,MAAM,aAAa,GAAG,YAAY,CAAC;AACzC,MAAM,MAAM,WAAW,GAAG,MAAM,GAAG,oBAAoB,CAAC;AACxD,MAAM,MAAM,QAAQ,GAChB,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,GACL,KAAK,CAAC;AACV,MAAM,MAAM,OAAO,GAAG,eAAe,GAAG,gBAAgB,GAAG,QAAQ,CAAC;AAEpE,eAAO,MAAM,UAAU,oDAAqD,CAAC;AAC7E,MAAM,MAAM,SAAS,GAAG,CAAC,OAAO,UAAU,CAAC,CAAC,MAAM,CAAC,CAAC;AAEpD,MAAM,MAAM,UAAU,GAAG;IACvB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AAE,MAAM,CAAC;QACX,MAAM,EAAE,MAAM,CAAC;QACf,MAAM,CAAC,EAAE,MAAM,CAAC;KACjB,CAAC,CAAC;IACH,uBAAuB,EAAE,CAAC,CAAC,EAAE;QAAE,IAAI,EAAE,MAAM,CAAA;KAAE,KAAK,OAAO,CAAC,IAAI,CAAC,CAAC;CACjE;AAED,MAAM,MAAM,WAAW,GAAG;IACxB,UAAU,CAAC,EAAE,MAAM,CAAC;IACpB,MAAM,CAAC,EAAE,WAAW,CAAC;IACrB,cAAc,CAAC,EAAE,mBAAmB,CAAC;CACtC,CAAC;AAEF,8PAA8P;AAC9P,MAAM,MAAM,QAAQ,GAAG;IAAE,OAAO,EAAE,UAAU,CAAA;CAAE,CAAC;AAE/C,MAAM,MAAM,YAAY,GAAG,MAAM,CAAC,MAAM,EAAE,CAAC,MAAM,EAAE,WAAW,KAAK,UAAU,CAAC,CAAC"}
|
package/lib/types/version.d.ts
CHANGED
@@ -14,5 +14,5 @@
|
|
14
14
|
* You should have received a copy of the GNU Affero General Public License
|
15
15
|
* along with this program. If not, see <http://www.gnu.org/licenses/>.
|
16
16
|
*/
|
17
|
-
export declare const version = "1.
|
17
|
+
export declare const version = "1.11.0-alpha.2";
|
18
18
|
//# sourceMappingURL=version.d.ts.map
|
@@ -1 +1 @@
|
|
1
|
-
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,eAAO,MAAM,OAAO,
|
1
|
+
{"version":3,"file":"version.d.ts","sourceRoot":"","sources":["../../src/version.ts"],"names":[],"mappings":"AAAA;;;;;;;;;;;;;;;GAeG;AAGH,eAAO,MAAM,OAAO,mBAAmB,CAAC"}
|
package/package.json
CHANGED
@@ -1,6 +1,6 @@
|
|
1
1
|
{
|
2
2
|
"name": "@ardrive/turbo-sdk",
|
3
|
-
"version": "1.11.0-alpha.
|
3
|
+
"version": "1.11.0-alpha.3",
|
4
4
|
"main": "./lib/cjs/node/index.js",
|
5
5
|
"types": "./lib/types/node/index.d.ts",
|
6
6
|
"module": "./lib/esm/node/index.js",
|
@@ -40,6 +40,9 @@
|
|
40
40
|
"browser": "./bundles/web.bundle.min.js"
|
41
41
|
}
|
42
42
|
},
|
43
|
+
"bin": {
|
44
|
+
"turbo": "./lib/esm/cli/cli.js"
|
45
|
+
},
|
43
46
|
"engines": {
|
44
47
|
"node": ">=18"
|
45
48
|
},
|
@@ -83,6 +86,7 @@
|
|
83
86
|
"axios-retry": "^3.7.0",
|
84
87
|
"bignumber.js": "^9.1.2",
|
85
88
|
"bs58": "^5.0.0",
|
89
|
+
"commander": "^12.1.0",
|
86
90
|
"ethers": "^6.12.0",
|
87
91
|
"mime-types": "^2.1.35",
|
88
92
|
"plimit-lit": "^3.0.1",
|