Package-level declarations

Types

Link copied to clipboard
class ED25519KeyDerive(val key: ByteArray, val chaincode: ByteArray)
Link copied to clipboard

This class represents an Ed25519 private key.

Link copied to clipboard
Link copied to clipboard
enum Hash : Enum<Hash>
Link copied to clipboard
data class KeyPair(val privateKey: ByteArray, val publicKey: ByteArray)

Represents a pair of signing keys: a public key and a private key.

Link copied to clipboard
actual class PasskeyProvider
actual class PasskeyProvider
expect class PasskeyProvider
actual class PasskeyProvider
actual class PasskeyProvider
Link copied to clipboard
data class PasskeyPublicKey(val data: ByteArray) : PublicKey
Link copied to clipboard
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.

Link copied to clipboard
interface PublicKey
Link copied to clipboard

This class represents an Secp256k1 private key.

Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard

Functions

Link copied to clipboard
actual fun derivePrivateKeyFromMnemonic(mnemonic: List<String>, scheme: <Error class: unknown class>, path: String): ByteArray
expect fun derivePrivateKeyFromMnemonic(mnemonic: List<String>, scheme: SignatureScheme = SignatureScheme.ED25519, path: String = "m/44'/784'/0/0/0"): ByteArray
Link copied to clipboard
actual fun derivePublicKey(privateKey: PrivateKey, schema: SignatureScheme): PublicKey
actual fun derivePublicKey(privateKey: <Error class: unknown class>, schema: <Error class: unknown class>): <Error class: unknown class>
expect fun derivePublicKey(privateKey: PrivateKey, schema: SignatureScheme): PublicKey
actual fun derivePublicKey(privateKey: PrivateKey, schema: SignatureScheme): PublicKey
Link copied to clipboard

Finds the unique public key that exists in both arrays, throws error if the common pubkey does not equal to one.

Link copied to clipboard
Link copied to clipboard
actual fun generateMnemonic(): String
actual fun generateMnemonic(): String
expect fun generateMnemonic(): String
actual fun generateMnemonic(): String
Link copied to clipboard
actual fun generateSeed(mnemonic: List<String>): ByteArray
actual fun generateSeed(mnemonic: List<String>): ByteArray
expect fun generateSeed(mnemonic: List<String>): ByteArray
actual fun generateSeed(mnemonic: List<String>): ByteArray
Link copied to clipboard
actual fun hash(hash: Hash, data: ByteArray): ByteArray
actual fun hash(hash: <Error class: unknown class>, data: ByteArray): ByteArray
expect fun hash(hash: Hash, data: ByteArray): ByteArray
actual fun hash(hash: Hash, data: ByteArray): ByteArray
Link copied to clipboard
actual fun importFromMnemonic(mnemonic: String): KeyPair
actual fun importFromMnemonic(mnemonic: List<String>): KeyPair
actual fun importFromMnemonic(mnemonic: String): KeyPair
actual fun importFromMnemonic(mnemonic: List<String>): KeyPair
expect fun importFromMnemonic(mnemonic: String): KeyPair
expect fun importFromMnemonic(mnemonic: List<String>): KeyPair
actual fun importFromMnemonic(mnemonic: String): KeyPair
actual fun importFromMnemonic(mnemonic: List<String>): KeyPair
Link copied to clipboard

Parses a DER-encoded signature, normalizes its 'S' value to prevent malleability, and returns it in a compact 64-byte (r || s) format.

Link copied to clipboard
actual fun sign(message: ByteArray, privateKey: PrivateKey): Result<ByteArray, E>
actual fun sign(message: ByteArray, privateKey: <Error class: unknown class>): ByteArray
expect fun sign(message: ByteArray, privateKey: PrivateKey): Result<ByteArray, E>
actual fun sign(message: ByteArray, privateKey: PrivateKey): Result<ByteArray, E>
Link copied to clipboard
actual fun verifySignature(publicKey: PublicKey, message: ByteArray, signature: ByteArray): Result<Boolean, E>
actual fun verifySignature(publicKey: <Error class: unknown class>, message: ByteArray, signature: ByteArray): Boolean
expect fun verifySignature(publicKey: PublicKey, message: ByteArray, signature: ByteArray): Result<Boolean, E>
actual fun verifySignature(publicKey: PublicKey, message: ByteArray, signature: ByteArray): Result<Boolean, E>