@offckb/cli 0.2.0-canary-a9e2165.0 → 0.2.0-canary-5a5a58d.0
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
CHANGED
|
@@ -23,7 +23,9 @@ Start building on Nervos blockchain, right now, right away!
|
|
|
23
23
|
- [Install](#install)
|
|
24
24
|
- [Usage](#usage)
|
|
25
25
|
- [Get started](#get-started)
|
|
26
|
-
- [
|
|
26
|
+
- [Create a full-stack Project](#create-a-full-stack-project)
|
|
27
|
+
- [Create a script-only Project](#create-a-script-only-project)
|
|
28
|
+
- [Run A dApp Example](#run-a-dapp-example)
|
|
27
29
|
- [Step 1: Select A dApp To Init](#step-1-select-a-dapp-to-init)
|
|
28
30
|
- [Step 2: Start the Devnet](#step-2-start-the-devnet)
|
|
29
31
|
- [Step 3: Access Pre-funded Accounts](#step-3-access-pre-funded-accounts)
|
|
@@ -64,7 +66,7 @@ Commands:
|
|
|
64
66
|
accounts Print account list info
|
|
65
67
|
list-hashes Use the CKB to list blockchain scripts hashes
|
|
66
68
|
inject-config Add offckb.config.ts to your workspace
|
|
67
|
-
|
|
69
|
+
sync-config sync offckb.config.ts in your workspace
|
|
68
70
|
deposit [options] [toAddress] [amountInShannon] Deposit CKB tokens to address, only devnet and testnet
|
|
69
71
|
transfer [options] [toAddress] [amountInShannon] Transfer CKB tokens to address, only devnet and testnet
|
|
70
72
|
balance [options] [toAddress] Check account balance, only devnet and testnet
|
package/dist/cli.js
CHANGED
|
@@ -24,7 +24,7 @@ const encoding_1 = require("./util/encoding");
|
|
|
24
24
|
const inject_config_1 = require("./cmd/inject-config");
|
|
25
25
|
const deposit_1 = require("./cmd/deposit");
|
|
26
26
|
const deploy_1 = require("./cmd/deploy");
|
|
27
|
-
const
|
|
27
|
+
const sync_config_1 = require("./cmd/sync-config");
|
|
28
28
|
const transfer_1 = require("./cmd/transfer");
|
|
29
29
|
const balance_1 = require("./cmd/balance");
|
|
30
30
|
const build_account_1 = require("./cmd/develop/build-account");
|
|
@@ -61,7 +61,7 @@ program.command('clean').description('Clean the devnet data, need to stop runnin
|
|
|
61
61
|
program.command('accounts').description('Print account list info').action(accounts_1.accounts);
|
|
62
62
|
program.command('list-hashes').description('Use the CKB to list blockchain scripts hashes').action(list_hashes_1.listHashes);
|
|
63
63
|
program.command('inject-config').description('Add offckb.config.ts to your workspace').action(inject_config_1.injectConfig);
|
|
64
|
-
program.command('
|
|
64
|
+
program.command('sync-config').description('Sync offckb.config.ts in your workspace').action(sync_config_1.syncConfig);
|
|
65
65
|
program
|
|
66
66
|
.command('deposit [toAddress] [amountInShannon]')
|
|
67
67
|
.description('Deposit CKB tokens to address, only devnet and testnet')
|
|
@@ -0,0 +1 @@
|
|
|
1
|
+
export declare function syncConfig(): void;
|
|
@@ -1,11 +1,11 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.
|
|
3
|
+
exports.syncConfig = void 0;
|
|
4
4
|
const const_1 = require("../cfg/const");
|
|
5
5
|
const config_1 = require("../util/config");
|
|
6
6
|
const type_1 = require("../util/type");
|
|
7
7
|
const validator_1 = require("../util/validator");
|
|
8
|
-
function
|
|
8
|
+
function syncConfig() {
|
|
9
9
|
(0, validator_1.validateExecDappEnvironment)();
|
|
10
10
|
// update the offckb.config.ts file in users workspace
|
|
11
11
|
const devnetFullLumosConfig = (0, config_1.buildFullLumosConfig)(type_1.Network.devnet);
|
|
@@ -16,4 +16,4 @@ function updateConfig() {
|
|
|
16
16
|
(0, config_1.updateScriptInfoInOffCKBConfigTs)(mainnetFullLumosConfig, const_1.userOffCKBConfigPath, type_1.Network.mainnet);
|
|
17
17
|
console.log('offCKB config updated.');
|
|
18
18
|
}
|
|
19
|
-
exports.
|
|
19
|
+
exports.syncConfig = syncConfig;
|
package/package.json
CHANGED
|
@@ -1 +0,0 @@
|
|
|
1
|
-
export declare function updateConfig(): void;
|