TITLE: Generate SPHINCS+ Key File DESCRIPTION: This command uses the `ckb-sphincs-tools` to generate a pair of public and private keys for the SPHINCS+ lock script. The `key.json` file produced is essential for subsequent operations and must be securely saved. Ensure the generated keys are compatible with the compiled contract's hash type. SOURCE: https://github.com/cryptape/quantum-resistant-lock-script/blob/main/README.md#_snippet_2 LANGUAGE: shell CODE: ``` cargo run -- gen-key key.json ``` ---------------------------------------- TITLE: Convert SECP256K1/blake160 Lock Script to SPHINCS+ Lock Script DESCRIPTION: This command converts a standard SECP256K1/blake160 lock script to a quantum-resistant SPHINCS+ lock script. It requires the transaction hash and index of the original lock, the previously generated key file, and the private key for signing. SOURCE: https://github.com/cryptape/quantum-resistant-lock-script/blob/main/README.md#_snippet_3 LANGUAGE: shell CODE: ``` cargo run -- cc_to_sphincsplus --tx_hash --tx_index --key_file key.json --prikey ``` ---------------------------------------- TITLE: Compile Default Quantum Resistant Lock Script DESCRIPTION: This command compiles the default quantum-resistant lock script contract using a Docker environment. It simplifies the build process by encapsulating dependencies. SOURCE: https://github.com/cryptape/quantum-resistant-lock-script/blob/main/README.md#_snippet_0 LANGUAGE: shell CODE: ``` make all-via-docker ``` ---------------------------------------- TITLE: Compile Quantum Resistant Lock Script with Specific Hash Type DESCRIPTION: This command compiles the quantum-resistant lock script with a specified hash type (e.g., sphincs-shake-256f) and a 'robust' parameter. Different hash types can lead to significant performance differences during verification. SOURCE: https://github.com/cryptape/quantum-resistant-lock-script/blob/main/README.md#_snippet_1 LANGUAGE: shell CODE: ``` make all-via-docker PARAMS=sphincs-shake-256f THASH=robust ``` ---------------------------------------- TITLE: Generate Cell Locked by Quantum-Resistant Script DESCRIPTION: This section describes the parameters required to generate a cell locked by the quantum-resistant script. It notes that the script should use 'hash_type=data1' or 'hash_type=type' to support RISC-V B extensions. SOURCE: https://github.com/cryptape/quantum-resistant-lock-script/blob/main/README.md#_snippet_7 LANGUAGE: APIDOC CODE: ``` Parameters for Cell Generation: - code_hash: 0x989ab456455509a1c2ad1cb8116b7d209df228144445c741b101ec3e55ee8351 - hash_type: data1 - tx_hash: 0x1a48fb4def03465ab826e56fbf77943db65fad57db19d02279465d954e28be64 - index: 0 - dep_type: code ``` ---------------------------------------- TITLE: Unlock Cell Locked by Quantum-Resistant Script DESCRIPTION: This section outlines the parameters necessary to unlock a cell previously locked by the quantum-resistant script. SOURCE: https://github.com/cryptape/quantum-resistant-lock-script/blob/main/README.md#_snippet_8 LANGUAGE: APIDOC CODE: ``` Parameters for Cell Unlocking: - code_hash: 0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8 - hash_type: type - tx_hash: 0x1e3fcf73f02bb98e90239ed01e4fec63dc3469471309a19ee4eec7cfc00a8637 - index: 0 - dep_type: code ``` ---------------------------------------- TITLE: Convert SPHINCS+ Lock Script to SECP256K1/blake160 Lock Script DESCRIPTION: This command converts a quantum-resistant SPHINCS+ lock script back to a standard SECP256K1/blake160 lock script. It requires the transaction details of both the original and SPHINCS+ scripts, the key file, a lock argument, and a specified transaction fee. SOURCE: https://github.com/cryptape/quantum-resistant-lock-script/blob/main/README.md#_snippet_4 LANGUAGE: shell CODE: ``` cargo run -- cc_to_secp --tx_hash --tx_index --key_file key.json --lock_arg --sp_tx_hash --sp_tx_index --fee 10000 ``` ---------------------------------------- TITLE: Pudge (Testnet) Deployment Parameters DESCRIPTION: These are the deployment parameters for the quantum-resistant lock script on the Pudge testnet. It includes the specific `code_hash` and `tx_hash` for the deployed contract, along with other relevant details. SOURCE: https://github.com/cryptape/quantum-resistant-lock-script/blob/main/README.md#_snippet_6 LANGUAGE: APIDOC CODE: ``` parameter | value --------- | ------------------------------------------------------------------ code_hash | 0x9bd7e06f3ecf4be0f2fcd2188b23f1b9fcc88e5d4b65a8637b17723bbda3cce8 hash_type | type tx_hash | 0x35f51257673c7a7edd009fa2166e6f8645156207c9da38202f04ba4d94d9e519 index | 0 dep_type | code ``` ---------------------------------------- TITLE: Mirana (Mainnet) Deployment Parameters DESCRIPTION: These are the deployment parameters for the quantum-resistant lock script on the Mirana mainnet. Note that the contract is currently not deployed, so `code_hash` and `tx_hash` are placeholders. SOURCE: https://github.com/cryptape/quantum-resistant-lock-script/blob/main/README.md#_snippet_5 LANGUAGE: APIDOC CODE: ``` parameter | value --------- | ------------ code_hash | not deployed hash_type | type tx_hash | not deployed index | 0 dep_type | code ```