Create pubkeyToAddress in @cosmjs/amino

This commit is contained in:
Simon Warta
2021-03-23 13:37:24 +01:00
parent cb37451f8f
commit 843b82badd
7 changed files with 52 additions and 37 deletions
+2 -3
View File
@@ -1,5 +1,4 @@
import { MultisigThresholdPubkey, pubkeyToRawAddress } from "@cosmjs/amino";
import { Bech32 } from "@cosmjs/encoding";
import { MultisigThresholdPubkey, pubkeyToAddress } from "@cosmjs/amino";
// https://github.com/cosmos/cosmjs/issues/673#issuecomment-779847238
const multisigPubkey: MultisigThresholdPubkey = {
@@ -27,5 +26,5 @@ const multisigPubkey: MultisigThresholdPubkey = {
}
};
const address = Bech32.encode("cosmos", pubkeyToRawAddress(multisigPubkey));
const address = pubkeyToAddress(multisigPubkey, "cosmos");
console.log(address);