Skip to content

Commit 90f5a7f

Browse files
committed
docs: move section to tool folder
1 parent 2376b6e commit 90f5a7f

File tree

1 file changed

+31
-0
lines changed

1 file changed

+31
-0
lines changed

tools/ckb-sphincs-tools/README.md

Lines changed: 31 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,31 @@
1+
**NOTE**: the following tool shall be considered deprecated, and only kept here for historic reasons.
2+
3+
This tool is to **convert a default Lock(SECP256K1/blake160) to quantum resistant lock script.**.
4+
5+
Follow steps below:
6+
7+
1. compile.
8+
9+
By default, sphincsplus_lock file's size is about 85K bytes.
10+
2. Deploy the compiled contract to the test network.
11+
</br>
12+
We use [ckb-cli](https://github.com/nervosnetwork/ckb-cli) to deploy this contract, You can refer to [here](https://github.com/nervosnetwork/ckb-cli/wiki/Handle-Complex-Transaction#a-demo).
13+
* After the execution is successful, it is recommended to record the tx-hash to facilitate subsequent operations.
14+
3. Generate key file.
15+
</br>
16+
Use this tool: tools/ckb-sphincs-tools.
17+
``` shell
18+
cargo run -- gen-key key.json
19+
```
20+
We can get a set of key files, including public and private keys.
21+
* If the contract you compile does not use the default value, it needs to be the same here.
22+
* Need to save this file.
23+
4. Convert a SECP256K1/blake160 lock script to quantum resistant lock script.
24+
``` shell
25+
cargo run -- cc_to_sphincsplus --tx_hash <tx-hash> --tx_index <index> --key_file key.json --prikey <You can use ckb-cli account export>
26+
```
27+
5. Convert a quantum resistant lock script to SECP256K1/blake160 lock script.
28+
``` shell
29+
cargo run -- cc_to_secp --tx_hash <tx-hash> --tx_index <index> --key_file key.json --lock_arg <LOCK-ARG> --sp_tx_hash <SPHINCS+ Script in step 2> --sp_tx_index <index> --fee 10000
30+
```
31+

0 commit comments

Comments
 (0)