diff options
author | Brandon Millman <brandon.millman@gmail.com> | 2018-08-22 08:35:59 +0800 |
---|---|---|
committer | Brandon Millman <brandon.millman@gmail.com> | 2018-08-23 06:39:03 +0800 |
commit | 6cef847a2759864de64d79ea02368bd85039e5ad (patch) | |
tree | 1bd2188c9968d120681809e87af6dbcb6cb0c182 | |
parent | 68dfd1bb22c1d6d33a46ca1eff5fa6f62cde62ed (diff) | |
download | dexon-0x-contracts-6cef847a2759864de64d79ea02368bd85039e5ad.tar dexon-0x-contracts-6cef847a2759864de64d79ea02368bd85039e5ad.tar.gz dexon-0x-contracts-6cef847a2759864de64d79ea02368bd85039e5ad.tar.bz2 dexon-0x-contracts-6cef847a2759864de64d79ea02368bd85039e5ad.tar.lz dexon-0x-contracts-6cef847a2759864de64d79ea02368bd85039e5ad.tar.xz dexon-0x-contracts-6cef847a2759864de64d79ea02368bd85039e5ad.tar.zst dexon-0x-contracts-6cef847a2759864de64d79ea02368bd85039e5ad.zip |
Write initial forwarderHelperFactory
-rw-r--r-- | packages/forwarder-helper/src/forwarder_helper_factory.ts | 15 | ||||
-rw-r--r-- | packages/forwarder-helper/src/index.ts | 2 |
2 files changed, 17 insertions, 0 deletions
diff --git a/packages/forwarder-helper/src/forwarder_helper_factory.ts b/packages/forwarder-helper/src/forwarder_helper_factory.ts new file mode 100644 index 000000000..f08e3ff04 --- /dev/null +++ b/packages/forwarder-helper/src/forwarder_helper_factory.ts @@ -0,0 +1,15 @@ +import { SignedOrder } from '@0xproject/types'; + +import { ForwarderHelperImpl, ForwarderHelperImplConfig } from './forwarder_helper_impl'; +import { ForwarderHelper } from './types'; + +export const forwarderHelperFactory = { + getForwarderHelperForOrders(orders: SignedOrder[], feeOrders: SignedOrder[] = []): ForwarderHelper { + const config: ForwarderHelperImplConfig = { + orders, + feeOrders, + }; + const helper = new ForwarderHelperImpl(config); + return helper; + }, +}; diff --git a/packages/forwarder-helper/src/index.ts b/packages/forwarder-helper/src/index.ts index e69de29bb..eb3a34bd5 100644 --- a/packages/forwarder-helper/src/index.ts +++ b/packages/forwarder-helper/src/index.ts @@ -0,0 +1,2 @@ +export { forwarderHelperFactory } from './forwarder_helper_factory'; +export { ForwarderHelper, ForwarderHelperError, MarketBuyOrdersInfoRequest, MarketBuyOrdersInfo } from './types'; |