@phantom/react-sdk 1.0.0-beta.14 → 1.0.0-beta.15
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 +23 -10
- package/package.json +2 -2
package/README.md
CHANGED
|
@@ -136,26 +136,39 @@ function WalletExample() {
|
|
|
136
136
|
|
|
137
137
|
### Connection Options
|
|
138
138
|
|
|
139
|
-
|
|
139
|
+
The `connect()` method automatically switches between providers based on the authentication method you specify:
|
|
140
140
|
|
|
141
141
|
```tsx
|
|
142
142
|
const { connect } = useConnect();
|
|
143
143
|
|
|
144
|
-
//
|
|
144
|
+
// Connect with current provider (no switching)
|
|
145
145
|
await connect();
|
|
146
146
|
|
|
147
|
-
//
|
|
147
|
+
// Connect with injected provider (Phantom extension)
|
|
148
|
+
// Automatically switches to injected provider if not already using it
|
|
148
149
|
await connect({
|
|
149
|
-
|
|
150
|
-
provider: "google",
|
|
151
|
-
},
|
|
150
|
+
provider: "injected",
|
|
152
151
|
});
|
|
153
152
|
|
|
154
|
-
//
|
|
153
|
+
// Connect with Google authentication (embedded provider)
|
|
154
|
+
// Automatically switches to embedded provider if not already using it
|
|
155
155
|
await connect({
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
156
|
+
provider: "google",
|
|
157
|
+
});
|
|
158
|
+
|
|
159
|
+
// Connect with Apple authentication (embedded provider)
|
|
160
|
+
// Automatically switches to embedded provider if not already using it
|
|
161
|
+
await connect({
|
|
162
|
+
provider: "apple",
|
|
163
|
+
});
|
|
164
|
+
|
|
165
|
+
|
|
166
|
+
|
|
167
|
+
// Connect with Phantom authentication (embedded provider)
|
|
168
|
+
// Uses Phantom extension or mobile app for authentication
|
|
169
|
+
// Automatically switches to embedded provider if not already using it
|
|
170
|
+
await connect({
|
|
171
|
+
provider: "phantom",
|
|
159
172
|
});
|
|
160
173
|
```
|
|
161
174
|
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@phantom/react-sdk",
|
|
3
|
-
"version": "1.0.0-beta.
|
|
3
|
+
"version": "1.0.0-beta.15",
|
|
4
4
|
"main": "dist/index.js",
|
|
5
5
|
"module": "dist/index.mjs",
|
|
6
6
|
"types": "dist/index.d.ts",
|
|
@@ -26,7 +26,7 @@
|
|
|
26
26
|
"prettier": "prettier --write \"src/**/*.{ts,tsx}\""
|
|
27
27
|
},
|
|
28
28
|
"dependencies": {
|
|
29
|
-
"@phantom/browser-sdk": "^1.0.0-beta.
|
|
29
|
+
"@phantom/browser-sdk": "^1.0.0-beta.15",
|
|
30
30
|
"@phantom/chain-interfaces": "^1.0.0-beta.7",
|
|
31
31
|
"@phantom/constants": "^1.0.0-beta.7"
|
|
32
32
|
},
|