add Ed25519
Adds an Ed25519 signer to a context rule.
Creates an external signer with Ed25519 signature verification and adds it to the specified context rule on the smart account contract. The public key must be a 32-byte Ed25519 public key.
Ed25519 signers use the traditional Stellar signing algorithm. The verifier contract validates signatures against the provided public key.
The transaction requires authorization from an existing signer on the specified context rule.
Contract call: smart_account.add_signer(context_rule_id, signer) — returns a u32 signer ID. The assigned ID is available via ParsedContextRule.signerIds after fetching the context rule.
Return
TransactionResult indicating success or failure
Parameters
The context rule ID to add the signer to (e.g., 0 for Default)
The Ed25519 verifier contract address (C-address)
The Ed25519 public key (32 bytes)
Optional list of signers for multi-signer authorization. When empty (default), uses single-signer auth with the connected passkey. When non-empty, coordinates signatures from all listed signers.
Optional submission method override. When null (default), uses the configured submission method (relayer if available, RPC otherwise).
Throws
if validation fails or transaction fails
Example:
val result = signerManager.addEd25519(
contextRuleId = 0u,
verifierAddress = "CDEF5678...",
publicKey = ed25519PublicKey
)
if (result.success) {
println("Ed25519 signer added successfully")
}