agent-rs icon indicating copy to clipboard operation
agent-rs copied to clipboard

feat: provide from_pem_wo_parameter() to rebuild sepc256k1 identity from .pem without parameters

Open readygo67 opened this issue 1 year ago • 1 comments

Description

"dfx identity export xxx" normally export .pem file without parameter, looks like

"-----BEGIN EC PRIVATE KEY-----
MHQCAQEEIAgy7nZEcVHkQ4Z1Kdqby8SwyAiyKDQmtbEHTIM+WNeBoAcGBSuBBAAK
oUQDQgAEgO87rJ1ozzdMvJyZQ+GABDqUxGLvgnAnTlcInV3NuhuPv4O3VGzMGzeB
N3d26cRxD99TPtm8uo2OuzKhSiq6EQ==
-----END EC PRIVATE KEY-----
"

but currently agent-rs does not have a method to rebuild identity from it, this PR provides from_pem_wo_parameter() to achieve this purpose.

How Has This Been Tested?

test_secp256k1_public_key_wo_params() is defined for test.

Checklist:

  • [x] The title of this PR complies with Conventional Commits.
  • [x] I have edited the CHANGELOG accordingly.
  • [x] I have made corresponding changes to the documentation.

readygo67 avatar Sep 08 '24 11:09 readygo67

Dear @readygo67,

In order to potentially merge your code in this open-source repository and therefore proceed with your contribution, we need to have your approval on DFINITY's CLA.

If you decide to agree with it, please visit this issue and read the instructions there. Once you have signed it, re-trigger the workflow on this PR to see if your code can be merged.

— The DFINITY Foundation

sa-github-api avatar Sep 08 '24 11:09 sa-github-api