@tuwaio/satellite-react 0.4.5 → 0.4.7

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.
Files changed (2) hide show
  1. package/README.md +23 -8
  2. package/package.json +12 -12
package/README.md CHANGED
@@ -107,16 +107,31 @@ function ExampleGettingActiveWalletFromStore() {
107
107
 
108
108
  ---
109
109
 
110
- ### Core Components
110
+ ## 🔐 Sign-In With X (SIWX) Integration
111
111
 
112
- 1. **Store Access**
113
- - `useSatelliteConnectStore`: Access to satellite connect store with full type safety
114
- - Provides access to wallet state, connection methods, and chain management
112
+ The `EVMConnectorsWatcher` and `SolanaConnectorsWatcher` components accept the `siwx` session state from `@tuwaio/siwx-react`. The watchers automatically monitor connection parity and disconnect the wallet if account switching occurs without a matching session, or if the user rejects signing:
115
113
 
116
- 2. **Provider Components**
117
- - `SatelliteConnectProvider`: Global context provider with all necessary configurations
118
- - `EVMConnectorsWatcher`: EVM connection state management
119
- - `SolanaConnectorsWatcher`: Solana connection state management
114
+ ```tsx
115
+ import { useSiwxSession } from '@tuwaio/siwx-react';
116
+ import { SatelliteConnectProvider } from '@tuwaio/satellite-react';
117
+ import { EVMConnectorsWatcher } from '@tuwaio/satellite-react/evm';
118
+ import { SolanaConnectorsWatcher } from '@tuwaio/satellite-react/solana';
119
+
120
+ export function Providers({ children }: { children: ReactNode }) {
121
+ const siwxSession = useSiwxSession();
122
+
123
+ return (
124
+ <SatelliteConnectProvider
125
+ adapter={[satelliteEVMAdapter(wagmiConfig, appEVMChains), satelliteSolanaAdapter({ rpcUrls: solanaRPCUrls })]}
126
+ autoConnect={true}
127
+ >
128
+ <EVMConnectorsWatcher wagmiConfig={wagmiConfig} siwx={siwxSession} />
129
+ <SolanaConnectorsWatcher siwx={siwxSession} />
130
+ {children}
131
+ </SatelliteConnectProvider>
132
+ );
133
+ }
134
+ ```
120
135
 
121
136
  ---
122
137
 
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tuwaio/satellite-react",
3
- "version": "0.4.5",
3
+ "version": "0.4.7",
4
4
  "private": false,
5
5
  "author": "Oleksandr Tkach",
6
6
  "license": "Apache-2.0",
@@ -66,10 +66,10 @@
66
66
  "@tuwaio/satellite-core": ">=0.3.2",
67
67
  "@tuwaio/satellite-evm": ">=0.3.2",
68
68
  "@tuwaio/satellite-solana": ">=0.3.2",
69
- "@tuwaio/siwx-core": ">=0.1.0",
70
- "@tuwaio/siwx-react": ">=0.1.0",
71
- "@tuwaio/siwx-evm": ">=0.1.0",
72
- "@tuwaio/siwx-solana": ">=0.1.2",
69
+ "@tuwaio/siwx-core": ">=0.2.0",
70
+ "@tuwaio/siwx-react": ">=0.2.0",
71
+ "@tuwaio/siwx-evm": ">=0.2.0",
72
+ "@tuwaio/siwx-solana": ">=0.2.0",
73
73
  "@wagmi/core": "3.x.x",
74
74
  "viem": "2.x.x",
75
75
  "@wallet-standard/react": "1.x.x",
@@ -136,10 +136,10 @@
136
136
  "@tuwaio/orbit-core": "^0.2.15",
137
137
  "@tuwaio/orbit-evm": "^0.2.22",
138
138
  "@tuwaio/orbit-solana": "^0.2.13",
139
- "@tuwaio/siwx-core": "^0.1.0",
140
- "@tuwaio/siwx-react": "^0.1.1",
141
- "@tuwaio/siwx-evm": "^0.1.1",
142
- "@tuwaio/siwx-solana": "^0.1.2",
139
+ "@tuwaio/siwx-core": "^0.2.0",
140
+ "@tuwaio/siwx-react": "^0.2.0",
141
+ "@tuwaio/siwx-evm": "^0.2.0",
142
+ "@tuwaio/siwx-solana": "^0.2.0",
143
143
  "@wagmi/core": "^3.6.4",
144
144
  "@wallet-standard/react": "^1.0.3",
145
145
  "@wallet-standard/app": "^1.1.1",
@@ -155,9 +155,9 @@
155
155
  "viem": "^2.55.11",
156
156
  "typescript": "^6.0.3",
157
157
  "zustand": "^5.0.14",
158
- "@tuwaio/satellite-core": "^0.4.1",
159
- "@tuwaio/satellite-evm": "^0.4.2",
160
- "@tuwaio/satellite-solana": "^0.4.4"
158
+ "@tuwaio/satellite-core": "^0.4.2",
159
+ "@tuwaio/satellite-evm": "^0.4.3",
160
+ "@tuwaio/satellite-solana": "^0.4.7"
161
161
  },
162
162
  "scripts": {
163
163
  "start": "tsup src/index.ts --watch",