@gibs/bridge-sdk 1.6.36 → 1.7.2

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.
package/src/types.ts CHANGED
@@ -1,20 +1,24 @@
1
1
  import type { Hex, Chain } from 'viem'
2
2
  import type { Chains, Provider } from './config.js'
3
3
 
4
+ /** The per network bridge link */
4
5
  export type PerNetworkBridgeLink = {
5
6
  tokenAddress: Hex
6
7
  }
8
+ /** The extensions for a token */
7
9
  export type Extensions = {
8
10
  wrapped?: { address: Hex }
9
11
  bridgeInfo?: Record<number, PerNetworkBridgeLink>
10
12
  }
11
13
 
14
+ /** The metadata for a token */
12
15
  export type TokenMetadata = {
13
16
  name: string
14
17
  symbol: string
15
18
  decimals: number
16
19
  }
17
20
 
21
+ /** The token for a given asset */
18
22
  export type Token = TokenMetadata & {
19
23
  address: string
20
24
  chainId: number
@@ -22,18 +26,23 @@ export type Token = TokenMetadata & {
22
26
  extensions?: Extensions
23
27
  }
24
28
 
29
+ /** The token out for a given asset */
25
30
  export type TokenOut = Omit<Token, 'address'> & { address: string | null }
26
31
 
32
+ /** The token list for a given asset */
27
33
  export type TokenList = {
28
34
  tokens: Token[]
29
35
  }
30
36
 
37
+ /** The bridge key for a given provider, from chain, and to chain */
31
38
  export type BridgeKey = [Provider, Chains, Chains]
32
39
 
40
+ /** The visual chain for a given chain */
33
41
  export type VisualChain = Chain & {
34
42
  chainId: Chains
35
43
  logoURI: string
36
44
  alt: string
37
45
  }
38
46
 
47
+ /** The metadata for a chain */
39
48
  export type ChainsMetadata = Record<Chains, VisualChain>