@tuwaio/nova-connect 1.0.0-fix-test-alpha.7.eac112e → 1.0.0-fix-test-alpha.8.1eef9e0
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 +8 -64
- package/package.json +3 -3
package/README.md
CHANGED
|
@@ -57,7 +57,9 @@ yarn add @tuwaio/nova-connect @tuwaio/satellite-core @tuwaio/orbit-core @tuwaio/
|
|
|
57
57
|
```tsx
|
|
58
58
|
import { QueryClient, QueryClientProvider } from '@tanstack/react-query';
|
|
59
59
|
import { satelliteEVMAdapter } from '@tuwaio/satellite-evm';
|
|
60
|
-
import {
|
|
60
|
+
import { SatelliteConnectProvider, NovaConnectProvider } from '@tuwaio/nova-connect';
|
|
61
|
+
import { EVMWalletsWatcher } from '@tuwaio/nova-connect/evm';
|
|
62
|
+
import { SolanaWalletsWatcher } from '@tuwaio/nova-connect/solana';
|
|
61
63
|
import { initializeSolanaMobileConnectors, satelliteSolanaAdapter } from '@tuwaio/satellite-solana';
|
|
62
64
|
import { createDefaultTransports, initAllConnectors } from '@tuwaio/satellite-evm';
|
|
63
65
|
import { createConfig } from '@wagmi/core';
|
|
@@ -70,7 +72,7 @@ export const appConfig = {
|
|
|
70
72
|
};
|
|
71
73
|
|
|
72
74
|
export const solanaRPCUrls = {
|
|
73
|
-
mainnet: '
|
|
75
|
+
mainnet: 'https://api.mainnet-beta.solana.com',
|
|
74
76
|
};
|
|
75
77
|
|
|
76
78
|
export const appEVMChains = [mainnet, polygon, arbitrum] as readonly [Chain, ...Chain[]];
|
|
@@ -97,12 +99,14 @@ export function Providers({ children }: { children: ReactNode }) {
|
|
|
97
99
|
<WagmiProvider config={wagmiConfig}>
|
|
98
100
|
<QueryClientProvider client={queryClient}>
|
|
99
101
|
<SatelliteConnectProvider
|
|
100
|
-
adapters={[satelliteEVMAdapter({ wagmiConfig }), satelliteSolanaAdapter()]}
|
|
102
|
+
adapters={[satelliteEVMAdapter({ wagmiConfig }), satelliteSolanaAdapter({ rpcUrls: solanaRPCUrls })]}
|
|
101
103
|
appName={appConfig.appName}
|
|
102
104
|
>
|
|
103
105
|
<EVMWalletsWatcher />
|
|
104
106
|
<SolanaWalletsWatcher />
|
|
105
|
-
|
|
107
|
+
<NovaConnectProvider>
|
|
108
|
+
{children}
|
|
109
|
+
</NovaConnectProvider>
|
|
106
110
|
</SatelliteConnectProvider>
|
|
107
111
|
</QueryClientProvider>
|
|
108
112
|
</WagmiProvider>
|
|
@@ -132,66 +136,6 @@ function App() {
|
|
|
132
136
|
|
|
133
137
|
-----
|
|
134
138
|
|
|
135
|
-
## 🎨 Customization
|
|
136
|
-
|
|
137
|
-
Nova Connect provides three levels of customization:
|
|
138
|
-
|
|
139
|
-
### Advanced Customization
|
|
140
|
-
|
|
141
|
-
```tsx
|
|
142
|
-
<ConnectButton
|
|
143
|
-
appChains={appEVMChains}
|
|
144
|
-
solanaRPCUrls={solanaRPCUrls}
|
|
145
|
-
customization={{
|
|
146
|
-
connectButton: {
|
|
147
|
-
classNames: {
|
|
148
|
-
button: ({ buttonData }) => `btn ${buttonData.isConnected ? 'btn-connected' : 'btn-connect'}`,
|
|
149
|
-
},
|
|
150
|
-
},
|
|
151
|
-
provider: {
|
|
152
|
-
errors: {
|
|
153
|
-
position: 'bottom-right',
|
|
154
|
-
autoClose: 5000,
|
|
155
|
-
},
|
|
156
|
-
},
|
|
157
|
-
}}
|
|
158
|
-
/>
|
|
159
|
-
```
|
|
160
|
-
|
|
161
|
-
### Full Provider Customization
|
|
162
|
-
|
|
163
|
-
```tsx
|
|
164
|
-
<NovaConnectButton
|
|
165
|
-
appChains={appEVMChains}
|
|
166
|
-
solanaRPCUrls={solanaRPCUrls}
|
|
167
|
-
customization={{
|
|
168
|
-
provider: {
|
|
169
|
-
// Custom components
|
|
170
|
-
components: {
|
|
171
|
-
ErrorsProvider: CustomErrorsProvider,
|
|
172
|
-
LabelsProvider: CustomLabelsProvider,
|
|
173
|
-
},
|
|
174
|
-
// Label customization
|
|
175
|
-
labels: {
|
|
176
|
-
merge: (defaultLabels, userLabels) => ({ ...defaultLabels, ...userLabels }),
|
|
177
|
-
transform: (mergedLabels, context) => ({
|
|
178
|
-
...mergedLabels,
|
|
179
|
-
connectWallet: context.isConnected ? 'Reconnect' : 'Connect Wallet',
|
|
180
|
-
}),
|
|
181
|
-
},
|
|
182
|
-
// Lifecycle hooks
|
|
183
|
-
initialization: {
|
|
184
|
-
onConnectionStateChange: (isConnected, wallet, context) => {
|
|
185
|
-
console.log('Connection state changed:', isConnected);
|
|
186
|
-
},
|
|
187
|
-
},
|
|
188
|
-
},
|
|
189
|
-
}}
|
|
190
|
-
/>
|
|
191
|
-
```
|
|
192
|
-
|
|
193
|
-
-----
|
|
194
|
-
|
|
195
139
|
## 🧩 Key Components
|
|
196
140
|
|
|
197
141
|
### 1. **ConnectButton**
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tuwaio/nova-connect",
|
|
3
|
-
"version": "1.0.0-fix-test-alpha.
|
|
3
|
+
"version": "1.0.0-fix-test-alpha.8.1eef9e0",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "Oleksandr Tkach",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -212,8 +212,8 @@
|
|
|
212
212
|
"tw-animate-css": "^1.4.0",
|
|
213
213
|
"typescript": "^5.9.3",
|
|
214
214
|
"tsup": "^8.5.0",
|
|
215
|
-
"@tuwaio/nova-
|
|
216
|
-
"@tuwaio/nova-
|
|
215
|
+
"@tuwaio/nova-transactions": "^1.0.0-fix-test-alpha.8.1eef9e0",
|
|
216
|
+
"@tuwaio/nova-core": "^1.0.0-fix-test-alpha.8.1eef9e0"
|
|
217
217
|
},
|
|
218
218
|
"scripts": {
|
|
219
219
|
"start": "tsup src/index.ts --watch",
|