{"_id":"@ambulando/paycrest-sdk","_rev":"4-03daee5177476d68063c58deaa0ba0c8","name":"@ambulando/paycrest-sdk","dist-tags":{"latest":"1.3.0"},"versions":{"1.0.0":{"name":"@ambulando/paycrest-sdk","version":"1.0.0","keywords":["paycrest","sdk","stablecoin","offramp","onramp","crypto"],"license":"MIT","_id":"@ambulando/paycrest-sdk@1.0.0","maintainers":[{"name":"ambulando","email":"massi@ambulando.net"}],"dist":{"shasum":"75e80cf1ca8f868ea31710a0d6f7570164586082","tarball":"https://registry.npmjs.org/@ambulando/paycrest-sdk/-/paycrest-sdk-1.0.0.tgz","fileCount":9,"integrity":"sha512-3E3RzXNVxhApQukp70lxnNIDx/wcwAKOJ58M7PUtxTd4WTfPjNdYlRXZVVNZMXc8pCf5EIY55UO9A2qO1a9Zxw==","signatures":[{"sig":"MEUCIDZqGNoj2InzQagGYQ8CiAtyRNZOHQ+/znqsQsaz1oIIAiEAyieF6DruJRZWo2am3wd6kl7yIhM1dYLR339o8rSDnMY=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":121927},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"63a7a356e48245094a08cf756a310f4ce20d0a05","scripts":{"dev":"tsup --watch","lint":"eslint .","test":"vitest run","build":"tsup","typecheck":"tsc --noEmit","test:watch":"vitest"},"_npmUser":{"name":"ambulando","email":"massi@ambulando.net"},"_npmVersion":"11.16.0","description":"TypeScript SDK for the Paycrest API (Sender integration)","directories":{},"_nodeVersion":"26.3.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","eslint":"^9.0.0","vitest":"^1.6.0","typescript":"^5.4.0","@types/node":"^20.11.0"},"_npmOperationalInternal":{"tmp":"tmp/paycrest-sdk_1.0.0_1782036696986_0.4462690907835358","host":"s3://npm-registry-packages-npm-production"}},"1.1.0":{"name":"@ambulando/paycrest-sdk","version":"1.1.0","keywords":["paycrest","sdk","stablecoin","offramp","onramp","crypto"],"license":"MIT","_id":"@ambulando/paycrest-sdk@1.1.0","maintainers":[{"name":"ambulando","email":"massi@ambulando.net"}],"dist":{"shasum":"abab966ef45ba41f5f8e7a4965bf7123b61c5e79","tarball":"https://registry.npmjs.org/@ambulando/paycrest-sdk/-/paycrest-sdk-1.1.0.tgz","fileCount":9,"integrity":"sha512-zXqLUWtcWzOSU5H7Zvqj4Dm1wh9y+TduSkS0ELXngcZMEj7mLnjfzyGJ72tw/hDAd8uRv7KQkBm9tFij6S9ISA==","signatures":[{"sig":"MEUCIQCIXmYrN25SUQ/Ij+EZ/dG1hrRRr2veBUqmZXFAZNnbaQIgYjrxR3BrNpZPNQhG3CF2wh09hUMGOu2qLmIJxdqpd34=","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":128716},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"40a35d721be8401304112444b3324cf47985dd9c","scripts":{"dev":"tsup --watch","lint":"eslint .","test":"vitest run","build":"tsup","typecheck":"tsc --noEmit","test:watch":"vitest","publish:minor":"npm run build && npm version minor && npm publish","publish:patch":"npm run build && npm version patch && npm publish"},"_npmUser":{"name":"ambulando","email":"massi@ambulando.net"},"_npmVersion":"11.16.0","description":"TypeScript SDK for the Paycrest API (Sender integration)","directories":{},"_nodeVersion":"26.3.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","eslint":"^9.0.0","vitest":"^1.6.0","typescript":"^5.4.0","@types/node":"^20.11.0"},"_npmOperationalInternal":{"tmp":"tmp/paycrest-sdk_1.1.0_1782120717087_0.462714427074028","host":"s3://npm-registry-packages-npm-production"}},"1.2.0":{"name":"@ambulando/paycrest-sdk","version":"1.2.0","keywords":["paycrest","sdk","stablecoin","offramp","onramp","crypto"],"license":"MIT","_id":"@ambulando/paycrest-sdk@1.2.0","maintainers":[{"name":"ambulando","email":"massi@ambulando.net"}],"dist":{"shasum":"a5434db72faf21891f5d5741ffcad530d795291e","tarball":"https://registry.npmjs.org/@ambulando/paycrest-sdk/-/paycrest-sdk-1.2.0.tgz","fileCount":9,"integrity":"sha512-WZk9zsfqHMGvaeT+zlvHZBgl1T+CafP3OJojBVDXjBarc32ldHF0vWD38DYreO+i+V1o1oZvKn9BMKGdIHG1Jg==","signatures":[{"sig":"MEQCIDKc63nQ6atjedqbwnATIETnlCchNMlG2YEffHj3tXV1AiB0awYQtfV7PGkm/rxMtVyJkBn8R9RtGlxX+pzvzhe5dQ==","keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U"}],"unpackedSize":129702},"main":"./dist/index.cjs","type":"module","types":"./dist/index.d.ts","module":"./dist/index.js","engines":{"node":">=18"},"exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"gitHead":"fdb3570821e201bd4165e11f518ac5b2b09cee8d","scripts":{"dev":"tsup --watch","lint":"eslint .","test":"vitest run","build":"tsup","typecheck":"tsc --noEmit","test:watch":"vitest","publish:minor":"npm run build && npm version minor && npm publish","publish:patch":"npm run build && npm version patch && npm publish"},"_npmUser":{"name":"ambulando","email":"massi@ambulando.net"},"_npmVersion":"11.16.0","description":"TypeScript SDK for the Paycrest API (Sender integration)","directories":{},"_nodeVersion":"26.3.0","publishConfig":{"access":"public"},"_hasShrinkwrap":false,"devDependencies":{"tsup":"^8.0.0","eslint":"^9.0.0","vitest":"^1.6.0","typescript":"^5.4.0","@types/node":"^20.11.0"},"_npmOperationalInternal":{"tmp":"tmp/paycrest-sdk_1.2.0_1782145479980_0.7497930834620616","host":"s3://npm-registry-packages-npm-production"}},"1.3.0":{"name":"@ambulando/paycrest-sdk","version":"1.3.0","description":"TypeScript SDK for the Paycrest API (Sender integration)","publishConfig":{"access":"public"},"type":"module","main":"./dist/index.cjs","module":"./dist/index.js","types":"./dist/index.d.ts","exports":{".":{"types":"./dist/index.d.ts","import":"./dist/index.js","require":"./dist/index.cjs"}},"engines":{"node":">=18"},"scripts":{"build":"tsup","dev":"tsup --watch","typecheck":"tsc --noEmit","lint":"eslint .","test":"vitest run","test:watch":"vitest","publish:patch":"npm run build && npm version patch && npm publish","publish:minor":"npm run build && npm version minor && npm publish"},"keywords":["paycrest","sdk","stablecoin","offramp","onramp","crypto"],"license":"MIT","devDependencies":{"@types/node":"^20.11.0","eslint":"^9.0.0","tsup":"^8.0.0","typescript":"^5.4.0","vitest":"^1.6.0"},"gitHead":"02f1c6f22468ed07368a53375fe812b3547b459c","_id":"@ambulando/paycrest-sdk@1.3.0","_nodeVersion":"26.3.0","_npmVersion":"11.16.0","dist":{"integrity":"sha512-uSJ5KVRwczfQc57MIMk9m/4XmewxN+2bRTc7U5qtM4Ka4ExFRwQDq1EUiA3nVX+Tx/2qiOZgtmBqMJIzZ24Q1g==","shasum":"e21370b29007eb6f947968eda93dc51c7aaed33a","tarball":"https://registry.npmjs.org/@ambulando/paycrest-sdk/-/paycrest-sdk-1.3.0.tgz","fileCount":9,"unpackedSize":130696,"signatures":[{"keyid":"SHA256:DhQ8wR5APBvFHLF/+Tc+AYvPOdTpcIDqOhxsBHRwC7U","sig":"MEQCIBOCQka3t4y0kLW45C5HrHUwgjBgtp1dO7q7tAQQ/MO9AiAsh6s1920z0hK5UodpFZ4u1PSMpfOmQ34lJgbYj0OYGA=="}]},"_npmUser":{"name":"ambulando","email":"massi@ambulando.net"},"directories":{},"maintainers":[{"name":"ambulando","email":"massi@ambulando.net"}],"_npmOperationalInternal":{"host":"s3://npm-registry-packages-npm-production","tmp":"tmp/paycrest-sdk_1.3.0_1782148096134_0.21942814886177664"},"_hasShrinkwrap":false}},"time":{"created":"2026-06-21T10:11:36.792Z","modified":"2026-06-22T17:08:16.430Z","1.0.0":"2026-06-21T10:11:37.130Z","1.1.0":"2026-06-22T09:31:57.240Z","1.2.0":"2026-06-22T16:24:40.121Z","1.3.0":"2026-06-22T17:08:16.302Z"},"license":"MIT","keywords":["paycrest","sdk","stablecoin","offramp","onramp","crypto"],"description":"TypeScript SDK for the Paycrest API (Sender integration)","maintainers":[{"name":"ambulando","email":"massi@ambulando.net"}],"readme":"# @ambulando/paycrest-sdk\n\nTypeScript SDK for the [Paycrest API](https://docs.paycrest.io). Covers the\nSender integration: creating and tracking payment orders (on/off-ramp),\nfetching public rates, verifying recipient accounts, and verifying webhooks.\n\n> **Status:** early-stage stub. The surface mirrors the documented API but has\n> not been validated end-to-end against a live account.\n\n## Install\n\n```bash\nnpm install @ambulando/paycrest-sdk\n```\n\nRequires Node.js 18+ (uses the global `fetch` and `node:crypto`).\n\n## Usage\n\n```ts\nimport { PaycrestClient } from \"@ambulando/paycrest-sdk\";\n\nconst client = new PaycrestClient({\n  apiKey: process.env.PAYCREST_API_KEY,\n  apiSecret: process.env.PAYCREST_API_SECRET, // for webhook verification\n});\n\n// Create an off-ramp order (crypto -> fiat)\nconst order = await client.sender.createOrder({\n  amount: \"100\",\n  source: { type: \"crypto\", currency: \"USDT\", network: \"base\" },\n  destination: {\n    type: \"fiat\",\n    currency: \"NGN\",\n    recipient: {\n      institution: \"GTBINGLA\",\n      accountIdentifier: \"0123456789\",\n      accountName: \"John Doe\",\n    },\n  },\n  reference: \"my-internal-id-123\",\n});\n\n// Track status\nconst latest = await client.sender.getOrder(order.id);\n```\n\n### Public rates (no API key required)\n\n```ts\nconst rates = await client.general.getRates({\n  network: \"base\",\n  from: \"USDT\",\n  amount: \"100\",\n  to: \"NGN\",\n});\n```\n\n### Webhooks\n\nVerify the `X-Paycrest-Signature` header against the **raw** request body:\n\n```ts\nimport { constructEvent } from \"@ambulando/paycrest-sdk\";\n\nconst event = constructEvent(rawBody, signature, process.env.PAYCREST_API_SECRET!);\nif (event.event === \"payment_order.settled\") {\n  // handle settlement\n}\n```\n\n## Notes\n\n- Amounts, rates, and fees are decimal **strings**, not numbers.\n- The default base URL is `https://api.paycrest.io/v2`; override with `baseUrl`.\n","readmeFilename":"README.md"}