@rango-dev/provider-ledger 0.11.1-next.0 → 0.12.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/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rango-dev/provider-ledger",
3
- "version": "0.11.1-next.0",
3
+ "version": "0.12.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "source": "./src/index.ts",
@@ -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.35.1-next.0",
31
- "@rango-dev/wallets-shared": "^0.41.1-next.0",
30
+ "@rango-dev/signer-solana": "^0.36.0",
31
+ "@rango-dev/wallets-shared": "^0.41.0",
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 { Networks, WalletTypes } from '@rango-dev/wallets-shared';
8
+ import { Namespace, 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 === 'Solana'
29
+ (namespaceItem) => namespaceItem.namespace === Namespace.Solana
30
30
  );
31
31
  const evmNamespace = namespaces?.find(
32
- (namespaceItem) => namespaceItem.namespace === 'EVM'
32
+ (namespaceItem) => namespaceItem.namespace === Namespace.Evm
33
33
  );
34
34
 
35
35
  if (solanaNamespace) {
@@ -93,56 +93,9 @@ export const getWalletInfo: (allBlockChains: BlockchainMeta[]) => WalletInfo = (
93
93
  },
94
94
  color: 'black',
95
95
  supportedChains,
96
+ namespaces: [Namespace.Evm, Namespace.Solana],
97
+ singleNamespace: true,
96
98
  showOnMobile: false,
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
- },
99
+ needsDerivationPath: true,
147
100
  };
148
101
  };