@shapeshiftoss/hdwallet-keepkey
Advanced tools
Comparing version 0.2.0 to 0.3.0
@@ -1,21 +0,12 @@ | ||
import { BTCGetAddress, BTCSignTx, BTCSignedTx, BTCGetAccountPaths, BTCAccountPath, BTCSignMessage, BTCSignedMessage, BTCVerifyMessage, BTCInputScriptType, Constructor } from '@shapeshiftoss/hdwallet-core'; | ||
import { BTCWallet, BTCGetAddress, BTCSignTx, BTCSignedTx, BTCGetAccountPaths, BTCAccountPath, BTCSignMessage, BTCSignedMessage, BTCVerifyMessage, BTCInputScriptType, Coin } from '@shapeshiftoss/hdwallet-core'; | ||
import { KeepKeyTransport } from './transport'; | ||
/** | ||
* Mixin Constructor that adds BTC support to a KeepKeyHDWallet | ||
*/ | ||
export declare function KeepKeyBTCWallet<TBase extends Constructor>(Base: TBase): { | ||
new (...args: any[]): { | ||
_supportsBTC: boolean; | ||
transport: KeepKeyTransport; | ||
btcSupportsCoin(coin: string): Promise<boolean>; | ||
btcSupportsScriptType(coin: string, scriptType: BTCInputScriptType): Promise<boolean>; | ||
btcGetAddress(msg: BTCGetAddress): Promise<string>; | ||
btcSignTx(msg: BTCSignTx): Promise<BTCSignedTx>; | ||
btcSupportsSecureTransfer(): Promise<boolean>; | ||
btcSupportsNativeShapeShift(): Promise<boolean>; | ||
btcSignMessage(msg: BTCSignMessage): Promise<BTCSignedMessage>; | ||
btcVerifyMessage(msg: BTCVerifyMessage): Promise<boolean>; | ||
btcGetAccountPaths(msg: BTCGetAccountPaths): BTCAccountPath[]; | ||
btcIsSameAccount(msg: BTCAccountPath[]): boolean; | ||
}; | ||
} & TBase; | ||
export declare function btcSupportsCoin(coin: Coin): Promise<boolean>; | ||
export declare function btcSupportsScriptType(coin: Coin, scriptType: BTCInputScriptType): Promise<boolean>; | ||
export declare function btcGetAddress(wallet: BTCWallet, transport: KeepKeyTransport, msg: BTCGetAddress): Promise<string>; | ||
export declare function btcSignTx(wallet: BTCWallet, transport: KeepKeyTransport, msg: BTCSignTx): Promise<BTCSignedTx>; | ||
export declare function btcSupportsSecureTransfer(): Promise<boolean>; | ||
export declare function btcSupportsNativeShapeShift(): Promise<boolean>; | ||
export declare function btcSignMessage(wallet: BTCWallet, transport: KeepKeyTransport, msg: BTCSignMessage): Promise<BTCSignedMessage>; | ||
export declare function btcVerifyMessage(wallet: BTCWallet, transport: KeepKeyTransport, msg: BTCVerifyMessage): Promise<boolean>; | ||
export declare function btcGetAccountPaths(msg: BTCGetAccountPaths): Array<BTCAccountPath>; | ||
export declare function btcIsSameAccount(msg: Array<BTCAccountPath>): boolean; |
@@ -1,19 +0,10 @@ | ||
import { ETHGetAddress, ETHSignTx, ETHSignedTx, ETHGetAccountPath, ETHAccountPath, ETHSignMessage, ETHSignedMessage, ETHVerifyMessage, Constructor } from '@shapeshiftoss/hdwallet-core'; | ||
import { ETHGetAddress, ETHSignTx, ETHSignedTx, ETHGetAccountPath, ETHAccountPath, ETHSignMessage, ETHSignedMessage, ETHVerifyMessage } from '@shapeshiftoss/hdwallet-core'; | ||
import { KeepKeyTransport } from './transport'; | ||
/** | ||
* Mixin Constructor that adds ETH support to a KeepKeyHDWallet | ||
*/ | ||
export declare function KeepKeyETHWallet<TBase extends Constructor>(Base: TBase): { | ||
new (...args: any[]): { | ||
_supportsETH: boolean; | ||
transport: KeepKeyTransport; | ||
ethSupportsNetwork(chain_id: number): Promise<boolean>; | ||
ethSupportsSecureTransfer(): Promise<boolean>; | ||
ethSupportsNativeShapeShift(): Promise<boolean>; | ||
ethGetAccountPaths(msg: ETHGetAccountPath): ETHAccountPath[]; | ||
ethSignTx(msg: ETHSignTx): Promise<ETHSignedTx>; | ||
ethGetAddress(msg: ETHGetAddress): Promise<string>; | ||
ethSignMessage(msg: ETHSignMessage): Promise<ETHSignedMessage>; | ||
ethVerifyMessage(msg: ETHVerifyMessage): Promise<boolean>; | ||
}; | ||
} & TBase; | ||
export declare function ethSupportsNetwork(chain_id: number): Promise<boolean>; | ||
export declare function ethSupportsSecureTransfer(): Promise<boolean>; | ||
export declare function ethSupportsNativeShapeShift(): Promise<boolean>; | ||
export declare function ethGetAccountPaths(msg: ETHGetAccountPath): Array<ETHAccountPath>; | ||
export declare function ethSignTx(transport: KeepKeyTransport, msg: ETHSignTx): Promise<ETHSignedTx>; | ||
export declare function ethGetAddress(transport: KeepKeyTransport, msg: ETHGetAddress): Promise<string>; | ||
export declare function ethSignMessage(transport: KeepKeyTransport, msg: ETHSignMessage): Promise<ETHSignedMessage>; | ||
export declare function ethVerifyMessage(transport: KeepKeyTransport, msg: ETHVerifyMessage): Promise<boolean>; |
@@ -1,3 +0,1 @@ | ||
export * from './bitcoin'; | ||
export * from './ethereum'; | ||
export * from './keepkey'; | ||
@@ -4,0 +2,0 @@ export * from './responseTypeRegistry'; |
/// <reference types="node" /> | ||
import { HDWallet, GetPublicKey, PublicKey, RecoverDevice, ResetDevice, Coin, Ping, Pong, Event, LoadDevice } from "@shapeshiftoss/hdwallet-core"; | ||
import { HDWallet, GetPublicKey, PublicKey, RecoverDevice, ResetDevice, Coin, Ping, Pong, BTCWallet, ETHWallet, Event, LoadDevice, BTCInputScriptType, BTCGetAddress, BTCSignTx, BTCSignedTx, BTCSignMessage, BTCVerifyMessage, BTCAccountPath, BTCSignedMessage, BTCGetAccountPaths, ETHSignTx, ETHSignedTx, ETHGetAddress, ETHSignMessage, ETHSignedMessage, ETHVerifyMessage, ETHGetAccountPath, ETHAccountPath, DebugLinkWallet, HDWalletInfo, BTCWalletInfo, ETHWalletInfo } from "@shapeshiftoss/hdwallet-core"; | ||
import * as Messages from "@keepkey/device-protocol/lib/messages_pb"; | ||
@@ -7,6 +7,34 @@ import * as Types from "@keepkey/device-protocol/lib/types_pb"; | ||
export declare function isKeepKey(wallet: any): wallet is KeepKeyHDWallet; | ||
export declare class KeepKeyHDWallet extends HDWallet { | ||
export declare class KeepKeyHDWalletInfo implements HDWalletInfo, BTCWalletInfo, ETHWalletInfo { | ||
_supportsBTCInfo: boolean; | ||
_supportsETHInfo: boolean; | ||
getVendor(): string; | ||
btcSupportsCoin(coin: Coin): Promise<boolean>; | ||
btcSupportsScriptType(coin: Coin, scriptType: BTCInputScriptType): Promise<boolean>; | ||
btcSupportsSecureTransfer(): Promise<boolean>; | ||
btcSupportsNativeShapeShift(): Promise<boolean>; | ||
btcGetAccountPaths(msg: BTCGetAccountPaths): Array<BTCAccountPath>; | ||
btcIsSameAccount(msg: Array<BTCAccountPath>): boolean; | ||
ethSupportsNetwork(chain_id: number): Promise<boolean>; | ||
ethSupportsSecureTransfer(): Promise<boolean>; | ||
ethSupportsNativeShapeShift(): Promise<boolean>; | ||
ethGetAccountPaths(msg: ETHGetAccountPath): Array<ETHAccountPath>; | ||
hasOnDevicePinEntry(): Promise<boolean>; | ||
hasOnDevicePassphrase(): Promise<boolean>; | ||
hasOnDeviceDisplay(): Promise<boolean>; | ||
hasOnDeviceRecovery(): Promise<boolean>; | ||
hasNativeShapeShift(srcCoin: Coin, dstCoin: Coin): Promise<boolean>; | ||
} | ||
export declare class KeepKeyHDWallet implements HDWallet, BTCWallet, ETHWallet, DebugLinkWallet { | ||
_supportsETHInfo: boolean; | ||
_supportsBTCInfo: boolean; | ||
_supportsDebugLink: boolean; | ||
_isKeepKey: boolean; | ||
_isLedger: boolean; | ||
_isTrezor: boolean; | ||
_supportsETH: boolean; | ||
_supportsBTC: boolean; | ||
transport: KeepKeyTransport; | ||
features?: Messages.Features.AsObject; | ||
info: KeepKeyHDWalletInfo & HDWalletInfo; | ||
constructor(transport: KeepKeyTransport); | ||
@@ -22,2 +50,5 @@ getDeviceID(): Promise<string>; | ||
recover(r: RecoverDevice): Promise<void>; | ||
pressYes(): Promise<void>; | ||
pressNo(): Promise<void>; | ||
press(isYes: boolean): Promise<void>; | ||
hasOnDevicePinEntry(): Promise<boolean>; | ||
@@ -54,3 +85,22 @@ hasOnDevicePassphrase(): Promise<boolean>; | ||
wipe(): Promise<void>; | ||
btcSupportsCoin(coin: Coin): Promise<boolean>; | ||
btcSupportsScriptType(coin: Coin, scriptType: BTCInputScriptType): Promise<boolean>; | ||
btcGetAddress(msg: BTCGetAddress): Promise<string>; | ||
btcSignTx(msg: BTCSignTx): Promise<BTCSignedTx>; | ||
btcSupportsSecureTransfer(): Promise<boolean>; | ||
btcSupportsNativeShapeShift(): Promise<boolean>; | ||
btcSignMessage(msg: BTCSignMessage): Promise<BTCSignedMessage>; | ||
btcVerifyMessage(msg: BTCVerifyMessage): Promise<boolean>; | ||
btcGetAccountPaths(msg: BTCGetAccountPaths): Array<BTCAccountPath>; | ||
btcIsSameAccount(msg: Array<BTCAccountPath>): boolean; | ||
ethSignTx(msg: ETHSignTx): Promise<ETHSignedTx>; | ||
ethGetAddress(msg: ETHGetAddress): Promise<string>; | ||
ethSignMessage(msg: ETHSignMessage): Promise<ETHSignedMessage>; | ||
ethVerifyMessage(msg: ETHVerifyMessage): Promise<boolean>; | ||
ethSupportsNetwork(chain_id: number): Promise<boolean>; | ||
ethSupportsSecureTransfer(): Promise<boolean>; | ||
ethSupportsNativeShapeShift(): Promise<boolean>; | ||
ethGetAccountPaths(msg: ETHGetAccountPath): Array<ETHAccountPath>; | ||
} | ||
export declare function info(): KeepKeyHDWalletInfo; | ||
export declare function create(transport: KeepKeyTransport): KeepKeyHDWallet; |
{ | ||
"name": "@shapeshiftoss/hdwallet-keepkey", | ||
"version": "0.2.0", | ||
"version": "0.3.0", | ||
"license": "MIT", | ||
@@ -23,3 +23,3 @@ "publishConfig": { | ||
"@keepkey/device-protocol": "^6.1.6", | ||
"@shapeshiftoss/hdwallet-core": "^0.2.0", | ||
"@shapeshiftoss/hdwallet-core": "^0.3.0", | ||
"@types/eventemitter2": "^4.1.0", | ||
@@ -38,3 +38,3 @@ "eip55": "^1.0.3", | ||
}, | ||
"gitHead": "a63fdfd14d8b808746f001f24a5e8dbec4866ee0" | ||
"gitHead": "a652ed19552df9ec088c9bf28561131750e4801b" | ||
} |
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is too big to display
Sorry, the diff of this file is not supported yet
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
License Policy Violation
LicenseThis package is not allowed per your license policy. Review the package's license to ensure compliance.
Found 1 instance in 1 package
2994725
3100
16
+ Added@shapeshiftoss/hdwallet-core@0.3.1(transitive)
- Removed@shapeshiftoss/hdwallet-core@0.2.0(transitive)