carbon-js-sdk 0.3.51 → 0.3.53-dev.1

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.
Files changed (116) hide show
  1. package/lib/CarbonSDK.js +1 -1
  2. package/lib/clients/ETHClient.d.ts +11 -4
  3. package/lib/clients/ETHClient.js +20 -6
  4. package/lib/clients/HydrogenClient.d.ts +16 -7
  5. package/lib/clients/HydrogenClient.js +55 -9
  6. package/lib/clients/NEOClient.d.ts +1 -1
  7. package/lib/clients/NEOClient.js +9 -4
  8. package/lib/clients/TokenClient.d.ts +17 -4
  9. package/lib/clients/TokenClient.js +121 -8
  10. package/lib/clients/ZILClient.d.ts +1 -1
  11. package/lib/clients/ZILClient.js +9 -4
  12. package/lib/codec/cosmos/app/module/v1alpha1/module.d.ts +18 -0
  13. package/lib/codec/cosmos/app/module/v1alpha1/module.js +46 -0
  14. package/lib/codec/cosmos/app/v1alpha1/config.d.ts +57 -0
  15. package/lib/codec/cosmos/app/v1alpha1/config.js +125 -0
  16. package/lib/codec/cosmos/app/v1alpha1/export.d.ts +3 -0
  17. package/lib/codec/cosmos/app/v1alpha1/export.js +13 -0
  18. package/lib/codec/cosmos/app/v1alpha1/module.d.ts +109 -0
  19. package/lib/codec/cosmos/app/v1alpha1/module.js +192 -0
  20. package/lib/codec/cosmos/app/v1alpha1/query.d.ts +44 -0
  21. package/lib/codec/cosmos/app/v1alpha1/query.js +107 -0
  22. package/lib/codec/cosmos/authz/v1beta1/export.d.ts +4 -0
  23. package/lib/codec/cosmos/authz/v1beta1/export.js +25 -0
  24. package/lib/codec/cosmos/base/node/v1beta1/query.d.ts +42 -0
  25. package/lib/codec/cosmos/base/node/v1beta1/query.js +104 -0
  26. package/lib/codec/cosmos/base/tendermint/v1beta1/types.d.ts +67 -0
  27. package/lib/codec/cosmos/base/tendermint/v1beta1/types.js +423 -0
  28. package/lib/codec/cosmos/capability/v1beta1/export.d.ts +2 -0
  29. package/lib/codec/cosmos/capability/v1beta1/export.js +9 -0
  30. package/lib/codec/cosmos/crisis/v1beta1/export.d.ts +1 -0
  31. package/lib/codec/cosmos/crisis/v1beta1/export.js +6 -0
  32. package/lib/codec/cosmos/crypto/hd/v1/hd.d.ts +32 -0
  33. package/lib/codec/cosmos/crypto/hd/v1/hd.js +114 -0
  34. package/lib/codec/cosmos/crypto/keyring/v1/record.d.ts +78 -0
  35. package/lib/codec/cosmos/crypto/keyring/v1/record.js +309 -0
  36. package/lib/codec/cosmos/evidence/v1beta1/export.d.ts +3 -0
  37. package/lib/codec/cosmos/evidence/v1beta1/export.js +13 -0
  38. package/lib/codec/cosmos/feegrant/v1beta1/export.d.ts +3 -0
  39. package/lib/codec/cosmos/feegrant/v1beta1/export.js +20 -0
  40. package/lib/codec/cosmos/gov/v1/export.d.ts +3 -0
  41. package/lib/codec/cosmos/gov/v1/export.js +46 -0
  42. package/lib/codec/cosmos/gov/v1/genesis.d.ts +34 -0
  43. package/lib/codec/cosmos/gov/v1/genesis.js +166 -0
  44. package/lib/codec/cosmos/gov/v1/gov.d.ts +198 -0
  45. package/lib/codec/cosmos/gov/v1/gov.js +855 -0
  46. package/lib/codec/cosmos/gov/v1/query.d.ts +264 -0
  47. package/lib/codec/cosmos/gov/v1/query.js +1045 -0
  48. package/lib/codec/cosmos/gov/v1/tx.d.ts +167 -0
  49. package/lib/codec/cosmos/gov/v1/tx.js +639 -0
  50. package/lib/codec/cosmos/group/v1/events.d.ts +124 -0
  51. package/lib/codec/cosmos/group/v1/events.js +480 -0
  52. package/lib/codec/cosmos/group/v1/export.d.ts +4 -0
  53. package/lib/codec/cosmos/group/v1/export.js +94 -0
  54. package/lib/codec/cosmos/group/v1/genesis.d.ts +45 -0
  55. package/lib/codec/cosmos/group/v1/genesis.js +176 -0
  56. package/lib/codec/cosmos/group/v1/query.d.ts +412 -0
  57. package/lib/codec/cosmos/group/v1/query.js +1648 -0
  58. package/lib/codec/cosmos/group/v1/tx.d.ts +483 -0
  59. package/lib/codec/cosmos/group/v1/tx.js +1840 -0
  60. package/lib/codec/cosmos/group/v1/types.d.ts +356 -0
  61. package/lib/codec/cosmos/group/v1/types.js +1306 -0
  62. package/lib/codec/cosmos/msg/v1/msg.d.ts +1 -0
  63. package/lib/codec/cosmos/msg/v1/msg.js +14 -0
  64. package/lib/codec/cosmos/nft/v1beta1/event.d.ts +48 -0
  65. package/lib/codec/cosmos/nft/v1beta1/event.js +227 -0
  66. package/lib/codec/cosmos/nft/v1beta1/export.d.ts +5 -0
  67. package/lib/codec/cosmos/nft/v1beta1/export.js +30 -0
  68. package/lib/codec/cosmos/nft/v1beta1/genesis.d.ts +36 -0
  69. package/lib/codec/cosmos/nft/v1beta1/genesis.js +140 -0
  70. package/lib/codec/cosmos/nft/v1beta1/nft.d.ts +53 -0
  71. package/lib/codec/cosmos/nft/v1beta1/nft.js +233 -0
  72. package/lib/codec/cosmos/nft/v1beta1/query.d.ts +206 -0
  73. package/lib/codec/cosmos/nft/v1beta1/query.js +817 -0
  74. package/lib/codec/cosmos/nft/v1beta1/tx.d.ts +49 -0
  75. package/lib/codec/cosmos/nft/v1beta1/tx.js +137 -0
  76. package/lib/codec/cosmos/orm/module/v1alpha1/module.d.ts +22 -0
  77. package/lib/codec/cosmos/orm/module/v1alpha1/module.js +46 -0
  78. package/lib/codec/cosmos/orm/v1/export.d.ts +1 -0
  79. package/lib/codec/cosmos/orm/v1/export.js +8 -0
  80. package/lib/codec/cosmos/orm/v1/orm.d.ts +123 -0
  81. package/lib/codec/cosmos/orm/v1/orm.js +263 -0
  82. package/lib/codec/cosmos/orm/v1alpha1/export.d.ts +1 -0
  83. package/lib/codec/cosmos/orm/v1alpha1/export.js +9 -0
  84. package/lib/codec/cosmos/orm/v1alpha1/schema.d.ts +96 -0
  85. package/lib/codec/cosmos/orm/v1alpha1/schema.js +265 -0
  86. package/lib/codec/cosmos/upgrade/v1beta1/export.d.ts +3 -0
  87. package/lib/codec/cosmos/upgrade/v1beta1/export.js +24 -0
  88. package/lib/codec/cosmos/upgrade/v1beta1/tx.d.ts +97 -0
  89. package/lib/codec/cosmos/upgrade/v1beta1/tx.js +203 -0
  90. package/lib/codec/ibc/applications/fee/v1/ack.d.ts +24 -0
  91. package/lib/codec/ibc/applications/fee/v1/ack.js +125 -0
  92. package/lib/codec/ibc/applications/fee/v1/export.d.ts +6 -0
  93. package/lib/codec/ibc/applications/fee/v1/export.js +47 -0
  94. package/lib/codec/ibc/applications/fee/v1/fee.d.ts +68 -0
  95. package/lib/codec/ibc/applications/fee/v1/fee.js +289 -0
  96. package/lib/codec/ibc/applications/fee/v1/genesis.d.ts +93 -0
  97. package/lib/codec/ibc/applications/fee/v1/genesis.js +390 -0
  98. package/lib/codec/ibc/applications/fee/v1/metadata.d.ts +25 -0
  99. package/lib/codec/ibc/applications/fee/v1/metadata.js +71 -0
  100. package/lib/codec/ibc/applications/fee/v1/query.d.ts +312 -0
  101. package/lib/codec/ibc/applications/fee/v1/query.js +1187 -0
  102. package/lib/codec/ibc/applications/fee/v1/tx.d.ts +171 -0
  103. package/lib/codec/ibc/applications/fee/v1/tx.js +524 -0
  104. package/lib/codec/ibc/applications/interchain_accounts/controller/v1/tx.d.ts +78 -0
  105. package/lib/codec/ibc/applications/interchain_accounts/controller/v1/tx.js +296 -0
  106. package/lib/codec/ibc/applications/interchain_accounts/genesis/v1/genesis.d.ts +80 -0
  107. package/lib/codec/ibc/applications/interchain_accounts/genesis/v1/genesis.js +439 -0
  108. package/lib/hydrogen/transfer.d.ts +5 -5
  109. package/lib/insights/competition.d.ts +2 -0
  110. package/lib/provider/metamask/MetaMask.d.ts +5 -5
  111. package/lib/provider/metamask/MetaMask.js +35 -35
  112. package/lib/util/blockchain.d.ts +9 -0
  113. package/lib/util/blockchain.js +143 -1
  114. package/lib/util/ibc.d.ts +4 -4
  115. package/lib/util/ibc.js +17 -18
  116. package/package.json +1 -1
