@cosmosapp/pay_sdk 1.1.0 → 1.2.0

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/llms/llms.txt ADDED
@@ -0,0 +1,45 @@
1
+ # @cosmosapp/pay_sdk
2
+
3
+ > Object-oriented JavaScript/TypeScript SDK for the Cosmos Pay Payments API:
4
+ > Stellar SEP-7 payment intents, webhooks, products, customers and analytics.
5
+ > Two entry points — `@cosmosapp/pay_sdk` (server) and `@cosmosapp/pay_sdk/web`
6
+ > (browser wallets: Freighter, xBull, Rabet, LOBSTR, Albedo).
7
+
8
+ Key facts an integrator must know: the network is chosen by the API key type
9
+ (`dv_` → testnet, `prod_` → mainnet); amounts are decimal strings (≤ 7 decimals);
10
+ the webhook secret (`whsec_…`) is shown only once on create/rotate; a normal
11
+ integration only sets `apiKey` (the gateway URL is pre-configured); requires
12
+ Node ≥ 18. The flow has three steps: server creates an intent →
13
+ browser completes it with the user's wallet (`WebClient.pay`) →
14
+ server validates the resulting txHash (which fires a webhook).
15
+
16
+ The files below are atomic and self-contained — read the ones relevant to the task.
17
+
18
+ ## Docs
19
+
20
+ - [Overview](./00-overview.md): what the SDK is, the two entry points, the mental model, key facts
21
+ - [Installation](./01-installation.md): npm install, the optional Stellar SDK peer dep, ESM/CJS imports
22
+ - [Authentication](./02-authentication.md): API key, network-by-key-type, keeping the key server-side
23
+ - [Quickstart](./03-quickstart.md): smallest end-to-end flow + the server/browser split
24
+ - [The Client](./04-client.md): managers table, constructor options, structures
25
+ - [Payment intents](./05-payment-intents.md): createPay/createTx, fetch/list, edit/cancel/delete, validate
26
+ - [Web client](./06-web-client.md): browser wallets, pay() options, custom adapters, DI, direct API
27
+ - [Webhooks](./07-webhooks.md): register endpoints, receive events (http/Express), verify signatures
28
+ - [Products & customers](./08-products-customers.md): catalog CRUD + payment stats
29
+ - [Analytics & health](./09-analytics-health.md): summary, balances, logs, liveness/readiness
30
+ - [Assets, wallets & addresses](./10-assets-wallets-addresses.md): typed catalogs + validators
31
+ - [Errors & observability](./11-errors-observability.md): error classes, retries, telemetry events
32
+ - [Configuration](./12-configuration.md): full option reference + self-hosting
33
+ - [Types & enums](./13-types-reference.md): enums, option types, entity payload shapes
34
+
35
+ ## Recipes
36
+
37
+ - [Recipes](./14-recipes.md): checkout, donations, idempotent webhooks, reconciliation, testnet/mainnet
38
+
39
+ ## Optional
40
+
41
+ - [Full docs (single file)](./llms-full.txt): every section above concatenated for one-shot ingestion
42
+ - [Runnable examples](../examples/README.md): one example per feature (`../examples/*.mjs`)
43
+ - [README](../README.md): the human-facing package README
44
+ - [npm package](https://www.npmjs.com/package/@cosmosapp/pay_sdk)
45
+ - [Repository](https://github.com/CosmosPay/CosmosJS_SDK)
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@cosmosapp/pay_sdk",
3
- "version": "1.1.0",
3
+ "version": "1.2.0",
4
4
  "description": "A powerful, object-oriented JavaScript/TypeScript SDK for the Cosmos Pay Payments API — server SDK (Stellar SEP-7 payment intents, webhooks, products, customers, analytics) plus a browser web client that auto-detects Freighter, xBull, Rabet, LOBSTR & Albedo wallets and signs transactions for you.",
5
5
  "keywords": [
6
6
  "cosmos",
@@ -22,7 +22,7 @@
22
22
  "lobstr",
23
23
  "browser"
24
24
  ],
25
- "license": "MIT",
25
+ "license": "SEE LICENSE IN LICENSE",
26
26
  "author": "Cosmos Pay",
27
27
  "repository": {
28
28
  "type": "git",
@@ -61,6 +61,7 @@
61
61
  },
62
62
  "files": [
63
63
  "dist",
64
+ "llms",
64
65
  "README.md",
65
66
  "CHANGELOG.md",
66
67
  "LICENSE"
@@ -73,18 +74,19 @@
73
74
  "dev": "tsup --watch",
74
75
  "typecheck": "tsc --noEmit",
75
76
  "pretest": "npm run build",
76
- "test": "node --test test/client.test.mjs test/rest.test.mjs test/payment-intents.test.mjs test/webhooks.test.mjs test/structures.test.mjs test/web.test.mjs test/catalogs.test.mjs",
77
- "test:watch": "node --test --watch test/client.test.mjs test/rest.test.mjs test/payment-intents.test.mjs test/webhooks.test.mjs test/structures.test.mjs test/web.test.mjs test/catalogs.test.mjs",
77
+ "test": "node --test test/client.test.mjs test/rest.test.mjs test/payment-intents.test.mjs test/swaps.test.mjs test/webhooks.test.mjs test/structures.test.mjs test/web.test.mjs test/catalogs.test.mjs",
78
+ "test:watch": "node --test --watch test/client.test.mjs test/rest.test.mjs test/payment-intents.test.mjs test/swaps.test.mjs test/webhooks.test.mjs test/structures.test.mjs test/web.test.mjs test/catalogs.test.mjs",
78
79
  "prepublishOnly": "npm run build",
79
- "changelog": "node scripts/update-changelog.mjs",
80
+ "changelog": "npx --yes git-cliff@2 -o CHANGELOG.md",
81
+ "llms": "node scripts/build-llms.mjs",
80
82
  "clean": "rimraf dist"
81
83
  },
82
84
  "devDependencies": {
83
- "@types/node": "^22.10.0",
84
- "rimraf": "^6.0.1",
85
- "semver": "^7.6.3",
86
- "tsup": "^8.3.5",
87
- "typescript": "^5.7.2"
85
+ "@types/node": "^26.1.1",
86
+ "rimraf": "^6.1.3",
87
+ "semver": "^7.8.5",
88
+ "tsup": "^8.5.1",
89
+ "typescript": "^5.9.3"
88
90
  },
89
91
  "peerDependencies": {
90
92
  "@stellar/stellar-sdk": ">=11"
@@ -97,5 +99,8 @@
97
99
  "sideEffects": false,
98
100
  "publishConfig": {
99
101
  "access": "public"
102
+ },
103
+ "overrides": {
104
+ "esbuild": "^0.28.1"
100
105
  }
101
106
  }