@inversealtruism/cairn-sdk 0.2.1 → 0.2.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/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.2.1";
30
+ var SDK_VERSION = "0.2.2";
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-7LQKND43.js";
4
- import "./chunk-IYQEEMV2.js";
3
+ } from "./chunk-HI5STMH3.js";
4
+ import "./chunk-ZJURNM5P.js";
5
5
  export {
6
6
  BoardClient
7
7
  };
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  ContentVerificationError
3
- } from "./chunk-IYQEEMV2.js";
3
+ } from "./chunk-ZJURNM5P.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-IYQEEMV2.js";
3
+ } from "./chunk-ZJURNM5P.js";
4
4
 
5
5
  // src/board.ts
6
6
  import { payloadHash } from "@inversealtruism/csd-codec";
@@ -1,6 +1,6 @@
1
1
  import {
2
2
  getWallet
3
- } from "./chunk-7IAFWBTW.js";
3
+ } from "./chunk-QRVMYGSL.js";
4
4
 
5
5
  // src/controller.ts
6
6
  var DISCONNECTED = Object.freeze({ status: "disconnected", account: null, error: null });
@@ -2,7 +2,7 @@ import {
2
2
  NotInstalledError,
3
3
  UnsupportedMethodError,
4
4
  mapProviderError
5
- } from "./chunk-IYQEEMV2.js";
5
+ } from "./chunk-ZJURNM5P.js";
6
6
 
7
7
  // src/connect.ts
8
8
  function discoverProviders(opts = {}) {
@@ -1,5 +1,5 @@
1
1
  // src/errors.ts
2
- var SDK_VERSION = "0.2.1";
2
+ var SDK_VERSION = "0.2.2";
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. */
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.2.1";
33
+ var SDK_VERSION = "0.2.2";
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-7IAFWBTW.js";
9
- import "./chunk-IYQEEMV2.js";
8
+ } from "./chunk-QRVMYGSL.js";
9
+ import "./chunk-ZJURNM5P.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.2.1";
29
+ var SDK_VERSION = "0.2.2";
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-PQ4BSDPD.js";
4
- import "./chunk-IYQEEMV2.js";
3
+ } from "./chunk-3EXZQPPT.js";
4
+ import "./chunk-ZJURNM5P.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.2.1";
28
+ var SDK_VERSION = "0.2.2";
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-XXOQC4R2.js";
4
- import "./chunk-7IAFWBTW.js";
5
- import "./chunk-IYQEEMV2.js";
3
+ } from "./chunk-LCE4IWMW.js";
4
+ import "./chunk-QRVMYGSL.js";
5
+ import "./chunk-ZJURNM5P.js";
6
6
  export {
7
7
  CairnController
8
8
  };
