UNPKG

@paraswap/sdk

Version:
44 lines 2.18 kB
import type { ConstructFetchInput, RequestParameters } from '../../types'; import { DeltaPrice } from './getDeltaPrice'; import { type SignableDeltaOrderData } from './helpers/buildDeltaOrderData'; import { BridgeInput } from './helpers/types'; export type { SignableDeltaOrderData } from './helpers/buildDeltaOrderData'; export type BuildDeltaOrderDataParams = { /** @description The address of the order owner */ owner: string; /** @description The address of the order beneficiary */ beneficiary?: string; /** @description The address of the src token */ srcToken: string; /** @description The address of the dest token */ destToken: string; /** @description The amount of src token to swap */ srcAmount: string; /** @description The minimum amount of dest token to receive */ destAmount: string; /** @description The deadline for the order */ deadline?: number; /** @description The nonce of the order */ nonce?: number | string; /** @description Optional permit signature for the src token https://developers.paraswap.network/api/paraswap-delta/build-and-sign-a-delta-order#supported-permits */ permit?: string; /** @description Partner string. */ partner?: string; /** @description The bridge input */ bridge?: BridgeInput; /** @description price response received from /delta/prices (getDeltaPrice method) */ deltaPrice: Pick<DeltaPrice, 'destAmount' | 'partner' | 'partnerFee'>; /** @description partner fee in basis points (bps), 50bps=0.5% */ partnerFeeBps?: number; /** @description partner address */ partnerAddress?: string; /** @description take surplus */ partnerTakesSurplus?: boolean; }; type BuildDeltaOrder = (buildOrderParams: BuildDeltaOrderDataParams, requestParams?: RequestParameters) => Promise<SignableDeltaOrderData>; export type BuildDeltaOrderFunctions = { /** @description Build Orders to be posted to Delta API for execution */ buildDeltaOrder: BuildDeltaOrder; }; export declare const constructBuildDeltaOrder: (options: ConstructFetchInput) => BuildDeltaOrderFunctions; //# sourceMappingURL=buildDeltaOrder.d.ts.map