Ed25519PrivateKey

This class represents an Ed25519 private key.

Creating a private key instance by either generating or importing will not generate a passphrase. If you want to generate a passphrase, you can use the Account.create method.

Constructors

Link copied to clipboard
constructor(scheme: SignatureScheme = SignatureScheme.ED25519)

Creates a new Ed25519PrivateKey with a randomly generated private key.

constructor(privateKey: String)

Creates a new Ed25519PrivateKey from an encoded private key.

constructor(privateKey: ByteArray)

Properties

Link copied to clipboard
open override val data: ByteArray
Link copied to clipboard
open override val publicKey: Ed25519PublicKey

Functions

Link copied to clipboard
open fun export(humanReadablePart: String = SUI_PRIVATE_KEY_PREFIX): String

Encodes the private key using Bech32 with the specified human-readable part.

Link copied to clipboard
open override fun sign(data: ByteArray): ByteArray