@chitmark/sdk 0.6.5 → 0.8.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/LICENSE +2 -2
- package/README.md +20 -3
- package/dist/edge.cjs +575 -12
- package/dist/edge.cjs.map +1 -1
- package/dist/edge.d.cts +2 -2
- package/dist/edge.d.ts +2 -2
- package/dist/edge.js +558 -13
- package/dist/edge.js.map +1 -1
- package/dist/index.cjs +608 -12
- package/dist/index.cjs.map +1 -1
- package/dist/index.d.cts +2 -2
- package/dist/index.d.ts +2 -2
- package/dist/index.js +590 -13
- package/dist/index.js.map +1 -1
- package/dist/{trusted-ip-Ngrp6dUP.d.cts → trusted-ip-BvSjdU80.d.cts} +460 -12
- package/dist/{trusted-ip-Ngrp6dUP.d.ts → trusted-ip-BvSjdU80.d.ts} +460 -12
- package/package.json +3 -4
package/LICENSE
CHANGED
|
@@ -1,10 +1,10 @@
|
|
|
1
|
-
Copyright (c) 2026
|
|
1
|
+
Copyright (c) 2026 Chitmark. All rights reserved.
|
|
2
2
|
|
|
3
3
|
Proprietary license. You are granted a non-exclusive, non-transferable,
|
|
4
4
|
worldwide right to use, modify, and integrate this software in applications
|
|
5
5
|
that communicate with the Chitmark API. Redistribution of this software or
|
|
6
6
|
its modifications — in whole or in part — and sublicensing are prohibited
|
|
7
|
-
without prior written consent from
|
|
7
|
+
without prior written consent from Chitmark.
|
|
8
8
|
|
|
9
9
|
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
|
|
10
10
|
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
|
package/README.md
CHANGED
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
# @chitmark/sdk
|
|
2
2
|
|
|
3
|
-
Official TypeScript
|
|
3
|
+
Official TypeScript and JavaScript SDK for Chitmark.
|
|
4
4
|
|
|
5
|
-
|
|
5
|
+
- [Trust Decisions](https://chitmark.com/docs/quickstart/trust-decisions) lets you screen costly actions such as signups, credit grants, and API requests with `verify`, `feedback`, and `challenge`.
|
|
6
|
+
- [Agent Attribution](https://chitmark.com/docs/guides/agent-attribution) lets you recognize returning site sessions and evaluate signed proof from linked agents.
|
|
7
|
+
- [Agent Paid Access](https://chitmark.com/docs/guides/agent-paid-access) lets you buy or sell controlled access to API resources with hosted checkout and seller-controlled delivery.
|
|
6
8
|
|
|
7
9
|
[](https://www.npmjs.com/package/@chitmark/sdk)
|
|
8
10
|
|
|
@@ -18,7 +20,7 @@ pnpm add @chitmark/sdk
|
|
|
18
20
|
|
|
19
21
|
Requires Node >= 24. Runs on Node, browsers, Cloudflare Workers, and other edge runtimes (see the `/edge` entrypoint below).
|
|
20
22
|
|
|
21
|
-
##
|
|
23
|
+
## Trust Decisions quick start
|
|
22
24
|
|
|
23
25
|
```typescript
|
|
24
26
|
import { Chitmark } from "@chitmark/sdk";
|
|
@@ -172,6 +174,21 @@ const chitmark = new Chitmark({ apiKey: env.CHITMARK_API_KEY });
|
|
|
172
174
|
const verdict = await chitmark.verifyRequest(req, { action: "signup" });
|
|
173
175
|
```
|
|
174
176
|
|
|
177
|
+
## Agent Attribution
|
|
178
|
+
|
|
179
|
+
Use an Attribution read key to recognize site sessions or resolve an authorized principal association. Unknown is a successful outcome, and email is nullable.
|
|
180
|
+
|
|
181
|
+
```ts
|
|
182
|
+
const result = await chitmark.attribution.resolve({ request });
|
|
183
|
+
console.log(result.identity.recognized, result.principal.email);
|
|
184
|
+
```
|
|
185
|
+
|
|
186
|
+
See the [Agent Attribution guide](https://chitmark.com/docs/guides/agent-attribution/) for request adapters, link grants, and disclosure rules.
|
|
187
|
+
|
|
188
|
+
## Agent Paid Access
|
|
189
|
+
|
|
190
|
+
Call `chitmark.charge(request)` to request a quote, continue through hosted checkout, or check purchase status. Sellers use separate credentials to reserve execution and record delivery. See the [Agent Paid Access guide](https://chitmark.com/docs/guides/agent-paid-access) for scopes and a complete buyer and seller example.
|
|
191
|
+
|
|
175
192
|
## Agent integration
|
|
176
193
|
|
|
177
194
|
Using Cursor, Claude Code, Codex, or another coding agent? Point it at
|