@rango-dev/wallets-react 0.0.0-experimental-3e0c1f86-20251213 → 0.0.0-experimental-82bcc5d9-20260608

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.
Files changed (37) hide show
  1. package/CHANGELOG.md +43 -0
  2. package/dist/helpers/index.js +1 -1
  3. package/dist/helpers/index.js.map +3 -3
  4. package/dist/hub/autoConnect.d.ts +2 -2
  5. package/dist/hub/autoConnect.d.ts.map +1 -1
  6. package/dist/hub/helpers.d.ts +4 -5
  7. package/dist/hub/helpers.d.ts.map +1 -1
  8. package/dist/hub/lastConnectedWallets.d.ts +1 -1
  9. package/dist/hub/lastConnectedWallets.d.ts.map +1 -1
  10. package/dist/hub/types.d.ts +3 -2
  11. package/dist/hub/types.d.ts.map +1 -1
  12. package/dist/hub/useHubAdapter.d.ts +2 -2
  13. package/dist/hub/useHubAdapter.d.ts.map +1 -1
  14. package/dist/hub/useHubRefs.d.ts +2 -2
  15. package/dist/hub/useHubRefs.d.ts.map +1 -1
  16. package/dist/hub/utils.d.ts +7 -13
  17. package/dist/hub/utils.d.ts.map +1 -1
  18. package/dist/index.js +1 -1
  19. package/dist/index.js.map +4 -4
  20. package/dist/legacy/types.d.ts +12 -3
  21. package/dist/legacy/types.d.ts.map +1 -1
  22. package/dist/test-utils/fixtures.d.ts +1 -1
  23. package/dist/test-utils/fixtures.d.ts.map +1 -1
  24. package/dist/wallets-react.build.json +1 -1
  25. package/package.json +11 -5
  26. package/src/hub/autoConnect.ts +5 -24
  27. package/src/hub/helpers.ts +15 -23
  28. package/src/hub/lastConnectedWallets.ts +1 -1
  29. package/src/hub/types.ts +4 -7
  30. package/src/hub/useHubAdapter.ts +6 -46
  31. package/src/hub/useHubRefs.ts +2 -2
  32. package/src/hub/utils.ts +8 -26
  33. package/src/legacy/types.ts +12 -7
  34. package/src/test-utils/fixtures.ts +4 -78
  35. package/dist/hub/chainRegisteryConvertors.d.ts +0 -11
  36. package/dist/hub/chainRegisteryConvertors.d.ts.map +0 -1
  37. package/src/hub/chainRegisteryConvertors.ts +0 -186
@@ -1,7 +1,8 @@
1
- import type { Provider, ProviderMetadata, VersionedProviders } from '@rango-dev/wallets-core';
1
+ import type { Provider, ProviderMetadata } from '@hub3js/core';
2
+ import type { NamespaceData } from '@hub3js/core/store';
3
+ import type { VersionedProviders } from '@hub3js/core/utils';
4
+ import type { Namespace } from '@hub3js/namespaces';
2
5
  import type { LegacyNamespaceInputForConnect, LegacyProviderInterface, LegacyNetwork as Network, LegacyEventHandler as WalletEventHandler, LegacyWalletInfo as WalletInfo, LegacyState as WalletState, LegacyWalletType as WalletType } from '@rango-dev/wallets-core/legacy';
3
- import type { Namespace } from '@rango-dev/wallets-core/namespaces/common';
4
- import type { NamespaceData } from '@rango-dev/wallets-core/store';
5
6
  import type { BlockchainMeta, SignerFactory } from 'rango-types';
6
7
  import type { PropsWithChildren } from 'react';
7
8
  import { LegacyEvents as Events } from '@rango-dev/wallets-core/legacy';
@@ -49,6 +50,14 @@ export type ProviderProps = PropsWithChildren<{
49
50
  providers: VersionedProviders[];
50
51
  configs?: {
51
52
  wallets?: (WalletType | LegacyProviderInterface | Provider)[];
53
+ walletOptions?: {
54
+ [key: WalletType]: {
55
+ provider?: unknown;
56
+ namespaces?: {
57
+ [namespaceId: string]: unknown;
58
+ };
59
+ };
60
+ };
52
61
  };
53
62
  }>;
54
63
  export { Events };
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/legacy/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,QAAQ,EACR,gBAAgB,EAChB,kBAAkB,EACnB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EACV,8BAA8B,EAC9B,uBAAuB,EACvB,aAAa,IAAI,OAAO,EACxB,kBAAkB,IAAI,kBAAkB,EACxC,gBAAgB,IAAI,UAAU,EAC9B,WAAW,IAAI,WAAW,EAC1B,gBAAgB,IAAI,UAAU,E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,CAAC,aAAa,CAAC,CAAC;IAC/D,kBAAkB,CAAC,EAAE,gBAAgB,CAAC;IACtC,eAAe,CAAC,EAAE,eAAe,CAAC;IAClC,aAAa,CAAC,cAAc,EAAE,cAAc,EAAE,GAAG,UAAU,CAAC;CAC7D;AAED,MAAM,WAAW,YAAY;IAC3B,IAAI,EAAE,UAAU,CAAC;IACjB,cAAc,CAAC,EAAE,OAAO,CAAC;IACzB,iBAAiB,CAAC,EAAE,OAAO,CAAC;IAC5B,eAAe,CAAC,EAAE,OAAO,CAAC;IAC1B,oBAAoB,CAAC,EAAE,OAAO,CAAC;CAChC;AAED,MAAM,MAAM,eAAe,GAAG,GAAG,CAC/B,UAAU,EACV;IACE,OAAO,EAAE,aAAa,CAAC;IACvB,MAAM,EAAE,YAAY,CAAC;CACtB,CACF,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAAE,MAAM,EAAE,YAAY,CAAA;CAAE,GAAG,aAAa,CAAC"}
@@ -6,7 +6,7 @@ export declare class MockEvmSigner implements GenericSigner<EvmTransaction> {
6
6
  signMessage(_msg: string, _address: string, _chainId: string | null): Promise<string>;
7
7
  signAndSendTx(_tx: EvmTransaction, _address: string, _chainId: string | null): Promise<{
8
8
  hash: string;
9
- response?: any;
9
+ response?: unknown;
10
10
  }>;
11
11
  }
