aboutsummaryrefslogtreecommitdiffstats
path: root/packages/instant/src/types.ts
diff options
context:
space:
mode:
Diffstat (limited to 'packages/instant/src/types.ts')
-rw-r--r--packages/instant/src/types.ts26
1 files changed, 25 insertions, 1 deletions
diff --git a/packages/instant/src/types.ts b/packages/instant/src/types.ts
index 04469f8b9..0ab227310 100644
--- a/packages/instant/src/types.ts
+++ b/packages/instant/src/types.ts
@@ -1,4 +1,7 @@
-import { AssetProxyId, ObjectMap } from '@0x/types';
+import { AssetBuyer } from '@0x/asset-buyer';
+import { AssetProxyId, ObjectMap, SignedOrder } from '@0x/types';
+import { Web3Wrapper } from '@0x/web3-wrapper';
+import { Provider } from 'ethereum-types';
// Reusable
export type Maybe<T> = T | undefined;
@@ -89,3 +92,24 @@ export interface AffiliateInfo {
feeRecipient: string;
feePercentage: number;
}
+
+/**
+ * Our provider may be of 3 different types:
+ * Props: the provider was passed in a prop to the component
+ * Injected: the provider was injected into `window`
+ * FallbackEmptyWallet: the provider has no wallet but responds to data requests using infura
+ */
+export enum ProviderType {
+ Props = 'PROPS',
+ Injected = 'INJECTED',
+ FallbackEmptyWallet = 'FALLBACK_EMPTY_WALLET',
+}
+
+export interface ProviderState {
+ type: ProviderType;
+ provider: Provider;
+ assetBuyer: AssetBuyer;
+ web3Wrapper: Web3Wrapper;
+}
+
+export type OrderSource = string | SignedOrder[];