-
Notifications
You must be signed in to change notification settings - Fork 88
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Implements SDK-595. In line with quill's preferred format, this changes the default identity creation command to use secp256k1 keypairs instead of ed25519 keypairs. Other than general bitcoin friendliness, this enables using bip39 seed phrases which allows for paper backups of the identity pem.
- Loading branch information
1 parent
710e931
commit 4f10e12
Showing
13 changed files
with
265 additions
and
83 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,4 @@ | ||
-----BEGIN PRIVATE KEY----- | ||
MFMCAQEwBQYDK2VwBCIEIODVjQrIvbt3PO3FPDKCZs2FarAbsRrLuiQZ+NBslV9U | ||
oSMDIQDVkl2stdaeyBDvfb0t4qy9vhsv6xLl1v7p7i0NO1+9pw== | ||
-----END PRIVATE KEY----- |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
#!/usr/bin/env bats | ||
|
||
load ../utils/_ | ||
|
||
setup() { | ||
standard_setup | ||
} | ||
|
||
teardown() { | ||
dfx_stop | ||
|
||
standard_teardown | ||
} | ||
|
||
@test "can call a canister using an ed25519 identity" { | ||
install_asset ed25519 | ||
assert_command dfx identity import --disable-encryption ed25519 identity.pem | ||
dfx_new # This installs replica and other binaries | ||
dfx identity use ed25519 | ||
install_asset whoami | ||
dfx_start | ||
dfx canister create whoami | ||
dfx build | ||
dfx canister install whoami | ||
assert_command dfx canister call whoami whoami | ||
assert_eq '(principal "2nor3-keehi-duuup-d7jcn-onggn-3atzm-gejtl-5tlzn-k4g6c-nnbf7-7qe")' | ||
assert_command dfx identity get-principal | ||
assert_eq "2nor3-keehi-duuup-d7jcn-onggn-3atzm-gejtl-5tlzn-k4g6c-nnbf7-7qe" | ||
} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Oops, something went wrong.