@ledgerhq/coin-tezos 8.0.0 → 9.0.0
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/CHANGELOG.md +11 -0
- package/lib/logic/combine.d.ts +1 -1
- package/lib/logic/combine.d.ts.map +1 -1
- package/lib/logic/combine.js +4 -1
- package/lib/logic/combine.js.map +1 -1
- package/lib-es/logic/combine.d.ts +1 -1
- package/lib-es/logic/combine.d.ts.map +1 -1
- package/lib-es/logic/combine.js +4 -1
- package/lib-es/logic/combine.js.map +1 -1
- package/package.json +2 -2
- package/src/logic/combine.test.ts +17 -0
- package/src/logic/combine.ts +5 -2
package/CHANGELOG.md
CHANGED
|
@@ -1,5 +1,16 @@
|
|
|
1
1
|
# @ledgerhq/coin-tezos
|
|
2
2
|
|
|
3
|
+
## 9.0.0
|
|
4
|
+
|
|
5
|
+
### Major Changes
|
|
6
|
+
|
|
7
|
+
- [#780](https://github.com/LedgerHQ/coin-modules/pull/780) [`2a4b35f`](https://github.com/LedgerHQ/coin-modules/commit/2a4b35fdb887cbe684f2e0862fd7123834b8718e) Thanks [@francois-guerin-ledger](https://github.com/francois-guerin-ledger)! - chore(framework): update `combine` method to take a signature list as parameter
|
|
8
|
+
|
|
9
|
+
### Patch Changes
|
|
10
|
+
|
|
11
|
+
- Updated dependencies [[`2a4b35f`](https://github.com/LedgerHQ/coin-modules/commit/2a4b35fdb887cbe684f2e0862fd7123834b8718e)]:
|
|
12
|
+
- @ledgerhq/coin-module-framework@7.0.0
|
|
13
|
+
|
|
3
14
|
## 8.0.0
|
|
4
15
|
|
|
5
16
|
### Major Changes
|
package/lib/logic/combine.d.ts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function combine(transaction: string, signature: string): string;
|
|
1
|
+
export declare function combine(transaction: string, signature: string[]): string;
|
|
2
2
|
//# sourceMappingURL=combine.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"combine.d.ts","sourceRoot":"","sources":["../../src/logic/combine.ts"],"names":[],"mappings":"AAIA,wBAAgB,OAAO,CAAC,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"combine.d.ts","sourceRoot":"","sources":["../../src/logic/combine.ts"],"names":[],"mappings":"AAIA,wBAAgB,OAAO,CAAC,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,MAAM,CAKxE"}
|
package/lib/logic/combine.js
CHANGED
|
@@ -5,6 +5,9 @@ Object.defineProperty(exports, "__esModule", { value: true });
|
|
|
5
5
|
exports.combine = combine;
|
|
6
6
|
// Source: https://github.com/ecadlabs/taquito/blob/97832fc088eccb93c152659367618ce1782a8b51/packages/taquito-ledger-signer/src/taquito-ledger-signer.ts#L187C23-L187C32
|
|
7
7
|
function combine(transaction, signature) {
|
|
8
|
-
|
|
8
|
+
if (signature.length !== 1) {
|
|
9
|
+
throw new Error(`Tezos combine expects exactly one signature, got ${signature.length}`);
|
|
10
|
+
}
|
|
11
|
+
return `${transaction}${signature[0]}`.slice(2);
|
|
9
12
|
}
|
|
10
13
|
//# sourceMappingURL=combine.js.map
|
package/lib/logic/combine.js.map
CHANGED
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"combine.js","sourceRoot":"","sources":["../../src/logic/combine.ts"],"names":[],"mappings":";AAAA,4CAA4C;AAC5C,sCAAsC;;AAGtC,
|
|
1
|
+
{"version":3,"file":"combine.js","sourceRoot":"","sources":["../../src/logic/combine.ts"],"names":[],"mappings":";AAAA,4CAA4C;AAC5C,sCAAsC;;AAGtC,0BAKC;AAND,wKAAwK;AACxK,SAAgB,OAAO,CAAC,WAAmB,EAAE,SAAmB;IAC9D,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC3B,MAAM,IAAI,KAAK,CAAC,oDAAoD,SAAS,CAAC,MAAM,EAAE,CAAC,CAAA;IACzF,CAAC;IACD,OAAO,GAAG,WAAW,GAAG,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;AACjD,CAAC"}
|
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
export declare function combine(transaction: string, signature: string): string;
|
|
1
|
+
export declare function combine(transaction: string, signature: string[]): string;
|
|
2
2
|
//# sourceMappingURL=combine.d.ts.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"combine.d.ts","sourceRoot":"","sources":["../../src/logic/combine.ts"],"names":[],"mappings":"AAIA,wBAAgB,OAAO,CAAC,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,GAAG,MAAM,
|
|
1
|
+
{"version":3,"file":"combine.d.ts","sourceRoot":"","sources":["../../src/logic/combine.ts"],"names":[],"mappings":"AAIA,wBAAgB,OAAO,CAAC,WAAW,EAAE,MAAM,EAAE,SAAS,EAAE,MAAM,EAAE,GAAG,MAAM,CAKxE"}
|
package/lib-es/logic/combine.js
CHANGED
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
// Source: https://github.com/ecadlabs/taquito/blob/97832fc088eccb93c152659367618ce1782a8b51/packages/taquito-ledger-signer/src/taquito-ledger-signer.ts#L187C23-L187C32
|
|
4
4
|
export function combine(transaction, signature) {
|
|
5
|
-
|
|
5
|
+
if (signature.length !== 1) {
|
|
6
|
+
throw new Error(`Tezos combine expects exactly one signature, got ${signature.length}`);
|
|
7
|
+
}
|
|
8
|
+
return `${transaction}${signature[0]}`.slice(2);
|
|
6
9
|
}
|
|
7
10
|
//# sourceMappingURL=combine.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"combine.js","sourceRoot":"","sources":["../../src/logic/combine.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,sCAAsC;AAEtC,wKAAwK;AACxK,MAAM,UAAU,OAAO,CAAC,WAAmB,EAAE,
|
|
1
|
+
{"version":3,"file":"combine.js","sourceRoot":"","sources":["../../src/logic/combine.ts"],"names":[],"mappings":"AAAA,4CAA4C;AAC5C,sCAAsC;AAEtC,wKAAwK;AACxK,MAAM,UAAU,OAAO,CAAC,WAAmB,EAAE,SAAmB;IAC9D,IAAI,SAAS,CAAC,MAAM,KAAK,CAAC,EAAE,CAAC;QAC3B,MAAM,IAAI,KAAK,CAAC,oDAAoD,SAAS,CAAC,MAAM,EAAE,CAAC,CAAA;IACzF,CAAC;IACD,OAAO,GAAG,WAAW,GAAG,SAAS,CAAC,CAAC,CAAC,EAAE,CAAC,KAAK,CAAC,CAAC,CAAC,CAAA;AACjD,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ledgerhq/coin-tezos",
|
|
3
|
-
"version": "
|
|
3
|
+
"version": "9.0.0",
|
|
4
4
|
"description": "Tezos Coin integration",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Ledger",
|
|
@@ -61,7 +61,7 @@
|
|
|
61
61
|
"@taquito/rpc": "^23.0.0-RC.0",
|
|
62
62
|
"@taquito/taquito": "^23.0.0-RC.0",
|
|
63
63
|
"@taquito/utils": "^23.0.0-RC.0",
|
|
64
|
-
"@ledgerhq/coin-module-framework": "^
|
|
64
|
+
"@ledgerhq/coin-module-framework": "^7.0.0"
|
|
65
65
|
},
|
|
66
66
|
"peerDependencies": {
|
|
67
67
|
"@ledgerhq/live-network": "^3.0.0",
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
// SPDX-FileCopyrightText: © 2026 LEDGER SAS
|
|
2
|
+
// SPDX-License-Identifier: Apache-2.0
|
|
3
|
+
|
|
4
|
+
import { combine } from './combine'
|
|
5
|
+
|
|
6
|
+
describe('combine', () => {
|
|
7
|
+
it('concatenates transaction and signature and strips the leading 2 chars', () => {
|
|
8
|
+
// slice(2) removes the first byte (magic byte) from the concatenated hex string
|
|
9
|
+
expect(combine('03aabbcc', ['ddeeff'])).toBe('aabbccddeeff')
|
|
10
|
+
})
|
|
11
|
+
|
|
12
|
+
it('throws when more than one signature is provided', () => {
|
|
13
|
+
expect(() => combine('0xdeadbeef', ['0xsig0', '0xsig1'])).toThrow(
|
|
14
|
+
'Tezos combine expects exactly one signature, got 2'
|
|
15
|
+
)
|
|
16
|
+
})
|
|
17
|
+
})
|
package/src/logic/combine.ts
CHANGED
|
@@ -2,6 +2,9 @@
|
|
|
2
2
|
// SPDX-License-Identifier: Apache-2.0
|
|
3
3
|
|
|
4
4
|
// Source: https://github.com/ecadlabs/taquito/blob/97832fc088eccb93c152659367618ce1782a8b51/packages/taquito-ledger-signer/src/taquito-ledger-signer.ts#L187C23-L187C32
|
|
5
|
-
export function combine(transaction: string, signature: string): string {
|
|
6
|
-
|
|
5
|
+
export function combine(transaction: string, signature: string[]): string {
|
|
6
|
+
if (signature.length !== 1) {
|
|
7
|
+
throw new Error(`Tezos combine expects exactly one signature, got ${signature.length}`)
|
|
8
|
+
}
|
|
9
|
+
return `${transaction}${signature[0]}`.slice(2)
|
|
7
10
|
}
|