OZExternalEd25519SignerAdapter

Adapter for out-of-process Ed25519 signing sources.

Implement this interface to plug in a hardware wallet, remote signing service, or any other signing backend into the multi-signer pipeline. The manager consults the adapter before falling back to its in-memory keypair registry (adapter-first precedence rule).

Example:

class MyHardwareAdapter : OZExternalEd25519SignerAdapter {
override fun canSignFor(verifierAddress: String, publicKey: ByteArray): Boolean =
hardwareWallet.hasSigner(publicKey)

override suspend fun signAuthDigest(authDigest: ByteArray, publicKey: ByteArray): ByteArray =
hardwareWallet.sign(authDigest, publicKey)
}

val manager = OZExternalSignerManager(
networkPassphrase = "...",
ed25519Adapter = MyHardwareAdapter()
)

Functions

Link copied to clipboard
abstract fun canSignFor(verifierAddress: String, publicKey: ByteArray): Boolean

Returns whether this adapter can produce an Ed25519 signature for the given verifier-contract address and public-key pair.

Link copied to clipboard
abstract suspend fun signAuthDigest(authDigest: ByteArray, publicKey: ByteArray): ByteArray

Produces a 64-byte Ed25519 signature over authDigest.