PrivateKey

interface PrivateKey

This interface defines the PrivateKey interface, which represents a private key in the SUI blockchain. The private key is used to sign transactions and messages.

The [PrivateKey] interface also implements SIP-15 for its private key import and export methods. This is to visually distinguish a 32-byte private key representation from a 32-bytes Sui address that is currently also Hex encoded

Inheritors

Types

Link copied to clipboard
object Companion

Properties

Link copied to clipboard
abstract val data: ByteArray
Link copied to clipboard
abstract val publicKey: PublicKey

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
abstract fun sign(data: ByteArray): ByteArray