-
Notifications
You must be signed in to change notification settings - Fork 18
Conversation
examples/cardano-demo/cardano_demo.c
Outdated
CardanoDemo_OutputCapacityLen, | ||
} CardanoDemoErr; | ||
|
||
int check_costom_data(const uint8_t *data, size_t data_len) { |
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.
'costom` typo.
docs/cardano_lock.md
Outdated
* ```cardano_tx.signed.json``` is signatured | ||
|
||
Then, use the public key in cardano-success to verify the data. | ||
Verify uses the same library(cardano_serialization_lib) as the signature data witness into the script, so that it can be indirectly verified to be compatible with the official. |
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.
How to verify? Write down the steps.
docs/cardano_lock.md
Outdated
--cold-signing-key-file test_data/cold.skey.json \ | ||
--operational-certificate-issue-counter-file test_data/cold.counter.json | ||
``` | ||
2. Use get-sign-hash to generate hash. (tests/cardano_lock/src/bin/get-sign-hash.rs) |
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.
Add build script and command line example for this step.
docs/cardano_lock.md
Outdated
--mainnet \ | ||
--out-file test_data/cardano_tx.signed.json | ||
``` | ||
4. Pass the whole cborHex in the output json as the witnesses of ckb-auth. |
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.
How to verify?
|
||
pub fn run_auth_exec(algorithm_id: AlgorithmType, pubkey_hash: &[u8], message: &[u8], sign: &[u8]) { | ||
let args = format!( | ||
"{}:{:02X?}:{:02X?}:{}:{}:{}", |
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.
The point of ckb-auth is that it can use signatures generated by other blockchain wallet and then use this signature to verify the validity of some transaction. I think here we just verify that a signature is valid, but the message of that signature is not related to any transaction. Maybe we need to generate a valid transaction, then sign a message related to that transaction and finally verify this signature is valid.
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.
I think ckb-auth-cli is just meant to demonstrate the availability of a certain authentication feature. If a complete test is conducted, I believe you can review the test cases (tests/cardano_lock/Makefile).
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.
The ckb-auth-cli will add more contracts in the future, so I created a new project for it.
tools/ckb-auth-cli/src/main.rs
Outdated
@@ -0,0 +1,84 @@ | |||
mod auth_script; |
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.
I also created a command line client for ckb-auth in #14 . We should join the force.
This reverts commit 858606d.
Support cardano lock.