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.
- 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
submitTransaction() to broadcast it.buildCreatePlan
Creates a new subscription plan on-chain.Returns:
Promise<string> - Assembled XDR transaction string.buildSubscribe
Subscribes a user to a plan. This also sets the SEP-41 token allowance in a single transaction.Returns:
Promise<string> - Assembled XDR transaction string.buildCharge
Charges a subscription for the current billing period. This is permissionless - anyone can call it.Returns:
Promise<string> - Assembled XDR transaction string.buildCancel
Cancels a subscription. Can be called by either the subscriber or the merchant.Returns:
Promise<string> - Assembled XDR transaction string.buildRefund
Issues a refund from the merchant to the subscriber.Returns:
Promise<string> - Assembled XDR transaction string.buildUpdatePlanAmount
Updates the billing amount for an existing plan. The new amount must not exceed the plan’s price ceiling.Returns:
Promise<string> - Assembled XDR transaction string.buildRequestMigration
Requests migration of all subscribers from one plan to another. Subscribers must accept individually.Returns:
Promise<string> - Assembled XDR transaction string.buildAcceptMigration
Accepts a pending migration for a subscription. Called by the subscriber.Returns:
Promise<string> - Assembled XDR transaction string.buildRejectMigration
Rejects a pending migration for a subscription. Called by the subscriber.Returns:
Promise<string> - Assembled XDR transaction string.buildReactivate
Reactivates a paused subscription. Called by the subscriber.Returns:
Promise<string> - Assembled XDR transaction string.