import { OfferHub } from "@offerhub/sdk"; // Initialize SDK — The Orchestrator mirrors your backend stateconst oh = new OfferHub({ apiKey: process.env.OFFERHUB_API_KEY! }); // Order Creation: single call creates an escrow-safe payment intentconst order = await oh.orders.create({ buyer: "did:stellar:GCLIENT...", seller: "did:stellar:GFREELANCER...", amount: 1500, asset: "USDC", milestones: [ { title: "Initial Delivery", percentage: 50 }, { title: "Final Review", percentage: 50 }, ],}); // Escrow Funding: lock funds on-chain — buyer wallet is debitedawait oh.escrows.fund(order.id, { walletId: "wallet_01HKXYZ...",});Target
B2B / Freelance
Marketplace Scope