@@ -0,0 +1,96 @@
1
+ import Long from "long";
2
+ import _m0 from "protobufjs/minimal";
3
+ export declare const protobufPackage = "cosmos.orm.v1alpha1";
4
+ /** StorageType */
5
+ export declare enum StorageType {
6
+ /**
7
+ * STORAGE_TYPE_DEFAULT_UNSPECIFIED - STORAGE_TYPE_DEFAULT_UNSPECIFIED indicates the persistent
8
+ * KV-storage where primary key entries are stored in merkle-tree
9
+ * backed commitment storage and indexes and seqs are stored in
10
+ * fast index storage. Note that the Cosmos SDK before store/v2alpha1
11
+ * does not support this.
12
+ */
13
+ STORAGE_TYPE_DEFAULT_UNSPECIFIED = 0,
14
+ /**
15
+ * STORAGE_TYPE_MEMORY - STORAGE_TYPE_MEMORY indicates in-memory storage that will be
16
+ * reloaded every time an app restarts. Tables with this type of storage
17
+ * will by default be ignored when importing and exporting a module's
18
+ * state from JSON.
19
+ */
20
+ STORAGE_TYPE_MEMORY = 1,
21
+ /**
22
+ * STORAGE_TYPE_TRANSIENT - STORAGE_TYPE_TRANSIENT indicates transient storage that is reset
23
+ * at the end of every block. Tables with this type of storage
24
+ * will by default be ignored when importing and exporting a module's
25
+ * state from JSON.
26
+ */
27
+ STORAGE_TYPE_TRANSIENT = 2,
28
+ /**
29
+ * STORAGE_TYPE_INDEX - STORAGE_TYPE_INDEX indicates persistent storage which is not backed
30
+ * by a merkle-tree and won't affect the app hash. Note that the Cosmos SDK
31
+ * before store/v2alpha1 does not support this.
32
+ */
33
+ STORAGE_TYPE_INDEX = 3,
34
+ /**
35
+ * STORAGE_TYPE_COMMITMENT - STORAGE_TYPE_INDEX indicates persistent storage which is backed by
36
+ * a merkle-tree. With this type of storage, both primary and index keys
37
+ * will affect the app hash and this is generally less efficient
38
+ * than using STORAGE_TYPE_DEFAULT_UNSPECIFIED which separates index
39
+ * keys into index storage. Note that modules built with the
40
+ * Cosmos SDK before store/v2alpha1 must specify STORAGE_TYPE_COMMITMENT
41
+ * instead of STORAGE_TYPE_DEFAULT_UNSPECIFIED or STORAGE_TYPE_INDEX
42
+ * because this is the only type of persistent storage available.
43
+ */
44
+ STORAGE_TYPE_COMMITMENT = 4,
45
+ UNRECOGNIZED = -1
46
+ }
47
+ export declare function storageTypeFromJSON(object: any): StorageType;
48
+ export declare function storageTypeToJSON(object: StorageType): string;
49
+ /** ModuleSchemaDescriptor describe's a module's ORM schema. */
50
+ export interface ModuleSchemaDescriptor {
51
+ schemaFile: ModuleSchemaDescriptor_FileEntry[];
52
+ /**
53
+ * prefix is an optional prefix that precedes all keys in this module's
54
+ * store.
55
+ */
56
+ prefix: Uint8Array;
57
+ }
58
+ /** FileEntry describes an ORM file used in a module. */
59
+ export interface ModuleSchemaDescriptor_FileEntry {
60
+ /**
61
+ * id is a prefix that will be varint encoded and prepended to all the
62
+ * table keys specified in the file's tables.
63
+ */
64
+ id: number;
65
+ /**
66
+ * proto_file_name is the name of a file .proto in that contains
67
+ * table definitions. The .proto file must be in a package that the
68
+ * module has referenced using cosmos.app.v1.ModuleDescriptor.use_package.
69
+ */
70
+ protoFileName: string;
71
+ /**
72
+ * storage_type optionally indicates the type of storage this file's
73
+ * tables should used. If it is left unspecified, the default KV-storage
74
+ * of the app will be used.
75
+ */
76
+ storageType: StorageType;
77
+ }
78
+ export declare const ModuleSchemaDescriptor: {
79
+ encode(message: ModuleSchemaDescriptor, writer?: _m0.Writer): _m0.Writer;
80
+ decode(input: _m0.Reader | Uint8Array, length?: number | undefined): ModuleSchemaDescriptor;
81
+ fromJSON(object: any): ModuleSchemaDescriptor;
82
+ toJSON(message: ModuleSchemaDescriptor): unknown;
83
+ fromPartial(object: DeepPartial<ModuleSchemaDescriptor>): ModuleSchemaDescriptor;
84
+ };
85
+ export declare const ModuleSchemaDescriptor_FileEntry: {
86
+ encode(message: ModuleSchemaDescriptor_FileEntry, writer?: _m0.Writer): _m0.Writer;
87
+ decode(input: _m0.Reader | Uint8Array, length?: number | undefined): ModuleSchemaDescriptor_FileEntry;
88
+ fromJSON(object: any): ModuleSchemaDescriptor_FileEntry;
89
+ toJSON(message: ModuleSchemaDescriptor_FileEntry): unknown;
90
+ fromPartial(object: DeepPartial<ModuleSchemaDescriptor_FileEntry>): ModuleSchemaDescriptor_FileEntry;
91
+ };
92
+ declare type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
93
+ export declare type DeepPartial<T> = T extends Builtin ? T : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
94
+ [K in keyof T]?: DeepPartial<T[K]>;
95
+ } : Partial<T>;
96
+ export {};
@@ -0,0 +1,265 @@
1
+ "use strict";
2
+ var __importDefault = (this && this.__importDefault) || function (mod) {
3
+ return (mod && mod.__esModule) ? mod : { "default": mod };
4
+ };
5
+ Object.defineProperty(exports, "__esModule", { value: true });
6
+ exports.ModuleSchemaDescriptor_FileEntry = exports.ModuleSchemaDescriptor = exports.storageTypeToJSON = exports.storageTypeFromJSON = exports.StorageType = exports.protobufPackage = void 0;
7
+ /* eslint-disable */
8
+ const long_1 = __importDefault(require("long"));
9
+ const minimal_1 = __importDefault(require("protobufjs/minimal"));
10
+ exports.protobufPackage = "cosmos.orm.v1alpha1";
11
+ /** StorageType */
12
+ var StorageType;
13
+ (function (StorageType) {
14
+ /**
15
+ * STORAGE_TYPE_DEFAULT_UNSPECIFIED - STORAGE_TYPE_DEFAULT_UNSPECIFIED indicates the persistent
16
+ * KV-storage where primary key entries are stored in merkle-tree
17
+ * backed commitment storage and indexes and seqs are stored in
18
+ * fast index storage. Note that the Cosmos SDK before store/v2alpha1
19
+ * does not support this.
20
+ */
21
+ StorageType[StorageType["STORAGE_TYPE_DEFAULT_UNSPECIFIED"] = 0] = "STORAGE_TYPE_DEFAULT_UNSPECIFIED";
22
+ /**
23
+ * STORAGE_TYPE_MEMORY - STORAGE_TYPE_MEMORY indicates in-memory storage that will be
24
+ * reloaded every time an app restarts. Tables with this type of storage
25
+ * will by default be ignored when importing and exporting a module's
26
+ * state from JSON.
27
+ */
28
+ StorageType[StorageType["STORAGE_TYPE_MEMORY"] = 1] = "STORAGE_TYPE_MEMORY";
29
+ /**
30
+ * STORAGE_TYPE_TRANSIENT - STORAGE_TYPE_TRANSIENT indicates transient storage that is reset
31
+ * at the end of every block. Tables with this type of storage
32
+ * will by default be ignored when importing and exporting a module's
33
+ * state from JSON.
34
+ */
35
+ StorageType[StorageType["STORAGE_TYPE_TRANSIENT"] = 2] = "STORAGE_TYPE_TRANSIENT";
36
+ /**
37
+ * STORAGE_TYPE_INDEX - STORAGE_TYPE_INDEX indicates persistent storage which is not backed
38
+ * by a merkle-tree and won't affect the app hash. Note that the Cosmos SDK
39
+ * before store/v2alpha1 does not support this.
40
+ */
41
+ StorageType[StorageType["STORAGE_TYPE_INDEX"] = 3] = "STORAGE_TYPE_INDEX";
42
+ /**
43
+ * STORAGE_TYPE_COMMITMENT - STORAGE_TYPE_INDEX indicates persistent storage which is backed by
44
+ * a merkle-tree. With this type of storage, both primary and index keys
45
+ * will affect the app hash and this is generally less efficient
46
+ * than using STORAGE_TYPE_DEFAULT_UNSPECIFIED which separates index
47
+ * keys into index storage. Note that modules built with the
48
+ * Cosmos SDK before store/v2alpha1 must specify STORAGE_TYPE_COMMITMENT
49
+ * instead of STORAGE_TYPE_DEFAULT_UNSPECIFIED or STORAGE_TYPE_INDEX
50
+ * because this is the only type of persistent storage available.
51
+ */
52
+ StorageType[StorageType["STORAGE_TYPE_COMMITMENT"] = 4] = "STORAGE_TYPE_COMMITMENT";
53
+ StorageType[StorageType["UNRECOGNIZED"] = -1] = "UNRECOGNIZED";
54
+ })(StorageType = exports.StorageType || (exports.StorageType = {}));
55
+ function storageTypeFromJSON(object) {
56
+ switch (object) {
57
+ case 0:
58
+ case "STORAGE_TYPE_DEFAULT_UNSPECIFIED":
59
+ return StorageType.STORAGE_TYPE_DEFAULT_UNSPECIFIED;
60
+ case 1:
61
+ case "STORAGE_TYPE_MEMORY":
62
+ return StorageType.STORAGE_TYPE_MEMORY;
63
+ case 2:
64
+ case "STORAGE_TYPE_TRANSIENT":
65
+ return StorageType.STORAGE_TYPE_TRANSIENT;
66
+ case 3:
67
+ case "STORAGE_TYPE_INDEX":
68
+ return StorageType.STORAGE_TYPE_INDEX;
69
+ case 4:
70
+ case "STORAGE_TYPE_COMMITMENT":
71
+ return StorageType.STORAGE_TYPE_COMMITMENT;
72
+ case -1:
73
+ case "UNRECOGNIZED":
74
+ default:
75
+ return StorageType.UNRECOGNIZED;
76
+ }
77
+ }
78
+ exports.storageTypeFromJSON = storageTypeFromJSON;
79
+ function storageTypeToJSON(object) {
80
+ switch (object) {
81
+ case StorageType.STORAGE_TYPE_DEFAULT_UNSPECIFIED:
82
+ return "STORAGE_TYPE_DEFAULT_UNSPECIFIED";
83
+ case StorageType.STORAGE_TYPE_MEMORY:
84
+ return "STORAGE_TYPE_MEMORY";
85
+ case StorageType.STORAGE_TYPE_TRANSIENT:
86
+ return "STORAGE_TYPE_TRANSIENT";
87
+ case StorageType.STORAGE_TYPE_INDEX:
88
+ return "STORAGE_TYPE_INDEX";
89
+ case StorageType.STORAGE_TYPE_COMMITMENT:
90
+ return "STORAGE_TYPE_COMMITMENT";
91
+ default:
92
+ return "UNKNOWN";
93
+ }
94
+ }
95
+ exports.storageTypeToJSON = storageTypeToJSON;
96
+ const baseModuleSchemaDescriptor = {};
97
+ exports.ModuleSchemaDescriptor = {
98
+ encode(message, writer = minimal_1.default.Writer.create()) {
99
+ for (const v of message.schemaFile) {
100
+ exports.ModuleSchemaDescriptor_FileEntry.encode(v, writer.uint32(10).fork()).ldelim();
101
+ }
102
+ if (message.prefix.length !== 0) {
103
+ writer.uint32(18).bytes(message.prefix);
104
+ }
105
+ return writer;
106
+ },
107
+ decode(input, length) {
108
+ const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
109
+ let end = length === undefined ? reader.len : reader.pos + length;
110
+ const message = Object.assign({}, baseModuleSchemaDescriptor);
111
+ message.schemaFile = [];
112
+ message.prefix = new Uint8Array();
113
+ while (reader.pos < end) {
114
+ const tag = reader.uint32();
115
+ switch (tag >>> 3) {
116
+ case 1:
117
+ message.schemaFile.push(exports.ModuleSchemaDescriptor_FileEntry.decode(reader, reader.uint32()));
118
+ break;
119
+ case 2:
120
+ message.prefix = reader.bytes();
121
+ break;
122
+ default:
123
+ reader.skipType(tag & 7);
124
+ break;
125
+ }
126
+ }
127
+ return message;
128
+ },
129
+ fromJSON(object) {
130
+ var _a;
131
+ const message = Object.assign({}, baseModuleSchemaDescriptor);
132
+ message.schemaFile = ((_a = object.schemaFile) !== null && _a !== void 0 ? _a : []).map((e) => exports.ModuleSchemaDescriptor_FileEntry.fromJSON(e));
133
+ message.prefix =
134
+ object.prefix !== undefined && object.prefix !== null
135
+ ? bytesFromBase64(object.prefix)
136
+ : new Uint8Array();
137
+ return message;
138
+ },
139
+ toJSON(message) {
140
+ const obj = {};
141
+ if (message.schemaFile) {
142
+ obj.schemaFile = message.schemaFile.map((e) => e ? exports.ModuleSchemaDescriptor_FileEntry.toJSON(e) : undefined);
143
+ }
144
+ else {
145
+ obj.schemaFile = [];
146
+ }
147
+ message.prefix !== undefined &&
148
+ (obj.prefix = base64FromBytes(message.prefix !== undefined ? message.prefix : new Uint8Array()));
149
+ return obj;
150
+ },
151
+ fromPartial(object) {
152
+ var _a, _b;
153
+ const message = Object.assign({}, baseModuleSchemaDescriptor);
154
+ message.schemaFile = ((_a = object.schemaFile) !== null && _a !== void 0 ? _a : []).map((e) => exports.ModuleSchemaDescriptor_FileEntry.fromPartial(e));
155
+ message.prefix = (_b = object.prefix) !== null && _b !== void 0 ? _b : new Uint8Array();
156
+ return message;
157
+ },
158
+ };
159
+ const baseModuleSchemaDescriptor_FileEntry = {
160
+ id: 0,
161
+ protoFileName: "",
162
+ storageType: 0,
163
+ };
164
+ exports.ModuleSchemaDescriptor_FileEntry = {
165
+ encode(message, writer = minimal_1.default.Writer.create()) {
166
+ if (message.id !== 0) {
167
+ writer.uint32(8).uint32(message.id);
168
+ }
169
+ if (message.protoFileName !== "") {
170
+ writer.uint32(18).string(message.protoFileName);
171
+ }
172
+ if (message.storageType !== 0) {
173
+ writer.uint32(24).int32(message.storageType);
174
+ }
175
+ return writer;
176
+ },
177
+ decode(input, length) {
178
+ const reader = input instanceof minimal_1.default.Reader ? input : new minimal_1.default.Reader(input);
179
+ let end = length === undefined ? reader.len : reader.pos + length;
180
+ const message = Object.assign({}, baseModuleSchemaDescriptor_FileEntry);
181
+ while (reader.pos < end) {
182
+ const tag = reader.uint32();
183
+ switch (tag >>> 3) {
184
+ case 1:
185
+ message.id = reader.uint32();
186
+ break;
187
+ case 2:
188
+ message.protoFileName = reader.string();
189
+ break;
190
+ case 3:
191
+ message.storageType = reader.int32();
192
+ break;
193
+ default:
194
+ reader.skipType(tag & 7);
195
+ break;
196
+ }
197
+ }
198
+ return message;
199
+ },
200
+ fromJSON(object) {
201
+ const message = Object.assign({}, baseModuleSchemaDescriptor_FileEntry);
202
+ message.id =
203
+ object.id !== undefined && object.id !== null ? Number(object.id) : 0;
204
+ message.protoFileName =
205
+ object.protoFileName !== undefined && object.protoFileName !== null
206
+ ? String(object.protoFileName)
207
+ : "";
208
+ message.storageType =
209
+ object.storageType !== undefined && object.storageType !== null
210
+ ? storageTypeFromJSON(object.storageType)
211
+ : 0;
212
+ return message;
213
+ },
214
+ toJSON(message) {
215
+ const obj = {};
216
+ message.id !== undefined && (obj.id = message.id);
217
+ message.protoFileName !== undefined &&
218
+ (obj.protoFileName = message.protoFileName);
219
+ message.storageType !== undefined &&
220
+ (obj.storageType = storageTypeToJSON(message.storageType));
221
+ return obj;
222
+ },
223
+ fromPartial(object) {
224
+ var _a, _b, _c;
225
+ const message = Object.assign({}, baseModuleSchemaDescriptor_FileEntry);
226
+ message.id = (_a = object.id) !== null && _a !== void 0 ? _a : 0;
227
+ message.protoFileName = (_b = object.protoFileName) !== null && _b !== void 0 ? _b : "";
228
+ message.storageType = (_c = object.storageType) !== null && _c !== void 0 ? _c : 0;
229
+ return message;
230
+ },
231
+ };
232
+ var globalThis = (() => {
233
+ if (typeof globalThis !== "undefined")
234
+ return globalThis;
235
+ if (typeof self !== "undefined")
236
+ return self;
237
+ if (typeof window !== "undefined")
238
+ return window;
239
+ if (typeof global !== "undefined")
240
+ return global;
241
+ throw "Unable to locate global object";
242
+ })();
243
+ const atob = globalThis.atob ||
244
+ ((b64) => globalThis.Buffer.from(b64, "base64").toString("binary"));
245
+ function bytesFromBase64(b64) {
246
+ const bin = atob(b64);
247
+ const arr = new Uint8Array(bin.length);
248
+ for (let i = 0; i < bin.length; ++i) {
249
+ arr[i] = bin.charCodeAt(i);
250
+ }
251
+ return arr;
252
+ }
253
+ const btoa = globalThis.btoa ||
254
+ ((bin) => globalThis.Buffer.from(bin, "binary").toString("base64"));
255
+ function base64FromBytes(arr) {
256
+ const bin = [];
257
+ for (const byte of arr) {
258
+ bin.push(String.fromCharCode(byte));
259
+ }
260
+ return btoa(bin.join(""));
261
+ }
262
+ if (minimal_1.default.util.Long !== long_1.default) {
263
+ minimal_1.default.util.Long = long_1.default;
264
+ minimal_1.default.configure();
265
+ }
@@ -0,0 +1,3 @@
1
+ export { QueryCurrentPlanRequest, QueryCurrentPlanResponse, QueryAppliedPlanRequest, QueryAppliedPlanResponse, QueryUpgradedConsensusStateRequest, QueryUpgradedConsensusStateResponse, QueryModuleVersionsRequest, QueryModuleVersionsResponse, QueryAuthorityRequest, QueryAuthorityResponse } from "./query";
2
+ export { MsgSoftwareUpgrade, MsgSoftwareUpgradeResponse, MsgCancelUpgrade, MsgCancelUpgradeResponse } from "./tx";
3
+ export { Plan, SoftwareUpgradeProposal, CancelSoftwareUpgradeProposal, ModuleVersion } from "./upgrade";
@@ -0,0 +1,24 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.ModuleVersion = exports.CancelSoftwareUpgradeProposal = exports.SoftwareUpgradeProposal = exports.Plan = exports.MsgCancelUpgradeResponse = exports.MsgCancelUpgrade = exports.MsgSoftwareUpgradeResponse = exports.MsgSoftwareUpgrade = exports.QueryAuthorityResponse = exports.QueryAuthorityRequest = exports.QueryModuleVersionsResponse = exports.QueryModuleVersionsRequest = exports.QueryUpgradedConsensusStateResponse = exports.QueryUpgradedConsensusStateRequest = exports.QueryAppliedPlanResponse = exports.QueryAppliedPlanRequest = exports.QueryCurrentPlanResponse = exports.QueryCurrentPlanRequest = void 0;
4
+ var query_1 = require("./query");
5
+ Object.defineProperty(exports, "QueryCurrentPlanRequest", { enumerable: true, get: function () { return query_1.QueryCurrentPlanRequest; } });
6
+ Object.defineProperty(exports, "QueryCurrentPlanResponse", { enumerable: true, get: function () { return query_1.QueryCurrentPlanResponse; } });
7
+ Object.defineProperty(exports, "QueryAppliedPlanRequest", { enumerable: true, get: function () { return query_1.QueryAppliedPlanRequest; } });
8
+ Object.defineProperty(exports, "QueryAppliedPlanResponse", { enumerable: true, get: function () { return query_1.QueryAppliedPlanResponse; } });
9
+ Object.defineProperty(exports, "QueryUpgradedConsensusStateRequest", { enumerable: true, get: function () { return query_1.QueryUpgradedConsensusStateRequest; } });
10
+ Object.defineProperty(exports, "QueryUpgradedConsensusStateResponse", { enumerable: true, get: function () { return query_1.QueryUpgradedConsensusStateResponse; } });
11
+ Object.defineProperty(exports, "QueryModuleVersionsRequest", { enumerable: true, get: function () { return query_1.QueryModuleVersionsRequest; } });
12
+ Object.defineProperty(exports, "QueryModuleVersionsResponse", { enumerable: true, get: function () { return query_1.QueryModuleVersionsResponse; } });
13
+ Object.defineProperty(exports, "QueryAuthorityRequest", { enumerable: true, get: function () { return query_1.QueryAuthorityRequest; } });
14
+ Object.defineProperty(exports, "QueryAuthorityResponse", { enumerable: true, get: function () { return query_1.QueryAuthorityResponse; } });
15
+ var tx_1 = require("./tx");
16
+ Object.defineProperty(exports, "MsgSoftwareUpgrade", { enumerable: true, get: function () { return tx_1.MsgSoftwareUpgrade; } });
17
+ Object.defineProperty(exports, "MsgSoftwareUpgradeResponse", { enumerable: true, get: function () { return tx_1.MsgSoftwareUpgradeResponse; } });
18
+ Object.defineProperty(exports, "MsgCancelUpgrade", { enumerable: true, get: function () { return tx_1.MsgCancelUpgrade; } });
19
+ Object.defineProperty(exports, "MsgCancelUpgradeResponse", { enumerable: true, get: function () { return tx_1.MsgCancelUpgradeResponse; } });
20
+ var upgrade_1 = require("./upgrade");
21
+ Object.defineProperty(exports, "Plan", { enumerable: true, get: function () { return upgrade_1.Plan; } });
22
+ Object.defineProperty(exports, "SoftwareUpgradeProposal", { enumerable: true, get: function () { return upgrade_1.SoftwareUpgradeProposal; } });
23
+ Object.defineProperty(exports, "CancelSoftwareUpgradeProposal", { enumerable: true, get: function () { return upgrade_1.CancelSoftwareUpgradeProposal; } });
24
+ Object.defineProperty(exports, "ModuleVersion", { enumerable: true, get: function () { return upgrade_1.ModuleVersion; } });
@@ -0,0 +1,97 @@
1
+ import Long from "long";
2
+ import _m0 from "protobufjs/minimal";
3
+ import { Plan } from "./upgrade";
4
+ export declare const protobufPackage = "cosmos.upgrade.v1beta1";
5
+ /** Since: cosmos-sdk 0.46 */
6
+ /**
7
+ * MsgSoftwareUpgrade is the Msg/SoftwareUpgrade request type.
8
+ *
9
+ * Since: cosmos-sdk 0.46
10
+ */
11
+ export interface MsgSoftwareUpgrade {
12
+ /** authority is the address of the governance account. */
13
+ authority: string;
14
+ /** plan is the upgrade plan. */
15
+ plan?: Plan;
16
+ }
17
+ /**
18
+ * MsgSoftwareUpgradeResponse is the Msg/SoftwareUpgrade response type.
19
+ *
20
+ * Since: cosmos-sdk 0.46
21
+ */
22
+ export interface MsgSoftwareUpgradeResponse {
23
+ }
24
+ /**
25
+ * MsgCancelUpgrade is the Msg/CancelUpgrade request type.
26
+ *
27
+ * Since: cosmos-sdk 0.46
28
+ */
29
+ export interface MsgCancelUpgrade {
30
+ /** authority is the address of the governance account. */
31
+ authority: string;
32
+ }
33
+ /**
34
+ * MsgCancelUpgradeResponse is the Msg/CancelUpgrade response type.
35
+ *
36
+ * Since: cosmos-sdk 0.46
37
+ */
38
+ export interface MsgCancelUpgradeResponse {
39
+ }
40
+ export declare const MsgSoftwareUpgrade: {
41
+ encode(message: MsgSoftwareUpgrade, writer?: _m0.Writer): _m0.Writer;
42
+ decode(input: _m0.Reader | Uint8Array, length?: number | undefined): MsgSoftwareUpgrade;
43
+ fromJSON(object: any): MsgSoftwareUpgrade;
44
+ toJSON(message: MsgSoftwareUpgrade): unknown;
45
+ fromPartial(object: DeepPartial<MsgSoftwareUpgrade>): MsgSoftwareUpgrade;
46
+ };
47
+ export declare const MsgSoftwareUpgradeResponse: {
48
+ encode(_: MsgSoftwareUpgradeResponse, writer?: _m0.Writer): _m0.Writer;
49
+ decode(input: _m0.Reader | Uint8Array, length?: number | undefined): MsgSoftwareUpgradeResponse;
50
+ fromJSON(_: any): MsgSoftwareUpgradeResponse;
51
+ toJSON(_: MsgSoftwareUpgradeResponse): unknown;
52
+ fromPartial(_: DeepPartial<MsgSoftwareUpgradeResponse>): MsgSoftwareUpgradeResponse;
53
+ };
54
+ export declare const MsgCancelUpgrade: {
55
+ encode(message: MsgCancelUpgrade, writer?: _m0.Writer): _m0.Writer;
56
+ decode(input: _m0.Reader | Uint8Array, length?: number | undefined): MsgCancelUpgrade;
57
+ fromJSON(object: any): MsgCancelUpgrade;
58
+ toJSON(message: MsgCancelUpgrade): unknown;
59
+ fromPartial(object: DeepPartial<MsgCancelUpgrade>): MsgCancelUpgrade;
60
+ };
61
+ export declare const MsgCancelUpgradeResponse: {
62
+ encode(_: MsgCancelUpgradeResponse, writer?: _m0.Writer): _m0.Writer;
63
+ decode(input: _m0.Reader | Uint8Array, length?: number | undefined): MsgCancelUpgradeResponse;
64
+ fromJSON(_: any): MsgCancelUpgradeResponse;
65
+ toJSON(_: MsgCancelUpgradeResponse): unknown;
66
+ fromPartial(_: DeepPartial<MsgCancelUpgradeResponse>): MsgCancelUpgradeResponse;
67
+ };
68
+ /** Msg defines the upgrade Msg service. */
69
+ export interface Msg {
70
+ /**
71
+ * SoftwareUpgrade is a governance operation for initiating a software upgrade.
72
+ *
73
+ * Since: cosmos-sdk 0.46
74
+ */
75
+ SoftwareUpgrade(request: MsgSoftwareUpgrade): Promise<MsgSoftwareUpgradeResponse>;
76
+ /**
77
+ * CancelUpgrade is a governance operation for cancelling a previously
78
+ * approvid software upgrade.
79
+ *
80
+ * Since: cosmos-sdk 0.46
81
+ */
82
+ CancelUpgrade(request: MsgCancelUpgrade): Promise<MsgCancelUpgradeResponse>;
83
+ }
84
+ export declare class MsgClientImpl implements Msg {
85
+ private readonly rpc;
86
+ constructor(rpc: Rpc);
87
+ SoftwareUpgrade(request: MsgSoftwareUpgrade): Promise<MsgSoftwareUpgradeResponse>;
88
+ CancelUpgrade(request: MsgCancelUpgrade): Promise<MsgCancelUpgradeResponse>;
89
+ }
90
+ interface Rpc {
91
+ request(service: string, method: string, data: Uint8Array): Promise<Uint8Array>;
92
+ }
93
+ declare type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
94
+ export declare type DeepPartial<T> = T extends Builtin ? T : T extends Long ? string | number | Long : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
95
+ [K in keyof T]?: DeepPartial<T[K]>;
96
+ } : Partial<T>;
97
+ export {};