@inversealtruism/cairn-sdk 0.4.3 → 0.4.5

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/dist/board.cjs CHANGED
@@ -27,7 +27,7 @@ var import_csd_codec = require("@inversealtruism/csd-codec");
27
27
  var import_csd_codec2 = require("@inversealtruism/csd-codec");
28
28
 
29
29
  // src/errors.ts
30
- var SDK_VERSION = "0.4.3";
30
+ var SDK_VERSION = "0.4.5";
31
31
  var DOCS_BASE = "https://cairn-substrate.com/docs/sdk";
32
32
  var CairnError = class extends Error {
33
33
  /** Stable machine code for programmatic branching. */
package/dist/board.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  BoardClient
3
- } from "./chunk-WEVDLGKT.js";
4
- import "./chunk-EJENF4OP.js";
3
+ } from "./chunk-IGJ46AYP.js";
4
+ import "./chunk-LOAOBV36.js";
5
5
  export {
6
6
  BoardClient
7
7
  };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ContentVerificationError
3
- } from "./chunk-EJENF4OP.js";
3
+ } from "./chunk-LOAOBV36.js";
4
4
 
5
5
  // src/content.ts
6
6
  import { payloadHash, canonicalJson, verifyContentBytes } from "@inversealtruism/csd-codec";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  CairnError
3
- } from "./chunk-EJENF4OP.js";
3
+ } from "./chunk-LOAOBV36.js";
4
4
 
5
5
  // src/board.ts
6
6
  import { payloadHash } from "@inversealtruism/csd-codec";
@@ -1,5 +1,5 @@
1
1
  // src/errors.ts
2
- var SDK_VERSION = "0.4.3";
2
+ var SDK_VERSION = "0.4.5";
3
3
  var DOCS_BASE = "https://cairn-substrate.com/docs/sdk";
4
4
  var CairnError = class extends Error {
5
5
  /** Stable machine code for programmatic branching. */
@@ -4,7 +4,7 @@ import {
4
4
  UnsupportedMethodError,
5
5
  mapProviderError,
6
6
  mapSubmitResultError
7
- } from "./chunk-EJENF4OP.js";
7
+ } from "./chunk-LOAOBV36.js";
8
8
 
9
9
  // src/connect.ts
10
10
  var DEFAULT_PROVIDER_TIMEOUT_MS = 10 * 6e4;
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  HttpError
3
- } from "./chunk-EJENF4OP.js";
3
+ } from "./chunk-LOAOBV36.js";
4
4
 
5
5
  // src/registry.ts
6
6
  import { fromRecords } from "@inversealtruism/csd-registry";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getWallet
3
- } from "./chunk-XZGNVYH3.js";
3
+ } from "./chunk-SWCUE26T.js";
4
4
 
5
5
  // src/controller.ts
6
6
  var DISCONNECTED = Object.freeze({ status: "disconnected", account: null, error: null });
