diff options
author | Andrew Maurer <git@maurer.me> | 2018-10-13 23:09:50 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2018-10-13 23:09:50 +0800 |
commit | 69e9dbd68323439ac817e71c610dfae3716bee26 (patch) | |
tree | 6b2791f09132524963ae5e0bb58afffcb3720736 /packages/types | |
parent | dc56ce454967d2bf0d5e8c93389c0fa71a9d1cc5 (diff) | |
parent | a424c2adfabbbd9313b4f5ddeeeaebd0811fd1cd (diff) | |
download | dexon-0x-contracts-69e9dbd68323439ac817e71c610dfae3716bee26.tar.gz dexon-0x-contracts-69e9dbd68323439ac817e71c610dfae3716bee26.tar.zst dexon-0x-contracts-69e9dbd68323439ac817e71c610dfae3716bee26.zip |
Merge branch 'development' into development
Diffstat (limited to 'packages/types')
-rw-r--r-- | packages/types/CHANGELOG.json | 13 | ||||
-rw-r--r-- | packages/types/src/index.ts | 41 |
2 files changed, 44 insertions, 10 deletions
diff --git a/packages/types/CHANGELOG.json b/packages/types/CHANGELOG.json index 6bb6ced70..53e1f3716 100644 --- a/packages/types/CHANGELOG.json +++ b/packages/types/CHANGELOG.json @@ -1,5 +1,18 @@ [ { + "version": "1.2.0", + "changes": [ + { + "note": "Added `EIP712Parameter` `EIP712Types` `EIP712TypedData` for EIP712 signing", + "pr": 1102 + }, + { + "note": "Added `ZeroExTransaction` type for Exchange executeTransaction", + "pr": 1102 + } + ] + }, + { "timestamp": 1538693146, "version": "1.1.4", "changes": [ diff --git a/packages/types/src/index.ts b/packages/types/src/index.ts index 6f539fc1f..d33048b61 100644 --- a/packages/types/src/index.ts +++ b/packages/types/src/index.ts @@ -42,6 +42,15 @@ export interface SignedOrder extends Order { } /** + * ZeroExTransaction for use with 0x Exchange executeTransaction + */ +export interface ZeroExTransaction { + salt: BigNumber; + signerAddress: string; + data: string; +} + +/** * Elliptic Curve signature */ export interface ECSignature { @@ -143,16 +152,6 @@ export enum SignatureType { NSignatureTypes, } -/** - * The type of the Signer implementation. Some signer implementations use different message prefixes or implement different - * eth_sign behaviour (e.g Metamask). Default assumes a spec compliant `eth_sign`. - */ -export enum SignerType { - Default = 'DEFAULT', - Ledger = 'LEDGER', - Metamask = 'METAMASK', -} - export enum AssetProxyId { ERC20 = '0xf47261b0', ERC721 = '0x02571792', @@ -600,6 +599,28 @@ export interface Metadata { externalExportToLink: ExternalExportToLink; } +export interface EIP712Parameter { + name: string; + type: string; +} + +export interface EIP712Types { + [key: string]: EIP712Parameter[]; +} + +export type EIP712ObjectValue = string | number | EIP712Object; + +export interface EIP712Object { + [key: string]: EIP712ObjectValue; +} + +export interface EIP712TypedData { + types: EIP712Types; + domain: EIP712Object; + message: EIP712Object; + primaryType: string; +} + export interface Stats { orderCount: number; } |