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

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",

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");

View File

@ -16,6 +16,7 @@
},
"scripts": {
"format": "prettier --write --loglevel warn \"./src/**/*.ts\"",
"format-examples": "prettier --write --loglevel warn \"./examples/**/*.ts\"",
"format-text": "prettier --write \"./*.md\"",
"lint": "eslint --max-warnings 0 \"./**/*.ts\" \"./*.js\"",
"lint-fix": "eslint --fix --max-warnings 0 \"./**/*.ts\" \"./*.js\"",