UNPKG

@paraswap/sdk

Version:
36 lines 1.88 kB
import type { ConstructFetchInput } from '../../types'; import { DeltaPrice } from './getDeltaPrice'; import { type PartnerFeeResponse } from './getPartnerFee'; import { type SignableDeltaOrderData } from './helpers/buildDeltaOrderData'; 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 price response received from /delta/prices (getDeltaPrice method) */ deltaPrice: Pick<DeltaPrice, 'destAmount' | 'partner' | 'partnerFee'>; } & Partial<PartnerFeeResponse>; type BuildDeltaOrder = (buildOrderParams: BuildDeltaOrderDataParams, signal?: AbortSignal) => 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