OZDelegatedSigner
public struct OZDelegatedSigner : OZSmartAccountSigner, Equatable, Hashable
A signer authorized through a Soroban address using the host’s require_auth mechanism.
Delegated signers are Stellar accounts (G… strkey) or smart contracts (C… strkey) that
use the native Soroban authorization mechanism. The wallet contract calls
require_auth_for_args() on the address to verify authorization, so no custom
signature-verification logic is required.
Example:
let accountSigner = try OZDelegatedSigner(address: "GA7QYNF7SOWQ...")
let contractSigner = try OZDelegatedSigner(address: "CBCD1234...")
-
The Stellar address of the signer (
G…for accounts,C…for contracts).Declaration
Swift
public let address: String -
Initializes a new
OZDelegatedSigner.Throws
SmartAccountValidationException.InvalidAddresswhenaddressis neither a valid Ed25519 public key strkey nor a valid contract id strkey.Declaration
Swift
public init(address: String) throwsParameters
addressThe Stellar address of the signer; must be a valid
G…strkey orC…strkey. -
Converts the delegated signer to its on-chain representation.
Returns an
SCValXDR.vec([Symbol("Delegated"), Address(address)]).Throws
SmartAccountValidationException.InvalidInputif the address cannot be encoded into anSCAddressXDR.Declaration
Swift
public func toScVal() throws -> SCValXDRReturn Value
The
SCValXDRrepresentation of this signer. -
Declaration
Swift
public var uniqueKey: String { get }
View on GitHub
Install in Dash