UNPKG

@lifi/widget

Version:

LI.FI Widget for cross-chain bridging and swapping. It will drive your multi-chain strategy and attract new users from everywhere.

20 lines (19 loc) 1.05 kB
import type { Token, TokenExtended } from '@lifi/sdk'; import type { FormType } from '../stores/form/types.js'; import type { TokensByChain } from '../types/token.js'; import type { WidgetChains, WidgetTokens } from '../types/widget.js'; /** * Merges verified tokens with search tokens. * Verified tokens take priority - search tokens are only added if they don't already exist. */ export declare const mergeVerifiedWithSearchTokens: (verifiedTokens?: TokensByChain, searchTokens?: TokensByChain) => TokensByChain | undefined; /** * Updates a token in the cache by chainId and address. * Returns a new cache object with the token updated, or the original if not found. */ export declare const updateTokenInCache: (data: TokensByChain | undefined, token: Token) => TokensByChain | undefined; export declare const filterAllowedTokens: (dataTokens: { [chainId: number]: TokenExtended[]; } | undefined, configTokens?: WidgetTokens, chainsConfig?: WidgetChains, formType?: FormType) => { [chainId: number]: TokenExtended[]; } | undefined;