@usdctofiat/offramp 4.4.0 → 4.4.2

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
package/dist/index.js CHANGED
@@ -41,12 +41,10 @@ import {
41
41
  sanitizeAttributionId,
42
42
  sendTelemetryEvent,
43
43
  undelegate
44
- } from "./chunk-CPTVCTLU.js";
44
+ } from "./chunk-4DWGIXLS.js";
45
45
 
46
46
  // src/taker-tier.ts
47
- import {
48
- apiGetTakerTier
49
- } from "@zkp2p/sdk";
47
+ import { apiGetTakerTier } from "@zkp2p/sdk";
50
48
  async function getTakerTier({
51
49
  owner,
52
50
  chainId = BASE_CHAIN_ID,
package/dist/index.js.map CHANGED
@@ -1 +1 @@
1
- {"version":3,"sources":["../src/taker-tier.ts","../src/types.ts","../src/resources.ts"],"sourcesContent":["import {\n apiGetTakerTier,\n type GetTakerTierResponse,\n type TakerTierLevel,\n} from \"@zkp2p/sdk\";\nimport { API_BASE_URL, BASE_CHAIN_ID, PAYEE_REGISTRATION_TIMEOUT_MS } from \"./config\";\n\nexport type TakerTier = GetTakerTierResponse[\"responseObject\"];\nexport type TakerPlatformLimit = NonNullable<TakerTier[\"platformLimits\"]>[number];\n\nexport interface GetTakerTierInput {\n readonly owner: string;\n readonly chainId?: number;\n readonly apiBaseUrl?: string;\n readonly timeoutMs?: number;\n}\n\nexport interface TakerPlatformLimitLookup {\n readonly platform?: string | null;\n readonly paymentMethodHash?: string | null;\n}\n\nexport interface ResolvedTakerPlatformLimit {\n readonly tier: TakerTierLevel;\n readonly limit: TakerPlatformLimit | null;\n}\n\nexport async function getTakerTier({\n owner,\n chainId = BASE_CHAIN_ID,\n apiBaseUrl = API_BASE_URL,\n timeoutMs = PAYEE_REGISTRATION_TIMEOUT_MS,\n}: GetTakerTierInput): Promise<TakerTier> {\n const response = await apiGetTakerTier({ owner, chainId }, apiBaseUrl, timeoutMs);\n if (!response.success || !response.responseObject) {\n throw new Error(response.message || \"Failed to load taker tier.\");\n }\n return response.responseObject;\n}\n\nexport function findTakerPlatformLimit(\n tier: TakerTier | null | undefined,\n lookup: TakerPlatformLimitLookup,\n): TakerPlatformLimit | null {\n const limits = tier?.platformLimits ?? [];\n const platform = lookup.platform?.trim().toLowerCase() || null;\n const paymentMethodHash = lookup.paymentMethodHash?.trim().toLowerCase() || null;\n if (!platform && !paymentMethodHash) return null;\n\n return (\n limits.find((limit) => {\n const limitHash = limit.paymentMethodHash?.trim().toLowerCase();\n if (paymentMethodHash && limitHash === paymentMethodHash) return true;\n\n const limitPlatform = limit.platformName?.trim().toLowerCase();\n if (!platform || !limitPlatform) return false;\n if (limitPlatform === platform) return true;\n\n return platform.startsWith(\"zelle\") && limitPlatform.startsWith(\"zelle\");\n }) ?? null\n );\n}\n\nexport function resolveTakerPlatformLimit(\n tier: TakerTier | null | undefined,\n lookup: TakerPlatformLimitLookup,\n): ResolvedTakerPlatformLimit | null {\n if (!tier) return null;\n return {\n tier: tier.tier,\n limit: findTakerPlatformLimit(tier, lookup),\n };\n}\n","import type { PlatformEntry } from \"./platforms\";\nimport type { CurrencyEntry } from \"./currencies\";\n\nexport const OFFRAMP_ERROR_CODES = {\n VALIDATION: \"VALIDATION\",\n APPROVAL_FAILED: \"APPROVAL_FAILED\",\n REGISTRATION_FAILED: \"REGISTRATION_FAILED\",\n /**\n * Curator rejected the maker because the user has not registered this\n * handle in the Peer extension yet. Thrown from `offramp()` for PayPal\n * and Wise when `/v2/makers/create` returns 400 or a \"creating the maker\"\n * message. Recover by prompting the user through the Peer extension via\n * `usePeerExtensionRegistration(platform)` (React) or\n * `completePeerExtensionRegistration(...)`, then retrying `offramp()`.\n */\n EXTENSION_REGISTRATION_REQUIRED: \"EXTENSION_REGISTRATION_REQUIRED\",\n DEPOSIT_FAILED: \"DEPOSIT_FAILED\",\n CONFIRMATION_FAILED: \"CONFIRMATION_FAILED\",\n DELEGATION_FAILED: \"DELEGATION_FAILED\",\n USER_CANCELLED: \"USER_CANCELLED\",\n UNSUPPORTED: \"UNSUPPORTED\",\n} as const;\n\nexport type OfframpErrorCode = (typeof OFFRAMP_ERROR_CODES)[keyof typeof OFFRAMP_ERROR_CODES];\n\nexport interface OfframpParams {\n /** USDC amount as decimal string, min 1. */\n amount: string;\n /** Payment platform — use `PLATFORMS.REVOLUT` etc. */\n platform: PlatformEntry;\n /** Fiat currency — use `CURRENCIES.EUR` etc. */\n currency: CurrencyEntry;\n /** Platform-specific identifier (username, email, IBAN). */\n identifier: string;\n /** Optional: restrict the deposit to this taker wallet (OTC private order). */\n otcTaker?: string;\n /** Optional SDK-only referral metadata for telemetry attribution. */\n referralId?: string;\n /** Optional SDK-only integrator metadata for telemetry attribution. */\n integratorId?: string;\n /**\n * Optional per-wallet key to replay the first successful result for 10 minutes.\n *\n * Browser-only: the replay cache is backed by `sessionStorage` and is a no-op\n * in Node/worker runtimes (no duplicate protection there). It is honored only\n * by the `Offramp` class (`createDeposit`) / the `useOfframp` hook — the\n * standalone `offramp()` function ignores it. For server-side dedup, call\n * `deposits(walletAddress)` and reuse an existing open deposit before creating\n * a new one (the SDK's own resume behavior does this for the delegation step).\n */\n idempotencyKey?: string;\n}\n\nexport interface OfframpResult {\n depositId: string;\n txHash: string;\n /** Whether an existing undelegated deposit was resumed. */\n resumed: boolean;\n /** OTC link for the taker, present when `otcTaker` was provided. */\n otcLink?: string;\n}\n\nexport type OfframpStep =\n | \"approving\"\n | \"registering\"\n | \"depositing\"\n | \"confirming\"\n | \"delegating\"\n | \"restricting\"\n | \"resuming\"\n | \"done\";\n\nexport type OfframpState =\n | \"idle\"\n | \"approving\"\n | \"registering\"\n | \"depositing\"\n | \"confirming\"\n | \"delegating\"\n | \"done\"\n | \"error\";\n\nexport interface OfframpProgress {\n step: OfframpStep;\n txHash?: string;\n depositId?: string;\n}\n\nexport type OnProgress = (progress: OfframpProgress) => void;\n\nexport type DepositStatus = \"active\" | \"empty\" | \"closed\";\n\nexport interface OfframpQuoteInput {\n amount: string;\n currency: CurrencyEntry;\n platform: PlatformEntry;\n}\n\nexport interface OfframpQuote {\n amountUsdc: number;\n expectedFiat: number;\n effectiveRate: number;\n vaultSpreadBps: number;\n}\n\nexport interface OfframpVaultStatus {\n rateManagerId: string;\n rateManagerAddress: string;\n /**\n * Delegate vault manager fee in basis points (currently 10 = 0.10%). Charged\n * by the vault's rate manager on each fill and deducted from the USDC released\n * to the buyer; not added to the maker's deposit cost. See the README \"Fees\".\n */\n feeRateBps: number;\n escrow: string;\n isActive: boolean;\n}\n\nexport interface OfframpCreateOptions {\n integratorId?: string;\n referralId?: string;\n telemetry?: boolean;\n /**\n * Override the curator REST base URL (default `https://api.zkp2p.xyz`) used\n * for maker registration/validation and the SDK's REST calls. For\n * testing/proxying/mocking only — the indexer and Base RPC always target\n * mainnet. Honored by the `Offramp` class (`createDeposit`); absent ⇒ default\n * behavior is unchanged.\n */\n apiBaseUrl?: string;\n}\n\nexport interface DepositInfo {\n /** Numeric deposit ID. Pass this to `close()`. */\n depositId: string;\n /** Composite ID (escrowAddress_depositId). */\n compositeId: string;\n /** Creation transaction hash. */\n txHash?: string;\n status: DepositStatus;\n remainingUsdc: number;\n outstandingUsdc: number;\n totalTakenUsdc: number;\n fulfilledIntents: number;\n paymentMethods: string[];\n currencies: string[];\n rateSource: string;\n delegated: boolean;\n escrowAddress: string;\n}\n","import {\n DELEGATE_MANAGER_FEE_BPS,\n DELEGATE_RATE_MANAGER_ID,\n ESCROW_ADDRESS,\n RATE_MANAGER_REGISTRY_ADDRESS,\n REFERRER,\n SDK_VERSION,\n} from \"./config\";\n\nexport type OfframpIntegratorProfile =\n | \"app\"\n | \"bot\"\n | \"agent\"\n | \"private-otc\"\n | \"webhooks\"\n | \"peerlytics\";\n\nexport interface OfframpResourceLink {\n label: string;\n href: string;\n description: string;\n}\n\nexport interface OfframpIntegrationStep {\n title: string;\n detail: string;\n}\n\nexport interface OfframpIntegrationCheck {\n title: string;\n detail: string;\n required: true;\n}\n\nexport interface OfframpIntegrationPlaybook {\n profile: OfframpIntegratorProfile;\n title: string;\n summary: string;\n steps: OfframpIntegrationStep[];\n resources: OfframpResourceLink[];\n}\n\nexport interface OfframpDeveloperResources {\n packageName: \"@usdctofiat/offramp\";\n sdkVersion: string;\n chain: \"base-mainnet\";\n chainId: 8453;\n referrer: typeof REFERRER;\n delegation: {\n required: true;\n rateManagerId: typeof DELEGATE_RATE_MANAGER_ID;\n rateManagerAddress: typeof RATE_MANAGER_REGISTRY_ADDRESS;\n feeRateBps: typeof DELEGATE_MANAGER_FEE_BPS;\n escrow: typeof ESCROW_ADDRESS;\n };\n links: {\n developerPortal: string;\n sdkGuide: string;\n appGuide: string;\n botGuide: string;\n agentGuide: string;\n webhooksGuide: string;\n privateOtcGuide: string;\n peerlyticsGuide: string;\n agentSkill: string;\n shortMachineReference: string;\n fullMachineReference: string;\n starters: string;\n peerlyticsDevelopers: string;\n peerlyticsPricing: string;\n npm: string;\n };\n playbooks: OfframpIntegrationPlaybook[];\n checklist: OfframpIntegrationCheck[];\n}\n\nexport const OFFRAMP_RESOURCE_LINKS = {\n developerPortal: \"https://usdctofiat.xyz/developers/\",\n sdkGuide: \"https://usdctofiat.xyz/developers/offramp-sdk/\",\n appGuide: \"https://usdctofiat.xyz/developers/apps/\",\n botGuide: \"https://usdctofiat.xyz/developers/bots/\",\n agentGuide: \"https://usdctofiat.xyz/developers/agents/\",\n webhooksGuide: \"https://usdctofiat.xyz/developers/webhooks/\",\n privateOtcGuide: \"https://usdctofiat.xyz/developers/private-otc/\",\n peerlyticsGuide: \"https://usdctofiat.xyz/developers/peerlytics/\",\n agentSkill: \"https://usdctofiat.xyz/skills/usdctofiat.md\",\n shortMachineReference: \"https://usdctofiat.xyz/llms.txt\",\n fullMachineReference: \"https://usdctofiat.xyz/llms-full.txt\",\n starters: \"https://github.com/ADWilkinson/usdctofiat-peerlytics-starters\",\n peerlyticsDevelopers: \"https://peerlytics.xyz/developers\",\n peerlyticsPricing: \"https://peerlytics.xyz/pricing\",\n npm: \"https://www.npmjs.com/package/@usdctofiat/offramp\",\n} as const;\n\nconst sharedResources: OfframpResourceLink[] = [\n {\n label: \"Developer portal\",\n href: OFFRAMP_RESOURCE_LINKS.developerPortal,\n description: \"Human-readable hub for SDK, webhooks, OTC, bots, agents, and Peerlytics.\",\n },\n {\n label: \"Starter templates\",\n href: OFFRAMP_RESOURCE_LINKS.starters,\n description: \"Next.js, Vite, Telegram-bot, scripts, and HMAC webhook receivers.\",\n },\n {\n label: \"Agent skill\",\n href: OFFRAMP_RESOURCE_LINKS.agentSkill,\n description: \"Drop-in skill file for coding agents integrating the off-ramp.\",\n },\n];\n\nexport const OFFRAMP_INTEGRATION_PLAYBOOKS: OfframpIntegrationPlaybook[] = [\n {\n profile: \"app\",\n title: \"Wallet app\",\n summary: \"Add a sell-USDC button to a user-facing web app.\",\n steps: [\n {\n title: \"Collect route inputs\",\n detail: \"Ask for amount, platform, currency, and the platform-specific payout identifier.\",\n },\n {\n title: \"Call useOfframp or createOfframp\",\n detail:\n \"Pass the user's viem WalletClient so the user signs approval, deposit, and delegation.\",\n },\n {\n title: \"Handle SAR registration\",\n detail: \"Catch EXTENSION_REGISTRATION_REQUIRED and drive usePeerExtensionRegistration.\",\n },\n {\n title: \"Reconcile state\",\n detail: \"Use deposits(address) and webhooks rather than assuming the browser stayed open.\",\n },\n ],\n resources: [\n ...sharedResources,\n {\n label: \"App integration guide\",\n href: OFFRAMP_RESOURCE_LINKS.appGuide,\n description: \"User-facing app flow, React hooks, and wallet-state guidance.\",\n },\n {\n label: \"SDK guide\",\n href: OFFRAMP_RESOURCE_LINKS.sdkGuide,\n description: \"Core SDK exports, resumability, errors, and examples.\",\n },\n ],\n },\n {\n profile: \"bot\",\n title: \"Bot or backend worker\",\n summary: \"Create delegated deposits from a server wallet or automation wallet.\",\n steps: [\n {\n title: \"Own duplicate prevention\",\n detail: \"Before creating, call deposits(address) and reuse open inventory when possible.\",\n },\n {\n title: \"Pass stable attribution\",\n detail: \"Use integratorId and referralId so telemetry can separate automated flows.\",\n },\n {\n title: \"Use OTC when a buyer is known\",\n detail: \"Pass otcTaker to avoid exposing known-counterparty liquidity publicly.\",\n },\n {\n title: \"Subscribe to lifecycle state\",\n detail: \"Register HMAC webhooks so fills and closes survive process restarts.\",\n },\n ],\n resources: [\n ...sharedResources,\n {\n label: \"Bot guide\",\n href: OFFRAMP_RESOURCE_LINKS.botGuide,\n description: \"Server-wallet, retry, idempotency, and OTC patterns.\",\n },\n {\n label: \"Webhooks guide\",\n href: OFFRAMP_RESOURCE_LINKS.webhooksGuide,\n description: \"HMAC verification and lifecycle event names.\",\n },\n ],\n },\n {\n profile: \"agent\",\n title: \"Coding agent\",\n summary: \"Give an agent enough canonical context to build without guessing protocol details.\",\n steps: [\n {\n title: \"Load the skill\",\n detail: \"Point the agent at /skills/usdctofiat.md before it writes integration code.\",\n },\n {\n title: \"Use the machine references\",\n detail: \"Feed llms.txt or llms-full.txt when the agent needs routes, contracts, and rules.\",\n },\n {\n title: \"Scaffold first\",\n detail: \"Use create-offramp-app or starters before asking the agent to invent wiring.\",\n },\n {\n title: \"Verify delegation\",\n detail:\n \"Check getVaultStatus() and the returned deposit state; SDK deposits must delegate.\",\n },\n ],\n resources: [\n ...sharedResources,\n {\n label: \"Agent guide\",\n href: OFFRAMP_RESOURCE_LINKS.agentGuide,\n description: \"Context-pack and prompt sequence for AI-assisted integration.\",\n },\n {\n label: \"Full machine reference\",\n href: OFFRAMP_RESOURCE_LINKS.fullMachineReference,\n description: \"Canonical routes, contracts, fees, and extractable answers.\",\n },\n ],\n },\n {\n profile: \"private-otc\",\n title: \"Private OTC flow\",\n summary: \"Restrict a delegated deposit to one approved taker wallet.\",\n steps: [\n {\n title: \"Create with otcTaker\",\n detail:\n \"Pass the buyer wallet in the original offramp() call when the counterparty is known.\",\n },\n {\n title: \"Share the returned otcLink\",\n detail: \"The link is convenience; the whitelist hook is the onchain enforcement.\",\n },\n {\n title: \"Rotate when needed\",\n detail: \"Use enableOtc, disableOtc, and getOtcLink on existing deposits.\",\n },\n ],\n resources: [\n ...sharedResources,\n {\n label: \"Private OTC guide\",\n href: OFFRAMP_RESOURCE_LINKS.privateOtcGuide,\n description: \"Whitelist hook model and helper exports.\",\n },\n ],\n },\n {\n profile: \"webhooks\",\n title: \"Lifecycle webhooks\",\n summary: \"Receive deposit and OTC lifecycle state with HMAC verification.\",\n steps: [\n {\n title: \"Create a Peerlytics API key\",\n detail: \"One key authenticates both Peerlytics and USDCtoFiat developer surfaces.\",\n },\n {\n title: \"Register an endpoint\",\n detail: \"Point the console at an HTTPS endpoint that can read the raw request body.\",\n },\n {\n title: \"Verify before parsing\",\n detail: \"Compute HMAC-SHA256 over timestamp.rawBody and compare to v1 in constant time.\",\n },\n {\n title: \"Reconcile important state\",\n detail: \"Treat events as hints and call deposits(address) or your indexer for hard state.\",\n },\n ],\n resources: [\n ...sharedResources,\n {\n label: \"Webhooks guide\",\n href: OFFRAMP_RESOURCE_LINKS.webhooksGuide,\n description: \"Event names, headers, and replay-window guidance.\",\n },\n {\n label: \"Peerlytics console\",\n href: OFFRAMP_RESOURCE_LINKS.peerlyticsDevelopers,\n description: \"API keys, credits, and endpoint management.\",\n },\n ],\n },\n {\n profile: \"peerlytics\",\n title: \"Peerlytics API\",\n summary: \"Add market data, explorer reads, analytics, and API-credit-backed access.\",\n steps: [\n {\n title: \"Start with deposits\",\n detail: \"@usdctofiat/offramp creates delegated seller inventory without an API key.\",\n },\n {\n title: \"Add the Peerlytics API\",\n detail: \"Use @peerlytics/sdk when the product needs orderbook, analytics, and webhooks.\",\n },\n {\n title: \"Buy credits as usage grows\",\n detail: \"Peerlytics credits back deeper API calls and Pro webhook access.\",\n },\n ],\n resources: [\n ...sharedResources,\n {\n label: \"Peerlytics API guide\",\n href: OFFRAMP_RESOURCE_LINKS.peerlyticsGuide,\n description: \"When to add the paid protocol API alongside the free deposit SDK.\",\n },\n {\n label: \"Peerlytics pricing\",\n href: OFFRAMP_RESOURCE_LINKS.peerlyticsPricing,\n description: \"Credit packs, Free and Pro plans, and API limits.\",\n },\n ],\n },\n];\n\nexport const OFFRAMP_INTEGRATION_CHECKLIST: OfframpIntegrationCheck[] = [\n {\n title: \"Base mainnet wallet client\",\n detail: \"Use a viem WalletClient on chain 8453. The SDK has no public sandbox mode.\",\n required: true,\n },\n {\n title: \"Delegate-vault pricing\",\n detail: \"Every SDK-created deposit must delegate pricing to the managed Delegate vault.\",\n required: true,\n },\n {\n title: \"PayPal/Wise recovery path\",\n detail: \"Catch EXTENSION_REGISTRATION_REQUIRED and drive Peer extension seller registration.\",\n required: true,\n },\n {\n title: \"Server-side duplicate prevention\",\n detail:\n \"Bots and workers must call deposits(address) and use their own order database; idempotencyKey is browser-session scoped and the standalone offramp() helper ignores it.\",\n required: true,\n },\n {\n title: \"Raw-body webhook verification\",\n detail: \"Verify timestamp.rawBody with HMAC-SHA256 before parsing JSON.\",\n required: true,\n },\n];\n\nexport const OFFRAMP_DEVELOPER_RESOURCES: OfframpDeveloperResources = {\n packageName: \"@usdctofiat/offramp\",\n sdkVersion: SDK_VERSION,\n chain: \"base-mainnet\",\n chainId: 8453,\n referrer: REFERRER,\n delegation: {\n required: true,\n rateManagerId: DELEGATE_RATE_MANAGER_ID,\n rateManagerAddress: RATE_MANAGER_REGISTRY_ADDRESS,\n feeRateBps: DELEGATE_MANAGER_FEE_BPS,\n escrow: ESCROW_ADDRESS,\n },\n links: {\n developerPortal: OFFRAMP_RESOURCE_LINKS.developerPortal,\n sdkGuide: OFFRAMP_RESOURCE_LINKS.sdkGuide,\n appGuide: OFFRAMP_RESOURCE_LINKS.appGuide,\n botGuide: OFFRAMP_RESOURCE_LINKS.botGuide,\n agentGuide: OFFRAMP_RESOURCE_LINKS.agentGuide,\n webhooksGuide: OFFRAMP_RESOURCE_LINKS.webhooksGuide,\n privateOtcGuide: OFFRAMP_RESOURCE_LINKS.privateOtcGuide,\n peerlyticsGuide: OFFRAMP_RESOURCE_LINKS.peerlyticsGuide,\n agentSkill: OFFRAMP_RESOURCE_LINKS.agentSkill,\n shortMachineReference: OFFRAMP_RESOURCE_LINKS.shortMachineReference,\n fullMachineReference: OFFRAMP_RESOURCE_LINKS.fullMachineReference,\n starters: OFFRAMP_RESOURCE_LINKS.starters,\n peerlyticsDevelopers: OFFRAMP_RESOURCE_LINKS.peerlyticsDevelopers,\n peerlyticsPricing: OFFRAMP_RESOURCE_LINKS.peerlyticsPricing,\n npm: OFFRAMP_RESOURCE_LINKS.npm,\n },\n playbooks: OFFRAMP_INTEGRATION_PLAYBOOKS,\n checklist: OFFRAMP_INTEGRATION_CHECKLIST,\n};\n\nexport function getOfframpDeveloperResources(\n profile?: OfframpIntegratorProfile,\n): OfframpDeveloperResources | OfframpIntegrationPlaybook {\n if (!profile) return OFFRAMP_DEVELOPER_RESOURCES;\n const playbook = OFFRAMP_INTEGRATION_PLAYBOOKS.find((entry) => entry.profile === profile);\n if (!playbook) return OFFRAMP_DEVELOPER_RESOURCES;\n return playbook;\n}\n\nexport function getOfframpAgentPrompt(profile: OfframpIntegratorProfile = \"app\"): string {\n const playbook = getOfframpDeveloperResources(profile);\n const resource =\n \"profile\" in playbook\n ? playbook\n : OFFRAMP_INTEGRATION_PLAYBOOKS.find((entry) => entry.profile === \"app\");\n const steps = resource?.steps.map((step, index) => `${index + 1}. ${step.title}: ${step.detail}`);\n\n return [\n \"Build a USDC-to-fiat integration with @usdctofiat/offramp.\",\n `Profile: ${profile}.`,\n \"Before coding, read https://usdctofiat.xyz/skills/usdctofiat.md and https://usdctofiat.xyz/llms.txt.\",\n \"Use Base mainnet chainId 8453 and a viem WalletClient; do not invent a sandbox.\",\n \"Do not add manual rate controls; SDK-created deposits must delegate to the Delegate vault.\",\n \"For PayPal, Wise, Venmo, and Cash App, recover EXTENSION_REGISTRATION_REQUIRED through the Peer extension registration flow.\",\n \"For bots/workers, deduplicate with deposits(address) plus your own order database; do not rely on idempotencyKey.\",\n \"For webhooks, verify the raw request body before parsing JSON.\",\n ...(steps ?? []),\n ].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AAC,QAAS,QAAO;AACrB,QAAM,WAAW,8BAA8B,KAAK,CAAC,UAAU,MAAM,YAAY,OAAO;AACxF,MAAI,CAAC,SAAU,QAAO;AACtB,SAAO;AACT;AAEO,SAAS,sBAAsB,UAAoC,OAAe;AACvF,QAAM,WAAW,6BAA6B,OAAO;AACrD,QAAM,WACJ,aAAa,WACT,WACA,8BAA8B,KAAK,CAAC,UAAU,MAAM,YAAY,KAAK;AAC3E,QAAM,QAAQ,UAAU,MAAM,IAAI,CAAC,MAAM,UAAU,GAAG,QAAQ,CAAC,KAAK,KAAK,KAAK,KAAK,KAAK,MAAM,EAAE;AAEhG,SAAO;AAAA,IACL;AAAA,IACA,YAAY,OAAO;AAAA,IACnB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAI,SAAS,CAAC;AAAA,EAChB,EAAE,KAAK,IAAI;AACb;","names":[]}
1
+ {"version":3,"sources":["../src/taker-tier.ts","../src/types.ts","../src/resources.ts"],"sourcesContent":["import { apiGetTakerTier, type GetTakerTierResponse, type TakerTierLevel } from \"@zkp2p/sdk\";\nimport { API_BASE_URL, BASE_CHAIN_ID, PAYEE_REGISTRATION_TIMEOUT_MS } from \"./config\";\n\nexport type TakerTier = GetTakerTierResponse[\"responseObject\"];\nexport type TakerPlatformLimit = NonNullable<TakerTier[\"platformLimits\"]>[number];\n\nexport interface GetTakerTierInput {\n readonly owner: string;\n readonly chainId?: number;\n readonly apiBaseUrl?: string;\n readonly timeoutMs?: number;\n}\n\nexport interface TakerPlatformLimitLookup {\n readonly platform?: string | null;\n readonly paymentMethodHash?: string | null;\n}\n\nexport interface ResolvedTakerPlatformLimit {\n readonly tier: TakerTierLevel;\n readonly limit: TakerPlatformLimit | null;\n}\n\nexport async function getTakerTier({\n owner,\n chainId = BASE_CHAIN_ID,\n apiBaseUrl = API_BASE_URL,\n timeoutMs = PAYEE_REGISTRATION_TIMEOUT_MS,\n}: GetTakerTierInput): Promise<TakerTier> {\n const response = await apiGetTakerTier({ owner, chainId }, apiBaseUrl, timeoutMs);\n if (!response.success || !response.responseObject) {\n throw new Error(response.message || \"Failed to load taker tier.\");\n }\n return response.responseObject;\n}\n\nexport function findTakerPlatformLimit(\n tier: TakerTier | null | undefined,\n lookup: TakerPlatformLimitLookup,\n): TakerPlatformLimit | null {\n const limits = tier?.platformLimits ?? [];\n const platform = lookup.platform?.trim().toLowerCase() || null;\n const paymentMethodHash = lookup.paymentMethodHash?.trim().toLowerCase() || null;\n if (!platform && !paymentMethodHash) return null;\n\n return (\n limits.find((limit) => {\n const limitHash = limit.paymentMethodHash?.trim().toLowerCase();\n if (paymentMethodHash && limitHash === paymentMethodHash) return true;\n\n const limitPlatform = limit.platformName?.trim().toLowerCase();\n if (!platform || !limitPlatform) return false;\n if (limitPlatform === platform) return true;\n\n return platform.startsWith(\"zelle\") && limitPlatform.startsWith(\"zelle\");\n }) ?? null\n );\n}\n\nexport function resolveTakerPlatformLimit(\n tier: TakerTier | null | undefined,\n lookup: TakerPlatformLimitLookup,\n): ResolvedTakerPlatformLimit | null {\n if (!tier) return null;\n return {\n tier: tier.tier,\n limit: findTakerPlatformLimit(tier, lookup),\n };\n}\n","import type { PlatformEntry } from \"./platforms\";\nimport type { CurrencyEntry } from \"./currencies\";\n\nexport const OFFRAMP_ERROR_CODES = {\n VALIDATION: \"VALIDATION\",\n APPROVAL_FAILED: \"APPROVAL_FAILED\",\n REGISTRATION_FAILED: \"REGISTRATION_FAILED\",\n /**\n * Curator rejected the maker because the user has not registered this\n * handle in the Peer extension yet. Thrown from `offramp()` for PayPal\n * and Wise when `/v2/makers/create` returns 400 or a \"creating the maker\"\n * message. Recover by prompting the user through the Peer extension via\n * `usePeerExtensionRegistration(platform)` (React) or\n * `completePeerExtensionRegistration(...)`, then retrying `offramp()`.\n */\n EXTENSION_REGISTRATION_REQUIRED: \"EXTENSION_REGISTRATION_REQUIRED\",\n DEPOSIT_FAILED: \"DEPOSIT_FAILED\",\n CONFIRMATION_FAILED: \"CONFIRMATION_FAILED\",\n DELEGATION_FAILED: \"DELEGATION_FAILED\",\n USER_CANCELLED: \"USER_CANCELLED\",\n UNSUPPORTED: \"UNSUPPORTED\",\n} as const;\n\nexport type OfframpErrorCode = (typeof OFFRAMP_ERROR_CODES)[keyof typeof OFFRAMP_ERROR_CODES];\n\nexport interface OfframpParams {\n /** USDC amount as decimal string, min 1. */\n amount: string;\n /** Payment platform — use `PLATFORMS.REVOLUT` etc. */\n platform: PlatformEntry;\n /** Fiat currency — use `CURRENCIES.EUR` etc. */\n currency: CurrencyEntry;\n /** Platform-specific identifier (username, email, IBAN). */\n identifier: string;\n /** Optional: restrict the deposit to this taker wallet (OTC private order). */\n otcTaker?: string;\n /** Optional SDK-only referral metadata for telemetry attribution. */\n referralId?: string;\n /** Optional SDK-only integrator metadata for telemetry attribution. */\n integratorId?: string;\n /**\n * Optional per-wallet key to replay the first successful result for 10 minutes.\n *\n * Browser-only: the replay cache is backed by `sessionStorage` and is a no-op\n * in Node/worker runtimes (no duplicate protection there). It is honored only\n * by the `Offramp` class (`createDeposit`) / the `useOfframp` hook — the\n * standalone `offramp()` function ignores it. For server-side dedup, call\n * `deposits(walletAddress)` and reuse an existing open deposit before creating\n * a new one (the SDK's own resume behavior does this for the delegation step).\n */\n idempotencyKey?: string;\n}\n\nexport interface OfframpResult {\n depositId: string;\n txHash: string;\n /** Whether an existing undelegated deposit was resumed. */\n resumed: boolean;\n /** OTC link for the taker, present when `otcTaker` was provided. */\n otcLink?: string;\n}\n\nexport type OfframpStep =\n | \"approving\"\n | \"registering\"\n | \"depositing\"\n | \"confirming\"\n | \"delegating\"\n | \"restricting\"\n | \"resuming\"\n | \"done\";\n\nexport type OfframpState =\n | \"idle\"\n | \"approving\"\n | \"registering\"\n | \"depositing\"\n | \"confirming\"\n | \"delegating\"\n | \"done\"\n | \"error\";\n\nexport interface OfframpProgress {\n step: OfframpStep;\n txHash?: string;\n depositId?: string;\n}\n\nexport type OnProgress = (progress: OfframpProgress) => void;\n\nexport type DepositStatus = \"active\" | \"empty\" | \"closed\";\n\nexport interface OfframpQuoteInput {\n amount: string;\n currency: CurrencyEntry;\n platform: PlatformEntry;\n}\n\nexport interface OfframpQuote {\n amountUsdc: number;\n expectedFiat: number;\n effectiveRate: number;\n vaultSpreadBps: number;\n}\n\nexport interface OfframpVaultStatus {\n rateManagerId: string;\n rateManagerAddress: string;\n /**\n * Delegate vault manager fee in basis points (currently 10 = 0.10%). Charged\n * by the vault's rate manager on each fill and deducted from the USDC released\n * to the buyer; not added to the maker's deposit cost. See the README \"Fees\".\n */\n feeRateBps: number;\n escrow: string;\n isActive: boolean;\n}\n\nexport interface OfframpCreateOptions {\n integratorId?: string;\n referralId?: string;\n telemetry?: boolean;\n /**\n * Override the curator REST base URL (default `https://api.zkp2p.xyz`) used\n * for maker registration/validation and the SDK's REST calls. For\n * testing/proxying/mocking only — the indexer and Base RPC always target\n * mainnet. Honored by the `Offramp` class (`createDeposit`); absent ⇒ default\n * behavior is unchanged.\n */\n apiBaseUrl?: string;\n}\n\nexport interface DepositInfo {\n /** Numeric deposit ID. Pass this to `close()`. */\n depositId: string;\n /** Composite ID (escrowAddress_depositId). */\n compositeId: string;\n /** Creation transaction hash. */\n txHash?: string;\n status: DepositStatus;\n remainingUsdc: number;\n outstandingUsdc: number;\n totalTakenUsdc: number;\n fulfilledIntents: number;\n paymentMethods: string[];\n currencies: string[];\n rateSource: string;\n delegated: boolean;\n escrowAddress: string;\n}\n","import {\n DELEGATE_MANAGER_FEE_BPS,\n DELEGATE_RATE_MANAGER_ID,\n ESCROW_ADDRESS,\n RATE_MANAGER_REGISTRY_ADDRESS,\n REFERRER,\n SDK_VERSION,\n} from \"./config\";\n\nexport type OfframpIntegratorProfile =\n | \"app\"\n | \"bot\"\n | \"agent\"\n | \"private-otc\"\n | \"webhooks\"\n | \"peerlytics\";\n\nexport interface OfframpResourceLink {\n label: string;\n href: string;\n description: string;\n}\n\nexport interface OfframpIntegrationStep {\n title: string;\n detail: string;\n}\n\nexport interface OfframpIntegrationCheck {\n title: string;\n detail: string;\n required: true;\n}\n\nexport interface OfframpIntegrationPlaybook {\n profile: OfframpIntegratorProfile;\n title: string;\n summary: string;\n steps: OfframpIntegrationStep[];\n resources: OfframpResourceLink[];\n}\n\nexport interface OfframpDeveloperResources {\n packageName: \"@usdctofiat/offramp\";\n sdkVersion: string;\n chain: \"base-mainnet\";\n chainId: 8453;\n referrer: typeof REFERRER;\n delegation: {\n required: true;\n rateManagerId: typeof DELEGATE_RATE_MANAGER_ID;\n rateManagerAddress: typeof RATE_MANAGER_REGISTRY_ADDRESS;\n feeRateBps: typeof DELEGATE_MANAGER_FEE_BPS;\n escrow: typeof ESCROW_ADDRESS;\n };\n links: {\n developerPortal: string;\n sdkGuide: string;\n appGuide: string;\n botGuide: string;\n agentGuide: string;\n webhooksGuide: string;\n privateOtcGuide: string;\n peerlyticsGuide: string;\n agentSkill: string;\n shortMachineReference: string;\n fullMachineReference: string;\n starters: string;\n peerlyticsDevelopers: string;\n peerlyticsPricing: string;\n npm: string;\n };\n playbooks: OfframpIntegrationPlaybook[];\n checklist: OfframpIntegrationCheck[];\n}\n\nexport const OFFRAMP_RESOURCE_LINKS = {\n developerPortal: \"https://usdctofiat.xyz/developers/\",\n sdkGuide: \"https://usdctofiat.xyz/developers/offramp-sdk/\",\n appGuide: \"https://usdctofiat.xyz/developers/apps/\",\n botGuide: \"https://usdctofiat.xyz/developers/bots/\",\n agentGuide: \"https://usdctofiat.xyz/developers/agents/\",\n webhooksGuide: \"https://usdctofiat.xyz/developers/webhooks/\",\n privateOtcGuide: \"https://usdctofiat.xyz/developers/private-otc/\",\n peerlyticsGuide: \"https://usdctofiat.xyz/developers/peerlytics/\",\n agentSkill: \"https://usdctofiat.xyz/skills/usdctofiat.md\",\n shortMachineReference: \"https://usdctofiat.xyz/llms.txt\",\n fullMachineReference: \"https://usdctofiat.xyz/llms-full.txt\",\n starters: \"https://github.com/ADWilkinson/usdctofiat-peerlytics-starters\",\n peerlyticsDevelopers: \"https://peerlytics.xyz/developers\",\n peerlyticsPricing: \"https://peerlytics.xyz/pricing\",\n npm: \"https://www.npmjs.com/package/@usdctofiat/offramp\",\n} as const;\n\nconst sharedResources: OfframpResourceLink[] = [\n {\n label: \"Developer portal\",\n href: OFFRAMP_RESOURCE_LINKS.developerPortal,\n description: \"Human-readable hub for SDK, webhooks, OTC, bots, agents, and Peerlytics.\",\n },\n {\n label: \"Starter templates\",\n href: OFFRAMP_RESOURCE_LINKS.starters,\n description: \"Next.js, Vite, Telegram-bot, scripts, and HMAC webhook receivers.\",\n },\n {\n label: \"Agent skill\",\n href: OFFRAMP_RESOURCE_LINKS.agentSkill,\n description: \"Drop-in skill file for coding agents integrating the off-ramp.\",\n },\n];\n\nexport const OFFRAMP_INTEGRATION_PLAYBOOKS: OfframpIntegrationPlaybook[] = [\n {\n profile: \"app\",\n title: \"Wallet app\",\n summary: \"Add a sell-USDC button to a user-facing web app.\",\n steps: [\n {\n title: \"Collect route inputs\",\n detail: \"Ask for amount, platform, currency, and the platform-specific payout identifier.\",\n },\n {\n title: \"Call useOfframp or createOfframp\",\n detail:\n \"Pass the user's viem WalletClient so the user signs approval, deposit, and delegation.\",\n },\n {\n title: \"Handle SAR registration\",\n detail: \"Catch EXTENSION_REGISTRATION_REQUIRED and drive usePeerExtensionRegistration.\",\n },\n {\n title: \"Reconcile state\",\n detail: \"Use deposits(address) and webhooks rather than assuming the browser stayed open.\",\n },\n ],\n resources: [\n ...sharedResources,\n {\n label: \"App integration guide\",\n href: OFFRAMP_RESOURCE_LINKS.appGuide,\n description: \"User-facing app flow, React hooks, and wallet-state guidance.\",\n },\n {\n label: \"SDK guide\",\n href: OFFRAMP_RESOURCE_LINKS.sdkGuide,\n description: \"Core SDK exports, resumability, errors, and examples.\",\n },\n ],\n },\n {\n profile: \"bot\",\n title: \"Bot or backend worker\",\n summary: \"Create delegated deposits from a server wallet or automation wallet.\",\n steps: [\n {\n title: \"Own duplicate prevention\",\n detail: \"Before creating, call deposits(address) and reuse open inventory when possible.\",\n },\n {\n title: \"Pass stable attribution\",\n detail: \"Use integratorId and referralId so telemetry can separate automated flows.\",\n },\n {\n title: \"Use OTC when a buyer is known\",\n detail: \"Pass otcTaker to avoid exposing known-counterparty liquidity publicly.\",\n },\n {\n title: \"Subscribe to lifecycle state\",\n detail: \"Register HMAC webhooks so fills and closes survive process restarts.\",\n },\n ],\n resources: [\n ...sharedResources,\n {\n label: \"Bot guide\",\n href: OFFRAMP_RESOURCE_LINKS.botGuide,\n description: \"Server-wallet, retry, idempotency, and OTC patterns.\",\n },\n {\n label: \"Webhooks guide\",\n href: OFFRAMP_RESOURCE_LINKS.webhooksGuide,\n description: \"HMAC verification and lifecycle event names.\",\n },\n ],\n },\n {\n profile: \"agent\",\n title: \"Coding agent\",\n summary: \"Give an agent enough canonical context to build without guessing protocol details.\",\n steps: [\n {\n title: \"Load the skill\",\n detail: \"Point the agent at /skills/usdctofiat.md before it writes integration code.\",\n },\n {\n title: \"Use the machine references\",\n detail: \"Feed llms.txt or llms-full.txt when the agent needs routes, contracts, and rules.\",\n },\n {\n title: \"Scaffold first\",\n detail: \"Use create-offramp-app or starters before asking the agent to invent wiring.\",\n },\n {\n title: \"Verify delegation\",\n detail:\n \"Check getVaultStatus() and the returned deposit state; SDK deposits must delegate.\",\n },\n ],\n resources: [\n ...sharedResources,\n {\n label: \"Agent guide\",\n href: OFFRAMP_RESOURCE_LINKS.agentGuide,\n description: \"Context-pack and prompt sequence for AI-assisted integration.\",\n },\n {\n label: \"Full machine reference\",\n href: OFFRAMP_RESOURCE_LINKS.fullMachineReference,\n description: \"Canonical routes, contracts, fees, and extractable answers.\",\n },\n ],\n },\n {\n profile: \"private-otc\",\n title: \"Private OTC flow\",\n summary: \"Restrict a delegated deposit to one approved taker wallet.\",\n steps: [\n {\n title: \"Create with otcTaker\",\n detail:\n \"Pass the buyer wallet in the original offramp() call when the counterparty is known.\",\n },\n {\n title: \"Share the returned otcLink\",\n detail: \"The link is convenience; the whitelist hook is the onchain enforcement.\",\n },\n {\n title: \"Rotate when needed\",\n detail: \"Use enableOtc, disableOtc, and getOtcLink on existing deposits.\",\n },\n ],\n resources: [\n ...sharedResources,\n {\n label: \"Private OTC guide\",\n href: OFFRAMP_RESOURCE_LINKS.privateOtcGuide,\n description: \"Whitelist hook model and helper exports.\",\n },\n ],\n },\n {\n profile: \"webhooks\",\n title: \"Lifecycle webhooks\",\n summary: \"Receive deposit and OTC lifecycle state with HMAC verification.\",\n steps: [\n {\n title: \"Create a Peerlytics API key\",\n detail: \"One key authenticates both Peerlytics and USDCtoFiat developer surfaces.\",\n },\n {\n title: \"Register an endpoint\",\n detail: \"Point the console at an HTTPS endpoint that can read the raw request body.\",\n },\n {\n title: \"Verify before parsing\",\n detail: \"Compute HMAC-SHA256 over timestamp.rawBody and compare to v1 in constant time.\",\n },\n {\n title: \"Reconcile important state\",\n detail: \"Treat events as hints and call deposits(address) or your indexer for hard state.\",\n },\n ],\n resources: [\n ...sharedResources,\n {\n label: \"Webhooks guide\",\n href: OFFRAMP_RESOURCE_LINKS.webhooksGuide,\n description: \"Event names, headers, and replay-window guidance.\",\n },\n {\n label: \"Peerlytics console\",\n href: OFFRAMP_RESOURCE_LINKS.peerlyticsDevelopers,\n description: \"API keys, credits, and endpoint management.\",\n },\n ],\n },\n {\n profile: \"peerlytics\",\n title: \"Peerlytics API\",\n summary: \"Add market data, explorer reads, analytics, and API-credit-backed access.\",\n steps: [\n {\n title: \"Start with deposits\",\n detail: \"@usdctofiat/offramp creates delegated seller inventory without an API key.\",\n },\n {\n title: \"Add the Peerlytics API\",\n detail: \"Use @peerlytics/sdk when the product needs orderbook, analytics, and webhooks.\",\n },\n {\n title: \"Buy credits as usage grows\",\n detail: \"Peerlytics credits back deeper API calls and Pro webhook access.\",\n },\n ],\n resources: [\n ...sharedResources,\n {\n label: \"Peerlytics API guide\",\n href: OFFRAMP_RESOURCE_LINKS.peerlyticsGuide,\n description: \"When to add the paid protocol API alongside the free deposit SDK.\",\n },\n {\n label: \"Peerlytics pricing\",\n href: OFFRAMP_RESOURCE_LINKS.peerlyticsPricing,\n description: \"Credit packs, Free and Pro plans, and API limits.\",\n },\n ],\n },\n];\n\nexport const OFFRAMP_INTEGRATION_CHECKLIST: OfframpIntegrationCheck[] = [\n {\n title: \"Base mainnet wallet client\",\n detail: \"Use a viem WalletClient on chain 8453. The SDK has no public sandbox mode.\",\n required: true,\n },\n {\n title: \"Delegate-vault pricing\",\n detail: \"Every SDK-created deposit must delegate pricing to the managed Delegate vault.\",\n required: true,\n },\n {\n title: \"PayPal/Wise recovery path\",\n detail: \"Catch EXTENSION_REGISTRATION_REQUIRED and drive Peer extension seller registration.\",\n required: true,\n },\n {\n title: \"Server-side duplicate prevention\",\n detail:\n \"Bots and workers must call deposits(address) and use their own order database; idempotencyKey is browser-session scoped and the standalone offramp() helper ignores it.\",\n required: true,\n },\n {\n title: \"Raw-body webhook verification\",\n detail: \"Verify timestamp.rawBody with HMAC-SHA256 before parsing JSON.\",\n required: true,\n },\n];\n\nexport const OFFRAMP_DEVELOPER_RESOURCES: OfframpDeveloperResources = {\n packageName: \"@usdctofiat/offramp\",\n sdkVersion: SDK_VERSION,\n chain: \"base-mainnet\",\n chainId: 8453,\n referrer: REFERRER,\n delegation: {\n required: true,\n rateManagerId: DELEGATE_RATE_MANAGER_ID,\n rateManagerAddress: RATE_MANAGER_REGISTRY_ADDRESS,\n feeRateBps: DELEGATE_MANAGER_FEE_BPS,\n escrow: ESCROW_ADDRESS,\n },\n links: {\n developerPortal: OFFRAMP_RESOURCE_LINKS.developerPortal,\n sdkGuide: OFFRAMP_RESOURCE_LINKS.sdkGuide,\n appGuide: OFFRAMP_RESOURCE_LINKS.appGuide,\n botGuide: OFFRAMP_RESOURCE_LINKS.botGuide,\n agentGuide: OFFRAMP_RESOURCE_LINKS.agentGuide,\n webhooksGuide: OFFRAMP_RESOURCE_LINKS.webhooksGuide,\n privateOtcGuide: OFFRAMP_RESOURCE_LINKS.privateOtcGuide,\n peerlyticsGuide: OFFRAMP_RESOURCE_LINKS.peerlyticsGuide,\n agentSkill: OFFRAMP_RESOURCE_LINKS.agentSkill,\n shortMachineReference: OFFRAMP_RESOURCE_LINKS.shortMachineReference,\n fullMachineReference: OFFRAMP_RESOURCE_LINKS.fullMachineReference,\n starters: OFFRAMP_RESOURCE_LINKS.starters,\n peerlyticsDevelopers: OFFRAMP_RESOURCE_LINKS.peerlyticsDevelopers,\n peerlyticsPricing: OFFRAMP_RESOURCE_LINKS.peerlyticsPricing,\n npm: OFFRAMP_RESOURCE_LINKS.npm,\n },\n playbooks: OFFRAMP_INTEGRATION_PLAYBOOKS,\n checklist: OFFRAMP_INTEGRATION_CHECKLIST,\n};\n\nexport function getOfframpDeveloperResources(\n profile?: OfframpIntegratorProfile,\n): OfframpDeveloperResources | OfframpIntegrationPlaybook {\n if (!profile) return OFFRAMP_DEVELOPER_RESOURCES;\n const playbook = OFFRAMP_INTEGRATION_PLAYBOOKS.find((entry) => entry.profile === profile);\n if (!playbook) return OFFRAMP_DEVELOPER_RESOURCES;\n return playbook;\n}\n\nexport function getOfframpAgentPrompt(profile: OfframpIntegratorProfile = \"app\"): string {\n const playbook = getOfframpDeveloperResources(profile);\n const resource =\n \"profile\" in playbook\n ? playbook\n : OFFRAMP_INTEGRATION_PLAYBOOKS.find((entry) => entry.profile === \"app\");\n const steps = resource?.steps.map((step, index) => `${index + 1}. ${step.title}: ${step.detail}`);\n\n return [\n \"Build a USDC-to-fiat integration with @usdctofiat/offramp.\",\n `Profile: ${profile}.`,\n \"Before coding, read https://usdctofiat.xyz/skills/usdctofiat.md and https://usdctofiat.xyz/llms.txt.\",\n \"Use Base mainnet chainId 8453 and a viem WalletClient; do not invent a sandbox.\",\n \"Do not add manual rate controls; SDK-created deposits must delegate to the Delegate vault.\",\n \"For PayPal, Wise, Venmo, and Cash App, recover EXTENSION_REGISTRATION_REQUIRED through the Peer extension registration flow.\",\n \"For bots/workers, deduplicate with deposits(address) plus your own order database; do not rely on idempotencyKey.\",\n \"For webhooks, verify the raw request body before parsing JSON.\",\n ...(steps ?? []),\n ].join(\"\\n\");\n}\n"],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,SAAS,uBAAuE;AAuBhF,eAAsB,aAAa;AAAA,EACjC;AAAA,EACA,UAAU;AAAA,EACV,aAAa;AAAA,EACb,YAAY;AACd,GAA0C;AACxC,QAAM,WAAW,MAAM,gBAAgB,EAAE,OAAO,QAAQ,GAAG,YAAY,SAAS;AAChF,MAAI,CAAC,SAAS,WAAW,CAAC,SAAS,gBAAgB;AACjD,UAAM,IAAI,MAAM,SAAS,WAAW,4BAA4B;AAAA,EAClE;AACA,SAAO,SAAS;AAClB;AAEO,SAAS,uBACd,MACA,QAC2B;AAC3B,QAAM,SAAS,MAAM,kBAAkB,CAAC;AACxC,QAAM,WAAW,OAAO,UAAU,KAAK,EAAE,YAAY,KAAK;AAC1D,QAAM,oBAAoB,OAAO,mBAAmB,KAAK,EAAE,YAAY,KAAK;AAC5E,MAAI,CAAC,YAAY,CAAC,kBAAmB,QAAO;AAE5C,SACE,OAAO,KAAK,CAAC,UAAU;AACrB,UAAM,YAAY,MAAM,mBAAmB,KAAK,EAAE,YAAY;AAC9D,QAAI,qBAAqB,cAAc,kBAAmB,QAAO;AAEjE,UAAM,gBAAgB,MAAM,cAAc,KAAK,EAAE,YAAY;AAC7D,QAAI,CAAC,YAAY,CAAC,cAAe,QAAO;AACxC,QAAI,kBAAkB,SAAU,QAAO;AAEvC,WAAO,SAAS,WAAW,OAAO,KAAK,cAAc,WAAW,OAAO;AAAA,EACzE,CAAC,KAAK;AAEV;AAEO,SAAS,0BACd,MACA,QACmC;AACnC,MAAI,CAAC,KAAM,QAAO;AAClB,SAAO;AAAA,IACL,MAAM,KAAK;AAAA,IACX,OAAO,uBAAuB,MAAM,MAAM;AAAA,EAC5C;AACF;;;ACjEO,IA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AAuB;AAAA,EAC9B;AAAA,EACA,WAAW;AAAA,EACX,WAAW;AACb;AAEO,SAAS,6BACd,SACwD;AACxD,MAAI,CAAC,QAAS,QAAO;AACrB,QAAM,WAAW,8BAA8B,KAAK,CAAC,UAAU,MAAM,YAAY,OAAO;AACxF,MAAI,CAAC,SAAU,QAAO;AACtB,SAAO;AACT;AAEO,SAAS,sBAAsB,UAAoC,OAAe;AACvF,QAAM,WAAW,6BAA6B,OAAO;AACrD,QAAM,WACJ,aAAa,WACT,WACA,8BAA8B,KAAK,CAAC,UAAU,MAAM,YAAY,KAAK;AAC3E,QAAM,QAAQ,UAAU,MAAM,IAAI,CAAC,MAAM,UAAU,GAAG,QAAQ,CAAC,KAAK,KAAK,KAAK,KAAK,KAAK,MAAM,EAAE;AAEhG,SAAO;AAAA,IACL;AAAA,IACA,YAAY,OAAO;AAAA,IACnB;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA;AAAA,IACA,GAAI,SAAS,CAAC;AAAA,EAChB,EAAE,KAAK,IAAI;AACb;","names":[]}
package/dist/react.cjs CHANGED
@@ -40,7 +40,7 @@ var import_react = require("react");
40
40
 
41
41
  // src/config.ts
42
42
  var import_sdk = require("@zkp2p/sdk");
43
- var SDK_VERSION = "4.4.0";
43
+ var SDK_VERSION = "4.4.2";
44
44
  var BASE_CHAIN_ID = 8453;
45
45
  var RUNTIME_ENV = "production";
46
46
  var API_BASE_URL = "https://api.zkp2p.xyz";