Update typescript definitions
This commit is contained in:
parent
d7de817d51
commit
103d838d4c
@ -49,6 +49,7 @@ export interface Auction {
|
||||
winningPrice?: Coin;
|
||||
}
|
||||
|
||||
/** Auctions represent all the auctions in the module */
|
||||
export interface Auctions {
|
||||
auctions: Auction[];
|
||||
}
|
||||
|
@ -7,7 +7,10 @@ import _m0 from "protobufjs/minimal";
|
||||
|
||||
export const protobufPackage = "cerc.auction.v1";
|
||||
|
||||
/** QueryParamsRequest is the format to query the parameters of the auction module */
|
||||
/**
|
||||
* QueryParamsRequest is the format to query the parameters of the auction
|
||||
* module
|
||||
*/
|
||||
export interface QueryParamsRequest {}
|
||||
|
||||
/** QueryParamsResponse returns parameters of the auction module */
|
||||
@ -30,19 +33,19 @@ export interface QueryAuctionsResponse {
|
||||
}
|
||||
|
||||
/** AuctionRequest is the format for querying a specific auction */
|
||||
export interface QueryAuctionRequest {
|
||||
export interface QueryGetAuctionRequest {
|
||||
/** Auction id */
|
||||
id: string;
|
||||
}
|
||||
|
||||
/** AuctionResponse returns the details of the queried auction */
|
||||
export interface QueryAuctionResponse {
|
||||
export interface QueryGetAuctionResponse {
|
||||
/** Auction details */
|
||||
auction?: Auction;
|
||||
}
|
||||
|
||||
/** BidRequest is the format for querying a specific bid in an auction */
|
||||
export interface QueryBidRequest {
|
||||
export interface QueryGetBidRequest {
|
||||
/** Auction id */
|
||||
auctionId: string;
|
||||
/** Bidder address */
|
||||
@ -50,24 +53,27 @@ export interface QueryBidRequest {
|
||||
}
|
||||
|
||||
/** BidResponse returns the details of the queried bid */
|
||||
export interface QueryBidResponse {
|
||||
export interface QueryGetBidResponse {
|
||||
/** Bid details */
|
||||
bid?: Bid;
|
||||
}
|
||||
|
||||
/** BidsRequest is the format for querying all bids in an auction */
|
||||
export interface QueryBidsRequest {
|
||||
export interface QueryGetBidsRequest {
|
||||
/** Auction id */
|
||||
auctionId: string;
|
||||
}
|
||||
|
||||
/** BidsResponse returns details of all bids in an auction */
|
||||
export interface QueryBidsResponse {
|
||||
export interface QueryGetBidsResponse {
|
||||
/** List of bids in the auction */
|
||||
bids: Bid[];
|
||||
}
|
||||
|
||||
/** AuctionsByBidderRequest is the format for querying all auctions containing a bidder address */
|
||||
/**
|
||||
* AuctionsByBidderRequest is the format for querying all auctions containing a
|
||||
* bidder address
|
||||
*/
|
||||
export interface QueryAuctionsByBidderRequest {
|
||||
/** Address of the bidder */
|
||||
bidderAddress: string;
|
||||
@ -79,7 +85,10 @@ export interface QueryAuctionsByBidderResponse {
|
||||
auctions?: Auctions;
|
||||
}
|
||||
|
||||
/** AuctionsByOwnerRequest is the format for querying all auctions created by an owner */
|
||||
/**
|
||||
* AuctionsByOwnerRequest is the format for querying all auctions created by an
|
||||
* owner
|
||||
*/
|
||||
export interface QueryAuctionsByOwnerRequest {
|
||||
/** Address of the owner */
|
||||
ownerAddress: string;
|
||||
@ -94,6 +103,10 @@ export interface QueryAuctionsByOwnerResponse {
|
||||
/** BalanceRequest is the format to fetch all balances */
|
||||
export interface QueryGetAuctionModuleBalanceRequest {}
|
||||
|
||||
/**
|
||||
* QueryGetAuctionModuleBalanceResponse is the response type for auction module
|
||||
* balance rpc method
|
||||
*/
|
||||
export interface QueryGetAuctionModuleBalanceResponse {
|
||||
/** Set of all balances within the auction */
|
||||
balance: Coin[];
|
||||
@ -348,13 +361,13 @@ export const QueryAuctionsResponse = {
|
||||
},
|
||||
};
|
||||
|
||||
function createBaseQueryAuctionRequest(): QueryAuctionRequest {
|
||||
function createBaseQueryGetAuctionRequest(): QueryGetAuctionRequest {
|
||||
return { id: "" };
|
||||
}
|
||||
|
||||
export const QueryAuctionRequest = {
|
||||
export const QueryGetAuctionRequest = {
|
||||
encode(
|
||||
message: QueryAuctionRequest,
|
||||
message: QueryGetAuctionRequest,
|
||||
writer: _m0.Writer = _m0.Writer.create()
|
||||
): _m0.Writer {
|
||||
if (message.id !== "") {
|
||||
@ -363,10 +376,13 @@ export const QueryAuctionRequest = {
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: _m0.Reader | Uint8Array, length?: number): QueryAuctionRequest {
|
||||
decode(
|
||||
input: _m0.Reader | Uint8Array,
|
||||
length?: number
|
||||
): QueryGetAuctionRequest {
|
||||
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseQueryAuctionRequest();
|
||||
const message = createBaseQueryGetAuctionRequest();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
@ -381,34 +397,34 @@ export const QueryAuctionRequest = {
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): QueryAuctionRequest {
|
||||
fromJSON(object: any): QueryGetAuctionRequest {
|
||||
return {
|
||||
id: isSet(object.id) ? String(object.id) : "",
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: QueryAuctionRequest): unknown {
|
||||
toJSON(message: QueryGetAuctionRequest): unknown {
|
||||
const obj: any = {};
|
||||
message.id !== undefined && (obj.id = message.id);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial<I extends Exact<DeepPartial<QueryAuctionRequest>, I>>(
|
||||
fromPartial<I extends Exact<DeepPartial<QueryGetAuctionRequest>, I>>(
|
||||
object: I
|
||||
): QueryAuctionRequest {
|
||||
const message = createBaseQueryAuctionRequest();
|
||||
): QueryGetAuctionRequest {
|
||||
const message = createBaseQueryGetAuctionRequest();
|
||||
message.id = object.id ?? "";
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
function createBaseQueryAuctionResponse(): QueryAuctionResponse {
|
||||
function createBaseQueryGetAuctionResponse(): QueryGetAuctionResponse {
|
||||
return { auction: undefined };
|
||||
}
|
||||
|
||||
export const QueryAuctionResponse = {
|
||||
export const QueryGetAuctionResponse = {
|
||||
encode(
|
||||
message: QueryAuctionResponse,
|
||||
message: QueryGetAuctionResponse,
|
||||
writer: _m0.Writer = _m0.Writer.create()
|
||||
): _m0.Writer {
|
||||
if (message.auction !== undefined) {
|
||||
@ -420,10 +436,10 @@ export const QueryAuctionResponse = {
|
||||
decode(
|
||||
input: _m0.Reader | Uint8Array,
|
||||
length?: number
|
||||
): QueryAuctionResponse {
|
||||
): QueryGetAuctionResponse {
|
||||
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseQueryAuctionResponse();
|
||||
const message = createBaseQueryGetAuctionResponse();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
@ -438,7 +454,7 @@ export const QueryAuctionResponse = {
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): QueryAuctionResponse {
|
||||
fromJSON(object: any): QueryGetAuctionResponse {
|
||||
return {
|
||||
auction: isSet(object.auction)
|
||||
? Auction.fromJSON(object.auction)
|
||||
@ -446,7 +462,7 @@ export const QueryAuctionResponse = {
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: QueryAuctionResponse): unknown {
|
||||
toJSON(message: QueryGetAuctionResponse): unknown {
|
||||
const obj: any = {};
|
||||
message.auction !== undefined &&
|
||||
(obj.auction = message.auction
|
||||
@ -455,10 +471,10 @@ export const QueryAuctionResponse = {
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial<I extends Exact<DeepPartial<QueryAuctionResponse>, I>>(
|
||||
fromPartial<I extends Exact<DeepPartial<QueryGetAuctionResponse>, I>>(
|
||||
object: I
|
||||
): QueryAuctionResponse {
|
||||
const message = createBaseQueryAuctionResponse();
|
||||
): QueryGetAuctionResponse {
|
||||
const message = createBaseQueryGetAuctionResponse();
|
||||
message.auction =
|
||||
object.auction !== undefined && object.auction !== null
|
||||
? Auction.fromPartial(object.auction)
|
||||
@ -467,13 +483,13 @@ export const QueryAuctionResponse = {
|
||||
},
|
||||
};
|
||||
|
||||
function createBaseQueryBidRequest(): QueryBidRequest {
|
||||
function createBaseQueryGetBidRequest(): QueryGetBidRequest {
|
||||
return { auctionId: "", bidder: "" };
|
||||
}
|
||||
|
||||
export const QueryBidRequest = {
|
||||
export const QueryGetBidRequest = {
|
||||
encode(
|
||||
message: QueryBidRequest,
|
||||
message: QueryGetBidRequest,
|
||||
writer: _m0.Writer = _m0.Writer.create()
|
||||
): _m0.Writer {
|
||||
if (message.auctionId !== "") {
|
||||
@ -485,10 +501,10 @@ export const QueryBidRequest = {
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: _m0.Reader | Uint8Array, length?: number): QueryBidRequest {
|
||||
decode(input: _m0.Reader | Uint8Array, length?: number): QueryGetBidRequest {
|
||||
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseQueryBidRequest();
|
||||
const message = createBaseQueryGetBidRequest();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
@ -506,37 +522,37 @@ export const QueryBidRequest = {
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): QueryBidRequest {
|
||||
fromJSON(object: any): QueryGetBidRequest {
|
||||
return {
|
||||
auctionId: isSet(object.auctionId) ? String(object.auctionId) : "",
|
||||
bidder: isSet(object.bidder) ? String(object.bidder) : "",
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: QueryBidRequest): unknown {
|
||||
toJSON(message: QueryGetBidRequest): unknown {
|
||||
const obj: any = {};
|
||||
message.auctionId !== undefined && (obj.auctionId = message.auctionId);
|
||||
message.bidder !== undefined && (obj.bidder = message.bidder);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial<I extends Exact<DeepPartial<QueryBidRequest>, I>>(
|
||||
fromPartial<I extends Exact<DeepPartial<QueryGetBidRequest>, I>>(
|
||||
object: I
|
||||
): QueryBidRequest {
|
||||
const message = createBaseQueryBidRequest();
|
||||
): QueryGetBidRequest {
|
||||
const message = createBaseQueryGetBidRequest();
|
||||
message.auctionId = object.auctionId ?? "";
|
||||
message.bidder = object.bidder ?? "";
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
function createBaseQueryBidResponse(): QueryBidResponse {
|
||||
function createBaseQueryGetBidResponse(): QueryGetBidResponse {
|
||||
return { bid: undefined };
|
||||
}
|
||||
|
||||
export const QueryBidResponse = {
|
||||
export const QueryGetBidResponse = {
|
||||
encode(
|
||||
message: QueryBidResponse,
|
||||
message: QueryGetBidResponse,
|
||||
writer: _m0.Writer = _m0.Writer.create()
|
||||
): _m0.Writer {
|
||||
if (message.bid !== undefined) {
|
||||
@ -545,10 +561,10 @@ export const QueryBidResponse = {
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: _m0.Reader | Uint8Array, length?: number): QueryBidResponse {
|
||||
decode(input: _m0.Reader | Uint8Array, length?: number): QueryGetBidResponse {
|
||||
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseQueryBidResponse();
|
||||
const message = createBaseQueryGetBidResponse();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
@ -563,23 +579,23 @@ export const QueryBidResponse = {
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): QueryBidResponse {
|
||||
fromJSON(object: any): QueryGetBidResponse {
|
||||
return {
|
||||
bid: isSet(object.bid) ? Bid.fromJSON(object.bid) : undefined,
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: QueryBidResponse): unknown {
|
||||
toJSON(message: QueryGetBidResponse): unknown {
|
||||
const obj: any = {};
|
||||
message.bid !== undefined &&
|
||||
(obj.bid = message.bid ? Bid.toJSON(message.bid) : undefined);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial<I extends Exact<DeepPartial<QueryBidResponse>, I>>(
|
||||
fromPartial<I extends Exact<DeepPartial<QueryGetBidResponse>, I>>(
|
||||
object: I
|
||||
): QueryBidResponse {
|
||||
const message = createBaseQueryBidResponse();
|
||||
): QueryGetBidResponse {
|
||||
const message = createBaseQueryGetBidResponse();
|
||||
message.bid =
|
||||
object.bid !== undefined && object.bid !== null
|
||||
? Bid.fromPartial(object.bid)
|
||||
@ -588,13 +604,13 @@ export const QueryBidResponse = {
|
||||
},
|
||||
};
|
||||
|
||||
function createBaseQueryBidsRequest(): QueryBidsRequest {
|
||||
function createBaseQueryGetBidsRequest(): QueryGetBidsRequest {
|
||||
return { auctionId: "" };
|
||||
}
|
||||
|
||||
export const QueryBidsRequest = {
|
||||
export const QueryGetBidsRequest = {
|
||||
encode(
|
||||
message: QueryBidsRequest,
|
||||
message: QueryGetBidsRequest,
|
||||
writer: _m0.Writer = _m0.Writer.create()
|
||||
): _m0.Writer {
|
||||
if (message.auctionId !== "") {
|
||||
@ -603,10 +619,10 @@ export const QueryBidsRequest = {
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: _m0.Reader | Uint8Array, length?: number): QueryBidsRequest {
|
||||
decode(input: _m0.Reader | Uint8Array, length?: number): QueryGetBidsRequest {
|
||||
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseQueryBidsRequest();
|
||||
const message = createBaseQueryGetBidsRequest();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
@ -621,34 +637,34 @@ export const QueryBidsRequest = {
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): QueryBidsRequest {
|
||||
fromJSON(object: any): QueryGetBidsRequest {
|
||||
return {
|
||||
auctionId: isSet(object.auctionId) ? String(object.auctionId) : "",
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: QueryBidsRequest): unknown {
|
||||
toJSON(message: QueryGetBidsRequest): unknown {
|
||||
const obj: any = {};
|
||||
message.auctionId !== undefined && (obj.auctionId = message.auctionId);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial<I extends Exact<DeepPartial<QueryBidsRequest>, I>>(
|
||||
fromPartial<I extends Exact<DeepPartial<QueryGetBidsRequest>, I>>(
|
||||
object: I
|
||||
): QueryBidsRequest {
|
||||
const message = createBaseQueryBidsRequest();
|
||||
): QueryGetBidsRequest {
|
||||
const message = createBaseQueryGetBidsRequest();
|
||||
message.auctionId = object.auctionId ?? "";
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
function createBaseQueryBidsResponse(): QueryBidsResponse {
|
||||
function createBaseQueryGetBidsResponse(): QueryGetBidsResponse {
|
||||
return { bids: [] };
|
||||
}
|
||||
|
||||
export const QueryBidsResponse = {
|
||||
export const QueryGetBidsResponse = {
|
||||
encode(
|
||||
message: QueryBidsResponse,
|
||||
message: QueryGetBidsResponse,
|
||||
writer: _m0.Writer = _m0.Writer.create()
|
||||
): _m0.Writer {
|
||||
for (const v of message.bids) {
|
||||
@ -657,10 +673,13 @@ export const QueryBidsResponse = {
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(input: _m0.Reader | Uint8Array, length?: number): QueryBidsResponse {
|
||||
decode(
|
||||
input: _m0.Reader | Uint8Array,
|
||||
length?: number
|
||||
): QueryGetBidsResponse {
|
||||
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseQueryBidsResponse();
|
||||
const message = createBaseQueryGetBidsResponse();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
@ -675,7 +694,7 @@ export const QueryBidsResponse = {
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): QueryBidsResponse {
|
||||
fromJSON(object: any): QueryGetBidsResponse {
|
||||
return {
|
||||
bids: Array.isArray(object?.bids)
|
||||
? object.bids.map((e: any) => Bid.fromJSON(e))
|
||||
@ -683,7 +702,7 @@ export const QueryBidsResponse = {
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: QueryBidsResponse): unknown {
|
||||
toJSON(message: QueryGetBidsResponse): unknown {
|
||||
const obj: any = {};
|
||||
if (message.bids) {
|
||||
obj.bids = message.bids.map((e) => (e ? Bid.toJSON(e) : undefined));
|
||||
@ -693,10 +712,10 @@ export const QueryBidsResponse = {
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial<I extends Exact<DeepPartial<QueryBidsResponse>, I>>(
|
||||
fromPartial<I extends Exact<DeepPartial<QueryGetBidsResponse>, I>>(
|
||||
object: I
|
||||
): QueryBidsResponse {
|
||||
const message = createBaseQueryBidsResponse();
|
||||
): QueryGetBidsResponse {
|
||||
const message = createBaseQueryGetBidsResponse();
|
||||
message.bids = object.bids?.map((e) => Bid.fromPartial(e)) || [];
|
||||
return message;
|
||||
},
|
||||
@ -1071,11 +1090,11 @@ export interface Query {
|
||||
/** Auctions queries all auctions */
|
||||
Auctions(request: QueryAuctionsRequest): Promise<QueryAuctionsResponse>;
|
||||
/** GetAuction queries an auction */
|
||||
GetAuction(request: QueryAuctionRequest): Promise<QueryAuctionResponse>;
|
||||
GetAuction(request: QueryGetAuctionRequest): Promise<QueryGetAuctionResponse>;
|
||||
/** GetBid queries an auction bid */
|
||||
GetBid(request: QueryBidRequest): Promise<QueryBidResponse>;
|
||||
GetBid(request: QueryGetBidRequest): Promise<QueryGetBidResponse>;
|
||||
/** GetBids queries all auction bids */
|
||||
GetBids(request: QueryBidsRequest): Promise<QueryBidsResponse>;
|
||||
GetBids(request: QueryGetBidsRequest): Promise<QueryGetBidsResponse>;
|
||||
/** AuctionsByBidder queries auctions by bidder */
|
||||
AuctionsByBidder(
|
||||
request: QueryAuctionsByBidderRequest
|
||||
@ -1119,31 +1138,33 @@ export class QueryClientImpl implements Query {
|
||||
);
|
||||
}
|
||||
|
||||
GetAuction(request: QueryAuctionRequest): Promise<QueryAuctionResponse> {
|
||||
const data = QueryAuctionRequest.encode(request).finish();
|
||||
GetAuction(
|
||||
request: QueryGetAuctionRequest
|
||||
): Promise<QueryGetAuctionResponse> {
|
||||
const data = QueryGetAuctionRequest.encode(request).finish();
|
||||
const promise = this.rpc.request(
|
||||
"cerc.auction.v1.Query",
|
||||
"GetAuction",
|
||||
data
|
||||
);
|
||||
return promise.then((data) =>
|
||||
QueryAuctionResponse.decode(new _m0.Reader(data))
|
||||
QueryGetAuctionResponse.decode(new _m0.Reader(data))
|
||||
);
|
||||
}
|
||||
|
||||
GetBid(request: QueryBidRequest): Promise<QueryBidResponse> {
|
||||
const data = QueryBidRequest.encode(request).finish();
|
||||
GetBid(request: QueryGetBidRequest): Promise<QueryGetBidResponse> {
|
||||
const data = QueryGetBidRequest.encode(request).finish();
|
||||
const promise = this.rpc.request("cerc.auction.v1.Query", "GetBid", data);
|
||||
return promise.then((data) =>
|
||||
QueryBidResponse.decode(new _m0.Reader(data))
|
||||
QueryGetBidResponse.decode(new _m0.Reader(data))
|
||||
);
|
||||
}
|
||||
|
||||
GetBids(request: QueryBidsRequest): Promise<QueryBidsResponse> {
|
||||
const data = QueryBidsRequest.encode(request).finish();
|
||||
GetBids(request: QueryGetBidsRequest): Promise<QueryGetBidsResponse> {
|
||||
const data = QueryGetBidsRequest.encode(request).finish();
|
||||
const promise = this.rpc.request("cerc.auction.v1.Query", "GetBids", data);
|
||||
return promise.then((data) =>
|
||||
QueryBidsResponse.decode(new _m0.Reader(data))
|
||||
QueryGetBidsResponse.decode(new _m0.Reader(data))
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -18,20 +18,20 @@ export interface QueryParamsResponse {
|
||||
params?: Params;
|
||||
}
|
||||
|
||||
/** QueryGetBondById queries a bonds. */
|
||||
export interface QueryGetBondsRequest {
|
||||
/** QueryBondsRequest queries bonds */
|
||||
export interface QueryBondsRequest {
|
||||
/** pagination defines an optional pagination for the request. */
|
||||
pagination?: PageRequest;
|
||||
}
|
||||
|
||||
/** QueryGetBondsResponse is response type for get the bonds by bond-id */
|
||||
export interface QueryGetBondsResponse {
|
||||
/** QueryBondsResponse is response type for get the bonds by bond-id */
|
||||
export interface QueryBondsResponse {
|
||||
bonds: Bond[];
|
||||
/** pagination defines the pagination in the response. */
|
||||
pagination?: PageResponse;
|
||||
}
|
||||
|
||||
/** QueryGetBondById */
|
||||
/** QueryGetBondById queries bond by bond id */
|
||||
export interface QueryGetBondByIdRequest {
|
||||
id: string;
|
||||
}
|
||||
@ -41,24 +41,36 @@ export interface QueryGetBondByIdResponse {
|
||||
bond?: Bond;
|
||||
}
|
||||
|
||||
/** QueryGetBondsByOwnerRequest is request type for Query/GetBondsByOwner RPC Method */
|
||||
/**
|
||||
* QueryGetBondsByOwnerRequest is request type for Query/GetBondsByOwner RPC
|
||||
* Method
|
||||
*/
|
||||
export interface QueryGetBondsByOwnerRequest {
|
||||
owner: string;
|
||||
/** pagination defines the pagination in the response. */
|
||||
pagination?: PageResponse;
|
||||
}
|
||||
|
||||
/** QueryGetBondsByOwnerResponse is response type for Query/GetBondsByOwner RPC Method */
|
||||
/**
|
||||
* QueryGetBondsByOwnerResponse is response type for Query/GetBondsByOwner RPC
|
||||
* Method
|
||||
*/
|
||||
export interface QueryGetBondsByOwnerResponse {
|
||||
bonds: Bond[];
|
||||
/** pagination defines the pagination in the response. */
|
||||
pagination?: PageResponse;
|
||||
}
|
||||
|
||||
/** QueryGetBondModuleBalanceRequest is request type for bond module balance rpc method */
|
||||
/**
|
||||
* QueryGetBondModuleBalanceRequest is request type for bond module balance rpc
|
||||
* method
|
||||
*/
|
||||
export interface QueryGetBondModuleBalanceRequest {}
|
||||
|
||||
/** QueryGetBondModuleBalanceResponse is the response type for bond module balance rpc method */
|
||||
/**
|
||||
* QueryGetBondModuleBalanceResponse is the response type for bond module
|
||||
* balance rpc method
|
||||
*/
|
||||
export interface QueryGetBondModuleBalanceResponse {
|
||||
balance: Coin[];
|
||||
}
|
||||
@ -165,13 +177,13 @@ export const QueryParamsResponse = {
|
||||
},
|
||||
};
|
||||
|
||||
function createBaseQueryGetBondsRequest(): QueryGetBondsRequest {
|
||||
function createBaseQueryBondsRequest(): QueryBondsRequest {
|
||||
return { pagination: undefined };
|
||||
}
|
||||
|
||||
export const QueryGetBondsRequest = {
|
||||
export const QueryBondsRequest = {
|
||||
encode(
|
||||
message: QueryGetBondsRequest,
|
||||
message: QueryBondsRequest,
|
||||
writer: _m0.Writer = _m0.Writer.create()
|
||||
): _m0.Writer {
|
||||
if (message.pagination !== undefined) {
|
||||
@ -180,13 +192,10 @@ export const QueryGetBondsRequest = {
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(
|
||||
input: _m0.Reader | Uint8Array,
|
||||
length?: number
|
||||
): QueryGetBondsRequest {
|
||||
decode(input: _m0.Reader | Uint8Array, length?: number): QueryBondsRequest {
|
||||
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseQueryGetBondsRequest();
|
||||
const message = createBaseQueryBondsRequest();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
@ -201,7 +210,7 @@ export const QueryGetBondsRequest = {
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): QueryGetBondsRequest {
|
||||
fromJSON(object: any): QueryBondsRequest {
|
||||
return {
|
||||
pagination: isSet(object.pagination)
|
||||
? PageRequest.fromJSON(object.pagination)
|
||||
@ -209,7 +218,7 @@ export const QueryGetBondsRequest = {
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: QueryGetBondsRequest): unknown {
|
||||
toJSON(message: QueryBondsRequest): unknown {
|
||||
const obj: any = {};
|
||||
message.pagination !== undefined &&
|
||||
(obj.pagination = message.pagination
|
||||
@ -218,10 +227,10 @@ export const QueryGetBondsRequest = {
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial<I extends Exact<DeepPartial<QueryGetBondsRequest>, I>>(
|
||||
fromPartial<I extends Exact<DeepPartial<QueryBondsRequest>, I>>(
|
||||
object: I
|
||||
): QueryGetBondsRequest {
|
||||
const message = createBaseQueryGetBondsRequest();
|
||||
): QueryBondsRequest {
|
||||
const message = createBaseQueryBondsRequest();
|
||||
message.pagination =
|
||||
object.pagination !== undefined && object.pagination !== null
|
||||
? PageRequest.fromPartial(object.pagination)
|
||||
@ -230,13 +239,13 @@ export const QueryGetBondsRequest = {
|
||||
},
|
||||
};
|
||||
|
||||
function createBaseQueryGetBondsResponse(): QueryGetBondsResponse {
|
||||
function createBaseQueryBondsResponse(): QueryBondsResponse {
|
||||
return { bonds: [], pagination: undefined };
|
||||
}
|
||||
|
||||
export const QueryGetBondsResponse = {
|
||||
export const QueryBondsResponse = {
|
||||
encode(
|
||||
message: QueryGetBondsResponse,
|
||||
message: QueryBondsResponse,
|
||||
writer: _m0.Writer = _m0.Writer.create()
|
||||
): _m0.Writer {
|
||||
for (const v of message.bonds) {
|
||||
@ -251,13 +260,10 @@ export const QueryGetBondsResponse = {
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(
|
||||
input: _m0.Reader | Uint8Array,
|
||||
length?: number
|
||||
): QueryGetBondsResponse {
|
||||
decode(input: _m0.Reader | Uint8Array, length?: number): QueryBondsResponse {
|
||||
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseQueryGetBondsResponse();
|
||||
const message = createBaseQueryBondsResponse();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
@ -275,7 +281,7 @@ export const QueryGetBondsResponse = {
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): QueryGetBondsResponse {
|
||||
fromJSON(object: any): QueryBondsResponse {
|
||||
return {
|
||||
bonds: Array.isArray(object?.bonds)
|
||||
? object.bonds.map((e: any) => Bond.fromJSON(e))
|
||||
@ -286,7 +292,7 @@ export const QueryGetBondsResponse = {
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: QueryGetBondsResponse): unknown {
|
||||
toJSON(message: QueryBondsResponse): unknown {
|
||||
const obj: any = {};
|
||||
if (message.bonds) {
|
||||
obj.bonds = message.bonds.map((e) => (e ? Bond.toJSON(e) : undefined));
|
||||
@ -300,10 +306,10 @@ export const QueryGetBondsResponse = {
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial<I extends Exact<DeepPartial<QueryGetBondsResponse>, I>>(
|
||||
fromPartial<I extends Exact<DeepPartial<QueryBondsResponse>, I>>(
|
||||
object: I
|
||||
): QueryGetBondsResponse {
|
||||
const message = createBaseQueryGetBondsResponse();
|
||||
): QueryBondsResponse {
|
||||
const message = createBaseQueryBondsResponse();
|
||||
message.bonds = object.bonds?.map((e) => Bond.fromPartial(e)) || [];
|
||||
message.pagination =
|
||||
object.pagination !== undefined && object.pagination !== null
|
||||
@ -708,7 +714,7 @@ export interface Query {
|
||||
/** Params queries bonds module params. */
|
||||
Params(request: QueryParamsRequest): Promise<QueryParamsResponse>;
|
||||
/** Bonds queries bonds list */
|
||||
Bonds(request: QueryGetBondsRequest): Promise<QueryGetBondsResponse>;
|
||||
Bonds(request: QueryBondsRequest): Promise<QueryBondsResponse>;
|
||||
/** GetBondById */
|
||||
GetBondById(
|
||||
request: QueryGetBondByIdRequest
|
||||
@ -718,7 +724,7 @@ export interface Query {
|
||||
request: QueryGetBondsByOwnerRequest
|
||||
): Promise<QueryGetBondsByOwnerResponse>;
|
||||
/** Get Bond module balance */
|
||||
GetBondsModuleBalance(
|
||||
GetBondModuleBalance(
|
||||
request: QueryGetBondModuleBalanceRequest
|
||||
): Promise<QueryGetBondModuleBalanceResponse>;
|
||||
}
|
||||
@ -731,7 +737,7 @@ export class QueryClientImpl implements Query {
|
||||
this.Bonds = this.Bonds.bind(this);
|
||||
this.GetBondById = this.GetBondById.bind(this);
|
||||
this.GetBondsByOwner = this.GetBondsByOwner.bind(this);
|
||||
this.GetBondsModuleBalance = this.GetBondsModuleBalance.bind(this);
|
||||
this.GetBondModuleBalance = this.GetBondModuleBalance.bind(this);
|
||||
}
|
||||
Params(request: QueryParamsRequest): Promise<QueryParamsResponse> {
|
||||
const data = QueryParamsRequest.encode(request).finish();
|
||||
@ -741,11 +747,11 @@ export class QueryClientImpl implements Query {
|
||||
);
|
||||
}
|
||||
|
||||
Bonds(request: QueryGetBondsRequest): Promise<QueryGetBondsResponse> {
|
||||
const data = QueryGetBondsRequest.encode(request).finish();
|
||||
Bonds(request: QueryBondsRequest): Promise<QueryBondsResponse> {
|
||||
const data = QueryBondsRequest.encode(request).finish();
|
||||
const promise = this.rpc.request("cerc.bond.v1.Query", "Bonds", data);
|
||||
return promise.then((data) =>
|
||||
QueryGetBondsResponse.decode(new _m0.Reader(data))
|
||||
QueryBondsResponse.decode(new _m0.Reader(data))
|
||||
);
|
||||
}
|
||||
|
||||
@ -773,13 +779,13 @@ export class QueryClientImpl implements Query {
|
||||
);
|
||||
}
|
||||
|
||||
GetBondsModuleBalance(
|
||||
GetBondModuleBalance(
|
||||
request: QueryGetBondModuleBalanceRequest
|
||||
): Promise<QueryGetBondModuleBalanceResponse> {
|
||||
const data = QueryGetBondModuleBalanceRequest.encode(request).finish();
|
||||
const promise = this.rpc.request(
|
||||
"cerc.bond.v1.Query",
|
||||
"GetBondsModuleBalance",
|
||||
"GetBondModuleBalance",
|
||||
data
|
||||
);
|
||||
return promise.then((data) =>
|
||||
|
@ -32,10 +32,12 @@ export interface QueryRecordsRequest {
|
||||
pagination?: PageRequest;
|
||||
}
|
||||
|
||||
/** Array type attribute */
|
||||
export interface QueryRecordsRequest_ArrayInput {
|
||||
values: QueryRecordsRequest_ValueInput[];
|
||||
}
|
||||
|
||||
/** Map type attribute */
|
||||
export interface QueryRecordsRequest_MapInput {
|
||||
values: { [key: string]: QueryRecordsRequest_ValueInput };
|
||||
}
|
||||
@ -45,6 +47,7 @@ export interface QueryRecordsRequest_MapInput_ValuesEntry {
|
||||
value?: QueryRecordsRequest_ValueInput;
|
||||
}
|
||||
|
||||
/** Type for record attribute value */
|
||||
export interface QueryRecordsRequest_ValueInput {
|
||||
string: string | undefined;
|
||||
int: Long | undefined;
|
||||
@ -55,6 +58,7 @@ export interface QueryRecordsRequest_ValueInput {
|
||||
map?: QueryRecordsRequest_MapInput | undefined;
|
||||
}
|
||||
|
||||
/** Type for record attribute key */
|
||||
export interface QueryRecordsRequest_KeyValueInput {
|
||||
key: string;
|
||||
value?: QueryRecordsRequest_ValueInput;
|
||||
@ -67,25 +71,25 @@ export interface QueryRecordsResponse {
|
||||
pagination?: PageResponse;
|
||||
}
|
||||
|
||||
/** QueryRecordByIdRequest is request type for registry records by id */
|
||||
export interface QueryRecordByIdRequest {
|
||||
/** QueryGetRecordRequest is request type for registry records by id */
|
||||
export interface QueryGetRecordRequest {
|
||||
id: string;
|
||||
}
|
||||
|
||||
/** QueryRecordByIdResponse is response type for registry records by id */
|
||||
export interface QueryRecordByIdResponse {
|
||||
/** QueryGetRecordResponse is response type for registry records by id */
|
||||
export interface QueryGetRecordResponse {
|
||||
record?: Record;
|
||||
}
|
||||
|
||||
/** QueryRecordsByBondIdRequest is request type for get the records by bond-id */
|
||||
export interface QueryRecordsByBondIdRequest {
|
||||
/** QueryGetRecordsByBondIdRequest is request type for get the records by bond-id */
|
||||
export interface QueryGetRecordsByBondIdRequest {
|
||||
id: string;
|
||||
/** pagination defines an optional pagination for the request. */
|
||||
pagination?: PageRequest;
|
||||
}
|
||||
|
||||
/** QueryRecordsByBondIdResponse is response type for records list by bond-id */
|
||||
export interface QueryRecordsByBondIdResponse {
|
||||
/** QueryGetRecordsByBondIdResponse is response type for records list by bond-id */
|
||||
export interface QueryGetRecordsByBondIdResponse {
|
||||
records: Record[];
|
||||
/** pagination defines the pagination in the response. */
|
||||
pagination?: PageResponse;
|
||||
@ -134,10 +138,16 @@ export interface QueryResolveLrnResponse {
|
||||
record?: Record;
|
||||
}
|
||||
|
||||
/** QueryGetRegistryModuleBalanceRequest is request type for registry module accounts balance */
|
||||
/**
|
||||
* QueryGetRegistryModuleBalanceRequest is request type for registry module
|
||||
* accounts balance
|
||||
*/
|
||||
export interface QueryGetRegistryModuleBalanceRequest {}
|
||||
|
||||
/** QueryGetRegistryModuleBalanceResponse is response type for registry module accounts balance */
|
||||
/**
|
||||
* QueryGetRegistryModuleBalanceResponse is response type for registry module
|
||||
* accounts balance
|
||||
*/
|
||||
export interface QueryGetRegistryModuleBalanceResponse {
|
||||
balances: AccountBalance[];
|
||||
}
|
||||
@ -904,13 +914,13 @@ export const QueryRecordsResponse = {
|
||||
},
|
||||
};
|
||||
|
||||
function createBaseQueryRecordByIdRequest(): QueryRecordByIdRequest {
|
||||
function createBaseQueryGetRecordRequest(): QueryGetRecordRequest {
|
||||
return { id: "" };
|
||||
}
|
||||
|
||||
export const QueryRecordByIdRequest = {
|
||||
export const QueryGetRecordRequest = {
|
||||
encode(
|
||||
message: QueryRecordByIdRequest,
|
||||
message: QueryGetRecordRequest,
|
||||
writer: _m0.Writer = _m0.Writer.create()
|
||||
): _m0.Writer {
|
||||
if (message.id !== "") {
|
||||
@ -922,10 +932,10 @@ export const QueryRecordByIdRequest = {
|
||||
decode(
|
||||
input: _m0.Reader | Uint8Array,
|
||||
length?: number
|
||||
): QueryRecordByIdRequest {
|
||||
): QueryGetRecordRequest {
|
||||
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseQueryRecordByIdRequest();
|
||||
const message = createBaseQueryGetRecordRequest();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
@ -940,34 +950,34 @@ export const QueryRecordByIdRequest = {
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): QueryRecordByIdRequest {
|
||||
fromJSON(object: any): QueryGetRecordRequest {
|
||||
return {
|
||||
id: isSet(object.id) ? String(object.id) : "",
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: QueryRecordByIdRequest): unknown {
|
||||
toJSON(message: QueryGetRecordRequest): unknown {
|
||||
const obj: any = {};
|
||||
message.id !== undefined && (obj.id = message.id);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial<I extends Exact<DeepPartial<QueryRecordByIdRequest>, I>>(
|
||||
fromPartial<I extends Exact<DeepPartial<QueryGetRecordRequest>, I>>(
|
||||
object: I
|
||||
): QueryRecordByIdRequest {
|
||||
const message = createBaseQueryRecordByIdRequest();
|
||||
): QueryGetRecordRequest {
|
||||
const message = createBaseQueryGetRecordRequest();
|
||||
message.id = object.id ?? "";
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
function createBaseQueryRecordByIdResponse(): QueryRecordByIdResponse {
|
||||
function createBaseQueryGetRecordResponse(): QueryGetRecordResponse {
|
||||
return { record: undefined };
|
||||
}
|
||||
|
||||
export const QueryRecordByIdResponse = {
|
||||
export const QueryGetRecordResponse = {
|
||||
encode(
|
||||
message: QueryRecordByIdResponse,
|
||||
message: QueryGetRecordResponse,
|
||||
writer: _m0.Writer = _m0.Writer.create()
|
||||
): _m0.Writer {
|
||||
if (message.record !== undefined) {
|
||||
@ -979,10 +989,10 @@ export const QueryRecordByIdResponse = {
|
||||
decode(
|
||||
input: _m0.Reader | Uint8Array,
|
||||
length?: number
|
||||
): QueryRecordByIdResponse {
|
||||
): QueryGetRecordResponse {
|
||||
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseQueryRecordByIdResponse();
|
||||
const message = createBaseQueryGetRecordResponse();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
@ -997,23 +1007,23 @@ export const QueryRecordByIdResponse = {
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): QueryRecordByIdResponse {
|
||||
fromJSON(object: any): QueryGetRecordResponse {
|
||||
return {
|
||||
record: isSet(object.record) ? Record.fromJSON(object.record) : undefined,
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: QueryRecordByIdResponse): unknown {
|
||||
toJSON(message: QueryGetRecordResponse): unknown {
|
||||
const obj: any = {};
|
||||
message.record !== undefined &&
|
||||
(obj.record = message.record ? Record.toJSON(message.record) : undefined);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial<I extends Exact<DeepPartial<QueryRecordByIdResponse>, I>>(
|
||||
fromPartial<I extends Exact<DeepPartial<QueryGetRecordResponse>, I>>(
|
||||
object: I
|
||||
): QueryRecordByIdResponse {
|
||||
const message = createBaseQueryRecordByIdResponse();
|
||||
): QueryGetRecordResponse {
|
||||
const message = createBaseQueryGetRecordResponse();
|
||||
message.record =
|
||||
object.record !== undefined && object.record !== null
|
||||
? Record.fromPartial(object.record)
|
||||
@ -1022,13 +1032,13 @@ export const QueryRecordByIdResponse = {
|
||||
},
|
||||
};
|
||||
|
||||
function createBaseQueryRecordsByBondIdRequest(): QueryRecordsByBondIdRequest {
|
||||
function createBaseQueryGetRecordsByBondIdRequest(): QueryGetRecordsByBondIdRequest {
|
||||
return { id: "", pagination: undefined };
|
||||
}
|
||||
|
||||
export const QueryRecordsByBondIdRequest = {
|
||||
export const QueryGetRecordsByBondIdRequest = {
|
||||
encode(
|
||||
message: QueryRecordsByBondIdRequest,
|
||||
message: QueryGetRecordsByBondIdRequest,
|
||||
writer: _m0.Writer = _m0.Writer.create()
|
||||
): _m0.Writer {
|
||||
if (message.id !== "") {
|
||||
@ -1043,10 +1053,10 @@ export const QueryRecordsByBondIdRequest = {
|
||||
decode(
|
||||
input: _m0.Reader | Uint8Array,
|
||||
length?: number
|
||||
): QueryRecordsByBondIdRequest {
|
||||
): QueryGetRecordsByBondIdRequest {
|
||||
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseQueryRecordsByBondIdRequest();
|
||||
const message = createBaseQueryGetRecordsByBondIdRequest();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
@ -1064,7 +1074,7 @@ export const QueryRecordsByBondIdRequest = {
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): QueryRecordsByBondIdRequest {
|
||||
fromJSON(object: any): QueryGetRecordsByBondIdRequest {
|
||||
return {
|
||||
id: isSet(object.id) ? String(object.id) : "",
|
||||
pagination: isSet(object.pagination)
|
||||
@ -1073,7 +1083,7 @@ export const QueryRecordsByBondIdRequest = {
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: QueryRecordsByBondIdRequest): unknown {
|
||||
toJSON(message: QueryGetRecordsByBondIdRequest): unknown {
|
||||
const obj: any = {};
|
||||
message.id !== undefined && (obj.id = message.id);
|
||||
message.pagination !== undefined &&
|
||||
@ -1083,10 +1093,10 @@ export const QueryRecordsByBondIdRequest = {
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial<I extends Exact<DeepPartial<QueryRecordsByBondIdRequest>, I>>(
|
||||
fromPartial<I extends Exact<DeepPartial<QueryGetRecordsByBondIdRequest>, I>>(
|
||||
object: I
|
||||
): QueryRecordsByBondIdRequest {
|
||||
const message = createBaseQueryRecordsByBondIdRequest();
|
||||
): QueryGetRecordsByBondIdRequest {
|
||||
const message = createBaseQueryGetRecordsByBondIdRequest();
|
||||
message.id = object.id ?? "";
|
||||
message.pagination =
|
||||
object.pagination !== undefined && object.pagination !== null
|
||||
@ -1096,13 +1106,13 @@ export const QueryRecordsByBondIdRequest = {
|
||||
},
|
||||
};
|
||||
|
||||
function createBaseQueryRecordsByBondIdResponse(): QueryRecordsByBondIdResponse {
|
||||
function createBaseQueryGetRecordsByBondIdResponse(): QueryGetRecordsByBondIdResponse {
|
||||
return { records: [], pagination: undefined };
|
||||
}
|
||||
|
||||
export const QueryRecordsByBondIdResponse = {
|
||||
export const QueryGetRecordsByBondIdResponse = {
|
||||
encode(
|
||||
message: QueryRecordsByBondIdResponse,
|
||||
message: QueryGetRecordsByBondIdResponse,
|
||||
writer: _m0.Writer = _m0.Writer.create()
|
||||
): _m0.Writer {
|
||||
for (const v of message.records) {
|
||||
@ -1120,10 +1130,10 @@ export const QueryRecordsByBondIdResponse = {
|
||||
decode(
|
||||
input: _m0.Reader | Uint8Array,
|
||||
length?: number
|
||||
): QueryRecordsByBondIdResponse {
|
||||
): QueryGetRecordsByBondIdResponse {
|
||||
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseQueryRecordsByBondIdResponse();
|
||||
const message = createBaseQueryGetRecordsByBondIdResponse();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
@ -1141,7 +1151,7 @@ export const QueryRecordsByBondIdResponse = {
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): QueryRecordsByBondIdResponse {
|
||||
fromJSON(object: any): QueryGetRecordsByBondIdResponse {
|
||||
return {
|
||||
records: Array.isArray(object?.records)
|
||||
? object.records.map((e: any) => Record.fromJSON(e))
|
||||
@ -1152,7 +1162,7 @@ export const QueryRecordsByBondIdResponse = {
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: QueryRecordsByBondIdResponse): unknown {
|
||||
toJSON(message: QueryGetRecordsByBondIdResponse): unknown {
|
||||
const obj: any = {};
|
||||
if (message.records) {
|
||||
obj.records = message.records.map((e) =>
|
||||
@ -1168,10 +1178,10 @@ export const QueryRecordsByBondIdResponse = {
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial<I extends Exact<DeepPartial<QueryRecordsByBondIdResponse>, I>>(
|
||||
fromPartial<I extends Exact<DeepPartial<QueryGetRecordsByBondIdResponse>, I>>(
|
||||
object: I
|
||||
): QueryRecordsByBondIdResponse {
|
||||
const message = createBaseQueryRecordsByBondIdResponse();
|
||||
): QueryGetRecordsByBondIdResponse {
|
||||
const message = createBaseQueryGetRecordsByBondIdResponse();
|
||||
message.records = object.records?.map((e) => Record.fromPartial(e)) || [];
|
||||
message.pagination =
|
||||
object.pagination !== undefined && object.pagination !== null
|
||||
@ -1878,11 +1888,11 @@ export interface Query {
|
||||
/** Records queries all records */
|
||||
Records(request: QueryRecordsRequest): Promise<QueryRecordsResponse>;
|
||||
/** Get record by id */
|
||||
GetRecord(request: QueryRecordByIdRequest): Promise<QueryRecordByIdResponse>;
|
||||
GetRecord(request: QueryGetRecordRequest): Promise<QueryGetRecordResponse>;
|
||||
/** Get records by bond id */
|
||||
GetRecordsByBondId(
|
||||
request: QueryRecordsByBondIdRequest
|
||||
): Promise<QueryRecordsByBondIdResponse>;
|
||||
request: QueryGetRecordsByBondIdRequest
|
||||
): Promise<QueryGetRecordsByBondIdResponse>;
|
||||
/** NameRecords queries all name records */
|
||||
NameRecords(
|
||||
request: QueryNameRecordsRequest
|
||||
@ -1929,29 +1939,29 @@ export class QueryClientImpl implements Query {
|
||||
);
|
||||
}
|
||||
|
||||
GetRecord(request: QueryRecordByIdRequest): Promise<QueryRecordByIdResponse> {
|
||||
const data = QueryRecordByIdRequest.encode(request).finish();
|
||||
GetRecord(request: QueryGetRecordRequest): Promise<QueryGetRecordResponse> {
|
||||
const data = QueryGetRecordRequest.encode(request).finish();
|
||||
const promise = this.rpc.request(
|
||||
"cerc.registry.v1.Query",
|
||||
"GetRecord",
|
||||
data
|
||||
);
|
||||
return promise.then((data) =>
|
||||
QueryRecordByIdResponse.decode(new _m0.Reader(data))
|
||||
QueryGetRecordResponse.decode(new _m0.Reader(data))
|
||||
);
|
||||
}
|
||||
|
||||
GetRecordsByBondId(
|
||||
request: QueryRecordsByBondIdRequest
|
||||
): Promise<QueryRecordsByBondIdResponse> {
|
||||
const data = QueryRecordsByBondIdRequest.encode(request).finish();
|
||||
request: QueryGetRecordsByBondIdRequest
|
||||
): Promise<QueryGetRecordsByBondIdResponse> {
|
||||
const data = QueryGetRecordsByBondIdRequest.encode(request).finish();
|
||||
const promise = this.rpc.request(
|
||||
"cerc.registry.v1.Query",
|
||||
"GetRecordsByBondId",
|
||||
data
|
||||
);
|
||||
return promise.then((data) =>
|
||||
QueryRecordsByBondIdResponse.decode(new _m0.Reader(data))
|
||||
QueryGetRecordsByBondIdResponse.decode(new _m0.Reader(data))
|
||||
);
|
||||
}
|
||||
|
||||
|
@ -33,7 +33,7 @@ export interface MsgSetName {
|
||||
/** MsgSetNameResponse */
|
||||
export interface MsgSetNameResponse {}
|
||||
|
||||
/** MsgReserveName */
|
||||
/** MsgReserveAuthority */
|
||||
export interface MsgReserveAuthority {
|
||||
name: string;
|
||||
signer: string;
|
||||
@ -41,7 +41,7 @@ export interface MsgReserveAuthority {
|
||||
owner: string;
|
||||
}
|
||||
|
||||
/** MsgReserveNameResponse */
|
||||
/** MsgReserveAuthorityResponse */
|
||||
export interface MsgReserveAuthorityResponse {}
|
||||
|
||||
/** MsgSetAuthorityBond */
|
||||
@ -54,14 +54,14 @@ export interface MsgSetAuthorityBond {
|
||||
/** MsgSetAuthorityBondResponse */
|
||||
export interface MsgSetAuthorityBondResponse {}
|
||||
|
||||
/** MsgDeleteNameAuthority */
|
||||
export interface MsgDeleteNameAuthority {
|
||||
/** MsgDeleteName */
|
||||
export interface MsgDeleteName {
|
||||
lrn: string;
|
||||
signer: string;
|
||||
}
|
||||
|
||||
/** MsgDeleteNameAuthorityResponse */
|
||||
export interface MsgDeleteNameAuthorityResponse {}
|
||||
/** MsgDeleteNameResponse */
|
||||
export interface MsgDeleteNameResponse {}
|
||||
|
||||
/** MsgRenewRecord */
|
||||
export interface MsgRenewRecord {
|
||||
@ -675,13 +675,13 @@ export const MsgSetAuthorityBondResponse = {
|
||||
},
|
||||
};
|
||||
|
||||
function createBaseMsgDeleteNameAuthority(): MsgDeleteNameAuthority {
|
||||
function createBaseMsgDeleteName(): MsgDeleteName {
|
||||
return { lrn: "", signer: "" };
|
||||
}
|
||||
|
||||
export const MsgDeleteNameAuthority = {
|
||||
export const MsgDeleteName = {
|
||||
encode(
|
||||
message: MsgDeleteNameAuthority,
|
||||
message: MsgDeleteName,
|
||||
writer: _m0.Writer = _m0.Writer.create()
|
||||
): _m0.Writer {
|
||||
if (message.lrn !== "") {
|
||||
@ -693,13 +693,10 @@ export const MsgDeleteNameAuthority = {
|
||||
return writer;
|
||||
},
|
||||
|
||||
decode(
|
||||
input: _m0.Reader | Uint8Array,
|
||||
length?: number
|
||||
): MsgDeleteNameAuthority {
|
||||
decode(input: _m0.Reader | Uint8Array, length?: number): MsgDeleteName {
|
||||
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseMsgDeleteNameAuthority();
|
||||
const message = createBaseMsgDeleteName();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
@ -717,37 +714,37 @@ export const MsgDeleteNameAuthority = {
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(object: any): MsgDeleteNameAuthority {
|
||||
fromJSON(object: any): MsgDeleteName {
|
||||
return {
|
||||
lrn: isSet(object.lrn) ? String(object.lrn) : "",
|
||||
signer: isSet(object.signer) ? String(object.signer) : "",
|
||||
};
|
||||
},
|
||||
|
||||
toJSON(message: MsgDeleteNameAuthority): unknown {
|
||||
toJSON(message: MsgDeleteName): unknown {
|
||||
const obj: any = {};
|
||||
message.lrn !== undefined && (obj.lrn = message.lrn);
|
||||
message.signer !== undefined && (obj.signer = message.signer);
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial<I extends Exact<DeepPartial<MsgDeleteNameAuthority>, I>>(
|
||||
fromPartial<I extends Exact<DeepPartial<MsgDeleteName>, I>>(
|
||||
object: I
|
||||
): MsgDeleteNameAuthority {
|
||||
const message = createBaseMsgDeleteNameAuthority();
|
||||
): MsgDeleteName {
|
||||
const message = createBaseMsgDeleteName();
|
||||
message.lrn = object.lrn ?? "";
|
||||
message.signer = object.signer ?? "";
|
||||
return message;
|
||||
},
|
||||
};
|
||||
|
||||
function createBaseMsgDeleteNameAuthorityResponse(): MsgDeleteNameAuthorityResponse {
|
||||
function createBaseMsgDeleteNameResponse(): MsgDeleteNameResponse {
|
||||
return {};
|
||||
}
|
||||
|
||||
export const MsgDeleteNameAuthorityResponse = {
|
||||
export const MsgDeleteNameResponse = {
|
||||
encode(
|
||||
_: MsgDeleteNameAuthorityResponse,
|
||||
_: MsgDeleteNameResponse,
|
||||
writer: _m0.Writer = _m0.Writer.create()
|
||||
): _m0.Writer {
|
||||
return writer;
|
||||
@ -756,10 +753,10 @@ export const MsgDeleteNameAuthorityResponse = {
|
||||
decode(
|
||||
input: _m0.Reader | Uint8Array,
|
||||
length?: number
|
||||
): MsgDeleteNameAuthorityResponse {
|
||||
): MsgDeleteNameResponse {
|
||||
const reader = input instanceof _m0.Reader ? input : new _m0.Reader(input);
|
||||
let end = length === undefined ? reader.len : reader.pos + length;
|
||||
const message = createBaseMsgDeleteNameAuthorityResponse();
|
||||
const message = createBaseMsgDeleteNameResponse();
|
||||
while (reader.pos < end) {
|
||||
const tag = reader.uint32();
|
||||
switch (tag >>> 3) {
|
||||
@ -771,19 +768,19 @@ export const MsgDeleteNameAuthorityResponse = {
|
||||
return message;
|
||||
},
|
||||
|
||||
fromJSON(_: any): MsgDeleteNameAuthorityResponse {
|
||||
fromJSON(_: any): MsgDeleteNameResponse {
|
||||
return {};
|
||||
},
|
||||
|
||||
toJSON(_: MsgDeleteNameAuthorityResponse): unknown {
|
||||
toJSON(_: MsgDeleteNameResponse): unknown {
|
||||
const obj: any = {};
|
||||
return obj;
|
||||
},
|
||||
|
||||
fromPartial<I extends Exact<DeepPartial<MsgDeleteNameAuthorityResponse>, I>>(
|
||||
fromPartial<I extends Exact<DeepPartial<MsgDeleteNameResponse>, I>>(
|
||||
_: I
|
||||
): MsgDeleteNameAuthorityResponse {
|
||||
const message = createBaseMsgDeleteNameAuthorityResponse();
|
||||
): MsgDeleteNameResponse {
|
||||
const message = createBaseMsgDeleteNameResponse();
|
||||
return message;
|
||||
},
|
||||
};
|
||||
@ -1384,14 +1381,12 @@ export interface Msg {
|
||||
): Promise<MsgReassociateRecordsResponse>;
|
||||
/** SetName will store the name with given lrn and name */
|
||||
SetName(request: MsgSetName): Promise<MsgSetNameResponse>;
|
||||
/** Reserve name */
|
||||
ReserveName(
|
||||
/** Delete Name method will remove authority name */
|
||||
DeleteName(request: MsgDeleteName): Promise<MsgDeleteNameResponse>;
|
||||
/** Reserve authority name */
|
||||
ReserveAuthority(
|
||||
request: MsgReserveAuthority
|
||||
): Promise<MsgReserveAuthorityResponse>;
|
||||
/** Delete Name method will remove authority name */
|
||||
DeleteName(
|
||||
request: MsgDeleteNameAuthority
|
||||
): Promise<MsgDeleteNameAuthorityResponse>;
|
||||
/** SetAuthorityBond */
|
||||
SetAuthorityBond(
|
||||
request: MsgSetAuthorityBond
|
||||
@ -1409,8 +1404,8 @@ export class MsgClientImpl implements Msg {
|
||||
this.DissociateRecords = this.DissociateRecords.bind(this);
|
||||
this.ReassociateRecords = this.ReassociateRecords.bind(this);
|
||||
this.SetName = this.SetName.bind(this);
|
||||
this.ReserveName = this.ReserveName.bind(this);
|
||||
this.DeleteName = this.DeleteName.bind(this);
|
||||
this.ReserveAuthority = this.ReserveAuthority.bind(this);
|
||||
this.SetAuthorityBond = this.SetAuthorityBond.bind(this);
|
||||
}
|
||||
SetRecord(request: MsgSetRecord): Promise<MsgSetRecordResponse> {
|
||||
@ -1495,31 +1490,29 @@ export class MsgClientImpl implements Msg {
|
||||
);
|
||||
}
|
||||
|
||||
ReserveName(
|
||||
request: MsgReserveAuthority
|
||||
): Promise<MsgReserveAuthorityResponse> {
|
||||
const data = MsgReserveAuthority.encode(request).finish();
|
||||
const promise = this.rpc.request(
|
||||
"cerc.registry.v1.Msg",
|
||||
"ReserveName",
|
||||
data
|
||||
);
|
||||
return promise.then((data) =>
|
||||
MsgReserveAuthorityResponse.decode(new _m0.Reader(data))
|
||||
);
|
||||
}
|
||||
|
||||
DeleteName(
|
||||
request: MsgDeleteNameAuthority
|
||||
): Promise<MsgDeleteNameAuthorityResponse> {
|
||||
const data = MsgDeleteNameAuthority.encode(request).finish();
|
||||
DeleteName(request: MsgDeleteName): Promise<MsgDeleteNameResponse> {
|
||||
const data = MsgDeleteName.encode(request).finish();
|
||||
const promise = this.rpc.request(
|
||||
"cerc.registry.v1.Msg",
|
||||
"DeleteName",
|
||||
data
|
||||
);
|
||||
return promise.then((data) =>
|
||||
MsgDeleteNameAuthorityResponse.decode(new _m0.Reader(data))
|
||||
MsgDeleteNameResponse.decode(new _m0.Reader(data))
|
||||
);
|
||||
}
|
||||
|
||||
ReserveAuthority(
|
||||
request: MsgReserveAuthority
|
||||
): Promise<MsgReserveAuthorityResponse> {
|
||||
const data = MsgReserveAuthority.encode(request).finish();
|
||||
const promise = this.rpc.request(
|
||||
"cerc.registry.v1.Msg",
|
||||
"ReserveAuthority",
|
||||
data
|
||||
);
|
||||
return promise.then((data) =>
|
||||
MsgReserveAuthorityResponse.decode(new _m0.Reader(data))
|
||||
);
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user