Import encodeBech32Pubkey and decodeBech32Pubkey in cli

This commit is contained in:
Simon Warta 2020-08-10 23:30:23 +02:00
parent b75445a0e1
commit 746f41137d
2 changed files with 6 additions and 0 deletions

View File

@ -2,6 +2,7 @@
## 0.22.1 (unreleased)
- @cosmjs/cli: Import `encodeBech32Pubkey` and `decodeBech32Pubkey` by default.
- @cosmjs/launchpad: Add ed25519 support to `encodeBech32Pubkey`.
## 0.22.0 (2020-08-03)

View File

@ -89,6 +89,8 @@ export async function main(originalArgs: readonly string[]): Promise<void> {
[
"coin",
"coins",
"decodeBech32Pubkey",
"encodeBech32Pubkey",
"encodeSecp256k1Pubkey",
"encodeSecp256k1Signature",
"logs",
@ -156,6 +158,9 @@ export async function main(originalArgs: readonly string[]): Promise<void> {
const data = toAscii("foo bar");
const signature = await wallet.sign(address, data);
const bechPubkey = "coralvalconspub1zcjduepqvxg72ccnl9r65fv0wn3amlk4sfzqfe2k36l073kjx2qyaf6sk23qw7j8wq";
assert(encodeBech32Pubkey(decodeBech32Pubkey(bechPubkey), "coralvalconspub") == bechPubkey);
console.info("Done testing, will exit now.");
process.exit(0);
`;