OZSmartAccountSigner
public protocol OZSmartAccountSigner : Sendable
Represents a signer that can authorize OpenZeppelin Smart Account transactions.
Smart account signers describe who can authorize transactions on the wallet contract. Two concrete signer types exist:
OZDelegatedSigner: A Soroban address (G…for accounts orC…for contracts) using the host’s built-inrequire_authverification.OZExternalSigner: A verifier-contract address combined with public-key bytes that describe a custom signature scheme (e.g. WebAuthn / secp256r1, Ed25519).
Example:
let delegated = try OZDelegatedSigner(address: "<G-address>")
let webAuthn = try OZExternalSigner.webAuthn(
verifierAddress: "CBCD...",
publicKey: publicKeyBytes,
credentialId: credentialIdBytes
)
let scVal = try delegated.toScVal()
-
Converts this signer to its on-chain
SCValXDRrepresentation for contract calls.Throws
SmartAccountValidationException.InvalidInputif conversion fails (for example, when address strkey decoding fails).Declaration
Swift
func toScVal() throws -> SCValXDRReturn Value
An
SCValXDRdescribing the signer in the format the wallet contract expects. -
Stable string identifying this signer for deduplication and lookup (
"delegated:<address>"or"external:<verifierAddress>:<keyDataHex>").Declaration
Swift
var uniqueKey: String { get }
View on GitHub
Install in Dash