1
1
import type { Chain , Network } from "@wormhole-foundation/sdk-base" ;
2
2
import { lazyInstantiate } from "@wormhole-foundation/sdk-base" ;
3
- import type {
4
- AccountAddress ,
5
- ChainAddress ,
6
- NativeAddress ,
7
- UniversalOrNative ,
8
- } from "../../address.js" ;
3
+ import type { AccountAddress , ChainAddress } from "../../address.js" ;
9
4
import type { TokenAddress , TokenId } from "../../types.js" ;
10
5
import type { UnsignedTransaction } from "../../unsignedTransaction.js" ;
11
6
import type { ProtocolPayload , ProtocolVAA } from "./../../vaa/index.js" ;
@@ -144,7 +139,7 @@ export interface TokenBridge<N extends Network = Network, C extends Chain = Chai
144
139
* @returns The address of the native gas token that has been wrapped
145
140
* for use where the gas token is not possible to use (e.g. bridging)
146
141
*/
147
- getWrappedNative ( ) : Promise < NativeAddress < C > > ;
142
+ getWrappedNative ( ) : Promise < TokenAddress < C > > ;
148
143
/**
149
144
* Check to see if a foreign token has a wrapped version
150
145
*
@@ -158,7 +153,7 @@ export interface TokenBridge<N extends Network = Network, C extends Chain = Chai
158
153
* @param foreignToken The token to check
159
154
* @returns The address of the native version of this asset
160
155
*/
161
- getWrappedAsset ( foreignToken : TokenId < Chain > ) : Promise < NativeAddress < C > > ;
156
+ getWrappedAsset ( foreignToken : TokenId < Chain > ) : Promise < TokenAddress < C > > ;
162
157
/**
163
158
* Checks if a transfer VAA has been redeemed
164
159
*
@@ -177,7 +172,7 @@ export interface TokenBridge<N extends Network = Network, C extends Chain = Chai
177
172
*/
178
173
createAttestation (
179
174
token : TokenAddress < C > ,
180
- payer ?: UniversalOrNative < C > ,
175
+ payer ?: AccountAddress < C > ,
181
176
) : AsyncGenerator < UnsignedTransaction < N , C > > ;
182
177
183
178
/**
@@ -189,7 +184,7 @@ export interface TokenBridge<N extends Network = Network, C extends Chain = Chai
189
184
*/
190
185
submitAttestation (
191
186
vaa : TokenBridge . AttestVAA ,
192
- payer ?: UniversalOrNative < C > ,
187
+ payer ?: AccountAddress < C > ,
193
188
) : AsyncGenerator < UnsignedTransaction < N , C > > ;
194
189
195
190
/**
@@ -251,7 +246,7 @@ export interface AutomaticTokenBridge<N extends Network = Network, C extends Cha
251
246
/** Check if a given token is in the registered token list */
252
247
isRegisteredToken ( token : TokenAddress < C > ) : Promise < boolean > ;
253
248
/** Get the list of tokens that are registered and acceptable to send */
254
- getRegisteredTokens ( ) : Promise < NativeAddress < C > [ ] > ;
249
+ getRegisteredTokens ( ) : Promise < TokenAddress < C > [ ] > ;
255
250
/** Amount of native tokens a user would receive by swapping x amount of sending tokens */
256
251
nativeTokenAmount ( token : TokenAddress < C > , amount : bigint ) : Promise < bigint > ;
257
252
/** Maximum amount of sending tokens that can be swapped for native tokens */
0 commit comments