
Research
Security News
Lazarus Strikes npm Again with New Wave of Malicious Packages
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
@ledgerhq/types-live
Advanced tools
Ledger Live main types.
A token belongs to an Account and share the parent account address
Type: {type: "TokenAccount"
, id: string, parentId: string, token: TokenCurrency, balance: BigNumber, spendableBalance: BigNumber, compoundBalance: BigNumber?, creationDate: Date, operationsCount: number, operations: Array<Operation>, pendingOperations: Array<Operation>, starred: boolean, balanceHistoryCache: BalanceHistoryCache, swapHistory: Array<SwapOperation>, approvals: Array<{sender: string, value: string}>?}
type
"TokenAccount"
id
stringparentId
stringtoken
TokenCurrencybalance
BigNumberspendableBalance
BigNumbercompoundBalance
BigNumber?creationDate
DateoperationsCount
numberoperations
Array<Operation>pendingOperations
Array<Operation>starred
booleanbalanceHistoryCache
BalanceHistoryCacheswapHistory
Array<SwapOperation>approvals
Array<{sender: string, value: string}>?A child account belongs to an Account but has its own address.
Type: {type: "ChildAccount"
, id: string, name: string, starred: boolean, parentId: string, currency: CryptoCurrency, address: string, balance: BigNumber, creationDate: Date, operationsCount: number, operations: Array<Operation>, pendingOperations: Array<Operation>, balanceHistoryCache: BalanceHistoryCache, swapHistory: Array<SwapOperation>}
type
"ChildAccount"
id
stringname
stringstarred
booleanparentId
stringcurrency
CryptoCurrencyaddress
stringbalance
BigNumbercreationDate
DateoperationsCount
numberoperations
Array<Operation>pendingOperations
Array<Operation>balanceHistoryCache
BalanceHistoryCacheswapHistory
Array<SwapOperation>Type: {address: string, derivationPath: string}
Account type is the main level account of a blockchain currency. Each family maybe need an extra field, to solve this, you can have some subtyping like this:
export type BitcoinAccount = Account & { bitcoinResources: BitcoinResources }
and all parts where we would need it, we would need to cast,
const bitcoinAccount = account as BitcoinAccount;
and that BitcoinAccount type would be part of a coin integration family specific indeed.
Type: {type: "Account"
, id: string, seedIdentifier: string, xpub: string?, derivationMode: DerivationMode, index: number, freshAddress: string, freshAddressPath: string, freshAddresses: Array<Address>, name: string, starred: boolean, used: boolean, balance: BigNumber, spendableBalance: BigNumber, creationDate: Date, blockHeight: number, currency: CryptoCurrency, unit: Unit, operationsCount: number, operations: Array<Operation>, pendingOperations: Array<Operation>, lastSyncDate: Date, subAccounts: Array<SubAccount>?, balanceHistoryCache: BalanceHistoryCache, swapHistory: Array<SwapOperation>, syncHash: string?, nfts: Array<NFT>?}
type
"Account"
id
stringseedIdentifier
stringxpub
string?derivationMode
DerivationModeindex
numberfreshAddress
stringfreshAddressPath
stringfreshAddresses
Array<Address>name
stringstarred
booleanused
booleanbalance
BigNumberspendableBalance
BigNumbercreationDate
DateblockHeight
numbercurrency
CryptoCurrencyunit
UnitoperationsCount
numberoperations
Array<Operation>pendingOperations
Array<Operation>lastSyncDate
DatesubAccounts
Array<SubAccount>?balanceHistoryCache
BalanceHistoryCacheswapHistory
Array<SwapOperation>syncHash
string?nfts
Array<NFT>?super type that is either a token or a child account
Type: (TokenAccount | ChildAccount)
One of the Account type
Type: (Account | SubAccount)
an array of AccountLikes
Type: (Array<AccountLike> | Array<TokenAccount> | Array<ChildAccount> | Array<Account>)
Type: {type: "TokenAccountRaw"
, id: string, starred: boolean?, parentId: string, tokenId: string, creationDate: string?, operationsCount: number?, operations: Array<OperationRaw>, pendingOperations: Array<OperationRaw>, balance: string, spendableBalance: string?, compoundBalance: string?, balanceHistoryCache: BalanceHistoryCache?, swapHistory: Array<SwapOperationRaw>?, approvals: Array<{sender: string, value: string}>?}
type
"TokenAccountRaw"
id
stringstarred
boolean?parentId
stringtokenId
stringcreationDate
string?operationsCount
number?operations
Array<OperationRaw>pendingOperations
Array<OperationRaw>balance
stringspendableBalance
string?compoundBalance
string?balanceHistoryCache
BalanceHistoryCache?swapHistory
Array<SwapOperationRaw>?approvals
Array<{sender: string, value: string}>?Type: {type: "ChildAccountRaw"
, id: string, name: string, starred: boolean?, parentId: string, currencyId: string, address: string, creationDate: string?, operationsCount: number?, operations: Array<OperationRaw>, pendingOperations: Array<OperationRaw>, balance: string, balanceHistoryCache: BalanceHistoryCache?, swapHistory: Array<SwapOperationRaw>?}
type
"ChildAccountRaw"
id
stringname
stringstarred
boolean?parentId
stringcurrencyId
stringaddress
stringcreationDate
string?operationsCount
number?operations
Array<OperationRaw>pendingOperations
Array<OperationRaw>balance
stringbalanceHistoryCache
BalanceHistoryCache?swapHistory
Array<SwapOperationRaw>?Type: {id: string, seedIdentifier: string, xpub: string?, derivationMode: DerivationMode, index: number, freshAddress: string, freshAddressPath: string, freshAddresses: Array<Address>, name: string, starred: boolean?, used: boolean?, balance: string, spendableBalance: string?, blockHeight: number, creationDate: string?, operationsCount: number?, currencyId: string, operations: Array<OperationRaw>, pendingOperations: Array<OperationRaw>, unitMagnitude: number, lastSyncDate: string, endpointConfig: (string | null | undefined)?, subAccounts: Array<SubAccountRaw>?, balanceHistoryCache: BalanceHistoryCache?, swapHistory: Array<SwapOperationRaw>?, syncHash: string?, nfts: Array<NFTRaw>?}
id
stringseedIdentifier
stringxpub
string?derivationMode
DerivationModeindex
numberfreshAddress
stringfreshAddressPath
stringfreshAddresses
Array<Address>name
stringstarred
boolean?used
boolean?balance
stringspendableBalance
string?blockHeight
numbercreationDate
string?operationsCount
number?currencyId
stringoperations
Array<OperationRaw>pendingOperations
Array<OperationRaw>unitMagnitude
numberlastSyncDate
stringendpointConfig
(string | null | undefined)?subAccounts
Array<SubAccountRaw>?balanceHistoryCache
BalanceHistoryCache?swapHistory
Array<SwapOperationRaw>?syncHash
string?nfts
Array<NFTRaw>?Type: (TokenAccountRaw | ChildAccountRaw)
Type: (AccountRaw | SubAccountRaw)
Type: {type: "discovered"
, account: Account}
type
"discovered"
account
Accountmore events will come in the future
Type: {type: "discovered"
, account: AccountRaw}
type
"discovered"
account
AccountRawunique identifier of a device. it will depends on the underlying implementation.
Type: string
Type: Partial<{preloadMaxAge: number}>
Type: {account: Account, signedOperation: SignedOperation}
account
AccountsignedOperation
SignedOperationType: {account: Account, transaction: T, deviceId: DeviceId}
Type: function (arg0: SignOperationArg0<T>): Observable<SignOperationEvent>
DerivationMode is a string identifier of a specific derivation scheme in a list defined in live-common derivation.ts
Type: string
Type: ("ERC721"
| "ERC1155"
)
Type: {id: string, tokenId: string, amount: BigNumber, collection: {contract: string, standard: (NFTStandards | string)}}
id
stringtokenId
stringamount
BigNumbercollection
{contract: string, standard: (NFTStandards | string)}Type: any
Type: ("opensea"
| "rarible"
| "etherscan"
)
Type: {status: (200
| 404
| 500
), result: ({contract: string, tokenId: string, tokenName: (string | null), nftName: (string | null), media: (string | null), description: (string | null), properties: Array<Record<("key"
| "value"
), string>>, links: Record<NFTMetadataLinksProviders, string>} | null)?}
status
(200
| 404
| 500
)result
({contract: string, tokenId: string, tokenName: (string | null), nftName: (string | null), media: (string | null), description: (string | null), properties: Array<Record<("key"
| "value"
), string>>, links: Record<NFTMetadataLinksProviders, string>} | null)?Type: ("IN"
| "OUT"
| "NONE"
| "CREATE"
| "REVEAL"
| "DELEGATE"
| "UNDELEGATE"
| "REDELEGATE"
| "REWARD"
| "FEES"
| "FREEZE"
| "UNFREEZE"
| "VOTE"
| "REWARD_PAYOUT"
| "BOND"
| "UNBOND"
| "WITHDRAW_UNBONDED"
| "SET_CONTROLLER"
| "SLASH"
| "NOMINATE"
| "CHILL"
| "SUPPLY"
| "REDEEM"
| "APPROVE"
| "OPT_IN"
| "OPT_OUT"
| "NFT_IN"
| "NFT_OUT"
)
Type: {id: string, hash: string, type: OperationType, value: BigNumber, fee: BigNumber, senders: Array<string>, recipients: Array<string>, blockHeight: (number | null | undefined), blockHash: (string | null | undefined), transactionSequenceNumber: number?, accountId: string, standard: (NFTStandards | string)?, operator: string?, contract: string?, tokenId: string?, date: Date, extra: Record<string, any>, hasFailed: boolean?, subOperations: Array<Operation>?, internalOperations: Array<Operation>?, nftOperations: Array<Operation>?}
id
stringhash
stringtype
OperationTypevalue
BigNumberfee
BigNumbersenders
Array<string>recipients
Array<string>blockHeight
(number | null | undefined)blockHash
(string | null | undefined)transactionSequenceNumber
number?accountId
stringstandard
(NFTStandards | string)?operator
string?contract
string?tokenId
string?date
Dateextra
Record<string, any>hasFailed
boolean?subOperations
Array<Operation>?internalOperations
Array<Operation>?nftOperations
Array<Operation>?Type: {id: string, hash: string, type: OperationType, value: string, fee: string, senders: Array<string>, recipients: Array<string>, blockHeight: (number | null | undefined), blockHash: (string | null | undefined), transactionSequenceNumber: number?, accountId: string, hasFailed: boolean?, standard: (NFTStandards | string)?, operator: string?, contract: string?, tokenId: string?, date: string, extra: Record<string, any>, subOperations: Array<OperationRaw>?, internalOperations: Array<OperationRaw>?, nftOperations: Array<OperationRaw>?}
id
stringhash
stringtype
OperationTypevalue
stringfee
stringsenders
Array<string>recipients
Array<string>blockHeight
(number | null | undefined)blockHash
(string | null | undefined)transactionSequenceNumber
number?accountId
stringhasFailed
boolean?standard
(NFTStandards | string)?operator
string?contract
string?tokenId
string?date
stringextra
Record<string, any>subOperations
Array<OperationRaw>?internalOperations
Array<OperationRaw>?nftOperations
Array<OperationRaw>?A pagination config holds the user's pagination state this is a state that usually should leave during the app lifecycle, but is not persisted it drives the number of operations to poll in accounts when a user paginate more, the number should accordingly be incremented The UI should manage scrolling ahead of time (e.g. if 30 ops is displayed and UI have pages of 20 ops, the UI can already request to poll 70 ops so it have 2 pages in advance) The UI must always do max() to keep the increasing the counter and not going back to lower value: that optim the sync to not recompute things too much
Type: {operationsPerAccountId: Record<string, number>?, operations: number?}
Type: {date: Date, value: BigNumber}
date
Datevalue
BigNumberType: Array<BalanceHistoryData>
Type: Array<{date: Date, value: BigNumber, countervalue: BigNumber}>
Type: {percentage: (BigNumber | null | undefined), value: BigNumber}
percentage
(BigNumber | null | undefined)value
BigNumberType: {history: BalanceHistoryWithCountervalue, countervalueAvailable: boolean, countervalueReceiveSum: BigNumber, countervalueSendSum: BigNumber, cryptoChange: ValueChange, countervalueChange: ValueChange}
history
BalanceHistoryWithCountervaluecountervalueAvailable
booleancountervalueReceiveSum
BigNumbercountervalueSendSum
BigNumbercryptoChange
ValueChangecountervalueChange
ValueChangeType: {history: BalanceHistoryWithCountervalue, countervalueAvailable: boolean, histories: Array<BalanceHistoryWithCountervalue>, accounts: AccountLikeArray, cryptoChange: ValueChange, countervalueChange: ValueChange}
history
BalanceHistoryWithCountervaluecountervalueAvailable
booleanhistories
Array<BalanceHistoryWithCountervalue>accounts
AccountLikeArraycryptoChange
ValueChangecountervalueChange
ValueChangeType: {balanceHistory: BalanceHistory, balanceAvailable: boolean, availableAccounts: Array<AccountLike>, unavailableCurrencies: Array<(CryptoCurrency | TokenCurrency)>, accounts: Array<AccountLike>, range: PortfolioRange, histories: Array<BalanceHistoryWithCountervalue>, countervalueReceiveSum: BigNumber, countervalueSendSum: BigNumber, countervalueChange: ValueChange}
balanceHistory
BalanceHistorybalanceAvailable
booleanavailableAccounts
Array<AccountLike>unavailableCurrencies
Array<(CryptoCurrency | TokenCurrency)>accounts
Array<AccountLike>range
PortfolioRangehistories
Array<BalanceHistoryWithCountervalue>countervalueReceiveSum
BigNumbercountervalueSendSum
BigNumbercountervalueChange
ValueChangeType: {count: number, granularityId: ("HOUR"
| "DAY"
| "WEEK"
), startOf: function (arg0: Date): Date, increment: number}
count
numbergranularityId
("HOUR"
| "DAY"
| "WEEK"
)startOf
function (arg0: Date): Dateincrement
numberType: ("year"
| "month"
| "week"
| "day"
)
Type: {isAvailable: boolean, list: Array<{currency: (CryptoCurrency | TokenCurrency), distribution: number, amount: BigNumber, countervalue: BigNumber}>, showFirst: number, sum: BigNumber}
isAvailable
booleanlist
Array<{currency: (CryptoCurrency | TokenCurrency), distribution: number, amount: BigNumber, countervalue: BigNumber}>showFirst
numbersum
BigNumberType: {provider: string, swapId: string, status: string, receiverAccountId: string, tokenId: string?, operationId: string, fromAmount: BigNumber, toAmount: BigNumber}
provider
stringswapId
stringstatus
stringreceiverAccountId
stringtokenId
string?operationId
stringfromAmount
BigNumbertoAmount
BigNumberType: {provider: string, swapId: string, status: string, receiverAccountId: string, tokenId: string?, operationId: string, fromAmount: string, toAmount: string}
provider
stringswapId
stringstatus
stringreceiverAccountId
stringtokenId
string?operationId
stringfromAmount
stringtoAmount
stringType: {address: (string | null | undefined), value: (BigNumber | null | undefined), previousTxHash: (string | null | undefined), previousOutputIndex: number}
address
(string | null | undefined)value
(BigNumber | null | undefined)previousTxHash
(string | null | undefined)previousOutputIndex
numberType: [(string | null | undefined), (string | null | undefined), (string | null | undefined), number]
Type: {hash: string, outputIndex: number, blockHeight: (number | null | undefined), address: (string | null | undefined), path: (string | null | undefined), value: BigNumber, rbf: boolean, isChange: boolean}
hash
stringoutputIndex
numberblockHeight
(number | null | undefined)address
(string | null | undefined)path
(string | null | undefined)value
BigNumberrbf
booleanisChange
booleanType: [string, number, (number | null | undefined), (string | null | undefined), (string | null | undefined), string, number, number]
Type: {operation: Operation, signature: string, signatureRaw: Record<string, any>?, expirationDate: (Date | null | undefined)}
operation
Operationsignature
stringsignatureRaw
Record<string, any>?expirationDate
(Date | null | undefined)Type: {operation: OperationRaw, signature: string, signatureRaw: Record<string, any>?, expirationDate: (string | null | undefined)}
operation
OperationRawsignature
stringsignatureRaw
Record<string, any>?expirationDate
(string | null | undefined)Type: ({type: "device-streaming"
, progress: number, index: number, total: number} | {type: "device-signature-requested"
} | {type: "device-signature-granted"
} | {type: "signed"
, signedOperation: SignedOperation})
Type: ({type: "device-streaming"
, progress: number, index: number, total: number} | {type: "device-signature-requested"
} | {type: "device-signature-granted"
} | {type: "signed"
, signedOperation: SignedOperationRaw})
Transaction is a generic object that holds all state for all transactions there are generic fields and coin specific fields. That's why almost all fields are optionals
Type: {amount: BigNumber, recipient: string, useAllAmount: boolean?, subAccountId: (string | null | undefined)?, feesStrategy: ("slow"
| "medium"
| "fast"
| "custom"
| null)?}
amount
BigNumberrecipient
stringuseAllAmount
boolean?subAccountId
(string | null | undefined)?feesStrategy
("slow"
| "medium"
| "fast"
| "custom"
| null)?Type: {amount: string, recipient: string, useAllAmount: boolean?, subAccountId: (string | null | undefined)?, feesStrategy: ("slow"
| "medium"
| "fast"
| "custom"
| null)?}
amount
stringrecipient
stringuseAllAmount
boolean?subAccountId
(string | null | undefined)?feesStrategy
("slow"
| "medium"
| "fast"
| "custom"
| null)?User can have 3 differents choice for their fee Most of the time mid is low * 1.25 and high is low * 1.5 They are some exception as eth that got his own meter
Type: {amount: BigNumber, displayedAmount: BigNumber?, label: string, unit: Unit?}
amount
BigNumberdisplayedAmount
BigNumber?label
stringunit
Unit?TransactionStatus is a view of Transaction with general info to be used on the UI and status info.
Type: {errors: Record<string, Error>, warnings: Record<string, Error>, estimatedFees: BigNumber, amount: BigNumber, totalSpent: BigNumber, recipientIsReadOnly: boolean?, txInputs: Array<BitcoinInput>?, txOutputs: Array<BitcoinOutput>?}
errors
Record<string, Error>warnings
Record<string, Error>estimatedFees
BigNumberamount
BigNumbertotalSpent
BigNumberrecipientIsReadOnly
boolean?txInputs
Array<BitcoinInput>?txOutputs
Array<BitcoinOutput>?Type: {errors: Record<string, string>, warnings: Record<string, string>, estimatedFees: string, amount: string, totalSpent: string, useAllAmount: boolean?, recipientIsReadOnly: boolean?, txInputs: Array<BitcoinInputRaw>?, txOutputs: Array<BitcoinOutputRaw>?}
FAQs
Ledger Live main types.
The npm package @ledgerhq/types-live receives a total of 24,977 weekly downloads. As such, @ledgerhq/types-live popularity was classified as popular.
We found that @ledgerhq/types-live demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 0 open source maintainers collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Research
Security News
The Socket Research Team has discovered six new malicious npm packages linked to North Korea’s Lazarus Group, designed to steal credentials and deploy backdoors.
Security News
Socket CEO Feross Aboukhadijeh discusses the open web, open source security, and how Socket tackles software supply chain attacks on The Pair Program podcast.
Security News
Opengrep continues building momentum with the alpha release of its Playground tool, demonstrating the project's rapid evolution just two months after its initial launch.