commit
db4459893a
@ -59,7 +59,7 @@
|
||||
"ses": "^0.11.0",
|
||||
"shx": "^0.3.2",
|
||||
"source-map-support": "^0.5.19",
|
||||
"ts-proto": "^1.53.0",
|
||||
"ts-proto": "^1.67.0",
|
||||
"typedoc": "^0.19",
|
||||
"typescript": "~4.0",
|
||||
"webpack": "^4.43.0",
|
||||
|
||||
@ -66,10 +66,18 @@ const basePageRequest: object = { offset: Long.UZERO, limit: Long.UZERO, countTo
|
||||
|
||||
export const PageRequest = {
|
||||
encode(message: PageRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).bytes(message.key);
|
||||
writer.uint32(16).uint64(message.offset);
|
||||
writer.uint32(24).uint64(message.limit);
|
||||
writer.uint32(32).bool(message.countTotal);
|
||||
if (message.key.length !== 0) {
|
||||
writer.uint32(10).bytes(message.key);
|
||||
}
|
||||
if (!message.offset.isZero()) {
|
||||
writer.uint32(16).uint64(message.offset);
|
||||
}
|
||||
if (!message.limit.isZero()) {
|
||||
writer.uint32(24).uint64(message.limit);
|
||||
}
|
||||
if (message.countTotal === true) {
|
||||
writer.uint32(32).bool(message.countTotal);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -123,6 +131,16 @@ export const PageRequest = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: PageRequest): unknown {
|
||||
const obj: any = {};
|
||||
message.key !== undefined &&
|
||||
(obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array()));
|
||||
message.offset !== undefined && (obj.offset = (message.offset || Long.UZERO).toString());
|
||||
message.limit !== undefined && (obj.limit = (message.limit || Long.UZERO).toString());
|
||||
message.countTotal !== undefined && (obj.countTotal = message.countTotal);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<PageRequest>): PageRequest {
|
||||
const message = { ...basePageRequest } as PageRequest;
|
||||
if (object.key !== undefined && object.key !== null) {
|
||||
@ -147,24 +165,18 @@ export const PageRequest = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: PageRequest): unknown {
|
||||
const obj: any = {};
|
||||
message.key !== undefined &&
|
||||
(obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array()));
|
||||
message.offset !== undefined && (obj.offset = (message.offset || Long.UZERO).toString());
|
||||
message.limit !== undefined && (obj.limit = (message.limit || Long.UZERO).toString());
|
||||
message.countTotal !== undefined && (obj.countTotal = message.countTotal);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const basePageResponse: object = { total: Long.UZERO };
|
||||
|
||||
export const PageResponse = {
|
||||
encode(message: PageResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).bytes(message.nextKey);
|
||||
writer.uint32(16).uint64(message.total);
|
||||
if (message.nextKey.length !== 0) {
|
||||
writer.uint32(10).bytes(message.nextKey);
|
||||
}
|
||||
if (!message.total.isZero()) {
|
||||
writer.uint32(16).uint64(message.total);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -202,6 +214,14 @@ export const PageResponse = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: PageResponse): unknown {
|
||||
const obj: any = {};
|
||||
message.nextKey !== undefined &&
|
||||
(obj.nextKey = base64FromBytes(message.nextKey !== undefined ? message.nextKey : new Uint8Array()));
|
||||
message.total !== undefined && (obj.total = (message.total || Long.UZERO).toString());
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<PageResponse>): PageResponse {
|
||||
const message = { ...basePageResponse } as PageResponse;
|
||||
if (object.nextKey !== undefined && object.nextKey !== null) {
|
||||
@ -216,14 +236,6 @@ export const PageResponse = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: PageResponse): unknown {
|
||||
const obj: any = {};
|
||||
message.nextKey !== undefined &&
|
||||
(obj.nextKey = base64FromBytes(message.nextKey !== undefined ? message.nextKey : new Uint8Array()));
|
||||
message.total !== undefined && (obj.total = (message.total || Long.UZERO).toString());
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
declare var self: any | undefined;
|
||||
@ -233,7 +245,7 @@ var globalThis: any = (() => {
|
||||
if (typeof self !== "undefined") return self;
|
||||
if (typeof window !== "undefined") return window;
|
||||
if (typeof global !== "undefined") return global;
|
||||
throw new Error("Unable to locate global object");
|
||||
throw "Unable to locate global object";
|
||||
})();
|
||||
|
||||
const atob: (b64: string) => string =
|
||||
|
||||
@ -40,8 +40,12 @@ const baseCoin: object = { denom: "", amount: "" };
|
||||
|
||||
export const Coin = {
|
||||
encode(message: Coin, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.denom);
|
||||
writer.uint32(18).string(message.amount);
|
||||
if (message.denom !== "") {
|
||||
writer.uint32(10).string(message.denom);
|
||||
}
|
||||
if (message.amount !== "") {
|
||||
writer.uint32(18).string(message.amount);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -81,6 +85,13 @@ export const Coin = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Coin): unknown {
|
||||
const obj: any = {};
|
||||
message.denom !== undefined && (obj.denom = message.denom);
|
||||
message.amount !== undefined && (obj.amount = message.amount);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<Coin>): Coin {
|
||||
const message = { ...baseCoin } as Coin;
|
||||
if (object.denom !== undefined && object.denom !== null) {
|
||||
@ -95,21 +106,18 @@ export const Coin = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Coin): unknown {
|
||||
const obj: any = {};
|
||||
message.denom !== undefined && (obj.denom = message.denom);
|
||||
message.amount !== undefined && (obj.amount = message.amount);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseDecCoin: object = { denom: "", amount: "" };
|
||||
|
||||
export const DecCoin = {
|
||||
encode(message: DecCoin, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.denom);
|
||||
writer.uint32(18).string(message.amount);
|
||||
if (message.denom !== "") {
|
||||
writer.uint32(10).string(message.denom);
|
||||
}
|
||||
if (message.amount !== "") {
|
||||
writer.uint32(18).string(message.amount);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -149,6 +157,13 @@ export const DecCoin = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: DecCoin): unknown {
|
||||
const obj: any = {};
|
||||
message.denom !== undefined && (obj.denom = message.denom);
|
||||
message.amount !== undefined && (obj.amount = message.amount);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<DecCoin>): DecCoin {
|
||||
const message = { ...baseDecCoin } as DecCoin;
|
||||
if (object.denom !== undefined && object.denom !== null) {
|
||||
@ -163,20 +178,15 @@ export const DecCoin = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: DecCoin): unknown {
|
||||
const obj: any = {};
|
||||
message.denom !== undefined && (obj.denom = message.denom);
|
||||
message.amount !== undefined && (obj.amount = message.amount);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseIntProto: object = { int: "" };
|
||||
|
||||
export const IntProto = {
|
||||
encode(message: IntProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.int);
|
||||
if (message.int !== "") {
|
||||
writer.uint32(10).string(message.int);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -208,6 +218,12 @@ export const IntProto = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: IntProto): unknown {
|
||||
const obj: any = {};
|
||||
message.int !== undefined && (obj.int = message.int);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<IntProto>): IntProto {
|
||||
const message = { ...baseIntProto } as IntProto;
|
||||
if (object.int !== undefined && object.int !== null) {
|
||||
@ -217,19 +233,15 @@ export const IntProto = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: IntProto): unknown {
|
||||
const obj: any = {};
|
||||
message.int !== undefined && (obj.int = message.int);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseDecProto: object = { dec: "" };
|
||||
|
||||
export const DecProto = {
|
||||
encode(message: DecProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.dec);
|
||||
if (message.dec !== "") {
|
||||
writer.uint32(10).string(message.dec);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -261,6 +273,12 @@ export const DecProto = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: DecProto): unknown {
|
||||
const obj: any = {};
|
||||
message.dec !== undefined && (obj.dec = message.dec);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<DecProto>): DecProto {
|
||||
const message = { ...baseDecProto } as DecProto;
|
||||
if (object.dec !== undefined && object.dec !== null) {
|
||||
@ -270,12 +288,6 @@ export const DecProto = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: DecProto): unknown {
|
||||
const obj: any = {};
|
||||
message.dec !== undefined && (obj.dec = message.dec);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
type Builtin = Date | Function | Uint8Array | string | number | undefined | Long;
|
||||
|
||||
@ -136,7 +136,9 @@ const baseQueryContractInfoRequest: object = { address: "" };
|
||||
|
||||
export const QueryContractInfoRequest = {
|
||||
encode(message: QueryContractInfoRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.address);
|
||||
if (message.address !== "") {
|
||||
writer.uint32(10).string(message.address);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -168,6 +170,12 @@ export const QueryContractInfoRequest = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryContractInfoRequest): unknown {
|
||||
const obj: any = {};
|
||||
message.address !== undefined && (obj.address = message.address);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<QueryContractInfoRequest>): QueryContractInfoRequest {
|
||||
const message = { ...baseQueryContractInfoRequest } as QueryContractInfoRequest;
|
||||
if (object.address !== undefined && object.address !== null) {
|
||||
@ -177,20 +185,16 @@ export const QueryContractInfoRequest = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryContractInfoRequest): unknown {
|
||||
const obj: any = {};
|
||||
message.address !== undefined && (obj.address = message.address);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseQueryContractInfoResponse: object = { address: "" };
|
||||
|
||||
export const QueryContractInfoResponse = {
|
||||
encode(message: QueryContractInfoResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.address);
|
||||
if (message.contractInfo !== undefined && message.contractInfo !== undefined) {
|
||||
if (message.address !== "") {
|
||||
writer.uint32(10).string(message.address);
|
||||
}
|
||||
if (message.contractInfo !== undefined) {
|
||||
ContractInfo.encode(message.contractInfo, writer.uint32(18).fork()).ldelim();
|
||||
}
|
||||
return writer;
|
||||
@ -232,6 +236,14 @@ export const QueryContractInfoResponse = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryContractInfoResponse): unknown {
|
||||
const obj: any = {};
|
||||
message.address !== undefined && (obj.address = message.address);
|
||||
message.contractInfo !== undefined &&
|
||||
(obj.contractInfo = message.contractInfo ? ContractInfo.toJSON(message.contractInfo) : undefined);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<QueryContractInfoResponse>): QueryContractInfoResponse {
|
||||
const message = { ...baseQueryContractInfoResponse } as QueryContractInfoResponse;
|
||||
if (object.address !== undefined && object.address !== null) {
|
||||
@ -246,22 +258,16 @@ export const QueryContractInfoResponse = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryContractInfoResponse): unknown {
|
||||
const obj: any = {};
|
||||
message.address !== undefined && (obj.address = message.address);
|
||||
message.contractInfo !== undefined &&
|
||||
(obj.contractInfo = message.contractInfo ? ContractInfo.toJSON(message.contractInfo) : undefined);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseQueryContractHistoryRequest: object = { address: "" };
|
||||
|
||||
export const QueryContractHistoryRequest = {
|
||||
encode(message: QueryContractHistoryRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.address);
|
||||
if (message.pagination !== undefined && message.pagination !== undefined) {
|
||||
if (message.address !== "") {
|
||||
writer.uint32(10).string(message.address);
|
||||
}
|
||||
if (message.pagination !== undefined) {
|
||||
PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim();
|
||||
}
|
||||
return writer;
|
||||
@ -303,6 +309,14 @@ export const QueryContractHistoryRequest = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryContractHistoryRequest): unknown {
|
||||
const obj: any = {};
|
||||
message.address !== undefined && (obj.address = message.address);
|
||||
message.pagination !== undefined &&
|
||||
(obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<QueryContractHistoryRequest>): QueryContractHistoryRequest {
|
||||
const message = { ...baseQueryContractHistoryRequest } as QueryContractHistoryRequest;
|
||||
if (object.address !== undefined && object.address !== null) {
|
||||
@ -317,14 +331,6 @@ export const QueryContractHistoryRequest = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryContractHistoryRequest): unknown {
|
||||
const obj: any = {};
|
||||
message.address !== undefined && (obj.address = message.address);
|
||||
message.pagination !== undefined &&
|
||||
(obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseQueryContractHistoryResponse: object = {};
|
||||
@ -334,7 +340,7 @@ export const QueryContractHistoryResponse = {
|
||||
for (const v of message.entries) {
|
||||
ContractCodeHistoryEntry.encode(v!, writer.uint32(10).fork()).ldelim();
|
||||
}
|
||||
if (message.pagination !== undefined && message.pagination !== undefined) {
|
||||
if (message.pagination !== undefined) {
|
||||
PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
|
||||
}
|
||||
return writer;
|
||||
@ -378,6 +384,18 @@ export const QueryContractHistoryResponse = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryContractHistoryResponse): unknown {
|
||||
const obj: any = {};
|
||||
if (message.entries) {
|
||||
obj.entries = message.entries.map((e) => (e ? ContractCodeHistoryEntry.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.entries = [];
|
||||
}
|
||||
message.pagination !== undefined &&
|
||||
(obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<QueryContractHistoryResponse>): QueryContractHistoryResponse {
|
||||
const message = { ...baseQueryContractHistoryResponse } as QueryContractHistoryResponse;
|
||||
message.entries = [];
|
||||
@ -393,26 +411,16 @@ export const QueryContractHistoryResponse = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryContractHistoryResponse): unknown {
|
||||
const obj: any = {};
|
||||
if (message.entries) {
|
||||
obj.entries = message.entries.map((e) => (e ? ContractCodeHistoryEntry.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.entries = [];
|
||||
}
|
||||
message.pagination !== undefined &&
|
||||
(obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseQueryContractsByCodeRequest: object = { codeId: Long.UZERO };
|
||||
|
||||
export const QueryContractsByCodeRequest = {
|
||||
encode(message: QueryContractsByCodeRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(8).uint64(message.codeId);
|
||||
if (message.pagination !== undefined && message.pagination !== undefined) {
|
||||
if (!message.codeId.isZero()) {
|
||||
writer.uint32(8).uint64(message.codeId);
|
||||
}
|
||||
if (message.pagination !== undefined) {
|
||||
PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim();
|
||||
}
|
||||
return writer;
|
||||
@ -454,6 +462,14 @@ export const QueryContractsByCodeRequest = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryContractsByCodeRequest): unknown {
|
||||
const obj: any = {};
|
||||
message.codeId !== undefined && (obj.codeId = (message.codeId || Long.UZERO).toString());
|
||||
message.pagination !== undefined &&
|
||||
(obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<QueryContractsByCodeRequest>): QueryContractsByCodeRequest {
|
||||
const message = { ...baseQueryContractsByCodeRequest } as QueryContractsByCodeRequest;
|
||||
if (object.codeId !== undefined && object.codeId !== null) {
|
||||
@ -468,22 +484,16 @@ export const QueryContractsByCodeRequest = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryContractsByCodeRequest): unknown {
|
||||
const obj: any = {};
|
||||
message.codeId !== undefined && (obj.codeId = (message.codeId || Long.UZERO).toString());
|
||||
message.pagination !== undefined &&
|
||||
(obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseContractInfoWithAddress: object = { address: "" };
|
||||
|
||||
export const ContractInfoWithAddress = {
|
||||
encode(message: ContractInfoWithAddress, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.address);
|
||||
if (message.contractInfo !== undefined && message.contractInfo !== undefined) {
|
||||
if (message.address !== "") {
|
||||
writer.uint32(10).string(message.address);
|
||||
}
|
||||
if (message.contractInfo !== undefined) {
|
||||
ContractInfo.encode(message.contractInfo, writer.uint32(18).fork()).ldelim();
|
||||
}
|
||||
return writer;
|
||||
@ -525,6 +535,14 @@ export const ContractInfoWithAddress = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: ContractInfoWithAddress): unknown {
|
||||
const obj: any = {};
|
||||
message.address !== undefined && (obj.address = message.address);
|
||||
message.contractInfo !== undefined &&
|
||||
(obj.contractInfo = message.contractInfo ? ContractInfo.toJSON(message.contractInfo) : undefined);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<ContractInfoWithAddress>): ContractInfoWithAddress {
|
||||
const message = { ...baseContractInfoWithAddress } as ContractInfoWithAddress;
|
||||
if (object.address !== undefined && object.address !== null) {
|
||||
@ -539,14 +557,6 @@ export const ContractInfoWithAddress = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: ContractInfoWithAddress): unknown {
|
||||
const obj: any = {};
|
||||
message.address !== undefined && (obj.address = message.address);
|
||||
message.contractInfo !== undefined &&
|
||||
(obj.contractInfo = message.contractInfo ? ContractInfo.toJSON(message.contractInfo) : undefined);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseQueryContractsByCodeResponse: object = {};
|
||||
@ -556,7 +566,7 @@ export const QueryContractsByCodeResponse = {
|
||||
for (const v of message.contractInfos) {
|
||||
ContractInfoWithAddress.encode(v!, writer.uint32(10).fork()).ldelim();
|
||||
}
|
||||
if (message.pagination !== undefined && message.pagination !== undefined) {
|
||||
if (message.pagination !== undefined) {
|
||||
PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
|
||||
}
|
||||
return writer;
|
||||
@ -600,6 +610,20 @@ export const QueryContractsByCodeResponse = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryContractsByCodeResponse): unknown {
|
||||
const obj: any = {};
|
||||
if (message.contractInfos) {
|
||||
obj.contractInfos = message.contractInfos.map((e) =>
|
||||
e ? ContractInfoWithAddress.toJSON(e) : undefined,
|
||||
);
|
||||
} else {
|
||||
obj.contractInfos = [];
|
||||
}
|
||||
message.pagination !== undefined &&
|
||||
(obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<QueryContractsByCodeResponse>): QueryContractsByCodeResponse {
|
||||
const message = { ...baseQueryContractsByCodeResponse } as QueryContractsByCodeResponse;
|
||||
message.contractInfos = [];
|
||||
@ -615,28 +639,16 @@ export const QueryContractsByCodeResponse = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryContractsByCodeResponse): unknown {
|
||||
const obj: any = {};
|
||||
if (message.contractInfos) {
|
||||
obj.contractInfos = message.contractInfos.map((e) =>
|
||||
e ? ContractInfoWithAddress.toJSON(e) : undefined,
|
||||
);
|
||||
} else {
|
||||
obj.contractInfos = [];
|
||||
}
|
||||
message.pagination !== undefined &&
|
||||
(obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseQueryAllContractStateRequest: object = { address: "" };
|
||||
|
||||
export const QueryAllContractStateRequest = {
|
||||
encode(message: QueryAllContractStateRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.address);
|
||||
if (message.pagination !== undefined && message.pagination !== undefined) {
|
||||
if (message.address !== "") {
|
||||
writer.uint32(10).string(message.address);
|
||||
}
|
||||
if (message.pagination !== undefined) {
|
||||
PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim();
|
||||
}
|
||||
return writer;
|
||||
@ -678,6 +690,14 @@ export const QueryAllContractStateRequest = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryAllContractStateRequest): unknown {
|
||||
const obj: any = {};
|
||||
message.address !== undefined && (obj.address = message.address);
|
||||
message.pagination !== undefined &&
|
||||
(obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<QueryAllContractStateRequest>): QueryAllContractStateRequest {
|
||||
const message = { ...baseQueryAllContractStateRequest } as QueryAllContractStateRequest;
|
||||
if (object.address !== undefined && object.address !== null) {
|
||||
@ -692,14 +712,6 @@ export const QueryAllContractStateRequest = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryAllContractStateRequest): unknown {
|
||||
const obj: any = {};
|
||||
message.address !== undefined && (obj.address = message.address);
|
||||
message.pagination !== undefined &&
|
||||
(obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseQueryAllContractStateResponse: object = {};
|
||||
@ -709,7 +721,7 @@ export const QueryAllContractStateResponse = {
|
||||
for (const v of message.models) {
|
||||
Model.encode(v!, writer.uint32(10).fork()).ldelim();
|
||||
}
|
||||
if (message.pagination !== undefined && message.pagination !== undefined) {
|
||||
if (message.pagination !== undefined) {
|
||||
PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
|
||||
}
|
||||
return writer;
|
||||
@ -753,6 +765,18 @@ export const QueryAllContractStateResponse = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryAllContractStateResponse): unknown {
|
||||
const obj: any = {};
|
||||
if (message.models) {
|
||||
obj.models = message.models.map((e) => (e ? Model.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.models = [];
|
||||
}
|
||||
message.pagination !== undefined &&
|
||||
(obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<QueryAllContractStateResponse>): QueryAllContractStateResponse {
|
||||
const message = { ...baseQueryAllContractStateResponse } as QueryAllContractStateResponse;
|
||||
message.models = [];
|
||||
@ -768,26 +792,18 @@ export const QueryAllContractStateResponse = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryAllContractStateResponse): unknown {
|
||||
const obj: any = {};
|
||||
if (message.models) {
|
||||
obj.models = message.models.map((e) => (e ? Model.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.models = [];
|
||||
}
|
||||
message.pagination !== undefined &&
|
||||
(obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseQueryRawContractStateRequest: object = { address: "" };
|
||||
|
||||
export const QueryRawContractStateRequest = {
|
||||
encode(message: QueryRawContractStateRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.address);
|
||||
writer.uint32(18).bytes(message.queryData);
|
||||
if (message.address !== "") {
|
||||
writer.uint32(10).string(message.address);
|
||||
}
|
||||
if (message.queryData.length !== 0) {
|
||||
writer.uint32(18).bytes(message.queryData);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -825,6 +841,16 @@ export const QueryRawContractStateRequest = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryRawContractStateRequest): unknown {
|
||||
const obj: any = {};
|
||||
message.address !== undefined && (obj.address = message.address);
|
||||
message.queryData !== undefined &&
|
||||
(obj.queryData = base64FromBytes(
|
||||
message.queryData !== undefined ? message.queryData : new Uint8Array(),
|
||||
));
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<QueryRawContractStateRequest>): QueryRawContractStateRequest {
|
||||
const message = { ...baseQueryRawContractStateRequest } as QueryRawContractStateRequest;
|
||||
if (object.address !== undefined && object.address !== null) {
|
||||
@ -839,23 +865,15 @@ export const QueryRawContractStateRequest = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryRawContractStateRequest): unknown {
|
||||
const obj: any = {};
|
||||
message.address !== undefined && (obj.address = message.address);
|
||||
message.queryData !== undefined &&
|
||||
(obj.queryData = base64FromBytes(
|
||||
message.queryData !== undefined ? message.queryData : new Uint8Array(),
|
||||
));
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseQueryRawContractStateResponse: object = {};
|
||||
|
||||
export const QueryRawContractStateResponse = {
|
||||
encode(message: QueryRawContractStateResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).bytes(message.data);
|
||||
if (message.data.length !== 0) {
|
||||
writer.uint32(10).bytes(message.data);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -885,6 +903,13 @@ export const QueryRawContractStateResponse = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryRawContractStateResponse): unknown {
|
||||
const obj: any = {};
|
||||
message.data !== undefined &&
|
||||
(obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array()));
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<QueryRawContractStateResponse>): QueryRawContractStateResponse {
|
||||
const message = { ...baseQueryRawContractStateResponse } as QueryRawContractStateResponse;
|
||||
if (object.data !== undefined && object.data !== null) {
|
||||
@ -894,21 +919,18 @@ export const QueryRawContractStateResponse = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryRawContractStateResponse): unknown {
|
||||
const obj: any = {};
|
||||
message.data !== undefined &&
|
||||
(obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array()));
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseQuerySmartContractStateRequest: object = { address: "" };
|
||||
|
||||
export const QuerySmartContractStateRequest = {
|
||||
encode(message: QuerySmartContractStateRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.address);
|
||||
writer.uint32(18).bytes(message.queryData);
|
||||
if (message.address !== "") {
|
||||
writer.uint32(10).string(message.address);
|
||||
}
|
||||
if (message.queryData.length !== 0) {
|
||||
writer.uint32(18).bytes(message.queryData);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -946,6 +968,16 @@ export const QuerySmartContractStateRequest = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QuerySmartContractStateRequest): unknown {
|
||||
const obj: any = {};
|
||||
message.address !== undefined && (obj.address = message.address);
|
||||
message.queryData !== undefined &&
|
||||
(obj.queryData = base64FromBytes(
|
||||
message.queryData !== undefined ? message.queryData : new Uint8Array(),
|
||||
));
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<QuerySmartContractStateRequest>): QuerySmartContractStateRequest {
|
||||
const message = { ...baseQuerySmartContractStateRequest } as QuerySmartContractStateRequest;
|
||||
if (object.address !== undefined && object.address !== null) {
|
||||
@ -960,23 +992,15 @@ export const QuerySmartContractStateRequest = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QuerySmartContractStateRequest): unknown {
|
||||
const obj: any = {};
|
||||
message.address !== undefined && (obj.address = message.address);
|
||||
message.queryData !== undefined &&
|
||||
(obj.queryData = base64FromBytes(
|
||||
message.queryData !== undefined ? message.queryData : new Uint8Array(),
|
||||
));
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseQuerySmartContractStateResponse: object = {};
|
||||
|
||||
export const QuerySmartContractStateResponse = {
|
||||
encode(message: QuerySmartContractStateResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).bytes(message.data);
|
||||
if (message.data.length !== 0) {
|
||||
writer.uint32(10).bytes(message.data);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -1006,6 +1030,13 @@ export const QuerySmartContractStateResponse = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QuerySmartContractStateResponse): unknown {
|
||||
const obj: any = {};
|
||||
message.data !== undefined &&
|
||||
(obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array()));
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<QuerySmartContractStateResponse>): QuerySmartContractStateResponse {
|
||||
const message = { ...baseQuerySmartContractStateResponse } as QuerySmartContractStateResponse;
|
||||
if (object.data !== undefined && object.data !== null) {
|
||||
@ -1015,20 +1046,15 @@ export const QuerySmartContractStateResponse = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QuerySmartContractStateResponse): unknown {
|
||||
const obj: any = {};
|
||||
message.data !== undefined &&
|
||||
(obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array()));
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseQueryCodeRequest: object = { codeId: Long.UZERO };
|
||||
|
||||
export const QueryCodeRequest = {
|
||||
encode(message: QueryCodeRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(8).uint64(message.codeId);
|
||||
if (!message.codeId.isZero()) {
|
||||
writer.uint32(8).uint64(message.codeId);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -1060,6 +1086,12 @@ export const QueryCodeRequest = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryCodeRequest): unknown {
|
||||
const obj: any = {};
|
||||
message.codeId !== undefined && (obj.codeId = (message.codeId || Long.UZERO).toString());
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<QueryCodeRequest>): QueryCodeRequest {
|
||||
const message = { ...baseQueryCodeRequest } as QueryCodeRequest;
|
||||
if (object.codeId !== undefined && object.codeId !== null) {
|
||||
@ -1069,23 +1101,27 @@ export const QueryCodeRequest = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryCodeRequest): unknown {
|
||||
const obj: any = {};
|
||||
message.codeId !== undefined && (obj.codeId = (message.codeId || Long.UZERO).toString());
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseCodeInfoResponse: object = { codeId: Long.UZERO, creator: "", source: "", builder: "" };
|
||||
|
||||
export const CodeInfoResponse = {
|
||||
encode(message: CodeInfoResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(8).uint64(message.codeId);
|
||||
writer.uint32(18).string(message.creator);
|
||||
writer.uint32(26).bytes(message.dataHash);
|
||||
writer.uint32(34).string(message.source);
|
||||
writer.uint32(42).string(message.builder);
|
||||
if (!message.codeId.isZero()) {
|
||||
writer.uint32(8).uint64(message.codeId);
|
||||
}
|
||||
if (message.creator !== "") {
|
||||
writer.uint32(18).string(message.creator);
|
||||
}
|
||||
if (message.dataHash.length !== 0) {
|
||||
writer.uint32(26).bytes(message.dataHash);
|
||||
}
|
||||
if (message.source !== "") {
|
||||
writer.uint32(34).string(message.source);
|
||||
}
|
||||
if (message.builder !== "") {
|
||||
writer.uint32(42).string(message.builder);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -1147,6 +1183,17 @@ export const CodeInfoResponse = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: CodeInfoResponse): unknown {
|
||||
const obj: any = {};
|
||||
message.codeId !== undefined && (obj.codeId = (message.codeId || Long.UZERO).toString());
|
||||
message.creator !== undefined && (obj.creator = message.creator);
|
||||
message.dataHash !== undefined &&
|
||||
(obj.dataHash = base64FromBytes(message.dataHash !== undefined ? message.dataHash : new Uint8Array()));
|
||||
message.source !== undefined && (obj.source = message.source);
|
||||
message.builder !== undefined && (obj.builder = message.builder);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<CodeInfoResponse>): CodeInfoResponse {
|
||||
const message = { ...baseCodeInfoResponse } as CodeInfoResponse;
|
||||
if (object.codeId !== undefined && object.codeId !== null) {
|
||||
@ -1176,27 +1223,18 @@ export const CodeInfoResponse = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: CodeInfoResponse): unknown {
|
||||
const obj: any = {};
|
||||
message.codeId !== undefined && (obj.codeId = (message.codeId || Long.UZERO).toString());
|
||||
message.creator !== undefined && (obj.creator = message.creator);
|
||||
message.dataHash !== undefined &&
|
||||
(obj.dataHash = base64FromBytes(message.dataHash !== undefined ? message.dataHash : new Uint8Array()));
|
||||
message.source !== undefined && (obj.source = message.source);
|
||||
message.builder !== undefined && (obj.builder = message.builder);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseQueryCodeResponse: object = {};
|
||||
|
||||
export const QueryCodeResponse = {
|
||||
encode(message: QueryCodeResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
if (message.codeInfo !== undefined && message.codeInfo !== undefined) {
|
||||
if (message.codeInfo !== undefined) {
|
||||
CodeInfoResponse.encode(message.codeInfo, writer.uint32(10).fork()).ldelim();
|
||||
}
|
||||
writer.uint32(18).bytes(message.data);
|
||||
if (message.data.length !== 0) {
|
||||
writer.uint32(18).bytes(message.data);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -1234,6 +1272,15 @@ export const QueryCodeResponse = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryCodeResponse): unknown {
|
||||
const obj: any = {};
|
||||
message.codeInfo !== undefined &&
|
||||
(obj.codeInfo = message.codeInfo ? CodeInfoResponse.toJSON(message.codeInfo) : undefined);
|
||||
message.data !== undefined &&
|
||||
(obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array()));
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<QueryCodeResponse>): QueryCodeResponse {
|
||||
const message = { ...baseQueryCodeResponse } as QueryCodeResponse;
|
||||
if (object.codeInfo !== undefined && object.codeInfo !== null) {
|
||||
@ -1248,22 +1295,13 @@ export const QueryCodeResponse = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryCodeResponse): unknown {
|
||||
const obj: any = {};
|
||||
message.codeInfo !== undefined &&
|
||||
(obj.codeInfo = message.codeInfo ? CodeInfoResponse.toJSON(message.codeInfo) : undefined);
|
||||
message.data !== undefined &&
|
||||
(obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array()));
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseQueryCodesRequest: object = {};
|
||||
|
||||
export const QueryCodesRequest = {
|
||||
encode(message: QueryCodesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
if (message.pagination !== undefined && message.pagination !== undefined) {
|
||||
if (message.pagination !== undefined) {
|
||||
PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim();
|
||||
}
|
||||
return writer;
|
||||
@ -1297,6 +1335,13 @@ export const QueryCodesRequest = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryCodesRequest): unknown {
|
||||
const obj: any = {};
|
||||
message.pagination !== undefined &&
|
||||
(obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<QueryCodesRequest>): QueryCodesRequest {
|
||||
const message = { ...baseQueryCodesRequest } as QueryCodesRequest;
|
||||
if (object.pagination !== undefined && object.pagination !== null) {
|
||||
@ -1306,13 +1351,6 @@ export const QueryCodesRequest = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryCodesRequest): unknown {
|
||||
const obj: any = {};
|
||||
message.pagination !== undefined &&
|
||||
(obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseQueryCodesResponse: object = {};
|
||||
@ -1322,7 +1360,7 @@ export const QueryCodesResponse = {
|
||||
for (const v of message.codeInfos) {
|
||||
CodeInfoResponse.encode(v!, writer.uint32(10).fork()).ldelim();
|
||||
}
|
||||
if (message.pagination !== undefined && message.pagination !== undefined) {
|
||||
if (message.pagination !== undefined) {
|
||||
PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
|
||||
}
|
||||
return writer;
|
||||
@ -1366,6 +1404,18 @@ export const QueryCodesResponse = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryCodesResponse): unknown {
|
||||
const obj: any = {};
|
||||
if (message.codeInfos) {
|
||||
obj.codeInfos = message.codeInfos.map((e) => (e ? CodeInfoResponse.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.codeInfos = [];
|
||||
}
|
||||
message.pagination !== undefined &&
|
||||
(obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<QueryCodesResponse>): QueryCodesResponse {
|
||||
const message = { ...baseQueryCodesResponse } as QueryCodesResponse;
|
||||
message.codeInfos = [];
|
||||
@ -1381,18 +1431,6 @@ export const QueryCodesResponse = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryCodesResponse): unknown {
|
||||
const obj: any = {};
|
||||
if (message.codeInfos) {
|
||||
obj.codeInfos = message.codeInfos.map((e) => (e ? CodeInfoResponse.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.codeInfos = [];
|
||||
}
|
||||
message.pagination !== undefined &&
|
||||
(obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
/** Query provides defines the gRPC querier service */
|
||||
@ -1480,7 +1518,7 @@ var globalThis: any = (() => {
|
||||
if (typeof self !== "undefined") return self;
|
||||
if (typeof window !== "undefined") return window;
|
||||
if (typeof global !== "undefined") return global;
|
||||
throw new Error("Unable to locate global object");
|
||||
throw "Unable to locate global object";
|
||||
})();
|
||||
|
||||
const atob: (b64: string) => string =
|
||||
|
||||
@ -115,11 +115,19 @@ const baseMsgStoreCode: object = { sender: "", source: "", builder: "" };
|
||||
|
||||
export const MsgStoreCode = {
|
||||
encode(message: MsgStoreCode, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.sender);
|
||||
writer.uint32(18).bytes(message.wasmByteCode);
|
||||
writer.uint32(26).string(message.source);
|
||||
writer.uint32(34).string(message.builder);
|
||||
if (message.instantiatePermission !== undefined && message.instantiatePermission !== undefined) {
|
||||
if (message.sender !== "") {
|
||||
writer.uint32(10).string(message.sender);
|
||||
}
|
||||
if (message.wasmByteCode.length !== 0) {
|
||||
writer.uint32(18).bytes(message.wasmByteCode);
|
||||
}
|
||||
if (message.source !== "") {
|
||||
writer.uint32(26).string(message.source);
|
||||
}
|
||||
if (message.builder !== "") {
|
||||
writer.uint32(34).string(message.builder);
|
||||
}
|
||||
if (message.instantiatePermission !== undefined) {
|
||||
AccessConfig.encode(message.instantiatePermission, writer.uint32(42).fork()).ldelim();
|
||||
}
|
||||
return writer;
|
||||
@ -183,6 +191,22 @@ export const MsgStoreCode = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: MsgStoreCode): unknown {
|
||||
const obj: any = {};
|
||||
message.sender !== undefined && (obj.sender = message.sender);
|
||||
message.wasmByteCode !== undefined &&
|
||||
(obj.wasmByteCode = base64FromBytes(
|
||||
message.wasmByteCode !== undefined ? message.wasmByteCode : new Uint8Array(),
|
||||
));
|
||||
message.source !== undefined && (obj.source = message.source);
|
||||
message.builder !== undefined && (obj.builder = message.builder);
|
||||
message.instantiatePermission !== undefined &&
|
||||
(obj.instantiatePermission = message.instantiatePermission
|
||||
? AccessConfig.toJSON(message.instantiatePermission)
|
||||
: undefined);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<MsgStoreCode>): MsgStoreCode {
|
||||
const message = { ...baseMsgStoreCode } as MsgStoreCode;
|
||||
if (object.sender !== undefined && object.sender !== null) {
|
||||
@ -212,29 +236,15 @@ export const MsgStoreCode = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: MsgStoreCode): unknown {
|
||||
const obj: any = {};
|
||||
message.sender !== undefined && (obj.sender = message.sender);
|
||||
message.wasmByteCode !== undefined &&
|
||||
(obj.wasmByteCode = base64FromBytes(
|
||||
message.wasmByteCode !== undefined ? message.wasmByteCode : new Uint8Array(),
|
||||
));
|
||||
message.source !== undefined && (obj.source = message.source);
|
||||
message.builder !== undefined && (obj.builder = message.builder);
|
||||
message.instantiatePermission !== undefined &&
|
||||
(obj.instantiatePermission = message.instantiatePermission
|
||||
? AccessConfig.toJSON(message.instantiatePermission)
|
||||
: undefined);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseMsgStoreCodeResponse: object = { codeId: Long.UZERO };
|
||||
|
||||
export const MsgStoreCodeResponse = {
|
||||
encode(message: MsgStoreCodeResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(8).uint64(message.codeId);
|
||||
if (!message.codeId.isZero()) {
|
||||
writer.uint32(8).uint64(message.codeId);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -266,6 +276,12 @@ export const MsgStoreCodeResponse = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: MsgStoreCodeResponse): unknown {
|
||||
const obj: any = {};
|
||||
message.codeId !== undefined && (obj.codeId = (message.codeId || Long.UZERO).toString());
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<MsgStoreCodeResponse>): MsgStoreCodeResponse {
|
||||
const message = { ...baseMsgStoreCodeResponse } as MsgStoreCodeResponse;
|
||||
if (object.codeId !== undefined && object.codeId !== null) {
|
||||
@ -275,23 +291,27 @@ export const MsgStoreCodeResponse = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: MsgStoreCodeResponse): unknown {
|
||||
const obj: any = {};
|
||||
message.codeId !== undefined && (obj.codeId = (message.codeId || Long.UZERO).toString());
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseMsgInstantiateContract: object = { sender: "", admin: "", codeId: Long.UZERO, label: "" };
|
||||
|
||||
export const MsgInstantiateContract = {
|
||||
encode(message: MsgInstantiateContract, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.sender);
|
||||
writer.uint32(18).string(message.admin);
|
||||
writer.uint32(24).uint64(message.codeId);
|
||||
writer.uint32(34).string(message.label);
|
||||
writer.uint32(42).bytes(message.initMsg);
|
||||
if (message.sender !== "") {
|
||||
writer.uint32(10).string(message.sender);
|
||||
}
|
||||
if (message.admin !== "") {
|
||||
writer.uint32(18).string(message.admin);
|
||||
}
|
||||
if (!message.codeId.isZero()) {
|
||||
writer.uint32(24).uint64(message.codeId);
|
||||
}
|
||||
if (message.label !== "") {
|
||||
writer.uint32(34).string(message.label);
|
||||
}
|
||||
if (message.initMsg.length !== 0) {
|
||||
writer.uint32(42).bytes(message.initMsg);
|
||||
}
|
||||
for (const v of message.initFunds) {
|
||||
Coin.encode(v!, writer.uint32(50).fork()).ldelim();
|
||||
}
|
||||
@ -366,6 +386,22 @@ export const MsgInstantiateContract = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: MsgInstantiateContract): unknown {
|
||||
const obj: any = {};
|
||||
message.sender !== undefined && (obj.sender = message.sender);
|
||||
message.admin !== undefined && (obj.admin = message.admin);
|
||||
message.codeId !== undefined && (obj.codeId = (message.codeId || Long.UZERO).toString());
|
||||
message.label !== undefined && (obj.label = message.label);
|
||||
message.initMsg !== undefined &&
|
||||
(obj.initMsg = base64FromBytes(message.initMsg !== undefined ? message.initMsg : new Uint8Array()));
|
||||
if (message.initFunds) {
|
||||
obj.initFunds = message.initFunds.map((e) => (e ? Coin.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.initFunds = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<MsgInstantiateContract>): MsgInstantiateContract {
|
||||
const message = { ...baseMsgInstantiateContract } as MsgInstantiateContract;
|
||||
message.initFunds = [];
|
||||
@ -401,29 +437,15 @@ export const MsgInstantiateContract = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: MsgInstantiateContract): unknown {
|
||||
const obj: any = {};
|
||||
message.sender !== undefined && (obj.sender = message.sender);
|
||||
message.admin !== undefined && (obj.admin = message.admin);
|
||||
message.codeId !== undefined && (obj.codeId = (message.codeId || Long.UZERO).toString());
|
||||
message.label !== undefined && (obj.label = message.label);
|
||||
message.initMsg !== undefined &&
|
||||
(obj.initMsg = base64FromBytes(message.initMsg !== undefined ? message.initMsg : new Uint8Array()));
|
||||
if (message.initFunds) {
|
||||
obj.initFunds = message.initFunds.map((e) => (e ? Coin.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.initFunds = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseMsgInstantiateContractResponse: object = { address: "" };
|
||||
|
||||
export const MsgInstantiateContractResponse = {
|
||||
encode(message: MsgInstantiateContractResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.address);
|
||||
if (message.address !== "") {
|
||||
writer.uint32(10).string(message.address);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -455,6 +477,12 @@ export const MsgInstantiateContractResponse = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: MsgInstantiateContractResponse): unknown {
|
||||
const obj: any = {};
|
||||
message.address !== undefined && (obj.address = message.address);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<MsgInstantiateContractResponse>): MsgInstantiateContractResponse {
|
||||
const message = { ...baseMsgInstantiateContractResponse } as MsgInstantiateContractResponse;
|
||||
if (object.address !== undefined && object.address !== null) {
|
||||
@ -464,21 +492,21 @@ export const MsgInstantiateContractResponse = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: MsgInstantiateContractResponse): unknown {
|
||||
const obj: any = {};
|
||||
message.address !== undefined && (obj.address = message.address);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseMsgExecuteContract: object = { sender: "", contract: "" };
|
||||
|
||||
export const MsgExecuteContract = {
|
||||
encode(message: MsgExecuteContract, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.sender);
|
||||
writer.uint32(18).string(message.contract);
|
||||
writer.uint32(26).bytes(message.msg);
|
||||
if (message.sender !== "") {
|
||||
writer.uint32(10).string(message.sender);
|
||||
}
|
||||
if (message.contract !== "") {
|
||||
writer.uint32(18).string(message.contract);
|
||||
}
|
||||
if (message.msg.length !== 0) {
|
||||
writer.uint32(26).bytes(message.msg);
|
||||
}
|
||||
for (const v of message.sentFunds) {
|
||||
Coin.encode(v!, writer.uint32(42).fork()).ldelim();
|
||||
}
|
||||
@ -537,6 +565,20 @@ export const MsgExecuteContract = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: MsgExecuteContract): unknown {
|
||||
const obj: any = {};
|
||||
message.sender !== undefined && (obj.sender = message.sender);
|
||||
message.contract !== undefined && (obj.contract = message.contract);
|
||||
message.msg !== undefined &&
|
||||
(obj.msg = base64FromBytes(message.msg !== undefined ? message.msg : new Uint8Array()));
|
||||
if (message.sentFunds) {
|
||||
obj.sentFunds = message.sentFunds.map((e) => (e ? Coin.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.sentFunds = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<MsgExecuteContract>): MsgExecuteContract {
|
||||
const message = { ...baseMsgExecuteContract } as MsgExecuteContract;
|
||||
message.sentFunds = [];
|
||||
@ -562,27 +604,15 @@ export const MsgExecuteContract = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: MsgExecuteContract): unknown {
|
||||
const obj: any = {};
|
||||
message.sender !== undefined && (obj.sender = message.sender);
|
||||
message.contract !== undefined && (obj.contract = message.contract);
|
||||
message.msg !== undefined &&
|
||||
(obj.msg = base64FromBytes(message.msg !== undefined ? message.msg : new Uint8Array()));
|
||||
if (message.sentFunds) {
|
||||
obj.sentFunds = message.sentFunds.map((e) => (e ? Coin.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.sentFunds = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseMsgExecuteContractResponse: object = {};
|
||||
|
||||
export const MsgExecuteContractResponse = {
|
||||
encode(message: MsgExecuteContractResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).bytes(message.data);
|
||||
if (message.data.length !== 0) {
|
||||
writer.uint32(10).bytes(message.data);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -612,6 +642,13 @@ export const MsgExecuteContractResponse = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: MsgExecuteContractResponse): unknown {
|
||||
const obj: any = {};
|
||||
message.data !== undefined &&
|
||||
(obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array()));
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<MsgExecuteContractResponse>): MsgExecuteContractResponse {
|
||||
const message = { ...baseMsgExecuteContractResponse } as MsgExecuteContractResponse;
|
||||
if (object.data !== undefined && object.data !== null) {
|
||||
@ -621,23 +658,24 @@ export const MsgExecuteContractResponse = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: MsgExecuteContractResponse): unknown {
|
||||
const obj: any = {};
|
||||
message.data !== undefined &&
|
||||
(obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array()));
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseMsgMigrateContract: object = { sender: "", contract: "", codeId: Long.UZERO };
|
||||
|
||||
export const MsgMigrateContract = {
|
||||
encode(message: MsgMigrateContract, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.sender);
|
||||
writer.uint32(18).string(message.contract);
|
||||
writer.uint32(24).uint64(message.codeId);
|
||||
writer.uint32(34).bytes(message.migrateMsg);
|
||||
if (message.sender !== "") {
|
||||
writer.uint32(10).string(message.sender);
|
||||
}
|
||||
if (message.contract !== "") {
|
||||
writer.uint32(18).string(message.contract);
|
||||
}
|
||||
if (!message.codeId.isZero()) {
|
||||
writer.uint32(24).uint64(message.codeId);
|
||||
}
|
||||
if (message.migrateMsg.length !== 0) {
|
||||
writer.uint32(34).bytes(message.migrateMsg);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -691,6 +729,18 @@ export const MsgMigrateContract = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: MsgMigrateContract): unknown {
|
||||
const obj: any = {};
|
||||
message.sender !== undefined && (obj.sender = message.sender);
|
||||
message.contract !== undefined && (obj.contract = message.contract);
|
||||
message.codeId !== undefined && (obj.codeId = (message.codeId || Long.UZERO).toString());
|
||||
message.migrateMsg !== undefined &&
|
||||
(obj.migrateMsg = base64FromBytes(
|
||||
message.migrateMsg !== undefined ? message.migrateMsg : new Uint8Array(),
|
||||
));
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<MsgMigrateContract>): MsgMigrateContract {
|
||||
const message = { ...baseMsgMigrateContract } as MsgMigrateContract;
|
||||
if (object.sender !== undefined && object.sender !== null) {
|
||||
@ -715,25 +765,15 @@ export const MsgMigrateContract = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: MsgMigrateContract): unknown {
|
||||
const obj: any = {};
|
||||
message.sender !== undefined && (obj.sender = message.sender);
|
||||
message.contract !== undefined && (obj.contract = message.contract);
|
||||
message.codeId !== undefined && (obj.codeId = (message.codeId || Long.UZERO).toString());
|
||||
message.migrateMsg !== undefined &&
|
||||
(obj.migrateMsg = base64FromBytes(
|
||||
message.migrateMsg !== undefined ? message.migrateMsg : new Uint8Array(),
|
||||
));
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseMsgMigrateContractResponse: object = {};
|
||||
|
||||
export const MsgMigrateContractResponse = {
|
||||
encode(message: MsgMigrateContractResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).bytes(message.data);
|
||||
if (message.data.length !== 0) {
|
||||
writer.uint32(10).bytes(message.data);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -763,6 +803,13 @@ export const MsgMigrateContractResponse = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: MsgMigrateContractResponse): unknown {
|
||||
const obj: any = {};
|
||||
message.data !== undefined &&
|
||||
(obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array()));
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<MsgMigrateContractResponse>): MsgMigrateContractResponse {
|
||||
const message = { ...baseMsgMigrateContractResponse } as MsgMigrateContractResponse;
|
||||
if (object.data !== undefined && object.data !== null) {
|
||||
@ -772,22 +819,21 @@ export const MsgMigrateContractResponse = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: MsgMigrateContractResponse): unknown {
|
||||
const obj: any = {};
|
||||
message.data !== undefined &&
|
||||
(obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array()));
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseMsgUpdateAdmin: object = { sender: "", newAdmin: "", contract: "" };
|
||||
|
||||
export const MsgUpdateAdmin = {
|
||||
encode(message: MsgUpdateAdmin, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.sender);
|
||||
writer.uint32(18).string(message.newAdmin);
|
||||
writer.uint32(26).string(message.contract);
|
||||
if (message.sender !== "") {
|
||||
writer.uint32(10).string(message.sender);
|
||||
}
|
||||
if (message.newAdmin !== "") {
|
||||
writer.uint32(18).string(message.newAdmin);
|
||||
}
|
||||
if (message.contract !== "") {
|
||||
writer.uint32(26).string(message.contract);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -835,6 +881,14 @@ export const MsgUpdateAdmin = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: MsgUpdateAdmin): unknown {
|
||||
const obj: any = {};
|
||||
message.sender !== undefined && (obj.sender = message.sender);
|
||||
message.newAdmin !== undefined && (obj.newAdmin = message.newAdmin);
|
||||
message.contract !== undefined && (obj.contract = message.contract);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<MsgUpdateAdmin>): MsgUpdateAdmin {
|
||||
const message = { ...baseMsgUpdateAdmin } as MsgUpdateAdmin;
|
||||
if (object.sender !== undefined && object.sender !== null) {
|
||||
@ -854,14 +908,6 @@ export const MsgUpdateAdmin = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: MsgUpdateAdmin): unknown {
|
||||
const obj: any = {};
|
||||
message.sender !== undefined && (obj.sender = message.sender);
|
||||
message.newAdmin !== undefined && (obj.newAdmin = message.newAdmin);
|
||||
message.contract !== undefined && (obj.contract = message.contract);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseMsgUpdateAdminResponse: object = {};
|
||||
@ -891,23 +937,27 @@ export const MsgUpdateAdminResponse = {
|
||||
return message;
|
||||
},
|
||||
|
||||
fromPartial(_: DeepPartial<MsgUpdateAdminResponse>): MsgUpdateAdminResponse {
|
||||
const message = { ...baseMsgUpdateAdminResponse } as MsgUpdateAdminResponse;
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(_: MsgUpdateAdminResponse): unknown {
|
||||
const obj: any = {};
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(_: DeepPartial<MsgUpdateAdminResponse>): MsgUpdateAdminResponse {
|
||||
const message = { ...baseMsgUpdateAdminResponse } as MsgUpdateAdminResponse;
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
const baseMsgClearAdmin: object = { sender: "", contract: "" };
|
||||
|
||||
export const MsgClearAdmin = {
|
||||
encode(message: MsgClearAdmin, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.sender);
|
||||
writer.uint32(26).string(message.contract);
|
||||
if (message.sender !== "") {
|
||||
writer.uint32(10).string(message.sender);
|
||||
}
|
||||
if (message.contract !== "") {
|
||||
writer.uint32(26).string(message.contract);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -947,6 +997,13 @@ export const MsgClearAdmin = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: MsgClearAdmin): unknown {
|
||||
const obj: any = {};
|
||||
message.sender !== undefined && (obj.sender = message.sender);
|
||||
message.contract !== undefined && (obj.contract = message.contract);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<MsgClearAdmin>): MsgClearAdmin {
|
||||
const message = { ...baseMsgClearAdmin } as MsgClearAdmin;
|
||||
if (object.sender !== undefined && object.sender !== null) {
|
||||
@ -961,13 +1018,6 @@ export const MsgClearAdmin = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: MsgClearAdmin): unknown {
|
||||
const obj: any = {};
|
||||
message.sender !== undefined && (obj.sender = message.sender);
|
||||
message.contract !== undefined && (obj.contract = message.contract);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseMsgClearAdminResponse: object = {};
|
||||
@ -997,15 +1047,15 @@ export const MsgClearAdminResponse = {
|
||||
return message;
|
||||
},
|
||||
|
||||
fromPartial(_: DeepPartial<MsgClearAdminResponse>): MsgClearAdminResponse {
|
||||
const message = { ...baseMsgClearAdminResponse } as MsgClearAdminResponse;
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(_: MsgClearAdminResponse): unknown {
|
||||
const obj: any = {};
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(_: DeepPartial<MsgClearAdminResponse>): MsgClearAdminResponse {
|
||||
const message = { ...baseMsgClearAdminResponse } as MsgClearAdminResponse;
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
/** Msg defines the wasm Msg service. */
|
||||
@ -1077,7 +1127,7 @@ var globalThis: any = (() => {
|
||||
if (typeof self !== "undefined") return self;
|
||||
if (typeof window !== "undefined") return window;
|
||||
if (typeof global !== "undefined") return global;
|
||||
throw new Error("Unable to locate global object");
|
||||
throw "Unable to locate global object";
|
||||
})();
|
||||
|
||||
const atob: (b64: string) => string =
|
||||
|
||||
@ -181,7 +181,9 @@ const baseAccessTypeParam: object = { value: 0 };
|
||||
|
||||
export const AccessTypeParam = {
|
||||
encode(message: AccessTypeParam, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(8).int32(message.value);
|
||||
if (message.value !== 0) {
|
||||
writer.uint32(8).int32(message.value);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -213,6 +215,12 @@ export const AccessTypeParam = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: AccessTypeParam): unknown {
|
||||
const obj: any = {};
|
||||
message.value !== undefined && (obj.value = accessTypeToJSON(message.value));
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<AccessTypeParam>): AccessTypeParam {
|
||||
const message = { ...baseAccessTypeParam } as AccessTypeParam;
|
||||
if (object.value !== undefined && object.value !== null) {
|
||||
@ -222,20 +230,18 @@ export const AccessTypeParam = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: AccessTypeParam): unknown {
|
||||
const obj: any = {};
|
||||
message.value !== undefined && (obj.value = accessTypeToJSON(message.value));
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseAccessConfig: object = { permission: 0, address: "" };
|
||||
|
||||
export const AccessConfig = {
|
||||
encode(message: AccessConfig, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(8).int32(message.permission);
|
||||
writer.uint32(18).string(message.address);
|
||||
if (message.permission !== 0) {
|
||||
writer.uint32(8).int32(message.permission);
|
||||
}
|
||||
if (message.address !== "") {
|
||||
writer.uint32(18).string(message.address);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -275,6 +281,13 @@ export const AccessConfig = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: AccessConfig): unknown {
|
||||
const obj: any = {};
|
||||
message.permission !== undefined && (obj.permission = accessTypeToJSON(message.permission));
|
||||
message.address !== undefined && (obj.address = message.address);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<AccessConfig>): AccessConfig {
|
||||
const message = { ...baseAccessConfig } as AccessConfig;
|
||||
if (object.permission !== undefined && object.permission !== null) {
|
||||
@ -289,24 +302,21 @@ export const AccessConfig = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: AccessConfig): unknown {
|
||||
const obj: any = {};
|
||||
message.permission !== undefined && (obj.permission = accessTypeToJSON(message.permission));
|
||||
message.address !== undefined && (obj.address = message.address);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseParams: object = { instantiateDefaultPermission: 0, maxWasmCodeSize: Long.UZERO };
|
||||
|
||||
export const Params = {
|
||||
encode(message: Params, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
if (message.codeUploadAccess !== undefined && message.codeUploadAccess !== undefined) {
|
||||
if (message.codeUploadAccess !== undefined) {
|
||||
AccessConfig.encode(message.codeUploadAccess, writer.uint32(10).fork()).ldelim();
|
||||
}
|
||||
writer.uint32(16).int32(message.instantiateDefaultPermission);
|
||||
writer.uint32(24).uint64(message.maxWasmCodeSize);
|
||||
if (message.instantiateDefaultPermission !== 0) {
|
||||
writer.uint32(16).int32(message.instantiateDefaultPermission);
|
||||
}
|
||||
if (!message.maxWasmCodeSize.isZero()) {
|
||||
writer.uint32(24).uint64(message.maxWasmCodeSize);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -354,6 +364,19 @@ export const Params = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Params): unknown {
|
||||
const obj: any = {};
|
||||
message.codeUploadAccess !== undefined &&
|
||||
(obj.codeUploadAccess = message.codeUploadAccess
|
||||
? AccessConfig.toJSON(message.codeUploadAccess)
|
||||
: undefined);
|
||||
message.instantiateDefaultPermission !== undefined &&
|
||||
(obj.instantiateDefaultPermission = accessTypeToJSON(message.instantiateDefaultPermission));
|
||||
message.maxWasmCodeSize !== undefined &&
|
||||
(obj.maxWasmCodeSize = (message.maxWasmCodeSize || Long.UZERO).toString());
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<Params>): Params {
|
||||
const message = { ...baseParams } as Params;
|
||||
if (object.codeUploadAccess !== undefined && object.codeUploadAccess !== null) {
|
||||
@ -373,30 +396,25 @@ export const Params = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Params): unknown {
|
||||
const obj: any = {};
|
||||
message.codeUploadAccess !== undefined &&
|
||||
(obj.codeUploadAccess = message.codeUploadAccess
|
||||
? AccessConfig.toJSON(message.codeUploadAccess)
|
||||
: undefined);
|
||||
message.instantiateDefaultPermission !== undefined &&
|
||||
(obj.instantiateDefaultPermission = accessTypeToJSON(message.instantiateDefaultPermission));
|
||||
message.maxWasmCodeSize !== undefined &&
|
||||
(obj.maxWasmCodeSize = (message.maxWasmCodeSize || Long.UZERO).toString());
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseCodeInfo: object = { creator: "", source: "", builder: "" };
|
||||
|
||||
export const CodeInfo = {
|
||||
encode(message: CodeInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).bytes(message.codeHash);
|
||||
writer.uint32(18).string(message.creator);
|
||||
writer.uint32(26).string(message.source);
|
||||
writer.uint32(34).string(message.builder);
|
||||
if (message.instantiateConfig !== undefined && message.instantiateConfig !== undefined) {
|
||||
if (message.codeHash.length !== 0) {
|
||||
writer.uint32(10).bytes(message.codeHash);
|
||||
}
|
||||
if (message.creator !== "") {
|
||||
writer.uint32(18).string(message.creator);
|
||||
}
|
||||
if (message.source !== "") {
|
||||
writer.uint32(26).string(message.source);
|
||||
}
|
||||
if (message.builder !== "") {
|
||||
writer.uint32(34).string(message.builder);
|
||||
}
|
||||
if (message.instantiateConfig !== undefined) {
|
||||
AccessConfig.encode(message.instantiateConfig, writer.uint32(42).fork()).ldelim();
|
||||
}
|
||||
return writer;
|
||||
@ -460,6 +478,20 @@ export const CodeInfo = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: CodeInfo): unknown {
|
||||
const obj: any = {};
|
||||
message.codeHash !== undefined &&
|
||||
(obj.codeHash = base64FromBytes(message.codeHash !== undefined ? message.codeHash : new Uint8Array()));
|
||||
message.creator !== undefined && (obj.creator = message.creator);
|
||||
message.source !== undefined && (obj.source = message.source);
|
||||
message.builder !== undefined && (obj.builder = message.builder);
|
||||
message.instantiateConfig !== undefined &&
|
||||
(obj.instantiateConfig = message.instantiateConfig
|
||||
? AccessConfig.toJSON(message.instantiateConfig)
|
||||
: undefined);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<CodeInfo>): CodeInfo {
|
||||
const message = { ...baseCodeInfo } as CodeInfo;
|
||||
if (object.codeHash !== undefined && object.codeHash !== null) {
|
||||
@ -489,31 +521,25 @@ export const CodeInfo = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: CodeInfo): unknown {
|
||||
const obj: any = {};
|
||||
message.codeHash !== undefined &&
|
||||
(obj.codeHash = base64FromBytes(message.codeHash !== undefined ? message.codeHash : new Uint8Array()));
|
||||
message.creator !== undefined && (obj.creator = message.creator);
|
||||
message.source !== undefined && (obj.source = message.source);
|
||||
message.builder !== undefined && (obj.builder = message.builder);
|
||||
message.instantiateConfig !== undefined &&
|
||||
(obj.instantiateConfig = message.instantiateConfig
|
||||
? AccessConfig.toJSON(message.instantiateConfig)
|
||||
: undefined);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseContractInfo: object = { codeId: Long.UZERO, creator: "", admin: "", label: "" };
|
||||
|
||||
export const ContractInfo = {
|
||||
encode(message: ContractInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(8).uint64(message.codeId);
|
||||
writer.uint32(18).string(message.creator);
|
||||
writer.uint32(26).string(message.admin);
|
||||
writer.uint32(34).string(message.label);
|
||||
if (message.created !== undefined && message.created !== undefined) {
|
||||
if (!message.codeId.isZero()) {
|
||||
writer.uint32(8).uint64(message.codeId);
|
||||
}
|
||||
if (message.creator !== "") {
|
||||
writer.uint32(18).string(message.creator);
|
||||
}
|
||||
if (message.admin !== "") {
|
||||
writer.uint32(26).string(message.admin);
|
||||
}
|
||||
if (message.label !== "") {
|
||||
writer.uint32(34).string(message.label);
|
||||
}
|
||||
if (message.created !== undefined) {
|
||||
AbsoluteTxPosition.encode(message.created, writer.uint32(42).fork()).ldelim();
|
||||
}
|
||||
return writer;
|
||||
@ -579,6 +605,17 @@ export const ContractInfo = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: ContractInfo): unknown {
|
||||
const obj: any = {};
|
||||
message.codeId !== undefined && (obj.codeId = (message.codeId || Long.UZERO).toString());
|
||||
message.creator !== undefined && (obj.creator = message.creator);
|
||||
message.admin !== undefined && (obj.admin = message.admin);
|
||||
message.label !== undefined && (obj.label = message.label);
|
||||
message.created !== undefined &&
|
||||
(obj.created = message.created ? AbsoluteTxPosition.toJSON(message.created) : undefined);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<ContractInfo>): ContractInfo {
|
||||
const message = { ...baseContractInfo } as ContractInfo;
|
||||
if (object.codeId !== undefined && object.codeId !== null) {
|
||||
@ -608,29 +645,24 @@ export const ContractInfo = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: ContractInfo): unknown {
|
||||
const obj: any = {};
|
||||
message.codeId !== undefined && (obj.codeId = (message.codeId || Long.UZERO).toString());
|
||||
message.creator !== undefined && (obj.creator = message.creator);
|
||||
message.admin !== undefined && (obj.admin = message.admin);
|
||||
message.label !== undefined && (obj.label = message.label);
|
||||
message.created !== undefined &&
|
||||
(obj.created = message.created ? AbsoluteTxPosition.toJSON(message.created) : undefined);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseContractCodeHistoryEntry: object = { operation: 0, codeId: Long.UZERO };
|
||||
|
||||
export const ContractCodeHistoryEntry = {
|
||||
encode(message: ContractCodeHistoryEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(8).int32(message.operation);
|
||||
writer.uint32(16).uint64(message.codeId);
|
||||
if (message.updated !== undefined && message.updated !== undefined) {
|
||||
if (message.operation !== 0) {
|
||||
writer.uint32(8).int32(message.operation);
|
||||
}
|
||||
if (!message.codeId.isZero()) {
|
||||
writer.uint32(16).uint64(message.codeId);
|
||||
}
|
||||
if (message.updated !== undefined) {
|
||||
AbsoluteTxPosition.encode(message.updated, writer.uint32(26).fork()).ldelim();
|
||||
}
|
||||
writer.uint32(34).bytes(message.msg);
|
||||
if (message.msg.length !== 0) {
|
||||
writer.uint32(34).bytes(message.msg);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -684,6 +716,18 @@ export const ContractCodeHistoryEntry = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: ContractCodeHistoryEntry): unknown {
|
||||
const obj: any = {};
|
||||
message.operation !== undefined &&
|
||||
(obj.operation = contractCodeHistoryOperationTypeToJSON(message.operation));
|
||||
message.codeId !== undefined && (obj.codeId = (message.codeId || Long.UZERO).toString());
|
||||
message.updated !== undefined &&
|
||||
(obj.updated = message.updated ? AbsoluteTxPosition.toJSON(message.updated) : undefined);
|
||||
message.msg !== undefined &&
|
||||
(obj.msg = base64FromBytes(message.msg !== undefined ? message.msg : new Uint8Array()));
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<ContractCodeHistoryEntry>): ContractCodeHistoryEntry {
|
||||
const message = { ...baseContractCodeHistoryEntry } as ContractCodeHistoryEntry;
|
||||
if (object.operation !== undefined && object.operation !== null) {
|
||||
@ -708,26 +752,18 @@ export const ContractCodeHistoryEntry = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: ContractCodeHistoryEntry): unknown {
|
||||
const obj: any = {};
|
||||
message.operation !== undefined &&
|
||||
(obj.operation = contractCodeHistoryOperationTypeToJSON(message.operation));
|
||||
message.codeId !== undefined && (obj.codeId = (message.codeId || Long.UZERO).toString());
|
||||
message.updated !== undefined &&
|
||||
(obj.updated = message.updated ? AbsoluteTxPosition.toJSON(message.updated) : undefined);
|
||||
message.msg !== undefined &&
|
||||
(obj.msg = base64FromBytes(message.msg !== undefined ? message.msg : new Uint8Array()));
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseAbsoluteTxPosition: object = { blockHeight: Long.UZERO, txIndex: Long.UZERO };
|
||||
|
||||
export const AbsoluteTxPosition = {
|
||||
encode(message: AbsoluteTxPosition, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(8).uint64(message.blockHeight);
|
||||
writer.uint32(16).uint64(message.txIndex);
|
||||
if (!message.blockHeight.isZero()) {
|
||||
writer.uint32(8).uint64(message.blockHeight);
|
||||
}
|
||||
if (!message.txIndex.isZero()) {
|
||||
writer.uint32(16).uint64(message.txIndex);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -767,6 +803,13 @@ export const AbsoluteTxPosition = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: AbsoluteTxPosition): unknown {
|
||||
const obj: any = {};
|
||||
message.blockHeight !== undefined && (obj.blockHeight = (message.blockHeight || Long.UZERO).toString());
|
||||
message.txIndex !== undefined && (obj.txIndex = (message.txIndex || Long.UZERO).toString());
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<AbsoluteTxPosition>): AbsoluteTxPosition {
|
||||
const message = { ...baseAbsoluteTxPosition } as AbsoluteTxPosition;
|
||||
if (object.blockHeight !== undefined && object.blockHeight !== null) {
|
||||
@ -781,21 +824,18 @@ export const AbsoluteTxPosition = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: AbsoluteTxPosition): unknown {
|
||||
const obj: any = {};
|
||||
message.blockHeight !== undefined && (obj.blockHeight = (message.blockHeight || Long.UZERO).toString());
|
||||
message.txIndex !== undefined && (obj.txIndex = (message.txIndex || Long.UZERO).toString());
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseModel: object = {};
|
||||
|
||||
export const Model = {
|
||||
encode(message: Model, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).bytes(message.key);
|
||||
writer.uint32(18).bytes(message.value);
|
||||
if (message.key.length !== 0) {
|
||||
writer.uint32(10).bytes(message.key);
|
||||
}
|
||||
if (message.value.length !== 0) {
|
||||
writer.uint32(18).bytes(message.value);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -831,6 +871,15 @@ export const Model = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Model): unknown {
|
||||
const obj: any = {};
|
||||
message.key !== undefined &&
|
||||
(obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array()));
|
||||
message.value !== undefined &&
|
||||
(obj.value = base64FromBytes(message.value !== undefined ? message.value : new Uint8Array()));
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<Model>): Model {
|
||||
const message = { ...baseModel } as Model;
|
||||
if (object.key !== undefined && object.key !== null) {
|
||||
@ -845,15 +894,6 @@ export const Model = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Model): unknown {
|
||||
const obj: any = {};
|
||||
message.key !== undefined &&
|
||||
(obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array()));
|
||||
message.value !== undefined &&
|
||||
(obj.value = base64FromBytes(message.value !== undefined ? message.value : new Uint8Array()));
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
declare var self: any | undefined;
|
||||
@ -863,7 +903,7 @@ var globalThis: any = (() => {
|
||||
if (typeof self !== "undefined") return self;
|
||||
if (typeof window !== "undefined") return window;
|
||||
if (typeof global !== "undefined") return global;
|
||||
throw new Error("Unable to locate global object");
|
||||
throw "Unable to locate global object";
|
||||
})();
|
||||
|
||||
const atob: (b64: string) => string =
|
||||
|
||||
@ -10,17 +10,22 @@ my branch (which can be rebased).
|
||||
|
||||
## Setup
|
||||
|
||||
Test vectors are generated using those additions:
|
||||
https://github.com/CosmWasm/cosmos-sdk/pull/58
|
||||
|
||||
```
|
||||
git clone https://github.com/CosmWasm/cosmos-sdk.git
|
||||
cd cosmos-sdk
|
||||
git checkout cosmjs-test-vectors
|
||||
git checkout cosmjs-test-vectors-v2
|
||||
|
||||
make build-simd-linux # or on OSX: make build-simd-darwin
|
||||
# this takes a while to download a docker image and make a deterministic build....
|
||||
# Use one of those build commands. The first one is native, the other two use a docker build container.
|
||||
make build
|
||||
make build-simd-linux
|
||||
make build-simd-darwin
|
||||
|
||||
ls -l ./build/simd
|
||||
ls -l ./build
|
||||
./build/simd version
|
||||
# I got `goz-phase-1-706-g1a67086b6` for commit `1a67086b6`
|
||||
# I got `goz-phase-1-1170-g2a8d2d35d` for commit `2a8d2d35daab`
|
||||
```
|
||||
|
||||
**IMPORTANT** this stores the proper `simd` binary in `./build/simd`. You may
|
||||
@ -31,7 +36,7 @@ proper version.
|
||||
## Prepare the Keys
|
||||
|
||||
You want to ensure you use the same keys as in the test vector,
|
||||
[taken from here](https://github.com/cosmos/cosmjs/blob/db1f183/packages/proto-signing/src/signing.spec.ts#L19-L27).
|
||||
[taken from here](https://github.com/cosmos/cosmjs/blob/v0.24.0-alpha.25/packages/proto-signing/src/testutils.spec.ts#L4-L12).
|
||||
This uses the testgen mnemonic:
|
||||
|
||||
`economy stock theory fatal elder harbor betray wasp final emotion task crumble siren bottom lizard educate guess current outdoor pair theory focus wife stone`
|
||||
@ -102,26 +107,29 @@ test that:
|
||||
## Generating Signatures
|
||||
|
||||
All current test vectors were signed from account number 1, with increasing
|
||||
signatures (0, 1, 2). You can produce these with the following commands:
|
||||
sequences (0, 1, 2). You can produce these with the following commands:
|
||||
|
||||
```
|
||||
# you may not need `--home /tmp` but I got an odd error without it
|
||||
# you may need to add `--home /tmp` if you get errors
|
||||
./build/simd tx sign --offline --sign-mode direct -a 1 -s 0 --from testgen --chain-id simd-testing unsigned_tx.json
|
||||
|
||||
./build/simd tx sign --home /tmp --offline --sign-mode direct -a 1 -s 1 --from testgen --chain-id simd-testing unsigned_tx.json
|
||||
./build/simd tx sign --offline --sign-mode direct -a 1 -s 1 --from testgen --chain-id simd-testing unsigned_tx.json
|
||||
./build/simd tx sign --offline --sign-mode direct -a 1 -s 2 --from testgen --chain-id simd-testing unsigned_tx.json
|
||||
```
|
||||
|
||||
You will get some output that looks more or less like this:
|
||||
For each sign command you will get output that looks more or less like this:
|
||||
|
||||
```
|
||||
Sign Mode: SIGN_MODE_DIRECT
|
||||
|
||||
Body bytes: 0a90010a1c2f636f736d6f732e62616e6b2e763162657461312e4d736753656e6412700a2d636f736d6f7331706b707472653766646b6c366766727a6c65736a6a766878686c63337234676d6d6b38727336122d636f736d6f7331717970717870713971637273737a673270767871367273307a716733797963356c7a763778751a100a0575636f736d120731323334353637
|
||||
|
||||
Auth info bytes: 0a4e0a460a1f2f636f736d6f732e63727970746f2e736563703235366b312e5075624b657912230a21034f04181eeba35391b858633a765c4a0c189697b40d216354d50890d350c7029012040a02080112130a0d0a0575636f736d12043230303010c09a0c
|
||||
|
||||
Sign Bytes: 0a93010a90010a1c2f636f736d6f732e62616e6b2e763162657461312e4d736753656e6412700a2d636f736d6f7331706b707472653766646b6c366766727a6c65736a6a766878686c63337234676d6d6b38727336122d636f736d6f7331717970717870713971637273737a673270767871367273307a716733797963356c7a763778751a100a0575636f736d12073132333435363712650a4e0a460a1f2f636f736d6f732e63727970746f2e736563703235366b312e5075624b657912230a21034f04181eeba35391b858633a765c4a0c189697b40d216354d50890d350c7029012040a02080112130a0d0a0575636f736d12043230303010c09a0c1a0c73696d642d74657374696e672001
|
||||
|
||||
Signature: c9dd20e07464d3a688ff4b710b1fbc027e495e797cfa0b4804da2ed117959227772de059808f765aa29b8f92edf30f4c2c5a438e30d3fe6897daa7141e3ce6f9
|
||||
|
||||
Signed TX Bytes: 0a93010a90010a1c2f636f736d6f732e62616e6b2e763162657461312e4d736753656e6412700a2d636f736d6f7331706b707472653766646b6c366766727a6c65736a6a766878686c63337234676d6d6b38727336122d636f736d6f7331717970717870713971637273737a673270767871367273307a716733797963356c7a763778751a100a0575636f736d12073132333435363712650a4e0a460a1f2f636f736d6f732e63727970746f2e736563703235366b312e5075624b657912230a21034f04181eeba35391b858633a765c4a0c189697b40d216354d50890d350c7029012040a02080112130a0d0a0575636f736d12043230303010c09a0c1a40c9dd20e07464d3a688ff4b710b1fbc027e495e797cfa0b4804da2ed117959227772de059808f765aa29b8f92edf30f4c2c5a438e30d3fe6897daa7141e3ce6f9
|
||||
|
||||
{"body":{"messages":[{"@type":"/cosmos.bank.v1beta1.MsgSend","from_address":"cosmos1pkptre7fdkl6gfrzlesjjvhxhlc3r4gmmk8rs6","to_address":"cosmos1qypqxpq9qcrsszg2pvxq6rs0zqg3yyc5lzv7xu","amount":[{"denom":"ucosm","amount":"1234567"}]}],"memo":"","timeout_height":"0","extension_options":[],"non_critical_extension_options":[]},"auth_info":{"signer_infos":[{"public_key":{"@type":"/cosmos.crypto.secp256k1.PubKey","key":"A08EGB7ro1ORuFhjOnZcSgwYlpe0DSFjVNUIkNNQxwKQ"},"mode_info":{"single":{"mode":"SIGN_MODE_DIRECT"}},"sequence":"0"}],"fee":{"amount":[{"denom":"ucosm","amount":"2000"}],"gas_limit":"200000","payer":"","granter":""}},"signatures":["yd0g4HRk06aI/0txCx+8An5JXnl8+gtIBNou0ReVkid3LeBZgI92WqKbj5Lt8w9MLFpDjjDT/miX2qcUHjzm+Q=="]}
|
||||
```
|
||||
|
||||
@ -83,7 +83,9 @@ export const Params = {
|
||||
for (const v of message.sendEnabled) {
|
||||
SendEnabled.encode(v!, writer.uint32(10).fork()).ldelim();
|
||||
}
|
||||
writer.uint32(16).bool(message.defaultSendEnabled);
|
||||
if (message.defaultSendEnabled === true) {
|
||||
writer.uint32(16).bool(message.defaultSendEnabled);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -125,6 +127,17 @@ export const Params = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Params): unknown {
|
||||
const obj: any = {};
|
||||
if (message.sendEnabled) {
|
||||
obj.sendEnabled = message.sendEnabled.map((e) => (e ? SendEnabled.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.sendEnabled = [];
|
||||
}
|
||||
message.defaultSendEnabled !== undefined && (obj.defaultSendEnabled = message.defaultSendEnabled);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<Params>): Params {
|
||||
const message = { ...baseParams } as Params;
|
||||
message.sendEnabled = [];
|
||||
@ -140,25 +153,18 @@ export const Params = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Params): unknown {
|
||||
const obj: any = {};
|
||||
if (message.sendEnabled) {
|
||||
obj.sendEnabled = message.sendEnabled.map((e) => (e ? SendEnabled.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.sendEnabled = [];
|
||||
}
|
||||
message.defaultSendEnabled !== undefined && (obj.defaultSendEnabled = message.defaultSendEnabled);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseSendEnabled: object = { denom: "", enabled: false };
|
||||
|
||||
export const SendEnabled = {
|
||||
encode(message: SendEnabled, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.denom);
|
||||
writer.uint32(16).bool(message.enabled);
|
||||
if (message.denom !== "") {
|
||||
writer.uint32(10).string(message.denom);
|
||||
}
|
||||
if (message.enabled === true) {
|
||||
writer.uint32(16).bool(message.enabled);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -198,6 +204,13 @@ export const SendEnabled = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: SendEnabled): unknown {
|
||||
const obj: any = {};
|
||||
message.denom !== undefined && (obj.denom = message.denom);
|
||||
message.enabled !== undefined && (obj.enabled = message.enabled);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<SendEnabled>): SendEnabled {
|
||||
const message = { ...baseSendEnabled } as SendEnabled;
|
||||
if (object.denom !== undefined && object.denom !== null) {
|
||||
@ -212,20 +225,15 @@ export const SendEnabled = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: SendEnabled): unknown {
|
||||
const obj: any = {};
|
||||
message.denom !== undefined && (obj.denom = message.denom);
|
||||
message.enabled !== undefined && (obj.enabled = message.enabled);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseInput: object = { address: "" };
|
||||
|
||||
export const Input = {
|
||||
encode(message: Input, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.address);
|
||||
if (message.address !== "") {
|
||||
writer.uint32(10).string(message.address);
|
||||
}
|
||||
for (const v of message.coins) {
|
||||
Coin.encode(v!, writer.uint32(18).fork()).ldelim();
|
||||
}
|
||||
@ -270,6 +278,17 @@ export const Input = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Input): unknown {
|
||||
const obj: any = {};
|
||||
message.address !== undefined && (obj.address = message.address);
|
||||
if (message.coins) {
|
||||
obj.coins = message.coins.map((e) => (e ? Coin.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.coins = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<Input>): Input {
|
||||
const message = { ...baseInput } as Input;
|
||||
message.coins = [];
|
||||
@ -285,24 +304,15 @@ export const Input = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Input): unknown {
|
||||
const obj: any = {};
|
||||
message.address !== undefined && (obj.address = message.address);
|
||||
if (message.coins) {
|
||||
obj.coins = message.coins.map((e) => (e ? Coin.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.coins = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseOutput: object = { address: "" };
|
||||
|
||||
export const Output = {
|
||||
encode(message: Output, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.address);
|
||||
if (message.address !== "") {
|
||||
writer.uint32(10).string(message.address);
|
||||
}
|
||||
for (const v of message.coins) {
|
||||
Coin.encode(v!, writer.uint32(18).fork()).ldelim();
|
||||
}
|
||||
@ -347,6 +357,17 @@ export const Output = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Output): unknown {
|
||||
const obj: any = {};
|
||||
message.address !== undefined && (obj.address = message.address);
|
||||
if (message.coins) {
|
||||
obj.coins = message.coins.map((e) => (e ? Coin.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.coins = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<Output>): Output {
|
||||
const message = { ...baseOutput } as Output;
|
||||
message.coins = [];
|
||||
@ -362,17 +383,6 @@ export const Output = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Output): unknown {
|
||||
const obj: any = {};
|
||||
message.address !== undefined && (obj.address = message.address);
|
||||
if (message.coins) {
|
||||
obj.coins = message.coins.map((e) => (e ? Coin.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.coins = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseSupply: object = {};
|
||||
@ -415,6 +425,16 @@ export const Supply = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Supply): unknown {
|
||||
const obj: any = {};
|
||||
if (message.total) {
|
||||
obj.total = message.total.map((e) => (e ? Coin.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.total = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<Supply>): Supply {
|
||||
const message = { ...baseSupply } as Supply;
|
||||
message.total = [];
|
||||
@ -425,24 +445,18 @@ export const Supply = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Supply): unknown {
|
||||
const obj: any = {};
|
||||
if (message.total) {
|
||||
obj.total = message.total.map((e) => (e ? Coin.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.total = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseDenomUnit: object = { denom: "", exponent: 0, aliases: "" };
|
||||
|
||||
export const DenomUnit = {
|
||||
encode(message: DenomUnit, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.denom);
|
||||
writer.uint32(16).uint32(message.exponent);
|
||||
if (message.denom !== "") {
|
||||
writer.uint32(10).string(message.denom);
|
||||
}
|
||||
if (message.exponent !== 0) {
|
||||
writer.uint32(16).uint32(message.exponent);
|
||||
}
|
||||
for (const v of message.aliases) {
|
||||
writer.uint32(26).string(v!);
|
||||
}
|
||||
@ -495,6 +509,18 @@ export const DenomUnit = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: DenomUnit): unknown {
|
||||
const obj: any = {};
|
||||
message.denom !== undefined && (obj.denom = message.denom);
|
||||
message.exponent !== undefined && (obj.exponent = message.exponent);
|
||||
if (message.aliases) {
|
||||
obj.aliases = message.aliases.map((e) => e);
|
||||
} else {
|
||||
obj.aliases = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<DenomUnit>): DenomUnit {
|
||||
const message = { ...baseDenomUnit } as DenomUnit;
|
||||
message.aliases = [];
|
||||
@ -515,30 +541,24 @@ export const DenomUnit = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: DenomUnit): unknown {
|
||||
const obj: any = {};
|
||||
message.denom !== undefined && (obj.denom = message.denom);
|
||||
message.exponent !== undefined && (obj.exponent = message.exponent);
|
||||
if (message.aliases) {
|
||||
obj.aliases = message.aliases.map((e) => e);
|
||||
} else {
|
||||
obj.aliases = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseMetadata: object = { description: "", base: "", display: "" };
|
||||
|
||||
export const Metadata = {
|
||||
encode(message: Metadata, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.description);
|
||||
if (message.description !== "") {
|
||||
writer.uint32(10).string(message.description);
|
||||
}
|
||||
for (const v of message.denomUnits) {
|
||||
DenomUnit.encode(v!, writer.uint32(18).fork()).ldelim();
|
||||
}
|
||||
writer.uint32(26).string(message.base);
|
||||
writer.uint32(34).string(message.display);
|
||||
if (message.base !== "") {
|
||||
writer.uint32(26).string(message.base);
|
||||
}
|
||||
if (message.display !== "") {
|
||||
writer.uint32(34).string(message.display);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -596,6 +616,19 @@ export const Metadata = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Metadata): unknown {
|
||||
const obj: any = {};
|
||||
message.description !== undefined && (obj.description = message.description);
|
||||
if (message.denomUnits) {
|
||||
obj.denomUnits = message.denomUnits.map((e) => (e ? DenomUnit.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.denomUnits = [];
|
||||
}
|
||||
message.base !== undefined && (obj.base = message.base);
|
||||
message.display !== undefined && (obj.display = message.display);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<Metadata>): Metadata {
|
||||
const message = { ...baseMetadata } as Metadata;
|
||||
message.denomUnits = [];
|
||||
@ -621,19 +654,6 @@ export const Metadata = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Metadata): unknown {
|
||||
const obj: any = {};
|
||||
message.description !== undefined && (obj.description = message.description);
|
||||
if (message.denomUnits) {
|
||||
obj.denomUnits = message.denomUnits.map((e) => (e ? DenomUnit.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.denomUnits = [];
|
||||
}
|
||||
message.base !== undefined && (obj.base = message.base);
|
||||
message.display !== undefined && (obj.display = message.display);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
type Builtin = Date | Function | Uint8Array | string | number | undefined | Long;
|
||||
|
||||
@ -29,8 +29,12 @@ const baseMsgSend: object = { fromAddress: "", toAddress: "" };
|
||||
|
||||
export const MsgSend = {
|
||||
encode(message: MsgSend, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.fromAddress);
|
||||
writer.uint32(18).string(message.toAddress);
|
||||
if (message.fromAddress !== "") {
|
||||
writer.uint32(10).string(message.fromAddress);
|
||||
}
|
||||
if (message.toAddress !== "") {
|
||||
writer.uint32(18).string(message.toAddress);
|
||||
}
|
||||
for (const v of message.amount) {
|
||||
Coin.encode(v!, writer.uint32(26).fork()).ldelim();
|
||||
}
|
||||
@ -83,6 +87,18 @@ export const MsgSend = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: MsgSend): unknown {
|
||||
const obj: any = {};
|
||||
message.fromAddress !== undefined && (obj.fromAddress = message.fromAddress);
|
||||
message.toAddress !== undefined && (obj.toAddress = message.toAddress);
|
||||
if (message.amount) {
|
||||
obj.amount = message.amount.map((e) => (e ? Coin.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.amount = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<MsgSend>): MsgSend {
|
||||
const message = { ...baseMsgSend } as MsgSend;
|
||||
message.amount = [];
|
||||
@ -103,18 +119,6 @@ export const MsgSend = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: MsgSend): unknown {
|
||||
const obj: any = {};
|
||||
message.fromAddress !== undefined && (obj.fromAddress = message.fromAddress);
|
||||
message.toAddress !== undefined && (obj.toAddress = message.toAddress);
|
||||
if (message.amount) {
|
||||
obj.amount = message.amount.map((e) => (e ? Coin.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.amount = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseMsgSendResponse: object = {};
|
||||
@ -144,15 +148,15 @@ export const MsgSendResponse = {
|
||||
return message;
|
||||
},
|
||||
|
||||
fromPartial(_: DeepPartial<MsgSendResponse>): MsgSendResponse {
|
||||
const message = { ...baseMsgSendResponse } as MsgSendResponse;
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(_: MsgSendResponse): unknown {
|
||||
const obj: any = {};
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(_: DeepPartial<MsgSendResponse>): MsgSendResponse {
|
||||
const message = { ...baseMsgSendResponse } as MsgSendResponse;
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
const baseMsgMultiSend: object = {};
|
||||
@ -208,6 +212,21 @@ export const MsgMultiSend = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: MsgMultiSend): unknown {
|
||||
const obj: any = {};
|
||||
if (message.inputs) {
|
||||
obj.inputs = message.inputs.map((e) => (e ? Input.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.inputs = [];
|
||||
}
|
||||
if (message.outputs) {
|
||||
obj.outputs = message.outputs.map((e) => (e ? Output.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.outputs = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<MsgMultiSend>): MsgMultiSend {
|
||||
const message = { ...baseMsgMultiSend } as MsgMultiSend;
|
||||
message.inputs = [];
|
||||
@ -224,21 +243,6 @@ export const MsgMultiSend = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: MsgMultiSend): unknown {
|
||||
const obj: any = {};
|
||||
if (message.inputs) {
|
||||
obj.inputs = message.inputs.map((e) => (e ? Input.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.inputs = [];
|
||||
}
|
||||
if (message.outputs) {
|
||||
obj.outputs = message.outputs.map((e) => (e ? Output.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.outputs = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseMsgMultiSendResponse: object = {};
|
||||
@ -268,15 +272,15 @@ export const MsgMultiSendResponse = {
|
||||
return message;
|
||||
},
|
||||
|
||||
fromPartial(_: DeepPartial<MsgMultiSendResponse>): MsgMultiSendResponse {
|
||||
const message = { ...baseMsgMultiSendResponse } as MsgMultiSendResponse;
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(_: MsgMultiSendResponse): unknown {
|
||||
const obj: any = {};
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(_: DeepPartial<MsgMultiSendResponse>): MsgMultiSendResponse {
|
||||
const message = { ...baseMsgMultiSendResponse } as MsgMultiSendResponse;
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
/** Msg defines the bank Msg service. */
|
||||
@ -294,13 +298,13 @@ export class MsgClientImpl implements Msg {
|
||||
}
|
||||
Send(request: MsgSend): Promise<MsgSendResponse> {
|
||||
const data = MsgSend.encode(request).finish();
|
||||
const promise = this.rpc.request("cosmos.bank.v1beta1.Msg", "methodDesc.name", data);
|
||||
const promise = this.rpc.request("cosmos.bank.v1beta1.Msg", "Send", data);
|
||||
return promise.then((data) => MsgSendResponse.decode(new _m0.Reader(data)));
|
||||
}
|
||||
|
||||
MultiSend(request: MsgMultiSend): Promise<MsgMultiSendResponse> {
|
||||
const data = MsgMultiSend.encode(request).finish();
|
||||
const promise = this.rpc.request("cosmos.bank.v1beta1.Msg", "methodDesc.name", data);
|
||||
const promise = this.rpc.request("cosmos.bank.v1beta1.Msg", "MultiSend", data);
|
||||
return promise.then((data) => MsgMultiSendResponse.decode(new _m0.Reader(data)));
|
||||
}
|
||||
}
|
||||
|
||||
@ -40,8 +40,12 @@ const baseCoin: object = { denom: "", amount: "" };
|
||||
|
||||
export const Coin = {
|
||||
encode(message: Coin, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.denom);
|
||||
writer.uint32(18).string(message.amount);
|
||||
if (message.denom !== "") {
|
||||
writer.uint32(10).string(message.denom);
|
||||
}
|
||||
if (message.amount !== "") {
|
||||
writer.uint32(18).string(message.amount);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -81,6 +85,13 @@ export const Coin = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Coin): unknown {
|
||||
const obj: any = {};
|
||||
message.denom !== undefined && (obj.denom = message.denom);
|
||||
message.amount !== undefined && (obj.amount = message.amount);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<Coin>): Coin {
|
||||
const message = { ...baseCoin } as Coin;
|
||||
if (object.denom !== undefined && object.denom !== null) {
|
||||
@ -95,21 +106,18 @@ export const Coin = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Coin): unknown {
|
||||
const obj: any = {};
|
||||
message.denom !== undefined && (obj.denom = message.denom);
|
||||
message.amount !== undefined && (obj.amount = message.amount);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseDecCoin: object = { denom: "", amount: "" };
|
||||
|
||||
export const DecCoin = {
|
||||
encode(message: DecCoin, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.denom);
|
||||
writer.uint32(18).string(message.amount);
|
||||
if (message.denom !== "") {
|
||||
writer.uint32(10).string(message.denom);
|
||||
}
|
||||
if (message.amount !== "") {
|
||||
writer.uint32(18).string(message.amount);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -149,6 +157,13 @@ export const DecCoin = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: DecCoin): unknown {
|
||||
const obj: any = {};
|
||||
message.denom !== undefined && (obj.denom = message.denom);
|
||||
message.amount !== undefined && (obj.amount = message.amount);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<DecCoin>): DecCoin {
|
||||
const message = { ...baseDecCoin } as DecCoin;
|
||||
if (object.denom !== undefined && object.denom !== null) {
|
||||
@ -163,20 +178,15 @@ export const DecCoin = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: DecCoin): unknown {
|
||||
const obj: any = {};
|
||||
message.denom !== undefined && (obj.denom = message.denom);
|
||||
message.amount !== undefined && (obj.amount = message.amount);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseIntProto: object = { int: "" };
|
||||
|
||||
export const IntProto = {
|
||||
encode(message: IntProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.int);
|
||||
if (message.int !== "") {
|
||||
writer.uint32(10).string(message.int);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -208,6 +218,12 @@ export const IntProto = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: IntProto): unknown {
|
||||
const obj: any = {};
|
||||
message.int !== undefined && (obj.int = message.int);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<IntProto>): IntProto {
|
||||
const message = { ...baseIntProto } as IntProto;
|
||||
if (object.int !== undefined && object.int !== null) {
|
||||
@ -217,19 +233,15 @@ export const IntProto = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: IntProto): unknown {
|
||||
const obj: any = {};
|
||||
message.int !== undefined && (obj.int = message.int);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseDecProto: object = { dec: "" };
|
||||
|
||||
export const DecProto = {
|
||||
encode(message: DecProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.dec);
|
||||
if (message.dec !== "") {
|
||||
writer.uint32(10).string(message.dec);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -261,6 +273,12 @@ export const DecProto = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: DecProto): unknown {
|
||||
const obj: any = {};
|
||||
message.dec !== undefined && (obj.dec = message.dec);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<DecProto>): DecProto {
|
||||
const message = { ...baseDecProto } as DecProto;
|
||||
if (object.dec !== undefined && object.dec !== null) {
|
||||
@ -270,12 +288,6 @@ export const DecProto = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: DecProto): unknown {
|
||||
const obj: any = {};
|
||||
message.dec !== undefined && (obj.dec = message.dec);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
type Builtin = Date | Function | Uint8Array | string | number | undefined | Long;
|
||||
|
||||
@ -64,6 +64,16 @@ export const MultiSignature = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: MultiSignature): unknown {
|
||||
const obj: any = {};
|
||||
if (message.signatures) {
|
||||
obj.signatures = message.signatures.map((e) => base64FromBytes(e !== undefined ? e : new Uint8Array()));
|
||||
} else {
|
||||
obj.signatures = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<MultiSignature>): MultiSignature {
|
||||
const message = { ...baseMultiSignature } as MultiSignature;
|
||||
message.signatures = [];
|
||||
@ -74,24 +84,18 @@ export const MultiSignature = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: MultiSignature): unknown {
|
||||
const obj: any = {};
|
||||
if (message.signatures) {
|
||||
obj.signatures = message.signatures.map((e) => base64FromBytes(e !== undefined ? e : new Uint8Array()));
|
||||
} else {
|
||||
obj.signatures = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseCompactBitArray: object = { extraBitsStored: 0 };
|
||||
|
||||
export const CompactBitArray = {
|
||||
encode(message: CompactBitArray, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(8).uint32(message.extraBitsStored);
|
||||
writer.uint32(18).bytes(message.elems);
|
||||
if (message.extraBitsStored !== 0) {
|
||||
writer.uint32(8).uint32(message.extraBitsStored);
|
||||
}
|
||||
if (message.elems.length !== 0) {
|
||||
writer.uint32(18).bytes(message.elems);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -129,6 +133,14 @@ export const CompactBitArray = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: CompactBitArray): unknown {
|
||||
const obj: any = {};
|
||||
message.extraBitsStored !== undefined && (obj.extraBitsStored = message.extraBitsStored);
|
||||
message.elems !== undefined &&
|
||||
(obj.elems = base64FromBytes(message.elems !== undefined ? message.elems : new Uint8Array()));
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<CompactBitArray>): CompactBitArray {
|
||||
const message = { ...baseCompactBitArray } as CompactBitArray;
|
||||
if (object.extraBitsStored !== undefined && object.extraBitsStored !== null) {
|
||||
@ -143,14 +155,6 @@ export const CompactBitArray = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: CompactBitArray): unknown {
|
||||
const obj: any = {};
|
||||
message.extraBitsStored !== undefined && (obj.extraBitsStored = message.extraBitsStored);
|
||||
message.elems !== undefined &&
|
||||
(obj.elems = base64FromBytes(message.elems !== undefined ? message.elems : new Uint8Array()));
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
declare var self: any | undefined;
|
||||
@ -160,7 +164,7 @@ var globalThis: any = (() => {
|
||||
if (typeof self !== "undefined") return self;
|
||||
if (typeof window !== "undefined") return window;
|
||||
if (typeof global !== "undefined") return global;
|
||||
throw new Error("Unable to locate global object");
|
||||
throw "Unable to locate global object";
|
||||
})();
|
||||
|
||||
const atob: (b64: string) => string =
|
||||
|
||||
@ -24,7 +24,9 @@ const basePubKey: object = {};
|
||||
|
||||
export const PubKey = {
|
||||
encode(message: PubKey, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).bytes(message.key);
|
||||
if (message.key.length !== 0) {
|
||||
writer.uint32(10).bytes(message.key);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -54,6 +56,13 @@ export const PubKey = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: PubKey): unknown {
|
||||
const obj: any = {};
|
||||
message.key !== undefined &&
|
||||
(obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array()));
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<PubKey>): PubKey {
|
||||
const message = { ...basePubKey } as PubKey;
|
||||
if (object.key !== undefined && object.key !== null) {
|
||||
@ -63,20 +72,15 @@ export const PubKey = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: PubKey): unknown {
|
||||
const obj: any = {};
|
||||
message.key !== undefined &&
|
||||
(obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array()));
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const basePrivKey: object = {};
|
||||
|
||||
export const PrivKey = {
|
||||
encode(message: PrivKey, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).bytes(message.key);
|
||||
if (message.key.length !== 0) {
|
||||
writer.uint32(10).bytes(message.key);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -106,6 +110,13 @@ export const PrivKey = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: PrivKey): unknown {
|
||||
const obj: any = {};
|
||||
message.key !== undefined &&
|
||||
(obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array()));
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<PrivKey>): PrivKey {
|
||||
const message = { ...basePrivKey } as PrivKey;
|
||||
if (object.key !== undefined && object.key !== null) {
|
||||
@ -115,13 +126,6 @@ export const PrivKey = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: PrivKey): unknown {
|
||||
const obj: any = {};
|
||||
message.key !== undefined &&
|
||||
(obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array()));
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
declare var self: any | undefined;
|
||||
@ -131,7 +135,7 @@ var globalThis: any = (() => {
|
||||
if (typeof self !== "undefined") return self;
|
||||
if (typeof window !== "undefined") return window;
|
||||
if (typeof global !== "undefined") return global;
|
||||
throw new Error("Unable to locate global object");
|
||||
throw "Unable to locate global object";
|
||||
})();
|
||||
|
||||
const atob: (b64: string) => string =
|
||||
|
||||
@ -156,6 +156,16 @@ export const SignatureDescriptors = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: SignatureDescriptors): unknown {
|
||||
const obj: any = {};
|
||||
if (message.signatures) {
|
||||
obj.signatures = message.signatures.map((e) => (e ? SignatureDescriptor.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.signatures = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<SignatureDescriptors>): SignatureDescriptors {
|
||||
const message = { ...baseSignatureDescriptors } as SignatureDescriptors;
|
||||
message.signatures = [];
|
||||
@ -166,29 +176,21 @@ export const SignatureDescriptors = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: SignatureDescriptors): unknown {
|
||||
const obj: any = {};
|
||||
if (message.signatures) {
|
||||
obj.signatures = message.signatures.map((e) => (e ? SignatureDescriptor.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.signatures = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseSignatureDescriptor: object = { sequence: Long.UZERO };
|
||||
|
||||
export const SignatureDescriptor = {
|
||||
encode(message: SignatureDescriptor, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
if (message.publicKey !== undefined && message.publicKey !== undefined) {
|
||||
if (message.publicKey !== undefined) {
|
||||
Any.encode(message.publicKey, writer.uint32(10).fork()).ldelim();
|
||||
}
|
||||
if (message.data !== undefined && message.data !== undefined) {
|
||||
if (message.data !== undefined) {
|
||||
SignatureDescriptor_Data.encode(message.data, writer.uint32(18).fork()).ldelim();
|
||||
}
|
||||
writer.uint32(24).uint64(message.sequence);
|
||||
if (!message.sequence.isZero()) {
|
||||
writer.uint32(24).uint64(message.sequence);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -219,7 +221,7 @@ export const SignatureDescriptor = {
|
||||
fromJSON(object: any): SignatureDescriptor {
|
||||
const message = { ...baseSignatureDescriptor } as SignatureDescriptor;
|
||||
if (object.publicKey !== undefined && object.publicKey !== null) {
|
||||
message.publicKey = Any.fromPartial(object.publicKey);
|
||||
message.publicKey = Any.fromJSON(object.publicKey);
|
||||
} else {
|
||||
message.publicKey = undefined;
|
||||
}
|
||||
@ -236,6 +238,16 @@ export const SignatureDescriptor = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: SignatureDescriptor): unknown {
|
||||
const obj: any = {};
|
||||
message.publicKey !== undefined &&
|
||||
(obj.publicKey = message.publicKey ? Any.toJSON(message.publicKey) : undefined);
|
||||
message.data !== undefined &&
|
||||
(obj.data = message.data ? SignatureDescriptor_Data.toJSON(message.data) : undefined);
|
||||
message.sequence !== undefined && (obj.sequence = (message.sequence || Long.UZERO).toString());
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<SignatureDescriptor>): SignatureDescriptor {
|
||||
const message = { ...baseSignatureDescriptor } as SignatureDescriptor;
|
||||
if (object.publicKey !== undefined && object.publicKey !== null) {
|
||||
@ -255,16 +267,6 @@ export const SignatureDescriptor = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: SignatureDescriptor): unknown {
|
||||
const obj: any = {};
|
||||
message.publicKey !== undefined &&
|
||||
(obj.publicKey = message.publicKey ? Any.toJSON(message.publicKey) : undefined);
|
||||
message.data !== undefined &&
|
||||
(obj.data = message.data ? SignatureDescriptor_Data.toJSON(message.data) : undefined);
|
||||
message.sequence !== undefined && (obj.sequence = (message.sequence || Long.UZERO).toString());
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseSignatureDescriptor_Data: object = {};
|
||||
@ -316,6 +318,15 @@ export const SignatureDescriptor_Data = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: SignatureDescriptor_Data): unknown {
|
||||
const obj: any = {};
|
||||
message.single !== undefined &&
|
||||
(obj.single = message.single ? SignatureDescriptor_Data_Single.toJSON(message.single) : undefined);
|
||||
message.multi !== undefined &&
|
||||
(obj.multi = message.multi ? SignatureDescriptor_Data_Multi.toJSON(message.multi) : undefined);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<SignatureDescriptor_Data>): SignatureDescriptor_Data {
|
||||
const message = { ...baseSignatureDescriptor_Data } as SignatureDescriptor_Data;
|
||||
if (object.single !== undefined && object.single !== null) {
|
||||
@ -330,23 +341,18 @@ export const SignatureDescriptor_Data = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: SignatureDescriptor_Data): unknown {
|
||||
const obj: any = {};
|
||||
message.single !== undefined &&
|
||||
(obj.single = message.single ? SignatureDescriptor_Data_Single.toJSON(message.single) : undefined);
|
||||
message.multi !== undefined &&
|
||||
(obj.multi = message.multi ? SignatureDescriptor_Data_Multi.toJSON(message.multi) : undefined);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseSignatureDescriptor_Data_Single: object = { mode: 0 };
|
||||
|
||||
export const SignatureDescriptor_Data_Single = {
|
||||
encode(message: SignatureDescriptor_Data_Single, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(8).int32(message.mode);
|
||||
writer.uint32(18).bytes(message.signature);
|
||||
if (message.mode !== 0) {
|
||||
writer.uint32(8).int32(message.mode);
|
||||
}
|
||||
if (message.signature.length !== 0) {
|
||||
writer.uint32(18).bytes(message.signature);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -384,6 +390,16 @@ export const SignatureDescriptor_Data_Single = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: SignatureDescriptor_Data_Single): unknown {
|
||||
const obj: any = {};
|
||||
message.mode !== undefined && (obj.mode = signModeToJSON(message.mode));
|
||||
message.signature !== undefined &&
|
||||
(obj.signature = base64FromBytes(
|
||||
message.signature !== undefined ? message.signature : new Uint8Array(),
|
||||
));
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<SignatureDescriptor_Data_Single>): SignatureDescriptor_Data_Single {
|
||||
const message = { ...baseSignatureDescriptor_Data_Single } as SignatureDescriptor_Data_Single;
|
||||
if (object.mode !== undefined && object.mode !== null) {
|
||||
@ -398,23 +414,13 @@ export const SignatureDescriptor_Data_Single = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: SignatureDescriptor_Data_Single): unknown {
|
||||
const obj: any = {};
|
||||
message.mode !== undefined && (obj.mode = signModeToJSON(message.mode));
|
||||
message.signature !== undefined &&
|
||||
(obj.signature = base64FromBytes(
|
||||
message.signature !== undefined ? message.signature : new Uint8Array(),
|
||||
));
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseSignatureDescriptor_Data_Multi: object = {};
|
||||
|
||||
export const SignatureDescriptor_Data_Multi = {
|
||||
encode(message: SignatureDescriptor_Data_Multi, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
if (message.bitarray !== undefined && message.bitarray !== undefined) {
|
||||
if (message.bitarray !== undefined) {
|
||||
CompactBitArray.encode(message.bitarray, writer.uint32(10).fork()).ldelim();
|
||||
}
|
||||
for (const v of message.signatures) {
|
||||
@ -461,6 +467,18 @@ export const SignatureDescriptor_Data_Multi = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: SignatureDescriptor_Data_Multi): unknown {
|
||||
const obj: any = {};
|
||||
message.bitarray !== undefined &&
|
||||
(obj.bitarray = message.bitarray ? CompactBitArray.toJSON(message.bitarray) : undefined);
|
||||
if (message.signatures) {
|
||||
obj.signatures = message.signatures.map((e) => (e ? SignatureDescriptor_Data.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.signatures = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<SignatureDescriptor_Data_Multi>): SignatureDescriptor_Data_Multi {
|
||||
const message = { ...baseSignatureDescriptor_Data_Multi } as SignatureDescriptor_Data_Multi;
|
||||
message.signatures = [];
|
||||
@ -476,18 +494,6 @@ export const SignatureDescriptor_Data_Multi = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: SignatureDescriptor_Data_Multi): unknown {
|
||||
const obj: any = {};
|
||||
message.bitarray !== undefined &&
|
||||
(obj.bitarray = message.bitarray ? CompactBitArray.toJSON(message.bitarray) : undefined);
|
||||
if (message.signatures) {
|
||||
obj.signatures = message.signatures.map((e) => (e ? SignatureDescriptor_Data.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.signatures = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
declare var self: any | undefined;
|
||||
@ -497,7 +503,7 @@ var globalThis: any = (() => {
|
||||
if (typeof self !== "undefined") return self;
|
||||
if (typeof window !== "undefined") return window;
|
||||
if (typeof global !== "undefined") return global;
|
||||
throw new Error("Unable to locate global object");
|
||||
throw "Unable to locate global object";
|
||||
})();
|
||||
|
||||
const atob: (b64: string) => string =
|
||||
|
||||
@ -211,10 +211,10 @@ const baseTx: object = {};
|
||||
|
||||
export const Tx = {
|
||||
encode(message: Tx, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
if (message.body !== undefined && message.body !== undefined) {
|
||||
if (message.body !== undefined) {
|
||||
TxBody.encode(message.body, writer.uint32(10).fork()).ldelim();
|
||||
}
|
||||
if (message.authInfo !== undefined && message.authInfo !== undefined) {
|
||||
if (message.authInfo !== undefined) {
|
||||
AuthInfo.encode(message.authInfo, writer.uint32(18).fork()).ldelim();
|
||||
}
|
||||
for (const v of message.signatures) {
|
||||
@ -269,6 +269,19 @@ export const Tx = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Tx): unknown {
|
||||
const obj: any = {};
|
||||
message.body !== undefined && (obj.body = message.body ? TxBody.toJSON(message.body) : undefined);
|
||||
message.authInfo !== undefined &&
|
||||
(obj.authInfo = message.authInfo ? AuthInfo.toJSON(message.authInfo) : undefined);
|
||||
if (message.signatures) {
|
||||
obj.signatures = message.signatures.map((e) => base64FromBytes(e !== undefined ? e : new Uint8Array()));
|
||||
} else {
|
||||
obj.signatures = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<Tx>): Tx {
|
||||
const message = { ...baseTx } as Tx;
|
||||
message.signatures = [];
|
||||
@ -289,27 +302,18 @@ export const Tx = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Tx): unknown {
|
||||
const obj: any = {};
|
||||
message.body !== undefined && (obj.body = message.body ? TxBody.toJSON(message.body) : undefined);
|
||||
message.authInfo !== undefined &&
|
||||
(obj.authInfo = message.authInfo ? AuthInfo.toJSON(message.authInfo) : undefined);
|
||||
if (message.signatures) {
|
||||
obj.signatures = message.signatures.map((e) => base64FromBytes(e !== undefined ? e : new Uint8Array()));
|
||||
} else {
|
||||
obj.signatures = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseTxRaw: object = {};
|
||||
|
||||
export const TxRaw = {
|
||||
encode(message: TxRaw, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).bytes(message.bodyBytes);
|
||||
writer.uint32(18).bytes(message.authInfoBytes);
|
||||
if (message.bodyBytes.length !== 0) {
|
||||
writer.uint32(10).bytes(message.bodyBytes);
|
||||
}
|
||||
if (message.authInfoBytes.length !== 0) {
|
||||
writer.uint32(18).bytes(message.authInfoBytes);
|
||||
}
|
||||
for (const v of message.signatures) {
|
||||
writer.uint32(26).bytes(v!);
|
||||
}
|
||||
@ -358,6 +362,24 @@ export const TxRaw = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: TxRaw): unknown {
|
||||
const obj: any = {};
|
||||
message.bodyBytes !== undefined &&
|
||||
(obj.bodyBytes = base64FromBytes(
|
||||
message.bodyBytes !== undefined ? message.bodyBytes : new Uint8Array(),
|
||||
));
|
||||
message.authInfoBytes !== undefined &&
|
||||
(obj.authInfoBytes = base64FromBytes(
|
||||
message.authInfoBytes !== undefined ? message.authInfoBytes : new Uint8Array(),
|
||||
));
|
||||
if (message.signatures) {
|
||||
obj.signatures = message.signatures.map((e) => base64FromBytes(e !== undefined ? e : new Uint8Array()));
|
||||
} else {
|
||||
obj.signatures = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<TxRaw>): TxRaw {
|
||||
const message = { ...baseTxRaw } as TxRaw;
|
||||
message.signatures = [];
|
||||
@ -378,34 +400,24 @@ export const TxRaw = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: TxRaw): unknown {
|
||||
const obj: any = {};
|
||||
message.bodyBytes !== undefined &&
|
||||
(obj.bodyBytes = base64FromBytes(
|
||||
message.bodyBytes !== undefined ? message.bodyBytes : new Uint8Array(),
|
||||
));
|
||||
message.authInfoBytes !== undefined &&
|
||||
(obj.authInfoBytes = base64FromBytes(
|
||||
message.authInfoBytes !== undefined ? message.authInfoBytes : new Uint8Array(),
|
||||
));
|
||||
if (message.signatures) {
|
||||
obj.signatures = message.signatures.map((e) => base64FromBytes(e !== undefined ? e : new Uint8Array()));
|
||||
} else {
|
||||
obj.signatures = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseSignDoc: object = { chainId: "", accountNumber: Long.UZERO };
|
||||
|
||||
export const SignDoc = {
|
||||
encode(message: SignDoc, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).bytes(message.bodyBytes);
|
||||
writer.uint32(18).bytes(message.authInfoBytes);
|
||||
writer.uint32(26).string(message.chainId);
|
||||
writer.uint32(32).uint64(message.accountNumber);
|
||||
if (message.bodyBytes.length !== 0) {
|
||||
writer.uint32(10).bytes(message.bodyBytes);
|
||||
}
|
||||
if (message.authInfoBytes.length !== 0) {
|
||||
writer.uint32(18).bytes(message.authInfoBytes);
|
||||
}
|
||||
if (message.chainId !== "") {
|
||||
writer.uint32(26).string(message.chainId);
|
||||
}
|
||||
if (!message.accountNumber.isZero()) {
|
||||
writer.uint32(32).uint64(message.accountNumber);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -457,6 +469,22 @@ export const SignDoc = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: SignDoc): unknown {
|
||||
const obj: any = {};
|
||||
message.bodyBytes !== undefined &&
|
||||
(obj.bodyBytes = base64FromBytes(
|
||||
message.bodyBytes !== undefined ? message.bodyBytes : new Uint8Array(),
|
||||
));
|
||||
message.authInfoBytes !== undefined &&
|
||||
(obj.authInfoBytes = base64FromBytes(
|
||||
message.authInfoBytes !== undefined ? message.authInfoBytes : new Uint8Array(),
|
||||
));
|
||||
message.chainId !== undefined && (obj.chainId = message.chainId);
|
||||
message.accountNumber !== undefined &&
|
||||
(obj.accountNumber = (message.accountNumber || Long.UZERO).toString());
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<SignDoc>): SignDoc {
|
||||
const message = { ...baseSignDoc } as SignDoc;
|
||||
if (object.bodyBytes !== undefined && object.bodyBytes !== null) {
|
||||
@ -481,22 +509,6 @@ export const SignDoc = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: SignDoc): unknown {
|
||||
const obj: any = {};
|
||||
message.bodyBytes !== undefined &&
|
||||
(obj.bodyBytes = base64FromBytes(
|
||||
message.bodyBytes !== undefined ? message.bodyBytes : new Uint8Array(),
|
||||
));
|
||||
message.authInfoBytes !== undefined &&
|
||||
(obj.authInfoBytes = base64FromBytes(
|
||||
message.authInfoBytes !== undefined ? message.authInfoBytes : new Uint8Array(),
|
||||
));
|
||||
message.chainId !== undefined && (obj.chainId = message.chainId);
|
||||
message.accountNumber !== undefined &&
|
||||
(obj.accountNumber = (message.accountNumber || Long.UZERO).toString());
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseTxBody: object = { memo: "", timeoutHeight: Long.UZERO };
|
||||
@ -506,8 +518,12 @@ export const TxBody = {
|
||||
for (const v of message.messages) {
|
||||
Any.encode(v!, writer.uint32(10).fork()).ldelim();
|
||||
}
|
||||
writer.uint32(18).string(message.memo);
|
||||
writer.uint32(24).uint64(message.timeoutHeight);
|
||||
if (message.memo !== "") {
|
||||
writer.uint32(18).string(message.memo);
|
||||
}
|
||||
if (!message.timeoutHeight.isZero()) {
|
||||
writer.uint32(24).uint64(message.timeoutHeight);
|
||||
}
|
||||
for (const v of message.extensionOptions) {
|
||||
Any.encode(v!, writer.uint32(8186).fork()).ldelim();
|
||||
}
|
||||
@ -583,6 +599,31 @@ export const TxBody = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: TxBody): unknown {
|
||||
const obj: any = {};
|
||||
if (message.messages) {
|
||||
obj.messages = message.messages.map((e) => (e ? Any.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.messages = [];
|
||||
}
|
||||
message.memo !== undefined && (obj.memo = message.memo);
|
||||
message.timeoutHeight !== undefined &&
|
||||
(obj.timeoutHeight = (message.timeoutHeight || Long.UZERO).toString());
|
||||
if (message.extensionOptions) {
|
||||
obj.extensionOptions = message.extensionOptions.map((e) => (e ? Any.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.extensionOptions = [];
|
||||
}
|
||||
if (message.nonCriticalExtensionOptions) {
|
||||
obj.nonCriticalExtensionOptions = message.nonCriticalExtensionOptions.map((e) =>
|
||||
e ? Any.toJSON(e) : undefined,
|
||||
);
|
||||
} else {
|
||||
obj.nonCriticalExtensionOptions = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<TxBody>): TxBody {
|
||||
const message = { ...baseTxBody } as TxBody;
|
||||
message.messages = [];
|
||||
@ -615,31 +656,6 @@ export const TxBody = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: TxBody): unknown {
|
||||
const obj: any = {};
|
||||
if (message.messages) {
|
||||
obj.messages = message.messages.map((e) => (e ? Any.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.messages = [];
|
||||
}
|
||||
message.memo !== undefined && (obj.memo = message.memo);
|
||||
message.timeoutHeight !== undefined &&
|
||||
(obj.timeoutHeight = (message.timeoutHeight || Long.UZERO).toString());
|
||||
if (message.extensionOptions) {
|
||||
obj.extensionOptions = message.extensionOptions.map((e) => (e ? Any.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.extensionOptions = [];
|
||||
}
|
||||
if (message.nonCriticalExtensionOptions) {
|
||||
obj.nonCriticalExtensionOptions = message.nonCriticalExtensionOptions.map((e) =>
|
||||
e ? Any.toJSON(e) : undefined,
|
||||
);
|
||||
} else {
|
||||
obj.nonCriticalExtensionOptions = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseAuthInfo: object = {};
|
||||
@ -649,7 +665,7 @@ export const AuthInfo = {
|
||||
for (const v of message.signerInfos) {
|
||||
SignerInfo.encode(v!, writer.uint32(10).fork()).ldelim();
|
||||
}
|
||||
if (message.fee !== undefined && message.fee !== undefined) {
|
||||
if (message.fee !== undefined) {
|
||||
Fee.encode(message.fee, writer.uint32(18).fork()).ldelim();
|
||||
}
|
||||
return writer;
|
||||
@ -693,6 +709,17 @@ export const AuthInfo = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: AuthInfo): unknown {
|
||||
const obj: any = {};
|
||||
if (message.signerInfos) {
|
||||
obj.signerInfos = message.signerInfos.map((e) => (e ? SignerInfo.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.signerInfos = [];
|
||||
}
|
||||
message.fee !== undefined && (obj.fee = message.fee ? Fee.toJSON(message.fee) : undefined);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<AuthInfo>): AuthInfo {
|
||||
const message = { ...baseAuthInfo } as AuthInfo;
|
||||
message.signerInfos = [];
|
||||
@ -708,30 +735,21 @@ export const AuthInfo = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: AuthInfo): unknown {
|
||||
const obj: any = {};
|
||||
if (message.signerInfos) {
|
||||
obj.signerInfos = message.signerInfos.map((e) => (e ? SignerInfo.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.signerInfos = [];
|
||||
}
|
||||
message.fee !== undefined && (obj.fee = message.fee ? Fee.toJSON(message.fee) : undefined);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseSignerInfo: object = { sequence: Long.UZERO };
|
||||
|
||||
export const SignerInfo = {
|
||||
encode(message: SignerInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
if (message.publicKey !== undefined && message.publicKey !== undefined) {
|
||||
if (message.publicKey !== undefined) {
|
||||
Any.encode(message.publicKey, writer.uint32(10).fork()).ldelim();
|
||||
}
|
||||
if (message.modeInfo !== undefined && message.modeInfo !== undefined) {
|
||||
if (message.modeInfo !== undefined) {
|
||||
ModeInfo.encode(message.modeInfo, writer.uint32(18).fork()).ldelim();
|
||||
}
|
||||
writer.uint32(24).uint64(message.sequence);
|
||||
if (!message.sequence.isZero()) {
|
||||
writer.uint32(24).uint64(message.sequence);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -779,6 +797,16 @@ export const SignerInfo = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: SignerInfo): unknown {
|
||||
const obj: any = {};
|
||||
message.publicKey !== undefined &&
|
||||
(obj.publicKey = message.publicKey ? Any.toJSON(message.publicKey) : undefined);
|
||||
message.modeInfo !== undefined &&
|
||||
(obj.modeInfo = message.modeInfo ? ModeInfo.toJSON(message.modeInfo) : undefined);
|
||||
message.sequence !== undefined && (obj.sequence = (message.sequence || Long.UZERO).toString());
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<SignerInfo>): SignerInfo {
|
||||
const message = { ...baseSignerInfo } as SignerInfo;
|
||||
if (object.publicKey !== undefined && object.publicKey !== null) {
|
||||
@ -798,16 +826,6 @@ export const SignerInfo = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: SignerInfo): unknown {
|
||||
const obj: any = {};
|
||||
message.publicKey !== undefined &&
|
||||
(obj.publicKey = message.publicKey ? Any.toJSON(message.publicKey) : undefined);
|
||||
message.modeInfo !== undefined &&
|
||||
(obj.modeInfo = message.modeInfo ? ModeInfo.toJSON(message.modeInfo) : undefined);
|
||||
message.sequence !== undefined && (obj.sequence = (message.sequence || Long.UZERO).toString());
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseModeInfo: object = {};
|
||||
@ -859,6 +877,15 @@ export const ModeInfo = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: ModeInfo): unknown {
|
||||
const obj: any = {};
|
||||
message.single !== undefined &&
|
||||
(obj.single = message.single ? ModeInfo_Single.toJSON(message.single) : undefined);
|
||||
message.multi !== undefined &&
|
||||
(obj.multi = message.multi ? ModeInfo_Multi.toJSON(message.multi) : undefined);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<ModeInfo>): ModeInfo {
|
||||
const message = { ...baseModeInfo } as ModeInfo;
|
||||
if (object.single !== undefined && object.single !== null) {
|
||||
@ -873,22 +900,15 @@ export const ModeInfo = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: ModeInfo): unknown {
|
||||
const obj: any = {};
|
||||
message.single !== undefined &&
|
||||
(obj.single = message.single ? ModeInfo_Single.toJSON(message.single) : undefined);
|
||||
message.multi !== undefined &&
|
||||
(obj.multi = message.multi ? ModeInfo_Multi.toJSON(message.multi) : undefined);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseModeInfo_Single: object = { mode: 0 };
|
||||
|
||||
export const ModeInfo_Single = {
|
||||
encode(message: ModeInfo_Single, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(8).int32(message.mode);
|
||||
if (message.mode !== 0) {
|
||||
writer.uint32(8).int32(message.mode);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -920,6 +940,12 @@ export const ModeInfo_Single = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: ModeInfo_Single): unknown {
|
||||
const obj: any = {};
|
||||
message.mode !== undefined && (obj.mode = signModeToJSON(message.mode));
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<ModeInfo_Single>): ModeInfo_Single {
|
||||
const message = { ...baseModeInfo_Single } as ModeInfo_Single;
|
||||
if (object.mode !== undefined && object.mode !== null) {
|
||||
@ -929,19 +955,13 @@ export const ModeInfo_Single = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: ModeInfo_Single): unknown {
|
||||
const obj: any = {};
|
||||
message.mode !== undefined && (obj.mode = signModeToJSON(message.mode));
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseModeInfo_Multi: object = {};
|
||||
|
||||
export const ModeInfo_Multi = {
|
||||
encode(message: ModeInfo_Multi, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
if (message.bitarray !== undefined && message.bitarray !== undefined) {
|
||||
if (message.bitarray !== undefined) {
|
||||
CompactBitArray.encode(message.bitarray, writer.uint32(10).fork()).ldelim();
|
||||
}
|
||||
for (const v of message.modeInfos) {
|
||||
@ -988,6 +1008,18 @@ export const ModeInfo_Multi = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: ModeInfo_Multi): unknown {
|
||||
const obj: any = {};
|
||||
message.bitarray !== undefined &&
|
||||
(obj.bitarray = message.bitarray ? CompactBitArray.toJSON(message.bitarray) : undefined);
|
||||
if (message.modeInfos) {
|
||||
obj.modeInfos = message.modeInfos.map((e) => (e ? ModeInfo.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.modeInfos = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<ModeInfo_Multi>): ModeInfo_Multi {
|
||||
const message = { ...baseModeInfo_Multi } as ModeInfo_Multi;
|
||||
message.modeInfos = [];
|
||||
@ -1003,18 +1035,6 @@ export const ModeInfo_Multi = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: ModeInfo_Multi): unknown {
|
||||
const obj: any = {};
|
||||
message.bitarray !== undefined &&
|
||||
(obj.bitarray = message.bitarray ? CompactBitArray.toJSON(message.bitarray) : undefined);
|
||||
if (message.modeInfos) {
|
||||
obj.modeInfos = message.modeInfos.map((e) => (e ? ModeInfo.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.modeInfos = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseFee: object = { gasLimit: Long.UZERO, payer: "", granter: "" };
|
||||
@ -1024,9 +1044,15 @@ export const Fee = {
|
||||
for (const v of message.amount) {
|
||||
Coin.encode(v!, writer.uint32(10).fork()).ldelim();
|
||||
}
|
||||
writer.uint32(16).uint64(message.gasLimit);
|
||||
writer.uint32(26).string(message.payer);
|
||||
writer.uint32(34).string(message.granter);
|
||||
if (!message.gasLimit.isZero()) {
|
||||
writer.uint32(16).uint64(message.gasLimit);
|
||||
}
|
||||
if (message.payer !== "") {
|
||||
writer.uint32(26).string(message.payer);
|
||||
}
|
||||
if (message.granter !== "") {
|
||||
writer.uint32(34).string(message.granter);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -1084,6 +1110,19 @@ export const Fee = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Fee): unknown {
|
||||
const obj: any = {};
|
||||
if (message.amount) {
|
||||
obj.amount = message.amount.map((e) => (e ? Coin.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.amount = [];
|
||||
}
|
||||
message.gasLimit !== undefined && (obj.gasLimit = (message.gasLimit || Long.UZERO).toString());
|
||||
message.payer !== undefined && (obj.payer = message.payer);
|
||||
message.granter !== undefined && (obj.granter = message.granter);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<Fee>): Fee {
|
||||
const message = { ...baseFee } as Fee;
|
||||
message.amount = [];
|
||||
@ -1109,19 +1148,6 @@ export const Fee = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Fee): unknown {
|
||||
const obj: any = {};
|
||||
if (message.amount) {
|
||||
obj.amount = message.amount.map((e) => (e ? Coin.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.amount = [];
|
||||
}
|
||||
message.gasLimit !== undefined && (obj.gasLimit = (message.gasLimit || Long.UZERO).toString());
|
||||
message.payer !== undefined && (obj.payer = message.payer);
|
||||
message.granter !== undefined && (obj.granter = message.granter);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
declare var self: any | undefined;
|
||||
@ -1131,7 +1157,7 @@ var globalThis: any = (() => {
|
||||
if (typeof self !== "undefined") return self;
|
||||
if (typeof window !== "undefined") return window;
|
||||
if (typeof global !== "undefined") return global;
|
||||
throw new Error("Unable to locate global object");
|
||||
throw "Unable to locate global object";
|
||||
})();
|
||||
|
||||
const atob: (b64: string) => string =
|
||||
|
||||
@ -124,8 +124,12 @@ const baseAny: object = { typeUrl: "" };
|
||||
|
||||
export const Any = {
|
||||
encode(message: Any, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.typeUrl);
|
||||
writer.uint32(18).bytes(message.value);
|
||||
if (message.typeUrl !== "") {
|
||||
writer.uint32(10).string(message.typeUrl);
|
||||
}
|
||||
if (message.value.length !== 0) {
|
||||
writer.uint32(18).bytes(message.value);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -163,6 +167,14 @@ export const Any = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Any): unknown {
|
||||
const obj: any = {};
|
||||
message.typeUrl !== undefined && (obj.typeUrl = message.typeUrl);
|
||||
message.value !== undefined &&
|
||||
(obj.value = base64FromBytes(message.value !== undefined ? message.value : new Uint8Array()));
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<Any>): Any {
|
||||
const message = { ...baseAny } as Any;
|
||||
if (object.typeUrl !== undefined && object.typeUrl !== null) {
|
||||
@ -177,14 +189,6 @@ export const Any = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Any): unknown {
|
||||
const obj: any = {};
|
||||
message.typeUrl !== undefined && (obj.typeUrl = message.typeUrl);
|
||||
message.value !== undefined &&
|
||||
(obj.value = base64FromBytes(message.value !== undefined ? message.value : new Uint8Array()));
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
declare var self: any | undefined;
|
||||
@ -194,7 +198,7 @@ var globalThis: any = (() => {
|
||||
if (typeof self !== "undefined") return self;
|
||||
if (typeof window !== "undefined") return window;
|
||||
if (typeof global !== "undefined") return global;
|
||||
throw new Error("Unable to locate global object");
|
||||
throw "Unable to locate global object";
|
||||
})();
|
||||
|
||||
const atob: (b64: string) => string =
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -55,6 +55,15 @@ export const PublicKey = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: PublicKey): unknown {
|
||||
const obj: any = {};
|
||||
message.ed25519 !== undefined &&
|
||||
(obj.ed25519 = message.ed25519 !== undefined ? base64FromBytes(message.ed25519) : undefined);
|
||||
message.secp256k1 !== undefined &&
|
||||
(obj.secp256k1 = message.secp256k1 !== undefined ? base64FromBytes(message.secp256k1) : undefined);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<PublicKey>): PublicKey {
|
||||
const message = { ...basePublicKey } as PublicKey;
|
||||
if (object.ed25519 !== undefined && object.ed25519 !== null) {
|
||||
@ -69,15 +78,6 @@ export const PublicKey = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: PublicKey): unknown {
|
||||
const obj: any = {};
|
||||
message.ed25519 !== undefined &&
|
||||
(obj.ed25519 = message.ed25519 !== undefined ? base64FromBytes(message.ed25519) : undefined);
|
||||
message.secp256k1 !== undefined &&
|
||||
(obj.secp256k1 = message.secp256k1 !== undefined ? base64FromBytes(message.secp256k1) : undefined);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
declare var self: any | undefined;
|
||||
@ -87,7 +87,7 @@ var globalThis: any = (() => {
|
||||
if (typeof self !== "undefined") return self;
|
||||
if (typeof window !== "undefined") return window;
|
||||
if (typeof global !== "undefined") return global;
|
||||
throw new Error("Unable to locate global object");
|
||||
throw "Unable to locate global object";
|
||||
})();
|
||||
|
||||
const atob: (b64: string) => string =
|
||||
|
||||
@ -59,7 +59,7 @@ describe("DirectSecp256k1HdWallet", () => {
|
||||
|
||||
describe("signDirect", () => {
|
||||
it("resolves to valid signature", async () => {
|
||||
const { sequence, bodyBytes } = testVectors[1];
|
||||
const { accountNumber, sequence, bodyBytes } = testVectors[1].inputs;
|
||||
const wallet = await DirectSecp256k1HdWallet.fromMnemonic(faucet.mnemonic);
|
||||
const pubkey = {
|
||||
typeUrl: "/cosmos.crypto.secp256k1.PubKey",
|
||||
@ -68,7 +68,6 @@ describe("DirectSecp256k1HdWallet", () => {
|
||||
const fee = coins(2000, "ucosm");
|
||||
const gasLimit = 200000;
|
||||
const chainId = "simd-testing";
|
||||
const accountNumber = 1;
|
||||
const signDoc = makeSignDoc(
|
||||
fromHex(bodyBytes),
|
||||
makeAuthInfoBytes([pubkey], fee, gasLimit, sequence),
|
||||
|
||||
@ -34,7 +34,7 @@ describe("DirectSecp256k1Wallet", () => {
|
||||
|
||||
describe("signDirect", () => {
|
||||
it("resolves to valid signature", async () => {
|
||||
const { sequence, bodyBytes } = testVectors[1];
|
||||
const { accountNumber, sequence, bodyBytes } = testVectors[1].inputs;
|
||||
const wallet = await DirectSecp256k1Wallet.fromKey(defaultPrivkey);
|
||||
const accounts = await wallet.getAccounts();
|
||||
const pubkey = {
|
||||
@ -44,7 +44,6 @@ describe("DirectSecp256k1Wallet", () => {
|
||||
const fee = coins(2000, "ucosm");
|
||||
const gasLimit = 200000;
|
||||
const chainId = "simd-testing";
|
||||
const accountNumber = 1;
|
||||
const signDoc = makeSignDoc(
|
||||
fromHex(bodyBytes),
|
||||
makeAuthInfoBytes([pubkey], fee, gasLimit, sequence),
|
||||
|
||||
@ -1,13 +1,11 @@
|
||||
/* eslint-disable @typescript-eslint/naming-convention */
|
||||
import { fromBase64, fromHex, toHex } from "@cosmjs/encoding";
|
||||
|
||||
import { PubKey } from "./codec/cosmos/crypto/secp256k1/keys";
|
||||
import { SignMode } from "./codec/cosmos/tx/signing/v1beta1/signing";
|
||||
import { Tx, TxRaw } from "./codec/cosmos/tx/v1beta1/tx";
|
||||
import { Any } from "./codec/google/protobuf/any";
|
||||
import { DirectSecp256k1HdWallet } from "./directsecp256k1hdwallet";
|
||||
import { Registry, TxBodyValue } from "./registry";
|
||||
import { makeAuthInfoBytes, makeSignBytes, makeSignDoc } from "./signing";
|
||||
import { Registry } from "./registry";
|
||||
import { makeSignBytes, makeSignDoc } from "./signing";
|
||||
import { faucet, testVectors } from "./testutils.spec";
|
||||
|
||||
describe("signing", () => {
|
||||
@ -16,20 +14,14 @@ describe("signing", () => {
|
||||
|
||||
const sendAmount = "1234567";
|
||||
const sendDenom = "ucosm";
|
||||
const feeAmount = [
|
||||
{
|
||||
amount: "2000",
|
||||
denom: "ucosm",
|
||||
},
|
||||
];
|
||||
const gasLimit = 200000;
|
||||
|
||||
it("correctly parses test vectors", async () => {
|
||||
it("correctly parses signed transactions from test vectors", async () => {
|
||||
const wallet = await DirectSecp256k1HdWallet.fromMnemonic(faucet.mnemonic);
|
||||
const [{ address, pubkey: pubkeyBytes }] = await wallet.getAccounts();
|
||||
const prefixedPubkeyBytes = Uint8Array.from([0x0a, pubkeyBytes.length, ...pubkeyBytes]);
|
||||
|
||||
testVectors.forEach(({ signedTxBytes }) => {
|
||||
testVectors.forEach(({ outputs: { signedTxBytes } }) => {
|
||||
const parsedTestTx = Tx.decode(fromHex(signedTxBytes));
|
||||
expect(parsedTestTx.signatures.length).toEqual(1);
|
||||
expect(parsedTestTx.authInfo!.signerInfos.length).toEqual(1);
|
||||
@ -58,59 +50,30 @@ describe("signing", () => {
|
||||
});
|
||||
});
|
||||
|
||||
it("correctly generates test vectors", async () => {
|
||||
const myRegistry = new Registry();
|
||||
it("correctly generates sign docs and signed transactions from test vectors", async () => {
|
||||
const wallet = await DirectSecp256k1HdWallet.fromMnemonic(faucet.mnemonic);
|
||||
const [{ address, pubkey: pubkeyBytes }] = await wallet.getAccounts();
|
||||
const publicKey = PubKey.fromPartial({
|
||||
key: pubkeyBytes,
|
||||
});
|
||||
const publicKeyBytes = PubKey.encode(publicKey).finish();
|
||||
|
||||
const txBodyFields: TxBodyValue = {
|
||||
messages: [
|
||||
{
|
||||
typeUrl: "/cosmos.bank.v1beta1.MsgSend",
|
||||
value: {
|
||||
fromAddress: address,
|
||||
toAddress: toAddress,
|
||||
amount: [
|
||||
{
|
||||
denom: sendDenom,
|
||||
amount: sendAmount,
|
||||
},
|
||||
],
|
||||
},
|
||||
},
|
||||
],
|
||||
};
|
||||
const txBodyBytes = myRegistry.encode({
|
||||
typeUrl: "/cosmos.tx.v1beta1.TxBody",
|
||||
value: txBodyFields,
|
||||
});
|
||||
|
||||
const publicKeyAny = Any.fromPartial({
|
||||
typeUrl: "/cosmos.crypto.secp256k1.PubKey",
|
||||
value: publicKeyBytes,
|
||||
});
|
||||
const accountNumber = 1;
|
||||
const [{ address }] = await wallet.getAccounts();
|
||||
|
||||
await Promise.all(
|
||||
testVectors.map(async ({ sequence, signBytes, signedTxBytes }) => {
|
||||
const authInfoBytes = makeAuthInfoBytes([publicKeyAny], feeAmount, gasLimit, sequence);
|
||||
const signDoc = makeSignDoc(txBodyBytes, authInfoBytes, chainId, accountNumber);
|
||||
testVectors.map(async ({ inputs, outputs }) => {
|
||||
const signDoc = makeSignDoc(
|
||||
fromHex(inputs.bodyBytes),
|
||||
fromHex(inputs.authInfoBytes),
|
||||
chainId,
|
||||
inputs.accountNumber,
|
||||
);
|
||||
const signDocBytes = makeSignBytes(signDoc);
|
||||
expect(toHex(signDocBytes)).toEqual(signBytes);
|
||||
expect(toHex(signDocBytes)).toEqual(outputs.signBytes);
|
||||
|
||||
const { signature } = await wallet.signDirect(address, signDoc);
|
||||
const txRaw = TxRaw.fromPartial({
|
||||
bodyBytes: txBodyBytes,
|
||||
authInfoBytes: authInfoBytes,
|
||||
bodyBytes: fromHex(inputs.bodyBytes),
|
||||
authInfoBytes: fromHex(inputs.authInfoBytes),
|
||||
signatures: [fromBase64(signature.signature)],
|
||||
});
|
||||
const txRawBytes = Uint8Array.from(TxRaw.encode(txRaw).finish());
|
||||
const txBytesHex = toHex(txRawBytes);
|
||||
expect(txBytesHex).toEqual(signedTxBytes);
|
||||
expect(txBytesHex).toEqual(outputs.signedTxBytes);
|
||||
}),
|
||||
);
|
||||
});
|
||||
|
||||
@ -11,38 +11,60 @@ export const faucet = {
|
||||
address: "cosmos1pkptre7fdkl6gfrzlesjjvhxhlc3r4gmmk8rs6",
|
||||
};
|
||||
|
||||
/** See TEST_VECTORS.md for how those are generated */
|
||||
export const testVectors = [
|
||||
{
|
||||
sequence: 0,
|
||||
signedTxBytes:
|
||||
"0a97010a90010a1c2f636f736d6f732e62616e6b2e763162657461312e4d736753656e6412700a2d636f736d6f7331706b707472653766646b6c366766727a6c65736a6a766878686c63337234676d6d6b38727336122d636f736d6f7331717970717870713971637273737a673270767871367273307a716733797963356c7a763778751a100a0575636f736d12073132333435363712001800126b0a500a460a1f2f636f736d6f732e63727970746f2e736563703235366b312e5075624b657912230a21034f04181eeba35391b858633a765c4a0c189697b40d216354d50890d350c7029012040a020801180012170a0d0a0575636f736d12043230303010c09a0c1a0022001a40d1bb55b0f3e5f9c260a20c8ccf2cb44f19bafccba84c7fb6e2b77fac401b15c9228c33236a701dd7a7c4a481aa5dedb902c982fe565504c4f4e7f39ccfcd73d6",
|
||||
bodyBytes:
|
||||
"0a90010a1c2f636f736d6f732e62616e6b2e763162657461312e4d736753656e6412700a2d636f736d6f7331706b707472653766646b6c366766727a6c65736a6a766878686c63337234676d6d6b38727336122d636f736d6f7331717970717870713971637273737a673270767871367273307a716733797963356c7a763778751a100a0575636f736d120731323334353637",
|
||||
signBytes:
|
||||
"0a97010a90010a1c2f636f736d6f732e62616e6b2e763162657461312e4d736753656e6412700a2d636f736d6f7331706b707472653766646b6c366766727a6c65736a6a766878686c63337234676d6d6b38727336122d636f736d6f7331717970717870713971637273737a673270767871367273307a716733797963356c7a763778751a100a0575636f736d12073132333435363712001800126b0a500a460a1f2f636f736d6f732e63727970746f2e736563703235366b312e5075624b657912230a21034f04181eeba35391b858633a765c4a0c189697b40d216354d50890d350c7029012040a020801180012170a0d0a0575636f736d12043230303010c09a0c1a0022001a0c73696d642d74657374696e672001",
|
||||
signature:
|
||||
"c9dd20e07464d3a688ff4b710b1fbc027e495e797cfa0b4804da2ed117959227772de059808f765aa29b8f92edf30f4c2c5a438e30d3fe6897daa7141e3ce6f9",
|
||||
inputs: {
|
||||
accountNumber: 1,
|
||||
sequence: 0,
|
||||
bodyBytes:
|
||||
"0a90010a1c2f636f736d6f732e62616e6b2e763162657461312e4d736753656e6412700a2d636f736d6f7331706b707472653766646b6c366766727a6c65736a6a766878686c63337234676d6d6b38727336122d636f736d6f7331717970717870713971637273737a673270767871367273307a716733797963356c7a763778751a100a0575636f736d120731323334353637",
|
||||
authInfoBytes:
|
||||
"0a4e0a460a1f2f636f736d6f732e63727970746f2e736563703235366b312e5075624b657912230a21034f04181eeba35391b858633a765c4a0c189697b40d216354d50890d350c7029012040a02080112130a0d0a0575636f736d12043230303010c09a0c",
|
||||
},
|
||||
outputs: {
|
||||
signBytes:
|
||||
"0a93010a90010a1c2f636f736d6f732e62616e6b2e763162657461312e4d736753656e6412700a2d636f736d6f7331706b707472653766646b6c366766727a6c65736a6a766878686c63337234676d6d6b38727336122d636f736d6f7331717970717870713971637273737a673270767871367273307a716733797963356c7a763778751a100a0575636f736d12073132333435363712650a4e0a460a1f2f636f736d6f732e63727970746f2e736563703235366b312e5075624b657912230a21034f04181eeba35391b858633a765c4a0c189697b40d216354d50890d350c7029012040a02080112130a0d0a0575636f736d12043230303010c09a0c1a0c73696d642d74657374696e672001",
|
||||
signature:
|
||||
"c9dd20e07464d3a688ff4b710b1fbc027e495e797cfa0b4804da2ed117959227772de059808f765aa29b8f92edf30f4c2c5a438e30d3fe6897daa7141e3ce6f9",
|
||||
signedTxBytes:
|
||||
"0a93010a90010a1c2f636f736d6f732e62616e6b2e763162657461312e4d736753656e6412700a2d636f736d6f7331706b707472653766646b6c366766727a6c65736a6a766878686c63337234676d6d6b38727336122d636f736d6f7331717970717870713971637273737a673270767871367273307a716733797963356c7a763778751a100a0575636f736d12073132333435363712650a4e0a460a1f2f636f736d6f732e63727970746f2e736563703235366b312e5075624b657912230a21034f04181eeba35391b858633a765c4a0c189697b40d216354d50890d350c7029012040a02080112130a0d0a0575636f736d12043230303010c09a0c1a40c9dd20e07464d3a688ff4b710b1fbc027e495e797cfa0b4804da2ed117959227772de059808f765aa29b8f92edf30f4c2c5a438e30d3fe6897daa7141e3ce6f9",
|
||||
},
|
||||
},
|
||||
{
|
||||
sequence: 1,
|
||||
signedTxBytes:
|
||||
"0a97010a90010a1c2f636f736d6f732e62616e6b2e763162657461312e4d736753656e6412700a2d636f736d6f7331706b707472653766646b6c366766727a6c65736a6a766878686c63337234676d6d6b38727336122d636f736d6f7331717970717870713971637273737a673270767871367273307a716733797963356c7a763778751a100a0575636f736d12073132333435363712001800126b0a500a460a1f2f636f736d6f732e63727970746f2e736563703235366b312e5075624b657912230a21034f04181eeba35391b858633a765c4a0c189697b40d216354d50890d350c7029012040a020801180112170a0d0a0575636f736d12043230303010c09a0c1a0022001a40d6d876ec9c01d03b025443822b1385e29ed559341ec71853ac310219b4bcb4112bf24265a19d805f0cbb1cb39f4ac4fe75235445070aa14845733117a746c248",
|
||||
bodyBytes:
|
||||
"0a90010a1c2f636f736d6f732e62616e6b2e763162657461312e4d736753656e6412700a2d636f736d6f7331706b707472653766646b6c366766727a6c65736a6a766878686c63337234676d6d6b38727336122d636f736d6f7331717970717870713971637273737a673270767871367273307a716733797963356c7a763778751a100a0575636f736d120731323334353637",
|
||||
signBytes:
|
||||
"0a97010a90010a1c2f636f736d6f732e62616e6b2e763162657461312e4d736753656e6412700a2d636f736d6f7331706b707472653766646b6c366766727a6c65736a6a766878686c63337234676d6d6b38727336122d636f736d6f7331717970717870713971637273737a673270767871367273307a716733797963356c7a763778751a100a0575636f736d12073132333435363712001800126b0a500a460a1f2f636f736d6f732e63727970746f2e736563703235366b312e5075624b657912230a21034f04181eeba35391b858633a765c4a0c189697b40d216354d50890d350c7029012040a020801180112170a0d0a0575636f736d12043230303010c09a0c1a0022001a0c73696d642d74657374696e672001",
|
||||
signature:
|
||||
"525adc7e61565a509c60497b798c549fbf217bb5cd31b24cc9b419d098cc95330c99ecc4bc72448f85c365a4e3f91299a3d40412fb3751bab82f1940a83a0a4c",
|
||||
inputs: {
|
||||
accountNumber: 1,
|
||||
sequence: 1,
|
||||
bodyBytes:
|
||||
"0a90010a1c2f636f736d6f732e62616e6b2e763162657461312e4d736753656e6412700a2d636f736d6f7331706b707472653766646b6c366766727a6c65736a6a766878686c63337234676d6d6b38727336122d636f736d6f7331717970717870713971637273737a673270767871367273307a716733797963356c7a763778751a100a0575636f736d120731323334353637",
|
||||
authInfoBytes:
|
||||
"0a500a460a1f2f636f736d6f732e63727970746f2e736563703235366b312e5075624b657912230a21034f04181eeba35391b858633a765c4a0c189697b40d216354d50890d350c7029012040a020801180112130a0d0a0575636f736d12043230303010c09a0c",
|
||||
},
|
||||
outputs: {
|
||||
signBytes:
|
||||
"0a93010a90010a1c2f636f736d6f732e62616e6b2e763162657461312e4d736753656e6412700a2d636f736d6f7331706b707472653766646b6c366766727a6c65736a6a766878686c63337234676d6d6b38727336122d636f736d6f7331717970717870713971637273737a673270767871367273307a716733797963356c7a763778751a100a0575636f736d12073132333435363712670a500a460a1f2f636f736d6f732e63727970746f2e736563703235366b312e5075624b657912230a21034f04181eeba35391b858633a765c4a0c189697b40d216354d50890d350c7029012040a020801180112130a0d0a0575636f736d12043230303010c09a0c1a0c73696d642d74657374696e672001",
|
||||
signature:
|
||||
"525adc7e61565a509c60497b798c549fbf217bb5cd31b24cc9b419d098cc95330c99ecc4bc72448f85c365a4e3f91299a3d40412fb3751bab82f1940a83a0a4c",
|
||||
signedTxBytes:
|
||||
"0a93010a90010a1c2f636f736d6f732e62616e6b2e763162657461312e4d736753656e6412700a2d636f736d6f7331706b707472653766646b6c366766727a6c65736a6a766878686c63337234676d6d6b38727336122d636f736d6f7331717970717870713971637273737a673270767871367273307a716733797963356c7a763778751a100a0575636f736d12073132333435363712670a500a460a1f2f636f736d6f732e63727970746f2e736563703235366b312e5075624b657912230a21034f04181eeba35391b858633a765c4a0c189697b40d216354d50890d350c7029012040a020801180112130a0d0a0575636f736d12043230303010c09a0c1a40525adc7e61565a509c60497b798c549fbf217bb5cd31b24cc9b419d098cc95330c99ecc4bc72448f85c365a4e3f91299a3d40412fb3751bab82f1940a83a0a4c",
|
||||
},
|
||||
},
|
||||
{
|
||||
sequence: 2,
|
||||
signedTxBytes:
|
||||
"0a97010a90010a1c2f636f736d6f732e62616e6b2e763162657461312e4d736753656e6412700a2d636f736d6f7331706b707472653766646b6c366766727a6c65736a6a766878686c63337234676d6d6b38727336122d636f736d6f7331717970717870713971637273737a673270767871367273307a716733797963356c7a763778751a100a0575636f736d12073132333435363712001800126b0a500a460a1f2f636f736d6f732e63727970746f2e736563703235366b312e5075624b657912230a21034f04181eeba35391b858633a765c4a0c189697b40d216354d50890d350c7029012040a020801180212170a0d0a0575636f736d12043230303010c09a0c1a0022001a40c62931c5f283dc72774cb34165ad98169c40de14c13e9c11c696cb439c7c58ab0c2017c95cb9ed874ace06460b61f1296dddb20c9e0609e364d1f38e163b7c7b",
|
||||
bodyBytes:
|
||||
"0a90010a1c2f636f736d6f732e62616e6b2e763162657461312e4d736753656e6412700a2d636f736d6f7331706b707472653766646b6c366766727a6c65736a6a766878686c63337234676d6d6b38727336122d636f736d6f7331717970717870713971637273737a673270767871367273307a716733797963356c7a763778751a100a0575636f736d120731323334353637",
|
||||
signBytes:
|
||||
"0a97010a90010a1c2f636f736d6f732e62616e6b2e763162657461312e4d736753656e6412700a2d636f736d6f7331706b707472653766646b6c366766727a6c65736a6a766878686c63337234676d6d6b38727336122d636f736d6f7331717970717870713971637273737a673270767871367273307a716733797963356c7a763778751a100a0575636f736d12073132333435363712001800126b0a500a460a1f2f636f736d6f732e63727970746f2e736563703235366b312e5075624b657912230a21034f04181eeba35391b858633a765c4a0c189697b40d216354d50890d350c7029012040a020801180212170a0d0a0575636f736d12043230303010c09a0c1a0022001a0c73696d642d74657374696e672001",
|
||||
signature:
|
||||
"f3f2ca73806f2abbf6e0fe85f9b8af66f0e9f7f79051fdb8abe5bb8633b17da132e82d577b9d5f7a6dae57a144efc9ccc6eef15167b44b3b22a57240109762af",
|
||||
inputs: {
|
||||
accountNumber: 1,
|
||||
sequence: 2,
|
||||
bodyBytes:
|
||||
"0a90010a1c2f636f736d6f732e62616e6b2e763162657461312e4d736753656e6412700a2d636f736d6f7331706b707472653766646b6c366766727a6c65736a6a766878686c63337234676d6d6b38727336122d636f736d6f7331717970717870713971637273737a673270767871367273307a716733797963356c7a763778751a100a0575636f736d120731323334353637",
|
||||
authInfoBytes:
|
||||
"0a500a460a1f2f636f736d6f732e63727970746f2e736563703235366b312e5075624b657912230a21034f04181eeba35391b858633a765c4a0c189697b40d216354d50890d350c7029012040a020801180212130a0d0a0575636f736d12043230303010c09a0c",
|
||||
},
|
||||
outputs: {
|
||||
signBytes:
|
||||
"0a93010a90010a1c2f636f736d6f732e62616e6b2e763162657461312e4d736753656e6412700a2d636f736d6f7331706b707472653766646b6c366766727a6c65736a6a766878686c63337234676d6d6b38727336122d636f736d6f7331717970717870713971637273737a673270767871367273307a716733797963356c7a763778751a100a0575636f736d12073132333435363712670a500a460a1f2f636f736d6f732e63727970746f2e736563703235366b312e5075624b657912230a21034f04181eeba35391b858633a765c4a0c189697b40d216354d50890d350c7029012040a020801180212130a0d0a0575636f736d12043230303010c09a0c1a0c73696d642d74657374696e672001",
|
||||
signature:
|
||||
"f3f2ca73806f2abbf6e0fe85f9b8af66f0e9f7f79051fdb8abe5bb8633b17da132e82d577b9d5f7a6dae57a144efc9ccc6eef15167b44b3b22a57240109762af",
|
||||
signedTxBytes:
|
||||
"0a93010a90010a1c2f636f736d6f732e62616e6b2e763162657461312e4d736753656e6412700a2d636f736d6f7331706b707472653766646b6c366766727a6c65736a6a766878686c63337234676d6d6b38727336122d636f736d6f7331717970717870713971637273737a673270767871367273307a716733797963356c7a763778751a100a0575636f736d12073132333435363712670a500a460a1f2f636f736d6f732e63727970746f2e736563703235366b312e5075624b657912230a21034f04181eeba35391b858633a765c4a0c189697b40d216354d50890d350c7029012040a020801180212130a0d0a0575636f736d12043230303010c09a0c1a40f3f2ca73806f2abbf6e0fe85f9b8af66f0e9f7f79051fdb8abe5bb8633b17da132e82d577b9d5f7a6dae57a144efc9ccc6eef15167b44b3b22a57240109762af",
|
||||
},
|
||||
},
|
||||
];
|
||||
|
||||
@ -342,9 +342,13 @@ const baseExistenceProof: object = {};
|
||||
|
||||
export const ExistenceProof = {
|
||||
encode(message: ExistenceProof, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).bytes(message.key);
|
||||
writer.uint32(18).bytes(message.value);
|
||||
if (message.leaf !== undefined && message.leaf !== undefined) {
|
||||
if (message.key.length !== 0) {
|
||||
writer.uint32(10).bytes(message.key);
|
||||
}
|
||||
if (message.value.length !== 0) {
|
||||
writer.uint32(18).bytes(message.value);
|
||||
}
|
||||
if (message.leaf !== undefined) {
|
||||
LeafOp.encode(message.leaf, writer.uint32(26).fork()).ldelim();
|
||||
}
|
||||
for (const v of message.path) {
|
||||
@ -403,6 +407,21 @@ export const ExistenceProof = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: ExistenceProof): unknown {
|
||||
const obj: any = {};
|
||||
message.key !== undefined &&
|
||||
(obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array()));
|
||||
message.value !== undefined &&
|
||||
(obj.value = base64FromBytes(message.value !== undefined ? message.value : new Uint8Array()));
|
||||
message.leaf !== undefined && (obj.leaf = message.leaf ? LeafOp.toJSON(message.leaf) : undefined);
|
||||
if (message.path) {
|
||||
obj.path = message.path.map((e) => (e ? InnerOp.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.path = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<ExistenceProof>): ExistenceProof {
|
||||
const message = { ...baseExistenceProof } as ExistenceProof;
|
||||
message.path = [];
|
||||
@ -428,32 +447,19 @@ export const ExistenceProof = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: ExistenceProof): unknown {
|
||||
const obj: any = {};
|
||||
message.key !== undefined &&
|
||||
(obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array()));
|
||||
message.value !== undefined &&
|
||||
(obj.value = base64FromBytes(message.value !== undefined ? message.value : new Uint8Array()));
|
||||
message.leaf !== undefined && (obj.leaf = message.leaf ? LeafOp.toJSON(message.leaf) : undefined);
|
||||
if (message.path) {
|
||||
obj.path = message.path.map((e) => (e ? InnerOp.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.path = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseNonExistenceProof: object = {};
|
||||
|
||||
export const NonExistenceProof = {
|
||||
encode(message: NonExistenceProof, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).bytes(message.key);
|
||||
if (message.left !== undefined && message.left !== undefined) {
|
||||
if (message.key.length !== 0) {
|
||||
writer.uint32(10).bytes(message.key);
|
||||
}
|
||||
if (message.left !== undefined) {
|
||||
ExistenceProof.encode(message.left, writer.uint32(18).fork()).ldelim();
|
||||
}
|
||||
if (message.right !== undefined && message.right !== undefined) {
|
||||
if (message.right !== undefined) {
|
||||
ExistenceProof.encode(message.right, writer.uint32(26).fork()).ldelim();
|
||||
}
|
||||
return writer;
|
||||
@ -501,6 +507,16 @@ export const NonExistenceProof = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: NonExistenceProof): unknown {
|
||||
const obj: any = {};
|
||||
message.key !== undefined &&
|
||||
(obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array()));
|
||||
message.left !== undefined && (obj.left = message.left ? ExistenceProof.toJSON(message.left) : undefined);
|
||||
message.right !== undefined &&
|
||||
(obj.right = message.right ? ExistenceProof.toJSON(message.right) : undefined);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<NonExistenceProof>): NonExistenceProof {
|
||||
const message = { ...baseNonExistenceProof } as NonExistenceProof;
|
||||
if (object.key !== undefined && object.key !== null) {
|
||||
@ -520,16 +536,6 @@ export const NonExistenceProof = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: NonExistenceProof): unknown {
|
||||
const obj: any = {};
|
||||
message.key !== undefined &&
|
||||
(obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array()));
|
||||
message.left !== undefined && (obj.left = message.left ? ExistenceProof.toJSON(message.left) : undefined);
|
||||
message.right !== undefined &&
|
||||
(obj.right = message.right ? ExistenceProof.toJSON(message.right) : undefined);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseCommitmentProof: object = {};
|
||||
@ -603,6 +609,18 @@ export const CommitmentProof = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: CommitmentProof): unknown {
|
||||
const obj: any = {};
|
||||
message.exist !== undefined &&
|
||||
(obj.exist = message.exist ? ExistenceProof.toJSON(message.exist) : undefined);
|
||||
message.nonexist !== undefined &&
|
||||
(obj.nonexist = message.nonexist ? NonExistenceProof.toJSON(message.nonexist) : undefined);
|
||||
message.batch !== undefined && (obj.batch = message.batch ? BatchProof.toJSON(message.batch) : undefined);
|
||||
message.compressed !== undefined &&
|
||||
(obj.compressed = message.compressed ? CompressedBatchProof.toJSON(message.compressed) : undefined);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<CommitmentProof>): CommitmentProof {
|
||||
const message = { ...baseCommitmentProof } as CommitmentProof;
|
||||
if (object.exist !== undefined && object.exist !== null) {
|
||||
@ -627,29 +645,27 @@ export const CommitmentProof = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: CommitmentProof): unknown {
|
||||
const obj: any = {};
|
||||
message.exist !== undefined &&
|
||||
(obj.exist = message.exist ? ExistenceProof.toJSON(message.exist) : undefined);
|
||||
message.nonexist !== undefined &&
|
||||
(obj.nonexist = message.nonexist ? NonExistenceProof.toJSON(message.nonexist) : undefined);
|
||||
message.batch !== undefined && (obj.batch = message.batch ? BatchProof.toJSON(message.batch) : undefined);
|
||||
message.compressed !== undefined &&
|
||||
(obj.compressed = message.compressed ? CompressedBatchProof.toJSON(message.compressed) : undefined);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseLeafOp: object = { hash: 0, prehashKey: 0, prehashValue: 0, length: 0 };
|
||||
|
||||
export const LeafOp = {
|
||||
encode(message: LeafOp, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(8).int32(message.hash);
|
||||
writer.uint32(16).int32(message.prehashKey);
|
||||
writer.uint32(24).int32(message.prehashValue);
|
||||
writer.uint32(32).int32(message.length);
|
||||
writer.uint32(42).bytes(message.prefix);
|
||||
if (message.hash !== 0) {
|
||||
writer.uint32(8).int32(message.hash);
|
||||
}
|
||||
if (message.prehashKey !== 0) {
|
||||
writer.uint32(16).int32(message.prehashKey);
|
||||
}
|
||||
if (message.prehashValue !== 0) {
|
||||
writer.uint32(24).int32(message.prehashValue);
|
||||
}
|
||||
if (message.length !== 0) {
|
||||
writer.uint32(32).int32(message.length);
|
||||
}
|
||||
if (message.prefix.length !== 0) {
|
||||
writer.uint32(42).bytes(message.prefix);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -711,6 +727,17 @@ export const LeafOp = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: LeafOp): unknown {
|
||||
const obj: any = {};
|
||||
message.hash !== undefined && (obj.hash = hashOpToJSON(message.hash));
|
||||
message.prehashKey !== undefined && (obj.prehashKey = hashOpToJSON(message.prehashKey));
|
||||
message.prehashValue !== undefined && (obj.prehashValue = hashOpToJSON(message.prehashValue));
|
||||
message.length !== undefined && (obj.length = lengthOpToJSON(message.length));
|
||||
message.prefix !== undefined &&
|
||||
(obj.prefix = base64FromBytes(message.prefix !== undefined ? message.prefix : new Uint8Array()));
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<LeafOp>): LeafOp {
|
||||
const message = { ...baseLeafOp } as LeafOp;
|
||||
if (object.hash !== undefined && object.hash !== null) {
|
||||
@ -740,26 +767,21 @@ export const LeafOp = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: LeafOp): unknown {
|
||||
const obj: any = {};
|
||||
message.hash !== undefined && (obj.hash = hashOpToJSON(message.hash));
|
||||
message.prehashKey !== undefined && (obj.prehashKey = hashOpToJSON(message.prehashKey));
|
||||
message.prehashValue !== undefined && (obj.prehashValue = hashOpToJSON(message.prehashValue));
|
||||
message.length !== undefined && (obj.length = lengthOpToJSON(message.length));
|
||||
message.prefix !== undefined &&
|
||||
(obj.prefix = base64FromBytes(message.prefix !== undefined ? message.prefix : new Uint8Array()));
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseInnerOp: object = { hash: 0 };
|
||||
|
||||
export const InnerOp = {
|
||||
encode(message: InnerOp, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(8).int32(message.hash);
|
||||
writer.uint32(18).bytes(message.prefix);
|
||||
writer.uint32(26).bytes(message.suffix);
|
||||
if (message.hash !== 0) {
|
||||
writer.uint32(8).int32(message.hash);
|
||||
}
|
||||
if (message.prefix.length !== 0) {
|
||||
writer.uint32(18).bytes(message.prefix);
|
||||
}
|
||||
if (message.suffix.length !== 0) {
|
||||
writer.uint32(26).bytes(message.suffix);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -803,6 +825,16 @@ export const InnerOp = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: InnerOp): unknown {
|
||||
const obj: any = {};
|
||||
message.hash !== undefined && (obj.hash = hashOpToJSON(message.hash));
|
||||
message.prefix !== undefined &&
|
||||
(obj.prefix = base64FromBytes(message.prefix !== undefined ? message.prefix : new Uint8Array()));
|
||||
message.suffix !== undefined &&
|
||||
(obj.suffix = base64FromBytes(message.suffix !== undefined ? message.suffix : new Uint8Array()));
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<InnerOp>): InnerOp {
|
||||
const message = { ...baseInnerOp } as InnerOp;
|
||||
if (object.hash !== undefined && object.hash !== null) {
|
||||
@ -822,30 +854,24 @@ export const InnerOp = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: InnerOp): unknown {
|
||||
const obj: any = {};
|
||||
message.hash !== undefined && (obj.hash = hashOpToJSON(message.hash));
|
||||
message.prefix !== undefined &&
|
||||
(obj.prefix = base64FromBytes(message.prefix !== undefined ? message.prefix : new Uint8Array()));
|
||||
message.suffix !== undefined &&
|
||||
(obj.suffix = base64FromBytes(message.suffix !== undefined ? message.suffix : new Uint8Array()));
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseProofSpec: object = { maxDepth: 0, minDepth: 0 };
|
||||
|
||||
export const ProofSpec = {
|
||||
encode(message: ProofSpec, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
if (message.leafSpec !== undefined && message.leafSpec !== undefined) {
|
||||
if (message.leafSpec !== undefined) {
|
||||
LeafOp.encode(message.leafSpec, writer.uint32(10).fork()).ldelim();
|
||||
}
|
||||
if (message.innerSpec !== undefined && message.innerSpec !== undefined) {
|
||||
if (message.innerSpec !== undefined) {
|
||||
InnerSpec.encode(message.innerSpec, writer.uint32(18).fork()).ldelim();
|
||||
}
|
||||
writer.uint32(24).int32(message.maxDepth);
|
||||
writer.uint32(32).int32(message.minDepth);
|
||||
if (message.maxDepth !== 0) {
|
||||
writer.uint32(24).int32(message.maxDepth);
|
||||
}
|
||||
if (message.minDepth !== 0) {
|
||||
writer.uint32(32).int32(message.minDepth);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -901,6 +927,17 @@ export const ProofSpec = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: ProofSpec): unknown {
|
||||
const obj: any = {};
|
||||
message.leafSpec !== undefined &&
|
||||
(obj.leafSpec = message.leafSpec ? LeafOp.toJSON(message.leafSpec) : undefined);
|
||||
message.innerSpec !== undefined &&
|
||||
(obj.innerSpec = message.innerSpec ? InnerSpec.toJSON(message.innerSpec) : undefined);
|
||||
message.maxDepth !== undefined && (obj.maxDepth = message.maxDepth);
|
||||
message.minDepth !== undefined && (obj.minDepth = message.minDepth);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<ProofSpec>): ProofSpec {
|
||||
const message = { ...baseProofSpec } as ProofSpec;
|
||||
if (object.leafSpec !== undefined && object.leafSpec !== null) {
|
||||
@ -925,17 +962,6 @@ export const ProofSpec = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: ProofSpec): unknown {
|
||||
const obj: any = {};
|
||||
message.leafSpec !== undefined &&
|
||||
(obj.leafSpec = message.leafSpec ? LeafOp.toJSON(message.leafSpec) : undefined);
|
||||
message.innerSpec !== undefined &&
|
||||
(obj.innerSpec = message.innerSpec ? InnerSpec.toJSON(message.innerSpec) : undefined);
|
||||
message.maxDepth !== undefined && (obj.maxDepth = message.maxDepth);
|
||||
message.minDepth !== undefined && (obj.minDepth = message.minDepth);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseInnerSpec: object = {
|
||||
@ -953,11 +979,21 @@ export const InnerSpec = {
|
||||
writer.int32(v);
|
||||
}
|
||||
writer.ldelim();
|
||||
writer.uint32(16).int32(message.childSize);
|
||||
writer.uint32(24).int32(message.minPrefixLength);
|
||||
writer.uint32(32).int32(message.maxPrefixLength);
|
||||
writer.uint32(42).bytes(message.emptyChild);
|
||||
writer.uint32(48).int32(message.hash);
|
||||
if (message.childSize !== 0) {
|
||||
writer.uint32(16).int32(message.childSize);
|
||||
}
|
||||
if (message.minPrefixLength !== 0) {
|
||||
writer.uint32(24).int32(message.minPrefixLength);
|
||||
}
|
||||
if (message.maxPrefixLength !== 0) {
|
||||
writer.uint32(32).int32(message.maxPrefixLength);
|
||||
}
|
||||
if (message.emptyChild.length !== 0) {
|
||||
writer.uint32(42).bytes(message.emptyChild);
|
||||
}
|
||||
if (message.hash !== 0) {
|
||||
writer.uint32(48).int32(message.hash);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -1036,6 +1072,24 @@ export const InnerSpec = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: InnerSpec): unknown {
|
||||
const obj: any = {};
|
||||
if (message.childOrder) {
|
||||
obj.childOrder = message.childOrder.map((e) => e);
|
||||
} else {
|
||||
obj.childOrder = [];
|
||||
}
|
||||
message.childSize !== undefined && (obj.childSize = message.childSize);
|
||||
message.minPrefixLength !== undefined && (obj.minPrefixLength = message.minPrefixLength);
|
||||
message.maxPrefixLength !== undefined && (obj.maxPrefixLength = message.maxPrefixLength);
|
||||
message.emptyChild !== undefined &&
|
||||
(obj.emptyChild = base64FromBytes(
|
||||
message.emptyChild !== undefined ? message.emptyChild : new Uint8Array(),
|
||||
));
|
||||
message.hash !== undefined && (obj.hash = hashOpToJSON(message.hash));
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<InnerSpec>): InnerSpec {
|
||||
const message = { ...baseInnerSpec } as InnerSpec;
|
||||
message.childOrder = [];
|
||||
@ -1071,24 +1125,6 @@ export const InnerSpec = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: InnerSpec): unknown {
|
||||
const obj: any = {};
|
||||
if (message.childOrder) {
|
||||
obj.childOrder = message.childOrder.map((e) => e);
|
||||
} else {
|
||||
obj.childOrder = [];
|
||||
}
|
||||
message.childSize !== undefined && (obj.childSize = message.childSize);
|
||||
message.minPrefixLength !== undefined && (obj.minPrefixLength = message.minPrefixLength);
|
||||
message.maxPrefixLength !== undefined && (obj.maxPrefixLength = message.maxPrefixLength);
|
||||
message.emptyChild !== undefined &&
|
||||
(obj.emptyChild = base64FromBytes(
|
||||
message.emptyChild !== undefined ? message.emptyChild : new Uint8Array(),
|
||||
));
|
||||
message.hash !== undefined && (obj.hash = hashOpToJSON(message.hash));
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseBatchProof: object = {};
|
||||
@ -1131,6 +1167,16 @@ export const BatchProof = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: BatchProof): unknown {
|
||||
const obj: any = {};
|
||||
if (message.entries) {
|
||||
obj.entries = message.entries.map((e) => (e ? BatchEntry.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.entries = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<BatchProof>): BatchProof {
|
||||
const message = { ...baseBatchProof } as BatchProof;
|
||||
message.entries = [];
|
||||
@ -1141,16 +1187,6 @@ export const BatchProof = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: BatchProof): unknown {
|
||||
const obj: any = {};
|
||||
if (message.entries) {
|
||||
obj.entries = message.entries.map((e) => (e ? BatchEntry.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.entries = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseBatchEntry: object = {};
|
||||
@ -1202,6 +1238,15 @@ export const BatchEntry = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: BatchEntry): unknown {
|
||||
const obj: any = {};
|
||||
message.exist !== undefined &&
|
||||
(obj.exist = message.exist ? ExistenceProof.toJSON(message.exist) : undefined);
|
||||
message.nonexist !== undefined &&
|
||||
(obj.nonexist = message.nonexist ? NonExistenceProof.toJSON(message.nonexist) : undefined);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<BatchEntry>): BatchEntry {
|
||||
const message = { ...baseBatchEntry } as BatchEntry;
|
||||
if (object.exist !== undefined && object.exist !== null) {
|
||||
@ -1216,15 +1261,6 @@ export const BatchEntry = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: BatchEntry): unknown {
|
||||
const obj: any = {};
|
||||
message.exist !== undefined &&
|
||||
(obj.exist = message.exist ? ExistenceProof.toJSON(message.exist) : undefined);
|
||||
message.nonexist !== undefined &&
|
||||
(obj.nonexist = message.nonexist ? NonExistenceProof.toJSON(message.nonexist) : undefined);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseCompressedBatchProof: object = {};
|
||||
@ -1280,6 +1316,21 @@ export const CompressedBatchProof = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: CompressedBatchProof): unknown {
|
||||
const obj: any = {};
|
||||
if (message.entries) {
|
||||
obj.entries = message.entries.map((e) => (e ? CompressedBatchEntry.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.entries = [];
|
||||
}
|
||||
if (message.lookupInners) {
|
||||
obj.lookupInners = message.lookupInners.map((e) => (e ? InnerOp.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.lookupInners = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<CompressedBatchProof>): CompressedBatchProof {
|
||||
const message = { ...baseCompressedBatchProof } as CompressedBatchProof;
|
||||
message.entries = [];
|
||||
@ -1296,21 +1347,6 @@ export const CompressedBatchProof = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: CompressedBatchProof): unknown {
|
||||
const obj: any = {};
|
||||
if (message.entries) {
|
||||
obj.entries = message.entries.map((e) => (e ? CompressedBatchEntry.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.entries = [];
|
||||
}
|
||||
if (message.lookupInners) {
|
||||
obj.lookupInners = message.lookupInners.map((e) => (e ? InnerOp.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.lookupInners = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseCompressedBatchEntry: object = {};
|
||||
@ -1362,6 +1398,15 @@ export const CompressedBatchEntry = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: CompressedBatchEntry): unknown {
|
||||
const obj: any = {};
|
||||
message.exist !== undefined &&
|
||||
(obj.exist = message.exist ? CompressedExistenceProof.toJSON(message.exist) : undefined);
|
||||
message.nonexist !== undefined &&
|
||||
(obj.nonexist = message.nonexist ? CompressedNonExistenceProof.toJSON(message.nonexist) : undefined);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<CompressedBatchEntry>): CompressedBatchEntry {
|
||||
const message = { ...baseCompressedBatchEntry } as CompressedBatchEntry;
|
||||
if (object.exist !== undefined && object.exist !== null) {
|
||||
@ -1376,24 +1421,19 @@ export const CompressedBatchEntry = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: CompressedBatchEntry): unknown {
|
||||
const obj: any = {};
|
||||
message.exist !== undefined &&
|
||||
(obj.exist = message.exist ? CompressedExistenceProof.toJSON(message.exist) : undefined);
|
||||
message.nonexist !== undefined &&
|
||||
(obj.nonexist = message.nonexist ? CompressedNonExistenceProof.toJSON(message.nonexist) : undefined);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseCompressedExistenceProof: object = { path: 0 };
|
||||
|
||||
export const CompressedExistenceProof = {
|
||||
encode(message: CompressedExistenceProof, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).bytes(message.key);
|
||||
writer.uint32(18).bytes(message.value);
|
||||
if (message.leaf !== undefined && message.leaf !== undefined) {
|
||||
if (message.key.length !== 0) {
|
||||
writer.uint32(10).bytes(message.key);
|
||||
}
|
||||
if (message.value.length !== 0) {
|
||||
writer.uint32(18).bytes(message.value);
|
||||
}
|
||||
if (message.leaf !== undefined) {
|
||||
LeafOp.encode(message.leaf, writer.uint32(26).fork()).ldelim();
|
||||
}
|
||||
writer.uint32(34).fork();
|
||||
@ -1461,6 +1501,21 @@ export const CompressedExistenceProof = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: CompressedExistenceProof): unknown {
|
||||
const obj: any = {};
|
||||
message.key !== undefined &&
|
||||
(obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array()));
|
||||
message.value !== undefined &&
|
||||
(obj.value = base64FromBytes(message.value !== undefined ? message.value : new Uint8Array()));
|
||||
message.leaf !== undefined && (obj.leaf = message.leaf ? LeafOp.toJSON(message.leaf) : undefined);
|
||||
if (message.path) {
|
||||
obj.path = message.path.map((e) => e);
|
||||
} else {
|
||||
obj.path = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<CompressedExistenceProof>): CompressedExistenceProof {
|
||||
const message = { ...baseCompressedExistenceProof } as CompressedExistenceProof;
|
||||
message.path = [];
|
||||
@ -1486,32 +1541,19 @@ export const CompressedExistenceProof = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: CompressedExistenceProof): unknown {
|
||||
const obj: any = {};
|
||||
message.key !== undefined &&
|
||||
(obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array()));
|
||||
message.value !== undefined &&
|
||||
(obj.value = base64FromBytes(message.value !== undefined ? message.value : new Uint8Array()));
|
||||
message.leaf !== undefined && (obj.leaf = message.leaf ? LeafOp.toJSON(message.leaf) : undefined);
|
||||
if (message.path) {
|
||||
obj.path = message.path.map((e) => e);
|
||||
} else {
|
||||
obj.path = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseCompressedNonExistenceProof: object = {};
|
||||
|
||||
export const CompressedNonExistenceProof = {
|
||||
encode(message: CompressedNonExistenceProof, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).bytes(message.key);
|
||||
if (message.left !== undefined && message.left !== undefined) {
|
||||
if (message.key.length !== 0) {
|
||||
writer.uint32(10).bytes(message.key);
|
||||
}
|
||||
if (message.left !== undefined) {
|
||||
CompressedExistenceProof.encode(message.left, writer.uint32(18).fork()).ldelim();
|
||||
}
|
||||
if (message.right !== undefined && message.right !== undefined) {
|
||||
if (message.right !== undefined) {
|
||||
CompressedExistenceProof.encode(message.right, writer.uint32(26).fork()).ldelim();
|
||||
}
|
||||
return writer;
|
||||
@ -1559,6 +1601,17 @@ export const CompressedNonExistenceProof = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: CompressedNonExistenceProof): unknown {
|
||||
const obj: any = {};
|
||||
message.key !== undefined &&
|
||||
(obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array()));
|
||||
message.left !== undefined &&
|
||||
(obj.left = message.left ? CompressedExistenceProof.toJSON(message.left) : undefined);
|
||||
message.right !== undefined &&
|
||||
(obj.right = message.right ? CompressedExistenceProof.toJSON(message.right) : undefined);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<CompressedNonExistenceProof>): CompressedNonExistenceProof {
|
||||
const message = { ...baseCompressedNonExistenceProof } as CompressedNonExistenceProof;
|
||||
if (object.key !== undefined && object.key !== null) {
|
||||
@ -1578,17 +1631,6 @@ export const CompressedNonExistenceProof = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: CompressedNonExistenceProof): unknown {
|
||||
const obj: any = {};
|
||||
message.key !== undefined &&
|
||||
(obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array()));
|
||||
message.left !== undefined &&
|
||||
(obj.left = message.left ? CompressedExistenceProof.toJSON(message.left) : undefined);
|
||||
message.right !== undefined &&
|
||||
(obj.right = message.right ? CompressedExistenceProof.toJSON(message.right) : undefined);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
declare var self: any | undefined;
|
||||
@ -1598,7 +1640,7 @@ var globalThis: any = (() => {
|
||||
if (typeof self !== "undefined") return self;
|
||||
if (typeof window !== "undefined") return window;
|
||||
if (typeof global !== "undefined") return global;
|
||||
throw new Error("Unable to locate global object");
|
||||
throw "Unable to locate global object";
|
||||
})();
|
||||
|
||||
const atob: (b64: string) => string =
|
||||
|
||||
@ -37,12 +37,18 @@ const baseBaseAccount: object = { address: "", accountNumber: Long.UZERO, sequen
|
||||
|
||||
export const BaseAccount = {
|
||||
encode(message: BaseAccount, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.address);
|
||||
if (message.pubKey !== undefined && message.pubKey !== undefined) {
|
||||
if (message.address !== "") {
|
||||
writer.uint32(10).string(message.address);
|
||||
}
|
||||
if (message.pubKey !== undefined) {
|
||||
Any.encode(message.pubKey, writer.uint32(18).fork()).ldelim();
|
||||
}
|
||||
writer.uint32(24).uint64(message.accountNumber);
|
||||
writer.uint32(32).uint64(message.sequence);
|
||||
if (!message.accountNumber.isZero()) {
|
||||
writer.uint32(24).uint64(message.accountNumber);
|
||||
}
|
||||
if (!message.sequence.isZero()) {
|
||||
writer.uint32(32).uint64(message.sequence);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -98,6 +104,16 @@ export const BaseAccount = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: BaseAccount): unknown {
|
||||
const obj: any = {};
|
||||
message.address !== undefined && (obj.address = message.address);
|
||||
message.pubKey !== undefined && (obj.pubKey = message.pubKey ? Any.toJSON(message.pubKey) : undefined);
|
||||
message.accountNumber !== undefined &&
|
||||
(obj.accountNumber = (message.accountNumber || Long.UZERO).toString());
|
||||
message.sequence !== undefined && (obj.sequence = (message.sequence || Long.UZERO).toString());
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<BaseAccount>): BaseAccount {
|
||||
const message = { ...baseBaseAccount } as BaseAccount;
|
||||
if (object.address !== undefined && object.address !== null) {
|
||||
@ -122,26 +138,18 @@ export const BaseAccount = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: BaseAccount): unknown {
|
||||
const obj: any = {};
|
||||
message.address !== undefined && (obj.address = message.address);
|
||||
message.pubKey !== undefined && (obj.pubKey = message.pubKey ? Any.toJSON(message.pubKey) : undefined);
|
||||
message.accountNumber !== undefined &&
|
||||
(obj.accountNumber = (message.accountNumber || Long.UZERO).toString());
|
||||
message.sequence !== undefined && (obj.sequence = (message.sequence || Long.UZERO).toString());
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseModuleAccount: object = { name: "", permissions: "" };
|
||||
|
||||
export const ModuleAccount = {
|
||||
encode(message: ModuleAccount, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
if (message.baseAccount !== undefined && message.baseAccount !== undefined) {
|
||||
if (message.baseAccount !== undefined) {
|
||||
BaseAccount.encode(message.baseAccount, writer.uint32(10).fork()).ldelim();
|
||||
}
|
||||
writer.uint32(18).string(message.name);
|
||||
if (message.name !== "") {
|
||||
writer.uint32(18).string(message.name);
|
||||
}
|
||||
for (const v of message.permissions) {
|
||||
writer.uint32(26).string(v!);
|
||||
}
|
||||
@ -194,6 +202,19 @@ export const ModuleAccount = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: ModuleAccount): unknown {
|
||||
const obj: any = {};
|
||||
message.baseAccount !== undefined &&
|
||||
(obj.baseAccount = message.baseAccount ? BaseAccount.toJSON(message.baseAccount) : undefined);
|
||||
message.name !== undefined && (obj.name = message.name);
|
||||
if (message.permissions) {
|
||||
obj.permissions = message.permissions.map((e) => e);
|
||||
} else {
|
||||
obj.permissions = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<ModuleAccount>): ModuleAccount {
|
||||
const message = { ...baseModuleAccount } as ModuleAccount;
|
||||
message.permissions = [];
|
||||
@ -214,19 +235,6 @@ export const ModuleAccount = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: ModuleAccount): unknown {
|
||||
const obj: any = {};
|
||||
message.baseAccount !== undefined &&
|
||||
(obj.baseAccount = message.baseAccount ? BaseAccount.toJSON(message.baseAccount) : undefined);
|
||||
message.name !== undefined && (obj.name = message.name);
|
||||
if (message.permissions) {
|
||||
obj.permissions = message.permissions.map((e) => e);
|
||||
} else {
|
||||
obj.permissions = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseParams: object = {
|
||||
@ -239,11 +247,21 @@ const baseParams: object = {
|
||||
|
||||
export const Params = {
|
||||
encode(message: Params, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(8).uint64(message.maxMemoCharacters);
|
||||
writer.uint32(16).uint64(message.txSigLimit);
|
||||
writer.uint32(24).uint64(message.txSizeCostPerByte);
|
||||
writer.uint32(32).uint64(message.sigVerifyCostEd25519);
|
||||
writer.uint32(40).uint64(message.sigVerifyCostSecp256k1);
|
||||
if (!message.maxMemoCharacters.isZero()) {
|
||||
writer.uint32(8).uint64(message.maxMemoCharacters);
|
||||
}
|
||||
if (!message.txSigLimit.isZero()) {
|
||||
writer.uint32(16).uint64(message.txSigLimit);
|
||||
}
|
||||
if (!message.txSizeCostPerByte.isZero()) {
|
||||
writer.uint32(24).uint64(message.txSizeCostPerByte);
|
||||
}
|
||||
if (!message.sigVerifyCostEd25519.isZero()) {
|
||||
writer.uint32(32).uint64(message.sigVerifyCostEd25519);
|
||||
}
|
||||
if (!message.sigVerifyCostSecp256k1.isZero()) {
|
||||
writer.uint32(40).uint64(message.sigVerifyCostSecp256k1);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -307,6 +325,20 @@ export const Params = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Params): unknown {
|
||||
const obj: any = {};
|
||||
message.maxMemoCharacters !== undefined &&
|
||||
(obj.maxMemoCharacters = (message.maxMemoCharacters || Long.UZERO).toString());
|
||||
message.txSigLimit !== undefined && (obj.txSigLimit = (message.txSigLimit || Long.UZERO).toString());
|
||||
message.txSizeCostPerByte !== undefined &&
|
||||
(obj.txSizeCostPerByte = (message.txSizeCostPerByte || Long.UZERO).toString());
|
||||
message.sigVerifyCostEd25519 !== undefined &&
|
||||
(obj.sigVerifyCostEd25519 = (message.sigVerifyCostEd25519 || Long.UZERO).toString());
|
||||
message.sigVerifyCostSecp256k1 !== undefined &&
|
||||
(obj.sigVerifyCostSecp256k1 = (message.sigVerifyCostSecp256k1 || Long.UZERO).toString());
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<Params>): Params {
|
||||
const message = { ...baseParams } as Params;
|
||||
if (object.maxMemoCharacters !== undefined && object.maxMemoCharacters !== null) {
|
||||
@ -336,20 +368,6 @@ export const Params = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Params): unknown {
|
||||
const obj: any = {};
|
||||
message.maxMemoCharacters !== undefined &&
|
||||
(obj.maxMemoCharacters = (message.maxMemoCharacters || Long.UZERO).toString());
|
||||
message.txSigLimit !== undefined && (obj.txSigLimit = (message.txSigLimit || Long.UZERO).toString());
|
||||
message.txSizeCostPerByte !== undefined &&
|
||||
(obj.txSizeCostPerByte = (message.txSizeCostPerByte || Long.UZERO).toString());
|
||||
message.sigVerifyCostEd25519 !== undefined &&
|
||||
(obj.sigVerifyCostEd25519 = (message.sigVerifyCostEd25519 || Long.UZERO).toString());
|
||||
message.sigVerifyCostSecp256k1 !== undefined &&
|
||||
(obj.sigVerifyCostSecp256k1 = (message.sigVerifyCostSecp256k1 || Long.UZERO).toString());
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
type Builtin = Date | Function | Uint8Array | string | number | undefined | Long;
|
||||
|
||||
@ -31,7 +31,9 @@ const baseQueryAccountRequest: object = { address: "" };
|
||||
|
||||
export const QueryAccountRequest = {
|
||||
encode(message: QueryAccountRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.address);
|
||||
if (message.address !== "") {
|
||||
writer.uint32(10).string(message.address);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -63,6 +65,12 @@ export const QueryAccountRequest = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryAccountRequest): unknown {
|
||||
const obj: any = {};
|
||||
message.address !== undefined && (obj.address = message.address);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<QueryAccountRequest>): QueryAccountRequest {
|
||||
const message = { ...baseQueryAccountRequest } as QueryAccountRequest;
|
||||
if (object.address !== undefined && object.address !== null) {
|
||||
@ -72,19 +80,13 @@ export const QueryAccountRequest = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryAccountRequest): unknown {
|
||||
const obj: any = {};
|
||||
message.address !== undefined && (obj.address = message.address);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseQueryAccountResponse: object = {};
|
||||
|
||||
export const QueryAccountResponse = {
|
||||
encode(message: QueryAccountResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
if (message.account !== undefined && message.account !== undefined) {
|
||||
if (message.account !== undefined) {
|
||||
Any.encode(message.account, writer.uint32(10).fork()).ldelim();
|
||||
}
|
||||
return writer;
|
||||
@ -118,6 +120,13 @@ export const QueryAccountResponse = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryAccountResponse): unknown {
|
||||
const obj: any = {};
|
||||
message.account !== undefined &&
|
||||
(obj.account = message.account ? Any.toJSON(message.account) : undefined);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<QueryAccountResponse>): QueryAccountResponse {
|
||||
const message = { ...baseQueryAccountResponse } as QueryAccountResponse;
|
||||
if (object.account !== undefined && object.account !== null) {
|
||||
@ -127,13 +136,6 @@ export const QueryAccountResponse = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryAccountResponse): unknown {
|
||||
const obj: any = {};
|
||||
message.account !== undefined &&
|
||||
(obj.account = message.account ? Any.toJSON(message.account) : undefined);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseQueryParamsRequest: object = {};
|
||||
@ -163,22 +165,22 @@ export const QueryParamsRequest = {
|
||||
return message;
|
||||
},
|
||||
|
||||
fromPartial(_: DeepPartial<QueryParamsRequest>): QueryParamsRequest {
|
||||
const message = { ...baseQueryParamsRequest } as QueryParamsRequest;
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(_: QueryParamsRequest): unknown {
|
||||
const obj: any = {};
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(_: DeepPartial<QueryParamsRequest>): QueryParamsRequest {
|
||||
const message = { ...baseQueryParamsRequest } as QueryParamsRequest;
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
const baseQueryParamsResponse: object = {};
|
||||
|
||||
export const QueryParamsResponse = {
|
||||
encode(message: QueryParamsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
if (message.params !== undefined && message.params !== undefined) {
|
||||
if (message.params !== undefined) {
|
||||
Params.encode(message.params, writer.uint32(10).fork()).ldelim();
|
||||
}
|
||||
return writer;
|
||||
@ -212,6 +214,12 @@ export const QueryParamsResponse = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryParamsResponse): unknown {
|
||||
const obj: any = {};
|
||||
message.params !== undefined && (obj.params = message.params ? Params.toJSON(message.params) : undefined);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<QueryParamsResponse>): QueryParamsResponse {
|
||||
const message = { ...baseQueryParamsResponse } as QueryParamsResponse;
|
||||
if (object.params !== undefined && object.params !== null) {
|
||||
@ -221,12 +229,6 @@ export const QueryParamsResponse = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryParamsResponse): unknown {
|
||||
const obj: any = {};
|
||||
message.params !== undefined && (obj.params = message.params ? Params.toJSON(message.params) : undefined);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
/** Query defines the gRPC querier service. */
|
||||
|
||||
@ -83,7 +83,9 @@ export const Params = {
|
||||
for (const v of message.sendEnabled) {
|
||||
SendEnabled.encode(v!, writer.uint32(10).fork()).ldelim();
|
||||
}
|
||||
writer.uint32(16).bool(message.defaultSendEnabled);
|
||||
if (message.defaultSendEnabled === true) {
|
||||
writer.uint32(16).bool(message.defaultSendEnabled);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -125,6 +127,17 @@ export const Params = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Params): unknown {
|
||||
const obj: any = {};
|
||||
if (message.sendEnabled) {
|
||||
obj.sendEnabled = message.sendEnabled.map((e) => (e ? SendEnabled.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.sendEnabled = [];
|
||||
}
|
||||
message.defaultSendEnabled !== undefined && (obj.defaultSendEnabled = message.defaultSendEnabled);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<Params>): Params {
|
||||
const message = { ...baseParams } as Params;
|
||||
message.sendEnabled = [];
|
||||
@ -140,25 +153,18 @@ export const Params = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Params): unknown {
|
||||
const obj: any = {};
|
||||
if (message.sendEnabled) {
|
||||
obj.sendEnabled = message.sendEnabled.map((e) => (e ? SendEnabled.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.sendEnabled = [];
|
||||
}
|
||||
message.defaultSendEnabled !== undefined && (obj.defaultSendEnabled = message.defaultSendEnabled);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseSendEnabled: object = { denom: "", enabled: false };
|
||||
|
||||
export const SendEnabled = {
|
||||
encode(message: SendEnabled, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.denom);
|
||||
writer.uint32(16).bool(message.enabled);
|
||||
if (message.denom !== "") {
|
||||
writer.uint32(10).string(message.denom);
|
||||
}
|
||||
if (message.enabled === true) {
|
||||
writer.uint32(16).bool(message.enabled);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -198,6 +204,13 @@ export const SendEnabled = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: SendEnabled): unknown {
|
||||
const obj: any = {};
|
||||
message.denom !== undefined && (obj.denom = message.denom);
|
||||
message.enabled !== undefined && (obj.enabled = message.enabled);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<SendEnabled>): SendEnabled {
|
||||
const message = { ...baseSendEnabled } as SendEnabled;
|
||||
if (object.denom !== undefined && object.denom !== null) {
|
||||
@ -212,20 +225,15 @@ export const SendEnabled = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: SendEnabled): unknown {
|
||||
const obj: any = {};
|
||||
message.denom !== undefined && (obj.denom = message.denom);
|
||||
message.enabled !== undefined && (obj.enabled = message.enabled);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseInput: object = { address: "" };
|
||||
|
||||
export const Input = {
|
||||
encode(message: Input, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.address);
|
||||
if (message.address !== "") {
|
||||
writer.uint32(10).string(message.address);
|
||||
}
|
||||
for (const v of message.coins) {
|
||||
Coin.encode(v!, writer.uint32(18).fork()).ldelim();
|
||||
}
|
||||
@ -270,6 +278,17 @@ export const Input = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Input): unknown {
|
||||
const obj: any = {};
|
||||
message.address !== undefined && (obj.address = message.address);
|
||||
if (message.coins) {
|
||||
obj.coins = message.coins.map((e) => (e ? Coin.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.coins = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<Input>): Input {
|
||||
const message = { ...baseInput } as Input;
|
||||
message.coins = [];
|
||||
@ -285,24 +304,15 @@ export const Input = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Input): unknown {
|
||||
const obj: any = {};
|
||||
message.address !== undefined && (obj.address = message.address);
|
||||
if (message.coins) {
|
||||
obj.coins = message.coins.map((e) => (e ? Coin.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.coins = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseOutput: object = { address: "" };
|
||||
|
||||
export const Output = {
|
||||
encode(message: Output, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.address);
|
||||
if (message.address !== "") {
|
||||
writer.uint32(10).string(message.address);
|
||||
}
|
||||
for (const v of message.coins) {
|
||||
Coin.encode(v!, writer.uint32(18).fork()).ldelim();
|
||||
}
|
||||
@ -347,6 +357,17 @@ export const Output = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Output): unknown {
|
||||
const obj: any = {};
|
||||
message.address !== undefined && (obj.address = message.address);
|
||||
if (message.coins) {
|
||||
obj.coins = message.coins.map((e) => (e ? Coin.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.coins = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<Output>): Output {
|
||||
const message = { ...baseOutput } as Output;
|
||||
message.coins = [];
|
||||
@ -362,17 +383,6 @@ export const Output = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Output): unknown {
|
||||
const obj: any = {};
|
||||
message.address !== undefined && (obj.address = message.address);
|
||||
if (message.coins) {
|
||||
obj.coins = message.coins.map((e) => (e ? Coin.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.coins = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseSupply: object = {};
|
||||
@ -415,6 +425,16 @@ export const Supply = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Supply): unknown {
|
||||
const obj: any = {};
|
||||
if (message.total) {
|
||||
obj.total = message.total.map((e) => (e ? Coin.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.total = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<Supply>): Supply {
|
||||
const message = { ...baseSupply } as Supply;
|
||||
message.total = [];
|
||||
@ -425,24 +445,18 @@ export const Supply = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Supply): unknown {
|
||||
const obj: any = {};
|
||||
if (message.total) {
|
||||
obj.total = message.total.map((e) => (e ? Coin.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.total = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseDenomUnit: object = { denom: "", exponent: 0, aliases: "" };
|
||||
|
||||
export const DenomUnit = {
|
||||
encode(message: DenomUnit, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.denom);
|
||||
writer.uint32(16).uint32(message.exponent);
|
||||
if (message.denom !== "") {
|
||||
writer.uint32(10).string(message.denom);
|
||||
}
|
||||
if (message.exponent !== 0) {
|
||||
writer.uint32(16).uint32(message.exponent);
|
||||
}
|
||||
for (const v of message.aliases) {
|
||||
writer.uint32(26).string(v!);
|
||||
}
|
||||
@ -495,6 +509,18 @@ export const DenomUnit = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: DenomUnit): unknown {
|
||||
const obj: any = {};
|
||||
message.denom !== undefined && (obj.denom = message.denom);
|
||||
message.exponent !== undefined && (obj.exponent = message.exponent);
|
||||
if (message.aliases) {
|
||||
obj.aliases = message.aliases.map((e) => e);
|
||||
} else {
|
||||
obj.aliases = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<DenomUnit>): DenomUnit {
|
||||
const message = { ...baseDenomUnit } as DenomUnit;
|
||||
message.aliases = [];
|
||||
@ -515,30 +541,24 @@ export const DenomUnit = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: DenomUnit): unknown {
|
||||
const obj: any = {};
|
||||
message.denom !== undefined && (obj.denom = message.denom);
|
||||
message.exponent !== undefined && (obj.exponent = message.exponent);
|
||||
if (message.aliases) {
|
||||
obj.aliases = message.aliases.map((e) => e);
|
||||
} else {
|
||||
obj.aliases = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseMetadata: object = { description: "", base: "", display: "" };
|
||||
|
||||
export const Metadata = {
|
||||
encode(message: Metadata, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.description);
|
||||
if (message.description !== "") {
|
||||
writer.uint32(10).string(message.description);
|
||||
}
|
||||
for (const v of message.denomUnits) {
|
||||
DenomUnit.encode(v!, writer.uint32(18).fork()).ldelim();
|
||||
}
|
||||
writer.uint32(26).string(message.base);
|
||||
writer.uint32(34).string(message.display);
|
||||
if (message.base !== "") {
|
||||
writer.uint32(26).string(message.base);
|
||||
}
|
||||
if (message.display !== "") {
|
||||
writer.uint32(34).string(message.display);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -596,6 +616,19 @@ export const Metadata = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Metadata): unknown {
|
||||
const obj: any = {};
|
||||
message.description !== undefined && (obj.description = message.description);
|
||||
if (message.denomUnits) {
|
||||
obj.denomUnits = message.denomUnits.map((e) => (e ? DenomUnit.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.denomUnits = [];
|
||||
}
|
||||
message.base !== undefined && (obj.base = message.base);
|
||||
message.display !== undefined && (obj.display = message.display);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<Metadata>): Metadata {
|
||||
const message = { ...baseMetadata } as Metadata;
|
||||
message.denomUnits = [];
|
||||
@ -621,19 +654,6 @@ export const Metadata = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Metadata): unknown {
|
||||
const obj: any = {};
|
||||
message.description !== undefined && (obj.description = message.description);
|
||||
if (message.denomUnits) {
|
||||
obj.denomUnits = message.denomUnits.map((e) => (e ? DenomUnit.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.denomUnits = [];
|
||||
}
|
||||
message.base !== undefined && (obj.base = message.base);
|
||||
message.display !== undefined && (obj.display = message.display);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
type Builtin = Date | Function | Uint8Array | string | number | undefined | Long;
|
||||
|
||||
@ -79,8 +79,12 @@ const baseQueryBalanceRequest: object = { address: "", denom: "" };
|
||||
|
||||
export const QueryBalanceRequest = {
|
||||
encode(message: QueryBalanceRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.address);
|
||||
writer.uint32(18).string(message.denom);
|
||||
if (message.address !== "") {
|
||||
writer.uint32(10).string(message.address);
|
||||
}
|
||||
if (message.denom !== "") {
|
||||
writer.uint32(18).string(message.denom);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -120,6 +124,13 @@ export const QueryBalanceRequest = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryBalanceRequest): unknown {
|
||||
const obj: any = {};
|
||||
message.address !== undefined && (obj.address = message.address);
|
||||
message.denom !== undefined && (obj.denom = message.denom);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<QueryBalanceRequest>): QueryBalanceRequest {
|
||||
const message = { ...baseQueryBalanceRequest } as QueryBalanceRequest;
|
||||
if (object.address !== undefined && object.address !== null) {
|
||||
@ -134,20 +145,13 @@ export const QueryBalanceRequest = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryBalanceRequest): unknown {
|
||||
const obj: any = {};
|
||||
message.address !== undefined && (obj.address = message.address);
|
||||
message.denom !== undefined && (obj.denom = message.denom);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseQueryBalanceResponse: object = {};
|
||||
|
||||
export const QueryBalanceResponse = {
|
||||
encode(message: QueryBalanceResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
if (message.balance !== undefined && message.balance !== undefined) {
|
||||
if (message.balance !== undefined) {
|
||||
Coin.encode(message.balance, writer.uint32(10).fork()).ldelim();
|
||||
}
|
||||
return writer;
|
||||
@ -181,6 +185,13 @@ export const QueryBalanceResponse = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryBalanceResponse): unknown {
|
||||
const obj: any = {};
|
||||
message.balance !== undefined &&
|
||||
(obj.balance = message.balance ? Coin.toJSON(message.balance) : undefined);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<QueryBalanceResponse>): QueryBalanceResponse {
|
||||
const message = { ...baseQueryBalanceResponse } as QueryBalanceResponse;
|
||||
if (object.balance !== undefined && object.balance !== null) {
|
||||
@ -190,21 +201,16 @@ export const QueryBalanceResponse = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryBalanceResponse): unknown {
|
||||
const obj: any = {};
|
||||
message.balance !== undefined &&
|
||||
(obj.balance = message.balance ? Coin.toJSON(message.balance) : undefined);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseQueryAllBalancesRequest: object = { address: "" };
|
||||
|
||||
export const QueryAllBalancesRequest = {
|
||||
encode(message: QueryAllBalancesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.address);
|
||||
if (message.pagination !== undefined && message.pagination !== undefined) {
|
||||
if (message.address !== "") {
|
||||
writer.uint32(10).string(message.address);
|
||||
}
|
||||
if (message.pagination !== undefined) {
|
||||
PageRequest.encode(message.pagination, writer.uint32(18).fork()).ldelim();
|
||||
}
|
||||
return writer;
|
||||
@ -246,6 +252,14 @@ export const QueryAllBalancesRequest = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryAllBalancesRequest): unknown {
|
||||
const obj: any = {};
|
||||
message.address !== undefined && (obj.address = message.address);
|
||||
message.pagination !== undefined &&
|
||||
(obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<QueryAllBalancesRequest>): QueryAllBalancesRequest {
|
||||
const message = { ...baseQueryAllBalancesRequest } as QueryAllBalancesRequest;
|
||||
if (object.address !== undefined && object.address !== null) {
|
||||
@ -260,14 +274,6 @@ export const QueryAllBalancesRequest = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryAllBalancesRequest): unknown {
|
||||
const obj: any = {};
|
||||
message.address !== undefined && (obj.address = message.address);
|
||||
message.pagination !== undefined &&
|
||||
(obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseQueryAllBalancesResponse: object = {};
|
||||
@ -277,7 +283,7 @@ export const QueryAllBalancesResponse = {
|
||||
for (const v of message.balances) {
|
||||
Coin.encode(v!, writer.uint32(10).fork()).ldelim();
|
||||
}
|
||||
if (message.pagination !== undefined && message.pagination !== undefined) {
|
||||
if (message.pagination !== undefined) {
|
||||
PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
|
||||
}
|
||||
return writer;
|
||||
@ -321,6 +327,18 @@ export const QueryAllBalancesResponse = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryAllBalancesResponse): unknown {
|
||||
const obj: any = {};
|
||||
if (message.balances) {
|
||||
obj.balances = message.balances.map((e) => (e ? Coin.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.balances = [];
|
||||
}
|
||||
message.pagination !== undefined &&
|
||||
(obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<QueryAllBalancesResponse>): QueryAllBalancesResponse {
|
||||
const message = { ...baseQueryAllBalancesResponse } as QueryAllBalancesResponse;
|
||||
message.balances = [];
|
||||
@ -336,18 +354,6 @@ export const QueryAllBalancesResponse = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryAllBalancesResponse): unknown {
|
||||
const obj: any = {};
|
||||
if (message.balances) {
|
||||
obj.balances = message.balances.map((e) => (e ? Coin.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.balances = [];
|
||||
}
|
||||
message.pagination !== undefined &&
|
||||
(obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseQueryTotalSupplyRequest: object = {};
|
||||
@ -377,15 +383,15 @@ export const QueryTotalSupplyRequest = {
|
||||
return message;
|
||||
},
|
||||
|
||||
fromPartial(_: DeepPartial<QueryTotalSupplyRequest>): QueryTotalSupplyRequest {
|
||||
const message = { ...baseQueryTotalSupplyRequest } as QueryTotalSupplyRequest;
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(_: QueryTotalSupplyRequest): unknown {
|
||||
const obj: any = {};
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(_: DeepPartial<QueryTotalSupplyRequest>): QueryTotalSupplyRequest {
|
||||
const message = { ...baseQueryTotalSupplyRequest } as QueryTotalSupplyRequest;
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
const baseQueryTotalSupplyResponse: object = {};
|
||||
@ -428,6 +434,16 @@ export const QueryTotalSupplyResponse = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryTotalSupplyResponse): unknown {
|
||||
const obj: any = {};
|
||||
if (message.supply) {
|
||||
obj.supply = message.supply.map((e) => (e ? Coin.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.supply = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<QueryTotalSupplyResponse>): QueryTotalSupplyResponse {
|
||||
const message = { ...baseQueryTotalSupplyResponse } as QueryTotalSupplyResponse;
|
||||
message.supply = [];
|
||||
@ -438,23 +454,15 @@ export const QueryTotalSupplyResponse = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryTotalSupplyResponse): unknown {
|
||||
const obj: any = {};
|
||||
if (message.supply) {
|
||||
obj.supply = message.supply.map((e) => (e ? Coin.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.supply = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseQuerySupplyOfRequest: object = { denom: "" };
|
||||
|
||||
export const QuerySupplyOfRequest = {
|
||||
encode(message: QuerySupplyOfRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.denom);
|
||||
if (message.denom !== "") {
|
||||
writer.uint32(10).string(message.denom);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -486,6 +494,12 @@ export const QuerySupplyOfRequest = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QuerySupplyOfRequest): unknown {
|
||||
const obj: any = {};
|
||||
message.denom !== undefined && (obj.denom = message.denom);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<QuerySupplyOfRequest>): QuerySupplyOfRequest {
|
||||
const message = { ...baseQuerySupplyOfRequest } as QuerySupplyOfRequest;
|
||||
if (object.denom !== undefined && object.denom !== null) {
|
||||
@ -495,19 +509,13 @@ export const QuerySupplyOfRequest = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QuerySupplyOfRequest): unknown {
|
||||
const obj: any = {};
|
||||
message.denom !== undefined && (obj.denom = message.denom);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseQuerySupplyOfResponse: object = {};
|
||||
|
||||
export const QuerySupplyOfResponse = {
|
||||
encode(message: QuerySupplyOfResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
if (message.amount !== undefined && message.amount !== undefined) {
|
||||
if (message.amount !== undefined) {
|
||||
Coin.encode(message.amount, writer.uint32(10).fork()).ldelim();
|
||||
}
|
||||
return writer;
|
||||
@ -541,6 +549,12 @@ export const QuerySupplyOfResponse = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QuerySupplyOfResponse): unknown {
|
||||
const obj: any = {};
|
||||
message.amount !== undefined && (obj.amount = message.amount ? Coin.toJSON(message.amount) : undefined);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<QuerySupplyOfResponse>): QuerySupplyOfResponse {
|
||||
const message = { ...baseQuerySupplyOfResponse } as QuerySupplyOfResponse;
|
||||
if (object.amount !== undefined && object.amount !== null) {
|
||||
@ -550,12 +564,6 @@ export const QuerySupplyOfResponse = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QuerySupplyOfResponse): unknown {
|
||||
const obj: any = {};
|
||||
message.amount !== undefined && (obj.amount = message.amount ? Coin.toJSON(message.amount) : undefined);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseQueryParamsRequest: object = {};
|
||||
@ -585,22 +593,22 @@ export const QueryParamsRequest = {
|
||||
return message;
|
||||
},
|
||||
|
||||
fromPartial(_: DeepPartial<QueryParamsRequest>): QueryParamsRequest {
|
||||
const message = { ...baseQueryParamsRequest } as QueryParamsRequest;
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(_: QueryParamsRequest): unknown {
|
||||
const obj: any = {};
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(_: DeepPartial<QueryParamsRequest>): QueryParamsRequest {
|
||||
const message = { ...baseQueryParamsRequest } as QueryParamsRequest;
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
const baseQueryParamsResponse: object = {};
|
||||
|
||||
export const QueryParamsResponse = {
|
||||
encode(message: QueryParamsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
if (message.params !== undefined && message.params !== undefined) {
|
||||
if (message.params !== undefined) {
|
||||
Params.encode(message.params, writer.uint32(10).fork()).ldelim();
|
||||
}
|
||||
return writer;
|
||||
@ -634,6 +642,12 @@ export const QueryParamsResponse = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryParamsResponse): unknown {
|
||||
const obj: any = {};
|
||||
message.params !== undefined && (obj.params = message.params ? Params.toJSON(message.params) : undefined);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<QueryParamsResponse>): QueryParamsResponse {
|
||||
const message = { ...baseQueryParamsResponse } as QueryParamsResponse;
|
||||
if (object.params !== undefined && object.params !== null) {
|
||||
@ -643,12 +657,6 @@ export const QueryParamsResponse = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryParamsResponse): unknown {
|
||||
const obj: any = {};
|
||||
message.params !== undefined && (obj.params = message.params ? Params.toJSON(message.params) : undefined);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
/** Query defines the gRPC querier service. */
|
||||
|
||||
@ -29,8 +29,12 @@ const baseMsgSend: object = { fromAddress: "", toAddress: "" };
|
||||
|
||||
export const MsgSend = {
|
||||
encode(message: MsgSend, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.fromAddress);
|
||||
writer.uint32(18).string(message.toAddress);
|
||||
if (message.fromAddress !== "") {
|
||||
writer.uint32(10).string(message.fromAddress);
|
||||
}
|
||||
if (message.toAddress !== "") {
|
||||
writer.uint32(18).string(message.toAddress);
|
||||
}
|
||||
for (const v of message.amount) {
|
||||
Coin.encode(v!, writer.uint32(26).fork()).ldelim();
|
||||
}
|
||||
@ -83,6 +87,18 @@ export const MsgSend = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: MsgSend): unknown {
|
||||
const obj: any = {};
|
||||
message.fromAddress !== undefined && (obj.fromAddress = message.fromAddress);
|
||||
message.toAddress !== undefined && (obj.toAddress = message.toAddress);
|
||||
if (message.amount) {
|
||||
obj.amount = message.amount.map((e) => (e ? Coin.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.amount = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<MsgSend>): MsgSend {
|
||||
const message = { ...baseMsgSend } as MsgSend;
|
||||
message.amount = [];
|
||||
@ -103,18 +119,6 @@ export const MsgSend = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: MsgSend): unknown {
|
||||
const obj: any = {};
|
||||
message.fromAddress !== undefined && (obj.fromAddress = message.fromAddress);
|
||||
message.toAddress !== undefined && (obj.toAddress = message.toAddress);
|
||||
if (message.amount) {
|
||||
obj.amount = message.amount.map((e) => (e ? Coin.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.amount = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseMsgSendResponse: object = {};
|
||||
@ -144,15 +148,15 @@ export const MsgSendResponse = {
|
||||
return message;
|
||||
},
|
||||
|
||||
fromPartial(_: DeepPartial<MsgSendResponse>): MsgSendResponse {
|
||||
const message = { ...baseMsgSendResponse } as MsgSendResponse;
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(_: MsgSendResponse): unknown {
|
||||
const obj: any = {};
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(_: DeepPartial<MsgSendResponse>): MsgSendResponse {
|
||||
const message = { ...baseMsgSendResponse } as MsgSendResponse;
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
const baseMsgMultiSend: object = {};
|
||||
@ -208,6 +212,21 @@ export const MsgMultiSend = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: MsgMultiSend): unknown {
|
||||
const obj: any = {};
|
||||
if (message.inputs) {
|
||||
obj.inputs = message.inputs.map((e) => (e ? Input.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.inputs = [];
|
||||
}
|
||||
if (message.outputs) {
|
||||
obj.outputs = message.outputs.map((e) => (e ? Output.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.outputs = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<MsgMultiSend>): MsgMultiSend {
|
||||
const message = { ...baseMsgMultiSend } as MsgMultiSend;
|
||||
message.inputs = [];
|
||||
@ -224,21 +243,6 @@ export const MsgMultiSend = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: MsgMultiSend): unknown {
|
||||
const obj: any = {};
|
||||
if (message.inputs) {
|
||||
obj.inputs = message.inputs.map((e) => (e ? Input.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.inputs = [];
|
||||
}
|
||||
if (message.outputs) {
|
||||
obj.outputs = message.outputs.map((e) => (e ? Output.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.outputs = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseMsgMultiSendResponse: object = {};
|
||||
@ -268,15 +272,15 @@ export const MsgMultiSendResponse = {
|
||||
return message;
|
||||
},
|
||||
|
||||
fromPartial(_: DeepPartial<MsgMultiSendResponse>): MsgMultiSendResponse {
|
||||
const message = { ...baseMsgMultiSendResponse } as MsgMultiSendResponse;
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(_: MsgMultiSendResponse): unknown {
|
||||
const obj: any = {};
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(_: DeepPartial<MsgMultiSendResponse>): MsgMultiSendResponse {
|
||||
const message = { ...baseMsgMultiSendResponse } as MsgMultiSendResponse;
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
/** Msg defines the bank Msg service. */
|
||||
|
||||
@ -154,22 +154,42 @@ const baseTxResponse: object = {
|
||||
|
||||
export const TxResponse = {
|
||||
encode(message: TxResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(8).int64(message.height);
|
||||
writer.uint32(18).string(message.txhash);
|
||||
writer.uint32(26).string(message.codespace);
|
||||
writer.uint32(32).uint32(message.code);
|
||||
writer.uint32(42).string(message.data);
|
||||
writer.uint32(50).string(message.rawLog);
|
||||
if (!message.height.isZero()) {
|
||||
writer.uint32(8).int64(message.height);
|
||||
}
|
||||
if (message.txhash !== "") {
|
||||
writer.uint32(18).string(message.txhash);
|
||||
}
|
||||
if (message.codespace !== "") {
|
||||
writer.uint32(26).string(message.codespace);
|
||||
}
|
||||
if (message.code !== 0) {
|
||||
writer.uint32(32).uint32(message.code);
|
||||
}
|
||||
if (message.data !== "") {
|
||||
writer.uint32(42).string(message.data);
|
||||
}
|
||||
if (message.rawLog !== "") {
|
||||
writer.uint32(50).string(message.rawLog);
|
||||
}
|
||||
for (const v of message.logs) {
|
||||
ABCIMessageLog.encode(v!, writer.uint32(58).fork()).ldelim();
|
||||
}
|
||||
writer.uint32(66).string(message.info);
|
||||
writer.uint32(72).int64(message.gasWanted);
|
||||
writer.uint32(80).int64(message.gasUsed);
|
||||
if (message.tx !== undefined && message.tx !== undefined) {
|
||||
if (message.info !== "") {
|
||||
writer.uint32(66).string(message.info);
|
||||
}
|
||||
if (!message.gasWanted.isZero()) {
|
||||
writer.uint32(72).int64(message.gasWanted);
|
||||
}
|
||||
if (!message.gasUsed.isZero()) {
|
||||
writer.uint32(80).int64(message.gasUsed);
|
||||
}
|
||||
if (message.tx !== undefined) {
|
||||
Any.encode(message.tx, writer.uint32(90).fork()).ldelim();
|
||||
}
|
||||
writer.uint32(98).string(message.timestamp);
|
||||
if (message.timestamp !== "") {
|
||||
writer.uint32(98).string(message.timestamp);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -291,6 +311,27 @@ export const TxResponse = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: TxResponse): unknown {
|
||||
const obj: any = {};
|
||||
message.height !== undefined && (obj.height = (message.height || Long.ZERO).toString());
|
||||
message.txhash !== undefined && (obj.txhash = message.txhash);
|
||||
message.codespace !== undefined && (obj.codespace = message.codespace);
|
||||
message.code !== undefined && (obj.code = message.code);
|
||||
message.data !== undefined && (obj.data = message.data);
|
||||
message.rawLog !== undefined && (obj.rawLog = message.rawLog);
|
||||
if (message.logs) {
|
||||
obj.logs = message.logs.map((e) => (e ? ABCIMessageLog.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.logs = [];
|
||||
}
|
||||
message.info !== undefined && (obj.info = message.info);
|
||||
message.gasWanted !== undefined && (obj.gasWanted = (message.gasWanted || Long.ZERO).toString());
|
||||
message.gasUsed !== undefined && (obj.gasUsed = (message.gasUsed || Long.ZERO).toString());
|
||||
message.tx !== undefined && (obj.tx = message.tx ? Any.toJSON(message.tx) : undefined);
|
||||
message.timestamp !== undefined && (obj.timestamp = message.timestamp);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<TxResponse>): TxResponse {
|
||||
const message = { ...baseTxResponse } as TxResponse;
|
||||
message.logs = [];
|
||||
@ -356,35 +397,18 @@ export const TxResponse = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: TxResponse): unknown {
|
||||
const obj: any = {};
|
||||
message.height !== undefined && (obj.height = (message.height || Long.ZERO).toString());
|
||||
message.txhash !== undefined && (obj.txhash = message.txhash);
|
||||
message.codespace !== undefined && (obj.codespace = message.codespace);
|
||||
message.code !== undefined && (obj.code = message.code);
|
||||
message.data !== undefined && (obj.data = message.data);
|
||||
message.rawLog !== undefined && (obj.rawLog = message.rawLog);
|
||||
if (message.logs) {
|
||||
obj.logs = message.logs.map((e) => (e ? ABCIMessageLog.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.logs = [];
|
||||
}
|
||||
message.info !== undefined && (obj.info = message.info);
|
||||
message.gasWanted !== undefined && (obj.gasWanted = (message.gasWanted || Long.ZERO).toString());
|
||||
message.gasUsed !== undefined && (obj.gasUsed = (message.gasUsed || Long.ZERO).toString());
|
||||
message.tx !== undefined && (obj.tx = message.tx ? Any.toJSON(message.tx) : undefined);
|
||||
message.timestamp !== undefined && (obj.timestamp = message.timestamp);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseABCIMessageLog: object = { msgIndex: 0, log: "" };
|
||||
|
||||
export const ABCIMessageLog = {
|
||||
encode(message: ABCIMessageLog, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(8).uint32(message.msgIndex);
|
||||
writer.uint32(18).string(message.log);
|
||||
if (message.msgIndex !== 0) {
|
||||
writer.uint32(8).uint32(message.msgIndex);
|
||||
}
|
||||
if (message.log !== "") {
|
||||
writer.uint32(18).string(message.log);
|
||||
}
|
||||
for (const v of message.events) {
|
||||
StringEvent.encode(v!, writer.uint32(26).fork()).ldelim();
|
||||
}
|
||||
@ -437,6 +461,18 @@ export const ABCIMessageLog = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: ABCIMessageLog): unknown {
|
||||
const obj: any = {};
|
||||
message.msgIndex !== undefined && (obj.msgIndex = message.msgIndex);
|
||||
message.log !== undefined && (obj.log = message.log);
|
||||
if (message.events) {
|
||||
obj.events = message.events.map((e) => (e ? StringEvent.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.events = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<ABCIMessageLog>): ABCIMessageLog {
|
||||
const message = { ...baseABCIMessageLog } as ABCIMessageLog;
|
||||
message.events = [];
|
||||
@ -457,25 +493,15 @@ export const ABCIMessageLog = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: ABCIMessageLog): unknown {
|
||||
const obj: any = {};
|
||||
message.msgIndex !== undefined && (obj.msgIndex = message.msgIndex);
|
||||
message.log !== undefined && (obj.log = message.log);
|
||||
if (message.events) {
|
||||
obj.events = message.events.map((e) => (e ? StringEvent.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.events = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseStringEvent: object = { type: "" };
|
||||
|
||||
export const StringEvent = {
|
||||
encode(message: StringEvent, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.type);
|
||||
if (message.type !== "") {
|
||||
writer.uint32(10).string(message.type);
|
||||
}
|
||||
for (const v of message.attributes) {
|
||||
Attribute.encode(v!, writer.uint32(18).fork()).ldelim();
|
||||
}
|
||||
@ -520,6 +546,17 @@ export const StringEvent = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: StringEvent): unknown {
|
||||
const obj: any = {};
|
||||
message.type !== undefined && (obj.type = message.type);
|
||||
if (message.attributes) {
|
||||
obj.attributes = message.attributes.map((e) => (e ? Attribute.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.attributes = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<StringEvent>): StringEvent {
|
||||
const message = { ...baseStringEvent } as StringEvent;
|
||||
message.attributes = [];
|
||||
@ -535,25 +572,18 @@ export const StringEvent = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: StringEvent): unknown {
|
||||
const obj: any = {};
|
||||
message.type !== undefined && (obj.type = message.type);
|
||||
if (message.attributes) {
|
||||
obj.attributes = message.attributes.map((e) => (e ? Attribute.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.attributes = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseAttribute: object = { key: "", value: "" };
|
||||
|
||||
export const Attribute = {
|
||||
encode(message: Attribute, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.key);
|
||||
writer.uint32(18).string(message.value);
|
||||
if (message.key !== "") {
|
||||
writer.uint32(10).string(message.key);
|
||||
}
|
||||
if (message.value !== "") {
|
||||
writer.uint32(18).string(message.value);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -593,6 +623,13 @@ export const Attribute = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Attribute): unknown {
|
||||
const obj: any = {};
|
||||
message.key !== undefined && (obj.key = message.key);
|
||||
message.value !== undefined && (obj.value = message.value);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<Attribute>): Attribute {
|
||||
const message = { ...baseAttribute } as Attribute;
|
||||
if (object.key !== undefined && object.key !== null) {
|
||||
@ -607,21 +644,18 @@ export const Attribute = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Attribute): unknown {
|
||||
const obj: any = {};
|
||||
message.key !== undefined && (obj.key = message.key);
|
||||
message.value !== undefined && (obj.value = message.value);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseGasInfo: object = { gasWanted: Long.UZERO, gasUsed: Long.UZERO };
|
||||
|
||||
export const GasInfo = {
|
||||
encode(message: GasInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(8).uint64(message.gasWanted);
|
||||
writer.uint32(16).uint64(message.gasUsed);
|
||||
if (!message.gasWanted.isZero()) {
|
||||
writer.uint32(8).uint64(message.gasWanted);
|
||||
}
|
||||
if (!message.gasUsed.isZero()) {
|
||||
writer.uint32(16).uint64(message.gasUsed);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -661,6 +695,13 @@ export const GasInfo = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: GasInfo): unknown {
|
||||
const obj: any = {};
|
||||
message.gasWanted !== undefined && (obj.gasWanted = (message.gasWanted || Long.UZERO).toString());
|
||||
message.gasUsed !== undefined && (obj.gasUsed = (message.gasUsed || Long.UZERO).toString());
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<GasInfo>): GasInfo {
|
||||
const message = { ...baseGasInfo } as GasInfo;
|
||||
if (object.gasWanted !== undefined && object.gasWanted !== null) {
|
||||
@ -675,21 +716,18 @@ export const GasInfo = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: GasInfo): unknown {
|
||||
const obj: any = {};
|
||||
message.gasWanted !== undefined && (obj.gasWanted = (message.gasWanted || Long.UZERO).toString());
|
||||
message.gasUsed !== undefined && (obj.gasUsed = (message.gasUsed || Long.UZERO).toString());
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseResult: object = { log: "" };
|
||||
|
||||
export const Result = {
|
||||
encode(message: Result, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).bytes(message.data);
|
||||
writer.uint32(18).string(message.log);
|
||||
if (message.data.length !== 0) {
|
||||
writer.uint32(10).bytes(message.data);
|
||||
}
|
||||
if (message.log !== "") {
|
||||
writer.uint32(18).string(message.log);
|
||||
}
|
||||
for (const v of message.events) {
|
||||
Event.encode(v!, writer.uint32(26).fork()).ldelim();
|
||||
}
|
||||
@ -740,6 +778,19 @@ export const Result = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Result): unknown {
|
||||
const obj: any = {};
|
||||
message.data !== undefined &&
|
||||
(obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array()));
|
||||
message.log !== undefined && (obj.log = message.log);
|
||||
if (message.events) {
|
||||
obj.events = message.events.map((e) => (e ? Event.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.events = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<Result>): Result {
|
||||
const message = { ...baseResult } as Result;
|
||||
message.events = [];
|
||||
@ -760,29 +811,16 @@ export const Result = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Result): unknown {
|
||||
const obj: any = {};
|
||||
message.data !== undefined &&
|
||||
(obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array()));
|
||||
message.log !== undefined && (obj.log = message.log);
|
||||
if (message.events) {
|
||||
obj.events = message.events.map((e) => (e ? Event.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.events = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseSimulationResponse: object = {};
|
||||
|
||||
export const SimulationResponse = {
|
||||
encode(message: SimulationResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
if (message.gasInfo !== undefined && message.gasInfo !== undefined) {
|
||||
if (message.gasInfo !== undefined) {
|
||||
GasInfo.encode(message.gasInfo, writer.uint32(10).fork()).ldelim();
|
||||
}
|
||||
if (message.result !== undefined && message.result !== undefined) {
|
||||
if (message.result !== undefined) {
|
||||
Result.encode(message.result, writer.uint32(18).fork()).ldelim();
|
||||
}
|
||||
return writer;
|
||||
@ -824,6 +862,14 @@ export const SimulationResponse = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: SimulationResponse): unknown {
|
||||
const obj: any = {};
|
||||
message.gasInfo !== undefined &&
|
||||
(obj.gasInfo = message.gasInfo ? GasInfo.toJSON(message.gasInfo) : undefined);
|
||||
message.result !== undefined && (obj.result = message.result ? Result.toJSON(message.result) : undefined);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<SimulationResponse>): SimulationResponse {
|
||||
const message = { ...baseSimulationResponse } as SimulationResponse;
|
||||
if (object.gasInfo !== undefined && object.gasInfo !== null) {
|
||||
@ -838,22 +884,18 @@ export const SimulationResponse = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: SimulationResponse): unknown {
|
||||
const obj: any = {};
|
||||
message.gasInfo !== undefined &&
|
||||
(obj.gasInfo = message.gasInfo ? GasInfo.toJSON(message.gasInfo) : undefined);
|
||||
message.result !== undefined && (obj.result = message.result ? Result.toJSON(message.result) : undefined);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseMsgData: object = { msgType: "" };
|
||||
|
||||
export const MsgData = {
|
||||
encode(message: MsgData, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.msgType);
|
||||
writer.uint32(18).bytes(message.data);
|
||||
if (message.msgType !== "") {
|
||||
writer.uint32(10).string(message.msgType);
|
||||
}
|
||||
if (message.data.length !== 0) {
|
||||
writer.uint32(18).bytes(message.data);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -891,6 +933,14 @@ export const MsgData = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: MsgData): unknown {
|
||||
const obj: any = {};
|
||||
message.msgType !== undefined && (obj.msgType = message.msgType);
|
||||
message.data !== undefined &&
|
||||
(obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array()));
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<MsgData>): MsgData {
|
||||
const message = { ...baseMsgData } as MsgData;
|
||||
if (object.msgType !== undefined && object.msgType !== null) {
|
||||
@ -905,14 +955,6 @@ export const MsgData = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: MsgData): unknown {
|
||||
const obj: any = {};
|
||||
message.msgType !== undefined && (obj.msgType = message.msgType);
|
||||
message.data !== undefined &&
|
||||
(obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array()));
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseTxMsgData: object = {};
|
||||
@ -955,6 +997,16 @@ export const TxMsgData = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: TxMsgData): unknown {
|
||||
const obj: any = {};
|
||||
if (message.data) {
|
||||
obj.data = message.data.map((e) => (e ? MsgData.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.data = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<TxMsgData>): TxMsgData {
|
||||
const message = { ...baseTxMsgData } as TxMsgData;
|
||||
message.data = [];
|
||||
@ -965,16 +1017,6 @@ export const TxMsgData = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: TxMsgData): unknown {
|
||||
const obj: any = {};
|
||||
if (message.data) {
|
||||
obj.data = message.data.map((e) => (e ? MsgData.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.data = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseSearchTxsResult: object = {
|
||||
@ -987,11 +1029,21 @@ const baseSearchTxsResult: object = {
|
||||
|
||||
export const SearchTxsResult = {
|
||||
encode(message: SearchTxsResult, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(8).uint64(message.totalCount);
|
||||
writer.uint32(16).uint64(message.count);
|
||||
writer.uint32(24).uint64(message.pageNumber);
|
||||
writer.uint32(32).uint64(message.pageTotal);
|
||||
writer.uint32(40).uint64(message.limit);
|
||||
if (!message.totalCount.isZero()) {
|
||||
writer.uint32(8).uint64(message.totalCount);
|
||||
}
|
||||
if (!message.count.isZero()) {
|
||||
writer.uint32(16).uint64(message.count);
|
||||
}
|
||||
if (!message.pageNumber.isZero()) {
|
||||
writer.uint32(24).uint64(message.pageNumber);
|
||||
}
|
||||
if (!message.pageTotal.isZero()) {
|
||||
writer.uint32(32).uint64(message.pageTotal);
|
||||
}
|
||||
if (!message.limit.isZero()) {
|
||||
writer.uint32(40).uint64(message.limit);
|
||||
}
|
||||
for (const v of message.txs) {
|
||||
TxResponse.encode(v!, writer.uint32(50).fork()).ldelim();
|
||||
}
|
||||
@ -1068,6 +1120,21 @@ export const SearchTxsResult = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: SearchTxsResult): unknown {
|
||||
const obj: any = {};
|
||||
message.totalCount !== undefined && (obj.totalCount = (message.totalCount || Long.UZERO).toString());
|
||||
message.count !== undefined && (obj.count = (message.count || Long.UZERO).toString());
|
||||
message.pageNumber !== undefined && (obj.pageNumber = (message.pageNumber || Long.UZERO).toString());
|
||||
message.pageTotal !== undefined && (obj.pageTotal = (message.pageTotal || Long.UZERO).toString());
|
||||
message.limit !== undefined && (obj.limit = (message.limit || Long.UZERO).toString());
|
||||
if (message.txs) {
|
||||
obj.txs = message.txs.map((e) => (e ? TxResponse.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.txs = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<SearchTxsResult>): SearchTxsResult {
|
||||
const message = { ...baseSearchTxsResult } as SearchTxsResult;
|
||||
message.txs = [];
|
||||
@ -1103,21 +1170,6 @@ export const SearchTxsResult = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: SearchTxsResult): unknown {
|
||||
const obj: any = {};
|
||||
message.totalCount !== undefined && (obj.totalCount = (message.totalCount || Long.UZERO).toString());
|
||||
message.count !== undefined && (obj.count = (message.count || Long.UZERO).toString());
|
||||
message.pageNumber !== undefined && (obj.pageNumber = (message.pageNumber || Long.UZERO).toString());
|
||||
message.pageTotal !== undefined && (obj.pageTotal = (message.pageTotal || Long.UZERO).toString());
|
||||
message.limit !== undefined && (obj.limit = (message.limit || Long.UZERO).toString());
|
||||
if (message.txs) {
|
||||
obj.txs = message.txs.map((e) => (e ? TxResponse.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.txs = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
declare var self: any | undefined;
|
||||
@ -1127,7 +1179,7 @@ var globalThis: any = (() => {
|
||||
if (typeof self !== "undefined") return self;
|
||||
if (typeof window !== "undefined") return window;
|
||||
if (typeof global !== "undefined") return global;
|
||||
throw new Error("Unable to locate global object");
|
||||
throw "Unable to locate global object";
|
||||
})();
|
||||
|
||||
const atob: (b64: string) => string =
|
||||
|
||||
@ -66,10 +66,18 @@ const basePageRequest: object = { offset: Long.UZERO, limit: Long.UZERO, countTo
|
||||
|
||||
export const PageRequest = {
|
||||
encode(message: PageRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).bytes(message.key);
|
||||
writer.uint32(16).uint64(message.offset);
|
||||
writer.uint32(24).uint64(message.limit);
|
||||
writer.uint32(32).bool(message.countTotal);
|
||||
if (message.key.length !== 0) {
|
||||
writer.uint32(10).bytes(message.key);
|
||||
}
|
||||
if (!message.offset.isZero()) {
|
||||
writer.uint32(16).uint64(message.offset);
|
||||
}
|
||||
if (!message.limit.isZero()) {
|
||||
writer.uint32(24).uint64(message.limit);
|
||||
}
|
||||
if (message.countTotal === true) {
|
||||
writer.uint32(32).bool(message.countTotal);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -123,6 +131,16 @@ export const PageRequest = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: PageRequest): unknown {
|
||||
const obj: any = {};
|
||||
message.key !== undefined &&
|
||||
(obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array()));
|
||||
message.offset !== undefined && (obj.offset = (message.offset || Long.UZERO).toString());
|
||||
message.limit !== undefined && (obj.limit = (message.limit || Long.UZERO).toString());
|
||||
message.countTotal !== undefined && (obj.countTotal = message.countTotal);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<PageRequest>): PageRequest {
|
||||
const message = { ...basePageRequest } as PageRequest;
|
||||
if (object.key !== undefined && object.key !== null) {
|
||||
@ -147,24 +165,18 @@ export const PageRequest = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: PageRequest): unknown {
|
||||
const obj: any = {};
|
||||
message.key !== undefined &&
|
||||
(obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array()));
|
||||
message.offset !== undefined && (obj.offset = (message.offset || Long.UZERO).toString());
|
||||
message.limit !== undefined && (obj.limit = (message.limit || Long.UZERO).toString());
|
||||
message.countTotal !== undefined && (obj.countTotal = message.countTotal);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const basePageResponse: object = { total: Long.UZERO };
|
||||
|
||||
export const PageResponse = {
|
||||
encode(message: PageResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).bytes(message.nextKey);
|
||||
writer.uint32(16).uint64(message.total);
|
||||
if (message.nextKey.length !== 0) {
|
||||
writer.uint32(10).bytes(message.nextKey);
|
||||
}
|
||||
if (!message.total.isZero()) {
|
||||
writer.uint32(16).uint64(message.total);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -202,6 +214,14 @@ export const PageResponse = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: PageResponse): unknown {
|
||||
const obj: any = {};
|
||||
message.nextKey !== undefined &&
|
||||
(obj.nextKey = base64FromBytes(message.nextKey !== undefined ? message.nextKey : new Uint8Array()));
|
||||
message.total !== undefined && (obj.total = (message.total || Long.UZERO).toString());
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<PageResponse>): PageResponse {
|
||||
const message = { ...basePageResponse } as PageResponse;
|
||||
if (object.nextKey !== undefined && object.nextKey !== null) {
|
||||
@ -216,14 +236,6 @@ export const PageResponse = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: PageResponse): unknown {
|
||||
const obj: any = {};
|
||||
message.nextKey !== undefined &&
|
||||
(obj.nextKey = base64FromBytes(message.nextKey !== undefined ? message.nextKey : new Uint8Array()));
|
||||
message.total !== undefined && (obj.total = (message.total || Long.UZERO).toString());
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
declare var self: any | undefined;
|
||||
@ -233,7 +245,7 @@ var globalThis: any = (() => {
|
||||
if (typeof self !== "undefined") return self;
|
||||
if (typeof window !== "undefined") return window;
|
||||
if (typeof global !== "undefined") return global;
|
||||
throw new Error("Unable to locate global object");
|
||||
throw "Unable to locate global object";
|
||||
})();
|
||||
|
||||
const atob: (b64: string) => string =
|
||||
|
||||
@ -40,8 +40,12 @@ const baseCoin: object = { denom: "", amount: "" };
|
||||
|
||||
export const Coin = {
|
||||
encode(message: Coin, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.denom);
|
||||
writer.uint32(18).string(message.amount);
|
||||
if (message.denom !== "") {
|
||||
writer.uint32(10).string(message.denom);
|
||||
}
|
||||
if (message.amount !== "") {
|
||||
writer.uint32(18).string(message.amount);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -81,6 +85,13 @@ export const Coin = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Coin): unknown {
|
||||
const obj: any = {};
|
||||
message.denom !== undefined && (obj.denom = message.denom);
|
||||
message.amount !== undefined && (obj.amount = message.amount);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<Coin>): Coin {
|
||||
const message = { ...baseCoin } as Coin;
|
||||
if (object.denom !== undefined && object.denom !== null) {
|
||||
@ -95,21 +106,18 @@ export const Coin = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Coin): unknown {
|
||||
const obj: any = {};
|
||||
message.denom !== undefined && (obj.denom = message.denom);
|
||||
message.amount !== undefined && (obj.amount = message.amount);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseDecCoin: object = { denom: "", amount: "" };
|
||||
|
||||
export const DecCoin = {
|
||||
encode(message: DecCoin, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.denom);
|
||||
writer.uint32(18).string(message.amount);
|
||||
if (message.denom !== "") {
|
||||
writer.uint32(10).string(message.denom);
|
||||
}
|
||||
if (message.amount !== "") {
|
||||
writer.uint32(18).string(message.amount);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -149,6 +157,13 @@ export const DecCoin = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: DecCoin): unknown {
|
||||
const obj: any = {};
|
||||
message.denom !== undefined && (obj.denom = message.denom);
|
||||
message.amount !== undefined && (obj.amount = message.amount);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<DecCoin>): DecCoin {
|
||||
const message = { ...baseDecCoin } as DecCoin;
|
||||
if (object.denom !== undefined && object.denom !== null) {
|
||||
@ -163,20 +178,15 @@ export const DecCoin = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: DecCoin): unknown {
|
||||
const obj: any = {};
|
||||
message.denom !== undefined && (obj.denom = message.denom);
|
||||
message.amount !== undefined && (obj.amount = message.amount);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseIntProto: object = { int: "" };
|
||||
|
||||
export const IntProto = {
|
||||
encode(message: IntProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.int);
|
||||
if (message.int !== "") {
|
||||
writer.uint32(10).string(message.int);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -208,6 +218,12 @@ export const IntProto = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: IntProto): unknown {
|
||||
const obj: any = {};
|
||||
message.int !== undefined && (obj.int = message.int);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<IntProto>): IntProto {
|
||||
const message = { ...baseIntProto } as IntProto;
|
||||
if (object.int !== undefined && object.int !== null) {
|
||||
@ -217,19 +233,15 @@ export const IntProto = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: IntProto): unknown {
|
||||
const obj: any = {};
|
||||
message.int !== undefined && (obj.int = message.int);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseDecProto: object = { dec: "" };
|
||||
|
||||
export const DecProto = {
|
||||
encode(message: DecProto, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.dec);
|
||||
if (message.dec !== "") {
|
||||
writer.uint32(10).string(message.dec);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -261,6 +273,12 @@ export const DecProto = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: DecProto): unknown {
|
||||
const obj: any = {};
|
||||
message.dec !== undefined && (obj.dec = message.dec);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<DecProto>): DecProto {
|
||||
const message = { ...baseDecProto } as DecProto;
|
||||
if (object.dec !== undefined && object.dec !== null) {
|
||||
@ -270,12 +288,6 @@ export const DecProto = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: DecProto): unknown {
|
||||
const obj: any = {};
|
||||
message.dec !== undefined && (obj.dec = message.dec);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
type Builtin = Date | Function | Uint8Array | string | number | undefined | Long;
|
||||
|
||||
@ -64,6 +64,16 @@ export const MultiSignature = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: MultiSignature): unknown {
|
||||
const obj: any = {};
|
||||
if (message.signatures) {
|
||||
obj.signatures = message.signatures.map((e) => base64FromBytes(e !== undefined ? e : new Uint8Array()));
|
||||
} else {
|
||||
obj.signatures = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<MultiSignature>): MultiSignature {
|
||||
const message = { ...baseMultiSignature } as MultiSignature;
|
||||
message.signatures = [];
|
||||
@ -74,24 +84,18 @@ export const MultiSignature = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: MultiSignature): unknown {
|
||||
const obj: any = {};
|
||||
if (message.signatures) {
|
||||
obj.signatures = message.signatures.map((e) => base64FromBytes(e !== undefined ? e : new Uint8Array()));
|
||||
} else {
|
||||
obj.signatures = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseCompactBitArray: object = { extraBitsStored: 0 };
|
||||
|
||||
export const CompactBitArray = {
|
||||
encode(message: CompactBitArray, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(8).uint32(message.extraBitsStored);
|
||||
writer.uint32(18).bytes(message.elems);
|
||||
if (message.extraBitsStored !== 0) {
|
||||
writer.uint32(8).uint32(message.extraBitsStored);
|
||||
}
|
||||
if (message.elems.length !== 0) {
|
||||
writer.uint32(18).bytes(message.elems);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -129,6 +133,14 @@ export const CompactBitArray = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: CompactBitArray): unknown {
|
||||
const obj: any = {};
|
||||
message.extraBitsStored !== undefined && (obj.extraBitsStored = message.extraBitsStored);
|
||||
message.elems !== undefined &&
|
||||
(obj.elems = base64FromBytes(message.elems !== undefined ? message.elems : new Uint8Array()));
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<CompactBitArray>): CompactBitArray {
|
||||
const message = { ...baseCompactBitArray } as CompactBitArray;
|
||||
if (object.extraBitsStored !== undefined && object.extraBitsStored !== null) {
|
||||
@ -143,14 +155,6 @@ export const CompactBitArray = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: CompactBitArray): unknown {
|
||||
const obj: any = {};
|
||||
message.extraBitsStored !== undefined && (obj.extraBitsStored = message.extraBitsStored);
|
||||
message.elems !== undefined &&
|
||||
(obj.elems = base64FromBytes(message.elems !== undefined ? message.elems : new Uint8Array()));
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
declare var self: any | undefined;
|
||||
@ -160,7 +164,7 @@ var globalThis: any = (() => {
|
||||
if (typeof self !== "undefined") return self;
|
||||
if (typeof window !== "undefined") return window;
|
||||
if (typeof global !== "undefined") return global;
|
||||
throw new Error("Unable to locate global object");
|
||||
throw "Unable to locate global object";
|
||||
})();
|
||||
|
||||
const atob: (b64: string) => string =
|
||||
|
||||
@ -24,7 +24,9 @@ const basePubKey: object = {};
|
||||
|
||||
export const PubKey = {
|
||||
encode(message: PubKey, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).bytes(message.key);
|
||||
if (message.key.length !== 0) {
|
||||
writer.uint32(10).bytes(message.key);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -54,6 +56,13 @@ export const PubKey = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: PubKey): unknown {
|
||||
const obj: any = {};
|
||||
message.key !== undefined &&
|
||||
(obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array()));
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<PubKey>): PubKey {
|
||||
const message = { ...basePubKey } as PubKey;
|
||||
if (object.key !== undefined && object.key !== null) {
|
||||
@ -63,20 +72,15 @@ export const PubKey = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: PubKey): unknown {
|
||||
const obj: any = {};
|
||||
message.key !== undefined &&
|
||||
(obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array()));
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const basePrivKey: object = {};
|
||||
|
||||
export const PrivKey = {
|
||||
encode(message: PrivKey, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).bytes(message.key);
|
||||
if (message.key.length !== 0) {
|
||||
writer.uint32(10).bytes(message.key);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -106,6 +110,13 @@ export const PrivKey = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: PrivKey): unknown {
|
||||
const obj: any = {};
|
||||
message.key !== undefined &&
|
||||
(obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array()));
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<PrivKey>): PrivKey {
|
||||
const message = { ...basePrivKey } as PrivKey;
|
||||
if (object.key !== undefined && object.key !== null) {
|
||||
@ -115,13 +126,6 @@ export const PrivKey = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: PrivKey): unknown {
|
||||
const obj: any = {};
|
||||
message.key !== undefined &&
|
||||
(obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array()));
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
declare var self: any | undefined;
|
||||
@ -131,7 +135,7 @@ var globalThis: any = (() => {
|
||||
if (typeof self !== "undefined") return self;
|
||||
if (typeof window !== "undefined") return window;
|
||||
if (typeof global !== "undefined") return global;
|
||||
throw new Error("Unable to locate global object");
|
||||
throw "Unable to locate global object";
|
||||
})();
|
||||
|
||||
const atob: (b64: string) => string =
|
||||
|
||||
@ -135,10 +135,18 @@ const baseParams: object = {
|
||||
|
||||
export const Params = {
|
||||
encode(message: Params, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.communityTax);
|
||||
writer.uint32(18).string(message.baseProposerReward);
|
||||
writer.uint32(26).string(message.bonusProposerReward);
|
||||
writer.uint32(32).bool(message.withdrawAddrEnabled);
|
||||
if (message.communityTax !== "") {
|
||||
writer.uint32(10).string(message.communityTax);
|
||||
}
|
||||
if (message.baseProposerReward !== "") {
|
||||
writer.uint32(18).string(message.baseProposerReward);
|
||||
}
|
||||
if (message.bonusProposerReward !== "") {
|
||||
writer.uint32(26).string(message.bonusProposerReward);
|
||||
}
|
||||
if (message.withdrawAddrEnabled === true) {
|
||||
writer.uint32(32).bool(message.withdrawAddrEnabled);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -194,6 +202,15 @@ export const Params = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Params): unknown {
|
||||
const obj: any = {};
|
||||
message.communityTax !== undefined && (obj.communityTax = message.communityTax);
|
||||
message.baseProposerReward !== undefined && (obj.baseProposerReward = message.baseProposerReward);
|
||||
message.bonusProposerReward !== undefined && (obj.bonusProposerReward = message.bonusProposerReward);
|
||||
message.withdrawAddrEnabled !== undefined && (obj.withdrawAddrEnabled = message.withdrawAddrEnabled);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<Params>): Params {
|
||||
const message = { ...baseParams } as Params;
|
||||
if (object.communityTax !== undefined && object.communityTax !== null) {
|
||||
@ -218,15 +235,6 @@ export const Params = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Params): unknown {
|
||||
const obj: any = {};
|
||||
message.communityTax !== undefined && (obj.communityTax = message.communityTax);
|
||||
message.baseProposerReward !== undefined && (obj.baseProposerReward = message.baseProposerReward);
|
||||
message.bonusProposerReward !== undefined && (obj.bonusProposerReward = message.bonusProposerReward);
|
||||
message.withdrawAddrEnabled !== undefined && (obj.withdrawAddrEnabled = message.withdrawAddrEnabled);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseValidatorHistoricalRewards: object = { referenceCount: 0 };
|
||||
@ -236,7 +244,9 @@ export const ValidatorHistoricalRewards = {
|
||||
for (const v of message.cumulativeRewardRatio) {
|
||||
DecCoin.encode(v!, writer.uint32(10).fork()).ldelim();
|
||||
}
|
||||
writer.uint32(16).uint32(message.referenceCount);
|
||||
if (message.referenceCount !== 0) {
|
||||
writer.uint32(16).uint32(message.referenceCount);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -278,6 +288,19 @@ export const ValidatorHistoricalRewards = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: ValidatorHistoricalRewards): unknown {
|
||||
const obj: any = {};
|
||||
if (message.cumulativeRewardRatio) {
|
||||
obj.cumulativeRewardRatio = message.cumulativeRewardRatio.map((e) =>
|
||||
e ? DecCoin.toJSON(e) : undefined,
|
||||
);
|
||||
} else {
|
||||
obj.cumulativeRewardRatio = [];
|
||||
}
|
||||
message.referenceCount !== undefined && (obj.referenceCount = message.referenceCount);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<ValidatorHistoricalRewards>): ValidatorHistoricalRewards {
|
||||
const message = { ...baseValidatorHistoricalRewards } as ValidatorHistoricalRewards;
|
||||
message.cumulativeRewardRatio = [];
|
||||
@ -293,19 +316,6 @@ export const ValidatorHistoricalRewards = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: ValidatorHistoricalRewards): unknown {
|
||||
const obj: any = {};
|
||||
if (message.cumulativeRewardRatio) {
|
||||
obj.cumulativeRewardRatio = message.cumulativeRewardRatio.map((e) =>
|
||||
e ? DecCoin.toJSON(e) : undefined,
|
||||
);
|
||||
} else {
|
||||
obj.cumulativeRewardRatio = [];
|
||||
}
|
||||
message.referenceCount !== undefined && (obj.referenceCount = message.referenceCount);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseValidatorCurrentRewards: object = { period: Long.UZERO };
|
||||
@ -315,7 +325,9 @@ export const ValidatorCurrentRewards = {
|
||||
for (const v of message.rewards) {
|
||||
DecCoin.encode(v!, writer.uint32(10).fork()).ldelim();
|
||||
}
|
||||
writer.uint32(16).uint64(message.period);
|
||||
if (!message.period.isZero()) {
|
||||
writer.uint32(16).uint64(message.period);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -357,6 +369,17 @@ export const ValidatorCurrentRewards = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: ValidatorCurrentRewards): unknown {
|
||||
const obj: any = {};
|
||||
if (message.rewards) {
|
||||
obj.rewards = message.rewards.map((e) => (e ? DecCoin.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.rewards = [];
|
||||
}
|
||||
message.period !== undefined && (obj.period = (message.period || Long.UZERO).toString());
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<ValidatorCurrentRewards>): ValidatorCurrentRewards {
|
||||
const message = { ...baseValidatorCurrentRewards } as ValidatorCurrentRewards;
|
||||
message.rewards = [];
|
||||
@ -372,17 +395,6 @@ export const ValidatorCurrentRewards = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: ValidatorCurrentRewards): unknown {
|
||||
const obj: any = {};
|
||||
if (message.rewards) {
|
||||
obj.rewards = message.rewards.map((e) => (e ? DecCoin.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.rewards = [];
|
||||
}
|
||||
message.period !== undefined && (obj.period = (message.period || Long.UZERO).toString());
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseValidatorAccumulatedCommission: object = {};
|
||||
@ -425,6 +437,16 @@ export const ValidatorAccumulatedCommission = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: ValidatorAccumulatedCommission): unknown {
|
||||
const obj: any = {};
|
||||
if (message.commission) {
|
||||
obj.commission = message.commission.map((e) => (e ? DecCoin.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.commission = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<ValidatorAccumulatedCommission>): ValidatorAccumulatedCommission {
|
||||
const message = { ...baseValidatorAccumulatedCommission } as ValidatorAccumulatedCommission;
|
||||
message.commission = [];
|
||||
@ -435,16 +457,6 @@ export const ValidatorAccumulatedCommission = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: ValidatorAccumulatedCommission): unknown {
|
||||
const obj: any = {};
|
||||
if (message.commission) {
|
||||
obj.commission = message.commission.map((e) => (e ? DecCoin.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.commission = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseValidatorOutstandingRewards: object = {};
|
||||
@ -487,6 +499,16 @@ export const ValidatorOutstandingRewards = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: ValidatorOutstandingRewards): unknown {
|
||||
const obj: any = {};
|
||||
if (message.rewards) {
|
||||
obj.rewards = message.rewards.map((e) => (e ? DecCoin.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.rewards = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<ValidatorOutstandingRewards>): ValidatorOutstandingRewards {
|
||||
const message = { ...baseValidatorOutstandingRewards } as ValidatorOutstandingRewards;
|
||||
message.rewards = [];
|
||||
@ -497,24 +519,18 @@ export const ValidatorOutstandingRewards = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: ValidatorOutstandingRewards): unknown {
|
||||
const obj: any = {};
|
||||
if (message.rewards) {
|
||||
obj.rewards = message.rewards.map((e) => (e ? DecCoin.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.rewards = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseValidatorSlashEvent: object = { validatorPeriod: Long.UZERO, fraction: "" };
|
||||
|
||||
export const ValidatorSlashEvent = {
|
||||
encode(message: ValidatorSlashEvent, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(8).uint64(message.validatorPeriod);
|
||||
writer.uint32(18).string(message.fraction);
|
||||
if (!message.validatorPeriod.isZero()) {
|
||||
writer.uint32(8).uint64(message.validatorPeriod);
|
||||
}
|
||||
if (message.fraction !== "") {
|
||||
writer.uint32(18).string(message.fraction);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -554,6 +570,14 @@ export const ValidatorSlashEvent = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: ValidatorSlashEvent): unknown {
|
||||
const obj: any = {};
|
||||
message.validatorPeriod !== undefined &&
|
||||
(obj.validatorPeriod = (message.validatorPeriod || Long.UZERO).toString());
|
||||
message.fraction !== undefined && (obj.fraction = message.fraction);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<ValidatorSlashEvent>): ValidatorSlashEvent {
|
||||
const message = { ...baseValidatorSlashEvent } as ValidatorSlashEvent;
|
||||
if (object.validatorPeriod !== undefined && object.validatorPeriod !== null) {
|
||||
@ -568,14 +592,6 @@ export const ValidatorSlashEvent = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: ValidatorSlashEvent): unknown {
|
||||
const obj: any = {};
|
||||
message.validatorPeriod !== undefined &&
|
||||
(obj.validatorPeriod = (message.validatorPeriod || Long.UZERO).toString());
|
||||
message.fraction !== undefined && (obj.fraction = message.fraction);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseValidatorSlashEvents: object = {};
|
||||
@ -618,17 +634,6 @@ export const ValidatorSlashEvents = {
|
||||
return message;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<ValidatorSlashEvents>): ValidatorSlashEvents {
|
||||
const message = { ...baseValidatorSlashEvents } as ValidatorSlashEvents;
|
||||
message.validatorSlashEvents = [];
|
||||
if (object.validatorSlashEvents !== undefined && object.validatorSlashEvents !== null) {
|
||||
for (const e of object.validatorSlashEvents) {
|
||||
message.validatorSlashEvents.push(ValidatorSlashEvent.fromPartial(e));
|
||||
}
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: ValidatorSlashEvents): unknown {
|
||||
const obj: any = {};
|
||||
if (message.validatorSlashEvents) {
|
||||
@ -640,6 +645,17 @@ export const ValidatorSlashEvents = {
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<ValidatorSlashEvents>): ValidatorSlashEvents {
|
||||
const message = { ...baseValidatorSlashEvents } as ValidatorSlashEvents;
|
||||
message.validatorSlashEvents = [];
|
||||
if (object.validatorSlashEvents !== undefined && object.validatorSlashEvents !== null) {
|
||||
for (const e of object.validatorSlashEvents) {
|
||||
message.validatorSlashEvents.push(ValidatorSlashEvent.fromPartial(e));
|
||||
}
|
||||
}
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
const baseFeePool: object = {};
|
||||
@ -682,6 +698,16 @@ export const FeePool = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: FeePool): unknown {
|
||||
const obj: any = {};
|
||||
if (message.communityPool) {
|
||||
obj.communityPool = message.communityPool.map((e) => (e ? DecCoin.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.communityPool = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<FeePool>): FeePool {
|
||||
const message = { ...baseFeePool } as FeePool;
|
||||
message.communityPool = [];
|
||||
@ -692,25 +718,21 @@ export const FeePool = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: FeePool): unknown {
|
||||
const obj: any = {};
|
||||
if (message.communityPool) {
|
||||
obj.communityPool = message.communityPool.map((e) => (e ? DecCoin.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.communityPool = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseCommunityPoolSpendProposal: object = { title: "", description: "", recipient: "" };
|
||||
|
||||
export const CommunityPoolSpendProposal = {
|
||||
encode(message: CommunityPoolSpendProposal, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.title);
|
||||
writer.uint32(18).string(message.description);
|
||||
writer.uint32(26).string(message.recipient);
|
||||
if (message.title !== "") {
|
||||
writer.uint32(10).string(message.title);
|
||||
}
|
||||
if (message.description !== "") {
|
||||
writer.uint32(18).string(message.description);
|
||||
}
|
||||
if (message.recipient !== "") {
|
||||
writer.uint32(26).string(message.recipient);
|
||||
}
|
||||
for (const v of message.amount) {
|
||||
Coin.encode(v!, writer.uint32(34).fork()).ldelim();
|
||||
}
|
||||
@ -771,6 +793,19 @@ export const CommunityPoolSpendProposal = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: CommunityPoolSpendProposal): unknown {
|
||||
const obj: any = {};
|
||||
message.title !== undefined && (obj.title = message.title);
|
||||
message.description !== undefined && (obj.description = message.description);
|
||||
message.recipient !== undefined && (obj.recipient = message.recipient);
|
||||
if (message.amount) {
|
||||
obj.amount = message.amount.map((e) => (e ? Coin.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.amount = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<CommunityPoolSpendProposal>): CommunityPoolSpendProposal {
|
||||
const message = { ...baseCommunityPoolSpendProposal } as CommunityPoolSpendProposal;
|
||||
message.amount = [];
|
||||
@ -796,28 +831,21 @@ export const CommunityPoolSpendProposal = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: CommunityPoolSpendProposal): unknown {
|
||||
const obj: any = {};
|
||||
message.title !== undefined && (obj.title = message.title);
|
||||
message.description !== undefined && (obj.description = message.description);
|
||||
message.recipient !== undefined && (obj.recipient = message.recipient);
|
||||
if (message.amount) {
|
||||
obj.amount = message.amount.map((e) => (e ? Coin.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.amount = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseDelegatorStartingInfo: object = { previousPeriod: Long.UZERO, stake: "", height: Long.UZERO };
|
||||
|
||||
export const DelegatorStartingInfo = {
|
||||
encode(message: DelegatorStartingInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(8).uint64(message.previousPeriod);
|
||||
writer.uint32(18).string(message.stake);
|
||||
writer.uint32(24).uint64(message.height);
|
||||
if (!message.previousPeriod.isZero()) {
|
||||
writer.uint32(8).uint64(message.previousPeriod);
|
||||
}
|
||||
if (message.stake !== "") {
|
||||
writer.uint32(18).string(message.stake);
|
||||
}
|
||||
if (!message.height.isZero()) {
|
||||
writer.uint32(24).uint64(message.height);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -865,6 +893,15 @@ export const DelegatorStartingInfo = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: DelegatorStartingInfo): unknown {
|
||||
const obj: any = {};
|
||||
message.previousPeriod !== undefined &&
|
||||
(obj.previousPeriod = (message.previousPeriod || Long.UZERO).toString());
|
||||
message.stake !== undefined && (obj.stake = message.stake);
|
||||
message.height !== undefined && (obj.height = (message.height || Long.UZERO).toString());
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<DelegatorStartingInfo>): DelegatorStartingInfo {
|
||||
const message = { ...baseDelegatorStartingInfo } as DelegatorStartingInfo;
|
||||
if (object.previousPeriod !== undefined && object.previousPeriod !== null) {
|
||||
@ -884,22 +921,15 @@ export const DelegatorStartingInfo = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: DelegatorStartingInfo): unknown {
|
||||
const obj: any = {};
|
||||
message.previousPeriod !== undefined &&
|
||||
(obj.previousPeriod = (message.previousPeriod || Long.UZERO).toString());
|
||||
message.stake !== undefined && (obj.stake = message.stake);
|
||||
message.height !== undefined && (obj.height = (message.height || Long.UZERO).toString());
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseDelegationDelegatorReward: object = { validatorAddress: "" };
|
||||
|
||||
export const DelegationDelegatorReward = {
|
||||
encode(message: DelegationDelegatorReward, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.validatorAddress);
|
||||
if (message.validatorAddress !== "") {
|
||||
writer.uint32(10).string(message.validatorAddress);
|
||||
}
|
||||
for (const v of message.reward) {
|
||||
DecCoin.encode(v!, writer.uint32(18).fork()).ldelim();
|
||||
}
|
||||
@ -944,6 +974,17 @@ export const DelegationDelegatorReward = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: DelegationDelegatorReward): unknown {
|
||||
const obj: any = {};
|
||||
message.validatorAddress !== undefined && (obj.validatorAddress = message.validatorAddress);
|
||||
if (message.reward) {
|
||||
obj.reward = message.reward.map((e) => (e ? DecCoin.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.reward = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<DelegationDelegatorReward>): DelegationDelegatorReward {
|
||||
const message = { ...baseDelegationDelegatorReward } as DelegationDelegatorReward;
|
||||
message.reward = [];
|
||||
@ -959,17 +1000,6 @@ export const DelegationDelegatorReward = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: DelegationDelegatorReward): unknown {
|
||||
const obj: any = {};
|
||||
message.validatorAddress !== undefined && (obj.validatorAddress = message.validatorAddress);
|
||||
if (message.reward) {
|
||||
obj.reward = message.reward.map((e) => (e ? DecCoin.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.reward = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseCommunityPoolSpendProposalWithDeposit: object = {
|
||||
@ -985,11 +1015,21 @@ export const CommunityPoolSpendProposalWithDeposit = {
|
||||
message: CommunityPoolSpendProposalWithDeposit,
|
||||
writer: _m0.Writer = _m0.Writer.create(),
|
||||
): _m0.Writer {
|
||||
writer.uint32(10).string(message.title);
|
||||
writer.uint32(18).string(message.description);
|
||||
writer.uint32(26).string(message.recipient);
|
||||
writer.uint32(34).string(message.amount);
|
||||
writer.uint32(42).string(message.deposit);
|
||||
if (message.title !== "") {
|
||||
writer.uint32(10).string(message.title);
|
||||
}
|
||||
if (message.description !== "") {
|
||||
writer.uint32(18).string(message.description);
|
||||
}
|
||||
if (message.recipient !== "") {
|
||||
writer.uint32(26).string(message.recipient);
|
||||
}
|
||||
if (message.amount !== "") {
|
||||
writer.uint32(34).string(message.amount);
|
||||
}
|
||||
if (message.deposit !== "") {
|
||||
writer.uint32(42).string(message.deposit);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -1053,6 +1093,16 @@ export const CommunityPoolSpendProposalWithDeposit = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: CommunityPoolSpendProposalWithDeposit): unknown {
|
||||
const obj: any = {};
|
||||
message.title !== undefined && (obj.title = message.title);
|
||||
message.description !== undefined && (obj.description = message.description);
|
||||
message.recipient !== undefined && (obj.recipient = message.recipient);
|
||||
message.amount !== undefined && (obj.amount = message.amount);
|
||||
message.deposit !== undefined && (obj.deposit = message.deposit);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(
|
||||
object: DeepPartial<CommunityPoolSpendProposalWithDeposit>,
|
||||
): CommunityPoolSpendProposalWithDeposit {
|
||||
@ -1084,16 +1134,6 @@ export const CommunityPoolSpendProposalWithDeposit = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: CommunityPoolSpendProposalWithDeposit): unknown {
|
||||
const obj: any = {};
|
||||
message.title !== undefined && (obj.title = message.title);
|
||||
message.description !== undefined && (obj.description = message.description);
|
||||
message.recipient !== undefined && (obj.recipient = message.recipient);
|
||||
message.amount !== undefined && (obj.amount = message.amount);
|
||||
message.deposit !== undefined && (obj.deposit = message.deposit);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
type Builtin = Date | Function | Uint8Array | string | number | undefined | Long;
|
||||
|
||||
@ -201,22 +201,22 @@ export const QueryParamsRequest = {
|
||||
return message;
|
||||
},
|
||||
|
||||
fromPartial(_: DeepPartial<QueryParamsRequest>): QueryParamsRequest {
|
||||
const message = { ...baseQueryParamsRequest } as QueryParamsRequest;
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(_: QueryParamsRequest): unknown {
|
||||
const obj: any = {};
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(_: DeepPartial<QueryParamsRequest>): QueryParamsRequest {
|
||||
const message = { ...baseQueryParamsRequest } as QueryParamsRequest;
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
const baseQueryParamsResponse: object = {};
|
||||
|
||||
export const QueryParamsResponse = {
|
||||
encode(message: QueryParamsResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
if (message.params !== undefined && message.params !== undefined) {
|
||||
if (message.params !== undefined) {
|
||||
Params.encode(message.params, writer.uint32(10).fork()).ldelim();
|
||||
}
|
||||
return writer;
|
||||
@ -250,6 +250,12 @@ export const QueryParamsResponse = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryParamsResponse): unknown {
|
||||
const obj: any = {};
|
||||
message.params !== undefined && (obj.params = message.params ? Params.toJSON(message.params) : undefined);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<QueryParamsResponse>): QueryParamsResponse {
|
||||
const message = { ...baseQueryParamsResponse } as QueryParamsResponse;
|
||||
if (object.params !== undefined && object.params !== null) {
|
||||
@ -259,12 +265,6 @@ export const QueryParamsResponse = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryParamsResponse): unknown {
|
||||
const obj: any = {};
|
||||
message.params !== undefined && (obj.params = message.params ? Params.toJSON(message.params) : undefined);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseQueryValidatorOutstandingRewardsRequest: object = { validatorAddress: "" };
|
||||
@ -274,7 +274,9 @@ export const QueryValidatorOutstandingRewardsRequest = {
|
||||
message: QueryValidatorOutstandingRewardsRequest,
|
||||
writer: _m0.Writer = _m0.Writer.create(),
|
||||
): _m0.Writer {
|
||||
writer.uint32(10).string(message.validatorAddress);
|
||||
if (message.validatorAddress !== "") {
|
||||
writer.uint32(10).string(message.validatorAddress);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -310,6 +312,12 @@ export const QueryValidatorOutstandingRewardsRequest = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryValidatorOutstandingRewardsRequest): unknown {
|
||||
const obj: any = {};
|
||||
message.validatorAddress !== undefined && (obj.validatorAddress = message.validatorAddress);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(
|
||||
object: DeepPartial<QueryValidatorOutstandingRewardsRequest>,
|
||||
): QueryValidatorOutstandingRewardsRequest {
|
||||
@ -323,12 +331,6 @@ export const QueryValidatorOutstandingRewardsRequest = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryValidatorOutstandingRewardsRequest): unknown {
|
||||
const obj: any = {};
|
||||
message.validatorAddress !== undefined && (obj.validatorAddress = message.validatorAddress);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseQueryValidatorOutstandingRewardsResponse: object = {};
|
||||
@ -338,7 +340,7 @@ export const QueryValidatorOutstandingRewardsResponse = {
|
||||
message: QueryValidatorOutstandingRewardsResponse,
|
||||
writer: _m0.Writer = _m0.Writer.create(),
|
||||
): _m0.Writer {
|
||||
if (message.rewards !== undefined && message.rewards !== undefined) {
|
||||
if (message.rewards !== undefined) {
|
||||
ValidatorOutstandingRewards.encode(message.rewards, writer.uint32(10).fork()).ldelim();
|
||||
}
|
||||
return writer;
|
||||
@ -376,6 +378,13 @@ export const QueryValidatorOutstandingRewardsResponse = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryValidatorOutstandingRewardsResponse): unknown {
|
||||
const obj: any = {};
|
||||
message.rewards !== undefined &&
|
||||
(obj.rewards = message.rewards ? ValidatorOutstandingRewards.toJSON(message.rewards) : undefined);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(
|
||||
object: DeepPartial<QueryValidatorOutstandingRewardsResponse>,
|
||||
): QueryValidatorOutstandingRewardsResponse {
|
||||
@ -389,20 +398,15 @@ export const QueryValidatorOutstandingRewardsResponse = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryValidatorOutstandingRewardsResponse): unknown {
|
||||
const obj: any = {};
|
||||
message.rewards !== undefined &&
|
||||
(obj.rewards = message.rewards ? ValidatorOutstandingRewards.toJSON(message.rewards) : undefined);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseQueryValidatorCommissionRequest: object = { validatorAddress: "" };
|
||||
|
||||
export const QueryValidatorCommissionRequest = {
|
||||
encode(message: QueryValidatorCommissionRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.validatorAddress);
|
||||
if (message.validatorAddress !== "") {
|
||||
writer.uint32(10).string(message.validatorAddress);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -434,6 +438,12 @@ export const QueryValidatorCommissionRequest = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryValidatorCommissionRequest): unknown {
|
||||
const obj: any = {};
|
||||
message.validatorAddress !== undefined && (obj.validatorAddress = message.validatorAddress);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<QueryValidatorCommissionRequest>): QueryValidatorCommissionRequest {
|
||||
const message = { ...baseQueryValidatorCommissionRequest } as QueryValidatorCommissionRequest;
|
||||
if (object.validatorAddress !== undefined && object.validatorAddress !== null) {
|
||||
@ -443,19 +453,13 @@ export const QueryValidatorCommissionRequest = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryValidatorCommissionRequest): unknown {
|
||||
const obj: any = {};
|
||||
message.validatorAddress !== undefined && (obj.validatorAddress = message.validatorAddress);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseQueryValidatorCommissionResponse: object = {};
|
||||
|
||||
export const QueryValidatorCommissionResponse = {
|
||||
encode(message: QueryValidatorCommissionResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
if (message.commission !== undefined && message.commission !== undefined) {
|
||||
if (message.commission !== undefined) {
|
||||
ValidatorAccumulatedCommission.encode(message.commission, writer.uint32(10).fork()).ldelim();
|
||||
}
|
||||
return writer;
|
||||
@ -489,6 +493,15 @@ export const QueryValidatorCommissionResponse = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryValidatorCommissionResponse): unknown {
|
||||
const obj: any = {};
|
||||
message.commission !== undefined &&
|
||||
(obj.commission = message.commission
|
||||
? ValidatorAccumulatedCommission.toJSON(message.commission)
|
||||
: undefined);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<QueryValidatorCommissionResponse>): QueryValidatorCommissionResponse {
|
||||
const message = { ...baseQueryValidatorCommissionResponse } as QueryValidatorCommissionResponse;
|
||||
if (object.commission !== undefined && object.commission !== null) {
|
||||
@ -498,15 +511,6 @@ export const QueryValidatorCommissionResponse = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryValidatorCommissionResponse): unknown {
|
||||
const obj: any = {};
|
||||
message.commission !== undefined &&
|
||||
(obj.commission = message.commission
|
||||
? ValidatorAccumulatedCommission.toJSON(message.commission)
|
||||
: undefined);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseQueryValidatorSlashesRequest: object = {
|
||||
@ -517,10 +521,16 @@ const baseQueryValidatorSlashesRequest: object = {
|
||||
|
||||
export const QueryValidatorSlashesRequest = {
|
||||
encode(message: QueryValidatorSlashesRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.validatorAddress);
|
||||
writer.uint32(16).uint64(message.startingHeight);
|
||||
writer.uint32(24).uint64(message.endingHeight);
|
||||
if (message.pagination !== undefined && message.pagination !== undefined) {
|
||||
if (message.validatorAddress !== "") {
|
||||
writer.uint32(10).string(message.validatorAddress);
|
||||
}
|
||||
if (!message.startingHeight.isZero()) {
|
||||
writer.uint32(16).uint64(message.startingHeight);
|
||||
}
|
||||
if (!message.endingHeight.isZero()) {
|
||||
writer.uint32(24).uint64(message.endingHeight);
|
||||
}
|
||||
if (message.pagination !== undefined) {
|
||||
PageRequest.encode(message.pagination, writer.uint32(34).fork()).ldelim();
|
||||
}
|
||||
return writer;
|
||||
@ -578,6 +588,18 @@ export const QueryValidatorSlashesRequest = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryValidatorSlashesRequest): unknown {
|
||||
const obj: any = {};
|
||||
message.validatorAddress !== undefined && (obj.validatorAddress = message.validatorAddress);
|
||||
message.startingHeight !== undefined &&
|
||||
(obj.startingHeight = (message.startingHeight || Long.UZERO).toString());
|
||||
message.endingHeight !== undefined &&
|
||||
(obj.endingHeight = (message.endingHeight || Long.UZERO).toString());
|
||||
message.pagination !== undefined &&
|
||||
(obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<QueryValidatorSlashesRequest>): QueryValidatorSlashesRequest {
|
||||
const message = { ...baseQueryValidatorSlashesRequest } as QueryValidatorSlashesRequest;
|
||||
if (object.validatorAddress !== undefined && object.validatorAddress !== null) {
|
||||
@ -602,18 +624,6 @@ export const QueryValidatorSlashesRequest = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryValidatorSlashesRequest): unknown {
|
||||
const obj: any = {};
|
||||
message.validatorAddress !== undefined && (obj.validatorAddress = message.validatorAddress);
|
||||
message.startingHeight !== undefined &&
|
||||
(obj.startingHeight = (message.startingHeight || Long.UZERO).toString());
|
||||
message.endingHeight !== undefined &&
|
||||
(obj.endingHeight = (message.endingHeight || Long.UZERO).toString());
|
||||
message.pagination !== undefined &&
|
||||
(obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseQueryValidatorSlashesResponse: object = {};
|
||||
@ -623,7 +633,7 @@ export const QueryValidatorSlashesResponse = {
|
||||
for (const v of message.slashes) {
|
||||
ValidatorSlashEvent.encode(v!, writer.uint32(10).fork()).ldelim();
|
||||
}
|
||||
if (message.pagination !== undefined && message.pagination !== undefined) {
|
||||
if (message.pagination !== undefined) {
|
||||
PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
|
||||
}
|
||||
return writer;
|
||||
@ -667,6 +677,18 @@ export const QueryValidatorSlashesResponse = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryValidatorSlashesResponse): unknown {
|
||||
const obj: any = {};
|
||||
if (message.slashes) {
|
||||
obj.slashes = message.slashes.map((e) => (e ? ValidatorSlashEvent.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.slashes = [];
|
||||
}
|
||||
message.pagination !== undefined &&
|
||||
(obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<QueryValidatorSlashesResponse>): QueryValidatorSlashesResponse {
|
||||
const message = { ...baseQueryValidatorSlashesResponse } as QueryValidatorSlashesResponse;
|
||||
message.slashes = [];
|
||||
@ -682,26 +704,18 @@ export const QueryValidatorSlashesResponse = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryValidatorSlashesResponse): unknown {
|
||||
const obj: any = {};
|
||||
if (message.slashes) {
|
||||
obj.slashes = message.slashes.map((e) => (e ? ValidatorSlashEvent.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.slashes = [];
|
||||
}
|
||||
message.pagination !== undefined &&
|
||||
(obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseQueryDelegationRewardsRequest: object = { delegatorAddress: "", validatorAddress: "" };
|
||||
|
||||
export const QueryDelegationRewardsRequest = {
|
||||
encode(message: QueryDelegationRewardsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.delegatorAddress);
|
||||
writer.uint32(18).string(message.validatorAddress);
|
||||
if (message.delegatorAddress !== "") {
|
||||
writer.uint32(10).string(message.delegatorAddress);
|
||||
}
|
||||
if (message.validatorAddress !== "") {
|
||||
writer.uint32(18).string(message.validatorAddress);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -741,6 +755,13 @@ export const QueryDelegationRewardsRequest = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryDelegationRewardsRequest): unknown {
|
||||
const obj: any = {};
|
||||
message.delegatorAddress !== undefined && (obj.delegatorAddress = message.delegatorAddress);
|
||||
message.validatorAddress !== undefined && (obj.validatorAddress = message.validatorAddress);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<QueryDelegationRewardsRequest>): QueryDelegationRewardsRequest {
|
||||
const message = { ...baseQueryDelegationRewardsRequest } as QueryDelegationRewardsRequest;
|
||||
if (object.delegatorAddress !== undefined && object.delegatorAddress !== null) {
|
||||
@ -755,13 +776,6 @@ export const QueryDelegationRewardsRequest = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryDelegationRewardsRequest): unknown {
|
||||
const obj: any = {};
|
||||
message.delegatorAddress !== undefined && (obj.delegatorAddress = message.delegatorAddress);
|
||||
message.validatorAddress !== undefined && (obj.validatorAddress = message.validatorAddress);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseQueryDelegationRewardsResponse: object = {};
|
||||
@ -804,6 +818,16 @@ export const QueryDelegationRewardsResponse = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryDelegationRewardsResponse): unknown {
|
||||
const obj: any = {};
|
||||
if (message.rewards) {
|
||||
obj.rewards = message.rewards.map((e) => (e ? DecCoin.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.rewards = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<QueryDelegationRewardsResponse>): QueryDelegationRewardsResponse {
|
||||
const message = { ...baseQueryDelegationRewardsResponse } as QueryDelegationRewardsResponse;
|
||||
message.rewards = [];
|
||||
@ -814,23 +838,15 @@ export const QueryDelegationRewardsResponse = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryDelegationRewardsResponse): unknown {
|
||||
const obj: any = {};
|
||||
if (message.rewards) {
|
||||
obj.rewards = message.rewards.map((e) => (e ? DecCoin.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.rewards = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseQueryDelegationTotalRewardsRequest: object = { delegatorAddress: "" };
|
||||
|
||||
export const QueryDelegationTotalRewardsRequest = {
|
||||
encode(message: QueryDelegationTotalRewardsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.delegatorAddress);
|
||||
if (message.delegatorAddress !== "") {
|
||||
writer.uint32(10).string(message.delegatorAddress);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -862,6 +878,12 @@ export const QueryDelegationTotalRewardsRequest = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryDelegationTotalRewardsRequest): unknown {
|
||||
const obj: any = {};
|
||||
message.delegatorAddress !== undefined && (obj.delegatorAddress = message.delegatorAddress);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<QueryDelegationTotalRewardsRequest>): QueryDelegationTotalRewardsRequest {
|
||||
const message = { ...baseQueryDelegationTotalRewardsRequest } as QueryDelegationTotalRewardsRequest;
|
||||
if (object.delegatorAddress !== undefined && object.delegatorAddress !== null) {
|
||||
@ -871,12 +893,6 @@ export const QueryDelegationTotalRewardsRequest = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryDelegationTotalRewardsRequest): unknown {
|
||||
const obj: any = {};
|
||||
message.delegatorAddress !== undefined && (obj.delegatorAddress = message.delegatorAddress);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseQueryDelegationTotalRewardsResponse: object = {};
|
||||
@ -932,6 +948,21 @@ export const QueryDelegationTotalRewardsResponse = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryDelegationTotalRewardsResponse): unknown {
|
||||
const obj: any = {};
|
||||
if (message.rewards) {
|
||||
obj.rewards = message.rewards.map((e) => (e ? DelegationDelegatorReward.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.rewards = [];
|
||||
}
|
||||
if (message.total) {
|
||||
obj.total = message.total.map((e) => (e ? DecCoin.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.total = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<QueryDelegationTotalRewardsResponse>): QueryDelegationTotalRewardsResponse {
|
||||
const message = { ...baseQueryDelegationTotalRewardsResponse } as QueryDelegationTotalRewardsResponse;
|
||||
message.rewards = [];
|
||||
@ -948,28 +979,15 @@ export const QueryDelegationTotalRewardsResponse = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryDelegationTotalRewardsResponse): unknown {
|
||||
const obj: any = {};
|
||||
if (message.rewards) {
|
||||
obj.rewards = message.rewards.map((e) => (e ? DelegationDelegatorReward.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.rewards = [];
|
||||
}
|
||||
if (message.total) {
|
||||
obj.total = message.total.map((e) => (e ? DecCoin.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.total = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseQueryDelegatorValidatorsRequest: object = { delegatorAddress: "" };
|
||||
|
||||
export const QueryDelegatorValidatorsRequest = {
|
||||
encode(message: QueryDelegatorValidatorsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.delegatorAddress);
|
||||
if (message.delegatorAddress !== "") {
|
||||
writer.uint32(10).string(message.delegatorAddress);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -1001,6 +1019,12 @@ export const QueryDelegatorValidatorsRequest = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryDelegatorValidatorsRequest): unknown {
|
||||
const obj: any = {};
|
||||
message.delegatorAddress !== undefined && (obj.delegatorAddress = message.delegatorAddress);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<QueryDelegatorValidatorsRequest>): QueryDelegatorValidatorsRequest {
|
||||
const message = { ...baseQueryDelegatorValidatorsRequest } as QueryDelegatorValidatorsRequest;
|
||||
if (object.delegatorAddress !== undefined && object.delegatorAddress !== null) {
|
||||
@ -1010,12 +1034,6 @@ export const QueryDelegatorValidatorsRequest = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryDelegatorValidatorsRequest): unknown {
|
||||
const obj: any = {};
|
||||
message.delegatorAddress !== undefined && (obj.delegatorAddress = message.delegatorAddress);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseQueryDelegatorValidatorsResponse: object = { validators: "" };
|
||||
@ -1058,6 +1076,16 @@ export const QueryDelegatorValidatorsResponse = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryDelegatorValidatorsResponse): unknown {
|
||||
const obj: any = {};
|
||||
if (message.validators) {
|
||||
obj.validators = message.validators.map((e) => e);
|
||||
} else {
|
||||
obj.validators = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<QueryDelegatorValidatorsResponse>): QueryDelegatorValidatorsResponse {
|
||||
const message = { ...baseQueryDelegatorValidatorsResponse } as QueryDelegatorValidatorsResponse;
|
||||
message.validators = [];
|
||||
@ -1068,16 +1096,6 @@ export const QueryDelegatorValidatorsResponse = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryDelegatorValidatorsResponse): unknown {
|
||||
const obj: any = {};
|
||||
if (message.validators) {
|
||||
obj.validators = message.validators.map((e) => e);
|
||||
} else {
|
||||
obj.validators = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseQueryDelegatorWithdrawAddressRequest: object = { delegatorAddress: "" };
|
||||
@ -1087,7 +1105,9 @@ export const QueryDelegatorWithdrawAddressRequest = {
|
||||
message: QueryDelegatorWithdrawAddressRequest,
|
||||
writer: _m0.Writer = _m0.Writer.create(),
|
||||
): _m0.Writer {
|
||||
writer.uint32(10).string(message.delegatorAddress);
|
||||
if (message.delegatorAddress !== "") {
|
||||
writer.uint32(10).string(message.delegatorAddress);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -1119,6 +1139,12 @@ export const QueryDelegatorWithdrawAddressRequest = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryDelegatorWithdrawAddressRequest): unknown {
|
||||
const obj: any = {};
|
||||
message.delegatorAddress !== undefined && (obj.delegatorAddress = message.delegatorAddress);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(
|
||||
object: DeepPartial<QueryDelegatorWithdrawAddressRequest>,
|
||||
): QueryDelegatorWithdrawAddressRequest {
|
||||
@ -1130,12 +1156,6 @@ export const QueryDelegatorWithdrawAddressRequest = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryDelegatorWithdrawAddressRequest): unknown {
|
||||
const obj: any = {};
|
||||
message.delegatorAddress !== undefined && (obj.delegatorAddress = message.delegatorAddress);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseQueryDelegatorWithdrawAddressResponse: object = { withdrawAddress: "" };
|
||||
@ -1145,7 +1165,9 @@ export const QueryDelegatorWithdrawAddressResponse = {
|
||||
message: QueryDelegatorWithdrawAddressResponse,
|
||||
writer: _m0.Writer = _m0.Writer.create(),
|
||||
): _m0.Writer {
|
||||
writer.uint32(10).string(message.withdrawAddress);
|
||||
if (message.withdrawAddress !== "") {
|
||||
writer.uint32(10).string(message.withdrawAddress);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -1177,6 +1199,12 @@ export const QueryDelegatorWithdrawAddressResponse = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryDelegatorWithdrawAddressResponse): unknown {
|
||||
const obj: any = {};
|
||||
message.withdrawAddress !== undefined && (obj.withdrawAddress = message.withdrawAddress);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(
|
||||
object: DeepPartial<QueryDelegatorWithdrawAddressResponse>,
|
||||
): QueryDelegatorWithdrawAddressResponse {
|
||||
@ -1188,12 +1216,6 @@ export const QueryDelegatorWithdrawAddressResponse = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryDelegatorWithdrawAddressResponse): unknown {
|
||||
const obj: any = {};
|
||||
message.withdrawAddress !== undefined && (obj.withdrawAddress = message.withdrawAddress);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseQueryCommunityPoolRequest: object = {};
|
||||
@ -1223,15 +1245,15 @@ export const QueryCommunityPoolRequest = {
|
||||
return message;
|
||||
},
|
||||
|
||||
fromPartial(_: DeepPartial<QueryCommunityPoolRequest>): QueryCommunityPoolRequest {
|
||||
const message = { ...baseQueryCommunityPoolRequest } as QueryCommunityPoolRequest;
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(_: QueryCommunityPoolRequest): unknown {
|
||||
const obj: any = {};
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(_: DeepPartial<QueryCommunityPoolRequest>): QueryCommunityPoolRequest {
|
||||
const message = { ...baseQueryCommunityPoolRequest } as QueryCommunityPoolRequest;
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
const baseQueryCommunityPoolResponse: object = {};
|
||||
@ -1274,6 +1296,16 @@ export const QueryCommunityPoolResponse = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryCommunityPoolResponse): unknown {
|
||||
const obj: any = {};
|
||||
if (message.pool) {
|
||||
obj.pool = message.pool.map((e) => (e ? DecCoin.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.pool = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<QueryCommunityPoolResponse>): QueryCommunityPoolResponse {
|
||||
const message = { ...baseQueryCommunityPoolResponse } as QueryCommunityPoolResponse;
|
||||
message.pool = [];
|
||||
@ -1284,16 +1316,6 @@ export const QueryCommunityPoolResponse = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryCommunityPoolResponse): unknown {
|
||||
const obj: any = {};
|
||||
if (message.pool) {
|
||||
obj.pool = message.pool.map((e) => (e ? DecCoin.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.pool = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
/** Query defines the gRPC querier service for distribution module. */
|
||||
|
||||
@ -56,8 +56,12 @@ const baseMsgSetWithdrawAddress: object = { delegatorAddress: "", withdrawAddres
|
||||
|
||||
export const MsgSetWithdrawAddress = {
|
||||
encode(message: MsgSetWithdrawAddress, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.delegatorAddress);
|
||||
writer.uint32(18).string(message.withdrawAddress);
|
||||
if (message.delegatorAddress !== "") {
|
||||
writer.uint32(10).string(message.delegatorAddress);
|
||||
}
|
||||
if (message.withdrawAddress !== "") {
|
||||
writer.uint32(18).string(message.withdrawAddress);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -97,6 +101,13 @@ export const MsgSetWithdrawAddress = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: MsgSetWithdrawAddress): unknown {
|
||||
const obj: any = {};
|
||||
message.delegatorAddress !== undefined && (obj.delegatorAddress = message.delegatorAddress);
|
||||
message.withdrawAddress !== undefined && (obj.withdrawAddress = message.withdrawAddress);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<MsgSetWithdrawAddress>): MsgSetWithdrawAddress {
|
||||
const message = { ...baseMsgSetWithdrawAddress } as MsgSetWithdrawAddress;
|
||||
if (object.delegatorAddress !== undefined && object.delegatorAddress !== null) {
|
||||
@ -111,13 +122,6 @@ export const MsgSetWithdrawAddress = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: MsgSetWithdrawAddress): unknown {
|
||||
const obj: any = {};
|
||||
message.delegatorAddress !== undefined && (obj.delegatorAddress = message.delegatorAddress);
|
||||
message.withdrawAddress !== undefined && (obj.withdrawAddress = message.withdrawAddress);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseMsgSetWithdrawAddressResponse: object = {};
|
||||
@ -147,23 +151,27 @@ export const MsgSetWithdrawAddressResponse = {
|
||||
return message;
|
||||
},
|
||||
|
||||
fromPartial(_: DeepPartial<MsgSetWithdrawAddressResponse>): MsgSetWithdrawAddressResponse {
|
||||
const message = { ...baseMsgSetWithdrawAddressResponse } as MsgSetWithdrawAddressResponse;
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(_: MsgSetWithdrawAddressResponse): unknown {
|
||||
const obj: any = {};
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(_: DeepPartial<MsgSetWithdrawAddressResponse>): MsgSetWithdrawAddressResponse {
|
||||
const message = { ...baseMsgSetWithdrawAddressResponse } as MsgSetWithdrawAddressResponse;
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
const baseMsgWithdrawDelegatorReward: object = { delegatorAddress: "", validatorAddress: "" };
|
||||
|
||||
export const MsgWithdrawDelegatorReward = {
|
||||
encode(message: MsgWithdrawDelegatorReward, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.delegatorAddress);
|
||||
writer.uint32(18).string(message.validatorAddress);
|
||||
if (message.delegatorAddress !== "") {
|
||||
writer.uint32(10).string(message.delegatorAddress);
|
||||
}
|
||||
if (message.validatorAddress !== "") {
|
||||
writer.uint32(18).string(message.validatorAddress);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -203,6 +211,13 @@ export const MsgWithdrawDelegatorReward = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: MsgWithdrawDelegatorReward): unknown {
|
||||
const obj: any = {};
|
||||
message.delegatorAddress !== undefined && (obj.delegatorAddress = message.delegatorAddress);
|
||||
message.validatorAddress !== undefined && (obj.validatorAddress = message.validatorAddress);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<MsgWithdrawDelegatorReward>): MsgWithdrawDelegatorReward {
|
||||
const message = { ...baseMsgWithdrawDelegatorReward } as MsgWithdrawDelegatorReward;
|
||||
if (object.delegatorAddress !== undefined && object.delegatorAddress !== null) {
|
||||
@ -217,13 +232,6 @@ export const MsgWithdrawDelegatorReward = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: MsgWithdrawDelegatorReward): unknown {
|
||||
const obj: any = {};
|
||||
message.delegatorAddress !== undefined && (obj.delegatorAddress = message.delegatorAddress);
|
||||
message.validatorAddress !== undefined && (obj.validatorAddress = message.validatorAddress);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseMsgWithdrawDelegatorRewardResponse: object = {};
|
||||
@ -253,22 +261,24 @@ export const MsgWithdrawDelegatorRewardResponse = {
|
||||
return message;
|
||||
},
|
||||
|
||||
fromPartial(_: DeepPartial<MsgWithdrawDelegatorRewardResponse>): MsgWithdrawDelegatorRewardResponse {
|
||||
const message = { ...baseMsgWithdrawDelegatorRewardResponse } as MsgWithdrawDelegatorRewardResponse;
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(_: MsgWithdrawDelegatorRewardResponse): unknown {
|
||||
const obj: any = {};
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(_: DeepPartial<MsgWithdrawDelegatorRewardResponse>): MsgWithdrawDelegatorRewardResponse {
|
||||
const message = { ...baseMsgWithdrawDelegatorRewardResponse } as MsgWithdrawDelegatorRewardResponse;
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
const baseMsgWithdrawValidatorCommission: object = { validatorAddress: "" };
|
||||
|
||||
export const MsgWithdrawValidatorCommission = {
|
||||
encode(message: MsgWithdrawValidatorCommission, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.validatorAddress);
|
||||
if (message.validatorAddress !== "") {
|
||||
writer.uint32(10).string(message.validatorAddress);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -300,6 +310,12 @@ export const MsgWithdrawValidatorCommission = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: MsgWithdrawValidatorCommission): unknown {
|
||||
const obj: any = {};
|
||||
message.validatorAddress !== undefined && (obj.validatorAddress = message.validatorAddress);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<MsgWithdrawValidatorCommission>): MsgWithdrawValidatorCommission {
|
||||
const message = { ...baseMsgWithdrawValidatorCommission } as MsgWithdrawValidatorCommission;
|
||||
if (object.validatorAddress !== undefined && object.validatorAddress !== null) {
|
||||
@ -309,12 +325,6 @@ export const MsgWithdrawValidatorCommission = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: MsgWithdrawValidatorCommission): unknown {
|
||||
const obj: any = {};
|
||||
message.validatorAddress !== undefined && (obj.validatorAddress = message.validatorAddress);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseMsgWithdrawValidatorCommissionResponse: object = {};
|
||||
@ -348,6 +358,11 @@ export const MsgWithdrawValidatorCommissionResponse = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(_: MsgWithdrawValidatorCommissionResponse): unknown {
|
||||
const obj: any = {};
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(
|
||||
_: DeepPartial<MsgWithdrawValidatorCommissionResponse>,
|
||||
): MsgWithdrawValidatorCommissionResponse {
|
||||
@ -356,11 +371,6 @@ export const MsgWithdrawValidatorCommissionResponse = {
|
||||
} as MsgWithdrawValidatorCommissionResponse;
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(_: MsgWithdrawValidatorCommissionResponse): unknown {
|
||||
const obj: any = {};
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseMsgFundCommunityPool: object = { depositor: "" };
|
||||
@ -370,7 +380,9 @@ export const MsgFundCommunityPool = {
|
||||
for (const v of message.amount) {
|
||||
Coin.encode(v!, writer.uint32(10).fork()).ldelim();
|
||||
}
|
||||
writer.uint32(18).string(message.depositor);
|
||||
if (message.depositor !== "") {
|
||||
writer.uint32(18).string(message.depositor);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -412,6 +424,17 @@ export const MsgFundCommunityPool = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: MsgFundCommunityPool): unknown {
|
||||
const obj: any = {};
|
||||
if (message.amount) {
|
||||
obj.amount = message.amount.map((e) => (e ? Coin.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.amount = [];
|
||||
}
|
||||
message.depositor !== undefined && (obj.depositor = message.depositor);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<MsgFundCommunityPool>): MsgFundCommunityPool {
|
||||
const message = { ...baseMsgFundCommunityPool } as MsgFundCommunityPool;
|
||||
message.amount = [];
|
||||
@ -427,17 +450,6 @@ export const MsgFundCommunityPool = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: MsgFundCommunityPool): unknown {
|
||||
const obj: any = {};
|
||||
if (message.amount) {
|
||||
obj.amount = message.amount.map((e) => (e ? Coin.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.amount = [];
|
||||
}
|
||||
message.depositor !== undefined && (obj.depositor = message.depositor);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseMsgFundCommunityPoolResponse: object = {};
|
||||
@ -467,15 +479,15 @@ export const MsgFundCommunityPoolResponse = {
|
||||
return message;
|
||||
},
|
||||
|
||||
fromPartial(_: DeepPartial<MsgFundCommunityPoolResponse>): MsgFundCommunityPoolResponse {
|
||||
const message = { ...baseMsgFundCommunityPoolResponse } as MsgFundCommunityPoolResponse;
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(_: MsgFundCommunityPoolResponse): unknown {
|
||||
const obj: any = {};
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(_: DeepPartial<MsgFundCommunityPoolResponse>): MsgFundCommunityPoolResponse {
|
||||
const message = { ...baseMsgFundCommunityPoolResponse } as MsgFundCommunityPoolResponse;
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
/** Msg defines the distribution Msg service. */
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -256,7 +256,7 @@ const baseHistoricalInfo: object = {};
|
||||
|
||||
export const HistoricalInfo = {
|
||||
encode(message: HistoricalInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
if (message.header !== undefined && message.header !== undefined) {
|
||||
if (message.header !== undefined) {
|
||||
Header.encode(message.header, writer.uint32(10).fork()).ldelim();
|
||||
}
|
||||
for (const v of message.valset) {
|
||||
@ -303,6 +303,17 @@ export const HistoricalInfo = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: HistoricalInfo): unknown {
|
||||
const obj: any = {};
|
||||
message.header !== undefined && (obj.header = message.header ? Header.toJSON(message.header) : undefined);
|
||||
if (message.valset) {
|
||||
obj.valset = message.valset.map((e) => (e ? Validator.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.valset = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<HistoricalInfo>): HistoricalInfo {
|
||||
const message = { ...baseHistoricalInfo } as HistoricalInfo;
|
||||
message.valset = [];
|
||||
@ -318,26 +329,21 @@ export const HistoricalInfo = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: HistoricalInfo): unknown {
|
||||
const obj: any = {};
|
||||
message.header !== undefined && (obj.header = message.header ? Header.toJSON(message.header) : undefined);
|
||||
if (message.valset) {
|
||||
obj.valset = message.valset.map((e) => (e ? Validator.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.valset = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseCommissionRates: object = { rate: "", maxRate: "", maxChangeRate: "" };
|
||||
|
||||
export const CommissionRates = {
|
||||
encode(message: CommissionRates, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.rate);
|
||||
writer.uint32(18).string(message.maxRate);
|
||||
writer.uint32(26).string(message.maxChangeRate);
|
||||
if (message.rate !== "") {
|
||||
writer.uint32(10).string(message.rate);
|
||||
}
|
||||
if (message.maxRate !== "") {
|
||||
writer.uint32(18).string(message.maxRate);
|
||||
}
|
||||
if (message.maxChangeRate !== "") {
|
||||
writer.uint32(26).string(message.maxChangeRate);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -385,6 +391,14 @@ export const CommissionRates = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: CommissionRates): unknown {
|
||||
const obj: any = {};
|
||||
message.rate !== undefined && (obj.rate = message.rate);
|
||||
message.maxRate !== undefined && (obj.maxRate = message.maxRate);
|
||||
message.maxChangeRate !== undefined && (obj.maxChangeRate = message.maxChangeRate);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<CommissionRates>): CommissionRates {
|
||||
const message = { ...baseCommissionRates } as CommissionRates;
|
||||
if (object.rate !== undefined && object.rate !== null) {
|
||||
@ -404,24 +418,16 @@ export const CommissionRates = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: CommissionRates): unknown {
|
||||
const obj: any = {};
|
||||
message.rate !== undefined && (obj.rate = message.rate);
|
||||
message.maxRate !== undefined && (obj.maxRate = message.maxRate);
|
||||
message.maxChangeRate !== undefined && (obj.maxChangeRate = message.maxChangeRate);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseCommission: object = {};
|
||||
|
||||
export const Commission = {
|
||||
encode(message: Commission, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
if (message.commissionRates !== undefined && message.commissionRates !== undefined) {
|
||||
if (message.commissionRates !== undefined) {
|
||||
CommissionRates.encode(message.commissionRates, writer.uint32(10).fork()).ldelim();
|
||||
}
|
||||
if (message.updateTime !== undefined && message.updateTime !== undefined) {
|
||||
if (message.updateTime !== undefined) {
|
||||
Timestamp.encode(toTimestamp(message.updateTime), writer.uint32(18).fork()).ldelim();
|
||||
}
|
||||
return writer;
|
||||
@ -463,6 +469,17 @@ export const Commission = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Commission): unknown {
|
||||
const obj: any = {};
|
||||
message.commissionRates !== undefined &&
|
||||
(obj.commissionRates = message.commissionRates
|
||||
? CommissionRates.toJSON(message.commissionRates)
|
||||
: undefined);
|
||||
message.updateTime !== undefined &&
|
||||
(obj.updateTime = message.updateTime !== undefined ? message.updateTime.toISOString() : null);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<Commission>): Commission {
|
||||
const message = { ...baseCommission } as Commission;
|
||||
if (object.commissionRates !== undefined && object.commissionRates !== null) {
|
||||
@ -477,28 +494,27 @@ export const Commission = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Commission): unknown {
|
||||
const obj: any = {};
|
||||
message.commissionRates !== undefined &&
|
||||
(obj.commissionRates = message.commissionRates
|
||||
? CommissionRates.toJSON(message.commissionRates)
|
||||
: undefined);
|
||||
message.updateTime !== undefined &&
|
||||
(obj.updateTime = message.updateTime !== undefined ? message.updateTime.toISOString() : null);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseDescription: object = { moniker: "", identity: "", website: "", securityContact: "", details: "" };
|
||||
|
||||
export const Description = {
|
||||
encode(message: Description, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.moniker);
|
||||
writer.uint32(18).string(message.identity);
|
||||
writer.uint32(26).string(message.website);
|
||||
writer.uint32(34).string(message.securityContact);
|
||||
writer.uint32(42).string(message.details);
|
||||
if (message.moniker !== "") {
|
||||
writer.uint32(10).string(message.moniker);
|
||||
}
|
||||
if (message.identity !== "") {
|
||||
writer.uint32(18).string(message.identity);
|
||||
}
|
||||
if (message.website !== "") {
|
||||
writer.uint32(26).string(message.website);
|
||||
}
|
||||
if (message.securityContact !== "") {
|
||||
writer.uint32(34).string(message.securityContact);
|
||||
}
|
||||
if (message.details !== "") {
|
||||
writer.uint32(42).string(message.details);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -562,6 +578,16 @@ export const Description = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Description): unknown {
|
||||
const obj: any = {};
|
||||
message.moniker !== undefined && (obj.moniker = message.moniker);
|
||||
message.identity !== undefined && (obj.identity = message.identity);
|
||||
message.website !== undefined && (obj.website = message.website);
|
||||
message.securityContact !== undefined && (obj.securityContact = message.securityContact);
|
||||
message.details !== undefined && (obj.details = message.details);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<Description>): Description {
|
||||
const message = { ...baseDescription } as Description;
|
||||
if (object.moniker !== undefined && object.moniker !== null) {
|
||||
@ -591,16 +617,6 @@ export const Description = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Description): unknown {
|
||||
const obj: any = {};
|
||||
message.moniker !== undefined && (obj.moniker = message.moniker);
|
||||
message.identity !== undefined && (obj.identity = message.identity);
|
||||
message.website !== undefined && (obj.website = message.website);
|
||||
message.securityContact !== undefined && (obj.securityContact = message.securityContact);
|
||||
message.details !== undefined && (obj.details = message.details);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseValidator: object = {
|
||||
@ -615,25 +631,39 @@ const baseValidator: object = {
|
||||
|
||||
export const Validator = {
|
||||
encode(message: Validator, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.operatorAddress);
|
||||
if (message.consensusPubkey !== undefined && message.consensusPubkey !== undefined) {
|
||||
if (message.operatorAddress !== "") {
|
||||
writer.uint32(10).string(message.operatorAddress);
|
||||
}
|
||||
if (message.consensusPubkey !== undefined) {
|
||||
Any.encode(message.consensusPubkey, writer.uint32(18).fork()).ldelim();
|
||||
}
|
||||
writer.uint32(24).bool(message.jailed);
|
||||
writer.uint32(32).int32(message.status);
|
||||
writer.uint32(42).string(message.tokens);
|
||||
writer.uint32(50).string(message.delegatorShares);
|
||||
if (message.description !== undefined && message.description !== undefined) {
|
||||
if (message.jailed === true) {
|
||||
writer.uint32(24).bool(message.jailed);
|
||||
}
|
||||
if (message.status !== 0) {
|
||||
writer.uint32(32).int32(message.status);
|
||||
}
|
||||
if (message.tokens !== "") {
|
||||
writer.uint32(42).string(message.tokens);
|
||||
}
|
||||
if (message.delegatorShares !== "") {
|
||||
writer.uint32(50).string(message.delegatorShares);
|
||||
}
|
||||
if (message.description !== undefined) {
|
||||
Description.encode(message.description, writer.uint32(58).fork()).ldelim();
|
||||
}
|
||||
writer.uint32(64).int64(message.unbondingHeight);
|
||||
if (message.unbondingTime !== undefined && message.unbondingTime !== undefined) {
|
||||
if (!message.unbondingHeight.isZero()) {
|
||||
writer.uint32(64).int64(message.unbondingHeight);
|
||||
}
|
||||
if (message.unbondingTime !== undefined) {
|
||||
Timestamp.encode(toTimestamp(message.unbondingTime), writer.uint32(74).fork()).ldelim();
|
||||
}
|
||||
if (message.commission !== undefined && message.commission !== undefined) {
|
||||
if (message.commission !== undefined) {
|
||||
Commission.encode(message.commission, writer.uint32(82).fork()).ldelim();
|
||||
}
|
||||
writer.uint32(90).string(message.minSelfDelegation);
|
||||
if (message.minSelfDelegation !== "") {
|
||||
writer.uint32(90).string(message.minSelfDelegation);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -745,6 +775,27 @@ export const Validator = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Validator): unknown {
|
||||
const obj: any = {};
|
||||
message.operatorAddress !== undefined && (obj.operatorAddress = message.operatorAddress);
|
||||
message.consensusPubkey !== undefined &&
|
||||
(obj.consensusPubkey = message.consensusPubkey ? Any.toJSON(message.consensusPubkey) : undefined);
|
||||
message.jailed !== undefined && (obj.jailed = message.jailed);
|
||||
message.status !== undefined && (obj.status = bondStatusToJSON(message.status));
|
||||
message.tokens !== undefined && (obj.tokens = message.tokens);
|
||||
message.delegatorShares !== undefined && (obj.delegatorShares = message.delegatorShares);
|
||||
message.description !== undefined &&
|
||||
(obj.description = message.description ? Description.toJSON(message.description) : undefined);
|
||||
message.unbondingHeight !== undefined &&
|
||||
(obj.unbondingHeight = (message.unbondingHeight || Long.ZERO).toString());
|
||||
message.unbondingTime !== undefined &&
|
||||
(obj.unbondingTime = message.unbondingTime !== undefined ? message.unbondingTime.toISOString() : null);
|
||||
message.commission !== undefined &&
|
||||
(obj.commission = message.commission ? Commission.toJSON(message.commission) : undefined);
|
||||
message.minSelfDelegation !== undefined && (obj.minSelfDelegation = message.minSelfDelegation);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<Validator>): Validator {
|
||||
const message = { ...baseValidator } as Validator;
|
||||
if (object.operatorAddress !== undefined && object.operatorAddress !== null) {
|
||||
@ -804,27 +855,6 @@ export const Validator = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Validator): unknown {
|
||||
const obj: any = {};
|
||||
message.operatorAddress !== undefined && (obj.operatorAddress = message.operatorAddress);
|
||||
message.consensusPubkey !== undefined &&
|
||||
(obj.consensusPubkey = message.consensusPubkey ? Any.toJSON(message.consensusPubkey) : undefined);
|
||||
message.jailed !== undefined && (obj.jailed = message.jailed);
|
||||
message.status !== undefined && (obj.status = bondStatusToJSON(message.status));
|
||||
message.tokens !== undefined && (obj.tokens = message.tokens);
|
||||
message.delegatorShares !== undefined && (obj.delegatorShares = message.delegatorShares);
|
||||
message.description !== undefined &&
|
||||
(obj.description = message.description ? Description.toJSON(message.description) : undefined);
|
||||
message.unbondingHeight !== undefined &&
|
||||
(obj.unbondingHeight = (message.unbondingHeight || Long.ZERO).toString());
|
||||
message.unbondingTime !== undefined &&
|
||||
(obj.unbondingTime = message.unbondingTime !== undefined ? message.unbondingTime.toISOString() : null);
|
||||
message.commission !== undefined &&
|
||||
(obj.commission = message.commission ? Commission.toJSON(message.commission) : undefined);
|
||||
message.minSelfDelegation !== undefined && (obj.minSelfDelegation = message.minSelfDelegation);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseValAddresses: object = { addresses: "" };
|
||||
@ -867,6 +897,16 @@ export const ValAddresses = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: ValAddresses): unknown {
|
||||
const obj: any = {};
|
||||
if (message.addresses) {
|
||||
obj.addresses = message.addresses.map((e) => e);
|
||||
} else {
|
||||
obj.addresses = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<ValAddresses>): ValAddresses {
|
||||
const message = { ...baseValAddresses } as ValAddresses;
|
||||
message.addresses = [];
|
||||
@ -877,24 +917,18 @@ export const ValAddresses = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: ValAddresses): unknown {
|
||||
const obj: any = {};
|
||||
if (message.addresses) {
|
||||
obj.addresses = message.addresses.map((e) => e);
|
||||
} else {
|
||||
obj.addresses = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseDVPair: object = { delegatorAddress: "", validatorAddress: "" };
|
||||
|
||||
export const DVPair = {
|
||||
encode(message: DVPair, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.delegatorAddress);
|
||||
writer.uint32(18).string(message.validatorAddress);
|
||||
if (message.delegatorAddress !== "") {
|
||||
writer.uint32(10).string(message.delegatorAddress);
|
||||
}
|
||||
if (message.validatorAddress !== "") {
|
||||
writer.uint32(18).string(message.validatorAddress);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -934,6 +968,13 @@ export const DVPair = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: DVPair): unknown {
|
||||
const obj: any = {};
|
||||
message.delegatorAddress !== undefined && (obj.delegatorAddress = message.delegatorAddress);
|
||||
message.validatorAddress !== undefined && (obj.validatorAddress = message.validatorAddress);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<DVPair>): DVPair {
|
||||
const message = { ...baseDVPair } as DVPair;
|
||||
if (object.delegatorAddress !== undefined && object.delegatorAddress !== null) {
|
||||
@ -948,13 +989,6 @@ export const DVPair = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: DVPair): unknown {
|
||||
const obj: any = {};
|
||||
message.delegatorAddress !== undefined && (obj.delegatorAddress = message.delegatorAddress);
|
||||
message.validatorAddress !== undefined && (obj.validatorAddress = message.validatorAddress);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseDVPairs: object = {};
|
||||
@ -997,6 +1031,16 @@ export const DVPairs = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: DVPairs): unknown {
|
||||
const obj: any = {};
|
||||
if (message.pairs) {
|
||||
obj.pairs = message.pairs.map((e) => (e ? DVPair.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.pairs = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<DVPairs>): DVPairs {
|
||||
const message = { ...baseDVPairs } as DVPairs;
|
||||
message.pairs = [];
|
||||
@ -1007,25 +1051,21 @@ export const DVPairs = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: DVPairs): unknown {
|
||||
const obj: any = {};
|
||||
if (message.pairs) {
|
||||
obj.pairs = message.pairs.map((e) => (e ? DVPair.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.pairs = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseDVVTriplet: object = { delegatorAddress: "", validatorSrcAddress: "", validatorDstAddress: "" };
|
||||
|
||||
export const DVVTriplet = {
|
||||
encode(message: DVVTriplet, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.delegatorAddress);
|
||||
writer.uint32(18).string(message.validatorSrcAddress);
|
||||
writer.uint32(26).string(message.validatorDstAddress);
|
||||
if (message.delegatorAddress !== "") {
|
||||
writer.uint32(10).string(message.delegatorAddress);
|
||||
}
|
||||
if (message.validatorSrcAddress !== "") {
|
||||
writer.uint32(18).string(message.validatorSrcAddress);
|
||||
}
|
||||
if (message.validatorDstAddress !== "") {
|
||||
writer.uint32(26).string(message.validatorDstAddress);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -1073,6 +1113,14 @@ export const DVVTriplet = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: DVVTriplet): unknown {
|
||||
const obj: any = {};
|
||||
message.delegatorAddress !== undefined && (obj.delegatorAddress = message.delegatorAddress);
|
||||
message.validatorSrcAddress !== undefined && (obj.validatorSrcAddress = message.validatorSrcAddress);
|
||||
message.validatorDstAddress !== undefined && (obj.validatorDstAddress = message.validatorDstAddress);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<DVVTriplet>): DVVTriplet {
|
||||
const message = { ...baseDVVTriplet } as DVVTriplet;
|
||||
if (object.delegatorAddress !== undefined && object.delegatorAddress !== null) {
|
||||
@ -1092,14 +1140,6 @@ export const DVVTriplet = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: DVVTriplet): unknown {
|
||||
const obj: any = {};
|
||||
message.delegatorAddress !== undefined && (obj.delegatorAddress = message.delegatorAddress);
|
||||
message.validatorSrcAddress !== undefined && (obj.validatorSrcAddress = message.validatorSrcAddress);
|
||||
message.validatorDstAddress !== undefined && (obj.validatorDstAddress = message.validatorDstAddress);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseDVVTriplets: object = {};
|
||||
@ -1142,6 +1182,16 @@ export const DVVTriplets = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: DVVTriplets): unknown {
|
||||
const obj: any = {};
|
||||
if (message.triplets) {
|
||||
obj.triplets = message.triplets.map((e) => (e ? DVVTriplet.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.triplets = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<DVVTriplets>): DVVTriplets {
|
||||
const message = { ...baseDVVTriplets } as DVVTriplets;
|
||||
message.triplets = [];
|
||||
@ -1152,25 +1202,21 @@ export const DVVTriplets = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: DVVTriplets): unknown {
|
||||
const obj: any = {};
|
||||
if (message.triplets) {
|
||||
obj.triplets = message.triplets.map((e) => (e ? DVVTriplet.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.triplets = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseDelegation: object = { delegatorAddress: "", validatorAddress: "", shares: "" };
|
||||
|
||||
export const Delegation = {
|
||||
encode(message: Delegation, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.delegatorAddress);
|
||||
writer.uint32(18).string(message.validatorAddress);
|
||||
writer.uint32(26).string(message.shares);
|
||||
if (message.delegatorAddress !== "") {
|
||||
writer.uint32(10).string(message.delegatorAddress);
|
||||
}
|
||||
if (message.validatorAddress !== "") {
|
||||
writer.uint32(18).string(message.validatorAddress);
|
||||
}
|
||||
if (message.shares !== "") {
|
||||
writer.uint32(26).string(message.shares);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -1218,6 +1264,14 @@ export const Delegation = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Delegation): unknown {
|
||||
const obj: any = {};
|
||||
message.delegatorAddress !== undefined && (obj.delegatorAddress = message.delegatorAddress);
|
||||
message.validatorAddress !== undefined && (obj.validatorAddress = message.validatorAddress);
|
||||
message.shares !== undefined && (obj.shares = message.shares);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<Delegation>): Delegation {
|
||||
const message = { ...baseDelegation } as Delegation;
|
||||
if (object.delegatorAddress !== undefined && object.delegatorAddress !== null) {
|
||||
@ -1237,22 +1291,18 @@ export const Delegation = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Delegation): unknown {
|
||||
const obj: any = {};
|
||||
message.delegatorAddress !== undefined && (obj.delegatorAddress = message.delegatorAddress);
|
||||
message.validatorAddress !== undefined && (obj.validatorAddress = message.validatorAddress);
|
||||
message.shares !== undefined && (obj.shares = message.shares);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseUnbondingDelegation: object = { delegatorAddress: "", validatorAddress: "" };
|
||||
|
||||
export const UnbondingDelegation = {
|
||||
encode(message: UnbondingDelegation, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.delegatorAddress);
|
||||
writer.uint32(18).string(message.validatorAddress);
|
||||
if (message.delegatorAddress !== "") {
|
||||
writer.uint32(10).string(message.delegatorAddress);
|
||||
}
|
||||
if (message.validatorAddress !== "") {
|
||||
writer.uint32(18).string(message.validatorAddress);
|
||||
}
|
||||
for (const v of message.entries) {
|
||||
UnbondingDelegationEntry.encode(v!, writer.uint32(26).fork()).ldelim();
|
||||
}
|
||||
@ -1305,6 +1355,18 @@ export const UnbondingDelegation = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: UnbondingDelegation): unknown {
|
||||
const obj: any = {};
|
||||
message.delegatorAddress !== undefined && (obj.delegatorAddress = message.delegatorAddress);
|
||||
message.validatorAddress !== undefined && (obj.validatorAddress = message.validatorAddress);
|
||||
if (message.entries) {
|
||||
obj.entries = message.entries.map((e) => (e ? UnbondingDelegationEntry.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.entries = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<UnbondingDelegation>): UnbondingDelegation {
|
||||
const message = { ...baseUnbondingDelegation } as UnbondingDelegation;
|
||||
message.entries = [];
|
||||
@ -1325,30 +1387,24 @@ export const UnbondingDelegation = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: UnbondingDelegation): unknown {
|
||||
const obj: any = {};
|
||||
message.delegatorAddress !== undefined && (obj.delegatorAddress = message.delegatorAddress);
|
||||
message.validatorAddress !== undefined && (obj.validatorAddress = message.validatorAddress);
|
||||
if (message.entries) {
|
||||
obj.entries = message.entries.map((e) => (e ? UnbondingDelegationEntry.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.entries = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseUnbondingDelegationEntry: object = { creationHeight: Long.ZERO, initialBalance: "", balance: "" };
|
||||
|
||||
export const UnbondingDelegationEntry = {
|
||||
encode(message: UnbondingDelegationEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(8).int64(message.creationHeight);
|
||||
if (message.completionTime !== undefined && message.completionTime !== undefined) {
|
||||
if (!message.creationHeight.isZero()) {
|
||||
writer.uint32(8).int64(message.creationHeight);
|
||||
}
|
||||
if (message.completionTime !== undefined) {
|
||||
Timestamp.encode(toTimestamp(message.completionTime), writer.uint32(18).fork()).ldelim();
|
||||
}
|
||||
writer.uint32(26).string(message.initialBalance);
|
||||
writer.uint32(34).string(message.balance);
|
||||
if (message.initialBalance !== "") {
|
||||
writer.uint32(26).string(message.initialBalance);
|
||||
}
|
||||
if (message.balance !== "") {
|
||||
writer.uint32(34).string(message.balance);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -1404,6 +1460,18 @@ export const UnbondingDelegationEntry = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: UnbondingDelegationEntry): unknown {
|
||||
const obj: any = {};
|
||||
message.creationHeight !== undefined &&
|
||||
(obj.creationHeight = (message.creationHeight || Long.ZERO).toString());
|
||||
message.completionTime !== undefined &&
|
||||
(obj.completionTime =
|
||||
message.completionTime !== undefined ? message.completionTime.toISOString() : null);
|
||||
message.initialBalance !== undefined && (obj.initialBalance = message.initialBalance);
|
||||
message.balance !== undefined && (obj.balance = message.balance);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<UnbondingDelegationEntry>): UnbondingDelegationEntry {
|
||||
const message = { ...baseUnbondingDelegationEntry } as UnbondingDelegationEntry;
|
||||
if (object.creationHeight !== undefined && object.creationHeight !== null) {
|
||||
@ -1428,30 +1496,24 @@ export const UnbondingDelegationEntry = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: UnbondingDelegationEntry): unknown {
|
||||
const obj: any = {};
|
||||
message.creationHeight !== undefined &&
|
||||
(obj.creationHeight = (message.creationHeight || Long.ZERO).toString());
|
||||
message.completionTime !== undefined &&
|
||||
(obj.completionTime =
|
||||
message.completionTime !== undefined ? message.completionTime.toISOString() : null);
|
||||
message.initialBalance !== undefined && (obj.initialBalance = message.initialBalance);
|
||||
message.balance !== undefined && (obj.balance = message.balance);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseRedelegationEntry: object = { creationHeight: Long.ZERO, initialBalance: "", sharesDst: "" };
|
||||
|
||||
export const RedelegationEntry = {
|
||||
encode(message: RedelegationEntry, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(8).int64(message.creationHeight);
|
||||
if (message.completionTime !== undefined && message.completionTime !== undefined) {
|
||||
if (!message.creationHeight.isZero()) {
|
||||
writer.uint32(8).int64(message.creationHeight);
|
||||
}
|
||||
if (message.completionTime !== undefined) {
|
||||
Timestamp.encode(toTimestamp(message.completionTime), writer.uint32(18).fork()).ldelim();
|
||||
}
|
||||
writer.uint32(26).string(message.initialBalance);
|
||||
writer.uint32(34).string(message.sharesDst);
|
||||
if (message.initialBalance !== "") {
|
||||
writer.uint32(26).string(message.initialBalance);
|
||||
}
|
||||
if (message.sharesDst !== "") {
|
||||
writer.uint32(34).string(message.sharesDst);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -1507,6 +1569,18 @@ export const RedelegationEntry = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: RedelegationEntry): unknown {
|
||||
const obj: any = {};
|
||||
message.creationHeight !== undefined &&
|
||||
(obj.creationHeight = (message.creationHeight || Long.ZERO).toString());
|
||||
message.completionTime !== undefined &&
|
||||
(obj.completionTime =
|
||||
message.completionTime !== undefined ? message.completionTime.toISOString() : null);
|
||||
message.initialBalance !== undefined && (obj.initialBalance = message.initialBalance);
|
||||
message.sharesDst !== undefined && (obj.sharesDst = message.sharesDst);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<RedelegationEntry>): RedelegationEntry {
|
||||
const message = { ...baseRedelegationEntry } as RedelegationEntry;
|
||||
if (object.creationHeight !== undefined && object.creationHeight !== null) {
|
||||
@ -1531,27 +1605,21 @@ export const RedelegationEntry = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: RedelegationEntry): unknown {
|
||||
const obj: any = {};
|
||||
message.creationHeight !== undefined &&
|
||||
(obj.creationHeight = (message.creationHeight || Long.ZERO).toString());
|
||||
message.completionTime !== undefined &&
|
||||
(obj.completionTime =
|
||||
message.completionTime !== undefined ? message.completionTime.toISOString() : null);
|
||||
message.initialBalance !== undefined && (obj.initialBalance = message.initialBalance);
|
||||
message.sharesDst !== undefined && (obj.sharesDst = message.sharesDst);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseRedelegation: object = { delegatorAddress: "", validatorSrcAddress: "", validatorDstAddress: "" };
|
||||
|
||||
export const Redelegation = {
|
||||
encode(message: Redelegation, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.delegatorAddress);
|
||||
writer.uint32(18).string(message.validatorSrcAddress);
|
||||
writer.uint32(26).string(message.validatorDstAddress);
|
||||
if (message.delegatorAddress !== "") {
|
||||
writer.uint32(10).string(message.delegatorAddress);
|
||||
}
|
||||
if (message.validatorSrcAddress !== "") {
|
||||
writer.uint32(18).string(message.validatorSrcAddress);
|
||||
}
|
||||
if (message.validatorDstAddress !== "") {
|
||||
writer.uint32(26).string(message.validatorDstAddress);
|
||||
}
|
||||
for (const v of message.entries) {
|
||||
RedelegationEntry.encode(v!, writer.uint32(34).fork()).ldelim();
|
||||
}
|
||||
@ -1612,6 +1680,19 @@ export const Redelegation = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Redelegation): unknown {
|
||||
const obj: any = {};
|
||||
message.delegatorAddress !== undefined && (obj.delegatorAddress = message.delegatorAddress);
|
||||
message.validatorSrcAddress !== undefined && (obj.validatorSrcAddress = message.validatorSrcAddress);
|
||||
message.validatorDstAddress !== undefined && (obj.validatorDstAddress = message.validatorDstAddress);
|
||||
if (message.entries) {
|
||||
obj.entries = message.entries.map((e) => (e ? RedelegationEntry.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.entries = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<Redelegation>): Redelegation {
|
||||
const message = { ...baseRedelegation } as Redelegation;
|
||||
message.entries = [];
|
||||
@ -1637,32 +1718,27 @@ export const Redelegation = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Redelegation): unknown {
|
||||
const obj: any = {};
|
||||
message.delegatorAddress !== undefined && (obj.delegatorAddress = message.delegatorAddress);
|
||||
message.validatorSrcAddress !== undefined && (obj.validatorSrcAddress = message.validatorSrcAddress);
|
||||
message.validatorDstAddress !== undefined && (obj.validatorDstAddress = message.validatorDstAddress);
|
||||
if (message.entries) {
|
||||
obj.entries = message.entries.map((e) => (e ? RedelegationEntry.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.entries = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseParams: object = { maxValidators: 0, maxEntries: 0, historicalEntries: 0, bondDenom: "" };
|
||||
|
||||
export const Params = {
|
||||
encode(message: Params, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
if (message.unbondingTime !== undefined && message.unbondingTime !== undefined) {
|
||||
if (message.unbondingTime !== undefined) {
|
||||
Duration.encode(message.unbondingTime, writer.uint32(10).fork()).ldelim();
|
||||
}
|
||||
writer.uint32(16).uint32(message.maxValidators);
|
||||
writer.uint32(24).uint32(message.maxEntries);
|
||||
writer.uint32(32).uint32(message.historicalEntries);
|
||||
writer.uint32(42).string(message.bondDenom);
|
||||
if (message.maxValidators !== 0) {
|
||||
writer.uint32(16).uint32(message.maxValidators);
|
||||
}
|
||||
if (message.maxEntries !== 0) {
|
||||
writer.uint32(24).uint32(message.maxEntries);
|
||||
}
|
||||
if (message.historicalEntries !== 0) {
|
||||
writer.uint32(32).uint32(message.historicalEntries);
|
||||
}
|
||||
if (message.bondDenom !== "") {
|
||||
writer.uint32(42).string(message.bondDenom);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -1726,6 +1802,17 @@ export const Params = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Params): unknown {
|
||||
const obj: any = {};
|
||||
message.unbondingTime !== undefined &&
|
||||
(obj.unbondingTime = message.unbondingTime ? Duration.toJSON(message.unbondingTime) : undefined);
|
||||
message.maxValidators !== undefined && (obj.maxValidators = message.maxValidators);
|
||||
message.maxEntries !== undefined && (obj.maxEntries = message.maxEntries);
|
||||
message.historicalEntries !== undefined && (obj.historicalEntries = message.historicalEntries);
|
||||
message.bondDenom !== undefined && (obj.bondDenom = message.bondDenom);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<Params>): Params {
|
||||
const message = { ...baseParams } as Params;
|
||||
if (object.unbondingTime !== undefined && object.unbondingTime !== null) {
|
||||
@ -1755,27 +1842,16 @@ export const Params = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Params): unknown {
|
||||
const obj: any = {};
|
||||
message.unbondingTime !== undefined &&
|
||||
(obj.unbondingTime = message.unbondingTime ? Duration.toJSON(message.unbondingTime) : undefined);
|
||||
message.maxValidators !== undefined && (obj.maxValidators = message.maxValidators);
|
||||
message.maxEntries !== undefined && (obj.maxEntries = message.maxEntries);
|
||||
message.historicalEntries !== undefined && (obj.historicalEntries = message.historicalEntries);
|
||||
message.bondDenom !== undefined && (obj.bondDenom = message.bondDenom);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseDelegationResponse: object = {};
|
||||
|
||||
export const DelegationResponse = {
|
||||
encode(message: DelegationResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
if (message.delegation !== undefined && message.delegation !== undefined) {
|
||||
if (message.delegation !== undefined) {
|
||||
Delegation.encode(message.delegation, writer.uint32(10).fork()).ldelim();
|
||||
}
|
||||
if (message.balance !== undefined && message.balance !== undefined) {
|
||||
if (message.balance !== undefined) {
|
||||
Coin.encode(message.balance, writer.uint32(18).fork()).ldelim();
|
||||
}
|
||||
return writer;
|
||||
@ -1817,6 +1893,15 @@ export const DelegationResponse = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: DelegationResponse): unknown {
|
||||
const obj: any = {};
|
||||
message.delegation !== undefined &&
|
||||
(obj.delegation = message.delegation ? Delegation.toJSON(message.delegation) : undefined);
|
||||
message.balance !== undefined &&
|
||||
(obj.balance = message.balance ? Coin.toJSON(message.balance) : undefined);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<DelegationResponse>): DelegationResponse {
|
||||
const message = { ...baseDelegationResponse } as DelegationResponse;
|
||||
if (object.delegation !== undefined && object.delegation !== null) {
|
||||
@ -1831,25 +1916,18 @@ export const DelegationResponse = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: DelegationResponse): unknown {
|
||||
const obj: any = {};
|
||||
message.delegation !== undefined &&
|
||||
(obj.delegation = message.delegation ? Delegation.toJSON(message.delegation) : undefined);
|
||||
message.balance !== undefined &&
|
||||
(obj.balance = message.balance ? Coin.toJSON(message.balance) : undefined);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseRedelegationEntryResponse: object = { balance: "" };
|
||||
|
||||
export const RedelegationEntryResponse = {
|
||||
encode(message: RedelegationEntryResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
if (message.redelegationEntry !== undefined && message.redelegationEntry !== undefined) {
|
||||
if (message.redelegationEntry !== undefined) {
|
||||
RedelegationEntry.encode(message.redelegationEntry, writer.uint32(10).fork()).ldelim();
|
||||
}
|
||||
writer.uint32(34).string(message.balance);
|
||||
if (message.balance !== "") {
|
||||
writer.uint32(34).string(message.balance);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -1889,6 +1967,16 @@ export const RedelegationEntryResponse = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: RedelegationEntryResponse): unknown {
|
||||
const obj: any = {};
|
||||
message.redelegationEntry !== undefined &&
|
||||
(obj.redelegationEntry = message.redelegationEntry
|
||||
? RedelegationEntry.toJSON(message.redelegationEntry)
|
||||
: undefined);
|
||||
message.balance !== undefined && (obj.balance = message.balance);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<RedelegationEntryResponse>): RedelegationEntryResponse {
|
||||
const message = { ...baseRedelegationEntryResponse } as RedelegationEntryResponse;
|
||||
if (object.redelegationEntry !== undefined && object.redelegationEntry !== null) {
|
||||
@ -1903,23 +1991,13 @@ export const RedelegationEntryResponse = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: RedelegationEntryResponse): unknown {
|
||||
const obj: any = {};
|
||||
message.redelegationEntry !== undefined &&
|
||||
(obj.redelegationEntry = message.redelegationEntry
|
||||
? RedelegationEntry.toJSON(message.redelegationEntry)
|
||||
: undefined);
|
||||
message.balance !== undefined && (obj.balance = message.balance);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseRedelegationResponse: object = {};
|
||||
|
||||
export const RedelegationResponse = {
|
||||
encode(message: RedelegationResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
if (message.redelegation !== undefined && message.redelegation !== undefined) {
|
||||
if (message.redelegation !== undefined) {
|
||||
Redelegation.encode(message.redelegation, writer.uint32(10).fork()).ldelim();
|
||||
}
|
||||
for (const v of message.entries) {
|
||||
@ -1966,6 +2044,18 @@ export const RedelegationResponse = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: RedelegationResponse): unknown {
|
||||
const obj: any = {};
|
||||
message.redelegation !== undefined &&
|
||||
(obj.redelegation = message.redelegation ? Redelegation.toJSON(message.redelegation) : undefined);
|
||||
if (message.entries) {
|
||||
obj.entries = message.entries.map((e) => (e ? RedelegationEntryResponse.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.entries = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<RedelegationResponse>): RedelegationResponse {
|
||||
const message = { ...baseRedelegationResponse } as RedelegationResponse;
|
||||
message.entries = [];
|
||||
@ -1981,26 +2071,18 @@ export const RedelegationResponse = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: RedelegationResponse): unknown {
|
||||
const obj: any = {};
|
||||
message.redelegation !== undefined &&
|
||||
(obj.redelegation = message.redelegation ? Redelegation.toJSON(message.redelegation) : undefined);
|
||||
if (message.entries) {
|
||||
obj.entries = message.entries.map((e) => (e ? RedelegationEntryResponse.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.entries = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const basePool: object = { notBondedTokens: "", bondedTokens: "" };
|
||||
|
||||
export const Pool = {
|
||||
encode(message: Pool, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.notBondedTokens);
|
||||
writer.uint32(18).string(message.bondedTokens);
|
||||
if (message.notBondedTokens !== "") {
|
||||
writer.uint32(10).string(message.notBondedTokens);
|
||||
}
|
||||
if (message.bondedTokens !== "") {
|
||||
writer.uint32(18).string(message.bondedTokens);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -2040,6 +2122,13 @@ export const Pool = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Pool): unknown {
|
||||
const obj: any = {};
|
||||
message.notBondedTokens !== undefined && (obj.notBondedTokens = message.notBondedTokens);
|
||||
message.bondedTokens !== undefined && (obj.bondedTokens = message.bondedTokens);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<Pool>): Pool {
|
||||
const message = { ...basePool } as Pool;
|
||||
if (object.notBondedTokens !== undefined && object.notBondedTokens !== null) {
|
||||
@ -2054,13 +2143,6 @@ export const Pool = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Pool): unknown {
|
||||
const obj: any = {};
|
||||
message.notBondedTokens !== undefined && (obj.notBondedTokens = message.notBondedTokens);
|
||||
message.bondedTokens !== undefined && (obj.bondedTokens = message.bondedTokens);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
type Builtin = Date | Function | Uint8Array | string | number | undefined | Long;
|
||||
|
||||
@ -87,19 +87,25 @@ const baseMsgCreateValidator: object = { minSelfDelegation: "", delegatorAddress
|
||||
|
||||
export const MsgCreateValidator = {
|
||||
encode(message: MsgCreateValidator, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
if (message.description !== undefined && message.description !== undefined) {
|
||||
if (message.description !== undefined) {
|
||||
Description.encode(message.description, writer.uint32(10).fork()).ldelim();
|
||||
}
|
||||
if (message.commission !== undefined && message.commission !== undefined) {
|
||||
if (message.commission !== undefined) {
|
||||
CommissionRates.encode(message.commission, writer.uint32(18).fork()).ldelim();
|
||||
}
|
||||
writer.uint32(26).string(message.minSelfDelegation);
|
||||
writer.uint32(34).string(message.delegatorAddress);
|
||||
writer.uint32(42).string(message.validatorAddress);
|
||||
if (message.pubkey !== undefined && message.pubkey !== undefined) {
|
||||
if (message.minSelfDelegation !== "") {
|
||||
writer.uint32(26).string(message.minSelfDelegation);
|
||||
}
|
||||
if (message.delegatorAddress !== "") {
|
||||
writer.uint32(34).string(message.delegatorAddress);
|
||||
}
|
||||
if (message.validatorAddress !== "") {
|
||||
writer.uint32(42).string(message.validatorAddress);
|
||||
}
|
||||
if (message.pubkey !== undefined) {
|
||||
Any.encode(message.pubkey, writer.uint32(50).fork()).ldelim();
|
||||
}
|
||||
if (message.value !== undefined && message.value !== undefined) {
|
||||
if (message.value !== undefined) {
|
||||
Coin.encode(message.value, writer.uint32(58).fork()).ldelim();
|
||||
}
|
||||
return writer;
|
||||
@ -181,6 +187,20 @@ export const MsgCreateValidator = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: MsgCreateValidator): unknown {
|
||||
const obj: any = {};
|
||||
message.description !== undefined &&
|
||||
(obj.description = message.description ? Description.toJSON(message.description) : undefined);
|
||||
message.commission !== undefined &&
|
||||
(obj.commission = message.commission ? CommissionRates.toJSON(message.commission) : undefined);
|
||||
message.minSelfDelegation !== undefined && (obj.minSelfDelegation = message.minSelfDelegation);
|
||||
message.delegatorAddress !== undefined && (obj.delegatorAddress = message.delegatorAddress);
|
||||
message.validatorAddress !== undefined && (obj.validatorAddress = message.validatorAddress);
|
||||
message.pubkey !== undefined && (obj.pubkey = message.pubkey ? Any.toJSON(message.pubkey) : undefined);
|
||||
message.value !== undefined && (obj.value = message.value ? Coin.toJSON(message.value) : undefined);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<MsgCreateValidator>): MsgCreateValidator {
|
||||
const message = { ...baseMsgCreateValidator } as MsgCreateValidator;
|
||||
if (object.description !== undefined && object.description !== null) {
|
||||
@ -220,20 +240,6 @@ export const MsgCreateValidator = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: MsgCreateValidator): unknown {
|
||||
const obj: any = {};
|
||||
message.description !== undefined &&
|
||||
(obj.description = message.description ? Description.toJSON(message.description) : undefined);
|
||||
message.commission !== undefined &&
|
||||
(obj.commission = message.commission ? CommissionRates.toJSON(message.commission) : undefined);
|
||||
message.minSelfDelegation !== undefined && (obj.minSelfDelegation = message.minSelfDelegation);
|
||||
message.delegatorAddress !== undefined && (obj.delegatorAddress = message.delegatorAddress);
|
||||
message.validatorAddress !== undefined && (obj.validatorAddress = message.validatorAddress);
|
||||
message.pubkey !== undefined && (obj.pubkey = message.pubkey ? Any.toJSON(message.pubkey) : undefined);
|
||||
message.value !== undefined && (obj.value = message.value ? Coin.toJSON(message.value) : undefined);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseMsgCreateValidatorResponse: object = {};
|
||||
@ -263,27 +269,33 @@ export const MsgCreateValidatorResponse = {
|
||||
return message;
|
||||
},
|
||||
|
||||
fromPartial(_: DeepPartial<MsgCreateValidatorResponse>): MsgCreateValidatorResponse {
|
||||
const message = { ...baseMsgCreateValidatorResponse } as MsgCreateValidatorResponse;
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(_: MsgCreateValidatorResponse): unknown {
|
||||
const obj: any = {};
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(_: DeepPartial<MsgCreateValidatorResponse>): MsgCreateValidatorResponse {
|
||||
const message = { ...baseMsgCreateValidatorResponse } as MsgCreateValidatorResponse;
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
const baseMsgEditValidator: object = { validatorAddress: "", commissionRate: "", minSelfDelegation: "" };
|
||||
|
||||
export const MsgEditValidator = {
|
||||
encode(message: MsgEditValidator, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
if (message.description !== undefined && message.description !== undefined) {
|
||||
if (message.description !== undefined) {
|
||||
Description.encode(message.description, writer.uint32(10).fork()).ldelim();
|
||||
}
|
||||
writer.uint32(18).string(message.validatorAddress);
|
||||
writer.uint32(26).string(message.commissionRate);
|
||||
writer.uint32(34).string(message.minSelfDelegation);
|
||||
if (message.validatorAddress !== "") {
|
||||
writer.uint32(18).string(message.validatorAddress);
|
||||
}
|
||||
if (message.commissionRate !== "") {
|
||||
writer.uint32(26).string(message.commissionRate);
|
||||
}
|
||||
if (message.minSelfDelegation !== "") {
|
||||
writer.uint32(34).string(message.minSelfDelegation);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -339,6 +351,16 @@ export const MsgEditValidator = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: MsgEditValidator): unknown {
|
||||
const obj: any = {};
|
||||
message.description !== undefined &&
|
||||
(obj.description = message.description ? Description.toJSON(message.description) : undefined);
|
||||
message.validatorAddress !== undefined && (obj.validatorAddress = message.validatorAddress);
|
||||
message.commissionRate !== undefined && (obj.commissionRate = message.commissionRate);
|
||||
message.minSelfDelegation !== undefined && (obj.minSelfDelegation = message.minSelfDelegation);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<MsgEditValidator>): MsgEditValidator {
|
||||
const message = { ...baseMsgEditValidator } as MsgEditValidator;
|
||||
if (object.description !== undefined && object.description !== null) {
|
||||
@ -363,16 +385,6 @@ export const MsgEditValidator = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: MsgEditValidator): unknown {
|
||||
const obj: any = {};
|
||||
message.description !== undefined &&
|
||||
(obj.description = message.description ? Description.toJSON(message.description) : undefined);
|
||||
message.validatorAddress !== undefined && (obj.validatorAddress = message.validatorAddress);
|
||||
message.commissionRate !== undefined && (obj.commissionRate = message.commissionRate);
|
||||
message.minSelfDelegation !== undefined && (obj.minSelfDelegation = message.minSelfDelegation);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseMsgEditValidatorResponse: object = {};
|
||||
@ -402,24 +414,28 @@ export const MsgEditValidatorResponse = {
|
||||
return message;
|
||||
},
|
||||
|
||||
fromPartial(_: DeepPartial<MsgEditValidatorResponse>): MsgEditValidatorResponse {
|
||||
const message = { ...baseMsgEditValidatorResponse } as MsgEditValidatorResponse;
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(_: MsgEditValidatorResponse): unknown {
|
||||
const obj: any = {};
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(_: DeepPartial<MsgEditValidatorResponse>): MsgEditValidatorResponse {
|
||||
const message = { ...baseMsgEditValidatorResponse } as MsgEditValidatorResponse;
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
const baseMsgDelegate: object = { delegatorAddress: "", validatorAddress: "" };
|
||||
|
||||
export const MsgDelegate = {
|
||||
encode(message: MsgDelegate, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.delegatorAddress);
|
||||
writer.uint32(18).string(message.validatorAddress);
|
||||
if (message.amount !== undefined && message.amount !== undefined) {
|
||||
if (message.delegatorAddress !== "") {
|
||||
writer.uint32(10).string(message.delegatorAddress);
|
||||
}
|
||||
if (message.validatorAddress !== "") {
|
||||
writer.uint32(18).string(message.validatorAddress);
|
||||
}
|
||||
if (message.amount !== undefined) {
|
||||
Coin.encode(message.amount, writer.uint32(26).fork()).ldelim();
|
||||
}
|
||||
return writer;
|
||||
@ -469,6 +485,14 @@ export const MsgDelegate = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: MsgDelegate): unknown {
|
||||
const obj: any = {};
|
||||
message.delegatorAddress !== undefined && (obj.delegatorAddress = message.delegatorAddress);
|
||||
message.validatorAddress !== undefined && (obj.validatorAddress = message.validatorAddress);
|
||||
message.amount !== undefined && (obj.amount = message.amount ? Coin.toJSON(message.amount) : undefined);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<MsgDelegate>): MsgDelegate {
|
||||
const message = { ...baseMsgDelegate } as MsgDelegate;
|
||||
if (object.delegatorAddress !== undefined && object.delegatorAddress !== null) {
|
||||
@ -488,14 +512,6 @@ export const MsgDelegate = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: MsgDelegate): unknown {
|
||||
const obj: any = {};
|
||||
message.delegatorAddress !== undefined && (obj.delegatorAddress = message.delegatorAddress);
|
||||
message.validatorAddress !== undefined && (obj.validatorAddress = message.validatorAddress);
|
||||
message.amount !== undefined && (obj.amount = message.amount ? Coin.toJSON(message.amount) : undefined);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseMsgDelegateResponse: object = {};
|
||||
@ -525,15 +541,15 @@ export const MsgDelegateResponse = {
|
||||
return message;
|
||||
},
|
||||
|
||||
fromPartial(_: DeepPartial<MsgDelegateResponse>): MsgDelegateResponse {
|
||||
const message = { ...baseMsgDelegateResponse } as MsgDelegateResponse;
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(_: MsgDelegateResponse): unknown {
|
||||
const obj: any = {};
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(_: DeepPartial<MsgDelegateResponse>): MsgDelegateResponse {
|
||||
const message = { ...baseMsgDelegateResponse } as MsgDelegateResponse;
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
const baseMsgBeginRedelegate: object = {
|
||||
@ -544,10 +560,16 @@ const baseMsgBeginRedelegate: object = {
|
||||
|
||||
export const MsgBeginRedelegate = {
|
||||
encode(message: MsgBeginRedelegate, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.delegatorAddress);
|
||||
writer.uint32(18).string(message.validatorSrcAddress);
|
||||
writer.uint32(26).string(message.validatorDstAddress);
|
||||
if (message.amount !== undefined && message.amount !== undefined) {
|
||||
if (message.delegatorAddress !== "") {
|
||||
writer.uint32(10).string(message.delegatorAddress);
|
||||
}
|
||||
if (message.validatorSrcAddress !== "") {
|
||||
writer.uint32(18).string(message.validatorSrcAddress);
|
||||
}
|
||||
if (message.validatorDstAddress !== "") {
|
||||
writer.uint32(26).string(message.validatorDstAddress);
|
||||
}
|
||||
if (message.amount !== undefined) {
|
||||
Coin.encode(message.amount, writer.uint32(34).fork()).ldelim();
|
||||
}
|
||||
return writer;
|
||||
@ -605,6 +627,15 @@ export const MsgBeginRedelegate = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: MsgBeginRedelegate): unknown {
|
||||
const obj: any = {};
|
||||
message.delegatorAddress !== undefined && (obj.delegatorAddress = message.delegatorAddress);
|
||||
message.validatorSrcAddress !== undefined && (obj.validatorSrcAddress = message.validatorSrcAddress);
|
||||
message.validatorDstAddress !== undefined && (obj.validatorDstAddress = message.validatorDstAddress);
|
||||
message.amount !== undefined && (obj.amount = message.amount ? Coin.toJSON(message.amount) : undefined);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<MsgBeginRedelegate>): MsgBeginRedelegate {
|
||||
const message = { ...baseMsgBeginRedelegate } as MsgBeginRedelegate;
|
||||
if (object.delegatorAddress !== undefined && object.delegatorAddress !== null) {
|
||||
@ -629,22 +660,13 @@ export const MsgBeginRedelegate = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: MsgBeginRedelegate): unknown {
|
||||
const obj: any = {};
|
||||
message.delegatorAddress !== undefined && (obj.delegatorAddress = message.delegatorAddress);
|
||||
message.validatorSrcAddress !== undefined && (obj.validatorSrcAddress = message.validatorSrcAddress);
|
||||
message.validatorDstAddress !== undefined && (obj.validatorDstAddress = message.validatorDstAddress);
|
||||
message.amount !== undefined && (obj.amount = message.amount ? Coin.toJSON(message.amount) : undefined);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseMsgBeginRedelegateResponse: object = {};
|
||||
|
||||
export const MsgBeginRedelegateResponse = {
|
||||
encode(message: MsgBeginRedelegateResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
if (message.completionTime !== undefined && message.completionTime !== undefined) {
|
||||
if (message.completionTime !== undefined) {
|
||||
Timestamp.encode(toTimestamp(message.completionTime), writer.uint32(10).fork()).ldelim();
|
||||
}
|
||||
return writer;
|
||||
@ -678,6 +700,14 @@ export const MsgBeginRedelegateResponse = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: MsgBeginRedelegateResponse): unknown {
|
||||
const obj: any = {};
|
||||
message.completionTime !== undefined &&
|
||||
(obj.completionTime =
|
||||
message.completionTime !== undefined ? message.completionTime.toISOString() : null);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<MsgBeginRedelegateResponse>): MsgBeginRedelegateResponse {
|
||||
const message = { ...baseMsgBeginRedelegateResponse } as MsgBeginRedelegateResponse;
|
||||
if (object.completionTime !== undefined && object.completionTime !== null) {
|
||||
@ -687,23 +717,19 @@ export const MsgBeginRedelegateResponse = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: MsgBeginRedelegateResponse): unknown {
|
||||
const obj: any = {};
|
||||
message.completionTime !== undefined &&
|
||||
(obj.completionTime =
|
||||
message.completionTime !== undefined ? message.completionTime.toISOString() : null);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseMsgUndelegate: object = { delegatorAddress: "", validatorAddress: "" };
|
||||
|
||||
export const MsgUndelegate = {
|
||||
encode(message: MsgUndelegate, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.delegatorAddress);
|
||||
writer.uint32(18).string(message.validatorAddress);
|
||||
if (message.amount !== undefined && message.amount !== undefined) {
|
||||
if (message.delegatorAddress !== "") {
|
||||
writer.uint32(10).string(message.delegatorAddress);
|
||||
}
|
||||
if (message.validatorAddress !== "") {
|
||||
writer.uint32(18).string(message.validatorAddress);
|
||||
}
|
||||
if (message.amount !== undefined) {
|
||||
Coin.encode(message.amount, writer.uint32(26).fork()).ldelim();
|
||||
}
|
||||
return writer;
|
||||
@ -753,6 +779,14 @@ export const MsgUndelegate = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: MsgUndelegate): unknown {
|
||||
const obj: any = {};
|
||||
message.delegatorAddress !== undefined && (obj.delegatorAddress = message.delegatorAddress);
|
||||
message.validatorAddress !== undefined && (obj.validatorAddress = message.validatorAddress);
|
||||
message.amount !== undefined && (obj.amount = message.amount ? Coin.toJSON(message.amount) : undefined);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<MsgUndelegate>): MsgUndelegate {
|
||||
const message = { ...baseMsgUndelegate } as MsgUndelegate;
|
||||
if (object.delegatorAddress !== undefined && object.delegatorAddress !== null) {
|
||||
@ -772,21 +806,13 @@ export const MsgUndelegate = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: MsgUndelegate): unknown {
|
||||
const obj: any = {};
|
||||
message.delegatorAddress !== undefined && (obj.delegatorAddress = message.delegatorAddress);
|
||||
message.validatorAddress !== undefined && (obj.validatorAddress = message.validatorAddress);
|
||||
message.amount !== undefined && (obj.amount = message.amount ? Coin.toJSON(message.amount) : undefined);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseMsgUndelegateResponse: object = {};
|
||||
|
||||
export const MsgUndelegateResponse = {
|
||||
encode(message: MsgUndelegateResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
if (message.completionTime !== undefined && message.completionTime !== undefined) {
|
||||
if (message.completionTime !== undefined) {
|
||||
Timestamp.encode(toTimestamp(message.completionTime), writer.uint32(10).fork()).ldelim();
|
||||
}
|
||||
return writer;
|
||||
@ -820,6 +846,14 @@ export const MsgUndelegateResponse = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: MsgUndelegateResponse): unknown {
|
||||
const obj: any = {};
|
||||
message.completionTime !== undefined &&
|
||||
(obj.completionTime =
|
||||
message.completionTime !== undefined ? message.completionTime.toISOString() : null);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<MsgUndelegateResponse>): MsgUndelegateResponse {
|
||||
const message = { ...baseMsgUndelegateResponse } as MsgUndelegateResponse;
|
||||
if (object.completionTime !== undefined && object.completionTime !== null) {
|
||||
@ -829,14 +863,6 @@ export const MsgUndelegateResponse = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: MsgUndelegateResponse): unknown {
|
||||
const obj: any = {};
|
||||
message.completionTime !== undefined &&
|
||||
(obj.completionTime =
|
||||
message.completionTime !== undefined ? message.completionTime.toISOString() : null);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
/** Msg defines the staking Msg service. */
|
||||
|
||||
@ -156,6 +156,16 @@ export const SignatureDescriptors = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: SignatureDescriptors): unknown {
|
||||
const obj: any = {};
|
||||
if (message.signatures) {
|
||||
obj.signatures = message.signatures.map((e) => (e ? SignatureDescriptor.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.signatures = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<SignatureDescriptors>): SignatureDescriptors {
|
||||
const message = { ...baseSignatureDescriptors } as SignatureDescriptors;
|
||||
message.signatures = [];
|
||||
@ -166,29 +176,21 @@ export const SignatureDescriptors = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: SignatureDescriptors): unknown {
|
||||
const obj: any = {};
|
||||
if (message.signatures) {
|
||||
obj.signatures = message.signatures.map((e) => (e ? SignatureDescriptor.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.signatures = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseSignatureDescriptor: object = { sequence: Long.UZERO };
|
||||
|
||||
export const SignatureDescriptor = {
|
||||
encode(message: SignatureDescriptor, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
if (message.publicKey !== undefined && message.publicKey !== undefined) {
|
||||
if (message.publicKey !== undefined) {
|
||||
Any.encode(message.publicKey, writer.uint32(10).fork()).ldelim();
|
||||
}
|
||||
if (message.data !== undefined && message.data !== undefined) {
|
||||
if (message.data !== undefined) {
|
||||
SignatureDescriptor_Data.encode(message.data, writer.uint32(18).fork()).ldelim();
|
||||
}
|
||||
writer.uint32(24).uint64(message.sequence);
|
||||
if (!message.sequence.isZero()) {
|
||||
writer.uint32(24).uint64(message.sequence);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -236,6 +238,16 @@ export const SignatureDescriptor = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: SignatureDescriptor): unknown {
|
||||
const obj: any = {};
|
||||
message.publicKey !== undefined &&
|
||||
(obj.publicKey = message.publicKey ? Any.toJSON(message.publicKey) : undefined);
|
||||
message.data !== undefined &&
|
||||
(obj.data = message.data ? SignatureDescriptor_Data.toJSON(message.data) : undefined);
|
||||
message.sequence !== undefined && (obj.sequence = (message.sequence || Long.UZERO).toString());
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<SignatureDescriptor>): SignatureDescriptor {
|
||||
const message = { ...baseSignatureDescriptor } as SignatureDescriptor;
|
||||
if (object.publicKey !== undefined && object.publicKey !== null) {
|
||||
@ -255,16 +267,6 @@ export const SignatureDescriptor = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: SignatureDescriptor): unknown {
|
||||
const obj: any = {};
|
||||
message.publicKey !== undefined &&
|
||||
(obj.publicKey = message.publicKey ? Any.toJSON(message.publicKey) : undefined);
|
||||
message.data !== undefined &&
|
||||
(obj.data = message.data ? SignatureDescriptor_Data.toJSON(message.data) : undefined);
|
||||
message.sequence !== undefined && (obj.sequence = (message.sequence || Long.UZERO).toString());
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseSignatureDescriptor_Data: object = {};
|
||||
@ -316,6 +318,15 @@ export const SignatureDescriptor_Data = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: SignatureDescriptor_Data): unknown {
|
||||
const obj: any = {};
|
||||
message.single !== undefined &&
|
||||
(obj.single = message.single ? SignatureDescriptor_Data_Single.toJSON(message.single) : undefined);
|
||||
message.multi !== undefined &&
|
||||
(obj.multi = message.multi ? SignatureDescriptor_Data_Multi.toJSON(message.multi) : undefined);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<SignatureDescriptor_Data>): SignatureDescriptor_Data {
|
||||
const message = { ...baseSignatureDescriptor_Data } as SignatureDescriptor_Data;
|
||||
if (object.single !== undefined && object.single !== null) {
|
||||
@ -330,23 +341,18 @@ export const SignatureDescriptor_Data = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: SignatureDescriptor_Data): unknown {
|
||||
const obj: any = {};
|
||||
message.single !== undefined &&
|
||||
(obj.single = message.single ? SignatureDescriptor_Data_Single.toJSON(message.single) : undefined);
|
||||
message.multi !== undefined &&
|
||||
(obj.multi = message.multi ? SignatureDescriptor_Data_Multi.toJSON(message.multi) : undefined);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseSignatureDescriptor_Data_Single: object = { mode: 0 };
|
||||
|
||||
export const SignatureDescriptor_Data_Single = {
|
||||
encode(message: SignatureDescriptor_Data_Single, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(8).int32(message.mode);
|
||||
writer.uint32(18).bytes(message.signature);
|
||||
if (message.mode !== 0) {
|
||||
writer.uint32(8).int32(message.mode);
|
||||
}
|
||||
if (message.signature.length !== 0) {
|
||||
writer.uint32(18).bytes(message.signature);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -384,6 +390,16 @@ export const SignatureDescriptor_Data_Single = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: SignatureDescriptor_Data_Single): unknown {
|
||||
const obj: any = {};
|
||||
message.mode !== undefined && (obj.mode = signModeToJSON(message.mode));
|
||||
message.signature !== undefined &&
|
||||
(obj.signature = base64FromBytes(
|
||||
message.signature !== undefined ? message.signature : new Uint8Array(),
|
||||
));
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<SignatureDescriptor_Data_Single>): SignatureDescriptor_Data_Single {
|
||||
const message = { ...baseSignatureDescriptor_Data_Single } as SignatureDescriptor_Data_Single;
|
||||
if (object.mode !== undefined && object.mode !== null) {
|
||||
@ -398,23 +414,13 @@ export const SignatureDescriptor_Data_Single = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: SignatureDescriptor_Data_Single): unknown {
|
||||
const obj: any = {};
|
||||
message.mode !== undefined && (obj.mode = signModeToJSON(message.mode));
|
||||
message.signature !== undefined &&
|
||||
(obj.signature = base64FromBytes(
|
||||
message.signature !== undefined ? message.signature : new Uint8Array(),
|
||||
));
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseSignatureDescriptor_Data_Multi: object = {};
|
||||
|
||||
export const SignatureDescriptor_Data_Multi = {
|
||||
encode(message: SignatureDescriptor_Data_Multi, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
if (message.bitarray !== undefined && message.bitarray !== undefined) {
|
||||
if (message.bitarray !== undefined) {
|
||||
CompactBitArray.encode(message.bitarray, writer.uint32(10).fork()).ldelim();
|
||||
}
|
||||
for (const v of message.signatures) {
|
||||
@ -461,6 +467,18 @@ export const SignatureDescriptor_Data_Multi = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: SignatureDescriptor_Data_Multi): unknown {
|
||||
const obj: any = {};
|
||||
message.bitarray !== undefined &&
|
||||
(obj.bitarray = message.bitarray ? CompactBitArray.toJSON(message.bitarray) : undefined);
|
||||
if (message.signatures) {
|
||||
obj.signatures = message.signatures.map((e) => (e ? SignatureDescriptor_Data.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.signatures = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<SignatureDescriptor_Data_Multi>): SignatureDescriptor_Data_Multi {
|
||||
const message = { ...baseSignatureDescriptor_Data_Multi } as SignatureDescriptor_Data_Multi;
|
||||
message.signatures = [];
|
||||
@ -476,18 +494,6 @@ export const SignatureDescriptor_Data_Multi = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: SignatureDescriptor_Data_Multi): unknown {
|
||||
const obj: any = {};
|
||||
message.bitarray !== undefined &&
|
||||
(obj.bitarray = message.bitarray ? CompactBitArray.toJSON(message.bitarray) : undefined);
|
||||
if (message.signatures) {
|
||||
obj.signatures = message.signatures.map((e) => (e ? SignatureDescriptor_Data.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.signatures = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
declare var self: any | undefined;
|
||||
@ -497,7 +503,7 @@ var globalThis: any = (() => {
|
||||
if (typeof self !== "undefined") return self;
|
||||
if (typeof window !== "undefined") return window;
|
||||
if (typeof global !== "undefined") return global;
|
||||
throw new Error("Unable to locate global object");
|
||||
throw "Unable to locate global object";
|
||||
})();
|
||||
|
||||
const atob: (b64: string) => string =
|
||||
|
||||
@ -211,10 +211,10 @@ const baseTx: object = {};
|
||||
|
||||
export const Tx = {
|
||||
encode(message: Tx, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
if (message.body !== undefined && message.body !== undefined) {
|
||||
if (message.body !== undefined) {
|
||||
TxBody.encode(message.body, writer.uint32(10).fork()).ldelim();
|
||||
}
|
||||
if (message.authInfo !== undefined && message.authInfo !== undefined) {
|
||||
if (message.authInfo !== undefined) {
|
||||
AuthInfo.encode(message.authInfo, writer.uint32(18).fork()).ldelim();
|
||||
}
|
||||
for (const v of message.signatures) {
|
||||
@ -269,6 +269,19 @@ export const Tx = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Tx): unknown {
|
||||
const obj: any = {};
|
||||
message.body !== undefined && (obj.body = message.body ? TxBody.toJSON(message.body) : undefined);
|
||||
message.authInfo !== undefined &&
|
||||
(obj.authInfo = message.authInfo ? AuthInfo.toJSON(message.authInfo) : undefined);
|
||||
if (message.signatures) {
|
||||
obj.signatures = message.signatures.map((e) => base64FromBytes(e !== undefined ? e : new Uint8Array()));
|
||||
} else {
|
||||
obj.signatures = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<Tx>): Tx {
|
||||
const message = { ...baseTx } as Tx;
|
||||
message.signatures = [];
|
||||
@ -289,27 +302,18 @@ export const Tx = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Tx): unknown {
|
||||
const obj: any = {};
|
||||
message.body !== undefined && (obj.body = message.body ? TxBody.toJSON(message.body) : undefined);
|
||||
message.authInfo !== undefined &&
|
||||
(obj.authInfo = message.authInfo ? AuthInfo.toJSON(message.authInfo) : undefined);
|
||||
if (message.signatures) {
|
||||
obj.signatures = message.signatures.map((e) => base64FromBytes(e !== undefined ? e : new Uint8Array()));
|
||||
} else {
|
||||
obj.signatures = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseTxRaw: object = {};
|
||||
|
||||
export const TxRaw = {
|
||||
encode(message: TxRaw, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).bytes(message.bodyBytes);
|
||||
writer.uint32(18).bytes(message.authInfoBytes);
|
||||
if (message.bodyBytes.length !== 0) {
|
||||
writer.uint32(10).bytes(message.bodyBytes);
|
||||
}
|
||||
if (message.authInfoBytes.length !== 0) {
|
||||
writer.uint32(18).bytes(message.authInfoBytes);
|
||||
}
|
||||
for (const v of message.signatures) {
|
||||
writer.uint32(26).bytes(v!);
|
||||
}
|
||||
@ -358,6 +362,24 @@ export const TxRaw = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: TxRaw): unknown {
|
||||
const obj: any = {};
|
||||
message.bodyBytes !== undefined &&
|
||||
(obj.bodyBytes = base64FromBytes(
|
||||
message.bodyBytes !== undefined ? message.bodyBytes : new Uint8Array(),
|
||||
));
|
||||
message.authInfoBytes !== undefined &&
|
||||
(obj.authInfoBytes = base64FromBytes(
|
||||
message.authInfoBytes !== undefined ? message.authInfoBytes : new Uint8Array(),
|
||||
));
|
||||
if (message.signatures) {
|
||||
obj.signatures = message.signatures.map((e) => base64FromBytes(e !== undefined ? e : new Uint8Array()));
|
||||
} else {
|
||||
obj.signatures = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<TxRaw>): TxRaw {
|
||||
const message = { ...baseTxRaw } as TxRaw;
|
||||
message.signatures = [];
|
||||
@ -378,34 +400,24 @@ export const TxRaw = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: TxRaw): unknown {
|
||||
const obj: any = {};
|
||||
message.bodyBytes !== undefined &&
|
||||
(obj.bodyBytes = base64FromBytes(
|
||||
message.bodyBytes !== undefined ? message.bodyBytes : new Uint8Array(),
|
||||
));
|
||||
message.authInfoBytes !== undefined &&
|
||||
(obj.authInfoBytes = base64FromBytes(
|
||||
message.authInfoBytes !== undefined ? message.authInfoBytes : new Uint8Array(),
|
||||
));
|
||||
if (message.signatures) {
|
||||
obj.signatures = message.signatures.map((e) => base64FromBytes(e !== undefined ? e : new Uint8Array()));
|
||||
} else {
|
||||
obj.signatures = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseSignDoc: object = { chainId: "", accountNumber: Long.UZERO };
|
||||
|
||||
export const SignDoc = {
|
||||
encode(message: SignDoc, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).bytes(message.bodyBytes);
|
||||
writer.uint32(18).bytes(message.authInfoBytes);
|
||||
writer.uint32(26).string(message.chainId);
|
||||
writer.uint32(32).uint64(message.accountNumber);
|
||||
if (message.bodyBytes.length !== 0) {
|
||||
writer.uint32(10).bytes(message.bodyBytes);
|
||||
}
|
||||
if (message.authInfoBytes.length !== 0) {
|
||||
writer.uint32(18).bytes(message.authInfoBytes);
|
||||
}
|
||||
if (message.chainId !== "") {
|
||||
writer.uint32(26).string(message.chainId);
|
||||
}
|
||||
if (!message.accountNumber.isZero()) {
|
||||
writer.uint32(32).uint64(message.accountNumber);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -457,6 +469,22 @@ export const SignDoc = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: SignDoc): unknown {
|
||||
const obj: any = {};
|
||||
message.bodyBytes !== undefined &&
|
||||
(obj.bodyBytes = base64FromBytes(
|
||||
message.bodyBytes !== undefined ? message.bodyBytes : new Uint8Array(),
|
||||
));
|
||||
message.authInfoBytes !== undefined &&
|
||||
(obj.authInfoBytes = base64FromBytes(
|
||||
message.authInfoBytes !== undefined ? message.authInfoBytes : new Uint8Array(),
|
||||
));
|
||||
message.chainId !== undefined && (obj.chainId = message.chainId);
|
||||
message.accountNumber !== undefined &&
|
||||
(obj.accountNumber = (message.accountNumber || Long.UZERO).toString());
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<SignDoc>): SignDoc {
|
||||
const message = { ...baseSignDoc } as SignDoc;
|
||||
if (object.bodyBytes !== undefined && object.bodyBytes !== null) {
|
||||
@ -481,22 +509,6 @@ export const SignDoc = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: SignDoc): unknown {
|
||||
const obj: any = {};
|
||||
message.bodyBytes !== undefined &&
|
||||
(obj.bodyBytes = base64FromBytes(
|
||||
message.bodyBytes !== undefined ? message.bodyBytes : new Uint8Array(),
|
||||
));
|
||||
message.authInfoBytes !== undefined &&
|
||||
(obj.authInfoBytes = base64FromBytes(
|
||||
message.authInfoBytes !== undefined ? message.authInfoBytes : new Uint8Array(),
|
||||
));
|
||||
message.chainId !== undefined && (obj.chainId = message.chainId);
|
||||
message.accountNumber !== undefined &&
|
||||
(obj.accountNumber = (message.accountNumber || Long.UZERO).toString());
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseTxBody: object = { memo: "", timeoutHeight: Long.UZERO };
|
||||
@ -506,8 +518,12 @@ export const TxBody = {
|
||||
for (const v of message.messages) {
|
||||
Any.encode(v!, writer.uint32(10).fork()).ldelim();
|
||||
}
|
||||
writer.uint32(18).string(message.memo);
|
||||
writer.uint32(24).uint64(message.timeoutHeight);
|
||||
if (message.memo !== "") {
|
||||
writer.uint32(18).string(message.memo);
|
||||
}
|
||||
if (!message.timeoutHeight.isZero()) {
|
||||
writer.uint32(24).uint64(message.timeoutHeight);
|
||||
}
|
||||
for (const v of message.extensionOptions) {
|
||||
Any.encode(v!, writer.uint32(8186).fork()).ldelim();
|
||||
}
|
||||
@ -583,6 +599,31 @@ export const TxBody = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: TxBody): unknown {
|
||||
const obj: any = {};
|
||||
if (message.messages) {
|
||||
obj.messages = message.messages.map((e) => (e ? Any.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.messages = [];
|
||||
}
|
||||
message.memo !== undefined && (obj.memo = message.memo);
|
||||
message.timeoutHeight !== undefined &&
|
||||
(obj.timeoutHeight = (message.timeoutHeight || Long.UZERO).toString());
|
||||
if (message.extensionOptions) {
|
||||
obj.extensionOptions = message.extensionOptions.map((e) => (e ? Any.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.extensionOptions = [];
|
||||
}
|
||||
if (message.nonCriticalExtensionOptions) {
|
||||
obj.nonCriticalExtensionOptions = message.nonCriticalExtensionOptions.map((e) =>
|
||||
e ? Any.toJSON(e) : undefined,
|
||||
);
|
||||
} else {
|
||||
obj.nonCriticalExtensionOptions = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<TxBody>): TxBody {
|
||||
const message = { ...baseTxBody } as TxBody;
|
||||
message.messages = [];
|
||||
@ -615,31 +656,6 @@ export const TxBody = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: TxBody): unknown {
|
||||
const obj: any = {};
|
||||
if (message.messages) {
|
||||
obj.messages = message.messages.map((e) => (e ? Any.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.messages = [];
|
||||
}
|
||||
message.memo !== undefined && (obj.memo = message.memo);
|
||||
message.timeoutHeight !== undefined &&
|
||||
(obj.timeoutHeight = (message.timeoutHeight || Long.UZERO).toString());
|
||||
if (message.extensionOptions) {
|
||||
obj.extensionOptions = message.extensionOptions.map((e) => (e ? Any.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.extensionOptions = [];
|
||||
}
|
||||
if (message.nonCriticalExtensionOptions) {
|
||||
obj.nonCriticalExtensionOptions = message.nonCriticalExtensionOptions.map((e) =>
|
||||
e ? Any.toJSON(e) : undefined,
|
||||
);
|
||||
} else {
|
||||
obj.nonCriticalExtensionOptions = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseAuthInfo: object = {};
|
||||
@ -649,7 +665,7 @@ export const AuthInfo = {
|
||||
for (const v of message.signerInfos) {
|
||||
SignerInfo.encode(v!, writer.uint32(10).fork()).ldelim();
|
||||
}
|
||||
if (message.fee !== undefined && message.fee !== undefined) {
|
||||
if (message.fee !== undefined) {
|
||||
Fee.encode(message.fee, writer.uint32(18).fork()).ldelim();
|
||||
}
|
||||
return writer;
|
||||
@ -693,6 +709,17 @@ export const AuthInfo = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: AuthInfo): unknown {
|
||||
const obj: any = {};
|
||||
if (message.signerInfos) {
|
||||
obj.signerInfos = message.signerInfos.map((e) => (e ? SignerInfo.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.signerInfos = [];
|
||||
}
|
||||
message.fee !== undefined && (obj.fee = message.fee ? Fee.toJSON(message.fee) : undefined);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<AuthInfo>): AuthInfo {
|
||||
const message = { ...baseAuthInfo } as AuthInfo;
|
||||
message.signerInfos = [];
|
||||
@ -708,30 +735,21 @@ export const AuthInfo = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: AuthInfo): unknown {
|
||||
const obj: any = {};
|
||||
if (message.signerInfos) {
|
||||
obj.signerInfos = message.signerInfos.map((e) => (e ? SignerInfo.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.signerInfos = [];
|
||||
}
|
||||
message.fee !== undefined && (obj.fee = message.fee ? Fee.toJSON(message.fee) : undefined);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseSignerInfo: object = { sequence: Long.UZERO };
|
||||
|
||||
export const SignerInfo = {
|
||||
encode(message: SignerInfo, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
if (message.publicKey !== undefined && message.publicKey !== undefined) {
|
||||
if (message.publicKey !== undefined) {
|
||||
Any.encode(message.publicKey, writer.uint32(10).fork()).ldelim();
|
||||
}
|
||||
if (message.modeInfo !== undefined && message.modeInfo !== undefined) {
|
||||
if (message.modeInfo !== undefined) {
|
||||
ModeInfo.encode(message.modeInfo, writer.uint32(18).fork()).ldelim();
|
||||
}
|
||||
writer.uint32(24).uint64(message.sequence);
|
||||
if (!message.sequence.isZero()) {
|
||||
writer.uint32(24).uint64(message.sequence);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -779,6 +797,16 @@ export const SignerInfo = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: SignerInfo): unknown {
|
||||
const obj: any = {};
|
||||
message.publicKey !== undefined &&
|
||||
(obj.publicKey = message.publicKey ? Any.toJSON(message.publicKey) : undefined);
|
||||
message.modeInfo !== undefined &&
|
||||
(obj.modeInfo = message.modeInfo ? ModeInfo.toJSON(message.modeInfo) : undefined);
|
||||
message.sequence !== undefined && (obj.sequence = (message.sequence || Long.UZERO).toString());
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<SignerInfo>): SignerInfo {
|
||||
const message = { ...baseSignerInfo } as SignerInfo;
|
||||
if (object.publicKey !== undefined && object.publicKey !== null) {
|
||||
@ -798,16 +826,6 @@ export const SignerInfo = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: SignerInfo): unknown {
|
||||
const obj: any = {};
|
||||
message.publicKey !== undefined &&
|
||||
(obj.publicKey = message.publicKey ? Any.toJSON(message.publicKey) : undefined);
|
||||
message.modeInfo !== undefined &&
|
||||
(obj.modeInfo = message.modeInfo ? ModeInfo.toJSON(message.modeInfo) : undefined);
|
||||
message.sequence !== undefined && (obj.sequence = (message.sequence || Long.UZERO).toString());
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseModeInfo: object = {};
|
||||
@ -859,6 +877,15 @@ export const ModeInfo = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: ModeInfo): unknown {
|
||||
const obj: any = {};
|
||||
message.single !== undefined &&
|
||||
(obj.single = message.single ? ModeInfo_Single.toJSON(message.single) : undefined);
|
||||
message.multi !== undefined &&
|
||||
(obj.multi = message.multi ? ModeInfo_Multi.toJSON(message.multi) : undefined);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<ModeInfo>): ModeInfo {
|
||||
const message = { ...baseModeInfo } as ModeInfo;
|
||||
if (object.single !== undefined && object.single !== null) {
|
||||
@ -873,22 +900,15 @@ export const ModeInfo = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: ModeInfo): unknown {
|
||||
const obj: any = {};
|
||||
message.single !== undefined &&
|
||||
(obj.single = message.single ? ModeInfo_Single.toJSON(message.single) : undefined);
|
||||
message.multi !== undefined &&
|
||||
(obj.multi = message.multi ? ModeInfo_Multi.toJSON(message.multi) : undefined);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseModeInfo_Single: object = { mode: 0 };
|
||||
|
||||
export const ModeInfo_Single = {
|
||||
encode(message: ModeInfo_Single, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(8).int32(message.mode);
|
||||
if (message.mode !== 0) {
|
||||
writer.uint32(8).int32(message.mode);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -920,6 +940,12 @@ export const ModeInfo_Single = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: ModeInfo_Single): unknown {
|
||||
const obj: any = {};
|
||||
message.mode !== undefined && (obj.mode = signModeToJSON(message.mode));
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<ModeInfo_Single>): ModeInfo_Single {
|
||||
const message = { ...baseModeInfo_Single } as ModeInfo_Single;
|
||||
if (object.mode !== undefined && object.mode !== null) {
|
||||
@ -929,19 +955,13 @@ export const ModeInfo_Single = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: ModeInfo_Single): unknown {
|
||||
const obj: any = {};
|
||||
message.mode !== undefined && (obj.mode = signModeToJSON(message.mode));
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseModeInfo_Multi: object = {};
|
||||
|
||||
export const ModeInfo_Multi = {
|
||||
encode(message: ModeInfo_Multi, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
if (message.bitarray !== undefined && message.bitarray !== undefined) {
|
||||
if (message.bitarray !== undefined) {
|
||||
CompactBitArray.encode(message.bitarray, writer.uint32(10).fork()).ldelim();
|
||||
}
|
||||
for (const v of message.modeInfos) {
|
||||
@ -988,6 +1008,18 @@ export const ModeInfo_Multi = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: ModeInfo_Multi): unknown {
|
||||
const obj: any = {};
|
||||
message.bitarray !== undefined &&
|
||||
(obj.bitarray = message.bitarray ? CompactBitArray.toJSON(message.bitarray) : undefined);
|
||||
if (message.modeInfos) {
|
||||
obj.modeInfos = message.modeInfos.map((e) => (e ? ModeInfo.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.modeInfos = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<ModeInfo_Multi>): ModeInfo_Multi {
|
||||
const message = { ...baseModeInfo_Multi } as ModeInfo_Multi;
|
||||
message.modeInfos = [];
|
||||
@ -1003,18 +1035,6 @@ export const ModeInfo_Multi = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: ModeInfo_Multi): unknown {
|
||||
const obj: any = {};
|
||||
message.bitarray !== undefined &&
|
||||
(obj.bitarray = message.bitarray ? CompactBitArray.toJSON(message.bitarray) : undefined);
|
||||
if (message.modeInfos) {
|
||||
obj.modeInfos = message.modeInfos.map((e) => (e ? ModeInfo.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.modeInfos = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseFee: object = { gasLimit: Long.UZERO, payer: "", granter: "" };
|
||||
@ -1024,9 +1044,15 @@ export const Fee = {
|
||||
for (const v of message.amount) {
|
||||
Coin.encode(v!, writer.uint32(10).fork()).ldelim();
|
||||
}
|
||||
writer.uint32(16).uint64(message.gasLimit);
|
||||
writer.uint32(26).string(message.payer);
|
||||
writer.uint32(34).string(message.granter);
|
||||
if (!message.gasLimit.isZero()) {
|
||||
writer.uint32(16).uint64(message.gasLimit);
|
||||
}
|
||||
if (message.payer !== "") {
|
||||
writer.uint32(26).string(message.payer);
|
||||
}
|
||||
if (message.granter !== "") {
|
||||
writer.uint32(34).string(message.granter);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -1084,6 +1110,19 @@ export const Fee = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Fee): unknown {
|
||||
const obj: any = {};
|
||||
if (message.amount) {
|
||||
obj.amount = message.amount.map((e) => (e ? Coin.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.amount = [];
|
||||
}
|
||||
message.gasLimit !== undefined && (obj.gasLimit = (message.gasLimit || Long.UZERO).toString());
|
||||
message.payer !== undefined && (obj.payer = message.payer);
|
||||
message.granter !== undefined && (obj.granter = message.granter);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<Fee>): Fee {
|
||||
const message = { ...baseFee } as Fee;
|
||||
message.amount = [];
|
||||
@ -1109,19 +1148,6 @@ export const Fee = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Fee): unknown {
|
||||
const obj: any = {};
|
||||
if (message.amount) {
|
||||
obj.amount = message.amount.map((e) => (e ? Coin.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.amount = [];
|
||||
}
|
||||
message.gasLimit !== undefined && (obj.gasLimit = (message.gasLimit || Long.UZERO).toString());
|
||||
message.payer !== undefined && (obj.payer = message.payer);
|
||||
message.granter !== undefined && (obj.granter = message.granter);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
declare var self: any | undefined;
|
||||
@ -1131,7 +1157,7 @@ var globalThis: any = (() => {
|
||||
if (typeof self !== "undefined") return self;
|
||||
if (typeof window !== "undefined") return window;
|
||||
if (typeof global !== "undefined") return global;
|
||||
throw new Error("Unable to locate global object");
|
||||
throw "Unable to locate global object";
|
||||
})();
|
||||
|
||||
const atob: (b64: string) => string =
|
||||
|
||||
@ -124,8 +124,12 @@ const baseAny: object = { typeUrl: "" };
|
||||
|
||||
export const Any = {
|
||||
encode(message: Any, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.typeUrl);
|
||||
writer.uint32(18).bytes(message.value);
|
||||
if (message.typeUrl !== "") {
|
||||
writer.uint32(10).string(message.typeUrl);
|
||||
}
|
||||
if (message.value.length !== 0) {
|
||||
writer.uint32(18).bytes(message.value);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -163,6 +167,14 @@ export const Any = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Any): unknown {
|
||||
const obj: any = {};
|
||||
message.typeUrl !== undefined && (obj.typeUrl = message.typeUrl);
|
||||
message.value !== undefined &&
|
||||
(obj.value = base64FromBytes(message.value !== undefined ? message.value : new Uint8Array()));
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<Any>): Any {
|
||||
const message = { ...baseAny } as Any;
|
||||
if (object.typeUrl !== undefined && object.typeUrl !== null) {
|
||||
@ -177,14 +189,6 @@ export const Any = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Any): unknown {
|
||||
const obj: any = {};
|
||||
message.typeUrl !== undefined && (obj.typeUrl = message.typeUrl);
|
||||
message.value !== undefined &&
|
||||
(obj.value = base64FromBytes(message.value !== undefined ? message.value : new Uint8Array()));
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
declare var self: any | undefined;
|
||||
@ -194,7 +198,7 @@ var globalThis: any = (() => {
|
||||
if (typeof self !== "undefined") return self;
|
||||
if (typeof window !== "undefined") return window;
|
||||
if (typeof global !== "undefined") return global;
|
||||
throw new Error("Unable to locate global object");
|
||||
throw "Unable to locate global object";
|
||||
})();
|
||||
|
||||
const atob: (b64: string) => string =
|
||||
|
||||
@ -86,8 +86,12 @@ const baseDuration: object = { seconds: Long.ZERO, nanos: 0 };
|
||||
|
||||
export const Duration = {
|
||||
encode(message: Duration, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(8).int64(message.seconds);
|
||||
writer.uint32(16).int32(message.nanos);
|
||||
if (!message.seconds.isZero()) {
|
||||
writer.uint32(8).int64(message.seconds);
|
||||
}
|
||||
if (message.nanos !== 0) {
|
||||
writer.uint32(16).int32(message.nanos);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -127,6 +131,13 @@ export const Duration = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Duration): unknown {
|
||||
const obj: any = {};
|
||||
message.seconds !== undefined && (obj.seconds = (message.seconds || Long.ZERO).toString());
|
||||
message.nanos !== undefined && (obj.nanos = message.nanos);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<Duration>): Duration {
|
||||
const message = { ...baseDuration } as Duration;
|
||||
if (object.seconds !== undefined && object.seconds !== null) {
|
||||
@ -141,13 +152,6 @@ export const Duration = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Duration): unknown {
|
||||
const obj: any = {};
|
||||
message.seconds !== undefined && (obj.seconds = (message.seconds || Long.ZERO).toString());
|
||||
message.nanos !== undefined && (obj.nanos = message.nanos);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
type Builtin = Date | Function | Uint8Array | string | number | undefined | Long;
|
||||
|
||||
@ -117,8 +117,12 @@ const baseTimestamp: object = { seconds: Long.ZERO, nanos: 0 };
|
||||
|
||||
export const Timestamp = {
|
||||
encode(message: Timestamp, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(8).int64(message.seconds);
|
||||
writer.uint32(16).int32(message.nanos);
|
||||
if (!message.seconds.isZero()) {
|
||||
writer.uint32(8).int64(message.seconds);
|
||||
}
|
||||
if (message.nanos !== 0) {
|
||||
writer.uint32(16).int32(message.nanos);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -158,6 +162,13 @@ export const Timestamp = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Timestamp): unknown {
|
||||
const obj: any = {};
|
||||
message.seconds !== undefined && (obj.seconds = (message.seconds || Long.ZERO).toString());
|
||||
message.nanos !== undefined && (obj.nanos = message.nanos);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<Timestamp>): Timestamp {
|
||||
const message = { ...baseTimestamp } as Timestamp;
|
||||
if (object.seconds !== undefined && object.seconds !== null) {
|
||||
@ -172,13 +183,6 @@ export const Timestamp = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Timestamp): unknown {
|
||||
const obj: any = {};
|
||||
message.seconds !== undefined && (obj.seconds = (message.seconds || Long.ZERO).toString());
|
||||
message.nanos !== undefined && (obj.nanos = message.nanos);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
type Builtin = Date | Function | Uint8Array | string | number | undefined | Long;
|
||||
|
||||
@ -227,15 +227,21 @@ const baseChannel: object = { state: 0, ordering: 0, connectionHops: "", version
|
||||
|
||||
export const Channel = {
|
||||
encode(message: Channel, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(8).int32(message.state);
|
||||
writer.uint32(16).int32(message.ordering);
|
||||
if (message.counterparty !== undefined && message.counterparty !== undefined) {
|
||||
if (message.state !== 0) {
|
||||
writer.uint32(8).int32(message.state);
|
||||
}
|
||||
if (message.ordering !== 0) {
|
||||
writer.uint32(16).int32(message.ordering);
|
||||
}
|
||||
if (message.counterparty !== undefined) {
|
||||
Counterparty.encode(message.counterparty, writer.uint32(26).fork()).ldelim();
|
||||
}
|
||||
for (const v of message.connectionHops) {
|
||||
writer.uint32(34).string(v!);
|
||||
}
|
||||
writer.uint32(42).string(message.version);
|
||||
if (message.version !== "") {
|
||||
writer.uint32(42).string(message.version);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -301,6 +307,21 @@ export const Channel = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Channel): unknown {
|
||||
const obj: any = {};
|
||||
message.state !== undefined && (obj.state = stateToJSON(message.state));
|
||||
message.ordering !== undefined && (obj.ordering = orderToJSON(message.ordering));
|
||||
message.counterparty !== undefined &&
|
||||
(obj.counterparty = message.counterparty ? Counterparty.toJSON(message.counterparty) : undefined);
|
||||
if (message.connectionHops) {
|
||||
obj.connectionHops = message.connectionHops.map((e) => e);
|
||||
} else {
|
||||
obj.connectionHops = [];
|
||||
}
|
||||
message.version !== undefined && (obj.version = message.version);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<Channel>): Channel {
|
||||
const message = { ...baseChannel } as Channel;
|
||||
message.connectionHops = [];
|
||||
@ -331,21 +352,6 @@ export const Channel = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Channel): unknown {
|
||||
const obj: any = {};
|
||||
message.state !== undefined && (obj.state = stateToJSON(message.state));
|
||||
message.ordering !== undefined && (obj.ordering = orderToJSON(message.ordering));
|
||||
message.counterparty !== undefined &&
|
||||
(obj.counterparty = message.counterparty ? Counterparty.toJSON(message.counterparty) : undefined);
|
||||
if (message.connectionHops) {
|
||||
obj.connectionHops = message.connectionHops.map((e) => e);
|
||||
} else {
|
||||
obj.connectionHops = [];
|
||||
}
|
||||
message.version !== undefined && (obj.version = message.version);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseIdentifiedChannel: object = {
|
||||
@ -359,17 +365,27 @@ const baseIdentifiedChannel: object = {
|
||||
|
||||
export const IdentifiedChannel = {
|
||||
encode(message: IdentifiedChannel, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(8).int32(message.state);
|
||||
writer.uint32(16).int32(message.ordering);
|
||||
if (message.counterparty !== undefined && message.counterparty !== undefined) {
|
||||
if (message.state !== 0) {
|
||||
writer.uint32(8).int32(message.state);
|
||||
}
|
||||
if (message.ordering !== 0) {
|
||||
writer.uint32(16).int32(message.ordering);
|
||||
}
|
||||
if (message.counterparty !== undefined) {
|
||||
Counterparty.encode(message.counterparty, writer.uint32(26).fork()).ldelim();
|
||||
}
|
||||
for (const v of message.connectionHops) {
|
||||
writer.uint32(34).string(v!);
|
||||
}
|
||||
writer.uint32(42).string(message.version);
|
||||
writer.uint32(50).string(message.portId);
|
||||
writer.uint32(58).string(message.channelId);
|
||||
if (message.version !== "") {
|
||||
writer.uint32(42).string(message.version);
|
||||
}
|
||||
if (message.portId !== "") {
|
||||
writer.uint32(50).string(message.portId);
|
||||
}
|
||||
if (message.channelId !== "") {
|
||||
writer.uint32(58).string(message.channelId);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -451,6 +467,23 @@ export const IdentifiedChannel = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: IdentifiedChannel): unknown {
|
||||
const obj: any = {};
|
||||
message.state !== undefined && (obj.state = stateToJSON(message.state));
|
||||
message.ordering !== undefined && (obj.ordering = orderToJSON(message.ordering));
|
||||
message.counterparty !== undefined &&
|
||||
(obj.counterparty = message.counterparty ? Counterparty.toJSON(message.counterparty) : undefined);
|
||||
if (message.connectionHops) {
|
||||
obj.connectionHops = message.connectionHops.map((e) => e);
|
||||
} else {
|
||||
obj.connectionHops = [];
|
||||
}
|
||||
message.version !== undefined && (obj.version = message.version);
|
||||
message.portId !== undefined && (obj.portId = message.portId);
|
||||
message.channelId !== undefined && (obj.channelId = message.channelId);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<IdentifiedChannel>): IdentifiedChannel {
|
||||
const message = { ...baseIdentifiedChannel } as IdentifiedChannel;
|
||||
message.connectionHops = [];
|
||||
@ -491,31 +524,18 @@ export const IdentifiedChannel = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: IdentifiedChannel): unknown {
|
||||
const obj: any = {};
|
||||
message.state !== undefined && (obj.state = stateToJSON(message.state));
|
||||
message.ordering !== undefined && (obj.ordering = orderToJSON(message.ordering));
|
||||
message.counterparty !== undefined &&
|
||||
(obj.counterparty = message.counterparty ? Counterparty.toJSON(message.counterparty) : undefined);
|
||||
if (message.connectionHops) {
|
||||
obj.connectionHops = message.connectionHops.map((e) => e);
|
||||
} else {
|
||||
obj.connectionHops = [];
|
||||
}
|
||||
message.version !== undefined && (obj.version = message.version);
|
||||
message.portId !== undefined && (obj.portId = message.portId);
|
||||
message.channelId !== undefined && (obj.channelId = message.channelId);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseCounterparty: object = { portId: "", channelId: "" };
|
||||
|
||||
export const Counterparty = {
|
||||
encode(message: Counterparty, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.portId);
|
||||
writer.uint32(18).string(message.channelId);
|
||||
if (message.portId !== "") {
|
||||
writer.uint32(10).string(message.portId);
|
||||
}
|
||||
if (message.channelId !== "") {
|
||||
writer.uint32(18).string(message.channelId);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -555,6 +575,13 @@ export const Counterparty = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Counterparty): unknown {
|
||||
const obj: any = {};
|
||||
message.portId !== undefined && (obj.portId = message.portId);
|
||||
message.channelId !== undefined && (obj.channelId = message.channelId);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<Counterparty>): Counterparty {
|
||||
const message = { ...baseCounterparty } as Counterparty;
|
||||
if (object.portId !== undefined && object.portId !== null) {
|
||||
@ -569,13 +596,6 @@ export const Counterparty = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Counterparty): unknown {
|
||||
const obj: any = {};
|
||||
message.portId !== undefined && (obj.portId = message.portId);
|
||||
message.channelId !== undefined && (obj.channelId = message.channelId);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const basePacket: object = {
|
||||
@ -589,16 +609,30 @@ const basePacket: object = {
|
||||
|
||||
export const Packet = {
|
||||
encode(message: Packet, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(8).uint64(message.sequence);
|
||||
writer.uint32(18).string(message.sourcePort);
|
||||
writer.uint32(26).string(message.sourceChannel);
|
||||
writer.uint32(34).string(message.destinationPort);
|
||||
writer.uint32(42).string(message.destinationChannel);
|
||||
writer.uint32(50).bytes(message.data);
|
||||
if (message.timeoutHeight !== undefined && message.timeoutHeight !== undefined) {
|
||||
if (!message.sequence.isZero()) {
|
||||
writer.uint32(8).uint64(message.sequence);
|
||||
}
|
||||
if (message.sourcePort !== "") {
|
||||
writer.uint32(18).string(message.sourcePort);
|
||||
}
|
||||
if (message.sourceChannel !== "") {
|
||||
writer.uint32(26).string(message.sourceChannel);
|
||||
}
|
||||
if (message.destinationPort !== "") {
|
||||
writer.uint32(34).string(message.destinationPort);
|
||||
}
|
||||
if (message.destinationChannel !== "") {
|
||||
writer.uint32(42).string(message.destinationChannel);
|
||||
}
|
||||
if (message.data.length !== 0) {
|
||||
writer.uint32(50).bytes(message.data);
|
||||
}
|
||||
if (message.timeoutHeight !== undefined) {
|
||||
Height.encode(message.timeoutHeight, writer.uint32(58).fork()).ldelim();
|
||||
}
|
||||
writer.uint32(64).uint64(message.timeoutTimestamp);
|
||||
if (!message.timeoutTimestamp.isZero()) {
|
||||
writer.uint32(64).uint64(message.timeoutTimestamp);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -684,6 +718,22 @@ export const Packet = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Packet): unknown {
|
||||
const obj: any = {};
|
||||
message.sequence !== undefined && (obj.sequence = (message.sequence || Long.UZERO).toString());
|
||||
message.sourcePort !== undefined && (obj.sourcePort = message.sourcePort);
|
||||
message.sourceChannel !== undefined && (obj.sourceChannel = message.sourceChannel);
|
||||
message.destinationPort !== undefined && (obj.destinationPort = message.destinationPort);
|
||||
message.destinationChannel !== undefined && (obj.destinationChannel = message.destinationChannel);
|
||||
message.data !== undefined &&
|
||||
(obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array()));
|
||||
message.timeoutHeight !== undefined &&
|
||||
(obj.timeoutHeight = message.timeoutHeight ? Height.toJSON(message.timeoutHeight) : undefined);
|
||||
message.timeoutTimestamp !== undefined &&
|
||||
(obj.timeoutTimestamp = (message.timeoutTimestamp || Long.UZERO).toString());
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<Packet>): Packet {
|
||||
const message = { ...basePacket } as Packet;
|
||||
if (object.sequence !== undefined && object.sequence !== null) {
|
||||
@ -728,32 +778,24 @@ export const Packet = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Packet): unknown {
|
||||
const obj: any = {};
|
||||
message.sequence !== undefined && (obj.sequence = (message.sequence || Long.UZERO).toString());
|
||||
message.sourcePort !== undefined && (obj.sourcePort = message.sourcePort);
|
||||
message.sourceChannel !== undefined && (obj.sourceChannel = message.sourceChannel);
|
||||
message.destinationPort !== undefined && (obj.destinationPort = message.destinationPort);
|
||||
message.destinationChannel !== undefined && (obj.destinationChannel = message.destinationChannel);
|
||||
message.data !== undefined &&
|
||||
(obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array()));
|
||||
message.timeoutHeight !== undefined &&
|
||||
(obj.timeoutHeight = message.timeoutHeight ? Height.toJSON(message.timeoutHeight) : undefined);
|
||||
message.timeoutTimestamp !== undefined &&
|
||||
(obj.timeoutTimestamp = (message.timeoutTimestamp || Long.UZERO).toString());
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const basePacketState: object = { portId: "", channelId: "", sequence: Long.UZERO };
|
||||
|
||||
export const PacketState = {
|
||||
encode(message: PacketState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.portId);
|
||||
writer.uint32(18).string(message.channelId);
|
||||
writer.uint32(24).uint64(message.sequence);
|
||||
writer.uint32(34).bytes(message.data);
|
||||
if (message.portId !== "") {
|
||||
writer.uint32(10).string(message.portId);
|
||||
}
|
||||
if (message.channelId !== "") {
|
||||
writer.uint32(18).string(message.channelId);
|
||||
}
|
||||
if (!message.sequence.isZero()) {
|
||||
writer.uint32(24).uint64(message.sequence);
|
||||
}
|
||||
if (message.data.length !== 0) {
|
||||
writer.uint32(34).bytes(message.data);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -807,6 +849,16 @@ export const PacketState = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: PacketState): unknown {
|
||||
const obj: any = {};
|
||||
message.portId !== undefined && (obj.portId = message.portId);
|
||||
message.channelId !== undefined && (obj.channelId = message.channelId);
|
||||
message.sequence !== undefined && (obj.sequence = (message.sequence || Long.UZERO).toString());
|
||||
message.data !== undefined &&
|
||||
(obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array()));
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<PacketState>): PacketState {
|
||||
const message = { ...basePacketState } as PacketState;
|
||||
if (object.portId !== undefined && object.portId !== null) {
|
||||
@ -831,16 +883,6 @@ export const PacketState = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: PacketState): unknown {
|
||||
const obj: any = {};
|
||||
message.portId !== undefined && (obj.portId = message.portId);
|
||||
message.channelId !== undefined && (obj.channelId = message.channelId);
|
||||
message.sequence !== undefined && (obj.sequence = (message.sequence || Long.UZERO).toString());
|
||||
message.data !== undefined &&
|
||||
(obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array()));
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseAcknowledgement: object = {};
|
||||
@ -890,6 +932,14 @@ export const Acknowledgement = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Acknowledgement): unknown {
|
||||
const obj: any = {};
|
||||
message.result !== undefined &&
|
||||
(obj.result = message.result !== undefined ? base64FromBytes(message.result) : undefined);
|
||||
message.error !== undefined && (obj.error = message.error);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<Acknowledgement>): Acknowledgement {
|
||||
const message = { ...baseAcknowledgement } as Acknowledgement;
|
||||
if (object.result !== undefined && object.result !== null) {
|
||||
@ -904,14 +954,6 @@ export const Acknowledgement = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Acknowledgement): unknown {
|
||||
const obj: any = {};
|
||||
message.result !== undefined &&
|
||||
(obj.result = message.result !== undefined ? base64FromBytes(message.result) : undefined);
|
||||
message.error !== undefined && (obj.error = message.error);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
declare var self: any | undefined;
|
||||
@ -921,7 +963,7 @@ var globalThis: any = (() => {
|
||||
if (typeof self !== "undefined") return self;
|
||||
if (typeof window !== "undefined") return window;
|
||||
if (typeof global !== "undefined") return global;
|
||||
throw new Error("Unable to locate global object");
|
||||
throw "Unable to locate global object";
|
||||
})();
|
||||
|
||||
const atob: (b64: string) => string =
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -79,8 +79,10 @@ const baseIdentifiedClientState: object = { clientId: "" };
|
||||
|
||||
export const IdentifiedClientState = {
|
||||
encode(message: IdentifiedClientState, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.clientId);
|
||||
if (message.clientState !== undefined && message.clientState !== undefined) {
|
||||
if (message.clientId !== "") {
|
||||
writer.uint32(10).string(message.clientId);
|
||||
}
|
||||
if (message.clientState !== undefined) {
|
||||
Any.encode(message.clientState, writer.uint32(18).fork()).ldelim();
|
||||
}
|
||||
return writer;
|
||||
@ -122,6 +124,14 @@ export const IdentifiedClientState = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: IdentifiedClientState): unknown {
|
||||
const obj: any = {};
|
||||
message.clientId !== undefined && (obj.clientId = message.clientId);
|
||||
message.clientState !== undefined &&
|
||||
(obj.clientState = message.clientState ? Any.toJSON(message.clientState) : undefined);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<IdentifiedClientState>): IdentifiedClientState {
|
||||
const message = { ...baseIdentifiedClientState } as IdentifiedClientState;
|
||||
if (object.clientId !== undefined && object.clientId !== null) {
|
||||
@ -136,24 +146,16 @@ export const IdentifiedClientState = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: IdentifiedClientState): unknown {
|
||||
const obj: any = {};
|
||||
message.clientId !== undefined && (obj.clientId = message.clientId);
|
||||
message.clientState !== undefined &&
|
||||
(obj.clientState = message.clientState ? Any.toJSON(message.clientState) : undefined);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseConsensusStateWithHeight: object = {};
|
||||
|
||||
export const ConsensusStateWithHeight = {
|
||||
encode(message: ConsensusStateWithHeight, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
if (message.height !== undefined && message.height !== undefined) {
|
||||
if (message.height !== undefined) {
|
||||
Height.encode(message.height, writer.uint32(10).fork()).ldelim();
|
||||
}
|
||||
if (message.consensusState !== undefined && message.consensusState !== undefined) {
|
||||
if (message.consensusState !== undefined) {
|
||||
Any.encode(message.consensusState, writer.uint32(18).fork()).ldelim();
|
||||
}
|
||||
return writer;
|
||||
@ -195,6 +197,14 @@ export const ConsensusStateWithHeight = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: ConsensusStateWithHeight): unknown {
|
||||
const obj: any = {};
|
||||
message.height !== undefined && (obj.height = message.height ? Height.toJSON(message.height) : undefined);
|
||||
message.consensusState !== undefined &&
|
||||
(obj.consensusState = message.consensusState ? Any.toJSON(message.consensusState) : undefined);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<ConsensusStateWithHeight>): ConsensusStateWithHeight {
|
||||
const message = { ...baseConsensusStateWithHeight } as ConsensusStateWithHeight;
|
||||
if (object.height !== undefined && object.height !== null) {
|
||||
@ -209,21 +219,15 @@ export const ConsensusStateWithHeight = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: ConsensusStateWithHeight): unknown {
|
||||
const obj: any = {};
|
||||
message.height !== undefined && (obj.height = message.height ? Height.toJSON(message.height) : undefined);
|
||||
message.consensusState !== undefined &&
|
||||
(obj.consensusState = message.consensusState ? Any.toJSON(message.consensusState) : undefined);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseClientConsensusStates: object = { clientId: "" };
|
||||
|
||||
export const ClientConsensusStates = {
|
||||
encode(message: ClientConsensusStates, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.clientId);
|
||||
if (message.clientId !== "") {
|
||||
writer.uint32(10).string(message.clientId);
|
||||
}
|
||||
for (const v of message.consensusStates) {
|
||||
ConsensusStateWithHeight.encode(v!, writer.uint32(18).fork()).ldelim();
|
||||
}
|
||||
@ -268,6 +272,19 @@ export const ClientConsensusStates = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: ClientConsensusStates): unknown {
|
||||
const obj: any = {};
|
||||
message.clientId !== undefined && (obj.clientId = message.clientId);
|
||||
if (message.consensusStates) {
|
||||
obj.consensusStates = message.consensusStates.map((e) =>
|
||||
e ? ConsensusStateWithHeight.toJSON(e) : undefined,
|
||||
);
|
||||
} else {
|
||||
obj.consensusStates = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<ClientConsensusStates>): ClientConsensusStates {
|
||||
const message = { ...baseClientConsensusStates } as ClientConsensusStates;
|
||||
message.consensusStates = [];
|
||||
@ -283,29 +300,22 @@ export const ClientConsensusStates = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: ClientConsensusStates): unknown {
|
||||
const obj: any = {};
|
||||
message.clientId !== undefined && (obj.clientId = message.clientId);
|
||||
if (message.consensusStates) {
|
||||
obj.consensusStates = message.consensusStates.map((e) =>
|
||||
e ? ConsensusStateWithHeight.toJSON(e) : undefined,
|
||||
);
|
||||
} else {
|
||||
obj.consensusStates = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseClientUpdateProposal: object = { title: "", description: "", clientId: "" };
|
||||
|
||||
export const ClientUpdateProposal = {
|
||||
encode(message: ClientUpdateProposal, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.title);
|
||||
writer.uint32(18).string(message.description);
|
||||
writer.uint32(26).string(message.clientId);
|
||||
if (message.header !== undefined && message.header !== undefined) {
|
||||
if (message.title !== "") {
|
||||
writer.uint32(10).string(message.title);
|
||||
}
|
||||
if (message.description !== "") {
|
||||
writer.uint32(18).string(message.description);
|
||||
}
|
||||
if (message.clientId !== "") {
|
||||
writer.uint32(26).string(message.clientId);
|
||||
}
|
||||
if (message.header !== undefined) {
|
||||
Any.encode(message.header, writer.uint32(34).fork()).ldelim();
|
||||
}
|
||||
return writer;
|
||||
@ -363,6 +373,15 @@ export const ClientUpdateProposal = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: ClientUpdateProposal): unknown {
|
||||
const obj: any = {};
|
||||
message.title !== undefined && (obj.title = message.title);
|
||||
message.description !== undefined && (obj.description = message.description);
|
||||
message.clientId !== undefined && (obj.clientId = message.clientId);
|
||||
message.header !== undefined && (obj.header = message.header ? Any.toJSON(message.header) : undefined);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<ClientUpdateProposal>): ClientUpdateProposal {
|
||||
const message = { ...baseClientUpdateProposal } as ClientUpdateProposal;
|
||||
if (object.title !== undefined && object.title !== null) {
|
||||
@ -387,23 +406,18 @@ export const ClientUpdateProposal = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: ClientUpdateProposal): unknown {
|
||||
const obj: any = {};
|
||||
message.title !== undefined && (obj.title = message.title);
|
||||
message.description !== undefined && (obj.description = message.description);
|
||||
message.clientId !== undefined && (obj.clientId = message.clientId);
|
||||
message.header !== undefined && (obj.header = message.header ? Any.toJSON(message.header) : undefined);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseHeight: object = { revisionNumber: Long.UZERO, revisionHeight: Long.UZERO };
|
||||
|
||||
export const Height = {
|
||||
encode(message: Height, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(8).uint64(message.revisionNumber);
|
||||
writer.uint32(16).uint64(message.revisionHeight);
|
||||
if (!message.revisionNumber.isZero()) {
|
||||
writer.uint32(8).uint64(message.revisionNumber);
|
||||
}
|
||||
if (!message.revisionHeight.isZero()) {
|
||||
writer.uint32(16).uint64(message.revisionHeight);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -443,6 +457,15 @@ export const Height = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Height): unknown {
|
||||
const obj: any = {};
|
||||
message.revisionNumber !== undefined &&
|
||||
(obj.revisionNumber = (message.revisionNumber || Long.UZERO).toString());
|
||||
message.revisionHeight !== undefined &&
|
||||
(obj.revisionHeight = (message.revisionHeight || Long.UZERO).toString());
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<Height>): Height {
|
||||
const message = { ...baseHeight } as Height;
|
||||
if (object.revisionNumber !== undefined && object.revisionNumber !== null) {
|
||||
@ -457,15 +480,6 @@ export const Height = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Height): unknown {
|
||||
const obj: any = {};
|
||||
message.revisionNumber !== undefined &&
|
||||
(obj.revisionNumber = (message.revisionNumber || Long.UZERO).toString());
|
||||
message.revisionHeight !== undefined &&
|
||||
(obj.revisionHeight = (message.revisionHeight || Long.UZERO).toString());
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseParams: object = { allowedClients: "" };
|
||||
@ -508,6 +522,16 @@ export const Params = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Params): unknown {
|
||||
const obj: any = {};
|
||||
if (message.allowedClients) {
|
||||
obj.allowedClients = message.allowedClients.map((e) => e);
|
||||
} else {
|
||||
obj.allowedClients = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<Params>): Params {
|
||||
const message = { ...baseParams } as Params;
|
||||
message.allowedClients = [];
|
||||
@ -518,16 +542,6 @@ export const Params = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Params): unknown {
|
||||
const obj: any = {};
|
||||
if (message.allowedClients) {
|
||||
obj.allowedClients = message.allowedClients.map((e) => e);
|
||||
} else {
|
||||
obj.allowedClients = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
type Builtin = Date | Function | Uint8Array | string | number | undefined | Long;
|
||||
|
||||
@ -46,7 +46,9 @@ const baseMerkleRoot: object = {};
|
||||
|
||||
export const MerkleRoot = {
|
||||
encode(message: MerkleRoot, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).bytes(message.hash);
|
||||
if (message.hash.length !== 0) {
|
||||
writer.uint32(10).bytes(message.hash);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -76,6 +78,13 @@ export const MerkleRoot = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: MerkleRoot): unknown {
|
||||
const obj: any = {};
|
||||
message.hash !== undefined &&
|
||||
(obj.hash = base64FromBytes(message.hash !== undefined ? message.hash : new Uint8Array()));
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<MerkleRoot>): MerkleRoot {
|
||||
const message = { ...baseMerkleRoot } as MerkleRoot;
|
||||
if (object.hash !== undefined && object.hash !== null) {
|
||||
@ -85,20 +94,15 @@ export const MerkleRoot = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: MerkleRoot): unknown {
|
||||
const obj: any = {};
|
||||
message.hash !== undefined &&
|
||||
(obj.hash = base64FromBytes(message.hash !== undefined ? message.hash : new Uint8Array()));
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseMerklePrefix: object = {};
|
||||
|
||||
export const MerklePrefix = {
|
||||
encode(message: MerklePrefix, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).bytes(message.keyPrefix);
|
||||
if (message.keyPrefix.length !== 0) {
|
||||
writer.uint32(10).bytes(message.keyPrefix);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -128,6 +132,15 @@ export const MerklePrefix = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: MerklePrefix): unknown {
|
||||
const obj: any = {};
|
||||
message.keyPrefix !== undefined &&
|
||||
(obj.keyPrefix = base64FromBytes(
|
||||
message.keyPrefix !== undefined ? message.keyPrefix : new Uint8Array(),
|
||||
));
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<MerklePrefix>): MerklePrefix {
|
||||
const message = { ...baseMerklePrefix } as MerklePrefix;
|
||||
if (object.keyPrefix !== undefined && object.keyPrefix !== null) {
|
||||
@ -137,15 +150,6 @@ export const MerklePrefix = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: MerklePrefix): unknown {
|
||||
const obj: any = {};
|
||||
message.keyPrefix !== undefined &&
|
||||
(obj.keyPrefix = base64FromBytes(
|
||||
message.keyPrefix !== undefined ? message.keyPrefix : new Uint8Array(),
|
||||
));
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseMerklePath: object = { keyPath: "" };
|
||||
@ -188,6 +192,16 @@ export const MerklePath = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: MerklePath): unknown {
|
||||
const obj: any = {};
|
||||
if (message.keyPath) {
|
||||
obj.keyPath = message.keyPath.map((e) => e);
|
||||
} else {
|
||||
obj.keyPath = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<MerklePath>): MerklePath {
|
||||
const message = { ...baseMerklePath } as MerklePath;
|
||||
message.keyPath = [];
|
||||
@ -198,16 +212,6 @@ export const MerklePath = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: MerklePath): unknown {
|
||||
const obj: any = {};
|
||||
if (message.keyPath) {
|
||||
obj.keyPath = message.keyPath.map((e) => e);
|
||||
} else {
|
||||
obj.keyPath = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseMerkleProof: object = {};
|
||||
@ -250,6 +254,16 @@ export const MerkleProof = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: MerkleProof): unknown {
|
||||
const obj: any = {};
|
||||
if (message.proofs) {
|
||||
obj.proofs = message.proofs.map((e) => (e ? CommitmentProof.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.proofs = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<MerkleProof>): MerkleProof {
|
||||
const message = { ...baseMerkleProof } as MerkleProof;
|
||||
message.proofs = [];
|
||||
@ -260,16 +274,6 @@ export const MerkleProof = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: MerkleProof): unknown {
|
||||
const obj: any = {};
|
||||
if (message.proofs) {
|
||||
obj.proofs = message.proofs.map((e) => (e ? CommitmentProof.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.proofs = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
declare var self: any | undefined;
|
||||
@ -279,7 +283,7 @@ var globalThis: any = (() => {
|
||||
if (typeof self !== "undefined") return self;
|
||||
if (typeof window !== "undefined") return window;
|
||||
if (typeof global !== "undefined") return global;
|
||||
throw new Error("Unable to locate global object");
|
||||
throw "Unable to locate global object";
|
||||
})();
|
||||
|
||||
const atob: (b64: string) => string =
|
||||
|
||||
@ -152,15 +152,21 @@ const baseConnectionEnd: object = { clientId: "", state: 0, delayPeriod: Long.UZ
|
||||
|
||||
export const ConnectionEnd = {
|
||||
encode(message: ConnectionEnd, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.clientId);
|
||||
if (message.clientId !== "") {
|
||||
writer.uint32(10).string(message.clientId);
|
||||
}
|
||||
for (const v of message.versions) {
|
||||
Version.encode(v!, writer.uint32(18).fork()).ldelim();
|
||||
}
|
||||
writer.uint32(24).int32(message.state);
|
||||
if (message.counterparty !== undefined && message.counterparty !== undefined) {
|
||||
if (message.state !== 0) {
|
||||
writer.uint32(24).int32(message.state);
|
||||
}
|
||||
if (message.counterparty !== undefined) {
|
||||
Counterparty.encode(message.counterparty, writer.uint32(34).fork()).ldelim();
|
||||
}
|
||||
writer.uint32(40).uint64(message.delayPeriod);
|
||||
if (!message.delayPeriod.isZero()) {
|
||||
writer.uint32(40).uint64(message.delayPeriod);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -226,6 +232,21 @@ export const ConnectionEnd = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: ConnectionEnd): unknown {
|
||||
const obj: any = {};
|
||||
message.clientId !== undefined && (obj.clientId = message.clientId);
|
||||
if (message.versions) {
|
||||
obj.versions = message.versions.map((e) => (e ? Version.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.versions = [];
|
||||
}
|
||||
message.state !== undefined && (obj.state = stateToJSON(message.state));
|
||||
message.counterparty !== undefined &&
|
||||
(obj.counterparty = message.counterparty ? Counterparty.toJSON(message.counterparty) : undefined);
|
||||
message.delayPeriod !== undefined && (obj.delayPeriod = (message.delayPeriod || Long.UZERO).toString());
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<ConnectionEnd>): ConnectionEnd {
|
||||
const message = { ...baseConnectionEnd } as ConnectionEnd;
|
||||
message.versions = [];
|
||||
@ -256,37 +277,30 @@ export const ConnectionEnd = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: ConnectionEnd): unknown {
|
||||
const obj: any = {};
|
||||
message.clientId !== undefined && (obj.clientId = message.clientId);
|
||||
if (message.versions) {
|
||||
obj.versions = message.versions.map((e) => (e ? Version.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.versions = [];
|
||||
}
|
||||
message.state !== undefined && (obj.state = stateToJSON(message.state));
|
||||
message.counterparty !== undefined &&
|
||||
(obj.counterparty = message.counterparty ? Counterparty.toJSON(message.counterparty) : undefined);
|
||||
message.delayPeriod !== undefined && (obj.delayPeriod = (message.delayPeriod || Long.UZERO).toString());
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseIdentifiedConnection: object = { id: "", clientId: "", state: 0, delayPeriod: Long.UZERO };
|
||||
|
||||
export const IdentifiedConnection = {
|
||||
encode(message: IdentifiedConnection, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.id);
|
||||
writer.uint32(18).string(message.clientId);
|
||||
if (message.id !== "") {
|
||||
writer.uint32(10).string(message.id);
|
||||
}
|
||||
if (message.clientId !== "") {
|
||||
writer.uint32(18).string(message.clientId);
|
||||
}
|
||||
for (const v of message.versions) {
|
||||
Version.encode(v!, writer.uint32(26).fork()).ldelim();
|
||||
}
|
||||
writer.uint32(32).int32(message.state);
|
||||
if (message.counterparty !== undefined && message.counterparty !== undefined) {
|
||||
if (message.state !== 0) {
|
||||
writer.uint32(32).int32(message.state);
|
||||
}
|
||||
if (message.counterparty !== undefined) {
|
||||
Counterparty.encode(message.counterparty, writer.uint32(42).fork()).ldelim();
|
||||
}
|
||||
writer.uint32(48).uint64(message.delayPeriod);
|
||||
if (!message.delayPeriod.isZero()) {
|
||||
writer.uint32(48).uint64(message.delayPeriod);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -360,6 +374,22 @@ export const IdentifiedConnection = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: IdentifiedConnection): unknown {
|
||||
const obj: any = {};
|
||||
message.id !== undefined && (obj.id = message.id);
|
||||
message.clientId !== undefined && (obj.clientId = message.clientId);
|
||||
if (message.versions) {
|
||||
obj.versions = message.versions.map((e) => (e ? Version.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.versions = [];
|
||||
}
|
||||
message.state !== undefined && (obj.state = stateToJSON(message.state));
|
||||
message.counterparty !== undefined &&
|
||||
(obj.counterparty = message.counterparty ? Counterparty.toJSON(message.counterparty) : undefined);
|
||||
message.delayPeriod !== undefined && (obj.delayPeriod = (message.delayPeriod || Long.UZERO).toString());
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<IdentifiedConnection>): IdentifiedConnection {
|
||||
const message = { ...baseIdentifiedConnection } as IdentifiedConnection;
|
||||
message.versions = [];
|
||||
@ -395,31 +425,19 @@ export const IdentifiedConnection = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: IdentifiedConnection): unknown {
|
||||
const obj: any = {};
|
||||
message.id !== undefined && (obj.id = message.id);
|
||||
message.clientId !== undefined && (obj.clientId = message.clientId);
|
||||
if (message.versions) {
|
||||
obj.versions = message.versions.map((e) => (e ? Version.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.versions = [];
|
||||
}
|
||||
message.state !== undefined && (obj.state = stateToJSON(message.state));
|
||||
message.counterparty !== undefined &&
|
||||
(obj.counterparty = message.counterparty ? Counterparty.toJSON(message.counterparty) : undefined);
|
||||
message.delayPeriod !== undefined && (obj.delayPeriod = (message.delayPeriod || Long.UZERO).toString());
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseCounterparty: object = { clientId: "", connectionId: "" };
|
||||
|
||||
export const Counterparty = {
|
||||
encode(message: Counterparty, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.clientId);
|
||||
writer.uint32(18).string(message.connectionId);
|
||||
if (message.prefix !== undefined && message.prefix !== undefined) {
|
||||
if (message.clientId !== "") {
|
||||
writer.uint32(10).string(message.clientId);
|
||||
}
|
||||
if (message.connectionId !== "") {
|
||||
writer.uint32(18).string(message.connectionId);
|
||||
}
|
||||
if (message.prefix !== undefined) {
|
||||
MerklePrefix.encode(message.prefix, writer.uint32(26).fork()).ldelim();
|
||||
}
|
||||
return writer;
|
||||
@ -469,6 +487,15 @@ export const Counterparty = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Counterparty): unknown {
|
||||
const obj: any = {};
|
||||
message.clientId !== undefined && (obj.clientId = message.clientId);
|
||||
message.connectionId !== undefined && (obj.connectionId = message.connectionId);
|
||||
message.prefix !== undefined &&
|
||||
(obj.prefix = message.prefix ? MerklePrefix.toJSON(message.prefix) : undefined);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<Counterparty>): Counterparty {
|
||||
const message = { ...baseCounterparty } as Counterparty;
|
||||
if (object.clientId !== undefined && object.clientId !== null) {
|
||||
@ -488,15 +515,6 @@ export const Counterparty = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Counterparty): unknown {
|
||||
const obj: any = {};
|
||||
message.clientId !== undefined && (obj.clientId = message.clientId);
|
||||
message.connectionId !== undefined && (obj.connectionId = message.connectionId);
|
||||
message.prefix !== undefined &&
|
||||
(obj.prefix = message.prefix ? MerklePrefix.toJSON(message.prefix) : undefined);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseClientPaths: object = { paths: "" };
|
||||
@ -539,6 +557,16 @@ export const ClientPaths = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: ClientPaths): unknown {
|
||||
const obj: any = {};
|
||||
if (message.paths) {
|
||||
obj.paths = message.paths.map((e) => e);
|
||||
} else {
|
||||
obj.paths = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<ClientPaths>): ClientPaths {
|
||||
const message = { ...baseClientPaths } as ClientPaths;
|
||||
message.paths = [];
|
||||
@ -549,23 +577,15 @@ export const ClientPaths = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: ClientPaths): unknown {
|
||||
const obj: any = {};
|
||||
if (message.paths) {
|
||||
obj.paths = message.paths.map((e) => e);
|
||||
} else {
|
||||
obj.paths = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseConnectionPaths: object = { clientId: "", paths: "" };
|
||||
|
||||
export const ConnectionPaths = {
|
||||
encode(message: ConnectionPaths, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.clientId);
|
||||
if (message.clientId !== "") {
|
||||
writer.uint32(10).string(message.clientId);
|
||||
}
|
||||
for (const v of message.paths) {
|
||||
writer.uint32(18).string(v!);
|
||||
}
|
||||
@ -610,6 +630,17 @@ export const ConnectionPaths = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: ConnectionPaths): unknown {
|
||||
const obj: any = {};
|
||||
message.clientId !== undefined && (obj.clientId = message.clientId);
|
||||
if (message.paths) {
|
||||
obj.paths = message.paths.map((e) => e);
|
||||
} else {
|
||||
obj.paths = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<ConnectionPaths>): ConnectionPaths {
|
||||
const message = { ...baseConnectionPaths } as ConnectionPaths;
|
||||
message.paths = [];
|
||||
@ -625,24 +656,15 @@ export const ConnectionPaths = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: ConnectionPaths): unknown {
|
||||
const obj: any = {};
|
||||
message.clientId !== undefined && (obj.clientId = message.clientId);
|
||||
if (message.paths) {
|
||||
obj.paths = message.paths.map((e) => e);
|
||||
} else {
|
||||
obj.paths = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseVersion: object = { identifier: "", features: "" };
|
||||
|
||||
export const Version = {
|
||||
encode(message: Version, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.identifier);
|
||||
if (message.identifier !== "") {
|
||||
writer.uint32(10).string(message.identifier);
|
||||
}
|
||||
for (const v of message.features) {
|
||||
writer.uint32(18).string(v!);
|
||||
}
|
||||
@ -687,6 +709,17 @@ export const Version = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Version): unknown {
|
||||
const obj: any = {};
|
||||
message.identifier !== undefined && (obj.identifier = message.identifier);
|
||||
if (message.features) {
|
||||
obj.features = message.features.map((e) => e);
|
||||
} else {
|
||||
obj.features = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<Version>): Version {
|
||||
const message = { ...baseVersion } as Version;
|
||||
message.features = [];
|
||||
@ -702,17 +735,6 @@ export const Version = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Version): unknown {
|
||||
const obj: any = {};
|
||||
message.identifier !== undefined && (obj.identifier = message.identifier);
|
||||
if (message.features) {
|
||||
obj.features = message.features.map((e) => e);
|
||||
} else {
|
||||
obj.features = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
type Builtin = Date | Function | Uint8Array | string | number | undefined | Long;
|
||||
|
||||
@ -126,7 +126,9 @@ const baseQueryConnectionRequest: object = { connectionId: "" };
|
||||
|
||||
export const QueryConnectionRequest = {
|
||||
encode(message: QueryConnectionRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.connectionId);
|
||||
if (message.connectionId !== "") {
|
||||
writer.uint32(10).string(message.connectionId);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -158,6 +160,12 @@ export const QueryConnectionRequest = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryConnectionRequest): unknown {
|
||||
const obj: any = {};
|
||||
message.connectionId !== undefined && (obj.connectionId = message.connectionId);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<QueryConnectionRequest>): QueryConnectionRequest {
|
||||
const message = { ...baseQueryConnectionRequest } as QueryConnectionRequest;
|
||||
if (object.connectionId !== undefined && object.connectionId !== null) {
|
||||
@ -167,23 +175,19 @@ export const QueryConnectionRequest = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryConnectionRequest): unknown {
|
||||
const obj: any = {};
|
||||
message.connectionId !== undefined && (obj.connectionId = message.connectionId);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseQueryConnectionResponse: object = {};
|
||||
|
||||
export const QueryConnectionResponse = {
|
||||
encode(message: QueryConnectionResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
if (message.connection !== undefined && message.connection !== undefined) {
|
||||
if (message.connection !== undefined) {
|
||||
ConnectionEnd.encode(message.connection, writer.uint32(10).fork()).ldelim();
|
||||
}
|
||||
writer.uint32(18).bytes(message.proof);
|
||||
if (message.proofHeight !== undefined && message.proofHeight !== undefined) {
|
||||
if (message.proof.length !== 0) {
|
||||
writer.uint32(18).bytes(message.proof);
|
||||
}
|
||||
if (message.proofHeight !== undefined) {
|
||||
Height.encode(message.proofHeight, writer.uint32(26).fork()).ldelim();
|
||||
}
|
||||
return writer;
|
||||
@ -231,6 +235,17 @@ export const QueryConnectionResponse = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryConnectionResponse): unknown {
|
||||
const obj: any = {};
|
||||
message.connection !== undefined &&
|
||||
(obj.connection = message.connection ? ConnectionEnd.toJSON(message.connection) : undefined);
|
||||
message.proof !== undefined &&
|
||||
(obj.proof = base64FromBytes(message.proof !== undefined ? message.proof : new Uint8Array()));
|
||||
message.proofHeight !== undefined &&
|
||||
(obj.proofHeight = message.proofHeight ? Height.toJSON(message.proofHeight) : undefined);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<QueryConnectionResponse>): QueryConnectionResponse {
|
||||
const message = { ...baseQueryConnectionResponse } as QueryConnectionResponse;
|
||||
if (object.connection !== undefined && object.connection !== null) {
|
||||
@ -250,24 +265,13 @@ export const QueryConnectionResponse = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryConnectionResponse): unknown {
|
||||
const obj: any = {};
|
||||
message.connection !== undefined &&
|
||||
(obj.connection = message.connection ? ConnectionEnd.toJSON(message.connection) : undefined);
|
||||
message.proof !== undefined &&
|
||||
(obj.proof = base64FromBytes(message.proof !== undefined ? message.proof : new Uint8Array()));
|
||||
message.proofHeight !== undefined &&
|
||||
(obj.proofHeight = message.proofHeight ? Height.toJSON(message.proofHeight) : undefined);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseQueryConnectionsRequest: object = {};
|
||||
|
||||
export const QueryConnectionsRequest = {
|
||||
encode(message: QueryConnectionsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
if (message.pagination !== undefined && message.pagination !== undefined) {
|
||||
if (message.pagination !== undefined) {
|
||||
PageRequest.encode(message.pagination, writer.uint32(10).fork()).ldelim();
|
||||
}
|
||||
return writer;
|
||||
@ -301,6 +305,13 @@ export const QueryConnectionsRequest = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryConnectionsRequest): unknown {
|
||||
const obj: any = {};
|
||||
message.pagination !== undefined &&
|
||||
(obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<QueryConnectionsRequest>): QueryConnectionsRequest {
|
||||
const message = { ...baseQueryConnectionsRequest } as QueryConnectionsRequest;
|
||||
if (object.pagination !== undefined && object.pagination !== null) {
|
||||
@ -310,13 +321,6 @@ export const QueryConnectionsRequest = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryConnectionsRequest): unknown {
|
||||
const obj: any = {};
|
||||
message.pagination !== undefined &&
|
||||
(obj.pagination = message.pagination ? PageRequest.toJSON(message.pagination) : undefined);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseQueryConnectionsResponse: object = {};
|
||||
@ -326,10 +330,10 @@ export const QueryConnectionsResponse = {
|
||||
for (const v of message.connections) {
|
||||
IdentifiedConnection.encode(v!, writer.uint32(10).fork()).ldelim();
|
||||
}
|
||||
if (message.pagination !== undefined && message.pagination !== undefined) {
|
||||
if (message.pagination !== undefined) {
|
||||
PageResponse.encode(message.pagination, writer.uint32(18).fork()).ldelim();
|
||||
}
|
||||
if (message.height !== undefined && message.height !== undefined) {
|
||||
if (message.height !== undefined) {
|
||||
Height.encode(message.height, writer.uint32(26).fork()).ldelim();
|
||||
}
|
||||
return writer;
|
||||
@ -381,6 +385,19 @@ export const QueryConnectionsResponse = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryConnectionsResponse): unknown {
|
||||
const obj: any = {};
|
||||
if (message.connections) {
|
||||
obj.connections = message.connections.map((e) => (e ? IdentifiedConnection.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.connections = [];
|
||||
}
|
||||
message.pagination !== undefined &&
|
||||
(obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined);
|
||||
message.height !== undefined && (obj.height = message.height ? Height.toJSON(message.height) : undefined);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<QueryConnectionsResponse>): QueryConnectionsResponse {
|
||||
const message = { ...baseQueryConnectionsResponse } as QueryConnectionsResponse;
|
||||
message.connections = [];
|
||||
@ -401,26 +418,15 @@ export const QueryConnectionsResponse = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryConnectionsResponse): unknown {
|
||||
const obj: any = {};
|
||||
if (message.connections) {
|
||||
obj.connections = message.connections.map((e) => (e ? IdentifiedConnection.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.connections = [];
|
||||
}
|
||||
message.pagination !== undefined &&
|
||||
(obj.pagination = message.pagination ? PageResponse.toJSON(message.pagination) : undefined);
|
||||
message.height !== undefined && (obj.height = message.height ? Height.toJSON(message.height) : undefined);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseQueryClientConnectionsRequest: object = { clientId: "" };
|
||||
|
||||
export const QueryClientConnectionsRequest = {
|
||||
encode(message: QueryClientConnectionsRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.clientId);
|
||||
if (message.clientId !== "") {
|
||||
writer.uint32(10).string(message.clientId);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -452,6 +458,12 @@ export const QueryClientConnectionsRequest = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryClientConnectionsRequest): unknown {
|
||||
const obj: any = {};
|
||||
message.clientId !== undefined && (obj.clientId = message.clientId);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<QueryClientConnectionsRequest>): QueryClientConnectionsRequest {
|
||||
const message = { ...baseQueryClientConnectionsRequest } as QueryClientConnectionsRequest;
|
||||
if (object.clientId !== undefined && object.clientId !== null) {
|
||||
@ -461,12 +473,6 @@ export const QueryClientConnectionsRequest = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryClientConnectionsRequest): unknown {
|
||||
const obj: any = {};
|
||||
message.clientId !== undefined && (obj.clientId = message.clientId);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseQueryClientConnectionsResponse: object = { connectionPaths: "" };
|
||||
@ -476,8 +482,10 @@ export const QueryClientConnectionsResponse = {
|
||||
for (const v of message.connectionPaths) {
|
||||
writer.uint32(10).string(v!);
|
||||
}
|
||||
writer.uint32(18).bytes(message.proof);
|
||||
if (message.proofHeight !== undefined && message.proofHeight !== undefined) {
|
||||
if (message.proof.length !== 0) {
|
||||
writer.uint32(18).bytes(message.proof);
|
||||
}
|
||||
if (message.proofHeight !== undefined) {
|
||||
Height.encode(message.proofHeight, writer.uint32(26).fork()).ldelim();
|
||||
}
|
||||
return writer;
|
||||
@ -527,6 +535,20 @@ export const QueryClientConnectionsResponse = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryClientConnectionsResponse): unknown {
|
||||
const obj: any = {};
|
||||
if (message.connectionPaths) {
|
||||
obj.connectionPaths = message.connectionPaths.map((e) => e);
|
||||
} else {
|
||||
obj.connectionPaths = [];
|
||||
}
|
||||
message.proof !== undefined &&
|
||||
(obj.proof = base64FromBytes(message.proof !== undefined ? message.proof : new Uint8Array()));
|
||||
message.proofHeight !== undefined &&
|
||||
(obj.proofHeight = message.proofHeight ? Height.toJSON(message.proofHeight) : undefined);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<QueryClientConnectionsResponse>): QueryClientConnectionsResponse {
|
||||
const message = { ...baseQueryClientConnectionsResponse } as QueryClientConnectionsResponse;
|
||||
message.connectionPaths = [];
|
||||
@ -547,27 +569,15 @@ export const QueryClientConnectionsResponse = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryClientConnectionsResponse): unknown {
|
||||
const obj: any = {};
|
||||
if (message.connectionPaths) {
|
||||
obj.connectionPaths = message.connectionPaths.map((e) => e);
|
||||
} else {
|
||||
obj.connectionPaths = [];
|
||||
}
|
||||
message.proof !== undefined &&
|
||||
(obj.proof = base64FromBytes(message.proof !== undefined ? message.proof : new Uint8Array()));
|
||||
message.proofHeight !== undefined &&
|
||||
(obj.proofHeight = message.proofHeight ? Height.toJSON(message.proofHeight) : undefined);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseQueryConnectionClientStateRequest: object = { connectionId: "" };
|
||||
|
||||
export const QueryConnectionClientStateRequest = {
|
||||
encode(message: QueryConnectionClientStateRequest, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.connectionId);
|
||||
if (message.connectionId !== "") {
|
||||
writer.uint32(10).string(message.connectionId);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -599,6 +609,12 @@ export const QueryConnectionClientStateRequest = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryConnectionClientStateRequest): unknown {
|
||||
const obj: any = {};
|
||||
message.connectionId !== undefined && (obj.connectionId = message.connectionId);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<QueryConnectionClientStateRequest>): QueryConnectionClientStateRequest {
|
||||
const message = { ...baseQueryConnectionClientStateRequest } as QueryConnectionClientStateRequest;
|
||||
if (object.connectionId !== undefined && object.connectionId !== null) {
|
||||
@ -608,23 +624,19 @@ export const QueryConnectionClientStateRequest = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryConnectionClientStateRequest): unknown {
|
||||
const obj: any = {};
|
||||
message.connectionId !== undefined && (obj.connectionId = message.connectionId);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseQueryConnectionClientStateResponse: object = {};
|
||||
|
||||
export const QueryConnectionClientStateResponse = {
|
||||
encode(message: QueryConnectionClientStateResponse, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
if (message.identifiedClientState !== undefined && message.identifiedClientState !== undefined) {
|
||||
if (message.identifiedClientState !== undefined) {
|
||||
IdentifiedClientState.encode(message.identifiedClientState, writer.uint32(10).fork()).ldelim();
|
||||
}
|
||||
writer.uint32(18).bytes(message.proof);
|
||||
if (message.proofHeight !== undefined && message.proofHeight !== undefined) {
|
||||
if (message.proof.length !== 0) {
|
||||
writer.uint32(18).bytes(message.proof);
|
||||
}
|
||||
if (message.proofHeight !== undefined) {
|
||||
Height.encode(message.proofHeight, writer.uint32(26).fork()).ldelim();
|
||||
}
|
||||
return writer;
|
||||
@ -672,6 +684,19 @@ export const QueryConnectionClientStateResponse = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryConnectionClientStateResponse): unknown {
|
||||
const obj: any = {};
|
||||
message.identifiedClientState !== undefined &&
|
||||
(obj.identifiedClientState = message.identifiedClientState
|
||||
? IdentifiedClientState.toJSON(message.identifiedClientState)
|
||||
: undefined);
|
||||
message.proof !== undefined &&
|
||||
(obj.proof = base64FromBytes(message.proof !== undefined ? message.proof : new Uint8Array()));
|
||||
message.proofHeight !== undefined &&
|
||||
(obj.proofHeight = message.proofHeight ? Height.toJSON(message.proofHeight) : undefined);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<QueryConnectionClientStateResponse>): QueryConnectionClientStateResponse {
|
||||
const message = { ...baseQueryConnectionClientStateResponse } as QueryConnectionClientStateResponse;
|
||||
if (object.identifiedClientState !== undefined && object.identifiedClientState !== null) {
|
||||
@ -691,19 +716,6 @@ export const QueryConnectionClientStateResponse = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryConnectionClientStateResponse): unknown {
|
||||
const obj: any = {};
|
||||
message.identifiedClientState !== undefined &&
|
||||
(obj.identifiedClientState = message.identifiedClientState
|
||||
? IdentifiedClientState.toJSON(message.identifiedClientState)
|
||||
: undefined);
|
||||
message.proof !== undefined &&
|
||||
(obj.proof = base64FromBytes(message.proof !== undefined ? message.proof : new Uint8Array()));
|
||||
message.proofHeight !== undefined &&
|
||||
(obj.proofHeight = message.proofHeight ? Height.toJSON(message.proofHeight) : undefined);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseQueryConnectionConsensusStateRequest: object = {
|
||||
@ -717,9 +729,15 @@ export const QueryConnectionConsensusStateRequest = {
|
||||
message: QueryConnectionConsensusStateRequest,
|
||||
writer: _m0.Writer = _m0.Writer.create(),
|
||||
): _m0.Writer {
|
||||
writer.uint32(10).string(message.connectionId);
|
||||
writer.uint32(16).uint64(message.revisionNumber);
|
||||
writer.uint32(24).uint64(message.revisionHeight);
|
||||
if (message.connectionId !== "") {
|
||||
writer.uint32(10).string(message.connectionId);
|
||||
}
|
||||
if (!message.revisionNumber.isZero()) {
|
||||
writer.uint32(16).uint64(message.revisionNumber);
|
||||
}
|
||||
if (!message.revisionHeight.isZero()) {
|
||||
writer.uint32(24).uint64(message.revisionHeight);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -767,6 +785,16 @@ export const QueryConnectionConsensusStateRequest = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryConnectionConsensusStateRequest): unknown {
|
||||
const obj: any = {};
|
||||
message.connectionId !== undefined && (obj.connectionId = message.connectionId);
|
||||
message.revisionNumber !== undefined &&
|
||||
(obj.revisionNumber = (message.revisionNumber || Long.UZERO).toString());
|
||||
message.revisionHeight !== undefined &&
|
||||
(obj.revisionHeight = (message.revisionHeight || Long.UZERO).toString());
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(
|
||||
object: DeepPartial<QueryConnectionConsensusStateRequest>,
|
||||
): QueryConnectionConsensusStateRequest {
|
||||
@ -788,16 +816,6 @@ export const QueryConnectionConsensusStateRequest = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryConnectionConsensusStateRequest): unknown {
|
||||
const obj: any = {};
|
||||
message.connectionId !== undefined && (obj.connectionId = message.connectionId);
|
||||
message.revisionNumber !== undefined &&
|
||||
(obj.revisionNumber = (message.revisionNumber || Long.UZERO).toString());
|
||||
message.revisionHeight !== undefined &&
|
||||
(obj.revisionHeight = (message.revisionHeight || Long.UZERO).toString());
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseQueryConnectionConsensusStateResponse: object = { clientId: "" };
|
||||
@ -807,12 +825,16 @@ export const QueryConnectionConsensusStateResponse = {
|
||||
message: QueryConnectionConsensusStateResponse,
|
||||
writer: _m0.Writer = _m0.Writer.create(),
|
||||
): _m0.Writer {
|
||||
if (message.consensusState !== undefined && message.consensusState !== undefined) {
|
||||
if (message.consensusState !== undefined) {
|
||||
Any.encode(message.consensusState, writer.uint32(10).fork()).ldelim();
|
||||
}
|
||||
writer.uint32(18).string(message.clientId);
|
||||
writer.uint32(26).bytes(message.proof);
|
||||
if (message.proofHeight !== undefined && message.proofHeight !== undefined) {
|
||||
if (message.clientId !== "") {
|
||||
writer.uint32(18).string(message.clientId);
|
||||
}
|
||||
if (message.proof.length !== 0) {
|
||||
writer.uint32(26).bytes(message.proof);
|
||||
}
|
||||
if (message.proofHeight !== undefined) {
|
||||
Height.encode(message.proofHeight, writer.uint32(34).fork()).ldelim();
|
||||
}
|
||||
return writer;
|
||||
@ -868,6 +890,18 @@ export const QueryConnectionConsensusStateResponse = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryConnectionConsensusStateResponse): unknown {
|
||||
const obj: any = {};
|
||||
message.consensusState !== undefined &&
|
||||
(obj.consensusState = message.consensusState ? Any.toJSON(message.consensusState) : undefined);
|
||||
message.clientId !== undefined && (obj.clientId = message.clientId);
|
||||
message.proof !== undefined &&
|
||||
(obj.proof = base64FromBytes(message.proof !== undefined ? message.proof : new Uint8Array()));
|
||||
message.proofHeight !== undefined &&
|
||||
(obj.proofHeight = message.proofHeight ? Height.toJSON(message.proofHeight) : undefined);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(
|
||||
object: DeepPartial<QueryConnectionConsensusStateResponse>,
|
||||
): QueryConnectionConsensusStateResponse {
|
||||
@ -894,18 +928,6 @@ export const QueryConnectionConsensusStateResponse = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: QueryConnectionConsensusStateResponse): unknown {
|
||||
const obj: any = {};
|
||||
message.consensusState !== undefined &&
|
||||
(obj.consensusState = message.consensusState ? Any.toJSON(message.consensusState) : undefined);
|
||||
message.clientId !== undefined && (obj.clientId = message.clientId);
|
||||
message.proof !== undefined &&
|
||||
(obj.proof = base64FromBytes(message.proof !== undefined ? message.proof : new Uint8Array()));
|
||||
message.proofHeight !== undefined &&
|
||||
(obj.proofHeight = message.proofHeight ? Height.toJSON(message.proofHeight) : undefined);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
/** Query provides defines the gRPC querier service */
|
||||
@ -986,7 +1008,7 @@ var globalThis: any = (() => {
|
||||
if (typeof self !== "undefined") return self;
|
||||
if (typeof window !== "undefined") return window;
|
||||
if (typeof global !== "undefined") return global;
|
||||
throw new Error("Unable to locate global object");
|
||||
throw "Unable to locate global object";
|
||||
})();
|
||||
|
||||
const atob: (b64: string) => string =
|
||||
|
||||
File diff suppressed because it is too large
Load Diff
@ -55,6 +55,15 @@ export const PublicKey = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: PublicKey): unknown {
|
||||
const obj: any = {};
|
||||
message.ed25519 !== undefined &&
|
||||
(obj.ed25519 = message.ed25519 !== undefined ? base64FromBytes(message.ed25519) : undefined);
|
||||
message.secp256k1 !== undefined &&
|
||||
(obj.secp256k1 = message.secp256k1 !== undefined ? base64FromBytes(message.secp256k1) : undefined);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<PublicKey>): PublicKey {
|
||||
const message = { ...basePublicKey } as PublicKey;
|
||||
if (object.ed25519 !== undefined && object.ed25519 !== null) {
|
||||
@ -69,15 +78,6 @@ export const PublicKey = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: PublicKey): unknown {
|
||||
const obj: any = {};
|
||||
message.ed25519 !== undefined &&
|
||||
(obj.ed25519 = message.ed25519 !== undefined ? base64FromBytes(message.ed25519) : undefined);
|
||||
message.secp256k1 !== undefined &&
|
||||
(obj.secp256k1 = message.secp256k1 !== undefined ? base64FromBytes(message.secp256k1) : undefined);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
declare var self: any | undefined;
|
||||
@ -87,7 +87,7 @@ var globalThis: any = (() => {
|
||||
if (typeof self !== "undefined") return self;
|
||||
if (typeof window !== "undefined") return window;
|
||||
if (typeof global !== "undefined") return global;
|
||||
throw new Error("Unable to locate global object");
|
||||
throw "Unable to locate global object";
|
||||
})();
|
||||
|
||||
const atob: (b64: string) => string =
|
||||
|
||||
@ -44,9 +44,15 @@ const baseProof: object = { total: Long.ZERO, index: Long.ZERO };
|
||||
|
||||
export const Proof = {
|
||||
encode(message: Proof, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(8).int64(message.total);
|
||||
writer.uint32(16).int64(message.index);
|
||||
writer.uint32(26).bytes(message.leafHash);
|
||||
if (!message.total.isZero()) {
|
||||
writer.uint32(8).int64(message.total);
|
||||
}
|
||||
if (!message.index.isZero()) {
|
||||
writer.uint32(16).int64(message.index);
|
||||
}
|
||||
if (message.leafHash.length !== 0) {
|
||||
writer.uint32(26).bytes(message.leafHash);
|
||||
}
|
||||
for (const v of message.aunts) {
|
||||
writer.uint32(34).bytes(v!);
|
||||
}
|
||||
@ -105,6 +111,20 @@ export const Proof = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Proof): unknown {
|
||||
const obj: any = {};
|
||||
message.total !== undefined && (obj.total = (message.total || Long.ZERO).toString());
|
||||
message.index !== undefined && (obj.index = (message.index || Long.ZERO).toString());
|
||||
message.leafHash !== undefined &&
|
||||
(obj.leafHash = base64FromBytes(message.leafHash !== undefined ? message.leafHash : new Uint8Array()));
|
||||
if (message.aunts) {
|
||||
obj.aunts = message.aunts.map((e) => base64FromBytes(e !== undefined ? e : new Uint8Array()));
|
||||
} else {
|
||||
obj.aunts = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<Proof>): Proof {
|
||||
const message = { ...baseProof } as Proof;
|
||||
message.aunts = [];
|
||||
@ -130,28 +150,16 @@ export const Proof = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Proof): unknown {
|
||||
const obj: any = {};
|
||||
message.total !== undefined && (obj.total = (message.total || Long.ZERO).toString());
|
||||
message.index !== undefined && (obj.index = (message.index || Long.ZERO).toString());
|
||||
message.leafHash !== undefined &&
|
||||
(obj.leafHash = base64FromBytes(message.leafHash !== undefined ? message.leafHash : new Uint8Array()));
|
||||
if (message.aunts) {
|
||||
obj.aunts = message.aunts.map((e) => base64FromBytes(e !== undefined ? e : new Uint8Array()));
|
||||
} else {
|
||||
obj.aunts = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseValueOp: object = {};
|
||||
|
||||
export const ValueOp = {
|
||||
encode(message: ValueOp, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).bytes(message.key);
|
||||
if (message.proof !== undefined && message.proof !== undefined) {
|
||||
if (message.key.length !== 0) {
|
||||
writer.uint32(10).bytes(message.key);
|
||||
}
|
||||
if (message.proof !== undefined) {
|
||||
Proof.encode(message.proof, writer.uint32(18).fork()).ldelim();
|
||||
}
|
||||
return writer;
|
||||
@ -191,6 +199,14 @@ export const ValueOp = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: ValueOp): unknown {
|
||||
const obj: any = {};
|
||||
message.key !== undefined &&
|
||||
(obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array()));
|
||||
message.proof !== undefined && (obj.proof = message.proof ? Proof.toJSON(message.proof) : undefined);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<ValueOp>): ValueOp {
|
||||
const message = { ...baseValueOp } as ValueOp;
|
||||
if (object.key !== undefined && object.key !== null) {
|
||||
@ -205,23 +221,21 @@ export const ValueOp = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: ValueOp): unknown {
|
||||
const obj: any = {};
|
||||
message.key !== undefined &&
|
||||
(obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array()));
|
||||
message.proof !== undefined && (obj.proof = message.proof ? Proof.toJSON(message.proof) : undefined);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseDominoOp: object = { key: "", input: "", output: "" };
|
||||
|
||||
export const DominoOp = {
|
||||
encode(message: DominoOp, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.key);
|
||||
writer.uint32(18).string(message.input);
|
||||
writer.uint32(26).string(message.output);
|
||||
if (message.key !== "") {
|
||||
writer.uint32(10).string(message.key);
|
||||
}
|
||||
if (message.input !== "") {
|
||||
writer.uint32(18).string(message.input);
|
||||
}
|
||||
if (message.output !== "") {
|
||||
writer.uint32(26).string(message.output);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -269,6 +283,14 @@ export const DominoOp = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: DominoOp): unknown {
|
||||
const obj: any = {};
|
||||
message.key !== undefined && (obj.key = message.key);
|
||||
message.input !== undefined && (obj.input = message.input);
|
||||
message.output !== undefined && (obj.output = message.output);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<DominoOp>): DominoOp {
|
||||
const message = { ...baseDominoOp } as DominoOp;
|
||||
if (object.key !== undefined && object.key !== null) {
|
||||
@ -288,23 +310,21 @@ export const DominoOp = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: DominoOp): unknown {
|
||||
const obj: any = {};
|
||||
message.key !== undefined && (obj.key = message.key);
|
||||
message.input !== undefined && (obj.input = message.input);
|
||||
message.output !== undefined && (obj.output = message.output);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseProofOp: object = { type: "" };
|
||||
|
||||
export const ProofOp = {
|
||||
encode(message: ProofOp, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).string(message.type);
|
||||
writer.uint32(18).bytes(message.key);
|
||||
writer.uint32(26).bytes(message.data);
|
||||
if (message.type !== "") {
|
||||
writer.uint32(10).string(message.type);
|
||||
}
|
||||
if (message.key.length !== 0) {
|
||||
writer.uint32(18).bytes(message.key);
|
||||
}
|
||||
if (message.data.length !== 0) {
|
||||
writer.uint32(26).bytes(message.data);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -348,6 +368,16 @@ export const ProofOp = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: ProofOp): unknown {
|
||||
const obj: any = {};
|
||||
message.type !== undefined && (obj.type = message.type);
|
||||
message.key !== undefined &&
|
||||
(obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array()));
|
||||
message.data !== undefined &&
|
||||
(obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array()));
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<ProofOp>): ProofOp {
|
||||
const message = { ...baseProofOp } as ProofOp;
|
||||
if (object.type !== undefined && object.type !== null) {
|
||||
@ -367,16 +397,6 @@ export const ProofOp = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: ProofOp): unknown {
|
||||
const obj: any = {};
|
||||
message.type !== undefined && (obj.type = message.type);
|
||||
message.key !== undefined &&
|
||||
(obj.key = base64FromBytes(message.key !== undefined ? message.key : new Uint8Array()));
|
||||
message.data !== undefined &&
|
||||
(obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array()));
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseProofOps: object = {};
|
||||
@ -419,6 +439,16 @@ export const ProofOps = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: ProofOps): unknown {
|
||||
const obj: any = {};
|
||||
if (message.ops) {
|
||||
obj.ops = message.ops.map((e) => (e ? ProofOp.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.ops = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<ProofOps>): ProofOps {
|
||||
const message = { ...baseProofOps } as ProofOps;
|
||||
message.ops = [];
|
||||
@ -429,16 +459,6 @@ export const ProofOps = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: ProofOps): unknown {
|
||||
const obj: any = {};
|
||||
if (message.ops) {
|
||||
obj.ops = message.ops.map((e) => (e ? ProofOp.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.ops = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
declare var self: any | undefined;
|
||||
@ -448,7 +468,7 @@ var globalThis: any = (() => {
|
||||
if (typeof self !== "undefined") return self;
|
||||
if (typeof window !== "undefined") return window;
|
||||
if (typeof global !== "undefined") return global;
|
||||
throw new Error("Unable to locate global object");
|
||||
throw "Unable to locate global object";
|
||||
})();
|
||||
|
||||
const atob: (b64: string) => string =
|
||||
|
||||
@ -13,7 +13,9 @@ const baseBitArray: object = { bits: Long.ZERO, elems: Long.UZERO };
|
||||
|
||||
export const BitArray = {
|
||||
encode(message: BitArray, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(8).int64(message.bits);
|
||||
if (!message.bits.isZero()) {
|
||||
writer.uint32(8).int64(message.bits);
|
||||
}
|
||||
writer.uint32(18).fork();
|
||||
for (const v of message.elems) {
|
||||
writer.uint64(v);
|
||||
@ -67,6 +69,17 @@ export const BitArray = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: BitArray): unknown {
|
||||
const obj: any = {};
|
||||
message.bits !== undefined && (obj.bits = (message.bits || Long.ZERO).toString());
|
||||
if (message.elems) {
|
||||
obj.elems = message.elems.map((e) => (e || Long.UZERO).toString());
|
||||
} else {
|
||||
obj.elems = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<BitArray>): BitArray {
|
||||
const message = { ...baseBitArray } as BitArray;
|
||||
message.elems = [];
|
||||
@ -82,17 +95,6 @@ export const BitArray = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: BitArray): unknown {
|
||||
const obj: any = {};
|
||||
message.bits !== undefined && (obj.bits = (message.bits || Long.ZERO).toString());
|
||||
if (message.elems) {
|
||||
obj.elems = message.elems.map((e) => (e || Long.UZERO).toString());
|
||||
} else {
|
||||
obj.elems = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
type Builtin = Date | Function | Uint8Array | string | number | undefined | Long;
|
||||
|
||||
@ -89,16 +89,16 @@ const baseConsensusParams: object = {};
|
||||
|
||||
export const ConsensusParams = {
|
||||
encode(message: ConsensusParams, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
if (message.block !== undefined && message.block !== undefined) {
|
||||
if (message.block !== undefined) {
|
||||
BlockParams.encode(message.block, writer.uint32(10).fork()).ldelim();
|
||||
}
|
||||
if (message.evidence !== undefined && message.evidence !== undefined) {
|
||||
if (message.evidence !== undefined) {
|
||||
EvidenceParams.encode(message.evidence, writer.uint32(18).fork()).ldelim();
|
||||
}
|
||||
if (message.validator !== undefined && message.validator !== undefined) {
|
||||
if (message.validator !== undefined) {
|
||||
ValidatorParams.encode(message.validator, writer.uint32(26).fork()).ldelim();
|
||||
}
|
||||
if (message.version !== undefined && message.version !== undefined) {
|
||||
if (message.version !== undefined) {
|
||||
VersionParams.encode(message.version, writer.uint32(34).fork()).ldelim();
|
||||
}
|
||||
return writer;
|
||||
@ -156,6 +156,19 @@ export const ConsensusParams = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: ConsensusParams): unknown {
|
||||
const obj: any = {};
|
||||
message.block !== undefined &&
|
||||
(obj.block = message.block ? BlockParams.toJSON(message.block) : undefined);
|
||||
message.evidence !== undefined &&
|
||||
(obj.evidence = message.evidence ? EvidenceParams.toJSON(message.evidence) : undefined);
|
||||
message.validator !== undefined &&
|
||||
(obj.validator = message.validator ? ValidatorParams.toJSON(message.validator) : undefined);
|
||||
message.version !== undefined &&
|
||||
(obj.version = message.version ? VersionParams.toJSON(message.version) : undefined);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<ConsensusParams>): ConsensusParams {
|
||||
const message = { ...baseConsensusParams } as ConsensusParams;
|
||||
if (object.block !== undefined && object.block !== null) {
|
||||
@ -180,28 +193,21 @@ export const ConsensusParams = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: ConsensusParams): unknown {
|
||||
const obj: any = {};
|
||||
message.block !== undefined &&
|
||||
(obj.block = message.block ? BlockParams.toJSON(message.block) : undefined);
|
||||
message.evidence !== undefined &&
|
||||
(obj.evidence = message.evidence ? EvidenceParams.toJSON(message.evidence) : undefined);
|
||||
message.validator !== undefined &&
|
||||
(obj.validator = message.validator ? ValidatorParams.toJSON(message.validator) : undefined);
|
||||
message.version !== undefined &&
|
||||
(obj.version = message.version ? VersionParams.toJSON(message.version) : undefined);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseBlockParams: object = { maxBytes: Long.ZERO, maxGas: Long.ZERO, timeIotaMs: Long.ZERO };
|
||||
|
||||
export const BlockParams = {
|
||||
encode(message: BlockParams, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(8).int64(message.maxBytes);
|
||||
writer.uint32(16).int64(message.maxGas);
|
||||
writer.uint32(24).int64(message.timeIotaMs);
|
||||
if (!message.maxBytes.isZero()) {
|
||||
writer.uint32(8).int64(message.maxBytes);
|
||||
}
|
||||
if (!message.maxGas.isZero()) {
|
||||
writer.uint32(16).int64(message.maxGas);
|
||||
}
|
||||
if (!message.timeIotaMs.isZero()) {
|
||||
writer.uint32(24).int64(message.timeIotaMs);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -249,6 +255,14 @@ export const BlockParams = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: BlockParams): unknown {
|
||||
const obj: any = {};
|
||||
message.maxBytes !== undefined && (obj.maxBytes = (message.maxBytes || Long.ZERO).toString());
|
||||
message.maxGas !== undefined && (obj.maxGas = (message.maxGas || Long.ZERO).toString());
|
||||
message.timeIotaMs !== undefined && (obj.timeIotaMs = (message.timeIotaMs || Long.ZERO).toString());
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<BlockParams>): BlockParams {
|
||||
const message = { ...baseBlockParams } as BlockParams;
|
||||
if (object.maxBytes !== undefined && object.maxBytes !== null) {
|
||||
@ -268,25 +282,21 @@ export const BlockParams = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: BlockParams): unknown {
|
||||
const obj: any = {};
|
||||
message.maxBytes !== undefined && (obj.maxBytes = (message.maxBytes || Long.ZERO).toString());
|
||||
message.maxGas !== undefined && (obj.maxGas = (message.maxGas || Long.ZERO).toString());
|
||||
message.timeIotaMs !== undefined && (obj.timeIotaMs = (message.timeIotaMs || Long.ZERO).toString());
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseEvidenceParams: object = { maxAgeNumBlocks: Long.ZERO, maxBytes: Long.ZERO };
|
||||
|
||||
export const EvidenceParams = {
|
||||
encode(message: EvidenceParams, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(8).int64(message.maxAgeNumBlocks);
|
||||
if (message.maxAgeDuration !== undefined && message.maxAgeDuration !== undefined) {
|
||||
if (!message.maxAgeNumBlocks.isZero()) {
|
||||
writer.uint32(8).int64(message.maxAgeNumBlocks);
|
||||
}
|
||||
if (message.maxAgeDuration !== undefined) {
|
||||
Duration.encode(message.maxAgeDuration, writer.uint32(18).fork()).ldelim();
|
||||
}
|
||||
writer.uint32(24).int64(message.maxBytes);
|
||||
if (!message.maxBytes.isZero()) {
|
||||
writer.uint32(24).int64(message.maxBytes);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -334,6 +344,16 @@ export const EvidenceParams = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: EvidenceParams): unknown {
|
||||
const obj: any = {};
|
||||
message.maxAgeNumBlocks !== undefined &&
|
||||
(obj.maxAgeNumBlocks = (message.maxAgeNumBlocks || Long.ZERO).toString());
|
||||
message.maxAgeDuration !== undefined &&
|
||||
(obj.maxAgeDuration = message.maxAgeDuration ? Duration.toJSON(message.maxAgeDuration) : undefined);
|
||||
message.maxBytes !== undefined && (obj.maxBytes = (message.maxBytes || Long.ZERO).toString());
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<EvidenceParams>): EvidenceParams {
|
||||
const message = { ...baseEvidenceParams } as EvidenceParams;
|
||||
if (object.maxAgeNumBlocks !== undefined && object.maxAgeNumBlocks !== null) {
|
||||
@ -353,16 +373,6 @@ export const EvidenceParams = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: EvidenceParams): unknown {
|
||||
const obj: any = {};
|
||||
message.maxAgeNumBlocks !== undefined &&
|
||||
(obj.maxAgeNumBlocks = (message.maxAgeNumBlocks || Long.ZERO).toString());
|
||||
message.maxAgeDuration !== undefined &&
|
||||
(obj.maxAgeDuration = message.maxAgeDuration ? Duration.toJSON(message.maxAgeDuration) : undefined);
|
||||
message.maxBytes !== undefined && (obj.maxBytes = (message.maxBytes || Long.ZERO).toString());
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseValidatorParams: object = { pubKeyTypes: "" };
|
||||
@ -405,6 +415,16 @@ export const ValidatorParams = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: ValidatorParams): unknown {
|
||||
const obj: any = {};
|
||||
if (message.pubKeyTypes) {
|
||||
obj.pubKeyTypes = message.pubKeyTypes.map((e) => e);
|
||||
} else {
|
||||
obj.pubKeyTypes = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<ValidatorParams>): ValidatorParams {
|
||||
const message = { ...baseValidatorParams } as ValidatorParams;
|
||||
message.pubKeyTypes = [];
|
||||
@ -415,23 +435,15 @@ export const ValidatorParams = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: ValidatorParams): unknown {
|
||||
const obj: any = {};
|
||||
if (message.pubKeyTypes) {
|
||||
obj.pubKeyTypes = message.pubKeyTypes.map((e) => e);
|
||||
} else {
|
||||
obj.pubKeyTypes = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseVersionParams: object = { appVersion: Long.UZERO };
|
||||
|
||||
export const VersionParams = {
|
||||
encode(message: VersionParams, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(8).uint64(message.appVersion);
|
||||
if (!message.appVersion.isZero()) {
|
||||
writer.uint32(8).uint64(message.appVersion);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -463,6 +475,12 @@ export const VersionParams = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: VersionParams): unknown {
|
||||
const obj: any = {};
|
||||
message.appVersion !== undefined && (obj.appVersion = (message.appVersion || Long.UZERO).toString());
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<VersionParams>): VersionParams {
|
||||
const message = { ...baseVersionParams } as VersionParams;
|
||||
if (object.appVersion !== undefined && object.appVersion !== null) {
|
||||
@ -472,20 +490,18 @@ export const VersionParams = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: VersionParams): unknown {
|
||||
const obj: any = {};
|
||||
message.appVersion !== undefined && (obj.appVersion = (message.appVersion || Long.UZERO).toString());
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseHashedParams: object = { blockMaxBytes: Long.ZERO, blockMaxGas: Long.ZERO };
|
||||
|
||||
export const HashedParams = {
|
||||
encode(message: HashedParams, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(8).int64(message.blockMaxBytes);
|
||||
writer.uint32(16).int64(message.blockMaxGas);
|
||||
if (!message.blockMaxBytes.isZero()) {
|
||||
writer.uint32(8).int64(message.blockMaxBytes);
|
||||
}
|
||||
if (!message.blockMaxGas.isZero()) {
|
||||
writer.uint32(16).int64(message.blockMaxGas);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -525,6 +541,14 @@ export const HashedParams = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: HashedParams): unknown {
|
||||
const obj: any = {};
|
||||
message.blockMaxBytes !== undefined &&
|
||||
(obj.blockMaxBytes = (message.blockMaxBytes || Long.ZERO).toString());
|
||||
message.blockMaxGas !== undefined && (obj.blockMaxGas = (message.blockMaxGas || Long.ZERO).toString());
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<HashedParams>): HashedParams {
|
||||
const message = { ...baseHashedParams } as HashedParams;
|
||||
if (object.blockMaxBytes !== undefined && object.blockMaxBytes !== null) {
|
||||
@ -539,14 +563,6 @@ export const HashedParams = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: HashedParams): unknown {
|
||||
const obj: any = {};
|
||||
message.blockMaxBytes !== undefined &&
|
||||
(obj.blockMaxBytes = (message.blockMaxBytes || Long.ZERO).toString());
|
||||
message.blockMaxGas !== undefined && (obj.blockMaxGas = (message.blockMaxGas || Long.ZERO).toString());
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
type Builtin = Date | Function | Uint8Array | string | number | undefined | Long;
|
||||
|
||||
@ -227,8 +227,12 @@ const basePartSetHeader: object = { total: 0 };
|
||||
|
||||
export const PartSetHeader = {
|
||||
encode(message: PartSetHeader, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(8).uint32(message.total);
|
||||
writer.uint32(18).bytes(message.hash);
|
||||
if (message.total !== 0) {
|
||||
writer.uint32(8).uint32(message.total);
|
||||
}
|
||||
if (message.hash.length !== 0) {
|
||||
writer.uint32(18).bytes(message.hash);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -266,6 +270,14 @@ export const PartSetHeader = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: PartSetHeader): unknown {
|
||||
const obj: any = {};
|
||||
message.total !== undefined && (obj.total = message.total);
|
||||
message.hash !== undefined &&
|
||||
(obj.hash = base64FromBytes(message.hash !== undefined ? message.hash : new Uint8Array()));
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<PartSetHeader>): PartSetHeader {
|
||||
const message = { ...basePartSetHeader } as PartSetHeader;
|
||||
if (object.total !== undefined && object.total !== null) {
|
||||
@ -280,23 +292,19 @@ export const PartSetHeader = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: PartSetHeader): unknown {
|
||||
const obj: any = {};
|
||||
message.total !== undefined && (obj.total = message.total);
|
||||
message.hash !== undefined &&
|
||||
(obj.hash = base64FromBytes(message.hash !== undefined ? message.hash : new Uint8Array()));
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const basePart: object = { index: 0 };
|
||||
|
||||
export const Part = {
|
||||
encode(message: Part, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(8).uint32(message.index);
|
||||
writer.uint32(18).bytes(message.bytes);
|
||||
if (message.proof !== undefined && message.proof !== undefined) {
|
||||
if (message.index !== 0) {
|
||||
writer.uint32(8).uint32(message.index);
|
||||
}
|
||||
if (message.bytes.length !== 0) {
|
||||
writer.uint32(18).bytes(message.bytes);
|
||||
}
|
||||
if (message.proof !== undefined) {
|
||||
Proof.encode(message.proof, writer.uint32(26).fork()).ldelim();
|
||||
}
|
||||
return writer;
|
||||
@ -344,6 +352,15 @@ export const Part = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Part): unknown {
|
||||
const obj: any = {};
|
||||
message.index !== undefined && (obj.index = message.index);
|
||||
message.bytes !== undefined &&
|
||||
(obj.bytes = base64FromBytes(message.bytes !== undefined ? message.bytes : new Uint8Array()));
|
||||
message.proof !== undefined && (obj.proof = message.proof ? Proof.toJSON(message.proof) : undefined);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<Part>): Part {
|
||||
const message = { ...basePart } as Part;
|
||||
if (object.index !== undefined && object.index !== null) {
|
||||
@ -363,23 +380,16 @@ export const Part = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Part): unknown {
|
||||
const obj: any = {};
|
||||
message.index !== undefined && (obj.index = message.index);
|
||||
message.bytes !== undefined &&
|
||||
(obj.bytes = base64FromBytes(message.bytes !== undefined ? message.bytes : new Uint8Array()));
|
||||
message.proof !== undefined && (obj.proof = message.proof ? Proof.toJSON(message.proof) : undefined);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseBlockID: object = {};
|
||||
|
||||
export const BlockID = {
|
||||
encode(message: BlockID, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).bytes(message.hash);
|
||||
if (message.partSetHeader !== undefined && message.partSetHeader !== undefined) {
|
||||
if (message.hash.length !== 0) {
|
||||
writer.uint32(10).bytes(message.hash);
|
||||
}
|
||||
if (message.partSetHeader !== undefined) {
|
||||
PartSetHeader.encode(message.partSetHeader, writer.uint32(18).fork()).ldelim();
|
||||
}
|
||||
return writer;
|
||||
@ -419,6 +429,15 @@ export const BlockID = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: BlockID): unknown {
|
||||
const obj: any = {};
|
||||
message.hash !== undefined &&
|
||||
(obj.hash = base64FromBytes(message.hash !== undefined ? message.hash : new Uint8Array()));
|
||||
message.partSetHeader !== undefined &&
|
||||
(obj.partSetHeader = message.partSetHeader ? PartSetHeader.toJSON(message.partSetHeader) : undefined);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<BlockID>): BlockID {
|
||||
const message = { ...baseBlockID } as BlockID;
|
||||
if (object.hash !== undefined && object.hash !== null) {
|
||||
@ -433,41 +452,54 @@ export const BlockID = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: BlockID): unknown {
|
||||
const obj: any = {};
|
||||
message.hash !== undefined &&
|
||||
(obj.hash = base64FromBytes(message.hash !== undefined ? message.hash : new Uint8Array()));
|
||||
message.partSetHeader !== undefined &&
|
||||
(obj.partSetHeader = message.partSetHeader ? PartSetHeader.toJSON(message.partSetHeader) : undefined);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseHeader: object = { chainId: "", height: Long.ZERO };
|
||||
|
||||
export const Header = {
|
||||
encode(message: Header, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
if (message.version !== undefined && message.version !== undefined) {
|
||||
if (message.version !== undefined) {
|
||||
Consensus.encode(message.version, writer.uint32(10).fork()).ldelim();
|
||||
}
|
||||
writer.uint32(18).string(message.chainId);
|
||||
writer.uint32(24).int64(message.height);
|
||||
if (message.time !== undefined && message.time !== undefined) {
|
||||
if (message.chainId !== "") {
|
||||
writer.uint32(18).string(message.chainId);
|
||||
}
|
||||
if (!message.height.isZero()) {
|
||||
writer.uint32(24).int64(message.height);
|
||||
}
|
||||
if (message.time !== undefined) {
|
||||
Timestamp.encode(toTimestamp(message.time), writer.uint32(34).fork()).ldelim();
|
||||
}
|
||||
if (message.lastBlockId !== undefined && message.lastBlockId !== undefined) {
|
||||
if (message.lastBlockId !== undefined) {
|
||||
BlockID.encode(message.lastBlockId, writer.uint32(42).fork()).ldelim();
|
||||
}
|
||||
writer.uint32(50).bytes(message.lastCommitHash);
|
||||
writer.uint32(58).bytes(message.dataHash);
|
||||
writer.uint32(66).bytes(message.validatorsHash);
|
||||
writer.uint32(74).bytes(message.nextValidatorsHash);
|
||||
writer.uint32(82).bytes(message.consensusHash);
|
||||
writer.uint32(90).bytes(message.appHash);
|
||||
writer.uint32(98).bytes(message.lastResultsHash);
|
||||
writer.uint32(106).bytes(message.evidenceHash);
|
||||
writer.uint32(114).bytes(message.proposerAddress);
|
||||
if (message.lastCommitHash.length !== 0) {
|
||||
writer.uint32(50).bytes(message.lastCommitHash);
|
||||
}
|
||||
if (message.dataHash.length !== 0) {
|
||||
writer.uint32(58).bytes(message.dataHash);
|
||||
}
|
||||
if (message.validatorsHash.length !== 0) {
|
||||
writer.uint32(66).bytes(message.validatorsHash);
|
||||
}
|
||||
if (message.nextValidatorsHash.length !== 0) {
|
||||
writer.uint32(74).bytes(message.nextValidatorsHash);
|
||||
}
|
||||
if (message.consensusHash.length !== 0) {
|
||||
writer.uint32(82).bytes(message.consensusHash);
|
||||
}
|
||||
if (message.appHash.length !== 0) {
|
||||
writer.uint32(90).bytes(message.appHash);
|
||||
}
|
||||
if (message.lastResultsHash.length !== 0) {
|
||||
writer.uint32(98).bytes(message.lastResultsHash);
|
||||
}
|
||||
if (message.evidenceHash.length !== 0) {
|
||||
writer.uint32(106).bytes(message.evidenceHash);
|
||||
}
|
||||
if (message.proposerAddress.length !== 0) {
|
||||
writer.uint32(114).bytes(message.proposerAddress);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -585,6 +617,50 @@ export const Header = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Header): unknown {
|
||||
const obj: any = {};
|
||||
message.version !== undefined &&
|
||||
(obj.version = message.version ? Consensus.toJSON(message.version) : undefined);
|
||||
message.chainId !== undefined && (obj.chainId = message.chainId);
|
||||
message.height !== undefined && (obj.height = (message.height || Long.ZERO).toString());
|
||||
message.time !== undefined && (obj.time = message.time !== undefined ? message.time.toISOString() : null);
|
||||
message.lastBlockId !== undefined &&
|
||||
(obj.lastBlockId = message.lastBlockId ? BlockID.toJSON(message.lastBlockId) : undefined);
|
||||
message.lastCommitHash !== undefined &&
|
||||
(obj.lastCommitHash = base64FromBytes(
|
||||
message.lastCommitHash !== undefined ? message.lastCommitHash : new Uint8Array(),
|
||||
));
|
||||
message.dataHash !== undefined &&
|
||||
(obj.dataHash = base64FromBytes(message.dataHash !== undefined ? message.dataHash : new Uint8Array()));
|
||||
message.validatorsHash !== undefined &&
|
||||
(obj.validatorsHash = base64FromBytes(
|
||||
message.validatorsHash !== undefined ? message.validatorsHash : new Uint8Array(),
|
||||
));
|
||||
message.nextValidatorsHash !== undefined &&
|
||||
(obj.nextValidatorsHash = base64FromBytes(
|
||||
message.nextValidatorsHash !== undefined ? message.nextValidatorsHash : new Uint8Array(),
|
||||
));
|
||||
message.consensusHash !== undefined &&
|
||||
(obj.consensusHash = base64FromBytes(
|
||||
message.consensusHash !== undefined ? message.consensusHash : new Uint8Array(),
|
||||
));
|
||||
message.appHash !== undefined &&
|
||||
(obj.appHash = base64FromBytes(message.appHash !== undefined ? message.appHash : new Uint8Array()));
|
||||
message.lastResultsHash !== undefined &&
|
||||
(obj.lastResultsHash = base64FromBytes(
|
||||
message.lastResultsHash !== undefined ? message.lastResultsHash : new Uint8Array(),
|
||||
));
|
||||
message.evidenceHash !== undefined &&
|
||||
(obj.evidenceHash = base64FromBytes(
|
||||
message.evidenceHash !== undefined ? message.evidenceHash : new Uint8Array(),
|
||||
));
|
||||
message.proposerAddress !== undefined &&
|
||||
(obj.proposerAddress = base64FromBytes(
|
||||
message.proposerAddress !== undefined ? message.proposerAddress : new Uint8Array(),
|
||||
));
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<Header>): Header {
|
||||
const message = { ...baseHeader } as Header;
|
||||
if (object.version !== undefined && object.version !== null) {
|
||||
@ -659,50 +735,6 @@ export const Header = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Header): unknown {
|
||||
const obj: any = {};
|
||||
message.version !== undefined &&
|
||||
(obj.version = message.version ? Consensus.toJSON(message.version) : undefined);
|
||||
message.chainId !== undefined && (obj.chainId = message.chainId);
|
||||
message.height !== undefined && (obj.height = (message.height || Long.ZERO).toString());
|
||||
message.time !== undefined && (obj.time = message.time !== undefined ? message.time.toISOString() : null);
|
||||
message.lastBlockId !== undefined &&
|
||||
(obj.lastBlockId = message.lastBlockId ? BlockID.toJSON(message.lastBlockId) : undefined);
|
||||
message.lastCommitHash !== undefined &&
|
||||
(obj.lastCommitHash = base64FromBytes(
|
||||
message.lastCommitHash !== undefined ? message.lastCommitHash : new Uint8Array(),
|
||||
));
|
||||
message.dataHash !== undefined &&
|
||||
(obj.dataHash = base64FromBytes(message.dataHash !== undefined ? message.dataHash : new Uint8Array()));
|
||||
message.validatorsHash !== undefined &&
|
||||
(obj.validatorsHash = base64FromBytes(
|
||||
message.validatorsHash !== undefined ? message.validatorsHash : new Uint8Array(),
|
||||
));
|
||||
message.nextValidatorsHash !== undefined &&
|
||||
(obj.nextValidatorsHash = base64FromBytes(
|
||||
message.nextValidatorsHash !== undefined ? message.nextValidatorsHash : new Uint8Array(),
|
||||
));
|
||||
message.consensusHash !== undefined &&
|
||||
(obj.consensusHash = base64FromBytes(
|
||||
message.consensusHash !== undefined ? message.consensusHash : new Uint8Array(),
|
||||
));
|
||||
message.appHash !== undefined &&
|
||||
(obj.appHash = base64FromBytes(message.appHash !== undefined ? message.appHash : new Uint8Array()));
|
||||
message.lastResultsHash !== undefined &&
|
||||
(obj.lastResultsHash = base64FromBytes(
|
||||
message.lastResultsHash !== undefined ? message.lastResultsHash : new Uint8Array(),
|
||||
));
|
||||
message.evidenceHash !== undefined &&
|
||||
(obj.evidenceHash = base64FromBytes(
|
||||
message.evidenceHash !== undefined ? message.evidenceHash : new Uint8Array(),
|
||||
));
|
||||
message.proposerAddress !== undefined &&
|
||||
(obj.proposerAddress = base64FromBytes(
|
||||
message.proposerAddress !== undefined ? message.proposerAddress : new Uint8Array(),
|
||||
));
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseData: object = {};
|
||||
@ -745,6 +777,16 @@ export const Data = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Data): unknown {
|
||||
const obj: any = {};
|
||||
if (message.txs) {
|
||||
obj.txs = message.txs.map((e) => base64FromBytes(e !== undefined ? e : new Uint8Array()));
|
||||
} else {
|
||||
obj.txs = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<Data>): Data {
|
||||
const message = { ...baseData } as Data;
|
||||
message.txs = [];
|
||||
@ -755,34 +797,36 @@ export const Data = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Data): unknown {
|
||||
const obj: any = {};
|
||||
if (message.txs) {
|
||||
obj.txs = message.txs.map((e) => base64FromBytes(e !== undefined ? e : new Uint8Array()));
|
||||
} else {
|
||||
obj.txs = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseVote: object = { type: 0, height: Long.ZERO, round: 0, validatorIndex: 0 };
|
||||
|
||||
export const Vote = {
|
||||
encode(message: Vote, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(8).int32(message.type);
|
||||
writer.uint32(16).int64(message.height);
|
||||
writer.uint32(24).int32(message.round);
|
||||
if (message.blockId !== undefined && message.blockId !== undefined) {
|
||||
if (message.type !== 0) {
|
||||
writer.uint32(8).int32(message.type);
|
||||
}
|
||||
if (!message.height.isZero()) {
|
||||
writer.uint32(16).int64(message.height);
|
||||
}
|
||||
if (message.round !== 0) {
|
||||
writer.uint32(24).int32(message.round);
|
||||
}
|
||||
if (message.blockId !== undefined) {
|
||||
BlockID.encode(message.blockId, writer.uint32(34).fork()).ldelim();
|
||||
}
|
||||
if (message.timestamp !== undefined && message.timestamp !== undefined) {
|
||||
if (message.timestamp !== undefined) {
|
||||
Timestamp.encode(toTimestamp(message.timestamp), writer.uint32(42).fork()).ldelim();
|
||||
}
|
||||
writer.uint32(50).bytes(message.validatorAddress);
|
||||
writer.uint32(56).int32(message.validatorIndex);
|
||||
writer.uint32(66).bytes(message.signature);
|
||||
if (message.validatorAddress.length !== 0) {
|
||||
writer.uint32(50).bytes(message.validatorAddress);
|
||||
}
|
||||
if (message.validatorIndex !== 0) {
|
||||
writer.uint32(56).int32(message.validatorIndex);
|
||||
}
|
||||
if (message.signature.length !== 0) {
|
||||
writer.uint32(66).bytes(message.signature);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -866,6 +910,27 @@ export const Vote = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Vote): unknown {
|
||||
const obj: any = {};
|
||||
message.type !== undefined && (obj.type = signedMsgTypeToJSON(message.type));
|
||||
message.height !== undefined && (obj.height = (message.height || Long.ZERO).toString());
|
||||
message.round !== undefined && (obj.round = message.round);
|
||||
message.blockId !== undefined &&
|
||||
(obj.blockId = message.blockId ? BlockID.toJSON(message.blockId) : undefined);
|
||||
message.timestamp !== undefined &&
|
||||
(obj.timestamp = message.timestamp !== undefined ? message.timestamp.toISOString() : null);
|
||||
message.validatorAddress !== undefined &&
|
||||
(obj.validatorAddress = base64FromBytes(
|
||||
message.validatorAddress !== undefined ? message.validatorAddress : new Uint8Array(),
|
||||
));
|
||||
message.validatorIndex !== undefined && (obj.validatorIndex = message.validatorIndex);
|
||||
message.signature !== undefined &&
|
||||
(obj.signature = base64FromBytes(
|
||||
message.signature !== undefined ? message.signature : new Uint8Array(),
|
||||
));
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<Vote>): Vote {
|
||||
const message = { ...baseVote } as Vote;
|
||||
if (object.type !== undefined && object.type !== null) {
|
||||
@ -910,36 +975,19 @@ export const Vote = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Vote): unknown {
|
||||
const obj: any = {};
|
||||
message.type !== undefined && (obj.type = signedMsgTypeToJSON(message.type));
|
||||
message.height !== undefined && (obj.height = (message.height || Long.ZERO).toString());
|
||||
message.round !== undefined && (obj.round = message.round);
|
||||
message.blockId !== undefined &&
|
||||
(obj.blockId = message.blockId ? BlockID.toJSON(message.blockId) : undefined);
|
||||
message.timestamp !== undefined &&
|
||||
(obj.timestamp = message.timestamp !== undefined ? message.timestamp.toISOString() : null);
|
||||
message.validatorAddress !== undefined &&
|
||||
(obj.validatorAddress = base64FromBytes(
|
||||
message.validatorAddress !== undefined ? message.validatorAddress : new Uint8Array(),
|
||||
));
|
||||
message.validatorIndex !== undefined && (obj.validatorIndex = message.validatorIndex);
|
||||
message.signature !== undefined &&
|
||||
(obj.signature = base64FromBytes(
|
||||
message.signature !== undefined ? message.signature : new Uint8Array(),
|
||||
));
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseCommit: object = { height: Long.ZERO, round: 0 };
|
||||
|
||||
export const Commit = {
|
||||
encode(message: Commit, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(8).int64(message.height);
|
||||
writer.uint32(16).int32(message.round);
|
||||
if (message.blockId !== undefined && message.blockId !== undefined) {
|
||||
if (!message.height.isZero()) {
|
||||
writer.uint32(8).int64(message.height);
|
||||
}
|
||||
if (message.round !== 0) {
|
||||
writer.uint32(16).int32(message.round);
|
||||
}
|
||||
if (message.blockId !== undefined) {
|
||||
BlockID.encode(message.blockId, writer.uint32(26).fork()).ldelim();
|
||||
}
|
||||
for (const v of message.signatures) {
|
||||
@ -1002,6 +1050,20 @@ export const Commit = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Commit): unknown {
|
||||
const obj: any = {};
|
||||
message.height !== undefined && (obj.height = (message.height || Long.ZERO).toString());
|
||||
message.round !== undefined && (obj.round = message.round);
|
||||
message.blockId !== undefined &&
|
||||
(obj.blockId = message.blockId ? BlockID.toJSON(message.blockId) : undefined);
|
||||
if (message.signatures) {
|
||||
obj.signatures = message.signatures.map((e) => (e ? CommitSig.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.signatures = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<Commit>): Commit {
|
||||
const message = { ...baseCommit } as Commit;
|
||||
message.signatures = [];
|
||||
@ -1027,32 +1089,24 @@ export const Commit = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Commit): unknown {
|
||||
const obj: any = {};
|
||||
message.height !== undefined && (obj.height = (message.height || Long.ZERO).toString());
|
||||
message.round !== undefined && (obj.round = message.round);
|
||||
message.blockId !== undefined &&
|
||||
(obj.blockId = message.blockId ? BlockID.toJSON(message.blockId) : undefined);
|
||||
if (message.signatures) {
|
||||
obj.signatures = message.signatures.map((e) => (e ? CommitSig.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.signatures = [];
|
||||
}
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseCommitSig: object = { blockIdFlag: 0 };
|
||||
|
||||
export const CommitSig = {
|
||||
encode(message: CommitSig, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(8).int32(message.blockIdFlag);
|
||||
writer.uint32(18).bytes(message.validatorAddress);
|
||||
if (message.timestamp !== undefined && message.timestamp !== undefined) {
|
||||
if (message.blockIdFlag !== 0) {
|
||||
writer.uint32(8).int32(message.blockIdFlag);
|
||||
}
|
||||
if (message.validatorAddress.length !== 0) {
|
||||
writer.uint32(18).bytes(message.validatorAddress);
|
||||
}
|
||||
if (message.timestamp !== undefined) {
|
||||
Timestamp.encode(toTimestamp(message.timestamp), writer.uint32(26).fork()).ldelim();
|
||||
}
|
||||
writer.uint32(34).bytes(message.signature);
|
||||
if (message.signature.length !== 0) {
|
||||
writer.uint32(34).bytes(message.signature);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -1104,6 +1158,22 @@ export const CommitSig = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: CommitSig): unknown {
|
||||
const obj: any = {};
|
||||
message.blockIdFlag !== undefined && (obj.blockIdFlag = blockIDFlagToJSON(message.blockIdFlag));
|
||||
message.validatorAddress !== undefined &&
|
||||
(obj.validatorAddress = base64FromBytes(
|
||||
message.validatorAddress !== undefined ? message.validatorAddress : new Uint8Array(),
|
||||
));
|
||||
message.timestamp !== undefined &&
|
||||
(obj.timestamp = message.timestamp !== undefined ? message.timestamp.toISOString() : null);
|
||||
message.signature !== undefined &&
|
||||
(obj.signature = base64FromBytes(
|
||||
message.signature !== undefined ? message.signature : new Uint8Array(),
|
||||
));
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<CommitSig>): CommitSig {
|
||||
const message = { ...baseCommitSig } as CommitSig;
|
||||
if (object.blockIdFlag !== undefined && object.blockIdFlag !== null) {
|
||||
@ -1128,39 +1198,33 @@ export const CommitSig = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: CommitSig): unknown {
|
||||
const obj: any = {};
|
||||
message.blockIdFlag !== undefined && (obj.blockIdFlag = blockIDFlagToJSON(message.blockIdFlag));
|
||||
message.validatorAddress !== undefined &&
|
||||
(obj.validatorAddress = base64FromBytes(
|
||||
message.validatorAddress !== undefined ? message.validatorAddress : new Uint8Array(),
|
||||
));
|
||||
message.timestamp !== undefined &&
|
||||
(obj.timestamp = message.timestamp !== undefined ? message.timestamp.toISOString() : null);
|
||||
message.signature !== undefined &&
|
||||
(obj.signature = base64FromBytes(
|
||||
message.signature !== undefined ? message.signature : new Uint8Array(),
|
||||
));
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseProposal: object = { type: 0, height: Long.ZERO, round: 0, polRound: 0 };
|
||||
|
||||
export const Proposal = {
|
||||
encode(message: Proposal, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(8).int32(message.type);
|
||||
writer.uint32(16).int64(message.height);
|
||||
writer.uint32(24).int32(message.round);
|
||||
writer.uint32(32).int32(message.polRound);
|
||||
if (message.blockId !== undefined && message.blockId !== undefined) {
|
||||
if (message.type !== 0) {
|
||||
writer.uint32(8).int32(message.type);
|
||||
}
|
||||
if (!message.height.isZero()) {
|
||||
writer.uint32(16).int64(message.height);
|
||||
}
|
||||
if (message.round !== 0) {
|
||||
writer.uint32(24).int32(message.round);
|
||||
}
|
||||
if (message.polRound !== 0) {
|
||||
writer.uint32(32).int32(message.polRound);
|
||||
}
|
||||
if (message.blockId !== undefined) {
|
||||
BlockID.encode(message.blockId, writer.uint32(42).fork()).ldelim();
|
||||
}
|
||||
if (message.timestamp !== undefined && message.timestamp !== undefined) {
|
||||
if (message.timestamp !== undefined) {
|
||||
Timestamp.encode(toTimestamp(message.timestamp), writer.uint32(50).fork()).ldelim();
|
||||
}
|
||||
writer.uint32(58).bytes(message.signature);
|
||||
if (message.signature.length !== 0) {
|
||||
writer.uint32(58).bytes(message.signature);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -1238,6 +1302,23 @@ export const Proposal = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Proposal): unknown {
|
||||
const obj: any = {};
|
||||
message.type !== undefined && (obj.type = signedMsgTypeToJSON(message.type));
|
||||
message.height !== undefined && (obj.height = (message.height || Long.ZERO).toString());
|
||||
message.round !== undefined && (obj.round = message.round);
|
||||
message.polRound !== undefined && (obj.polRound = message.polRound);
|
||||
message.blockId !== undefined &&
|
||||
(obj.blockId = message.blockId ? BlockID.toJSON(message.blockId) : undefined);
|
||||
message.timestamp !== undefined &&
|
||||
(obj.timestamp = message.timestamp !== undefined ? message.timestamp.toISOString() : null);
|
||||
message.signature !== undefined &&
|
||||
(obj.signature = base64FromBytes(
|
||||
message.signature !== undefined ? message.signature : new Uint8Array(),
|
||||
));
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<Proposal>): Proposal {
|
||||
const message = { ...baseProposal } as Proposal;
|
||||
if (object.type !== undefined && object.type !== null) {
|
||||
@ -1277,33 +1358,16 @@ export const Proposal = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Proposal): unknown {
|
||||
const obj: any = {};
|
||||
message.type !== undefined && (obj.type = signedMsgTypeToJSON(message.type));
|
||||
message.height !== undefined && (obj.height = (message.height || Long.ZERO).toString());
|
||||
message.round !== undefined && (obj.round = message.round);
|
||||
message.polRound !== undefined && (obj.polRound = message.polRound);
|
||||
message.blockId !== undefined &&
|
||||
(obj.blockId = message.blockId ? BlockID.toJSON(message.blockId) : undefined);
|
||||
message.timestamp !== undefined &&
|
||||
(obj.timestamp = message.timestamp !== undefined ? message.timestamp.toISOString() : null);
|
||||
message.signature !== undefined &&
|
||||
(obj.signature = base64FromBytes(
|
||||
message.signature !== undefined ? message.signature : new Uint8Array(),
|
||||
));
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseSignedHeader: object = {};
|
||||
|
||||
export const SignedHeader = {
|
||||
encode(message: SignedHeader, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
if (message.header !== undefined && message.header !== undefined) {
|
||||
if (message.header !== undefined) {
|
||||
Header.encode(message.header, writer.uint32(10).fork()).ldelim();
|
||||
}
|
||||
if (message.commit !== undefined && message.commit !== undefined) {
|
||||
if (message.commit !== undefined) {
|
||||
Commit.encode(message.commit, writer.uint32(18).fork()).ldelim();
|
||||
}
|
||||
return writer;
|
||||
@ -1345,6 +1409,13 @@ export const SignedHeader = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: SignedHeader): unknown {
|
||||
const obj: any = {};
|
||||
message.header !== undefined && (obj.header = message.header ? Header.toJSON(message.header) : undefined);
|
||||
message.commit !== undefined && (obj.commit = message.commit ? Commit.toJSON(message.commit) : undefined);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<SignedHeader>): SignedHeader {
|
||||
const message = { ...baseSignedHeader } as SignedHeader;
|
||||
if (object.header !== undefined && object.header !== null) {
|
||||
@ -1359,23 +1430,16 @@ export const SignedHeader = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: SignedHeader): unknown {
|
||||
const obj: any = {};
|
||||
message.header !== undefined && (obj.header = message.header ? Header.toJSON(message.header) : undefined);
|
||||
message.commit !== undefined && (obj.commit = message.commit ? Commit.toJSON(message.commit) : undefined);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseLightBlock: object = {};
|
||||
|
||||
export const LightBlock = {
|
||||
encode(message: LightBlock, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
if (message.signedHeader !== undefined && message.signedHeader !== undefined) {
|
||||
if (message.signedHeader !== undefined) {
|
||||
SignedHeader.encode(message.signedHeader, writer.uint32(10).fork()).ldelim();
|
||||
}
|
||||
if (message.validatorSet !== undefined && message.validatorSet !== undefined) {
|
||||
if (message.validatorSet !== undefined) {
|
||||
ValidatorSet.encode(message.validatorSet, writer.uint32(18).fork()).ldelim();
|
||||
}
|
||||
return writer;
|
||||
@ -1417,6 +1481,15 @@ export const LightBlock = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: LightBlock): unknown {
|
||||
const obj: any = {};
|
||||
message.signedHeader !== undefined &&
|
||||
(obj.signedHeader = message.signedHeader ? SignedHeader.toJSON(message.signedHeader) : undefined);
|
||||
message.validatorSet !== undefined &&
|
||||
(obj.validatorSet = message.validatorSet ? ValidatorSet.toJSON(message.validatorSet) : undefined);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<LightBlock>): LightBlock {
|
||||
const message = { ...baseLightBlock } as LightBlock;
|
||||
if (object.signedHeader !== undefined && object.signedHeader !== null) {
|
||||
@ -1431,29 +1504,24 @@ export const LightBlock = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: LightBlock): unknown {
|
||||
const obj: any = {};
|
||||
message.signedHeader !== undefined &&
|
||||
(obj.signedHeader = message.signedHeader ? SignedHeader.toJSON(message.signedHeader) : undefined);
|
||||
message.validatorSet !== undefined &&
|
||||
(obj.validatorSet = message.validatorSet ? ValidatorSet.toJSON(message.validatorSet) : undefined);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseBlockMeta: object = { blockSize: Long.ZERO, numTxs: Long.ZERO };
|
||||
|
||||
export const BlockMeta = {
|
||||
encode(message: BlockMeta, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
if (message.blockId !== undefined && message.blockId !== undefined) {
|
||||
if (message.blockId !== undefined) {
|
||||
BlockID.encode(message.blockId, writer.uint32(10).fork()).ldelim();
|
||||
}
|
||||
writer.uint32(16).int64(message.blockSize);
|
||||
if (message.header !== undefined && message.header !== undefined) {
|
||||
if (!message.blockSize.isZero()) {
|
||||
writer.uint32(16).int64(message.blockSize);
|
||||
}
|
||||
if (message.header !== undefined) {
|
||||
Header.encode(message.header, writer.uint32(26).fork()).ldelim();
|
||||
}
|
||||
writer.uint32(32).int64(message.numTxs);
|
||||
if (!message.numTxs.isZero()) {
|
||||
writer.uint32(32).int64(message.numTxs);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -1509,6 +1577,16 @@ export const BlockMeta = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: BlockMeta): unknown {
|
||||
const obj: any = {};
|
||||
message.blockId !== undefined &&
|
||||
(obj.blockId = message.blockId ? BlockID.toJSON(message.blockId) : undefined);
|
||||
message.blockSize !== undefined && (obj.blockSize = (message.blockSize || Long.ZERO).toString());
|
||||
message.header !== undefined && (obj.header = message.header ? Header.toJSON(message.header) : undefined);
|
||||
message.numTxs !== undefined && (obj.numTxs = (message.numTxs || Long.ZERO).toString());
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<BlockMeta>): BlockMeta {
|
||||
const message = { ...baseBlockMeta } as BlockMeta;
|
||||
if (object.blockId !== undefined && object.blockId !== null) {
|
||||
@ -1533,25 +1611,19 @@ export const BlockMeta = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: BlockMeta): unknown {
|
||||
const obj: any = {};
|
||||
message.blockId !== undefined &&
|
||||
(obj.blockId = message.blockId ? BlockID.toJSON(message.blockId) : undefined);
|
||||
message.blockSize !== undefined && (obj.blockSize = (message.blockSize || Long.ZERO).toString());
|
||||
message.header !== undefined && (obj.header = message.header ? Header.toJSON(message.header) : undefined);
|
||||
message.numTxs !== undefined && (obj.numTxs = (message.numTxs || Long.ZERO).toString());
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseTxProof: object = {};
|
||||
|
||||
export const TxProof = {
|
||||
encode(message: TxProof, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).bytes(message.rootHash);
|
||||
writer.uint32(18).bytes(message.data);
|
||||
if (message.proof !== undefined && message.proof !== undefined) {
|
||||
if (message.rootHash.length !== 0) {
|
||||
writer.uint32(10).bytes(message.rootHash);
|
||||
}
|
||||
if (message.data.length !== 0) {
|
||||
writer.uint32(18).bytes(message.data);
|
||||
}
|
||||
if (message.proof !== undefined) {
|
||||
Proof.encode(message.proof, writer.uint32(26).fork()).ldelim();
|
||||
}
|
||||
return writer;
|
||||
@ -1597,6 +1669,16 @@ export const TxProof = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: TxProof): unknown {
|
||||
const obj: any = {};
|
||||
message.rootHash !== undefined &&
|
||||
(obj.rootHash = base64FromBytes(message.rootHash !== undefined ? message.rootHash : new Uint8Array()));
|
||||
message.data !== undefined &&
|
||||
(obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array()));
|
||||
message.proof !== undefined && (obj.proof = message.proof ? Proof.toJSON(message.proof) : undefined);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<TxProof>): TxProof {
|
||||
const message = { ...baseTxProof } as TxProof;
|
||||
if (object.rootHash !== undefined && object.rootHash !== null) {
|
||||
@ -1616,16 +1698,6 @@ export const TxProof = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: TxProof): unknown {
|
||||
const obj: any = {};
|
||||
message.rootHash !== undefined &&
|
||||
(obj.rootHash = base64FromBytes(message.rootHash !== undefined ? message.rootHash : new Uint8Array()));
|
||||
message.data !== undefined &&
|
||||
(obj.data = base64FromBytes(message.data !== undefined ? message.data : new Uint8Array()));
|
||||
message.proof !== undefined && (obj.proof = message.proof ? Proof.toJSON(message.proof) : undefined);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
declare var self: any | undefined;
|
||||
@ -1635,7 +1707,7 @@ var globalThis: any = (() => {
|
||||
if (typeof self !== "undefined") return self;
|
||||
if (typeof window !== "undefined") return window;
|
||||
if (typeof global !== "undefined") return global;
|
||||
throw new Error("Unable to locate global object");
|
||||
throw "Unable to locate global object";
|
||||
})();
|
||||
|
||||
const atob: (b64: string) => string =
|
||||
|
||||
@ -30,10 +30,12 @@ export const ValidatorSet = {
|
||||
for (const v of message.validators) {
|
||||
Validator.encode(v!, writer.uint32(10).fork()).ldelim();
|
||||
}
|
||||
if (message.proposer !== undefined && message.proposer !== undefined) {
|
||||
if (message.proposer !== undefined) {
|
||||
Validator.encode(message.proposer, writer.uint32(18).fork()).ldelim();
|
||||
}
|
||||
writer.uint32(24).int64(message.totalVotingPower);
|
||||
if (!message.totalVotingPower.isZero()) {
|
||||
writer.uint32(24).int64(message.totalVotingPower);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -83,6 +85,20 @@ export const ValidatorSet = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: ValidatorSet): unknown {
|
||||
const obj: any = {};
|
||||
if (message.validators) {
|
||||
obj.validators = message.validators.map((e) => (e ? Validator.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.validators = [];
|
||||
}
|
||||
message.proposer !== undefined &&
|
||||
(obj.proposer = message.proposer ? Validator.toJSON(message.proposer) : undefined);
|
||||
message.totalVotingPower !== undefined &&
|
||||
(obj.totalVotingPower = (message.totalVotingPower || Long.ZERO).toString());
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<ValidatorSet>): ValidatorSet {
|
||||
const message = { ...baseValidatorSet } as ValidatorSet;
|
||||
message.validators = [];
|
||||
@ -103,32 +119,24 @@ export const ValidatorSet = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: ValidatorSet): unknown {
|
||||
const obj: any = {};
|
||||
if (message.validators) {
|
||||
obj.validators = message.validators.map((e) => (e ? Validator.toJSON(e) : undefined));
|
||||
} else {
|
||||
obj.validators = [];
|
||||
}
|
||||
message.proposer !== undefined &&
|
||||
(obj.proposer = message.proposer ? Validator.toJSON(message.proposer) : undefined);
|
||||
message.totalVotingPower !== undefined &&
|
||||
(obj.totalVotingPower = (message.totalVotingPower || Long.ZERO).toString());
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseValidator: object = { votingPower: Long.ZERO, proposerPriority: Long.ZERO };
|
||||
|
||||
export const Validator = {
|
||||
encode(message: Validator, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(10).bytes(message.address);
|
||||
if (message.pubKey !== undefined && message.pubKey !== undefined) {
|
||||
if (message.address.length !== 0) {
|
||||
writer.uint32(10).bytes(message.address);
|
||||
}
|
||||
if (message.pubKey !== undefined) {
|
||||
PublicKey.encode(message.pubKey, writer.uint32(18).fork()).ldelim();
|
||||
}
|
||||
writer.uint32(24).int64(message.votingPower);
|
||||
writer.uint32(32).int64(message.proposerPriority);
|
||||
if (!message.votingPower.isZero()) {
|
||||
writer.uint32(24).int64(message.votingPower);
|
||||
}
|
||||
if (!message.proposerPriority.isZero()) {
|
||||
writer.uint32(32).int64(message.proposerPriority);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -182,6 +190,18 @@ export const Validator = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Validator): unknown {
|
||||
const obj: any = {};
|
||||
message.address !== undefined &&
|
||||
(obj.address = base64FromBytes(message.address !== undefined ? message.address : new Uint8Array()));
|
||||
message.pubKey !== undefined &&
|
||||
(obj.pubKey = message.pubKey ? PublicKey.toJSON(message.pubKey) : undefined);
|
||||
message.votingPower !== undefined && (obj.votingPower = (message.votingPower || Long.ZERO).toString());
|
||||
message.proposerPriority !== undefined &&
|
||||
(obj.proposerPriority = (message.proposerPriority || Long.ZERO).toString());
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<Validator>): Validator {
|
||||
const message = { ...baseValidator } as Validator;
|
||||
if (object.address !== undefined && object.address !== null) {
|
||||
@ -206,28 +226,18 @@ export const Validator = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Validator): unknown {
|
||||
const obj: any = {};
|
||||
message.address !== undefined &&
|
||||
(obj.address = base64FromBytes(message.address !== undefined ? message.address : new Uint8Array()));
|
||||
message.pubKey !== undefined &&
|
||||
(obj.pubKey = message.pubKey ? PublicKey.toJSON(message.pubKey) : undefined);
|
||||
message.votingPower !== undefined && (obj.votingPower = (message.votingPower || Long.ZERO).toString());
|
||||
message.proposerPriority !== undefined &&
|
||||
(obj.proposerPriority = (message.proposerPriority || Long.ZERO).toString());
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseSimpleValidator: object = { votingPower: Long.ZERO };
|
||||
|
||||
export const SimpleValidator = {
|
||||
encode(message: SimpleValidator, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
if (message.pubKey !== undefined && message.pubKey !== undefined) {
|
||||
if (message.pubKey !== undefined) {
|
||||
PublicKey.encode(message.pubKey, writer.uint32(10).fork()).ldelim();
|
||||
}
|
||||
writer.uint32(16).int64(message.votingPower);
|
||||
if (!message.votingPower.isZero()) {
|
||||
writer.uint32(16).int64(message.votingPower);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -267,6 +277,14 @@ export const SimpleValidator = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: SimpleValidator): unknown {
|
||||
const obj: any = {};
|
||||
message.pubKey !== undefined &&
|
||||
(obj.pubKey = message.pubKey ? PublicKey.toJSON(message.pubKey) : undefined);
|
||||
message.votingPower !== undefined && (obj.votingPower = (message.votingPower || Long.ZERO).toString());
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<SimpleValidator>): SimpleValidator {
|
||||
const message = { ...baseSimpleValidator } as SimpleValidator;
|
||||
if (object.pubKey !== undefined && object.pubKey !== null) {
|
||||
@ -281,14 +299,6 @@ export const SimpleValidator = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: SimpleValidator): unknown {
|
||||
const obj: any = {};
|
||||
message.pubKey !== undefined &&
|
||||
(obj.pubKey = message.pubKey ? PublicKey.toJSON(message.pubKey) : undefined);
|
||||
message.votingPower !== undefined && (obj.votingPower = (message.votingPower || Long.ZERO).toString());
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
declare var self: any | undefined;
|
||||
@ -298,7 +308,7 @@ var globalThis: any = (() => {
|
||||
if (typeof self !== "undefined") return self;
|
||||
if (typeof window !== "undefined") return window;
|
||||
if (typeof global !== "undefined") return global;
|
||||
throw new Error("Unable to locate global object");
|
||||
throw "Unable to locate global object";
|
||||
})();
|
||||
|
||||
const atob: (b64: string) => string =
|
||||
|
||||
@ -28,8 +28,12 @@ const baseApp: object = { protocol: Long.UZERO, software: "" };
|
||||
|
||||
export const App = {
|
||||
encode(message: App, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(8).uint64(message.protocol);
|
||||
writer.uint32(18).string(message.software);
|
||||
if (!message.protocol.isZero()) {
|
||||
writer.uint32(8).uint64(message.protocol);
|
||||
}
|
||||
if (message.software !== "") {
|
||||
writer.uint32(18).string(message.software);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -69,6 +73,13 @@ export const App = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: App): unknown {
|
||||
const obj: any = {};
|
||||
message.protocol !== undefined && (obj.protocol = (message.protocol || Long.UZERO).toString());
|
||||
message.software !== undefined && (obj.software = message.software);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<App>): App {
|
||||
const message = { ...baseApp } as App;
|
||||
if (object.protocol !== undefined && object.protocol !== null) {
|
||||
@ -83,21 +94,18 @@ export const App = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: App): unknown {
|
||||
const obj: any = {};
|
||||
message.protocol !== undefined && (obj.protocol = (message.protocol || Long.UZERO).toString());
|
||||
message.software !== undefined && (obj.software = message.software);
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
const baseConsensus: object = { block: Long.UZERO, app: Long.UZERO };
|
||||
|
||||
export const Consensus = {
|
||||
encode(message: Consensus, writer: _m0.Writer = _m0.Writer.create()): _m0.Writer {
|
||||
writer.uint32(8).uint64(message.block);
|
||||
writer.uint32(16).uint64(message.app);
|
||||
if (!message.block.isZero()) {
|
||||
writer.uint32(8).uint64(message.block);
|
||||
}
|
||||
if (!message.app.isZero()) {
|
||||
writer.uint32(16).uint64(message.app);
|
||||
}
|
||||
return writer;
|
||||
},
|
||||
|
||||
@ -137,6 +145,13 @@ export const Consensus = {
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Consensus): unknown {
|
||||
const obj: any = {};
|
||||
message.block !== undefined && (obj.block = (message.block || Long.UZERO).toString());
|
||||
message.app !== undefined && (obj.app = (message.app || Long.UZERO).toString());
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial(object: DeepPartial<Consensus>): Consensus {
|
||||
const message = { ...baseConsensus } as Consensus;
|
||||
if (object.block !== undefined && object.block !== null) {
|
||||
@ -151,13 +166,6 @@ export const Consensus = {
|
||||
}
|
||||
return message;
|
||||
},
|
||||
|
||||
toJSON(message: Consensus): unknown {
|
||||
const obj: any = {};
|
||||
message.block !== undefined && (obj.block = (message.block || Long.UZERO).toString());
|
||||
message.app !== undefined && (obj.app = (message.app || Long.UZERO).toString());
|
||||
return obj;
|
||||
},
|
||||
};
|
||||
|
||||
type Builtin = Date | Function | Uint8Array | string | number | undefined | Long;
|
||||
|
||||
26
yarn.lock
26
yarn.lock
@ -8645,25 +8645,33 @@ ts-node@^8:
|
||||
source-map-support "^0.5.6"
|
||||
yn "3.1.1"
|
||||
|
||||
ts-poet@^4.4.1:
|
||||
version "4.4.1"
|
||||
resolved "https://registry.yarnpkg.com/ts-poet/-/ts-poet-4.4.1.tgz#064c613b1c432d2f62f0d4e59ff060a1c72cc984"
|
||||
integrity sha512-xnn4/+fhDDpWYrDQ4ATulJK3zwuKleo2U97CU2uWU42RSGMP4AYATGiZGIku+sSYVsa4toBPjtEY93TuR0ztGw==
|
||||
ts-poet@^4.5.0:
|
||||
version "4.5.0"
|
||||
resolved "https://registry.yarnpkg.com/ts-poet/-/ts-poet-4.5.0.tgz#bb07ffe379d5a96f5e81da72a00edad45b28e9ca"
|
||||
integrity sha512-Vs2Zsiz3zf5qdFulFTIEpaLdgWeHXKh+4pv+ycVqEh+ZuUOVGrN0i9lbxVx7DB1FBogExytz3OuaBMJfWffpSQ==
|
||||
dependencies:
|
||||
"@types/prettier" "^1.19.0"
|
||||
lodash "^4.17.15"
|
||||
prettier "^2.0.2"
|
||||
|
||||
ts-proto@^1.53.0:
|
||||
version "1.53.0"
|
||||
resolved "https://registry.yarnpkg.com/ts-proto/-/ts-proto-1.53.0.tgz#3261b5b029fe154a381ad3d97e247bdddd46f536"
|
||||
integrity sha512-/capMN0z4SVEyqpmXwH5ibq0DIy+ozgJ4tiq1yk3HgSn+ldXZtku03Wexw6Si08Q30YAQ6uSd205N2HmNjGp5w==
|
||||
ts-proto-descriptors@^1.2.0:
|
||||
version "1.2.0"
|
||||
resolved "https://registry.yarnpkg.com/ts-proto-descriptors/-/ts-proto-descriptors-1.2.0.tgz#47fdef5dc640d2c87fbe0c010678f009e79f63bc"
|
||||
integrity sha512-0t2WITzCiQ/3H6zPuFrFFOj2jhH6xZNu7agS7aKecKrz7tjRMW9VrmlBlJXslTTC3K7/4phV4qlsP5fOfLxuDg==
|
||||
dependencies:
|
||||
protobufjs "^6.8.8"
|
||||
|
||||
ts-proto@^1.67.0:
|
||||
version "1.67.0"
|
||||
resolved "https://registry.yarnpkg.com/ts-proto/-/ts-proto-1.67.0.tgz#27c45852e5640daa260750a91341026e49dfce40"
|
||||
integrity sha512-+a7zleIP3EuZucu8B/HgSqzZarYHSeZ9z2KYK0/P9K8meSuLKBFB5yipYU0VK78FxAdX+u//ZTGvwe2Pzq1XfA==
|
||||
dependencies:
|
||||
"@types/object-hash" "^1.3.0"
|
||||
dataloader "^1.4.0"
|
||||
object-hash "^1.3.1"
|
||||
protobufjs "^6.8.8"
|
||||
ts-poet "^4.4.1"
|
||||
ts-poet "^4.5.0"
|
||||
ts-proto-descriptors "^1.2.0"
|
||||
|
||||
tsconfig-paths@^3.9.0:
|
||||
version "3.9.0"
|
||||
|
||||
Loading…
Reference in New Issue
Block a user