@ledgerhq/coin-xrp 7.10.0-nightly.20251211024123 → 7.10.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.
- package/.unimportedrc.json +3 -2
- package/CHANGELOG.md +10 -8
- package/lib/logic/validateAddress.d.ts +3 -0
- package/lib/logic/validateAddress.d.ts.map +1 -0
- package/lib/logic/validateAddress.js +8 -0
- package/lib/logic/validateAddress.js.map +1 -0
- package/lib-es/logic/validateAddress.d.ts +3 -0
- package/lib-es/logic/validateAddress.d.ts.map +1 -0
- package/lib-es/logic/validateAddress.js +5 -0
- package/lib-es/logic/validateAddress.js.map +1 -0
- package/package.json +8 -8
- package/src/logic/validateAddress.test.ts +27 -0
- package/src/logic/validateAddress.ts +9 -0
- package/tsconfig.json +7 -2
package/.unimportedrc.json
CHANGED
|
@@ -6,7 +6,8 @@
|
|
|
6
6
|
"src/datasets/dataset-1.ts",
|
|
7
7
|
"src/signer/index.ts",
|
|
8
8
|
"src/test/index.ts",
|
|
9
|
-
"src/index.ts"
|
|
9
|
+
"src/index.ts",
|
|
10
|
+
"src/logic/validateAddress.ts"
|
|
10
11
|
],
|
|
11
12
|
"ignorePatterns": [
|
|
12
13
|
"**/node_modules/**",
|
|
@@ -23,4 +24,4 @@
|
|
|
23
24
|
"ignoreUnused": [
|
|
24
25
|
"rxjs"
|
|
25
26
|
]
|
|
26
|
-
}
|
|
27
|
+
}
|
package/CHANGELOG.md
CHANGED
|
@@ -1,20 +1,22 @@
|
|
|
1
1
|
# @ledgerhq/coin-xrp
|
|
2
2
|
|
|
3
|
-
## 7.10.0-nightly.
|
|
3
|
+
## 7.10.0-nightly.20251212024049
|
|
4
4
|
|
|
5
5
|
### Minor Changes
|
|
6
6
|
|
|
7
7
|
- [#13142](https://github.com/LedgerHQ/ledger-live/pull/13142) [`bdacedf`](https://github.com/LedgerHQ/ledger-live/commit/bdacedfe32bea8ffce96ab675a44c0d7cf395143) Thanks [@mcayuelas-ledger](https://github.com/mcayuelas-ledger)! - upgrade typescript-eslint rules & versions
|
|
8
8
|
|
|
9
|
+
- [#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
|
|
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), [`2d9f320`](https://github.com/LedgerHQ/ledger-live/commit/2d9f32087eea12ae9d5ea2347b277b8bf4e60f55), [`c56ab86`](https://github.com/LedgerHQ/ledger-live/commit/c56ab86ab65597caf87a09b7596faa54f3104bd4)]:
|
|
12
|
-
- @ledgerhq/coin-framework@6.11.0-nightly.
|
|
13
|
-
- @ledgerhq/types-live@6.91.0-nightly.
|
|
14
|
-
- @ledgerhq/cryptoassets@13.35.0-nightly.
|
|
15
|
-
- @ledgerhq/errors@6.28.0-nightly.
|
|
16
|
-
- @ledgerhq/devices@8.8.0-nightly.
|
|
17
|
-
- @ledgerhq/live-network@2.1.3-nightly.
|
|
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
|
## 7.9.0
|
|
20
22
|
|
|
@@ -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 ripple_address_codec_1 = require("ripple-address-codec");
|
|
5
|
+
async function validateAddress(address, _parameters) {
|
|
6
|
+
return (0, ripple_address_codec_1.isValidClassicAddress)(address);
|
|
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,+DAA6D;AAEtD,KAAK,UAAU,eAAe,CACnC,OAAe,EACf,WAAyD;IAEzD,OAAO,IAAA,4CAAqB,EAAC,OAAO,CAAC,CAAC;AACxC,CAAC"}
|
|
@@ -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 @@
|
|
|
1
|
+
{"version":3,"file":"validateAddress.js","sourceRoot":"","sources":["../../src/logic/validateAddress.ts"],"names":[],"mappings":"AACA,OAAO,EAAE,qBAAqB,EAAE,MAAM,sBAAsB,CAAC;AAE7D,MAAM,CAAC,KAAK,UAAU,eAAe,CACnC,OAAe,EACf,WAAyD;IAEzD,OAAO,qBAAqB,CAAC,OAAO,CAAC,CAAC;AACxC,CAAC"}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@ledgerhq/coin-xrp",
|
|
3
|
-
"version": "7.10.0-nightly.
|
|
3
|
+
"version": "7.10.0-nightly.20251212024049",
|
|
4
4
|
"description": "Ledger XRP Coin integration",
|
|
5
5
|
"keywords": [
|
|
6
6
|
"Ledger",
|
|
@@ -103,12 +103,12 @@
|
|
|
103
103
|
"invariant": "^2.2.4",
|
|
104
104
|
"ripple-address-codec": "^5.0.0",
|
|
105
105
|
"ripple-binary-codec": "^1.3.0",
|
|
106
|
-
"@ledgerhq/coin-framework": "^6.11.0-nightly.
|
|
107
|
-
"@ledgerhq/cryptoassets": "^13.35.0-nightly.
|
|
108
|
-
"@ledgerhq/devices": "8.8.0-nightly.
|
|
109
|
-
"@ledgerhq/errors": "^6.28.0-nightly.
|
|
110
|
-
"@ledgerhq/live-network": "^2.1.3-nightly.
|
|
111
|
-
"@ledgerhq/types-live": "^6.91.0-nightly.
|
|
106
|
+
"@ledgerhq/coin-framework": "^6.11.0-nightly.20251212024049",
|
|
107
|
+
"@ledgerhq/cryptoassets": "^13.35.0-nightly.20251212024049",
|
|
108
|
+
"@ledgerhq/devices": "8.8.0-nightly.20251212024049",
|
|
109
|
+
"@ledgerhq/errors": "^6.28.0-nightly.20251212024049",
|
|
110
|
+
"@ledgerhq/live-network": "^2.1.3-nightly.20251212024049",
|
|
111
|
+
"@ledgerhq/types-live": "^6.91.0-nightly.20251212024049",
|
|
112
112
|
"@ledgerhq/logs": "^6.13.0"
|
|
113
113
|
},
|
|
114
114
|
"devDependencies": {
|
|
@@ -122,7 +122,7 @@
|
|
|
122
122
|
"ts-jest": "^29.1.1",
|
|
123
123
|
"typescript": "^5.4.5",
|
|
124
124
|
"@ledgerhq/disable-network-setup": "^0.1.0",
|
|
125
|
-
"@ledgerhq/types-cryptoassets": "^7.31.0-nightly.
|
|
125
|
+
"@ledgerhq/types-cryptoassets": "^7.31.0-nightly.20251212024049"
|
|
126
126
|
},
|
|
127
127
|
"scripts": {
|
|
128
128
|
"clean": "rimraf lib lib-es",
|
|
@@ -0,0 +1,27 @@
|
|
|
1
|
+
import { isValidClassicAddress } from "ripple-address-codec";
|
|
2
|
+
import { validateAddress } from "./validateAddress";
|
|
3
|
+
|
|
4
|
+
jest.mock("ripple-address-codec");
|
|
5
|
+
|
|
6
|
+
describe("validateAddress", () => {
|
|
7
|
+
const mockedIsValidClassicAddress = jest.mocked(isValidClassicAddress);
|
|
8
|
+
|
|
9
|
+
beforeEach(() => {
|
|
10
|
+
mockedIsValidClassicAddress.mockClear();
|
|
11
|
+
});
|
|
12
|
+
|
|
13
|
+
it.each([true, false])(
|
|
14
|
+
"should call isValidClassicAddress from ripple and return expected value (%s)",
|
|
15
|
+
async (expectedValue: boolean) => {
|
|
16
|
+
mockedIsValidClassicAddress.mockReturnValueOnce(expectedValue);
|
|
17
|
+
|
|
18
|
+
const address = "some random address";
|
|
19
|
+
const parameters = {};
|
|
20
|
+
const result = await validateAddress(address, parameters);
|
|
21
|
+
expect(result).toEqual(expectedValue);
|
|
22
|
+
|
|
23
|
+
expect(mockedIsValidClassicAddress).toHaveBeenCalledTimes(1);
|
|
24
|
+
expect(mockedIsValidClassicAddress).toHaveBeenCalledWith(address);
|
|
25
|
+
},
|
|
26
|
+
);
|
|
27
|
+
});
|
|
@@ -0,0 +1,9 @@
|
|
|
1
|
+
import { AddressValidationCurrencyParameters } from "@ledgerhq/types-live";
|
|
2
|
+
import { isValidClassicAddress } from "ripple-address-codec";
|
|
3
|
+
|
|
4
|
+
export async function validateAddress(
|
|
5
|
+
address: string,
|
|
6
|
+
_parameters: Partial<AddressValidationCurrencyParameters>,
|
|
7
|
+
): Promise<boolean> {
|
|
8
|
+
return isValidClassicAddress(address);
|
|
9
|
+
}
|
package/tsconfig.json
CHANGED
|
@@ -4,9 +4,14 @@
|
|
|
4
4
|
"declaration": true,
|
|
5
5
|
"declarationMap": true,
|
|
6
6
|
"downlevelIteration": true,
|
|
7
|
-
"lib": [
|
|
7
|
+
"lib": [
|
|
8
|
+
"es2020",
|
|
9
|
+
"dom"
|
|
10
|
+
],
|
|
8
11
|
"outDir": "lib",
|
|
9
12
|
"exactOptionalPropertyTypes": true
|
|
10
13
|
},
|
|
11
|
-
"include": [
|
|
14
|
+
"include": [
|
|
15
|
+
"src/**/*"
|
|
16
|
+
]
|
|
12
17
|
}
|