@initia/initia.js 1.0.2 → 1.0.4

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1,6 +1,6 @@
1
1
  import { BaseAPI } from './BaseAPI';
2
2
  import { APIParams, Pagination, PaginationOptions } from '../APIRequester';
3
- import { IdentifiedClientState, ClientConsensusStates, Channel, IdentifiedConnection, Height, IbcClientParams } from '../../../core';
3
+ import { IdentifiedClientState, ClientConsensusStates, Channel, IdentifiedConnection, Height, IbcClientParams, IdentifiedChannel } from '../../../core';
4
4
  export interface ClientState {
5
5
  client_state: any;
6
6
  proof: string | null;
@@ -26,11 +26,11 @@ export declare namespace Port {
26
26
  }
27
27
  }
28
28
  export declare class IbcAPI extends BaseAPI {
29
- channels(params?: APIParams): Promise<[Channel[], Pagination]>;
29
+ channels(params?: APIParams): Promise<[IdentifiedChannel[], Height, Pagination]>;
30
30
  port(channel_id: string, port_id: string, params?: APIParams): Promise<Port>;
31
31
  connections(params?: APIParams): Promise<[IdentifiedConnection[], Pagination]>;
32
32
  connection(connection_id: string, params?: APIParams): Promise<IdentifiedConnection>;
33
- connectionChannels(connection_id: string, params?: APIParams): Promise<[Channel[], Height, Pagination]>;
33
+ connectionChannels(connection_id: string, params?: APIParams): Promise<[IdentifiedChannel[], Height, Pagination]>;
34
34
  parameters(params?: APIParams): Promise<IbcClientParams>;
35
35
  clientStates(params?: Partial<PaginationOptions & APIParams>): Promise<[IdentifiedClientState[], Pagination]>;
36
36
  clientState(client_id: string, params?: APIParams): Promise<ClientState>;
@@ -7,7 +7,8 @@ export declare class Channel extends JSONSerializable<Channel.Amino, Channel.Dat
7
7
  counterparty: ChannelCounterparty | undefined;
8
8
  connection_hops: string[];
9
9
  version: string;
10
- constructor(state: State, ordering: Order, counterparty: ChannelCounterparty | undefined, connection_hops: string[], version: string);
10
+ upgrade_sequence: number;
11
+ constructor(state: State, ordering: Order, counterparty: ChannelCounterparty | undefined, connection_hops: string[], version: string, upgrade_sequence: number);
11
12
  static fromAmino(data: Channel.Amino): Channel;
12
13
  toAmino(): Channel.Amino;
13
14
  static fromData(data: Channel.Data): Channel;
@@ -22,6 +23,7 @@ export declare namespace Channel {
22
23
  counterparty?: ChannelCounterparty.Amino;
23
24
  connection_hops: string[];
24
25
  version: string;
26
+ upgrade_sequence: string;
25
27
  }
26
28
  interface Data {
27
29
  state: State;
@@ -29,6 +31,7 @@ export declare namespace Channel {
29
31
  counterparty?: ChannelCounterparty.Data;
30
32
  connection_hops: string[];
31
33
  version: string;
34
+ upgrade_sequence: string;
32
35
  }
33
36
  type Proto = Channel_pb;
34
37
  }
@@ -0,0 +1,43 @@
1
+ import { State, Order, IdentifiedChannel as IdentifiedChannel_pb } from '@initia/initia.proto/ibc/core/channel/v1/channel';
2
+ import { JSONSerializable } from '../../../../util/json';
3
+ import { ChannelCounterparty } from './ChannelCounterparty';
4
+ export declare class IdentifiedChannel extends JSONSerializable<IdentifiedChannel.Amino, IdentifiedChannel.Data, IdentifiedChannel.Proto> {
5
+ state: State;
6
+ ordering: Order;
7
+ counterparty: ChannelCounterparty | undefined;
8
+ connection_hops: string[];
9
+ version: string;
10
+ port_id: string;
11
+ channel_id: string;
12
+ upgrade_sequence: number;
13
+ constructor(state: State, ordering: Order, counterparty: ChannelCounterparty | undefined, connection_hops: string[], version: string, port_id: string, channel_id: string, upgrade_sequence: number);
14
+ static fromAmino(data: IdentifiedChannel.Amino): IdentifiedChannel;
15
+ toAmino(): IdentifiedChannel.Amino;
16
+ static fromData(data: IdentifiedChannel.Data): IdentifiedChannel;
17
+ toData(): IdentifiedChannel.Data;
18
+ static fromProto(proto: IdentifiedChannel.Proto): IdentifiedChannel;
19
+ toProto(): IdentifiedChannel.Proto;
20
+ }
21
+ export declare namespace IdentifiedChannel {
22
+ interface Amino {
23
+ state: State;
24
+ ordering: Order;
25
+ counterparty?: ChannelCounterparty.Amino;
26
+ connection_hops: string[];
27
+ version: string;
28
+ port_id: string;
29
+ channel_id: string;
30
+ upgrade_sequence: string;
31
+ }
32
+ interface Data {
33
+ state: State;
34
+ ordering: Order;
35
+ counterparty?: ChannelCounterparty.Data;
36
+ connection_hops: string[];
37
+ version: string;
38
+ port_id: string;
39
+ channel_id: string;
40
+ upgrade_sequence: string;
41
+ }
42
+ type Proto = IdentifiedChannel_pb;
43
+ }
@@ -2,6 +2,7 @@ export * from './msgs';
2
2
  export * from './Channel';
3
3
  export * from './ChannelCounterparty';
4
4
  export * from './IbcChannelParams';
5
+ export * from './IdentifiedChannel';
5
6
  export * from './Packet';
6
7
  export * from './PacketId';
7
8
  export * from './Timeout';