diff options
author | Jacob Evans <jacob@dekz.net> | 2018-07-31 17:24:19 +0800 |
---|---|---|
committer | Jacob Evans <jacob@dekz.net> | 2018-08-09 10:02:12 +0800 |
commit | 45e9fbe8f93f68f3786629fff1861b1a66b90635 (patch) | |
tree | 872fb25d4f5246e132f0211ea1ffd6770c12c7e2 /packages/types | |
parent | 53713188fee57391040c24cc627fdc5ab8982d2e (diff) | |
download | dexon-0x-contracts-45e9fbe8f93f68f3786629fff1861b1a66b90635.tar.gz dexon-0x-contracts-45e9fbe8f93f68f3786629fff1861b1a66b90635.tar.zst dexon-0x-contracts-45e9fbe8f93f68f3786629fff1861b1a66b90635.zip |
Introduce SignerProviderType
This allows the developer to indicate the nuanced signer provider. Some have different implementations (trezor, ledger) and others have different implementations (metamask). Breaking the abstraction of eth_sign. EthSign assumes a spec compliant implementation and can be used as a default
Diffstat (limited to 'packages/types')
-rw-r--r-- | packages/types/src/index.ts | 10 |
1 files changed, 10 insertions, 0 deletions
diff --git a/packages/types/src/index.ts b/packages/types/src/index.ts index 7774b61b0..ba384dbb8 100644 --- a/packages/types/src/index.ts +++ b/packages/types/src/index.ts @@ -143,6 +143,16 @@ export enum SignatureType { } /** + * The Signer Provider Type. Some Signer implementations use different message prefixes or implement different + * eth_sign behaviour. Note EthSign is compatible with the Ledger device. + */ +export enum SignerProviderType { + EthSign = 'ETH_SIGN', + Metamask = 'METAMASK', + Trezor = 'TREZOR', +} + +/** * Elliptic Curve signature */ export interface ECSignature { |