import { VowenaClient, NETWORKS } from "vowena";
const client = new VowenaClient({
contractId: NETWORKS.testnet.contractId,
rpcUrl: NETWORKS.testnet.rpcUrl,
networkPassphrase: NETWORKS.testnet.networkPassphrase,
});
const planIds = await client.getMerchantPlans("GMERCHANT...ADDR");
console.log("Plan IDs:", planIds); // e.g., [1, 2, 5]
// Fetch full details for each plan
for (const planId of planIds) {
const plan = await client.getPlan(planId);
console.log(`Plan ${planId}: ${plan.amount} stroops, active: ${plan.active}`);
}