mirror of
https://github.com/cosmos/cosmjs.git
synced 2025-03-10 21:49:15 +00:00
Import encodeBech32Pubkey and decodeBech32Pubkey in cli
This commit is contained in:
parent
b75445a0e1
commit
746f41137d
@ -2,6 +2,7 @@
|
|||||||
|
|
||||||
## 0.22.1 (unreleased)
|
## 0.22.1 (unreleased)
|
||||||
|
|
||||||
|
- @cosmjs/cli: Import `encodeBech32Pubkey` and `decodeBech32Pubkey` by default.
|
||||||
- @cosmjs/launchpad: Add ed25519 support to `encodeBech32Pubkey`.
|
- @cosmjs/launchpad: Add ed25519 support to `encodeBech32Pubkey`.
|
||||||
|
|
||||||
## 0.22.0 (2020-08-03)
|
## 0.22.0 (2020-08-03)
|
||||||
|
@ -89,6 +89,8 @@ export async function main(originalArgs: readonly string[]): Promise<void> {
|
|||||||
[
|
[
|
||||||
"coin",
|
"coin",
|
||||||
"coins",
|
"coins",
|
||||||
|
"decodeBech32Pubkey",
|
||||||
|
"encodeBech32Pubkey",
|
||||||
"encodeSecp256k1Pubkey",
|
"encodeSecp256k1Pubkey",
|
||||||
"encodeSecp256k1Signature",
|
"encodeSecp256k1Signature",
|
||||||
"logs",
|
"logs",
|
||||||
@ -156,6 +158,9 @@ export async function main(originalArgs: readonly string[]): Promise<void> {
|
|||||||
const data = toAscii("foo bar");
|
const data = toAscii("foo bar");
|
||||||
const signature = await wallet.sign(address, data);
|
const signature = await wallet.sign(address, data);
|
||||||
|
|
||||||
|
const bechPubkey = "coralvalconspub1zcjduepqvxg72ccnl9r65fv0wn3amlk4sfzqfe2k36l073kjx2qyaf6sk23qw7j8wq";
|
||||||
|
assert(encodeBech32Pubkey(decodeBech32Pubkey(bechPubkey), "coralvalconspub") == bechPubkey);
|
||||||
|
|
||||||
console.info("Done testing, will exit now.");
|
console.info("Done testing, will exit now.");
|
||||||
process.exit(0);
|
process.exit(0);
|
||||||
`;
|
`;
|
||||||
|
Loading…
x
Reference in New Issue
Block a user