Classes

Entropy

Extends

Constructors

new Entropy()

new Entropy(`arg`): [Entropy](Entropy)

Creates a new Entropy from a byte array.

ParameterType
FirstUint8Array
Returns
Entropy

Overrides

Secret.constructor

Properties

ENCRYPTION_CHECKSUM_SIZE

`static` ENCRYPTION\_CHECKSUM\_SIZE: `number`

Inherited from

Secret.ENCRYPTION_CHECKSUM_SIZE


ENCRYPTION_CHECKSUM_SIZE_V3

`static` ENCRYPTION\_CHECKSUM\_SIZE\_V3: `number`

Inherited from

Secret.ENCRYPTION_CHECKSUM_SIZE_V3


ENCRYPTION_KDF_ROUNDS

`static` ENCRYPTION\_KDF\_ROUNDS: `number`

Inherited from

Secret.ENCRYPTION_KDF_ROUNDS


ENCRYPTION_SALT_SIZE

`static` ENCRYPTION\_SALT\_SIZE: `number`

Inherited from

Secret.ENCRYPTION_SALT_SIZE


PURPOSE_ID

`static` PURPOSE\_ID: `number`

SIZE

`static` SIZE: `number`

Overrides

Secret.SIZE

Accessors

encryptedSize

Get Signature

get encryptedSize(): `number`

Returns the serialized size of this object when encrypted.

Inherited from

Secret.encryptedSize


serializedSize

Get Signature

get serializedSize(): `number`

Returns the serialized size of this Entropy.

Methods

compare()

compare(`param14`): `number`

Compares this object to another object.

Returns a negative number if this is smaller than o, a positive number if this is larger than o, and zero if equal.

ParameterType
FirstSerializable

Inherited from

Secret.compare


equals()

equals(`param13`): `boolean`

Checks for equality with another Entropy.

ParameterType
Firstunknown

Overrides

Secret.equals


exportEncrypted()

exportEncrypted(`key`): `Promise`\<[SerialBuffer](SerialBuffer)\>

Encrypts the Secret with a password.

ParameterType
FirstUint8Array
<SerialBuffer>

Inherited from

Secret.exportEncrypted


overwrite()

overwrite(`entropy`): `void`

Overwrites this Entropy's bytes with a replacement in-memory

ParameterType
FirstEntropy

serialize()

serialize(`buf`?): [SerialBuffer](SerialBuffer)

Serializes the Entropy to a byte array.

ParameterType
FirstSerialBuffer

Overrides

Secret.serialize


toBase64()

toBase64(): `string`

Formats the object into a base64 string.

Inherited from

Secret.toBase64


toExtendedPrivateKey()

toExtendedPrivateKey(`password`?, `wordlist`?): [ExtendedPrivateKey](ExtendedPrivateKey)

Derives an ExtendedPrivateKey from the Entropy.

ParameterType
Firststring[]

toHex()

toHex(): `string`

Formats the object into a hex string.

Inherited from

Secret.toHex


toMnemonic()

toMnemonic(`wordlist`?): `string`[]

Converts the Entropy into a mnemonic.

ParameterType
Firststring[]
[]

toString()

toString(): `string`

Formats the object into a hex string.

Inherited from

Secret.toString


deserialize()

`static` deserialize(`buf`): [Entropy](Entropy)

Deserializes an Entropy object from a byte array.

ParameterType
FirstSerialBuffer
Returns
Entropy

exportEncrypted()

`static` exportEncrypted(`secret`, `key`): `Promise`\<[SerialBuffer](SerialBuffer)\>
ParameterType
FirstUint8Array
<SerialBuffer>

Inherited from

Secret.exportEncrypted


fromEncrypted()

`static` fromEncrypted(`buf`, `key`): `Promise`\<[Entropy](Entropy) \| `PrivateKey`\>

Decrypts a Secret from an encrypted byte array and its password.

ParameterType
FirstUint8Array
<Entropy | PrivateKey>

Inherited from

Secret.fromEncrypted


fromHex()

`static` fromHex(`hex`): [Entropy](Entropy)

Deserializes an Entropy object from a hex string.

ParameterType
Firststring
Returns
Entropy

generate()

`static` generate(): [Entropy](Entropy)

Generates a new Entropy object from secure randomness.

Returns
Entropy