18 KiB
18 KiB
CHANGELOG
The format is based on Keep a Changelog, and this project adheres to Semantic Versioning.
Unreleased
Added
- @cosmjs/cosmwasm-launchpad: Expose
SigningCosmWasmClient.fees. - @cosmjs/cosmwasm-stargate: Expose
SigningCosmWasmClient.feesandSigningCosmWasmClient.registry. - @cosmjs/launchpad: Expose
SigningCosmosClient.fees. - @cosmjs/stargate: Expose
SigningStargateClient.feesandSigningStargateClient.registry. - @cosmjs/stargate: Add support for different account types in
accountFromAnyandStargateClient. AddedModuleAccountand vesting accountsBaseVestingAccount,ContinuousVestingAccount,DelayedVestingAccountandPeriodicVestingAccount. - @cosmjs/stargate: Add codecs for IBC channel tx, client query/tx, and connection tx, as well as Tendermint.
- @cosmjs/stargate: Add support for IBC message types in
SigningStargateClient. - @cosmjs/stargate: Added new
logsexport with all the functionality from @cosmjs/launchpad. - @cosmjs/stargate: Added new
Coin,coin,coinsandparseCoinsexports which have the same functionality as already existed in @cosmjs/launchpad. - @cosmjs/amino: New package created that contains the shared amino signing functionality for @cosmjs/launchpad and @cosmjs/stargate.
- @cosmjs/amino: Split public key interfaces into
Pubkey,SinglePubkeyandSecp256k1PubkeywherePubkeyis a generalization of the oldPubKeythat supported nested pubkeys for multisig.SinglePubkeyis the oldPubKeyin which thevalueis a base64 encoded string. AndSecp256k1Pubkeyis a single secp256k1 pubkey. - @cosmjs/utils: The new
arrayContentStartsWithworks similar toarrayContentEqualsbut only checks the start of an array. - @cosmjs/proto-signing: Added new
Coin,coin,coinsandparseCoinsexports which have the same functionality as already existed in @cosmjs/launchpad. - @cosmjs/stargate: Add
SigningStargateClient.sign, which allows you to create signed transactions without broadcasting them directly. The new typeSignerDatacan be passed into.signto skip querying account number, sequence and chain ID. - @cosmjs/stargate: Add constructor
SigningStargateClient.offlinewhich does not connect to Tendermint. This allows offline signing. - @cosmjs/stargate: Add
makeMultisignedTxwhich allows you to assemble a transaction signed by a multisig account. - @cosmjs/stargate: Add
delegateTokens,undelegateTokensandwithdrawRewardsmethods toSigningStargateClient. - @cosmjs/stargate: Export
defaultGasLimitsanddefaultGasPrice. - @cosmjs/cosmwasm-stargate: Export
defaultGasLimits. - @cosmjs/stargate:
SigningStargateClientconstructor is nowprotected. - @cosmjs/cosmwasm-stargate:
SigningCosmWasmClientconstructor is nowprotected. - @cosmjs/cosmwasm-stargate: Add
SigningCosmWasmClient.offlinestatic method for constructing offline clients without a Tendermint client.
Changed
- @cosmjs/cosmwasm-stargate: Codec adapted to support wasmd 0.16. Older versions of wasmd are not supported anymore.
- @cosmjs/stargate: Let
AuthExtension.accountandAuthExtension.unverified.accountreturn an account of typeAny. This makes the caller responsible for decoding the type. - @cosmjs/stargate: Remove
accountFromProtoin favour ofaccountFromAny. - @cosmjs/stargate: Rename
Rpcinterface toProtobufRpcClientandcreateRpctocreateProtobufRpcClient. - @cosmjs/stargate: Reorganize nesting structure of IBC query client and add support for more methods.
- @cosmjs/tendermint-rpc: The fields
CommitSignature.validatorAddress,.timestampand.signatureare now optional. They are unset whenblockIdFlagisBlockIdFlag.Absent. The decoding intoCommitSignatureis only updated for the classTendermint34Client, not forClient. Please migrate to the former. - @cosmjs/launchpad:
rawSecp256k1PubkeyToAddresswas removed. Instead useBech32.encode(prefix, rawSecp256k1PubkeyToRawAddress(pubkeyRaw))withrawSecp256k1PubkeyToRawAddressfrom @cosmjs/amino. - @cosmjs/stargate:
parseRawLogis now nested under thelogsexport. - @cosmjs/stargate: Query extensions now have unverified queries at the root and
verified queries nested under
.verified. - @cosmjs/cosmwasm-stargate:
wasmextension now has unverified queries at the root. - @cosmjs/stargate:
StargateClient.getAccountnow uses an unverified query andStargateClient.getAccountUnverifiedhas been removed.StargateClient.getAccountVerifiedhas been added, which performs a verified query. - @cosmjs/cosmwasm-stargate:
CosmWasmClient.getAccountnow uses an unverified query andCosmWasmClient.getAccountUnverifiedhas been removed.CosmWasmClient.getAccountVerifiedhas been added, which performs a verified query. - @cosmjs/stargate:
StargateClient.getSequencenow rejects if the account is not found, instead of returning null. - @cosmjs/stargate:
StargateClient.getBalancenow returns a 0 balance instead of null. - @cosmjs/stargate:
StargateClient.getAllBalancesUnverifiedhas been renamed.getAllBalances. - @cosmjs/cosmwasm-stargate:
CosmWasmClient.getSequencenow rejects if the account is not found, instead of returning null. - @cosmjs/cosmwasm-stargate:
CosmWasmClient.getBalancenow returns a 0 balance instead of null.
Deprecated
- @cosmjs/tendermint-rpc:
Clienthas been deprecated. Launchpad applications do not need a Tendermint RPC client and Stargate applications should useTendermint34Client.
Removed
- @cosmjs/stargate:
coinFromProtohelper has been removed as it is no longer needed after thets-protomigration.
0.24.0 - 2021-03-11
- @cosmjs/cosmwasm: This package is now deprecated. The same functionality is now available in @cosmjs/cosmwasm-launchpad.
- @cosmjs/cosmwasm:
logsis no longer exported. Uselogsfrom @cosmjs/launchpad instead. - @cosmjs/cosmwasm: Export
JsonObject,ChangeAdminResultandWasmDatatypes as well asisValidBuilderandparseWasmDatafunctions. - @cosmjs/cosmwasm: Add
CosmWasmClient.getTxmethod for searching by ID and remove such functionality fromCosmWasmClient.searchTx. - @cosmjs/cosmwasm: Rename
SigningCosmWasmClient.senderAddressto.signerAddress. - @cosmjs/cosmwasm-stargate: Add new package for CosmWasm Stargate support.
- @cosmjs/crypto: Change
Secp256k1Keypairfrom tagged type to simple interface. - @cosmjs/launchpad: Add
Secp256k1Walletto manage a single raw secp256k1 keypair. - @cosmjs/launchpad:
OfflineSignertype’ssignmethod renamedsignAminoandSignResponsetype renamedAminoSignResponse. - @cosmjs/launchpad:
Secp256k1HdWallet.signmethod renamedsignAmino. - @cosmjs/launchpad: Add
CosmosClient.getTxmethod for searching by ID and remove such functionality fromCosmosClient.searchTx. - @cosmjs/launchpad: Add
SigningCosmosClient.signmethod for signing without broadcasting. - @cosmjs/launchpad: Add
SigningCosmosClient.appendSignaturemethod creating transactions with multiple signatures. - @cosmjs/launchpad: Add support for undefined memo in
makeSignDoc. - @cosmjs/launchpad: Rename
SigningCosmosClient.senderAddressto.signerAddress. - @cosmjs/proto-signing: Add new package for handling transaction signing with protobuf encoding.
- @cosmjs/proto-signing: Expose
DirectSignResponseinterface. - @cosmjs/stargate: Add new package for Cosmos SDK Stargate support.
- @cosmjs/tendermint-rpc: Make
Client.detectVersionprivate and let it return a version instead of a client. - @cosmjs/tendermint-rpc: Make the constructor of
Clientprivate. AddClient.createfor creating a Tendermint client given an RPC client and an optional adaptor. - @cosmjs/tendermint-rpc: Add an optional adaptor argument to
Client.connectwhich allows skipping the auto-detection. - @cosmjs/tendermint-rpc: Remove export
v0_33in favour ofadaptor33andadaptor34. Export theAdaptortype. - @cosmjs/tendermint-rpc: Export
DateTimeclass. - @cosmjs/tendermint-rpc: Remove types
QueryString,Base64String,HexString,IntegerStringandIpPortString. Usestringinstead. - @cosmjs/tendermint-rpc: Remove types
BlockHash,TxBytesandTxHash. UseUint8Arrayinstead.
Added
- @cosmjs/launchpad: Export distribution module msg types
MsgFundCommunityPool,MsgSetWithdrawAddress,MsgWithdrawDelegatorReward,MsgWithdrawValidatorCommissionand type checker helper functions. - @cosmjs/utils: Added
assertDefinedAndNotNull. - @cosmjs/tendermint-rpc: The new
Tendermint34Clientis a copy of the oldClientbut without the automatic version detection. Its usage is encouraged overClientif you connect to a Tendermint 0.34 backend.
Changed
- @cosmjs/encoding: Change return type of
fromRfc3339fromReadonlyDatetoDateas the caller becomes the owner of the object and can safely mutate it in any way. - @cosmjs/launchpad-ledger: Renamed to @cosmjs/ledger-amino.
- @cosmjs/ledger-amino:
LedgerSigner.signmethod renamedsignAmino.
Deprecated
- @cosmjs/tendermint-rpc: Deprecate
DateTimein favour of the free functionsfromRfc3339WithNanosecondsandtoRfc3339WithNanoseconds.
0.23.2 (2021-01-06)
Security
- @cosmjs/cli: Update vulnerable axios dependency.
- @cosmjs/faucet-client: Update vulnerable axios dependency.
- @cosmjs/launchpad: Update vulnerable axios dependency.
- @cosmjs/tendermint-rpc: Update vulnerable axios dependency.
0.23.1 (2020-10-27)
- @cosmjs/crypto: Export new convenience functions
keccak256,ripemd160,sha1,sha256andsha512. - @cosmjs/faucet-client: Add new package which exports
FaucetClientclass.
0.23.0 (2020-10-09)
- @cosmjs/cli: Expose
HdPathtype. - @cosmjs/cosmwasm: Rename
CosmWasmClient.postTxmethod to.broadcastTx. - @cosmjs/cosmwasm: Rename
FeeTabletype toCosmWasmFeeTable. - @cosmjs/cosmwasm:
SigningCosmWasmClientconstructor now takes optional argumentsgasPriceandgasLimitsinstead ofcustomFeesfor easier customization. - @cosmjs/cosmwasm: Rename
SigningCosmWasmClient.signAndPostmethod to.signAndBroadcast. - @cosmjs/cosmwasm: Use stricter type
Record<string, unknown>for smart query, init, migrate and handle messages (inWasmExtension.wasm.queryContractSmart,CosmWasmClient.queryContractSmart,SigningCosmWasmClient.instantiate,SigningCosmWasmClient.migrate,SigningCosmWasmClient.execute). - @cosmjs/crypto: Export new type alias
HdPath. - @cosmjs/crypto: Add
Secp256k1Signature.toFixedLengthmethod. - @cosmjs/demo-staking: Remove package and supporting scripts.
- @cosmjs/encoding: Add
limitparameter toBech32.encodeand.decode. The new default limit for decoding is infinity (was 90 before). Set it to 90 to create a strict decoder. - @cosmjs/faucet: Environmental variable
FAUCET_FEErenamed toFAUCET_GAS_PRICEand now only accepts one token. Environmental variableFAUCET_GASrenamed toFAUCET_GAS_LIMIT. - @cosmjs/faucet:
/creditAPI now expectsdenom(base token) instead ofticker(unit token). Environmental variables specifying credit amounts now need to use uppercase denom. - @cosmjs/launchpad: Rename
FeeTabletype toCosmosFeeTableand export a new more generic typeFeeTable. - @cosmjs/launchpad: Add new class
GasPrice, new helper typeGasLimitsand new helper functionbuildFeeTablefor easier handling of gas prices and fees. - @cosmjs/launchpad: Rename
CosmosClient.postTxmethod to.broadcastTx. - @cosmjs/launchpad:
SigningCosmosClientconstructor now takes optional argumentsgasPriceandgasLimitsinstead ofcustomFeesfor easier customization. - @cosmjs/launchpad: Rename
SigningCosmosClient.signAndPostmethod to.signAndBroadcast. - @cosmjs/launchpad: Rename
PostTx-related types toBroadcastTxResult,BroadcastTxSuccessandBroadcastTxFailurerespectively, as well as helper functionsisBroadcastTxFailure,isBroadcastTxSuccessandassertIsBroadcastTxSuccess. - @cosmjs/launchpad: Export
isSearchByIdQuery,isSearchByHeightQuery,isSearchBySentFromOrToQueryandisSearchByTagsQuery. - @cosmjs/launchpad: Change type of
TxsResponse.logsandBroadcastTxsResponse.logstounknown[]. - @cosmjs/launchpad: Export
StdSignDocand create helpers to make and serialize aStdSignDoc:makeSignDocandserializeSignDoc. - @cosmjs/launchpad: Let
OfflineSigner.signtake anStdSignDocinstead of an encoded message and return aSignResponsethat includes the document which was signed. - @cosmjs/launchpad: Remove
PrehashTypeand the prehash type argument inOfflineSigner.signbecause the signer now needs to know how to serialize anStdSignDoc. - @cosmjs/launchpad: Remove
makeSignBytesin favour ofmakeSignDocandserializeSignDoc. - @cosmjs/launchpad: Create
WrappedTx,WrappedStdTxandisWrappedStdTxto better represent the Amino tx interface. DeprecateCosmosSdkTx, which is an alias forWrappedStdTx. - @cosmjs/launchpad: Add
makeStdTxto create anStdTx. - @cosmjs/launchpad: Rename
Secp256k1WallettoSecp256k1HdWallet. Later on, we'll useSecp256k1Walletfor single key wallets. - @cosmjs/launchpad-ledger: Add package supporting Ledger device integration for
Launchpad. Two new classes are provided:
LedgerSigner(for most use cases) andLaunchpadLedgerfor more fine-grained access. - @cosmjs/math: Add
.multiplymethod toDecimalclass. - @cosmjs/math: Deprecate
Uint32.fromBigEndianBytesin favour ofUint32.fromBytes, which supports both big and little endian. - @cosmjs/math: Deprecate
Uint64.fromBytesBigEndianin favour ofUint64.fromBytes, which supports both big and little endian. - @cosmjs/math: Add
Uint32.fromString. - @cosmjs/tendermint-rpc: Make
BroadcastTxCommitResponse.heightnon-optional. - @cosmjs/tendermint-rpc: Make
TxProof.proof.leafHashnon-optional because it is always set. - @cosmjs/tendermint-rpc: Change type of
GenesisResponse.appStatetoRecord<string, unknown> | undefined. - @cosmjs/tendermint-rpc: Remove obsolete
TxData.tagsand makeTxData.eventsnon-optional. RenameTagtoAttribute. - @cosmjs/tendermint-rpc: Remove obsolete
BlockResultsResponse.beginBlockand.beginBlock. The new.beginBlockEventsand.endBlockEventsnow parse the events correctly. - @cosmjs/tendermint-rpc: Remove trivial helpers
getTxEventHeight,getHeaderEventHeightandgetBlockEventHeightbecause they don't do anything else than accessing an object member. - @cosmjs/tendermint-rpc: Add support for connecting to Tendermint RPC 0.34.
- @cosmjs/tendermint-rpc: Make
TxEvent.indexoptional and deprecate it because it is not set anymore in Tendermint 0.34. - @cosmjs/utils: Add
assertDefined. - @cosmjs/faucet: Rename binary from
cosmwasm-faucettocosmos-faucet.
0.22.3 (2020-09-15)
- @cosmjs/math: Add
Decimal.minus.
0.22.2 (2020-08-11)
- @cosmjs/faucet: Log errors for failed send transactions.
- @cosmjs/faucet: Add config variable
FAUCET_MEMO. - @cosmjs/faucet: Add config variables
FAUCET_FEEandFAUCET_GAS. - @cosmjs/launchpad: Add
parseCoinshelper.
0.22.1 (2020-08-11)
- @cosmjs/cli: Import
encodeAminoPubkey,encodeBech32Pubkey,decodeAminoPubkeyanddecodeBech32Pubkeyby default. - @cosmjs/launchpad: Add ed25519 support to
encodeBech32Pubkey. - @cosmjs/launchpad: Add
encodeAminoPubkeyanddecodeAminoPubkey. - @cosmjs/utils: Add
arrayContentEquals. - @cosmjs/faucet: Add config variables
FAUCET_ADDRESS_PREFIXandFAUCET_TOKENS. - @cosmjs/faucet: Remove broken chain ID from
cosmwasm-faucet generate.
0.22.0 (2020-08-03)
- @cosmjs/cli: Now supports HTTPs URLs for
--initcode sources. - @cosmjs/cli: Now supports adding code directly via
--code. - @cosmjs/cosmwasm: Rename
CosmWasmClient.getNoncemethod to.getSequence. - @cosmjs/cosmwasm: Remove
RestClientclass in favour of new modularLcdClientclass from @cosmjs/sdk38. - @cosmjs/cosmwasm: Add
SigningCosmWasmClient.signAndPostas a mid-level abstraction betweenSigningCosmWasmClient.upload/.instantiate/.executeand.postTx. - @cosmjs/cosmwasm: Use
*PostTx*types and helpers from @cosmjs/sdk38. Remove exportedPostTxResult. - @cosmjs/cosmwasm:
ContractDetailswas removed in favour of justContract. The missinginit_msgis now available via the contract's code history (seegetContractCodeHistory). - @cosmjs/cosmwasm: Remove
SigningCallbackin favour of theOfflineSignerinterface. - @cosmjs/sdk38: Rename
CosmosClient.getNoncemethod to.getSequence. - @cosmjs/sdk38: Remove
RestClientclass in favour of new modularLcdClientclass. - @cosmjs/sdk38: Remove
Pentype in favour ofOfflineSignerand removeSecp256k1Penclass in favour ofSecp256k1Walletwhich takes anOfflineSignerinstead of aSigningCallback. - @cosmjs/sdk38: Rename
CosmosSdkAccounttoBaseAccountand export the type. - @cosmjs/sdk38:
BaseAccountnow usesnumber | stringas the type foraccount_numberandsequence. The new helpersuint64ToNumberanduint64ToStringallow you to normalize the mixed input. - @cosmjs/sdk38:
BaseAccountnow usesstring | PubKey | nullas the type forpublic_key. The new helpernormalizePubkeyallows you to normalize the mixed input. - @cosmjs/math: Add missing integer check to
Uint64.fromNumber. BeforeUint64.fromNumber(1.1)produced some result. - @cosmjs/sdk38: Add
SigningCosmosClient.signAndPostas a mid-level abstraction betweenSigningCosmosClient.sendTokensand.postTx. - @cosmjs/sdk38: Export
PostTxFailure/PostTxSuccessand type checkersisPostTxFailure/isPostTxSuccess; exportassertIsPostTxSuccess. - @cosmjs/sdk38:
Secp256k1Wallets can now be generated randomly withSecp256k1Wallet.generate(n)wherenis 12, 15, 18, 21 or 24 mnemonic words. - @cosmjs/sdk38: The new
Secp256k1Wallet.serializeand.deserializeallow encrypted serialization of the wallet. - @cosmjs/sdk38: Remove the obsolete
upload,init,execproperties fromFeeTable. @cosmjs/cosmwasm has its ownFeeTablewith those properties. - @cosmjs/sdk38: Rename package to @cosmjs/launchpad.