Contract 48005632b669de43afe4d2634aa870c4ba45a80f5ad321643ae361ad97e9628b

← Back to Index 📥 Download WASM

Meta

rssdkver 26.1.0#175aa41306f383057a8cdfc84b68d931664fc34e
rsver 1.96.0

Instances

  • CAHWYFLMQI6BBOL6ZLZRRINCK6KVBX73ACH7LCPB24WDED4LSMCI7YZC

Interface

fn admin(env: soroban_sdk::Env) -> soroban_sdk::Address
fn signer(env: soroban_sdk::Env) -> soroban_sdk::Address

Register an agent against its own address. Idempotency is enforced — an agent registers itself once.

fn register(
    env: soroban_sdk::Env,
    agent: soroban_sdk::Address,
) -> Result<(), soroban_sdk::Error>

Current score data for an agent. Returns an Unrated/zero record if the agent has no published score yet (so callers get a safe default).

fn get_score(env: soroban_sdk::Env, agent: soroban_sdk::Address) -> ScoreData

Rotate the trusted signer. Admin-only.

fn set_signer(env: soroban_sdk::Env, new_signer: soroban_sdk::Address)

Set the admin (can rotate the signer) and the trusted signer (publishes scores + repayment outcomes). Runs once at deploy.

fn __constructor(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    signer: soroban_sdk::Address,
)
fn is_registered(env: soroban_sdk::Env, agent: soroban_sdk::Address) -> bool

Publish a signed score for a registered agent. Only the trusted signer may call this; the tier is banded on-chain from the score.

fn publish_score(
    env: soroban_sdk::Env,
    agent: soroban_sdk::Address,
    score: u32,
    revenue: i128,
) -> Result<(), soroban_sdk::Error>
fn get_repayments(
    env: soroban_sdk::Env,
    agent: soroban_sdk::Address,
) -> RepaymentRecord

Record a repayment outcome (reported by the signer/engine after observing settlement). Feeds future re-scoring.

fn record_repayment(
    env: soroban_sdk::Env,
    agent: soroban_sdk::Address,
    on_time: bool,
) -> Result<(), soroban_sdk::Error>

Imports

WebAssembly Text (WAT) ▶