A suit of utilities & sample contracts leveraging the new CKB_TX_MESSAGE_ALL spec. Several notable components include:
- crates/ckb-tx-message-all-utils: A Rust crate that performs
CKB_TX_MESSAGE_ALLcalculation. Both on-chain and off-chain environments are supported. - crates/native-test-vector-generator: A native test vector generator for working with
CKB_TX_MESSAGE_ALLspec. - contracts/rust-assert-ckb-tx-message-all: A simple Rust-based CKB script that validates the
lockfield from the first witness(inWitnessArgsstructure) of current script group, contains theCKB_TX_MESSAGE_ALLhash for current transaction & script group, using CKB flavored blake2b hash as the hasher. Notice this is not a secure lock script, a proper one shall validate a signature calculated on theCKB_TX_MESSAGE_ALLhash, not comparing the hash value directly. - contracts/rust-assert-ckb-tx-message-all: A simple C-based CKB script that validates the
lockfield from the first witness(inWitnessArgsstructure) of current script group, contains theCKB_TX_MESSAGE_ALLhash for current transaction & script group, using CKB flavored blake2b hash as the hasher. Notice this is not a secure lock script, a proper one shall validate a signature calculated on theCKB_TX_MESSAGE_ALLhash, not comparing the hash value directly.
This project was bootstrapped with ckb-script-templates.