Package-level declarations

Types

Link copied to clipboard
abstract class AccountPublicKey : PublicKey

An abstract representation of an account public key.

Link copied to clipboard
class AnyPublicKey(val publicKey: PublicKey) : AccountPublicKey

Represents any public key supported by Aptos.

Link copied to clipboard
class AnySignature(val signature: Signature) : Signature

Instance of signature that uses the SingleKey authentication scheme. This signature can only be generated by a SingleKeySigner, since it uses the same authentication scheme.

Link copied to clipboard

Represents the private key of an Ed25519 key pair.

Link copied to clipboard
@Serializable
class Ed25519PublicKey(data: ByteArray) : AccountPublicKey

Represents the public key of an Ed25519 key pair.

Link copied to clipboard
@Serializable
class Ed25519Signature(hexInput: ByteArray) : Signature

A signature of a message signed using an Ed25519 private key

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
interface PrivateKey

An interface of a private key. It is associated to a signature scheme and provides signing capabilities.

Link copied to clipboard
abstract class PublicKey

An abstract representation of a public key.

Link copied to clipboard

A Secp256k1 ecdsa private key

Link copied to clipboard

Represents the Secp256k1 ecdsa public key

Link copied to clipboard
Link copied to clipboard
abstract class Signature

An abstract representation of a crypto signature, associated to a specific signature scheme e.g. Ed25519 or Secp256k1

Link copied to clipboard
data class VerifySignatureArgs(val message: HexInput, val signature: Signature)

Functions

Link copied to clipboard

Adjusts the byte array to ensure it's exactly 32 bytes, adding leading zeros if necessary.

Link copied to clipboard
expect fun fromSeed(seed: ByteArray): KeyPair
actual fun fromSeed(seed: ByteArray): KeyPair
actual fun fromSeed(seed: ByteArray): KeyPair
actual fun fromSeed(seed: ByteArray): KeyPair
Link copied to clipboard
actual fun generateKeypair(scheme: SigningSchemeInput): KeyPair
Link copied to clipboard
Link copied to clipboard
Link copied to clipboard
actual fun generateSigningMessage(transaction: AnyRawTransaction): ByteArray
actual fun generateSigningMessage(transaction: AnyRawTransaction): ByteArray
Link copied to clipboard
expect fun secp256k1Sign(message: ByteArray, privateKey: ByteArray): ByteArray
actual fun secp256k1Sign(message: ByteArray, privateKey: ByteArray): ByteArray
actual fun secp256k1Sign(message: ByteArray, privateKey: ByteArray): ByteArray
actual fun secp256k1Sign(message: ByteArray, privateKey: ByteArray): ByteArray
Link copied to clipboard
expect fun sha3Hash(input: ByteArray): ByteArray
actual fun sha3Hash(input: ByteArray): ByteArray
actual fun sha3Hash(input: ByteArray): ByteArray
actual fun sha3Hash(input: ByteArray): ByteArray
Link copied to clipboard
expect fun sign(message: ByteArray, privateKey: ByteArray): ByteArray
actual fun sign(message: ByteArray, privateKey: ByteArray): ByteArray
actual fun sign(message: ByteArray, privateKey: ByteArray): ByteArray
actual fun sign(message: ByteArray, privateKey: ByteArray): ByteArray