Contract 9564ef09169e5d803ba201deb2f2f9d797b769c36a35e7738f8e3018dd39bd4e

← Back to Index 📥 Download WASM

Meta

rssdkver 25.3.1#e50d95af029c83196dd122f0154bac3f1302394b
rsver 1.91.0

Instances

  • CBGQ5YLSIK3LLU7FV4ICFFGUK746LMSDQDSBAIILOCZF7MECH54XTFBX
  • CCEDC6ZV42FVMR2TGBCBQJMHLUNPNP4WTGOWCQCDBH6WZP6KCGKVQTI6

Interface

Add governance voter.

Notes:

  • Admin only.
fn add_voter(
    env: soroban_sdk::Env,
    voter: soroban_sdk::Address,
) -> Result<(), UpgradeError>

Cast vote on active proposal.

Notes:

  • Voter must authorize.
  • Records approval for supplied hash.
fn cast_vote(
    env: soroban_sdk::Env,
    voter: soroban_sdk::Address,
    wasm_hash: soroban_sdk::BytesN<32>,
) -> Result<(), UpgradeError>

Update admin.

Notes:

  • Admin only.
  • Changes control over privileged registry actions.
fn set_admin(env: soroban_sdk::Env, new_admin: soroban_sdk::Address)

Add registry manager.

Authorization:

  • Admin only.

Security model:

  • Registry managers are recovery operators.
  • They may unlink stale or compromised identity bindings.
  • They cannot create, overwrite, or rebind identity mappings.
fn add_manager(
    env: soroban_sdk::Env,
    manager: soroban_sdk::Address,
) -> Result<(), RegistryError>

Remove governance voter.

Notes:

  • Admin only.
fn remove_voter(
    env: soroban_sdk::Env,
    voter: soroban_sdk::Address,
) -> Result<(), UpgradeError>

Initialize registry.

Notes:

  • Sets initial admin.
  • Intended to run once.
fn __constructor(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
) -> Result<(), UpgradeError>

Add validator.

Notes:

  • Admin only.
  • Expands trusted signer set.
fn add_validator(env: soroban_sdk::Env, validator: soroban_sdk::BytesN<32>)

Execute approved upgrade.

Notes:

  • Admin only.
  • Applies current passed proposal.
fn apply_upgrade(
    env: soroban_sdk::Env,
) -> Result, UpgradeError>

Get validators.

fn get_validators(env: soroban_sdk::Env) -> soroban_sdk::Vec>

Remove registry manager.

Authorization:

  • Admin only.

Security model:

  • Revokes the manager's ability to perform future recovery unlink actions.
  • Existing identity bindings are not changed.
fn remove_manager(
    env: soroban_sdk::Env,
    manager: soroban_sdk::Address,
) -> Result<(), RegistryError>

Cancel active proposal.

Notes:

  • Admin only.
fn cancel_proposal(env: soroban_sdk::Env) -> Result<(), UpgradeError>

Create upgrade proposal.

Notes:

  • Admin only.
  • Starts governance flow for new wasm hash.
fn propose_upgrade(
    env: soroban_sdk::Env,
    proposal_type: soroban_sdk::String,
    new_wasm_hash: soroban_sdk::BytesN<32>,
) -> Result<(), UpgradeError>

Remove validator.

Notes:

  • Admin only.
  • Revokes validator trust for future checks.
fn remove_validator(env: soroban_sdk::Env, validator: soroban_sdk::BytesN<32>)

Verify identity and bind wallet.

Notes:

  • Requires wallet authorization.
  • Validates platform, user id, and validator signatures.
  • Writes (platform, user_id) -> wallet mapping on success.
fn set_id_wallet_map(
    env: soroban_sdk::Env,
    wallet: soroban_sdk::Address,
    user_id: soroban_sdk::String,
    platform_str: soroban_sdk::String,
    signatures: soroban_sdk::Vec,
) -> Result<(), RegistryError>

Get wallet by (platform, user_id).

Notes:

  • Returns None if not found.
fn get_wallet_by_userid(
    env: soroban_sdk::Env,
    platform: soroban_sdk::String,
    user_id: soroban_sdk::String,
) -> Result, RegistryError>

Unlink identity binding by the currently bound wallet.

Authorization:

  • The wallet currently bound to (platform, user_id) must authorize.

Security model:

  • Allows a wallet owner to voluntarily remove their social identity binding.
  • After unlinking, rebinding must go through the normal validator-based link flow.
fn remove_id_wallet_map(
    env: soroban_sdk::Env,
    user_id: soroban_sdk::String,
    platform_str: soroban_sdk::String,
) -> Result<(), RegistryError>

Recovery unlink by registry manager.

Authorization:

  • Caller must be an approved registry manager.

Security model:

  • Used when the currently bound wallet is compromised, lost, or abandoned.
  • Manager can only remove the stale identity mapping.
  • Manager cannot rebind the identity to a new wallet.
  • After unlinking, the user must complete the normal identity verification flow again.
fn manager_remove_id_wallet_map(
    env: soroban_sdk::Env,
    user_id: soroban_sdk::String,
    platform_str: soroban_sdk::String,
    manager: soroban_sdk::Address,
) -> Result<(), RegistryError>

Imports

WebAssembly Text (WAT) ▶