@orbi-wallet/sdk 0.0.3 → 0.0.4
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/dist/client.d.ts +7 -0
- package/dist/client.js +11 -0
- package/package.json +1 -1
package/dist/client.d.ts
CHANGED
|
@@ -30,6 +30,13 @@ export declare class OrbiClient {
|
|
|
30
30
|
connect(params: {
|
|
31
31
|
redirectUrl: string;
|
|
32
32
|
}): void;
|
|
33
|
+
/**
|
|
34
|
+
* Clear the Orbi session and redirect back to your app.
|
|
35
|
+
* Call this when the user disconnects — clears the passkey session on
|
|
36
|
+
* keys.orbiwallet.xyz so the next connect() prompts for authentication again.
|
|
37
|
+
* You are responsible for clearing your own local wallet state before calling this.
|
|
38
|
+
*/
|
|
39
|
+
disconnect(redirectUrl: string): void;
|
|
33
40
|
/** Call this on your callback page after orbi.connect() redirects back. */
|
|
34
41
|
handleCallback(): Promise<{
|
|
35
42
|
walletAddress: string;
|
package/dist/client.js
CHANGED
|
@@ -64,6 +64,17 @@ class OrbiClient {
|
|
|
64
64
|
url.searchParams.set('origin', window.location.origin);
|
|
65
65
|
window.location.href = url.toString();
|
|
66
66
|
}
|
|
67
|
+
/**
|
|
68
|
+
* Clear the Orbi session and redirect back to your app.
|
|
69
|
+
* Call this when the user disconnects — clears the passkey session on
|
|
70
|
+
* keys.orbiwallet.xyz so the next connect() prompts for authentication again.
|
|
71
|
+
* You are responsible for clearing your own local wallet state before calling this.
|
|
72
|
+
*/
|
|
73
|
+
disconnect(redirectUrl) {
|
|
74
|
+
const url = new URL(`${KEYS_URL}/signout`);
|
|
75
|
+
url.searchParams.set('redirect', redirectUrl);
|
|
76
|
+
window.location.href = url.toString();
|
|
77
|
+
}
|
|
67
78
|
/** Call this on your callback page after orbi.connect() redirects back. */
|
|
68
79
|
async handleCallback() {
|
|
69
80
|
const params = new URLSearchParams(window.location.search);
|
package/package.json
CHANGED