decentralcardgame-cardchain-client-ts 0.0.36 → 0.0.37
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/amino_adapter.d.ts +9 -0
- package/amino_adapter.js +22 -0
- package/cardchain.cardchain/module.js +53 -52
- package/cardchain.featureflag/module.js +3 -2
- package/client.js +2 -2
- package/cosmos.auth.v1beta1/module.js +2 -1
- package/cosmos.authz.v1beta1/module.js +4 -3
- package/cosmos.bank.v1beta1/module.js +5 -4
- package/cosmos.bank.v1beta1/rest.d.ts +20 -20
- package/cosmos.bank.v1beta1/rest.js +16 -16
- package/cosmos.circuit.v1/module.js +4 -3
- package/cosmos.consensus.v1/module.js +2 -1
- package/cosmos.crisis.v1beta1/module.js +3 -2
- package/cosmos.distribution.v1beta1/module.js +8 -7
- package/cosmos.evidence.v1beta1/module.js +2 -1
- package/cosmos.feegrant.v1beta1/module.js +4 -3
- package/cosmos.gov.v1/module.js +8 -7
- package/cosmos.gov.v1beta1/module.js +5 -4
- package/cosmos.group.v1/module.js +17 -14
- package/cosmos.group.v1/types.d.ts +2 -1
- package/cosmos.group.v1/types.js +2 -1
- package/cosmos.mint.v1beta1/module.js +2 -1
- package/cosmos.nft.v1beta1/module.js +2 -1
- package/cosmos.slashing.v1beta1/module.js +3 -2
- package/cosmos.staking.v1beta1/module.js +8 -7
- package/cosmos.tx.v1beta1/rest.d.ts +8 -0
- package/cosmos.upgrade.v1beta1/module.js +3 -2
- package/cosmos.vesting.v1beta1/module.js +4 -3
- package/ibc.applications.fee.v1/module.js +5 -4
- package/ibc.applications.interchain_accounts.controller.v1/module.js +4 -3
- package/ibc.applications.interchain_accounts.host.v1/module.js +3 -2
- package/ibc.applications.transfer.v1/module.js +3 -2
- package/ibc.core.channel.v1/module.js +20 -19
- package/ibc.core.client.v1/module.js +8 -7
- package/ibc.core.connection.v1/module.js +6 -5
- package/index.d.ts +22 -22
- package/index.js +7 -7
- package/package.json +1 -1
- package/types/cosmos/app/runtime/v1alpha1/module.d.ts +13 -1
- package/types/cosmos/app/runtime/v1alpha1/module.js +36 -0
- package/types/cosmos/app/v1alpha1/query.d.ts +6 -2
- package/types/cosmos/auth/module/v1/module.d.ts +6 -0
- package/types/cosmos/auth/module/v1/module.js +18 -1
- package/types/cosmos/auth/v1beta1/query.d.ts +21 -107
- package/types/cosmos/auth/v1beta1/tx.d.ts +1 -9
- package/types/cosmos/authz/v1beta1/authz.d.ts +0 -1
- package/types/cosmos/authz/v1beta1/event.d.ts +0 -1
- package/types/cosmos/authz/v1beta1/genesis.d.ts +0 -1
- package/types/cosmos/authz/v1beta1/query.d.ts +2 -11
- package/types/cosmos/authz/v1beta1/tx.d.ts +0 -1
- package/types/cosmos/autocli/v1/options.d.ts +21 -1
- package/types/cosmos/autocli/v1/options.js +65 -2
- package/types/cosmos/bank/v1beta1/authz.d.ts +0 -4
- package/types/cosmos/bank/v1beta1/bank.d.ts +2 -14
- package/types/cosmos/bank/v1beta1/genesis.d.ts +1 -5
- package/types/cosmos/bank/v1beta1/query.d.ts +12 -62
- package/types/cosmos/bank/v1beta1/query.js +6 -6
- package/types/cosmos/bank/v1beta1/tx.d.ts +2 -18
- package/types/cosmos/base/abci/v1beta1/abci.d.ts +2 -12
- package/types/cosmos/base/reflection/v2alpha1/reflection.d.ts +0 -1
- package/types/cosmos/base/tendermint/v1beta1/query.d.ts +0 -5
- package/types/cosmos/benchmark/module/v1/module.d.ts +52 -0
- package/types/cosmos/benchmark/module/v1/module.js +289 -0
- package/types/cosmos/benchmark/v1/benchmark.d.ts +32 -0
- package/types/cosmos/benchmark/v1/benchmark.js +164 -0
- package/types/cosmos/benchmark/v1/tx.d.ts +51 -0
- package/types/cosmos/benchmark/v1/tx.js +196 -0
- package/types/cosmos/consensus/v1/query.d.ts +0 -1
- package/types/cosmos/consensus/v1/tx.d.ts +0 -4
- package/types/cosmos/{orm/module/v1alpha1 → counter/module/v1}/module.d.ts +4 -6
- package/types/cosmos/counter/module/v1/module.js +62 -0
- package/types/cosmos/counter/v1/query.d.ts +47 -0
- package/types/cosmos/counter/v1/query.js +122 -0
- package/types/cosmos/counter/v1/tx.d.ts +52 -0
- package/types/cosmos/counter/v1/tx.js +153 -0
- package/types/cosmos/crisis/v1beta1/tx.d.ts +1 -9
- package/types/cosmos/crypto/hd/v1/hd.d.ts +0 -1
- package/types/cosmos/crypto/keyring/v1/record.d.ts +0 -1
- package/types/cosmos/crypto/secp256r1/keys.d.ts +0 -1
- package/types/cosmos/distribution/v1beta1/query.d.ts +5 -1
- package/types/cosmos/distribution/v1beta1/tx.d.ts +4 -22
- package/types/cosmos/epochs/module/v1/module.d.ts +25 -0
- package/types/cosmos/{orm/module/v1alpha1 → epochs/module/v1}/module.js +2 -2
- package/types/cosmos/epochs/v1beta1/events.d.ts +32 -0
- package/types/cosmos/epochs/v1beta1/events.js +140 -0
- package/types/cosmos/epochs/v1beta1/genesis.d.ts +86 -0
- package/types/cosmos/epochs/v1beta1/genesis.js +256 -0
- package/types/cosmos/epochs/v1beta1/query.d.ts +73 -0
- package/types/cosmos/epochs/v1beta1/query.js +233 -0
- package/types/cosmos/evidence/v1beta1/query.d.ts +1 -5
- package/types/cosmos/feegrant/v1beta1/feegrant.d.ts +0 -1
- package/types/cosmos/feegrant/v1beta1/genesis.d.ts +0 -1
- package/types/cosmos/feegrant/v1beta1/query.d.ts +3 -16
- package/types/cosmos/feegrant/v1beta1/tx.d.ts +3 -16
- package/types/cosmos/gov/v1/genesis.d.ts +1 -8
- package/types/cosmos/gov/v1/gov.d.ts +9 -50
- package/types/cosmos/gov/v1/gov.js +0 -1
- package/types/cosmos/gov/v1/query.d.ts +1 -6
- package/types/cosmos/gov/v1/tx.d.ts +6 -37
- package/types/cosmos/gov/v1beta1/gov.d.ts +2 -10
- package/types/cosmos/gov/v1beta1/tx.d.ts +3 -15
- package/types/cosmos/group/v1/events.d.ts +8 -1
- package/types/cosmos/group/v1/events.js +68 -0
- package/types/cosmos/group/v1/genesis.d.ts +0 -1
- package/types/cosmos/group/v1/query.d.ts +3 -16
- package/types/cosmos/group/v1/tx.d.ts +2 -11
- package/types/cosmos/group/v1/tx.js +0 -1
- package/types/cosmos/group/v1/types.d.ts +2 -11
- package/types/cosmos/group/v1/types.js +0 -1
- package/types/cosmos/mint/v1beta1/tx.d.ts +1 -9
- package/types/cosmos/params/v1beta1/query.d.ts +1 -11
- package/types/cosmos/protocolpool/module/v1/module.d.ts +27 -0
- package/types/cosmos/protocolpool/module/v1/module.js +62 -0
- package/types/cosmos/protocolpool/v1/genesis.d.ts +33 -0
- package/types/cosmos/protocolpool/v1/genesis.js +84 -0
- package/types/cosmos/protocolpool/v1/query.d.ts +108 -0
- package/types/cosmos/protocolpool/v1/query.js +420 -0
- package/types/cosmos/protocolpool/v1/tx.d.ts +159 -0
- package/types/cosmos/protocolpool/v1/tx.js +700 -0
- package/types/cosmos/protocolpool/v1/types.d.ts +45 -0
- package/types/cosmos/protocolpool/v1/types.js +196 -0
- package/types/cosmos/slashing/v1beta1/tx.d.ts +1 -9
- package/types/cosmos/staking/v1beta1/authz.d.ts +2 -10
- package/types/cosmos/staking/v1beta1/authz.js +1 -5
- package/types/cosmos/staking/v1beta1/staking.d.ts +1 -5
- package/types/cosmos/staking/v1beta1/tx.d.ts +4 -25
- package/types/cosmos/store/snapshots/v1/snapshot.d.ts +5 -25
- package/types/cosmos/store/v1beta1/listening.d.ts +0 -2
- package/types/cosmos/tx/v1beta1/service.d.ts +6 -52
- package/types/cosmos/tx/v1beta1/tx.d.ts +37 -17
- package/types/cosmos/tx/v1beta1/tx.js +61 -1
- package/types/cosmos/upgrade/v1beta1/query.d.ts +4 -25
- package/types/cosmos/upgrade/v1beta1/tx.d.ts +5 -28
- package/types/cosmos/vesting/v1beta1/tx.d.ts +1 -15
- package/types/cosmos/vesting/v1beta1/vesting.d.ts +0 -2
- package/types/cosmos/orm/query/v1alpha1/query.d.ts +0 -148
- package/types/cosmos/orm/query/v1alpha1/query.js +0 -705
- package/types/cosmos/orm/v1/orm.d.ts +0 -115
- package/types/cosmos/orm/v1/orm.js +0 -300
- package/types/cosmos/orm/v1alpha1/schema.d.ts +0 -77
- package/types/cosmos/orm/v1alpha1/schema.js +0 -243
|
@@ -0,0 +1,196 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.6.1
|
|
4
|
+
// protoc unknown
|
|
5
|
+
// source: cosmos/benchmark/v1/tx.proto
|
|
6
|
+
/* eslint-disable */
|
|
7
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
8
|
+
import { Op } from "./benchmark";
|
|
9
|
+
export const protobufPackage = "cosmos.benchmark.v1";
|
|
10
|
+
function createBaseMsgLoadTest() {
|
|
11
|
+
return { caller: new Uint8Array(0), ops: [] };
|
|
12
|
+
}
|
|
13
|
+
export const MsgLoadTest = {
|
|
14
|
+
encode(message, writer = new BinaryWriter()) {
|
|
15
|
+
if (message.caller.length !== 0) {
|
|
16
|
+
writer.uint32(10).bytes(message.caller);
|
|
17
|
+
}
|
|
18
|
+
for (const v of message.ops) {
|
|
19
|
+
Op.encode(v, writer.uint32(18).fork()).join();
|
|
20
|
+
}
|
|
21
|
+
return writer;
|
|
22
|
+
},
|
|
23
|
+
decode(input, length) {
|
|
24
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
25
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
26
|
+
const message = createBaseMsgLoadTest();
|
|
27
|
+
while (reader.pos < end) {
|
|
28
|
+
const tag = reader.uint32();
|
|
29
|
+
switch (tag >>> 3) {
|
|
30
|
+
case 1: {
|
|
31
|
+
if (tag !== 10) {
|
|
32
|
+
break;
|
|
33
|
+
}
|
|
34
|
+
message.caller = reader.bytes();
|
|
35
|
+
continue;
|
|
36
|
+
}
|
|
37
|
+
case 2: {
|
|
38
|
+
if (tag !== 18) {
|
|
39
|
+
break;
|
|
40
|
+
}
|
|
41
|
+
message.ops.push(Op.decode(reader, reader.uint32()));
|
|
42
|
+
continue;
|
|
43
|
+
}
|
|
44
|
+
}
|
|
45
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
46
|
+
break;
|
|
47
|
+
}
|
|
48
|
+
reader.skip(tag & 7);
|
|
49
|
+
}
|
|
50
|
+
return message;
|
|
51
|
+
},
|
|
52
|
+
fromJSON(object) {
|
|
53
|
+
return {
|
|
54
|
+
caller: isSet(object.caller) ? bytesFromBase64(object.caller) : new Uint8Array(0),
|
|
55
|
+
ops: globalThis.Array.isArray(object?.ops) ? object.ops.map((e) => Op.fromJSON(e)) : [],
|
|
56
|
+
};
|
|
57
|
+
},
|
|
58
|
+
toJSON(message) {
|
|
59
|
+
const obj = {};
|
|
60
|
+
if (message.caller.length !== 0) {
|
|
61
|
+
obj.caller = base64FromBytes(message.caller);
|
|
62
|
+
}
|
|
63
|
+
if (message.ops?.length) {
|
|
64
|
+
obj.ops = message.ops.map((e) => Op.toJSON(e));
|
|
65
|
+
}
|
|
66
|
+
return obj;
|
|
67
|
+
},
|
|
68
|
+
create(base) {
|
|
69
|
+
return MsgLoadTest.fromPartial(base ?? {});
|
|
70
|
+
},
|
|
71
|
+
fromPartial(object) {
|
|
72
|
+
const message = createBaseMsgLoadTest();
|
|
73
|
+
message.caller = object.caller ?? new Uint8Array(0);
|
|
74
|
+
message.ops = object.ops?.map((e) => Op.fromPartial(e)) || [];
|
|
75
|
+
return message;
|
|
76
|
+
},
|
|
77
|
+
};
|
|
78
|
+
function createBaseMsgLoadTestResponse() {
|
|
79
|
+
return { totalTime: 0, totalErrors: 0 };
|
|
80
|
+
}
|
|
81
|
+
export const MsgLoadTestResponse = {
|
|
82
|
+
encode(message, writer = new BinaryWriter()) {
|
|
83
|
+
if (message.totalTime !== 0) {
|
|
84
|
+
writer.uint32(8).uint64(message.totalTime);
|
|
85
|
+
}
|
|
86
|
+
if (message.totalErrors !== 0) {
|
|
87
|
+
writer.uint32(16).uint64(message.totalErrors);
|
|
88
|
+
}
|
|
89
|
+
return writer;
|
|
90
|
+
},
|
|
91
|
+
decode(input, length) {
|
|
92
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
93
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
94
|
+
const message = createBaseMsgLoadTestResponse();
|
|
95
|
+
while (reader.pos < end) {
|
|
96
|
+
const tag = reader.uint32();
|
|
97
|
+
switch (tag >>> 3) {
|
|
98
|
+
case 1: {
|
|
99
|
+
if (tag !== 8) {
|
|
100
|
+
break;
|
|
101
|
+
}
|
|
102
|
+
message.totalTime = longToNumber(reader.uint64());
|
|
103
|
+
continue;
|
|
104
|
+
}
|
|
105
|
+
case 2: {
|
|
106
|
+
if (tag !== 16) {
|
|
107
|
+
break;
|
|
108
|
+
}
|
|
109
|
+
message.totalErrors = longToNumber(reader.uint64());
|
|
110
|
+
continue;
|
|
111
|
+
}
|
|
112
|
+
}
|
|
113
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
114
|
+
break;
|
|
115
|
+
}
|
|
116
|
+
reader.skip(tag & 7);
|
|
117
|
+
}
|
|
118
|
+
return message;
|
|
119
|
+
},
|
|
120
|
+
fromJSON(object) {
|
|
121
|
+
return {
|
|
122
|
+
totalTime: isSet(object.totalTime) ? globalThis.Number(object.totalTime) : 0,
|
|
123
|
+
totalErrors: isSet(object.totalErrors) ? globalThis.Number(object.totalErrors) : 0,
|
|
124
|
+
};
|
|
125
|
+
},
|
|
126
|
+
toJSON(message) {
|
|
127
|
+
const obj = {};
|
|
128
|
+
if (message.totalTime !== 0) {
|
|
129
|
+
obj.totalTime = Math.round(message.totalTime);
|
|
130
|
+
}
|
|
131
|
+
if (message.totalErrors !== 0) {
|
|
132
|
+
obj.totalErrors = Math.round(message.totalErrors);
|
|
133
|
+
}
|
|
134
|
+
return obj;
|
|
135
|
+
},
|
|
136
|
+
create(base) {
|
|
137
|
+
return MsgLoadTestResponse.fromPartial(base ?? {});
|
|
138
|
+
},
|
|
139
|
+
fromPartial(object) {
|
|
140
|
+
const message = createBaseMsgLoadTestResponse();
|
|
141
|
+
message.totalTime = object.totalTime ?? 0;
|
|
142
|
+
message.totalErrors = object.totalErrors ?? 0;
|
|
143
|
+
return message;
|
|
144
|
+
},
|
|
145
|
+
};
|
|
146
|
+
export const MsgServiceName = "cosmos.benchmark.v1.Msg";
|
|
147
|
+
export class MsgClientImpl {
|
|
148
|
+
constructor(rpc, opts) {
|
|
149
|
+
this.service = opts?.service || MsgServiceName;
|
|
150
|
+
this.rpc = rpc;
|
|
151
|
+
this.LoadTest = this.LoadTest.bind(this);
|
|
152
|
+
}
|
|
153
|
+
LoadTest(request) {
|
|
154
|
+
const data = MsgLoadTest.encode(request).finish();
|
|
155
|
+
const promise = this.rpc.request(this.service, "LoadTest", data);
|
|
156
|
+
return promise.then((data) => MsgLoadTestResponse.decode(new BinaryReader(data)));
|
|
157
|
+
}
|
|
158
|
+
}
|
|
159
|
+
function bytesFromBase64(b64) {
|
|
160
|
+
if (globalThis.Buffer) {
|
|
161
|
+
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
|
|
162
|
+
}
|
|
163
|
+
else {
|
|
164
|
+
const bin = globalThis.atob(b64);
|
|
165
|
+
const arr = new Uint8Array(bin.length);
|
|
166
|
+
for (let i = 0; i < bin.length; ++i) {
|
|
167
|
+
arr[i] = bin.charCodeAt(i);
|
|
168
|
+
}
|
|
169
|
+
return arr;
|
|
170
|
+
}
|
|
171
|
+
}
|
|
172
|
+
function base64FromBytes(arr) {
|
|
173
|
+
if (globalThis.Buffer) {
|
|
174
|
+
return globalThis.Buffer.from(arr).toString("base64");
|
|
175
|
+
}
|
|
176
|
+
else {
|
|
177
|
+
const bin = [];
|
|
178
|
+
arr.forEach((byte) => {
|
|
179
|
+
bin.push(globalThis.String.fromCharCode(byte));
|
|
180
|
+
});
|
|
181
|
+
return globalThis.btoa(bin.join(""));
|
|
182
|
+
}
|
|
183
|
+
}
|
|
184
|
+
function longToNumber(int64) {
|
|
185
|
+
const num = globalThis.Number(int64.toString());
|
|
186
|
+
if (num > globalThis.Number.MAX_SAFE_INTEGER) {
|
|
187
|
+
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
188
|
+
}
|
|
189
|
+
if (num < globalThis.Number.MIN_SAFE_INTEGER) {
|
|
190
|
+
throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
|
|
191
|
+
}
|
|
192
|
+
return num;
|
|
193
|
+
}
|
|
194
|
+
function isSet(value) {
|
|
195
|
+
return value !== null && value !== undefined;
|
|
196
|
+
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
2
|
import { ConsensusParams } from "../../../tendermint/types/params";
|
|
3
3
|
export declare const protobufPackage = "cosmos.consensus.v1";
|
|
4
|
-
/** Since: cosmos-sdk 0.47 */
|
|
5
4
|
/** QueryParamsRequest defines the request type for querying x/consensus parameters. */
|
|
6
5
|
export interface QueryParamsRequest {
|
|
7
6
|
}
|
|
@@ -1,7 +1,6 @@
|
|
|
1
1
|
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
2
|
import { ABCIParams, BlockParams, EvidenceParams, ValidatorParams } from "../../../tendermint/types/params";
|
|
3
3
|
export declare const protobufPackage = "cosmos.consensus.v1";
|
|
4
|
-
/** Since: cosmos-sdk 0.47 */
|
|
5
4
|
/** MsgUpdateParams is the Msg/UpdateParams request type. */
|
|
6
5
|
export interface MsgUpdateParams {
|
|
7
6
|
/** authority is the address that controls the module (defaults to x/gov unless overwritten). */
|
|
@@ -16,7 +15,6 @@ export interface MsgUpdateParams {
|
|
|
16
15
|
block: BlockParams | undefined;
|
|
17
16
|
evidence: EvidenceParams | undefined;
|
|
18
17
|
validator: ValidatorParams | undefined;
|
|
19
|
-
/** Since: cosmos-sdk 0.50 */
|
|
20
18
|
abci: ABCIParams | undefined;
|
|
21
19
|
}
|
|
22
20
|
/**
|
|
@@ -32,8 +30,6 @@ export interface Msg {
|
|
|
32
30
|
/**
|
|
33
31
|
* UpdateParams defines a governance operation for updating the x/consensus module parameters.
|
|
34
32
|
* The authority is defined in the keeper.
|
|
35
|
-
*
|
|
36
|
-
* Since: cosmos-sdk 0.47
|
|
37
33
|
*/
|
|
38
34
|
UpdateParams(request: MsgUpdateParams): Promise<MsgUpdateParamsResponse>;
|
|
39
35
|
}
|
|
@@ -1,11 +1,9 @@
|
|
|
1
1
|
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
|
-
export declare const protobufPackage = "cosmos.
|
|
3
|
-
/**
|
|
4
|
-
* Module defines the ORM module which adds providers to the app container for
|
|
5
|
-
* ORM ModuleDB's and in the future will automatically register query
|
|
6
|
-
* services for modules that use the ORM.
|
|
7
|
-
*/
|
|
2
|
+
export declare const protobufPackage = "cosmos.counter.module.v1";
|
|
3
|
+
/** Module is the config object of the counter module. */
|
|
8
4
|
export interface Module {
|
|
5
|
+
/** authority defines the custom module authority. If not set, defaults to the governance module. */
|
|
6
|
+
authority: string;
|
|
9
7
|
}
|
|
10
8
|
export declare const Module: MessageFns<Module>;
|
|
11
9
|
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
@@ -0,0 +1,62 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.6.1
|
|
4
|
+
// protoc unknown
|
|
5
|
+
// source: cosmos/counter/module/v1/module.proto
|
|
6
|
+
/* eslint-disable */
|
|
7
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
8
|
+
export const protobufPackage = "cosmos.counter.module.v1";
|
|
9
|
+
function createBaseModule() {
|
|
10
|
+
return { authority: "" };
|
|
11
|
+
}
|
|
12
|
+
export const Module = {
|
|
13
|
+
encode(message, writer = new BinaryWriter()) {
|
|
14
|
+
if (message.authority !== "") {
|
|
15
|
+
writer.uint32(10).string(message.authority);
|
|
16
|
+
}
|
|
17
|
+
return writer;
|
|
18
|
+
},
|
|
19
|
+
decode(input, length) {
|
|
20
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
21
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
22
|
+
const message = createBaseModule();
|
|
23
|
+
while (reader.pos < end) {
|
|
24
|
+
const tag = reader.uint32();
|
|
25
|
+
switch (tag >>> 3) {
|
|
26
|
+
case 1: {
|
|
27
|
+
if (tag !== 10) {
|
|
28
|
+
break;
|
|
29
|
+
}
|
|
30
|
+
message.authority = reader.string();
|
|
31
|
+
continue;
|
|
32
|
+
}
|
|
33
|
+
}
|
|
34
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
35
|
+
break;
|
|
36
|
+
}
|
|
37
|
+
reader.skip(tag & 7);
|
|
38
|
+
}
|
|
39
|
+
return message;
|
|
40
|
+
},
|
|
41
|
+
fromJSON(object) {
|
|
42
|
+
return { authority: isSet(object.authority) ? globalThis.String(object.authority) : "" };
|
|
43
|
+
},
|
|
44
|
+
toJSON(message) {
|
|
45
|
+
const obj = {};
|
|
46
|
+
if (message.authority !== "") {
|
|
47
|
+
obj.authority = message.authority;
|
|
48
|
+
}
|
|
49
|
+
return obj;
|
|
50
|
+
},
|
|
51
|
+
create(base) {
|
|
52
|
+
return Module.fromPartial(base ?? {});
|
|
53
|
+
},
|
|
54
|
+
fromPartial(object) {
|
|
55
|
+
const message = createBaseModule();
|
|
56
|
+
message.authority = object.authority ?? "";
|
|
57
|
+
return message;
|
|
58
|
+
},
|
|
59
|
+
};
|
|
60
|
+
function isSet(value) {
|
|
61
|
+
return value !== null && value !== undefined;
|
|
62
|
+
}
|
|
@@ -0,0 +1,47 @@
|
|
|
1
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
|
+
export declare const protobufPackage = "cosmos.counter.v1";
|
|
3
|
+
/** QueryGetCountRequest defines the request type for querying x/mock count. */
|
|
4
|
+
export interface QueryGetCountRequest {
|
|
5
|
+
}
|
|
6
|
+
/** QueryGetCountResponse defines the response type for querying x/mock count. */
|
|
7
|
+
export interface QueryGetCountResponse {
|
|
8
|
+
totalCount: number;
|
|
9
|
+
}
|
|
10
|
+
export declare const QueryGetCountRequest: MessageFns<QueryGetCountRequest>;
|
|
11
|
+
export declare const QueryGetCountResponse: MessageFns<QueryGetCountResponse>;
|
|
12
|
+
/** Query defines the gRPC querier service. */
|
|
13
|
+
export interface Query {
|
|
14
|
+
/** GetCount queries the parameters of x/Counter module. */
|
|
15
|
+
GetCount(request: QueryGetCountRequest): Promise<QueryGetCountResponse>;
|
|
16
|
+
}
|
|
17
|
+
export declare const QueryServiceName = "cosmos.counter.v1.Query";
|
|
18
|
+
export declare class QueryClientImpl implements Query {
|
|
19
|
+
private readonly rpc;
|
|
20
|
+
private readonly service;
|
|
21
|
+
constructor(rpc: Rpc, opts?: {
|
|
22
|
+
service?: string;
|
|
23
|
+
});
|
|
24
|
+
GetCount(request: QueryGetCountRequest): Promise<QueryGetCountResponse>;
|
|
25
|
+
}
|
|
26
|
+
interface Rpc {
|
|
27
|
+
request(service: string, method: string, data: Uint8Array): Promise<Uint8Array>;
|
|
28
|
+
}
|
|
29
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
30
|
+
export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
|
31
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
32
|
+
} : Partial<T>;
|
|
33
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
34
|
+
export type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
35
|
+
[K in keyof P]: Exact<P[K], I[K]>;
|
|
36
|
+
} & {
|
|
37
|
+
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
|
|
38
|
+
};
|
|
39
|
+
export interface MessageFns<T> {
|
|
40
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
41
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
42
|
+
fromJSON(object: any): T;
|
|
43
|
+
toJSON(message: T): unknown;
|
|
44
|
+
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
45
|
+
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
46
|
+
}
|
|
47
|
+
export {};
|
|
@@ -0,0 +1,122 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.6.1
|
|
4
|
+
// protoc unknown
|
|
5
|
+
// source: cosmos/counter/v1/query.proto
|
|
6
|
+
/* eslint-disable */
|
|
7
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
8
|
+
export const protobufPackage = "cosmos.counter.v1";
|
|
9
|
+
function createBaseQueryGetCountRequest() {
|
|
10
|
+
return {};
|
|
11
|
+
}
|
|
12
|
+
export const QueryGetCountRequest = {
|
|
13
|
+
encode(_, writer = new BinaryWriter()) {
|
|
14
|
+
return writer;
|
|
15
|
+
},
|
|
16
|
+
decode(input, length) {
|
|
17
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
18
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
19
|
+
const message = createBaseQueryGetCountRequest();
|
|
20
|
+
while (reader.pos < end) {
|
|
21
|
+
const tag = reader.uint32();
|
|
22
|
+
switch (tag >>> 3) {
|
|
23
|
+
}
|
|
24
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
25
|
+
break;
|
|
26
|
+
}
|
|
27
|
+
reader.skip(tag & 7);
|
|
28
|
+
}
|
|
29
|
+
return message;
|
|
30
|
+
},
|
|
31
|
+
fromJSON(_) {
|
|
32
|
+
return {};
|
|
33
|
+
},
|
|
34
|
+
toJSON(_) {
|
|
35
|
+
const obj = {};
|
|
36
|
+
return obj;
|
|
37
|
+
},
|
|
38
|
+
create(base) {
|
|
39
|
+
return QueryGetCountRequest.fromPartial(base ?? {});
|
|
40
|
+
},
|
|
41
|
+
fromPartial(_) {
|
|
42
|
+
const message = createBaseQueryGetCountRequest();
|
|
43
|
+
return message;
|
|
44
|
+
},
|
|
45
|
+
};
|
|
46
|
+
function createBaseQueryGetCountResponse() {
|
|
47
|
+
return { totalCount: 0 };
|
|
48
|
+
}
|
|
49
|
+
export const QueryGetCountResponse = {
|
|
50
|
+
encode(message, writer = new BinaryWriter()) {
|
|
51
|
+
if (message.totalCount !== 0) {
|
|
52
|
+
writer.uint32(8).int64(message.totalCount);
|
|
53
|
+
}
|
|
54
|
+
return writer;
|
|
55
|
+
},
|
|
56
|
+
decode(input, length) {
|
|
57
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
58
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
59
|
+
const message = createBaseQueryGetCountResponse();
|
|
60
|
+
while (reader.pos < end) {
|
|
61
|
+
const tag = reader.uint32();
|
|
62
|
+
switch (tag >>> 3) {
|
|
63
|
+
case 1: {
|
|
64
|
+
if (tag !== 8) {
|
|
65
|
+
break;
|
|
66
|
+
}
|
|
67
|
+
message.totalCount = longToNumber(reader.int64());
|
|
68
|
+
continue;
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
72
|
+
break;
|
|
73
|
+
}
|
|
74
|
+
reader.skip(tag & 7);
|
|
75
|
+
}
|
|
76
|
+
return message;
|
|
77
|
+
},
|
|
78
|
+
fromJSON(object) {
|
|
79
|
+
return { totalCount: isSet(object.totalCount) ? globalThis.Number(object.totalCount) : 0 };
|
|
80
|
+
},
|
|
81
|
+
toJSON(message) {
|
|
82
|
+
const obj = {};
|
|
83
|
+
if (message.totalCount !== 0) {
|
|
84
|
+
obj.totalCount = Math.round(message.totalCount);
|
|
85
|
+
}
|
|
86
|
+
return obj;
|
|
87
|
+
},
|
|
88
|
+
create(base) {
|
|
89
|
+
return QueryGetCountResponse.fromPartial(base ?? {});
|
|
90
|
+
},
|
|
91
|
+
fromPartial(object) {
|
|
92
|
+
const message = createBaseQueryGetCountResponse();
|
|
93
|
+
message.totalCount = object.totalCount ?? 0;
|
|
94
|
+
return message;
|
|
95
|
+
},
|
|
96
|
+
};
|
|
97
|
+
export const QueryServiceName = "cosmos.counter.v1.Query";
|
|
98
|
+
export class QueryClientImpl {
|
|
99
|
+
constructor(rpc, opts) {
|
|
100
|
+
this.service = opts?.service || QueryServiceName;
|
|
101
|
+
this.rpc = rpc;
|
|
102
|
+
this.GetCount = this.GetCount.bind(this);
|
|
103
|
+
}
|
|
104
|
+
GetCount(request) {
|
|
105
|
+
const data = QueryGetCountRequest.encode(request).finish();
|
|
106
|
+
const promise = this.rpc.request(this.service, "GetCount", data);
|
|
107
|
+
return promise.then((data) => QueryGetCountResponse.decode(new BinaryReader(data)));
|
|
108
|
+
}
|
|
109
|
+
}
|
|
110
|
+
function longToNumber(int64) {
|
|
111
|
+
const num = globalThis.Number(int64.toString());
|
|
112
|
+
if (num > globalThis.Number.MAX_SAFE_INTEGER) {
|
|
113
|
+
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
114
|
+
}
|
|
115
|
+
if (num < globalThis.Number.MIN_SAFE_INTEGER) {
|
|
116
|
+
throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
|
|
117
|
+
}
|
|
118
|
+
return num;
|
|
119
|
+
}
|
|
120
|
+
function isSet(value) {
|
|
121
|
+
return value !== null && value !== undefined;
|
|
122
|
+
}
|
|
@@ -0,0 +1,52 @@
|
|
|
1
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
2
|
+
export declare const protobufPackage = "cosmos.counter.v1";
|
|
3
|
+
/** MsgIncreaseCounter defines a count Msg service counter. */
|
|
4
|
+
export interface MsgIncreaseCounter {
|
|
5
|
+
/** signer is the address that controls the module (defaults to x/gov unless overwritten). */
|
|
6
|
+
signer: string;
|
|
7
|
+
/** count is the number of times to increment the counter. */
|
|
8
|
+
count: number;
|
|
9
|
+
}
|
|
10
|
+
/** MsgIncreaseCountResponse is the Msg/Counter response type. */
|
|
11
|
+
export interface MsgIncreaseCountResponse {
|
|
12
|
+
/** new_count is the number of times the counter was incremented. */
|
|
13
|
+
newCount: number;
|
|
14
|
+
}
|
|
15
|
+
export declare const MsgIncreaseCounter: MessageFns<MsgIncreaseCounter>;
|
|
16
|
+
export declare const MsgIncreaseCountResponse: MessageFns<MsgIncreaseCountResponse>;
|
|
17
|
+
/** Msg defines the counter Msg service. */
|
|
18
|
+
export interface Msg {
|
|
19
|
+
/** IncreaseCount increments the counter by the specified amount. */
|
|
20
|
+
IncreaseCount(request: MsgIncreaseCounter): Promise<MsgIncreaseCountResponse>;
|
|
21
|
+
}
|
|
22
|
+
export declare const MsgServiceName = "cosmos.counter.v1.Msg";
|
|
23
|
+
export declare class MsgClientImpl implements Msg {
|
|
24
|
+
private readonly rpc;
|
|
25
|
+
private readonly service;
|
|
26
|
+
constructor(rpc: Rpc, opts?: {
|
|
27
|
+
service?: string;
|
|
28
|
+
});
|
|
29
|
+
IncreaseCount(request: MsgIncreaseCounter): Promise<MsgIncreaseCountResponse>;
|
|
30
|
+
}
|
|
31
|
+
interface Rpc {
|
|
32
|
+
request(service: string, method: string, data: Uint8Array): Promise<Uint8Array>;
|
|
33
|
+
}
|
|
34
|
+
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
35
|
+
export type DeepPartial<T> = T extends Builtin ? T : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
|
36
|
+
[K in keyof T]?: DeepPartial<T[K]>;
|
|
37
|
+
} : Partial<T>;
|
|
38
|
+
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
39
|
+
export type Exact<P, I extends P> = P extends Builtin ? P : P & {
|
|
40
|
+
[K in keyof P]: Exact<P[K], I[K]>;
|
|
41
|
+
} & {
|
|
42
|
+
[K in Exclude<keyof I, KeysOfUnion<P>>]: never;
|
|
43
|
+
};
|
|
44
|
+
export interface MessageFns<T> {
|
|
45
|
+
encode(message: T, writer?: BinaryWriter): BinaryWriter;
|
|
46
|
+
decode(input: BinaryReader | Uint8Array, length?: number): T;
|
|
47
|
+
fromJSON(object: any): T;
|
|
48
|
+
toJSON(message: T): unknown;
|
|
49
|
+
create<I extends Exact<DeepPartial<T>, I>>(base?: I): T;
|
|
50
|
+
fromPartial<I extends Exact<DeepPartial<T>, I>>(object: I): T;
|
|
51
|
+
}
|
|
52
|
+
export {};
|
|
@@ -0,0 +1,153 @@
|
|
|
1
|
+
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
+
// versions:
|
|
3
|
+
// protoc-gen-ts_proto v2.6.1
|
|
4
|
+
// protoc unknown
|
|
5
|
+
// source: cosmos/counter/v1/tx.proto
|
|
6
|
+
/* eslint-disable */
|
|
7
|
+
import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire";
|
|
8
|
+
export const protobufPackage = "cosmos.counter.v1";
|
|
9
|
+
function createBaseMsgIncreaseCounter() {
|
|
10
|
+
return { signer: "", count: 0 };
|
|
11
|
+
}
|
|
12
|
+
export const MsgIncreaseCounter = {
|
|
13
|
+
encode(message, writer = new BinaryWriter()) {
|
|
14
|
+
if (message.signer !== "") {
|
|
15
|
+
writer.uint32(10).string(message.signer);
|
|
16
|
+
}
|
|
17
|
+
if (message.count !== 0) {
|
|
18
|
+
writer.uint32(16).int64(message.count);
|
|
19
|
+
}
|
|
20
|
+
return writer;
|
|
21
|
+
},
|
|
22
|
+
decode(input, length) {
|
|
23
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
24
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
25
|
+
const message = createBaseMsgIncreaseCounter();
|
|
26
|
+
while (reader.pos < end) {
|
|
27
|
+
const tag = reader.uint32();
|
|
28
|
+
switch (tag >>> 3) {
|
|
29
|
+
case 1: {
|
|
30
|
+
if (tag !== 10) {
|
|
31
|
+
break;
|
|
32
|
+
}
|
|
33
|
+
message.signer = reader.string();
|
|
34
|
+
continue;
|
|
35
|
+
}
|
|
36
|
+
case 2: {
|
|
37
|
+
if (tag !== 16) {
|
|
38
|
+
break;
|
|
39
|
+
}
|
|
40
|
+
message.count = longToNumber(reader.int64());
|
|
41
|
+
continue;
|
|
42
|
+
}
|
|
43
|
+
}
|
|
44
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
45
|
+
break;
|
|
46
|
+
}
|
|
47
|
+
reader.skip(tag & 7);
|
|
48
|
+
}
|
|
49
|
+
return message;
|
|
50
|
+
},
|
|
51
|
+
fromJSON(object) {
|
|
52
|
+
return {
|
|
53
|
+
signer: isSet(object.signer) ? globalThis.String(object.signer) : "",
|
|
54
|
+
count: isSet(object.count) ? globalThis.Number(object.count) : 0,
|
|
55
|
+
};
|
|
56
|
+
},
|
|
57
|
+
toJSON(message) {
|
|
58
|
+
const obj = {};
|
|
59
|
+
if (message.signer !== "") {
|
|
60
|
+
obj.signer = message.signer;
|
|
61
|
+
}
|
|
62
|
+
if (message.count !== 0) {
|
|
63
|
+
obj.count = Math.round(message.count);
|
|
64
|
+
}
|
|
65
|
+
return obj;
|
|
66
|
+
},
|
|
67
|
+
create(base) {
|
|
68
|
+
return MsgIncreaseCounter.fromPartial(base ?? {});
|
|
69
|
+
},
|
|
70
|
+
fromPartial(object) {
|
|
71
|
+
const message = createBaseMsgIncreaseCounter();
|
|
72
|
+
message.signer = object.signer ?? "";
|
|
73
|
+
message.count = object.count ?? 0;
|
|
74
|
+
return message;
|
|
75
|
+
},
|
|
76
|
+
};
|
|
77
|
+
function createBaseMsgIncreaseCountResponse() {
|
|
78
|
+
return { newCount: 0 };
|
|
79
|
+
}
|
|
80
|
+
export const MsgIncreaseCountResponse = {
|
|
81
|
+
encode(message, writer = new BinaryWriter()) {
|
|
82
|
+
if (message.newCount !== 0) {
|
|
83
|
+
writer.uint32(8).int64(message.newCount);
|
|
84
|
+
}
|
|
85
|
+
return writer;
|
|
86
|
+
},
|
|
87
|
+
decode(input, length) {
|
|
88
|
+
const reader = input instanceof BinaryReader ? input : new BinaryReader(input);
|
|
89
|
+
let end = length === undefined ? reader.len : reader.pos + length;
|
|
90
|
+
const message = createBaseMsgIncreaseCountResponse();
|
|
91
|
+
while (reader.pos < end) {
|
|
92
|
+
const tag = reader.uint32();
|
|
93
|
+
switch (tag >>> 3) {
|
|
94
|
+
case 1: {
|
|
95
|
+
if (tag !== 8) {
|
|
96
|
+
break;
|
|
97
|
+
}
|
|
98
|
+
message.newCount = longToNumber(reader.int64());
|
|
99
|
+
continue;
|
|
100
|
+
}
|
|
101
|
+
}
|
|
102
|
+
if ((tag & 7) === 4 || tag === 0) {
|
|
103
|
+
break;
|
|
104
|
+
}
|
|
105
|
+
reader.skip(tag & 7);
|
|
106
|
+
}
|
|
107
|
+
return message;
|
|
108
|
+
},
|
|
109
|
+
fromJSON(object) {
|
|
110
|
+
return { newCount: isSet(object.newCount) ? globalThis.Number(object.newCount) : 0 };
|
|
111
|
+
},
|
|
112
|
+
toJSON(message) {
|
|
113
|
+
const obj = {};
|
|
114
|
+
if (message.newCount !== 0) {
|
|
115
|
+
obj.newCount = Math.round(message.newCount);
|
|
116
|
+
}
|
|
117
|
+
return obj;
|
|
118
|
+
},
|
|
119
|
+
create(base) {
|
|
120
|
+
return MsgIncreaseCountResponse.fromPartial(base ?? {});
|
|
121
|
+
},
|
|
122
|
+
fromPartial(object) {
|
|
123
|
+
const message = createBaseMsgIncreaseCountResponse();
|
|
124
|
+
message.newCount = object.newCount ?? 0;
|
|
125
|
+
return message;
|
|
126
|
+
},
|
|
127
|
+
};
|
|
128
|
+
export const MsgServiceName = "cosmos.counter.v1.Msg";
|
|
129
|
+
export class MsgClientImpl {
|
|
130
|
+
constructor(rpc, opts) {
|
|
131
|
+
this.service = opts?.service || MsgServiceName;
|
|
132
|
+
this.rpc = rpc;
|
|
133
|
+
this.IncreaseCount = this.IncreaseCount.bind(this);
|
|
134
|
+
}
|
|
135
|
+
IncreaseCount(request) {
|
|
136
|
+
const data = MsgIncreaseCounter.encode(request).finish();
|
|
137
|
+
const promise = this.rpc.request(this.service, "IncreaseCount", data);
|
|
138
|
+
return promise.then((data) => MsgIncreaseCountResponse.decode(new BinaryReader(data)));
|
|
139
|
+
}
|
|
140
|
+
}
|
|
141
|
+
function longToNumber(int64) {
|
|
142
|
+
const num = globalThis.Number(int64.toString());
|
|
143
|
+
if (num > globalThis.Number.MAX_SAFE_INTEGER) {
|
|
144
|
+
throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER");
|
|
145
|
+
}
|
|
146
|
+
if (num < globalThis.Number.MIN_SAFE_INTEGER) {
|
|
147
|
+
throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER");
|
|
148
|
+
}
|
|
149
|
+
return num;
|
|
150
|
+
}
|
|
151
|
+
function isSet(value) {
|
|
152
|
+
return value !== null && value !== undefined;
|
|
153
|
+
}
|