|
UltrafastSecp256k1 3.50.0
Ultra high-performance secp256k1 elliptic curve cryptography library
|
Namespaces | |
| namespace | wallet |
Classes | |
| struct | BitcoinSigDecodeResult |
| struct | CoinFeatures |
| struct | CoinKeyPair |
| struct | CoinParams |
| struct | EthSignature |
| struct | Keccak256State |
Enumerations | |
| enum class | DerivationPurpose : std::uint32_t { BIP44 = 44 , BIP49 = 49 , BIP84 = 84 , BIP86 = 86 } |
| enum class | AddressHash : std::uint8_t { HASH160 , KECCAK256 , BLAKE2B_160 } |
| enum class | AddressEncoding : std::uint8_t { BASE58CHECK , BECH32 , EIP55 , CASHADDR , TRON_BASE58 } |
Functions | |
| std::string | coin_address (const fast::Point &pubkey, const CoinParams &coin, bool testnet=false) |
| std::string | coin_address_p2pkh (const fast::Point &pubkey, const CoinParams &coin, bool testnet=false) |
| std::string | coin_address_p2wpkh (const fast::Point &pubkey, const CoinParams &coin, bool testnet=false) |
| std::string | coin_address_p2tr (const fast::Point &internal_key, const CoinParams &coin, bool testnet=false) |
| std::string | coin_address_p2sh_p2wpkh (const fast::Point &pubkey, const CoinParams &coin, bool testnet=false) |
| std::string | coin_address_p2sh (const std::array< std::uint8_t, 20 > &script_hash, const CoinParams &coin, bool testnet=false) |
| std::string | coin_address_cashaddr (const fast::Point &pubkey, const CoinParams &coin, bool testnet=false) |
| std::string | coin_wif_encode (const fast::Scalar &private_key, const CoinParams &coin, bool compressed=true, bool testnet=false) |
| CoinKeyPair | coin_derive (const fast::Scalar &private_key, const CoinParams &coin, bool testnet=false, const CurveContext *ctx=nullptr) |
| std::string | coin_derive_path (const CoinParams &coin, std::uint32_t account=0, bool change=false, std::uint32_t address_index=0, DerivationPurpose purpose=DerivationPurpose::BIP44) |
| DerivationPurpose | best_purpose (const CoinParams &coin) |
| std::pair< ExtendedKey, bool > | coin_derive_key (const ExtendedKey &master, const CoinParams &coin, std::uint32_t account=0, bool change=false, std::uint32_t address_index=0) |
| std::pair< ExtendedKey, bool > | coin_derive_key_with_purpose (const ExtendedKey &master, const CoinParams &coin, DerivationPurpose purpose, std::uint32_t account=0, bool change=false, std::uint32_t address_index=0) |
| std::pair< std::string, bool > | coin_address_from_seed (const std::uint8_t *seed, std::size_t seed_len, const CoinParams &coin, std::uint32_t account=0, std::uint32_t address_index=0) |
| const CoinParams * | find_by_coin_type (std::uint32_t coin_type) |
| const CoinParams * | find_by_ticker (const char *ticker) |
| std::array< std::uint8_t, 32 > | eip191_hash (const std::uint8_t *msg, std::size_t msg_len) |
| std::uint64_t | eip155_v (int recid, std::uint64_t chain_id) |
| int | eip155_recid (std::uint64_t v) |
| std::uint64_t | eip155_chain_id (std::uint64_t v) |
| EthSignature | eth_personal_sign (const std::uint8_t *msg, std::size_t msg_len, const fast::Scalar &private_key) |
| EthSignature | eth_sign_hash (const std::array< std::uint8_t, 32 > &hash, const fast::Scalar &private_key, std::uint64_t chain_id=0) |
| std::pair< std::array< std::uint8_t, 20 >, bool > | ecrecover (const std::array< std::uint8_t, 32 > &msg_hash, const std::array< std::uint8_t, 32 > &r, const std::array< std::uint8_t, 32 > &s, std::uint64_t v) |
| std::pair< std::array< std::uint8_t, 20 >, bool > | ecrecover (const std::array< std::uint8_t, 32 > &msg_hash, const EthSignature &sig) |
| bool | eth_personal_verify (const std::uint8_t *msg, std::size_t msg_len, const EthSignature &sig, const std::array< std::uint8_t, 20 > &expected_addr) |
| std::string | ethereum_address (const fast::Point &pubkey) |
| std::string | ethereum_address_raw (const fast::Point &pubkey) |
| std::array< std::uint8_t, 20 > | ethereum_address_bytes (const fast::Point &pubkey) |
| std::string | eip55_checksum (const std::string &hex_addr) |
| bool | eip55_verify (const std::string &addr) |
| std::array< std::uint8_t, 32 > | keccak256 (const std::uint8_t *data, std::size_t len) |
| std::array< std::uint8_t, 32 > | bitcoin_message_hash (const std::uint8_t *msg, std::size_t msg_len) |
| RecoverableSignature | bitcoin_sign_message (const std::uint8_t *msg, std::size_t msg_len, const fast::Scalar &private_key) |
| bool | bitcoin_verify_message (const std::uint8_t *msg, std::size_t msg_len, const fast::Point &pubkey, const ECDSASignature &sig) |
| std::pair< fast::Point, bool > | bitcoin_recover_message (const std::uint8_t *msg, std::size_t msg_len, const ECDSASignature &sig, int recid) |
| std::string | bitcoin_sig_to_base64 (const RecoverableSignature &rsig, bool compressed=true) |
| BitcoinSigDecodeResult | bitcoin_sig_from_base64 (const std::string &base64) |
Variables | |
| constexpr CoinParams | Bitcoin |
| constexpr CoinParams | Litecoin |
| constexpr CoinParams | Dogecoin |
| constexpr CoinParams | Dash |
| constexpr CoinParams | Ethereum |
| constexpr CoinParams | BitcoinCash |
| constexpr CoinParams | BitcoinSV |
| constexpr CoinParams | Zcash |
| constexpr CoinParams | DigiByte |
| constexpr CoinParams | Namecoin |
| constexpr CoinParams | Peercoin |
| constexpr CoinParams | Vertcoin |
| constexpr CoinParams | Viacoin |
| constexpr CoinParams | Groestlcoin |
| constexpr CoinParams | Syscoin |
| constexpr CoinParams | BNBSmartChain |
| constexpr CoinParams | Polygon |
| constexpr CoinParams | Avalanche |
| constexpr CoinParams | Fantom |
| constexpr CoinParams | Arbitrum |
| constexpr CoinParams | Optimism |
| constexpr CoinParams | Ravencoin |
| constexpr CoinParams | Flux |
| constexpr CoinParams | Qtum |
| constexpr CoinParams | Horizen |
| constexpr CoinParams | BitcoinGold |
| constexpr CoinParams | Komodo |
| constexpr CoinParams | Tron |
| constexpr const CoinParams * | ALL_COINS [] |
| constexpr std::size_t | ALL_COINS_COUNT = std::size(ALL_COINS) |
|
strong |
| Enumerator | |
|---|---|
| BASE58CHECK | |
| BECH32 | |
| EIP55 | |
| CASHADDR | |
| TRON_BASE58 | |
Definition at line 35 of file coin_params.hpp.
|
strong |
| Enumerator | |
|---|---|
| HASH160 | |
| KECCAK256 | |
| BLAKE2B_160 | |
Definition at line 27 of file coin_params.hpp.
|
strong |
| Enumerator | |
|---|---|
| BIP44 | |
| BIP49 | |
| BIP84 | |
| BIP86 | |
Definition at line 38 of file coin_hd.hpp.
| DerivationPurpose secp256k1::coins::best_purpose | ( | const CoinParams & | coin | ) |
| std::array< std::uint8_t, 32 > secp256k1::coins::bitcoin_message_hash | ( | const std::uint8_t * | msg, |
| std::size_t | msg_len | ||
| ) |
Referenced by ufsecp_btc_message_hash().
| std::pair< fast::Point, bool > secp256k1::coins::bitcoin_recover_message | ( | const std::uint8_t * | msg, |
| std::size_t | msg_len, | ||
| const ECDSASignature & | sig, | ||
| int | recid | ||
| ) |
| BitcoinSigDecodeResult secp256k1::coins::bitcoin_sig_from_base64 | ( | const std::string & | base64 | ) |
Referenced by ufsecp_btc_message_verify().
| std::string secp256k1::coins::bitcoin_sig_to_base64 | ( | const RecoverableSignature & | rsig, |
| bool | compressed = true |
||
| ) |
Referenced by ufsecp_btc_message_sign().
| RecoverableSignature secp256k1::coins::bitcoin_sign_message | ( | const std::uint8_t * | msg, |
| std::size_t | msg_len, | ||
| const fast::Scalar & | private_key | ||
| ) |
Referenced by ufsecp_btc_message_sign().
| bool secp256k1::coins::bitcoin_verify_message | ( | const std::uint8_t * | msg, |
| std::size_t | msg_len, | ||
| const fast::Point & | pubkey, | ||
| const ECDSASignature & | sig | ||
| ) |
Referenced by ufsecp_btc_message_verify().
| std::string secp256k1::coins::coin_address | ( | const fast::Point & | pubkey, |
| const CoinParams & | coin, | ||
| bool | testnet = false |
||
| ) |
Referenced by ufsecp_coin_address(), and ufsecp_coin_derive_from_seed().
| std::string secp256k1::coins::coin_address_cashaddr | ( | const fast::Point & | pubkey, |
| const CoinParams & | coin, | ||
| bool | testnet = false |
||
| ) |
| std::pair< std::string, bool > secp256k1::coins::coin_address_from_seed | ( | const std::uint8_t * | seed, |
| std::size_t | seed_len, | ||
| const CoinParams & | coin, | ||
| std::uint32_t | account = 0, |
||
| std::uint32_t | address_index = 0 |
||
| ) |
| std::string secp256k1::coins::coin_address_p2pkh | ( | const fast::Point & | pubkey, |
| const CoinParams & | coin, | ||
| bool | testnet = false |
||
| ) |
| std::string secp256k1::coins::coin_address_p2sh | ( | const std::array< std::uint8_t, 20 > & | script_hash, |
| const CoinParams & | coin, | ||
| bool | testnet = false |
||
| ) |
| std::string secp256k1::coins::coin_address_p2sh_p2wpkh | ( | const fast::Point & | pubkey, |
| const CoinParams & | coin, | ||
| bool | testnet = false |
||
| ) |
| std::string secp256k1::coins::coin_address_p2tr | ( | const fast::Point & | internal_key, |
| const CoinParams & | coin, | ||
| bool | testnet = false |
||
| ) |
| std::string secp256k1::coins::coin_address_p2wpkh | ( | const fast::Point & | pubkey, |
| const CoinParams & | coin, | ||
| bool | testnet = false |
||
| ) |
| CoinKeyPair secp256k1::coins::coin_derive | ( | const fast::Scalar & | private_key, |
| const CoinParams & | coin, | ||
| bool | testnet = false, |
||
| const CurveContext * | ctx = nullptr |
||
| ) |
| std::pair< ExtendedKey, bool > secp256k1::coins::coin_derive_key | ( | const ExtendedKey & | master, |
| const CoinParams & | coin, | ||
| std::uint32_t | account = 0, |
||
| bool | change = false, |
||
| std::uint32_t | address_index = 0 |
||
| ) |
Referenced by ufsecp_coin_derive_from_seed().
| std::pair< ExtendedKey, bool > secp256k1::coins::coin_derive_key_with_purpose | ( | const ExtendedKey & | master, |
| const CoinParams & | coin, | ||
| DerivationPurpose | purpose, | ||
| std::uint32_t | account = 0, |
||
| bool | change = false, |
||
| std::uint32_t | address_index = 0 |
||
| ) |
| std::string secp256k1::coins::coin_derive_path | ( | const CoinParams & | coin, |
| std::uint32_t | account = 0, |
||
| bool | change = false, |
||
| std::uint32_t | address_index = 0, |
||
| DerivationPurpose | purpose = DerivationPurpose::BIP44 |
||
| ) |
| std::string secp256k1::coins::coin_wif_encode | ( | const fast::Scalar & | private_key, |
| const CoinParams & | coin, | ||
| bool | compressed = true, |
||
| bool | testnet = false |
||
| ) |
Referenced by ufsecp_coin_wif_encode().
| std::pair< std::array< std::uint8_t, 20 >, bool > secp256k1::coins::ecrecover | ( | const std::array< std::uint8_t, 32 > & | msg_hash, |
| const EthSignature & | sig | ||
| ) |
| std::pair< std::array< std::uint8_t, 20 >, bool > secp256k1::coins::ecrecover | ( | const std::array< std::uint8_t, 32 > & | msg_hash, |
| const std::array< std::uint8_t, 32 > & | r, | ||
| const std::array< std::uint8_t, 32 > & | s, | ||
| std::uint64_t | v | ||
| ) |
|
inline |
Definition at line 61 of file eth_signing.hpp.
|
inline |
Definition at line 49 of file eth_signing.hpp.
|
inline |
Definition at line 42 of file eth_signing.hpp.
| std::array< std::uint8_t, 32 > secp256k1::coins::eip191_hash | ( | const std::uint8_t * | msg, |
| std::size_t | msg_len | ||
| ) |
| std::string secp256k1::coins::eip55_checksum | ( | const std::string & | hex_addr | ) |
| bool secp256k1::coins::eip55_verify | ( | const std::string & | addr | ) |
| EthSignature secp256k1::coins::eth_personal_sign | ( | const std::uint8_t * | msg, |
| std::size_t | msg_len, | ||
| const fast::Scalar & | private_key | ||
| ) |
| bool secp256k1::coins::eth_personal_verify | ( | const std::uint8_t * | msg, |
| std::size_t | msg_len, | ||
| const EthSignature & | sig, | ||
| const std::array< std::uint8_t, 20 > & | expected_addr | ||
| ) |
| EthSignature secp256k1::coins::eth_sign_hash | ( | const std::array< std::uint8_t, 32 > & | hash, |
| const fast::Scalar & | private_key, | ||
| std::uint64_t | chain_id = 0 |
||
| ) |
| std::string secp256k1::coins::ethereum_address | ( | const fast::Point & | pubkey | ) |
| std::array< std::uint8_t, 20 > secp256k1::coins::ethereum_address_bytes | ( | const fast::Point & | pubkey | ) |
| std::string secp256k1::coins::ethereum_address_raw | ( | const fast::Point & | pubkey | ) |
|
inline |
|
inline |
Definition at line 680 of file coin_params.hpp.
References ALL_COINS, and secp256k1::coins::CoinParams::ticker.
| std::array< std::uint8_t, 32 > secp256k1::coins::keccak256 | ( | const std::uint8_t * | data, |
| std::size_t | len | ||
| ) |
|
inlineconstexpr |
Definition at line 660 of file coin_params.hpp.
Referenced by find_by_coin_type(), and find_by_ticker().
|
inlineconstexpr |
Definition at line 669 of file coin_params.hpp.
|
inlineconstexpr |
Definition at line 476 of file coin_params.hpp.
|
inlineconstexpr |
Definition at line 436 of file coin_params.hpp.
|
inlineconstexpr |
Definition at line 96 of file coin_params.hpp.
|
inlineconstexpr |
Definition at line 196 of file coin_params.hpp.
|
inlineconstexpr |
Definition at line 596 of file coin_params.hpp.
|
inlineconstexpr |
Definition at line 216 of file coin_params.hpp.
|
inlineconstexpr |
Definition at line 396 of file coin_params.hpp.
|
inlineconstexpr |
Definition at line 156 of file coin_params.hpp.
|
inlineconstexpr |
Definition at line 256 of file coin_params.hpp.
|
inlineconstexpr |
Definition at line 136 of file coin_params.hpp.
|
inlineconstexpr |
Definition at line 176 of file coin_params.hpp.
|
inlineconstexpr |
Definition at line 456 of file coin_params.hpp.
|
inlineconstexpr |
Definition at line 536 of file coin_params.hpp.
|
inlineconstexpr |
Definition at line 356 of file coin_params.hpp.
|
inlineconstexpr |
Definition at line 576 of file coin_params.hpp.
|
inlineconstexpr |
Definition at line 616 of file coin_params.hpp.
|
inlineconstexpr |
Definition at line 116 of file coin_params.hpp.
|
inlineconstexpr |
Definition at line 276 of file coin_params.hpp.
|
inlineconstexpr |
Definition at line 496 of file coin_params.hpp.
|
inlineconstexpr |
Definition at line 296 of file coin_params.hpp.
|
inlineconstexpr |
Definition at line 416 of file coin_params.hpp.
|
inlineconstexpr |
Definition at line 556 of file coin_params.hpp.
|
inlineconstexpr |
Definition at line 516 of file coin_params.hpp.
|
inlineconstexpr |
Definition at line 376 of file coin_params.hpp.
|
inlineconstexpr |
Definition at line 636 of file coin_params.hpp.
|
inlineconstexpr |
Definition at line 316 of file coin_params.hpp.
|
inlineconstexpr |
Definition at line 336 of file coin_params.hpp.
|
inlineconstexpr |
Definition at line 236 of file coin_params.hpp.