@rango-dev/wallets-core 0.40.1-next.10 → 0.40.1-next.12

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 (43) hide show
  1. package/dist/hub/store/events.d.ts +54 -0
  2. package/dist/hub/store/events.d.ts.map +1 -0
  3. package/dist/hub/store/extend.d.ts +14 -0
  4. package/dist/hub/store/extend.d.ts.map +1 -0
  5. package/dist/hub/store/mod.d.ts +3 -1
  6. package/dist/hub/store/mod.d.ts.map +1 -1
  7. package/dist/hub/store/mod.js +2 -0
  8. package/dist/hub/store/mod.js.map +7 -0
  9. package/dist/hub/store/namespaces.d.ts +10 -7
  10. package/dist/hub/store/namespaces.d.ts.map +1 -1
  11. package/dist/hub/store/providers.d.ts +9 -5
  12. package/dist/hub/store/providers.d.ts.map +1 -1
  13. package/dist/hub/store/store.d.ts +2 -1
  14. package/dist/hub/store/store.d.ts.map +1 -1
  15. package/dist/legacy/mod.js +1 -1
  16. package/dist/legacy/mod.js.map +2 -2
  17. package/dist/legacy/types.d.ts +17 -15
  18. package/dist/legacy/types.d.ts.map +1 -1
  19. package/dist/legacy/wallet.d.ts +5 -3
  20. package/dist/legacy/wallet.d.ts.map +1 -1
  21. package/dist/mod.js +1 -1
  22. package/dist/mod.js.map +4 -4
  23. package/dist/namespaces/common/mod.js +1 -1
  24. package/dist/namespaces/common/mod.js.map +1 -1
  25. package/dist/namespaces/evm/builders.d.ts.map +1 -1
  26. package/dist/namespaces/evm/mod.js +1 -1
  27. package/dist/namespaces/evm/mod.js.map +3 -3
  28. package/dist/namespaces/solana/builders.d.ts.map +1 -1
  29. package/dist/namespaces/solana/mod.js +1 -1
  30. package/dist/namespaces/solana/mod.js.map +3 -3
  31. package/dist/wallets-core.build.json +1 -1
  32. package/package.json +7 -3
  33. package/src/hub/store/events.ts +89 -0
  34. package/src/hub/store/extend.ts +125 -0
  35. package/src/hub/store/mod.ts +14 -1
  36. package/src/hub/store/namespaces.ts +102 -19
  37. package/src/hub/store/providers.ts +33 -9
  38. package/src/hub/store/store.test.ts +1 -1
  39. package/src/hub/store/store.ts +6 -2
  40. package/src/legacy/types.ts +23 -16
  41. package/src/legacy/wallet.ts +12 -6
  42. package/src/namespaces/evm/builders.ts +6 -2
  43. package/src/namespaces/solana/builders.ts +6 -2
