-
Notifications
You must be signed in to change notification settings - Fork 41
/
Copy pathindex.ts
53 lines (50 loc) · 1.47 KB
/
index.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
import IBCInfoJSON from '../../chain-registry/ibc_info.json';
import { Network } from '../index';
/**
* Represents information about an IBC channel, facilitating communication
* between Sei and different blockchain networks.
*/
export interface ChannelInfo {
/**
* The name of the counterparty chain with which the channel is established.
*/
counterparty_chain_name: string;
/**
* The channel identifier on the destination chain.
*/
dst_channel: string;
/**
* The channel identifier on the source (Sei) chain.
*/
src_channel: string;
/**
* The port identifier used in the IBC communication.
*/
port_id: string;
/**
* The client identifier used for IBC communication.
*/
client_id: string;
}
/**
* A mapping of Sei network names to arrays of `ChannelInfo`, providing
* detailed IBC channel configurations for each network.
*/
type IBCInfo = {
/**
* Associates each official Sei network with its respective array of `ChannelInfo` objects,
* detailing the IBC channels available on that network.
*/
[network in Network]: ChannelInfo[];
};
/**
* A constant that holds the IBC channel information for each network, imported from the official Sei [chain-registry](https://github.com/sei-protocol/chain-registry)
*
* @example
* ```tsx
* import { IBC_INFO } from '@sei-js/registry';
*
* const pacific1 = IBC_INFO['pacific-1'].find((ibcInfo) => ibcInfo.counterparty_chain_name === 'cosmoshub-4');
* ```
*/
export const IBC_INFO: IBCInfo = IBCInfoJSON as IBCInfo;