@xrpl-wallet-kit/adapter-ledger 0.1.13 → 0.1.14
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/README.md +71 -71
- package/package.json +57 -57
package/README.md
CHANGED
|
@@ -1,71 +1,71 @@
|
|
|
1
|
-
# @xrpl-wallet-kit/adapter-ledger
|
|
2
|
-
|
|
3
|
-
Ledger hardware wallet adapter for XRPL Wallet Kit.
|
|
4
|
-
|
|
5
|
-
This adapter connects to Ledger devices through WebHID or WebUSB, reads an XRPL account from the XRP app, and supports signed transaction flows for XRPL dApps.
|
|
6
|
-
|
|
7
|
-
## Capabilities
|
|
8
|
-
|
|
9
|
-
- `connect`
|
|
10
|
-
- `disconnect`
|
|
11
|
-
- `signTransaction`
|
|
12
|
-
- `signAndSubmit`
|
|
13
|
-
|
|
14
|
-
## Install
|
|
15
|
-
|
|
16
|
-
```bash
|
|
17
|
-
npm install @xrpl-wallet-kit/adapter-ledger
|
|
18
|
-
```
|
|
19
|
-
|
|
20
|
-
## Usage
|
|
21
|
-
|
|
22
|
-
```ts
|
|
23
|
-
import { createWalletKit } from "@xrpl-wallet-kit/client";
|
|
24
|
-
import { createLedgerAdapter } from "@xrpl-wallet-kit/adapter-ledger";
|
|
25
|
-
|
|
26
|
-
const kit = createWalletKit({
|
|
27
|
-
adapters: [createLedgerAdapter()]
|
|
28
|
-
});
|
|
29
|
-
```
|
|
30
|
-
|
|
31
|
-
## Runtime Notes
|
|
32
|
-
|
|
33
|
-
- Requires a browser with WebHID or WebUSB support.
|
|
34
|
-
- Requires a connected Ledger device with the XRP app open.
|
|
35
|
-
- Hardware wallets are explicit user-presence devices. `restoreSession()` returns `null` and does not silently reconnect after refresh.
|
|
36
|
-
- Default derivation path is `44'/144'/0'/0/0`.
|
|
37
|
-
- `signTransaction()` signs without submit.
|
|
38
|
-
- `signAndSubmit()` signs and submits when requested by the caller.
|
|
39
|
-
- XRPL multisigning is intentionally not advertised. Payloads that contain multisign shape such as `SigningPubKey: ""` or `Signers` fail with `UNSUPPORTED_METHOD` before the adapter delegates signing.
|
|
40
|
-
|
|
41
|
-
## Options
|
|
42
|
-
|
|
43
|
-
```ts
|
|
44
|
-
createLedgerAdapter({
|
|
45
|
-
accountIndex: 0,
|
|
46
|
-
derivationPath: "44'/144'/0'/0/0",
|
|
47
|
-
preferWebHID: true,
|
|
48
|
-
timeout: 60000
|
|
49
|
-
});
|
|
50
|
-
```
|
|
51
|
-
|
|
52
|
-
Use `connectLedger` in tests or custom integrations to inject a prebuilt Ledger session.
|
|
53
|
-
|
|
54
|
-
## Testing
|
|
55
|
-
|
|
56
|
-
Hardware transport should be mocked in unit tests. Manual smoke testing should cover:
|
|
57
|
-
|
|
58
|
-
- unsupported browser;
|
|
59
|
-
- device disconnected;
|
|
60
|
-
- device locked;
|
|
61
|
-
- XRP app not open;
|
|
62
|
-
- connect success;
|
|
63
|
-
- disconnect cleanup;
|
|
64
|
-
- `submit:false` signed transaction result;
|
|
65
|
-
- multisign payloads fail closed;
|
|
66
|
-
- user rejection on device.
|
|
67
|
-
|
|
68
|
-
## Links
|
|
69
|
-
|
|
70
|
-
- Ledger: https://www.ledger.com
|
|
71
|
-
- XRPL Wallet Kit: https://github.com/XRPDomains/xrpl-wallet-kit
|
|
1
|
+
# @xrpl-wallet-kit/adapter-ledger
|
|
2
|
+
|
|
3
|
+
Ledger hardware wallet adapter for XRPL Wallet Kit.
|
|
4
|
+
|
|
5
|
+
This adapter connects to Ledger devices through WebHID or WebUSB, reads an XRPL account from the XRP app, and supports signed transaction flows for XRPL dApps.
|
|
6
|
+
|
|
7
|
+
## Capabilities
|
|
8
|
+
|
|
9
|
+
- `connect`
|
|
10
|
+
- `disconnect`
|
|
11
|
+
- `signTransaction`
|
|
12
|
+
- `signAndSubmit`
|
|
13
|
+
|
|
14
|
+
## Install
|
|
15
|
+
|
|
16
|
+
```bash
|
|
17
|
+
npm install @xrpl-wallet-kit/adapter-ledger
|
|
18
|
+
```
|
|
19
|
+
|
|
20
|
+
## Usage
|
|
21
|
+
|
|
22
|
+
```ts
|
|
23
|
+
import { createWalletKit } from "@xrpl-wallet-kit/client";
|
|
24
|
+
import { createLedgerAdapter } from "@xrpl-wallet-kit/adapter-ledger";
|
|
25
|
+
|
|
26
|
+
const kit = createWalletKit({
|
|
27
|
+
adapters: [createLedgerAdapter()]
|
|
28
|
+
});
|
|
29
|
+
```
|
|
30
|
+
|
|
31
|
+
## Runtime Notes
|
|
32
|
+
|
|
33
|
+
- Requires a browser with WebHID or WebUSB support.
|
|
34
|
+
- Requires a connected Ledger device with the XRP app open.
|
|
35
|
+
- Hardware wallets are explicit user-presence devices. `restoreSession()` returns `null` and does not silently reconnect after refresh.
|
|
36
|
+
- Default derivation path is `44'/144'/0'/0/0`.
|
|
37
|
+
- `signTransaction()` signs without submit.
|
|
38
|
+
- `signAndSubmit()` signs and submits when requested by the caller.
|
|
39
|
+
- XRPL multisigning is intentionally not advertised. Payloads that contain multisign shape such as `SigningPubKey: ""` or `Signers` fail with `UNSUPPORTED_METHOD` before the adapter delegates signing.
|
|
40
|
+
|
|
41
|
+
## Options
|
|
42
|
+
|
|
43
|
+
```ts
|
|
44
|
+
createLedgerAdapter({
|
|
45
|
+
accountIndex: 0,
|
|
46
|
+
derivationPath: "44'/144'/0'/0/0",
|
|
47
|
+
preferWebHID: true,
|
|
48
|
+
timeout: 60000
|
|
49
|
+
});
|
|
50
|
+
```
|
|
51
|
+
|
|
52
|
+
Use `connectLedger` in tests or custom integrations to inject a prebuilt Ledger session.
|
|
53
|
+
|
|
54
|
+
## Testing
|
|
55
|
+
|
|
56
|
+
Hardware transport should be mocked in unit tests. Manual smoke testing should cover:
|
|
57
|
+
|
|
58
|
+
- unsupported browser;
|
|
59
|
+
- device disconnected;
|
|
60
|
+
- device locked;
|
|
61
|
+
- XRP app not open;
|
|
62
|
+
- connect success;
|
|
63
|
+
- disconnect cleanup;
|
|
64
|
+
- `submit:false` signed transaction result;
|
|
65
|
+
- multisign payloads fail closed;
|
|
66
|
+
- user rejection on device.
|
|
67
|
+
|
|
68
|
+
## Links
|
|
69
|
+
|
|
70
|
+
- Ledger: https://www.ledger.com
|
|
71
|
+
- XRPL Wallet Kit: https://github.com/XRPDomains/xrpl-wallet-kit
|
package/package.json
CHANGED
|
@@ -1,57 +1,57 @@
|
|
|
1
|
-
{
|
|
2
|
-
"name": "@xrpl-wallet-kit/adapter-ledger",
|
|
3
|
-
"version": "0.1.
|
|
4
|
-
"description": "Ledger hardware wallet adapter for XRPL Wallet Kit.",
|
|
5
|
-
"license": "MIT",
|
|
6
|
-
"type": "module",
|
|
7
|
-
"main": "./dist/index.js",
|
|
8
|
-
"types": "./dist/index.d.ts",
|
|
9
|
-
"exports": {
|
|
10
|
-
".": {
|
|
11
|
-
"types": "./dist/index.d.ts",
|
|
12
|
-
"import": "./dist/index.js"
|
|
13
|
-
}
|
|
14
|
-
},
|
|
15
|
-
"files": [
|
|
16
|
-
"dist",
|
|
17
|
-
"README.md"
|
|
18
|
-
],
|
|
19
|
-
"scripts": {
|
|
20
|
-
"build": "tsc -p tsconfig.json"
|
|
21
|
-
},
|
|
22
|
-
"dependencies": {
|
|
23
|
-
"@ledgerhq/errors": "^6.16.0",
|
|
24
|
-
"@ledgerhq/hw-app-xrp": "^6.28.0",
|
|
25
|
-
"@ledgerhq/hw-transport": "^6.28.0",
|
|
26
|
-
"@ledgerhq/hw-transport-webhid": "^6.28.0",
|
|
27
|
-
"@ledgerhq/hw-transport-webusb": "^6.28.0",
|
|
28
|
-
"@xrpl-wallet-kit/core": "0.1.
|
|
29
|
-
"buffer": "^6.0.3"
|
|
30
|
-
},
|
|
31
|
-
"peerDependencies": {
|
|
32
|
-
"xrpl": "^4.0.0"
|
|
33
|
-
},
|
|
34
|
-
"devDependencies": {
|
|
35
|
-
"xrpl": "^4.0.0"
|
|
36
|
-
},
|
|
37
|
-
"publishConfig": {
|
|
38
|
-
"access": "public"
|
|
39
|
-
},
|
|
40
|
-
"repository": {
|
|
41
|
-
"type": "git",
|
|
42
|
-
"url": "git+https://github.com/XRPDomains/xrpl-wallet-kit.git"
|
|
43
|
-
},
|
|
44
|
-
"homepage": "https://github.com/XRPDomains/xrpl-wallet-kit#readme",
|
|
45
|
-
"bugs": {
|
|
46
|
-
"url": "https://github.com/XRPDomains/xrpl-wallet-kit/issues"
|
|
47
|
-
},
|
|
48
|
-
"keywords": [
|
|
49
|
-
"xrpl",
|
|
50
|
-
"wallet",
|
|
51
|
-
"wallet-adapter",
|
|
52
|
-
"wallet-kit",
|
|
53
|
-
"xrp-ledger",
|
|
54
|
-
"web3",
|
|
55
|
-
"adapter"
|
|
56
|
-
]
|
|
57
|
-
}
|
|
1
|
+
{
|
|
2
|
+
"name": "@xrpl-wallet-kit/adapter-ledger",
|
|
3
|
+
"version": "0.1.14",
|
|
4
|
+
"description": "Ledger hardware wallet adapter for XRPL Wallet Kit.",
|
|
5
|
+
"license": "MIT",
|
|
6
|
+
"type": "module",
|
|
7
|
+
"main": "./dist/index.js",
|
|
8
|
+
"types": "./dist/index.d.ts",
|
|
9
|
+
"exports": {
|
|
10
|
+
".": {
|
|
11
|
+
"types": "./dist/index.d.ts",
|
|
12
|
+
"import": "./dist/index.js"
|
|
13
|
+
}
|
|
14
|
+
},
|
|
15
|
+
"files": [
|
|
16
|
+
"dist",
|
|
17
|
+
"README.md"
|
|
18
|
+
],
|
|
19
|
+
"scripts": {
|
|
20
|
+
"build": "tsc -p tsconfig.json"
|
|
21
|
+
},
|
|
22
|
+
"dependencies": {
|
|
23
|
+
"@ledgerhq/errors": "^6.16.0",
|
|
24
|
+
"@ledgerhq/hw-app-xrp": "^6.28.0",
|
|
25
|
+
"@ledgerhq/hw-transport": "^6.28.0",
|
|
26
|
+
"@ledgerhq/hw-transport-webhid": "^6.28.0",
|
|
27
|
+
"@ledgerhq/hw-transport-webusb": "^6.28.0",
|
|
28
|
+
"@xrpl-wallet-kit/core": "0.1.14",
|
|
29
|
+
"buffer": "^6.0.3"
|
|
30
|
+
},
|
|
31
|
+
"peerDependencies": {
|
|
32
|
+
"xrpl": "^4.0.0 || ^5.0.0"
|
|
33
|
+
},
|
|
34
|
+
"devDependencies": {
|
|
35
|
+
"xrpl": "^4.0.0"
|
|
36
|
+
},
|
|
37
|
+
"publishConfig": {
|
|
38
|
+
"access": "public"
|
|
39
|
+
},
|
|
40
|
+
"repository": {
|
|
41
|
+
"type": "git",
|
|
42
|
+
"url": "git+https://github.com/XRPDomains/xrpl-wallet-kit.git"
|
|
43
|
+
},
|
|
44
|
+
"homepage": "https://github.com/XRPDomains/xrpl-wallet-kit#readme",
|
|
45
|
+
"bugs": {
|
|
46
|
+
"url": "https://github.com/XRPDomains/xrpl-wallet-kit/issues"
|
|
47
|
+
},
|
|
48
|
+
"keywords": [
|
|
49
|
+
"xrpl",
|
|
50
|
+
"wallet",
|
|
51
|
+
"wallet-adapter",
|
|
52
|
+
"wallet-kit",
|
|
53
|
+
"xrp-ledger",
|
|
54
|
+
"web3",
|
|
55
|
+
"adapter"
|
|
56
|
+
]
|
|
57
|
+
}
|