PW-lock, developed by the lay2 Team, is a lock script which can make use of other blockchain wallets as CKB wallets. PW-lock is based on the concept of implementing the signature verification algorithms of other chains (e.g. ETH/TRON/EOS/BTC) so as to reuse others' facilities. Also, PW-lock is a lock with ACP logic.
Current PW-lock supports the Ethereum EIP-191 signature verification standard. It is possible to communicate with MetaMask, an Ethereum wallet, through the RPC personal_sign, and sign the hash_all message, then verify the transaction in the PW-lock script before unlocking.
git submodule init
git submodule update
cargo test --all
PW-lock Basic Structure
- code_hash: 32 bytes - pw-lock script code hash
- hash_type: 1 byte - pw-lock script hash_type
- args: 20 bytes - public key hash. e.g. ETH address
- witness(current version):
- lock: 65 bytes - secp256k1 signature_data
In addition to the ACP unlock method, PW-lock also supports the similar unlock of the CKB secp256k1 lock P2PKH signature verification. The difference is that the current version of pw-lock uses a slightly different hash algorithm to that of secp256k1_blake160.
Keccak(Blake2b(Tx) | witness)
Blake2b(Blake2b(Tx) | witness)
Features In Development
Add support for chains other than ETH, such as EOS, TRON, BITCOIN, DOGECOIN, etc. in the upcoming pw-lock.