@rango-dev/provider-ledger 0.12.0 → 0.12.1-next.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/CHANGELOG.md +4 -0
- package/dist/index.js +1 -1
- package/dist/index.js.map +3 -3
- package/dist/provider-ledger.build.json +1 -1
- package/package.json +4 -4
- package/src/index.ts +53 -6
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rango-dev/provider-ledger",
|
|
3
|
-
"version": "0.12.
|
|
3
|
+
"version": "0.12.1-next.1",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"source": "./src/index.ts",
|
|
@@ -18,7 +18,7 @@
|
|
|
18
18
|
"ts-check": "tsc --declaration --emitDeclarationOnly -p ./tsconfig.json",
|
|
19
19
|
"clean": "rimraf dist",
|
|
20
20
|
"format": "prettier --write '{.,src}/**/*.{ts,tsx}'",
|
|
21
|
-
"lint": "eslint \"**/*.{ts,tsx}\"
|
|
21
|
+
"lint": "eslint \"**/*.{ts,tsx}\""
|
|
22
22
|
},
|
|
23
23
|
"dependencies": {
|
|
24
24
|
"@ledgerhq/errors": "^6.16.4",
|
|
@@ -27,8 +27,8 @@
|
|
|
27
27
|
"@ledgerhq/hw-transport-webhid": "^6.28.6",
|
|
28
28
|
"@ledgerhq/types-cryptoassets": "^7.11.0",
|
|
29
29
|
"@ledgerhq/types-devices": "^6.24.0",
|
|
30
|
-
"@rango-dev/signer-solana": "^0.36.0",
|
|
31
|
-
"@rango-dev/wallets-shared": "^0.41.
|
|
30
|
+
"@rango-dev/signer-solana": "^0.36.1-next.0",
|
|
31
|
+
"@rango-dev/wallets-shared": "^0.41.1-next.2",
|
|
32
32
|
"@solana/web3.js": "^1.91.4",
|
|
33
33
|
"@types/w3c-web-hid": "^1.0.2",
|
|
34
34
|
"bs58": "^5.0.0",
|
package/src/index.ts
CHANGED
|
@@ -5,7 +5,7 @@ import type {
|
|
|
5
5
|
WalletInfo,
|
|
6
6
|
} from '@rango-dev/wallets-shared';
|
|
7
7
|
|
|
8
|
-
import {
|
|
8
|
+
import { Networks, WalletTypes } from '@rango-dev/wallets-shared';
|
|
9
9
|
import { type BlockchainMeta, type SignerFactory } from 'rango-types';
|
|
10
10
|
|
|
11
11
|
import {
|
|
@@ -26,10 +26,10 @@ export const connect: Connect = async ({ namespaces }) => {
|
|
|
26
26
|
const results: ProviderConnectResult[] = [];
|
|
27
27
|
|
|
28
28
|
const solanaNamespace = namespaces?.find(
|
|
29
|
-
(namespaceItem) => namespaceItem.namespace ===
|
|
29
|
+
(namespaceItem) => namespaceItem.namespace === 'Solana'
|
|
30
30
|
);
|
|
31
31
|
const evmNamespace = namespaces?.find(
|
|
32
|
-
(namespaceItem) => namespaceItem.namespace ===
|
|
32
|
+
(namespaceItem) => namespaceItem.namespace === 'EVM'
|
|
33
33
|
);
|
|
34
34
|
|
|
35
35
|
if (solanaNamespace) {
|
|
@@ -93,9 +93,56 @@ export const getWalletInfo: (allBlockChains: BlockchainMeta[]) => WalletInfo = (
|
|
|
93
93
|
},
|
|
94
94
|
color: 'black',
|
|
95
95
|
supportedChains,
|
|
96
|
-
namespaces: [Namespace.Evm, Namespace.Solana],
|
|
97
|
-
singleNamespace: true,
|
|
98
96
|
showOnMobile: false,
|
|
99
|
-
needsDerivationPath:
|
|
97
|
+
needsDerivationPath: {
|
|
98
|
+
data: [
|
|
99
|
+
{
|
|
100
|
+
id: 'metamask',
|
|
101
|
+
label: `Metamask (m/44'/60'/0'/0/index)`,
|
|
102
|
+
namespace: 'EVM',
|
|
103
|
+
generateDerivationPath: (index: string) => `44'/60'/0'/0/${index}`,
|
|
104
|
+
},
|
|
105
|
+
{
|
|
106
|
+
id: 'ledgerLive',
|
|
107
|
+
label: `LedgerLive (m/44'/60'/index'/0/0)`,
|
|
108
|
+
namespace: 'EVM',
|
|
109
|
+
generateDerivationPath: (index: string) => `44'/60'/${index}'/0/0`,
|
|
110
|
+
},
|
|
111
|
+
{
|
|
112
|
+
id: 'legacy',
|
|
113
|
+
label: `Legacy (m/44'/60'/0'/index)`,
|
|
114
|
+
namespace: 'EVM',
|
|
115
|
+
generateDerivationPath: (index: string) => `44'/60'/0'/${index}`,
|
|
116
|
+
},
|
|
117
|
+
{
|
|
118
|
+
id: `(m/44'/501'/index')`,
|
|
119
|
+
label: `(m/44'/501'/index')`,
|
|
120
|
+
namespace: 'Solana',
|
|
121
|
+
generateDerivationPath: (index: string) => `44'/501'/${index}'`,
|
|
122
|
+
},
|
|
123
|
+
{
|
|
124
|
+
id: `(m/44'/501'/0'/index)`,
|
|
125
|
+
label: `(m/44'/501'/0'/index)`,
|
|
126
|
+
namespace: 'Solana',
|
|
127
|
+
generateDerivationPath: (index: string) => `44'/501'/0'/${index}`,
|
|
128
|
+
},
|
|
129
|
+
],
|
|
130
|
+
},
|
|
131
|
+
|
|
132
|
+
needsNamespace: {
|
|
133
|
+
selection: 'single',
|
|
134
|
+
data: [
|
|
135
|
+
{
|
|
136
|
+
label: 'EVM',
|
|
137
|
+
value: 'EVM',
|
|
138
|
+
id: 'ETH',
|
|
139
|
+
},
|
|
140
|
+
{
|
|
141
|
+
label: 'Solana',
|
|
142
|
+
value: 'Solana',
|
|
143
|
+
id: 'SOLANA',
|
|
144
|
+
},
|
|
145
|
+
],
|
|
146
|
+
},
|
|
100
147
|
};
|
|
101
148
|
};
|