Pricing a function
Add apaymentManifest to any function on a resource you register:
The manifest is published with the resource, so callers see the price during discovery.
How a paid call works
- When a request calls a priced remote function, the caller node creates a payment voucher: the amount, recipient, request and invocation IDs, the resource path, name, and parameters, and an expiry. It signs the voucher with its Ed25519 signing key. Callers refuse to pay more than 10,000 lamports per call.
- The provider node verifies the voucher’s signature, then runs the function and returns the result.
- After a successful call, the provider submits the voucher to the operator.
- The operator verifies the voucher and withdraws the amount from the caller’s escrow. Each withdrawal pays 80% to the provider’s
recipientAddressand 20% to the protocol fee wallet.
Escrow accounts
Each caller has an escrow account: a program-derived address owned by the Stellarium escrow program, derived from the operator’s authority and the caller’s user address. The caller’s user address is the Solana address of their node’s Ed25519 public key. The operator creates the escrow and pays its rent and transaction fees. The caller then funds it with an ordinary SOL transfer; only the balance above the rent reserve is spendable.The operator
The operator is a service that creates escrows and submits withdrawals. Its signer is the escrow program’s compiled authority. It exposes:
To try the full flow locally, see Run a local network.