Task
Create the StellarPay client class as documented in the README at packages/sdk-js/README.md.
Details
- Add
StellarPay class with constructor accepting { apiKey, webhookSecret } config
- Implement
createPayment(params) method that POSTs to the API
- Implement
verifyWebhook(signature, body) that validates HMAC-SHA256 signatures
- Implement
listPayments(filters) method
- Export
StellarPay as default from src/index.ts
Path
packages/sdk-js/src/index.ts
Test
Run pnpm --filter @stellar-pay/sdk-js build to verify no TypeScript errors.
Task
Create the
StellarPayclient class as documented in the README atpackages/sdk-js/README.md.Details
StellarPayclass with constructor accepting{ apiKey, webhookSecret }configcreatePayment(params)method that POSTs to the APIverifyWebhook(signature, body)that validates HMAC-SHA256 signatureslistPayments(filters)methodStellarPayas default fromsrc/index.tsPath
packages/sdk-js/src/index.tsTest
Run
pnpm --filter @stellar-pay/sdk-js buildto verify no TypeScript errors.