package/dist/index.cjs CHANGED
@@ -50,7 +50,7 @@ __export(index_exports, {
50
50
  module.exports = __toCommonJS(index_exports);
51
51
 
52
52
  // src/errors.ts
53
- var SDK_VERSION = "0.2.1";
53
+ var SDK_VERSION = "0.2.2";
54
54
  var DOCS_BASE = "https://cairn-substrate.com/docs/sdk";
55
55
  var CairnError = class extends Error {
56
56
  /** Stable machine code for programmatic branching. */
package/dist/index.d.cts CHANGED
@@ -106,7 +106,7 @@ declare class NamesClient {
106
106
 
107
107
  /** Stable machine-readable error codes (branch on these, not the message text). */
108
108
  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" | "UNKNOWN";
109
- declare const SDK_VERSION = "0.2.1";
109
+ declare const SDK_VERSION = "0.2.2";
110
110
  interface CairnErrorOptions {
111
111
  code?: CairnErrorCode;
112
112
  docsPath?: string;
@@ -120,7 +120,7 @@ declare class CairnError extends Error {
120
120
  /** Relative docs path (under the SDK docs base), if any. */
121
121
  readonly docsPath?: string;
122
122
  /** The cairn-sdk version that produced this error. */
123
- readonly version = "0.2.1";
123
+ readonly version = "0.2.2";
124
124
  constructor(shortMessage: string, opts?: CairnErrorOptions);
125
125
  /**
126
126
  * Walk the `cause` chain. With a predicate, returns the FIRST matching error (or null). Without one,
package/dist/index.d.ts CHANGED
@@ -106,7 +106,7 @@ declare class NamesClient {
106
106
 
107
107
  /** Stable machine-readable error codes (branch on these, not the message text). */
108
108
  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" | "UNKNOWN";
109
- declare const SDK_VERSION = "0.2.1";
109
+ declare const SDK_VERSION = "0.2.2";
110
110
  interface CairnErrorOptions {
111
111
  code?: CairnErrorCode;
112
112
  docsPath?: string;
@@ -120,7 +120,7 @@ declare class CairnError extends Error {
120
120
  /** Relative docs path (under the SDK docs base), if any. */
121
121
  readonly docsPath?: string;
122
122
  /** The cairn-sdk version that produced this error. */
123
- readonly version = "0.2.1";
123
+ readonly version = "0.2.2";
124
124
  constructor(shortMessage: string, opts?: CairnErrorOptions);
125
125
  /**
126
126
  * Walk the `cause` chain. With a predicate, returns the FIRST matching error (or null). Without one,
package/dist/index.js CHANGED
@@ -3,20 +3,20 @@ import {
3
3
  } from "./chunk-BGJZF7S2.js";
4
4
  import {
5
5
  BoardClient
6
- } from "./chunk-7LQKND43.js";
6
+ } from "./chunk-HI5STMH3.js";
7
7
  import {
8
8
  Chain,
9
9
  LightClient
10
10
  } from "./chunk-C452UODV.js";
11
11
  import {
12
12
  ContentClient
13
- } from "./chunk-PQ4BSDPD.js";
13
+ } from "./chunk-3EXZQPPT.js";
14
14
  import {
15
15
  IndexerClient
16
16
  } from "./chunk-J5J4JEJ6.js";
17
17
  import {
18
18
  CairnController
19
- } from "./chunk-XXOQC4R2.js";
19
+ } from "./chunk-LCE4IWMW.js";
20
20
  import {
21
21
  WalletConnection,
22
22
  connect,
@@ -24,7 +24,7 @@ import {
24
24
  discoverProviders,
25
25
  getWallet,
26
26
  isInstalled
27
- } from "./chunk-7IAFWBTW.js";
27
+ } from "./chunk-QRVMYGSL.js";
28
28
  import {
29
29
  CairnError,
30
30
  ContentVerificationError,
@@ -36,7 +36,7 @@ import {
36
36
  WalletLockedError,
37
37
  errorCode,
38
38
  mapProviderError
39
- } from "./chunk-IYQEEMV2.js";
39
+ } from "./chunk-ZJURNM5P.js";
40
40
 
41
41
  // src/http.ts
42
42
  var DEFAULT_MAX_BYTES = 16 * 1024 * 1024;
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.2.1";
29
+ var SDK_VERSION = "0.2.2";
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-XXOQC4R2.js";
4
- import "./chunk-7IAFWBTW.js";
5
- import "./chunk-IYQEEMV2.js";
3
+ } from "./chunk-LCE4IWMW.js";
4
+ import "./chunk-QRVMYGSL.js";
5
+ import "./chunk-ZJURNM5P.js";
6
6
 
7
7
  // src/react.ts
8
8
  function createCairnHooks(React, controllerOrOpts) {
package/package.json CHANGED
@@ -1,7 +1,7 @@
1
1
  {
2
2
  "name": "@inversealtruism/cairn-sdk",
3
- "version": "0.2.1",
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.2.2",
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,27 +58,14 @@
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": "tsx test/sdk.test.ts && tsx test/connect.test.ts && tsx test/errors.test.ts && tsx test/controller.test.ts && tsx test/react.test.ts && tsx test/hardening.test.ts && tsx test/spv-checkpoint.test.ts && tsx test/names-b10.test.ts",
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
- "prepublishOnly": "npm run build && npm test"
73
- },
74
61
  "dependencies": {
75
- "@inversealtruism/cairnx-core": "0.1.34",
62
+ "@inversealtruism/cairnx-core": "0.1.36",
76
63
  "@inversealtruism/csd-client": "0.1.15",
77
64
  "@inversealtruism/csd-codec": "0.1.15",
78
65
  "@inversealtruism/csd-crypto": "0.1.15",
79
- "@inversealtruism/csd-light": "0.1.15",
66
+ "@inversealtruism/csd-light": "0.1.17",
80
67
  "@inversealtruism/csd-registry": "0.1.16",
81
- "@inversealtruism/csd-tx": "0.1.15"
68
+ "@inversealtruism/csd-tx": "0.1.16"
82
69
  },
83
70
  "devDependencies": {
84
71
  "esbuild": "^0.27.0",
@@ -89,12 +76,6 @@
89
76
  "@inversealtruism/csd-siwc": "0.1.15"
90
77
  },
91
78
  "sideEffects": false,
92
- "packageManager": "pnpm@10.32.1",
93
- "pnpm": {
94
- "onlyBuiltDependencies": [
95
- "esbuild"
96
- ]
97
- },
98
79
  "license": "MIT",
99
80
  "publishConfig": {
100
81
  "access": "public"
@@ -112,5 +93,17 @@
112
93
  "dapp",
113
94
  "sdk",
114
95
  "blockchain"
115
- ]
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": "tsx test/sdk.test.ts && tsx test/connect.test.ts && tsx test/errors.test.ts && tsx test/controller.test.ts && tsx test/react.test.ts && tsx test/hardening.test.ts && tsx test/spv-checkpoint.test.ts && tsx test/names-b10.test.ts",
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
+ }
109
+ }