Skip to content

Commit 5b0de06

Browse files
committed
refactor: cut over wallet entrypoints
1 parent 2f3d86b commit 5b0de06

20 files changed

Lines changed: 51 additions & 45 deletions

typescript/sdk/package.json

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -25,6 +25,10 @@
2525
"types": "./dist/consts/*.d.ts",
2626
"default": "./dist/consts/*.js"
2727
},
28+
"./core/*": {
29+
"types": "./dist/core/*.d.ts",
30+
"default": "./dist/core/*.js"
31+
},
2832
"./metadata/*": {
2933
"types": "./dist/metadata/*.d.ts",
3034
"default": "./dist/metadata/*.js"

typescript/widgets/src/walletIntegrations/accounts.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -8,15 +8,15 @@ import {
88
ProtocolType,
99
} from '@hyperlane-xyz/utils';
1010

11-
import { useAleoAccount } from './aleoBase.js';
11+
import { useAleoAccount } from './aleoWallet.js';
1212
import { getAccountAddressForChain } from './accountUtils.js';
13-
import { useCosmosAccount } from './cosmosBase.js';
14-
import { useEthereumAccount } from './ethereumBase.js';
15-
import { useRadixAccount } from './radixBase.js';
16-
import { useSolanaAccount } from './solanaBase.js';
17-
import { useStarknetAccount } from './starknetBase.js';
13+
import { useCosmosAccount } from './cosmosWallet.js';
14+
import { useEthereumAccount } from './ethereumWallet.js';
15+
import { useRadixAccount } from './radixWallet.js';
16+
import { useSolanaAccount } from './solanaWallet.js';
17+
import { useStarknetAccount } from './starknetWallet.js';
1818
import { type AccountInfo } from './types.js';
19-
import { useTronAccount } from './tronBase.js';
19+
import { useTronAccount } from './tronWallet.js';
2020

2121
export function useAccounts(
2222
multiProvider: MultiProtocolProvider,

typescript/widgets/src/walletIntegrations/activeChains.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,14 @@ import { useMemo } from 'react';
33
import type { ConfiguredMultiProtocolProvider as MultiProtocolProvider } from '@hyperlane-xyz/sdk/providers/ConfiguredMultiProtocolProvider';
44
import { type KnownProtocolType, ProtocolType } from '@hyperlane-xyz/utils';
55

6-
import { useAleoActiveChain } from './aleoBase.js';
7-
import { useCosmosActiveChain } from './cosmosBase.js';
8-
import { useEthereumActiveChain } from './ethereumBase.js';
9-
import { useRadixActiveChain } from './radixBase.js';
10-
import { useSolanaActiveChain } from './solanaBase.js';
11-
import { useStarknetActiveChain } from './starknetBase.js';
6+
import { useAleoActiveChain } from './aleoWallet.js';
7+
import { useCosmosActiveChain } from './cosmosWallet.js';
8+
import { useEthereumActiveChain } from './ethereumWallet.js';
9+
import { useRadixActiveChain } from './radixWallet.js';
10+
import { useSolanaActiveChain } from './solanaWallet.js';
11+
import { useStarknetActiveChain } from './starknetWallet.js';
1212
import { type ActiveChainInfo } from './types.js';
13-
import { useTronActiveChain } from './tronBase.js';
13+
import { useTronActiveChain } from './tronWallet.js';
1414

1515
export function useActiveChains(multiProvider: MultiProtocolProvider): {
1616
chains: Record<KnownProtocolType, ActiveChainInfo>;

typescript/widgets/src/walletIntegrations/aleo.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,7 +26,7 @@ export {
2626
useAleoConnectFn,
2727
useAleoDisconnectFn,
2828
useAleoWalletDetails,
29-
} from './aleoBase.js';
29+
} from './aleoWallet.js';
3030

3131
export function useAleoSwitchNetwork(
3232
multiProvider: MultiProtocolProvider,

typescript/widgets/src/walletIntegrations/aleoBase.ts renamed to typescript/widgets/src/walletIntegrations/aleoWallet.ts

File renamed without changes.

typescript/widgets/src/walletIntegrations/connectFns.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -2,13 +2,13 @@ import { useMemo } from 'react';
22

33
import { type KnownProtocolType, ProtocolType } from '@hyperlane-xyz/utils';
44

5-
import { useAleoConnectFn } from './aleoBase.js';
6-
import { useCosmosConnectFn } from './cosmosBase.js';
7-
import { useEthereumConnectFn } from './ethereumBase.js';
8-
import { useRadixConnectFn } from './radixBase.js';
9-
import { useSolanaConnectFn } from './solanaBase.js';
10-
import { useStarknetConnectFn } from './starknetBase.js';
11-
import { useTronConnectFn } from './tronBase.js';
5+
import { useAleoConnectFn } from './aleoWallet.js';
6+
import { useCosmosConnectFn } from './cosmosWallet.js';
7+
import { useEthereumConnectFn } from './ethereumWallet.js';
8+
import { useRadixConnectFn } from './radixWallet.js';
9+
import { useSolanaConnectFn } from './solanaWallet.js';
10+
import { useStarknetConnectFn } from './starknetWallet.js';
11+
import { useTronConnectFn } from './tronWallet.js';
1212

1313
export function useConnectFns(): Record<KnownProtocolType, () => void> {
1414
const onConnectEthereum = useEthereumConnectFn();

typescript/widgets/src/walletIntegrations/cosmos.ts

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -22,7 +22,7 @@ import {
2222
SwitchNetworkFns,
2323
WatchAssetFns,
2424
} from './types.js';
25-
import { getCosmosChainNames, getCosmosChains } from './cosmosBase.js';
25+
import { getCosmosChainNames, getCosmosChains } from './cosmosWallet.js';
2626

2727
const logger = widgetLogger.child({
2828
module: 'widgets/walletIntegrations/cosmos',
@@ -33,7 +33,7 @@ export {
3333
useCosmosConnectFn,
3434
useCosmosDisconnectFn,
3535
useCosmosWalletDetails,
36-
} from './cosmosBase.js';
36+
} from './cosmosWallet.js';
3737

3838
export function useCosmosSwitchNetwork(
3939
multiProvider: MultiProtocolProvider,

typescript/widgets/src/walletIntegrations/cosmosBase.ts renamed to typescript/widgets/src/walletIntegrations/cosmosWallet.ts

File renamed without changes.

typescript/widgets/src/walletIntegrations/disconnectFns.tsx

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -4,13 +4,13 @@ import { type KnownProtocolType, ProtocolType } from '@hyperlane-xyz/utils';
44

55
import { widgetLogger } from '../logger.js';
66

7-
import { useAleoDisconnectFn } from './aleoBase.js';
8-
import { useCosmosDisconnectFn } from './cosmosBase.js';
9-
import { useEthereumDisconnectFn } from './ethereumBase.js';
10-
import { useRadixDisconnectFn } from './radixBase.js';
11-
import { useSolanaDisconnectFn } from './solanaBase.js';
12-
import { useStarknetDisconnectFn } from './starknetBase.js';
13-
import { useTronDisconnectFn } from './tronBase.js';
7+
import { useAleoDisconnectFn } from './aleoWallet.js';
8+
import { useCosmosDisconnectFn } from './cosmosWallet.js';
9+
import { useEthereumDisconnectFn } from './ethereumWallet.js';
10+
import { useRadixDisconnectFn } from './radixWallet.js';
11+
import { useSolanaDisconnectFn } from './solanaWallet.js';
12+
import { useStarknetDisconnectFn } from './starknetWallet.js';
13+
import { useTronDisconnectFn } from './tronWallet.js';
1414

1515
const logger = widgetLogger.child({
1616
module: 'walletIntegrations/disconnectFns',

typescript/widgets/src/walletIntegrations/ethereum.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -38,7 +38,7 @@ export {
3838
useEthereumConnectFn,
3939
useEthereumDisconnectFn,
4040
useEthereumWalletDetails,
41-
} from './ethereumBase.js';
41+
} from './ethereumWallet.js';
4242

4343
export function useEthereumSwitchNetwork(
4444
multiProvider: MultiProtocolProvider,

0 commit comments

Comments
 (0)