ledger-core
Classes | Enumerations | Functions
ledger::core::api Namespace Reference

Classes

class  Account
 
class  AccountCallback
 
struct  AccountCreationInfo
 
class  AccountCreationInfoCallback
 
class  AccountListCallback
 
class  Address
 
class  AddressListCallback
 
class  Amount
 
class  AmountCallback
 
class  AmountListCallback
 
class  BigInt
 
class  BigIntCallback
 
class  BigIntImpl
 
class  BigIntListCallback
 
class  BinaryCallback
 
class  BitcoinLikeAccount
 
class  BitcoinLikeAddress
 
class  BitcoinLikeBlock
 
class  BitcoinLikeExtendedPublicKey
 
class  BitcoinLikeInput
 
struct  BitcoinLikeNetworkParameters
 
class  BitcoinLikeOperation
 
struct  BitcoinLikeOperator
 
class  BitcoinLikeOutput
 
class  BitcoinLikeOutputListCallback
 
struct  BitcoinLikePreparedTransaction
 
class  BitcoinLikeScript
 
class  BitcoinLikeScriptChunk
 
struct  BitcoinLikeSignature
 
class  BitcoinLikeTransaction
 
class  BitcoinLikeTransactionBuilder
 
class  BitcoinLikeTransactionCallback
 
struct  BitcoinLikeTransactionRequest
 
class  BitcoinLikeWallet
 
class  BitcoinLikeWalletConfiguration
 
struct  Block
 
class  BlockCallback
 
class  BlockchainExplorerEngines
 
class  BlockchainObserverEngines
 
class  BoolCallback
 
class  Configuration
 
class  ConfigurationDefaults
 
struct  Currency
 
class  CurrencyCallback
 
class  CurrencyListCallback
 
struct  CurrencyUnit
 
class  DatabaseBackend
 
class  DatabaseBlob
 
class  DatabaseColumn
 
class  DatabaseConnection
 
class  DatabaseConnectionPool
 
class  DatabaseEngine
 
class  DatabaseError
 
class  DatabaseResultRow
 
class  DatabaseResultSet
 
class  DatabaseStatement
 
class  DerivationPath
 
class  DynamicArray
 
class  DynamicObject
 
class  ERC20LikeAccount
 
class  ERC20LikeOperation
 
struct  ERC20Token
 
struct  Error
 
class  ErrorCodeCallback
 
struct  EstimatedSize
 
class  EthereumLikeAccount
 
class  EthereumLikeAddress
 
class  EthereumLikeBlock
 
class  EthereumLikeExtendedPublicKey
 
struct  EthereumLikeNetworkParameters
 
class  EthereumLikeOperation
 
class  EthereumLikeTransaction
 
class  EthereumLikeTransactionBuilder
 
class  EthereumLikeTransactionCallback
 
class  EthereumLikeWallet
 
class  EthereumPublicKeyProvider
 
class  Event
 
class  EventBus
 
class  EventPublisher
 
class  EventReceiver
 
class  ExecutionContext
 
struct  ExtendedKeyAccountCreationInfo
 
class  ExtendedKeyAccountCreationInfoCallback
 
struct  FormatRules
 
class  GetEthreumLikeWalletCallback
 
class  HashAlgorithmHelper
 
class  HttpClient
 
struct  HttpReadBodyResult
 
class  HttpRequest
 
class  HttpUrlConnection
 
class  I32Callback
 
class  InternalTransaction
 
class  KeychainEngines
 
class  LedgerCore
 
struct  Locale
 
class  Lock
 
class  Logger
 
class  LogPrinter
 
class  Networks
 
class  Operation
 
class  OperationListCallback
 
class  OperationQuery
 
class  PathResolver
 
class  PoolConfiguration
 
class  Preferences
 
class  PreferencesEditor
 
class  QueryFilter
 
class  RandomNumberGenerator
 
class  RippleConfiguration
 
class  RippleConfigurationDefaults
 
class  RippleLikeAccount
 
class  RippleLikeAddress
 
class  RippleLikeBlock
 
class  RippleLikeExtendedPublicKey
 
struct  RippleLikeMemo
 
struct  RippleLikeNetworkParameters
 
class  RippleLikeOperation
 
class  RippleLikeTransaction
 
class  RippleLikeTransactionBuilder
 
class  RippleLikeTransactionCallback
 
class  Runnable
 
class  Secp256k1
 
class  StringCallback
 
class  SynchronizationEngines
 
class  SynchronizationStatus
 
class  SynchronizerEngines
 
class  TezosConfiguration
 
