mirror of
https://github.com/cosmos/cosmjs.git
synced 2025-03-10 21:49:15 +00:00
14 KiB
14 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.fees
andSigningCosmWasmClient.registry
. - @cosmjs/launchpad: Expose
SigningCosmosClient.fees
. - @cosmjs/stargate: Expose
SigningStargateClient.fees
andSigningStargateClient.registry
. - @cosmjs/stargate: Add support for different account types in
accountFromAny
andStargateClient
. AddedModuleAccount
and vesting accountsBaseVestingAccount
,ContinuousVestingAccount
,DelayedVestingAccount
andPeriodicVestingAccount
.
Changed
- @cosmjs/cosmwasm-stargate: Codec adapted to support wasmd 0.16. Older versions of wasmd are not supported anymore.
- @cosmjs/stargate: Let
AuthExtension.account
andAuthExtension.unverified.account
return an account of typeAny
. This makes the caller responsible for decoding the type. - @cosmjs/stargate: Remove
accountFromProto
in favour ofaccountFromAny
. - @cosmjs/tendermint-rpc: The fields
CommitSignature.validatorAddress
,.timestamp
and.signature
are now optional. They are unset whenblockIdFlag
isBlockIdFlag.Absent
. The decoding intoCommitSignature
is only updated for the classTendermint34Client
, not forClient
. Please migrate to the former.
Deprecated
- @cosmjs/tendermint-rpc:
Client
has been deprecated. Launchpad applications do not need a Tendermint RPC client and Stargate applications should useTendermint34Client
.
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:
logs
is no longer exported. Uselogs
from @cosmjs/launchpad instead. - @cosmjs/cosmwasm: Export
JsonObject
,ChangeAdminResult
andWasmData
types as well asisValidBuilder
andparseWasmData
functions. - @cosmjs/cosmwasm: Add
CosmWasmClient.getTx
method for searching by ID and remove such functionality fromCosmWasmClient.searchTx
. - @cosmjs/cosmwasm: Rename
SigningCosmWasmClient.senderAddress
to.signerAddress
. - @cosmjs/cosmwasm-stargate: Add new package for CosmWasm Stargate support.
- @cosmjs/crypto: Change
Secp256k1Keypair
from tagged type to simple interface. - @cosmjs/launchpad: Add
Secp256k1Wallet
to manage a single raw secp256k1 keypair. - @cosmjs/launchpad:
OfflineSigner
type’ssign
method renamedsignAmino
andSignResponse
type renamedAminoSignResponse
. - @cosmjs/launchpad:
Secp256k1HdWallet.sign
method renamedsignAmino
. - @cosmjs/launchpad: Add
CosmosClient.getTx
method for searching by ID and remove such functionality fromCosmosClient.searchTx
. - @cosmjs/launchpad: Add
SigningCosmosClient.sign
method for signing without broadcasting. - @cosmjs/launchpad: Add
SigningCosmosClient.appendSignature
method creating transactions with multiple signatures. - @cosmjs/launchpad: Add support for undefined memo in
makeSignDoc
. - @cosmjs/launchpad: Rename
SigningCosmosClient.senderAddress
to.signerAddress
. - @cosmjs/proto-signing: Add new package for handling transaction signing with protobuf encoding.
- @cosmjs/proto-signing: Expose
DirectSignResponse
interface. - @cosmjs/stargate: Add new package for Cosmos SDK Stargate support.
- @cosmjs/tendermint-rpc: Make
Client.detectVersion
private and let it return a version instead of a client. - @cosmjs/tendermint-rpc: Make the constructor of
Client
private. AddClient.create
for creating a Tendermint client given an RPC client and an optional adaptor. - @cosmjs/tendermint-rpc: Add an optional adaptor argument to
Client.connect
which allows skipping the auto-detection. - @cosmjs/tendermint-rpc: Remove export
v0_33
in favour ofadaptor33
andadaptor34
. Export theAdaptor
type. - @cosmjs/tendermint-rpc: Export
DateTime
class. - @cosmjs/tendermint-rpc: Remove types
QueryString
,Base64String
,HexString
,IntegerString
andIpPortString
. Usestring
instead. - @cosmjs/tendermint-rpc: Remove types
BlockHash
,TxBytes
andTxHash
. UseUint8Array
instead.
Added
- @cosmjs/launchpad: Export distribution module msg types
MsgFundCommunityPool
,MsgSetWithdrawAddress
,MsgWithdrawDelegatorReward
,MsgWithdrawValidatorCommission
and type checker helper functions. - @cosmjs/utils: Added
assertDefinedAndNotNull
. - @cosmjs/tendermint-rpc: The new
Tendermint34Client
is a copy of the oldClient
but without the automatic version detection. Its usage is encouraged overClient
if you connect to a Tendermint 0.34 backend.
Changed
- @cosmjs/encoding: Change return type of
fromRfc3339
fromReadonlyDate
toDate
as 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.sign
method renamedsignAmino
.
Deprecated
- @cosmjs/tendermint-rpc: Deprecate
DateTime
in favour of the free functionsfromRfc3339WithNanoseconds
andtoRfc3339WithNanoseconds
.
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
,sha256
andsha512
. - @cosmjs/faucet-client: Add new package which exports
FaucetClient
class.
0.23.0 (2020-10-09)
- @cosmjs/cli: Expose
HdPath
type. - @cosmjs/cosmwasm: Rename
CosmWasmClient.postTx
method to.broadcastTx
. - @cosmjs/cosmwasm: Rename
FeeTable
type toCosmWasmFeeTable
. - @cosmjs/cosmwasm:
SigningCosmWasmClient
constructor now takes optional argumentsgasPrice
andgasLimits
instead ofcustomFees
for easier customization. - @cosmjs/cosmwasm: Rename
SigningCosmWasmClient.signAndPost
method 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.toFixedLength
method. - @cosmjs/demo-staking: Remove package and supporting scripts.
- @cosmjs/encoding: Add
limit
parameter toBech32.encode
and.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_FEE
renamed toFAUCET_GAS_PRICE
and now only accepts one token. Environmental variableFAUCET_GAS
renamed toFAUCET_GAS_LIMIT
. - @cosmjs/faucet:
/credit
API now expectsdenom
(base token) instead ofticker
(unit token). Environmental variables specifying credit amounts now need to use uppercase denom. - @cosmjs/launchpad: Rename
FeeTable
type toCosmosFeeTable
and export a new more generic typeFeeTable
. - @cosmjs/launchpad: Add new class
GasPrice
, new helper typeGasLimits
and new helper functionbuildFeeTable
for easier handling of gas prices and fees. - @cosmjs/launchpad: Rename
CosmosClient.postTx
method to.broadcastTx
. - @cosmjs/launchpad:
SigningCosmosClient
constructor now takes optional argumentsgasPrice
andgasLimits
instead ofcustomFees
for easier customization. - @cosmjs/launchpad: Rename
SigningCosmosClient.signAndPost
method to.signAndBroadcast
. - @cosmjs/launchpad: Rename
PostTx
-related types toBroadcastTxResult
,BroadcastTxSuccess
andBroadcastTxFailure
respectively, as well as helper functionsisBroadcastTxFailure
,isBroadcastTxSuccess
andassertIsBroadcastTxSuccess
. - @cosmjs/launchpad: Export
isSearchByIdQuery
,isSearchByHeightQuery
,isSearchBySentFromOrToQuery
andisSearchByTagsQuery
. - @cosmjs/launchpad: Change type of
TxsResponse.logs
andBroadcastTxsResponse.logs
tounknown[]
. - @cosmjs/launchpad: Export
StdSignDoc
and create helpers to make and serialize aStdSignDoc
:makeSignDoc
andserializeSignDoc
. - @cosmjs/launchpad: Let
OfflineSigner.sign
take anStdSignDoc
instead of an encoded message and return aSignResponse
that includes the document which was signed. - @cosmjs/launchpad: Remove
PrehashType
and the prehash type argument inOfflineSigner.sign
because the signer now needs to know how to serialize anStdSignDoc
. - @cosmjs/launchpad: Remove
makeSignBytes
in favour ofmakeSignDoc
andserializeSignDoc
. - @cosmjs/launchpad: Create
WrappedTx
,WrappedStdTx
andisWrappedStdTx
to better represent the Amino tx interface. DeprecateCosmosSdkTx
, which is an alias forWrappedStdTx
. - @cosmjs/launchpad: Add
makeStdTx
to create anStdTx
. - @cosmjs/launchpad: Rename
Secp256k1Wallet
toSecp256k1HdWallet
. Later on, we'll useSecp256k1Wallet
for single key wallets. - @cosmjs/launchpad-ledger: Add package supporting Ledger device integration for
Launchpad. Two new classes are provided:
LedgerSigner
(for most use cases) andLaunchpadLedger
for more fine-grained access. - @cosmjs/math: Add
.multiply
method toDecimal
class. - @cosmjs/math: Deprecate
Uint32.fromBigEndianBytes
in favour ofUint32.fromBytes
, which supports both big and little endian. - @cosmjs/math: Deprecate
Uint64.fromBytesBigEndian
in favour ofUint64.fromBytes
, which supports both big and little endian. - @cosmjs/math: Add
Uint32.fromString
. - @cosmjs/tendermint-rpc: Make
BroadcastTxCommitResponse.height
non-optional. - @cosmjs/tendermint-rpc: Make
TxProof.proof.leafHash
non-optional because it is always set. - @cosmjs/tendermint-rpc: Change type of
GenesisResponse.appState
toRecord<string, unknown> | undefined
. - @cosmjs/tendermint-rpc: Remove obsolete
TxData.tags
and makeTxData.events
non-optional. RenameTag
toAttribute
. - @cosmjs/tendermint-rpc: Remove obsolete
BlockResultsResponse.beginBlock
and.beginBlock
. The new.beginBlockEvents
and.endBlockEvents
now parse the events correctly. - @cosmjs/tendermint-rpc: Remove trivial helpers
getTxEventHeight
,getHeaderEventHeight
andgetBlockEventHeight
because 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.index
optional and deprecate it because it is not set anymore in Tendermint 0.34. - @cosmjs/utils: Add
assertDefined
. - @cosmjs/faucet: Rename binary from
cosmwasm-faucet
tocosmos-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_FEE
andFAUCET_GAS
. - @cosmjs/launchpad: Add
parseCoins
helper.
0.22.1 (2020-08-11)
- @cosmjs/cli: Import
encodeAminoPubkey
,encodeBech32Pubkey
,decodeAminoPubkey
anddecodeBech32Pubkey
by default. - @cosmjs/launchpad: Add ed25519 support to
encodeBech32Pubkey
. - @cosmjs/launchpad: Add
encodeAminoPubkey
anddecodeAminoPubkey
. - @cosmjs/utils: Add
arrayContentEquals
. - @cosmjs/faucet: Add config variables
FAUCET_ADDRESS_PREFIX
andFAUCET_TOKENS
. - @cosmjs/faucet: Remove broken chain ID from
cosmwasm-faucet generate
.
0.22.0 (2020-08-03)
- @cosmjs/cli: Now supports HTTPs URLs for
--init
code sources. - @cosmjs/cli: Now supports adding code directly via
--code
. - @cosmjs/cosmwasm: Rename
CosmWasmClient.getNonce
method to.getSequence
. - @cosmjs/cosmwasm: Remove
RestClient
class in favour of new modularLcdClient
class from @cosmjs/sdk38. - @cosmjs/cosmwasm: Add
SigningCosmWasmClient.signAndPost
as a mid-level abstraction betweenSigningCosmWasmClient.upload
/.instantiate
/.execute
and.postTx
. - @cosmjs/cosmwasm: Use
*PostTx*
types and helpers from @cosmjs/sdk38. Remove exportedPostTxResult
. - @cosmjs/cosmwasm:
ContractDetails
was removed in favour of justContract
. The missinginit_msg
is now available via the contract's code history (seegetContractCodeHistory
). - @cosmjs/cosmwasm: Remove
SigningCallback
in favour of theOfflineSigner
interface. - @cosmjs/sdk38: Rename
CosmosClient.getNonce
method to.getSequence
. - @cosmjs/sdk38: Remove
RestClient
class in favour of new modularLcdClient
class. - @cosmjs/sdk38: Remove
Pen
type in favour ofOfflineSigner
and removeSecp256k1Pen
class in favour ofSecp256k1Wallet
which takes anOfflineSigner
instead of aSigningCallback
. - @cosmjs/sdk38: Rename
CosmosSdkAccount
toBaseAccount
and export the type. - @cosmjs/sdk38:
BaseAccount
now usesnumber | string
as the type foraccount_number
andsequence
. The new helpersuint64ToNumber
anduint64ToString
allow you to normalize the mixed input. - @cosmjs/sdk38:
BaseAccount
now usesstring | PubKey | null
as the type forpublic_key
. The new helpernormalizePubkey
allows 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.signAndPost
as a mid-level abstraction betweenSigningCosmosClient.sendTokens
and.postTx
. - @cosmjs/sdk38: Export
PostTxFailure
/PostTxSuccess
and type checkersisPostTxFailure
/isPostTxSuccess
; exportassertIsPostTxSuccess
. - @cosmjs/sdk38:
Secp256k1Wallet
s can now be generated randomly withSecp256k1Wallet.generate(n)
wheren
is 12, 15, 18, 21 or 24 mnemonic words. - @cosmjs/sdk38: The new
Secp256k1Wallet.serialize
and.deserialize
allow encrypted serialization of the wallet. - @cosmjs/sdk38: Remove the obsolete
upload
,init
,exec
properties fromFeeTable
. @cosmjs/cosmwasm has its ownFeeTable
with those properties. - @cosmjs/sdk38: Rename package to @cosmjs/launchpad.