You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
**Convert a default Lock to ckb-sphincsplus lock script (in ckb dev)**
39
+
40
+
1. compile. Hera we use the default options.
41
+
</br>
42
+
Here we will get a sphincsplus_lock file, the size is about 85608bytes.
43
+
2. Deploy the compiled contract to the test network.
44
+
</br>
45
+
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).
46
+
* After the execution is successful, it is recommended to record the tx-hash to facilitate subsequent operations.
47
+
3. Generate key file.
48
+
</br>
49
+
Use this tool: tools/ckb-sphincs-tools.
50
+
```shell
51
+
cargo run -- gen-key key.json
52
+
```
53
+
We can get a set of key files, including public and private keys.
54
+
* If the contract you compile does not use the default value, it needs to be the same here.
55
+
* Need to save this file.
56
+
4. Convert a secp256k1 default lock script to SPHINCS+ lock script.
57
+
```shell
58
+
cargo run -- cc_to_sphincsplus --tx_hash <tx-hash> --tx_index <index> --key_file key.json --prikey <You can use ckb-cli account export>
59
+
```
60
+
5. Convert a SPHINCS+ lock script to secp256k1 default lock script.
61
+
```shell
62
+
cargo run -- cc_to_sphincsplus --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>
0 commit comments