import { Address } from '@safeblock/blockchain-utils'; import { ethers, JsonRpcSigner } from 'ethers'; import { default as SdkCore, SdkConfig } from './sdk-core'; import { ExchangeRequest, ExecutorCallData } from '../types'; import { default as SdkException } from './sdk-exception'; type GenericBlacklist = Array<{ [key: string]: any; } & { [key in I]: string; } & { [key in S]: boolean; }>; /** * A powerful and easy-to-use SDK for seamless cross-chain and on-chain crypto swaps * * https://github.com/safeblock-dev/exchange-sdk/blob/main/README.md */ export default class SafeBlock extends SdkCore { constructor(sdkConfig?: Configuration); /** * Synchronize the exchange blacklist with the SDK. * Accepts any `GenericBlacklist`‑shaped object that must contain, at minimum, * the exchange identifier and its status. * * @param idFieldName field name that holds the exchange identifier * @param stateFieldName field name that holds the exchange status * @param {GenericBlacklist} list the blacklist object */ syncDexBlacklists(idFieldName: I, stateFieldName: S, list: GenericBlacklist): void; /** * Shortcut that fetches the best route for the given request and immediately builds a quota. * * @param {Address} from user address performing the swap * @param {ExchangeRequest} request swap request * @param {symbol} task current task symbol * @returns an `SdkException` or an `ExchangeQuota` */ createQuota(from: Address, request: ExchangeRequest, task: symbol): Promise; /** * Shortcut that prepares transactions in the format expected by `ethers`. * * @param {ExecutorCallData} data transaction data (`ExecutorCallData`) * @param {JsonRpcSigner} signer an `ethers`‑compatible `JsonRpcSigner` * @returns {Promise} an `SdkException` * or an `ethers.TransactionRequest` */ prepareEthersTransaction(data: ExecutorCallData, signer: JsonRpcSigner): Promise; } export { SdkConfig };