Initialize the registry with an admin address.
fn initialize(
env: soroban_sdk::Env,
admin: soroban_sdk::Address,
) -> Result<(), RegistryError>
Get a specific service by ID.
fn get_service(env: soroban_sdk::Env, id: u64) -> Result
Update the price of a service. Only the owner can do this.
fn update_price(
env: soroban_sdk::Env,
id: u64,
new_price: i128,
) -> Result<(), RegistryError>
List all active services.
fn list_services(env: soroban_sdk::Env) -> soroban_sdk::Vec
Register a new service. Anyone can register. Owner is the payout address.
example shows agents how to call this service (e.g. "/call/1?latitude=51.5&longitude=-0.1").
fn register_service(
env: soroban_sdk::Env,
owner: soroban_sdk::Address,
name: soroban_sdk::Symbol,
description: soroban_sdk::String,
endpoint: soroban_sdk::String,
example: soroban_sdk::String,
price_stroops: i128,
) -> Result
Deactivate a service. Owner or admin can do this.
fn deactivate_service(
env: soroban_sdk::Env,
caller: soroban_sdk::Address,
id: u64,
) -> Result<(), RegistryError>