@tuwaio/solana-sdk 0.1.9 → 0.1.11
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 +15 -3
- package/package.json +9 -9
package/README.md
CHANGED
|
@@ -25,7 +25,7 @@ It completely avoids legacy `@solana/web3.js` classes and is built from the grou
|
|
|
25
25
|
- **🔐 Headless SIWX Auth**: Provides the Solana-native message signer (`createSolanaSiwxSigner`) for seamless CAIP-122 authentication (`@tuwaio/solana-sdk/siwx`).
|
|
26
26
|
|
|
27
27
|
> [!WARNING]
|
|
28
|
-
> **
|
|
28
|
+
> **SIWX Migration Notice**: Legacy SIWE authorization flows in Satellite are **deprecated**. Migrate to `@tuwaio/solana-sdk/siwx` (`createSolanaSiwxSigner`) and `@tuwaio/sdk/siwx/server` for multi-chain CAIP-122 authentication.
|
|
29
29
|
|
|
30
30
|
---
|
|
31
31
|
|
|
@@ -136,6 +136,7 @@ import { SatelliteConnectProvider } from '@tuwaio/sdk/satellite';
|
|
|
136
136
|
import { NovaConnectProvider } from '@tuwaio/sdk/nova-connect';
|
|
137
137
|
import { satelliteSolanaAdapter } from '@tuwaio/solana-sdk/satellite';
|
|
138
138
|
import { SolanaConnectorsWatcher } from '@tuwaio/solana-sdk/nova-connect';
|
|
139
|
+
import { useSiwxSession } from '@tuwaio/sdk/siwx';
|
|
139
140
|
|
|
140
141
|
import { solanaRPCUrls } from '@/configs/appConfig';
|
|
141
142
|
import { usePulsarStore } from '@/hooks/usePulsarStore';
|
|
@@ -144,20 +145,31 @@ import { NovaTransactionsProvider } from '@/providers/NovaTransactionsProvider';
|
|
|
144
145
|
export function AppProviders({ children }: { children: React.ReactNode }) {
|
|
145
146
|
const getAdapter = usePulsarStore((s) => s.getAdapter);
|
|
146
147
|
const transactionsPool = usePulsarStore((s) => s.transactionsPool);
|
|
148
|
+
const siwxSession = useSiwxSession();
|
|
147
149
|
|
|
148
150
|
return (
|
|
149
151
|
<SatelliteConnectProvider adapter={[satelliteSolanaAdapter({ rpcUrls: solanaRPCUrls })]} autoConnect={true}>
|
|
150
|
-
<SolanaConnectorsWatcher />
|
|
152
|
+
<SolanaConnectorsWatcher siwx={siwxSession} />
|
|
151
153
|
|
|
152
154
|
<NovaTransactionsProvider />
|
|
153
155
|
|
|
154
156
|
<NovaConnectProvider
|
|
155
157
|
solanaRPCUrls={solanaRPCUrls}
|
|
156
158
|
transactionPool={transactionsPool}
|
|
157
|
-
pulsarAdapter={getAdapter()
|
|
159
|
+
pulsarAdapter={getAdapter()}
|
|
158
160
|
withImpersonated
|
|
159
161
|
withBalance
|
|
160
162
|
withChain
|
|
163
|
+
siwx={{
|
|
164
|
+
verifier: async (payload) => {
|
|
165
|
+
const res = await fetch('/api/siwx/verify', {
|
|
166
|
+
method: 'POST',
|
|
167
|
+
headers: { 'Content-Type': 'application/json' },
|
|
168
|
+
body: JSON.stringify(payload),
|
|
169
|
+
});
|
|
170
|
+
return res.ok ? res.json() : null;
|
|
171
|
+
},
|
|
172
|
+
}}
|
|
161
173
|
>
|
|
162
174
|
{children}
|
|
163
175
|
</NovaConnectProvider>
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@tuwaio/solana-sdk",
|
|
3
|
-
"version": "0.1.
|
|
3
|
+
"version": "0.1.11",
|
|
4
4
|
"private": false,
|
|
5
5
|
"author": "Oleksandr Tkach",
|
|
6
6
|
"license": "Apache-2.0",
|
|
@@ -99,11 +99,11 @@
|
|
|
99
99
|
"dependencies": {
|
|
100
100
|
"@tuwaio/orbit-solana": "^0.2.13",
|
|
101
101
|
"@tuwaio/pulsar-solana": "^0.6.10",
|
|
102
|
-
"@tuwaio/satellite-solana": "^0.4.
|
|
103
|
-
"@tuwaio/siwx-solana": "^0.
|
|
102
|
+
"@tuwaio/satellite-solana": "^0.4.7",
|
|
103
|
+
"@tuwaio/siwx-solana": "^0.2.0"
|
|
104
104
|
},
|
|
105
105
|
"peerDependencies": {
|
|
106
|
-
"@tuwaio/nova-connect": "^0.5.
|
|
106
|
+
"@tuwaio/nova-connect": "^0.5.7",
|
|
107
107
|
"@tuwaio/satellite-core": "^0.4.1",
|
|
108
108
|
"@tuwaio/satellite-react": "^0.4.5",
|
|
109
109
|
"@wallet-standard/app": "1.1.x",
|
|
@@ -114,12 +114,12 @@
|
|
|
114
114
|
"@wallet-standard/ui": "1.x.x",
|
|
115
115
|
"@wallet-standard/ui-registry": "1.x.x",
|
|
116
116
|
"gill": ">=0.14",
|
|
117
|
-
"@tuwaio/sdk": "^0.1.
|
|
117
|
+
"@tuwaio/sdk": "^0.1.10"
|
|
118
118
|
},
|
|
119
119
|
"devDependencies": {
|
|
120
|
-
"@tuwaio/nova-connect": "^0.5.
|
|
121
|
-
"@tuwaio/satellite-core": "^0.4.
|
|
122
|
-
"@tuwaio/satellite-react": "^0.4.
|
|
120
|
+
"@tuwaio/nova-connect": "^0.5.8",
|
|
121
|
+
"@tuwaio/satellite-core": "^0.4.2",
|
|
122
|
+
"@tuwaio/satellite-react": "^0.4.7",
|
|
123
123
|
"@wallet-standard/app": "^1.1.1",
|
|
124
124
|
"@wallet-standard/base": "^1.1.1",
|
|
125
125
|
"@wallet-standard/core": "^1.1.2",
|
|
@@ -130,7 +130,7 @@
|
|
|
130
130
|
"gill": "^0.14.0",
|
|
131
131
|
"tsup": "^8.5.1",
|
|
132
132
|
"typescript": "^6.0.3",
|
|
133
|
-
"@tuwaio/sdk": "^0.1.
|
|
133
|
+
"@tuwaio/sdk": "^0.1.10"
|
|
134
134
|
},
|
|
135
135
|
"scripts": {
|
|
136
136
|
"start": "tsup --watch",
|