@flarenetwork/multichain-wallet-connector 0.0.2-rc.26 → 0.0.2-rc.28
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/README.md +16 -0
- package/dist/core/index.d.mts +1 -1
- package/dist/core/index.mjs +1 -1
- package/dist/{core-D90YnUDE.mjs → core-lSSpH8sW.mjs} +14 -9
- package/dist/core-lSSpH8sW.mjs.map +1 -0
- package/dist/{index-DYYzjIvq.d.mts → index-Cb4ChsmP.d.mts} +3 -1
- package/dist/index-Cb4ChsmP.d.mts.map +1 -0
- package/dist/{index-D7es2odd.d.mts → index-iPuAo7ha.d.mts} +2 -2
- package/dist/{index-D7es2odd.d.mts.map → index-iPuAo7ha.d.mts.map} +1 -1
- package/dist/index.d.mts +2 -2
- package/dist/index.mjs +2 -2
- package/dist/react/index.d.mts +2 -2
- package/dist/react/index.mjs +2 -2
- package/dist/{react-DSkNH9Eb.mjs → react-DZr4A2EI.mjs} +2 -2
- package/dist/react-DZr4A2EI.mjs.map +1 -0
- package/package.json +1 -1
- package/dist/core-D90YnUDE.mjs.map +0 -1
- package/dist/index-DYYzjIvq.d.mts.map +0 -1
- package/dist/react-DSkNH9Eb.mjs.map +0 -1
package/README.md
CHANGED
|
@@ -48,6 +48,22 @@ const multichain = new MultiChain({
|
|
|
48
48
|
|
|
49
49
|
Only include wallets you need. Each wallet key is optional.
|
|
50
50
|
|
|
51
|
+
#### Featuring wallets in the WalletConnect modal
|
|
52
|
+
|
|
53
|
+
`featuredWalletIds` accepts [Reown registry](https://explorer.walletconnect.com/) wallet IDs and pins them to the top of the AppKit modal:
|
|
54
|
+
|
|
55
|
+
```typescript
|
|
56
|
+
"wallet-connect": {
|
|
57
|
+
projectId: "YOUR_WALLETCONNECT_PROJECT_ID",
|
|
58
|
+
featuredWalletIds: ["d9f5432e932c6fad8e19a0cea9d4a3372a84aed16e98a52e6655dd2821a63404"], // Joey Wallet
|
|
59
|
+
metadata: { name: "My dApp", url: "https://mydapp.com" },
|
|
60
|
+
},
|
|
61
|
+
```
|
|
62
|
+
|
|
63
|
+
This is **required for XRPL-only wallets**. AppKit only accepts EVM networks (its `CaipNetwork` type has no
|
|
64
|
+
`xrpl` namespace), and it reuses those networks to filter its recommended and "All Wallets" lists — so an
|
|
65
|
+
XRPL-only wallet never appears there. Featured wallets are fetched without that chain filter.
|
|
66
|
+
|
|
51
67
|
You can also pass an `events` map to the constructor to handle wallet events outside of React (e.g. logging, analytics, non-React consumers):
|
|
52
68
|
|
|
53
69
|
```typescript
|
package/dist/core/index.d.mts
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { $ as MultiChainEvents, A as ConnectorTypeMap, B as LedgerConnectOptions, C as ConnectorClientMap, D as ConnectorProviderMap, E as ConnectorProvider, F as XrpClient, G as ChainChangedEvent, H as LedgerPaginatedBip44, I as EvmClient, J as DcentWalletOptions, K as ChainOverride, L as ChainClient, M as XamanSendTxOptions, N as LedgerSession, O as ConnectorSendTxOptions, P as DcentConnector, Q as MetaMaskWalletOptions, R as LedgerCaip2, S as ConnectorClient, T as ConnectorConnectOptionsMap, U as Bip44, V as LedgerHDStandard, W as AccountChangedEvent, X as ErrorEvent, Y as DisconnectEvent, Z as LedgerWalletOptions, _ as ConfigResolver, _t as XRPlCaip2, a as shortenAddress, at as XamanWalletOptions, c as WalletConnectError, d as DcentError, dt as BaseChain, et as MultiChainOptions, f as WalletError, ft as Caip2, g as MultiChain, gt as NonEvmChain, h as ChainGuards, ht as EvmChain, i as objectValues, it as WalletOptions, j as ConnectorXrpClientMap, k as ConnectorSendTxOptionsMap, l as MetaMaskError, m as ErrorCodeKey, mt as Eip155Caip2, n as objectFromEntries, nt as WalletConnectWalletOptions, o as WalletErrorHelper, ot as WalletAddressState, p as ErrorCode, pt as Chain, q as ConnectEvent, r as objectKeys, rt as WalletMetadata, s as XamanError, st as WalletState, t as objectEntries, tt as ResolvedWalletConfig, u as LedgerError, ut as WalletType, vt as XrplChain, w as ConnectorConnectOptions, x as Connector, z as LedgerComputedAddress } from "../index-
|
|
1
|
+
import { $ as MultiChainEvents, A as ConnectorTypeMap, B as LedgerConnectOptions, C as ConnectorClientMap, D as ConnectorProviderMap, E as ConnectorProvider, F as XrpClient, G as ChainChangedEvent, H as LedgerPaginatedBip44, I as EvmClient, J as DcentWalletOptions, K as ChainOverride, L as ChainClient, M as XamanSendTxOptions, N as LedgerSession, O as ConnectorSendTxOptions, P as DcentConnector, Q as MetaMaskWalletOptions, R as LedgerCaip2, S as ConnectorClient, T as ConnectorConnectOptionsMap, U as Bip44, V as LedgerHDStandard, W as AccountChangedEvent, X as ErrorEvent, Y as DisconnectEvent, Z as LedgerWalletOptions, _ as ConfigResolver, _t as XRPlCaip2, a as shortenAddress, at as XamanWalletOptions, c as WalletConnectError, d as DcentError, dt as BaseChain, et as MultiChainOptions, f as WalletError, ft as Caip2, g as MultiChain, gt as NonEvmChain, h as ChainGuards, ht as EvmChain, i as objectValues, it as WalletOptions, j as ConnectorXrpClientMap, k as ConnectorSendTxOptionsMap, l as MetaMaskError, m as ErrorCodeKey, mt as Eip155Caip2, n as objectFromEntries, nt as WalletConnectWalletOptions, o as WalletErrorHelper, ot as WalletAddressState, p as ErrorCode, pt as Chain, q as ConnectEvent, r as objectKeys, rt as WalletMetadata, s as XamanError, st as WalletState, t as objectEntries, tt as ResolvedWalletConfig, u as LedgerError, ut as WalletType, vt as XrplChain, w as ConnectorConnectOptions, x as Connector, z as LedgerComputedAddress } from "../index-Cb4ChsmP.mjs";
|
|
2
2
|
export { AccountChangedEvent, BaseChain, Bip44, Caip2, Chain, ChainChangedEvent, ChainClient, ChainGuards, ChainOverride, ConfigResolver, ConnectEvent, Connector, ConnectorClient, ConnectorClientMap, ConnectorConnectOptions, ConnectorConnectOptionsMap, ConnectorProvider, ConnectorProviderMap, ConnectorSendTxOptions, ConnectorSendTxOptionsMap, ConnectorTypeMap, ConnectorXrpClientMap, DcentConnector, DcentError, DcentWalletOptions, DisconnectEvent, Eip155Caip2, ErrorCode, ErrorCodeKey, ErrorEvent, EvmChain, EvmClient, LedgerCaip2, LedgerComputedAddress, LedgerConnectOptions, LedgerError, LedgerHDStandard, LedgerPaginatedBip44, LedgerSession, LedgerWalletOptions, MetaMaskError, MetaMaskWalletOptions, MultiChain, MultiChainEvents, MultiChainOptions, NonEvmChain, ResolvedWalletConfig, WalletAddressState, WalletConnectError, WalletConnectWalletOptions, WalletError, WalletErrorHelper, WalletMetadata, WalletOptions, WalletState, WalletType, XRPlCaip2, XamanError, XamanSendTxOptions, XamanWalletOptions, XrpClient, XrplChain, objectEntries, objectFromEntries, objectKeys, objectValues, shortenAddress };
|
package/dist/core/index.mjs
CHANGED
|
@@ -1,2 +1,2 @@
|
|
|
1
|
-
import { _ as objectFromEntries, a as WalletErrorHelper, b as shortenAddress, c as MetaMaskError, d as WalletError, f as ErrorCode, g as objectEntries, h as ChainGuards, i as DcentConnector, l as LedgerError, n as EvmClient, o as XamanError, p as ConfigResolver, r as Bip44, s as WalletConnectError, t as MultiChain, u as DcentError, v as objectKeys, y as objectValues } from "../core-
|
|
1
|
+
import { _ as objectFromEntries, a as WalletErrorHelper, b as shortenAddress, c as MetaMaskError, d as WalletError, f as ErrorCode, g as objectEntries, h as ChainGuards, i as DcentConnector, l as LedgerError, n as EvmClient, o as XamanError, p as ConfigResolver, r as Bip44, s as WalletConnectError, t as MultiChain, u as DcentError, v as objectKeys, y as objectValues } from "../core-lSSpH8sW.mjs";
|
|
2
2
|
export { Bip44, ChainGuards, ConfigResolver, DcentConnector, DcentError, ErrorCode, EvmClient, LedgerError, MetaMaskError, MultiChain, WalletConnectError, WalletError, WalletErrorHelper, XamanError, objectEntries, objectFromEntries, objectKeys, objectValues, shortenAddress };
|
|
@@ -2352,7 +2352,8 @@ var WalletConnectConnector = class extends BaseConnector {
|
|
|
2352
2352
|
universalProvider: this.provider,
|
|
2353
2353
|
manualWCControl: true,
|
|
2354
2354
|
networks: this.buildAppKitNetworks(),
|
|
2355
|
-
customRpcUrls: this.buildCustomRpcUrls()
|
|
2355
|
+
customRpcUrls: this.buildCustomRpcUrls(),
|
|
2356
|
+
featuredWalletIds: this.config.featuredWalletIds
|
|
2356
2357
|
});
|
|
2357
2358
|
this.registerProviderEvents();
|
|
2358
2359
|
this.registerModalCloseHandler();
|
|
@@ -2622,7 +2623,7 @@ var XamanClient = class XamanClient extends Xumm {
|
|
|
2622
2623
|
}
|
|
2623
2624
|
async getCaip2() {
|
|
2624
2625
|
const networkId = await this.user.networkId;
|
|
2625
|
-
if (
|
|
2626
|
+
if (networkId == null) throw new XamanError("XAMAN_SDK_NOT_READY");
|
|
2626
2627
|
return this.toCaip2Network(networkId);
|
|
2627
2628
|
}
|
|
2628
2629
|
async onDestroy() {
|
|
@@ -2746,12 +2747,16 @@ var ConnectorFactory = class {
|
|
|
2746
2747
|
metadata,
|
|
2747
2748
|
resolvedConfig
|
|
2748
2749
|
});
|
|
2749
|
-
case "wallet-connect":
|
|
2750
|
-
|
|
2751
|
-
|
|
2752
|
-
|
|
2753
|
-
|
|
2754
|
-
|
|
2750
|
+
case "wallet-connect": {
|
|
2751
|
+
const wcOptions = walletOptions;
|
|
2752
|
+
return new WalletConnectConnector(store, {
|
|
2753
|
+
walletType: "wallet-connect",
|
|
2754
|
+
metadata,
|
|
2755
|
+
resolvedConfig,
|
|
2756
|
+
projectId: wcOptions.projectId,
|
|
2757
|
+
featuredWalletIds: wcOptions.featuredWalletIds
|
|
2758
|
+
});
|
|
2759
|
+
}
|
|
2755
2760
|
case "ledger": return new LedgerConnector(store, {
|
|
2756
2761
|
walletType: "ledger",
|
|
2757
2762
|
metadata,
|
|
@@ -3019,4 +3024,4 @@ var MultiChain = class {
|
|
|
3019
3024
|
//#endregion
|
|
3020
3025
|
export { objectFromEntries as _, WalletErrorHelper as a, shortenAddress as b, MetaMaskError as c, WalletError as d, ErrorCode as f, objectEntries as g, ChainGuards as h, DcentConnector as i, LedgerError as l, evmCaip2s as m, EvmClient as n, XamanError as o, ConfigResolver as p, Bip44 as r, WalletConnectError as s, MultiChain as t, DcentError as u, objectKeys as v, objectValues as y };
|
|
3021
3026
|
|
|
3022
|
-
//# sourceMappingURL=core-
|
|
3027
|
+
//# sourceMappingURL=core-lSSpH8sW.mjs.map
|