@ledgerhq/live-app-sdk / Exports
- AlgorandTransaction
- BitcoinTransaction
- CosmosTransaction
- CryptoOrgTransaction
- EthereumTransaction
- PolkadotTransaction
- RawAlgorandTransaction
- RawBitcoinTransaction
- RawCosmosTransaction
- RawCryptoOrgTransaction
- RawEthereumTransaction
- RawPolkadotTransaction
- RawRippleTransaction
- RawStellarTransaction
- RawTezosTransaction
- RawTransactionCommon
- RawTronTransaction
- RippleTransaction
- StellarTransaction
- TezosTransaction
- TransactionCommon
- Transport
- TronTransaction
- Account
- AlgorandOperationMode
- ApplicationDetails
- BaseCurrency
- CosmosOperationMode
- CryptoCurrency
- Currency
- DeviceInfo
- ERC20TokenCurrency
- EcdsaSignature
- ExchangeDeviceTxId
- ExchangePayload
- MessageHandler
- PolkadotOperationMode
- RawAccount
- RawSignedTransaction
- RawTransaction
- TezosOperationMode
- TokenCurrency
- Transaction
- TronOperationMode
- TronResource
- Unit
Ƭ Account: Object
A ledger live cryptocurrency account
remarks
This is a slightly modified subset of the Account type used by the Ledger Live platform.
see
Account reference in Ledger Live Common doc for more infos
Name | Type | Description |
---|---|---|
address |
string |
The "next" public address where a user should receive funds. In the context of Bitcoin, the address is "renewed" each time funds are received in order to allow some privacy. In other blockchains, the address might never change |
balance |
BigNumber |
The total amount of assets that this account holds |
blockHeight |
number |
Tracks the current blockchain block height |
currency |
string |
The associated cryptocurrency id of the Account |
id |
string |
The unique identifier of this account used internally by Ledger Live software |
lastSyncDate |
Date |
The date of the last time a synchronization was performed. In other words, tracks how up-to-date the Account data is |
name |
string |
The account’s name set by the user. |
spendableBalance |
BigNumber |
The amount of the balance that can be spent. Most of the time it will be equal to the balance, but this can vary in some blockchains |
Ƭ AlgorandOperationMode: "send"
| "optIn"
| "claimReward"
| "optOut"
Ƭ ApplicationDetails: Object
Informations about a device application
Name | Type | Description |
---|---|---|
name |
string |
Name of the application |
version |
string |
Version of the application (SemVer) |
Ƭ BaseCurrency: Object
Base currency model
Name | Type | Description |
---|---|---|
color |
string |
Used for UI |
id |
string |
The unique internal id of the currency |
name |
string |
The display name of the currency |
ticker |
string |
The ticker name in exchanges / countervalue apis (e.g. BTC, ETH, USDT). |
units |
Unit [] |
Array of available units for the currency |
Ƭ CosmosOperationMode: "send"
| "delegate"
| "undelegate"
| "redelegate"
| "claimReward"
| "claimRewardCompound"
Ƭ CryptoCurrency: BaseCurrency
& { family
: string
; type
: CryptoCurrency
}
Crypto currency model
Ƭ Currency: CryptoCurrency
| ERC20TokenCurrency
Ƭ DeviceInfo: Object
Information about a device
Name | Type | Description |
---|---|---|
modelId |
DeviceModel |
The model of the device |
version |
string |
The version of the firmware |
Ƭ ERC20TokenCurrency: TokenCurrency
& { contract
: string
; standard
: ERC20
}
ERC20 token currency model
Ƭ EcdsaSignature: Buffer
The ECDSA signature of the payload
Ƭ ExchangeDeviceTxId: string
A transaction ID used to complete the exchange process
Ƭ ExchangePayload: Buffer
Metadata used to describe a secure exchange between a Ledger device and a partner (for sell, swap and funding)
ref:
https://github.com/LedgerHQ/app-exchange/blob/master/src/proto/protocol.proto
Ƭ MessageHandler: (payload
: unknown
) => Promise
<void
>
▸ (payload
): Promise
<void
>
Simple contract for handling a Message received through a Transport protocol
alpha
Name | Type |
---|---|
payload |
unknown |
Promise
<void
>
Ƭ PolkadotOperationMode: "send"
| "bond"
| "unbond"
| "rebond"
| "withdrawUnbonded"
| "setController"
| "nominate"
| "chill"
| "claimReward"
Ƭ RawAccount: Object
The raw representation of the Account type
see
Account for information regarding individual fields. Each field type is the serialized version of the corresponding Account type
Name | Type |
---|---|
address |
string |
balance |
string |
blockHeight |
number |
currency |
string |
id |
string |
lastSyncDate |
string |
name |
string |
spendableBalance |
string |
Ƭ RawSignedTransaction: Object
The raw representation of a signed transaction returned by the Ledger Live platform
remarks
This type is returned by Ledger Live when signing with signTransaction and is only used as a payload by the broadcastSignedTransaction function to actually broadcast the transaction to the blockchain
Name | Type |
---|---|
expirationDate |
string | null |
operation |
unknown |
signature |
string |
signatureRaw? |
unknown |
Ƭ RawTransaction: RawEthereumTransaction
| RawBitcoinTransaction
| RawAlgorandTransaction
| RawCryptoOrgTransaction
| RawRippleTransaction
| RawCosmosTransaction
| RawTezosTransaction
| RawPolkadotTransaction
| RawStellarTransaction
| RawTronTransaction
The raw representation of the generic Transaction type.
Ƭ TezosOperationMode: "send"
| "delegate"
| "undelegate"
Ƭ TokenCurrency: BaseCurrency
& { parent
: string
; type
: TokenCurrency
}
Token currency model
Ƭ Transaction: EthereumTransaction
| BitcoinTransaction
| AlgorandTransaction
| CryptoOrgTransaction
| RippleTransaction
| CosmosTransaction
| TezosTransaction
| PolkadotTransaction
| StellarTransaction
| TronTransaction
Description of an unsigned transaction. This type is used to build transactions and then sign them with a Ledger device and finally broadcast them to the network upon user validation.
Ƭ TronOperationMode: "send"
| "freeze"
| "unfreeze"
| "vote"
| "claimReward"
Ƭ TronResource: "BANDWIDTH"
| "ENERGY"
Ƭ Unit: Object
A unit describes a given representation of a currency for humans. A currency can have many units, for instance, we can assume Euro have euros and cents. We can define Bitcoin to have: bitcoin, mBTC, bit, satoshi (but that's up to us really).
remarks
This is a slightly modified subset of the Unit type used by the Ledger Live platform.
see
Unit reference in Ledger Live Common doc for more informations
Name | Type | Description |
---|---|---|
code |
string |
String to use when formatting the unit. like 'BTC' or 'USD' |
magnitude |
number |
Number of digits after the '.' in context of this unit |
name |
string |
Display name of a given unit (example: satoshi) |
▸ deserializeAccount(rawAccount
): Account
Deserialize a RawAccount object after it has been received over JSON-RPC protocol from the Ledger Live platform
Name | Type | Description |
---|---|---|
rawAccount |
RawAccount |
The raw account representation to deserialize |
The object account of the provided raw account representation
▸ deserializeTransaction(rawTransaction
): Transaction
Deserialize a RawTransaction object after it has been received over JSON-RPC protocol from the Ledger Live platform
Name | Type | Description |
---|---|---|
rawTransaction |
RawTransaction |
The raw transaction representation to deserialize |
The object transaction of the provided raw transaction representation
▸ serializeAccount(account
): RawAccount
Serialize an Account object in order to send it over JSON-RPC protocol to the Ledger Live platform
Name | Type | Description |
---|---|---|
account |
Account |
The account object to serialize |
The raw representation of the provided account object
▸ serializeTransaction(transaction
): RawTransaction
Serialize an Transaction object in order to send it over JSON-RPC protocol to the Ledger Live platform
Name | Type | Description |
---|---|---|
transaction |
Transaction |
The transaction object to serialize |
The raw representation of the provided transaction object