import { OfferHub } from "@offerhub/sdk"; const oh = new OfferHub({ apiKey: process.env.OFFERHUB_API_KEY! }); // Create a milestone-based service contractconst contract = await oh.contracts.create({ client: "GCLIENT_WALLET_ADDRESS", provider: "GPROVIDER_WALLET_ADDRESS", amount: 8000, asset: "USDC", currency: "USD", milestones: [ { title: "UX Research & Wireframes", percentage: 30 }, { title: "Design & Prototyping", percentage: 40 }, { title: "Final Delivery & QA", percentage: 30 }, ],}); // Client funds the full contract up-frontconst escrow = await oh.escrows.fund(contract.id, { walletId: "GCLIENT_WALLET_ADDRESS",}); console.log("Contract funded:", escrow.status);// Output: Contract funded: ACTIVETarget
B2B / Service Marketplace
Platform Scope