Update dependency @cosmjs/amino to v0.39.0#68
Open
renovate[bot] wants to merge 1 commit into
Open
Conversation
f5110bf to
b7c09be
Compare
b7c09be to
e1577be
Compare
e1577be to
a983a2c
Compare
a983a2c to
b76f678
Compare
b76f678 to
11fbf76
Compare
11fbf76 to
be8b85a
Compare
be8b85a to
d85fe1a
Compare
d85fe1a to
e289f08
Compare
e289f08 to
a2bbf29
Compare
a2bbf29 to
868eb5f
Compare
868eb5f to
86b26e2
Compare
86b26e2 to
b3f5a59
Compare
b3f5a59 to
4ca7b78
Compare
4ca7b78 to
2adf3eb
Compare
2adf3eb to
9a1d44f
Compare
9a1d44f to
b6ce645
Compare
b6ce645 to
3d60943
Compare
3d60943 to
635c95b
Compare
635c95b to
3bd715d
Compare
3bd715d to
660dd1a
Compare
660dd1a to
b52ca9b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This PR contains the following updates:
0.30.1→0.39.0Release Notes
cosmos/cosmjs (@cosmjs/amino)
v0.39.0Compare Source
Changed
and the crypto stack (@noble/*, @scure/bip39 v2) relies on APIs that only
ship in Node 22+. If you are still on an older Node, upgrade before taking
this release.
@noble/hashes and @scure/bip39 to v2. These upgrades are otherwise transparent
to users of the high-level
@cosmjs/cryptoAPI, but direct consumers of theunderlying libraries should consult their respective migration notes.
(#1935)
instead of the WASM-based
hash-wasmimplementation. This removes thehash-wasmruntime dependency and makesArgon2id.executefullysynchronous-capable without requiring a WASM instantiation. (#1938)
wallet serialization/deserialization which is not needed anymore after
#1938.
main/typesfields inpackage.jsonalongsidethe
exportsfield so tools like bundlephobia that do not understandexportscan still resolve the package entry points. (#1944)Account.accountNumberfromnumbertobigint.Cosmos SDK 0.53+ can assign account numbers via
GenerateID()that exceedNumber.MAX_SAFE_INTEGER(2^53 − 1), which would silently lose precision whenrepresented as a JavaScript
number. Usingbigintpreserves the full 64-bitrange. Breaking change for anyone reading
accountNumberoffAccount(e.g. from
StargateClient.getAccount()): you will typically need to eithercoerce back with
Number(account.accountNumber)where you know the value issafe, or keep using
bigintend-to-end. (#1956)makeSignDocnow acceptsnumber | string | bigintforaccountNumber(previouslynumber | string) and encodes the value viaUint64instead ofUint53so large account numbers no longer overflow whenbuilding a sign doc. (#1956)
Argon2id/Argon2idOptions/isArgon2idOptionsbecause it will likely be removed when wallet serialization/deserialization is
removed.
koato ^3.1.2 to address the host header injectionadvisory GHSA-7gcc-r8m5-44qm. Same-major bump, no API changes. (#1959)
protobufjsto ^7.5.5 to address the arbitrarycode execution advisory GHSA-xq3m-2v4x-88gg. Same-major bump, no API changes.
(#1959)
v0.38.1Compare Source
v0.38.0Compare Source
Added
fixUint8Arraywhich takes anUint8Array<ArrayBufferLike>and returnsUint8Array<ArrayBuffer>. This canbe used in cases where a data source returns an
Uint8Arraywithoutspecifying the buffer type but you need an
ArrayBuffer. Internally it mightperform a copy but in the vast majority of cases it will just change the type
after ensuring
ArrayBufferis used. (#1883)Decimal.adjustFractionalDigitswhich allows you to changethe fractional digits of a Decimal without changing its value. (#1916)
gas price in
SigningCosmWasmClientOptionsandSigningStargateClientOptionsusing the
DynamicGasPriceConfiginterface forgasPrice. This then usesOsmosis' EIP-1559 implementation or the Skip fee market module to get the gas
price from the chain. (#1926)
for
CosmWasmClient. (#1928)TsProto2GeneratedTypeinterface. As long as the existingTsProtoGeneratedTypeis not removed, ts-proto v1 remains supported.(#1613)
Changed
all: return
Uint8Array<ArrayBuffer>instead ofUint8Array = Uint8Array<ArrayBufferLike>whenever CosmJS creates binary datafor users. This allows users to stick it into APIs that require
ArrayBuffersuch as many APIs from Subtle crypto. You can still assign
Uint8Array<ArrayBuffer>to anyUint8Arrayin an existing codebase likethis:
That's the easy way and probably good for many use cases. However, this way
you lose information which buffer type is in use and you cannot trivially pass
it to an API requiring
Uint8Array<ArrayBuffer>later on.The other option is to preserve the information you are getting from CosmJS by
using
Uint8Array<ArrayBuffer>too:This change requires users to use TypeScript 5.7 or newer. (#1883)
all: Migrate from
readonly-datetoreadonly-date-esm^2 which is an ESMpackage but otherwise equal to the previous version. If you are using
ReadonlyDatein your codebase it is recommended to also update like this toavoid type mismatches:
@cosmjs/tendermint-rpc: Remove union type
TendermintClient. UseCometClientor justTendermint37Clientinstead. (#1866)@cosmjs/tendermint-rpc: Remove
isTendermint34Client. RemoveTendermint34ClientfromCometClientunion type. RemoveTendermint34Client. Remove moduletendermint34. (#1866)@cosmjs/tendermint-rpc: Remove top-level exports
broadcastTxCommitSuccess,broadcastTxSyncSuccess,AbciInfoRequest,AbciInfoResponse,AbciQueryParams,AbciQueryRequest,AbciQueryResponse,Attribute,Block,BlockchainRequest,BlockchainResponse,BlockGossipParams,BlockId,BlockMeta,BlockParams,BlockRequest,BlockResponse,BlockResultsRequest,BlockResultsResponse,BroadcastTxAsyncResponse,BroadcastTxCommitResponse,BroadcastTxParams,BroadcastTxRequest,BroadcastTxSyncResponse,Commit,CommitRequest,CommitResponse,ConsensusParams,Event,Evidence,EvidenceParams,GenesisRequest,GenesisResponse,Header,HealthRequest,HealthResponse,Method,NewBlockEvent,NewBlockHeaderEvent,NodeInfo,NumUnconfirmedTxsRequest,NumUnconfirmedTxsResponse,ProofOp,QueryProof,QueryTag,Request,Response,StatusRequest,StatusResponse,SubscriptionEventType,SyncInfo,TxData,TxEvent,TxParams,TxProof,TxRequest,TxResponse,TxSearchParams,TxSearchRequest,TxSearchResponse,TxSizeParams,Validator,ValidatorsParams,ValidatorsRequest,ValidatorsResponse,Version,Vote,VoteTypewhich all came fromtendermint34.If you need any of those you can import them from a version specific module,
such as
comet1.Versionorin case you want to support multiple versions. (#1866)
@cosmjs/crypto: Make
Secp256k1.verifySignature/.createSignature/.makeKeypairsynchronous andlet them not return a Promise.
@cosmjs/cosmwasm-stargate: Rename package to @cosmjs/cosmwasm. (#1903)
@cosmjs/math:
Decimal.fromAtomicsnow accepts atomics asstring | bigintsuch that you can pass in BigInts directly. This is more performant than going
through strings in cases where you have a BitInt already. Strings remain
supported for convenient usage with coins.
@cosmjs/math:
Decimalnow supports negative values. (#1930)@cosmjs/proto-signing: Remove
isTelescopeGeneratedType,isTsProtoGeneratedTypeandisPbjsGeneratedTypebecause they areunreliable. E.g. the
typeUrlin Telescope may or may not exist depending onthe configuration. The newly added
hasFromPartial/hasCreateallow you tocheck for
TelescopeGeneratedType | TsProtoGeneratedType/PbjsGeneratedTypesuch that you can create instanes through
MyMessage.fromPartial()/MyMessage.create().v0.37.1Compare Source
v0.37.0Compare Source
Added
Comet1Clientfor compatibility withCometBFT 1.x RPC. The module
comet1contains all CometBFT 1.x specifictypes.
connectCometnow uses this client automatically when connecting to a1.x RPC backend. Before CosmJS 0.37 the
Comet38Clientwas used for both 0.38and 1.0 backends. However it turned out that there are breaking API changes
between those versions. (#1787)
Changed
all: The
package.jsons now all use the modernexportsfield instead of theclassic
main/typesto define the entry points. This ensures only symbolsfrom the top level module can be imported (like
import { toBech32 } from "@​cosmjs/encoding"). Other import paths likeimport { toBech32 } from "@​cosmjs/encoding/src/bech32"are not allowedanymore. As all public interfaces used to be exported from the top level for a
long time, this should not affect most users. However, if you accidentally
imported a subpath before you will get an error now. This can typically be
resolved like this:
If you are using the TypeScript setting
moduleResolutionwith valuenode10/node/classicin your project, this will lead to errors. Pleaseconsider upgrading to a supported value like
node16ornodenext.moduleResolutionis implied bymoduleif unset. Seehttps://www.typescriptlang.org/tsconfig/#moduleResolution and
https://www.typescriptlang.org/docs/handbook/modules/reference.html#the-moduleresolution-compiler-option.
If this is not possible, please comment in
#1917.
(#1819)
Replace bech32 implementation by @scure/base. This changes a bunch of error
messages but is otherwise not breaking user code. (#1825)
Replace bip39 implementation by @scure/bip39. This changes a bunch of error
messages but is otherwise not breaking user code. (#1843)
@cosmjs/tendermint-rpc:
connectCometnow returns aComet1Clientwhen aCometBFT 1.x RPC is found.
CometClientnow includesComet1Client.(#1827)
@cosmjs/cosmwasm-stargate: use native compression APIs instead of pako for
gzip. (#1764)
Deprecated
The use of encrypted wallet storage is deprecated. In particular this means:
Secp256k1HdWallet.serialize/.serializeWithEncryptionKey(since 0.36.0)Secp256k1HdWallet.deserialize/.deserializeWithEncryptionKey(since0.36.0)
DirectSecp256k1HdWallet.serialize/.serializeWithEncryptionKey(since0.36.0)
DirectSecp256k1HdWallet.deserialize/.deserializeWithEncryptionKey(since0.36.0)
executeKdffrom @cosmjs/amino and @cosmjs/proto-signing (since0.36.0/0.37.0)
If you are using any of those methods, please comment at
#1796.
@cosmjs/tendermint-rpc: Deprecate the Tendermint/CometBFT 0.34 client
(
isTendermint34Client/Tendermint34Clientas well as all related types).This will be removed in the next version of CosmJS:
#1866
v0.36.2Compare Source
Fixed
@cosmjs/crypto: Set min version of @noble/hashes to 1.8.0 to avoid errors like
We use
@noble/hashes/legacyfor ripemd which is only available in ^1.8.0.v0.36.1Compare Source
Fixed
@cosmjs/crypto: Fix import path of @noble/hashes to avoid bundling issue
In @noble/hashes version >=1.0.0 <1.8.0 the import paths must not contain the
.js suffix. This issue was introduced in CosmJS 0.35.0 but only affects users
who have @noble/hashes lower than 1.8.0 in their lockfile. (#1817)
v0.36.0Compare Source
Changed
Migrate from libsodium to different implementation in order to reduce bundle
size and improve compatibility.
ed25519now uses @noble/curves(#1722)
Deprecated
The use of encrypted wallet storage is deprecated. In particular this means:
Secp256k1HdWallet.serialize/.serializeWithEncryptionKeySecp256k1HdWallet.deserialize/.deserializeWithEncryptionKeyDirectSecp256k1HdWallet.serialize/.serializeWithEncryptionKeyDirectSecp256k1HdWallet.deserialize/.deserializeWithEncryptionKeyIf you are using any of those methods, please comment at
#1796.
A scream test was established which slows down the key derivation function a
lot. This simulates the use of a pure-JS implementation of Argon2 which we
will use on one of the next releases. If this causes problems for your app,
switch back to
^0.35.0and comment in the issue.(#1797)
v0.35.2Compare Source
Fixed
@cosmjs/crypto: Set min version of @noble/hashes to 1.8.0 to avoid errors like
We use
@noble/hashes/legacy.jsfor ripemd which is only available in ^1.8.0.v0.35.1Compare Source
Deprecated
The use of encrypted wallet storage is deprecated. In particular this means:
Secp256k1HdWallet.serialize/.serializeWithEncryptionKeySecp256k1HdWallet.deserialize/.deserializeWithEncryptionKeyDirectSecp256k1HdWallet.serialize/.serializeWithEncryptionKeyDirectSecp256k1HdWallet.deserialize/.deserializeWithEncryptionKeyexecuteKdffrom @cosmjs/amino and @cosmjs/proto-signingIf you are using any of those methods, please comment at
#1796.
v0.35.0Compare Source
Added
HttpClientand
HttpBatchClient. (#1660)Changed
Tendermint34Client.create,Tendermint37Client.createandComet38Client.createnon-async. (#1597)Comet38Client,Tendermint37ClientorTendermint34Client. (#1772)interface ConsensusParamsare nowoptional as Tendermint RPC might omit them.
{Signing,}StargateClient.createand
SigningStargateClient.createWithSignernon-async. (#1597){Signing,}CosmWasmClient.createand
SigningCosmWasmClient.createWithSignernon-async. (#1597)GasPriceconstructor now enforces a non-empty denom.(#1761)
parseCoinsnow supports denoms with colons, periods,underscores and dashes (#1763)
import("crypto"). We can just use subtle crypto on all supported Nodeversions. (#1753)
v0.34.1Compare Source
Deprecated
The use of encrypted wallet storage is deprecated. In particular this means:
Secp256k1HdWallet.serialize/.serializeWithEncryptionKeySecp256k1HdWallet.deserialize/.deserializeWithEncryptionKeyDirectSecp256k1HdWallet.serialize/.serializeWithEncryptionKeyDirectSecp256k1HdWallet.deserialize/.deserializeWithEncryptionKeyexecuteKdffrom @cosmjs/amino and @cosmjs/proto-signingIf you are using any of those methods, please comment at
#1796.
v0.34.0Compare Source
Fixed
isValidAddressnow accepts addresses up to 128 bytes (e.g.for Penumbra). (#1674)
decodeCommitto allow decoding height 0 commitswith block hash set but empty signatures. (#1590)
Added
Comet38Clientis now used to connect to CometBFT0.38 and 1.x backends (#1679)
Changed
begin_block_events/end_block_events->
finalize_block_events) inRpcBlockResultsResponseandBlockResultsResponse(#1612)v0.33.1Compare Source
Fixed
GHSA-vjh7-7g9h-fjfh.
v0.33.0Compare Source
Changed
on a JavaScript implementation of ICS-23 but
@confio/ics23 is unmaintained
without replacement.
v0.32.4Compare Source
Fixed
field ([#1591])
Added
MsgCancelUnbondingDelegation(#1535)Changed
multiplier value between the
signAndBroadcastandsignAndBroadcastSyncmethods so that it is equal to 1.4 everywhere. ([#1584])
v0.32.3Compare Source
Changed
@cosmjs/amino: Add IBC denom support to
parseCoinsand use the sameimplementation in all those imports:
@cosmjs/stargate: Let
parseRawLoggracefully handle empty strings to bettersupport Cosmos SDK 0.50 inputs. (#1564)
Fixed
external tools happy. (#1570)
information in SigningCosmWasmClient. This is required to support Cosmos SDK
0.50+ where the
rawLogfield is empty. (#1564)v0.32.2Compare Source
Fixed
GasPrice.fromStringto allow usingIBC denoms as gas denom. (#1522)
Changed
http://, wss:// or ws://). Otherwise an error is raised instead of falling
back to ws://. (#1527)
v0.32.1Compare Source
Fixed
correctly. (#1516)
decodeOptionalTime()from adaptors nowthat
time.Timedates are parsed correctly. (#1516)v0.32.0Compare Source
Added
sign/signAndBroadcast/signAndBroadcastSyncand related functions nowhave an additional parameter to specify the timeout height. After this height,
a signed transaction will be considered invalid by the chain. (#1489)
omitDefaultto help build Amino JSON converters.Fixed
is a numeric value. (#1462)
fix_msgoptional inAminoMsgInstantiateContract2and omit default in the Amino JSON converter tofix Amino JSON signing for MsgInstantiateContract2. (#1509)
Changed
changes all 64 bit int fields from type
longtobigint. As part of theupgrade, the types do not require the
longandprotobufjsanymore.(#1484)
gasWanted/gasUsedfields were changed from typenumbertobigintto supported cases where users put very high gas values in there (#1465).
Adaptorabstractions which are not neededanymore by having a dedicated client for each backend.
CometClient = Tendermint34Client | Tendermint37Client | Comet38ClientandconnectCometfor auto-detecting the right client for a provided endpoint.SigningStargateClient.createWithSignerandStargateClient.createtake aCometClientargument, adding support forComet38Client. The auto-detection inSigningStargateClient.connectWithSignerandStargateClient.connectnowsupports CometBFT 0.38. Rename
StargateClient.getTmClient/.forceGetTmClientto.getCometClient/.forceGetCometClient.SigningCosmWasmClient.createWithSignerandCosmWasmClient.createtake aCometClientargument, adding support forComet38Client. The auto-detection inSigningCosmWasmClient.connectWithSignerandCosmWasmClient.connectnowsupports CometBFT 0.38. Rename
CosmWasmClient.getTmClient/.forceGetTmClientto.getCometClient/.forceGetCometClient.SearchBySentFromOrToQueryandSearchByHeightQuerywhich became obsolete with thesearchTxchange in0.31.0.
Deprecated
CometClientshould be used instead ofTendermintClient.SigningStargateClient.sendIbcTokens. Please usesignAndBroadcast+MsgTransferEncodeObjectinstead. (#1493)IndexedTx.rawLogandDeliverTxResponse.rawLogbecause those fields are unset from Cosmos SDK 0.50 onwards (see
here).
v0.31.3Compare Source
Fixed
fromAminoimplementation forMsgTransfer. (#1493)v0.31.2Compare Source
Fixed
MsgTransferand adapt converters. (#1456)v0.31.1Compare Source
Fixed
earliest_*fields toSyncInforecordreturned from the
/statusRPC endpoint ([#1448]).Changed
simulation from 1.3 to 1.4 to avoid out of case cases starting with Cosmos SDK
0.47.
SigningCosmWasmClient.uploadto 1.1. (#1360)v0.31.0Compare Source
Fixed
libsodium-wrappers-sumoto be able to use thecrypto_pwhashfunctions (#1429).Added
SigningCosmWasmClient.instantiate2(#1407).CosmWasmClient.getContractsByCreator(#1266).
IndexedTxandDeliverTxResponsenow have amsgResponsesfield (#1305).CosmWasmClient.broadcastTxSyncandSigningCosmWasmClient.signAndBroadcastSyncto allow broadcasting withoutwaiting for block inclusion. (#1396)
StargateClient.broadcastTxSyncandSigningStargateClient.signAndBroadcastSyncto allow broadcasting withoutwaiting for block inclusion. (#1396)
MsgStoreCode.instantiate_permission. (#334)Changed
types.
(#1411).
searchTxqueries. Only rawquery strings and key/value pairs are now supported. (#1411)
searchTxreturn non-readonly array. Thecaller owns this array and can mutate it as they want. (#1411)
UploadResult(result fromSigningCosmWasmClient.upload), renameoriginalChecksumtochecksumandremove
compressedChecksum(#1409).searchTxqueries. Only raw query stringsand key/value pairs are now supported. (#1411)
searchTxreturn non-readonly array. The caller ownsthis array and can mutate it as they want. (#1411)
QueryClient.queryUnverifiedandQueryClient.queryVerified. Please useQueryClient.queryAbciandQueryClient.queryStoreVerifiedinstead.types since this is not needed anymore. (#1403)
Configuration
📅 Schedule: (UTC)
🚦 Automerge: Disabled by config. Please merge this manually once you are satisfied.
♻ Rebasing: Whenever PR is behind base branch, or you tick the rebase/retry checkbox.
🔕 Ignore: Close this PR and you won't be reminded about this update again.
This PR was generated by Mend Renovate. View the repository job log.