class  TezosConfigurationDefaults
 
class  TezosLikeAccount
 
class  TezosLikeAddress
 
class  TezosLikeBlock
 
class  TezosLikeExtendedPublicKey
 
struct  TezosLikeNetworkParameters
 
class  TezosLikeOperation
 
class  TezosLikeOriginatedAccount
 
class  TezosLikeTransaction
 
class  TezosLikeTransactionBuilder
 
class  TezosLikeTransactionCallback
 
class  ThreadDispatcher
 
class  TrustIndicator
 
class  Wallet
 
class  WalletCallback
 
class  WalletListCallback
 
class  WalletPool
 
class  WalletPoolBuilder
 
class  WalletPoolCallback
 
class  WebSocketClient
 
class  WebSocketConnection
 

Enumerations

enum  BitcoinLikeFeePolicy : int { PER_BYTE, PER_KBYTE }
 
enum  BitcoinLikePickingStrategy : int { DEEP_OUTPUTS_FIRST, OPTIMIZE_SIZE, MERGE_OUTPUTS }
 
enum  BitcoinLikeSignatureState : int { ALREADY_SIGNED, MISSING_DATA, SIGNING_SUCCEED }
 
enum  DatabaseValueType : int {
  STRING, DATE, DOUBLE, INTEGER,
  LONG_LONG, UNSIGNED_LONG_LONG, BLOB
}
 
enum  DynamicType : int {
  DynamicType::OBJECT, DynamicType::INT32, DynamicType::INT64, DynamicType::DOUBLE,
  DynamicType::BOOLEAN, DynamicType::DATA, DynamicType::ARRAY, DynamicType::STRING,
  DynamicType::UNDEFINED
}
 
enum  ErrorCode : int {
  ErrorCode::EC_PRIV_KEY_INVALID_FORMAT, EC_PUB_KEY_INVALID, EC_DER_SIGNATURE_INVALID, EC_SIGN_FAILED,
  ErrorCode::WALLET_NOT_FOUND, WALLET_ALREADY_EXISTS, RAW_TRANSACTION_NOT_FOUND, ErrorCode::ACCOUNT_ALREADY_EXISTS,
  ACCOUNT_NOT_FOUND, MISSING_DERIVATION, ErrorCode::BLOCK_NOT_FOUND, ErrorCode::CANCELLED_BY_USER,
  UNSUPPORTED_CURRENCY, CURRENCY_ALREADY_EXISTS, CURRENCY_NOT_FOUND, CURRENCY_UNIT_NOT_FOUND,
  ErrorCode::INVALID_BASE58_FORMAT, INVALID_EIP55_FORMAT, INVALID_CHECKSUM, INVALID_VERSION,
  ErrorCode::PRIVATE_DERIVATION_NOT_SUPPORTED, ErrorCode::INVALID_NETWORK_ADDRESS_VERSION, INCOMPLETE_TRANSACTION, ErrorCode::RUNTIME_ERROR,
  OUT_OF_RANGE, ILLEGAL_ARGUMENT, INVALID_ARGUMENT, ILLEGAL_STATE,
  NULL_POINTER, UNSUPPORTED_OPERATION, UNKNOWN, IMPLEMENTATION_IS_MISSING,
  FUTURE_WAS_SUCCESSFULL, ALREADY_COMPLETED, NO_SUCH_ELEMENT, ErrorCode::UNABLE_TO_OPEN_LEVELDB,
  ErrorCode::NO_INTERNET_CONNECTIVITY, UNABLE_TO_RESOLVE_HOST, UNABLE_TO_CONNECT_TO_HOST, HTTP_ERROR,
  SSL_ERROR, TOO_MANY_REDIRECT, AUTHENTICATION_REQUIRED, HTTP_TIMEOUT,
  PROXY_ERROR, ErrorCode::API_ERROR, TRANSACTION_NOT_FOUND, ErrorCode::INVALID_DATE_FORMAT,
  INVALID_DERIVATION_SCHEME, ErrorCode::UNKNOWN_KEYCHAIN_ENGINE, UNKNOWN_BLOCKCHAIN_EXPLORER_ENGINE, UNKNOWN_BLOCKCHAIN_OBSERVER_ENGINE,
  UNKNOWN_SYNCHRONIZATION_ENGINE, ErrorCode::DATABASE_EXCEPTION, ErrorCode::NOT_ENOUGH_FUNDS, ErrorCode::BAD_CAST,
  ErrorCode::LINK_NON_TAIL_FILTER, ErrorCode::INVALID_BECH32_FORMAT
}
 
