Skip to content

Commit

Permalink
Merge pull request #66 from obsidiansystems/mjr-doc-updates
Browse files Browse the repository at this point in the history
Mjr doc updates
  • Loading branch information
mikereinhart authored Mar 30, 2020
2 parents 214cd74 + 54cda90 commit 83ff59e
Showing 1 changed file with 79 additions and 7 deletions.
86 changes: 79 additions & 7 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -74,7 +74,7 @@ using the ckb command line:
## Prepare machine to talk to ledger.

On Linux, the "udev" rules must be set up to allow your user to communicate with the ledger device.
On NixOS, one can easily do this with:
On NixOS, one can easily do this with by adding the following to configuration.nix:
``` nix
{
# ...
Expand Down Expand Up @@ -146,7 +146,7 @@ Get the public key:
CKB> account extended-address --path "m/44'/309'/0'/1/0" --account-id <ledger-id>
```

This should show up on the ledger as (in 4 screens):
This should show up on the ledger as (in 3 screens):

``` text
Provide
Expand All @@ -160,6 +160,8 @@ Derivation Path
Mainnet Address:
ckb1qyqxxtzygxvjwhgqklqlkedlqqwhp0rqjkvsqltkvh
```
If you've changed the Ledger's configuration to show testnet address, the last screen will instead look like this:

``` text
Testnet Address:
ckt1qyqxxtzygxvjwhgqklqlkedlqqwhp0rqjkvsa64fqt
Expand Down Expand Up @@ -349,7 +351,23 @@ CKB> dao deposit \
--tx-fee 0.00001 \
--path "m/44'/309'/0'/1/0"
```

Prompts on the Ledger device are as follows:
``` text
Confirm DAO
Deposit
```
``` text
Amount
102
```
``` text
Fee
0.00001
```
``` text
Source
ckt1qyq2htkmhdkcmcwc44xsxc3hcg7gytuyapcqutp5lh
```
##### Get deposited cells #####

Get deposited cells:
Expand Down Expand Up @@ -379,7 +397,32 @@ Remember the values above for one of the live cells under “tx\_hash” and “
Prepare a cell for withdrawal from the NervosDAO:

``` sh
CKB> dao prepare --from-account <ledger-id> --out-point <tx_hash>-<output_index> --tx-fee 0.0001 --path "m/44'/309'/0'/1/0"
CKB> dao prepare \
--from-account <ledger-id> \
--out-point <tx_hash>-<output_index> \
--tx-fee 0.0001 \
--path "m/44'/309'/0'/1/0"
```
Prompts on the Ledger device are as follows:
``` text
Confirm DAO
Prepare
```
``` text
Amount
102
```
``` text
Fee
0.00001
```
``` text
Owner
ckt1qyq2htkmhdkcmcwc44xsxc3hcg7gytuyapcqutp5lh
```
``` text
Fee payer
ckt1qyq2htkmhdkcmcwc44xsxc3hcg7gytuyapcqutp5lh
```

##### Get prepared cells #####
Expand Down Expand Up @@ -412,14 +455,43 @@ Remember the values above for one of the live cells under “tx\_hash” and “
Withdraw a prepared cell:

``` sh
CKB> dao withdraw --from-account <ledger-id> --out-point <tx_hash>-<output_index> --tx-fee 0.00001 --path "m/44'/309'/0'/1/0"
CKB> dao withdraw \
--from-account <ledger-id> \
--out-point <tx_hash>-<output_index> \
--tx-fee 0.00001 \
--path "m/44'/309'/0'/1/0"
```
Prompts on the Ledger device are as follows:
``` text
Confirm DAO
Withdraw
```
``` text
Amount
102
```
``` text
Fee
0.00001
```
``` text
Owner
ckt1qyq2htkmhdkcmcwc44xsxc3hcg7gytuyapcqutp5lh
```
``` text
Fee payer
ckt1qyq2htkmhdkcmcwc44xsxc3hcg7gytuyapcqutp5lh
```

At this point, either
If you attempt to withdraw from the Nervos DAO prematurely, you'll see an error such as
```
JSON-RPC 2.0 Error: Server error (Transaction: Immature)
```
or
```
JSON-RPC 2.0 Error: Server error (OutPoint: ImmatureHeader(Byte32(0xd7de1ffd49c71b5dc71fcbf1638bb72c8fb16f8fffdfd5172456a56167fea0a3)))
```
will be reported, showing that the prepared cell is not yet available to withdraw, or a transaction hash if it is.
This means your prepared cell is not yet available to withdraw. You'll need to wait for the conclusion of your current deposit period before withdrawing.

# Running the testnet #

Expand Down

0 comments on commit 83ff59e

Please sign in to comment.