cosmjs/CHANGELOG.md

336 lines
17 KiB
Markdown
Raw Normal View History

2020-07-22 16:32:39 +02:00
# CHANGELOG
2021-03-11 11:23:55 +01:00
The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.0.0/),
and this project adheres to
[Semantic Versioning](https://semver.org/spec/v2.0.0.html).
## [Unreleased]
### Added
- @cosmjs/cosmwasm-launchpad: Expose `SigningCosmWasmClient.fees`.
- @cosmjs/cosmwasm-stargate: Expose `SigningCosmWasmClient.fees` and
`SigningCosmWasmClient.registry`.
- @cosmjs/launchpad: Expose `SigningCosmosClient.fees`.
- @cosmjs/stargate: Expose `SigningStargateClient.fees` and
`SigningStargateClient.registry`.
- @cosmjs/stargate: Add support for different account types in `accountFromAny`
2021-03-15 16:43:12 +01:00
and `StargateClient`. Added `ModuleAccount` and vesting accounts
`BaseVestingAccount`, `ContinuousVestingAccount`, `DelayedVestingAccount` and
`PeriodicVestingAccount`.
2021-03-16 14:12:02 +01:00
- @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`.
2021-03-23 16:07:38 +01:00
- @cosmjs/stargate: Added new `logs` export with all the functionality from
@cosmjs/launchpad.
- @cosmjs/stargate: Added new `Coin`, `coin`, `coins` and `parseCoins` exports
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.
2021-03-22 11:09:27 +01:00
- @cosmjs/amino: Split public key interfaces into `Pubkey`, `SinglePubkey` and
`Secp256k1Pubkey` where `Pubkey` is a generalization of the old `PubKey` that
supported nested pubkeys for multisig. `SinglePubkey` is the old `PubKey` in
which the `value` is a base64 encoded string. And `Secp256k1Pubkey` is a
single secp256k1 pubkey.
2021-03-22 11:36:55 +01:00
- @cosmjs/utils: The new `arrayContentStartsWith` works similar to
`arrayContentEquals` but only checks the start of an array.
2021-03-23 16:07:38 +01:00
- @cosmjs/proto-signing: Added new `Coin`, `coin`, `coins` and `parseCoins`
exports which have the same functionality as already existed in
@cosmjs/launchpad.
2021-03-23 23:57:56 +01:00
- @cosmjs/stargate: Add `SigningStargateClient.sign`, which allows you to create
2021-03-24 13:38:46 +01:00
signed transactions without broadcasting them directly. The new type
`SignerData` can be passed into `.sign` to skip querying account number,
sequence and chain ID.
- @cosmjs/stargate: Add constructor `SigningStargateClient.offline` which does
not connect to Tendermint. This allows offline signing.
2021-03-24 15:53:02 +01:00
- @cosmjs/stargate: Add `makeMultisignedTx` which allows you to assemble a
transaction signed by a multisig account.
- @cosmjs/stargate: Add `delegateTokens`, `undelegateTokens` and
`withdrawRewards` methods to `SigningStargateClient`.
- @cosmjs/stargate: Export `defaultGasLimits` and `defaultGasPrice`.
- @cosmjs/cosmwasm-stargate: Export `defaultGasLimits`.
- @cosmjs/stargate: `SigningStargateClient` constructor is now `protected`.
- @cosmjs/cosmwasm-stargate: `SigningCosmWasmClient` constructor is now
`protected`.
- @cosmjs/cosmwasm-stargate: Add `SigningCosmWasmClient.offline` static method
for constructing offline clients without a Tendermint client.
2021-03-11 11:24:14 +01:00
### Changed
- @cosmjs/cosmwasm-stargate: Codec adapted to support wasmd 0.16. Older versions
of wasmd are not supported anymore.
2021-03-15 16:20:32 +01:00
- @cosmjs/stargate: Let `AuthExtension.account` and
`AuthExtension.unverified.account` return an account of type `Any`. This makes
the caller responsible for decoding the type.
- @cosmjs/stargate: Remove `accountFromProto` in favour of `accountFromAny`.
- @cosmjs/stargate: Rename `Rpc` interface to `ProtobufRpcClient` and
`createRpc` to `createProtobufRpcClient`.
- @cosmjs/stargate: Reorganize nesting structure of IBC query client and add
support for more methods.
- @cosmjs/tendermint-rpc: The fields `CommitSignature.validatorAddress`,
`.timestamp` and `.signature` are now optional. They are unset when
`blockIdFlag` is `BlockIdFlag.Absent`. The decoding into `CommitSignature` is
only updated for the class `Tendermint34Client`, not for `Client`. Please
migrate to the former.
2021-03-22 16:57:50 +01:00
- @cosmjs/launchpad: `rawSecp256k1PubkeyToAddress` was removed. Instead use
`Bech32.encode(prefix, rawSecp256k1PubkeyToRawAddress(pubkeyRaw))` with
`rawSecp256k1PubkeyToRawAddress` from @cosmjs/amino.
2021-03-23 16:07:38 +01:00
- @cosmjs/stargate: `parseRawLog` is now nested under the `logs` export.
2021-03-11 11:24:14 +01:00
### Deprecated
- @cosmjs/tendermint-rpc: `Client` has been deprecated. Launchpad applications
do not need a Tendermint RPC client and Stargate applications should use
`Tendermint34Client`.
### Removed
- @cosmjs/stargate: `coinFromProto` helper has been removed as it is no longer
needed after the `ts-proto` migration.
2021-03-11 10:35:41 +01:00
## [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. Use `logs` from
@cosmjs/launchpad instead.
- @cosmjs/cosmwasm: Export `JsonObject`, `ChangeAdminResult` and `WasmData`
types as well as `isValidBuilder` and `parseWasmData` functions.
- @cosmjs/cosmwasm: Add `CosmWasmClient.getTx` method for searching by ID and
remove such functionality from `CosmWasmClient.searchTx`.
- @cosmjs/cosmwasm: Rename `SigningCosmWasmClient.senderAddress` to
`.signerAddress`.
- @cosmjs/cosmwasm-stargate: Add new package for CosmWasm Stargate support.
2020-12-21 03:05:51 +01:00
- @cosmjs/crypto: Change `Secp256k1Keypair` from tagged type to simple
interface.
2020-10-27 14:32:27 +01:00
- @cosmjs/launchpad: Add `Secp256k1Wallet` to manage a single raw secp256k1
keypair.
- @cosmjs/launchpad: `OfflineSigner` types `sign` method renamed `signAmino`
and `SignResponse` type renamed `AminoSignResponse`.
- @cosmjs/launchpad: `Secp256k1HdWallet.sign` method renamed `signAmino`.
- @cosmjs/launchpad: Add `CosmosClient.getTx` method for searching by ID and
remove such functionality from `CosmosClient.searchTx`.
2020-12-21 09:57:22 +01:00
- @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. Add
`Client.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.
2020-11-18 14:47:59 +01:00
- @cosmjs/tendermint-rpc: Remove export `v0_33` in favour of `adaptor33` and
`adaptor34`. Export the `Adaptor` type.
2020-12-15 10:54:42 +00:00
- @cosmjs/tendermint-rpc: Export `DateTime` class.
- @cosmjs/tendermint-rpc: Remove types `QueryString`, `Base64String`,
2020-12-21 00:10:35 +01:00
`HexString`, `IntegerString` and `IpPortString`. Use `string` instead.
- @cosmjs/tendermint-rpc: Remove types `BlockHash`, `TxBytes` and `TxHash`. Use
`Uint8Array` instead.
### Added
- @cosmjs/launchpad: Export distribution module msg types
`MsgFundCommunityPool`, `MsgSetWithdrawAddress`, `MsgWithdrawDelegatorReward`,
`MsgWithdrawValidatorCommission` and type checker helper functions.
- @cosmjs/utils: Added `assertDefinedAndNotNull`.
2021-02-23 13:04:09 +01:00
- @cosmjs/tendermint-rpc: The new `Tendermint34Client` is a copy of the old
`Client` but without the automatic version detection. Its usage is encouraged
over `Client` if you connect to a Tendermint 0.34 backend.
### Changed
- @cosmjs/encoding: Change return type of `fromRfc3339` from `ReadonlyDate` to
`Date` 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 renamed `signAmino`.
2021-02-12 14:28:50 +01:00
### Deprecated
- @cosmjs/tendermint-rpc: Deprecate `DateTime` in favour of the free functions
`fromRfc3339WithNanoseconds` and `toRfc3339WithNanoseconds`.
2021-01-06 17:05:02 +00:00
## 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.
2020-10-27 10:23:54 +01:00
## 0.23.1 (2020-10-27)
- @cosmjs/crypto: Export new convenience functions `keccak256`, `ripemd160`,
`sha1`, `sha256` and `sha512`.
2020-10-14 12:22:13 +02:00
- @cosmjs/faucet-client: Add new package which exports `FaucetClient` class.
2020-10-09 12:20:02 +02:00
## 0.23.0 (2020-10-09)
- @cosmjs/cli: Expose `HdPath` type.
- @cosmjs/cosmwasm: Rename `CosmWasmClient.postTx` method to `.broadcastTx`.
2020-08-18 17:09:04 +01:00
- @cosmjs/cosmwasm: Rename `FeeTable` type to `CosmWasmFeeTable`.
- @cosmjs/cosmwasm: `SigningCosmWasmClient` constructor now takes optional
arguments `gasPrice` and `gasLimits` instead of `customFees` 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 (in `WasmExtension.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.
2020-08-04 16:37:32 +02:00
- @cosmjs/encoding: Add `limit` parameter to `Bech32.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 to
`FAUCET_GAS_PRICE` and now only accepts one token. Environmental variable
`FAUCET_GAS` renamed to `FAUCET_GAS_LIMIT`.
- @cosmjs/faucet: `/credit` API now expects `denom` (base token) instead of
`ticker` (unit token). Environmental variables specifying credit amounts now
need to use uppercase denom.
2020-08-18 17:09:04 +01:00
- @cosmjs/launchpad: Rename `FeeTable` type to `CosmosFeeTable` and export a new
more generic type `FeeTable`.
- @cosmjs/launchpad: Add new class `GasPrice`, new helper type `GasLimits` and
new helper function `buildFeeTable` for easier handling of gas prices and
fees.
- @cosmjs/launchpad: Rename `CosmosClient.postTx` method to `.broadcastTx`.
2020-08-18 17:09:04 +01:00
- @cosmjs/launchpad: `SigningCosmosClient` constructor now takes optional
arguments `gasPrice` and `gasLimits` instead of `customFees` for easier
customization.
- @cosmjs/launchpad: Rename `SigningCosmosClient.signAndPost` method to
`.signAndBroadcast`.
- @cosmjs/launchpad: Rename `PostTx`-related types to `BroadcastTxResult`,
`BroadcastTxSuccess` and `BroadcastTxFailure` respectively, as well as helper
functions `isBroadcastTxFailure`, `isBroadcastTxSuccess` and
`assertIsBroadcastTxSuccess`.
- @cosmjs/launchpad: Export `isSearchByIdQuery`, `isSearchByHeightQuery`,
`isSearchBySentFromOrToQuery` and `isSearchByTagsQuery`.
- @cosmjs/launchpad: Change type of `TxsResponse.logs` and
`BroadcastTxsResponse.logs` to `unknown[]`.
- @cosmjs/launchpad: Export `StdSignDoc` and create helpers to make and
2020-09-23 16:55:47 +02:00
serialize a `StdSignDoc`: `makeSignDoc` and `serializeSignDoc`.
- @cosmjs/launchpad: Let `OfflineSigner.sign` take an `StdSignDoc` instead of an
encoded message and return a `SignResponse` that includes the document which
was signed.
2020-09-23 13:35:12 +02:00
- @cosmjs/launchpad: Remove `PrehashType` and the prehash type argument in
`OfflineSigner.sign` because the signer now needs to know how to serialize an
`StdSignDoc`.
2020-09-23 16:55:47 +02:00
- @cosmjs/launchpad: Remove `makeSignBytes` in favour of `makeSignDoc` and
2020-09-23 16:52:57 +02:00
`serializeSignDoc`.
2020-09-24 11:37:15 +02:00
- @cosmjs/launchpad: Create `WrappedTx`, `WrappedStdTx` and `isWrappedStdTx` to
better represent the Amino tx interface. Deprecate `CosmosSdkTx`, which is an
alias for `WrappedStdTx`.
- @cosmjs/launchpad: Add `makeStdTx` to create an `StdTx`.
- @cosmjs/launchpad: Rename `Secp256k1Wallet` to `Secp256k1HdWallet`. Later on,
we'll use `Secp256k1Wallet` 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)
and `LaunchpadLedger` for more fine-grained access.
2020-08-18 17:09:04 +01:00
- @cosmjs/math: Add `.multiply` method to `Decimal` class.
2020-09-30 14:07:34 +02:00
- @cosmjs/math: Deprecate `Uint32.fromBigEndianBytes` in favour of
`Uint32.fromBytes`, which supports both big and little endian.
- @cosmjs/math: Deprecate `Uint64.fromBytesBigEndian` in favour of
`Uint64.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` to
`Record<string, unknown> | undefined`.
- @cosmjs/tendermint-rpc: Remove obsolete `TxData.tags` and make `TxData.events`
2020-09-21 12:59:22 +02:00
non-optional. Rename `Tag` to `Attribute`.
2020-09-21 13:24:51 +02:00
- @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` and `getBlockEventHeight` 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` to `cosmos-faucet`.
2020-08-11 10:20:09 +02:00
2020-09-15 10:18:17 +02:00
## 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.
2020-08-11 11:54:34 +02:00
- @cosmjs/faucet: Add config variable `FAUCET_MEMO`.
- @cosmjs/faucet: Add config variables `FAUCET_FEE` and `FAUCET_GAS`.
2020-08-11 12:12:57 +02:00
- @cosmjs/launchpad: Add `parseCoins` helper.
2020-08-11 09:55:27 +02:00
## 0.22.1 (2020-08-11)
- @cosmjs/cli: Import `encodeAminoPubkey`, `encodeBech32Pubkey`,
`decodeAminoPubkey` and `decodeBech32Pubkey` by default.
- @cosmjs/launchpad: Add ed25519 support to `encodeBech32Pubkey`.
- @cosmjs/launchpad: Add `encodeAminoPubkey` and `decodeAminoPubkey`.
2020-08-07 10:37:57 +02:00
- @cosmjs/utils: Add `arrayContentEquals`.
2020-08-11 09:25:19 +02:00
- @cosmjs/faucet: Add config variables `FAUCET_ADDRESS_PREFIX` and
`FAUCET_TOKENS`.
- @cosmjs/faucet: Remove broken chain ID from `cosmwasm-faucet generate`.
2020-08-03 15:35:40 +02:00
## 0.22.0 (2020-08-03)
2020-07-22 16:32:39 +02:00
2020-08-03 10:33:50 +02:00
- @cosmjs/cli: Now supports HTTPs URLs for `--init` code sources.
2020-08-03 10:34:18 +02:00
- @cosmjs/cli: Now supports adding code directly via `--code`.
2020-07-22 16:32:39 +02:00
- @cosmjs/cosmwasm: Rename `CosmWasmClient.getNonce` method to `.getSequence`.
- @cosmjs/cosmwasm: Remove `RestClient` class in favour of new modular
`LcdClient` class from @cosmjs/sdk38.
2020-07-27 09:34:38 +02:00
- @cosmjs/cosmwasm: Add `SigningCosmWasmClient.signAndPost` as a mid-level
abstraction between `SigningCosmWasmClient.upload`/`.instantiate`/`.execute`
and `.postTx`.
- @cosmjs/cosmwasm: Use `*PostTx*` types and helpers from @cosmjs/sdk38. Remove
exported `PostTxResult`.
- @cosmjs/cosmwasm: `ContractDetails` was removed in favour of just `Contract`.
The missing `init_msg` is now available via the contract's code history (see
`getContractCodeHistory`).
- @cosmjs/cosmwasm: Remove `SigningCallback` in favour of the `OfflineSigner`
interface.
2020-07-22 16:32:39 +02:00
- @cosmjs/sdk38: Rename `CosmosClient.getNonce` method to `.getSequence`.
- @cosmjs/sdk38: Remove `RestClient` class in favour of new modular `LcdClient`
class.
- @cosmjs/sdk38: Remove `Pen` type in favour of `OfflineSigner` and remove
`Secp256k1Pen` class in favour of `Secp256k1Wallet` which takes an
`OfflineSigner` instead of a `SigningCallback`.
2020-07-25 15:57:46 +02:00
- @cosmjs/sdk38: Rename `CosmosSdkAccount` to `BaseAccount` and export the type.
- @cosmjs/sdk38: `BaseAccount` now uses `number | string` as the type for
`account_number` and `sequence`. The new helpers `uint64ToNumber` and
`uint64ToString` allow you to normalize the mixed input.
- @cosmjs/sdk38: `BaseAccount` now uses `string | PubKey | null` as the type for
`public_key`. The new helper `normalizePubkey` allows you to normalize the
mixed input.
2020-07-25 15:00:39 +02:00
- @cosmjs/math: Add missing integer check to `Uint64.fromNumber`. Before
`Uint64.fromNumber(1.1)` produced some result.
2020-07-28 11:48:15 +02:00
- @cosmjs/sdk38: Add `SigningCosmosClient.signAndPost` as a mid-level
abstraction between `SigningCosmosClient.sendTokens` and `.postTx`.
2020-07-27 09:58:12 +02:00
- @cosmjs/sdk38: Export `PostTxFailure`/`PostTxSuccess` and type checkers
`isPostTxFailure`/`isPostTxSuccess`; export `assertIsPostTxSuccess`.
2020-07-28 13:16:55 +02:00
- @cosmjs/sdk38: `Secp256k1Wallet`s can now be generated randomly with
`Secp256k1Wallet.generate(n)` where `n` 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 from
`FeeTable`. @cosmjs/cosmwasm has its own `FeeTable` with those properties.
- @cosmjs/sdk38: Rename package to @cosmjs/launchpad.
2021-03-11 10:35:41 +01:00
2021-03-11 11:23:55 +01:00
[unreleased]: https://github.com/cosmos/cosmjs/compare/v0.24.0...HEAD
2021-03-11 10:37:25 +01:00
[0.24.0]: https://github.com/cosmos/cosmjs/compare/v0.23.0...v0.24.0