@burnt-labs/xion-types 16.0.0 → 18.0.0
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/package.json +7 -20
- package/README.md +0 -111
- package/types/.gitkeep +0 -0
- package/types/generated/amino/amino.ts +0 -9
- package/types/generated/cosmos/app/v1alpha1/config.ts +0 -336
- package/types/generated/cosmos/app/v1alpha1/query.ts +0 -265
- package/types/generated/cosmos/auth/v1beta1/auth.ts +0 -520
- package/types/generated/cosmos/auth/v1beta1/query.ts +0 -1852
- package/types/generated/cosmos/authz/v1beta1/authz.ts +0 -404
- package/types/generated/cosmos/authz/v1beta1/query.ts +0 -774
- package/types/generated/cosmos/autocli/v1/options.ts +0 -1016
- package/types/generated/cosmos/autocli/v1/query.ts +0 -379
- package/types/generated/cosmos/bank/v1beta1/bank.ts +0 -752
- package/types/generated/cosmos/bank/v1beta1/query.ts +0 -2789
- package/types/generated/cosmos/base/abci/v1beta1/abci.ts +0 -1447
- package/types/generated/cosmos/base/node/v1beta1/query.ts +0 -587
- package/types/generated/cosmos/base/query/v1beta1/pagination.ts +0 -317
- package/types/generated/cosmos/base/tendermint/v1beta1/query.ts +0 -2228
- package/types/generated/cosmos/base/tendermint/v1beta1/types.ts +0 -522
- package/types/generated/cosmos/base/v1beta1/coin.ts +0 -326
- package/types/generated/cosmos/circuit/v1/query.ts +0 -606
- package/types/generated/cosmos/circuit/v1/types.ts +0 -353
- package/types/generated/cosmos/consensus/v1/query.ts +0 -271
- package/types/generated/cosmos/crypto/multisig/v1beta1/multisig.ts +0 -212
- package/types/generated/cosmos/distribution/v1beta1/distribution.ts +0 -1143
- package/types/generated/cosmos/distribution/v1beta1/query.ts +0 -2005
- package/types/generated/cosmos/evidence/v1beta1/query.ts +0 -526
- package/types/generated/cosmos/feegrant/v1beta1/feegrant.ts +0 -502
- package/types/generated/cosmos/feegrant/v1beta1/query.ts +0 -725
- package/types/generated/cosmos/gov/v1/gov.ts +0 -1656
- package/types/generated/cosmos/gov/v1/query.ts +0 -1847
- package/types/generated/cosmos/gov/v1beta1/gov.ts +0 -1239
- package/types/generated/cosmos/gov/v1beta1/query.ts +0 -1658
- package/types/generated/cosmos/group/v1/query.ts +0 -2840
- package/types/generated/cosmos/group/v1/types.ts +0 -1803
- package/types/generated/cosmos/ics23/v1/proofs.ts +0 -1685
- package/types/generated/cosmos/mint/v1beta1/mint.ts +0 -273
- package/types/generated/cosmos/mint/v1beta1/query.ts +0 -589
- package/types/generated/cosmos/msg/v1/msg.ts +0 -9
- package/types/generated/cosmos/nft/v1beta1/nft.ts +0 -333
- package/types/generated/cosmos/nft/v1beta1/query.ts +0 -1362
- package/types/generated/cosmos/orm/query/v1alpha1/query.ts +0 -1016
- package/types/generated/cosmos/params/v1beta1/params.ts +0 -227
- package/types/generated/cosmos/params/v1beta1/query.ts +0 -545
- package/types/generated/cosmos/query/v1/query.ts +0 -9
- package/types/generated/cosmos/slashing/v1beta1/query.ts +0 -626
- package/types/generated/cosmos/slashing/v1beta1/slashing.ts +0 -409
- package/types/generated/cosmos/staking/v1beta1/query.ts +0 -2912
- package/types/generated/cosmos/staking/v1beta1/staking.ts +0 -2515
- package/types/generated/cosmos/tx/signing/v1beta1/signing.ts +0 -608
- package/types/generated/cosmos/tx/v1beta1/service.ts +0 -2111
- package/types/generated/cosmos/tx/v1beta1/tx.ts +0 -1613
- package/types/generated/cosmos/upgrade/v1beta1/query.ts +0 -1007
- package/types/generated/cosmos/upgrade/v1beta1/upgrade.ts +0 -507
- package/types/generated/cosmos_proto/cosmos.ts +0 -299
- package/types/generated/cosmwasm/wasm/v1/query.ts +0 -2984
- package/types/generated/cosmwasm/wasm/v1/types.ts +0 -962
- package/types/generated/gogoproto/gogo.ts +0 -9
- package/types/generated/google/api/annotations.ts +0 -9
- package/types/generated/google/api/http.ts +0 -757
- package/types/generated/google/protobuf/any.ts +0 -253
- package/types/generated/google/protobuf/descriptor.ts +0 -4958
- package/types/generated/google/protobuf/duration.ts +0 -186
- package/types/generated/google/protobuf/timestamp.ts +0 -215
- package/types/generated/ibc/applications/fee/v1/fee.ts +0 -391
- package/types/generated/ibc/applications/fee/v1/genesis.ts +0 -553
- package/types/generated/ibc/applications/fee/v1/query.ts +0 -2056
- package/types/generated/ibc/applications/interchain_accounts/controller/v1/controller.ts +0 -100
- package/types/generated/ibc/applications/interchain_accounts/controller/v1/query.ts +0 -447
- package/types/generated/ibc/applications/interchain_accounts/host/v1/host.ts +0 -235
- package/types/generated/ibc/applications/interchain_accounts/host/v1/query.ts +0 -265
- package/types/generated/ibc/applications/transfer/v1/query.ts +0 -1135
- package/types/generated/ibc/applications/transfer/v1/transfer.ts +0 -213
- package/types/generated/ibc/core/channel/v1/channel.ts +0 -1329
- package/types/generated/ibc/core/channel/v1/query.ts +0 -4214
- package/types/generated/ibc/core/channel/v1/upgrade.ts +0 -330
- package/types/generated/ibc/core/client/v1/client.ts +0 -726
- package/types/generated/ibc/core/client/v1/query.ts +0 -2208
- package/types/generated/ibc/core/commitment/v1/commitment.ts +0 -329
- package/types/generated/ibc/core/connection/v1/connection.ts +0 -813
- package/types/generated/ibc/core/connection/v1/query.ts +0 -1442
- package/types/generated/ibc/lightclients/wasm/v1/query.ts +0 -484
- package/types/generated/tendermint/abci/types.ts +0 -6429
- package/types/generated/tendermint/crypto/keys.ts +0 -137
- package/types/generated/tendermint/crypto/proof.ts +0 -506
- package/types/generated/tendermint/p2p/types.ts +0 -514
- package/types/generated/tendermint/types/block.ts +0 -151
- package/types/generated/tendermint/types/evidence.ts +0 -493
- package/types/generated/tendermint/types/params.ts +0 -687
- package/types/generated/tendermint/types/types.ts +0 -2069
- package/types/generated/tendermint/types/validator.ts +0 -409
- package/types/generated/tendermint/version/types.ts +0 -202
- package/types/generated/xion/globalfee/v1/genesis.ts +0 -219
- package/types/generated/xion/globalfee/v1/query.ts +0 -269
- package/types/generated/xion/jwk/v1/audience.ts +0 -188
- package/types/generated/xion/jwk/v1/params.ts +0 -118
- package/types/generated/xion/jwk/v1/query.ts +0 -1061
- package/types/generated/xion/mint/v1/mint.ts +0 -273
- package/types/generated/xion/mint/v1/query.ts +0 -589
- package/types/generated/xion/v1/query.ts +0 -878
|
@@ -1,962 +0,0 @@
|
|
|
1
|
-
// Code generated by protoc-gen-ts_proto. DO NOT EDIT.
|
|
2
|
-
// versions:
|
|
3
|
-
// protoc-gen-ts_proto v1.181.2
|
|
4
|
-
// protoc unknown
|
|
5
|
-
// source: cosmwasm/wasm/v1/types.proto
|
|
6
|
-
|
|
7
|
-
/* eslint-disable */
|
|
8
|
-
import Long from "long";
|
|
9
|
-
import _m0 from "protobufjs/minimal";
|
|
10
|
-
import { Any } from "../../../google/protobuf/any";
|
|
11
|
-
|
|
12
|
-
export const protobufPackage = "cosmwasm.wasm.v1";
|
|
13
|
-
|
|
14
|
-
/** AccessType permission types */
|
|
15
|
-
export enum AccessType {
|
|
16
|
-
/** ACCESS_TYPE_UNSPECIFIED - AccessTypeUnspecified placeholder for empty value */
|
|
17
|
-
ACCESS_TYPE_UNSPECIFIED = 0,
|
|
18
|
-
/** ACCESS_TYPE_NOBODY - AccessTypeNobody forbidden */
|
|
19
|
-
ACCESS_TYPE_NOBODY = 1,
|
|
20
|
-
/** ACCESS_TYPE_EVERYBODY - AccessTypeEverybody unrestricted */
|
|
21
|
-
ACCESS_TYPE_EVERYBODY = 3,
|
|
22
|
-
/** ACCESS_TYPE_ANY_OF_ADDRESSES - AccessTypeAnyOfAddresses allow any of the addresses */
|
|
23
|
-
ACCESS_TYPE_ANY_OF_ADDRESSES = 4,
|
|
24
|
-
UNRECOGNIZED = -1,
|
|
25
|
-
}
|
|
26
|
-
|
|
27
|
-
export function accessTypeFromJSON(object: any): AccessType {
|
|
28
|
-
switch (object) {
|
|
29
|
-
case 0:
|
|
30
|
-
case "ACCESS_TYPE_UNSPECIFIED":
|
|
31
|
-
return AccessType.ACCESS_TYPE_UNSPECIFIED;
|
|
32
|
-
case 1:
|
|
33
|
-
case "ACCESS_TYPE_NOBODY":
|
|
34
|
-
return AccessType.ACCESS_TYPE_NOBODY;
|
|
35
|
-
case 3:
|
|
36
|
-
case "ACCESS_TYPE_EVERYBODY":
|
|
37
|
-
return AccessType.ACCESS_TYPE_EVERYBODY;
|
|
38
|
-
case 4:
|
|
39
|
-
case "ACCESS_TYPE_ANY_OF_ADDRESSES":
|
|
40
|
-
return AccessType.ACCESS_TYPE_ANY_OF_ADDRESSES;
|
|
41
|
-
case -1:
|
|
42
|
-
case "UNRECOGNIZED":
|
|
43
|
-
default:
|
|
44
|
-
return AccessType.UNRECOGNIZED;
|
|
45
|
-
}
|
|
46
|
-
}
|
|
47
|
-
|
|
48
|
-
export function accessTypeToJSON(object: AccessType): string {
|
|
49
|
-
switch (object) {
|
|
50
|
-
case AccessType.ACCESS_TYPE_UNSPECIFIED:
|
|
51
|
-
return "ACCESS_TYPE_UNSPECIFIED";
|
|
52
|
-
case AccessType.ACCESS_TYPE_NOBODY:
|
|
53
|
-
return "ACCESS_TYPE_NOBODY";
|
|
54
|
-
case AccessType.ACCESS_TYPE_EVERYBODY:
|
|
55
|
-
return "ACCESS_TYPE_EVERYBODY";
|
|
56
|
-
case AccessType.ACCESS_TYPE_ANY_OF_ADDRESSES:
|
|
57
|
-
return "ACCESS_TYPE_ANY_OF_ADDRESSES";
|
|
58
|
-
case AccessType.UNRECOGNIZED:
|
|
59
|
-
default:
|
|
60
|
-
return "UNRECOGNIZED";
|
|
61
|
-
}
|
|
62
|
-
}
|
|
63
|
-
|
|
64
|
-
/** ContractCodeHistoryOperationType actions that caused a code change */
|
|
65
|
-
export enum ContractCodeHistoryOperationType {
|
|
66
|
-
/** CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED - ContractCodeHistoryOperationTypeUnspecified placeholder for empty value */
|
|
67
|
-
CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED = 0,
|
|
68
|
-
/** CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT - ContractCodeHistoryOperationTypeInit on chain contract instantiation */
|
|
69
|
-
CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT = 1,
|
|
70
|
-
/** CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE - ContractCodeHistoryOperationTypeMigrate code migration */
|
|
71
|
-
CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE = 2,
|
|
72
|
-
/** CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS - ContractCodeHistoryOperationTypeGenesis based on genesis data */
|
|
73
|
-
CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS = 3,
|
|
74
|
-
UNRECOGNIZED = -1,
|
|
75
|
-
}
|
|
76
|
-
|
|
77
|
-
export function contractCodeHistoryOperationTypeFromJSON(object: any): ContractCodeHistoryOperationType {
|
|
78
|
-
switch (object) {
|
|
79
|
-
case 0:
|
|
80
|
-
case "CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED":
|
|
81
|
-
return ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED;
|
|
82
|
-
case 1:
|
|
83
|
-
case "CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT":
|
|
84
|
-
return ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT;
|
|
85
|
-
case 2:
|
|
86
|
-
case "CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE":
|
|
87
|
-
return ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE;
|
|
88
|
-
case 3:
|
|
89
|
-
case "CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS":
|
|
90
|
-
return ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS;
|
|
91
|
-
case -1:
|
|
92
|
-
case "UNRECOGNIZED":
|
|
93
|
-
default:
|
|
94
|
-
return ContractCodeHistoryOperationType.UNRECOGNIZED;
|
|
95
|
-
}
|
|
96
|
-
}
|
|
97
|
-
|
|
98
|
-
export function contractCodeHistoryOperationTypeToJSON(object: ContractCodeHistoryOperationType): string {
|
|
99
|
-
switch (object) {
|
|
100
|
-
case ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED:
|
|
101
|
-
return "CONTRACT_CODE_HISTORY_OPERATION_TYPE_UNSPECIFIED";
|
|
102
|
-
case ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT:
|
|
103
|
-
return "CONTRACT_CODE_HISTORY_OPERATION_TYPE_INIT";
|
|
104
|
-
case ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE:
|
|
105
|
-
return "CONTRACT_CODE_HISTORY_OPERATION_TYPE_MIGRATE";
|
|
106
|
-
case ContractCodeHistoryOperationType.CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS:
|
|
107
|
-
return "CONTRACT_CODE_HISTORY_OPERATION_TYPE_GENESIS";
|
|
108
|
-
case ContractCodeHistoryOperationType.UNRECOGNIZED:
|
|
109
|
-
default:
|
|
110
|
-
return "UNRECOGNIZED";
|
|
111
|
-
}
|
|
112
|
-
}
|
|
113
|
-
|
|
114
|
-
/** AccessTypeParam */
|
|
115
|
-
export interface AccessTypeParam {
|
|
116
|
-
value: AccessType;
|
|
117
|
-
}
|
|
118
|
-
|
|
119
|
-
/** AccessConfig access control type. */
|
|
120
|
-
export interface AccessConfig {
|
|
121
|
-
permission: AccessType;
|
|
122
|
-
addresses: string[];
|
|
123
|
-
}
|
|
124
|
-
|
|
125
|
-
/** Params defines the set of wasm parameters. */
|
|
126
|
-
export interface Params {
|
|
127
|
-
codeUploadAccess?: AccessConfig | undefined;
|
|
128
|
-
instantiateDefaultPermission: AccessType;
|
|
129
|
-
}
|
|
130
|
-
|
|
131
|
-
/** CodeInfo is data for the uploaded contract WASM code */
|
|
132
|
-
export interface CodeInfo {
|
|
133
|
-
/** CodeHash is the unique identifier created by wasmvm */
|
|
134
|
-
codeHash: Uint8Array;
|
|
135
|
-
/** Creator address who initially stored the code */
|
|
136
|
-
creator: string;
|
|
137
|
-
/** InstantiateConfig access control to apply on contract creation, optional */
|
|
138
|
-
instantiateConfig?: AccessConfig | undefined;
|
|
139
|
-
}
|
|
140
|
-
|
|
141
|
-
/** ContractInfo stores a WASM contract instance */
|
|
142
|
-
export interface ContractInfo {
|
|
143
|
-
/** CodeID is the reference to the stored Wasm code */
|
|
144
|
-
codeId: Long;
|
|
145
|
-
/** Creator address who initially instantiated the contract */
|
|
146
|
-
creator: string;
|
|
147
|
-
/** Admin is an optional address that can execute migrations */
|
|
148
|
-
admin: string;
|
|
149
|
-
/** Label is optional metadata to be stored with a contract instance. */
|
|
150
|
-
label: string;
|
|
151
|
-
/** Created Tx position when the contract was instantiated. */
|
|
152
|
-
created?: AbsoluteTxPosition | undefined;
|
|
153
|
-
ibcPortId: string;
|
|
154
|
-
/**
|
|
155
|
-
* Extension is an extension point to store custom metadata within the
|
|
156
|
-
* persistence model.
|
|
157
|
-
*/
|
|
158
|
-
extension?: Any | undefined;
|
|
159
|
-
}
|
|
160
|
-
|
|
161
|
-
/** ContractCodeHistoryEntry metadata to a contract. */
|
|
162
|
-
export interface ContractCodeHistoryEntry {
|
|
163
|
-
operation: ContractCodeHistoryOperationType;
|
|
164
|
-
/** CodeID is the reference to the stored WASM code */
|
|
165
|
-
codeId: Long;
|
|
166
|
-
/** Updated Tx position when the operation was executed. */
|
|
167
|
-
updated?: AbsoluteTxPosition | undefined;
|
|
168
|
-
msg: Uint8Array;
|
|
169
|
-
}
|
|
170
|
-
|
|
171
|
-
/**
|
|
172
|
-
* AbsoluteTxPosition is a unique transaction position that allows for global
|
|
173
|
-
* ordering of transactions.
|
|
174
|
-
*/
|
|
175
|
-
export interface AbsoluteTxPosition {
|
|
176
|
-
/** BlockHeight is the block the contract was created at */
|
|
177
|
-
blockHeight: Long;
|
|
178
|
-
/**
|
|
179
|
-
* TxIndex is a monotonic counter within the block (actual transaction index,
|
|
180
|
-
* or gas consumed)
|
|
181
|
-
*/
|
|
182
|
-
txIndex: Long;
|
|
183
|
-
}
|
|
184
|
-
|
|
185
|
-
/** Model is a struct that holds a KV pair */
|
|
186
|
-
export interface Model {
|
|
187
|
-
/** hex-encode key to read it better (this is often ascii) */
|
|
188
|
-
key: Uint8Array;
|
|
189
|
-
/** base64-encode raw value */
|
|
190
|
-
value: Uint8Array;
|
|
191
|
-
}
|
|
192
|
-
|
|
193
|
-
function createBaseAccessTypeParam(): AccessTypeParam {
|
|
194
|
-
return { value: 0 };
|
|
195
|
-
}
|
|
196
|
-
|
|
197
|
-
export const AccessTypeParam = {
|
|
198
|
-
encode(message: AccessTypeParam, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
199
|
-
if (message.value !== 0) {
|
|
200
|
-
writer.uint32(8).int32(message.value);
|
|
201
|
-
}
|
|
202
|
-
return writer;
|
|
203
|
-
},
|
|
204
|
-
|
|
205
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): AccessTypeParam {
|
|
206
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
207
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
208
|
-
const message = createBaseAccessTypeParam();
|
|
209
|
-
while (reader.pos < end) {
|
|
210
|
-
const tag = reader.uint32();
|
|
211
|
-
switch (tag >>> 3) {
|
|
212
|
-
case 1:
|
|
213
|
-
if (tag !== 8) {
|
|
214
|
-
break;
|
|
215
|
-
}
|
|
216
|
-
|
|
217
|
-
message.value = reader.int32() as any;
|
|
218
|
-
continue;
|
|
219
|
-
}
|
|
220
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
221
|
-
break;
|
|
222
|
-
}
|
|
223
|
-
reader.skipType(tag & 7);
|
|
224
|
-
}
|
|
225
|
-
return message;
|
|
226
|
-
},
|
|
227
|
-
|
|
228
|
-
fromJSON(object: any): AccessTypeParam {
|
|
229
|
-
return { value: isSet(object.value) ? accessTypeFromJSON(object.value) : 0 };
|
|
230
|
-
},
|
|
231
|
-
|
|
232
|
-
toJSON(message: AccessTypeParam): unknown {
|
|
233
|
-
const obj: any = {};
|
|
234
|
-
if (message.value !== 0) {
|
|
235
|
-
obj.value = accessTypeToJSON(message.value);
|
|
236
|
-
}
|
|
237
|
-
return obj;
|
|
238
|
-
},
|
|
239
|
-
|
|
240
|
-
create<I extends Exact<DeepPartial<AccessTypeParam>, I>>(base?: I): AccessTypeParam {
|
|
241
|
-
return AccessTypeParam.fromPartial(base ?? ({} as any));
|
|
242
|
-
},
|
|
243
|
-
fromPartial<I extends Exact<DeepPartial<AccessTypeParam>, I>>(object: I): AccessTypeParam {
|
|
244
|
-
const message = createBaseAccessTypeParam();
|
|
245
|
-
message.value = object.value ?? 0;
|
|
246
|
-
return message;
|
|
247
|
-
},
|
|
248
|
-
};
|
|
249
|
-
|
|
250
|
-
function createBaseAccessConfig(): AccessConfig {
|
|
251
|
-
return { permission: 0, addresses: [] };
|
|
252
|
-
}
|
|
253
|
-
|
|
254
|
-
export const AccessConfig = {
|
|
255
|
-
encode(message: AccessConfig, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
256
|
-
if (message.permission !== 0) {
|
|
257
|
-
writer.uint32(8).int32(message.permission);
|
|
258
|
-
}
|
|
259
|
-
for (const v of message.addresses) {
|
|
260
|
-
writer.uint32(26).string(v!);
|
|
261
|
-
}
|
|
262
|
-
return writer;
|
|
263
|
-
},
|
|
264
|
-
|
|
265
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): AccessConfig {
|
|
266
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
267
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
268
|
-
const message = createBaseAccessConfig();
|
|
269
|
-
while (reader.pos < end) {
|
|
270
|
-
const tag = reader.uint32();
|
|
271
|
-
switch (tag >>> 3) {
|
|
272
|
-
case 1:
|
|
273
|
-
if (tag !== 8) {
|
|
274
|
-
break;
|
|
275
|
-
}
|
|
276
|
-
|
|
277
|
-
message.permission = reader.int32() as any;
|
|
278
|
-
continue;
|
|
279
|
-
case 3:
|
|
280
|
-
if (tag !== 26) {
|
|
281
|
-
break;
|
|
282
|
-
}
|
|
283
|
-
|
|
284
|
-
message.addresses.push(reader.string());
|
|
285
|
-
continue;
|
|
286
|
-
}
|
|
287
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
288
|
-
break;
|
|
289
|
-
}
|
|
290
|
-
reader.skipType(tag & 7);
|
|
291
|
-
}
|
|
292
|
-
return message;
|
|
293
|
-
},
|
|
294
|
-
|
|
295
|
-
fromJSON(object: any): AccessConfig {
|
|
296
|
-
return {
|
|
297
|
-
permission: isSet(object.permission) ? accessTypeFromJSON(object.permission) : 0,
|
|
298
|
-
addresses: globalThis.Array.isArray(object?.addresses)
|
|
299
|
-
? object.addresses.map((e: any) => globalThis.String(e))
|
|
300
|
-
: [],
|
|
301
|
-
};
|
|
302
|
-
},
|
|
303
|
-
|
|
304
|
-
toJSON(message: AccessConfig): unknown {
|
|
305
|
-
const obj: any = {};
|
|
306
|
-
if (message.permission !== 0) {
|
|
307
|
-
obj.permission = accessTypeToJSON(message.permission);
|
|
308
|
-
}
|
|
309
|
-
if (message.addresses?.length) {
|
|
310
|
-
obj.addresses = message.addresses;
|
|
311
|
-
}
|
|
312
|
-
return obj;
|
|
313
|
-
},
|
|
314
|
-
|
|
315
|
-
create<I extends Exact<DeepPartial<AccessConfig>, I>>(base?: I): AccessConfig {
|
|
316
|
-
return AccessConfig.fromPartial(base ?? ({} as any));
|
|
317
|
-
},
|
|
318
|
-
fromPartial<I extends Exact<DeepPartial<AccessConfig>, I>>(object: I): AccessConfig {
|
|
319
|
-
const message = createBaseAccessConfig();
|
|
320
|
-
message.permission = object.permission ?? 0;
|
|
321
|
-
message.addresses = object.addresses?.map((e) => e) || [];
|
|
322
|
-
return message;
|
|
323
|
-
},
|
|
324
|
-
};
|
|
325
|
-
|
|
326
|
-
function createBaseParams(): Params {
|
|
327
|
-
return { codeUploadAccess: undefined, instantiateDefaultPermission: 0 };
|
|
328
|
-
}
|
|
329
|
-
|
|
330
|
-
export const Params = {
|
|
331
|
-
encode(message: Params, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
332
|
-
if (message.codeUploadAccess !== undefined) {
|
|
333
|
-
AccessConfig.encode(message.codeUploadAccess, writer.uint32(10).fork()).ldelim();
|
|
334
|
-
}
|
|
335
|
-
if (message.instantiateDefaultPermission !== 0) {
|
|
336
|
-
writer.uint32(16).int32(message.instantiateDefaultPermission);
|
|
337
|
-
}
|
|
338
|
-
return writer;
|
|
339
|
-
},
|
|
340
|
-
|
|
341
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): Params {
|
|
342
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
343
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
344
|
-
const message = createBaseParams();
|
|
345
|
-
while (reader.pos < end) {
|
|
346
|
-
const tag = reader.uint32();
|
|
347
|
-
switch (tag >>> 3) {
|
|
348
|
-
case 1:
|
|
349
|
-
if (tag !== 10) {
|
|
350
|
-
break;
|
|
351
|
-
}
|
|
352
|
-
|
|
353
|
-
message.codeUploadAccess = AccessConfig.decode(reader, reader.uint32());
|
|
354
|
-
continue;
|
|
355
|
-
case 2:
|
|
356
|
-
if (tag !== 16) {
|
|
357
|
-
break;
|
|
358
|
-
}
|
|
359
|
-
|
|
360
|
-
message.instantiateDefaultPermission = reader.int32() as any;
|
|
361
|
-
continue;
|
|
362
|
-
}
|
|
363
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
364
|
-
break;
|
|
365
|
-
}
|
|
366
|
-
reader.skipType(tag & 7);
|
|
367
|
-
}
|
|
368
|
-
return message;
|
|
369
|
-
},
|
|
370
|
-
|
|
371
|
-
fromJSON(object: any): Params {
|
|
372
|
-
return {
|
|
373
|
-
codeUploadAccess: isSet(object.codeUploadAccess) ? AccessConfig.fromJSON(object.codeUploadAccess) : undefined,
|
|
374
|
-
instantiateDefaultPermission: isSet(object.instantiateDefaultPermission)
|
|
375
|
-
? accessTypeFromJSON(object.instantiateDefaultPermission)
|
|
376
|
-
: 0,
|
|
377
|
-
};
|
|
378
|
-
},
|
|
379
|
-
|
|
380
|
-
toJSON(message: Params): unknown {
|
|
381
|
-
const obj: any = {};
|
|
382
|
-
if (message.codeUploadAccess !== undefined) {
|
|
383
|
-
obj.codeUploadAccess = AccessConfig.toJSON(message.codeUploadAccess);
|
|
384
|
-
}
|
|
385
|
-
if (message.instantiateDefaultPermission !== 0) {
|
|
386
|
-
obj.instantiateDefaultPermission = accessTypeToJSON(message.instantiateDefaultPermission);
|
|
387
|
-
}
|
|
388
|
-
return obj;
|
|
389
|
-
},
|
|
390
|
-
|
|
391
|
-
create<I extends Exact<DeepPartial<Params>, I>>(base?: I): Params {
|
|
392
|
-
return Params.fromPartial(base ?? ({} as any));
|
|
393
|
-
},
|
|
394
|
-
fromPartial<I extends Exact<DeepPartial<Params>, I>>(object: I): Params {
|
|
395
|
-
const message = createBaseParams();
|
|
396
|
-
message.codeUploadAccess = (object.codeUploadAccess !== undefined && object.codeUploadAccess !== null)
|
|
397
|
-
? AccessConfig.fromPartial(object.codeUploadAccess)
|
|
398
|
-
: undefined;
|
|
399
|
-
message.instantiateDefaultPermission = object.instantiateDefaultPermission ?? 0;
|
|
400
|
-
return message;
|
|
401
|
-
},
|
|
402
|
-
};
|
|
403
|
-
|
|
404
|
-
function createBaseCodeInfo(): CodeInfo {
|
|
405
|
-
return { codeHash: new Uint8Array(0), creator: "", instantiateConfig: undefined };
|
|
406
|
-
}
|
|
407
|
-
|
|
408
|
-
export const CodeInfo = {
|
|
409
|
-
encode(message: CodeInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
410
|
-
if (message.codeHash.length !== 0) {
|
|
411
|
-
writer.uint32(10).bytes(message.codeHash);
|
|
412
|
-
}
|
|
413
|
-
if (message.creator !== "") {
|
|
414
|
-
writer.uint32(18).string(message.creator);
|
|
415
|
-
}
|
|
416
|
-
if (message.instantiateConfig !== undefined) {
|
|
417
|
-
AccessConfig.encode(message.instantiateConfig, writer.uint32(42).fork()).ldelim();
|
|
418
|
-
}
|
|
419
|
-
return writer;
|
|
420
|
-
},
|
|
421
|
-
|
|
422
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): CodeInfo {
|
|
423
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
424
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
425
|
-
const message = createBaseCodeInfo();
|
|
426
|
-
while (reader.pos < end) {
|
|
427
|
-
const tag = reader.uint32();
|
|
428
|
-
switch (tag >>> 3) {
|
|
429
|
-
case 1:
|
|
430
|
-
if (tag !== 10) {
|
|
431
|
-
break;
|
|
432
|
-
}
|
|
433
|
-
|
|
434
|
-
message.codeHash = reader.bytes();
|
|
435
|
-
continue;
|
|
436
|
-
case 2:
|
|
437
|
-
if (tag !== 18) {
|
|
438
|
-
break;
|
|
439
|
-
}
|
|
440
|
-
|
|
441
|
-
message.creator = reader.string();
|
|
442
|
-
continue;
|
|
443
|
-
case 5:
|
|
444
|
-
if (tag !== 42) {
|
|
445
|
-
break;
|
|
446
|
-
}
|
|
447
|
-
|
|
448
|
-
message.instantiateConfig = AccessConfig.decode(reader, reader.uint32());
|
|
449
|
-
continue;
|
|
450
|
-
}
|
|
451
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
452
|
-
break;
|
|
453
|
-
}
|
|
454
|
-
reader.skipType(tag & 7);
|
|
455
|
-
}
|
|
456
|
-
return message;
|
|
457
|
-
},
|
|
458
|
-
|
|
459
|
-
fromJSON(object: any): CodeInfo {
|
|
460
|
-
return {
|
|
461
|
-
codeHash: isSet(object.codeHash) ? bytesFromBase64(object.codeHash) : new Uint8Array(0),
|
|
462
|
-
creator: isSet(object.creator) ? globalThis.String(object.creator) : "",
|
|
463
|
-
instantiateConfig: isSet(object.instantiateConfig) ? AccessConfig.fromJSON(object.instantiateConfig) : undefined,
|
|
464
|
-
};
|
|
465
|
-
},
|
|
466
|
-
|
|
467
|
-
toJSON(message: CodeInfo): unknown {
|
|
468
|
-
const obj: any = {};
|
|
469
|
-
if (message.codeHash.length !== 0) {
|
|
470
|
-
obj.codeHash = base64FromBytes(message.codeHash);
|
|
471
|
-
}
|
|
472
|
-
if (message.creator !== "") {
|
|
473
|
-
obj.creator = message.creator;
|
|
474
|
-
}
|
|
475
|
-
if (message.instantiateConfig !== undefined) {
|
|
476
|
-
obj.instantiateConfig = AccessConfig.toJSON(message.instantiateConfig);
|
|
477
|
-
}
|
|
478
|
-
return obj;
|
|
479
|
-
},
|
|
480
|
-
|
|
481
|
-
create<I extends Exact<DeepPartial<CodeInfo>, I>>(base?: I): CodeInfo {
|
|
482
|
-
return CodeInfo.fromPartial(base ?? ({} as any));
|
|
483
|
-
},
|
|
484
|
-
fromPartial<I extends Exact<DeepPartial<CodeInfo>, I>>(object: I): CodeInfo {
|
|
485
|
-
const message = createBaseCodeInfo();
|
|
486
|
-
message.codeHash = object.codeHash ?? new Uint8Array(0);
|
|
487
|
-
message.creator = object.creator ?? "";
|
|
488
|
-
message.instantiateConfig = (object.instantiateConfig !== undefined && object.instantiateConfig !== null)
|
|
489
|
-
? AccessConfig.fromPartial(object.instantiateConfig)
|
|
490
|
-
: undefined;
|
|
491
|
-
return message;
|
|
492
|
-
},
|
|
493
|
-
};
|
|
494
|
-
|
|
495
|
-
function createBaseContractInfo(): ContractInfo {
|
|
496
|
-
return {
|
|
497
|
-
codeId: Long.UZERO,
|
|
498
|
-
creator: "",
|
|
499
|
-
admin: "",
|
|
500
|
-
label: "",
|
|
501
|
-
created: undefined,
|
|
502
|
-
ibcPortId: "",
|
|
503
|
-
extension: undefined,
|
|
504
|
-
};
|
|
505
|
-
}
|
|
506
|
-
|
|
507
|
-
export const ContractInfo = {
|
|
508
|
-
encode(message: ContractInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
509
|
-
if (!message.codeId.equals(Long.UZERO)) {
|
|
510
|
-
writer.uint32(8).uint64(message.codeId);
|
|
511
|
-
}
|
|
512
|
-
if (message.creator !== "") {
|
|
513
|
-
writer.uint32(18).string(message.creator);
|
|
514
|
-
}
|
|
515
|
-
if (message.admin !== "") {
|
|
516
|
-
writer.uint32(26).string(message.admin);
|
|
517
|
-
}
|
|
518
|
-
if (message.label !== "") {
|
|
519
|
-
writer.uint32(34).string(message.label);
|
|
520
|
-
}
|
|
521
|
-
if (message.created !== undefined) {
|
|
522
|
-
AbsoluteTxPosition.encode(message.created, writer.uint32(42).fork()).ldelim();
|
|
523
|
-
}
|
|
524
|
-
if (message.ibcPortId !== "") {
|
|
525
|
-
writer.uint32(50).string(message.ibcPortId);
|
|
526
|
-
}
|
|
527
|
-
if (message.extension !== undefined) {
|
|
528
|
-
Any.encode(message.extension, writer.uint32(58).fork()).ldelim();
|
|
529
|
-
}
|
|
530
|
-
return writer;
|
|
531
|
-
},
|
|
532
|
-
|
|
533
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): ContractInfo {
|
|
534
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
535
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
536
|
-
const message = createBaseContractInfo();
|
|
537
|
-
while (reader.pos < end) {
|
|
538
|
-
const tag = reader.uint32();
|
|
539
|
-
switch (tag >>> 3) {
|
|
540
|
-
case 1:
|
|
541
|
-
if (tag !== 8) {
|
|
542
|
-
break;
|
|
543
|
-
}
|
|
544
|
-
|
|
545
|
-
message.codeId = reader.uint64() as Long;
|
|
546
|
-
continue;
|
|
547
|
-
case 2:
|
|
548
|
-
if (tag !== 18) {
|
|
549
|
-
break;
|
|
550
|
-
}
|
|
551
|
-
|
|
552
|
-
message.creator = reader.string();
|
|
553
|
-
continue;
|
|
554
|
-
case 3:
|
|
555
|
-
if (tag !== 26) {
|
|
556
|
-
break;
|
|
557
|
-
}
|
|
558
|
-
|
|
559
|
-
message.admin = reader.string();
|
|
560
|
-
continue;
|
|
561
|
-
case 4:
|
|
562
|
-
if (tag !== 34) {
|
|
563
|
-
break;
|
|
564
|
-
}
|
|
565
|
-
|
|
566
|
-
message.label = reader.string();
|
|
567
|
-
continue;
|
|
568
|
-
case 5:
|
|
569
|
-
if (tag !== 42) {
|
|
570
|
-
break;
|
|
571
|
-
}
|
|
572
|
-
|
|
573
|
-
message.created = AbsoluteTxPosition.decode(reader, reader.uint32());
|
|
574
|
-
continue;
|
|
575
|
-
case 6:
|
|
576
|
-
if (tag !== 50) {
|
|
577
|
-
break;
|
|
578
|
-
}
|
|
579
|
-
|
|
580
|
-
message.ibcPortId = reader.string();
|
|
581
|
-
continue;
|
|
582
|
-
case 7:
|
|
583
|
-
if (tag !== 58) {
|
|
584
|
-
break;
|
|
585
|
-
}
|
|
586
|
-
|
|
587
|
-
message.extension = Any.decode(reader, reader.uint32());
|
|
588
|
-
continue;
|
|
589
|
-
}
|
|
590
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
591
|
-
break;
|
|
592
|
-
}
|
|
593
|
-
reader.skipType(tag & 7);
|
|
594
|
-
}
|
|
595
|
-
return message;
|
|
596
|
-
},
|
|
597
|
-
|
|
598
|
-
fromJSON(object: any): ContractInfo {
|
|
599
|
-
return {
|
|
600
|
-
codeId: isSet(object.codeId) ? Long.fromValue(object.codeId) : Long.UZERO,
|
|
601
|
-
creator: isSet(object.creator) ? globalThis.String(object.creator) : "",
|
|
602
|
-
admin: isSet(object.admin) ? globalThis.String(object.admin) : "",
|
|
603
|
-
label: isSet(object.label) ? globalThis.String(object.label) : "",
|
|
604
|
-
created: isSet(object.created) ? AbsoluteTxPosition.fromJSON(object.created) : undefined,
|
|
605
|
-
ibcPortId: isSet(object.ibcPortId) ? globalThis.String(object.ibcPortId) : "",
|
|
606
|
-
extension: isSet(object.extension) ? Any.fromJSON(object.extension) : undefined,
|
|
607
|
-
};
|
|
608
|
-
},
|
|
609
|
-
|
|
610
|
-
toJSON(message: ContractInfo): unknown {
|
|
611
|
-
const obj: any = {};
|
|
612
|
-
if (!message.codeId.equals(Long.UZERO)) {
|
|
613
|
-
obj.codeId = (message.codeId || Long.UZERO).toString();
|
|
614
|
-
}
|
|
615
|
-
if (message.creator !== "") {
|
|
616
|
-
obj.creator = message.creator;
|
|
617
|
-
}
|
|
618
|
-
if (message.admin !== "") {
|
|
619
|
-
obj.admin = message.admin;
|
|
620
|
-
}
|
|
621
|
-
if (message.label !== "") {
|
|
622
|
-
obj.label = message.label;
|
|
623
|
-
}
|
|
624
|
-
if (message.created !== undefined) {
|
|
625
|
-
obj.created = AbsoluteTxPosition.toJSON(message.created);
|
|
626
|
-
}
|
|
627
|
-
if (message.ibcPortId !== "") {
|
|
628
|
-
obj.ibcPortId = message.ibcPortId;
|
|
629
|
-
}
|
|
630
|
-
if (message.extension !== undefined) {
|
|
631
|
-
obj.extension = Any.toJSON(message.extension);
|
|
632
|
-
}
|
|
633
|
-
return obj;
|
|
634
|
-
},
|
|
635
|
-
|
|
636
|
-
create<I extends Exact<DeepPartial<ContractInfo>, I>>(base?: I): ContractInfo {
|
|
637
|
-
return ContractInfo.fromPartial(base ?? ({} as any));
|
|
638
|
-
},
|
|
639
|
-
fromPartial<I extends Exact<DeepPartial<ContractInfo>, I>>(object: I): ContractInfo {
|
|
640
|
-
const message = createBaseContractInfo();
|
|
641
|
-
message.codeId = (object.codeId !== undefined && object.codeId !== null)
|
|
642
|
-
? Long.fromValue(object.codeId)
|
|
643
|
-
: Long.UZERO;
|
|
644
|
-
message.creator = object.creator ?? "";
|
|
645
|
-
message.admin = object.admin ?? "";
|
|
646
|
-
message.label = object.label ?? "";
|
|
647
|
-
message.created = (object.created !== undefined && object.created !== null)
|
|
648
|
-
? AbsoluteTxPosition.fromPartial(object.created)
|
|
649
|
-
: undefined;
|
|
650
|
-
message.ibcPortId = object.ibcPortId ?? "";
|
|
651
|
-
message.extension = (object.extension !== undefined && object.extension !== null)
|
|
652
|
-
? Any.fromPartial(object.extension)
|
|
653
|
-
: undefined;
|
|
654
|
-
return message;
|
|
655
|
-
},
|
|
656
|
-
};
|
|
657
|
-
|
|
658
|
-
function createBaseContractCodeHistoryEntry(): ContractCodeHistoryEntry {
|
|
659
|
-
return { operation: 0, codeId: Long.UZERO, updated: undefined, msg: new Uint8Array(0) };
|
|
660
|
-
}
|
|
661
|
-
|
|
662
|
-
export const ContractCodeHistoryEntry = {
|
|
663
|
-
encode(message: ContractCodeHistoryEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
664
|
-
if (message.operation !== 0) {
|
|
665
|
-
writer.uint32(8).int32(message.operation);
|
|
666
|
-
}
|
|
667
|
-
if (!message.codeId.equals(Long.UZERO)) {
|
|
668
|
-
writer.uint32(16).uint64(message.codeId);
|
|
669
|
-
}
|
|
670
|
-
if (message.updated !== undefined) {
|
|
671
|
-
AbsoluteTxPosition.encode(message.updated, writer.uint32(26).fork()).ldelim();
|
|
672
|
-
}
|
|
673
|
-
if (message.msg.length !== 0) {
|
|
674
|
-
writer.uint32(34).bytes(message.msg);
|
|
675
|
-
}
|
|
676
|
-
return writer;
|
|
677
|
-
},
|
|
678
|
-
|
|
679
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): ContractCodeHistoryEntry {
|
|
680
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
681
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
682
|
-
const message = createBaseContractCodeHistoryEntry();
|
|
683
|
-
while (reader.pos < end) {
|
|
684
|
-
const tag = reader.uint32();
|
|
685
|
-
switch (tag >>> 3) {
|
|
686
|
-
case 1:
|
|
687
|
-
if (tag !== 8) {
|
|
688
|
-
break;
|
|
689
|
-
}
|
|
690
|
-
|
|
691
|
-
message.operation = reader.int32() as any;
|
|
692
|
-
continue;
|
|
693
|
-
case 2:
|
|
694
|
-
if (tag !== 16) {
|
|
695
|
-
break;
|
|
696
|
-
}
|
|
697
|
-
|
|
698
|
-
message.codeId = reader.uint64() as Long;
|
|
699
|
-
continue;
|
|
700
|
-
case 3:
|
|
701
|
-
if (tag !== 26) {
|
|
702
|
-
break;
|
|
703
|
-
}
|
|
704
|
-
|
|
705
|
-
message.updated = AbsoluteTxPosition.decode(reader, reader.uint32());
|
|
706
|
-
continue;
|
|
707
|
-
case 4:
|
|
708
|
-
if (tag !== 34) {
|
|
709
|
-
break;
|
|
710
|
-
}
|
|
711
|
-
|
|
712
|
-
message.msg = reader.bytes();
|
|
713
|
-
continue;
|
|
714
|
-
}
|
|
715
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
716
|
-
break;
|
|
717
|
-
}
|
|
718
|
-
reader.skipType(tag & 7);
|
|
719
|
-
}
|
|
720
|
-
return message;
|
|
721
|
-
},
|
|
722
|
-
|
|
723
|
-
fromJSON(object: any): ContractCodeHistoryEntry {
|
|
724
|
-
return {
|
|
725
|
-
operation: isSet(object.operation) ? contractCodeHistoryOperationTypeFromJSON(object.operation) : 0,
|
|
726
|
-
codeId: isSet(object.codeId) ? Long.fromValue(object.codeId) : Long.UZERO,
|
|
727
|
-
updated: isSet(object.updated) ? AbsoluteTxPosition.fromJSON(object.updated) : undefined,
|
|
728
|
-
msg: isSet(object.msg) ? bytesFromBase64(object.msg) : new Uint8Array(0),
|
|
729
|
-
};
|
|
730
|
-
},
|
|
731
|
-
|
|
732
|
-
toJSON(message: ContractCodeHistoryEntry): unknown {
|
|
733
|
-
const obj: any = {};
|
|
734
|
-
if (message.operation !== 0) {
|
|
735
|
-
obj.operation = contractCodeHistoryOperationTypeToJSON(message.operation);
|
|
736
|
-
}
|
|
737
|
-
if (!message.codeId.equals(Long.UZERO)) {
|
|
738
|
-
obj.codeId = (message.codeId || Long.UZERO).toString();
|
|
739
|
-
}
|
|
740
|
-
if (message.updated !== undefined) {
|
|
741
|
-
obj.updated = AbsoluteTxPosition.toJSON(message.updated);
|
|
742
|
-
}
|
|
743
|
-
if (message.msg.length !== 0) {
|
|
744
|
-
obj.msg = base64FromBytes(message.msg);
|
|
745
|
-
}
|
|
746
|
-
return obj;
|
|
747
|
-
},
|
|
748
|
-
|
|
749
|
-
create<I extends Exact<DeepPartial<ContractCodeHistoryEntry>, I>>(base?: I): ContractCodeHistoryEntry {
|
|
750
|
-
return ContractCodeHistoryEntry.fromPartial(base ?? ({} as any));
|
|
751
|
-
},
|
|
752
|
-
fromPartial<I extends Exact<DeepPartial<ContractCodeHistoryEntry>, I>>(object: I): ContractCodeHistoryEntry {
|
|
753
|
-
const message = createBaseContractCodeHistoryEntry();
|
|
754
|
-
message.operation = object.operation ?? 0;
|
|
755
|
-
message.codeId = (object.codeId !== undefined && object.codeId !== null)
|
|
756
|
-
? Long.fromValue(object.codeId)
|
|
757
|
-
: Long.UZERO;
|
|
758
|
-
message.updated = (object.updated !== undefined && object.updated !== null)
|
|
759
|
-
? AbsoluteTxPosition.fromPartial(object.updated)
|
|
760
|
-
: undefined;
|
|
761
|
-
message.msg = object.msg ?? new Uint8Array(0);
|
|
762
|
-
return message;
|
|
763
|
-
},
|
|
764
|
-
};
|
|
765
|
-
|
|
766
|
-
function createBaseAbsoluteTxPosition(): AbsoluteTxPosition {
|
|
767
|
-
return { blockHeight: Long.UZERO, txIndex: Long.UZERO };
|
|
768
|
-
}
|
|
769
|
-
|
|
770
|
-
export const AbsoluteTxPosition = {
|
|
771
|
-
encode(message: AbsoluteTxPosition, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
772
|
-
if (!message.blockHeight.equals(Long.UZERO)) {
|
|
773
|
-
writer.uint32(8).uint64(message.blockHeight);
|
|
774
|
-
}
|
|
775
|
-
if (!message.txIndex.equals(Long.UZERO)) {
|
|
776
|
-
writer.uint32(16).uint64(message.txIndex);
|
|
777
|
-
}
|
|
778
|
-
return writer;
|
|
779
|
-
},
|
|
780
|
-
|
|
781
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): AbsoluteTxPosition {
|
|
782
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
783
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
784
|
-
const message = createBaseAbsoluteTxPosition();
|
|
785
|
-
while (reader.pos < end) {
|
|
786
|
-
const tag = reader.uint32();
|
|
787
|
-
switch (tag >>> 3) {
|
|
788
|
-
case 1:
|
|
789
|
-
if (tag !== 8) {
|
|
790
|
-
break;
|
|
791
|
-
}
|
|
792
|
-
|
|
793
|
-
message.blockHeight = reader.uint64() as Long;
|
|
794
|
-
continue;
|
|
795
|
-
case 2:
|
|
796
|
-
if (tag !== 16) {
|
|
797
|
-
break;
|
|
798
|
-
}
|
|
799
|
-
|
|
800
|
-
message.txIndex = reader.uint64() as Long;
|
|
801
|
-
continue;
|
|
802
|
-
}
|
|
803
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
804
|
-
break;
|
|
805
|
-
}
|
|
806
|
-
reader.skipType(tag & 7);
|
|
807
|
-
}
|
|
808
|
-
return message;
|
|
809
|
-
},
|
|
810
|
-
|
|
811
|
-
fromJSON(object: any): AbsoluteTxPosition {
|
|
812
|
-
return {
|
|
813
|
-
blockHeight: isSet(object.blockHeight) ? Long.fromValue(object.blockHeight) : Long.UZERO,
|
|
814
|
-
txIndex: isSet(object.txIndex) ? Long.fromValue(object.txIndex) : Long.UZERO,
|
|
815
|
-
};
|
|
816
|
-
},
|
|
817
|
-
|
|
818
|
-
toJSON(message: AbsoluteTxPosition): unknown {
|
|
819
|
-
const obj: any = {};
|
|
820
|
-
if (!message.blockHeight.equals(Long.UZERO)) {
|
|
821
|
-
obj.blockHeight = (message.blockHeight || Long.UZERO).toString();
|
|
822
|
-
}
|
|
823
|
-
if (!message.txIndex.equals(Long.UZERO)) {
|
|
824
|
-
obj.txIndex = (message.txIndex || Long.UZERO).toString();
|
|
825
|
-
}
|
|
826
|
-
return obj;
|
|
827
|
-
},
|
|
828
|
-
|
|
829
|
-
create<I extends Exact<DeepPartial<AbsoluteTxPosition>, I>>(base?: I): AbsoluteTxPosition {
|
|
830
|
-
return AbsoluteTxPosition.fromPartial(base ?? ({} as any));
|
|
831
|
-
},
|
|
832
|
-
fromPartial<I extends Exact<DeepPartial<AbsoluteTxPosition>, I>>(object: I): AbsoluteTxPosition {
|
|
833
|
-
const message = createBaseAbsoluteTxPosition();
|
|
834
|
-
message.blockHeight = (object.blockHeight !== undefined && object.blockHeight !== null)
|
|
835
|
-
? Long.fromValue(object.blockHeight)
|
|
836
|
-
: Long.UZERO;
|
|
837
|
-
message.txIndex = (object.txIndex !== undefined && object.txIndex !== null)
|
|
838
|
-
? Long.fromValue(object.txIndex)
|
|
839
|
-
: Long.UZERO;
|
|
840
|
-
return message;
|
|
841
|
-
},
|
|
842
|
-
};
|
|
843
|
-
|
|
844
|
-
function createBaseModel(): Model {
|
|
845
|
-
return { key: new Uint8Array(0), value: new Uint8Array(0) };
|
|
846
|
-
}
|
|
847
|
-
|
|
848
|
-
export const Model = {
|
|
849
|
-
encode(message: Model, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
|
850
|
-
if (message.key.length !== 0) {
|
|
851
|
-
writer.uint32(10).bytes(message.key);
|
|
852
|
-
}
|
|
853
|
-
if (message.value.length !== 0) {
|
|
854
|
-
writer.uint32(18).bytes(message.value);
|
|
855
|
-
}
|
|
856
|
-
return writer;
|
|
857
|
-
},
|
|
858
|
-
|
|
859
|
-
decode(input: _m0.Reader | Uint8Array, length?: number): Model {
|
|
860
|
-
const reader = input instanceof _m0.Reader ? input : _m0.Reader.create(input);
|
|
861
|
-
let end = length === undefined ? reader.len : reader.pos + length;
|
|
862
|
-
const message = createBaseModel();
|
|
863
|
-
while (reader.pos < end) {
|
|
864
|
-
const tag = reader.uint32();
|
|
865
|
-
switch (tag >>> 3) {
|
|
866
|
-
case 1:
|
|
867
|
-
if (tag !== 10) {
|
|
868
|
-
break;
|
|
869
|
-
}
|
|
870
|
-
|
|
871
|
-
message.key = reader.bytes();
|
|
872
|
-
continue;
|
|
873
|
-
case 2:
|
|
874
|
-
if (tag !== 18) {
|
|
875
|
-
break;
|
|
876
|
-
}
|
|
877
|
-
|
|
878
|
-
message.value = reader.bytes();
|
|
879
|
-
continue;
|
|
880
|
-
}
|
|
881
|
-
if ((tag & 7) === 4 || tag === 0) {
|
|
882
|
-
break;
|
|
883
|
-
}
|
|
884
|
-
reader.skipType(tag & 7);
|
|
885
|
-
}
|
|
886
|
-
return message;
|
|
887
|
-
},
|
|
888
|
-
|
|
889
|
-
fromJSON(object: any): Model {
|
|
890
|
-
return {
|
|
891
|
-
key: isSet(object.key) ? bytesFromBase64(object.key) : new Uint8Array(0),
|
|
892
|
-
value: isSet(object.value) ? bytesFromBase64(object.value) : new Uint8Array(0),
|
|
893
|
-
};
|
|
894
|
-
},
|
|
895
|
-
|
|
896
|
-
toJSON(message: Model): unknown {
|
|
897
|
-
const obj: any = {};
|
|
898
|
-
if (message.key.length !== 0) {
|
|
899
|
-
obj.key = base64FromBytes(message.key);
|
|
900
|
-
}
|
|
901
|
-
if (message.value.length !== 0) {
|
|
902
|
-
obj.value = base64FromBytes(message.value);
|
|
903
|
-
}
|
|
904
|
-
return obj;
|
|
905
|
-
},
|
|
906
|
-
|
|
907
|
-
create<I extends Exact<DeepPartial<Model>, I>>(base?: I): Model {
|
|
908
|
-
return Model.fromPartial(base ?? ({} as any));
|
|
909
|
-
},
|
|
910
|
-
fromPartial<I extends Exact<DeepPartial<Model>, I>>(object: I): Model {
|
|
911
|
-
const message = createBaseModel();
|
|
912
|
-
message.key = object.key ?? new Uint8Array(0);
|
|
913
|
-
message.value = object.value ?? new Uint8Array(0);
|
|
914
|
-
return message;
|
|
915
|
-
},
|
|
916
|
-
};
|
|
917
|
-
|
|
918
|
-
function bytesFromBase64(b64: string): Uint8Array {
|
|
919
|
-
if ((globalThis as any).Buffer) {
|
|
920
|
-
return Uint8Array.from(globalThis.Buffer.from(b64, "base64"));
|
|
921
|
-
} else {
|
|
922
|
-
const bin = globalThis.atob(b64);
|
|
923
|
-
const arr = new Uint8Array(bin.length);
|
|
924
|
-
for (let i = 0; i < bin.length; ++i) {
|
|
925
|
-
arr[i] = bin.charCodeAt(i);
|
|
926
|
-
}
|
|
927
|
-
return arr;
|
|
928
|
-
}
|
|
929
|
-
}
|
|
930
|
-
|
|
931
|
-
function base64FromBytes(arr: Uint8Array): string {
|
|
932
|
-
if ((globalThis as any).Buffer) {
|
|
933
|
-
return globalThis.Buffer.from(arr).toString("base64");
|
|
934
|
-
} else {
|
|
935
|
-
const bin: string[] = [];
|
|
936
|
-
arr.forEach((byte) => {
|
|
937
|
-
bin.push(globalThis.String.fromCharCode(byte));
|
|
938
|
-
});
|
|
939
|
-
return globalThis.btoa(bin.join(""));
|
|
940
|
-
}
|
|
941
|
-
}
|
|
942
|
-
|
|
943
|
-
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
944
|
-
|
|
945
|
-
export type DeepPartial<T> = T extends Builtin ? T
|
|
946
|
-
: T extends Long ? string | number | Long : T extends globalThis.Array<infer U> ? globalThis.Array<DeepPartial<U>>
|
|
947
|
-
: T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>>
|
|
948
|
-
: T extends {} ? { [K in keyof T]?: DeepPartial<T[K]> }
|
|
949
|
-
: Partial<T>;
|
|
950
|
-
|
|
951
|
-
type KeysOfUnion<T> = T extends T ? keyof T : never;
|
|
952
|
-
export type Exact<P, I extends P> = P extends Builtin ? P
|
|
953
|
-
: P & { [K in keyof P]: Exact<P[K], I[K]> } & { [K in Exclude<keyof I, KeysOfUnion<P>>]: never };
|
|
954
|
-
|
|
955
|
-
if (_m0.util.Long !== Long) {
|
|
956
|
-
_m0.util.Long = Long as any;
|
|
957
|
-
_m0.configure();
|
|
958
|
-
}
|
|
959
|
-
|
|
960
|
-
function isSet(value: any): boolean {
|
|
961
|
-
return value !== null && value !== undefined;
|
|
962
|
-
}
|