@tuwaio/sdk 0.1.9 → 0.1.10

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 +20 -12
  2. package/package.json +11 -11
package/README.md CHANGED
@@ -24,7 +24,7 @@ It abstracts away complex dependency management (automatically handling `zustand
24
24
  - **🛡️ Strict Singleton Contexts**: Uses intelligent peer dependencies to ensure you never run into multiple instances of React or Web3 singletons.
25
25
 
26
26
  > [!WARNING]
27
- > **SIWE Deprecation Notice**: Legacy SIWE authorization flows in Satellite are **deprecated**. Use `@tuwaio/sdk/siwx` and `@tuwaio/sdk/siwx/server` for multi-chain CAIP-122 authentication.
27
+ > **SIWX Migration Notice**: Legacy SIWE authorization flows in Satellite are **deprecated**. Use `@tuwaio/sdk/siwx` and `@tuwaio/sdk/siwx/server` for multi-chain CAIP-122 authentication.
28
28
 
29
29
  ---
30
30
 
@@ -159,13 +159,16 @@ Assembling the complete multi-chain ecosystem layout. Notice how both `EVMConnec
159
159
  // src/providers/AppProviders.tsx
160
160
  'use client';
161
161
 
162
+ import { SatelliteConnectProvider } from '@tuwaio/sdk/satellite';
163
+ import { NovaConnectProvider } from '@tuwaio/sdk/nova-connect';
164
+ import { satelliteEVMAdapter } from '@tuwaio/evm-sdk/satellite';
165
+ import { EVMConnectorsWatcher } from '@tuwaio/evm-sdk/nova-connect';
162
166
  import { satelliteSolanaAdapter } from '@tuwaio/solana-sdk/satellite';
163
167
  import { SolanaConnectorsWatcher } from '@tuwaio/solana-sdk/nova-connect';
164
- import { useSiwx, useSiwxSession } from '@tuwaio/sdk/siwx';
165
- import { isSafeApp, getAdapterFromConnectorType, OrbitAdapter } from '@tuwaio/sdk/orbit';
168
+ import { useSiwxSession } from '@tuwaio/sdk/siwx';
166
169
 
167
170
  import { appEVMChains, solanaRPCUrls, wagmiConfig } from '@/configs/appConfig';
168
- import { usePulsarInMemoryStore, usePulsarStore } from '@/hooks/usePulsarStore';
171
+ import { usePulsarStore } from '@/hooks/usePulsarStore';
169
172
  import { NovaTransactionsProvider } from '@/providers/NovaTransactionsProvider';
170
173
 
171
174
  export function AppProviders({ children }: { children: React.ReactNode }) {
@@ -173,19 +176,11 @@ export function AppProviders({ children }: { children: React.ReactNode }) {
173
176
  const transactionsPool = usePulsarStore((state) => state.transactionsPool);
174
177
 
175
178
  const siwxSession = useSiwxSession();
176
- const { signIn } = useSiwx();
177
179
 
178
180
  return (
179
181
  <SatelliteConnectProvider
180
182
  adapter={[satelliteEVMAdapter(wagmiConfig, appEVMChains), satelliteSolanaAdapter({ rpcUrls: solanaRPCUrls })]}
181
183
  autoConnect={true}
182
- callbackAfterConnected={async (connection) => {
183
- const isEVM = getAdapterFromConnectorType(connection.connectorType) === OrbitAdapter.EVM;
184
- if (isEVM && isSafeApp) return;
185
-
186
- // Trigger SIWX flow
187
- await signIn();
188
- }}
189
184
  >
190
185
  <EVMConnectorsWatcher wagmiConfig={wagmiConfig} siwx={siwxSession} />
191
186
  <SolanaConnectorsWatcher siwx={siwxSession} />
@@ -200,6 +195,19 @@ export function AppProviders({ children }: { children: React.ReactNode }) {
200
195
  withImpersonated
201
196
  withBalance
202
197
  withChain
198
+ siwx={{
199
+ verifier: async (payload) => {
200
+ const res = await fetch('/api/siwx/verify', {
201
+ method: 'POST',
202
+ headers: { 'Content-Type': 'application/json' },
203
+ body: JSON.stringify(payload),
204
+ });
205
+ return res.ok ? res.json() : null;
206
+ },
207
+ destroyer: async () => {
208
+ await fetch('/api/siwx/logout', { method: 'POST' });
209
+ },
210
+ }}
203
211
  >
204
212
  {children}
205
213
  </NovaConnectProvider>
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@tuwaio/sdk",
3
- "version": "0.1.9",
3
+ "version": "0.1.10",
4
4
  "private": false,
5
5
  "author": "Oleksandr Tkach",
6
6
  "license": "Apache-2.0",
@@ -155,27 +155,27 @@
155
155
  "@heroicons/react": "^2.2.0",
156
156
  "@radix-ui/react-dialog": "^1.1.23",
157
157
  "@radix-ui/react-select": "^2.3.7",
158
- "@tuwaio/nova-connect": "^0.5.7",
159
- "@tuwaio/nova-core": "^0.5.0",
160
- "@tuwaio/nova-transactions": "^0.5.2",
158
+ "@tuwaio/nova-connect": "^0.5.8",
159
+ "@tuwaio/nova-core": "^0.5.1",
160
+ "@tuwaio/nova-transactions": "^0.5.3",
161
161
  "@tuwaio/orbit-core": "^0.2.15",
162
162
  "@tuwaio/pulsar-core": "^0.6.12",
163
163
  "@tuwaio/pulsar-react": "^0.4.9",
164
- "@tuwaio/satellite-core": "^0.4.1",
165
- "@tuwaio/satellite-react": "^0.4.6",
166
- "@tuwaio/siwx-core": "^0.1.0",
167
- "@tuwaio/siwx-react": "^0.1.1",
168
- "@tuwaio/siwx-server": "^0.1.0",
164
+ "@tuwaio/satellite-core": "^0.4.2",
165
+ "@tuwaio/satellite-react": "^0.4.7",
166
+ "@tuwaio/siwx-core": "^0.2.0",
167
+ "@tuwaio/siwx-react": "^0.2.0",
168
+ "@tuwaio/siwx-server": "^0.2.1",
169
169
  "@web3icons/common": "^0.11.49",
170
170
  "@web3icons/react": "^4.1.20",
171
171
  "clsx": "^2.1.1",
172
172
  "dayjs": "^1.11.21",
173
173
  "ethereum-blockies-base64": "^1.0.2",
174
- "framer-motion": "^13.0.0",
174
+ "framer-motion": "^13.1.0",
175
175
  "immer": "^11.1.16",
176
176
  "react-toastify": "^11.1.0",
177
177
  "tailwind-merge": "^3.6.0",
178
- "zustand": "^5.0.14"
178
+ "zustand": "^5.0.15"
179
179
  },
180
180
  "peerDependencies": {
181
181
  "react": ">=19.2.3",