@settlemint/dalp-sdk 3.1.19-main.35205572771 → 3.1.19-main.35215736916

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/README.md CHANGED
@@ -161,6 +161,21 @@ Better Auth's client types reference zod, so `zod` is an optional peer
161
161
  dependency: install it if you use `./auth`, skip it otherwise. No code in this
162
162
  package imports zod at runtime.
163
163
 
164
+ An API key works on 8 auth routes only. Each of them is a read:
165
+
166
+ - `GET /get-session`
167
+ - `GET /organization/list`
168
+ - `GET /organization/get-full-organization`
169
+ - `GET /organization/list-members`
170
+ - `POST /organization/has-permission`
171
+ - `GET /api-key/list`
172
+ - `GET /api-key/get`
173
+ - `GET /passkey/list-user-passkeys`
174
+
175
+ Every other auth route answers a request that carries a key with HTTP 403 and
176
+ the code `API_KEY_NOT_SUPPORTED_ON_ROUTE`. Use a session cookie for those
177
+ routes. The API key guide in the DALP API reference has the details.
178
+
164
179
  ## Bundler and paymaster
165
180
 
166
181
  ```ts
@@ -4,6 +4,15 @@ import { Secret } from "../secret.ts";
4
4
  import type { CookieStoreShape } from "../transport/cookie-store.ts";
5
5
  export interface DalpAuthClientConfig {
6
6
  readonly url: string;
7
+ /**
8
+ * API key sent as `x-api-key`. The `/api/auth` routes admit a key on 8 read
9
+ * routes only: `GET /get-session`, `GET /organization/list`,
10
+ * `GET /organization/get-full-organization`, `GET /organization/list-members`,
11
+ * `POST /organization/has-permission`, `GET /api-key/list`, `GET /api-key/get`,
12
+ * and `GET /passkey/list-user-passkeys`. Every other auth route answers a key
13
+ * with HTTP 403 and code `API_KEY_NOT_SUPPORTED_ON_ROUTE`; use a session
14
+ * cookie for those.
15
+ */
7
16
  readonly apiKey?: string;
8
17
  readonly cookie?: string;
9
18
  readonly cookieStore?: CookieStoreShape;
package/dist/auth.js CHANGED
@@ -10,7 +10,7 @@ import {
10
10
  makeCookieStore2,
11
11
  createCookieStoreFetch2,
12
12
  SDK_USER_AGENT2
13
- } from "./chunk-sk59dcme.js";
13
+ } from "./chunk-m6thp54s.js";
14
14
 
15
15
  // src/auth/live.ts
16
16
  import { apiKeyClient } from "@better-auth/api-key/client";
@@ -102,7 +102,7 @@ function createCookieStoreFetch2(cookieStore, fetchImpl = globalThis.fetch) {
102
102
  // package.json
103
103
  var package_default = {
104
104
  name: "@settlemint/dalp-sdk",
105
- version: "3.1.19-main.35205572771",
105
+ version: "3.1.19-main.35215736916",
106
106
  private: false,
107
107
  description: "Fully typed SDK for the DALP tokenization platform API",
108
108
  homepage: "https://settlemint.com",