-
Notifications
You must be signed in to change notification settings - Fork 18
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Add missing auth id(0x02~0x05) #75
Conversation
including * eos * tron * bitcoin * dogecoin Add hash functions: sha256 and ripemd160 Fix rust toolchains Code format
a4351c0
to
0b55623
Compare
* Add testcase : EOS Tron Bitcoin Dogecoin
Review Guide:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks good. Added some minor style suggestions.
omni_lock_commit_id_00191199.gz unzip and check hash by ckb-cli:
|
For those who want to test with lumos, here is the reference implementation: |
What's changed: - Switch to the deployment information of Omnilock - args: append 00. It is the omni lock flag byte, which indicate there's no advanced omni lock features been used. - `WitnessArgs.lock` size: 65 to 85, this is the size of a `OmnilockWitnessLock` to only save a 65-byte signature. - witness: instead of storing the 65-byte signature directly into `WitnessArgs.lock`, pack it into a `OmnilockWitnessLock`. Omnilock Contract Error Codes For Reference: - 8: args format is wrong - 5: `WitnessArgs.lock` is not a valid `OmnilockWitnessLock` [An example deposit in testnet](https://pudge.explorer.nervos.org/transaction/0x7bc9bd9a60852bf85d7142041867fb3d92b44a0d5821835fef9b1978442e84c0) Omnilock info: | parameter | value | | ----------- | -------------------------------------------------------------------- | | `code_hash` | 0xf329effd1c475a2978453c8600e1eaf0bc2087ee093c3ee64cc96ec6847752cb | | `hash_type` | `type` | | `tx_hash` | 0xff234bf2fb0ad2ab5b356ceda317d3dee3efb2c55b9427ef55d9dcbf6eecbf9f | | `index` | `0x0` | | `dep_type` | `code` | Related PRs: nervosnetwork/ckb-production-scripts#75 Closes #12
6702653
to
5e8c467
Compare
* Display message on wallet with meaningful words. like below: You're sining: CKB transaction: 001122334455... works for bitcoin and ethereum * add new ethereum algorithm id(18) for displaying message * update bitcoin algorithm id * keep eos/tron/dogecoin as same to PW * Add trait: ChainConfig, used for other on-chain signatures * Add eth displaying testcase (#5)
12027c3
to
3bc30c8
Compare
Is the new |
* Add 0x at the beginning of prefix
deployed on testnet(commit: f884d9):
|
migrate PR from: nervosnetwork/ckb-production-scripts#75 including * eos * tron * bitcoin(Support UniSat and OKX wallet) * dogecoin Special feature for btc/etc, now they can display meaningful messages. * BTC(UniSat/OKX) You're signing: CKB (Bitcoin Layer-2) transaction: 0x{sighash_all in hex} * ETH(Metamask) You're signing: CKB transaction: 0x{sighash_all in hex}
* Add missing auth id(0x02~0x05) migrate PR from: nervosnetwork/ckb-production-scripts#75 including * eos * tron * bitcoin(Support UniSat and OKX wallet) * dogecoin Special feature for btc/etc, now they can display meaningful messages. * BTC(UniSat/OKX) You're signing: CKB (Bitcoin Layer-2) transaction: 0x{sighash_all in hex} * ETH(Metamask) You're signing: CKB transaction: 0x{sighash_all in hex} * Fix: Remove btc testcase annotation (#2) * Change Bitcoin Prefix (#10) --------- Co-authored-by: joii2020 <87224197+joii2020@users.noreply.github.com>
migrate PR from: nervosnetwork/ckb-production-scripts#75 including * eos * tron * bitcoin(Support UniSat and OKX wallet) * dogecoin Special feature for btc/etc, now they can display meaningful messages. * BTC(UniSat/OKX) You're signing: CKB (Bitcoin Layer-2) transaction: 0x{sighash_all in hex} * ETH(Metamask) You're signing: CKB transaction: 0x{sighash_all in hex}
NOTE
This PR is migrated to here.
The omnilock is moved to new repo.
including
Special feature for btc/etc, now they can display meaningful messages like below:
Other changes: