aboutsummaryrefslogtreecommitdiffstats
path: root/packages/order-watcher/src/types.ts
diff options
context:
space:
mode:
authorLeonid Logvinov <logvinov.leon@gmail.com>2018-07-13 23:45:25 +0800
committerLeonid Logvinov <logvinov.leon@gmail.com>2018-07-13 23:45:25 +0800
commit95e9f33f6aa5fa7849279062b008afa763a465d8 (patch)
tree085b1303c0576a1bafe471191253a416cbd939d2 /packages/order-watcher/src/types.ts
parentc599a20b34331c6481318d3cd3b01855444f339d (diff)
downloaddexon-sol-tools-95e9f33f6aa5fa7849279062b008afa763a465d8.tar
dexon-sol-tools-95e9f33f6aa5fa7849279062b008afa763a465d8.tar.gz
dexon-sol-tools-95e9f33f6aa5fa7849279062b008afa763a465d8.tar.bz2
dexon-sol-tools-95e9f33f6aa5fa7849279062b008afa763a465d8.tar.lz
dexon-sol-tools-95e9f33f6aa5fa7849279062b008afa763a465d8.tar.xz
dexon-sol-tools-95e9f33f6aa5fa7849279062b008afa763a465d8.tar.zst
dexon-sol-tools-95e9f33f6aa5fa7849279062b008afa763a465d8.zip
Migrate order-watcher to v2
Diffstat (limited to 'packages/order-watcher/src/types.ts')
-rw-r--r--packages/order-watcher/src/types.ts16
1 files changed, 9 insertions, 7 deletions
diff --git a/packages/order-watcher/src/types.ts b/packages/order-watcher/src/types.ts
index 63e4e7848..7991df58c 100644
--- a/packages/order-watcher/src/types.ts
+++ b/packages/order-watcher/src/types.ts
@@ -1,4 +1,5 @@
-import { BlockParamLiteral, LogEntryEvent, OrderState } from '@0xproject/types';
+import { OrderState } from '@0xproject/types';
+import { BlockParamLiteral, LogEntryEvent } from 'ethereum-types';
export enum OrderWatcherError {
SubscriptionAlreadyPresent = 'SUBSCRIPTION_ALREADY_PRESENT',
@@ -8,20 +9,21 @@ export enum OrderWatcherError {
export type EventWatcherCallback = (err: null | Error, log?: LogEntryEvent) => void;
/**
+ * stateLayer: Optional blockchain state layer OrderWatcher will monitor for new events. Default=latest.
* orderExpirationCheckingIntervalMs: How often to check for expired orders. Default=50.
* eventPollingIntervalMs: How often to poll the Ethereum node for new events. Default=200.
* expirationMarginMs: Amount of time before order expiry that you'd like to be notified
* of an orders expiration. Default=0.
* cleanupJobIntervalMs: How often to run a cleanup job which revalidates all the orders. Default=1hr.
- * stateLayer: Optional blockchain state layer OrderWatcher will monitor for new events. Default=latest.
+ * isVerbose: Weather the order watcher should be verbose. Default=true.
*/
export interface OrderWatcherConfig {
stateLayer: BlockParamLiteral;
- orderExpirationCheckingIntervalMs?: number;
- eventPollingIntervalMs?: number;
- expirationMarginMs?: number;
- cleanupJobIntervalMs?: number;
- isVerbose?: boolean;
+ orderExpirationCheckingIntervalMs: number;
+ eventPollingIntervalMs: number;
+ expirationMarginMs: number;
+ cleanupJobIntervalMs: number;
+ isVerbose: boolean;
}
export type OnOrderStateChangeCallback = (err: Error | null, orderState?: OrderState) => void;