solariskit 1.5.0 → 1.6.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.
@@ -2,7 +2,6 @@
2
2
  import React, { ReactNode } from "react";
3
3
  import { Chain } from "wagmi/chains";
4
4
  import { RequiredConditionalValue } from "@vanilla-extract/sprinkles";
5
-
6
5
  //#region src/css/sprinkles.css.d.ts
7
6
  declare const themeContractValues: {
8
7
  colors: {
@@ -173,17 +172,7 @@ interface RainbowKitProviderProps {
173
172
  avatar?: AvatarComponent;
174
173
  modalSize?: ModalSizes;
175
174
  }
176
- declare function RainbowKitProvider({
177
- appInfo,
178
- avatar,
179
- chainSearchThreshold,
180
- children,
181
- id,
182
- initialChain,
183
- modalSize,
184
- showRecentTransactions,
185
- theme
186
- }: RainbowKitProviderProps): React.JSX.Element;
175
+ declare function RainbowKitProvider({ appInfo, avatar, chainSearchThreshold, children, id, initialChain, modalSize, showRecentTransactions, theme }: RainbowKitProviderProps): React.JSX.Element;
187
176
  //#endregion
188
177
  //#region src/components/ConnectButton/ConnectButtonView.d.ts
189
178
  type AccountStatus = "full" | "avatar" | "address";
@@ -193,8 +182,6 @@ type ChainStatus = "full" | "icon" | "name" | "none";
193
182
  interface ChainSelectButtonProps {
194
183
  chainStatus?: ResponsiveValue<ChainStatus>;
195
184
  }
196
- declare function ChainSelectButton({
197
- chainStatus
198
- }: ChainSelectButtonProps): React.JSX.Element | null;
185
+ declare function ChainSelectButton({ chainStatus }: ChainSelectButtonProps): React.JSX.Element | null;
199
186
  //#endregion
200
187
  export { RainbowKitProvider as a, ModalSizes as c, DisclaimerComponent as d, ResponsiveValue as f, AccountStatus as i, AvatarComponent as l, ChainSelectButtonProps as n, RainbowKitProviderProps as o, ThemeVars as p, ChainStatus as r, Theme as s, ChainSelectButton as t, AvatarComponentProps as u };
@@ -1,5 +1,5 @@
1
1
  "use client";
2
- import { A as clearLatestWalletId, At as useHydrated, Ct as useRainbowKitChains, D as useWalletConnectors, Dt as useIsMounted, E as preloadAssetsIcon, Et as isChainIdSupported, G as AppContext, H as defaultAvatar, J as ShowRecentTransactionsContext, K as defaultAppInfo, O as isNotNullish, Ot as ShowBalanceProvider, Pt as useAuthenticationStatus, St as RainbowKitChainProvider, T as preloadLoginIcon, V as AvatarContext, X as formatAddress, Y as formatENS, Z as abbreviateETHBalance, _t as TransactionStoreProvider, a as NetworkSelectButtonView, at as WalletButtonProvider, b as clearWalletConnectDeepLink, bt as useSelectedChainId, c as defaultConnectButtonProps, ct as ThemeRootStyle, d as useAccountModal, f as useChainModal, g as signInIcon, gt as useRecentTransactions, ht as useAsyncImage, i as WalletButtonView, it as WalletButtonContext, j as getLatestWalletId, jt as useConnectionStatus, k as addLatestWalletId, kt as useShowBalance, l as resolveShowBalance, lt as useThemeRoot, m as useModalState, mt as loadImages, n as lightTheme, nt as ModalSizeOptions, o as defaultNetworkSelectChainStatus, p as useConnectModal, pt as isMobile, rt as ModalSizeProvider, s as ConnectButtonView, st as ThemeIdProvider, t as useFingerprint, u as ModalProvider, wt as useRainbowKitChainsById, xt as useProfile } from "./useFingerprint-BoVxC_1f.js";
2
+ import { A as clearLatestWalletId, At as useHydrated, Ct as useRainbowKitChains, D as useWalletConnectors, Dt as useIsMounted, E as preloadAssetsIcon, Et as isChainIdSupported, G as AppContext, H as defaultAvatar, J as ShowRecentTransactionsContext, K as defaultAppInfo, O as isNotNullish, Ot as ShowBalanceProvider, Pt as useAuthenticationStatus, St as RainbowKitChainProvider, T as preloadLoginIcon, V as AvatarContext, X as formatAddress, Y as formatENS, Z as abbreviateETHBalance, _t as TransactionStoreProvider, a as NetworkSelectButtonView, at as WalletButtonProvider, b as clearWalletConnectDeepLink, bt as useSelectedChainId, c as defaultConnectButtonProps, ct as ThemeRootStyle, d as useAccountModal, f as useChainModal, g as signInIcon, gt as useRecentTransactions, ht as useAsyncImage, i as WalletButtonView, it as WalletButtonContext, j as getLatestWalletId, jt as useConnectionStatus, k as addLatestWalletId, kt as useShowBalance, l as resolveShowBalance, lt as useThemeRoot, m as useModalState, mt as loadImages, n as lightTheme, nt as ModalSizeOptions, o as defaultNetworkSelectChainStatus, p as useConnectModal, pt as isMobile, rt as ModalSizeProvider, s as ConnectButtonView, st as ThemeIdProvider, t as useFingerprint, u as ModalProvider, wt as useRainbowKitChainsById, xt as useProfile } from "./useFingerprint-DGiyXD_j.js";
3
3
  import React, { useCallback, useContext, useEffect, useMemo, useState } from "react";
4
4
  import { useConfig, useConnection, useConnectionEffect } from "wagmi";
5
5
  import { Fragment as Fragment$1, jsx } from "react/jsx-runtime";
@@ -1,16 +1,12 @@
1
1
 
2
2
  import { Connector, CreateConnectorFn } from "wagmi";
3
3
  import { WalletConnectParameters } from "wagmi/connectors";
4
-
5
4
  //#region src/wallets/walletConnectors/walletConnectWallet/walletConnectWallet.d.ts
6
5
  interface WalletConnectWalletOptions {
7
6
  projectId: string;
8
7
  options?: RainbowKitWalletConnectParameters;
9
8
  }
10
- declare const walletConnectWallet: ({
11
- projectId,
12
- options
13
- }: WalletConnectWalletOptions) => Wallet;
9
+ declare const walletConnectWallet: ({ projectId, options }: WalletConnectWalletOptions) => Wallet;
14
10
  //#endregion
15
11
  //#region src/wallets/Wallet.d.ts
16
12
  type RainbowKitConnector = {
@@ -1,12 +1,11 @@
1
1
 
2
- import { f as ResponsiveValue, i as AccountStatus } from "./ChainSelectButton-COIW5SBO.js";
3
- import { o as WalletInstance } from "./Wallet-epUweMuA.js";
2
+ import { f as ResponsiveValue, i as AccountStatus } from "./ChainSelectButton-BcLkwhod.js";
3
+ import { o as WalletInstance } from "./Wallet-BhiBD1Pn.js";
4
4
  import React, { JSX, ReactNode } from "react";
5
- import { Address } from "viem";
6
-
5
+ import { Address, SignableMessage } from "viem";
7
6
  //#region src/components/RainbowKitProvider/AuthenticationContext.d.ts
8
7
  type AuthenticationStatus = "loading" | "unauthenticated" | "authenticated";
9
- interface AuthenticationAdapter<Message> {
8
+ interface AuthenticationAdapter<Message extends SignableMessage> {
10
9
  getNonce: () => Promise<string>;
11
10
  createMessage: (args: {
12
11
  nonce: string;
@@ -19,21 +18,16 @@ interface AuthenticationAdapter<Message> {
19
18
  }) => Promise<boolean>;
20
19
  signOut: () => Promise<void>;
21
20
  }
22
- interface AuthenticationConfig<Message> {
21
+ interface AuthenticationConfig<Message extends SignableMessage> {
23
22
  adapter: AuthenticationAdapter<Message>;
24
23
  status: AuthenticationStatus;
25
24
  }
26
- declare function createAuthenticationAdapter<Message>(adapter: AuthenticationAdapter<Message>): AuthenticationAdapter<Message>;
27
- interface RainbowKitAuthenticationProviderProps<Message> extends AuthenticationConfig<Message> {
25
+ declare function createAuthenticationAdapter<Message extends SignableMessage>(adapter: AuthenticationAdapter<Message>): AuthenticationAdapter<Message>;
26
+ interface RainbowKitAuthenticationProviderProps<Message extends SignableMessage> extends AuthenticationConfig<Message> {
28
27
  enabled?: boolean;
29
28
  children: ReactNode;
30
29
  }
31
- declare function RainbowKitAuthenticationProvider<Message = unknown>({
32
- adapter,
33
- children,
34
- enabled,
35
- status
36
- }: RainbowKitAuthenticationProviderProps<Message>): React.JSX.Element;
30
+ declare function RainbowKitAuthenticationProvider<Message extends SignableMessage = SignableMessage>({ adapter, children, enabled, status }: RainbowKitAuthenticationProviderProps<Message>): React.JSX.Element;
37
31
  //#endregion
38
32
  //#region src/components/ConnectButton/ConnectButtonRenderer.d.ts
39
33
  interface ConnectButtonRendererProps {
@@ -67,9 +61,7 @@ interface ConnectButtonRendererProps {
67
61
  connectModalOpen: boolean;
68
62
  }) => ReactNode;
69
63
  }
70
- declare function ConnectButtonRenderer({
71
- children
72
- }: ConnectButtonRendererProps): React.JSX.Element;
64
+ declare function ConnectButtonRenderer({ children }: ConnectButtonRendererProps): React.JSX.Element;
73
65
  declare namespace ConnectButtonRenderer {
74
66
  var displayName: string;
75
67
  }
@@ -80,11 +72,7 @@ interface ConnectButtonProps {
80
72
  showBalance?: ResponsiveValue<boolean>;
81
73
  label?: string;
82
74
  }
83
- declare function ConnectButton({
84
- accountStatus,
85
- label,
86
- showBalance
87
- }: ConnectButtonProps): React.JSX.Element | null;
75
+ declare function ConnectButton({ accountStatus, label, showBalance }: ConnectButtonProps): React.JSX.Element | null;
88
76
  declare namespace ConnectButton {
89
77
  var Custom: typeof ConnectButtonRenderer;
90
78
  }
@@ -1,8 +1,7 @@
1
1
 
2
- import { a as RainbowKitProvider, l as AvatarComponent, n as ChainSelectButtonProps, o as RainbowKitProviderProps, r as ChainStatus, t as ChainSelectButton, u as AvatarComponentProps } from "../ChainSelectButton-COIW5SBO.js";
3
- import { a as ConnectButtonProps, i as ConnectButton, n as WalletButtonProps, t as WalletButton } from "../WalletButton-B3e-uEwx.js";
2
+ import { a as RainbowKitProvider, l as AvatarComponent, n as ChainSelectButtonProps, o as RainbowKitProviderProps, r as ChainStatus, t as ChainSelectButton, u as AvatarComponentProps } from "../ChainSelectButton-BcLkwhod.js";
3
+ import { a as ConnectButtonProps, i as ConnectButton, n as WalletButtonProps, t as WalletButton } from "../WalletButton-Dc_yPK_E.js";
4
4
  import React from "react";
5
-
6
5
  //#region src/components/Avatar/Avatar.d.ts
7
6
  interface AvatarProps {
8
7
  address: string;
@@ -10,143 +9,23 @@ interface AvatarProps {
10
9
  imageUrl?: string | null;
11
10
  size: number;
12
11
  }
13
- declare function Avatar({
14
- address,
15
- imageUrl,
16
- loading,
17
- size
18
- }: AvatarProps): React.JSX.Element;
12
+ declare function Avatar({ address, imageUrl, loading, size }: AvatarProps): React.JSX.Element;
19
13
  //#endregion
20
14
  //#region src/components/Avatar/EmojiAvatar.d.ts
21
15
  declare const EmojiAvatar: AvatarComponent;
22
16
  //#endregion
23
- //#region src/components/Avatar/emojiAvatarForAddress.d.ts
24
- declare const avatars: readonly [{
25
- readonly color: "#FC5C54";
26
- readonly emoji: "🌶";
27
- }, {
28
- readonly color: "#FFD95A";
29
- readonly emoji: "🤑";
30
- }, {
31
- readonly color: "#E95D72";
32
- readonly emoji: "🐙";
33
- }, {
34
- readonly color: "#6A87C8";
35
- readonly emoji: "🫐";
36
- }, {
37
- readonly color: "#5FD0F3";
38
- readonly emoji: "🐳";
39
- }, {
40
- readonly color: "#FC5C54";
41
- readonly emoji: "🤶";
42
- }, {
43
- readonly color: "#75C06B";
44
- readonly emoji: "🌲";
45
- }, {
46
- readonly color: "#FFDD86";
47
- readonly emoji: "🌞";
48
- }, {
49
- readonly color: "#5FC6D4";
50
- readonly emoji: "🐒";
51
- }, {
52
- readonly color: "#FF949A";
53
- readonly emoji: "🐵";
54
- }, {
55
- readonly color: "#FF8024";
56
- readonly emoji: "🦊";
57
- }, {
58
- readonly color: "#9BA1A4";
59
- readonly emoji: "🐼";
60
- }, {
61
- readonly color: "#EC66FF";
62
- readonly emoji: "🦄";
63
- }, {
64
- readonly color: "#FF8CBC";
65
- readonly emoji: "🐷";
66
- }, {
67
- readonly color: "#FF9A23";
68
- readonly emoji: "🐧";
69
- }, {
70
- readonly color: "#FF949A";
71
- readonly emoji: "🦩";
72
- }, {
73
- readonly color: "#C5DADB";
74
- readonly emoji: "👽";
75
- }, {
76
- readonly color: "#FC5C54";
77
- readonly emoji: "🎈";
78
- }, {
79
- readonly color: "#FF949A";
80
- readonly emoji: "🍉";
81
- }, {
82
- readonly color: "#FFD95A";
83
- readonly emoji: "🎉";
84
- }, {
85
- readonly color: "#A8CE63";
86
- readonly emoji: "🐲";
87
- }, {
88
- readonly color: "#71ABFF";
89
- readonly emoji: "🌎";
90
- }, {
91
- readonly color: "#FFE279";
92
- readonly emoji: "🍊";
93
- }, {
94
- readonly color: "#B6B1B6";
95
- readonly emoji: "🐭";
96
- }, {
97
- readonly color: "#FF6780";
98
- readonly emoji: "🍣";
99
- }, {
100
- readonly color: "#FFD95A";
101
- readonly emoji: "🐥";
102
- }, {
103
- readonly color: "#A575FF";
104
- readonly emoji: "👾";
105
- }, {
106
- readonly color: "#A8CE63";
107
- readonly emoji: "🥦";
108
- }, {
109
- readonly color: "#FC5C54";
110
- readonly emoji: "👹";
111
- }, {
112
- readonly color: "#FFE279";
113
- readonly emoji: "🙀";
114
- }, {
115
- readonly color: "#5FD0F3";
116
- readonly emoji: "⛱";
117
- }, {
118
- readonly color: "#4D82FF";
119
- readonly emoji: "⛵️";
120
- }, {
121
- readonly color: "#FFE279";
122
- readonly emoji: "🥳";
123
- }, {
124
- readonly color: "#FF949A";
125
- readonly emoji: "🤯";
126
- }, {
127
- readonly color: "#FFB35A";
128
- readonly emoji: "🤠";
129
- }];
130
- declare function emojiAvatarForAddress(address: string): (typeof avatars)[number];
131
- //#endregion
132
17
  //#region src/components/AccountModal/AccountModal.d.ts
133
18
  interface AccountModalProps {
134
19
  open: boolean;
135
20
  onClose: () => void;
136
21
  }
137
- declare function AccountModal({
138
- onClose,
139
- open
140
- }: AccountModalProps): React.JSX.Element | null;
22
+ declare function AccountModal({ onClose, open }: AccountModalProps): React.JSX.Element | null;
141
23
  //#endregion
142
24
  //#region src/components/ChainModal/ChainModal.d.ts
143
25
  interface ChainModalProps {
144
26
  open: boolean;
145
27
  onClose: () => void;
146
28
  }
147
- declare function ChainModal({
148
- onClose,
149
- open
150
- }: ChainModalProps): React.JSX.Element;
29
+ declare function ChainModal({ onClose, open }: ChainModalProps): React.JSX.Element;
151
30
  //#endregion
152
- export { AccountModal, type AccountModalProps, Avatar, type AvatarProps, ChainModal, type ChainModalProps, ChainSelectButton, type ChainSelectButtonProps, type ChainStatus, ConnectButton, type ConnectButtonProps, EmojiAvatar, type AvatarComponentProps as EmojiAvatarProps, RainbowKitProvider, type RainbowKitProviderProps, WalletButton, type WalletButtonProps, emojiAvatarForAddress };
31
+ export { AccountModal, type AccountModalProps, Avatar, type AvatarProps, ChainModal, type ChainModalProps, ChainSelectButton, type ChainSelectButtonProps, type ChainStatus, ConnectButton, type ConnectButtonProps, EmojiAvatar, type AvatarComponentProps as EmojiAvatarProps, RainbowKitProvider, type RainbowKitProviderProps, WalletButton, type WalletButtonProps };
@@ -1,188 +1,5 @@
1
1
  "use client";
2
- import { B as Avatar, I as ChainModal, R as AccountModal, U as EmojiAvatar } from "../useFingerprint-BoVxC_1f.js";
3
- import { i as ConnectButton, n as WalletButton, r as ChainSelectButton, t as RainbowKitProvider } from "../RainbowKitProvider-CKy7nmFG.js";
2
+ import { B as Avatar, I as ChainModal, R as AccountModal, U as EmojiAvatar } from "../useFingerprint-DGiyXD_j.js";
3
+ import { i as ConnectButton, n as WalletButton, r as ChainSelectButton, t as RainbowKitProvider } from "../RainbowKitProvider-D6tnZRYJ.js";
4
4
 
5
- //#region src/components/Avatar/emojiAvatarForAddress.ts
6
- const colors = [
7
- "#FC5C54",
8
- "#FFD95A",
9
- "#E95D72",
10
- "#6A87C8",
11
- "#5FD0F3",
12
- "#75C06B",
13
- "#FFDD86",
14
- "#5FC6D4",
15
- "#FF949A",
16
- "#FF8024",
17
- "#9BA1A4",
18
- "#EC66FF",
19
- "#FF8CBC",
20
- "#FF9A23",
21
- "#C5DADB",
22
- "#A8CE63",
23
- "#71ABFF",
24
- "#FFE279",
25
- "#B6B1B6",
26
- "#FF6780",
27
- "#A575FF",
28
- "#4D82FF",
29
- "#FFB35A"
30
- ];
31
- const avatars = [
32
- {
33
- color: colors[0],
34
- emoji: "🌶"
35
- },
36
- {
37
- color: colors[1],
38
- emoji: "🤑"
39
- },
40
- {
41
- color: colors[2],
42
- emoji: "🐙"
43
- },
44
- {
45
- color: colors[3],
46
- emoji: "🫐"
47
- },
48
- {
49
- color: colors[4],
50
- emoji: "🐳"
51
- },
52
- {
53
- color: colors[0],
54
- emoji: "🤶"
55
- },
56
- {
57
- color: colors[5],
58
- emoji: "🌲"
59
- },
60
- {
61
- color: colors[6],
62
- emoji: "🌞"
63
- },
64
- {
65
- color: colors[7],
66
- emoji: "🐒"
67
- },
68
- {
69
- color: colors[8],
70
- emoji: "🐵"
71
- },
72
- {
73
- color: colors[9],
74
- emoji: "🦊"
75
- },
76
- {
77
- color: colors[10],
78
- emoji: "🐼"
79
- },
80
- {
81
- color: colors[11],
82
- emoji: "🦄"
83
- },
84
- {
85
- color: colors[12],
86
- emoji: "🐷"
87
- },
88
- {
89
- color: colors[13],
90
- emoji: "🐧"
91
- },
92
- {
93
- color: colors[8],
94
- emoji: "🦩"
95
- },
96
- {
97
- color: colors[14],
98
- emoji: "👽"
99
- },
100
- {
101
- color: colors[0],
102
- emoji: "🎈"
103
- },
104
- {
105
- color: colors[8],
106
- emoji: "🍉"
107
- },
108
- {
109
- color: colors[1],
110
- emoji: "🎉"
111
- },
112
- {
113
- color: colors[15],
114
- emoji: "🐲"
115
- },
116
- {
117
- color: colors[16],
118
- emoji: "🌎"
119
- },
120
- {
121
- color: colors[17],
122
- emoji: "🍊"
123
- },
124
- {
125
- color: colors[18],
126
- emoji: "🐭"
127
- },
128
- {
129
- color: colors[19],
130
- emoji: "🍣"
131
- },
132
- {
133
- color: colors[1],
134
- emoji: "🐥"
135
- },
136
- {
137
- color: colors[20],
138
- emoji: "👾"
139
- },
140
- {
141
- color: colors[15],
142
- emoji: "🥦"
143
- },
144
- {
145
- color: colors[0],
146
- emoji: "👹"
147
- },
148
- {
149
- color: colors[17],
150
- emoji: "🙀"
151
- },
152
- {
153
- color: colors[4],
154
- emoji: "⛱"
155
- },
156
- {
157
- color: colors[21],
158
- emoji: "⛵️"
159
- },
160
- {
161
- color: colors[17],
162
- emoji: "🥳"
163
- },
164
- {
165
- color: colors[8],
166
- emoji: "🤯"
167
- },
168
- {
169
- color: colors[22],
170
- emoji: "🤠"
171
- }
172
- ];
173
- function hashCode(text) {
174
- let hash = 0;
175
- if (text.length === 0) return hash;
176
- for (let i = 0; i < text.length; i++) {
177
- const chr = text.charCodeAt(i);
178
- hash = (hash << 5) - hash + chr;
179
- hash |= 0;
180
- }
181
- return hash;
182
- }
183
- function emojiAvatarForAddress(address) {
184
- return avatars[Math.abs(hashCode((typeof address === "string" ? address : "").toLowerCase()) % avatars.length)] ?? avatars[0];
185
- }
186
-
187
- //#endregion
188
- export { AccountModal, Avatar, ChainModal, ChainSelectButton, ConnectButton, EmojiAvatar, RainbowKitProvider, WalletButton, emojiAvatarForAddress };
5
+ export { AccountModal, Avatar, ChainModal, ChainSelectButton, ConnectButton, EmojiAvatar, RainbowKitProvider, WalletButton };
package/dist/index.d.ts CHANGED
@@ -1,12 +1,11 @@
1
1
 
2
- import { a as RainbowKitProvider, d as DisclaimerComponent, l as AvatarComponent, n as ChainSelectButtonProps, o as RainbowKitProviderProps, p as ThemeVars, r as ChainStatus, s as Theme, t as ChainSelectButton } from "./ChainSelectButton-COIW5SBO.js";
3
- import { c as RainbowKitAuthenticationProvider, i as ConnectButton, l as createAuthenticationAdapter, o as AuthenticationConfig, r as WalletButtonRendererProps, s as AuthenticationStatus, t as WalletButton } from "./WalletButton-B3e-uEwx.js";
4
- import { a as WalletDetailsParams, i as Wallet, r as RainbowKitWalletConnectParameters, s as WalletList, t as CreateConnector } from "./Wallet-epUweMuA.js";
2
+ import { a as RainbowKitProvider, d as DisclaimerComponent, l as AvatarComponent, n as ChainSelectButtonProps, o as RainbowKitProviderProps, p as ThemeVars, r as ChainStatus, s as Theme, t as ChainSelectButton } from "./ChainSelectButton-BcLkwhod.js";
3
+ import { c as RainbowKitAuthenticationProvider, i as ConnectButton, l as createAuthenticationAdapter, o as AuthenticationConfig, r as WalletButtonRendererProps, s as AuthenticationStatus, t as WalletButton } from "./WalletButton-Dc_yPK_E.js";
4
+ import { a as WalletDetailsParams, i as Wallet, r as RainbowKitWalletConnectParameters, s as WalletList, t as CreateConnector } from "./Wallet-BhiBD1Pn.js";
5
5
  import React, { ReactNode } from "react";
6
6
  import { CreateConfigParameters, CreateConnectorFn } from "wagmi";
7
7
  import { Transport } from "viem";
8
8
  import { Chain } from "wagmi/chains";
9
-
10
9
  //#region src/components/RainbowKitProvider/RainbowKitChainContext.d.ts
11
10
  interface RainbowKitChain extends Chain {
12
11
  iconUrl?: string | (() => Promise<string>) | null;
@@ -25,16 +24,7 @@ interface GetDefaultConfigParameters<chains extends _chains, transports extends
25
24
  projectId: string;
26
25
  walletConnectParameters?: RainbowKitWalletConnectParameters;
27
26
  }
28
- declare const getDefaultConfig: <chains extends _chains, transports extends _transports>({
29
- appName,
30
- appDescription,
31
- appUrl,
32
- appIcon,
33
- wallets,
34
- projectId,
35
- walletConnectParameters,
36
- ...wagmiParameters
37
- }: GetDefaultConfigParameters<chains, transports>) => import("wagmi").Config<chains, transports, import("wagmi").CreateConnectorFn[]>;
27
+ declare const getDefaultConfig: <chains extends _chains, transports extends _transports>({ appName, appDescription, appUrl, appIcon, wallets, projectId, walletConnectParameters, ...wagmiParameters }: GetDefaultConfigParameters<chains, transports>) => import("wagmi").Config<chains, transports, import("wagmi").CreateConnectorFn[]>;
38
28
  //#endregion
39
29
  //#region src/wallets/connectorsForWallets.d.ts
40
30
  interface ConnectorsForWalletsParameters {
@@ -45,14 +35,7 @@ interface ConnectorsForWalletsParameters {
45
35
  appIcon?: string;
46
36
  walletConnectParameters?: RainbowKitWalletConnectParameters;
47
37
  }
48
- declare const connectorsForWallets: (walletList: WalletList, {
49
- projectId,
50
- walletConnectParameters,
51
- appName,
52
- appDescription,
53
- appUrl,
54
- appIcon
55
- }: ConnectorsForWalletsParameters) => CreateConnectorFn[];
38
+ declare const connectorsForWallets: (walletList: WalletList, { projectId, walletConnectParameters, appName, appDescription, appUrl, appIcon }: ConnectorsForWalletsParameters) => CreateConnectorFn[];
56
39
  //#endregion
57
40
  //#region src/wallets/getDefaultWallets.d.ts
58
41
  declare function getDefaultWallets(parameters: ConnectorsForWalletsParameters): {
@@ -68,10 +51,7 @@ interface GetWalletConnectConnectorParams {
68
51
  projectId: string;
69
52
  walletConnectParameters?: RainbowKitWalletConnectParameters;
70
53
  }
71
- declare function getWalletConnectConnector({
72
- projectId,
73
- walletConnectParameters
74
- }: GetWalletConnectConnectorParams): CreateConnector;
54
+ declare function getWalletConnectConnector({ projectId, walletConnectParameters }: GetWalletConnectConnectorParams): CreateConnector;
75
55
  //#endregion
76
56
  //#region src/components/RainbowKitProvider/ModalContext.d.ts
77
57
  declare function useAccountModal(): {
@@ -125,11 +105,7 @@ interface ThemeOptions extends BaseThemeOptions {
125
105
  //#endregion
126
106
  //#region src/themes/lightTheme.d.ts
127
107
  declare const lightTheme: {
128
- ({
129
- accentColor,
130
- accentColorForeground,
131
- ...baseThemeOptions
132
- }?: ThemeOptions): {
108
+ ({ accentColor, accentColorForeground, ...baseThemeOptions }?: ThemeOptions): {
133
109
  colors: {
134
110
  accentColor: string;
135
111
  accentColorForeground: string;
@@ -189,11 +165,7 @@ declare const lightTheme: {
189
165
  //#endregion
190
166
  //#region src/themes/darkTheme.d.ts
191
167
  declare const darkTheme: {
192
- ({
193
- accentColor,
194
- accentColorForeground,
195
- ...baseThemeOptions
196
- }?: ThemeOptions): {
168
+ ({ accentColor, accentColorForeground, ...baseThemeOptions }?: ThemeOptions): {
197
169
  colors: {
198
170
  accentColor: string;
199
171
  accentColorForeground: string;
@@ -253,11 +225,7 @@ declare const darkTheme: {
253
225
  //#endregion
254
226
  //#region src/themes/midnightTheme.d.ts
255
227
  declare const midnightTheme: {
256
- ({
257
- accentColor,
258
- accentColorForeground,
259
- ...baseThemeOptions
260
- }?: ThemeOptions): {
228
+ ({ accentColor, accentColorForeground, ...baseThemeOptions }?: ThemeOptions): {
261
229
  colors: {
262
230
  accentColor: string;
263
231
  accentColorForeground: string;
@@ -321,28 +289,20 @@ declare function cssStringFromTheme(theme: ThemeVars | (() => ThemeVars), option
321
289
  }): string;
322
290
  //#endregion
323
291
  //#region src/css/cssObjectFromTheme.d.ts
324
- declare function cssObjectFromTheme(theme: ThemeVars | (() => ThemeVars), {
325
- extends: baseTheme
326
- }?: {
292
+ declare function cssObjectFromTheme(theme: ThemeVars | (() => ThemeVars), { extends: baseTheme }?: {
327
293
  extends?: ThemeVars | (() => ThemeVars);
328
294
  }): {
329
295
  [cssVarName: string]: string;
330
296
  };
331
297
  //#endregion
332
298
  //#region src/components/ConnectOptions/DesktopOptions.d.ts
333
- declare function DesktopOptions({
334
- onClose,
335
- titleId
336
- }: {
299
+ declare function DesktopOptions({ onClose, titleId }: {
337
300
  onClose: () => void;
338
301
  titleId: string;
339
302
  }): React.JSX.Element;
340
303
  //#endregion
341
304
  //#region src/components/ConnectOptions/MobileOptions.d.ts
342
- declare function MobileOptions({
343
- onClose,
344
- titleId
345
- }: {
305
+ declare function MobileOptions({ onClose, titleId }: {
346
306
  onClose: () => void;
347
307
  titleId: string;
348
308
  }): React.JSX.Element;
package/dist/index.js CHANGED
@@ -1,7 +1,7 @@
1
1
  "use client";
2
- import { $ as dialogContent, Mt as RainbowKitAuthenticationProvider, Nt as createAuthenticationAdapter, _ as MobileOptions, d as useAccountModal, dt as cssObjectFromTheme, et as dialogContentMobile, f as useChainModal, n as lightTheme, p as useConnectModal, r as baseTheme, ut as cssStringFromTheme, vt as useTransactionStore, x as DesktopOptions, yt as useChainId$1 } from "./useFingerprint-BoVxC_1f.js";
3
- import { i as ConnectButton, n as WalletButton, r as ChainSelectButton, t as RainbowKitProvider } from "./RainbowKitProvider-CKy7nmFG.js";
4
- import { a as injectedWallet, i as getWalletConnectConnector, n as safeWallet, o as base, r as metaMaskWallet, t as walletConnectWallet } from "./walletConnectors-DwPMzHor.js";
2
+ import { $ as dialogContent, Mt as RainbowKitAuthenticationProvider, Nt as createAuthenticationAdapter, _ as MobileOptions, d as useAccountModal, dt as cssObjectFromTheme, et as dialogContentMobile, f as useChainModal, n as lightTheme, p as useConnectModal, r as baseTheme, ut as cssStringFromTheme, vt as useTransactionStore, x as DesktopOptions, yt as useChainId$1 } from "./useFingerprint-DGiyXD_j.js";
3
+ import { i as ConnectButton, n as WalletButton, r as ChainSelectButton, t as RainbowKitProvider } from "./RainbowKitProvider-D6tnZRYJ.js";
4
+ import { a as injectedWallet, i as getWalletConnectConnector, n as safeWallet, o as base, r as metaMaskWallet, t as walletConnectWallet } from "./walletConnectors-okw2Nbqq.js";
5
5
  import { useCallback } from "react";
6
6
  import { createConfig, http, useConnection } from "wagmi";
7
7
 
@@ -1,10 +1,9 @@
1
1
 
2
- import { c as ModalSizes, d as DisclaimerComponent, f as ResponsiveValue, i as AccountStatus, l as AvatarComponent, r as ChainStatus, s as Theme } from "../ChainSelectButton-COIW5SBO.js";
2
+ import { c as ModalSizes, d as DisclaimerComponent, f as ResponsiveValue, i as AccountStatus, l as AvatarComponent, r as ChainStatus, s as Theme } from "../ChainSelectButton-BcLkwhod.js";
3
3
  import React, { JSX, ReactNode } from "react";
4
4
  import { AppProviderProps, TokenBalance as SolanaTokenBalance, UseBalanceOptions as SolanaBalanceOptions, UseBalanceReturn as SolanaBalanceReturn, UseClusterReturn as SolanaClusterReturn, UseDisconnectWalletReturn as SolanaDisconnectWalletReturn, UseKitTransactionSignerReturn as SolanaKitTransactionSignerReturn, UseSolanaClientReturn as SolanaClientReturn } from "@solana/connector/react";
5
5
  import { DefaultConfigOptions } from "@solana/connector/headless";
6
6
  import { ClusterType as SolanaClusterType, CoinGeckoConfig as SolanaCoinGeckoConfig, ConnectOptions as SolanaConnectOptions, ConnectorConfig, ExtendedConnectorConfig, MobileWalletAdapterConfig as SolanaMobileWalletAdapterConfig, SolanaClient, SolanaCluster, SolanaClusterId, StorageAdapter as SolanaStorageAdapter, WalletDisplayConfig as SolanaWalletDisplayConfig } from "@solana/connector";
7
-
8
7
  //#region src/solana/types.d.ts
9
8
  /**
10
9
  * Network names the config surface accepts (includes the legacy
@@ -55,27 +54,13 @@ interface SolanaWalletButtonProps {
55
54
  }
56
55
  //#endregion
57
56
  //#region src/solana/components/SolanaKitProvider/SolanaKitProvider.d.ts
58
- declare function SolanaKitProvider({
59
- appInfo,
60
- avatar,
61
- children,
62
- config,
63
- id,
64
- modalSize,
65
- theme
66
- }: SolanaKitProviderProps): React.JSX.Element;
57
+ declare function SolanaKitProvider({ appInfo, avatar, children, config, id, modalSize, theme }: SolanaKitProviderProps): React.JSX.Element;
67
58
  //#endregion
68
59
  //#region src/solana/components/SolanaConnectButton/SolanaConnectButton.d.ts
69
- declare function SolanaConnectButton({
70
- accountStatus,
71
- label,
72
- showBalance
73
- }: SolanaConnectButtonProps): React.JSX.Element | null;
60
+ declare function SolanaConnectButton({ accountStatus, label, showBalance }: SolanaConnectButtonProps): React.JSX.Element | null;
74
61
  //#endregion
75
62
  //#region src/solana/components/SolanaChainSelectButton/SolanaChainSelectButton.d.ts
76
- declare function SolanaChainSelectButton({
77
- chainStatus
78
- }: SolanaChainSelectButtonProps): React.JSX.Element | null;
63
+ declare function SolanaChainSelectButton({ chainStatus }: SolanaChainSelectButtonProps): React.JSX.Element | null;
79
64
  //#endregion
80
65
  //#region src/solana/components/SolanaWalletButton/SolanaWalletButton.d.ts
81
66
  interface SolanaWalletButtonRendererProps {
@@ -1,6 +1,6 @@
1
1
  "use client";
2
2
  import { t as injectedWallet_default } from "../injectedWallet-CnP8-uv5.js";
3
- import { At as useHydrated, C as ConnectModalShellView, Dt as useIsMounted, F as setStorageItem, G as AppContext, H as defaultAvatar, K as defaultAppInfo, L as NetworkModalView, M as createWalletIdStorage, N as getStorageItem, Ot as ShowBalanceProvider, P as removeStorageItem, Q as DialogContent, S as WalletListView, Tt as getChainIconUrl, V as AvatarContext, W as Text, X as formatAddress, Z as abbreviateETHBalance, a as NetworkSelectButtonView, at as WalletButtonProvider, c as defaultConnectButtonProps, ct as ThemeRootStyle, ft as Box, h as useModalStateValue, i as WalletButtonView, kt as useShowBalance, l as resolveShowBalance, lt as useThemeRoot, n as lightTheme, nt as ModalSizeOptions, o as defaultNetworkSelectChainStatus, ot as Dialog, pt as isMobile, q as t, rt as ModalSizeProvider, s as ConnectButtonView, st as ThemeIdProvider, t as useFingerprint, tt as ModalSizeContext, v as MobileWalletItemView, w as ConnectModalIntro, y as MobileWalletListView, z as ProfileDetailsView } from "../useFingerprint-BoVxC_1f.js";
3
+ import { At as useHydrated, C as ConnectModalShellView, Dt as useIsMounted, F as setStorageItem, G as AppContext, H as defaultAvatar, K as defaultAppInfo, L as NetworkModalView, M as createWalletIdStorage, N as getStorageItem, Ot as ShowBalanceProvider, P as removeStorageItem, Q as DialogContent, S as WalletListView, Tt as getChainIconUrl, V as AvatarContext, W as Text, X as formatAddress, Z as abbreviateETHBalance, a as NetworkSelectButtonView, at as WalletButtonProvider, c as defaultConnectButtonProps, ct as ThemeRootStyle, ft as Box, h as useModalStateValue, i as WalletButtonView, kt as useShowBalance, l as resolveShowBalance, lt as useThemeRoot, n as lightTheme, nt as ModalSizeOptions, o as defaultNetworkSelectChainStatus, ot as Dialog, pt as isMobile, q as t, rt as ModalSizeProvider, s as ConnectButtonView, st as ThemeIdProvider, t as useFingerprint, tt as ModalSizeContext, v as MobileWalletItemView, w as ConnectModalIntro, y as MobileWalletListView, z as ProfileDetailsView } from "../useFingerprint-DGiyXD_j.js";
4
4
  import React, { createContext, useCallback, useContext, useEffect, useMemo, useRef, useState } from "react";
5
5
  import { Fragment as Fragment$1, jsx, jsxs } from "react/jsx-runtime";
6
6
  import { AppProvider, useBalance, useCluster, useConnectWallet, useDisconnectWallet, useKitTransactionSigner, useSolanaClient as useSolanaClient$1, useWallet, useWalletConnectors } from "@solana/connector/react";
@@ -62,10 +62,21 @@ function RainbowKitAuthenticationProvider({ adapter, children, enabled = true, s
62
62
  status
63
63
  ]);
64
64
  return /* @__PURE__ */ jsx(AuthenticationContext.Provider, {
65
- value: useMemo(() => enabled ? {
66
- adapter,
67
- status
68
- } : null, [
65
+ value: useMemo(() => {
66
+ if (!enabled) return null;
67
+ return {
68
+ adapter: {
69
+ createMessage: adapter.createMessage,
70
+ getNonce: adapter.getNonce,
71
+ signOut: adapter.signOut,
72
+ verify: ({ message, signature }) => adapter.verify({
73
+ message,
74
+ signature
75
+ })
76
+ },
77
+ status
78
+ };
79
+ }, [
69
80
  enabled,
70
81
  adapter,
71
82
  status
@@ -280,7 +291,8 @@ function createParams(params) {
280
291
  return params && Object.keys(params).length ? `?${new URLSearchParams(params)}` : "";
281
292
  }
282
293
  function generateError({ requestBody, response, responseBody }) {
283
- const message = responseBody?.error || response?.statusText || "There was an error with the request.";
294
+ const responseBodyError = responseBody && typeof responseBody === "object" && "error" in responseBody ? responseBody.error : void 0;
295
+ const message = (typeof responseBodyError === "string" ? responseBodyError : void 0) || response?.statusText || "There was an error with the request.";
284
296
  const error = new Error(message);
285
297
  error.response = response;
286
298
  error.responseBody = responseBody;
@@ -2149,7 +2161,8 @@ function ThemeIdProvider({ children, id }) {
2149
2161
  });
2150
2162
  }
2151
2163
  const useThemeRootProps = () => {
2152
- return createThemeRootProps(useContext(ThemeIdContext));
2164
+ const id = useContext(ThemeIdContext);
2165
+ return createThemeRootProps(id);
2153
2166
  };
2154
2167
  /**
2155
2168
  * Shared provider-shell theming used by both RainbowKitProvider and
@@ -5943,7 +5956,7 @@ function setRainbowKitVersion({ version }) {
5943
5956
  }
5944
5957
  function useFingerprint() {
5945
5958
  const fingerprint = useCallback(() => {
5946
- setRainbowKitVersion({ version: "1.5.0" });
5959
+ setRainbowKitVersion({ version: "1.6.0" });
5947
5960
  }, []);
5948
5961
  useEffect(() => {
5949
5962
  fingerprint();
@@ -47,6 +47,7 @@ function getExplicitInjectedProvider(flag) {
47
47
  }
48
48
  function getWindowProviderNamespace(namespace) {
49
49
  const providerSearch = (provider, namespace) => {
50
+ if (provider === null || typeof provider !== "object" && typeof provider !== "function") return;
50
51
  const [property, ...path] = namespace.split(".");
51
52
  if (!property) return;
52
53
  const _provider = provider[property];
@@ -87,7 +88,7 @@ function createInjectedConnector(provider) {
87
88
  };
88
89
  }
89
90
  function getInjectedConnector({ flag, namespace, target }) {
90
- return createInjectedConnector(target ? target : getInjectedProvider({
91
+ return createInjectedConnector(typeof target !== "undefined" ? target : getInjectedProvider({
91
92
  flag,
92
93
  namespace
93
94
  }));
@@ -1,7 +1,6 @@
1
1
 
2
- import { c as walletConnectWallet, i as Wallet, n as DefaultWalletOptions } from "../../Wallet-epUweMuA.js";
2
+ import { c as walletConnectWallet, i as Wallet, n as DefaultWalletOptions } from "../../Wallet-BhiBD1Pn.js";
3
3
  import { BaseAccountParameters } from "wagmi/connectors";
4
-
5
4
  //#region src/wallets/walletConnectors/base/base.d.ts
6
5
  interface BaseOptions {
7
6
  appName: string;
@@ -22,10 +21,7 @@ declare const injectedWallet: () => Wallet;
22
21
  //#endregion
23
22
  //#region src/wallets/walletConnectors/metaMaskWallet/metaMaskWallet.d.ts
24
23
  type MetaMaskWalletOptions = DefaultWalletOptions;
25
- declare const metaMaskWallet: ({
26
- projectId,
27
- walletConnectParameters
28
- }: MetaMaskWalletOptions) => Wallet;
24
+ declare const metaMaskWallet: ({ projectId, walletConnectParameters }: MetaMaskWalletOptions) => Wallet;
29
25
  //#endregion
30
26
  //#region src/wallets/walletConnectors/safeWallet/safeWallet.d.ts
31
27
  declare const safeWallet: () => Wallet;
@@ -1,4 +1,4 @@
1
1
  "use client";
2
- import { a as injectedWallet, n as safeWallet, o as base, r as metaMaskWallet, s as baseAccount, t as walletConnectWallet } from "../../walletConnectors-DwPMzHor.js";
2
+ import { a as injectedWallet, n as safeWallet, o as base, r as metaMaskWallet, s as baseAccount, t as walletConnectWallet } from "../../walletConnectors-okw2Nbqq.js";
3
3
 
4
4
  export { base, baseAccount, injectedWallet, metaMaskWallet, safeWallet, walletConnectWallet };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "solariskit",
3
- "version": "1.5.0",
3
+ "version": "1.6.0",
4
4
  "description": "The best way to connect a wallet",
5
5
  "keywords": [
6
6
  "blockchain",
@@ -38,9 +38,9 @@
38
38
  "./components": "./dist/components/index.js"
39
39
  },
40
40
  "dependencies": {
41
- "@vanilla-extract/css": "1.20.1",
41
+ "@vanilla-extract/css": "1.21.1",
42
42
  "@vanilla-extract/dynamic": "2.1.5",
43
- "@vanilla-extract/sprinkles": "1.6.5",
43
+ "@vanilla-extract/sprinkles": "1.7.0",
44
44
  "clsx": "2.1.1",
45
45
  "cuer": "0.0.3",
46
46
  "qr": "0.5.5",
@@ -53,35 +53,35 @@
53
53
  "@safe-global/safe-apps-provider": "^0.18.6",
54
54
  "@safe-global/safe-apps-sdk": "^9.1.0",
55
55
  "@solana/connector": "^0.2.4",
56
- "@solana/kit": "^5.5.1",
56
+ "@solana/kit": "^6.10.0",
57
57
  "@tanstack/react-query": "^5.101.2",
58
58
  "@testing-library/dom": "^10.4.1",
59
59
  "@testing-library/jest-dom": "^6.9.1",
60
60
  "@testing-library/react": "^16.3.2",
61
61
  "@testing-library/user-event": "^14.6.1",
62
- "@types/node": "^24.13.2",
62
+ "@types/node": "^26.1.1",
63
63
  "@types/postcss-prefix-selector": "^1.16.3",
64
64
  "@types/react": "^19.2.17",
65
65
  "@types/react-dom": "^19.2.3",
66
66
  "@vanilla-extract/css-utils": "0.1.6",
67
67
  "@vanilla-extract/private": "1.0.9",
68
68
  "@vanilla-extract/rollup-plugin": "^1.5.3",
69
- "@vanilla-extract/vite-plugin": "^5.2.3",
69
+ "@vanilla-extract/vite-plugin": "^5.2.4",
70
70
  "@walletconnect/ethereum-provider": "^2.23.10",
71
71
  "autoprefixer": "^10.5.2",
72
72
  "jsdom": "^29.1.1",
73
- "msw": "^2.14.6",
73
+ "msw": "^2.15.0",
74
74
  "nock": "^14.0.16",
75
75
  "postcss": "^8.5.16",
76
76
  "postcss-prefix-selector": "^2.1.1",
77
77
  "react": "^19.2.7",
78
78
  "react-dom": "^19.2.7",
79
- "tsdown": "^0.22.3",
79
+ "tsdown": "^0.22.4",
80
80
  "typescript": "^6.0.3",
81
- "viem": "^2.53.1",
82
- "vite": "^8.1.0",
83
- "vitest": "^4.1.9",
84
- "wagmi": "^3.6.21",
81
+ "viem": "^2.54.6",
82
+ "vite": "^8.1.3",
83
+ "vitest": "^4.1.10",
84
+ "wagmi": "^3.7.0",
85
85
  "@workspace/typescript-config": "0.0.0"
86
86
  },
87
87
  "peerDependencies": {
@@ -89,7 +89,7 @@
89
89
  "@safe-global/safe-apps-provider": "^0.18.6",
90
90
  "@safe-global/safe-apps-sdk": "^9.1.0",
91
91
  "@solana/connector": "^0.2.4",
92
- "@solana/kit": "^5.5.1",
92
+ "@solana/kit": "^6.10.0",
93
93
  "@tanstack/react-query": ">=5.0.0",
94
94
  "@walletconnect/ethereum-provider": "^2.21.1",
95
95
  "react": "^18 || ^19",