-
Notifications
You must be signed in to change notification settings - Fork 234
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 aex3 wallet support for hyperchain accounts #4171
base: master
Are you sure you want to change the base?
Conversation
ParentConnMod = aehttpc_aeternity, | ||
SignModule = get_sign_module(), | ||
{ok, PCSpendPubkey} = aeser_api_encoder:safe_decode(account_pubkey, PCSpendAddress), | ||
{ParentConnMod, PCSpendPubkey, HCPCPairs, SignModule}. | ||
|
||
parse_ae_stakers(StakersConfig) -> | ||
lists:map( | ||
fun(#{<<"hyper_chain_account">> := #{<<"pub">> := HCEncodedPubkey} = HC, |
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.
Not hyperchain_account
?
private_to_public(DKey = #{curve := Curve, pub_key := undefined, | ||
priv_key := <<PrivateKey:32/binary>>}) -> | ||
DKey#{pub_key := private_to_public(Curve, PrivateKey)}; | ||
private_to_public(DKey) -> |
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.
Perhaps at least pattern-match on #{pub_key := _}
?
case {Path, key_type(DKey0)} of | ||
{"m" ++ Path1, private} -> | ||
derive_private_path(Path1, DKey0); | ||
{"m" ++ _Path1, public} -> |
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 this case also be checked for "M"
?
Allow use of aex3 wallet files containing mnemonic phrase as hyper chain staking accounts and parent chain accounts when using an AE parent chain.
Imports the read only parts of erlang libraries eaex3 and eaax10 directly.
This PR was sponsored by the ACF