-
Notifications
You must be signed in to change notification settings - Fork 3
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
Support multi-ecosystem derivation and sui addresses #5
base: main
Are you sure you want to change the base?
Conversation
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.
lgtm
// | ||
// taggedHash( AuxData || EvmTag || ChainId || LBTCAddress || WalletAddress ) | ||
// taggedHash( AuxData || ChainId || LBTCAddress || WalletAddress ) |
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.
- by the fact the byte is still there
- mb
LChainId
is better to show that it's something custom
// taggedHash( AuxData || ChainId || LBTCAddress || WalletAddress ) | |
// taggedHash( AuxData || DeprecatedChainTag || LChainId || LBTCAddress || WalletAddress ) |
// - 'wallet' is the EVM address that will claim this deposit | ||
// - 'chainId' is the chain id for the target EVM chain | ||
func EvmDepositSegwitPubkey(pk *PublicKey, lbtcContract, wallet Address, chainId, auxData []byte) (*PublicKey, error) { | ||
// - 'lbtcContract' is the address of the LBTC contract or object on the destination chain |
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.
// - 'lbtcContract' is the address of the LBTC contract or object on the destination chain | |
// - 'lbtcContract' is the address of the LBTC contract (EVM) or object (SUI) on the destination chain |
// just an initial seed to generate constant data for all tests | ||
hashVal := sha256.Sum256([]byte("segwit_lombard_tweak_test_rs")) | ||
pk := secp256k1.PrivKeyFromBytes(hashVal[:]).PubKey() |
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.
shouldn't you read this public key from referenceValues
(e.g., from the rootDepositKey
field) so that the reference values are self-contained?
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.
@russanto @hashxtree any thoughts here? Thanks so much!
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.
Hey @hashxtree, are you guys going to merge this? We're currently using values from here to test our address generation and want to make sure the values/spec won't change.
New features
TODOs