Contract 0da4a5536f38dfde55b9f33fb5e07382a74df5724204966bef420fa4b97bcc71

← Back to Index 📥 Download WASM

Meta

cliver 26.0.0#60f7458e7ecffddf2f2d91dc6d0d2db4fab03ecc
rssdkver 23.5.3#d3e1ab2424388b10893b796b0c8e405c5edd03d2
rsver 1.95.0

Instances

  • CAMK3PPMXRI6IUCCUWKA7KFNGJYST4CIYI6CJBSGKEYLPRS3ES2QSE6H

Interface

Return the contract owner.

fn owner(env: soroban_sdk::Env) -> soroban_sdk::Address

Initialize the registry with an owner address.

Arguments

  • owner - Address with administrative privileges. Can register and deregister attesters, and propose a new owner via the two-step transfer_ownership / accept_ownership flow.
fn __constructor(env: soroban_sdk::Env, owner: soroban_sdk::Address)

Get the policy ID for a client address.

fn get_policy_id(
    env: soroban_sdk::Env,
    client: soroban_sdk::Address,
) -> soroban_sdk::String

Return the pending owner, if any.

fn pending_owner(env: soroban_sdk::Env) -> Option

Set the policy ID for the calling address.

fn set_policy_id(
    env: soroban_sdk::Env,
    caller: soroban_sdk::Address,
    policy_id: soroban_sdk::String,
)

Compute SHA-256 hash of a statement for attester signing. This is the "hashStatementWithExpiry" equivalent — attesters sign this hash.

fn hash_statement(
    env: soroban_sdk::Env,
    statement: Statement,
    network: soroban_sdk::String,
) -> soroban_sdk::BytesN<32>

Accept a pending ownership transfer. Only the pending owner may call this.

fn accept_ownership(
    env: soroban_sdk::Env,
    new_owner: soroban_sdk::Address,
) -> Result<(), RegistryError>

Register a new attester. Only the contract owner may call this.

fn register_attester(
    env: soroban_sdk::Env,
    owner: soroban_sdk::Address,
    attester: soroban_sdk::BytesN<32>,
) -> Result<(), RegistryError>

Propose a new owner. Only the current owner may call this. The new owner must call accept_ownership to finalize the transfer. This two-step pattern mirrors EVM's Ownable2StepUpgradeable, preventing accidental transfers to wrong addresses.

fn transfer_ownership(
    env: soroban_sdk::Env,
    current_owner: soroban_sdk::Address,
    new_owner: soroban_sdk::Address,
) -> Result<(), RegistryError>

Deregister an attester using swap-and-pop. Only the contract owner may call this.

fn deregister_attester(
    env: soroban_sdk::Env,
    owner: soroban_sdk::Address,
    attester: soroban_sdk::BytesN<32>,
) -> Result<(), RegistryError>

Validate an attestation against a statement.

The caller parameter implements the hashStatementSafe pattern: it replaces statement.target with the actual caller address before verifying the signature, preventing cross-contract replay attacks. In Soroban, the calling contract should pass e.current_contract_address().

fn validate_attestation(
    env: soroban_sdk::Env,
    statement: Statement,
    attestation: Attestation,
    network: soroban_sdk::String,
    caller: soroban_sdk::Address,
) -> Result

Check whether an attester is currently registered.

fn is_attester_registered(
    env: soroban_sdk::Env,
    attester: soroban_sdk::BytesN<32>,
) -> bool

Return all registered attesters.

fn get_registered_attesters(
    env: soroban_sdk::Env,
) -> soroban_sdk::Vec>

Imports

WebAssembly Text (WAT) ▶