@stable_sea/sdk 0.1.0 → 0.1.2

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
@@ -2,6 +2,9 @@
2
2
 
3
3
  Typed Node.js client for the Stable Sea API.
4
4
 
5
+ For the guided integration setup and interactive API reference, visit
6
+ https://docs.stablesea.com/api/.
7
+
5
8
  ## Install
6
9
 
7
10
  ```sh
@@ -23,15 +26,14 @@ const client = createStableSeaClient({
23
26
  });
24
27
  ```
25
28
 
26
- Node.js 20 or later is supported. Obtain the base URL and a credential from your
27
- Stable Sea contact; the public API is not deployed and credentials are not
28
- self-service. Use `sk_test_…` only with the development host and `sk_live_…` only
29
- with the production host. The credential identifies one business and carries
30
- fixed scopes, so do not send a `Stable-Sea-Account` header.
29
+ Node.js 20 or later is supported. Use `https://api.stablesea.com` as `baseUrl`.
30
+ Ask your Stable Sea contact to enable API access, then create a named `sk_live_…`
31
+ credential in Stable Sea Terminal. The credential identifies one business and
32
+ carries fixed scopes, so do not send a `Stable-Sea-Account` header.
31
33
 
32
34
  | SDK | API contract | Credentials |
33
35
  |---|---|---|
34
- | `0.1.x` | `2026-07-23` | `sk_test_…` on development; `sk_live_…` on production |
36
+ | `0.1.x` | `2026-07-23` | `sk_live_…` on production |
35
37
 
36
38
  ## Idempotent writes
37
39
 
@@ -215,7 +215,7 @@ export interface paths {
215
215
  *
216
216
  * An order can fail at execution for reasons a placement cannot foresee. An express order in particular draws on a shared reserve whose liquidity is not promised by the quote, and a quoted price that has drifted from the NAV the trade executes at is refused rather than filled. A failed order names the reason; an express refusal can be re-placed as standard against the same unexpired quote.
217
217
  *
218
- * Orders execute on the deployment that accepted them, so a credential is refused with environment_not_served when its environment is not the one this host runs orders for — use the host that matches the credential. The refusal is returned before the order exists, so no idempotency key is consumed and nothing is left pending.
218
+ * Orders execute on the production API. Use a production credential created in Stable Sea Terminal with an account from the same business. A credential that this host does not serve is refused with environment_not_served. The refusal is returned before the order exists, so no idempotency key is consumed and nothing is left pending.
219
219
  */
220
220
  post: operations["orders.create"];
221
221
  delete?: never;
@@ -629,7 +629,7 @@ export interface components {
629
629
  allowed?: string[];
630
630
  /** @description Credential ID issued by a duplicate credential-mint request. */
631
631
  api_client_id?: string;
632
- /** @description Stable machine-readable error code (present on 4xx, absent on 5xx). */
632
+ /** @description Stable machine-readable error code when supplied; use error.type for uncoded errors. */
633
633
  code?: string;
634
634
  /** @description Per-field validation breakdown. */
635
635
  errors?: {
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@stable_sea/sdk",
3
- "version": "0.1.0",
3
+ "version": "0.1.2",
4
4
  "type": "module",
5
5
  "sideEffects": false,
6
6
  "files": [
@@ -26,6 +26,7 @@
26
26
  "prepack": "npm run build",
27
27
  "test": "npm run build && npm run test:unit && npm run test:consumer",
28
28
  "test:consumer": "bash scripts/test-consumer.sh",
29
+ "prepare:webhook-acceptance": "bash scripts/prepare-webhook-acceptance.sh",
29
30
  "test:unit": "vitest run --dir test",
30
31
  "typecheck": "npm run build && tsc -p tsconfig.json",
31
32
  "validate": "npm test && tsc -p tsconfig.json"
@@ -40,7 +41,7 @@
40
41
  "vitest": "4.1.11"
41
42
  },
42
43
  "overrides": {
43
- "js-yaml": "^5.2.3",
44
+ "js-yaml": "^5.4.1",
44
45
  "nanoid": "^3.3.17"
45
46
  }
46
47
  }