Class: StrKey

StrKey()

StrKey is a helper class that allows encoding and decoding strkey.

Constructor

new StrKey()

Source:

Methods

(static) decodeContractKey(data) → {Buffer}

Decodes strkey contract key to raw data.
Parameters:
Name Type Description
data string data to decode
Source:
Returns:
Type
Buffer

(static) decodeEd25519PublicKey(data) → {Buffer}

Decodes strkey ed25519 public key to raw data.
Parameters:
Name Type Description
data string data to decode
Source:
Returns:
Type
Buffer

(static) decodeEd25519SecretSeed(data) → {Buffer}

Decodes strkey ed25519 seed to raw data.
Parameters:
Name Type Description
data string data to decode
Source:
Returns:
Type
Buffer

(static) decodePreAuthTx(data) → {Buffer}

Decodes strkey PreAuthTx to raw data.
Parameters:
Name Type Description
data string data to decode
Source:
Returns:
Type
Buffer

(static) decodeSha256Hash(data) → {Buffer}

Decodes strkey sha256 hash to raw data.
Parameters:
Name Type Description
data string data to decode
Source:
Returns:
Type
Buffer

(static) encodeContractKey(data) → {string}

Encodes data to strkey contract key.
Parameters:
Name Type Description
data Buffer data to encode
Source:
Returns:
Type
string

(static) encodeEd25519PublicKey(data) → {string}

Encodes data to strkey ed25519 public key.
Parameters:
Name Type Description
data Buffer data to encode
Source:
Returns:
Type
string

(static) encodeEd25519SecretSeed(data) → {string}

Encodes data to strkey ed25519 seed.
Parameters:
Name Type Description
data Buffer data to encode
Source:
Returns:
Type
string

(static) encodePreAuthTx(data) → {string}

Encodes data to strkey preAuthTx.
Parameters:
Name Type Description
data Buffer data to encode
Source:
Returns:
Type
string

(static) encodeSha256Hash(data) → {string}

Encodes data to strkey sha256 hash.
Parameters:
Name Type Description
data Buffer data to encode
Source:
Returns:
Type
string

(static) isValidContractKey(contractKey) → {boolean}

Returns true if the given Stellar contract key is a valid contract key.
Parameters:
Name Type Description
contractKey string contract key to check
Source:
Returns:
Type
boolean

(static) isValidEd25519PublicKey(publicKey) → {boolean}

Returns true if the given Stellar public key is a valid ed25519 public key.
Parameters:
Name Type Description
publicKey string public key to check
Source:
Returns:
Type
boolean

(static) isValidEd25519SecretSeed(seed) → {boolean}

Returns true if the given Stellar secret key is a valid ed25519 secret seed.
Parameters:
Name Type Description
seed string seed to check
Source:
Returns:
Type
boolean