Contract 7d42926593501707afe35150efec336d2a6eb4d879b6c6c10b097cc20b9936a9

← Back to Index 📥 Download WASM

Meta

rssdkver 22.0.11#34f7f53ae31e0fd02aab436a9872e79fa671ca02
rsver 1.96.1

Instances

  • CASXD7SDHTZSMLNBMMN2PPB4EN7IWW3IQJMGPWPBXOLYHZVGGSTNQ6C2

Interface

Admin address.

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

Initialize the registry. Can only be called once.

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

Total certificates issued.

fn get_cert_count(env: soroban_sdk::Env) -> u64

Returns the full certificate record, or panics if not found.

fn get_certificate(env: soroban_sdk::Env, wallet: soroban_sdk::Address) -> Certificate

Issue a certificate for a wallet. Only admin can call. Returns the new certificate ID.

fn issue_certificate(
    env: soroban_sdk::Env,
    wallet: soroban_sdk::Address,
    course_id: u32,
) -> u64

Revoke a certificate. Only admin can call.

fn revoke_certificate(env: soroban_sdk::Env, wallet: soroban_sdk::Address)

Returns true if wallet has a valid certificate for the given course.

fn verify_certificate(
    env: soroban_sdk::Env,
    wallet: soroban_sdk::Address,
    course_id: u32,
) -> bool

Imports

WebAssembly Text (WAT) ▶