@paraswap/sdk
Version:
49 lines • 1.46 kB
TypeScript
import type { OrderData } from './buildOrderData';
export type LimitOrderType = 'LIMIT' | 'P2P';
export type LimitOrder = LimitOrderFromApi;
export type LimitOrderToSend = OrderData & {
permitMakerAsset?: string;
signature: string;
};
export type LimitOrdersApiResponse = {
limit: number;
offset: number;
total: number;
hasMore: boolean;
orders: LimitOrderFromApi[];
};
export type LimitOrderApiResponse = {
order: LimitOrderFromApi;
};
export type LimitOrderState = 'DRAFT' | 'PENDING' | 'FULFILLED' | 'CANCELLED' | 'SUSPENDED' | 'EXPIRED';
export type LimitOrderEvent = '';
export type LimitOrderTransaction = {
hash: string;
event_type: 'OrderFilled' | 'OrderCancelled';
};
export type LimitOrderFromApi = {
chainId: number;
nonceAndMeta: string;
expiry: number;
maker: string;
taker: string;
makerAsset: string;
takerAsset: string;
makerAmount: string;
takerAmount: string;
makerBalance: string;
signature: string;
permitMakerAsset: null | string;
orderHash: string;
createdAt: number;
updatedAt: number;
state: LimitOrderState;
/** @description transaction with the last event pertaining to the order: OrderFilled or OrderCancelled */
transactionHash: null | string;
type: LimitOrderType;
takerFromMeta: string;
fillableBalance: string;
reservedBalance: string;
swappableBalance: string;
};
//# sourceMappingURL=types.d.ts.map