@@ -1 +1 @@
1
- {"inputs":{"src/hub/helpers.ts":{"bytes":371,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/namespaces/errors.ts":{"bytes":328,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/namespaces/namespace.ts":{"bytes":12251,"imports":[{"path":"src/hub/helpers.ts","kind":"import-statement","original":"../helpers.js"},{"path":"src/hub/namespaces/errors.ts","kind":"import-statement","original":"./errors.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/namespaces/mod.ts":{"bytes":160,"imports":[{"path":"src/hub/namespaces/namespace.ts","kind":"import-statement","original":"./namespace.js"}],"format":"esm"},"src/hub/provider/provider.ts":{"bytes":9080,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/provider/mod.ts":{"bytes":196,"imports":[{"path":"src/hub/provider/provider.ts","kind":"import-statement","original":"./provider.js"}],"format":"esm"},"src/hub/hub.ts":{"bytes":3050,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/store/selectors.ts":{"bytes":2225,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/store/hub.ts":{"bytes":342,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/store/namespaces.ts":{"bytes":1927,"imports":[{"path":"immer","kind":"import-statement","external":true},{"path":"src/hub/store/mod.ts","kind":"import-statement","original":"./mod.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/store/providers.ts":{"bytes":2274,"imports":[{"path":"immer","kind":"import-statement","external":true},{"path":"src/hub/store/mod.ts","kind":"import-statement","original":"./mod.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/store/store.ts":{"bytes":722,"imports":[{"path":"zustand/vanilla","kind":"import-statement","external":true},{"path":"src/hub/store/hub.ts","kind":"import-statement","original":"./hub.js"},{"path":"src/hub/store/namespaces.ts","kind":"import-statement","original":"./namespaces.js"},{"path":"src/hub/store/providers.ts","kind":"import-statement","original":"./providers.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/store/mod.ts":{"bytes":319,"imports":[{"path":"src/hub/store/selectors.ts","kind":"import-statement","original":"./selectors.js"},{"path":"src/hub/store/store.ts","kind":"import-statement","original":"./store.js"}],"format":"esm"},"src/hub/mod.ts":{"bytes":428,"imports":[{"path":"src/hub/namespaces/mod.ts","kind":"import-statement","original":"./namespaces/mod.js"},{"path":"src/hub/provider/mod.ts","kind":"import-statement","original":"./provider/mod.js"},{"path":"src/hub/hub.ts","kind":"import-statement","original":"./hub.js"},{"path":"src/hub/store/mod.ts","kind":"import-statement","original":"./store/mod.js"},{"path":"src/hub/helpers.ts","kind":"import-statement","original":"./helpers.js"}],"format":"esm"},"src/builders/namespace.ts":{"bytes":6879,"imports":[{"path":"src/hub/mod.ts","kind":"import-statement","original":"../hub/mod.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/builders/provider.ts":{"bytes":1584,"imports":[{"path":"src/hub/provider/mod.ts","kind":"import-statement","original":"../hub/provider/mod.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/builders/action.ts":{"bytes":2385,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/builders/mod.ts":{"bytes":220,"imports":[{"path":"src/builders/namespace.ts","kind":"import-statement","original":"./namespace.js"},{"path":"src/builders/provider.ts","kind":"import-statement","original":"./provider.js"},{"path":"src/builders/action.ts","kind":"import-statement","original":"./action.js"}],"format":"esm"},"src/utils/versions.ts":{"bytes":1851,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/utils/mod.ts":{"bytes":356,"imports":[{"path":"caip","kind":"import-statement","external":true},{"path":"src/hub/helpers.ts","kind":"import-statement","original":"../hub/helpers.js"},{"path":"src/utils/versions.ts","kind":"import-statement","original":"./versions.js"}],"format":"esm"},"src/mod.ts":{"bytes":1344,"imports":[{"path":"src/hub/mod.ts","kind":"import-statement","original":"./hub/mod.js"},{"path":"src/builders/mod.ts","kind":"import-statement","original":"./builders/mod.js"},{"path":"src/utils/mod.ts","kind":"import-statement","original":"./utils/mod.js"}],"format":"esm"},"src/legacy/types.ts":{"bytes":6444,"imports":[],"format":"esm"},"src/legacy/persistor.ts":{"bytes":544,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/legacy/helpers.ts":{"bytes":1855,"imports":[{"path":"src/legacy/types.ts","kind":"import-statement","original":"./types.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/legacy/utils.ts":{"bytes":645,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/legacy/wallet.ts":{"bytes":15547,"imports":[{"path":"src/legacy/helpers.ts","kind":"import-statement","original":"./helpers.js"},{"path":"src/legacy/types.ts","kind":"import-statement","original":"./types.js"},{"path":"src/legacy/utils.ts","kind":"import-statement","original":"./utils.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/legacy/mod.ts":{"bytes":1428,"imports":[{"path":"src/legacy/types.ts","kind":"import-statement","original":"./types.js"},{"path":"src/legacy/persistor.ts","kind":"import-statement","original":"./persistor.js"},{"path":"src/legacy/helpers.ts","kind":"import-statement","original":"./helpers.js"},{"path":"src/legacy/wallet.ts","kind":"import-statement","original":"./wallet.js"},{"path":"src/legacy/utils.ts","kind":"import-statement","original":"./utils.js"}],"format":"esm"},"src/namespaces/common/actions.ts":{"bytes":347,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/evm/constants.ts":{"bytes":83,"imports":[],"format":"esm"},"src/namespaces/evm/utils.ts":{"bytes":1450,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/evm/actions.ts":{"bytes":4250,"imports":[{"path":"caip","kind":"import-statement","external":true},{"path":"src/namespaces/common/actions.ts","kind":"import-statement","original":"../common/actions.js"},{"path":"src/namespaces/evm/constants.ts","kind":"import-statement","original":"./constants.js"},{"path":"src/namespaces/evm/utils.ts","kind":"import-statement","original":"./utils.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/common/after.ts":{"bytes":271,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/evm/after.ts":{"bytes":123,"imports":[{"path":"src/namespaces/common/after.ts","kind":"import-statement","original":"../common/after.js"}],"format":"esm"},"src/namespaces/common/builders.ts":{"bytes":545,"imports":[{"path":"src/mod.ts","kind":"import-statement","original":"../../mod.js"},{"path":"src/namespaces/common/actions.ts","kind":"import-statement","original":"./actions.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/common/helpers.ts":{"bytes":189,"imports":[{"path":"caip","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/common/and.ts":{"bytes":1144,"imports":[{"path":"src/namespaces/common/helpers.ts","kind":"import-statement","original":"./helpers.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/common/before.ts":{"bytes":351,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/common/mod.ts":{"bytes":547,"imports":[{"path":"src/namespaces/common/actions.ts","kind":"import-statement","original":"./actions.js"},{"path":"src/namespaces/common/builders.ts","kind":"import-statement","original":"./builders.js"},{"path":"src/namespaces/common/after.ts","kind":"import-statement","original":"./after.js"},{"path":"src/namespaces/common/and.ts","kind":"import-statement","original":"./and.js"},{"path":"src/namespaces/common/before.ts","kind":"import-statement","original":"./before.js"}],"format":"esm"},"src/namespaces/evm/and.ts":{"bytes":170,"imports":[{"path":"src/namespaces/common/mod.ts","kind":"import-statement","original":"../common/mod.js"}],"format":"esm"},"src/namespaces/evm/before.ts":{"bytes":106,"imports":[{"path":"src/namespaces/common/mod.ts","kind":"import-statement","original":"../common/mod.js"}],"format":"esm"},"src/namespaces/evm/builders.ts":{"bytes":396,"imports":[{"path":"src/mod.ts","kind":"import-statement","original":"../../mod.js"},{"path":"src/namespaces/common/after.ts","kind":"import-statement","original":"../common/after.js"},{"path":"src/namespaces/common/and.ts","kind":"import-statement","original":"../common/and.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/evm/mod.ts":{"bytes":363,"imports":[{"path":"src/namespaces/evm/actions.ts","kind":"import-statement","original":"./actions.js"},{"path":"src/namespaces/evm/after.ts","kind":"import-statement","original":"./after.js"},{"path":"src/namespaces/evm/and.ts","kind":"import-statement","original":"./and.js"},{"path":"src/namespaces/evm/before.ts","kind":"import-statement","original":"./before.js"},{"path":"src/namespaces/evm/utils.ts","kind":"import-statement","original":"./utils.js"},{"path":"src/namespaces/evm/builders.ts","kind":"import-statement","original":"./builders.js"},{"path":"src/namespaces/evm/constants.ts","kind":"import-statement","original":"./constants.js"}],"format":"esm"},"src/namespaces/solana/constants.ts":{"bytes":112,"imports":[],"format":"esm"},"src/namespaces/solana/actions.ts":{"bytes":2143,"imports":[{"path":"caip","kind":"import-statement","external":true},{"path":"src/namespaces/common/actions.ts","kind":"import-statement","original":"../common/actions.js"},{"path":"src/namespaces/solana/constants.ts","kind":"import-statement","original":"./constants.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/solana/after.ts":{"bytes":123,"imports":[{"path":"src/namespaces/common/after.ts","kind":"import-statement","original":"../common/after.js"}],"format":"esm"},"src/namespaces/solana/and.ts":{"bytes":170,"imports":[{"path":"src/namespaces/common/mod.ts","kind":"import-statement","original":"../common/mod.js"}],"format":"esm"},"src/namespaces/solana/before.ts":{"bytes":124,"imports":[{"path":"src/namespaces/common/before.ts","kind":"import-statement","original":"../common/before.js"}],"format":"esm"},"src/namespaces/solana/builders.ts":{"bytes":402,"imports":[{"path":"src/mod.ts","kind":"import-statement","original":"../../mod.js"},{"path":"src/namespaces/common/after.ts","kind":"import-statement","original":"../common/after.js"},{"path":"src/namespaces/common/and.ts","kind":"import-statement","original":"../common/and.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/solana/mod.ts":{"bytes":327,"imports":[{"path":"src/namespaces/solana/actions.ts","kind":"import-statement","original":"./actions.js"},{"path":"src/namespaces/solana/after.ts","kind":"import-statement","original":"./after.js"},{"path":"src/namespaces/solana/and.ts","kind":"import-statement","original":"./and.js"},{"path":"src/namespaces/solana/before.ts","kind":"import-statement","original":"./before.js"},{"path":"src/namespaces/solana/builders.ts","kind":"import-statement","original":"./builders.js"},{"path":"src/namespaces/solana/constants.ts","kind":"import-statement","original":"./constants.js"}],"format":"esm"}},"outputs":{"dist/mod.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":64148},"dist/mod.js":{"imports":[{"path":"zustand/vanilla","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true},{"path":"caip","kind":"import-statement","external":true}],"exports":["ActionBuilder","Hub","Namespace","NamespaceBuilder","Provider","ProviderBuilder","createStore","defineVersions","guessProviderStateSelector","namespaceStateSelector","pickVersion"],"entryPoint":"src/mod.ts","inputs":{"src/hub/helpers.ts":{"bytesInOutput":131},"src/hub/namespaces/errors.ts":{"bytesInOutput":235},"src/hub/namespaces/namespace.ts":{"bytesInOutput":2393},"src/hub/namespaces/mod.ts":{"bytesInOutput":0},"src/hub/mod.ts":{"bytesInOutput":0},"src/hub/provider/provider.ts":{"bytesInOutput":1837},"src/hub/provider/mod.ts":{"bytesInOutput":0},"src/hub/hub.ts":{"bytesInOutput":689},"src/hub/store/selectors.ts":{"bytesInOutput":383},"src/hub/store/mod.ts":{"bytesInOutput":0},"src/hub/store/store.ts":{"bytesInOutput":137},"src/hub/store/hub.ts":{"bytesInOutput":38},"src/hub/store/namespaces.ts":{"bytesInOutput":400},"src/hub/store/providers.ts":{"bytesInOutput":362},"src/mod.ts":{"bytesInOutput":0},"src/builders/namespace.ts":{"bytesInOutput":1222},"src/builders/mod.ts":{"bytesInOutput":0},"src/builders/provider.ts":{"bytesInOutput":461},"src/builders/action.ts":{"bytesInOutput":746},"src/utils/mod.ts":{"bytesInOutput":24},"src/utils/versions.ts":{"bytesInOutput":356}},"bytes":9748},"dist/utils/mod.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":3724},"dist/utils/mod.js":{"imports":[{"path":"caip","kind":"import-statement","external":true}],"exports":["CAIP","defineVersions","generateStoreId","legacyProviderImportsToVersionsInterface","pickVersion"],"entryPoint":"src/utils/mod.ts","inputs":{"src/utils/mod.ts":{"bytesInOutput":23},"src/hub/helpers.ts":{"bytesInOutput":58},"src/utils/versions.ts":{"bytesInOutput":456}},"bytes":771},"dist/legacy/mod.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":35384},"dist/legacy/mod.js":{"imports":[],"exports":["LegacyEvents","LegacyNetworks","LegacyWallet","Persistor","legacyEagerConnectHandler","legacyFormatAddressWithNetwork","legacyGetBlockChainNameFromId","legacyIsEvmNamespace","legacyReadAccountAddress"],"entryPoint":"src/legacy/mod.ts","inputs":{"src/legacy/types.ts":{"bytesInOutput":1251},"src/legacy/mod.ts":{"bytesInOutput":0},"src/legacy/persistor.ts":{"bytesInOutput":206},"src/legacy/helpers.ts":{"bytesInOutput":610},"src/legacy/utils.ts":{"bytesInOutput":238},"src/legacy/wallet.ts":{"bytesInOutput":5876}},"bytes":8530},"dist/namespaces/evm/mod.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":24497},"dist/namespaces/evm/mod.js":{"imports":[{"path":"caip","kind":"import-statement","external":true},{"path":"zustand/vanilla","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true},{"path":"caip","kind":"import-statement","external":true},{"path":"caip","kind":"import-statement","external":true}],"exports":["CAIP_ETHEREUM_CHAIN_ID","CAIP_NAMESPACE","actions","after","and","before","builders","utils"],"entryPoint":"src/namespaces/evm/mod.ts","inputs":{"src/namespaces/evm/actions.ts":{"bytesInOutput":1366},"src/namespaces/common/actions.ts":{"bytesInOutput":149},"src/namespaces/evm/constants.ts":{"bytesInOutput":21},"src/namespaces/evm/utils.ts":{"bytesInOutput":701},"src/namespaces/evm/mod.ts":{"bytesInOutput":0},"src/namespaces/evm/after.ts":{"bytesInOutput":47},"src/namespaces/common/after.ts":{"bytesInOutput":103},"src/namespaces/evm/and.ts":{"bytesInOutput":56},"src/namespaces/common/mod.ts":{"bytesInOutput":0},"src/hub/namespaces/mod.ts":{"bytesInOutput":0},"src/hub/mod.ts":{"bytesInOutput":0},"src/hub/provider/mod.ts":{"bytesInOutput":0},"src/hub/store/mod.ts":{"bytesInOutput":0},"src/hub/store/store.ts":{"bytesInOutput":47},"src/hub/store/namespaces.ts":{"bytesInOutput":33},"src/hub/store/providers.ts":{"bytesInOutput":33},"src/mod.ts":{"bytesInOutput":0},"src/builders/mod.ts":{"bytesInOutput":0},"src/builders/action.ts":{"bytesInOutput":746},"src/utils/mod.ts":{"bytesInOutput":24},"src/namespaces/common/helpers.ts":{"bytesInOutput":114},"src/namespaces/common/and.ts":{"bytesInOutput":300},"src/namespaces/common/before.ts":{"bytesInOutput":95},"src/namespaces/evm/before.ts":{"bytesInOutput":47},"src/namespaces/evm/builders.ts":{"bytesInOutput":88}},"bytes":4270},"dist/namespaces/solana/mod.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":18656},"dist/namespaces/solana/mod.js":{"imports":[{"path":"caip","kind":"import-statement","external":true},{"path":"zustand/vanilla","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true},{"path":"caip","kind":"import-statement","external":true},{"path":"caip","kind":"import-statement","external":true}],"exports":["CAIP_NAMESPACE","CAIP_SOLANA_CHAIN_ID","actions","after","and","before","builders"],"entryPoint":"src/namespaces/solana/mod.ts","inputs":{"src/namespaces/solana/actions.ts":{"bytesInOutput":597},"src/namespaces/common/actions.ts":{"bytesInOutput":149},"src/namespaces/solana/constants.ts":{"bytesInOutput":52},"src/namespaces/solana/mod.ts":{"bytesInOutput":0},"src/namespaces/solana/after.ts":{"bytesInOutput":47},"src/namespaces/common/after.ts":{"bytesInOutput":103},"src/namespaces/solana/and.ts":{"bytesInOutput":56},"src/namespaces/common/mod.ts":{"bytesInOutput":0},"src/hub/namespaces/mod.ts":{"bytesInOutput":0},"src/hub/mod.ts":{"bytesInOutput":0},"src/hub/provider/mod.ts":{"bytesInOutput":0},"src/hub/store/mod.ts":{"bytesInOutput":0},"src/hub/store/store.ts":{"bytesInOutput":47},"src/hub/store/namespaces.ts":{"bytesInOutput":33},"src/hub/store/providers.ts":{"bytesInOutput":33},"src/mod.ts":{"bytesInOutput":0},"src/builders/mod.ts":{"bytesInOutput":0},"src/builders/action.ts":{"bytesInOutput":746},"src/utils/mod.ts":{"bytesInOutput":24},"src/namespaces/common/helpers.ts":{"bytesInOutput":114},"src/namespaces/common/and.ts":{"bytesInOutput":250},"src/namespaces/common/before.ts":{"bytesInOutput":95},"src/namespaces/solana/before.ts":{"bytesInOutput":47},"src/namespaces/solana/builders.ts":{"bytesInOutput":86}},"bytes":2766},"dist/namespaces/common/mod.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":14657},"dist/namespaces/common/mod.js":{"imports":[{"path":"zustand/vanilla","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true},{"path":"caip","kind":"import-statement","external":true},{"path":"caip","kind":"import-statement","external":true}],"exports":["actions","afterRecommended","andRecommended","beforeRecommended","builders","connectAndUpdateStateForMultiNetworks","connectAndUpdateStateForSingleNetwork","intoConnecting","intoConnectionFinished"],"entryPoint":"src/namespaces/common/mod.ts","inputs":{"src/namespaces/common/actions.ts":{"bytesInOutput":200},"src/namespaces/common/mod.ts":{"bytesInOutput":0},"src/namespaces/common/builders.ts":{"bytesInOutput":89},"src/hub/namespaces/mod.ts":{"bytesInOutput":0},"src/hub/mod.ts":{"bytesInOutput":0},"src/hub/provider/mod.ts":{"bytesInOutput":0},"src/hub/store/mod.ts":{"bytesInOutput":0},"src/hub/store/store.ts":{"bytesInOutput":47},"src/hub/store/namespaces.ts":{"bytesInOutput":33},"src/hub/store/providers.ts":{"bytesInOutput":33},"src/mod.ts":{"bytesInOutput":0},"src/builders/mod.ts":{"bytesInOutput":0},"src/builders/action.ts":{"bytesInOutput":746},"src/utils/mod.ts":{"bytesInOutput":24},"src/namespaces/common/after.ts":{"bytesInOutput":103},"src/namespaces/common/helpers.ts":{"bytesInOutput":114},"src/namespaces/common/and.ts":{"bytesInOutput":559},"src/namespaces/common/before.ts":{"bytesInOutput":95}},"bytes":2451}}}
1
+ {"inputs":{"src/hub/helpers.ts":{"bytes":371,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/namespaces/errors.ts":{"bytes":328,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/namespaces/namespace.ts":{"bytes":12251,"imports":[{"path":"src/hub/helpers.ts","kind":"import-statement","original":"../helpers.js"},{"path":"src/hub/namespaces/errors.ts","kind":"import-statement","original":"./errors.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/namespaces/mod.ts":{"bytes":160,"imports":[{"path":"src/hub/namespaces/namespace.ts","kind":"import-statement","original":"./namespace.js"}],"format":"esm"},"src/hub/provider/provider.ts":{"bytes":9080,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/provider/mod.ts":{"bytes":196,"imports":[{"path":"src/hub/provider/provider.ts","kind":"import-statement","original":"./provider.js"}],"format":"esm"},"src/hub/hub.ts":{"bytes":3050,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/store/selectors.ts":{"bytes":2225,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/store/extend.ts":{"bytes":3898,"imports":[{"path":"src/hub/store/selectors.ts","kind":"import-statement","original":"./selectors.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/store/hub.ts":{"bytes":342,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/store/events.ts":{"bytes":1956,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/store/namespaces.ts":{"bytes":4638,"imports":[{"path":"immer","kind":"import-statement","external":true},{"path":"src/hub/store/events.ts","kind":"import-statement","original":"./events.js"},{"path":"src/hub/store/mod.ts","kind":"import-statement","original":"./mod.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/store/providers.ts":{"bytes":2966,"imports":[{"path":"immer","kind":"import-statement","external":true},{"path":"src/hub/store/events.ts","kind":"import-statement","original":"./events.js"},{"path":"src/hub/store/mod.ts","kind":"import-statement","original":"./mod.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/store/store.ts":{"bytes":808,"imports":[{"path":"zustand/vanilla","kind":"import-statement","external":true},{"path":"src/hub/store/extend.ts","kind":"import-statement","original":"./extend.js"},{"path":"src/hub/store/hub.ts","kind":"import-statement","original":"./hub.js"},{"path":"src/hub/store/namespaces.ts","kind":"import-statement","original":"./namespaces.js"},{"path":"src/hub/store/providers.ts","kind":"import-statement","original":"./providers.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/store/mod.ts":{"bytes":627,"imports":[{"path":"src/hub/store/selectors.ts","kind":"import-statement","original":"./selectors.js"},{"path":"src/hub/store/store.ts","kind":"import-statement","original":"./store.js"}],"format":"esm"},"src/hub/mod.ts":{"bytes":428,"imports":[{"path":"src/hub/namespaces/mod.ts","kind":"import-statement","original":"./namespaces/mod.js"},{"path":"src/hub/provider/mod.ts","kind":"import-statement","original":"./provider/mod.js"},{"path":"src/hub/hub.ts","kind":"import-statement","original":"./hub.js"},{"path":"src/hub/store/mod.ts","kind":"import-statement","original":"./store/mod.js"},{"path":"src/hub/helpers.ts","kind":"import-statement","original":"./helpers.js"}],"format":"esm"},"src/builders/namespace.ts":{"bytes":6879,"imports":[{"path":"src/hub/mod.ts","kind":"import-statement","original":"../hub/mod.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/builders/provider.ts":{"bytes":1584,"imports":[{"path":"src/hub/provider/mod.ts","kind":"import-statement","original":"../hub/provider/mod.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/builders/action.ts":{"bytes":2385,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/builders/mod.ts":{"bytes":220,"imports":[{"path":"src/builders/namespace.ts","kind":"import-statement","original":"./namespace.js"},{"path":"src/builders/provider.ts","kind":"import-statement","original":"./provider.js"},{"path":"src/builders/action.ts","kind":"import-statement","original":"./action.js"}],"format":"esm"},"src/utils/versions.ts":{"bytes":1851,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/utils/mod.ts":{"bytes":356,"imports":[{"path":"caip","kind":"import-statement","external":true},{"path":"src/hub/helpers.ts","kind":"import-statement","original":"../hub/helpers.js"},{"path":"src/utils/versions.ts","kind":"import-statement","original":"./versions.js"}],"format":"esm"},"src/mod.ts":{"bytes":1344,"imports":[{"path":"src/hub/mod.ts","kind":"import-statement","original":"./hub/mod.js"},{"path":"src/builders/mod.ts","kind":"import-statement","original":"./builders/mod.js"},{"path":"src/utils/mod.ts","kind":"import-statement","original":"./utils/mod.js"}],"format":"esm"},"src/legacy/types.ts":{"bytes":6763,"imports":[],"format":"esm"},"src/legacy/persistor.ts":{"bytes":544,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/legacy/helpers.ts":{"bytes":1855,"imports":[{"path":"src/legacy/types.ts","kind":"import-statement","original":"./types.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/legacy/utils.ts":{"bytes":645,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/legacy/wallet.ts":{"bytes":15787,"imports":[{"path":"src/legacy/helpers.ts","kind":"import-statement","original":"./helpers.js"},{"path":"src/legacy/types.ts","kind":"import-statement","original":"./types.js"},{"path":"src/legacy/utils.ts","kind":"import-statement","original":"./utils.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/legacy/mod.ts":{"bytes":1428,"imports":[{"path":"src/legacy/types.ts","kind":"import-statement","original":"./types.js"},{"path":"src/legacy/persistor.ts","kind":"import-statement","original":"./persistor.js"},{"path":"src/legacy/helpers.ts","kind":"import-statement","original":"./helpers.js"},{"path":"src/legacy/wallet.ts","kind":"import-statement","original":"./wallet.js"},{"path":"src/legacy/utils.ts","kind":"import-statement","original":"./utils.js"}],"format":"esm"},"src/namespaces/common/actions.ts":{"bytes":347,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/evm/constants.ts":{"bytes":83,"imports":[],"format":"esm"},"src/namespaces/evm/utils.ts":{"bytes":1450,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/evm/actions.ts":{"bytes":4250,"imports":[{"path":"caip","kind":"import-statement","external":true},{"path":"src/namespaces/common/actions.ts","kind":"import-statement","original":"../common/actions.js"},{"path":"src/namespaces/evm/constants.ts","kind":"import-statement","original":"./constants.js"},{"path":"src/namespaces/evm/utils.ts","kind":"import-statement","original":"./utils.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/common/after.ts":{"bytes":271,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/evm/after.ts":{"bytes":123,"imports":[{"path":"src/namespaces/common/after.ts","kind":"import-statement","original":"../common/after.js"}],"format":"esm"},"src/namespaces/common/builders.ts":{"bytes":545,"imports":[{"path":"src/mod.ts","kind":"import-statement","original":"../../mod.js"},{"path":"src/namespaces/common/actions.ts","kind":"import-statement","original":"./actions.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/common/helpers.ts":{"bytes":189,"imports":[{"path":"caip","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/common/and.ts":{"bytes":1144,"imports":[{"path":"src/namespaces/common/helpers.ts","kind":"import-statement","original":"./helpers.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/common/before.ts":{"bytes":351,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/common/mod.ts":{"bytes":547,"imports":[{"path":"src/namespaces/common/actions.ts","kind":"import-statement","original":"./actions.js"},{"path":"src/namespaces/common/builders.ts","kind":"import-statement","original":"./builders.js"},{"path":"src/namespaces/common/after.ts","kind":"import-statement","original":"./after.js"},{"path":"src/namespaces/common/and.ts","kind":"import-statement","original":"./and.js"},{"path":"src/namespaces/common/before.ts","kind":"import-statement","original":"./before.js"}],"format":"esm"},"src/namespaces/evm/and.ts":{"bytes":170,"imports":[{"path":"src/namespaces/common/mod.ts","kind":"import-statement","original":"../common/mod.js"}],"format":"esm"},"src/namespaces/evm/before.ts":{"bytes":106,"imports":[{"path":"src/namespaces/common/mod.ts","kind":"import-statement","original":"../common/mod.js"}],"format":"esm"},"src/namespaces/evm/builders.ts":{"bytes":410,"imports":[{"path":"src/mod.ts","kind":"import-statement","original":"../../mod.js"},{"path":"src/namespaces/common/mod.ts","kind":"import-statement","original":"../common/mod.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/evm/mod.ts":{"bytes":363,"imports":[{"path":"src/namespaces/evm/actions.ts","kind":"import-statement","original":"./actions.js"},{"path":"src/namespaces/evm/after.ts","kind":"import-statement","original":"./after.js"},{"path":"src/namespaces/evm/and.ts","kind":"import-statement","original":"./and.js"},{"path":"src/namespaces/evm/before.ts","kind":"import-statement","original":"./before.js"},{"path":"src/namespaces/evm/utils.ts","kind":"import-statement","original":"./utils.js"},{"path":"src/namespaces/evm/builders.ts","kind":"import-statement","original":"./builders.js"},{"path":"src/namespaces/evm/constants.ts","kind":"import-statement","original":"./constants.js"}],"format":"esm"},"src/namespaces/solana/constants.ts":{"bytes":112,"imports":[],"format":"esm"},"src/namespaces/solana/actions.ts":{"bytes":2143,"imports":[{"path":"caip","kind":"import-statement","external":true},{"path":"src/namespaces/common/actions.ts","kind":"import-statement","original":"../common/actions.js"},{"path":"src/namespaces/solana/constants.ts","kind":"import-statement","original":"./constants.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/solana/after.ts":{"bytes":123,"imports":[{"path":"src/namespaces/common/after.ts","kind":"import-statement","original":"../common/after.js"}],"format":"esm"},"src/namespaces/solana/and.ts":{"bytes":170,"imports":[{"path":"src/namespaces/common/mod.ts","kind":"import-statement","original":"../common/mod.js"}],"format":"esm"},"src/namespaces/solana/before.ts":{"bytes":124,"imports":[{"path":"src/namespaces/common/before.ts","kind":"import-statement","original":"../common/before.js"}],"format":"esm"},"src/namespaces/solana/builders.ts":{"bytes":416,"imports":[{"path":"src/mod.ts","kind":"import-statement","original":"../../mod.js"},{"path":"src/namespaces/common/mod.ts","kind":"import-statement","original":"../common/mod.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/namespaces/solana/mod.ts":{"bytes":327,"imports":[{"path":"src/namespaces/solana/actions.ts","kind":"import-statement","original":"./actions.js"},{"path":"src/namespaces/solana/after.ts","kind":"import-statement","original":"./after.js"},{"path":"src/namespaces/solana/and.ts","kind":"import-statement","original":"./and.js"},{"path":"src/namespaces/solana/before.ts","kind":"import-statement","original":"./before.js"},{"path":"src/namespaces/solana/builders.ts","kind":"import-statement","original":"./builders.js"},{"path":"src/namespaces/solana/constants.ts","kind":"import-statement","original":"./constants.js"}],"format":"esm"}},"outputs":{"dist/mod.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":77322},"dist/mod.js":{"imports":[{"path":"zustand/vanilla","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true},{"path":"caip","kind":"import-statement","external":true}],"exports":["ActionBuilder","Hub","Namespace","NamespaceBuilder","Provider","ProviderBuilder","createStore","defineVersions","guessProviderStateSelector","namespaceStateSelector","pickVersion"],"entryPoint":"src/mod.ts","inputs":{"src/hub/helpers.ts":{"bytesInOutput":131},"src/hub/namespaces/errors.ts":{"bytesInOutput":235},"src/hub/namespaces/namespace.ts":{"bytesInOutput":2393},"src/hub/namespaces/mod.ts":{"bytesInOutput":0},"src/hub/mod.ts":{"bytesInOutput":0},"src/hub/provider/provider.ts":{"bytesInOutput":1837},"src/hub/provider/mod.ts":{"bytesInOutput":0},"src/hub/hub.ts":{"bytesInOutput":689},"src/hub/store/selectors.ts":{"bytesInOutput":383},"src/hub/store/mod.ts":{"bytesInOutput":0},"src/hub/store/store.ts":{"bytesInOutput":157},"src/hub/store/extend.ts":{"bytesInOutput":833},"src/hub/store/hub.ts":{"bytesInOutput":38},"src/hub/store/namespaces.ts":{"bytesInOutput":1381},"src/hub/store/events.ts":{"bytesInOutput":188},"src/hub/store/providers.ts":{"bytesInOutput":579},"src/mod.ts":{"bytesInOutput":0},"src/builders/namespace.ts":{"bytesInOutput":1222},"src/builders/mod.ts":{"bytesInOutput":0},"src/builders/provider.ts":{"bytesInOutput":461},"src/builders/action.ts":{"bytesInOutput":746},"src/utils/mod.ts":{"bytesInOutput":24},"src/utils/versions.ts":{"bytesInOutput":356}},"bytes":11987},"dist/utils/mod.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":3724},"dist/utils/mod.js":{"imports":[{"path":"caip","kind":"import-statement","external":true}],"exports":["CAIP","defineVersions","generateStoreId","legacyProviderImportsToVersionsInterface","pickVersion"],"entryPoint":"src/utils/mod.ts","inputs":{"src/utils/mod.ts":{"bytesInOutput":23},"src/hub/helpers.ts":{"bytesInOutput":58},"src/utils/versions.ts":{"bytesInOutput":456}},"bytes":771},"dist/legacy/mod.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":35979},"dist/legacy/mod.js":{"imports":[],"exports":["LegacyEvents","LegacyNetworks","LegacyWallet","Persistor","legacyEagerConnectHandler","legacyFormatAddressWithNetwork","legacyGetBlockChainNameFromId","legacyIsEvmNamespace","legacyReadAccountAddress"],"entryPoint":"src/legacy/mod.ts","inputs":{"src/legacy/types.ts":{"bytesInOutput":1301},"src/legacy/mod.ts":{"bytesInOutput":0},"src/legacy/persistor.ts":{"bytesInOutput":206},"src/legacy/helpers.ts":{"bytesInOutput":610},"src/legacy/utils.ts":{"bytesInOutput":238},"src/legacy/wallet.ts":{"bytesInOutput":5876}},"bytes":8580},"dist/hub/store/mod.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":23731},"dist/hub/store/mod.js":{"imports":[{"path":"zustand/vanilla","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true}],"exports":["createStore","guessProviderStateSelector","namespaceStateSelector"],"entryPoint":"src/hub/store/mod.ts","inputs":{"src/hub/store/selectors.ts":{"bytesInOutput":383},"src/hub/store/mod.ts":{"bytesInOutput":0},"src/hub/store/store.ts":{"bytesInOutput":157},"src/hub/store/extend.ts":{"bytesInOutput":833},"src/hub/store/hub.ts":{"bytesInOutput":38},"src/hub/store/namespaces.ts":{"bytesInOutput":1381},"src/hub/store/events.ts":{"bytesInOutput":188},"src/hub/store/providers.ts":{"bytesInOutput":579}},"bytes":3756},"dist/namespaces/evm/mod.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":28150},"dist/namespaces/evm/mod.js":{"imports":[{"path":"caip","kind":"import-statement","external":true},{"path":"zustand/vanilla","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true},{"path":"caip","kind":"import-statement","external":true},{"path":"caip","kind":"import-statement","external":true}],"exports":["CAIP_ETHEREUM_CHAIN_ID","CAIP_NAMESPACE","actions","after","and","before","builders","utils"],"entryPoint":"src/namespaces/evm/mod.ts","inputs":{"src/namespaces/evm/actions.ts":{"bytesInOutput":1366},"src/namespaces/common/actions.ts":{"bytesInOutput":149},"src/namespaces/evm/constants.ts":{"bytesInOutput":21},"src/namespaces/evm/utils.ts":{"bytesInOutput":701},"src/namespaces/evm/mod.ts":{"bytesInOutput":0},"src/namespaces/evm/after.ts":{"bytesInOutput":47},"src/namespaces/common/after.ts":{"bytesInOutput":103},"src/namespaces/evm/and.ts":{"bytesInOutput":56},"src/namespaces/common/mod.ts":{"bytesInOutput":0},"src/hub/namespaces/mod.ts":{"bytesInOutput":0},"src/hub/mod.ts":{"bytesInOutput":0},"src/hub/provider/mod.ts":{"bytesInOutput":0},"src/hub/store/mod.ts":{"bytesInOutput":0},"src/hub/store/store.ts":{"bytesInOutput":47},"src/hub/store/namespaces.ts":{"bytesInOutput":33},"src/hub/store/providers.ts":{"bytesInOutput":33},"src/mod.ts":{"bytesInOutput":0},"src/builders/mod.ts":{"bytesInOutput":0},"src/builders/action.ts":{"bytesInOutput":746},"src/utils/mod.ts":{"bytesInOutput":24},"src/namespaces/common/helpers.ts":{"bytesInOutput":114},"src/namespaces/common/and.ts":{"bytesInOutput":300},"src/namespaces/common/before.ts":{"bytesInOutput":95},"src/namespaces/evm/before.ts":{"bytesInOutput":49},"src/namespaces/evm/builders.ts":{"bytesInOutput":98}},"bytes":4282},"dist/namespaces/solana/mod.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":22309},"dist/namespaces/solana/mod.js":{"imports":[{"path":"caip","kind":"import-statement","external":true},{"path":"zustand/vanilla","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true},{"path":"caip","kind":"import-statement","external":true},{"path":"caip","kind":"import-statement","external":true}],"exports":["CAIP_NAMESPACE","CAIP_SOLANA_CHAIN_ID","actions","after","and","before","builders"],"entryPoint":"src/namespaces/solana/mod.ts","inputs":{"src/namespaces/solana/actions.ts":{"bytesInOutput":597},"src/namespaces/common/actions.ts":{"bytesInOutput":149},"src/namespaces/solana/constants.ts":{"bytesInOutput":52},"src/namespaces/solana/mod.ts":{"bytesInOutput":0},"src/namespaces/solana/after.ts":{"bytesInOutput":47},"src/namespaces/common/after.ts":{"bytesInOutput":103},"src/namespaces/solana/and.ts":{"bytesInOutput":56},"src/namespaces/common/mod.ts":{"bytesInOutput":0},"src/hub/namespaces/mod.ts":{"bytesInOutput":0},"src/hub/mod.ts":{"bytesInOutput":0},"src/hub/provider/mod.ts":{"bytesInOutput":0},"src/hub/store/mod.ts":{"bytesInOutput":0},"src/hub/store/store.ts":{"bytesInOutput":47},"src/hub/store/namespaces.ts":{"bytesInOutput":33},"src/hub/store/providers.ts":{"bytesInOutput":33},"src/mod.ts":{"bytesInOutput":0},"src/builders/mod.ts":{"bytesInOutput":0},"src/builders/action.ts":{"bytesInOutput":746},"src/utils/mod.ts":{"bytesInOutput":24},"src/namespaces/common/helpers.ts":{"bytesInOutput":114},"src/namespaces/common/and.ts":{"bytesInOutput":250},"src/namespaces/common/before.ts":{"bytesInOutput":95},"src/namespaces/solana/before.ts":{"bytesInOutput":47},"src/namespaces/solana/builders.ts":{"bytesInOutput":96}},"bytes":2776},"dist/namespaces/common/mod.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":18257},"dist/namespaces/common/mod.js":{"imports":[{"path":"zustand/vanilla","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true},{"path":"immer","kind":"import-statement","external":true},{"path":"caip","kind":"import-statement","external":true},{"path":"caip","kind":"import-statement","external":true}],"exports":["actions","afterRecommended","andRecommended","beforeRecommended","builders","connectAndUpdateStateForMultiNetworks","connectAndUpdateStateForSingleNetwork","intoConnecting","intoConnectionFinished"],"entryPoint":"src/namespaces/common/mod.ts","inputs":{"src/namespaces/common/actions.ts":{"bytesInOutput":200},"src/namespaces/common/mod.ts":{"bytesInOutput":0},"src/namespaces/common/builders.ts":{"bytesInOutput":89},"src/hub/namespaces/mod.ts":{"bytesInOutput":0},"src/hub/mod.ts":{"bytesInOutput":0},"src/hub/provider/mod.ts":{"bytesInOutput":0},"src/hub/store/mod.ts":{"bytesInOutput":0},"src/hub/store/store.ts":{"bytesInOutput":47},"src/hub/store/namespaces.ts":{"bytesInOutput":33},"src/hub/store/providers.ts":{"bytesInOutput":33},"src/mod.ts":{"bytesInOutput":0},"src/builders/mod.ts":{"bytesInOutput":0},"src/builders/action.ts":{"bytesInOutput":746},"src/utils/mod.ts":{"bytesInOutput":24},"src/namespaces/common/after.ts":{"bytesInOutput":103},"src/namespaces/common/helpers.ts":{"bytesInOutput":114},"src/namespaces/common/and.ts":{"bytesInOutput":559},"src/namespaces/common/before.ts":{"bytesInOutput":95}},"bytes":2451}}}
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rango-dev/wallets-core",
3
- "version": "0.40.1-next.10",
3
+ "version": "0.40.1-next.12",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "source": "./src/mod.ts",
@@ -19,6 +19,10 @@
19
19
  "types": "./dist/utils/mod.d.ts",
20
20
  "default": "./dist/utils/mod.js"
21
21
  },
22
+ "./store": {
23
+ "types": "./dist/hub/store/mod.d.ts",
24
+ "default": "./dist/hub/store/mod.js"
25
+ },
22
26
  "./namespaces/common": {
23
27
  "types": "./dist/namespaces/common/mod.d.ts",
24
28
  "default": "./dist/namespaces/common/mod.js"
@@ -38,7 +42,7 @@
38
42
  "legacy"
39
43
  ],
40
44
  "scripts": {
41
- "build": "node ../../scripts/build/command.mjs --path wallets/core --inputs src/mod.ts,src/utils/mod.ts,src/legacy/mod.ts,src/namespaces/evm/mod.ts,src/namespaces/solana/mod.ts,src/namespaces/common/mod.ts",
45
+ "build": "node ../../scripts/build/command.mjs --path wallets/core --inputs src/mod.ts,src/utils/mod.ts,src/legacy/mod.ts,src/hub/store/mod.ts,src/namespaces/evm/mod.ts,src/namespaces/solana/mod.ts,src/namespaces/common/mod.ts",
42
46
  "ts-check": "tsc --declaration --emitDeclarationOnly -p ./tsconfig.json",
43
47
  "clean": "rimraf dist",
44
48
  "format": "prettier --write '{.,src}/**/*.{ts,tsx}'",
@@ -54,7 +58,7 @@
54
58
  "dependencies": {
55
59
  "caip": "^1.1.1",
56
60
  "immer": "^10.0.4",
57
- "rango-types": "^0.1.74",
61
+ "rango-types": "^0.1.78",
58
62
  "zustand": "^4.5.2"
59
63
  },
60
64
  "publishConfig": {
@@ -0,0 +1,89 @@
1
+ export type NamespaceDisconnectedEvent = {
2
+ type: 'namespace_disconnected';
3
+ provider: string;
4
+ namespace: string;
5
+ };
6
+
7
+ export type NamespaceConnectedEvent = {
8
+ type: 'namespace_connected';
9
+ provider: string;
10
+ namespace: string;
11
+ accounts: string[];
12
+ };
13
+
14
+ export type NamespaceSwitchedAccountEvent = {
15
+ type: 'namespace_account_switched';
16
+ provider: string;
17
+ namespace: string;
18
+ accounts: string[];
19
+ previousAccounts: string[];
20
+ };
21
+
22
+ export type NamespaceSwitchedNetworkEvent = {
23
+ type: 'namespace_network_switched';
24
+ provider: string;
25
+ namespace: string;
26
+ network: string;
27
+ previousNetwork: string | null;
28
+ };
29
+
30
+ export type ProviderDetectedEvent = {
31
+ type: 'provider_detected';
32
+ provider: string;
33
+ };
34
+
35
+ export type ProviderConnectingEvent = {
36
+ type: 'provider_connecting';
37
+ provider: string;
38
+ value: boolean;
39
+ };
40
+
41
+ export type ProviderConnectedEvent = {
42
+ type: 'provider_connected';
43
+ provider: string;
44
+ };
45
+
46
+ export type ProviderDisconnectedEvent = {
47
+ type: 'provider_disconnected';
48
+ provider: string;
49
+ };
50
+
51
+ export type Event =
52
+ | NamespaceDisconnectedEvent
53
+ | NamespaceConnectedEvent
54
+ | NamespaceSwitchedAccountEvent
55
+ | NamespaceSwitchedNetworkEvent
56
+ | ProviderDetectedEvent
57
+ | ProviderConnectingEvent
58
+ | ProviderConnectedEvent
59
+ | ProviderDisconnectedEvent;
60
+
61
+ /**
62
+ *
63
+ * Keeping an array of Event and when iterates over its values, it will be removed (consume) from the array.
64
+ *
65
+ */
66
+ export class ConsumableEvents {
67
+ #data: Event[] = [];
68
+
69
+ push(val: Event) {
70
+ this.#data.push(val);
71
+ }
72
+
73
+ [Symbol.iterator](): Iterator<Event> {
74
+ return {
75
+ next: (): IteratorResult<Event> => {
76
+ if (this.#data.length == 0) {
77
+ return { done: true, value: undefined };
78
+ }
79
+
80
+ // Typescript can not narrow the type, but we have a runtime check to ensure it will never be an empty list
81
+ const value = this.#data.shift()!;
82
+ return {
83
+ done: false,
84
+ value,
85
+ };
86
+ },
87
+ };
88
+ }
89
+ }
@@ -0,0 +1,125 @@
1
+ import type {
2
+ Event,
3
+ ProviderConnectedEvent,
4
+ ProviderConnectingEvent,
5
+ ProviderDisconnectedEvent,
6
+ } from './events.js';
7
+ import type { RawStore, State } from './store.js';
8
+
9
+ import { guessProviderStateSelector } from './selectors.js';
10
+
11
+ export interface Store extends Omit<RawStore, 'subscribe'> {
12
+ subscribe(listener: (event: Event, state: State, prevState: State) => void): {
13
+ flushEvents(): void;
14
+ };
15
+ }
16
+
17
+ /**
18
+ * Zustand's store provides a set of built-in functionalities,
19
+ * but it may not meet all our requirements.
20
+ * This function modifies the interface and adds or updates the available methods.
21
+ */
22
+ export function extend(store: RawStore): Store {
23
+ const extendedSubscribe: (store: RawStore) => Store['subscribe'] =
24
+ (store) => (listener) => {
25
+ const executeListener = (
26
+ events: Event[],
27
+ state: State,
28
+ prevState: State
29
+ ) => {
30
+ for (const ev of events) {
31
+ listener(ev, state, prevState);
32
+ }
33
+ };
34
+
35
+ /*
36
+ * only known changes will fire event for lib users
37
+ * so all the changes in store won't trigger a user-face event
38
+ */
39
+ store.subscribe((state, prevState) => {
40
+ const eventsLike = getEventsLike(state, prevState);
41
+ const events = tryConsumeEvents(state);
42
+ const allQueuedEvents = [...events, ...eventsLike];
43
+ executeListener(allQueuedEvents, state, prevState);
44
+ });
45
+
46
+ return {
47
+ /**
48
+ * Manually run pending events.
49
+ * This useful when use `subscribe` method after sometime and when store initialized.
50
+ *
51
+ * Note: Please consider both current and previous state will be same and we don't have access to previous state in a such scenario.
52
+ */
53
+ flushEvents: () => {
54
+ const state = store.getState();
55
+ const events = tryConsumeEvents(state);
56
+ executeListener(events, state, state);
57
+ },
58
+ };
59
+ };
60
+
61
+ return new Proxy(store, {
62
+ get: function (target, prop, receiver) {
63
+ if (prop === 'subscribe') {
64
+ return extendedSubscribe(target);
65
+ }
66
+ return Reflect.get(target, prop, receiver);
67
+ },
68
+ }) as unknown as Store;
69
+ }
70
+
71
+ /**
72
+ * Retrieves the ConsumableEvent from the store and returns its values.
73
+ * The values will be consumed by iterating over the field.
74
+ */
75
+ function tryConsumeEvents(state: State): Event[] {
76
+ return [...state.providers.events, ...state.namespaces.events];
77
+ }
78
+
79
+ /**
80
+ * In certain cases, adding events to the store is not possible (e.g., namespace or provider layer).
81
+ * In these cases, we observe store changes and treat specific patterns as events when detected.
82
+ *
83
+ * Note: This approach should be avoided in most cases. It is used here to maintain backward compatibility
84
+ * with the provider's legacy interface.
85
+ */
86
+ function getEventsLike(state: State, prevState: State): Event[] {
87
+ const events: Event[] = [];
88
+
89
+ for (const providerId of Object.keys(state.providers.list)) {
90
+ const currentProviderState = guessProviderStateSelector(state, providerId);
91
+ const previousProviderState = guessProviderStateSelector(
92
+ prevState,
93
+ providerId
94
+ );
95
+
96
+ if (previousProviderState.connecting !== currentProviderState.connecting) {
97
+ const ev: ProviderConnectingEvent = {
98
+ type: 'provider_connecting',
99
+ provider: providerId,
100
+ value: currentProviderState.connecting,
101
+ };
102
+ events.push(ev);
103
+ }
104
+
105
+ if (!previousProviderState.connected && currentProviderState.connected) {
106
+ const ev: ProviderConnectedEvent = {
107
+ type: 'provider_connected',
108
+ provider: providerId,
109
+ };
110
+
111
+ events.push(ev);
112
+ }
113
+
114
+ if (previousProviderState.connected && !currentProviderState.connected) {
115
+ const ev: ProviderDisconnectedEvent = {
116
+ type: 'provider_disconnected',
117
+ provider: providerId,
118
+ };
119
+
120
+ events.push(ev);
121
+ }
122
+ }
123
+
124
+ return events;
125
+ }
@@ -2,7 +2,20 @@ export {
2
2
  guessProviderStateSelector,
3
3
  namespaceStateSelector,
4
4
  } from './selectors.js';
5
- export type { Store, State } from './store.js';
5
+ export type { Store } from './extend.js';
6
+ export type { State } from './store.js';
7
+ export type {
8
+ Event,
9
+ // Providers
10
+ ProviderDetectedEvent,
11
+ ProviderConnectingEvent,
12
+ ProviderConnectedEvent,
13
+ ProviderDisconnectedEvent,
14
+ // Namespaces
15
+ NamespaceDisconnectedEvent,
16
+ NamespaceConnectedEvent,
17
+ NamespaceSwitchedAccountEvent,
18
+ } from './events.js';
6
19
  export type { ProviderInfo, ProviderConfig } from './providers.js';
7
20
  export type { NamespaceConfig, NamespaceData } from './namespaces.js';
8
21
  export { createStore } from './store.js';
@@ -4,12 +4,17 @@ import type { StateCreator } from 'zustand';
4
4
 
5
5
  import { produce } from 'immer';
6
6
 
7
+ import {
8
+ ConsumableEvents,
9
+ type NamespaceConnectedEvent,
10
+ type NamespaceDisconnectedEvent,
11
+ type NamespaceSwitchedAccountEvent,
12
+ type NamespaceSwitchedNetworkEvent,
13
+ } from './events.js';
7
14
  import { namespaceStateSelector, type State } from './mod.js';
8
15
 
9
- // eslint-disable-next-line @typescript-eslint/no-empty-interface
10
- export interface NamespaceConfig {
11
- // Currently, namespace doesn't has any config.
12
- }
16
+ // Currently, namespace doesn't has any config.
17
+ export type NamespaceConfig = object;
13
18
 
14
19
  export interface NamespaceData {
15
20
  accounts: null | string[];
@@ -23,15 +28,15 @@ interface NamespaceInfo {
23
28
  namespaceId: string;
24
29
  }
25
30
 
31
+ interface NamespaceItem {
32
+ info: NamespaceInfo;
33
+ data: NamespaceData;
34
+ error: unknown;
35
+ }
36
+
26
37
  type NamespaceState = {
27
- list: Record<
28
- string,
29
- {
30
- info: NamespaceInfo;
31
- data: NamespaceData;
32
- error: unknown;
33
- }
34
- >;
38
+ events: InstanceType<typeof ConsumableEvents>;
39
+ list: Record<string, NamespaceItem>;
35
40
  };
36
41
 
37
42
  interface NamespaceActions {
@@ -41,6 +46,13 @@ interface NamespaceActions {
41
46
  key: K,
42
47
  value: NamespaceData[K]
43
48
  ) => void;
49
+
50
+ _produceEventsWhenUpdatingStatus: <K extends keyof NamespaceData>(
51
+ namespace: NamespaceItem,
52
+ id: string,
53
+ key: K,
54
+ value: NamespaceData[K]
55
+ ) => void;
44
56
  }
45
57
  interface NamespaceSelectors {
46
58
  getNamespaceData(storeId: string): NamespaceData;
@@ -52,15 +64,19 @@ export type NamespaceStore = NamespaceState &
52
64
  type NamespaceStateCreator = StateCreator<State, [], [], NamespaceStore>;
53
65
 
54
66
  const namespacesStore: NamespaceStateCreator = (set, get) => ({
67
+ events: new ConsumableEvents(),
68
+
55
69
  list: {},
56
70
  addNamespace: (id, info) => {
71
+ const data: NamespaceData = {
72
+ accounts: null,
73
+ network: null,
74
+ connected: false,
75
+ connecting: false,
76
+ };
77
+
57
78
  const item = {
58
- data: {
59
- accounts: null,
60
- network: null,
61
- connected: false,
62
- connecting: false,
63
- },
79
+ data,
64
80
  error: '',
65
81
  info,
66
82
  };
@@ -72,10 +88,14 @@ const namespacesStore: NamespaceStateCreator = (set, get) => ({
72
88
  );
73
89
  },
74
90
  updateStatus: (id, key, value) => {
75
- if (!get().namespaces.list[id]) {
91
+ const ns = get().namespaces.list[id];
92
+ if (!ns) {
76
93
  throw new Error(`No namespace with '${id}' found.`);
77
94
  }
78
95
 
96
+ get().namespaces._produceEventsWhenUpdatingStatus(ns, id, key, value);
97
+
98
+ // Updating state
79
99
  set(
80
100
  produce((state: State) => {
81
101
  state.namespaces.list[id].data[key] = value;
@@ -85,6 +105,69 @@ const namespacesStore: NamespaceStateCreator = (set, get) => ({
85
105
  getNamespaceData(storeId) {
86
106
  return namespaceStateSelector(get(), storeId);
87
107
  },
108
+
109
+ _produceEventsWhenUpdatingStatus: (namespace, id, key, value) => {
110
+ if (key === 'accounts') {
111
+ // check for both null and empty array
112
+ const isAccountsEmpty =
113
+ Object.is(value, null) || (Array.isArray(value) && value.length === 0);
114
+
115
+ if (isAccountsEmpty) {
116
+ const currentConnectedStatus = get().namespaces.list[id].data.connected;
117
+ if (currentConnectedStatus) {
118
+ const event: NamespaceDisconnectedEvent = {
119
+ type: 'namespace_disconnected',
120
+ provider: namespace.info.providerId,
121
+ namespace: namespace.info.namespaceId,
122
+ };
123
+
124
+ get().namespaces.events.push(event);
125
+ }
126
+ // Skip emitting disconnect event, if the `connected` is false
127
+ } else {
128
+ const currentAccounts = get().namespaces.list[id].data.accounts;
129
+
130
+ if (!currentAccounts) {
131
+ const event: NamespaceConnectedEvent = {
132
+ type: 'namespace_connected',
133
+ provider: namespace.info.providerId,
134
+ namespace: namespace.info.namespaceId,
135
+ accounts: value as string[],
136
+ };
137
+
138
+ get().namespaces.events.push(event);
139
+ } else {
140
+ const areSameAccounts =
141
+ currentAccounts.sort().toString() ===
142
+ (value as string[]).sort().toString();
143
+
144
+ if (!areSameAccounts) {
145
+ const event: NamespaceSwitchedAccountEvent = {
146
+ type: 'namespace_account_switched',
147
+ provider: namespace.info.providerId,
148
+ namespace: namespace.info.namespaceId,
149
+ previousAccounts: currentAccounts,
150
+ accounts: value as string[],
151
+ };
152
+
153
+ get().namespaces.events.push(event);
154
+ }
155
+ }
156
+ }
157
+ } else if (key === 'network') {
158
+ const currentNetwork = get().namespaces.list[id].data.network;
159
+
160
+ const event: NamespaceSwitchedNetworkEvent = {
161
+ type: 'namespace_network_switched',
162
+ provider: namespace.info.providerId,
163
+ namespace: namespace.info.namespaceId,
164
+ network: value as string,
165
+ previousNetwork: currentNetwork,
166
+ };
167
+
168
+ get().namespaces.events.push(event);
169
+ }
170
+ },
88
171
  });
89
172
 
90
173
  export { namespacesStore };