@ledgerhq/live-common
Version:
Common ground for the Ledger Live apps
49 lines • 1.65 kB
TypeScript
import { type ExchangeProviderNameAndSignature } from ".";
export type SwapProviderConfig = {
needsKYC: boolean;
needsBearerToken?: boolean;
};
export type CEXProviderConfig = ExchangeProviderNameAndSignature & SwapProviderConfig & {
type: "CEX";
};
export type DEXProviderConfig = SwapProviderConfig & {
type: "DEX";
};
export type AdditionalProviderConfig = SwapProviderConfig & {
type: "DEX" | "CEX";
} & {
version?: number;
termsOfUseUrl: string;
supportUrl: string;
usefulUrls?: string[];
mainUrl: string;
useInExchangeApp: boolean;
displayName: string;
};
export type ProviderConfig = CEXProviderConfig | DEXProviderConfig;
export declare const dexProvidersContractAddress: {
[key: string]: string;
};
export declare const termsOfUse: {
[key: string]: string;
};
export declare const privacyPolicy: {
[key: string]: string;
};
type CurrencyData = {
id: string;
config: string;
signature: string;
};
export declare const getSwapProvider: (providerName: string) => Promise<ProviderConfig & AdditionalProviderConfig>;
/**
* Retrieves the currency data for a given ID
* @param currencyId The unique identifier for the currency.
* @returns A promise that resolves to the currency data including ID, serialized config, and signature.
* @deprecated Use cal module `findCurrencyData` method.
*/
export declare const findExchangeCurrencyData: (currencyId: string) => Promise<CurrencyData>;
export declare const fetchAndMergeProviderData: (env: any) => Promise<any>;
export declare const getAvailableProviders: () => Promise<string[]>;
export {};
//# sourceMappingURL=swap.d.ts.map