@rango-dev/wallets-react 0.27.1-next.9 → 0.28.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -1 +1 @@
1
- {"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/legacy/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,YAAY,EAAE,kBAAkB,EAAE,MAAM,yBAAyB,CAAC;AAChF,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,EAC/B,MAAM,gCAAgC,CAAC;AACxC,OAAO,KAAK,EAAE,cAAc,EAAE,aAAa,EAAE,MAAM,aAAa,CAAC;AACjE,OAAO,KAAK,EAAE,iBAAiB,EAAE,MAAM,OAAO,CAAC;AAE/C,MAAM,MAAM,KAAK,GAAG;IAClB,CAAC,GAAG,EAAE,MAAM,GAAG,WAAW,GAAG,SAAS,CAAC;CACxC,CAAC;AAEF,MAAM,MAAM,aAAa,GAAG;IAC1B,QAAQ,EAAE,MAAM,EAAE,GAAG,IAAI,CAAC;IAC1B,OAAO,EAAE,OAAO,GAAG,IAAI,CAAC;IACxB,QAAQ,EAAE,GAAG,CAAC;CACf,CAAC;AAEF,MAAM,MAAM,SAAS,GAAG;KAAG,IAAI,IAAI,UAAU,CAAC,CAAC,EAAE,GAAG;CAAE,CAAC;AAEvD,MAAM,MAAM,kBAAkB,GAAG,UAAU,GAAG;IAC5C,UAAU,CAAC,EAAE,YAAY,CAAC,YAAY,CAAC,CAAC;IACxC,KAAK,CAAC,EAAE,OAAO,CAAC;CACjB,CAAC;AAEF,MAAM,MAAM,eAAe,GAAG;IAC5B,OAAO,CACL,IAAI,EAAE,UAAU,EAChB,UAAU,CAAC,EAAE,8BAA8B,EAAE,GAC5C,OAAO,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AAY,CAAA;CAAE,GAAG,aAAa,CAAC"}
@@ -1 +1 @@
1
- {"inputs":{"src/hub/constants.ts":{"bytes":146,"imports":[],"format":"esm"},"src/hub/lastConnectedWallets.ts":{"bytes":4867,"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":905,"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":7308,"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":2307,"imports":[{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/utils","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/utils.ts":{"bytes":10648,"imports":[{"path":"@rango-dev/wallets-core","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":"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":7018,"imports":[{"path":"@rango-dev/wallets-core/legacy","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":1365,"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":11338,"imports":[{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"react","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":3425,"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":5147,"imports":[],"format":"esm"},"src/index.ts":{"bytes":263,"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"},{"path":"src/hub/mod.ts","kind":"import-statement","original":"./hub/mod.js"}],"format":"esm"}},"outputs":{"dist/index.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":95643},"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","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/utils","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-shared","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","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"exports":["Events","Provider","availableWallets","checkWalletProviders","choose","clearPersistance","connectedWallets","defaultWalletState","getAllLegacyProviders","isAsync","makeEventHandler","needsCheckInstallation","separateLegacyAndHubProviders","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":1210},"src/index.ts":{"bytesInOutput":0},"src/provider.tsx":{"bytesInOutput":133},"src/legacy/context.ts":{"bytesInOutput":431},"src/hub/utils.ts":{"bytesInOutput":2899},"src/legacy/mod.ts":{"bytesInOutput":0},"src/legacy/useLegacyProviders.ts":{"bytesInOutput":2127},"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":822},"src/hub/mod.ts":{"bytesInOutput":0},"src/hub/useHubAdapter.ts":{"bytesInOutput":3681},"src/hub/autoConnect.ts":{"bytesInOutput":2054},"src/hub/useHubRefs.ts":{"bytesInOutput":510},"src/useProviders.ts":{"bytesInOutput":885},"src/legacy/types.ts":{"bytesInOutput":164}},"bytes":18029}}}
1
+ {"inputs":{"src/hub/constants.ts":{"bytes":146,"imports":[],"format":"esm"},"src/hub/lastConnectedWallets.ts":{"bytes":4867,"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":905,"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":7308,"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":2342,"imports":[{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/utils","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":9403,"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":6964,"imports":[{"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":1365,"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":12294,"imports":[{"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":3425,"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":5369,"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":95560},"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/utils","kind":"import-statement","external":true},{"path":"ts-results","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":"@rango-dev/wallets-core/legacy","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":1401},"src/hub/constants.ts":{"bytesInOutput":65},"src/hub/lastConnectedWallets.ts":{"bytesInOutput":1210},"src/index.ts":{"bytesInOutput":0},"src/provider.tsx":{"bytesInOutput":133},"src/legacy/context.ts":{"bytesInOutput":431},"src/hub/utils.ts":{"bytesInOutput":3161},"src/legacy/mod.ts":{"bytesInOutput":0},"src/legacy/useLegacyProviders.ts":{"bytesInOutput":2125},"src/legacy/autoConnect.ts":{"bytesInOutput":393},"src/legacy/hooks.ts":{"bytesInOutput":458},"src/legacy/useAutoConnect.ts":{"bytesInOutput":196},"src/legacy/utils.ts":{"bytesInOutput":92},"src/hub/helpers.ts":{"bytesInOutput":869},"src/hub/mod.ts":{"bytesInOutput":0},"src/hub/useHubAdapter.ts":{"bytesInOutput":3909},"src/hub/autoConnect.ts":{"bytesInOutput":2058},"src/hub/useHubRefs.ts":{"bytesInOutput":510},"src/useProviders.ts":{"bytesInOutput":885},"src/legacy/types.ts":{"bytesInOutput":63}},"bytes":18398},"dist/helpers/index.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":59428},"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/utils","kind":"import-statement","external":true},{"path":"ts-results","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":"@rango-dev/wallets-core/legacy","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":427},"src/legacy/useLegacyProviders.ts":{"bytesInOutput":52},"src/hub/lastConnectedWallets.ts":{"bytesInOutput":1210},"src/legacy/helpers.ts":{"bytesInOutput":59},"src/legacy/hooks.ts":{"bytesInOutput":109},"src/legacy/useAutoConnect.ts":{"bytesInOutput":47},"src/hub/helpers.ts":{"bytesInOutput":178},"src/hub/mod.ts":{"bytesInOutput":0},"src/hub/useHubAdapter.ts":{"bytesInOutput":143},"src/hub/autoConnect.ts":{"bytesInOutput":156},"src/hub/useHubRefs.ts":{"bytesInOutput":97},"src/helpers/index.ts":{"bytesInOutput":0}},"bytes":3113}}}
@@ -0,0 +1,8 @@
1
+ {
2
+ "name": "@rango-dev/wallets-react/helpers",
3
+ "type": "module",
4
+ "main": "../dist/helpers/index.js",
5
+ "module": "../dist/helpers/index.js",
6
+ "types": "../dist/helpers/index.d.ts",
7
+ "sideEffects": false
8
+ }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@rango-dev/wallets-react",
3
- "version": "0.27.1-next.9",
3
+ "version": "0.28.0",
4
4
  "license": "MIT",
5
5
  "type": "module",
6
6
  "source": "./src/index.ts",
@@ -9,14 +9,19 @@
9
9
  ".": {
10
10
  "types": "./dist/index.d.ts",
11
11
  "default": "./dist/index.js"
12
+ },
13
+ "./helpers": {
14
+ "types": "./dist/helpers/index.d.ts",
15
+ "default": "./dist/helpers/index.js"
12
16
  }
13
17
  },
14
18
  "files": [
15
19
  "dist",
16
- "src"
20
+ "src",
21
+ "helpers"
17
22
  ],
18
23
  "scripts": {
19
- "build": "node ../../scripts/build/command.mjs --path wallets/react",
24
+ "build": "node ../../scripts/build/command.mjs --path wallets/react --inputs src/index.ts,src/helpers/index.ts",
20
25
  "ts-check": "tsc --declaration --emitDeclarationOnly -p ./tsconfig.json",
21
26
  "clean": "rimraf dist",
22
27
  "format": "prettier --write '{.,src}/**/*.{ts,tsx}'",
@@ -30,9 +35,10 @@
30
35
  "react-dom": "^17.0.0 || ^18.0.0"
31
36
  },
32
37
  "dependencies": {
33
- "@rango-dev/wallets-core": "^0.40.1-next.10",
34
- "@rango-dev/wallets-shared": "^0.41.1-next.3",
35
- "rango-types": "^0.1.74"
38
+ "@rango-dev/wallets-core": "^0.41.0",
39
+ "@rango-dev/wallets-shared": "^0.42.0",
40
+ "rango-types": "^0.1.78",
41
+ "ts-results": "^3.3.0"
36
42
  },
37
43
  "devDependencies": {
38
44
  "@types/react": "^18.0.25",
@@ -41,4 +47,4 @@
41
47
  "publishConfig": {
42
48
  "access": "public"
43
49
  }
44
- }
50
+ }
@@ -0,0 +1 @@
1
+ export { getAllLegacyProviders } from '../hub/mod.js';
@@ -12,6 +12,7 @@ import {
12
12
  legacyEagerConnectHandler,
13
13
  legacyIsEvmNamespace,
14
14
  } from '@rango-dev/wallets-core/legacy';
15
+ import { Result } from 'ts-results';
15
16
 
16
17
  import { HUB_LAST_CONNECTED_WALLETS } from '../legacy/mod.js';
17
18
 
@@ -97,7 +98,7 @@ async function eagerConnect(
97
98
 
98
99
  const failedNamespaces: LegacyNamespaceInputForConnect[] = [];
99
100
  connectNamespacesResult.forEach((result, index) => {
100
- if (result instanceof Error) {
101
+ if (result.err) {
101
102
  failedNamespaces.push(targetNamespaces[index][0]);
102
103
  }
103
104
  });
@@ -109,16 +110,13 @@ async function eagerConnect(
109
110
  );
110
111
  }
111
112
 
112
- const atLeastOneNamespaceConnectedSuccessfully =
113
- connectNamespacesResult.length - failedNamespaces.length > 0;
113
+ const atLeastOneNamespaceConnectedSuccessfully = connectNamespacesResult.some(
114
+ (result) => result.ok
115
+ );
114
116
  if (!atLeastOneNamespaceConnectedSuccessfully) {
115
117
  throw new Error(`No namespace connected for ${type}`);
116
118
  }
117
-
118
- const successfulResult = connectNamespacesResult.filter(
119
- (result) => !(result instanceof Error)
120
- );
121
- return successfulResult;
119
+ return Result.all(...connectNamespacesResult).unwrap();
122
120
  }
123
121
 
124
122
  /*
@@ -142,7 +140,7 @@ export async function autoConnect(deps: {
142
140
  const walletsToRemoveFromPersistance: string[] = [];
143
141
 
144
142
  if (walletIds.length) {
145
- const eagerConnectQueue: any[] = [];
143
+ const eagerConnectQueue: unknown[] = [];
146
144
 
147
145
  // Run `.connect` if `.canEagerConnect` returns `true`.
148
146
  walletIds.forEach((providerName) => {
@@ -157,10 +155,10 @@ export async function autoConnect(deps: {
157
155
 
158
156
  const legacyProvider = getLegacyProvider(providerName);
159
157
 
160
- let legacyInstance: any;
158
+ let legacyInstance: unknown;
161
159
  try {
162
160
  legacyInstance = legacyProvider.getInstance();
163
- } catch (e) {
161
+ } catch {
164
162
  console.warn(
165
163
  "It seems instance isn't available yet for auto connect. This can happen when extension not loaded yet (sometimes when opening browser for first time) or extension is disabled. Desired wallet:",
166
164
  providerName
@@ -3,9 +3,11 @@ import type {
3
3
  Accounts,
4
4
  AccountsWithActiveChain,
5
5
  } from '@rango-dev/wallets-core/namespaces/common';
6
+ import type { Result } from 'ts-results';
6
7
 
7
8
  import { legacyFormatAddressWithNetwork as formatAddressWithNetwork } from '@rango-dev/wallets-core/legacy';
8
9
  import { CAIP } from '@rango-dev/wallets-core/utils';
10
+ import { Err, Ok } from 'ts-results';
9
11
 
10
12
  export function mapCaipNamespaceToLegacyNetworkName(
11
13
  chainId: CAIP.ChainIdParams | string
@@ -42,22 +44,19 @@ export function fromAccountIdToLegacyAddressFormat(account: string): string {
42
44
  /**
43
45
  * Getting a list of (lazy) promises and run them one after another.
44
46
  */
45
- export async function runSequentiallyWithoutFailure<
46
- T extends () => Promise<unknown>
47
- >(
48
- promises: Array<T>
49
- ): Promise<Array<T extends () => Promise<infer R> ? R : never>> {
50
- const result = await promises.reduce(async (prev, task) => {
51
- const previousResults = await prev;
47
+
48
+ export async function runSequentiallyWithoutFailure<R>(
49
+ promises: Array<() => Promise<R>>
50
+ ): Promise<Result<R, unknown>[]> {
51
+ return promises.reduce(async (prevPromise, task) => {
52
+ const previousResults = await prevPromise;
52
53
  try {
53
54
  const taskResult = await task();
54
-
55
- return [...previousResults, taskResult];
55
+ return [...previousResults, new Ok(taskResult)];
56
56
  } catch (error) {
57
- return [...previousResults, error];
57
+ return [...previousResults, new Err(error)];
58
58
  }
59
- }, Promise.resolve([]) as Promise<any>);
60
- return result;
59
+ }, Promise.resolve<Result<R, unknown>[]>([]));
61
60
  }
62
61
 
63
62
  export function isConnectResultEvm(
@@ -6,6 +6,7 @@ import type { VersionedProviders } from '@rango-dev/wallets-core/utils';
6
6
 
7
7
  import { type WalletInfo } from '@rango-dev/wallets-shared';
8
8
  import { useEffect, useRef, useState } from 'react';
9
+ import { Ok, Result } from 'ts-results';
9
10
 
10
11
  import {
11
12
  type ConnectResult,
@@ -16,15 +17,15 @@ import {
16
17
  import { useAutoConnect } from '../legacy/useAutoConnect.js';
17
18
 
18
19
  import { autoConnect } from './autoConnect.js';
19
- import { fromAccountIdToLegacyAddressFormat } from './helpers.js';
20
20
  import {
21
- LastConnectedWalletsFromStorage,
22
- type NamespaceInput,
23
- } from './lastConnectedWallets.js';
21
+ fromAccountIdToLegacyAddressFormat,
22
+ runSequentiallyWithoutFailure,
23
+ } from './helpers.js';
24
+ import { LastConnectedWalletsFromStorage } from './lastConnectedWallets.js';
24
25
  import { useHubRefs } from './useHubRefs.js';
25
26
  import {
26
- checkHubStateAndTriggerEvents,
27
27
  getLegacyProvider,
28
+ mapHubEventsToLegacy,
28
29
  transformHubResultToLegacyResult,
29
30
  tryConvertNamespaceNetworkToChainInfo,
30
31
  } from './utils.js';
@@ -85,19 +86,24 @@ export function useHubAdapter(params: UseAdapterParams): ProviderContext {
85
86
  */
86
87
  document.addEventListener('readystatechange', initHubWhenPageIsReady);
87
88
 
88
- getStore().subscribe((curr, prev) => {
89
- if (dataRef.current.onUpdateState) {
90
- checkHubStateAndTriggerEvents(
91
- getHub(),
92
- curr,
93
- prev,
94
- dataRef.current.onUpdateState,
95
- dataRef.current.allVersionedProviders,
96
- dataRef.current.allBlockChains
97
- );
98
- }
99
- rerender((currentRender) => currentRender + 1);
100
- });
89
+ getStore()
90
+ .subscribe((event) => {
91
+ if (dataRef.current.onUpdateState) {
92
+ try {
93
+ mapHubEventsToLegacy(
94
+ getHub(),
95
+ event,
96
+ dataRef.current.onUpdateState,
97
+ dataRef.current.allVersionedProviders,
98
+ dataRef.current.allBlockChains
99
+ );
100
+ } catch (e) {
101
+ console.error(e);
102
+ }
103
+ }
104
+ rerender((currentRender) => currentRender + 1);
105
+ })
106
+ .flushEvents();
101
107
  }, []);
102
108
 
103
109
  useAutoConnect({
@@ -166,12 +172,9 @@ export function useHubAdapter(params: UseAdapterParams): ProviderContext {
166
172
  targetNamespaces.push([namespace, result]);
167
173
  });
168
174
 
169
- // Keeping only namespaces that connected successfully, then we'll store them on storage for auto connect functionality.
170
- const successfulyConnectedNamespaces: NamespaceInput[] = [];
171
-
172
175
  // Try to run `connect` on matched namespaces
173
176
  const connectResultFromTargetNamespaces = targetNamespaces.map(
174
- async ([namespaceInput, namespace]) => {
177
+ ([namespaceInput, namespace]) => {
175
178
  const network = tryConvertNamespaceNetworkToChainInfo(
176
179
  namespaceInput,
177
180
  params.allBlockChains || []
@@ -182,41 +185,67 @@ export function useHubAdapter(params: UseAdapterParams): ProviderContext {
182
185
  * our assumption here is all the `connect` hasn't chain or if they have, they will accept it in first argument.
183
186
  * By this assumption, always passing a chain should be problematic since it will be ignored if the namespace's `connect` hasn't chain.
184
187
  */
185
- const result = namespace.connect(network);
186
- return result
187
- .then<ConnectResult>(transformHubResultToLegacyResult)
188
- .then((res) => {
189
- successfulyConnectedNamespaces.push({
190
- namespace: namespaceInput.namespace,
191
- network: namespaceInput.network,
188
+ return async () =>
189
+ namespace
190
+ .connect(network)
191
+ .then<ConnectResult>(transformHubResultToLegacyResult)
192
+ .then((connectResult) => {
193
+ return {
194
+ response: connectResult,
195
+ input: {
196
+ namespace: namespaceInput.namespace,
197
+ network: namespaceInput.network,
198
+ },
199
+ };
192
200
  });
193
- return res;
194
- });
195
201
  }
196
202
  );
197
203
 
204
+ /*
205
+ * We need to connect to namespace one after another, sending multiple requests at the same time may be failed.
206
+ * e.g. when wallet popup opens and asking for the password from the user, it should be resolved first, then other request will be resolved.
207
+ */
208
+ const connectResultWithLegacyFormat = await runSequentiallyWithoutFailure(
209
+ connectResultFromTargetNamespaces
210
+ );
211
+
212
+ // Keeping only namespaces that connected successfully, then we'll store them on storage for auto connect functionality.
213
+ const successfullyConnectedNamespaces = connectResultWithLegacyFormat
214
+ .filter(<T, E>(result: Result<T, E>): result is Ok<T> => result.ok)
215
+ .map((result) => {
216
+ return {
217
+ namespace: result.val.input.namespace,
218
+ network: result.val.input.network,
219
+ };
220
+ });
221
+
198
222
  // If Provider has support for auto connect, we will add the wallet to storage.
199
223
  const legacyProvider = getLegacyProvider(
200
224
  params.allVersionedProviders,
201
225
  type
202
226
  );
203
227
 
204
- if (legacyProvider.canEagerConnect) {
205
- void Promise.allSettled(connectResultFromTargetNamespaces).then(() => {
206
- if (successfulyConnectedNamespaces.length > 0) {
207
- lastConnectedWalletsFromStorage.addWallet(
208
- type,
209
- successfulyConnectedNamespaces
210
- );
211
- }
212
- });
228
+ if (
229
+ legacyProvider.canEagerConnect &&
230
+ successfullyConnectedNamespaces.length > 0
231
+ ) {
232
+ lastConnectedWalletsFromStorage.addWallet(
233
+ type,
234
+ successfullyConnectedNamespaces
235
+ );
213
236
  }
214
237
 
215
- const connectResultWithLegacyFormat = await Promise.all(
216
- connectResultFromTargetNamespaces
238
+ // Getting rid of `input` from Result
239
+ const connectResults = connectResultWithLegacyFormat.map((result) =>
240
+ result.andThen((okResult) => new Ok(okResult.response))
217
241
  );
218
242
 
219
- return connectResultWithLegacyFormat;
243
+ const allResult = Result.all(...connectResults);
244
+ if (allResult.err) {
245
+ throw allResult.val;
246
+ }
247
+
248
+ return allResult.unwrap();
220
249
  },
221
250
  async disconnect(type) {
222
251
  const wallet = getHub().get(type);
@@ -235,7 +264,7 @@ export function useHubAdapter(params: UseAdapterParams): ProviderContext {
235
264
  }
236
265
  },
237
266
  async disconnectAll() {
238
- const disconnectPromises: Promise<any>[] = Array.from(
267
+ const disconnectPromises: Promise<void>[] = Array.from(
239
268
  getHub().getAll().values()
240
269
  ).map(async (provider) => this.disconnect(provider.id));
241
270
 
@@ -266,7 +295,7 @@ export function useHubAdapter(params: UseAdapterParams): ProviderContext {
266
295
  Object.keys(info.extensions).forEach((k) => {
267
296
  const key = k as ExtensionLink;
268
297
 
269
- if (info.extensions[key] === 'homepage') {
298
+ if (key === 'homepage') {
270
299
  installLink.DEFAULT = info.extensions[key] || '';
271
300
  }
272
301