SwapperFactory<T>
Defined in: atomiq-sdk/src/swapper/SwapperFactory.ts:181
Factory class for creating and initializing Swapper instances with typed chain support
Type Parameters
| Type Parameter |
|---|
T extends readonly ChainInitializer<any, ChainType, any>[] |
Constructors
Constructor
new SwapperFactory<T>(initializers): SwapperFactory<T>;
Defined in: atomiq-sdk/src/swapper/SwapperFactory.ts:194
Parameters
| Parameter | Type |
|---|---|
initializers | T |
Returns
SwapperFactory<T>
Properties
initializers
readonly initializers: T;
Defined in: atomiq-sdk/src/swapper/SwapperFactory.ts:194
TokenResolver
TokenResolver: TypedTokenResolvers<T>;
Defined in: atomiq-sdk/src/swapper/SwapperFactory.ts:192
Token resolvers for various smart chains supported by the SDK, allow fetching tokens based on their addresses
Tokens
Tokens: TypedTokens<T>;
Defined in: atomiq-sdk/src/swapper/SwapperFactory.ts:186
All available tokens for the atomiq SDK
Methods
newSwapper()
newSwapper(options): TypedSwapper<T>;
Defined in: atomiq-sdk/src/swapper/SwapperFactory.ts:228
Returns a new swapper instance with the passed options.
The swapper returned here is not yet initialized, be sure to call Swapper.init, before calling any other functions in the swapper instance.
Parameters
| Parameter | Type | Description |
|---|---|---|
options | TypedSwapperOptions<T> | Options for customizing the swapper instance |
Returns
TypedSwapper<T>
newSwapperInitialized()
newSwapperInitialized(options): Promise<TypedSwapper<T>>;
Defined in: atomiq-sdk/src/swapper/SwapperFactory.ts:295
Returns a new and already initialized swapper instance with the passed options. There is no need to call Swapper.init anymore.
Parameters
| Parameter | Type | Description |
|---|---|---|
options | TypedSwapperOptions<T> | Options for customizing the swapper instance |
Returns
Promise<TypedSwapper<T>>