Import encodeAminoPubkey/decodeAminoPubkey in cli
This commit is contained in:
parent
6f36b425d1
commit
59c8dca5c2
@ -2,7 +2,8 @@
|
||||
|
||||
## 0.22.1 (unreleased)
|
||||
|
||||
- @cosmjs/cli: Import `encodeBech32Pubkey` and `decodeBech32Pubkey` by default.
|
||||
- @cosmjs/cli: Import `encodeAminoPubkey`, `encodeBech32Pubkey`,
|
||||
`decodeAminoPubkey` and `decodeBech32Pubkey` by default.
|
||||
- @cosmjs/launchpad: Add ed25519 support to `encodeBech32Pubkey`.
|
||||
- @cosmjs/launchpad: Add `encodeAminoPubkey` and `decodeAminoPubkey`.
|
||||
- @cosmjs/utils: Add `arrayContentEquals`.
|
||||
|
||||
@ -89,7 +89,9 @@ export async function main(originalArgs: readonly string[]): Promise<void> {
|
||||
[
|
||||
"coin",
|
||||
"coins",
|
||||
"decodeAminoPubkey",
|
||||
"decodeBech32Pubkey",
|
||||
"encodeAminoPubkey",
|
||||
"encodeBech32Pubkey",
|
||||
"encodeSecp256k1Pubkey",
|
||||
"encodeSecp256k1Signature",
|
||||
@ -114,7 +116,7 @@ export async function main(originalArgs: readonly string[]): Promise<void> {
|
||||
],
|
||||
],
|
||||
["@cosmjs/math", ["Decimal", "Int53", "Uint32", "Uint53", "Uint64"]],
|
||||
["@cosmjs/utils", ["assert", "sleep"]],
|
||||
["@cosmjs/utils", ["assert", "arrayContentEquals", "sleep"]],
|
||||
]);
|
||||
|
||||
console.info(colors.green("Initializing session for you. Have fun!"));
|
||||
@ -161,6 +163,9 @@ export async function main(originalArgs: readonly string[]): Promise<void> {
|
||||
const bechPubkey = "coralvalconspub1zcjduepqvxg72ccnl9r65fv0wn3amlk4sfzqfe2k36l073kjx2qyaf6sk23qw7j8wq";
|
||||
assert(encodeBech32Pubkey(decodeBech32Pubkey(bechPubkey), "coralvalconspub") == bechPubkey);
|
||||
|
||||
const aminoPubkey = fromHex("eb5ae98721034f04181eeba35391b858633a765c4a0c189697b40d216354d50890d350c70290");
|
||||
assert(arrayContentEquals(encodeAminoPubkey(decodeAminoPubkey(aminoPubkey)), aminoPubkey));
|
||||
|
||||
console.info("Done testing, will exit now.");
|
||||
process.exit(0);
|
||||
`;
|
||||
|
||||
Loading…
Reference in New Issue
Block a user