@moon-x/react-sdk 0.4.0 → 0.6.0
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/index.d.mts +7 -1
- package/dist/index.d.ts +7 -1
- package/dist/index.js +2595 -2378
- package/dist/index.mjs +1592 -1390
- package/package.json +2 -2
package/dist/index.d.mts
CHANGED
|
@@ -207,6 +207,10 @@ interface MoonKeyInstance {
|
|
|
207
207
|
* requires transient activation. Throws if the user has no
|
|
208
208
|
* enrolled passkey or cancels the prompt.
|
|
209
209
|
*
|
|
210
|
+
* Pass `expiresInSecs` to request a custom token lifetime. Omitted
|
|
211
|
+
* uses the server default (5 min); the server caps it at 1 h and
|
|
212
|
+
* rejects larger values.
|
|
213
|
+
*
|
|
210
214
|
* @example
|
|
211
215
|
* const { presenceToken } = await getPresenceToken();
|
|
212
216
|
* await fetch('/api/sensitive', {
|
|
@@ -214,7 +218,9 @@ interface MoonKeyInstance {
|
|
|
214
218
|
* headers: { 'X-MoonX-Presence': presenceToken },
|
|
215
219
|
* });
|
|
216
220
|
*/
|
|
217
|
-
getPresenceToken: (
|
|
221
|
+
getPresenceToken: (options?: {
|
|
222
|
+
expiresInSecs?: number;
|
|
223
|
+
}) => Promise<{
|
|
218
224
|
presenceToken: string;
|
|
219
225
|
expiresAt: number;
|
|
220
226
|
}>;
|
package/dist/index.d.ts
CHANGED
|
@@ -207,6 +207,10 @@ interface MoonKeyInstance {
|
|
|
207
207
|
* requires transient activation. Throws if the user has no
|
|
208
208
|
* enrolled passkey or cancels the prompt.
|
|
209
209
|
*
|
|
210
|
+
* Pass `expiresInSecs` to request a custom token lifetime. Omitted
|
|
211
|
+
* uses the server default (5 min); the server caps it at 1 h and
|
|
212
|
+
* rejects larger values.
|
|
213
|
+
*
|
|
210
214
|
* @example
|
|
211
215
|
* const { presenceToken } = await getPresenceToken();
|
|
212
216
|
* await fetch('/api/sensitive', {
|
|
@@ -214,7 +218,9 @@ interface MoonKeyInstance {
|
|
|
214
218
|
* headers: { 'X-MoonX-Presence': presenceToken },
|
|
215
219
|
* });
|
|
216
220
|
*/
|
|
217
|
-
getPresenceToken: (
|
|
221
|
+
getPresenceToken: (options?: {
|
|
222
|
+
expiresInSecs?: number;
|
|
223
|
+
}) => Promise<{
|
|
218
224
|
presenceToken: string;
|
|
219
225
|
expiresAt: number;
|
|
220
226
|
}>;
|