@shapeshiftoss/hdwallet-core
Advanced tools
Comparing version 1.14.3 to 1.15.0
@@ -1,29 +0,58 @@ | ||
import { BIP32Path, PathDescription } from "./wallet"; | ||
import { BIP32Path, HDWallet, HDWalletInfo, PathDescription } from "./wallet"; | ||
export interface BinanceGetAddress { | ||
addressNList: BIP32Path; | ||
showDisplay?: boolean; | ||
/** Optional. Required for showDisplay == true. */ | ||
address?: string; | ||
} | ||
declare namespace Binance { | ||
namespace sdk { | ||
type Coins = Coin[]; | ||
interface Coin { | ||
denom: string; | ||
amount: number; | ||
} | ||
} | ||
export interface StdFee { | ||
amount: sdk.Coins; | ||
gas: string; | ||
} | ||
export interface StdSignature { | ||
pub_key: string; | ||
signature: string; | ||
} | ||
export interface MsgSend { | ||
inputs: Array<{ | ||
address: string; | ||
coins: sdk.Coins; | ||
}>; | ||
outputs: Array<{ | ||
address: string; | ||
coins: sdk.Coins; | ||
}>; | ||
} | ||
export type Msg = MsgSend; | ||
export {}; | ||
} | ||
export interface BinanceTx { | ||
account_number: string; | ||
chain_id: string; | ||
data: string; | ||
data: string | null; | ||
memo: string; | ||
msgs: any; | ||
signatures?: { | ||
msgs: [Binance.Msg]; | ||
sequence: string; | ||
source?: string; | ||
} | ||
export declare type BinancePartialTx = Partial<BinanceTx> & Pick<BinanceTx, "msgs">; | ||
export interface BinanceSignTx { | ||
addressNList: BIP32Path; | ||
testnet?: boolean; | ||
tx: BinancePartialTx; | ||
} | ||
export interface BinanceSignedTx extends BinanceTx { | ||
signatures: { | ||
pub_key: string; | ||
signature: string; | ||
}; | ||
txid?: string; | ||
serialized?: string; | ||
txid: string; | ||
serialized: string; | ||
} | ||
export interface BinanceSignTx { | ||
addressNList: BIP32Path; | ||
tx: BinanceTx; | ||
chain_id: string; | ||
account_number: string; | ||
sequence: number; | ||
} | ||
export declare type BinanceSignedTx = BinanceTx; | ||
export interface BinanceGetAccountPaths { | ||
@@ -35,4 +64,4 @@ accountIdx: number; | ||
} | ||
export interface BinanceWalletInfo { | ||
_supportsBinanceInfo: boolean; | ||
export interface BinanceWalletInfo extends HDWalletInfo { | ||
readonly _supportsBinanceInfo: boolean; | ||
/** | ||
@@ -48,8 +77,9 @@ * Returns a list of bip32 paths for a given account index in preferred order | ||
} | ||
export interface BinanceWallet extends BinanceWalletInfo { | ||
_supportsBinance: boolean; | ||
binanceGetAddress(msg: BinanceGetAddress): Promise<string>; | ||
binanceSignTx(msg: BinanceSignTx): Promise<BinanceSignedTx>; | ||
export interface BinanceWallet extends BinanceWalletInfo, HDWallet { | ||
readonly _supportsBinance: boolean; | ||
binanceGetAddress(msg: BinanceGetAddress): Promise<string | null>; | ||
binanceSignTx(msg: BinanceSignTx): Promise<BinanceSignedTx | null>; | ||
} | ||
export declare function binanceDescribePath(path: BIP32Path): PathDescription; | ||
export {}; | ||
//# sourceMappingURL=binance.d.ts.map |
@@ -1,10 +0,17 @@ | ||
import { ExchangeType, BIP32Path, Coin, PathDescription } from "./wallet"; | ||
export interface BTCGetAddress { | ||
import { BIP32Path, Coin, ExchangeType, HDWallet, HDWalletInfo, PathDescription } from "./wallet"; | ||
declare type MakeFalsy<T> = T extends boolean ? false : undefined; | ||
declare type DistributiveKeyOf<T> = T extends any ? keyof T : never; | ||
declare type DistributiveFalsyValueOf<T, U> = T extends any ? (U extends keyof T ? MakeFalsy<T[U]> : never) : never; | ||
declare type FalsyValuesOfUnion<T> = { | ||
[Prop in DistributiveKeyOf<T>]?: DistributiveFalsyValueOf<T, Prop>; | ||
}; | ||
declare type OnlyNecessaryProps<T, U> = T & Omit<FalsyValuesOfUnion<U>, keyof T>; | ||
declare type GuardedUnionInner<T, U> = T extends any ? OnlyNecessaryProps<T, U> : never; | ||
declare type GuardedUnion<T> = GuardedUnionInner<T, T>; | ||
export declare type BTCGetAddress = { | ||
coin: Coin; | ||
addressNList: BIP32Path; | ||
coin: Coin; | ||
scriptType?: BTCInputScriptType; | ||
showDisplay?: boolean; | ||
scriptType?: BTCInputScriptType; | ||
/** Optional. Required for showDisplay == true. */ | ||
address?: string; | ||
} | ||
}; | ||
export interface BitcoinScriptSig { | ||
@@ -16,10 +23,13 @@ hex: string; | ||
*/ | ||
export interface BitcoinInput { | ||
vout?: number; | ||
valueSat?: number; | ||
sequence?: number; | ||
scriptSig?: BitcoinScriptSig; | ||
txid?: string; | ||
coinbase?: string; | ||
interface BitcoinInputBase { | ||
valueSat: number; | ||
sequence: number; | ||
} | ||
export declare type BitcoinInput = GuardedUnion<(BitcoinInputBase & { | ||
coinbase: string; | ||
}) | (BitcoinInputBase & { | ||
scriptSig: BitcoinScriptSig; | ||
txid: string; | ||
vout: number; | ||
})>; | ||
/** | ||
@@ -35,3 +45,3 @@ * Deserialized representation of an already-signed output of a transaction. | ||
*/ | ||
export interface BitcoinTx { | ||
export interface BitcoinTxBase { | ||
version: number; | ||
@@ -41,40 +51,118 @@ locktime: number; | ||
vout: Array<BitcoinOutput>; | ||
type?: number; | ||
extraPayload?: string; | ||
extraPayloadSize?: number; | ||
} | ||
declare type BitcoinTxDIP2 = BitcoinTxBase & { | ||
type: number; | ||
extraPayload: string; | ||
}; | ||
export declare type BitcoinTx = GuardedUnion<BitcoinTxBase | BitcoinTxDIP2>; | ||
/** | ||
* Input for a transaction we're about to sign. | ||
*/ | ||
export interface BTCSignTxInput { | ||
/** bip32 path to sign the input with */ | ||
declare type BTCSignTxInputBase = { | ||
vout: number; | ||
addressNList: BIP32Path; | ||
scriptType?: BTCInputScriptType; | ||
amount?: string; | ||
}; | ||
declare type BTCSignTxInputNativeBase = BTCSignTxInputBase & { | ||
txid: string; | ||
}; | ||
declare type BTCSignTxInputNativeSegwitBase = BTCSignTxInputNativeBase & { | ||
scriptType: BTCInputScriptType.SpendWitness | BTCInputScriptType.SpendP2SHWitness; | ||
}; | ||
declare type BTCSignTxInputNativeSegwitWithHex = BTCSignTxInputNativeSegwitBase & { | ||
hex: string; | ||
}; | ||
declare type BTCSignTxInputNativeSegwitWithTx = BTCSignTxInputNativeSegwitBase & { | ||
tx: BitcoinTx; | ||
vout: number; | ||
amount: string; | ||
}; | ||
declare type BTCSignTxInputNativeSegwit = BTCSignTxInputNativeSegwitWithHex | BTCSignTxInputNativeSegwitWithTx; | ||
declare type BTCSignTxInputNativeNonSegwit = BTCSignTxInputNativeBase & { | ||
scriptType: Exclude<BTCInputScriptType, BTCSignTxInputNativeSegwit["scriptType"]>; | ||
hex: string; | ||
}; | ||
declare type BTCSignTxInputNativeUnguarded = BTCSignTxInputNativeSegwit | BTCSignTxInputNativeNonSegwit; | ||
export declare type BTCSignTxInputNative = GuardedUnion<BTCSignTxInputNativeUnguarded>; | ||
declare type BTCSignTxInputKKBase = BTCSignTxInputBase & { | ||
txid: string; | ||
amount: string; | ||
sequence?: number; | ||
}; | ||
declare type BTCSignTxInputKKSegwit = BTCSignTxInputKKBase & { | ||
scriptType: BTCInputScriptType.SpendWitness | BTCInputScriptType.SpendP2SHWitness | BTCInputScriptType.External; | ||
}; | ||
declare type BTCSignTxInputKKNonSegwit = BTCSignTxInputKKBase & { | ||
scriptType: Exclude<BTCInputScriptType, BTCSignTxInputKKSegwit["scriptType"]>; | ||
tx: BitcoinTx; | ||
}; | ||
declare type BTCSignTxInputKKUnguarded = BTCSignTxInputKKNonSegwit | BTCSignTxInputKKSegwit; | ||
export declare type BTCSignTxInputKK = GuardedUnion<BTCSignTxInputKKUnguarded>; | ||
export declare type BTCSignTxInputTrezor = BTCSignTxInputBase & { | ||
txid: string; | ||
amount: string; | ||
vout: number; | ||
txid: string; | ||
tx?: BitcoinTx; | ||
scriptType: BTCInputScriptType; | ||
}; | ||
export declare type BTCSignTxInputLedger = BTCSignTxInputBase & { | ||
addressNList: BIP32Path; | ||
scriptType: BTCInputScriptType; | ||
hex: string; | ||
type?: number; | ||
extraPayloadSize?: number; | ||
extraPayload?: string; | ||
} | ||
}; | ||
export declare type BTCSignTxInput = BTCSignTxInputNative & BTCSignTxInputKK & BTCSignTxInputTrezor & BTCSignTxInputLedger; | ||
export declare type BTCSignTxInputUnguarded = BTCSignTxInputNativeUnguarded & BTCSignTxInputKKUnguarded & BTCSignTxInputTrezor & BTCSignTxInputLedger; | ||
/** | ||
* Output for a transaction we're about to sign. | ||
*/ | ||
export interface BTCSignTxOutput { | ||
export declare type BTCSignTxOutputSpend = { | ||
addressType?: BTCOutputAddressType.Spend; | ||
amount: string; | ||
address: string; | ||
}; | ||
export declare type BTCSignTxOutputSpendP2PKH = { | ||
addressType?: BTCOutputAddressType.Spend; | ||
amount: string; | ||
address: string; | ||
scriptType: BTCOutputScriptType.PayToAddress; | ||
}; | ||
export declare type BTCSignTxOutputSpendP2SH = { | ||
addressType?: BTCOutputAddressType.Spend; | ||
amount: string; | ||
address: string; | ||
scriptType: BTCOutputScriptType.PayToMultisig | BTCOutputScriptType.PayToP2SHWitness; | ||
}; | ||
export declare type BTCSignTxOutputSpendP2WPKH = { | ||
addressType?: BTCOutputAddressType.Spend; | ||
amount: string; | ||
address: string; | ||
scriptType: BTCOutputScriptType.PayToWitness; | ||
}; | ||
export declare type BTCSignTxOutputTransfer = { | ||
addressType: BTCOutputAddressType.Transfer; | ||
amount: string; | ||
/** bip32 path for destination (device must `btcSupportsSecureTransfer()`) */ | ||
addressNList?: BIP32Path; | ||
scriptType?: BTCOutputScriptType; | ||
address?: string; | ||
addressType: BTCOutputAddressType; | ||
addressNList: BIP32Path; | ||
scriptType: BTCOutputScriptType; | ||
}; | ||
export declare type BTCSignTxOutputChange = { | ||
addressType: BTCOutputAddressType.Change; | ||
amount: string; | ||
isChange: boolean; | ||
/** bip32 path for destination (device must `btcSupportsSecureTransfer()`) */ | ||
addressNList: BIP32Path; | ||
scriptType: BTCOutputScriptType; | ||
isChange: true; | ||
}; | ||
export declare type BTCSignTxOutputExchange = { | ||
/** | ||
* Device must `btcSupportsNativeShapeShift()` | ||
*/ | ||
exchangeType?: ExchangeType; | ||
opReturnData?: string; | ||
} | ||
addressType: BTCOutputAddressType.Exchange; | ||
amount: string; | ||
exchangeType: ExchangeType; | ||
}; | ||
export declare type BTCSignTxOutputMemo = { | ||
addressType?: BTCOutputAddressType.Spend; | ||
amount?: "0"; | ||
opReturnData: string | Uint8Array; | ||
}; | ||
export declare type BTCSignTxOutput = GuardedUnion<BTCSignTxOutputSpend | BTCSignTxOutputSpendP2PKH | BTCSignTxOutputSpendP2SH | BTCSignTxOutputSpendP2WPKH | BTCSignTxOutputTransfer | BTCSignTxOutputChange | BTCSignTxOutputExchange | BTCSignTxOutputMemo>; | ||
export interface BTCSignTx { | ||
@@ -89,2 +177,14 @@ coin: string; | ||
} | ||
export declare type BTCSignTxKK = Omit<BTCSignTx, "inputs"> & { | ||
inputs: Array<BTCSignTxInputKK>; | ||
}; | ||
export declare type BTCSignTxNative = Omit<BTCSignTx, "inputs"> & { | ||
inputs: Array<BTCSignTxInputNative>; | ||
}; | ||
export declare type BTCSignTxTrezor = Omit<BTCSignTx, "inputs"> & { | ||
inputs: Array<BTCSignTxInputTrezor>; | ||
}; | ||
export declare type BTCSignTxLedger = Omit<BTCSignTx, "inputs"> & { | ||
inputs: Array<BTCSignTxInputLedger>; | ||
}; | ||
export interface BTCSignedTx { | ||
@@ -118,3 +218,3 @@ signatures: Array<string>; | ||
addressNList: BIP32Path; | ||
coin?: Coin; | ||
coin: Coin; | ||
scriptType?: BTCInputScriptType; | ||
@@ -143,4 +243,4 @@ message: string; | ||
} | ||
export interface BTCWalletInfo { | ||
_supportsBTCInfo: boolean; | ||
export interface BTCWalletInfo extends HDWalletInfo { | ||
readonly _supportsBTCInfo: boolean; | ||
/** | ||
@@ -154,3 +254,3 @@ * Does the device support the given UTXO coin? | ||
*/ | ||
btcSupportsScriptType(coin: Coin, scriptType: BTCInputScriptType): Promise<boolean>; | ||
btcSupportsScriptType(coin: Coin, scriptType?: BTCInputScriptType): Promise<boolean>; | ||
/** | ||
@@ -194,10 +294,10 @@ * Does the device support internal transfers without the user needing to | ||
} | ||
export interface BTCWallet extends BTCWalletInfo { | ||
_supportsBTC: boolean; | ||
btcGetAddress(msg: BTCGetAddress): Promise<string>; | ||
btcSignTx(msg: BTCSignTx): Promise<BTCSignedTx>; | ||
btcSignMessage(msg: BTCSignMessage): Promise<BTCSignedMessage>; | ||
btcVerifyMessage(msg: BTCVerifyMessage): Promise<boolean>; | ||
export interface BTCWallet extends BTCWalletInfo, HDWallet { | ||
readonly _supportsBTC: boolean; | ||
btcGetAddress(msg: BTCGetAddress): Promise<string | null>; | ||
btcSignTx(msg: BTCSignTx): Promise<BTCSignedTx | null>; | ||
btcSignMessage(msg: BTCSignMessage): Promise<BTCSignedMessage | null>; | ||
btcVerifyMessage(msg: BTCVerifyMessage): Promise<boolean | null>; | ||
} | ||
export declare function unknownUTXOPath(path: BIP32Path, coin: Coin, scriptType: BTCInputScriptType): PathDescription; | ||
export declare function unknownUTXOPath(path: BIP32Path, coin: Coin, scriptType?: BTCInputScriptType): PathDescription; | ||
export declare function describeUTXOPath(path: BIP32Path, coin: Coin, scriptType: BTCInputScriptType): PathDescription; | ||
@@ -207,2 +307,3 @@ export declare function legacyAccount(coin: Coin, slip44: number, accountIdx: number): BTCAccountPath; | ||
export declare function segwitNativeAccount(coin: Coin, slip44: number, accountIdx: number): BTCAccountPath; | ||
export {}; | ||
//# sourceMappingURL=bitcoin.d.ts.map |
@@ -60,3 +60,6 @@ "use strict"; | ||
let isPrefork = false; | ||
if (path[1] !== 0x80000000 + utils_1.slip44ByCoin(coin)) { | ||
const slip44 = utils_1.slip44ByCoin(coin); | ||
if (slip44 === undefined) | ||
return unknown; | ||
if (path[1] !== 0x80000000 + slip44) { | ||
switch (coin) { | ||
@@ -88,3 +91,4 @@ case "BitcoinCash": | ||
case "Testnet": { | ||
attributes = attributes.concat(script); | ||
if (script) | ||
attributes = attributes.concat(script); | ||
break; | ||
@@ -91,0 +95,0 @@ } |
@@ -1,2 +0,2 @@ | ||
import { BIP32Path, PathDescription } from "./wallet"; | ||
import { BIP32Path, HDWallet, HDWalletInfo, PathDescription } from "./wallet"; | ||
export interface CosmosGetAddress { | ||
@@ -59,4 +59,4 @@ addressNList: BIP32Path; | ||
} | ||
export interface CosmosWalletInfo { | ||
_supportsCosmosInfo: boolean; | ||
export interface CosmosWalletInfo extends HDWalletInfo { | ||
readonly _supportsCosmosInfo: boolean; | ||
/** | ||
@@ -72,8 +72,8 @@ * Returns a list of bip32 paths for a given account index in preferred order | ||
} | ||
export interface CosmosWallet extends CosmosWalletInfo { | ||
_supportsCosmos: boolean; | ||
cosmosGetAddress(msg: CosmosGetAddress): Promise<string>; | ||
cosmosSignTx(msg: CosmosSignTx): Promise<CosmosSignedTx>; | ||
export interface CosmosWallet extends CosmosWalletInfo, HDWallet { | ||
readonly _supportsCosmos: boolean; | ||
cosmosGetAddress(msg: CosmosGetAddress): Promise<string | null>; | ||
cosmosSignTx(msg: CosmosSignTx): Promise<CosmosSignedTx | null>; | ||
} | ||
export declare function cosmosDescribePath(path: BIP32Path): PathDescription; | ||
//# sourceMappingURL=cosmos.d.ts.map |
@@ -1,3 +0,4 @@ | ||
export interface DebugLinkWallet { | ||
_supportsDebugLink: boolean; | ||
import { HDWallet } from "./wallet"; | ||
export interface DebugLinkWallet extends HDWallet { | ||
readonly _supportsDebugLink: boolean; | ||
pressYes(): Promise<void>; | ||
@@ -4,0 +5,0 @@ pressNo(): Promise<void>; |
@@ -1,6 +0,6 @@ | ||
import { BIP32Path } from "./wallet"; | ||
import { BIP32Path, HDWallet, HDWalletInfo } from "./wallet"; | ||
export interface EosGetPublicKey { | ||
addressNList: Array<number>; | ||
showDisplay?: boolean; | ||
kind?: 0 | 1 | 2; | ||
kind: 0 | 1 | 2; | ||
} | ||
@@ -18,20 +18,20 @@ export interface EosGetAccountPaths { | ||
interface EosPermissionLevel { | ||
actor?: string; | ||
permission?: string; | ||
actor: string; | ||
permission: string; | ||
} | ||
interface EosTxActionAck { | ||
account?: string; | ||
name?: string; | ||
authorization?: Array<Eos.EosPermissionLevel>; | ||
data?: any; | ||
account: string; | ||
name: string; | ||
authorization: Array<Eos.EosPermissionLevel>; | ||
data: any; | ||
} | ||
} | ||
export interface EosTx { | ||
expiration?: string; | ||
ref_block_num?: number; | ||
ref_block_prefix?: number; | ||
max_net_usage_words?: number; | ||
max_cpu_usage_ms?: number; | ||
delay_sec?: number; | ||
actions: Array<Eos.EosTxActionAck>; | ||
expiration: string; | ||
ref_block_num: number; | ||
ref_block_prefix: number; | ||
max_net_usage_words: number; | ||
max_cpu_usage_ms: number; | ||
delay_sec: number; | ||
actions: [Eos.EosTxActionAck]; | ||
} | ||
@@ -52,4 +52,4 @@ export interface EosToSignTx { | ||
} | ||
export interface EosWalletInfo { | ||
_supportsEosInfo: boolean; | ||
export interface EosWalletInfo extends HDWalletInfo { | ||
readonly _supportsEosInfo: boolean; | ||
/** | ||
@@ -65,7 +65,7 @@ * Returns a list of bip32 paths for a given account index in preferred order | ||
} | ||
export interface EosWallet extends EosWalletInfo { | ||
_supportsEos: boolean; | ||
eosGetPublicKey(msg: EosGetPublicKey): Promise<string>; | ||
eosSignTx(msg: EosToSignTx): Promise<EosTxSigned>; | ||
export interface EosWallet extends EosWalletInfo, HDWallet { | ||
readonly _supportsEos: boolean; | ||
eosGetPublicKey(msg: EosGetPublicKey): Promise<string | null>; | ||
eosSignTx(msg: EosToSignTx): Promise<EosTxSigned | null>; | ||
} | ||
//# sourceMappingURL=eos.d.ts.map |
@@ -1,2 +0,2 @@ | ||
import { ExchangeType, BIP32Path, PathDescription } from "./wallet"; | ||
import { ExchangeType, BIP32Path, HDWallet, HDWalletInfo, PathDescription } from "./wallet"; | ||
export interface ETHGetAccountPath { | ||
@@ -71,4 +71,4 @@ coin: string; | ||
} | ||
export interface ETHWalletInfo { | ||
_supportsETHInfo: boolean; | ||
export interface ETHWalletInfo extends HDWalletInfo { | ||
readonly _supportsETHInfo: boolean; | ||
/** | ||
@@ -100,10 +100,10 @@ * Does the device support the Ethereum network with the given chain_id? | ||
} | ||
export interface ETHWallet extends ETHWalletInfo { | ||
_supportsETH: boolean; | ||
ethGetAddress(msg: ETHGetAddress): Promise<string>; | ||
ethSignTx(msg: ETHSignTx): Promise<ETHSignedTx>; | ||
ethSignMessage(msg: ETHSignMessage): Promise<ETHSignedMessage>; | ||
ethVerifyMessage(msg: ETHVerifyMessage): Promise<boolean>; | ||
export interface ETHWallet extends ETHWalletInfo, HDWallet { | ||
readonly _supportsETH: boolean; | ||
ethGetAddress(msg: ETHGetAddress): Promise<string | null>; | ||
ethSignTx(msg: ETHSignTx): Promise<ETHSignedTx | null>; | ||
ethSignMessage(msg: ETHSignMessage): Promise<ETHSignedMessage | null>; | ||
ethVerifyMessage(msg: ETHVerifyMessage): Promise<boolean | null>; | ||
} | ||
export declare function describeETHPath(path: BIP32Path): PathDescription; | ||
//# sourceMappingURL=ethereum.d.ts.map |
@@ -1,2 +0,2 @@ | ||
import type { Message } from "google-protobuf"; | ||
import type * as jspb from "google-protobuf"; | ||
export interface Event { | ||
@@ -9,3 +9,3 @@ message_type?: string; | ||
message?: any; | ||
proto?: Message; | ||
proto?: jspb.Message; | ||
date?: number; | ||
@@ -12,0 +12,0 @@ } |
@@ -1,3 +0,2 @@ | ||
import { BIP32Path, PathDescription } from "./wallet"; | ||
import { FioActionParameters } from "fiosdk-offline"; | ||
import { BIP32Path, HDWallet, HDWalletInfo, PathDescription } from "./wallet"; | ||
export interface FioGetAddress { | ||
@@ -19,18 +18,128 @@ addressNList: BIP32Path; | ||
export declare namespace Fio { | ||
interface FioPermissionLevel { | ||
interface PermissionLevel { | ||
actor?: string; | ||
permission?: string; | ||
} | ||
interface FioTxActionData { | ||
tpid?: string; | ||
actor?: string; | ||
[x: string]: any; | ||
type PublicAddress = { | ||
chain_code: string; | ||
token_code: string; | ||
public_address: string; | ||
}; | ||
type FeeRatio = { | ||
end_point: string; | ||
value: number; | ||
}; | ||
enum ContentType { | ||
REQUEST = "new_funds_content", | ||
OBT = "record_obt_data_content" | ||
} | ||
interface FioTxActionAck { | ||
account?: FioActionParameters.FioActionAccount; | ||
name?: FioActionParameters.FioActionName; | ||
authorization?: Array<Fio.FioPermissionLevel>; | ||
data?: FioActionParameters.FioActionData; | ||
} | ||
type RequestContent = { | ||
payee_public_address: string; | ||
amount: string; | ||
chain_code: string; | ||
token_code: string; | ||
memo: string; | ||
hash: string; | ||
offline_url: string; | ||
}; | ||
type OBTContent = { | ||
payee_public_address: string; | ||
payer_public_address: string; | ||
amount: string; | ||
chain_code: string; | ||
token_code: string; | ||
status: string; | ||
obt_id: string; | ||
memo: string; | ||
hash: string; | ||
offline_url: string; | ||
}; | ||
type Content<T> = T extends ContentType ? T extends ContentType.REQUEST ? RequestContent : T extends ContentType.OBT ? OBTContent : never : never; | ||
type TxActionAck = { | ||
authorization?: Array<PermissionLevel>; | ||
data: { | ||
max_fee?: number; | ||
tpid?: string; | ||
actor?: ""; | ||
}; | ||
} & ({ | ||
account: "fio.address"; | ||
name: "addaddress"; | ||
data: { | ||
fio_address: string; | ||
public_addresses: Array<PublicAddress>; | ||
}; | ||
} | { | ||
account: "fio.reqobt"; | ||
name: "newfundsreq"; | ||
data: { | ||
payer_fio_address: string; | ||
payee_fio_address: string; | ||
content: string; | ||
}; | ||
} | { | ||
account: "fio.reqobt"; | ||
name: "recordobt"; | ||
data: { | ||
payer_fio_address: string; | ||
payee_fio_address: string; | ||
content: OBTContent; | ||
fio_request_id: string; | ||
}; | ||
} | { | ||
account: "fio.address"; | ||
name: "regaddress"; | ||
data: { | ||
fio_address: string; | ||
owner_fio_public_key: string; | ||
}; | ||
} | { | ||
account: "fio.address"; | ||
name: "regdomain"; | ||
data: { | ||
fio_domain: string; | ||
owner_fio_public_key: string; | ||
}; | ||
} | { | ||
account: "fio.reqobt"; | ||
name: "rejectfndreq"; | ||
data: { | ||
fio_request_id: string; | ||
}; | ||
} | { | ||
account: "fio.address"; | ||
name: "renewaddress"; | ||
data: { | ||
fio_address: string; | ||
}; | ||
} | { | ||
account: "fio.address"; | ||
name: "renewdomain"; | ||
data: { | ||
fio_domain: string; | ||
}; | ||
} | { | ||
account: "fio.address"; | ||
name: "setdomainpub"; | ||
data: { | ||
fio_domain: string; | ||
is_public: boolean; | ||
}; | ||
} | { | ||
account: "fio.token"; | ||
name: "trnsfiopubky"; | ||
data: { | ||
payee_public_key: string; | ||
amount: string; | ||
}; | ||
}); | ||
type ActionName = TxActionAck["name"]; | ||
type ActionAccount = TxActionAck["account"]; | ||
type ActionData = TxActionAck["data"]; | ||
type FioPermissionLevel = PermissionLevel; | ||
type FioTxActionAck = TxActionAck; | ||
type FioTxActionData = ActionData; | ||
} | ||
export declare type FioEncryptionContentType = Fio.ContentType; | ||
export declare const FioEncryptionContentType: typeof Fio.ContentType; | ||
export interface FioSignTx { | ||
@@ -41,3 +150,3 @@ addressNList: BIP32Path; | ||
ref_block_prefix?: number; | ||
actions: Array<Fio.FioTxActionAck>; | ||
actions: [Fio.TxActionAck]; | ||
} | ||
@@ -48,4 +157,4 @@ export interface FioSignedTx { | ||
} | ||
export interface FioWalletInfo { | ||
_supportsFioInfo: boolean; | ||
export interface FioWalletInfo extends HDWalletInfo { | ||
readonly _supportsFioInfo: boolean; | ||
/** | ||
@@ -61,20 +170,23 @@ * Returns a list of bip32 paths for a given account index in preferred order | ||
} | ||
export interface FioWallet extends FioWalletInfo { | ||
_supportsFio: boolean; | ||
fioGetAddress(msg: FioGetAddress): Promise<string>; | ||
fioSignTx(msg: FioSignTx): Promise<FioSignedTx>; | ||
fioDecryptRequestContent(msg: FioRequestContent): Promise<any>; | ||
fioEncryptRequestContent(msg: FioRequestContent): Promise<string>; | ||
} | ||
export declare enum FioEncryptionContentType { | ||
REQUEST = "new_funds_content", | ||
OBT = "record_obt_data_content" | ||
} | ||
export interface FioRequestContent { | ||
export declare type FioEncryptRequestContentMsg<T extends Fio.ContentType> = { | ||
addressNList: BIP32Path; | ||
content: FioActionParameters.FioRequestContent | string; | ||
content: Fio.Content<T>; | ||
publicKey: string; | ||
contentType: FioEncryptionContentType; | ||
contentType: T; | ||
iv?: Uint8Array; | ||
}; | ||
export declare type FioDecryptRequestContentMsg<T extends Fio.ContentType = Fio.ContentType> = { | ||
addressNList: BIP32Path; | ||
content: string; | ||
publicKey: string; | ||
contentType: T; | ||
}; | ||
export interface FioWallet extends FioWalletInfo, HDWallet { | ||
readonly _supportsFio: boolean; | ||
fioGetAddress(msg: FioGetAddress): Promise<string | null>; | ||
fioSignTx(msg: FioSignTx): Promise<FioSignedTx | null>; | ||
fioEncryptRequestContent<T extends Fio.ContentType>(msg: FioEncryptRequestContentMsg<T>): Promise<string | null>; | ||
fioDecryptRequestContent<T extends Fio.ContentType>(msg: FioDecryptRequestContentMsg<T>): Promise<Fio.Content<T> | null>; | ||
} | ||
export declare function fioDescribePath(path: BIP32Path): PathDescription; | ||
//# sourceMappingURL=fio.d.ts.map |
"use strict"; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.fioDescribePath = exports.FioEncryptionContentType = void 0; | ||
exports.fioDescribePath = exports.FioEncryptionContentType = exports.Fio = void 0; | ||
const utils_1 = require("./utils"); | ||
var FioEncryptionContentType; | ||
(function (FioEncryptionContentType) { | ||
FioEncryptionContentType["REQUEST"] = "new_funds_content"; | ||
FioEncryptionContentType["OBT"] = "record_obt_data_content"; | ||
})(FioEncryptionContentType = exports.FioEncryptionContentType || (exports.FioEncryptionContentType = {})); | ||
var Fio; | ||
(function (Fio) { | ||
let ContentType; | ||
(function (ContentType) { | ||
ContentType["REQUEST"] = "new_funds_content"; | ||
ContentType["OBT"] = "record_obt_data_content"; | ||
})(ContentType = Fio.ContentType || (Fio.ContentType = {})); | ||
})(Fio = exports.Fio || (exports.Fio = {})); | ||
exports.FioEncryptionContentType = Fio.ContentType; | ||
function fioDescribePath(path) { | ||
@@ -11,0 +15,0 @@ let pathStr = utils_1.addressNListToBIP32(path); |
@@ -1,19 +0,19 @@ | ||
export * from "./event"; | ||
export * from "./utils"; | ||
export * from "./transport"; | ||
export * from "./wallet"; | ||
export * from "./binance"; | ||
export * from "./bitcoin"; | ||
export * from "./cosmos"; | ||
export * from "./thorchain"; | ||
export * from "./binance"; | ||
export * from "./debuglink"; | ||
export * from "./eos"; | ||
export * from "./ethereum"; | ||
export * from "./debuglink"; | ||
export * from "./keyring"; | ||
export * from "./event"; | ||
export * from "./exceptions"; | ||
export * from "./ripple"; | ||
export * from "./eos"; | ||
export * from "./fio"; | ||
export * from "./kava"; | ||
export * from "./keyring"; | ||
export * from "./ripple"; | ||
export * from "./secret"; | ||
export * from "./terra"; | ||
export * from "./thorchain"; | ||
export * from "./transport"; | ||
export * from "./utils"; | ||
export * from "./wallet"; | ||
//# sourceMappingURL=index.d.ts.map |
@@ -10,23 +10,23 @@ "use strict"; | ||
var __exportStar = (this && this.__exportStar) || function(m, exports) { | ||
for (var p in m) if (p !== "default" && !exports.hasOwnProperty(p)) __createBinding(exports, m, p); | ||
for (var p in m) if (p !== "default" && !Object.prototype.hasOwnProperty.call(exports, p)) __createBinding(exports, m, p); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
__exportStar(require("./event"), exports); | ||
__exportStar(require("./utils"), exports); | ||
__exportStar(require("./transport"), exports); | ||
__exportStar(require("./wallet"), exports); | ||
__exportStar(require("./binance"), exports); | ||
__exportStar(require("./bitcoin"), exports); | ||
__exportStar(require("./cosmos"), exports); | ||
__exportStar(require("./thorchain"), exports); | ||
__exportStar(require("./binance"), exports); | ||
__exportStar(require("./debuglink"), exports); | ||
__exportStar(require("./eos"), exports); | ||
__exportStar(require("./ethereum"), exports); | ||
__exportStar(require("./debuglink"), exports); | ||
__exportStar(require("./keyring"), exports); | ||
__exportStar(require("./event"), exports); | ||
__exportStar(require("./exceptions"), exports); | ||
__exportStar(require("./ripple"), exports); | ||
__exportStar(require("./eos"), exports); | ||
__exportStar(require("./fio"), exports); | ||
__exportStar(require("./kava"), exports); | ||
__exportStar(require("./keyring"), exports); | ||
__exportStar(require("./ripple"), exports); | ||
__exportStar(require("./secret"), exports); | ||
__exportStar(require("./terra"), exports); | ||
__exportStar(require("./thorchain"), exports); | ||
__exportStar(require("./transport"), exports); | ||
__exportStar(require("./utils"), exports); | ||
__exportStar(require("./wallet"), exports); | ||
//# sourceMappingURL=index.js.map |
@@ -1,2 +0,2 @@ | ||
import { BIP32Path, PathDescription } from "./wallet"; | ||
import { BIP32Path, HDWallet, HDWalletInfo, PathDescription } from "./wallet"; | ||
export interface KavaGetAddress { | ||
@@ -63,4 +63,4 @@ addressNList: BIP32Path; | ||
} | ||
export interface KavaWalletInfo { | ||
_supportsKavaInfo: boolean; | ||
export interface KavaWalletInfo extends HDWalletInfo { | ||
readonly _supportsKavaInfo: boolean; | ||
/** | ||
@@ -76,8 +76,8 @@ * Returns a list of bip32 paths for a given account index in preferred order | ||
} | ||
export interface KavaWallet extends KavaWalletInfo { | ||
_supportsKava: boolean; | ||
kavaGetAddress(msg: KavaGetAddress): Promise<string>; | ||
kavaSignTx(msg: KavaSignTx): Promise<KavaSignedTx>; | ||
export interface KavaWallet extends KavaWalletInfo, HDWallet { | ||
readonly _supportsKava: boolean; | ||
kavaGetAddress(msg: KavaGetAddress): Promise<string | null>; | ||
kavaSignTx(msg: KavaSignTx): Promise<KavaSignedTx | null>; | ||
} | ||
export declare function kavaDescribePath(path: BIP32Path): PathDescription; | ||
//# sourceMappingURL=kava.d.ts.map |
@@ -0,3 +1,3 @@ | ||
import * as eventemitter2 from "eventemitter2"; | ||
import { HDWallet } from "./wallet"; | ||
import * as eventemitter2 from "eventemitter2"; | ||
export declare class Keyring extends eventemitter2.EventEmitter2 { | ||
@@ -17,3 +17,3 @@ wallets: { | ||
}>; | ||
get<T extends HDWallet>(deviceID?: string): T; | ||
get<T extends HDWallet>(deviceID?: string): T | null; | ||
remove(deviceID: string): Promise<void>; | ||
@@ -20,0 +20,0 @@ removeAll(): Promise<void>; |
@@ -17,3 +17,3 @@ "use strict"; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
@@ -44,3 +44,3 @@ return result; | ||
this.wallets[id] = wallet; | ||
wallet.transport && this.decorateEvents(deviceID, wallet.transport); | ||
wallet.transport && this.decorateEvents(id, wallet.transport); | ||
return true; | ||
@@ -63,3 +63,8 @@ } | ||
return __awaiter(this, void 0, void 0, function* () { | ||
return Promise.all(Object.values(this.wallets).map((w) => w[method](...args))).then((values) => values.reduce((final, response, i) => { | ||
return Promise.all(Object.values(this.wallets).map((w) => { | ||
const fn = w[method]; | ||
if (typeof fn !== "function") | ||
throw new Error(`can't exec non-existent method ${method}`); | ||
return fn.call(w, ...args); | ||
})).then((values) => values.reduce((final, response, i) => { | ||
final[Object.keys(this.wallets)[i]] = response; | ||
@@ -71,5 +76,5 @@ return final; | ||
get(deviceID) { | ||
if (this.aliases[deviceID] && this.wallets[this.aliases[deviceID]]) | ||
if (deviceID && this.aliases[deviceID] && this.wallets[this.aliases[deviceID]]) | ||
return this.wallets[this.aliases[deviceID]]; | ||
if (this.wallets[deviceID]) | ||
if (deviceID && this.wallets[deviceID]) | ||
return this.wallets[deviceID]; | ||
@@ -119,4 +124,6 @@ if (!!Object.keys(this.wallets).length && !deviceID) | ||
const wallet = this.get(deviceID); | ||
if (!wallet) | ||
return; | ||
const vendor = wallet.getVendor(); | ||
events.onAny((e, ...values) => this.emit([vendor, deviceID, e], [deviceID, ...values])); | ||
events.onAny((e, ...values) => this.emit([vendor, deviceID, (typeof e === "string" ? e : e.join(";"))], [deviceID, ...values])); | ||
} | ||
@@ -123,0 +130,0 @@ } |
@@ -1,2 +0,2 @@ | ||
import { BIP32Path } from "./wallet"; | ||
import { BIP32Path, HDWallet, HDWalletInfo } from "./wallet"; | ||
export interface RippleGetAddress { | ||
@@ -55,4 +55,4 @@ addressNList: BIP32Path; | ||
sequence: string; | ||
lastLedgerSequence?: string; | ||
payment?: RipplePayment; | ||
lastLedgerSequence: string; | ||
payment: RipplePayment; | ||
} | ||
@@ -66,4 +66,4 @@ export declare type RippleSignedTx = RippleTx; | ||
} | ||
export interface RippleWalletInfo { | ||
_supportsRippleInfo: boolean; | ||
export interface RippleWalletInfo extends HDWalletInfo { | ||
readonly _supportsRippleInfo: boolean; | ||
/** | ||
@@ -79,8 +79,8 @@ * Returns a list of bip32 paths for a given account index in preferred order | ||
} | ||
export interface RippleWallet extends RippleWalletInfo { | ||
_supportsRipple: boolean; | ||
rippleGetAddress(msg: RippleGetAddress): Promise<string>; | ||
rippleSignTx(msg: RippleSignTx): Promise<RippleSignedTx>; | ||
export interface RippleWallet extends RippleWalletInfo, HDWallet { | ||
readonly _supportsRipple: boolean; | ||
rippleGetAddress(msg: RippleGetAddress): Promise<string | null>; | ||
rippleSignTx(msg: RippleSignTx): Promise<RippleSignedTx | null>; | ||
} | ||
export {}; | ||
//# sourceMappingURL=ripple.d.ts.map |
@@ -1,2 +0,2 @@ | ||
import { BIP32Path, PathDescription } from "./wallet"; | ||
import { BIP32Path, HDWallet, HDWalletInfo, PathDescription } from "./wallet"; | ||
export interface SecretGetAddress { | ||
@@ -64,4 +64,4 @@ addressNList: BIP32Path; | ||
} | ||
export interface SecretWalletInfo { | ||
_supportsSecretInfo: boolean; | ||
export interface SecretWalletInfo extends HDWalletInfo { | ||
readonly _supportsSecretInfo: boolean; | ||
/** | ||
@@ -77,8 +77,8 @@ * Returns a list of bip32 paths for a given account index in preferred order | ||
} | ||
export interface SecretWallet extends SecretWalletInfo { | ||
_supportsSecret: boolean; | ||
secretGetAddress(msg: SecretGetAddress): Promise<string>; | ||
secretSignTx(msg: SecretSignTx): Promise<SecretSignedTx>; | ||
export interface SecretWallet extends SecretWalletInfo, HDWallet { | ||
readonly _supportsSecret: boolean; | ||
secretGetAddress(msg: SecretGetAddress): Promise<string | null>; | ||
secretSignTx(msg: SecretSignTx): Promise<SecretSignedTx | null>; | ||
} | ||
export declare function secretDescribePath(path: BIP32Path): PathDescription; | ||
//# sourceMappingURL=secret.d.ts.map |
@@ -1,2 +0,2 @@ | ||
import { BIP32Path, PathDescription } from "./wallet"; | ||
import { BIP32Path, HDWallet, HDWalletInfo, PathDescription } from "./wallet"; | ||
export interface TerraGetAddress { | ||
@@ -63,4 +63,4 @@ addressNList: BIP32Path; | ||
} | ||
export interface TerraWalletInfo { | ||
_supportsTerraInfo: boolean; | ||
export interface TerraWalletInfo extends HDWalletInfo { | ||
readonly _supportsTerraInfo: boolean; | ||
/** | ||
@@ -76,8 +76,8 @@ * Returns a list of bip32 paths for a given account index in preferred order | ||
} | ||
export interface TerraWallet extends TerraWalletInfo { | ||
_supportsTerra: boolean; | ||
terraGetAddress(msg: TerraGetAddress): Promise<string>; | ||
terraSignTx(msg: TerraSignTx): Promise<TerraSignedTx>; | ||
export interface TerraWallet extends TerraWalletInfo, HDWallet { | ||
readonly _supportsTerra: boolean; | ||
terraGetAddress(msg: TerraGetAddress): Promise<string | null>; | ||
terraSignTx(msg: TerraSignTx): Promise<TerraSignedTx | null>; | ||
} | ||
export declare function terraDescribePath(path: BIP32Path): PathDescription; | ||
//# sourceMappingURL=terra.d.ts.map |
@@ -1,2 +0,2 @@ | ||
import { BIP32Path, PathDescription } from "./wallet"; | ||
import { BIP32Path, HDWallet, HDWalletInfo, PathDescription } from "./wallet"; | ||
export interface ThorchainGetAddress { | ||
@@ -63,4 +63,4 @@ addressNList: BIP32Path; | ||
} | ||
export interface ThorchainWalletInfo { | ||
_supportsThorchainInfo: boolean; | ||
export interface ThorchainWalletInfo extends HDWalletInfo { | ||
readonly _supportsThorchainInfo: boolean; | ||
/** | ||
@@ -76,8 +76,8 @@ * Returns a list of bip32 paths for a given account index in preferred order | ||
} | ||
export interface ThorchainWallet extends ThorchainWalletInfo { | ||
_supportsThorchain: boolean; | ||
thorchainGetAddress(msg: ThorchainGetAddress): Promise<string>; | ||
thorchainSignTx(msg: ThorchainSignTx): Promise<ThorchainSignedTx>; | ||
export interface ThorchainWallet extends ThorchainWalletInfo, HDWallet { | ||
readonly _supportsThorchain: boolean; | ||
thorchainGetAddress(msg: ThorchainGetAddress): Promise<string | null>; | ||
thorchainSignTx(msg: ThorchainSignTx): Promise<ThorchainSignedTx | null>; | ||
} | ||
export declare function thorchainDescribePath(path: BIP32Path): PathDescription; | ||
//# sourceMappingURL=thorchain.d.ts.map |
@@ -9,3 +9,3 @@ "use strict"; | ||
verbose: pathStr, | ||
coin: "Thorchain", | ||
coin: "Rune", | ||
isKnown: false, | ||
@@ -19,3 +19,3 @@ }; | ||
} | ||
if (path[1] != 0x80000000 + utils_1.slip44ByCoin("Thorchain")) { | ||
if (path[1] != 0x80000000 + utils_1.slip44ByCoin("Rune")) { | ||
return unknown; | ||
@@ -22,0 +22,0 @@ } |
@@ -6,3 +6,3 @@ import * as eventemitter2 from "eventemitter2"; | ||
constructor(keyring: Keyring); | ||
abstract getDeviceID(): string; | ||
abstract getDeviceID(): Promise<string>; | ||
/** | ||
@@ -15,12 +15,8 @@ * Must emit outgoing message events and communicate with underlying interface | ||
*/ | ||
connect(): Promise<any>; | ||
connect(): Promise<void>; | ||
/** | ||
* Optional method to bootstrap connection to device | ||
*/ | ||
listen(): Promise<any>; | ||
/** | ||
* Optional function that gets called to clean up connection to device | ||
*/ | ||
disconnect(): Promise<any>; | ||
disconnect(): Promise<void>; | ||
} | ||
//# sourceMappingURL=transport.d.ts.map |
@@ -17,6 +17,15 @@ "use strict"; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) { | ||
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); } | ||
return new (P || (P = Promise))(function (resolve, reject) { | ||
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } } | ||
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } } | ||
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); } | ||
step((generator = generator.apply(thisArg, _arguments || [])).next()); | ||
}); | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
@@ -34,15 +43,9 @@ exports.Transport = void 0; | ||
connect() { | ||
return; | ||
return __awaiter(this, void 0, void 0, function* () { }); | ||
} | ||
/** | ||
* Optional method to bootstrap connection to device | ||
*/ | ||
listen() { | ||
return; | ||
} | ||
/** | ||
* Optional function that gets called to clean up connection to device | ||
*/ | ||
disconnect() { | ||
return; | ||
return __awaiter(this, void 0, void 0, function* () { }); | ||
} | ||
@@ -49,0 +52,0 @@ } |
import * as eventemitter2 from "eventemitter2"; | ||
import { Observable } from "rxjs"; | ||
import { Coin } from "./wallet"; | ||
import { BIP32Path } from "./wallet"; | ||
import * as Rx from "rxjs"; | ||
import { BIP32Path, Coin } from "./wallet"; | ||
export declare type Constructor<T = {}> = new (...args: any[]) => T; | ||
@@ -15,10 +14,38 @@ export declare const DEFAULT_TIMEOUT = 5000; | ||
export declare function bip32Like(path: string): boolean; | ||
export declare function takeFirstOfManyEvents(eventEmitter: eventemitter2.EventEmitter2, events: string[]): Observable<{}>; | ||
export declare function takeFirstOfManyEvents(eventEmitter: eventemitter2.EventEmitter2, events: string[]): Rx.Observable<{}>; | ||
export declare function stripHexPrefix(value: string): string; | ||
export declare function stripHexPrefixAndLower(value: string): string; | ||
export declare function base64toHEX(base64: string): string; | ||
export declare function slip44ByCoin(coin: Coin): number; | ||
declare const slip44Table: Readonly<{ | ||
readonly Bitcoin: 0; | ||
readonly Testnet: 1; | ||
readonly BitcoinCash: 145; | ||
readonly BitcoinGold: 156; | ||
readonly Litecoin: 2; | ||
readonly Dash: 5; | ||
readonly DigiByte: 20; | ||
readonly Dogecoin: 3; | ||
readonly BitcoinSV: 236; | ||
readonly Ethereum: 60; | ||
readonly Atom: 118; | ||
readonly Binance: 714; | ||
readonly Ripple: 144; | ||
readonly Eos: 194; | ||
readonly Fio: 235; | ||
readonly Thorchain: 931; | ||
readonly Rune: 931; | ||
readonly Cardano: 1815; | ||
readonly Secret: 529; | ||
readonly Terra: 330; | ||
readonly Kava: 459; | ||
}>; | ||
declare type Slip44ByCoin<T> = (T extends keyof typeof slip44Table ? typeof slip44Table[T] : number | undefined); | ||
export declare function slip44ByCoin<T extends Coin>(coin: T): Slip44ByCoin<T>; | ||
export declare function satsFromStr(coins: string): number; | ||
export declare function hardenedPath(path: BIP32Path): BIP32Path; | ||
export declare function relativePath(path: BIP32Path): BIP32Path; | ||
export declare function toArrayBuffer(x: ArrayBuffer | ArrayBufferView): ArrayBuffer; | ||
export declare function mustBeDefined<T>(x: T): NonNullable<T>; | ||
export declare function untouchable(message: string): any; | ||
export {}; | ||
//# sourceMappingURL=utils.d.ts.map |
"use strict"; | ||
var __createBinding = (this && this.__createBinding) || (Object.create ? (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
Object.defineProperty(o, k2, { enumerable: true, get: function() { return m[k]; } }); | ||
}) : (function(o, m, k, k2) { | ||
if (k2 === undefined) k2 = k; | ||
o[k2] = m[k]; | ||
})); | ||
var __setModuleDefault = (this && this.__setModuleDefault) || (Object.create ? (function(o, v) { | ||
Object.defineProperty(o, "default", { enumerable: true, value: v }); | ||
}) : function(o, v) { | ||
o["default"] = v; | ||
}); | ||
var __importStar = (this && this.__importStar) || function (mod) { | ||
if (mod && mod.__esModule) return mod; | ||
var result = {}; | ||
if (mod != null) for (var k in mod) if (k !== "default" && Object.prototype.hasOwnProperty.call(mod, k)) __createBinding(result, mod, k); | ||
__setModuleDefault(result, mod); | ||
return result; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.relativePath = exports.hardenedPath = exports.satsFromStr = exports.slip44ByCoin = exports.base64toHEX = exports.stripHexPrefixAndLower = exports.stripHexPrefix = exports.takeFirstOfManyEvents = exports.bip32Like = exports.addressNListToBIP32 = exports.bip32ToAddressNList = exports.arrayify = exports.toHexString = exports.fromHexString = exports.isArray = exports.LONG_TIMEOUT = exports.DEFAULT_TIMEOUT = void 0; | ||
const rxjs_1 = require("rxjs"); | ||
const operators_1 = require("rxjs/operators"); | ||
exports.untouchable = exports.mustBeDefined = exports.toArrayBuffer = exports.relativePath = exports.hardenedPath = exports.satsFromStr = exports.slip44ByCoin = exports.base64toHEX = exports.stripHexPrefixAndLower = exports.stripHexPrefix = exports.takeFirstOfManyEvents = exports.bip32Like = exports.addressNListToBIP32 = exports.bip32ToAddressNList = exports.arrayify = exports.toHexString = exports.fromHexString = exports.isArray = exports.LONG_TIMEOUT = exports.DEFAULT_TIMEOUT = void 0; | ||
const Rx = __importStar(require("rxjs")); | ||
const RxOp = __importStar(require("rxjs/operators")); | ||
exports.DEFAULT_TIMEOUT = 5000; // 5 seconds | ||
@@ -13,6 +32,7 @@ exports.LONG_TIMEOUT = 5 * 60 * 1000; // 5 minutes | ||
// These helper functions marshal hex into and out of UInt8Arrays which are consumed by protobuf js | ||
exports.fromHexString = (hexString) => { | ||
const fromHexString = (hexString) => { | ||
const match = hexString.match(/.{1,2}/g) || []; | ||
return new Uint8Array(match.map((byte) => parseInt(byte, 16))); | ||
}; | ||
exports.fromHexString = fromHexString; | ||
// export const toHexString = (bytes: number[]) => bytes.reduce((str, byte) => str + byte.toString(16).padStart(2, '0'), '') | ||
@@ -25,23 +45,24 @@ function toHexString(arr) { | ||
function arrayify(value) { | ||
if (value == null) { | ||
if (value === null) { | ||
throw new Error("cannot convert null value to array"); | ||
} | ||
if (typeof value === "string") { | ||
let match = value.match(/^(0x)?[0-9a-fA-F]*$/); | ||
if (!match) { | ||
throw new Error("invalid hexidecimal string"); | ||
} | ||
if (match[1] !== "0x") { | ||
throw new Error("hex string must have 0x prefix"); | ||
} | ||
value = value.substring(2); | ||
if (value.length % 2) { | ||
value = "0" + value; | ||
} | ||
const result = []; | ||
for (let i = 0; i < value.length; i += 2) { | ||
result.push(parseInt(value.substr(i, 2), 16)); | ||
} | ||
return new Uint8Array(result); | ||
else if (typeof value !== "string") { | ||
throw new Error("can only convert hex strings"); | ||
} | ||
let match = value.match(/^(0x)?[0-9a-fA-F]*$/); | ||
if (!match) { | ||
throw new Error("invalid hexadecimal string"); | ||
} | ||
if (match[1] !== "0x") { | ||
throw new Error("hex string must have 0x prefix"); | ||
} | ||
value = value.substring(2); | ||
if (value.length % 2) { | ||
value = "0" + value; | ||
} | ||
const result = []; | ||
for (let i = 0; i < value.length; i += 2) { | ||
result.push(parseInt(value.substr(i, 2), 16)); | ||
} | ||
return new Uint8Array(result); | ||
} | ||
@@ -91,3 +112,3 @@ exports.arrayify = arrayify; | ||
function takeFirstOfManyEvents(eventEmitter, events) { | ||
return rxjs_1.merge(...events.map((event) => rxjs_1.fromEvent(eventEmitter, event))).pipe(operators_1.first()); | ||
return Rx.merge(...events.map((event) => Rx.fromEvent(eventEmitter, event))).pipe(RxOp.first()); | ||
} | ||
@@ -114,25 +135,27 @@ exports.takeFirstOfManyEvents = takeFirstOfManyEvents; | ||
// https://github.com/satoshilabs/slips/blob/master/slip-0044.md | ||
const slip44Table = Object.freeze({ | ||
Bitcoin: 0, | ||
Testnet: 1, | ||
BitcoinCash: 145, | ||
BitcoinGold: 156, | ||
Litecoin: 2, | ||
Dash: 5, | ||
DigiByte: 20, | ||
Dogecoin: 3, | ||
BitcoinSV: 236, | ||
Ethereum: 60, | ||
Atom: 118, | ||
Binance: 714, | ||
Ripple: 144, | ||
Eos: 194, | ||
Fio: 235, | ||
Thorchain: 931, | ||
Rune: 931, | ||
Cardano: 1815, | ||
Secret: 529, | ||
Terra: 330, | ||
Kava: 459, | ||
}); | ||
function slip44ByCoin(coin) { | ||
return { | ||
Bitcoin: 0, | ||
Testnet: 1, | ||
BitcoinCash: 145, | ||
BitcoinGold: 156, | ||
Litecoin: 2, | ||
Dash: 5, | ||
DigiByte: 20, | ||
Dogecoin: 3, | ||
BitcoinSV: 236, | ||
Ethereum: 60, | ||
Atom: 118, | ||
Binance: 714, | ||
Ripple: 144, | ||
Eos: 194, | ||
Fio: 235, | ||
Thorchain: 931, | ||
Cardano: 1815, | ||
Secret: 529, | ||
Terra: 330, | ||
Kava: 459, | ||
}[coin]; | ||
return slip44Table[coin]; | ||
} | ||
@@ -154,2 +177,28 @@ exports.slip44ByCoin = slip44ByCoin; | ||
exports.relativePath = relativePath; | ||
function toArrayBuffer(x) { | ||
if (x instanceof ArrayBuffer) | ||
return x; | ||
return x.buffer.slice(x.byteOffset, x.byteOffset + x.byteLength); | ||
} | ||
exports.toArrayBuffer = toArrayBuffer; | ||
function mustBeDefined(x) { | ||
if (x === null || x === undefined) | ||
throw new Error("expected a value"); | ||
return x; | ||
} | ||
exports.mustBeDefined = mustBeDefined; | ||
// Returns a copyable object which satisfies any type constraint but produces a runtime error if | ||
// accessed in any other way. Useful as dummy data for required parameters. (Probably a bad idea | ||
// in production.) | ||
function untouchable(message) { | ||
const out = new Proxy({}, new Proxy({}, { get(_, p) { | ||
return (_, p2) => { | ||
if (p === "get" && p2 === "valueOf") | ||
return () => out; | ||
throw new Error(`${String(p)}(${String(p2)}): ${message}`); | ||
}; | ||
} })); | ||
return out; | ||
} | ||
exports.untouchable = untouchable; | ||
//# sourceMappingURL=utils.js.map |
@@ -55,3 +55,3 @@ "use strict"; | ||
["m/44H/1'", false], | ||
["m/44h/1'", false], | ||
["m/44h/1'", false], // must mot mix hardening syntax | ||
])('bip32Like("%s")', (a, expected) => { | ||
@@ -58,0 +58,0 @@ it(`returns ${expected}`, () => { |
@@ -0,13 +1,13 @@ | ||
import { BinanceWallet, BinanceWalletInfo } from "./binance"; | ||
import { BTCInputScriptType, BTCWallet, BTCWalletInfo } from "./bitcoin"; | ||
import { ETHWallet, ETHWalletInfo } from "./ethereum"; | ||
import { CosmosWallet, CosmosWalletInfo } from "./cosmos"; | ||
import { BinanceWallet, BinanceWalletInfo } from "./binance"; | ||
import { RippleWallet, RippleWalletInfo } from "./ripple"; | ||
import { DebugLinkWallet } from "./debuglink"; | ||
import { EosWallet, EosWalletInfo } from "./eos"; | ||
import { ETHWallet, ETHWalletInfo } from "./ethereum"; | ||
import { FioWallet, FioWalletInfo } from "./fio"; | ||
import { ThorchainWallet, ThorchainWalletInfo } from "./thorchain"; | ||
import { KavaWallet, KavaWalletInfo } from "./kava"; | ||
import { RippleWallet, RippleWalletInfo } from "./ripple"; | ||
import { SecretWallet, SecretWalletInfo } from "./secret"; | ||
import { KavaWallet, KavaWalletInfo } from "./kava"; | ||
import { TerraWallet, TerraWalletInfo } from "./terra"; | ||
import { DebugLinkWallet } from "./debuglink"; | ||
import { ThorchainWallet, ThorchainWalletInfo } from "./thorchain"; | ||
import { Transport } from "./transport"; | ||
@@ -20,3 +20,3 @@ export declare type BIP32Path = Array<number>; | ||
curve: string; | ||
coin?: Coin; | ||
coin: Coin; | ||
} | ||
@@ -38,3 +38,3 @@ export interface PublicKey { | ||
entropy?: 128 | 192 | 256; | ||
label?: string; | ||
label: string; | ||
passphrase?: boolean; | ||
@@ -47,6 +47,6 @@ pin?: boolean; | ||
/** Bits. Either 128 (12 words), 192 (18 words), or 256 (24 words)*/ | ||
entropy?: 128 | 192 | 256; | ||
label?: string; | ||
passphrase?: boolean; | ||
pin?: boolean; | ||
entropy: 128 | 192 | 256; | ||
label: string; | ||
passphrase: boolean; | ||
pin: boolean; | ||
language?: string; | ||
@@ -105,4 +105,4 @@ autoLockDelayMs?: number; | ||
*/ | ||
export declare function supportsBTC(wallet: any): wallet is BTCWallet; | ||
export declare function infoBTC(info: any): info is BTCWalletInfo; | ||
export declare function supportsBTC(wallet: HDWallet): wallet is BTCWallet; | ||
export declare function infoBTC(info: HDWalletInfo): info is BTCWalletInfo; | ||
/** | ||
@@ -118,18 +118,18 @@ * Type guard for ETHWallet Support | ||
*/ | ||
export declare function supportsETH(wallet: any): wallet is ETHWallet; | ||
export declare function infoETH(info: any): info is ETHWalletInfo; | ||
export declare function supportsCosmos(wallet: any): wallet is CosmosWallet; | ||
export declare function infoCosmos(info: any): info is CosmosWalletInfo; | ||
export declare function supportsThorchain(wallet: any): wallet is ThorchainWallet; | ||
export declare function infoThorchain(info: any): info is ThorchainWalletInfo; | ||
export declare function supportsEos(wallet: any): wallet is EosWallet; | ||
export declare function infoEos(info: any): info is EosWalletInfo; | ||
export declare function supportsFio(wallet: any): wallet is FioWallet; | ||
export declare function infoFio(info: any): info is FioWalletInfo; | ||
export declare function supportsSecret(wallet: any): wallet is SecretWallet; | ||
export declare function infoSecret(info: any): info is SecretWalletInfo; | ||
export declare function supportsTerra(wallet: any): wallet is TerraWallet; | ||
export declare function infoTerra(info: any): info is TerraWalletInfo; | ||
export declare function supportsKava(wallet: any): wallet is KavaWallet; | ||
export declare function infoKava(info: any): info is KavaWalletInfo; | ||
export declare function supportsETH(wallet: HDWallet): wallet is ETHWallet; | ||
export declare function infoETH(info: HDWalletInfo): info is ETHWalletInfo; | ||
export declare function supportsCosmos(wallet: HDWallet): wallet is CosmosWallet; | ||
export declare function infoCosmos(info: HDWalletInfo): info is CosmosWalletInfo; | ||
export declare function supportsThorchain(wallet: HDWallet): wallet is ThorchainWallet; | ||
export declare function infoThorchain(info: HDWalletInfo): info is ThorchainWalletInfo; | ||
export declare function supportsEos(wallet: HDWallet): wallet is EosWallet; | ||
export declare function infoEos(info: HDWalletInfo): info is EosWalletInfo; | ||
export declare function supportsFio(wallet: HDWallet): wallet is FioWallet; | ||
export declare function infoFio(info: HDWalletInfo): info is FioWalletInfo; | ||
export declare function supportsSecret(wallet: HDWallet): wallet is SecretWallet; | ||
export declare function infoSecret(info: HDWalletInfo): info is SecretWalletInfo; | ||
export declare function supportsTerra(wallet: HDWallet): wallet is TerraWallet; | ||
export declare function infoTerra(info: HDWalletInfo): info is TerraWalletInfo; | ||
export declare function supportsKava(wallet: HDWallet): wallet is KavaWallet; | ||
export declare function infoKava(info: HDWalletInfo): info is KavaWalletInfo; | ||
/** | ||
@@ -145,19 +145,8 @@ * Type guard for RippleWallet Support | ||
*/ | ||
export declare function supportsRipple(wallet: any): wallet is RippleWallet; | ||
export declare function infoRipple(info: any): info is RippleWalletInfo; | ||
export declare function supportsBinance(wallet: any): wallet is BinanceWallet; | ||
export declare function infoBinance(info: any): info is BinanceWalletInfo; | ||
export declare function supportsDebugLink(wallet: any): wallet is DebugLinkWallet; | ||
export declare function supportsRipple(wallet: HDWallet): wallet is RippleWallet; | ||
export declare function infoRipple(info: HDWalletInfo): info is RippleWalletInfo; | ||
export declare function supportsBinance(wallet: HDWallet): wallet is BinanceWallet; | ||
export declare function infoBinance(info: HDWalletInfo): info is BinanceWalletInfo; | ||
export declare function supportsDebugLink(wallet: HDWallet): wallet is DebugLinkWallet; | ||
export interface HDWalletInfo { | ||
_supportsETHInfo: boolean; | ||
_supportsBTCInfo: boolean; | ||
_supportsCosmosInfo: boolean; | ||
_supportsRippleInfo: boolean; | ||
_supportsBinanceInfo: boolean; | ||
_supportsEosInfo: boolean; | ||
_supportsFioInfo: boolean; | ||
_supportsThorchainInfo: boolean; | ||
_supportsSecretInfo: boolean; | ||
_supportsTerraInfo: boolean; | ||
_supportsKavaInfo: boolean; | ||
/** | ||
@@ -197,14 +186,2 @@ * Retrieve the wallet's vendor string. | ||
export interface HDWallet extends HDWalletInfo { | ||
_supportsBTC: boolean; | ||
_supportsETH: boolean; | ||
_supportsCosmos: boolean; | ||
_supportsBinance: boolean; | ||
_supportsRipple: boolean; | ||
_supportsEos: boolean; | ||
_supportsFio: boolean; | ||
_supportsThorchain: boolean; | ||
_supportsSecret: boolean; | ||
_supportsTerra: boolean; | ||
_supportsKava: boolean; | ||
_supportsDebugLink: boolean; | ||
transport?: Transport; | ||
@@ -234,3 +211,3 @@ /** | ||
*/ | ||
getPublicKeys(msg: Array<GetPublicKey>): Promise<Array<PublicKey | null>>; | ||
getPublicKeys(msg: Array<GetPublicKey>): Promise<Array<PublicKey | null> | null>; | ||
/** | ||
@@ -237,0 +214,0 @@ * Check whether the device has been initialized with a secret. |
"use strict"; | ||
var __importDefault = (this && this.__importDefault) || function (mod) { | ||
return (mod && mod.__esModule) ? mod : { "default": mod }; | ||
}; | ||
Object.defineProperty(exports, "__esModule", { value: true }); | ||
exports.supportsDebugLink = exports.infoBinance = exports.supportsBinance = exports.infoRipple = exports.supportsRipple = exports.infoKava = exports.supportsKava = exports.infoTerra = exports.supportsTerra = exports.infoSecret = exports.supportsSecret = exports.infoFio = exports.supportsFio = exports.infoEos = exports.supportsEos = exports.infoThorchain = exports.supportsThorchain = exports.infoCosmos = exports.supportsCosmos = exports.infoETH = exports.supportsETH = exports.infoBTC = exports.supportsBTC = void 0; | ||
const lodash_1 = require("lodash"); | ||
const lodash_1 = __importDefault(require("lodash")); | ||
/** | ||
@@ -16,7 +19,7 @@ * Type guard for BTCWallet Support | ||
function supportsBTC(wallet) { | ||
return lodash_1.isObject(wallet) && wallet._supportsBTC; | ||
return lodash_1.default.isObject(wallet) && wallet._supportsBTC; | ||
} | ||
exports.supportsBTC = supportsBTC; | ||
function infoBTC(info) { | ||
return lodash_1.isObject(info) && info._supportsBTCInfo; | ||
return lodash_1.default.isObject(info) && info._supportsBTCInfo; | ||
} | ||
@@ -35,63 +38,63 @@ exports.infoBTC = infoBTC; | ||
function supportsETH(wallet) { | ||
return lodash_1.isObject(wallet) && wallet._supportsETH; | ||
return lodash_1.default.isObject(wallet) && wallet._supportsETH; | ||
} | ||
exports.supportsETH = supportsETH; | ||
function infoETH(info) { | ||
return lodash_1.isObject(info) && info._supportsETHInfo; | ||
return lodash_1.default.isObject(info) && info._supportsETHInfo; | ||
} | ||
exports.infoETH = infoETH; | ||
function supportsCosmos(wallet) { | ||
return lodash_1.isObject(wallet) && wallet._supportsCosmos; | ||
return lodash_1.default.isObject(wallet) && wallet._supportsCosmos; | ||
} | ||
exports.supportsCosmos = supportsCosmos; | ||
function infoCosmos(info) { | ||
return lodash_1.isObject(info) && info._supportsCosmosInfo; | ||
return lodash_1.default.isObject(info) && info._supportsCosmosInfo; | ||
} | ||
exports.infoCosmos = infoCosmos; | ||
function supportsThorchain(wallet) { | ||
return lodash_1.isObject(wallet) && wallet._supportsThorchain; | ||
return lodash_1.default.isObject(wallet) && wallet._supportsThorchain; | ||
} | ||
exports.supportsThorchain = supportsThorchain; | ||
function infoThorchain(info) { | ||
return lodash_1.isObject(info) && info._supportsThorchainInfo; | ||
return lodash_1.default.isObject(info) && info._supportsThorchainInfo; | ||
} | ||
exports.infoThorchain = infoThorchain; | ||
function supportsEos(wallet) { | ||
return lodash_1.isObject(wallet) && wallet._supportsEos; | ||
return lodash_1.default.isObject(wallet) && wallet._supportsEos; | ||
} | ||
exports.supportsEos = supportsEos; | ||
function infoEos(info) { | ||
return lodash_1.isObject(info) && info._supportsEosInfo; | ||
return lodash_1.default.isObject(info) && info._supportsEosInfo; | ||
} | ||
exports.infoEos = infoEos; | ||
function supportsFio(wallet) { | ||
return lodash_1.isObject(wallet) && wallet._supportsFio; | ||
return lodash_1.default.isObject(wallet) && wallet._supportsFio; | ||
} | ||
exports.supportsFio = supportsFio; | ||
function infoFio(info) { | ||
return lodash_1.isObject(info) && info._supportsFioInfo; | ||
return lodash_1.default.isObject(info) && info._supportsFioInfo; | ||
} | ||
exports.infoFio = infoFio; | ||
function supportsSecret(wallet) { | ||
return lodash_1.isObject(wallet) && wallet._supportsSecret; | ||
return lodash_1.default.isObject(wallet) && wallet._supportsSecret; | ||
} | ||
exports.supportsSecret = supportsSecret; | ||
function infoSecret(info) { | ||
return lodash_1.isObject(info) && info._supportsSecretInfo; | ||
return lodash_1.default.isObject(info) && info._supportsSecretInfo; | ||
} | ||
exports.infoSecret = infoSecret; | ||
function supportsTerra(wallet) { | ||
return lodash_1.isObject(wallet) && wallet._supportsTerra; | ||
return lodash_1.default.isObject(wallet) && wallet._supportsTerra; | ||
} | ||
exports.supportsTerra = supportsTerra; | ||
function infoTerra(info) { | ||
return lodash_1.isObject(info) && info._supportsTerraInfo; | ||
return lodash_1.default.isObject(info) && info._supportsTerraInfo; | ||
} | ||
exports.infoTerra = infoTerra; | ||
function supportsKava(wallet) { | ||
return lodash_1.isObject(wallet) && wallet._supportsKava; | ||
return lodash_1.default.isObject(wallet) && wallet._supportsKava; | ||
} | ||
exports.supportsKava = supportsKava; | ||
function infoKava(info) { | ||
return lodash_1.isObject(info) && info._supportsKavaInfo; | ||
return lodash_1.default.isObject(info) && info._supportsKavaInfo; | ||
} | ||
@@ -110,21 +113,21 @@ exports.infoKava = infoKava; | ||
function supportsRipple(wallet) { | ||
return lodash_1.isObject(wallet) && wallet._supportsRipple; | ||
return lodash_1.default.isObject(wallet) && wallet._supportsRipple; | ||
} | ||
exports.supportsRipple = supportsRipple; | ||
function infoRipple(info) { | ||
return lodash_1.isObject(info) && info._supportsRippleInfo; | ||
return lodash_1.default.isObject(info) && info._supportsRippleInfo; | ||
} | ||
exports.infoRipple = infoRipple; | ||
function supportsBinance(wallet) { | ||
return lodash_1.isObject(wallet) && wallet._supportsBinance; | ||
return lodash_1.default.isObject(wallet) && wallet._supportsBinance; | ||
} | ||
exports.supportsBinance = supportsBinance; | ||
function infoBinance(info) { | ||
return lodash_1.isObject(info) && info._supportsBinanceInfo; | ||
return lodash_1.default.isObject(info) && info._supportsBinanceInfo; | ||
} | ||
exports.infoBinance = infoBinance; | ||
function supportsDebugLink(wallet) { | ||
return lodash_1.isObject(wallet) && wallet._supportsDebugLink; | ||
return lodash_1.default.isObject(wallet) && wallet._supportsDebugLink; | ||
} | ||
exports.supportsDebugLink = supportsDebugLink; | ||
//# sourceMappingURL=wallet.js.map |
{ | ||
"name": "@shapeshiftoss/hdwallet-core", | ||
"version": "1.14.3", | ||
"version": "1.15.0", | ||
"license": "MIT", | ||
@@ -18,6 +18,18 @@ "publishConfig": { | ||
"eventemitter2": "^5.0.1", | ||
"lodash": "^4.17.15", | ||
"lodash": "^4.17.21", | ||
"rxjs": "^6.4.0" | ||
}, | ||
"gitHead": "470c77715f650ebe216ca65decb3c7916f143eb1" | ||
"devDependencies": { | ||
"@types/google-protobuf": "^3.15.1", | ||
"@types/jest": "^26.0.23", | ||
"@types/lodash": "^4.14.168", | ||
"jest": "^26.6.3", | ||
"jest-environment-jsdom": "^25.5.0", | ||
"ts-jest": "^26.5.5", | ||
"typescript": "^4.3.2" | ||
}, | ||
"engines": { | ||
"node": "^10 || ^12 || ^14" | ||
}, | ||
"gitHead": "177f0f88f757670bf86aa9ac9074c61664165d7b" | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Deprecated
MaintenanceThe maintainer of the package marked it as deprecated. This could indicate that a single version should not be used, or that the package is no longer maintained and any new vulnerabilities will not be fixed.
Found 1 instance in 1 package
180571
2933
0
7
Updatedlodash@^4.17.21