Skip to main content

cryptography

Classes

ClassDescription
SignerTODO: Document
KeypairTODO: Document
PublicKeyA public key

Interfaces

InterfaceDescription
SignatureWithBytes-

Type Aliases

Type AliasDescription
IntentScope-
ParsedKeypair-
SignatureScheme-
SignatureFlag-
SerializeSignatureInputPair of signature and corresponding public key

Variables

VariableDescription
PRIVATE_KEY_SIZE-
LEGACY_PRIVATE_KEY_SIZE-
IOTA_PRIVATE_KEY_PREFIX-
SIGNATURE_SCHEME_TO_FLAG-
SIGNATURE_SCHEME_TO_SIZE-
SIGNATURE_FLAG_TO_SCHEME-

Functions

FunctionDescription
messageWithIntentInserts a domain separator for a message that is being signed
decodeIotaPrivateKeyThis returns an ParsedKeypair object based by validating the 33-byte Bech32 encoded string starting with iotaprivkey, and parse out the signature scheme and the private key in bytes.
encodeIotaPrivateKeyThis returns a Bech32 encoded string starting with iotaprivkey, encoding 33-byte `flag
isValidHardenedPathParse and validate a path that is compliant to SLIP-0010 in form m/44'/4218'/{account_index}'/{change_index}'/{address_index}'.
isValidBIP32PathParse and validate a path that is compliant to BIP-32 in form m/54'/4218'/{account_index}'/{change_index}/{address_index} for Secp256k1 and m/74'/4218'/{account_index}'/{change_index}/{address_index} for Secp256r1.
mnemonicToSeedUses KDF to derive 64 bytes of key data from mnemonic with empty password.
mnemonicToSeedHexDerive the seed in hex format from a 24-word mnemonic string.
toSerializedSignatureTakes in a signature, its associated signing scheme and a public key, then serializes this data
parseSerializedSignatureDecodes a serialized signature into its constituent components: the signature scheme, the actual signature, and the public key