@rango-dev/wallets-react 0.42.0 → 0.42.1-next.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.
- package/CHANGELOG.md +10 -0
- package/dist/helpers/index.js +1 -1
- package/dist/helpers/index.js.map +1 -1
- package/dist/hub/chainRegisteryConvertors.d.ts +11 -0
- package/dist/hub/chainRegisteryConvertors.d.ts.map +1 -0
- package/dist/hub/useHubAdapter.d.ts.map +1 -1
- package/dist/index.js +1 -1
- package/dist/index.js.map +4 -4
- package/dist/legacy/types.d.ts +1 -1
- package/dist/legacy/types.d.ts.map +1 -1
- package/dist/legacy/useLegacyProviders.d.ts.map +1 -1
- package/dist/wallets-react.build.json +1 -1
- package/package.json +4 -3
- package/src/hub/chainRegisteryConvertors.ts +184 -0
- package/src/hub/useHubAdapter.ts +41 -2
- package/src/legacy/types.ts +4 -1
- package/src/legacy/useLegacyProviders.ts +5 -2
package/dist/legacy/types.d.ts
CHANGED
|
@@ -39,7 +39,7 @@ export type ProviderContext = {
|
|
|
39
39
|
providers(): Providers;
|
|
40
40
|
getSigners(type: WalletType): Promise<SignerFactory>;
|
|
41
41
|
getWalletInfo(type: WalletType): ExtendedWalletInfo;
|
|
42
|
-
suggestAndConnect(type: WalletType,
|
|
42
|
+
suggestAndConnect(type: WalletType, namespace: LegacyNamespaceInputForConnect): Promise<ConnectResult>;
|
|
43
43
|
hubProvider(type: WalletType): Provider;
|
|
44
44
|
};
|
|
45
45
|
export type ProviderProps = PropsWithChildren<{
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"types.d.ts","sourceRoot":"","sources":["../../src/legacy/types.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EACV,QAAQ,EACR,gBAAgB,EAChB,kBAAkB,EACnB,MAAM,yBAAyB,CAAC;AACjC,OAAO,KAAK,EACV,8BAA8B,EAC9B,uBAAuB,EACvB,aAAa,IAAI,OAAO,EACxB,kBAAkB,IAAI,kBAA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,CAAC;CAChC;AAED,MAAM,MAAM,eAAe,GAAG,GAAG,CAC/B,UAAU,EACV;IACE,OAAO,EAAE,aAAa,CAAC;IACvB,MAAM,EAAE,YAAY,CAAC;CACtB,CACF,CAAC;AAEF,MAAM,MAAM,iBAAiB,GAAG;IAAE,MAAM,EAAE,YAAY,CAAA;CAAE,GAAG,aAAa,CAAC"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"useLegacyProviders.d.ts","sourceRoot":"","sources":["../../src/legacy/useLegacyProviders.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AACjE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAuB9E,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,aAAa,EAAE,WAAW,CAAC,GAAG;IACnE,SAAS,EAAE,uBAAuB,EAAE,CAAC;CACtC,CAAC;AAEF,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,mBAAmB,GACzB,eAAe,
|
|
1
|
+
{"version":3,"file":"useLegacyProviders.d.ts","sourceRoot":"","sources":["../../src/legacy/useLegacyProviders.ts"],"names":[],"mappings":"AAAA,OAAO,KAAK,EAAE,eAAe,EAAE,aAAa,EAAE,MAAM,YAAY,CAAC;AACjE,OAAO,KAAK,EAAE,uBAAuB,EAAE,MAAM,gCAAgC,CAAC;AAuB9E,MAAM,MAAM,mBAAmB,GAAG,IAAI,CAAC,aAAa,EAAE,WAAW,CAAC,GAAG;IACnE,SAAS,EAAE,uBAAuB,EAAE,CAAC;CACtC,CAAC;AAEF,wBAAgB,kBAAkB,CAChC,KAAK,EAAE,mBAAmB,GACzB,eAAe,CAqNjB"}
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"inputs":{"src/hub/constants.ts":{"bytes":146,"imports":[],"format":"esm"},"src/hub/lastConnectedWallets.ts":{"bytes":5519,"imports":[{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"src/hub/constants.ts","kind":"import-statement","original":"./constants.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/legacy/helpers.ts":{"bytes":4652,"imports":[{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"src/hub/constants.ts","kind":"import-statement","original":"../hub/constants.js"},{"path":"src/hub/lastConnectedWallets.ts","kind":"import-statement","original":"../hub/lastConnectedWallets.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/legacy/context.ts":{"bytes":960,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"src/legacy/autoConnect.ts":{"bytes":2046,"imports":[{"path":"src/hub/lastConnectedWallets.ts","kind":"import-statement","original":"../hub/lastConnectedWallets.js"},{"path":"src/legacy/mod.ts","kind":"import-statement","original":"./mod.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/legacy/hooks.ts":{"bytes":1545,"imports":[{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"src/legacy/context.ts","kind":"import-statement","original":"./context.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/legacy/utils.ts":{"bytes":230,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/legacy/useAutoConnect.ts":{"bytes":628,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"src/legacy/utils.ts","kind":"import-statement","original":"./utils.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/legacy/useLegacyProviders.ts":{"bytes":7510,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"src/legacy/autoConnect.ts","kind":"import-statement","original":"./autoConnect.js"},{"path":"src/legacy/helpers.ts","kind":"import-statement","original":"./helpers.js"},{"path":"src/legacy/hooks.ts","kind":"import-statement","original":"./hooks.js"},{"path":"src/legacy/useAutoConnect.ts","kind":"import-statement","original":"./useAutoConnect.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/legacy/mod.ts":{"bytes":321,"imports":[{"path":"src/hub/constants.ts","kind":"import-statement","original":"../hub/constants.js"},{"path":"src/legacy/context.ts","kind":"import-statement","original":"./context.js"},{"path":"src/legacy/useLegacyProviders.ts","kind":"import-statement","original":"./useLegacyProviders.js"}],"format":"esm"},"src/hub/helpers.ts":{"bytes":5429,"imports":[{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/namespaces/cosmos","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/namespaces/tron","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/namespaces/utxo","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/utils","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"ts-results","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/utils.ts":{"bytes":11267,"imports":[{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/utils","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/utils","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"src/legacy/mod.ts","kind":"import-statement","original":"../legacy/mod.js"},{"path":"src/hub/helpers.ts","kind":"import-statement","original":"./helpers.js"},{"path":"src/hub/lastConnectedWallets.ts","kind":"import-statement","original":"./lastConnectedWallets.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/autoConnect.ts":{"bytes":9242,"imports":[{"path":"@rango-dev/wallets-core","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"ts-results","kind":"import-statement","external":true},{"path":"src/legacy/mod.ts","kind":"import-statement","original":"../legacy/mod.js"},{"path":"src/hub/helpers.ts","kind":"import-statement","original":"./helpers.js"},{"path":"src/hub/lastConnectedWallets.ts","kind":"import-statement","original":"./lastConnectedWallets.js"},{"path":"src/hub/utils.ts","kind":"import-statement","original":"./utils.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/useHubRefs.ts":{"bytes":1271,"imports":[{"path":"@rango-dev/wallets-core","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"src/hub/utils.ts","kind":"import-statement","original":"./utils.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/useHubAdapter.ts":{"bytes":17100,"imports":[{"path":"@rango-dev/wallets-core/namespaces/evm","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"ts-results","kind":"import-statement","external":true},{"path":"src/legacy/mod.ts","kind":"import-statement","original":"../legacy/mod.js"},{"path":"src/legacy/useAutoConnect.ts","kind":"import-statement","original":"../legacy/useAutoConnect.js"},{"path":"src/hub/autoConnect.ts","kind":"import-statement","original":"./autoConnect.js"},{"path":"src/hub/helpers.ts","kind":"import-statement","original":"./helpers.js"},{"path":"src/hub/lastConnectedWallets.ts","kind":"import-statement","original":"./lastConnectedWallets.js"},{"path":"src/hub/useHubRefs.ts","kind":"import-statement","original":"./useHubRefs.js"},{"path":"src/hub/utils.ts","kind":"import-statement","original":"./utils.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/mod.ts":{"bytes":162,"imports":[{"path":"src/hub/utils.ts","kind":"import-statement","original":"./utils.js"},{"path":"src/hub/useHubAdapter.ts","kind":"import-statement","original":"./useHubAdapter.js"}],"format":"esm"},"src/useProviders.ts":{"bytes":3661,"imports":[{"path":"src/hub/mod.ts","kind":"import-statement","original":"./hub/mod.js"},{"path":"src/legacy/mod.ts","kind":"import-statement","original":"./legacy/mod.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/provider.tsx":{"bytes":405,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"src/legacy/context.ts","kind":"import-statement","original":"./legacy/context.js"},{"path":"src/useProviders.ts","kind":"import-statement","original":"./useProviders.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/legacy/types.ts":{"bytes":5763,"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":115694},"dist/index.js":{"imports":[{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/utils","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/utils","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/namespaces/cosmos","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/namespaces/tron","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/namespaces/utxo","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/utils","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"ts-results","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/namespaces/evm","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"ts-results","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"ts-results","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true}],"exports":["Events","Provider","availableWallets","checkWalletProviders","choose","clearPersistance","connectedWallets","defaultWalletState","isAsync","makeEventHandler","needsCheckInstallation","stateReducer","tryPersistWallet","tryRemoveWalletFromPersistance","useWallets"],"entryPoint":"src/index.ts","inputs":{"src/legacy/helpers.ts":{"bytesInOutput":1407},"src/hub/constants.ts":{"bytesInOutput":65},"src/hub/lastConnectedWallets.ts":{"bytesInOutput":1311},"src/index.ts":{"bytesInOutput":0},"src/provider.tsx":{"bytesInOutput":133},"src/legacy/context.ts":{"bytesInOutput":465},"src/hub/utils.ts":{"bytesInOutput":3150},"src/legacy/mod.ts":{"bytesInOutput":0},"src/legacy/useLegacyProviders.ts":{"bytesInOutput":2214},"src/legacy/autoConnect.ts":{"bytesInOutput":395},"src/legacy/hooks.ts":{"bytesInOutput":460},"src/legacy/useAutoConnect.ts":{"bytesInOutput":197},"src/legacy/utils.ts":{"bytesInOutput":94},"src/hub/helpers.ts":{"bytesInOutput":2045},"src/hub/mod.ts":{"bytesInOutput":0},"src/hub/useHubAdapter.ts":{"bytesInOutput":6023},"src/hub/autoConnect.ts":{"bytesInOutput":2524},"src/hub/useHubRefs.ts":{"bytesInOutput":497},"src/useProviders.ts":{"bytesInOutput":1026},"src/legacy/types.ts":{"bytesInOutput":63}},"bytes":22511},"dist/helpers/index.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":73273},"dist/helpers/index.js":{"imports":[{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/utils","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/utils","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/namespaces/cosmos","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/namespaces/tron","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/namespaces/utxo","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/utils","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"ts-results","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/namespaces/evm","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"ts-results","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"ts-results","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"exports":["getAllLegacyProviders"],"entryPoint":"src/helpers/index.ts","inputs":{"src/hub/utils.ts":{"bytesInOutput":421},"src/hub/constants.ts":{"bytesInOutput":65},"src/legacy/mod.ts":{"bytesInOutput":0},"src/legacy/context.ts":{"bytesInOutput":461},"src/legacy/useLegacyProviders.ts":{"bytesInOutput":52},"src/hub/lastConnectedWallets.ts":{"bytesInOutput":1311},"src/legacy/helpers.ts":{"bytesInOutput":59},"src/legacy/hooks.ts":{"bytesInOutput":109},"src/legacy/useAutoConnect.ts":{"bytesInOutput":48},"src/hub/helpers.ts":{"bytesInOutput":482},"src/hub/mod.ts":{"bytesInOutput":0},"src/hub/useHubAdapter.ts":{"bytesInOutput":256},"src/hub/autoConnect.ts":{"bytesInOutput":225},"src/hub/useHubRefs.ts":{"bytesInOutput":97},"src/helpers/index.ts":{"bytesInOutput":0}},"bytes":3735}}}
|
|
1
|
+
{"inputs":{"src/hub/constants.ts":{"bytes":146,"imports":[],"format":"esm"},"src/hub/lastConnectedWallets.ts":{"bytes":5519,"imports":[{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"src/hub/constants.ts","kind":"import-statement","original":"./constants.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/legacy/helpers.ts":{"bytes":4652,"imports":[{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"src/hub/constants.ts","kind":"import-statement","original":"../hub/constants.js"},{"path":"src/hub/lastConnectedWallets.ts","kind":"import-statement","original":"../hub/lastConnectedWallets.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/legacy/context.ts":{"bytes":960,"imports":[{"path":"react","kind":"import-statement","external":true}],"format":"esm"},"src/legacy/autoConnect.ts":{"bytes":2046,"imports":[{"path":"src/hub/lastConnectedWallets.ts","kind":"import-statement","original":"../hub/lastConnectedWallets.js"},{"path":"src/legacy/mod.ts","kind":"import-statement","original":"./mod.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/legacy/hooks.ts":{"bytes":1545,"imports":[{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"src/legacy/context.ts","kind":"import-statement","original":"./context.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/legacy/utils.ts":{"bytes":230,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/legacy/useAutoConnect.ts":{"bytes":628,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"src/legacy/utils.ts","kind":"import-statement","original":"./utils.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/legacy/useLegacyProviders.ts":{"bytes":7639,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"src/legacy/autoConnect.ts","kind":"import-statement","original":"./autoConnect.js"},{"path":"src/legacy/helpers.ts","kind":"import-statement","original":"./helpers.js"},{"path":"src/legacy/hooks.ts","kind":"import-statement","original":"./hooks.js"},{"path":"src/legacy/useAutoConnect.ts","kind":"import-statement","original":"./useAutoConnect.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/legacy/mod.ts":{"bytes":321,"imports":[{"path":"src/hub/constants.ts","kind":"import-statement","original":"../hub/constants.js"},{"path":"src/legacy/context.ts","kind":"import-statement","original":"./context.js"},{"path":"src/legacy/useLegacyProviders.ts","kind":"import-statement","original":"./useLegacyProviders.js"}],"format":"esm"},"src/hub/helpers.ts":{"bytes":5429,"imports":[{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/namespaces/cosmos","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/namespaces/tron","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/namespaces/utxo","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/utils","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"ts-results","kind":"import-statement","external":true},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/utils.ts":{"bytes":11267,"imports":[{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/utils","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/utils","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"src/legacy/mod.ts","kind":"import-statement","original":"../legacy/mod.js"},{"path":"src/hub/helpers.ts","kind":"import-statement","original":"./helpers.js"},{"path":"src/hub/lastConnectedWallets.ts","kind":"import-statement","original":"./lastConnectedWallets.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/autoConnect.ts":{"bytes":9242,"imports":[{"path":"@rango-dev/wallets-core","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"ts-results","kind":"import-statement","external":true},{"path":"src/legacy/mod.ts","kind":"import-statement","original":"../legacy/mod.js"},{"path":"src/hub/helpers.ts","kind":"import-statement","original":"./helpers.js"},{"path":"src/hub/lastConnectedWallets.ts","kind":"import-statement","original":"./lastConnectedWallets.js"},{"path":"src/hub/utils.ts","kind":"import-statement","original":"./utils.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/chainRegisteryConvertors.ts":{"bytes":4950,"imports":[{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/useHubRefs.ts":{"bytes":1271,"imports":[{"path":"@rango-dev/wallets-core","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"src/hub/utils.ts","kind":"import-statement","original":"./utils.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/useHubAdapter.ts":{"bytes":18694,"imports":[{"path":"@rango-dev/wallets-core/namespaces/evm","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"ts-results","kind":"import-statement","external":true},{"path":"src/legacy/mod.ts","kind":"import-statement","original":"../legacy/mod.js"},{"path":"src/legacy/useAutoConnect.ts","kind":"import-statement","original":"../legacy/useAutoConnect.js"},{"path":"src/hub/autoConnect.ts","kind":"import-statement","original":"./autoConnect.js"},{"path":"src/hub/chainRegisteryConvertors.ts","kind":"import-statement","original":"./chainRegisteryConvertors.js"},{"path":"src/hub/helpers.ts","kind":"import-statement","original":"./helpers.js"},{"path":"src/hub/lastConnectedWallets.ts","kind":"import-statement","original":"./lastConnectedWallets.js"},{"path":"src/hub/useHubRefs.ts","kind":"import-statement","original":"./useHubRefs.js"},{"path":"src/hub/utils.ts","kind":"import-statement","original":"./utils.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/hub/mod.ts":{"bytes":162,"imports":[{"path":"src/hub/utils.ts","kind":"import-statement","original":"./utils.js"},{"path":"src/hub/useHubAdapter.ts","kind":"import-statement","original":"./useHubAdapter.js"}],"format":"esm"},"src/useProviders.ts":{"bytes":3661,"imports":[{"path":"src/hub/mod.ts","kind":"import-statement","original":"./hub/mod.js"},{"path":"src/legacy/mod.ts","kind":"import-statement","original":"./legacy/mod.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/provider.tsx":{"bytes":405,"imports":[{"path":"react","kind":"import-statement","external":true},{"path":"src/legacy/context.ts","kind":"import-statement","original":"./legacy/context.js"},{"path":"src/useProviders.ts","kind":"import-statement","original":"./useProviders.js"},{"path":"<runtime>","kind":"import-statement","external":true}],"format":"esm"},"src/legacy/types.ts":{"bytes":5800,"imports":[{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true}],"format":"esm"},"src/index.ts":{"bytes":173,"imports":[{"path":"src/legacy/helpers.ts","kind":"import-statement","original":"./legacy/helpers.js"},{"path":"src/provider.tsx","kind":"import-statement","original":"./provider.js"},{"path":"src/legacy/hooks.ts","kind":"import-statement","original":"./legacy/hooks.js"},{"path":"src/legacy/types.ts","kind":"import-statement","original":"./legacy/types.js"}],"format":"esm"},"src/helpers/index.ts":{"bytes":55,"imports":[{"path":"src/hub/mod.ts","kind":"import-statement","original":"../hub/mod.js"}],"format":"esm"}},"outputs":{"dist/index.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":126305},"dist/index.js":{"imports":[{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/utils","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/utils","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/namespaces/cosmos","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/namespaces/tron","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/namespaces/utxo","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/utils","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"ts-results","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/namespaces/evm","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"ts-results","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"ts-results","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true}],"exports":["Events","Provider","availableWallets","checkWalletProviders","choose","clearPersistance","connectedWallets","defaultWalletState","isAsync","makeEventHandler","needsCheckInstallation","stateReducer","tryPersistWallet","tryRemoveWalletFromPersistance","useWallets"],"entryPoint":"src/index.ts","inputs":{"src/legacy/helpers.ts":{"bytesInOutput":1407},"src/hub/constants.ts":{"bytesInOutput":65},"src/hub/lastConnectedWallets.ts":{"bytesInOutput":1311},"src/index.ts":{"bytesInOutput":0},"src/provider.tsx":{"bytesInOutput":133},"src/legacy/context.ts":{"bytesInOutput":465},"src/hub/utils.ts":{"bytesInOutput":3150},"src/legacy/mod.ts":{"bytesInOutput":0},"src/legacy/useLegacyProviders.ts":{"bytesInOutput":2312},"src/legacy/autoConnect.ts":{"bytesInOutput":395},"src/legacy/hooks.ts":{"bytesInOutput":460},"src/legacy/useAutoConnect.ts":{"bytesInOutput":197},"src/legacy/utils.ts":{"bytesInOutput":94},"src/hub/helpers.ts":{"bytesInOutput":2045},"src/hub/mod.ts":{"bytesInOutput":0},"src/hub/useHubAdapter.ts":{"bytesInOutput":6791},"src/hub/autoConnect.ts":{"bytesInOutput":2524},"src/hub/chainRegisteryConvertors.ts":{"bytesInOutput":2669},"src/hub/useHubRefs.ts":{"bytesInOutput":497},"src/useProviders.ts":{"bytesInOutput":1026},"src/legacy/types.ts":{"bytesInOutput":63}},"bytes":26046},"dist/helpers/index.js.map":{"imports":[],"exports":[],"inputs":{},"bytes":75038},"dist/helpers/index.js":{"imports":[{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/utils","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/utils","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/namespaces/cosmos","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/namespaces/tron","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/namespaces/utxo","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/utils","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"ts-results","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/namespaces/evm","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-shared","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true},{"path":"ts-results","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core/legacy","kind":"import-statement","external":true},{"path":"rango-types","kind":"import-statement","external":true},{"path":"ts-results","kind":"import-statement","external":true},{"path":"@rango-dev/wallets-core","kind":"import-statement","external":true},{"path":"react","kind":"import-statement","external":true}],"exports":["getAllLegacyProviders"],"entryPoint":"src/helpers/index.ts","inputs":{"src/hub/utils.ts":{"bytesInOutput":421},"src/hub/constants.ts":{"bytesInOutput":65},"src/legacy/mod.ts":{"bytesInOutput":0},"src/legacy/context.ts":{"bytesInOutput":461},"src/legacy/useLegacyProviders.ts":{"bytesInOutput":52},"src/hub/lastConnectedWallets.ts":{"bytesInOutput":1311},"src/legacy/helpers.ts":{"bytesInOutput":59},"src/legacy/hooks.ts":{"bytesInOutput":109},"src/legacy/useAutoConnect.ts":{"bytesInOutput":48},"src/hub/helpers.ts":{"bytesInOutput":482},"src/hub/mod.ts":{"bytesInOutput":0},"src/hub/useHubAdapter.ts":{"bytesInOutput":256},"src/hub/autoConnect.ts":{"bytesInOutput":225},"src/hub/useHubRefs.ts":{"bytesInOutput":97},"src/helpers/index.ts":{"bytesInOutput":0}},"bytes":3735}}}
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@rango-dev/wallets-react",
|
|
3
|
-
"version": "0.42.0",
|
|
3
|
+
"version": "0.42.1-next.0",
|
|
4
4
|
"license": "MIT",
|
|
5
5
|
"type": "module",
|
|
6
6
|
"source": "./src/index.ts",
|
|
@@ -35,12 +35,13 @@
|
|
|
35
35
|
"react-dom": "^17.0.0 || ^18.0.0"
|
|
36
36
|
},
|
|
37
37
|
"dependencies": {
|
|
38
|
-
"@rango-dev/wallets-core": "^0.55.0",
|
|
39
|
-
"@rango-dev/wallets-shared": "^0.56.0",
|
|
38
|
+
"@rango-dev/wallets-core": "^0.55.1-next.0",
|
|
39
|
+
"@rango-dev/wallets-shared": "^0.56.1-next.0",
|
|
40
40
|
"rango-types": "^0.1.89",
|
|
41
41
|
"ts-results": "^3.3.0"
|
|
42
42
|
},
|
|
43
43
|
"devDependencies": {
|
|
44
|
+
"@chain-registry/types": "2.0.110",
|
|
44
45
|
"@types/react": "^18.0.25",
|
|
45
46
|
"@types/react-dom": "^18.0.25"
|
|
46
47
|
},
|
|
@@ -0,0 +1,184 @@
|
|
|
1
|
+
import type {
|
|
2
|
+
Asset,
|
|
3
|
+
Explorer,
|
|
4
|
+
FeeToken,
|
|
5
|
+
StakingToken,
|
|
6
|
+
} from '@chain-registry/types';
|
|
7
|
+
import type {
|
|
8
|
+
CosmosAssetList,
|
|
9
|
+
CosmosChain,
|
|
10
|
+
} from '@rango-dev/wallets-core/namespaces/cosmos';
|
|
11
|
+
import type { CosmosBlockchainMeta, CosmosChainInfo } from 'rango-types';
|
|
12
|
+
|
|
13
|
+
export interface ConversionResult {
|
|
14
|
+
chain: CosmosChain;
|
|
15
|
+
assetList: CosmosAssetList;
|
|
16
|
+
}
|
|
17
|
+
|
|
18
|
+
/**
|
|
19
|
+
* Converts CosmosBlockchainMeta to Chain and AssetList formats
|
|
20
|
+
*/
|
|
21
|
+
export function convertCosmosMetaToChainRegistry(
|
|
22
|
+
meta: CosmosBlockchainMeta
|
|
23
|
+
): ConversionResult {
|
|
24
|
+
const info = meta.info;
|
|
25
|
+
|
|
26
|
+
if (!info) {
|
|
27
|
+
throw new Error('CosmosChainInfo is required for conversion');
|
|
28
|
+
}
|
|
29
|
+
|
|
30
|
+
const chain = convertToChain(meta, info);
|
|
31
|
+
const assetList = convertToAssetList(info);
|
|
32
|
+
|
|
33
|
+
return { chain, assetList };
|
|
34
|
+
}
|
|
35
|
+
|
|
36
|
+
function convertToChain(
|
|
37
|
+
meta: CosmosBlockchainMeta,
|
|
38
|
+
info: CosmosChainInfo
|
|
39
|
+
): CosmosChain {
|
|
40
|
+
const chain: CosmosChain = {
|
|
41
|
+
chainName: info.chainName,
|
|
42
|
+
chainType: 'cosmos',
|
|
43
|
+
chainId: meta.chainId || undefined,
|
|
44
|
+
prettyName: meta.displayName,
|
|
45
|
+
status: meta.enabled ? 'live' : 'killed',
|
|
46
|
+
networkType: 'mainnet',
|
|
47
|
+
bech32Prefix: info.bech32Config.bech32PrefixAccAddr,
|
|
48
|
+
bech32Config: {
|
|
49
|
+
bech32PrefixAccAddr: info.bech32Config.bech32PrefixAccAddr,
|
|
50
|
+
bech32PrefixAccPub: info.bech32Config.bech32PrefixAccPub,
|
|
51
|
+
bech32PrefixValAddr: info.bech32Config.bech32PrefixValAddr,
|
|
52
|
+
bech32PrefixValPub: info.bech32Config.bech32PrefixValPub,
|
|
53
|
+
bech32PrefixConsAddr: info.bech32Config.bech32PrefixConsAddr,
|
|
54
|
+
bech32PrefixConsPub: info.bech32Config.bech32PrefixConsPub,
|
|
55
|
+
},
|
|
56
|
+
slip44: info.bip44.coinType,
|
|
57
|
+
fees: {
|
|
58
|
+
feeTokens: convertFeeTokens(info),
|
|
59
|
+
},
|
|
60
|
+
staking: {
|
|
61
|
+
stakingTokens: convertStakingTokens(info),
|
|
62
|
+
},
|
|
63
|
+
apis: {
|
|
64
|
+
rpc: info.rpc ? [{ address: info.rpc }] : undefined,
|
|
65
|
+
rest: info.rest ? [{ address: info.rest }] : undefined,
|
|
66
|
+
},
|
|
67
|
+
explorers: convertExplorers(info),
|
|
68
|
+
logoURIs: meta.logo ? { png: meta.logo } : undefined,
|
|
69
|
+
keywords: info.experimental ? ['experimental'] : undefined,
|
|
70
|
+
};
|
|
71
|
+
|
|
72
|
+
return chain;
|
|
73
|
+
}
|
|
74
|
+
|
|
75
|
+
function convertFeeTokens(info: CosmosChainInfo): FeeToken[] {
|
|
76
|
+
return info.feeCurrencies.map((currency) => {
|
|
77
|
+
const feeToken: FeeToken = {
|
|
78
|
+
denom: currency.coinMinimalDenom,
|
|
79
|
+
};
|
|
80
|
+
|
|
81
|
+
if (info.gasPriceStep) {
|
|
82
|
+
feeToken.lowGasPrice = info.gasPriceStep.low;
|
|
83
|
+
feeToken.averageGasPrice = info.gasPriceStep.average;
|
|
84
|
+
feeToken.highGasPrice = info.gasPriceStep.high;
|
|
85
|
+
}
|
|
86
|
+
|
|
87
|
+
return feeToken;
|
|
88
|
+
});
|
|
89
|
+
}
|
|
90
|
+
|
|
91
|
+
function convertStakingTokens(info: CosmosChainInfo): StakingToken[] {
|
|
92
|
+
return [
|
|
93
|
+
{
|
|
94
|
+
denom: info.stakeCurrency.coinMinimalDenom,
|
|
95
|
+
},
|
|
96
|
+
];
|
|
97
|
+
}
|
|
98
|
+
|
|
99
|
+
function convertExplorers(info: CosmosChainInfo): Explorer[] | undefined {
|
|
100
|
+
const explorers: Explorer[] = [];
|
|
101
|
+
|
|
102
|
+
if (info.explorerUrlToTx) {
|
|
103
|
+
const baseUrl = info.explorerUrlToTx.split('/tx/')[0];
|
|
104
|
+
explorers.push({
|
|
105
|
+
url: baseUrl,
|
|
106
|
+
txPage: info.explorerUrlToTx.replace(
|
|
107
|
+
/\{txHash\}|\$\{txHash\}/g,
|
|
108
|
+
'${txHash}'
|
|
109
|
+
),
|
|
110
|
+
});
|
|
111
|
+
}
|
|
112
|
+
|
|
113
|
+
if (info.blockExplorerUrls && info.blockExplorerUrls.length > 0) {
|
|
114
|
+
info.blockExplorerUrls.forEach((url) => {
|
|
115
|
+
if (!explorers.some((e) => e.url === url)) {
|
|
116
|
+
explorers.push({ url });
|
|
117
|
+
}
|
|
118
|
+
});
|
|
119
|
+
}
|
|
120
|
+
|
|
121
|
+
return explorers.length > 0 ? explorers : undefined;
|
|
122
|
+
}
|
|
123
|
+
|
|
124
|
+
function convertToAssetList(info: CosmosChainInfo): CosmosAssetList {
|
|
125
|
+
const assets: Asset[] = [];
|
|
126
|
+
|
|
127
|
+
// Add staking currency
|
|
128
|
+
assets.push({
|
|
129
|
+
denomUnits: [
|
|
130
|
+
{
|
|
131
|
+
denom: info.stakeCurrency.coinMinimalDenom,
|
|
132
|
+
exponent: 0,
|
|
133
|
+
},
|
|
134
|
+
{
|
|
135
|
+
denom: info.stakeCurrency.coinDenom.toLowerCase(),
|
|
136
|
+
exponent: info.stakeCurrency.coinDecimals,
|
|
137
|
+
},
|
|
138
|
+
],
|
|
139
|
+
base: info.stakeCurrency.coinMinimalDenom,
|
|
140
|
+
name: info.stakeCurrency.coinDenom,
|
|
141
|
+
display: info.stakeCurrency.coinDenom.toLowerCase(),
|
|
142
|
+
symbol: info.stakeCurrency.coinDenom,
|
|
143
|
+
typeAsset: 'sdk.coin',
|
|
144
|
+
logoURIs: info.stakeCurrency.coinImageUrl
|
|
145
|
+
? { png: info.stakeCurrency.coinImageUrl }
|
|
146
|
+
: undefined,
|
|
147
|
+
coingeckoId: info.stakeCurrency.coinGeckoId || undefined,
|
|
148
|
+
});
|
|
149
|
+
|
|
150
|
+
// Add other currencies
|
|
151
|
+
info.currencies.forEach((currency) => {
|
|
152
|
+
// Skip if already added as staking currency
|
|
153
|
+
if (currency.coinMinimalDenom === info.stakeCurrency.coinMinimalDenom) {
|
|
154
|
+
return;
|
|
155
|
+
}
|
|
156
|
+
|
|
157
|
+
assets.push({
|
|
158
|
+
denomUnits: [
|
|
159
|
+
{
|
|
160
|
+
denom: currency.coinMinimalDenom,
|
|
161
|
+
exponent: 0,
|
|
162
|
+
},
|
|
163
|
+
{
|
|
164
|
+
denom: currency.coinDenom.toLowerCase(),
|
|
165
|
+
exponent: currency.coinDecimals,
|
|
166
|
+
},
|
|
167
|
+
],
|
|
168
|
+
base: currency.coinMinimalDenom,
|
|
169
|
+
name: currency.coinDenom,
|
|
170
|
+
display: currency.coinDenom.toLowerCase(),
|
|
171
|
+
symbol: currency.coinDenom,
|
|
172
|
+
typeAsset: 'sdk.coin',
|
|
173
|
+
logoURIs: currency.coinImageUrl
|
|
174
|
+
? { png: currency.coinImageUrl }
|
|
175
|
+
: undefined,
|
|
176
|
+
coingeckoId: currency.coinGeckoId || undefined,
|
|
177
|
+
});
|
|
178
|
+
});
|
|
179
|
+
|
|
180
|
+
return {
|
|
181
|
+
chainName: info.chainName,
|
|
182
|
+
assets,
|
|
183
|
+
};
|
|
184
|
+
}
|
package/src/hub/useHubAdapter.ts
CHANGED
|
@@ -22,6 +22,7 @@ import {
|
|
|
22
22
|
import { useAutoConnect } from '../legacy/useAutoConnect.js';
|
|
23
23
|
|
|
24
24
|
import { autoConnect } from './autoConnect.js';
|
|
25
|
+
import { convertCosmosMetaToChainRegistry } from './chainRegisteryConvertors.js';
|
|
25
26
|
import { createQueue, fromAccountIdToLegacyAddressFormat } from './helpers.js';
|
|
26
27
|
import { LastConnectedWalletsFromStorage } from './lastConnectedWallets.js';
|
|
27
28
|
import { useHubRefs } from './useHubRefs.js';
|
|
@@ -502,8 +503,46 @@ export function useHubAdapter(params: UseAdapterParams): ProviderContext {
|
|
|
502
503
|
};
|
|
503
504
|
return coreState;
|
|
504
505
|
},
|
|
505
|
-
suggestAndConnect(
|
|
506
|
-
|
|
506
|
+
async suggestAndConnect(type, namespace): Promise<ConnectResult> {
|
|
507
|
+
const provider = getHub().get(type);
|
|
508
|
+
|
|
509
|
+
if (!provider) {
|
|
510
|
+
throw new Error(
|
|
511
|
+
`You should add ${type} to provider first then call 'suggestAndConnect'.`
|
|
512
|
+
);
|
|
513
|
+
}
|
|
514
|
+
const proxiedNamespace = provider.findByNamespace(namespace.namespace);
|
|
515
|
+
if (!proxiedNamespace) {
|
|
516
|
+
throw new Error(
|
|
517
|
+
`We couldn't find any matched namespace on your request provider. (requested namespace: ${namespace.namespace})`
|
|
518
|
+
);
|
|
519
|
+
}
|
|
520
|
+
if (!('suggest' in proxiedNamespace)) {
|
|
521
|
+
throw new Error('Suggest is not implemented on the provider');
|
|
522
|
+
}
|
|
523
|
+
if (!namespace.network) {
|
|
524
|
+
throw new Error('You should pass network to the suggest and connect');
|
|
525
|
+
}
|
|
526
|
+
if (isCosmosNamespace(proxiedNamespace)) {
|
|
527
|
+
const suggestedChainMeta = cosmosBlockchains(
|
|
528
|
+
params.allBlockChains || []
|
|
529
|
+
)
|
|
530
|
+
?.filter((chain) => chain.info && chain.info.experimental)
|
|
531
|
+
.find((chain) => chain.name === namespace.network);
|
|
532
|
+
if (!suggestedChainMeta) {
|
|
533
|
+
throw new Error(
|
|
534
|
+
`We couldn't find the suggested chain (${namespace.network}) in our metadata.`
|
|
535
|
+
);
|
|
536
|
+
}
|
|
537
|
+
const { assetList, chain } =
|
|
538
|
+
convertCosmosMetaToChainRegistry(suggestedChainMeta);
|
|
539
|
+
await proxiedNamespace.suggest(chain, assetList);
|
|
540
|
+
const [connectResult] = await this.connect(type, [namespace]);
|
|
541
|
+
return connectResult;
|
|
542
|
+
}
|
|
543
|
+
throw new Error(
|
|
544
|
+
`Suggest has not been implemented for given chain: ${namespace.network}`
|
|
545
|
+
);
|
|
507
546
|
},
|
|
508
547
|
hubProvider() {
|
|
509
548
|
throw new Error(
|
package/src/legacy/types.ts
CHANGED
|
@@ -66,7 +66,10 @@ export type ProviderContext = {
|
|
|
66
66
|
providers(): Providers;
|
|
67
67
|
getSigners(type: WalletType): Promise<SignerFactory>;
|
|
68
68
|
getWalletInfo(type: WalletType): ExtendedWalletInfo;
|
|
69
|
-
suggestAndConnect(
|
|
69
|
+
suggestAndConnect(
|
|
70
|
+
type: WalletType,
|
|
71
|
+
namespace: LegacyNamespaceInputForConnect
|
|
72
|
+
): Promise<ConnectResult>;
|
|
70
73
|
hubProvider(type: WalletType): Provider;
|
|
71
74
|
};
|
|
72
75
|
|
|
@@ -111,13 +111,16 @@ export function useLegacyProviders(
|
|
|
111
111
|
return await Promise.allSettled(disconnect_promises);
|
|
112
112
|
},
|
|
113
113
|
|
|
114
|
-
async suggestAndConnect(type,
|
|
114
|
+
async suggestAndConnect(type, namespace) {
|
|
115
115
|
const wallet = wallets.get(type);
|
|
116
116
|
if (!wallet) {
|
|
117
117
|
throw new Error(`You should add ${type} to provider first.`);
|
|
118
118
|
}
|
|
119
119
|
const walletInstance = getWalletInstance(wallet);
|
|
120
|
-
|
|
120
|
+
if (!namespace.network) {
|
|
121
|
+
throw new Error(`You should pass network to the suggestAndConnect`);
|
|
122
|
+
}
|
|
123
|
+
const result = await walletInstance.suggestAndConnect(namespace.network);
|
|
121
124
|
|
|
122
125
|
return result;
|
|
123
126
|
},
|