@ninsei-labs/sdk 0.55.0 → 0.55.1

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/CHANGELOG.md CHANGED
@@ -1,3 +1,10 @@
1
+ ## 0.55.1 — 2026-10-30
2
+
3
+ - Restore the relay wire revision 13 public features type: it has no `capabilities` field. 0.55.0 added the
4
+ old revision 12 list back, so `verifyNodeFeatures` refused every features string the deployed relay serves.
5
+ The fixture is the relay's own revision 13 vector.
6
+ - `@ninsei-labs/sdk/relay` keeps the digests, the verifier, the firm terms digest and the HPKE envelope.
7
+
1
8
  ## 0.55.0 — 2026-10-30
2
9
 
3
10
  - `order.escrowNativeWei` reads the quote's own native amount (`payNative`) for a token-funded order and returns
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ninsei-labs/sdk",
3
- "version": "0.55.0",
3
+ "version": "0.55.1",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org/"
@@ -18,7 +18,7 @@ const DOMAIN_TYPE = "EIP712Domain(string name,string version)";
18
18
  export const FIRM_WINDOW_TYPE =
19
19
  "FirmWindow(string market,string side,string xmrNetwork,uint32 readyMinSeconds,uint32 readyMaxSeconds,uint32 settlementMinSeconds,uint32 settlementMaxSeconds,uint32 quoteTtlSeconds)";
20
20
  export const NODE_FEATURES_TYPE =
21
- "NodeFeatures(string relayId,address provider,address quoteKey,address registry,string[] capabilities,bytes32 hpkeKey,FirmWindow[] firmWindows,uint64 time,bytes32 nonce)" +
21
+ "NodeFeatures(string relayId,address provider,address quoteKey,address registry,bytes32 hpkeKey,FirmWindow[] firmWindows,uint64 time,bytes32 nonce)" +
22
22
  FIRM_WINDOW_TYPE;
23
23
 
24
24
  export const FIRM_WINDOW_FIELDS = [
@@ -36,7 +36,6 @@ export const NODE_FEATURES_FIELDS = [
36
36
  ["provider", "address"],
37
37
  ["quoteKey", "address"],
38
38
  ["registry", "address"],
39
- ["capabilities", "string[]"],
40
39
  ["hpkeKey", "bytes32"],
41
40
  ["firmWindows", "FirmWindow[]"],
42
41
  ["time", "uint64"],
@@ -158,24 +157,10 @@ export function verifyNodeFeatures({ features, terms = null } = {}) {
158
157
  throw new SdkError("quote-refused", { step: "features", why: "signature" });
159
158
  }
160
159
  const hpkeKey = String(features.hpkeKey || "").replace(/^0x/, "").toLowerCase();
161
- if (!Array.isArray(features.capabilities) || features.capabilities.length === 0
162
- || features.capabilities.length > 16
163
- || new Set(features.capabilities).size !== features.capabilities.length
164
- || features.capabilities.some((name) => typeof name !== "string" || name === ""
165
- || name.length > 32 || !/^[ -~]+$/.test(name))) {
166
- throw new SdkError("quote-refused", { step: "features", why: "capabilities" });
167
- }
168
- const firm = features.capabilities.includes("firm/1");
169
- if (firm && (!/^[0-9a-f]{64}$/.test(hpkeKey) || /^0+$/.test(hpkeKey))) {
170
- throw new SdkError("quote-refused", { step: "features", why: "hpke-key" });
171
- }
172
- if (firm && (!Array.isArray(features.firmWindows) || features.firmWindows.length === 0)) {
173
- throw new SdkError("quote-refused", { step: "features", why: "windows" });
174
- }
175
- if (!firm && hpkeKey !== "0".repeat(64)) {
160
+ if (!/^[0-9a-f]{64}$/.test(hpkeKey) || /^0+$/.test(hpkeKey)) {
176
161
  throw new SdkError("quote-refused", { step: "features", why: "hpke-key" });
177
162
  }
178
- if (!firm && Array.isArray(features.firmWindows) && features.firmWindows.length !== 0) {
163
+ if (!Array.isArray(features.firmWindows) || features.firmWindows.length === 0) {
179
164
  throw new SdkError("quote-refused", { step: "features", why: "windows" });
180
165
  }
181
166
  if (terms) {
package/src/version.mjs CHANGED
@@ -6,4 +6,4 @@
6
6
  // tools/sync-version.mjs. Do not edit it by hand - set the version in package.json and run `npm run sync:version`.
7
7
  // The `version` check in tools/check.mjs refuses a mismatch, and refuses a runtime read of package.json here.
8
8
 
9
- export const SDK_VERSION = "0.55.0";
9
+ export const SDK_VERSION = "0.55.1";