blob: 4088805dc3a26e9cec4edbad9c04ecfb5aae8fb3 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
|
import { BigNumber } from '@0xproject/utils';
export enum OrderError {
InvalidSignature = 'INVALID_SIGNATURE',
}
export enum TradeSide {
Maker = 'maker',
Taker = 'taker',
}
export enum TransferType {
Trade = 'trade',
Fee = 'fee',
}
export interface EIP712Parameter {
name: string;
type: EIP712Types;
}
export interface EIP712Schema {
name: string;
parameters: EIP712Parameter[];
}
export enum EIP712Types {
Address = 'address',
Bytes = 'bytes',
Bytes32 = 'bytes32',
String = 'string',
Uint256 = 'uint256',
}
export interface CreateOrderOpts {
takerAddress?: string;
senderAddress?: string;
makerFee?: BigNumber;
takerFee?: BigNumber;
feeRecipientAddress?: string;
salt?: BigNumber;
expirationTimeSeconds?: BigNumber;
}
/**
* remainingFillableMakerAssetAmount: An array of BigNumbers corresponding to the `orders` parameter.
* You can use `OrderStateUtils` `@0xproject/order-utils` to perform blockchain lookups for these values.
* Defaults to `makerAssetAmount` values from the orders param.
* slippageBufferAmount: An additional amount of makerAsset to be covered by the result in case of trade collisions or partial fills.
* Defaults to 0
*/
export interface FindOrdersThatCoverMakerAssetFillAmountOpts {
remainingFillableMakerAssetAmounts?: BigNumber[];
slippageBufferAmount?: BigNumber;
}
/**
* remainingFillableMakerAssetAmount: An array of BigNumbers corresponding to the `orders` parameter.
* You can use `OrderStateUtils` `@0xproject/order-utils` to perform blockchain lookups for these values.
* Defaults to `makerAssetAmount` values from the orders param.
* remainingFillableFeeAmounts: An array of BigNumbers corresponding to the feeOrders parameter.
* You can use OrderStateUtils @0xproject/order-utils to perform blockchain lookups for these values.
* Defaults to `makerAssetAmount` values from the feeOrders param.
* slippageBufferAmount: An additional amount of fee to be covered by the result in case of trade collisions or partial fills.
* Defaults to 0
*/
export interface FindFeeOrdersThatCoverFeesForTargetOrdersOpts {
remainingFillableMakerAssetAmounts?: BigNumber[];
remainingFillableFeeAmounts?: BigNumber[];
slippageBufferAmount?: BigNumber;
}
export interface FeeOrdersAndRemainingFeeAmount<T> {
resultOrders: T[];
remainingFeeAmount: BigNumber;
}
export interface OrdersAndRemainingFillAmount<T> {
resultOrders: T[];
remainingFillAmount: BigNumber;
}
|