Contract 8cace1ed722c7f29b0356ae4d7f386a0c6f3687bbd2dc6f7d70fecb025d07a16

← Back to Index 📥 Download WASM

Meta

cliver 26.1.0#1228cff8022b804659750b94b315932b0e0f3f6a
rssdkver 26.1.0#175aa41306f383057a8cdfc84b68d931664fc34e
rsver 1.96.0

Instances

  • CDK5KW5SY2IHOBARDDFIQFTYWMECZA3RDC6NYDB3ZCWH72CKWHJJP4JN

Interface

Credentials are soulbound — they can never move between wallets. Always rejects, on purpose: this is what makes a credential prove this specific player earned it, instead of just being a tradeable badge someone else could buy.

fn transfer(
    env: soroban_sdk::Env,
    from: soroban_sdk::Address,
    to: soroban_sdk::Address,
    id: soroban_sdk::BytesN<32>,
) -> Result

Register the deployer as admin (call once after deploy).

fn init_admin(env: soroban_sdk::Env, admin: soroban_sdk::Address)

Return all credentials earned by a player, most recent last.

fn get_credentials(
    env: soroban_sdk::Env,
    player: soroban_sdk::Address,
) -> soroban_sdk::Vec

Issue a soulbound credential to a player for completing subject at cefr_level with score (0-100). Admin-only: in this MVP the admin acts as the trusted issuer on behalf of WordScrambleContract, since the two contracts aren't wired together yet. Panics if score is below the pass threshold, so a credential can never be issued for a failing or borderline result.

fn issue_credential(
    env: soroban_sdk::Env,
    admin: soroban_sdk::Address,
    player: soroban_sdk::Address,
    subject: soroban_sdk::Symbol,
    cefr_level: soroban_sdk::Symbol,
    score: u32,
) -> soroban_sdk::BytesN<32>

Publicly verify a single credential by ID. Anyone can call this via the public RPC without needing to trust the issuing platform.

fn verify_credential(
    env: soroban_sdk::Env,
    credential_id: soroban_sdk::BytesN<32>,
) -> Result

Imports

WebAssembly Text (WAT) ▶