VowenaClient is the primary interface for interacting with the Vowena smart contract. Write methods return an assembled XDR string for wallet signing. Read methods query on-chain state directly through Soroban simulation.
testnet → mainnet on NETWORKS when Vowena deploys to Stellar mainnet.
- Write Methods
- Read Methods
- Submit
Write methods build and simulate a Soroban transaction, returning an assembled XDR string. You sign the XDR with your wallet and then call
The allowance options match
submitTransaction() to broadcast it.buildCreateProject
Creates a Project on chain. Every plan must belong to a project, so this is the first call a merchant makes.Returns:
Promise<string> — assembled XDR.buildCreatePlan
Creates a new subscription plan inside an existing project.Returns:
Promise<string> — assembled XDR.buildSubscribe
Subscribes a user to a plan and sets the SEP-41 token allowance in a single transaction.Returns:
Promise<string> — assembled XDR.buildCharge
Charges a subscription for the current billing period. Permissionless — anyone can call.buildCancel
Cancels a subscription. Either the subscriber or the merchant can call.buildRefund
Issues a refund from the merchant to the subscriber.buildUpdatePlanAmount
Updates the billing amount for an existing plan. The new amount must stay within the plan’s price ceiling.buildRequestMigration
Flags every active subscription onoldPlanId as “migration pending” to newPlanId. Subscribers must accept individually.buildAcceptMigration
Subscriber accepts a pending migration. The contract cancels the old subscription, creates one on the new plan, and sets a new allowance — all in one tx.buildSubscribe. If omitted, the SDK uses the same safe defaults.buildRejectMigration
Subscriber rejects a pending migration. They stay on the old plan.buildReactivate
Subscriber reactivates a paused subscription. Re-signs a new allowance and attempts an immediate charge.buildExtendTtl
Permissionless TTL bump for a plan + subscription entry. Useful for keepers that want to keep long-lived state alive alongside theircharge() calls.