mirror of
https://github.com/cosmos/cosmjs.git
synced 2025-03-11 14:09:15 +00:00
31 lines
880 B
TypeScript
31 lines
880 B
TypeScript
import { MultisigThresholdPubkey, pubkeyToAddress } from "@cosmjs/amino";
|
|
|
|
// https://github.com/cosmos/cosmjs/issues/673#issuecomment-779847238
|
|
const multisigPubkey: MultisigThresholdPubkey = {
|
|
type: "tendermint/PubKeyMultisigThreshold",
|
|
value: {
|
|
threshold: "3",
|
|
pubkeys: [
|
|
{
|
|
type: "tendermint/PubKeySecp256k1",
|
|
value: "A4KZH7VSRwW/6RTExROivRYKsQP63LnGcBlXFo+eKGpQ",
|
|
},
|
|
{
|
|
type: "tendermint/PubKeySecp256k1",
|
|
value: "A8/Cq4VigOnDgl6RSdcx97fjrdCo/qwAX6C34n7ZDZLs",
|
|
},
|
|
{
|
|
type: "tendermint/PubKeySecp256k1",
|
|
value: "ApKgZuwy03xgdRnXqG6yEHATomsWDOPacy7nbpsuUCSS",
|
|
},
|
|
{
|
|
type: "tendermint/PubKeySecp256k1",
|
|
value: "Aptm8E3WSSFS0RTAIUW+bLi/slYnTEE+h4qPTG28CHfq",
|
|
},
|
|
],
|
|
},
|
|
};
|
|
|
|
const address = pubkeyToAddress(multisigPubkey, "cosmos");
|
|
console.log(address);
|