From 45e9fbe8f93f68f3786629fff1861b1a66b90635 Mon Sep 17 00:00:00 2001 From: Jacob Evans Date: Tue, 31 Jul 2018 17:24:19 +0800 Subject: 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 --- packages/types/src/index.ts | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'packages/types/src') 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 @@ -142,6 +142,16 @@ export enum SignatureType { NSignatureTypes, } +/** + * 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 */ -- cgit v1.2.3