mirror of
https://github.com/cosmos/cosmjs.git
synced 2025-03-10 21:49:15 +00:00
Merge pull request #1131 from cosmos/upgrade-cosmjs-types
Upgrade cosmjs-types to 0.5.0 and adapt code
This commit is contained in:
commit
3348c2854a
16
.pnp.cjs
generated
16
.pnp.cjs
generated
@ -1031,7 +1031,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
],
|
||||
[
|
||||
"cosmjs-types",
|
||||
"npm:0.4.0"
|
||||
"npm:0.5.0"
|
||||
],
|
||||
[
|
||||
"cross-spawn",
|
||||
@ -3227,7 +3227,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
["axios", "npm:0.21.4"],
|
||||
["babylon", "npm:6.18.0"],
|
||||
["chalk", "npm:4.1.2"],
|
||||
["cosmjs-types", "npm:0.4.0"],
|
||||
["cosmjs-types", "npm:0.5.0"],
|
||||
["diff", "npm:4.0.2"],
|
||||
["eslint", "npm:7.26.0"],
|
||||
["eslint-config-prettier", "virtual:4f1584ad4aba8733a24be7c8aebbffafef25607f2d00f4b314cf96717145c692763628a31c2b85d4686fbb091ff21ebffa3cc337399c042c19a32b9bdb786464#npm:8.3.0"],
|
||||
@ -3273,7 +3273,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
["@types/pako", "npm:1.0.1"],
|
||||
["@typescript-eslint/eslint-plugin", "virtual:4f1584ad4aba8733a24be7c8aebbffafef25607f2d00f4b314cf96717145c692763628a31c2b85d4686fbb091ff21ebffa3cc337399c042c19a32b9bdb786464#npm:5.13.0"],
|
||||
["@typescript-eslint/parser", "virtual:4f1584ad4aba8733a24be7c8aebbffafef25607f2d00f4b314cf96717145c692763628a31c2b85d4686fbb091ff21ebffa3cc337399c042c19a32b9bdb786464#npm:5.13.0"],
|
||||
["cosmjs-types", "npm:0.4.0"],
|
||||
["cosmjs-types", "npm:0.5.0"],
|
||||
["eslint", "npm:7.26.0"],
|
||||
["eslint-config-prettier", "virtual:4f1584ad4aba8733a24be7c8aebbffafef25607f2d00f4b314cf96717145c692763628a31c2b85d4686fbb091ff21ebffa3cc337399c042c19a32b9bdb786464#npm:8.3.0"],
|
||||
["eslint-import-resolver-node", "npm:0.3.4"],
|
||||
@ -3646,7 +3646,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
["@types/node", "npm:15.3.1"],
|
||||
["@typescript-eslint/eslint-plugin", "virtual:4f1584ad4aba8733a24be7c8aebbffafef25607f2d00f4b314cf96717145c692763628a31c2b85d4686fbb091ff21ebffa3cc337399c042c19a32b9bdb786464#npm:5.13.0"],
|
||||
["@typescript-eslint/parser", "virtual:4f1584ad4aba8733a24be7c8aebbffafef25607f2d00f4b314cf96717145c692763628a31c2b85d4686fbb091ff21ebffa3cc337399c042c19a32b9bdb786464#npm:5.13.0"],
|
||||
["cosmjs-types", "npm:0.4.0"],
|
||||
["cosmjs-types", "npm:0.5.0"],
|
||||
["eslint", "npm:7.26.0"],
|
||||
["eslint-config-prettier", "virtual:4f1584ad4aba8733a24be7c8aebbffafef25607f2d00f4b314cf96717145c692763628a31c2b85d4686fbb091ff21ebffa3cc337399c042c19a32b9bdb786464#npm:8.3.0"],
|
||||
["eslint-import-resolver-node", "npm:0.3.4"],
|
||||
@ -3747,7 +3747,7 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
["@types/node", "npm:15.3.1"],
|
||||
["@typescript-eslint/eslint-plugin", "virtual:4f1584ad4aba8733a24be7c8aebbffafef25607f2d00f4b314cf96717145c692763628a31c2b85d4686fbb091ff21ebffa3cc337399c042c19a32b9bdb786464#npm:5.13.0"],
|
||||
["@typescript-eslint/parser", "virtual:4f1584ad4aba8733a24be7c8aebbffafef25607f2d00f4b314cf96717145c692763628a31c2b85d4686fbb091ff21ebffa3cc337399c042c19a32b9bdb786464#npm:5.13.0"],
|
||||
["cosmjs-types", "npm:0.4.0"],
|
||||
["cosmjs-types", "npm:0.5.0"],
|
||||
["eslint", "npm:7.26.0"],
|
||||
["eslint-config-prettier", "virtual:4f1584ad4aba8733a24be7c8aebbffafef25607f2d00f4b314cf96717145c692763628a31c2b85d4686fbb091ff21ebffa3cc337399c042c19a32b9bdb786464#npm:8.3.0"],
|
||||
["eslint-import-resolver-node", "npm:0.3.4"],
|
||||
@ -6886,10 +6886,10 @@ function $$SETUP_STATE(hydrateRuntimeState, basePath) {
|
||||
}]
|
||||
]],
|
||||
["cosmjs-types", [
|
||||
["npm:0.4.0", {
|
||||
"packageLocation": "./.yarn/cache/cosmjs-types-npm-0.4.0-accb450c96-ffc3e6451e.zip/node_modules/cosmjs-types/",
|
||||
["npm:0.5.0", {
|
||||
"packageLocation": "./.yarn/cache/cosmjs-types-npm-0.5.0-f6798779ac-caface3c6d.zip/node_modules/cosmjs-types/",
|
||||
"packageDependencies": [
|
||||
["cosmjs-types", "npm:0.4.0"],
|
||||
["cosmjs-types", "npm:0.5.0"],
|
||||
["long", "npm:4.0.0"],
|
||||
["protobufjs", "npm:6.11.2"]
|
||||
],
|
||||
|
BIN
.yarn/cache/cosmjs-types-npm-0.4.0-accb450c96-ffc3e6451e.zip
(Stored with Git LFS)
vendored
BIN
.yarn/cache/cosmjs-types-npm-0.4.0-accb450c96-ffc3e6451e.zip
(Stored with Git LFS)
vendored
Binary file not shown.
BIN
.yarn/cache/cosmjs-types-npm-0.5.0-f6798779ac-caface3c6d.zip
(Stored with Git LFS)
vendored
Normal file
BIN
.yarn/cache/cosmjs-types-npm-0.5.0-f6798779ac-caface3c6d.zip
(Stored with Git LFS)
vendored
Normal file
Binary file not shown.
@ -15,9 +15,11 @@ and this project adheres to
|
||||
|
||||
### Changed
|
||||
|
||||
- all: Upgrade cosmjs-types to 0.5 ([#1131]).
|
||||
- @cosmjs/stargate: Change `packetCommitment` parameter `sequence` type from
|
||||
`Long` to `number` ([#1168]).
|
||||
|
||||
[#1131]: https://github.com/cosmos/cosmjs/pull/1131
|
||||
[#1168]: https://github.com/cosmos/cosmjs/pull/1168
|
||||
|
||||
## [0.28.6] - 2022-06-08
|
||||
|
@ -53,7 +53,7 @@
|
||||
"axios": "^0.21.2",
|
||||
"babylon": "^6.18.0",
|
||||
"chalk": "^4",
|
||||
"cosmjs-types": "^0.4.0",
|
||||
"cosmjs-types": "^0.5.0",
|
||||
"diff": "^4",
|
||||
"recast": "^0.20",
|
||||
"ts-node": "^8",
|
||||
|
@ -46,7 +46,7 @@
|
||||
"@cosmjs/stargate": "workspace:packages/stargate",
|
||||
"@cosmjs/tendermint-rpc": "workspace:packages/tendermint-rpc",
|
||||
"@cosmjs/utils": "workspace:packages/utils",
|
||||
"cosmjs-types": "^0.4.0",
|
||||
"cosmjs-types": "^0.5.0",
|
||||
"long": "^4.0.0",
|
||||
"pako": "^2.0.2"
|
||||
},
|
||||
|
@ -210,12 +210,14 @@ describe("WasmExtension", () => {
|
||||
|
||||
const { contractInfo } = await client.wasm.getContractInfo(myAddress);
|
||||
assert(contractInfo);
|
||||
expect({ ...contractInfo }).toEqual({
|
||||
expect(contractInfo).toEqual({
|
||||
codeId: Long.fromNumber(hackatomCodeId, true),
|
||||
creator: alice.address0,
|
||||
label: "my escrow",
|
||||
admin: "",
|
||||
ibcPortId: "",
|
||||
created: undefined,
|
||||
extension: undefined,
|
||||
});
|
||||
expect(contractInfo.admin).toEqual("");
|
||||
});
|
||||
|
@ -44,7 +44,7 @@
|
||||
"@cosmjs/encoding": "workspace:packages/encoding",
|
||||
"@cosmjs/math": "workspace:packages/math",
|
||||
"@cosmjs/utils": "workspace:packages/utils",
|
||||
"cosmjs-types": "^0.4.0",
|
||||
"cosmjs-types": "^0.5.0",
|
||||
"long": "^4.0.0"
|
||||
},
|
||||
"devDependencies": {
|
||||
|
@ -44,6 +44,7 @@ describe("decode", () => {
|
||||
single: {
|
||||
mode: SignMode.SIGN_MODE_DIRECT,
|
||||
},
|
||||
multi: undefined,
|
||||
},
|
||||
sequence: Long.UZERO,
|
||||
},
|
||||
|
@ -46,7 +46,7 @@
|
||||
"@cosmjs/stream": "workspace:packages/stream",
|
||||
"@cosmjs/tendermint-rpc": "workspace:packages/tendermint-rpc",
|
||||
"@cosmjs/utils": "workspace:packages/utils",
|
||||
"cosmjs-types": "^0.4.0",
|
||||
"cosmjs-types": "^0.5.0",
|
||||
"long": "^4.0.0",
|
||||
"protobufjs": "~6.11.3",
|
||||
"xstream": "^11.14.0"
|
||||
|
@ -28,7 +28,7 @@ describe("AuthExtension", () => {
|
||||
expect(account.typeUrl).toEqual("/cosmos.auth.v1beta1.BaseAccount");
|
||||
expect(BaseAccount.decode(account.value)).toEqual({
|
||||
address: unused.address,
|
||||
// pubKey not set
|
||||
pubKey: undefined,
|
||||
accountNumber: Long.fromNumber(unused.accountNumber, true),
|
||||
sequence: Long.UZERO,
|
||||
});
|
||||
|
@ -18,6 +18,7 @@ import {
|
||||
QueryConnectionChannelsResponse,
|
||||
QueryNextSequenceReceiveResponse,
|
||||
QueryPacketAcknowledgementResponse,
|
||||
QueryPacketAcknowledgementsRequest,
|
||||
QueryPacketAcknowledgementsResponse,
|
||||
QueryPacketCommitmentResponse,
|
||||
QueryPacketCommitmentsResponse,
|
||||
@ -303,22 +304,25 @@ export function setupIbcExtension(base: QueryClient): IbcExtension {
|
||||
channelId: channelId,
|
||||
sequence: Long.fromNumber(sequence, true),
|
||||
}),
|
||||
packetAcknowledgements: async (portId: string, channelId: string, paginationKey?: Uint8Array) =>
|
||||
channelQueryService.PacketAcknowledgements({
|
||||
packetAcknowledgements: async (portId: string, channelId: string, paginationKey?: Uint8Array) => {
|
||||
const request = QueryPacketAcknowledgementsRequest.fromPartial({
|
||||
portId: portId,
|
||||
channelId: channelId,
|
||||
pagination: createPagination(paginationKey),
|
||||
}),
|
||||
});
|
||||
return channelQueryService.PacketAcknowledgements(request);
|
||||
},
|
||||
allPacketAcknowledgements: async (portId: string, channelId: string) => {
|
||||
const acknowledgements = [];
|
||||
let response: QueryPacketAcknowledgementsResponse;
|
||||
let key: Uint8Array | undefined;
|
||||
do {
|
||||
response = await channelQueryService.PacketAcknowledgements({
|
||||
const request = QueryPacketAcknowledgementsRequest.fromPartial({
|
||||
channelId: channelId,
|
||||
portId: portId,
|
||||
pagination: createPagination(key),
|
||||
});
|
||||
response = await channelQueryService.PacketAcknowledgements(request);
|
||||
acknowledgements.push(...response.acknowledgements);
|
||||
key = response.pagination?.nextKey;
|
||||
} while (key && key.length);
|
||||
|
16
yarn.lock
16
yarn.lock
@ -362,7 +362,7 @@ __metadata:
|
||||
axios: ^0.21.2
|
||||
babylon: ^6.18.0
|
||||
chalk: ^4
|
||||
cosmjs-types: ^0.4.0
|
||||
cosmjs-types: ^0.5.0
|
||||
diff: ^4
|
||||
eslint: ^7.5
|
||||
eslint-config-prettier: ^8.3.0
|
||||
@ -408,7 +408,7 @@ __metadata:
|
||||
"@types/pako": ^1.0.1
|
||||
"@typescript-eslint/eslint-plugin": ^5.13.0
|
||||
"@typescript-eslint/parser": ^5.13.0
|
||||
cosmjs-types: ^0.4.0
|
||||
cosmjs-types: ^0.5.0
|
||||
eslint: ^7.5
|
||||
eslint-config-prettier: ^8.3.0
|
||||
eslint-import-resolver-node: ^0.3.4
|
||||
@ -767,7 +767,7 @@ __metadata:
|
||||
"@types/node": ^15.0.1
|
||||
"@typescript-eslint/eslint-plugin": ^5.13.0
|
||||
"@typescript-eslint/parser": ^5.13.0
|
||||
cosmjs-types: ^0.4.0
|
||||
cosmjs-types: ^0.5.0
|
||||
eslint: ^7.5
|
||||
eslint-config-prettier: ^8.3.0
|
||||
eslint-import-resolver-node: ^0.3.4
|
||||
@ -864,7 +864,7 @@ __metadata:
|
||||
"@types/node": ^15.0.1
|
||||
"@typescript-eslint/eslint-plugin": ^5.13.0
|
||||
"@typescript-eslint/parser": ^5.13.0
|
||||
cosmjs-types: ^0.4.0
|
||||
cosmjs-types: ^0.5.0
|
||||
eslint: ^7.5
|
||||
eslint-config-prettier: ^8.3.0
|
||||
eslint-import-resolver-node: ^0.3.4
|
||||
@ -2903,13 +2903,13 @@ __metadata:
|
||||
languageName: unknown
|
||||
linkType: soft
|
||||
|
||||
"cosmjs-types@npm:^0.4.0":
|
||||
version: 0.4.0
|
||||
resolution: "cosmjs-types@npm:0.4.0"
|
||||
"cosmjs-types@npm:^0.5.0":
|
||||
version: 0.5.0
|
||||
resolution: "cosmjs-types@npm:0.5.0"
|
||||
dependencies:
|
||||
long: ^4.0.0
|
||||
protobufjs: ~6.11.2
|
||||
checksum: ffc3e6451e85023f81e17ae55cc221d2be77fa01ac65cbd51ec69b695c49a7fba5ddd50a913e519db8aae821f02f0c1a231a2d20337d4646ca520bb3584631a1
|
||||
checksum: caface3c6d1fa1d2a848b13629fc1e1fe9afbd231bbea09a2b81ab3a7585937e139101bda6f1e85bff55ad5f7136356eff08b897d484c7f875de0d5da5b23dc0
|
||||
languageName: node
|
||||
linkType: hard
|
||||
|
||||
|
Loading…
x
Reference in New Issue
Block a user