enum  EventCode : int {
  EventCode::UNDEFINED, EventCode::NEW_OPERATION, EventCode::NEW_BLOCK, EventCode::SYNCHRONIZATION_STARTED,
  EventCode::SYNCHRONIZATION_FAILED, EventCode::SYNCHRONIZATION_SUCCEED, EventCode::SYNCHRONIZATION_SUCCEED_ON_PREVIOUSLY_EMPTY_ACCOUNT
}
 
enum  HttpMethod : int { GET, POST, PUT, DEL }
 
enum  OperationOrderKey : int {
  DATE, AMOUNT, SENDERS, RECIPIENTS,
  TYPE, CURRENCY_NAME, FEES, BLOCK_HEIGHT
}
 
enum  OperationType : int { SEND, RECEIVE, NONE }
 
enum  RoundingMode : int { RoundingMode::TRUNCATED, RoundingMode::ROUND_HALF_DOWN, RoundingMode::ROUND_HALF_EVEN, RoundingMode::ROUND_HALF_UP }
 
enum  TezosCurve : int { ED25519, SECP256K1, P256 }
 
enum  TezosOperationTag : int {
  OPERATION_TAG_NONE, OPERATION_TAG_NONE1, OPERATION_TAG_NONE2, OPERATION_TAG_GENERIC,
  OPERATION_TAG_NONE4, OPERATION_TAG_PROPOSAL, OPERATION_TAG_BALLOT, OPERATION_TAG_REVEAL,
  OPERATION_TAG_TRANSACTION, OPERATION_TAG_ORIGINATION, OPERATION_TAG_DELEGATION
}
 
enum  TimePeriod : int { HOUR, DAY, WEEK, MONTH }
 
enum  TrustLevel : int { TRUSTED, PENDING, UNTRUSTED, DROPPED }
 
enum  WalletType : int {
  WalletType::BITCOIN, WalletType::ETHEREUM, WalletType::RIPPLE, WalletType::MONERO,
  WalletType::TEZOS
}
 

Functions

std::string to_string (const BitcoinLikeFeePolicy &bitcoinLikeFeePolicy)
 
template<>
BitcoinLikeFeePolicy from_string (const std::string &bitcoinLikeFeePolicy)
 
std::ostream & operator<< (std::ostream &os, const BitcoinLikeFeePolicy &o)
 
std::string to_string (const BitcoinLikePickingStrategy &bitcoinLikePickingStrategy)
 
template<>
BitcoinLikePickingStrategy from_string (const std::string &bitcoinLikePickingStrategy)
 
std::ostream & operator<< (std::ostream &os, const BitcoinLikePickingStrategy &o)
 
std::string to_string (const BitcoinLikeSignatureState &bitcoinLikeSignatureState)
 
template<>
BitcoinLikeSignatureState from_string (const std::string &bitcoinLikeSignatureState)
 
std::ostream & operator<< (std::ostream &os, const BitcoinLikeSignatureState &o)
 
std::string to_string (const DatabaseValueType &databaseValueType)
 
template<>
DatabaseValueType from_string (const std::string &databaseValueType)
 
std::ostream & operator<< (std::ostream &os, const DatabaseValueType &o)
 
std::string to_string (const DynamicType &dynamicType)
 
template<>
DynamicType from_string (const std::string &dynamicType)
 
std::ostream & operator<< (std::ostream &os, const DynamicType &o)
 
template<typename T >
from_string (const std::string &)
 
std::string to_string (const ErrorCode &errorCode)
 
template<>
ErrorCode from_string (const std::string &errorCode)
 
std::ostream & operator<< (std::ostream &os, const ErrorCode &o)
 
std::string to_string (const EventCode &eventCode)
 
template<>
EventCode from_string (const std::string &eventCode)
 
std::ostream & operator<< (std::ostream &os, const EventCode &o)
 
std::string to_string (const HttpMethod &httpMethod)
 
template<>
HttpMethod from_string (const std::string &httpMethod)
 
std::ostream & operator<< (std::ostream &os, const HttpMethod &o)
 
std::string to_string (const OperationOrderKey &operationOrderKey)
 
template<>
OperationOrderKey from_string (const std::string &operationOrderKey)
 
std::ostream & operator<< (std::ostream &os, const OperationOrderKey &o)
 
std::string to_string (const OperationType &operationType)
 
template<>
OperationType from_string (const std::string &operationType)
 
std::ostream & operator<< (std::ostream &os, const OperationType &o)
 
std::string to_string (const RoundingMode &roundingMode)
 
