import { OfferHub } from "@offerhub/sdk"; // Initialize SDK — The Orchestrator mirrors your backend stateconst oh = new OfferHub({ apiKey: process.env.OFFERHUB_API_KEY! }); // Order Creation: creates an escrow-safe purchase with a delivery windowconst order = await oh.orders.create({ buyer: "did:stellar:GBUYER...", seller: "did:stellar:GSELLER...", amount: 100, asset: "USDC", deliveryWindow: 7, // days buyer has to confirm delivery}); // Escrow Funding: lock buyer funds on-chain — vault is debited atomicallyawait oh.escrows.fund(order.id, { walletId: "wallet_01HKXYZ...",});Target
B2C / eCommerce
Marketplace Scope