@reclaimprotocol/client 0.1.22 → 0.1.24

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/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@reclaimprotocol/client",
3
3
  "title": "Reclaim Client",
4
- "version": "0.1.22",
4
+ "version": "0.1.24",
5
5
  "description": "Typed SDK/HTTP client SDK for the Reclaim Protocol — the programmatic way to use Reclaim Protocol to verify **data points** about your users (a follower count, an account balance, an order). Can be directly integrated by apps to request verification for their users using Reclaim Protocol and verify the results.",
6
6
  "type": "module",
7
7
  "sideEffects": false,
package/src/client.ts CHANGED
@@ -26,7 +26,7 @@ export type ReclaimClientOptions = {
26
26
 
27
27
  /**
28
28
  * Core HTTP client. Shared by the SDK entrypoint, MCP server, and CLI —
29
- * extend behaviour here rather than duplicating it across surfaces.
29
+ * extend behavior here rather than duplicating it across surfaces.
30
30
  *
31
31
  * Per @reclaimprotocol/app conventions, validation lives in the openapi
32
32
  * spec; this client forwards requests and maps RFC 9457 problem responses
@@ -103,7 +103,7 @@ export class ReclaimClient {
103
103
  headers['Authorization'] = `Bearer ${this.#token}`
104
104
  }
105
105
 
106
- // Per-request header parameters (e.g. `If-Match` for optimistic
106
+ // Per-request header parameters (for example, `If-Match` for optimistic
107
107
  // concurrency). Applied last so spec-declared headers win over the
108
108
  // client-wide defaults, but never override Authorization.
109
109
  if(args.headers) {
@@ -121,9 +121,9 @@ export class ReclaimClient {
121
121
  headers,
122
122
  }
123
123
  // Write methods always carry a JSON body (defaulting to `{}`) plus a
124
- // Content-Type. Some endpoints — e.g. the auth-only attach session —
125
- // take an empty body, and omitting Content-Type makes the server
126
- // reject the request with `415 unsupported media type`.
124
+ // Content-Type. Some endpoints — for example, the auth-only attach session
125
+ // — take an empty body, and omitting Content-Type makes the server reject
126
+ // the request with `415 unsupported media type`.
127
127
  const method = op.method.toLowerCase()
128
128
  if(method !== 'get' && method !== 'head') {
129
129
  init.body = JSON.stringify(args.body ?? {})
package/src/eip191.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * EIP-191 / `personal_sign` primitives shared by the verification paths
3
3
  * (attestor-proof recovery) and by callers that need to *produce* a
4
- * personal_sign signature with a raw eth key (e.g. the old-devtools
4
+ * personal_sign signature with a raw eth key (for example, the old-devtools
5
5
  * link-app flow) — without pulling in a full wallet library.
6
6
  */
7
7
  import { keccak_256 } from '@noble/hashes/sha3.js'
package/src/result.ts CHANGED
@@ -58,9 +58,10 @@ export interface VerifyResultOutcome {
58
58
  * (which only relays the ciphertext). Consumers never call this — they only
59
59
  * {@link decryptCallback}.
60
60
  *
61
- * `plaintext` is bytes (e.g. `new TextEncoder().encode(JSON.stringify(jws))`);
62
- * returns the ciphertext as a base64url string (single token, never starts with
63
- * `{`, so {@link decryptCallback} can tell it apart from a plaintext JWS JSON).
61
+ * `plaintext` is bytes (for example, `new
62
+ * TextEncoder().encode(JSON.stringify(jws))`); returns the ciphertext as a
63
+ * base64url string (single token, never starts with `{`, so {@link
64
+ * decryptCallback} can tell it apart from a plaintext JWS JSON).
64
65
  */
65
66
  export async function encryptForEthPublicKey(
66
67
  publicJwk: Jwk,
@@ -269,7 +270,7 @@ export interface VerifyResultFullOutcome extends VerifyResultOutcome {
269
270
  * // result is verified — use result.payload
270
271
  * } catch (err) {
271
272
  * if (err instanceof ResultVerificationError) {
272
- * // e.g. 'expired', { payload, … }
273
+ * // for example, 'expired', { payload, … }
273
274
  * console.error(err.reason, err.outcome)
274
275
  * }
275
276
  * }
package/src/routes.gen.ts CHANGED
@@ -5,6 +5,7 @@
5
5
 
6
6
  export const ROUTES = {
7
7
  "AcceptOrgInvite": {"method":"post","path":"/orgs/{orgId}/invite"},
8
+ "ActivateFixWithAiRepair": {"method":"post","path":"/v/{sessionId}/fix-with-ai/activate"},
8
9
  "AddOrgMember": {"method":"post","path":"/orgs/{orgId}/members"},
9
10
  "AddStaffMember": {"method":"post","path":"/admin/staff"},
10
11
  "AddVerificationClientKey": {"method":"post","path":"/admin/verification-clients/{clientId}/keys"},
@@ -17,6 +18,7 @@ export const ROUTES = {
17
18
  "AdminProviders": {"method":"get","path":"/admin/providers"},
18
19
  "AdminReviews": {"method":"get","path":"/admin/reviews"},
19
20
  "AdminSessions": {"method":"get","path":"/admin/sessions"},
21
+ "AdminSetProviderFixWithAi": {"method":"put","path":"/admin/providers/{providerId}/fix-with-ai"},
20
22
  "AdminSetUserOrgLimit": {"method":"put","path":"/users/{userId}/org-limit"},
21
23
  "AdminSubscribeOrgPlan": {"method":"post","path":"/admin/orgs/{orgId}/billing/subscribe"},
22
24
  "AdminThemes": {"method":"get","path":"/admin/themes"},
@@ -33,6 +35,7 @@ export const ROUTES = {
33
35
  "CreateBillingPortalSession": {"method":"post","path":"/orgs/{orgId}/billing/portal"},
34
36
  "CreateCallbackSubscription": {"method":"post","path":"/verifications/callback-subscriptions"},
35
37
  "CreateCreditCheckoutSession": {"method":"post","path":"/orgs/{orgId}/billing/credits/checkout"},
38
+ "CreateFixWithAiSession": {"method":"post","path":"/v/{sessionId}/fix-with-ai"},
36
39
  "CreateManualTransaction": {"method":"post","path":"/admin/billing/transactions"},
37
40
  "CreateOrg": {"method":"post","path":"/orgs"},
38
41
  "CreateOrgCallbackSubscription": {"method":"post","path":"/orgs/{orgId}/callback-subscriptions"},
@@ -59,6 +62,7 @@ export const ROUTES = {
59
62
  "DisposeVerificationSession": {"method":"post","path":"/v/{sessionId}/dispose"},
60
63
  "Docs": {"method":"get","path":"/docs"},
61
64
  "ExplorePreviewImage": {"method":"get","path":"/og/explore.png"},
65
+ "FixWithAiRecovery": {"method":"get","path":"/v/{sessionId}/fix-with-ai"},
62
66
  "GetImage": {"method":"get","path":"/images/{imageId}"},
63
67
  "GetMe": {"method":"get","path":"/me"},
64
68
  "GetOrg": {"method":"get","path":"/orgs/{orgId}"},
package/src/secp.ts CHANGED
@@ -1,7 +1,7 @@
1
1
  /**
2
2
  * Shared `@noble/secp256k1` instance with the v3 hash hooks wired once
3
3
  * (sign + recover need SHA-256 / HMAC-SHA256). Import `secp` from here — never
4
- * set `secp.hashes` ad-hoc — so the hooks are guaranteed initialised before any
4
+ * set `secp.hashes` ad-hoc — so the hooks are guaranteed initialized before any
5
5
  * sign/verify/recover call, regardless of import order.
6
6
  */
7
7
  import { hmac } from '@noble/hashes/hmac.js'