PrivMX DOCS
API Reference/Endpoint/Crypto

ExtKey

'ExtKey' is a class representing Extended keys and operations on it.

Static Methods

fromSeed

Creates ExtKey from given seed.

Params

seed

const core::Buffer &

the seed used to generate Key

static ExtKey fromSeed(
const core::Buffer &seed
)

Returns

ExtKey · ExtKey object

fromBase58

Decodes ExtKey from Base58 format.

Params

base58

const std::string &

the ExtKey in Base58

static ExtKey fromBase58(
const std::string &base58
)

Returns

ExtKey · ExtKey object

generateRandom

Generates a new ExtKey.

static ExtKey generateRandom()

Returns

ExtKey · ExtKey object

Methods

derive

Generates child ExtKey from a current ExtKey using BIP32.

Params

index

uint32_t

number from 0 to 2^31-1

ExtKey derive(
uint32_t index
) const

Returns

ExtKey · ExtKey object

deriveHardened

Generates hardened child ExtKey from a current ExtKey using BIP32.

Params

index

uint32_t

number from 0 to 2^31-1

ExtKey deriveHardened(
uint32_t index
) const

Returns

ExtKey · ExtKey object

getPrivatePartAsBase58

Converts ExtKey to Base58 string.

std::string getPrivatePartAsBase58() const

Returns

std::string · ExtKey in Base58 format

getPublicPartAsBase58

Converts the public part of ExtKey to Base58 string.

std::string getPublicPartAsBase58() const

Returns

std::string · ExtKey in Base58 format

getPrivateKey

Extracts ECC PrivateKey.

std::string getPrivateKey() const

Returns

std::string · ECC key in WIF format

getPublicKey

Extracts ECC PublicKey.

std::string getPublicKey() const

Returns

std::string · ECC key in BASE58DER format

getPrivateEncKey

Extracts raw ECC PrivateKey.

core::Buffer getPrivateEncKey() const

Returns

core::Buffer · ECC PrivateKey

getPublicKeyAsBase58Address

Extracts ECC PublicKey Address.

std::string getPublicKeyAsBase58Address() const

Returns

std::string · ECC Address in BASE58 format

getChainCode

core::Buffer getChainCode() const

Returns

core::Buffer · Raw chain code

verifyCompactSignatureWithHash

Params

message

const core::Buffer &

data used on validation

signature

const core::Buffer &

signature of data to verify

bool verifyCompactSignatureWithHash(
const core::Buffer &message
const core::Buffer &signature
) const

Returns

bool · message validation result

isPrivate

Checks if ExtKey is Private.

bool isPrivate() const

Returns

bool · returns true if ExtKey is private

We use cookies on our website. We use them to ensure the proper functioning of the site and, if you agree, for purposes we set, such as analytics or marketing.