@fairmint/canton-node-sdk 0.0.302 → 0.0.303
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
|
@@ -18,18 +18,12 @@ shapes, and error behavior.
|
|
|
18
18
|
npm install @fairmint/canton-node-sdk
|
|
19
19
|
```
|
|
20
20
|
|
|
21
|
-
It needs Node.js 22.12 or later. The SDK is CommonJS, and its
|
|
22
|
-
[`@fairmint/canton-protocol`](https://www.npmjs.com/package/@fairmint/canton-protocol)
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
|
|
27
|
-
`require()`, so it must compile `@fairmint/canton-protocol` and `@noble/hashes` (2.x, ESM only) to
|
|
28
|
-
CommonJS: add `'^.+\\.js$'` to `transform` (for example ts-jest with `allowJs`, `isolatedModules`
|
|
29
|
-
and `module: 'commonjs'`, as in this repository's
|
|
30
|
-
[`jest.config.js`](https://github.com/Fairmint/canton-node-sdk/blob/main/jest.config.js)) and
|
|
31
|
-
`transformIgnorePatterns: ['/node_modules/(?!(@fairmint/canton-protocol|@noble/hashes)/)']`.
|
|
32
|
-
canton-protocol's other dependencies publish CommonJS. Vitest and Node itself need nothing.
|
|
21
|
+
It needs Node.js 22.12 or later. The SDK is CommonJS, and everything it loads is CommonJS too (its
|
|
22
|
+
dependency [`@fairmint/canton-protocol`](https://www.npmjs.com/package/@fairmint/canton-protocol)
|
|
23
|
+
ships a CommonJS build beside its ESM one), so it never depends on Node's `require()` of an ES
|
|
24
|
+
module: it loads where a host runs Node with that turned off (`--no-require-module`), from CommonJS
|
|
25
|
+
(`require`) and ESM (`import`) code alike, and under Jest's CommonJS mode with no `transform` or
|
|
26
|
+
`transformIgnorePatterns` for it. `npm run check:package-artifacts` checks that in CI.
|
|
33
27
|
|
|
34
28
|
```ts
|
|
35
29
|
import { Canton } from '@fairmint/canton-node-sdk';
|
|
@@ -43,8 +43,8 @@ export type ExternalPartyKey = {
|
|
|
43
43
|
};
|
|
44
44
|
/**
|
|
45
45
|
* One of a key's parties. Declared here (the same shape as canton-protocol's `ExternalPartyEntry`) so the SDK's public
|
|
46
|
-
* declarations do not import
|
|
47
|
-
* node16`
|
|
46
|
+
* declarations do not import `@fairmint/canton-protocol`'s types (its 0.1.0 was ESM only, which a CommonJS TypeScript
|
|
47
|
+
* consumer on `module: node16` could not type-import without `skipLibCheck`).
|
|
48
48
|
*/
|
|
49
49
|
export interface ExternalPartyDirectoryEntry {
|
|
50
50
|
readonly partyId: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@fairmint/canton-node-sdk",
|
|
3
|
-
"version": "0.0.
|
|
3
|
+
"version": "0.0.303",
|
|
4
4
|
"description": "Canton Node SDK",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"canton",
|
|
@@ -96,7 +96,7 @@
|
|
|
96
96
|
},
|
|
97
97
|
"dependencies": {
|
|
98
98
|
"@canton-network/core-ledger-proto": "1.17.0",
|
|
99
|
-
"@fairmint/canton-protocol": "0.1.
|
|
99
|
+
"@fairmint/canton-protocol": "0.1.1",
|
|
100
100
|
"@hardlydifficult/rest-client": "1.0.65",
|
|
101
101
|
"@hardlydifficult/websocket": "1.0.73",
|
|
102
102
|
"@stellar/stellar-base": "15.0.0",
|