@ninsei-labs/sdk 0.46.0 → 0.46.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,14 @@
1
+ ## 0.46.1 — 2026-10-21
2
+
3
+ THE FACTORY SELECTORS FOLLOW THE 20-FIELD QUOTE.
4
+
5
+ - `FACTORY_METHODS.predict` is `0x3e949279` and `createOrderAndFund` is `0x3a504547` (the 19-field values were
6
+ `0x0824d205` and `0x4703a9d3`). With the old selectors the node's calldata reverted at the factory on the first
7
+ call, so no order could be created even though the quote itself was correct.
8
+ - `tools/check-factory-selectors.mjs` derives both selectors from `QUOTE_FIELDS` and the ABI types, and a
9
+ breaking run mutates a copy of the module to prove the check reddens. The pair can no longer go stale in
10
+ silence when a field joins the signed tuple.
11
+
1
12
  ## 0.46.0 — 2026-10-21
2
13
 
3
14
  THE QUOTE CARRIES THE CLAIM TIP, AND THE CLAIM PAYS IT.
@@ -10,15 +10,16 @@
10
10
  // feeFor() (the router was removed), so there is nothing to ask. All arguments are static, so calldata is a
11
11
  // selector plus 32-byte words, built here in one place and checked mechanically.
12
12
  //
13
- // cast sig "predict((address,address,address,address,address,address,uint256,uint64,uint64,bytes32,bytes32,bytes32,uint256,uint256,uint256,address,uint64,uint256,uint256),bytes32,bytes32,uint8,bytes32,bytes32,bytes32)" -> 0x0824d205
14
- // cast sig "createOrderAndFund(<same tuple>,...)" -> 0x4703a9d3
13
+ // cast sig "predict((address,address,address,address,address,address,uint256,uint64,uint64,bytes32,bytes32,bytes32,uint256,uint256,uint256,address,uint64,uint256,uint256,uint256),bytes32,bytes32,uint8,bytes32,bytes32,bytes32)" -> 0x3e949279
14
+ // cast sig "createOrderAndFund(<same tuple>,...)" -> 0x3a504547
15
15
 
16
16
  export const FACTORY_METHODS = {
17
- // THE QUOTE GREW THE xmrAmount FIELD: the XMR side of the deal is part of the signed set, so both selectors
18
- // changed a second time (earlier for the cashier field).
19
- predict: "0x0824d205",
17
+ // THE SELECTORS FOLLOW THE 20-FIELD QUOTE. claimTip is the last field of the tuple, so both selectors changed when
18
+ // it joined the signed set; the old 19-field values (0x0824d205 / 0x4703a9d3) address a function this factory no
19
+ // longer has.
20
+ predict: "0x3e949279",
20
21
  // create the escrow AND deposit funds in ONE transaction (a value transfer with the call).
21
- createOrderAndFund: "0x4703a9d3",
22
+ createOrderAndFund: "0x3a504547",
22
23
  };
23
24
 
24
25
  // The OrderCreated event topic. It grew the registry address, the provider and the signing key:
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ninsei-labs/sdk",
3
- "version": "0.46.0",
3
+ "version": "0.46.1",
4
4
  "publishConfig": {
5
5
  "access": "public",
6
6
  "registry": "https://registry.npmjs.org/"
@@ -39,6 +39,7 @@
39
39
  "check:arrival-read": "node tools/check-arrival-read.mjs",
40
40
  "check:daemon-address": "node tools/check-daemon-address.mjs",
41
41
  "check:ci-scripts": "node tools/check-ci-scripts.mjs",
42
+ "check:factory-selectors": "node tools/check-factory-selectors.mjs",
42
43
  "check:fee-estimate": "node tools/check-fee-estimate.mjs",
43
44
  "check:deadline-scale": "node tools/check-deadline-scale.mjs",
44
45
  "check:node-probe": "node tools/check-node-probe.mjs"
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.46.0";
9
+ export const SDK_VERSION = "0.46.1";