@velora-dex/sdk
Version:
64 lines • 3.7 kB
TypeScript
import { GetAdaptersFunctions } from '../methods/swap/adapters';
import { GetBalancesFunctions } from '../methods/swap/balance';
import { GetRateFunctions } from '../methods/swap/rates';
import { GetSpenderFunctions } from '../methods/swap/spender';
import { GetTokensFunctions } from '../methods/swap/token';
import { BuildTxFunctions } from '../methods/swap/transaction';
import { GetSwapTxFunctions } from '../methods/swap/swapTx';
import type { ConstructBaseInput, TxHash, Address, FetcherFunction, ExtraFetchParams } from '../types';
import type { EthersProviderDeps, MinViemClient } from '../helpers';
import type Web3 from 'web3';
import type { SwapSDKMethods } from '../methods/swap';
import { BuildOTCOrderFunctions } from '../methods/otcOrders/buildOrder';
import { PostOTCOrderFunctions } from '../methods/otcOrders/postOrder';
import { GetOTCOrdersFunctions } from '../methods/otcOrders/getOrders';
import { GetOTCOrdersContractFunctions } from '../methods/otcOrders/getOrdersContract';
import { BuildOTCOrdersTxFunctions } from '../methods/otcOrders/transaction';
import { OTCOrderHandlers } from '../methods/otcOrders';
import type { AxiosRequirement } from '../helpers/fetchers/axios';
import { DeltaOrderHandlers } from '../methods/delta';
import { BuildDeltaOrderFunctions } from '../methods/delta/buildDeltaOrder';
import { GetDeltaOrdersFunctions } from '../methods/delta/getDeltaOrders';
import { GetDeltaPriceFunctions } from '../methods/delta/getDeltaPrice';
import { GetDeltaContractFunctions } from '../methods/delta/getDeltaContract';
import { GetPartnerFeeFunctions } from '../methods/delta/getPartnerFee';
import { PostDeltaOrderFunctions } from '../methods/delta/postDeltaOrder';
import { GetQuoteFunctions } from '../methods/quote/getQuote';
import { GetBridgeRoutesFunctions } from '../methods/delta/getBridgeRoutes';
import { IsTokenSupportedInDeltaFunctions } from '../methods/delta/isTokenSupportedInDelta';
export type SwapFetchMethods = GetBalancesFunctions & GetTokensFunctions & GetSpenderFunctions & BuildTxFunctions & GetAdaptersFunctions & GetRateFunctions & GetSwapTxFunctions;
export type OTCOrdersFetchMethods = GetOTCOrdersContractFunctions & GetOTCOrdersFunctions & BuildOTCOrderFunctions & PostOTCOrderFunctions & BuildOTCOrdersTxFunctions;
export type DeltaFetchMethods = BuildDeltaOrderFunctions & GetDeltaOrdersFunctions & GetDeltaPriceFunctions & GetDeltaContractFunctions & GetPartnerFeeFunctions & GetBridgeRoutesFunctions & IsTokenSupportedInDeltaFunctions & PostDeltaOrderFunctions;
export type SimpleFetchSDK = {
swap: SwapFetchMethods;
otcOrders: OTCOrdersFetchMethods;
delta: DeltaFetchMethods;
quote: QuoteFetchMethods;
} & Required<ConstructBaseInput>;
export type QuoteFetchMethods = GetQuoteFunctions;
export type SimpleSDK = {
swap: SwapSDKMethods<TxHash>;
otcOrders: OTCOrderHandlers<TxHash>;
delta: DeltaOrderHandlers<TxHash>;
quote: QuoteFetchMethods;
} & Required<ConstructBaseInput>;
export type FetcherOptions = ({
axios: AxiosRequirement;
} | {
fetch: typeof fetch;
} | {
fetcher: FetcherFunction;
}) & ExtraFetchParams;
type SimpleOptions = ConstructBaseInput & FetcherOptions;
export type ProviderOptions = (EthersProviderDeps | {
web3: Web3;
} | {
viemClient: MinViemClient;
}) & {
account: Address;
};
/** @description construct SDK with methods that fetch from API and optionally with blockchain provider calling methods */
export declare function constructSimpleSDK(options: SimpleOptions): SimpleFetchSDK;
export declare function constructSimpleSDK(options: SimpleOptions, providerOptions: ProviderOptions): SimpleSDK;
export {};
//# sourceMappingURL=simple.d.ts.map