initialize: One-time setup called by deployer to link validator with registry and configure fee schedule.
admin - Address authorized to manage fees and withdraw treasuryregistry - Address of the deployed AgentRegistry contractfee_stroops - Validation fee in stroops (e.g., 50_000_000 = 5 XLM)fn initialize(
env: soroban_sdk::Env,
admin: soroban_sdk::Address,
registry: soroban_sdk::Address,
fee_stroops: i128,
)
get_pending: Retrieve pending deployment record by agent_id.
fn get_pending(
env: soroban_sdk::Env,
agent_id: soroban_sdk::Symbol,
) -> PendingDeployment
is_confirmed: Check if an agent has been successfully deployed.
fn is_confirmed(env: soroban_sdk::Env, agent_id: soroban_sdk::Symbol) -> bool
admin_address: Query the current admin address.
fn admin_address(env: soroban_sdk::Env) -> soroban_sdk::Address
get_confirmed: Retrieve confirmed deployment record with signature proof.
fn get_confirmed(
env: soroban_sdk::Env,
agent_id: soroban_sdk::Symbol,
) -> ConfirmedDeployment
confirm_deploy: Verify wallet signature and proceed with agent registration. On success, collects validation fee and calls AgentRegistry inter-contract.
deployer - Agent owner's Stellar address (must match pending record)agent_id - Unique on-chain agent identifiersignature_hash - SHA-256 of the signed confirmation message from Freighterfn confirm_deploy(
env: soroban_sdk::Env,
deployer: soroban_sdk::Address,
agent_id: soroban_sdk::Symbol,
signature_hash: soroban_sdk::BytesN<32>,
)
request_deploy: Record pending deployment intent and emit event for UI. User's wallet will prompt for signature after this call returns.
deployer - Agent owner's Stellar addressagent_id - Unique on-chain agent identifiermetadata_hash - IPFS CID or SHA-256 hash of agent configurationprice_stroops - Agent pricing per request (in stroops)fn request_deploy(
env: soroban_sdk::Env,
deployer: soroban_sdk::Address,
agent_id: soroban_sdk::Symbol,
metadata_hash: soroban_sdk::Symbol,
price_stroops: i128,
)
get_fee_history: Retrieve a deployer's fee payment history.
fn get_fee_history(env: soroban_sdk::Env, deployer: soroban_sdk::Address) -> FeeHistory
validate_wallet: Verify deployer's wallet and check for duplicate agents. This is a read-only inter-contract call to AgentRegistry.
deployer - The Stellar address wanting to deploy an agentagent_id - Proposed unique agent identifiertrue if validation passes
fn validate_wallet(
env: soroban_sdk::Env,
deployer: soroban_sdk::Address,
agent_id: soroban_sdk::Symbol,
) -> bool
registry_address: Query the linked AgentRegistry contract address.
fn registry_address(env: soroban_sdk::Env) -> soroban_sdk::Address
treasury_balance: Returns accumulated validation fees (stroops).
fn treasury_balance(env: soroban_sdk::Env) -> i128
withdraw_treasury: Admin withdraws accumulated fees. Integration with native Stellar transfers happens off-chain (API level).
fn withdraw_treasury(env: soroban_sdk::Env, amount_stroops: i128) -> i128
get_validation_fee: Query the current validation fee in stroops.
fn get_validation_fee(env: soroban_sdk::Env) -> i128
set_validation_fee: Update the validation fee (admin-only). Useful for fee adjustments without redeployment.
fn set_validation_fee(env: soroban_sdk::Env, new_fee_stroops: i128)