template<>
RoundingMode from_string (const std::string &roundingMode)
 
std::ostream & operator<< (std::ostream &os, const RoundingMode &o)
 
std::string to_string (const TezosCurve &tezosCurve)
 
template<>
TezosCurve from_string (const std::string &tezosCurve)
 
std::ostream & operator<< (std::ostream &os, const TezosCurve &o)
 
std::string to_string (const TezosOperationTag &tezosOperationTag)
 
template<>
TezosOperationTag from_string (const std::string &tezosOperationTag)
 
std::ostream & operator<< (std::ostream &os, const TezosOperationTag &o)
 
std::string to_string (const TimePeriod &timePeriod)
 
template<>
TimePeriod from_string (const std::string &timePeriod)
 
std::ostream & operator<< (std::ostream &os, const TimePeriod &o)
 
std::string to_string (const TrustLevel &trustLevel)
 
template<>
TrustLevel from_string (const std::string &trustLevel)
 
std::ostream & operator<< (std::ostream &os, const TrustLevel &o)
 
std::string to_string (const WalletType &walletType)
 
template<>
WalletType from_string (const std::string &walletType)
 
std::ostream & operator<< (std::ostream &os, const WalletType &o)
 

Detailed Description

Namespace containing the API of the core library

Enumeration Type Documentation

◆ DynamicType

enum ledger::core::api::DynamicType : int
strong
Enumerator
OBJECT 

A dynamic object, composed of DynamicType indexed by strings.

INT32 

A 32-bit integer.

INT64 

A 64-bit integer.

DOUBLE 

A double-precision floating point number.

BOOLEAN 

A boolean.

DATA 

A contiguous, unsized bytes array.

ARRAY 

An array of DynamicType values.

STRING 

A string.

UNDEFINED 

Just an undefined value.

◆ ErrorCode

enum ledger::core::api::ErrorCode : int
strong
Enumerator
EC_PRIV_KEY_INVALID_FORMAT 

Pool errors unknown_network_parameters; Crypto errors

WALLET_NOT_FOUND 

Device errors Wallet errors

ACCOUNT_ALREADY_EXISTS 

Account errors

BLOCK_NOT_FOUND 

Block error

CANCELLED_BY_USER 

User land errors

INVALID_BASE58_FORMAT 

Others

PRIVATE_DERIVATION_NOT_SUPPORTED 

DeterministicPublicKey

INVALID_NETWORK_ADDRESS_VERSION 

Bitcoin error

RUNTIME_ERROR 

Generic

UNABLE_TO_OPEN_LEVELDB 

Preferences Error

NO_INTERNET_CONNECTIVITY 

Network errors

API_ERROR 

API errors

INVALID_DATE_FORMAT 

Format

UNKNOWN_KEYCHAIN_ENGINE 

Wallet building errors

DATABASE_EXCEPTION 

Database error

NOT_ENOUGH_FUNDS 

Wallet transaction

BAD_CAST 

Bad cast

LINK_NON_TAIL_FILTER 

Query build

INVALID_BECH32_FORMAT 

Invalid bech32 format

◆ EventCode

enum ledger::core::api::EventCode : int
strong
Enumerator
UNDEFINED 

An unknown event code.

NEW_OPERATION 

A new operation event.

NEW_BLOCK 

A new block event.

SYNCHRONIZATION_STARTED 

Event emitted when a wallet synchronization started.

SYNCHRONIZATION_FAILED 

Event emitted when a wallet synchronization failed.

SYNCHRONIZATION_SUCCEED 

Event emitted when a wallet synchronization succeeded.

SYNCHRONIZATION_SUCCEED_ON_PREVIOUSLY_EMPTY_ACCOUNT 

Event emitted when a wallet synchronization succeeded on the previously empty account.

◆ RoundingMode

Enumerator
TRUNCATED 

The extra decimals are just dropped.

ROUND_HALF_DOWN 

The extra decimals are dropped and the new last decimal is rounded half down (x.0).

ROUND_HALF_EVEN 

The extra decimals are dropped and the new last decimal is rounded half down or middle according to the fractional part (x.0 or (x+1).0).

ROUND_HALF_UP 

The extra decimals are dropped and the new last decimal is rounded half up ((x+1).0).

◆ WalletType

enum ledger::core::api::WalletType : int
strong
Enumerator
BITCOIN 

A Bitcoin-like wallet.

ETHEREUM 

An Ethereum-like wallet.

RIPPLE 

A Ripple-like wallet.

MONERO 

A Monero-like wallet.

TEZOS 

A Tezos-like wallet.