@ledgerhq/concordium-core 0.3.0 → 0.4.0-nightly.20260410030516
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/.turbo/turbo-build.log +1 -1
- package/CHANGELOG.md +6 -0
- package/package.json +18 -5
- package/src/serialization.test.ts +12 -4
- package/tsconfig.build.json +20 -0
- package/tsconfig.json +2 -1
package/.turbo/turbo-build.log
CHANGED
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
|
|
2
2
|
> @ledgerhq/concordium-core@0.3.0 build /home/runner/work/ledger-live/ledger-live/libs/concordium-core
|
|
3
|
-
> tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es
|
|
3
|
+
> tsc --project tsconfig.build.json && tsc --project tsconfig.build.json -m esnext --moduleResolution bundler --outDir lib-es
|
|
4
4
|
|
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,11 @@
|
|
|
1
1
|
# @ledgerhq/concordium-core
|
|
2
2
|
|
|
3
|
+
## 0.4.0-nightly.20260410030516
|
|
4
|
+
|
|
5
|
+
### Minor Changes
|
|
6
|
+
|
|
7
|
+
- [#16023](https://github.com/LedgerHQ/ledger-live/pull/16023) [`c910c1b`](https://github.com/LedgerHQ/ledger-live/commit/c910c1bd9b4f7fbcc0e33fe19b33da44085ab7f9) Thanks [@iqbalibrahim-ledger](https://github.com/iqbalibrahim-ledger)! - chore: remove eslint and prettier, replace with with oxlint and oxfmt
|
|
8
|
+
|
|
3
9
|
## 0.3.0
|
|
4
10
|
|
|
5
11
|
### Minor Changes
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ledgerhq/concordium-core",
|
|
3
|
-
"version": "0.
|
|
3
|
+
"version": "0.4.0-nightly.20260410030516",
|
|
4
4
|
"description": "Shared Concordium protocol types, serialization, and utilities",
|
|
5
5
|
"main": "lib/index.js",
|
|
6
6
|
"module": "lib-es/index.js",
|
|
@@ -17,15 +17,25 @@
|
|
|
17
17
|
"@swc/core": "1.15.11",
|
|
18
18
|
"@swc/jest": "0.2.39",
|
|
19
19
|
"@types/jest": "30.0.0",
|
|
20
|
-
"@types/node": "
|
|
20
|
+
"@types/node": "24.12.0",
|
|
21
21
|
"jest": "30.2.0",
|
|
22
|
+
"oxfmt": "0.36.0",
|
|
23
|
+
"oxlint": "1.51.0",
|
|
22
24
|
"rimraf": "^4.4.1"
|
|
23
25
|
},
|
|
24
26
|
"exports": {
|
|
25
27
|
".": {
|
|
28
|
+
"@ledgerhq/source": "./src/index.ts",
|
|
26
29
|
"require": "./lib/index.js",
|
|
27
30
|
"default": "./lib-es/index.js"
|
|
28
31
|
},
|
|
32
|
+
"./lib-es/*": "./lib-es/*.js",
|
|
33
|
+
"./lib/*": "./lib/*.js",
|
|
34
|
+
"./*": {
|
|
35
|
+
"@ledgerhq/source": "./src/*.ts",
|
|
36
|
+
"require": "./lib/*.js",
|
|
37
|
+
"default": "./lib-es/*.js"
|
|
38
|
+
},
|
|
29
39
|
"./package.json": "./package.json"
|
|
30
40
|
},
|
|
31
41
|
"repository": {
|
|
@@ -38,11 +48,14 @@
|
|
|
38
48
|
"homepage": "https://github.com/LedgerHQ/ledger-live/tree/develop/libs/concordium-core",
|
|
39
49
|
"scripts": {
|
|
40
50
|
"clean": "rimraf lib lib-es",
|
|
41
|
-
"build": "tsc && tsc -m esnext --moduleResolution bundler --outDir lib-es",
|
|
42
|
-
"typecheck": "tsc --noEmit",
|
|
51
|
+
"build": "tsc --project tsconfig.build.json && tsc --project tsconfig.build.json -m esnext --moduleResolution bundler --outDir lib-es",
|
|
52
|
+
"typecheck": "tsc --noEmit --customConditions node",
|
|
43
53
|
"test": "jest",
|
|
44
54
|
"coverage": "jest --coverage",
|
|
45
|
-
"lint": "
|
|
55
|
+
"lint": "oxlint -c ../oxc-live-libs/.oxlintrc.json ./src",
|
|
56
|
+
"lint:fix": "pnpm exec oxfmt -c ../../.oxfmtrc.json ./src && oxlint -c ../oxc-live-libs/.oxlintrc.json ./src --fix --quiet",
|
|
57
|
+
"format": "pnpm exec oxfmt -c ../../.oxfmtrc.json ./src",
|
|
58
|
+
"format:check": "pnpm exec oxfmt -c ../../.oxfmtrc.json ./src --check",
|
|
46
59
|
"unimported": "unimported"
|
|
47
60
|
}
|
|
48
61
|
}
|
|
@@ -12,7 +12,11 @@ import {
|
|
|
12
12
|
import { pathToBuffer } from "./utils";
|
|
13
13
|
import { AccountAddress } from "./address";
|
|
14
14
|
import { TransactionType } from "./types";
|
|
15
|
-
import type {
|
|
15
|
+
import type {
|
|
16
|
+
CredentialDeploymentTransaction,
|
|
17
|
+
Transaction,
|
|
18
|
+
TransferWithMemoPayload,
|
|
19
|
+
} from "./types";
|
|
16
20
|
|
|
17
21
|
describe("serialization", () => {
|
|
18
22
|
describe("pathToBuffer", () => {
|
|
@@ -817,7 +821,7 @@ describe("serialization", () => {
|
|
|
817
821
|
amount: 1000n,
|
|
818
822
|
memo: Buffer.from("temp"),
|
|
819
823
|
};
|
|
820
|
-
//
|
|
824
|
+
// oxlint-disable-next-line typescript/consistent-type-assertions
|
|
821
825
|
delete (payload as Partial<typeof payload>).memo;
|
|
822
826
|
|
|
823
827
|
const tx: Transaction = {
|
|
@@ -1025,7 +1029,9 @@ describe("serialization", () => {
|
|
|
1025
1029
|
expect(deserialized.type).toBe(TransactionType.TransferWithMemo);
|
|
1026
1030
|
expect(deserialized.header.nonce).toBe(99n);
|
|
1027
1031
|
expect(deserialized.payload.amount).toBe(10000n);
|
|
1028
|
-
expect(deserialized.payload.memo?.toString("utf-8")).toBe(
|
|
1032
|
+
expect((deserialized.payload as TransferWithMemoPayload).memo?.toString("utf-8")).toBe(
|
|
1033
|
+
"Test memo",
|
|
1034
|
+
);
|
|
1029
1035
|
});
|
|
1030
1036
|
|
|
1031
1037
|
it("should throw error for invalid buffer", () => {
|
|
@@ -1089,7 +1095,9 @@ describe("serialization", () => {
|
|
|
1089
1095
|
expect(deserialized.type).toBe(TransactionType.TransferWithMemo);
|
|
1090
1096
|
expect(deserialized.header.nonce).toBe(456n);
|
|
1091
1097
|
expect(deserialized.payload.amount).toBe(12000n);
|
|
1092
|
-
expect(deserialized.payload.memo?.toString("utf-8")).toBe(
|
|
1098
|
+
expect((deserialized.payload as TransferWithMemoPayload).memo?.toString("utf-8")).toBe(
|
|
1099
|
+
"Roundtrip test",
|
|
1100
|
+
);
|
|
1093
1101
|
});
|
|
1094
1102
|
});
|
|
1095
1103
|
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
{
|
|
2
|
+
"extends": "./tsconfig.json",
|
|
3
|
+
"compilerOptions": {
|
|
4
|
+
"customConditions": [],
|
|
5
|
+
"types": []
|
|
6
|
+
},
|
|
7
|
+
"exclude": [
|
|
8
|
+
"**/*.test.ts",
|
|
9
|
+
"**/*.test.tsx",
|
|
10
|
+
"**/*.spec.ts",
|
|
11
|
+
"**/*.spec.tsx",
|
|
12
|
+
"**/__tests__/**/*",
|
|
13
|
+
"**/tests/**/*",
|
|
14
|
+
"**/__mocks__/**/*",
|
|
15
|
+
"**/*.test.js",
|
|
16
|
+
"**/*.test.jsx",
|
|
17
|
+
"**/*.spec.js",
|
|
18
|
+
"**/*.spec.jsx"
|
|
19
|
+
]
|
|
20
|
+
}
|