diff options
Diffstat (limited to 'packages/order-utils/src/types.ts')
-rw-r--r-- | packages/order-utils/src/types.ts | 39 |
1 files changed, 17 insertions, 22 deletions
diff --git a/packages/order-utils/src/types.ts b/packages/order-utils/src/types.ts index 2e9c79d80..55ec553db 100644 --- a/packages/order-utils/src/types.ts +++ b/packages/order-utils/src/types.ts @@ -1,7 +1,8 @@ -import { BigNumber } from '@0xproject/utils'; +import { BigNumber } from '@0x/utils'; export enum OrderError { InvalidSignature = 'INVALID_SIGNATURE', + InvalidMetamaskSigner = "MetaMask provider must be wrapped in a MetamaskSubprovider (from the '@0x/subproviders' package) in order to work with this method.", } export enum TradeSide { @@ -14,24 +15,6 @@ export enum TransferType { 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; @@ -44,7 +27,7 @@ export interface CreateOrderOpts { /** * remainingFillableMakerAssetAmount: An array of BigNumbers corresponding to the `orders` parameter. - * You can use `OrderStateUtils` `@0xproject/order-utils` to perform blockchain lookups for these values. + * You can use `OrderStateUtils` `@0x/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 @@ -56,10 +39,10 @@ export interface FindOrdersThatCoverMakerAssetFillAmountOpts { /** * remainingFillableMakerAssetAmount: An array of BigNumbers corresponding to the `orders` parameter. - * You can use `OrderStateUtils` `@0xproject/order-utils` to perform blockchain lookups for these values. + * You can use `OrderStateUtils` `@0x/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. + * You can use OrderStateUtils @0x/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 @@ -69,3 +52,15 @@ export interface FindFeeOrdersThatCoverFeesForTargetOrdersOpts { remainingFillableFeeAmounts?: BigNumber[]; slippageBufferAmount?: BigNumber; } + +export interface FeeOrdersAndRemainingFeeAmount<T> { + resultFeeOrders: T[]; + feeOrdersRemainingFillableMakerAssetAmounts: BigNumber[]; + remainingFeeAmount: BigNumber; +} + +export interface OrdersAndRemainingFillAmount<T> { + resultOrders: T[]; + ordersRemainingFillableMakerAssetAmounts: BigNumber[]; + remainingFillAmount: BigNumber; +} |