@rango-dev/provider-ledger 0.31.1-next.0 → 0.31.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.
@@ -1,2 +1,2 @@
1
- declare const buildProvider: () => import("@rango-dev/wallets-core").Provider;
1
+ declare const buildProvider: () => import("@hub3js/core").Provider<Record<"solana", import("@hub3js/solana").SolanaActions> & Record<"evm", import("@hub3js/evm").EvmActions>>;
2
2
  export { buildProvider };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rango-dev/provider-ledger",
3
- "version": "0.31.1-next.0",
3
+ "version": "0.31.1-next.1",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "source": "./src/mod.ts",
@@ -21,6 +21,10 @@
21
21
  "lint": "eslint \"**/*.{ts,tsx}\""
22
22
  },
23
23
  "dependencies": {
24
+ "@hub3js/core": "^0.60.1",
25
+ "@hub3js/evm": "^0.2.1",
26
+ "@hub3js/solana": "^0.2.1",
27
+ "@hub3js/std": "^0.1.1",
24
28
  "@ledgerhq/errors": "^6.16.4",
25
29
  "@ledgerhq/hw-app-eth": "^6.36.0",
26
30
  "@ledgerhq/hw-app-solana": "^7.1.6",
@@ -29,10 +33,11 @@
29
33
  "@ledgerhq/types-devices": "^6.24.0",
30
34
  "@rango-dev/signer-solana": "^0.48.0",
31
35
  "@rango-dev/wallets-core": "^0.59.1-next.0",
32
- "@rango-dev/wallets-shared": "^0.60.1-next.0",
36
+ "@rango-dev/wallets-shared": "^0.60.1-next.1",
33
37
  "@solana/web3.js": "^1.91.4",
34
38
  "@types/w3c-web-hid": "^1.0.2",
35
39
  "bs58": "^5.0.0",
40
+ "caip": "^1.1.1",
36
41
  "ethers": "^6.13.2",
37
42
  "rango-types": "^0.5.0"
38
43
  },
package/src/constants.ts CHANGED
@@ -1,4 +1,5 @@
1
- import { type ProviderMetadata } from '@rango-dev/wallets-core';
1
+ import type { ProviderMetadata } from '@hub3js/core';
2
+
2
3
  import { LegacyNetworks } from '@rango-dev/wallets-core/legacy';
3
4
  import { Networks } from '@rango-dev/wallets-shared';
4
5
  import { type BlockchainMeta } from 'rango-types';
package/src/mod.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { defineVersions } from '@rango-dev/wallets-core/utils';
1
+ import { defineVersions } from '@hub3js/core/utils';
2
2
 
3
3
  import { buildLegacyProvider } from './legacy/index.js';
4
4
  import { buildProvider } from './provider.js';
@@ -1,16 +1,11 @@
1
- import type { EvmActions } from '@rango-dev/wallets-core/namespaces/evm';
1
+ import type { EvmActions } from '@hub3js/evm';
2
+ import type { CaipAccount } from '@hub3js/std/types';
2
3
 
3
- import { NamespaceBuilder } from '@rango-dev/wallets-core';
4
- import {
5
- type CaipAccount,
6
- builders as commonBuilders,
7
- } from '@rango-dev/wallets-core/namespaces/common';
8
- import {
9
- builders,
10
- CAIP_NAMESPACE,
11
- } from '@rango-dev/wallets-core/namespaces/evm';
12
- import { CAIP } from '@rango-dev/wallets-core/utils';
4
+ import { NamespaceBuilder } from '@hub3js/core';
5
+ import { builders, CAIP_NAMESPACE } from '@hub3js/evm';
6
+ import * as commonBuilders from '@hub3js/std/builders';
13
7
  import { ETHEREUM_CHAIN_ID } from '@rango-dev/wallets-shared';
8
+ import { AccountId } from 'caip';
14
9
 
15
10
  import { WALLET_ID } from '../constants.js';
16
11
  import { setDerivationPath } from '../state.js';
@@ -32,7 +27,7 @@ const connect = builders
32
27
 
33
28
  const formatAccounts = result.accounts.map(
34
29
  (account) =>
35
- CAIP.AccountId.format({
30
+ AccountId.format({
36
31
  address: account,
37
32
  chainId: {
38
33
  namespace: CAIP_NAMESPACE,
@@ -1,13 +1,10 @@
1
- import type { CaipAccount } from '@rango-dev/wallets-core/namespaces/common';
2
- import type { SolanaActions } from '@rango-dev/wallets-core/namespaces/solana';
1
+ import type { SolanaActions } from '@hub3js/solana';
2
+ import type { CaipAccount } from '@hub3js/std/types';
3
3
 
4
- import { NamespaceBuilder } from '@rango-dev/wallets-core';
5
- import { builders as commonBuilders } from '@rango-dev/wallets-core/namespaces/common';
6
- import {
7
- builders,
8
- CAIP_NAMESPACE,
9
- } from '@rango-dev/wallets-core/namespaces/solana';
10
- import { CAIP } from '@rango-dev/wallets-core/utils';
4
+ import { NamespaceBuilder } from '@hub3js/core';
5
+ import { builders, CAIP_NAMESPACE } from '@hub3js/solana';
6
+ import * as commonBuilders from '@hub3js/std/builders';
7
+ import { AccountId } from 'caip';
11
8
 
12
9
  import { WALLET_ID } from '../constants.js';
13
10
  import { setDerivationPath } from '../state.js';
@@ -26,7 +23,7 @@ const connect = builders
26
23
 
27
24
  const formatAccounts = result.accounts.map(
28
25
  (account) =>
29
- CAIP.AccountId.format({
26
+ AccountId.format({
30
27
  address: account,
31
28
  chainId: {
32
29
  namespace: CAIP_NAMESPACE,
package/src/provider.ts CHANGED
@@ -1,4 +1,4 @@
1
- import { ProviderBuilder } from '@rango-dev/wallets-core';
1
+ import { ProviderBuilder } from '@hub3js/core';
2
2
 
3
3
  import { metadata, WALLET_ID } from './constants.js';
4
4
  import { evm } from './namespaces/evm.js';
package/src/utils.ts CHANGED
@@ -1,8 +1,8 @@
1
1
  import type Transport from '@ledgerhq/hw-transport';
2
2
 
3
+ import { CAIP_SOLANA_CHAIN_ID } from '@hub3js/solana';
3
4
  import { getAltStatusMessage } from '@ledgerhq/errors';
4
5
  import { LegacyNetworks } from '@rango-dev/wallets-core/legacy';
5
- import { CAIP_SOLANA_CHAIN_ID } from '@rango-dev/wallets-core/namespaces/solana';
6
6
  import {
7
7
  dynamicImportWithRefinedError,
8
8
  ETHEREUM_CHAIN_ID,