@ledgerhq/hw-app-canton 0.6.0 → 0.7.0-nightly.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/lib-es/Canton.js CHANGED
@@ -1,15 +1,13 @@
1
- import { UserRefusedAddress, UserRefusedOnDevice } from "@ledgerhq/errors";
1
+ import { TransportStatusError } from "@ledgerhq/errors";
2
2
  import BIPPath from "bip32-path";
3
3
  const CLA = 0xe0;
4
4
  const P1_NON_CONFIRM = 0x00;
5
5
  const P1_CONFIRM = 0x01;
6
- // P2 indicating no information.
6
+ const P1_SIGN_UNTYPED_VERSIONED_MESSAGE = 0x01;
7
+ const P1_SIGN_PREPARED_TRANSACTION = 0x02;
7
8
  const P2_NONE = 0x00;
8
- // P2 indicating first APDU in a large request.
9
9
  const P2_FIRST = 0x01;
10
- // P2 indicating that this is not the last APDU in a large request.
11
10
  const P2_MORE = 0x02;
12
- // P2 indicating that this is the last APDU of a message in a multi message request.
13
11
  const P2_MSG_END = 0x04;
14
12
  const INS = {
15
13
  GET_VERSION: 0x03,
@@ -23,6 +21,7 @@ const STATUS = {
23
21
  };
24
22
  const ED25519_SIGNATURE_HEX_LENGTH = 128; // hex characters (64 bytes)
25
23
  const CANTON_SIGNATURE_HEX_LENGTH = 132; // hex characters (66 bytes with framing)
24
+ const MAX_APDU_DATA_LENGTH = 255;
26
25
  /**
27
26
  * Canton BOLOS API
28
27
  */
@@ -44,7 +43,8 @@ export default class Canton {
44
43
  const serializedPath = this.serializePath(bipPath);
45
44
  const p1 = display ? P1_CONFIRM : P1_NON_CONFIRM;
46
45
  const response = await this.transport.send(CLA, INS.GET_ADDR, p1, P2_NONE, serializedPath);
47
- const responseData = this.handleTransportResponse(response, "address");
46
+ this.checkTransportResponse(response);
47
+ const responseData = this.extractResponseData(response);
48
48
  const { publicKey } = this.extractPublicKeyAndChainCode(responseData);
49
49
  const address = "canton_" + this.publicKeyToAddress(publicKey);
50
50
  return {
@@ -54,23 +54,153 @@ export default class Canton {
54
54
  };
55
55
  }
56
56
  /**
57
- * Sign a Canton transaction.
57
+ * Sign a Canton transaction
58
+ * using the appropriate signing method based on transaction type.
58
59
  *
59
60
  * @param path a path in BIP-32 format
60
- * @param txHash the transaction hash to sign
61
+ * @param data either prepared transaction components, untyped versioned message, or txHash string (backwards compatibility)
61
62
  * @return the signature
62
63
  */
63
- async signTransaction(path, txHash) {
64
+ async signTransaction(path, data) {
65
+ // Backwards compatibility: handle txHash string format
66
+ if (typeof data === "string") {
67
+ return this.signTxHash(path, data);
68
+ }
69
+ if ("damlTransaction" in data) {
70
+ return this.signPreparedTransaction(path, data);
71
+ }
72
+ else {
73
+ return this.signUntypedVersionedMessage(path, data);
74
+ }
75
+ }
76
+ /**
77
+ * Sign a transaction hash (backwards compatibility)
78
+ * @private
79
+ */
80
+ async signTxHash(path, txHash) {
81
+ // 1. Send the derivation path
82
+ const bipPath = BIPPath.fromString(path).toPathArray();
83
+ const serializedPath = this.serializePath(bipPath);
84
+ const pathResponse = await this.transport.send(CLA, INS.SIGN, P1_SIGN_UNTYPED_VERSIONED_MESSAGE, P2_FIRST | P2_MORE, serializedPath);
85
+ this.checkTransportResponse(pathResponse);
86
+ // 2. Send the transaction hash as a single transaction
87
+ const transactionBuffer = Buffer.from(txHash, "hex");
88
+ const response = await this.transport.send(CLA, INS.SIGN, P1_SIGN_UNTYPED_VERSIONED_MESSAGE, P2_MSG_END, transactionBuffer);
89
+ this.checkTransportResponse(response);
90
+ const responseData = this.extractResponseData(response);
91
+ return this.parseSignatureResponse(responseData);
92
+ }
93
+ /**
94
+ * Sign a prepared Canton transaction
95
+ * @private
96
+ */
97
+ async signPreparedTransaction(path, components) {
98
+ let responseData = null;
64
99
  // 1. Send the derivation path
65
100
  const bipPath = BIPPath.fromString(path).toPathArray();
66
101
  const serializedPath = this.serializePath(bipPath);
67
- const pathResponse = await this.transport.send(CLA, INS.SIGN, P1_NON_CONFIRM, P2_FIRST | P2_MORE, serializedPath);
68
- this.handleTransportResponse(pathResponse, "transaction");
69
- // 2. Send the transaction hash
70
- const response = await this.transport.send(CLA, INS.SIGN, P1_NON_CONFIRM, P2_MSG_END, Buffer.from(txHash, "hex"));
71
- const responseData = this.handleTransportResponse(response, "transaction");
72
- const rawSignature = responseData.toString("hex");
73
- return this.cleanSignatureFormat(rawSignature);
102
+ const pathResponse = await this.transport.send(CLA, INS.SIGN, P1_SIGN_PREPARED_TRANSACTION, P2_FIRST | P2_MORE, serializedPath);
103
+ this.checkTransportResponse(pathResponse);
104
+ // 2. Send the DAML transaction
105
+ await this.sendChunkedData({
106
+ ins: INS.SIGN,
107
+ p1: P1_SIGN_PREPARED_TRANSACTION,
108
+ payload: Buffer.from(components.damlTransaction),
109
+ isFinal: false,
110
+ });
111
+ // 3. Send each node
112
+ for (const [i, node] of components.nodes.entries()) {
113
+ this.validateUint8Array(node, `Node at index ${i}`);
114
+ await this.sendChunkedData({
115
+ ins: INS.SIGN,
116
+ p1: P1_SIGN_PREPARED_TRANSACTION,
117
+ payload: Buffer.from(node),
118
+ isFinal: false,
119
+ });
120
+ }
121
+ // 4. Send the metadata
122
+ const isFinal = components.inputContracts.length === 0;
123
+ const result = await this.sendChunkedData({
124
+ ins: INS.SIGN,
125
+ p1: P1_SIGN_PREPARED_TRANSACTION,
126
+ payload: Buffer.from(components.metadata),
127
+ isFinal,
128
+ });
129
+ if (isFinal) {
130
+ responseData = result;
131
+ }
132
+ // 5. Send each input contract - last one should return data
133
+ for (const [i, inputContract] of components.inputContracts.entries()) {
134
+ this.validateUint8Array(inputContract, `Input contract at index ${i}`);
135
+ const isFinal = i === components.inputContracts.length - 1;
136
+ const result = await this.sendChunkedData({
137
+ ins: INS.SIGN,
138
+ p1: P1_SIGN_PREPARED_TRANSACTION,
139
+ payload: Buffer.from(inputContract),
140
+ isFinal,
141
+ });
142
+ if (isFinal) {
143
+ responseData = result;
144
+ }
145
+ }
146
+ if (!responseData) {
147
+ throw new Error("No response data received from device");
148
+ }
149
+ return this.parseSignatureResponse(responseData);
150
+ }
151
+ /**
152
+ * Sign topology transactions for Canton onboarding
153
+ * @private
154
+ */
155
+ async signUntypedVersionedMessage(path, data) {
156
+ const { transactions, challenge } = data;
157
+ if (!transactions || transactions.length === 0) {
158
+ throw new TypeError("At least one transaction is required");
159
+ }
160
+ // 1. Send the derivation path with optional challenge
161
+ const bipPath = BIPPath.fromString(path).toPathArray();
162
+ const serializedPath = this.serializePath(bipPath);
163
+ let pathData = serializedPath;
164
+ if (challenge) {
165
+ const challengeBuffer = Buffer.from(challenge, "hex");
166
+ pathData = Buffer.concat([serializedPath, challengeBuffer]);
167
+ }
168
+ const pathResponse = await this.transport.send(CLA, INS.SIGN, P1_SIGN_UNTYPED_VERSIONED_MESSAGE, P2_FIRST | P2_MORE, pathData);
169
+ this.checkTransportResponse(pathResponse);
170
+ // 2. Send each transaction using chunking for large data
171
+ for (const [i, transaction] of transactions.entries()) {
172
+ if (!transaction) {
173
+ throw new TypeError(`Transaction at index ${i} is undefined or null`);
174
+ }
175
+ const transactionBuffer = Buffer.from(transaction, "hex");
176
+ const isLastTransaction = i === transactions.length - 1;
177
+ if (transactionBuffer.length <= MAX_APDU_DATA_LENGTH) {
178
+ // Small transaction - send directly
179
+ const p2 = isLastTransaction ? P2_MSG_END : P2_MORE | P2_MSG_END;
180
+ const response = await this.transport.send(CLA, INS.SIGN, P1_SIGN_UNTYPED_VERSIONED_MESSAGE, p2, transactionBuffer);
181
+ if (isLastTransaction) {
182
+ this.checkTransportResponse(response);
183
+ const responseData = this.extractResponseData(response);
184
+ return this.parseSignatureResponse(responseData, challenge);
185
+ }
186
+ else {
187
+ this.checkTransportResponse(response);
188
+ }
189
+ }
190
+ else {
191
+ // Large transaction - use chunking
192
+ const responseData = await this.sendChunkedData({
193
+ ins: INS.SIGN,
194
+ p1: P1_SIGN_UNTYPED_VERSIONED_MESSAGE,
195
+ payload: transactionBuffer,
196
+ isFinal: isLastTransaction,
197
+ });
198
+ if (isLastTransaction && responseData) {
199
+ return this.parseSignatureResponse(responseData, challenge);
200
+ }
201
+ }
202
+ }
203
+ throw new TypeError("No transactions provided");
74
204
  }
75
205
  /**
76
206
  * Get the app configuration.
@@ -78,46 +208,114 @@ export default class Canton {
78
208
  */
79
209
  async getAppConfiguration() {
80
210
  const response = await this.transport.send(CLA, INS.GET_VERSION, P1_NON_CONFIRM, P2_NONE, Buffer.alloc(0));
81
- const responseData = this.handleTransportResponse(response, "version");
211
+ this.checkTransportResponse(response);
212
+ const responseData = this.extractResponseData(response);
82
213
  const { major, minor, patch } = this.extractVersion(responseData);
83
214
  return {
84
215
  version: `${major}.${minor}.${patch}`,
85
216
  };
86
217
  }
87
218
  /**
88
- * Converts 65-byte Canton format to 64-byte Ed25519:
89
- * [40][64_bytes_signature][00] (132 hex chars)
219
+ * Validate Uint8Array with descriptive error message
220
+ * @private
221
+ */
222
+ validateUint8Array(value, context) {
223
+ if (!value) {
224
+ throw new TypeError(`${context} is undefined or null`);
225
+ }
226
+ if (!(value instanceof Uint8Array)) {
227
+ throw new TypeError(`${context} is not a Uint8Array: ${typeof value}`);
228
+ }
229
+ }
230
+ /**
231
+ * Unified chunking strategy for sending data to device
90
232
  * @private
91
233
  */
92
- cleanSignatureFormat(signature) {
234
+ async sendChunkedData({ ins, p1, payload, isFinal = false, }) {
235
+ const chunks = this.createChunks(payload);
236
+ let responseData = null;
237
+ for (let i = 0; i < chunks.length; i++) {
238
+ const isLastChunk = i === chunks.length - 1;
239
+ let p2 = P2_MORE;
240
+ if (isLastChunk) {
241
+ p2 = isFinal ? P2_MSG_END : P2_MORE | P2_MSG_END;
242
+ }
243
+ const response = await this.transport.send(CLA, ins, p1, p2, chunks[i]);
244
+ if (isFinal && isLastChunk) {
245
+ this.checkTransportResponse(response);
246
+ responseData = this.extractResponseData(response);
247
+ }
248
+ else {
249
+ this.checkTransportResponse(response);
250
+ }
251
+ }
252
+ return responseData;
253
+ }
254
+ /**
255
+ * Create optimized chunks from payload
256
+ * @private
257
+ */
258
+ createChunks(payload) {
259
+ if (payload.length <= MAX_APDU_DATA_LENGTH) {
260
+ return [payload];
261
+ }
262
+ const totalChunks = Math.ceil(payload.length / MAX_APDU_DATA_LENGTH);
263
+ const chunks = new Array(totalChunks);
264
+ let offset = 0;
265
+ for (let i = 0; i < totalChunks; i++) {
266
+ const chunkSize = Math.min(MAX_APDU_DATA_LENGTH, payload.length - offset);
267
+ chunks[i] = payload.slice(offset, offset + chunkSize);
268
+ offset += chunkSize;
269
+ }
270
+ return chunks;
271
+ }
272
+ /**
273
+ * Parse signature response - handles both TLV format (onboarding) and single signatures
274
+ * @private
275
+ */
276
+ parseSignatureResponse(response, challenge) {
277
+ // Handle TLV (Type-Length-Value) format: [40][64B main][00][40][64B challenge] = 262 hex chars (131 bytes)
278
+ if (response.length === 131 &&
279
+ response.readUInt8(0) === 0x40 &&
280
+ response.readUInt8(65) === 0x00 &&
281
+ response.readUInt8(66) === 0x40) {
282
+ const signature = response.slice(1, 65).toString("hex");
283
+ const applicationSignature = response.slice(67, 131).toString("hex");
284
+ return {
285
+ signature,
286
+ ...(challenge && { applicationSignature }),
287
+ };
288
+ }
289
+ // Handle single signature formats
290
+ const signature = response.toString("hex");
291
+ // Pure 64-byte Ed25519 signature = 128 hex chars (64 bytes)
93
292
  if (signature.length === ED25519_SIGNATURE_HEX_LENGTH) {
94
- return signature;
293
+ return { signature };
95
294
  }
295
+ // Canton-framed signature: [40][64B Ed25519 sig][00] = 132 hex chars (65 bytes)
96
296
  if (signature.length === CANTON_SIGNATURE_HEX_LENGTH) {
97
297
  const cleanedSignature = signature.slice(2, -2);
98
- return cleanedSignature;
298
+ return { signature: cleanedSignature };
99
299
  }
100
- console.warn(`[Canton]: Unknown signature format (${signature.length} chars)`);
101
- return signature;
300
+ return { signature };
102
301
  }
103
302
  /**
104
- * Helper method to handle transport response and check for errors
303
+ * Check transport response for errors and throw appropriate exceptions
105
304
  * @private
106
305
  */
107
- handleTransportResponse(response, errorType) {
306
+ checkTransportResponse(response) {
108
307
  const statusCode = response.readUInt16BE(response.length - 2);
109
- const responseData = response.slice(0, response.length - 2);
110
- if (statusCode === STATUS.USER_CANCEL) {
111
- switch (errorType) {
112
- case "address":
113
- throw new UserRefusedAddress();
114
- case "transaction":
115
- throw new UserRefusedOnDevice();
116
- default:
117
- throw new Error();
118
- }
308
+ if (statusCode !== STATUS.OK) {
309
+ throw new TransportStatusError(statusCode);
119
310
  }
120
- return responseData;
311
+ }
312
+ /**
313
+ * Extract response data from transport response
314
+ * APDU responses have format: [data][status_code(2_bytes)]
315
+ * @private
316
+ */
317
+ extractResponseData(response) {
318
+ return response.slice(0, -2);
121
319
  }
122
320
  /**
123
321
  * Serialize a BIP path to a data buffer for Canton BOLOS
@@ -172,9 +370,9 @@ export default class Canton {
172
370
  */
173
371
  extractVersion(data) {
174
372
  return {
175
- major: parseInt(data.subarray(0, 1).toString("hex"), 16),
176
- minor: parseInt(data.subarray(1, 2).toString("hex"), 16),
177
- patch: parseInt(data.subarray(2, 3).toString("hex"), 16),
373
+ major: Number.parseInt(data.subarray(0, 1).toString("hex"), 16),
374
+ minor: Number.parseInt(data.subarray(1, 2).toString("hex"), 16),
375
+ patch: Number.parseInt(data.subarray(2, 3).toString("hex"), 16),
178
376
  };
179
377
  }
180
378
  }
@@ -1 +1 @@
1
- {"version":3,"file":"Canton.js","sourceRoot":"","sources":["../src/Canton.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,kBAAkB,EAAE,mBAAmB,EAAE,MAAM,kBAAkB,CAAC;AAC3E,OAAO,OAAO,MAAM,YAAY,CAAC;AAEjC,MAAM,GAAG,GAAG,IAAI,CAAC;AAEjB,MAAM,cAAc,GAAG,IAAI,CAAC;AAC5B,MAAM,UAAU,GAAG,IAAI,CAAC;AAExB,gCAAgC;AAChC,MAAM,OAAO,GAAG,IAAI,CAAC;AACrB,+CAA+C;AAC/C,MAAM,QAAQ,GAAG,IAAI,CAAC;AACtB,mEAAmE;AACnE,MAAM,OAAO,G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,EAAE,CAAC;YAC/D,KAAK,EAAE,MAAM,CAAC,QAAQ,CAAC,IAAI,CAAC,QAAQ,CAAC,CAAC,EAAE,CAAC,CAAC,CAAC,QAAQ,CAAC,KAAK,CAAC,EAAE,EAAE,CAAC;SAChE,CAAC;IACJ,CAAC;CACF"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ledgerhq/hw-app-canton",
3
- "version": "0.6.0",
3
+ "version": "0.7.0-nightly.1",
4
4
  "description": "Ledger Hardware Wallet Canton Application API",
5
5
  "keywords": [
6
6
  "Ledger",
@@ -26,8 +26,8 @@
26
26
  "license": "Apache-2.0",
27
27
  "dependencies": {
28
28
  "bip32-path": "^0.4.2",
29
- "@ledgerhq/errors": "^6.26.0",
30
- "@ledgerhq/hw-transport": "6.31.12"
29
+ "@ledgerhq/errors": "^6.27.0-nightly.0",
30
+ "@ledgerhq/hw-transport": "6.31.13-nightly.0"
31
31
  },
32
32
  "devDependencies": {
33
33
  "@types/jest": "^29.5.10",
@@ -38,8 +38,8 @@
38
38
  "source-map-support": "^0.5.21",
39
39
  "ts-jest": "^29.1.1",
40
40
  "ts-node": "^10.4.0",
41
- "@ledgerhq/hw-transport-mocker": "^6.29.12",
42
- "@ledgerhq/hw-transport-node-speculos-http": "^6.30.2"
41
+ "@ledgerhq/hw-transport-mocker": "^6.29.13-nightly.0",
42
+ "@ledgerhq/hw-transport-node-speculos-http": "^6.31.0-nightly.1"
43
43
  },
44
44
  "scripts": {
45
45
  "clean": "rimraf lib lib-es",