Skip to content

Commit 12bea50

Browse files
authored
feat(wallet-cli): Add documentation to README.md (#37)
1 parent c2d88ca commit 12bea50

File tree

1 file changed

+159
-9
lines changed

1 file changed

+159
-9
lines changed

README.md

Lines changed: 159 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -1,19 +1,169 @@
11
# ironfish-wallet
22

3-
Standalone wallet CLI
3+
The Iron Fish Wallet CLI is a standalone process which provides account key management, transaction creation, and asset storage.
44

5-
## Link to a local instance of the ironfish SDK
5+
## Development
66

7-
There will be times where you will need to make changes simulatenously to both the ironfish sdk and the wallet. In that case, you can link the wallet to the local instance of the ironfish sdk using the following steps:
7+
Ensure you are running Node 18.x.
8+
9+
### Local Node Changes
10+
11+
If you need to test changes simulatenously to both the [`ironfish` SDK](https://github.com/iron-fish/ironfish/tree/master/ironfish) and this standalone wallet code base. In that case, you can link the wallet to the local instance of the `ironfish` SDK using the following steps:
12+
13+
In the [`ironfish`](https://github.com/iron-fish/ironfish/) repository:
14+
15+
```bash
16+
# Build all packages
17+
$ yarn build
18+
19+
# Navigate to the SDK directory
20+
$ cd ironfish
21+
22+
# Link the SDK package
23+
$ yarn link
24+
```
25+
26+
After that, in this standalone wallet repository:
27+
28+
```bash
29+
$ yarn link "@ironfish/sdk"
30+
```
31+
32+
## Installation
33+
34+
The Iron Fish Standalone Wallet can be installed via [NPM](https://www.npmjs.com/package/ironfish-wallet):
35+
36+
```bash
37+
$ npm i -g ironfish-wallet
38+
```
39+
40+
Refer to the [Commands](#commands) section for usage details, or run:
41+
42+
```bash
43+
$ ironfishw --help
44+
```
45+
46+
## Setup
47+
48+
In order to start the standalone wallet, you must configure the process to point to a full Iron Fish Node.
49+
50+
### Connecting a Standalone Wallet to a Remote Node
51+
52+
```bash
53+
# Enable TCP connection to the full node
54+
$ ironfishw config:set walletNodeTcpEnabled true
55+
56+
# Set the TCP host of the full node
57+
$ ironfishw config:set walletNodeTcpHost <node-host>
58+
59+
# Set the TCP port of the full node
60+
$ ironfishw config:set walletNodeTcpPort <node-port>
61+
62+
# (Optional) If the full node has TLS enabled, set the RPC authentication token
63+
$ ironfishw config:set walletNodeRpcAuthToken <auth-token>
64+
65+
# After the above commands are run, you can start the wallet
66+
$ ironfishw start
67+
```
68+
69+
Alternatively, you can pass (or override the existing configuration) via CLI flags:
70+
71+
```bash
72+
$ ironfishw start --node.tcp --node.tcp.host=<node-tcp-host> --node.tcp.port=<node-tcp-port>
73+
```
74+
75+
If TLS is set:
76+
77+
```bash
78+
$ ironfishw start --node.tcp --node.tcp.host=<node-tcp-host> --node.tcp.port=<node-tcp-port> --node.tcp.tls --node.auth=taqueriaramirez
79+
```
80+
81+
### Connecting a Standalone Wallet to a Local Node
82+
83+
If you have a local node running and wish to connect via IPC:
884

9-
In the Ironfish repo:
1085
```bash
11-
yarn build
12-
cd ironfish
13-
yarn link
86+
# Enable IPC connection to the full node
87+
$ ironfishw config:set walletNodeIpcEnabled true
88+
89+
# Set the IPC path of the full node
90+
$ ironfishw config:set walletNodeIpcPath <full-node-ipc-path>
91+
92+
# After the above commands are run, you can start the wallet
93+
$ ironfishw start
1494
```
1595

16-
After that, in the wallet repo:
96+
Alternatively, you can pass (or override the existing configuration) via CLI flags:
97+
1798
```bash
18-
yarn link "@ironfish/sdk"
99+
$ ironfishw start --node.ipc --node.ipc.path=<full-node-ipc-path>
19100
```
101+
102+
## Commands
103+
104+
The `ironfish-wallet` CLI has several commands to manage an Iron Fish wallet.
105+
106+
Appending `--help` to each command will provide help. For example:
107+
108+
```bash
109+
$ ironfishw accounts --help
110+
```
111+
112+
### Wallet
113+
114+
* `ironfishw accounts` - List all the accounts on the node
115+
* `ironfishw address` - Display your account address
116+
* `ironfishw assets` - Display the wallet's assets
117+
* `ironfishw balance` - Display the account balance
118+
* `ironfishw balances` - Display the account's balances for all assets
119+
* `ironfishw browse` - Browse to your data directory
120+
* `ironfishw burn` - Burn tokens and decrease supply for a given asset
121+
* `ironfishw config` - Print out the entire config
122+
* `ironfishw create` - Create a new account for sending and receiving coins
123+
* `ironfishw delete` - Permanently delete an account
124+
* `ironfishw export` - Export an account
125+
* `ironfishw faucet` - Receive coins from the Iron Fish official testnet Faucet
126+
* `ironfishw help` - Display help for ironfishw.
127+
* `ironfishw import` - Import an account
128+
* `ironfishw migrations` - List all the migration statuses
129+
* `ironfishw mint` - Mint tokens and increase supply for a given asset
130+
* `ironfishw notes` - Display the account notes
131+
* `ironfishw post` - Post a raw transaction
132+
* `ironfishw prune` - Removes expired transactions from the wallet
133+
* `ironfishw rename` - Change the name of an account
134+
* `ironfishw repl` - An interactive terminal to the node
135+
* `ironfishw rescan` - Rescan the blockchain for transactions
136+
* `ironfishw send` - Send coins to another account
137+
* `ironfishw start` - Start the wallet node
138+
* `ironfishw status` - Get status of an account
139+
* `ironfishw stop` - Stop the wallet node
140+
* `ironfishw transaction` - Display an account transaction
141+
* `ironfishw transactions` - Display the account transactions
142+
* `ironfishw use` - Change the default account used by all commands
143+
* `ironfishw which` - Show the account currently used.
144+
145+
### Configuration
146+
147+
* `ironfishw config` - Print out the entire config
148+
* `ironfishw config:edit` - Edit the config in your configured editor
149+
* `ironfishw config:get` - Print out one config value
150+
* `ironfishw config:set` - Set a value in the config
151+
* `ironfishw config:unset` - Unset a value in the config and fall back to default
152+
153+
### Migrations
154+
155+
* `ironfishw migrations` - List all the migration statuses
156+
* `ironfishw migrations:start` - Run migrations
157+
158+
### Node
159+
160+
* `ironfishw node:status` - Show the status of the full node
161+
162+
### RPC
163+
164+
* `ironfishw rpc:status` - Show the status of the RPC layer
165+
* `ironfishw rpc:token` - Get or set the RPC auth token
166+
167+
### Workers
168+
169+
* `ironfishw workers:status` - Show the status of the worker pool

0 commit comments

Comments
 (0)