solariskit 1.4.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.
- package/dist/ChainSelectButton-BcLkwhod.d.ts +187 -0
- package/dist/RainbowKitProvider-D6tnZRYJ.js +271 -0
- package/dist/{Wallet-epUweMuA.d.ts → Wallet-BhiBD1Pn.d.ts} +1 -5
- package/dist/WalletButton-Dc_yPK_E.d.ts +114 -0
- package/dist/components/index.d.ts +6 -126
- package/dist/components/index.js +3 -185
- package/dist/index.css +47 -47
- package/dist/index.d.ts +14 -49
- package/dist/index.js +3 -2
- package/dist/{injectedWallet-Bq0gF2WF.js → injectedWallet-CnP8-uv5.js} +19 -1
- package/dist/solana/index.d.ts +141 -0
- package/dist/solana/index.js +601 -0
- package/dist/{WalletButton-D8U16Q_4.js → useFingerprint-DGiyXD_j.js} +4583 -4593
- package/dist/{walletConnectors-C02JPPxf.js → walletConnectors-okw2Nbqq.js} +3 -2
- package/dist/wallets/walletConnectors/index.d.ts +2 -6
- package/dist/wallets/walletConnectors/index.js +1 -1
- package/package.json +26 -11
- package/dist/WalletButton-BiMfdrFz.d.ts +0 -337
|
@@ -0,0 +1,141 @@
|
|
|
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-BcLkwhod.js";
|
|
3
|
+
import React, { JSX, ReactNode } from "react";
|
|
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
|
+
import { DefaultConfigOptions } from "@solana/connector/headless";
|
|
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
|
+
//#region src/solana/types.d.ts
|
|
8
|
+
/**
|
|
9
|
+
* Network names the config surface accepts (includes the legacy
|
|
10
|
+
* "mainnet-beta" alias, unlike the library's normalized SolanaNetwork).
|
|
11
|
+
*/
|
|
12
|
+
type SolanaNetwork = NonNullable<ExtendedConnectorConfig["network"]>;
|
|
13
|
+
/** ConnectorKit configuration, minus WalletConnect (unsupported here). */
|
|
14
|
+
type SolanaConnectorConfig = Omit<ConnectorConfig, "walletConnect"> & {
|
|
15
|
+
walletConnect?: never;
|
|
16
|
+
};
|
|
17
|
+
type SolanaKitConfig = Omit<ExtendedConnectorConfig, "walletConnect"> & {
|
|
18
|
+
mobile?: NonNullable<AppProviderProps["mobile"]>;
|
|
19
|
+
walletConnect?: never;
|
|
20
|
+
};
|
|
21
|
+
/** Wallet Standard connector surfaced with plain-string ids. */
|
|
22
|
+
interface SolanaWalletConnector {
|
|
23
|
+
chains: readonly string[];
|
|
24
|
+
features: readonly string[];
|
|
25
|
+
icon: string;
|
|
26
|
+
id: string;
|
|
27
|
+
name: string;
|
|
28
|
+
ready: boolean;
|
|
29
|
+
}
|
|
30
|
+
interface SolanaKitProviderProps {
|
|
31
|
+
appInfo?: {
|
|
32
|
+
appName?: string;
|
|
33
|
+
learnMoreUrl?: string;
|
|
34
|
+
disclaimer?: DisclaimerComponent;
|
|
35
|
+
};
|
|
36
|
+
avatar?: AvatarComponent;
|
|
37
|
+
children: React.ReactNode;
|
|
38
|
+
config?: SolanaKitConfig;
|
|
39
|
+
id?: string;
|
|
40
|
+
modalSize?: ModalSizes;
|
|
41
|
+
theme?: Theme | null;
|
|
42
|
+
}
|
|
43
|
+
interface SolanaConnectButtonProps {
|
|
44
|
+
accountStatus?: ResponsiveValue<AccountStatus>;
|
|
45
|
+
label?: string;
|
|
46
|
+
showBalance?: ResponsiveValue<boolean>;
|
|
47
|
+
}
|
|
48
|
+
type SolanaChainStatus = ChainStatus;
|
|
49
|
+
interface SolanaChainSelectButtonProps {
|
|
50
|
+
chainStatus?: ResponsiveValue<SolanaChainStatus>;
|
|
51
|
+
}
|
|
52
|
+
interface SolanaWalletButtonProps {
|
|
53
|
+
connectorId?: string;
|
|
54
|
+
}
|
|
55
|
+
//#endregion
|
|
56
|
+
//#region src/solana/components/SolanaKitProvider/SolanaKitProvider.d.ts
|
|
57
|
+
declare function SolanaKitProvider({ appInfo, avatar, children, config, id, modalSize, theme }: SolanaKitProviderProps): React.JSX.Element;
|
|
58
|
+
//#endregion
|
|
59
|
+
//#region src/solana/components/SolanaConnectButton/SolanaConnectButton.d.ts
|
|
60
|
+
declare function SolanaConnectButton({ accountStatus, label, showBalance }: SolanaConnectButtonProps): React.JSX.Element | null;
|
|
61
|
+
//#endregion
|
|
62
|
+
//#region src/solana/components/SolanaChainSelectButton/SolanaChainSelectButton.d.ts
|
|
63
|
+
declare function SolanaChainSelectButton({ chainStatus }: SolanaChainSelectButtonProps): React.JSX.Element | null;
|
|
64
|
+
//#endregion
|
|
65
|
+
//#region src/solana/components/SolanaWalletButton/SolanaWalletButton.d.ts
|
|
66
|
+
interface SolanaWalletButtonRendererProps {
|
|
67
|
+
connectorId?: string;
|
|
68
|
+
children: (renderProps: {
|
|
69
|
+
connected: boolean;
|
|
70
|
+
connector: {
|
|
71
|
+
iconBackground?: string;
|
|
72
|
+
iconUrl?: string;
|
|
73
|
+
id: string;
|
|
74
|
+
name: string;
|
|
75
|
+
ready: boolean;
|
|
76
|
+
};
|
|
77
|
+
connect: () => Promise<void>;
|
|
78
|
+
error: boolean;
|
|
79
|
+
loading: boolean;
|
|
80
|
+
mounted: boolean;
|
|
81
|
+
ready: boolean;
|
|
82
|
+
}) => ReactNode;
|
|
83
|
+
}
|
|
84
|
+
declare const SolanaWalletButton: {
|
|
85
|
+
(props: SolanaWalletButtonProps): JSX.Element;
|
|
86
|
+
Custom: (props: SolanaWalletButtonRendererProps) => ReactNode;
|
|
87
|
+
};
|
|
88
|
+
//#endregion
|
|
89
|
+
//#region src/solana/components/SolanaKitProvider/SolanaModalContext.d.ts
|
|
90
|
+
declare function useSolanaAccountModal(): {
|
|
91
|
+
accountModalOpen: boolean;
|
|
92
|
+
openAccountModal: (() => void) | undefined;
|
|
93
|
+
};
|
|
94
|
+
declare function useSolanaChainModal(): {
|
|
95
|
+
chainModalOpen: boolean;
|
|
96
|
+
openChainModal: (() => void) | undefined;
|
|
97
|
+
};
|
|
98
|
+
declare function useSolanaConnectModal(): {
|
|
99
|
+
connectModalOpen: boolean;
|
|
100
|
+
openConnectModal: (() => void) | undefined;
|
|
101
|
+
};
|
|
102
|
+
//#endregion
|
|
103
|
+
//#region src/solana/config/getDefaultSolanaConfig.d.ts
|
|
104
|
+
/** ConnectorKit's default-config options, minus WalletConnect (unsupported here). */
|
|
105
|
+
type SolanaDefaultConfigOptions = Omit<DefaultConfigOptions, "walletConnect"> & {
|
|
106
|
+
walletConnect?: never;
|
|
107
|
+
};
|
|
108
|
+
type SolanaDefaultConfig = SolanaKitConfig;
|
|
109
|
+
type SolanaDefaultConnectorConfig = SolanaDefaultConfig;
|
|
110
|
+
declare function getDefaultSolanaConfig(options: SolanaDefaultConfigOptions): SolanaDefaultConfig;
|
|
111
|
+
//#endregion
|
|
112
|
+
//#region src/solana/hooks.d.ts
|
|
113
|
+
interface SolanaWalletAccount {
|
|
114
|
+
address: string;
|
|
115
|
+
label?: string;
|
|
116
|
+
}
|
|
117
|
+
interface SolanaWalletState {
|
|
118
|
+
account: string | null;
|
|
119
|
+
accounts: SolanaWalletAccount[];
|
|
120
|
+
connectorId: string | null;
|
|
121
|
+
error: Error | null;
|
|
122
|
+
isConnected: boolean;
|
|
123
|
+
isConnecting: boolean;
|
|
124
|
+
isError: boolean;
|
|
125
|
+
status: "disconnected" | "connecting" | "connected" | "error";
|
|
126
|
+
}
|
|
127
|
+
declare function useSolanaWallet(): SolanaWalletState;
|
|
128
|
+
declare function useSolanaWalletConnectors(): SolanaWalletConnector[];
|
|
129
|
+
declare function useSolanaConnectWallet(): {
|
|
130
|
+
connect: (connectorId: string, options?: SolanaConnectOptions) => Promise<void>;
|
|
131
|
+
error: Error | null;
|
|
132
|
+
isConnecting: boolean;
|
|
133
|
+
resetError: () => void;
|
|
134
|
+
};
|
|
135
|
+
declare function useSolanaDisconnectWallet(): SolanaDisconnectWalletReturn;
|
|
136
|
+
declare function useSolanaCluster(): SolanaClusterReturn;
|
|
137
|
+
declare function useSolanaBalance(options?: SolanaBalanceOptions): SolanaBalanceReturn;
|
|
138
|
+
declare function useSolanaClient(): SolanaClientReturn;
|
|
139
|
+
declare function useSolanaKitTransactionSigner(): SolanaKitTransactionSignerReturn;
|
|
140
|
+
//#endregion
|
|
141
|
+
export { type SolanaBalanceOptions, type SolanaBalanceReturn, SolanaChainSelectButton, type SolanaChainSelectButtonProps, type SolanaChainStatus, type SolanaClient, type SolanaClientReturn, type SolanaCluster, type SolanaClusterId, type SolanaClusterReturn, type SolanaClusterType, type SolanaCoinGeckoConfig, SolanaConnectButton, type SolanaConnectButtonProps, type SolanaConnectOptions, type SolanaConnectorConfig, type SolanaDefaultConfig, type SolanaDefaultConfigOptions, type SolanaDefaultConnectorConfig, type SolanaDisconnectWalletReturn, type SolanaKitConfig, SolanaKitProvider, type SolanaKitProviderProps, type SolanaKitTransactionSignerReturn, type SolanaMobileWalletAdapterConfig, type SolanaNetwork, type SolanaStorageAdapter, type SolanaTokenBalance, SolanaWalletButton, type SolanaWalletButtonProps, type SolanaWalletButtonRendererProps, type SolanaWalletConnector, type SolanaWalletDisplayConfig, getDefaultSolanaConfig, useSolanaAccountModal, useSolanaBalance, useSolanaChainModal, useSolanaClient, useSolanaCluster, useSolanaConnectModal, useSolanaConnectWallet, useSolanaDisconnectWallet, useSolanaKitTransactionSigner, useSolanaWallet, useSolanaWalletConnectors };
|