package/dist/connect.cjs CHANGED
@@ -30,7 +30,7 @@ __export(connect_exports, {
30
30
  module.exports = __toCommonJS(connect_exports);
31
31
 
32
32
  // src/errors.ts
33
- var SDK_VERSION = "0.4.3";
33
+ var SDK_VERSION = "0.4.5";
34
34
  var DOCS_BASE = "https://cairn-substrate.com/docs/sdk";
35
35
  var CairnError = class extends Error {
36
36
  /** Stable machine code for programmatic branching. */
package/dist/connect.js CHANGED
@@ -5,8 +5,8 @@ import {
5
5
  discoverProviders,
6
6
  getWallet,
7
7
  isInstalled
8
- } from "./chunk-XZGNVYH3.js";
9
- import "./chunk-EJENF4OP.js";
8
+ } from "./chunk-SWCUE26T.js";
9
+ import "./chunk-LOAOBV36.js";
10
10
  export {
11
11
  WalletConnection,
12
12
  connect,
package/dist/content.cjs CHANGED
@@ -26,7 +26,7 @@ module.exports = __toCommonJS(content_exports);
26
26
  var import_csd_codec = require("@inversealtruism/csd-codec");
27
27
 
28
28
  // src/errors.ts
29
- var SDK_VERSION = "0.4.3";
29
+ var SDK_VERSION = "0.4.5";
30
30
  var DOCS_BASE = "https://cairn-substrate.com/docs/sdk";
31
31
  var CairnError = class extends Error {
32
32
  /** Stable machine code for programmatic branching. */
package/dist/content.js CHANGED
@@ -1,7 +1,7 @@
1
1
  import {
2
2
  ContentClient
3
- } from "./chunk-V7C5GXQY.js";
4
- import "./chunk-EJENF4OP.js";
3
+ } from "./chunk-FX5LLMNP.js";
4
+ import "./chunk-LOAOBV36.js";
5
5
  export {
6
6
  ContentClient
7
7
  };
@@ -25,7 +25,7 @@ __export(controller_exports, {
25
25
  module.exports = __toCommonJS(controller_exports);
26
26
 
27
27
  // src/errors.ts
28
- var SDK_VERSION = "0.4.3";
28
+ var SDK_VERSION = "0.4.5";
29
29
  var DOCS_BASE = "https://cairn-substrate.com/docs/sdk";
30
30
  var CairnError = class extends Error {
31
31
  /** Stable machine code for programmatic branching. */
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  CairnController
3
- } from "./chunk-BFQVPITS.js";
4
- import "./chunk-XZGNVYH3.js";
5
- import "./chunk-EJENF4OP.js";
3
+ } from "./chunk-XW3IFE6K.js";
4
+ import "./chunk-SWCUE26T.js";
5
+ import "./chunk-LOAOBV36.js";
6
6
  export {
7
7
  CairnController
8
8
  };
package/dist/index.cjs CHANGED
@@ -60,7 +60,7 @@ __export(index_exports, {
60
60
  module.exports = __toCommonJS(index_exports);
61
61
 
62
62
  // src/errors.ts
63
- var SDK_VERSION = "0.4.3";
63
+ var SDK_VERSION = "0.4.5";
64
64
  var DOCS_BASE = "https://cairn-substrate.com/docs/sdk";
65
65
  var CairnError = class extends Error {
66
66
  /** Stable machine code for programmatic branching. */
@@ -1526,7 +1526,7 @@ var CairnController = class {
1526
1526
  };
1527
1527
 
1528
1528
  // src/index.ts
1529
- var DEFAULT_SPV_CHECKPOINT = { height: 66589, hash: "0x00000000000027088f7a801555e1863d96a11fd4c258f86ca2c2506bd59ea698" };
1529
+ var DEFAULT_SPV_CHECKPOINT = { height: 101998, hash: "0x0000000000085295c9e13bbf276a11affb5470059235d1ea85d6334c8b43c49c" };
1530
1530
  var DEFAULT_CAIRN = "https://cairn-substrate.com";
1531
1531
  var SPV_HTTP_TIMEOUT_MS = 15e3;
1532
1532
  var SPV_HTTP_MAX_RETRIES = 4;
package/dist/index.d.cts CHANGED
@@ -160,7 +160,7 @@ declare function preverifyOffer(opts: {
160
160
 
161
161
  /** Stable machine-readable error codes (branch on these, not the message text). */
162
162
  type CairnErrorCode = "NOT_INSTALLED" | "USER_REJECTED" | "WALLET_LOCKED" | "UNSUPPORTED_METHOD" | "HTTP_ERROR" | "CONTENT_VERIFICATION" | "ACCOUNT_CHANGED" | "FIRST_PARTY_ONLY" | "RATE_LIMITED" | "APPROVAL_CLOSED" | "FORBIDDEN" | "INTERNAL" | "GHOST_INPUTS_SKIPPED" | "VERIFY_UNAVAILABLE" | "VERIFY_TAMPER" | "INSUFFICIENT" | "TOO_MANY_INPUTS" | "FEE_TOO_LOW" | "FEE_CAP" | "BAD_FEE" | "ZERO_ADDR_REFUSED" | "BAD_OUTPUTS" | "NO_OUTPUTS" | "BAD_REQUEST" | "OFFER_UNKNOWN" | "FILL_UNSAFE" | "FILL_WRONG_TARGET" | "SOURCE_DIVERGENCE" | "SUBMIT_REJECTED" | "SUBMIT_MAYBE_INFLIGHT" | "SUBMIT_DUPLICATE" | "NOTHING_TO_CONSOLIDATE" | "UNKNOWN";
163
- declare const SDK_VERSION = "0.4.3";
163
+ declare const SDK_VERSION = "0.4.5";
164
164
  interface CairnErrorOptions {
165
165
  code?: CairnErrorCode;
166
166
  docsPath?: string;
@@ -180,7 +180,7 @@ declare class CairnError extends Error {
180
180
  /** Relative docs path (under the SDK docs base), if any. */
181
181
  readonly docsPath?: string;
182
182
  /** The cairn-sdk version that produced this error. */
183
- readonly version = "0.4.3";
183
+ readonly version = "0.4.5";
184
184
  /**
185
185
  * Whether a dApp may safely AUTO-retry this failure. `false` for fund-safety refusals and user-intent
186
186
  * declines (the default); `true` only for provably transient infra faults where nothing was signed.
package/dist/index.d.ts CHANGED
@@ -160,7 +160,7 @@ declare function preverifyOffer(opts: {
160
160
 
161
161
  /** Stable machine-readable error codes (branch on these, not the message text). */
162
162
  type CairnErrorCode = "NOT_INSTALLED" | "USER_REJECTED" | "WALLET_LOCKED" | "UNSUPPORTED_METHOD" | "HTTP_ERROR" | "CONTENT_VERIFICATION" | "ACCOUNT_CHANGED" | "FIRST_PARTY_ONLY" | "RATE_LIMITED" | "APPROVAL_CLOSED" | "FORBIDDEN" | "INTERNAL" | "GHOST_INPUTS_SKIPPED" | "VERIFY_UNAVAILABLE" | "VERIFY_TAMPER" | "INSUFFICIENT" | "TOO_MANY_INPUTS" | "FEE_TOO_LOW" | "FEE_CAP" | "BAD_FEE" | "ZERO_ADDR_REFUSED" | "BAD_OUTPUTS" | "NO_OUTPUTS" | "BAD_REQUEST" | "OFFER_UNKNOWN" | "FILL_UNSAFE" | "FILL_WRONG_TARGET" | "SOURCE_DIVERGENCE" | "SUBMIT_REJECTED" | "SUBMIT_MAYBE_INFLIGHT" | "SUBMIT_DUPLICATE" | "NOTHING_TO_CONSOLIDATE" | "UNKNOWN";
163
- declare const SDK_VERSION = "0.4.3";
163
+ declare const SDK_VERSION = "0.4.5";
164
164
  interface CairnErrorOptions {
165
165
  code?: CairnErrorCode;
166
166
  docsPath?: string;
@@ -180,7 +180,7 @@ declare class CairnError extends Error {
180
180
  /** Relative docs path (under the SDK docs base), if any. */
181
181
  readonly docsPath?: string;
182
182
  /** The cairn-sdk version that produced this error. */
183
- readonly version = "0.4.3";
183
+ readonly version = "0.4.5";
184
184
  /**
185
185
  * Whether a dApp may safely AUTO-retry this failure. `false` for fund-safety refusals and user-intent
186
186
  * declines (the default); `true` only for provably transient infra faults where nothing was signed.
package/dist/index.js CHANGED
@@ -2,23 +2,23 @@ import {
2
2
  Http,
3
3
  RegistryClient,
4
4
  readCapped
5
- } from "./chunk-KCRJL5HD.js";
5
+ } from "./chunk-WZFWAEXL.js";
6
6
  import {
7
7
  BoardClient
8
- } from "./chunk-WEVDLGKT.js";
8
+ } from "./chunk-IGJ46AYP.js";
9
9
  import {
10
10
  Chain,
11
11
  LightClient
12
12
  } from "./chunk-C452UODV.js";
13
13
  import {
14
14
  ContentClient
15
- } from "./chunk-V7C5GXQY.js";
15
+ } from "./chunk-FX5LLMNP.js";
16
16
  import {
17
17
  IndexerClient
18
18
  } from "./chunk-J5J4JEJ6.js";
19
19
  import {
20
20
  CairnController
21
- } from "./chunk-BFQVPITS.js";
21
+ } from "./chunk-XW3IFE6K.js";
22
22
  import {
23
23
  WalletConnection,
24
24
  connect,
@@ -26,7 +26,7 @@ import {
26
26
  discoverProviders,
27
27
  getWallet,
28
28
  isInstalled
29
- } from "./chunk-XZGNVYH3.js";
29
+ } from "./chunk-SWCUE26T.js";
30
30
  import {
31
31
  CairnError,
32
32
  ContentVerificationError,
@@ -40,7 +40,7 @@ import {
40
40
  errorCode,
41
41
  mapProviderError,
42
42
  mapSubmitResultError
43
- } from "./chunk-EJENF4OP.js";
43
+ } from "./chunk-LOAOBV36.js";
44
44
 
45
45
  // src/names.ts
46
46
  import { NAME_RE, RESERVED_NAMES } from "@inversealtruism/cairnx-core";
@@ -286,7 +286,7 @@ async function preverifyOffer(opts) {
286
286
  }
287
287
 
288
288
  // src/index.ts
289
- var DEFAULT_SPV_CHECKPOINT = { height: 66589, hash: "0x00000000000027088f7a801555e1863d96a11fd4c258f86ca2c2506bd59ea698" };
289
+ var DEFAULT_SPV_CHECKPOINT = { height: 101998, hash: "0x0000000000085295c9e13bbf276a11affb5470059235d1ea85d6334c8b43c49c" };
290
290
  var DEFAULT_CAIRN = "https://cairn-substrate.com";
291
291
  var SPV_HTTP_TIMEOUT_MS = 15e3;
292
292
  var SPV_HTTP_MAX_RETRIES = 4;
package/dist/react.cjs CHANGED
@@ -26,7 +26,7 @@ __export(react_exports, {
26
26
  module.exports = __toCommonJS(react_exports);
27
27
 
28
28
  // src/errors.ts
29
- var SDK_VERSION = "0.4.3";
29
+ var SDK_VERSION = "0.4.5";
30
30
  var DOCS_BASE = "https://cairn-substrate.com/docs/sdk";
31
31
  var CairnError = class extends Error {
32
32
  /** Stable machine code for programmatic branching. */
package/dist/react.js CHANGED
@@ -1,8 +1,8 @@
1
1
  import {
2
2
  CairnController
3
- } from "./chunk-BFQVPITS.js";
4
- import "./chunk-XZGNVYH3.js";
5
- import "./chunk-EJENF4OP.js";
3
+ } from "./chunk-XW3IFE6K.js";
4
+ import "./chunk-SWCUE26T.js";
5
+ import "./chunk-LOAOBV36.js";
6
6
 
7
7
  // src/react.ts
8
8
  function createCairnHooks(React, controllerOrOpts) {
package/dist/registry.cjs CHANGED
@@ -36,7 +36,7 @@ module.exports = __toCommonJS(registry_exports);
36
36
  var import_csd_registry = require("@inversealtruism/csd-registry");
37
37
 
38
38
  // src/errors.ts
39
- var SDK_VERSION = "0.4.3";
39
+ var SDK_VERSION = "0.4.5";
40
40
  var DOCS_BASE = "https://cairn-substrate.com/docs/sdk";
41
41
  var CairnError = class extends Error {
42
42
  /** Stable machine code for programmatic branching. */
package/dist/registry.js CHANGED
@@ -10,8 +10,8 @@ import {
10
10
  verifyGateway,
11
11
  verifyIdentitySig,
12
12
  verifyPeer
13
- } from "./chunk-KCRJL5HD.js";
14
- import "./chunk-EJENF4OP.js";
13
+ } from "./chunk-WZFWAEXL.js";
14
+ import "./chunk-LOAOBV36.js";
15
15
  export {
16
16
  DOMAINS,
17
17
  RegistryClient,
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@inversealtruism/cairn-sdk",
3
- "version": "0.4.3",
4
- "description": "The Compute Substrate dApp kit \u2014 one cohesive toolkit to connect the Cairn Wallet, read the chain/board, publish self-certifying content, and resolve registries. Composes the published csd-* primitives.",
3
+ "version": "0.4.5",
4
+ "description": "The Compute Substrate dApp kit — one cohesive toolkit to connect the Cairn Wallet, read the chain/board, publish self-certifying content, and resolve registries. Composes the published csd-* primitives.",
5
5
  "type": "module",
6
6
  "main": "./dist/index.cjs",
7
7
  "module": "./dist/index.js",
@@ -58,31 +58,17 @@
58
58
  "LICENSE",
59
59
  "README.md"
60
60
  ],
61
- "scripts": {
62
- "build": "tsup src/index.ts src/connect.ts src/board.ts src/indexer.ts src/content.ts src/registry.ts src/chain.ts src/controller.ts src/react.ts --format esm,cjs --dts --clean",
63
- "test": "node test/run.mjs",
64
- "test:live": "node examples/read-only.mjs",
65
- "build:example": "node scripts/build-example.mjs",
66
- "clean": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\"",
67
- "test:e2e:read": "node test/e2e/e2e-read.mjs",
68
- "test:e2e:wallet": "xvfb-run -a node test/e2e/e2e-wallet-connect.mjs",
69
- "test:e2e:write": "node test/e2e/e2e-write.mjs",
70
- "test:e2e": "node test/e2e/e2e-read.mjs && xvfb-run -a node test/e2e/e2e-wallet-connect.mjs",
71
- "test:all": "pnpm test && pnpm test:e2e",
72
- "prepack": "pnpm build",
73
- "prepublishOnly": "npm run build && npm test"
74
- },
75
61
  "dependencies": {
76
- "@inversealtruism/cairnx-core": "0.1.41",
62
+ "@inversealtruism/cairnx-core": "0.1.42",
77
63
  "@inversealtruism/csd-client": "0.1.16",
78
64
  "@inversealtruism/csd-codec": "0.1.16",
79
- "@inversealtruism/csd-crypto": "0.1.15",
80
- "@inversealtruism/csd-light": "0.1.19",
81
- "@inversealtruism/csd-registry": "0.1.17",
82
- "@inversealtruism/csd-tx": "0.1.18"
65
+ "@inversealtruism/csd-crypto": "0.1.16",
66
+ "@inversealtruism/csd-light": "0.1.21",
67
+ "@inversealtruism/csd-registry": "0.1.18",
68
+ "@inversealtruism/csd-tx": "0.1.19"
83
69
  },
84
70
  "devDependencies": {
85
- "@inversealtruism/csd-siwc": "0.1.16",
71
+ "@inversealtruism/csd-siwc": "0.1.17",
86
72
  "esbuild": "^0.27.0",
87
73
  "playwright-core": "^1.49.0",
88
74
  "tsup": "^8.5.1",
@@ -90,12 +76,6 @@
90
76
  "typescript": "^5.6.0"
91
77
  },
92
78
  "sideEffects": false,
93
- "packageManager": "pnpm@10.32.1",
94
- "pnpm": {
95
- "onlyBuiltDependencies": [
96
- "esbuild"
97
- ]
98
- },
99
79
  "license": "MIT",
100
80
  "publishConfig": {
101
81
  "access": "public"
@@ -113,5 +93,17 @@
113
93
  "dapp",
114
94
  "sdk",
115
95
  "blockchain"
116
- ]
96
+ ],
97
+ "scripts": {
98
+ "build": "tsup src/index.ts src/connect.ts src/board.ts src/indexer.ts src/content.ts src/registry.ts src/chain.ts src/controller.ts src/react.ts --format esm,cjs --dts --clean",
99
+ "test": "node test/run.mjs",
100
+ "test:live": "node examples/read-only.mjs",
101
+ "build:example": "node scripts/build-example.mjs",
102
+ "clean": "node -e \"require('fs').rmSync('dist',{recursive:true,force:true})\"",
103
+ "test:e2e:read": "node test/e2e/e2e-read.mjs",
104
+ "test:e2e:wallet": "xvfb-run -a node test/e2e/e2e-wallet-connect.mjs",
105
+ "test:e2e:write": "node test/e2e/e2e-write.mjs",
106
+ "test:e2e": "node test/e2e/e2e-read.mjs && xvfb-run -a node test/e2e/e2e-wallet-connect.mjs",
107
+ "test:all": "pnpm test && pnpm test:e2e"
108
+ }
117
109
  }