@funkit/connect
Version:
Funkit Connect SDK elevates DeFi apps via web2 sign-ins and one-click checkouts.
28 lines (27 loc) • 957 B
TypeScript
import type { Address } from 'viem';
/**
* Operator override (Statsig `swappedwithdrawalsourceoverrides`) pinning a
* Swapped withdrawal to a known-good accepted asset, keyed on the source asset,
* for when the config's requested target isn't supported by Swapped. `when`
* matches the source; `use` is the target the Relay quote delivers.
*/
export interface SwappedSourceRouteOverride {
when: {
chainId: string;
tokenAddress: string;
};
use: {
chainId: string;
tokenAddress: Address;
symbol: string;
};
}
/**
* First well-formed override whose `when` matches the source asset, or
* `undefined`. First match wins so ops can order more specific rules ahead of
* broader ones.
*/
export declare function findSwappedSourceOverride(overrides: readonly SwappedSourceRouteOverride[] | undefined, source: {
chainId: string;
tokenAddress: string;
}): SwappedSourceRouteOverride | undefined;