Format CLI examples

This commit is contained in:
Simon Warta
2021-07-22 13:43:59 +02:00
parent fcb017d83d
commit a6b8e35b84
3 changed files with 25 additions and 16 deletions
+9 -1
View File
@@ -1,4 +1,12 @@
import { coin, coins, makeSignDoc, makeStdTx, CosmosClient, MsgDelegate, Secp256k1HdWallet } from "@cosmjs/launchpad";
import {
coin,
coins,
makeSignDoc,
makeStdTx,
CosmosClient,
MsgDelegate,
Secp256k1HdWallet,
} from "@cosmjs/launchpad";
const wallet = await Secp256k1HdWallet.fromMnemonic(
"enlist hip relief stomach skate base shallow young switch frequent cry park",
+15 -15
View File
@@ -2,28 +2,28 @@ 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/PubKeyMultisigThreshold",
value: {
threshold: "3",
pubkeys: [
{
"type": "tendermint/PubKeySecp256k1",
"value": "A4KZH7VSRwW/6RTExROivRYKsQP63LnGcBlXFo+eKGpQ"
type: "tendermint/PubKeySecp256k1",
value: "A4KZH7VSRwW/6RTExROivRYKsQP63LnGcBlXFo+eKGpQ",
},
{
"type": "tendermint/PubKeySecp256k1",
"value": "A8/Cq4VigOnDgl6RSdcx97fjrdCo/qwAX6C34n7ZDZLs"
type: "tendermint/PubKeySecp256k1",
value: "A8/Cq4VigOnDgl6RSdcx97fjrdCo/qwAX6C34n7ZDZLs",
},
{
"type": "tendermint/PubKeySecp256k1",
"value": "ApKgZuwy03xgdRnXqG6yEHATomsWDOPacy7nbpsuUCSS"
type: "tendermint/PubKeySecp256k1",
value: "ApKgZuwy03xgdRnXqG6yEHATomsWDOPacy7nbpsuUCSS",
},
{
"type": "tendermint/PubKeySecp256k1",
"value": "Aptm8E3WSSFS0RTAIUW+bLi/slYnTEE+h4qPTG28CHfq"
}
]
}
type: "tendermint/PubKeySecp256k1",
value: "Aptm8E3WSSFS0RTAIUW+bLi/slYnTEE+h4qPTG28CHfq",
},
],
},
};
const address = pubkeyToAddress(multisigPubkey, "cosmos");