mirror of
https://github.com/cosmos/cosmjs.git
synced 2025-03-10 13:47:12 +00:00
Renamed cosmwasm-cli to cosmjs-cli (#1059)
* Renamed cosmwasm-cli to cosmjs-cli * Fixed build error
This commit is contained in:
parent
4c8b278c1d
commit
fab55d3807
@ -5,7 +5,7 @@ This assumes you have already run through the sample in the
|
||||
method (sharing with cli, customize blockchain) if you want. We will show
|
||||
uploading mask and using it on the Demo Net.
|
||||
|
||||
Start with `./bin/cosmwasm-cli --init examples/helpers.ts examples/mask.ts`
|
||||
Start with `./bin/cosmjs-cli --init examples/helpers.ts examples/mask.ts`
|
||||
(note the addition of `examples/mask.ts`)
|
||||
|
||||
## Setup
|
||||
|
@ -4,43 +4,43 @@
|
||||
|
||||
## Installation and first run
|
||||
|
||||
The `cosmwasm-cli` executable is available via npm. We recommend local
|
||||
The `cosmjs-cli` executable is available via npm. We recommend local
|
||||
installations to your demo project. If you don't have one yet, just
|
||||
`mkdir cosmwasm-cli-installation && cd cosmwasm-cli-installation && yarn init --yes`.
|
||||
`mkdir cosmjs-cli-installation && cd cosmjs-cli-installation && yarn init --yes`.
|
||||
|
||||
### locally with yarn
|
||||
|
||||
```
|
||||
$ yarn add @cosmjs/cli --dev
|
||||
$ ./node_modules/.bin/cosmwasm-cli
|
||||
$ ./node_modules/.bin/cosmjs-cli
|
||||
```
|
||||
|
||||
### locally with npm
|
||||
|
||||
```
|
||||
$ npm install @cosmjs/cli --save-dev
|
||||
$ ./node_modules/.bin/cosmwasm-cli
|
||||
$ ./node_modules/.bin/cosmjs-cli
|
||||
```
|
||||
|
||||
### globally with yarn
|
||||
|
||||
```
|
||||
$ yarn global add @cosmjs/cli
|
||||
$ cosmwasm-cli
|
||||
$ cosmjs-cli
|
||||
```
|
||||
|
||||
### globally with npm
|
||||
|
||||
```
|
||||
$ npm install -g @cosmjs/cli
|
||||
$ cosmwasm-cli
|
||||
$ cosmjs-cli
|
||||
```
|
||||
|
||||
## Getting started
|
||||
|
||||
1. Install `@cosmjs/cli` and run `cosmwasm-cli` as shown above
|
||||
1. Install `@cosmjs/cli` and run `cosmjs-cli` as shown above
|
||||
2. Start a local wasmd blockchain
|
||||
3. Start with `./bin/cosmwasm-cli --init examples/local_faucet.ts`
|
||||
3. Start with `./bin/cosmjs-cli --init examples/local_faucet.ts`
|
||||
4. Play around as in the following example code
|
||||
|
||||
```ts
|
||||
@ -77,7 +77,7 @@ way to learn how to embed cosmjs into your project. However, if you just want a
|
||||
cli to perform some quick queries on a chain, you can use an extended set of
|
||||
helpers:
|
||||
|
||||
Start with `./bin/cosmwasm-cli --init examples/helpers.ts`
|
||||
Start with `./bin/cosmjs-cli --init examples/helpers.ts`
|
||||
|
||||
(This points to the Demonet at https://lcd.demo-08.cosmwasm.com for ease of use.
|
||||
Other networks, look below)
|
||||
@ -171,7 +171,7 @@ see how to connect to the Regen Testnet, try this. (Note you need to use
|
||||
`.editor` in the repl to allow multi-line commands. Alternative is to place
|
||||
entire `regenOptions` on one line.
|
||||
|
||||
Run `./bin/cosmwasm-cli --init examples/helpers.ts`
|
||||
Run `./bin/cosmjs-cli --init examples/helpers.ts`
|
||||
|
||||
```ts
|
||||
.editor
|
||||
@ -244,7 +244,7 @@ Save mnemonic to a file
|
||||
echo "cousin nephew vintage label empty sunny cargo mushroom photo side clarify sleep solid entire deal tattoo vehicle record discover arrive sting staff salt uncle" > wasmcli.key
|
||||
```
|
||||
|
||||
Load it up in cosmjs: `./bin/cosmwasm-cli --init examples/helpers.ts`
|
||||
Load it up in cosmjs: `./bin/cosmjs-cli --init examples/helpers.ts`
|
||||
|
||||
```ts
|
||||
const mnemonic = loadOrCreateMnemonic("wasmcli.key");
|
||||
|
@ -23,14 +23,14 @@
|
||||
"lint-fix": "eslint --fix --max-warnings 0 \"./**/*.ts\" \"./*.js\"",
|
||||
"build": "rm -rf ./build && tsc",
|
||||
"build-or-skip": "[ -n \"$SKIP_BUILD\" ] || yarn build",
|
||||
"start": "yarn build-or-skip && ./bin/cosmwasm-cli",
|
||||
"selftest": "yarn build-or-skip && ./bin/cosmwasm-cli --selftest",
|
||||
"start": "yarn build-or-skip && ./bin/cosmjs-cli",
|
||||
"selftest": "yarn build-or-skip && ./bin/cosmjs-cli --selftest",
|
||||
"test-node": "yarn node jasmine-testrunner.js",
|
||||
"test": "yarn build-or-skip && yarn test-node",
|
||||
"coverage": "nyc --reporter=text --reporter=lcov yarn test --quiet"
|
||||
},
|
||||
"bin": {
|
||||
"cosmwasm-cli": "bin/cosmwasm-cli"
|
||||
"cosmjs-cli": "bin/cosmjs-cli"
|
||||
},
|
||||
"files": [
|
||||
"build/",
|
||||
|
@ -3,17 +3,17 @@ set -o errexit -o nounset -o pipefail
|
||||
command -v shellcheck >/dev/null && shellcheck "$0"
|
||||
|
||||
if [ -n "${WASMD_ENABLED:-}" ]; then
|
||||
yarn node ./bin/cosmwasm-cli --init examples/cosmwasm.ts --code "process.exit(0)"
|
||||
yarn node ./bin/cosmjs-cli --init examples/cosmwasm.ts --code "process.exit(0)"
|
||||
fi
|
||||
if [ -n "${SIMAPP42_ENABLED:-}" ]; then
|
||||
yarn node ./bin/cosmwasm-cli --init examples/delegate.ts --code "process.exit(0)"
|
||||
yarn node ./bin/cosmjs-cli --init examples/delegate.ts --code "process.exit(0)"
|
||||
fi
|
||||
yarn node ./bin/cosmwasm-cli --init examples/faucet_addresses.ts --code "process.exit(0)"
|
||||
yarn node ./bin/cosmwasm-cli --init examples/generate_address.ts --code "process.exit(0)"
|
||||
yarn node ./bin/cosmwasm-cli --init examples/local_faucet.ts --code "process.exit(0)"
|
||||
yarn node ./bin/cosmwasm-cli --init examples/mask.ts --code "process.exit(0)"
|
||||
yarn node ./bin/cosmwasm-cli --init examples/multisig_address.ts --code "process.exit(0)"
|
||||
yarn node ./bin/cosmjs-cli --init examples/faucet_addresses.ts --code "process.exit(0)"
|
||||
yarn node ./bin/cosmjs-cli --init examples/generate_address.ts --code "process.exit(0)"
|
||||
yarn node ./bin/cosmjs-cli --init examples/local_faucet.ts --code "process.exit(0)"
|
||||
yarn node ./bin/cosmjs-cli --init examples/mask.ts --code "process.exit(0)"
|
||||
yarn node ./bin/cosmjs-cli --init examples/multisig_address.ts --code "process.exit(0)"
|
||||
if [ -n "${SIMAPP42_ENABLED:-}" ]; then
|
||||
yarn node ./bin/cosmwasm-cli --init examples/stargate.ts --code "process.exit(0)"
|
||||
yarn node ./bin/cosmwasm-cli --init examples/simulate.ts --code "process.exit(0)"
|
||||
yarn node ./bin/cosmjs-cli --init examples/stargate.ts --code "process.exit(0)"
|
||||
yarn node ./bin/cosmjs-cli --init examples/simulate.ts --code "process.exit(0)"
|
||||
fi
|
||||
|
Loading…
x
Reference in New Issue
Block a user