stargate: Add IBC packetAcknowledgements query
This commit is contained in:
parent
d9b8110999
commit
b252074c11
@ -46,6 +46,11 @@ export interface IbcExtension {
|
||||
channelId: string,
|
||||
sequence: number,
|
||||
) => Promise<ibc.core.channel.v1.IQueryPacketAcknowledgementResponse>;
|
||||
readonly packetAcknowledgements: (
|
||||
portId: string,
|
||||
channelId: string,
|
||||
paginationKey?: Uint8Array,
|
||||
) => Promise<ibc.core.channel.v1.IQueryPacketAcknowledgementsResponse>;
|
||||
readonly unreceivedPackets: (
|
||||
portId: string,
|
||||
channelId: string,
|
||||
@ -175,6 +180,14 @@ export function setupIbcExtension(base: QueryClient): IbcExtension {
|
||||
});
|
||||
return toObject(response);
|
||||
},
|
||||
packetAcknowledgements: async (portId: string, channelId: string, paginationKey?: Uint8Array) => {
|
||||
const response = await channelQueryService.packetAcknowledgements({
|
||||
portId: portId,
|
||||
channelId: channelId,
|
||||
pagination: paginationKey ? { key: paginationKey } : undefined,
|
||||
});
|
||||
return toObject(response);
|
||||
},
|
||||
unreceivedPackets: async (
|
||||
portId: string,
|
||||
channelId: string,
|
||||
|
||||
5
packages/stargate/types/queries/ibc.d.ts
vendored
5
packages/stargate/types/queries/ibc.d.ts
vendored
@ -35,6 +35,11 @@ export interface IbcExtension {
|
||||
channelId: string,
|
||||
sequence: number,
|
||||
) => Promise<ibc.core.channel.v1.IQueryPacketAcknowledgementResponse>;
|
||||
readonly packetAcknowledgements: (
|
||||
portId: string,
|
||||
channelId: string,
|
||||
paginationKey?: Uint8Array,
|
||||
) => Promise<ibc.core.channel.v1.IQueryPacketAcknowledgementsResponse>;
|
||||
readonly unreceivedPackets: (
|
||||
portId: string,
|
||||
channelId: string,
|
||||
|
||||
Loading…
Reference in New Issue
Block a user