coreum-js 2.16.3 → 2.17.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/dist/main/client/index.js +15 -16
- package/dist/main/coreum/asset/ft/v1/authz.d.ts +38 -0
- package/dist/main/coreum/asset/ft/v1/authz.js +122 -0
- package/dist/main/coreum/asset/ft/v1/event.d.ts +52 -28
- package/dist/main/coreum/asset/ft/v1/event.js +744 -138
- package/dist/main/coreum/asset/ft/v1/genesis.d.ts +31 -21
- package/dist/main/coreum/asset/ft/v1/genesis.js +273 -62
- package/dist/main/coreum/asset/ft/v1/params.d.ts +12 -11
- package/dist/main/coreum/asset/ft/v1/params.js +37 -33
- package/dist/main/coreum/asset/ft/v1/query.d.ts +87 -127
- package/dist/main/coreum/asset/ft/v1/query.js +697 -217
- package/dist/main/coreum/asset/ft/v1/token.d.ts +17 -51
- package/dist/main/coreum/asset/ft/v1/token.js +276 -200
- package/dist/main/coreum/asset/ft/v1/tx.d.ts +30 -147
- package/dist/main/coreum/asset/ft/v1/tx.js +502 -386
- package/dist/main/coreum/asset/index.d.ts +2 -3
- package/dist/main/coreum/asset/nft/v1/authz.d.ts +33 -0
- package/dist/main/coreum/asset/nft/v1/authz.js +137 -0
- package/dist/main/coreum/asset/nft/v1/event.d.ts +35 -43
- package/dist/main/coreum/asset/nft/v1/event.js +475 -147
- package/dist/main/coreum/asset/nft/v1/genesis.d.ts +27 -36
- package/dist/main/coreum/asset/nft/v1/genesis.js +311 -119
- package/dist/main/coreum/asset/nft/v1/nft.d.ts +20 -26
- package/dist/main/coreum/asset/nft/v1/nft.js +139 -104
- package/dist/main/coreum/asset/nft/v1/params.d.ts +12 -12
- package/dist/main/coreum/asset/nft/v1/params.js +17 -20
- package/dist/main/coreum/asset/nft/v1/query.d.ts +110 -88
- package/dist/main/coreum/asset/nft/v1/query.js +1079 -185
- package/dist/main/coreum/asset/nft/v1/tx.d.ts +96 -70
- package/dist/main/coreum/asset/nft/v1/tx.js +865 -234
- package/dist/main/coreum/asset/nft/v1/types.d.ts +38 -11
- package/dist/main/coreum/asset/nft/v1/types.js +273 -45
- package/dist/main/coreum/customparams/v1/genesis.d.ts +12 -12
- package/dist/main/coreum/customparams/v1/genesis.js +26 -22
- package/dist/main/coreum/customparams/v1/params.d.ts +11 -11
- package/dist/main/coreum/customparams/v1/params.js +23 -20
- package/dist/main/coreum/customparams/v1/query.d.ts +14 -20
- package/dist/main/coreum/customparams/v1/query.js +35 -29
- package/dist/main/coreum/dex/index.d.ts +1 -0
- package/dist/main/coreum/dex/index.js +12 -0
- package/dist/main/coreum/dex/v1/event.d.ts +73 -0
- package/dist/main/coreum/dex/v1/event.js +470 -0
- package/dist/main/coreum/dex/v1/genesis.d.ts +49 -0
- package/dist/main/coreum/dex/v1/genesis.js +318 -0
- package/dist/main/coreum/dex/v1/order.d.ts +172 -0
- package/dist/main/coreum/dex/v1/order.js +1137 -0
- package/dist/main/coreum/dex/v1/params.d.ts +34 -0
- package/dist/main/coreum/dex/v1/params.js +139 -0
- package/dist/main/coreum/dex/v1/query.d.ts +133 -0
- package/dist/main/coreum/dex/v1/query.js +873 -0
- package/dist/main/coreum/dex/v1/tx.d.ts +102 -0
- package/dist/main/coreum/dex/v1/tx.js +521 -0
- package/dist/main/coreum/extensions/dex.d.ts +12 -0
- package/dist/main/coreum/extensions/dex.js +32 -0
- package/dist/main/coreum/extensions/ft.js +2 -1
- package/dist/main/coreum/extensions/nft.js +2 -1
- package/dist/main/coreum/extensions/nftbeta.js +2 -1
- package/dist/main/coreum/feemodel/v1/genesis.d.ts +13 -13
- package/dist/main/coreum/feemodel/v1/genesis.js +23 -24
- package/dist/main/coreum/feemodel/v1/params.d.ts +14 -21
- package/dist/main/coreum/feemodel/v1/params.js +113 -66
- package/dist/main/coreum/feemodel/v1/query.d.ts +30 -37
- package/dist/main/coreum/feemodel/v1/query.js +196 -43
- package/dist/main/coreum/index.d.ts +46 -0
- package/dist/main/coreum/index.js +58 -1
- package/dist/main/coreum/nft/index.d.ts +1 -2
- package/dist/main/coreum/nft/v1beta1/event.d.ts +23 -27
- package/dist/main/coreum/nft/v1beta1/event.js +103 -77
- package/dist/main/coreum/nft/v1beta1/genesis.d.ts +13 -19
- package/dist/main/coreum/nft/v1beta1/genesis.js +50 -52
- package/dist/main/coreum/nft/v1beta1/nft.d.ts +15 -22
- package/dist/main/coreum/nft/v1beta1/nft.js +111 -81
- package/dist/main/coreum/nft/v1beta1/query.d.ts +54 -124
- package/dist/main/coreum/nft/v1beta1/query.js +259 -223
- package/dist/main/coreum/nft/v1beta1/tx.d.ts +13 -19
- package/dist/main/coreum/nft/v1beta1/tx.js +54 -43
- package/dist/main/cosmos/extensions/bank.js +2 -1
- package/dist/main/cosmos/extensions/distribution.d.ts +4 -4
- package/dist/main/cosmos/extensions/distribution.js +11 -10
- package/dist/main/cosmos/extensions/gov.d.ts +13 -13
- package/dist/main/cosmos/extensions/gov.js +16 -9
- package/dist/main/cosmos/index.d.ts +8 -8
- package/dist/main/google/api/http.d.ts +2636 -6
- package/dist/main/google/api/http.js +18 -21
- package/dist/main/google/protobuf/any.d.ts +14 -2
- package/dist/main/google/protobuf/any.js +6 -7
- package/dist/main/google/protobuf/duration.d.ts +14 -2
- package/dist/main/google/protobuf/duration.js +3 -4
- package/dist/main/google/protobuf/timestamp.d.ts +14 -2
- package/dist/main/google/protobuf/timestamp.js +3 -4
- package/dist/main/index.js +7 -17
- package/dist/main/services/cosmostation.js +1 -1
- package/dist/main/tendermint/abci/types.d.ts +6360 -92
- package/dist/main/tendermint/abci/types.js +195 -235
- package/dist/main/tendermint/crypto/keys.d.ts +14 -2
- package/dist/main/tendermint/crypto/keys.js +3 -4
- package/dist/main/tendermint/crypto/proof.d.ts +152 -10
- package/dist/main/tendermint/crypto/proof.js +19 -24
- package/dist/main/tendermint/types/params.d.ts +196 -12
- package/dist/main/tendermint/types/params.js +15 -20
- package/dist/main/tendermint/types/types.d.ts +1744 -26
- package/dist/main/tendermint/types/types.js +62 -73
- package/dist/main/tendermint/types/validator.d.ts +230 -6
- package/dist/main/tendermint/types/validator.js +10 -13
- package/dist/main/tendermint/version/types.d.ts +28 -4
- package/dist/main/tendermint/version/types.js +6 -8
- package/dist/main/types/core.d.ts +2 -1
- package/dist/main/types/core.js +2 -0
- package/dist/main/utils/convertStringToAny.d.ts +0 -1
- package/dist/main/utils/nft.js +2 -1
- package/dist/main/wasm/v1/authz.d.ts +20 -75
- package/dist/main/wasm/v1/authz.js +129 -148
- package/dist/main/wasm/v1/extensions/wasm.js +2 -1
- package/dist/main/wasm/v1/genesis.d.ts +14 -34
- package/dist/main/wasm/v1/genesis.js +169 -140
- package/dist/main/wasm/v1/ibc.d.ts +13 -26
- package/dist/main/wasm/v1/ibc.js +91 -76
- package/dist/main/wasm/v1/index.d.ts +1 -2
- package/dist/main/wasm/v1/pagination.d.ts +40 -4
- package/dist/main/wasm/v1/pagination.js +9 -11
- package/dist/main/wasm/v1/proposal.d.ts +23 -106
- package/dist/main/wasm/v1/proposal.js +634 -465
- package/dist/main/wasm/v1/query.d.ts +35 -187
- package/dist/main/wasm/v1/query.js +370 -363
- package/dist/main/wasm/v1/tx.d.ts +37 -210
- package/dist/main/wasm/v1/tx.js +621 -497
- package/dist/main/wasm/v1/types.d.ts +19 -67
- package/dist/main/wasm/v1/types.js +224 -195
- package/dist/module/client/index.js +2 -1
- package/dist/module/coreum/asset/ft/v1/authz.d.ts +38 -0
- package/dist/module/coreum/asset/ft/v1/authz.js +119 -0
- package/dist/module/coreum/asset/ft/v1/event.d.ts +52 -28
- package/dist/module/coreum/asset/ft/v1/event.js +721 -109
- package/dist/module/coreum/asset/ft/v1/genesis.d.ts +31 -21
- package/dist/module/coreum/asset/ft/v1/genesis.js +266 -50
- package/dist/module/coreum/asset/ft/v1/params.d.ts +12 -11
- package/dist/module/coreum/asset/ft/v1/params.js +35 -27
- package/dist/module/coreum/asset/ft/v1/query.d.ts +87 -127
- package/dist/module/coreum/asset/ft/v1/query.js +672 -180
- package/dist/module/coreum/asset/ft/v1/token.d.ts +17 -51
- package/dist/module/coreum/asset/ft/v1/token.js +236 -152
- package/dist/module/coreum/asset/ft/v1/tx.d.ts +30 -147
- package/dist/module/coreum/asset/ft/v1/tx.js +437 -301
- package/dist/module/coreum/asset/index.d.ts +2 -3
- package/dist/module/coreum/asset/nft/v1/authz.d.ts +33 -0
- package/dist/module/coreum/asset/nft/v1/authz.js +134 -0
- package/dist/module/coreum/asset/nft/v1/event.d.ts +35 -43
- package/dist/module/coreum/asset/nft/v1/event.js +448 -112
- package/dist/module/coreum/asset/nft/v1/genesis.d.ts +27 -36
- package/dist/module/coreum/asset/nft/v1/genesis.js +299 -100
- package/dist/module/coreum/asset/nft/v1/nft.d.ts +20 -26
- package/dist/module/coreum/asset/nft/v1/nft.js +121 -81
- package/dist/module/coreum/asset/nft/v1/params.d.ts +12 -12
- package/dist/module/coreum/asset/nft/v1/params.js +16 -16
- package/dist/module/coreum/asset/nft/v1/query.d.ts +110 -88
- package/dist/module/coreum/asset/nft/v1/query.js +1057 -153
- package/dist/module/coreum/asset/nft/v1/tx.d.ts +96 -70
- package/dist/module/coreum/asset/nft/v1/tx.js +825 -184
- package/dist/module/coreum/asset/nft/v1/types.d.ts +38 -11
- package/dist/module/coreum/asset/nft/v1/types.js +269 -39
- package/dist/module/coreum/customparams/v1/genesis.d.ts +12 -12
- package/dist/module/coreum/customparams/v1/genesis.js +25 -18
- package/dist/module/coreum/customparams/v1/params.d.ts +11 -11
- package/dist/module/coreum/customparams/v1/params.js +21 -14
- package/dist/module/coreum/customparams/v1/query.d.ts +14 -20
- package/dist/module/coreum/customparams/v1/query.js +32 -23
- package/dist/module/coreum/dex/index.d.ts +1 -0
- package/dist/module/coreum/dex/index.js +9 -0
- package/dist/module/coreum/dex/v1/event.d.ts +73 -0
- package/dist/module/coreum/dex/v1/event.js +467 -0
- package/dist/module/coreum/dex/v1/genesis.d.ts +49 -0
- package/dist/module/coreum/dex/v1/genesis.js +315 -0
- package/dist/module/coreum/dex/v1/order.d.ts +172 -0
- package/dist/module/coreum/dex/v1/order.js +1128 -0
- package/dist/module/coreum/dex/v1/params.d.ts +34 -0
- package/dist/module/coreum/dex/v1/params.js +136 -0
- package/dist/module/coreum/dex/v1/query.d.ts +133 -0
- package/dist/module/coreum/dex/v1/query.js +871 -0
- package/dist/module/coreum/dex/v1/tx.d.ts +102 -0
- package/dist/module/coreum/dex/v1/tx.js +519 -0
- package/dist/module/coreum/extensions/dex.d.ts +12 -0
- package/dist/module/coreum/extensions/dex.js +28 -0
- package/dist/module/coreum/feemodel/v1/genesis.d.ts +13 -13
- package/dist/module/coreum/feemodel/v1/genesis.js +22 -20
- package/dist/module/coreum/feemodel/v1/params.d.ts +14 -21
- package/dist/module/coreum/feemodel/v1/params.js +105 -54
- package/dist/module/coreum/feemodel/v1/query.d.ts +30 -37
- package/dist/module/coreum/feemodel/v1/query.js +191 -35
- package/dist/module/coreum/index.d.ts +46 -0
- package/dist/module/coreum/index.js +57 -0
- package/dist/module/coreum/nft/index.d.ts +1 -2
- package/dist/module/coreum/nft/v1beta1/event.d.ts +23 -27
- package/dist/module/coreum/nft/v1beta1/event.js +90 -58
- package/dist/module/coreum/nft/v1beta1/genesis.d.ts +13 -19
- package/dist/module/coreum/nft/v1beta1/genesis.js +44 -41
- package/dist/module/coreum/nft/v1beta1/nft.d.ts +15 -22
- package/dist/module/coreum/nft/v1beta1/nft.js +99 -64
- package/dist/module/coreum/nft/v1beta1/query.d.ts +54 -124
- package/dist/module/coreum/nft/v1beta1/query.js +231 -183
- package/dist/module/coreum/nft/v1beta1/tx.d.ts +13 -19
- package/dist/module/coreum/nft/v1beta1/tx.js +47 -32
- package/dist/module/cosmos/extensions/distribution.d.ts +4 -4
- package/dist/module/cosmos/extensions/gov.d.ts +13 -13
- package/dist/module/cosmos/index.d.ts +8 -8
- package/dist/module/google/api/http.d.ts +2636 -6
- package/dist/module/google/protobuf/any.d.ts +14 -2
- package/dist/module/google/protobuf/duration.d.ts +14 -2
- package/dist/module/google/protobuf/timestamp.d.ts +14 -2
- package/dist/module/services/cosmostation.js +1 -1
- package/dist/module/tendermint/abci/types.d.ts +6360 -92
- package/dist/module/tendermint/crypto/keys.d.ts +14 -2
- package/dist/module/tendermint/crypto/proof.d.ts +152 -10
- package/dist/module/tendermint/types/params.d.ts +196 -12
- package/dist/module/tendermint/types/types.d.ts +1744 -26
- package/dist/module/tendermint/types/validator.d.ts +230 -6
- package/dist/module/tendermint/version/types.d.ts +28 -4
- package/dist/module/types/core.d.ts +2 -1
- package/dist/module/types/core.js +2 -0
- package/dist/module/utils/convertStringToAny.d.ts +0 -1
- package/dist/module/wasm/v1/authz.d.ts +20 -75
- package/dist/module/wasm/v1/authz.js +111 -119
- package/dist/module/wasm/v1/genesis.d.ts +14 -34
- package/dist/module/wasm/v1/genesis.js +161 -125
- package/dist/module/wasm/v1/ibc.d.ts +13 -26
- package/dist/module/wasm/v1/ibc.js +83 -62
- package/dist/module/wasm/v1/index.d.ts +1 -2
- package/dist/module/wasm/v1/pagination.d.ts +40 -4
- package/dist/module/wasm/v1/proposal.d.ts +23 -106
- package/dist/module/wasm/v1/proposal.js +562 -377
- package/dist/module/wasm/v1/query.d.ts +35 -187
- package/dist/module/wasm/v1/query.js +330 -301
- package/dist/module/wasm/v1/tx.d.ts +37 -210
- package/dist/module/wasm/v1/tx.js +551 -404
- package/dist/module/wasm/v1/types.d.ts +19 -67
- package/dist/module/wasm/v1/types.js +196 -156
- package/package.json +11 -10
|
@@ -3,11 +3,7 @@ var __importDefault = (this && this.__importDefault) || function (mod) {
|
|
|
3
3
|
return (mod && mod.__esModule) ? mod : { "default": mod };
|
|
4
4
|
};
|
|
5
5
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
6
|
-
exports.TxProof = exports.BlockMeta = exports.LightBlock = exports.SignedHeader = exports.Proposal = exports.CommitSig = exports.Commit = exports.Vote = exports.Data = exports.Header = exports.BlockID = exports.Part = exports.PartSetHeader = exports.SignedMsgType = exports.BlockIDFlag = exports.protobufPackage = void 0;
|
|
7
|
-
exports.blockIDFlagFromJSON = blockIDFlagFromJSON;
|
|
8
|
-
exports.blockIDFlagToJSON = blockIDFlagToJSON;
|
|
9
|
-
exports.signedMsgTypeFromJSON = signedMsgTypeFromJSON;
|
|
10
|
-
exports.signedMsgTypeToJSON = signedMsgTypeToJSON;
|
|
6
|
+
exports.TxProof = exports.BlockMeta = exports.LightBlock = exports.SignedHeader = exports.Proposal = exports.CommitSig = exports.Commit = exports.Vote = exports.Data = exports.Header = exports.BlockID = exports.Part = exports.PartSetHeader = exports.signedMsgTypeToJSON = exports.signedMsgTypeFromJSON = exports.SignedMsgType = exports.blockIDFlagToJSON = exports.blockIDFlagFromJSON = exports.BlockIDFlag = exports.protobufPackage = void 0;
|
|
11
7
|
/* eslint-disable */
|
|
12
8
|
const long_1 = __importDefault(require("long"));
|
|
13
9
|
const minimal_1 = __importDefault(require("protobufjs/minimal"));
|
|
@@ -45,6 +41,7 @@ function blockIDFlagFromJSON(object) {
|
|
|
45
41
|
return BlockIDFlag.UNRECOGNIZED;
|
|
46
42
|
}
|
|
47
43
|
}
|
|
44
|
+
exports.blockIDFlagFromJSON = blockIDFlagFromJSON;
|
|
48
45
|
function blockIDFlagToJSON(object) {
|
|
49
46
|
switch (object) {
|
|
50
47
|
case BlockIDFlag.BLOCK_ID_FLAG_UNKNOWN:
|
|
@@ -60,6 +57,7 @@ function blockIDFlagToJSON(object) {
|
|
|
60
57
|
return "UNRECOGNIZED";
|
|
61
58
|
}
|
|
62
59
|
}
|
|
60
|
+
exports.blockIDFlagToJSON = blockIDFlagToJSON;
|
|
63
61
|
/** SignedMsgType is a type of signed message in the consensus. */
|
|
64
62
|
var SignedMsgType;
|
|
65
63
|
(function (SignedMsgType) {
|
|
@@ -91,6 +89,7 @@ function signedMsgTypeFromJSON(object) {
|
|
|
91
89
|
return SignedMsgType.UNRECOGNIZED;
|
|
92
90
|
}
|
|
93
91
|
}
|
|
92
|
+
exports.signedMsgTypeFromJSON = signedMsgTypeFromJSON;
|
|
94
93
|
function signedMsgTypeToJSON(object) {
|
|
95
94
|
switch (object) {
|
|
96
95
|
case SignedMsgType.SIGNED_MSG_TYPE_UNKNOWN:
|
|
@@ -106,6 +105,7 @@ function signedMsgTypeToJSON(object) {
|
|
|
106
105
|
return "UNRECOGNIZED";
|
|
107
106
|
}
|
|
108
107
|
}
|
|
108
|
+
exports.signedMsgTypeToJSON = signedMsgTypeToJSON;
|
|
109
109
|
function createBasePartSetHeader() {
|
|
110
110
|
return { total: 0, hash: new Uint8Array() };
|
|
111
111
|
}
|
|
@@ -162,13 +162,12 @@ exports.PartSetHeader = {
|
|
|
162
162
|
return obj;
|
|
163
163
|
},
|
|
164
164
|
create(base) {
|
|
165
|
-
return exports.PartSetHeader.fromPartial(base
|
|
165
|
+
return exports.PartSetHeader.fromPartial(base ?? {});
|
|
166
166
|
},
|
|
167
167
|
fromPartial(object) {
|
|
168
|
-
var _a, _b;
|
|
169
168
|
const message = createBasePartSetHeader();
|
|
170
|
-
message.total =
|
|
171
|
-
message.hash =
|
|
169
|
+
message.total = object.total ?? 0;
|
|
170
|
+
message.hash = object.hash ?? new Uint8Array();
|
|
172
171
|
return message;
|
|
173
172
|
},
|
|
174
173
|
};
|
|
@@ -240,13 +239,12 @@ exports.Part = {
|
|
|
240
239
|
return obj;
|
|
241
240
|
},
|
|
242
241
|
create(base) {
|
|
243
|
-
return exports.Part.fromPartial(base
|
|
242
|
+
return exports.Part.fromPartial(base ?? {});
|
|
244
243
|
},
|
|
245
244
|
fromPartial(object) {
|
|
246
|
-
var _a, _b;
|
|
247
245
|
const message = createBasePart();
|
|
248
|
-
message.index =
|
|
249
|
-
message.bytes =
|
|
246
|
+
message.index = object.index ?? 0;
|
|
247
|
+
message.bytes = object.bytes ?? new Uint8Array();
|
|
250
248
|
message.proof =
|
|
251
249
|
object.proof !== undefined && object.proof !== null
|
|
252
250
|
? proof_1.Proof.fromPartial(object.proof)
|
|
@@ -315,12 +313,11 @@ exports.BlockID = {
|
|
|
315
313
|
return obj;
|
|
316
314
|
},
|
|
317
315
|
create(base) {
|
|
318
|
-
return exports.BlockID.fromPartial(base
|
|
316
|
+
return exports.BlockID.fromPartial(base ?? {});
|
|
319
317
|
},
|
|
320
318
|
fromPartial(object) {
|
|
321
|
-
var _a;
|
|
322
319
|
const message = createBaseBlockID();
|
|
323
|
-
message.hash =
|
|
320
|
+
message.hash = object.hash ?? new Uint8Array();
|
|
324
321
|
message.partSetHeader =
|
|
325
322
|
object.partSetHeader !== undefined && object.partSetHeader !== null
|
|
326
323
|
? exports.PartSetHeader.fromPartial(object.partSetHeader)
|
|
@@ -579,31 +576,30 @@ exports.Header = {
|
|
|
579
576
|
return obj;
|
|
580
577
|
},
|
|
581
578
|
create(base) {
|
|
582
|
-
return exports.Header.fromPartial(base
|
|
579
|
+
return exports.Header.fromPartial(base ?? {});
|
|
583
580
|
},
|
|
584
581
|
fromPartial(object) {
|
|
585
|
-
var _a, _b, _c, _d, _e, _f, _g, _h, _j, _k, _l, _m;
|
|
586
582
|
const message = createBaseHeader();
|
|
587
583
|
message.version =
|
|
588
584
|
object.version !== undefined && object.version !== null
|
|
589
585
|
? types_1.Consensus.fromPartial(object.version)
|
|
590
586
|
: undefined;
|
|
591
|
-
message.chainId =
|
|
592
|
-
message.height =
|
|
593
|
-
message.time =
|
|
587
|
+
message.chainId = object.chainId ?? "";
|
|
588
|
+
message.height = object.height ?? 0;
|
|
589
|
+
message.time = object.time ?? undefined;
|
|
594
590
|
message.lastBlockId =
|
|
595
591
|
object.lastBlockId !== undefined && object.lastBlockId !== null
|
|
596
592
|
? exports.BlockID.fromPartial(object.lastBlockId)
|
|
597
593
|
: undefined;
|
|
598
|
-
message.lastCommitHash =
|
|
599
|
-
message.dataHash =
|
|
600
|
-
message.validatorsHash =
|
|
601
|
-
message.nextValidatorsHash =
|
|
602
|
-
message.consensusHash =
|
|
603
|
-
message.appHash =
|
|
604
|
-
message.lastResultsHash =
|
|
605
|
-
message.evidenceHash =
|
|
606
|
-
message.proposerAddress =
|
|
594
|
+
message.lastCommitHash = object.lastCommitHash ?? new Uint8Array();
|
|
595
|
+
message.dataHash = object.dataHash ?? new Uint8Array();
|
|
596
|
+
message.validatorsHash = object.validatorsHash ?? new Uint8Array();
|
|
597
|
+
message.nextValidatorsHash = object.nextValidatorsHash ?? new Uint8Array();
|
|
598
|
+
message.consensusHash = object.consensusHash ?? new Uint8Array();
|
|
599
|
+
message.appHash = object.appHash ?? new Uint8Array();
|
|
600
|
+
message.lastResultsHash = object.lastResultsHash ?? new Uint8Array();
|
|
601
|
+
message.evidenceHash = object.evidenceHash ?? new Uint8Array();
|
|
602
|
+
message.proposerAddress = object.proposerAddress ?? new Uint8Array();
|
|
607
603
|
return message;
|
|
608
604
|
},
|
|
609
605
|
};
|
|
@@ -640,7 +636,7 @@ exports.Data = {
|
|
|
640
636
|
},
|
|
641
637
|
fromJSON(object) {
|
|
642
638
|
return {
|
|
643
|
-
txs: Array.isArray(object
|
|
639
|
+
txs: Array.isArray(object?.txs)
|
|
644
640
|
? object.txs.map((e) => bytesFromBase64(e))
|
|
645
641
|
: [],
|
|
646
642
|
};
|
|
@@ -656,12 +652,11 @@ exports.Data = {
|
|
|
656
652
|
return obj;
|
|
657
653
|
},
|
|
658
654
|
create(base) {
|
|
659
|
-
return exports.Data.fromPartial(base
|
|
655
|
+
return exports.Data.fromPartial(base ?? {});
|
|
660
656
|
},
|
|
661
657
|
fromPartial(object) {
|
|
662
|
-
var _a;
|
|
663
658
|
const message = createBaseData();
|
|
664
|
-
message.txs =
|
|
659
|
+
message.txs = object.txs?.map((e) => e) || [];
|
|
665
660
|
return message;
|
|
666
661
|
},
|
|
667
662
|
};
|
|
@@ -813,22 +808,21 @@ exports.Vote = {
|
|
|
813
808
|
return obj;
|
|
814
809
|
},
|
|
815
810
|
create(base) {
|
|
816
|
-
return exports.Vote.fromPartial(base
|
|
811
|
+
return exports.Vote.fromPartial(base ?? {});
|
|
817
812
|
},
|
|
818
813
|
fromPartial(object) {
|
|
819
|
-
var _a, _b, _c, _d, _e, _f, _g;
|
|
820
814
|
const message = createBaseVote();
|
|
821
|
-
message.type =
|
|
822
|
-
message.height =
|
|
823
|
-
message.round =
|
|
815
|
+
message.type = object.type ?? 0;
|
|
816
|
+
message.height = object.height ?? 0;
|
|
817
|
+
message.round = object.round ?? 0;
|
|
824
818
|
message.blockId =
|
|
825
819
|
object.blockId !== undefined && object.blockId !== null
|
|
826
820
|
? exports.BlockID.fromPartial(object.blockId)
|
|
827
821
|
: undefined;
|
|
828
|
-
message.timestamp =
|
|
829
|
-
message.validatorAddress =
|
|
830
|
-
message.validatorIndex =
|
|
831
|
-
message.signature =
|
|
822
|
+
message.timestamp = object.timestamp ?? undefined;
|
|
823
|
+
message.validatorAddress = object.validatorAddress ?? new Uint8Array();
|
|
824
|
+
message.validatorIndex = object.validatorIndex ?? 0;
|
|
825
|
+
message.signature = object.signature ?? new Uint8Array();
|
|
832
826
|
return message;
|
|
833
827
|
},
|
|
834
828
|
};
|
|
@@ -897,7 +891,7 @@ exports.Commit = {
|
|
|
897
891
|
blockId: isSet(object.blockId)
|
|
898
892
|
? exports.BlockID.fromJSON(object.blockId)
|
|
899
893
|
: undefined,
|
|
900
|
-
signatures: Array.isArray(object
|
|
894
|
+
signatures: Array.isArray(object?.signatures)
|
|
901
895
|
? object.signatures.map((e) => exports.CommitSig.fromJSON(e))
|
|
902
896
|
: [],
|
|
903
897
|
};
|
|
@@ -919,19 +913,18 @@ exports.Commit = {
|
|
|
919
913
|
return obj;
|
|
920
914
|
},
|
|
921
915
|
create(base) {
|
|
922
|
-
return exports.Commit.fromPartial(base
|
|
916
|
+
return exports.Commit.fromPartial(base ?? {});
|
|
923
917
|
},
|
|
924
918
|
fromPartial(object) {
|
|
925
|
-
var _a, _b, _c;
|
|
926
919
|
const message = createBaseCommit();
|
|
927
|
-
message.height =
|
|
928
|
-
message.round =
|
|
920
|
+
message.height = object.height ?? 0;
|
|
921
|
+
message.round = object.round ?? 0;
|
|
929
922
|
message.blockId =
|
|
930
923
|
object.blockId !== undefined && object.blockId !== null
|
|
931
924
|
? exports.BlockID.fromPartial(object.blockId)
|
|
932
925
|
: undefined;
|
|
933
926
|
message.signatures =
|
|
934
|
-
|
|
927
|
+
object.signatures?.map((e) => exports.CommitSig.fromPartial(e)) || [];
|
|
935
928
|
return message;
|
|
936
929
|
},
|
|
937
930
|
};
|
|
@@ -1029,15 +1022,14 @@ exports.CommitSig = {
|
|
|
1029
1022
|
return obj;
|
|
1030
1023
|
},
|
|
1031
1024
|
create(base) {
|
|
1032
|
-
return exports.CommitSig.fromPartial(base
|
|
1025
|
+
return exports.CommitSig.fromPartial(base ?? {});
|
|
1033
1026
|
},
|
|
1034
1027
|
fromPartial(object) {
|
|
1035
|
-
var _a, _b, _c, _d;
|
|
1036
1028
|
const message = createBaseCommitSig();
|
|
1037
|
-
message.blockIdFlag =
|
|
1038
|
-
message.validatorAddress =
|
|
1039
|
-
message.timestamp =
|
|
1040
|
-
message.signature =
|
|
1029
|
+
message.blockIdFlag = object.blockIdFlag ?? 0;
|
|
1030
|
+
message.validatorAddress = object.validatorAddress ?? new Uint8Array();
|
|
1031
|
+
message.timestamp = object.timestamp ?? undefined;
|
|
1032
|
+
message.signature = object.signature ?? new Uint8Array();
|
|
1041
1033
|
return message;
|
|
1042
1034
|
},
|
|
1043
1035
|
};
|
|
@@ -1170,21 +1162,20 @@ exports.Proposal = {
|
|
|
1170
1162
|
return obj;
|
|
1171
1163
|
},
|
|
1172
1164
|
create(base) {
|
|
1173
|
-
return exports.Proposal.fromPartial(base
|
|
1165
|
+
return exports.Proposal.fromPartial(base ?? {});
|
|
1174
1166
|
},
|
|
1175
1167
|
fromPartial(object) {
|
|
1176
|
-
var _a, _b, _c, _d, _e, _f;
|
|
1177
1168
|
const message = createBaseProposal();
|
|
1178
|
-
message.type =
|
|
1179
|
-
message.height =
|
|
1180
|
-
message.round =
|
|
1181
|
-
message.polRound =
|
|
1169
|
+
message.type = object.type ?? 0;
|
|
1170
|
+
message.height = object.height ?? 0;
|
|
1171
|
+
message.round = object.round ?? 0;
|
|
1172
|
+
message.polRound = object.polRound ?? 0;
|
|
1182
1173
|
message.blockId =
|
|
1183
1174
|
object.blockId !== undefined && object.blockId !== null
|
|
1184
1175
|
? exports.BlockID.fromPartial(object.blockId)
|
|
1185
1176
|
: undefined;
|
|
1186
|
-
message.timestamp =
|
|
1187
|
-
message.signature =
|
|
1177
|
+
message.timestamp = object.timestamp ?? undefined;
|
|
1178
|
+
message.signature = object.signature ?? new Uint8Array();
|
|
1188
1179
|
return message;
|
|
1189
1180
|
},
|
|
1190
1181
|
};
|
|
@@ -1243,7 +1234,7 @@ exports.SignedHeader = {
|
|
|
1243
1234
|
return obj;
|
|
1244
1235
|
},
|
|
1245
1236
|
create(base) {
|
|
1246
|
-
return exports.SignedHeader.fromPartial(base
|
|
1237
|
+
return exports.SignedHeader.fromPartial(base ?? {});
|
|
1247
1238
|
},
|
|
1248
1239
|
fromPartial(object) {
|
|
1249
1240
|
const message = createBaseSignedHeader();
|
|
@@ -1321,7 +1312,7 @@ exports.LightBlock = {
|
|
|
1321
1312
|
return obj;
|
|
1322
1313
|
},
|
|
1323
1314
|
create(base) {
|
|
1324
|
-
return exports.LightBlock.fromPartial(base
|
|
1315
|
+
return exports.LightBlock.fromPartial(base ?? {});
|
|
1325
1316
|
},
|
|
1326
1317
|
fromPartial(object) {
|
|
1327
1318
|
const message = createBaseLightBlock();
|
|
@@ -1418,21 +1409,20 @@ exports.BlockMeta = {
|
|
|
1418
1409
|
return obj;
|
|
1419
1410
|
},
|
|
1420
1411
|
create(base) {
|
|
1421
|
-
return exports.BlockMeta.fromPartial(base
|
|
1412
|
+
return exports.BlockMeta.fromPartial(base ?? {});
|
|
1422
1413
|
},
|
|
1423
1414
|
fromPartial(object) {
|
|
1424
|
-
var _a, _b;
|
|
1425
1415
|
const message = createBaseBlockMeta();
|
|
1426
1416
|
message.blockId =
|
|
1427
1417
|
object.blockId !== undefined && object.blockId !== null
|
|
1428
1418
|
? exports.BlockID.fromPartial(object.blockId)
|
|
1429
1419
|
: undefined;
|
|
1430
|
-
message.blockSize =
|
|
1420
|
+
message.blockSize = object.blockSize ?? 0;
|
|
1431
1421
|
message.header =
|
|
1432
1422
|
object.header !== undefined && object.header !== null
|
|
1433
1423
|
? exports.Header.fromPartial(object.header)
|
|
1434
1424
|
: undefined;
|
|
1435
|
-
message.numTxs =
|
|
1425
|
+
message.numTxs = object.numTxs ?? 0;
|
|
1436
1426
|
return message;
|
|
1437
1427
|
},
|
|
1438
1428
|
};
|
|
@@ -1511,13 +1501,12 @@ exports.TxProof = {
|
|
|
1511
1501
|
return obj;
|
|
1512
1502
|
},
|
|
1513
1503
|
create(base) {
|
|
1514
|
-
return exports.TxProof.fromPartial(base
|
|
1504
|
+
return exports.TxProof.fromPartial(base ?? {});
|
|
1515
1505
|
},
|
|
1516
1506
|
fromPartial(object) {
|
|
1517
|
-
var _a, _b;
|
|
1518
1507
|
const message = createBaseTxProof();
|
|
1519
|
-
message.rootHash =
|
|
1520
|
-
message.data =
|
|
1508
|
+
message.rootHash = object.rootHash ?? new Uint8Array();
|
|
1509
|
+
message.data = object.data ?? new Uint8Array();
|
|
1521
1510
|
message.proof =
|
|
1522
1511
|
object.proof !== undefined && object.proof !== null
|
|
1523
1512
|
? proof_1.Proof.fromPartial(object.proof)
|
|
@@ -21,24 +21,248 @@ export declare const ValidatorSet: {
|
|
|
21
21
|
decode(input: _m0.Reader | Uint8Array, length?: number): ValidatorSet;
|
|
22
22
|
fromJSON(object: any): ValidatorSet;
|
|
23
23
|
toJSON(message: ValidatorSet): unknown;
|
|
24
|
-
create<I extends
|
|
25
|
-
|
|
24
|
+
create<I extends {
|
|
25
|
+
validators?: {
|
|
26
|
+
address?: Uint8Array;
|
|
27
|
+
pubKey?: {
|
|
28
|
+
ed25519?: Uint8Array;
|
|
29
|
+
secp256k1?: Uint8Array;
|
|
30
|
+
};
|
|
31
|
+
votingPower?: number;
|
|
32
|
+
proposerPriority?: number;
|
|
33
|
+
}[];
|
|
34
|
+
proposer?: {
|
|
35
|
+
address?: Uint8Array;
|
|
36
|
+
pubKey?: {
|
|
37
|
+
ed25519?: Uint8Array;
|
|
38
|
+
secp256k1?: Uint8Array;
|
|
39
|
+
};
|
|
40
|
+
votingPower?: number;
|
|
41
|
+
proposerPriority?: number;
|
|
42
|
+
};
|
|
43
|
+
totalVotingPower?: number;
|
|
44
|
+
} & {
|
|
45
|
+
validators?: {
|
|
46
|
+
address?: Uint8Array;
|
|
47
|
+
pubKey?: {
|
|
48
|
+
ed25519?: Uint8Array;
|
|
49
|
+
secp256k1?: Uint8Array;
|
|
50
|
+
};
|
|
51
|
+
votingPower?: number;
|
|
52
|
+
proposerPriority?: number;
|
|
53
|
+
}[] & ({
|
|
54
|
+
address?: Uint8Array;
|
|
55
|
+
pubKey?: {
|
|
56
|
+
ed25519?: Uint8Array;
|
|
57
|
+
secp256k1?: Uint8Array;
|
|
58
|
+
};
|
|
59
|
+
votingPower?: number;
|
|
60
|
+
proposerPriority?: number;
|
|
61
|
+
} & {
|
|
62
|
+
address?: Uint8Array;
|
|
63
|
+
pubKey?: {
|
|
64
|
+
ed25519?: Uint8Array;
|
|
65
|
+
secp256k1?: Uint8Array;
|
|
66
|
+
} & {
|
|
67
|
+
ed25519?: Uint8Array;
|
|
68
|
+
secp256k1?: Uint8Array;
|
|
69
|
+
} & { [K in Exclude<keyof I["validators"][number]["pubKey"], keyof PublicKey>]: never; };
|
|
70
|
+
votingPower?: number;
|
|
71
|
+
proposerPriority?: number;
|
|
72
|
+
} & { [K_1 in Exclude<keyof I["validators"][number], keyof Validator>]: never; })[] & { [K_2 in Exclude<keyof I["validators"], keyof {
|
|
73
|
+
address?: Uint8Array;
|
|
74
|
+
pubKey?: {
|
|
75
|
+
ed25519?: Uint8Array;
|
|
76
|
+
secp256k1?: Uint8Array;
|
|
77
|
+
};
|
|
78
|
+
votingPower?: number;
|
|
79
|
+
proposerPriority?: number;
|
|
80
|
+
}[]>]: never; };
|
|
81
|
+
proposer?: {
|
|
82
|
+
address?: Uint8Array;
|
|
83
|
+
pubKey?: {
|
|
84
|
+
ed25519?: Uint8Array;
|
|
85
|
+
secp256k1?: Uint8Array;
|
|
86
|
+
};
|
|
87
|
+
votingPower?: number;
|
|
88
|
+
proposerPriority?: number;
|
|
89
|
+
} & {
|
|
90
|
+
address?: Uint8Array;
|
|
91
|
+
pubKey?: {
|
|
92
|
+
ed25519?: Uint8Array;
|
|
93
|
+
secp256k1?: Uint8Array;
|
|
94
|
+
} & {
|
|
95
|
+
ed25519?: Uint8Array;
|
|
96
|
+
secp256k1?: Uint8Array;
|
|
97
|
+
} & { [K_3 in Exclude<keyof I["proposer"]["pubKey"], keyof PublicKey>]: never; };
|
|
98
|
+
votingPower?: number;
|
|
99
|
+
proposerPriority?: number;
|
|
100
|
+
} & { [K_4 in Exclude<keyof I["proposer"], keyof Validator>]: never; };
|
|
101
|
+
totalVotingPower?: number;
|
|
102
|
+
} & { [K_5 in Exclude<keyof I, keyof ValidatorSet>]: never; }>(base?: I): ValidatorSet;
|
|
103
|
+
fromPartial<I_1 extends {
|
|
104
|
+
validators?: {
|
|
105
|
+
address?: Uint8Array;
|
|
106
|
+
pubKey?: {
|
|
107
|
+
ed25519?: Uint8Array;
|
|
108
|
+
secp256k1?: Uint8Array;
|
|
109
|
+
};
|
|
110
|
+
votingPower?: number;
|
|
111
|
+
proposerPriority?: number;
|
|
112
|
+
}[];
|
|
113
|
+
proposer?: {
|
|
114
|
+
address?: Uint8Array;
|
|
115
|
+
pubKey?: {
|
|
116
|
+
ed25519?: Uint8Array;
|
|
117
|
+
secp256k1?: Uint8Array;
|
|
118
|
+
};
|
|
119
|
+
votingPower?: number;
|
|
120
|
+
proposerPriority?: number;
|
|
121
|
+
};
|
|
122
|
+
totalVotingPower?: number;
|
|
123
|
+
} & {
|
|
124
|
+
validators?: {
|
|
125
|
+
address?: Uint8Array;
|
|
126
|
+
pubKey?: {
|
|
127
|
+
ed25519?: Uint8Array;
|
|
128
|
+
secp256k1?: Uint8Array;
|
|
129
|
+
};
|
|
130
|
+
votingPower?: number;
|
|
131
|
+
proposerPriority?: number;
|
|
132
|
+
}[] & ({
|
|
133
|
+
address?: Uint8Array;
|
|
134
|
+
pubKey?: {
|
|
135
|
+
ed25519?: Uint8Array;
|
|
136
|
+
secp256k1?: Uint8Array;
|
|
137
|
+
};
|
|
138
|
+
votingPower?: number;
|
|
139
|
+
proposerPriority?: number;
|
|
140
|
+
} & {
|
|
141
|
+
address?: Uint8Array;
|
|
142
|
+
pubKey?: {
|
|
143
|
+
ed25519?: Uint8Array;
|
|
144
|
+
secp256k1?: Uint8Array;
|
|
145
|
+
} & {
|
|
146
|
+
ed25519?: Uint8Array;
|
|
147
|
+
secp256k1?: Uint8Array;
|
|
148
|
+
} & { [K_6 in Exclude<keyof I_1["validators"][number]["pubKey"], keyof PublicKey>]: never; };
|
|
149
|
+
votingPower?: number;
|
|
150
|
+
proposerPriority?: number;
|
|
151
|
+
} & { [K_7 in Exclude<keyof I_1["validators"][number], keyof Validator>]: never; })[] & { [K_8 in Exclude<keyof I_1["validators"], keyof {
|
|
152
|
+
address?: Uint8Array;
|
|
153
|
+
pubKey?: {
|
|
154
|
+
ed25519?: Uint8Array;
|
|
155
|
+
secp256k1?: Uint8Array;
|
|
156
|
+
};
|
|
157
|
+
votingPower?: number;
|
|
158
|
+
proposerPriority?: number;
|
|
159
|
+
}[]>]: never; };
|
|
160
|
+
proposer?: {
|
|
161
|
+
address?: Uint8Array;
|
|
162
|
+
pubKey?: {
|
|
163
|
+
ed25519?: Uint8Array;
|
|
164
|
+
secp256k1?: Uint8Array;
|
|
165
|
+
};
|
|
166
|
+
votingPower?: number;
|
|
167
|
+
proposerPriority?: number;
|
|
168
|
+
} & {
|
|
169
|
+
address?: Uint8Array;
|
|
170
|
+
pubKey?: {
|
|
171
|
+
ed25519?: Uint8Array;
|
|
172
|
+
secp256k1?: Uint8Array;
|
|
173
|
+
} & {
|
|
174
|
+
ed25519?: Uint8Array;
|
|
175
|
+
secp256k1?: Uint8Array;
|
|
176
|
+
} & { [K_9 in Exclude<keyof I_1["proposer"]["pubKey"], keyof PublicKey>]: never; };
|
|
177
|
+
votingPower?: number;
|
|
178
|
+
proposerPriority?: number;
|
|
179
|
+
} & { [K_10 in Exclude<keyof I_1["proposer"], keyof Validator>]: never; };
|
|
180
|
+
totalVotingPower?: number;
|
|
181
|
+
} & { [K_11 in Exclude<keyof I_1, keyof ValidatorSet>]: never; }>(object: I_1): ValidatorSet;
|
|
26
182
|
};
|
|
27
183
|
export declare const Validator: {
|
|
28
184
|
encode(message: Validator, writer?: _m0.Writer): _m0.Writer;
|
|
29
185
|
decode(input: _m0.Reader | Uint8Array, length?: number): Validator;
|
|
30
186
|
fromJSON(object: any): Validator;
|
|
31
187
|
toJSON(message: Validator): unknown;
|
|
32
|
-
create<I extends
|
|
33
|
-
|
|
188
|
+
create<I extends {
|
|
189
|
+
address?: Uint8Array;
|
|
190
|
+
pubKey?: {
|
|
191
|
+
ed25519?: Uint8Array;
|
|
192
|
+
secp256k1?: Uint8Array;
|
|
193
|
+
};
|
|
194
|
+
votingPower?: number;
|
|
195
|
+
proposerPriority?: number;
|
|
196
|
+
} & {
|
|
197
|
+
address?: Uint8Array;
|
|
198
|
+
pubKey?: {
|
|
199
|
+
ed25519?: Uint8Array;
|
|
200
|
+
secp256k1?: Uint8Array;
|
|
201
|
+
} & {
|
|
202
|
+
ed25519?: Uint8Array;
|
|
203
|
+
secp256k1?: Uint8Array;
|
|
204
|
+
} & { [K in Exclude<keyof I["pubKey"], keyof PublicKey>]: never; };
|
|
205
|
+
votingPower?: number;
|
|
206
|
+
proposerPriority?: number;
|
|
207
|
+
} & { [K_1 in Exclude<keyof I, keyof Validator>]: never; }>(base?: I): Validator;
|
|
208
|
+
fromPartial<I_1 extends {
|
|
209
|
+
address?: Uint8Array;
|
|
210
|
+
pubKey?: {
|
|
211
|
+
ed25519?: Uint8Array;
|
|
212
|
+
secp256k1?: Uint8Array;
|
|
213
|
+
};
|
|
214
|
+
votingPower?: number;
|
|
215
|
+
proposerPriority?: number;
|
|
216
|
+
} & {
|
|
217
|
+
address?: Uint8Array;
|
|
218
|
+
pubKey?: {
|
|
219
|
+
ed25519?: Uint8Array;
|
|
220
|
+
secp256k1?: Uint8Array;
|
|
221
|
+
} & {
|
|
222
|
+
ed25519?: Uint8Array;
|
|
223
|
+
secp256k1?: Uint8Array;
|
|
224
|
+
} & { [K_2 in Exclude<keyof I_1["pubKey"], keyof PublicKey>]: never; };
|
|
225
|
+
votingPower?: number;
|
|
226
|
+
proposerPriority?: number;
|
|
227
|
+
} & { [K_3 in Exclude<keyof I_1, keyof Validator>]: never; }>(object: I_1): Validator;
|
|
34
228
|
};
|
|
35
229
|
export declare const SimpleValidator: {
|
|
36
230
|
encode(message: SimpleValidator, writer?: _m0.Writer): _m0.Writer;
|
|
37
231
|
decode(input: _m0.Reader | Uint8Array, length?: number): SimpleValidator;
|
|
38
232
|
fromJSON(object: any): SimpleValidator;
|
|
39
233
|
toJSON(message: SimpleValidator): unknown;
|
|
40
|
-
create<I extends
|
|
41
|
-
|
|
234
|
+
create<I extends {
|
|
235
|
+
pubKey?: {
|
|
236
|
+
ed25519?: Uint8Array;
|
|
237
|
+
secp256k1?: Uint8Array;
|
|
238
|
+
};
|
|
239
|
+
votingPower?: number;
|
|
240
|
+
} & {
|
|
241
|
+
pubKey?: {
|
|
242
|
+
ed25519?: Uint8Array;
|
|
243
|
+
secp256k1?: Uint8Array;
|
|
244
|
+
} & {
|
|
245
|
+
ed25519?: Uint8Array;
|
|
246
|
+
secp256k1?: Uint8Array;
|
|
247
|
+
} & { [K in Exclude<keyof I["pubKey"], keyof PublicKey>]: never; };
|
|
248
|
+
votingPower?: number;
|
|
249
|
+
} & { [K_1 in Exclude<keyof I, keyof SimpleValidator>]: never; }>(base?: I): SimpleValidator;
|
|
250
|
+
fromPartial<I_1 extends {
|
|
251
|
+
pubKey?: {
|
|
252
|
+
ed25519?: Uint8Array;
|
|
253
|
+
secp256k1?: Uint8Array;
|
|
254
|
+
};
|
|
255
|
+
votingPower?: number;
|
|
256
|
+
} & {
|
|
257
|
+
pubKey?: {
|
|
258
|
+
ed25519?: Uint8Array;
|
|
259
|
+
secp256k1?: Uint8Array;
|
|
260
|
+
} & {
|
|
261
|
+
ed25519?: Uint8Array;
|
|
262
|
+
secp256k1?: Uint8Array;
|
|
263
|
+
} & { [K_2 in Exclude<keyof I_1["pubKey"], keyof PublicKey>]: never; };
|
|
264
|
+
votingPower?: number;
|
|
265
|
+
} & { [K_3 in Exclude<keyof I_1, keyof SimpleValidator>]: never; }>(object: I_1): SimpleValidator;
|
|
42
266
|
};
|
|
43
267
|
type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined;
|
|
44
268
|
export type DeepPartial<T> = T extends Builtin ? T : T extends Array<infer U> ? Array<DeepPartial<U>> : T extends ReadonlyArray<infer U> ? ReadonlyArray<DeepPartial<U>> : T extends {} ? {
|
|
@@ -60,7 +60,7 @@ exports.ValidatorSet = {
|
|
|
60
60
|
},
|
|
61
61
|
fromJSON(object) {
|
|
62
62
|
return {
|
|
63
|
-
validators: Array.isArray(object
|
|
63
|
+
validators: Array.isArray(object?.validators) ? object.validators.map((e) => exports.Validator.fromJSON(e)) : [],
|
|
64
64
|
proposer: isSet(object.proposer) ? exports.Validator.fromJSON(object.proposer) : undefined,
|
|
65
65
|
totalVotingPower: isSet(object.totalVotingPower) ? Number(object.totalVotingPower) : 0,
|
|
66
66
|
};
|
|
@@ -79,16 +79,15 @@ exports.ValidatorSet = {
|
|
|
79
79
|
return obj;
|
|
80
80
|
},
|
|
81
81
|
create(base) {
|
|
82
|
-
return exports.ValidatorSet.fromPartial(base
|
|
82
|
+
return exports.ValidatorSet.fromPartial(base ?? {});
|
|
83
83
|
},
|
|
84
84
|
fromPartial(object) {
|
|
85
|
-
var _a, _b;
|
|
86
85
|
const message = createBaseValidatorSet();
|
|
87
|
-
message.validators =
|
|
86
|
+
message.validators = object.validators?.map((e) => exports.Validator.fromPartial(e)) || [];
|
|
88
87
|
message.proposer = (object.proposer !== undefined && object.proposer !== null)
|
|
89
88
|
? exports.Validator.fromPartial(object.proposer)
|
|
90
89
|
: undefined;
|
|
91
|
-
message.totalVotingPower =
|
|
90
|
+
message.totalVotingPower = object.totalVotingPower ?? 0;
|
|
92
91
|
return message;
|
|
93
92
|
},
|
|
94
93
|
};
|
|
@@ -168,17 +167,16 @@ exports.Validator = {
|
|
|
168
167
|
return obj;
|
|
169
168
|
},
|
|
170
169
|
create(base) {
|
|
171
|
-
return exports.Validator.fromPartial(base
|
|
170
|
+
return exports.Validator.fromPartial(base ?? {});
|
|
172
171
|
},
|
|
173
172
|
fromPartial(object) {
|
|
174
|
-
var _a, _b, _c;
|
|
175
173
|
const message = createBaseValidator();
|
|
176
|
-
message.address =
|
|
174
|
+
message.address = object.address ?? new Uint8Array();
|
|
177
175
|
message.pubKey = (object.pubKey !== undefined && object.pubKey !== null)
|
|
178
176
|
? keys_1.PublicKey.fromPartial(object.pubKey)
|
|
179
177
|
: undefined;
|
|
180
|
-
message.votingPower =
|
|
181
|
-
message.proposerPriority =
|
|
178
|
+
message.votingPower = object.votingPower ?? 0;
|
|
179
|
+
message.proposerPriority = object.proposerPriority ?? 0;
|
|
182
180
|
return message;
|
|
183
181
|
},
|
|
184
182
|
};
|
|
@@ -235,15 +233,14 @@ exports.SimpleValidator = {
|
|
|
235
233
|
return obj;
|
|
236
234
|
},
|
|
237
235
|
create(base) {
|
|
238
|
-
return exports.SimpleValidator.fromPartial(base
|
|
236
|
+
return exports.SimpleValidator.fromPartial(base ?? {});
|
|
239
237
|
},
|
|
240
238
|
fromPartial(object) {
|
|
241
|
-
var _a;
|
|
242
239
|
const message = createBaseSimpleValidator();
|
|
243
240
|
message.pubKey = (object.pubKey !== undefined && object.pubKey !== null)
|
|
244
241
|
? keys_1.PublicKey.fromPartial(object.pubKey)
|
|
245
242
|
: undefined;
|
|
246
|
-
message.votingPower =
|
|
243
|
+
message.votingPower = object.votingPower ?? 0;
|
|
247
244
|
return message;
|
|
248
245
|
},
|
|
249
246
|
};
|