@melonproject/protocol
Version:
Technology Regulated and Operated Investment Funds
20 lines (19 loc) • 1.05 kB
TypeScript
import { Order } from '@0x/types';
import { Address, BigInteger, QuantityInterface } from '@melonproject/token-math';
import { Environment } from '../../../../../utils/environment/Environment';
export interface CreateOrderArgs {
makerQuantity: QuantityInterface;
takerQuantity: QuantityInterface;
duration?: number;
makerAddress?: Address;
feeRecipientAddress?: Address;
takerFee?: BigInteger;
}
/**
* For Ethfinex orders: The makerQuantity.token has to be the
* Ethfinex Wrapper contract
*/
declare const createOrder: (environment: Environment, exchange: Address, { makerQuantity, takerQuantity, duration, makerAddress: givenMakerAddress, feeRecipientAddress, takerFee, }: CreateOrderArgs) => Promise<Order>;
declare const approveOrder: (environment: Environment, exchange: Address, order: Order) => Promise<void>;
declare const isValidSignatureOffChain: (environment: Environment, order: Order, signature: string, makerAddress?: Address) => Promise<boolean>;
export { createOrder, approveOrder, isValidSignatureOffChain };