@ledgerhq/coin-tezos 6.11.0-nightly.20251210120335 → 6.11.0-nightly.20251212024049

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.
@@ -15,7 +15,8 @@
15
15
  "src/types/index.ts",
16
16
  "src/types/model.ts",
17
17
  "src/types/signer.ts",
18
- "src/types/bridge.fixture.ts"
18
+ "src/types/bridge.fixture.ts",
19
+ "src/logic/validateAddress.ts"
19
20
  ],
20
21
  "ignore": []
21
- }
22
+ }
package/CHANGELOG.md CHANGED
@@ -1,20 +1,22 @@
1
1
  # @ledgerhq/coin-tezos
2
2
 
3
- ## 6.11.0-nightly.20251210120335
3
+ ## 6.11.0-nightly.20251212024049
4
4
 
5
5
  ### Minor Changes
6
6
 
7
+ - [#12967](https://github.com/LedgerHQ/ledger-live/pull/12967) [`5e8d6be`](https://github.com/LedgerHQ/ledger-live/commit/5e8d6be609dd37c48d747890e56189e0716d5273) Thanks [@Moustafa-Koterba](https://github.com/Moustafa-Koterba)! - Validate address implementation on all currencies
8
+
7
9
  - [#13155](https://github.com/LedgerHQ/ledger-live/pull/13155) [`aadb3d5`](https://github.com/LedgerHQ/ledger-live/commit/aadb3d57f5719cc2cc397975eafec8094b160afe) Thanks [@gre-ledger](https://github.com/gre-ledger)! - rxjs@7.8.2 everywhere
8
10
 
9
11
  ### Patch Changes
10
12
 
11
- - Updated dependencies [[`480a08a`](https://github.com/LedgerHQ/ledger-live/commit/480a08ae190119829910b46ecc6d2a9fb11bb7c2), [`19a54fd`](https://github.com/LedgerHQ/ledger-live/commit/19a54fd89a2d3c7481aebc28817870875f9d44dc), [`bc76d51`](https://github.com/LedgerHQ/ledger-live/commit/bc76d5154d35f8340b6b282c4909cd26920b8d40), [`7ae71b6`](https://github.com/LedgerHQ/ledger-live/commit/7ae71b64161424b398b63f77da5127085143fcdc), [`5fa83e4`](https://github.com/LedgerHQ/ledger-live/commit/5fa83e49c5fb103da7ecf0777b7e75bb35d5ed61), [`c5da2ce`](https://github.com/LedgerHQ/ledger-live/commit/c5da2cef7cded2b53c1af9aa3174cd27e5c92e0a), [`450f518`](https://github.com/LedgerHQ/ledger-live/commit/450f518d4cedb828c5fe1e7ccffaabd483f53226), [`30be235`](https://github.com/LedgerHQ/ledger-live/commit/30be2354822b3497c69322294ff1dab43375be50), [`bdacedf`](https://github.com/LedgerHQ/ledger-live/commit/bdacedfe32bea8ffce96ab675a44c0d7cf395143), [`768718d`](https://github.com/LedgerHQ/ledger-live/commit/768718df029bc8799b88c0299925dc56302b0c53), [`a5ad7d4`](https://github.com/LedgerHQ/ledger-live/commit/a5ad7d4578c06db3e40f260451b644c27e20cb62), [`aadb3d5`](https://github.com/LedgerHQ/ledger-live/commit/aadb3d57f5719cc2cc397975eafec8094b160afe), [`e44d216`](https://github.com/LedgerHQ/ledger-live/commit/e44d216d516df87e13f033ed64fedc1ce96380f4), [`d4bad44`](https://github.com/LedgerHQ/ledger-live/commit/d4bad4433c3fb083d95820d2927a9e8beeaf244f), [`8d8e1b7`](https://github.com/LedgerHQ/ledger-live/commit/8d8e1b7bb26305af326ea21710248223d1e8653b), [`07de7a8`](https://github.com/LedgerHQ/ledger-live/commit/07de7a87415ae4d1126e751d6a4d521ced3065e3), [`d37fa4b`](https://github.com/LedgerHQ/ledger-live/commit/d37fa4baf4534161bffe5033ce44fc7780c79d89), [`5e0556a`](https://github.com/LedgerHQ/ledger-live/commit/5e0556a3bd0ea60277462eed10c997b17b09d299), [`bce6610`](https://github.com/LedgerHQ/ledger-live/commit/bce6610ca8554a85f8f17b6014e921fdecd3fa4f), [`2a60165`](https://github.com/LedgerHQ/ledger-live/commit/2a601656b7a23a424a29f006ec53090648fdae4f), [`c56ab86`](https://github.com/LedgerHQ/ledger-live/commit/c56ab86ab65597caf87a09b7596faa54f3104bd4)]:
12
- - @ledgerhq/coin-framework@6.11.0-nightly.20251210120335
13
- - @ledgerhq/types-live@6.91.0-nightly.20251210120335
14
- - @ledgerhq/cryptoassets@13.35.0-nightly.20251210120335
15
- - @ledgerhq/errors@6.28.0-nightly.20251210120335
16
- - @ledgerhq/devices@8.8.0-nightly.20251210120335
17
- - @ledgerhq/live-network@2.1.3-nightly.20251210120335
13
+ - Updated dependencies [[`480a08a`](https://github.com/LedgerHQ/ledger-live/commit/480a08ae190119829910b46ecc6d2a9fb11bb7c2), [`19a54fd`](https://github.com/LedgerHQ/ledger-live/commit/19a54fd89a2d3c7481aebc28817870875f9d44dc), [`bc76d51`](https://github.com/LedgerHQ/ledger-live/commit/bc76d5154d35f8340b6b282c4909cd26920b8d40), [`4be69a7`](https://github.com/LedgerHQ/ledger-live/commit/4be69a71dcd7624a1cba8dd1b1847ef009eb2d83), [`7ae71b6`](https://github.com/LedgerHQ/ledger-live/commit/7ae71b64161424b398b63f77da5127085143fcdc), [`5fa83e4`](https://github.com/LedgerHQ/ledger-live/commit/5fa83e49c5fb103da7ecf0777b7e75bb35d5ed61), [`c5da2ce`](https://github.com/LedgerHQ/ledger-live/commit/c5da2cef7cded2b53c1af9aa3174cd27e5c92e0a), [`450f518`](https://github.com/LedgerHQ/ledger-live/commit/450f518d4cedb828c5fe1e7ccffaabd483f53226), [`30be235`](https://github.com/LedgerHQ/ledger-live/commit/30be2354822b3497c69322294ff1dab43375be50), [`bdacedf`](https://github.com/LedgerHQ/ledger-live/commit/bdacedfe32bea8ffce96ab675a44c0d7cf395143), [`5e8d6be`](https://github.com/LedgerHQ/ledger-live/commit/5e8d6be609dd37c48d747890e56189e0716d5273), [`768718d`](https://github.com/LedgerHQ/ledger-live/commit/768718df029bc8799b88c0299925dc56302b0c53), [`a5ad7d4`](https://github.com/LedgerHQ/ledger-live/commit/a5ad7d4578c06db3e40f260451b644c27e20cb62), [`aadb3d5`](https://github.com/LedgerHQ/ledger-live/commit/aadb3d57f5719cc2cc397975eafec8094b160afe), [`e44d216`](https://github.com/LedgerHQ/ledger-live/commit/e44d216d516df87e13f033ed64fedc1ce96380f4), [`d4bad44`](https://github.com/LedgerHQ/ledger-live/commit/d4bad4433c3fb083d95820d2927a9e8beeaf244f), [`8d8e1b7`](https://github.com/LedgerHQ/ledger-live/commit/8d8e1b7bb26305af326ea21710248223d1e8653b), [`07de7a8`](https://github.com/LedgerHQ/ledger-live/commit/07de7a87415ae4d1126e751d6a4d521ced3065e3), [`d37fa4b`](https://github.com/LedgerHQ/ledger-live/commit/d37fa4baf4534161bffe5033ce44fc7780c79d89), [`5e0556a`](https://github.com/LedgerHQ/ledger-live/commit/5e0556a3bd0ea60277462eed10c997b17b09d299), [`bce6610`](https://github.com/LedgerHQ/ledger-live/commit/bce6610ca8554a85f8f17b6014e921fdecd3fa4f), [`2a60165`](https://github.com/LedgerHQ/ledger-live/commit/2a601656b7a23a424a29f006ec53090648fdae4f), [`2d9f320`](https://github.com/LedgerHQ/ledger-live/commit/2d9f32087eea12ae9d5ea2347b277b8bf4e60f55), [`c56ab86`](https://github.com/LedgerHQ/ledger-live/commit/c56ab86ab65597caf87a09b7596faa54f3104bd4)]:
14
+ - @ledgerhq/coin-framework@6.11.0-nightly.20251212024049
15
+ - @ledgerhq/types-live@6.91.0-nightly.20251212024049
16
+ - @ledgerhq/cryptoassets@13.35.0-nightly.20251212024049
17
+ - @ledgerhq/errors@6.28.0-nightly.20251212024049
18
+ - @ledgerhq/devices@8.8.0-nightly.20251212024049
19
+ - @ledgerhq/live-network@2.1.3-nightly.20251212024049
18
20
 
19
21
  ## 6.10.0
20
22
 
@@ -0,0 +1,3 @@
1
+ import { AddressValidationCurrencyParameters } from "@ledgerhq/types-live";
2
+ export declare function validateAddress(address: string, _parameters: Partial<AddressValidationCurrencyParameters>): Promise<boolean>;
3
+ //# sourceMappingURL=validateAddress.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validateAddress.d.ts","sourceRoot":"","sources":["../../src/logic/validateAddress.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mCAAmC,EAAE,MAAM,sBAAsB,CAAC;AAG3E,wBAAsB,eAAe,CACnC,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,OAAO,CAAC,mCAAmC,CAAC,GACxD,OAAO,CAAC,OAAO,CAAC,CAElB"}
@@ -0,0 +1,8 @@
1
+ "use strict";
2
+ Object.defineProperty(exports, "__esModule", { value: true });
3
+ exports.validateAddress = validateAddress;
4
+ const utils_1 = require("@taquito/utils");
5
+ async function validateAddress(address, _parameters) {
6
+ return (0, utils_1.validateAddress)(address) === utils_1.ValidationResult.VALID;
7
+ }
8
+ //# sourceMappingURL=validateAddress.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validateAddress.js","sourceRoot":"","sources":["../../src/logic/validateAddress.ts"],"names":[],"mappings":";;AAGA,0CAKC;AAPD,0CAA6F;AAEtF,KAAK,UAAU,eAAe,CACnC,OAAe,EACf,WAAyD;IAEzD,OAAO,IAAA,uBAAsB,EAAC,OAAO,CAAC,KAAK,wBAAgB,CAAC,KAAK,CAAC;AACpE,CAAC"}
@@ -0,0 +1,3 @@
1
+ import { AddressValidationCurrencyParameters } from "@ledgerhq/types-live";
2
+ export declare function validateAddress(address: string, _parameters: Partial<AddressValidationCurrencyParameters>): Promise<boolean>;
3
+ //# sourceMappingURL=validateAddress.d.ts.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validateAddress.d.ts","sourceRoot":"","sources":["../../src/logic/validateAddress.ts"],"names":[],"mappings":"AAAA,OAAO,EAAE,mCAAmC,EAAE,MAAM,sBAAsB,CAAC;AAG3E,wBAAsB,eAAe,CACnC,OAAO,EAAE,MAAM,EACf,WAAW,EAAE,OAAO,CAAC,mCAAmC,CAAC,GACxD,OAAO,CAAC,OAAO,CAAC,CAElB"}
@@ -0,0 +1,5 @@
1
+ import { validateAddress as taquitoValidateAddress, ValidationResult } from "@taquito/utils";
2
+ export async function validateAddress(address, _parameters) {
3
+ return taquitoValidateAddress(address) === ValidationResult.VALID;
4
+ }
5
+ //# sourceMappingURL=validateAddress.js.map
@@ -0,0 +1 @@
1
+ {"version":3,"file":"validateAddress.js","sourceRoot":"","sources":["../../src/logic/validateAddress.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,eAAe,IAAI,sBAAsB,EAAE,gBAAgB,EAAE,MAAM,gBAAgB,CAAC;AAE7F,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,OAAe,EACf,WAAyD;IAEzD,OAAO,sBAAsB,CAAC,OAAO,CAAC,KAAK,gBAAgB,CAAC,KAAK,CAAC;AACpE,CAAC"}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@ledgerhq/coin-tezos",
3
- "version": "6.11.0-nightly.20251210120335",
3
+ "version": "6.11.0-nightly.20251212024049",
4
4
  "description": "Tezos Coin integration",
5
5
  "keywords": [
6
6
  "Ledger",
@@ -75,13 +75,13 @@
75
75
  "invariant": "^2.2.4",
76
76
  "lodash": "^4.17.21",
77
77
  "rxjs": "7.8.2",
78
- "@ledgerhq/coin-framework": "^6.11.0-nightly.20251210120335",
79
- "@ledgerhq/cryptoassets": "^13.35.0-nightly.20251210120335",
80
- "@ledgerhq/devices": "8.8.0-nightly.20251210120335",
81
- "@ledgerhq/errors": "^6.28.0-nightly.20251210120335",
82
- "@ledgerhq/live-network": "^2.1.3-nightly.20251210120335",
78
+ "@ledgerhq/coin-framework": "^6.11.0-nightly.20251212024049",
79
+ "@ledgerhq/cryptoassets": "^13.35.0-nightly.20251212024049",
80
+ "@ledgerhq/devices": "8.8.0-nightly.20251212024049",
81
+ "@ledgerhq/errors": "^6.28.0-nightly.20251212024049",
82
+ "@ledgerhq/live-network": "^2.1.3-nightly.20251212024049",
83
83
  "@ledgerhq/logs": "^6.13.0",
84
- "@ledgerhq/types-live": "^6.91.0-nightly.20251210120335"
84
+ "@ledgerhq/types-live": "^6.91.0-nightly.20251212024049"
85
85
  },
86
86
  "devDependencies": {
87
87
  "@faker-js/faker": "^8.4.1",
@@ -94,7 +94,7 @@
94
94
  "ts-jest": "^29.1.4",
95
95
  "typescript": "^5.4.5",
96
96
  "@ledgerhq/disable-network-setup": "^0.1.0",
97
- "@ledgerhq/types-cryptoassets": "^7.31.0-nightly.20251210120335"
97
+ "@ledgerhq/types-cryptoassets": "^7.31.0-nightly.20251212024049"
98
98
  },
99
99
  "overrides": {
100
100
  "@taquito/ledger-signer": {
@@ -0,0 +1,36 @@
1
+ import { validateAddress as taquitoValidateAddress, ValidationResult } from "@taquito/utils";
2
+ import { validateAddress } from "./validateAddress";
3
+
4
+ jest.mock("@taquito/utils", () => {
5
+ return {
6
+ ...jest.requireActual("@taquito/utils"),
7
+ validateAddress: jest.fn(),
8
+ };
9
+ });
10
+
11
+ describe("validateAddress", () => {
12
+ const mockedTaquitoValidateAddress = jest.mocked(taquitoValidateAddress);
13
+
14
+ beforeEach(() => {
15
+ mockedTaquitoValidateAddress.mockClear();
16
+ });
17
+
18
+ it.each([true, false])(
19
+ "should call validateAddress from taquito and return expected value (%s)",
20
+ async (expectedValue: boolean) => {
21
+ if (expectedValue) {
22
+ mockedTaquitoValidateAddress.mockReturnValueOnce(ValidationResult.VALID);
23
+ } else {
24
+ mockedTaquitoValidateAddress.mockReturnValueOnce(ValidationResult.OTHER);
25
+ }
26
+
27
+ const address = "some random address";
28
+ const parameters = {};
29
+ const result = await validateAddress(address, parameters);
30
+ expect(result).toEqual(expectedValue);
31
+
32
+ expect(mockedTaquitoValidateAddress).toHaveBeenCalledTimes(1);
33
+ expect(mockedTaquitoValidateAddress).toHaveBeenCalledWith(address);
34
+ },
35
+ );
36
+ });
@@ -0,0 +1,9 @@
1
+ import { AddressValidationCurrencyParameters } from "@ledgerhq/types-live";
2
+ import { validateAddress as taquitoValidateAddress, ValidationResult } from "@taquito/utils";
3
+
4
+ export async function validateAddress(
5
+ address: string,
6
+ _parameters: Partial<AddressValidationCurrencyParameters>,
7
+ ): Promise<boolean> {
8
+ return taquitoValidateAddress(address) === ValidationResult.VALID;
9
+ }
package/tsconfig.json CHANGED
@@ -4,9 +4,17 @@
4
4
  "declaration": true,
5
5
  "declarationMap": true,
6
6
  "downlevelIteration": true,
7
- "lib": ["es2020", "dom"],
7
+ "lib": [
8
+ "es2020",
9
+ "dom"
10
+ ],
8
11
  "outDir": "lib",
9
- "typeRoots": ["./node_modules/@types", "./types/@taquito"]
12
+ "typeRoots": [
13
+ "./node_modules/@types",
14
+ "./types/@taquito"
15
+ ]
10
16
  },
11
- "include": ["src/**/*"]
17
+ "include": [
18
+ "src/**/*"
19
+ ]
12
20
  }