Signer Key
Represents a Stellar signer key used for transaction authorization.
This sealed class supports four types of signers as defined in the Stellar protocol:
ED25519 - Standard Ed25519 public key signer
PRE_AUTH_TX - Pre-authorized transaction hash signer
HASH_X - SHA-256 hash preimage signer (Hash-X)
ED25519_SIGNED_PAYLOAD - Ed25519 signed payload signer (CAP-40)
The Ed25519 Signed Payload Signer (introduced in CAP-40) is particularly useful for multi-party contracts like payment channels, as it allows all parties to share a set of transactions for signing and guarantees that if one transaction is signed and submitted, information is revealed that allows all other transactions in the set to be authorized.
Example usage:
// Create an Ed25519 signer
val ed25519Signer = SignerKey.ed25519PublicKey(publicKeyBytes)
// Create a signed payload signer
val payload = "transaction_hash".encodeToByteArray()
val payloadSigner = SignerKey.ed25519SignedPayload(publicKeyBytes, payload)See also
Inheritors
Types
Ed25519 public key signer.
Ed25519 signed payload signer (CAP-40).