12
12
  export declare const legacyProvider: LegacyProviderInterface;
@@ -1 +1 @@
1
- {"version":3,"file":"fixtures.d.ts","sourceRoot":"","sources":["../../src/test-utils/fixtures.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAC9E,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,KAAK,EAAE,cAAc,EAAE,MAAM,qBAAqB,CAAC;AAI1D,eAAO,MAAM,aAAa,+CAA+C,CAAC;AAE1E,qBAAa,aAAc,YAAW,aAAa,CAAC,cAAc,CAAC;IAC3D,WAAW,CACf,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.ts":{"bytes":146,"imports":[],"format":"esm"},"src/hub/lastConnectedWallets.ts":{"bytes":5519,"imports":[{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"src/hub/constants.ts","kind":"import-statement","original":"./constants.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/legacy/helpers.ts":{"bytes":4652,"imports":[{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"src/hub/constants.ts","kind":"import-statement","original":"../hub/constants.js"},{"path":"src/hub/lastConnectedWallets.ts","kind":"import-statement","original":"../hub/lastConnectedWallets.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/legacy/context.ts":{"bytes":960,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"src/legacy/autoConnect.ts":{"bytes":2046,"imports":[{"path":"src/hub/lastConnectedWallets.ts","kind":"import-statement","original":"../hub/lastConnectedWallets.js"},{"path":"src/legacy/mod.ts","kind":"import-statement","original":"./mod.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/legacy/hooks.ts":{"bytes":1545,"imports":[{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"src/legacy/context.ts","kind":"import-statement","original":"./context.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/legacy/utils.ts":{"bytes":230,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/legacy/useAutoConnect.ts":{"bytes":628,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"src/legacy/utils.ts","kind":"import-statement","original":"./utils.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/legacy/useLegacyProviders.ts":{"bytes":7639,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"src/legacy/autoConnect.ts","kind":"import-statement","original":"./autoConnect.js"},{"path":"src/legacy/helpers.ts","kind":"import-statement","original":"./helpers.js"},{"path":"src/legacy/hooks.ts","kind":"import-statement","original":"./hooks.js"},{"path":"src/legacy/useAutoConnect.ts","kind":"import-statement","original":"./useAutoConnect.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/legacy/mod.ts":{"bytes":321,"imports":[{"path":"src/hub/constants.ts","kind":"import-statement","original":"../hub/constants.js"},{"path":"src/legacy/context.ts","kind":"import-statement","original":"./context.js"},{"path":"src/legacy/useLegacyProviders.ts","kind":"import-statement","original":"./useLegacyProviders.js"}],"format":"esm"},"src/hub/helpers.ts":{"bytes":5429,"imports":[{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/namespaces/cosmos","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/namespaces/tron","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/namespaces/utxo","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/utils","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"ts-results","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/utils.ts":{"bytes":11267,"imports":[{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/utils","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/utils","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"src/legacy/mod.ts","kind":"import-statement","original":"../legacy/mod.js"},{"path":"src/hub/helpers.ts","kind":"import-statement","original":"./helpers.js"},{"path":"src/hub/lastConnectedWallets.ts","kind":"import-statement","original":"./lastConnectedWallets.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/autoConnect.ts":{"bytes":9242,"imports":[{"path":"@rango-dev/wallets-core","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"ts-results","kind":"import-statement","external":true},{"path":"src/legacy/mod.ts","kind":"import-statement","original":"../legacy/mod.js"},{"path":"src/hub/helpers.ts","kind":"import-statement","original":"./helpers.js"},{"path":"src/hub/lastConnectedWallets.ts","kind":"import-statement","original":"./lastConnectedWallets.js"},{"path":"src/hub/utils.ts","kind":"import-statement","original":"./utils.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/chainRegisteryConvertors.ts":{"bytes":5037,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/useHubRefs.ts":{"bytes":1271,"imports":[{"path":"@rango-dev/wallets-core","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"src/hub/utils.ts","kind":"import-statement","original":"./utils.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/useHubAdapter.ts":{"bytes":18694,"imports":[{"path":"@rango-dev/wallets-core/namespaces/evm","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"ts-results","kind":"import-statement","external":true},{"path":"src/legacy/mod.ts","kind":"import-statement","original":"../legacy/mod.js"},{"path":"src/legacy/useAutoConnect.ts","kind":"import-statement","original":"../legacy/useAutoConnect.js"},{"path":"src/hub/autoConnect.ts","kind":"import-statement","original":"./autoConnect.js"},{"path":"src/hub/chainRegisteryConvertors.ts","kind":"import-statement","original":"./chainRegisteryConvertors.js"},{"path":"src/hub/helpers.ts","kind":"import-statement","original":"./helpers.js"},{"path":"src/hub/lastConnectedWallets.ts","kind":"import-statement","original":"./lastConnectedWallets.js"},{"path":"src/hub/useHubRefs.ts","kind":"import-statement","original":"./useHubRefs.js"},{"path":"src/hub/utils.ts","kind":"import-statement","original":"./utils.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/mod.ts":{"bytes":162,"imports":[{"path":"src/hub/utils.ts","kind":"import-statement","original":"./utils.js"},{"path":"src/hub/useHubAdapter.ts","kind":"import-statement","original":"./useHubAdapter.js"}],"format":"esm"},"src/useProviders.ts":{"bytes":3661,"imports":[{"path":"src/hub/mod.ts","kind":"import-statement","original":"./hub/mod.js"},{"path":"src/legacy/mod.ts","kind":"import-statement","original":"./legacy/mod.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/provider.tsx":{"bytes":405,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"src/legacy/context.ts","kind":"import-statement","original":"./legacy/context.js"},{"path":"src/useProviders.ts","kind":"import-statement","original":"./useProviders.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/legacy/types.ts":{"bytes":5800,"imports":[{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":173,"imports":[{"path":"src/legacy/helpers.ts","kind":"import-statement","original":"./legacy/helpers.js"},{"path":"src/provider.tsx","kind":"import-statement","original":"./provider.js"},{"path":"src/legacy/hooks.ts","kind":"import-statement","original":"./legacy/hooks.js"},{"path":"src/legacy/types.ts","kind":"import-statement","original":"./legacy/types.js"}],"format":"esm"},"src/helpers/index.ts":{"bytes":55,"imports":[{"path":"src/hub/mod.ts","kind":"import-statement","original":"../hub/mod.js"}],"format":"esm"}},"outputs":{"dist/index.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":126439},"dist/index.js":{"imports":[{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/utils","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/utils","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/namespaces/cosmos","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/namespaces/tron","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/namespaces/utxo","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/utils","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"ts-results","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/namespaces/evm","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"ts-results","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"ts-results","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true}],"exports":["Events","Provider","availableWallets","checkWalletProviders","choose","clearPersistance","connectedWallets","defaultWalletState","isAsync","makeEventHandler","needsCheckInstallation","stateReducer","tryPersistWallet","tryRemoveWalletFromPersistance","useWallets"],"entryPoint":"src/index.ts","inputs":{"src/legacy/helpers.ts":{"bytesInOutput":1407},"src/hub/constants.ts":{"bytesInOutput":65},"src/hub/lastConnectedWallets.ts":{"bytesInOutput":1311},"src/index.ts":{"bytesInOutput":0},"src/provider.tsx":{"bytesInOutput":133},"src/legacy/context.ts":{"bytesInOutput":465},"src/hub/utils.ts":{"bytesInOutput":3150},"src/legacy/mod.ts":{"bytesInOutput":0},"src/legacy/useLegacyProviders.ts":{"bytesInOutput":2312},"src/legacy/autoConnect.ts":{"bytesInOutput":395},"src/legacy/hooks.ts":{"bytesInOutput":460},"src/legacy/useAutoConnect.ts":{"bytesInOutput":197},"src/legacy/utils.ts":{"bytesInOutput":94},"src/hub/helpers.ts":{"bytesInOutput":2045},"src/hub/mod.ts":{"bytesInOutput":0},"src/hub/useHubAdapter.ts":{"bytesInOutput":6791},"src/hub/autoConnect.ts":{"bytesInOutput":2524},"src/hub/chainRegisteryConvertors.ts":{"bytesInOutput":2738},"src/hub/useHubRefs.ts":{"bytesInOutput":497},"src/useProviders.ts":{"bytesInOutput":1026},"src/legacy/types.ts":{"bytesInOutput":63}},"bytes":26115},"dist/helpers/index.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":75038},"dist/helpers/index.js":{"imports":[{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/utils","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/utils","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/namespaces/cosmos","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/namespaces/tron","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/namespaces/utxo","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/utils","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"ts-results","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/namespaces/evm","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"ts-results","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"ts-results","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"exports":["getAllLegacyProviders"],"entryPoint":"src/helpers/index.ts","inputs":{"src/hub/utils.ts":{"bytesInOutput":421},"src/hub/constants.ts":{"bytesInOutput":65},"src/legacy/mod.ts":{"bytesInOutput":0},"src/legacy/context.ts":{"bytesInOutput":461},"src/legacy/useLegacyProviders.ts":{"bytesInOutput":52},"src/hub/lastConnectedWallets.ts":{"bytesInOutput":1311},"src/legacy/helpers.ts":{"bytesInOutput":59},"src/legacy/hooks.ts":{"bytesInOutput":109},"src/legacy/useAutoConnect.ts":{"bytesInOutput":48},"src/hub/helpers.ts":{"bytesInOutput":482},"src/hub/mod.ts":{"bytesInOutput":0},"src/hub/useHubAdapter.ts":{"bytesInOutput":256},"src/hub/autoConnect.ts":{"bytesInOutput":225},"src/hub/useHubRefs.ts":{"bytesInOutput":97},"src/helpers/index.ts":{"bytesInOutput":0}},"bytes":3735}}}
1
+ {"inputs":{"src/hub/constants.ts":{"bytes":146,"imports":[],"format":"esm"},"src/hub/lastConnectedWallets.ts":{"bytes":5496,"imports":[{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"src/hub/constants.ts","kind":"import-statement","original":"./constants.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/legacy/helpers.ts":{"bytes":4652,"imports":[{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"src/hub/constants.ts","kind":"import-statement","original":"../hub/constants.js"},{"path":"src/hub/lastConnectedWallets.ts","kind":"import-statement","original":"../hub/lastConnectedWallets.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/legacy/context.ts":{"bytes":960,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"src/legacy/autoConnect.ts":{"bytes":2046,"imports":[{"path":"src/hub/lastConnectedWallets.ts","kind":"import-statement","original":"../hub/lastConnectedWallets.js"},{"path":"src/legacy/mod.ts","kind":"import-statement","original":"./mod.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/legacy/hooks.ts":{"bytes":1545,"imports":[{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"src/legacy/context.ts","kind":"import-statement","original":"./context.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/legacy/utils.ts":{"bytes":230,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/legacy/useAutoConnect.ts":{"bytes":628,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"src/legacy/utils.ts","kind":"import-statement","original":"./utils.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/legacy/useLegacyProviders.ts":{"bytes":7639,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"src/legacy/autoConnect.ts","kind":"import-statement","original":"./autoConnect.js"},{"path":"src/legacy/helpers.ts","kind":"import-statement","original":"./helpers.js"},{"path":"src/legacy/hooks.ts","kind":"import-statement","original":"./hooks.js"},{"path":"src/legacy/useAutoConnect.ts","kind":"import-statement","original":"./useAutoConnect.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/legacy/mod.ts":{"bytes":321,"imports":[{"path":"src/hub/constants.ts","kind":"import-statement","original":"../hub/constants.js"},{"path":"src/legacy/context.ts","kind":"import-statement","original":"./context.js"},{"path":"src/legacy/useLegacyProviders.ts","kind":"import-statement","original":"./useLegacyProviders.js"}],"format":"esm"},"src/hub/helpers.ts":{"bytes":5087,"imports":[{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/namespaces/ton","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/namespaces/tron","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/namespaces/utxo","kind":"import-statement","external":true},{"path":"caip","kind":"import-statement","external":true},{"path":"ts-results","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/utils.ts":{"bytes":10560,"imports":[{"path":"@hub3js/core/utils","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"src/legacy/mod.ts","kind":"import-statement","original":"../legacy/mod.js"},{"path":"src/hub/helpers.ts","kind":"import-statement","original":"./helpers.js"},{"path":"src/hub/lastConnectedWallets.ts","kind":"import-statement","original":"./lastConnectedWallets.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/autoConnect.ts":{"bytes":8562,"imports":[{"path":"@hub3js/core","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"ts-results","kind":"import-statement","external":true},{"path":"src/legacy/mod.ts","kind":"import-statement","original":"../legacy/mod.js"},{"path":"src/hub/helpers.ts","kind":"import-statement","original":"./helpers.js"},{"path":"src/hub/lastConnectedWallets.ts","kind":"import-statement","original":"./lastConnectedWallets.js"},{"path":"src/hub/utils.ts","kind":"import-statement","original":"./utils.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/useHubRefs.ts":{"bytes":1249,"imports":[{"path":"@hub3js/core","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"src/hub/utils.ts","kind":"import-statement","original":"./utils.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/useHubAdapter.ts":{"bytes":17031,"imports":[{"path":"@hub3js/evm","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"ts-results","kind":"import-statement","external":true},{"path":"src/legacy/mod.ts","kind":"import-statement","original":"../legacy/mod.js"},{"path":"src/legacy/useAutoConnect.ts","kind":"import-statement","original":"../legacy/useAutoConnect.js"},{"path":"src/hub/autoConnect.ts","kind":"import-statement","original":"./autoConnect.js"},{"path":"src/hub/helpers.ts","kind":"import-statement","original":"./helpers.js"},{"path":"src/hub/lastConnectedWallets.ts","kind":"import-statement","original":"./lastConnectedWallets.js"},{"path":"src/hub/useHubRefs.ts","kind":"import-statement","original":"./useHubRefs.js"},{"path":"src/hub/utils.ts","kind":"import-statement","original":"./utils.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/mod.ts":{"bytes":162,"imports":[{"path":"src/hub/utils.ts","kind":"import-statement","original":"./utils.js"},{"path":"src/hub/useHubAdapter.ts","kind":"import-statement","original":"./useHubAdapter.js"}],"format":"esm"},"src/useProviders.ts":{"bytes":3661,"imports":[{"path":"src/hub/mod.ts","kind":"import-statement","original":"./hub/mod.js"},{"path":"src/legacy/mod.ts","kind":"import-statement","original":"./legacy/mod.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/provider.tsx":{"bytes":405,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"src/legacy/context.ts","kind":"import-statement","original":"./legacy/context.js"},{"path":"src/useProviders.ts","kind":"import-statement","original":"./useProviders.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/legacy/types.ts":{"bytes":5959,"imports":[{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":173,"imports":[{"path":"src/legacy/helpers.ts","kind":"import-statement","original":"./legacy/helpers.js"},{"path":"src/provider.tsx","kind":"import-statement","original":"./provider.js"},{"path":"src/legacy/hooks.ts","kind":"import-statement","original":"./legacy/hooks.js"},{"path":"src/legacy/types.ts","kind":"import-statement","original":"./legacy/types.js"}],"format":"esm"},"src/helpers/index.ts":{"bytes":55,"imports":[{"path":"src/hub/mod.ts","kind":"import-statement","original":"../hub/mod.js"}],"format":"esm"}},"outputs":{"dist/index.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":113251},"dist/index.js":{"imports":[{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@hub3js/core/utils","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/namespaces/ton","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/namespaces/tron","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/namespaces/utxo","kind":"import-statement","external":true},{"path":"caip","kind":"import-statement","external":true},{"path":"ts-results","kind":"import-statement","external":true},{"path":"@hub3js/evm","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"ts-results","kind":"import-statement","external":true},{"path":"@hub3js/core","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"ts-results","kind":"import-statement","external":true},{"path":"@hub3js/core","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true}],"exports":["Events","Provider","availableWallets","checkWalletProviders","choose","clearPersistance","connectedWallets","defaultWalletState","isAsync","makeEventHandler","needsCheckInstallation","stateReducer","tryPersistWallet","tryRemoveWalletFromPersistance","useWallets"],"entryPoint":"src/index.ts","inputs":{"src/legacy/helpers.ts":{"bytesInOutput":1401},"src/hub/constants.ts":{"bytesInOutput":65},"src/hub/lastConnectedWallets.ts":{"bytesInOutput":1311},"src/index.ts":{"bytesInOutput":0},"src/provider.tsx":{"bytesInOutput":133},"src/legacy/context.ts":{"bytesInOutput":465},"src/hub/utils.ts":{"bytesInOutput":3009},"src/legacy/mod.ts":{"bytesInOutput":0},"src/legacy/useLegacyProviders.ts":{"bytesInOutput":2309},"src/legacy/autoConnect.ts":{"bytesInOutput":395},"src/legacy/hooks.ts":{"bytesInOutput":460},"src/legacy/useAutoConnect.ts":{"bytesInOutput":197},"src/legacy/utils.ts":{"bytesInOutput":94},"src/hub/helpers.ts":{"bytesInOutput":1856},"src/hub/mod.ts":{"bytesInOutput":0},"src/hub/useHubAdapter.ts":{"bytesInOutput":6118},"src/hub/autoConnect.ts":{"bytesInOutput":2198},"src/hub/useHubRefs.ts":{"bytesInOutput":486},"src/useProviders.ts":{"bytesInOutput":1026},"src/legacy/types.ts":{"bytesInOutput":63}},"bytes":22025},"dist/helpers/index.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":71393},"dist/helpers/index.js":{"imports":[{"path":"@hub3js/core/utils","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/namespaces/ton","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/namespaces/tron","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/namespaces/utxo","kind":"import-statement","external":true},{"path":"caip","kind":"import-statement","external":true},{"path":"ts-results","kind":"import-statement","external":true},{"path":"@hub3js/evm","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"ts-results","kind":"import-statement","external":true},{"path":"@hub3js/core","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"ts-results","kind":"import-statement","external":true},{"path":"@hub3js/core","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"exports":["getAllLegacyProviders"],"entryPoint":"src/helpers/index.ts","inputs":{"src/hub/utils.ts":{"bytesInOutput":372},"src/hub/constants.ts":{"bytesInOutput":65},"src/legacy/mod.ts":{"bytesInOutput":0},"src/legacy/context.ts":{"bytesInOutput":461},"src/legacy/useLegacyProviders.ts":{"bytesInOutput":52},"src/hub/lastConnectedWallets.ts":{"bytesInOutput":1311},"src/legacy/helpers.ts":{"bytesInOutput":59},"src/legacy/hooks.ts":{"bytesInOutput":109},"src/legacy/useAutoConnect.ts":{"bytesInOutput":48},"src/hub/helpers.ts":{"bytesInOutput":416},"src/hub/mod.ts":{"bytesInOutput":0},"src/hub/useHubAdapter.ts":{"bytesInOutput":180},"src/hub/autoConnect.ts":{"bytesInOutput":165},"src/hub/useHubRefs.ts":{"bytesInOutput":86},"src/helpers/index.ts":{"bytesInOutput":0}},"bytes":3473}}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rango-dev/wallets-react",
3
- "version": "0.0.0-experimental-3e0c1f86-20251213",
3
+ "version": "0.0.0-experimental-82bcc5d9-20260608",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "source": "./src/index.ts",
@@ -35,13 +35,19 @@
35
35
  "react-dom": "^17.0.0 || ^18.0.0"
36
36
  },
37
37
  "dependencies": {
38
- "@rango-dev/wallets-core": "^0.0.0-experimental-3e0c1f86-20251213",
39
- "@rango-dev/wallets-shared": "^0.0.0-experimental-3e0c1f86-20251213",
40
- "rango-types": "^0.1.89",
38
+ "@hub3js/core": "^0.60.1",
39
+ "@hub3js/evm": "^0.2.1",
40
+ "@hub3js/namespaces": "^0.1.1",
41
+ "@hub3js/solana": "^0.2.1",
42
+ "@hub3js/std": "^0.1.1",
43
+ "@rango-dev/wallets-core": "^0.0.0-experimental-82bcc5d9-20260608",
44
+ "@rango-dev/wallets-shared": "^0.0.0-experimental-82bcc5d9-20260608",
45
+ "caip": "^1.1.1",
46
+ "rango-types": "^0.5.0",
41
47
  "ts-results": "^3.3.0"
42
48
  },
43
49
  "devDependencies": {
44
- "@chain-registry/types": "2.0.110",
50
+ "@testing-library/react-hooks": "^8.0.1",
45
51
  "@types/react": "^18.0.25",
46
52
  "@types/react-dom": "^18.0.25"
47
53
  },
@@ -1,20 +1,16 @@
1
1
  import type { AllProxiedNamespaces } from './types.js';
2
2
  import type { UseAdapterParams } from './useHubAdapter.js';
3
- import type { Hub } from '@rango-dev/wallets-core';
3
+ import type { Hub } from '@hub3js/core';
4
+ import type { DefaultNamespaces, Namespace } from '@hub3js/namespaces';
5
+ import type { Accounts, AccountsWithActiveChain } from '@hub3js/std/types';
4
6
  import type {
5
7
  LegacyNamespaceInputForConnect,
6
8
  LegacyProviderInterface,
7
9
  } from '@rango-dev/wallets-core/legacy';
8
- import type {
9
- Accounts,
10
- AccountsWithActiveChain,
11
- Namespace,
12
- } from '@rango-dev/wallets-core/namespaces/common';
13
10
  import type { WalletType } from '@rango-dev/wallets-shared';
14
11
 
15
- import { Provider } from '@rango-dev/wallets-core';
12
+ import { Provider } from '@hub3js/core';
16
13
  import { legacyIsEvmNamespace } from '@rango-dev/wallets-core/legacy';
17
- import { cosmosBlockchains } from 'rango-types';
18
14
  import { Result } from 'ts-results';
19
15
 
20
16
  import { HUB_LAST_CONNECTED_WALLETS } from '../legacy/mod.js';
@@ -23,7 +19,6 @@ import { runSequentiallyWithoutFailure } from './helpers.js';
23
19
  import { LastConnectedWalletsFromStorage } from './lastConnectedWallets.js';
24
20
  import {
25
21
  convertNamespaceNetworkToEvmChainId,
26
- isCosmosNamespace,
27
22
  isEvmNamespace,
28
23
  } from './utils.js';
29
24
 
@@ -86,20 +81,6 @@ async function eagerConnect(
86
81
  >;
87
82
  if (isEvmNamespace(namespace)) {
88
83
  connectNamespacePromise = async () => namespace.connect(chain);
89
- } else if (isCosmosNamespace(namespace)) {
90
- const cosmosBlockChains = cosmosBlockchains(
91
- params.allBlockChains || []
92
- ).filter((chain) => !!chain.chainId);
93
- connectNamespacePromise = async () => {
94
- return namespace.connect({
95
- chainIds: cosmosBlockChains
96
- .filter((chain) => chain.info && !chain.info.experimental)
97
- ?.map((chain) => chain.chainId!),
98
- customChainIds: cosmosBlockChains
99
- .filter((chain) => chain.info?.experimental)
100
- .map((chain) => chain.chainId!),
101
- });
102
- };
103
84
  } else {
104
85
  connectNamespacePromise = async () => namespace.connect();
105
86
  }
@@ -156,7 +137,7 @@ async function eagerConnect(
156
137
  */
157
138
  async function tryRunCanEagerConnect(
158
139
  namespaces: LegacyNamespaceInputForConnect[],
159
- wallet: Provider
140
+ wallet: Provider<DefaultNamespaces>
160
141
  ): Promise<{
161
142
  successNamespaces: LegacyNamespaceInputForConnect[];
162
143
  failedNamespaces: LegacyNamespaceInputForConnect[];
@@ -1,27 +1,24 @@
1
1
  import type { AllProxiedNamespaces } from './types.js';
2
- import type {
3
- Accounts,
4
- AccountsWithActiveChain,
5
- } from '@rango-dev/wallets-core/namespaces/common';
6
- import type { BlockchainMeta } from 'rango-types';
2
+ import type { Accounts, AccountsWithActiveChain } from '@hub3js/std/types';
7
3
  import type { Result } from 'ts-results';
8
4
 
9
5
  import { legacyFormatAddressWithNetwork as formatAddressWithNetwork } from '@rango-dev/wallets-core/legacy';
10
- import { CAIP_NAMESPACE as CAIP_COSMOS_NAMESPACE } from '@rango-dev/wallets-core/namespaces/cosmos';
6
+ import { CAIP_NAMESPACE as CAIP_TON_NAMESPACE } from '@rango-dev/wallets-core/namespaces/ton';
11
7
  import { CAIP_TRON_CHAIN_ID } from '@rango-dev/wallets-core/namespaces/tron';
12
- import { CAIP_BITCOIN_CHAIN_ID } from '@rango-dev/wallets-core/namespaces/utxo';
13
- import { CAIP } from '@rango-dev/wallets-core/utils';
14
- import { getBlockChainNameFromId } from '@rango-dev/wallets-shared';
8
+ import {
9
+ CAIP_BITCOIN_CHAIN_ID,
10
+ CAIP_ZCASH_CHAIN_ID,
11
+ } from '@rango-dev/wallets-core/namespaces/utxo';
12
+ import { AccountId, type ChainIdParams } from 'caip';
15
13
  import { Err, Ok } from 'ts-results';
16
14
 
17
15
  export function mapCaipNamespaceToLegacyNetworkName(
18
- chainId: CAIP.ChainIdParams | string,
19
- allBlockChains: BlockchainMeta[]
16
+ chainId: ChainIdParams | string,
20
17
  ): string {
21
18
  if (typeof chainId === 'string') {
22
19
  return chainId;
23
20
  }
24
- const useNamespaceAsNetworkFor = ['solana'];
21
+ const useNamespaceAsNetworkFor = ['solana', 'xrpl', 'stellar'];
25
22
 
26
23
  if (useNamespaceAsNetworkFor.includes(chainId.namespace.toLowerCase())) {
27
24
  return chainId.namespace.toUpperCase();
@@ -31,16 +28,12 @@ export function mapCaipNamespaceToLegacyNetworkName(
31
28
  return 'ETH';
32
29
  } else if (chainId.reference === CAIP_BITCOIN_CHAIN_ID) {
33
30
  return 'BTC';
31
+ } else if (chainId.reference === CAIP_ZCASH_CHAIN_ID) {
32
+ return 'ZCASH';
34
33
  }
35
34
 
36
- if (chainId.namespace.toLowerCase() === CAIP_COSMOS_NAMESPACE) {
37
- const network = getBlockChainNameFromId(chainId.reference, allBlockChains);
38
- if (!network) {
39
- throw new Error(
40
- `Network didn't found for given chainId: ${chainId.reference}`
41
- );
42
- }
43
- return network;
35
+ if (chainId.namespace.toLowerCase() === CAIP_TON_NAMESPACE) {
36
+ return 'TON';
44
37
  }
45
38
  if (chainId.namespace === 'sui' || chainId.reference === CAIP_TRON_CHAIN_ID) {
46
39
  return chainId.reference.toUpperCase();
@@ -61,10 +54,9 @@ export function mapCaipNamespaceToLegacyNetworkName(
61
54
  */
62
55
  export function fromAccountIdToLegacyAddressFormat(
63
56
  account: string,
64
- allBlockChains: BlockchainMeta[]
65
57
  ): string {
66
- const { chainId, address } = CAIP.AccountId.parse(account);
67
- const network = mapCaipNamespaceToLegacyNetworkName(chainId, allBlockChains);
58
+ const { chainId, address } = AccountId.parse(account);
59
+ const network = mapCaipNamespaceToLegacyNetworkName(chainId);
68
60
  return formatAddressWithNetwork(address, network);
69
61
  }
70
62
 
@@ -1,4 +1,4 @@
1
- import type { Namespace } from '@rango-dev/wallets-core/namespaces/common';
1
+ import type { Namespace } from '@hub3js/namespaces';
2
2
 
3
3
  import { Persistor } from '@rango-dev/wallets-core/legacy';
4
4
 
package/src/hub/types.ts CHANGED
@@ -1,12 +1,9 @@
1
- import type {
2
- CommonNamespaces,
3
- FindProxiedNamespace,
4
- ProviderMetadata,
5
- } from '@rango-dev/wallets-core';
1
+ import type { FindProxiedNamespace, ProviderMetadata } from '@hub3js/core';
2
+ import type { DefaultNamespaces } from '@hub3js/namespaces';
6
3
 
7
4
  export type AllProxiedNamespaces = FindProxiedNamespace<
8
- keyof CommonNamespaces,
9
- CommonNamespaces
5
+ keyof DefaultNamespaces,
6
+ DefaultNamespaces
10
7
  >;
11
8
 
12
9
  export type ExtensionLink = keyof ProviderMetadata['extensions'];
@@ -1,16 +1,12 @@
1
1
  import type { AllProxiedNamespaces, ExtensionLink } from './types.js';
2
2
  import type { ProviderContext } from '../index.js';
3
- import type { Provider } from '@rango-dev/wallets-core';
3
+ import type { Provider } from '@hub3js/core';
4
+ import type { VersionedProviders } from '@hub3js/core/utils';
5
+ import type { Accounts, AccountsWithActiveChain } from '@hub3js/std/types';
4
6
  import type { LegacyNamespaceInputForConnect } from '@rango-dev/wallets-core/legacy';
5
- import type {
6
- Accounts,
7
- AccountsWithActiveChain,
8
- } from '@rango-dev/wallets-core/namespaces/common';
9
- import type { VersionedProviders } from '@rango-dev/wallets-core/utils';
10
7
 
11
- import { utils } from '@rango-dev/wallets-core/namespaces/evm';
8
+ import { utils } from '@hub3js/evm';
12
9
  import { type WalletInfo, type WalletType } from '@rango-dev/wallets-shared';
13
- import { cosmosBlockchains } from 'rango-types';
14
10
  import { useEffect, useRef, useState } from 'react';
15
11
  import { Ok, Result } from 'ts-results';
16
12
 
@@ -22,13 +18,11 @@ import {
22
18
  import { useAutoConnect } from '../legacy/useAutoConnect.js';
23
19
 
24
20
  import { autoConnect } from './autoConnect.js';
25
- import { convertCosmosMetaToChainRegistry } from './chainRegisteryConvertors.js';
26
21
  import { createQueue, fromAccountIdToLegacyAddressFormat } from './helpers.js';
27
22
  import { LastConnectedWalletsFromStorage } from './lastConnectedWallets.js';
28
23
  import { useHubRefs } from './useHubRefs.js';
29
24
  import {
30
25
  getSupportedChainsFromProvider,
31
- isCosmosNamespace,
32
26
  isEvmNamespace,
33
27
  isSolanaNamespace,
34
28
  mapHubEventsToLegacy,
@@ -86,7 +80,7 @@ export function useHubAdapter(params: UseAdapterParams): ProviderContext {
86
80
  // Initialize instances
87
81
  useEffect(() => {
88
82
  const runOnInit = () => {
89
- getHub().init();
83
+ getHub().init(params.configs?.walletOptions);
90
84
 
91
85
  rerender((currentRender) => currentRender + 1);
92
86
  };
@@ -258,20 +252,6 @@ export function useHubAdapter(params: UseAdapterParams): ProviderContext {
258
252
  namespace.connect(network, {
259
253
  derivationPath: namespaceInput.derivationPath,
260
254
  });
261
- } else if (isCosmosNamespace(namespace)) {
262
- const cosmosBlockChains = cosmosBlockchains(
263
- params.allBlockChains || []
264
- ).filter((chain) => !!chain.chainId);
265
- connectNamespacePromise = async () => {
266
- return namespace.connect({
267
- chainIds: cosmosBlockChains
268
- .filter((chain) => chain.info && !chain.info.experimental)
269
- ?.map((chain) => chain.chainId!),
270
- customChainIds: cosmosBlockChains
271
- .filter((chain) => chain.info?.experimental)
272
- .map((chain) => chain.chainId!),
273
- });
274
- };
275
255
  } else {
276
256
  connectNamespacePromise = async () => namespace.connect();
277
257
  }
@@ -477,10 +457,7 @@ export function useHubAdapter(params: UseAdapterParams): ProviderContext {
477
457
  .filter((namespace) => namespace.connected)
478
458
  .flatMap((namespace) =>
479
459
  namespace.accounts?.map((accounts) =>
480
- fromAccountIdToLegacyAddressFormat(
481
- accounts,
482
- params.allBlockChains || []
483
- )
460
+ fromAccountIdToLegacyAddressFormat(accounts)
484
461
  )
485
462
  )
486
463
  .filter((account): account is string => !!account);
@@ -523,23 +500,6 @@ export function useHubAdapter(params: UseAdapterParams): ProviderContext {
523
500
  if (!namespace.network) {
524
501
  throw new Error('You should pass network to the suggest and connect');
525
502
  }
526
- if (isCosmosNamespace(proxiedNamespace)) {
527
- const suggestedChainMeta = cosmosBlockchains(
528
- params.allBlockChains || []
529
- )
530
- ?.filter((chain) => chain.info && chain.info.experimental)
531
- .find((chain) => chain.name === namespace.network);
532
- if (!suggestedChainMeta) {
533
- throw new Error(
534
- `We couldn't find the suggested chain (${namespace.network}) in our metadata.`
535
- );
536
- }
537
- const { assetList, chain } =
538
- convertCosmosMetaToChainRegistry(suggestedChainMeta);
539
- await proxiedNamespace.suggest(chain, assetList);
540
- const [connectResult] = await this.connect(type, [namespace]);
541
- return connectResult;
542
- }
543
503
  throw new Error(
544
504
  `Suggest has not been implemented for given chain: ${namespace.network}`
545
505
  );
@@ -1,6 +1,6 @@
1
- import type { Provider, Store } from '@rango-dev/wallets-core';
1
+ import type { Provider, Store } from '@hub3js/core';
2
2
 
3
- import { createStore, Hub } from '@rango-dev/wallets-core';
3
+ import { createStore, Hub } from '@hub3js/core';
4
4
  import { useRef } from 'react';
5
5
 
6
6
  import { synchronizeHubWithConfigProviders } from './utils.js';
package/src/hub/utils.ts CHANGED
@@ -1,20 +1,18 @@
1
1
  import type { AllProxiedNamespaces } from './types.js';
2
- import type { Hub, Provider, ProxiedNamespace } from '@rango-dev/wallets-core';
2
+ import type { Hub, Provider, ProxiedNamespace } from '@hub3js/core';
3
+ import type { Event } from '@hub3js/core/store';
4
+ import type { EvmActions } from '@hub3js/evm';
5
+ import type { SolanaActions } from '@hub3js/solana';
3
6
  import type {
4
7
  LegacyNamespaceInputForConnect,
5
8
  LegacyProviderInterface,
6
9
  LegacyEventHandler as WalletEventHandler,
7
10
  } from '@rango-dev/wallets-core/legacy';
8
- import type { CosmosActions } from '@rango-dev/wallets-core/namespaces/cosmos';
9
- import type { EvmActions } from '@rango-dev/wallets-core/namespaces/evm';
10
- import type { SolanaActions } from '@rango-dev/wallets-core/namespaces/solana';
11
11
  import type { SuiActions } from '@rango-dev/wallets-core/namespaces/sui';
12
12
  import type { UtxoActions } from '@rango-dev/wallets-core/namespaces/utxo';
13
- import type { Event } from '@rango-dev/wallets-core/store';
14
13
 
14
+ import { pickVersion, type VersionedProviders } from '@hub3js/core/utils';
15
15
  import { LegacyEvents as Events } from '@rango-dev/wallets-core/legacy';
16
- import { type VersionedProviders } from '@rango-dev/wallets-core/utils';
17
- import { pickVersion } from '@rango-dev/wallets-core/utils';
18
16
  import {
19
17
  type AddEthereumChainParameter,
20
18
  convertEvmBlockchainMetaToEvmChainInfo,
@@ -237,10 +235,7 @@ export function mapHubEventsToLegacy(
237
235
  }
238
236
 
239
237
  const formattedAddresses = event.accounts.map((accounts) =>
240
- fromAccountIdToLegacyAddressFormat(
241
- accounts,
242
- metadata.allBlockChains || []
243
- )
238
+ fromAccountIdToLegacyAddressFormat(accounts)
244
239
  );
245
240
  onUpdateState(
246
241
  event.provider,
@@ -299,8 +294,6 @@ export function convertNamespaceNetworkToEvmChainId(
299
294
  /**
300
295
  * We are passing an string for chain id (e.g. ETH, POLYGON), but wallet's instances (e.g. window.ethereum) needs chainId (e.g. 0x1).
301
296
  * This function will help us to map these strings to proper hex ids.
302
- *
303
- * If you need same functionality for other blockchain types (e.g. Cosmos), You can make a separate function and add it here.
304
297
  */
305
298
  export function tryConvertNamespaceNetworkToChainInfo(
306
299
  namespace: LegacyNamespaceInputForConnect,
@@ -371,23 +364,12 @@ export function synchronizeHubWithConfigProviders(
371
364
  }
372
365
 
373
366
  export function isSolanaNamespace(
374
- ns: ProxiedNamespace<
375
- EvmActions | SolanaActions | CosmosActions | SuiActions | UtxoActions
376
- >
367
+ ns: ProxiedNamespace<EvmActions | SolanaActions | SuiActions | UtxoActions>
377
368
  ): ns is ProxiedNamespace<SolanaActions> & { namespaceId: 'Solana' } {
378
369
  return ns.namespaceId === 'Solana';
379
370
  }
380
371
  export function isEvmNamespace(
381
- ns: ProxiedNamespace<
382
- EvmActions | SolanaActions | CosmosActions | SuiActions | UtxoActions
383
- >
372
+ ns: ProxiedNamespace<EvmActions | SolanaActions | SuiActions | UtxoActions>
384
373
  ): ns is ProxiedNamespace<EvmActions> & { namespaceId: 'EVM' } {
385
374
  return ns.namespaceId === 'EVM';
386
375
  }
387
- export function isCosmosNamespace(
388
- ns: ProxiedNamespace<
389
- EvmActions | SolanaActions | CosmosActions | SuiActions | UtxoActions
390
- >
391
- ): ns is ProxiedNamespace<CosmosActions> & { namespaceId: 'Cosmos' } {
392
- return ns.namespaceId === 'Cosmos';
393
- }
@@ -1,8 +1,7 @@
1
- import type {
2
- Provider,
3
- ProviderMetadata,
4
- VersionedProviders,
5
- } from '@rango-dev/wallets-core';
1
+ import type { Provider, ProviderMetadata } from '@hub3js/core';
2
+ import type { NamespaceData } from '@hub3js/core/store';
3
+ import type { VersionedProviders } from '@hub3js/core/utils';
4
+ import type { Namespace } from '@hub3js/namespaces';
6
5
  import type {
7
6
  LegacyNamespaceInputForConnect,
8
7
  LegacyProviderInterface,
@@ -12,8 +11,6 @@ import type {
12
11
  LegacyState as WalletState,
13
12
  LegacyWalletType as WalletType,
14
13
  } from '@rango-dev/wallets-core/legacy';
15
- import type { Namespace } from '@rango-dev/wallets-core/namespaces/common';
16
- import type { NamespaceData } from '@rango-dev/wallets-core/store';
17
14
  import type { BlockchainMeta, SignerFactory } from 'rango-types';
18
15
  import type { PropsWithChildren } from 'react';
19
16
 
@@ -80,6 +77,14 @@ export type ProviderProps = PropsWithChildren<{
80
77
  providers: VersionedProviders[];
81
78
  configs?: {
82
79
  wallets?: (WalletType | LegacyProviderInterface | Provider)[];
80
+ walletOptions?: {
81
+ [key: WalletType]: {
82
+ provider?: unknown;
83
+ namespaces?: {
84
+ [namespaceId: string]: unknown;
85
+ };
86
+ };
87
+ };
83
88
  };
84
89
  }>;
85
90