@swype-org/react-sdk 0.1.27 → 0.1.29

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.cts CHANGED
@@ -162,6 +162,18 @@ interface Destination {
162
162
  symbol: string;
163
163
  };
164
164
  }
165
+ /** Merchant-signed authorization envelope required for transfer creation. */
166
+ interface MerchantAuthorization {
167
+ merchantId: string;
168
+ payload: string;
169
+ signature: string;
170
+ }
171
+ /** Public key metadata used to verify merchant-signed payment links. */
172
+ interface MerchantPublicKey {
173
+ merchantId: string;
174
+ algorithm: string;
175
+ publicKey: string;
176
+ }
165
177
  /** List response wrapper */
166
178
  interface ListResponse<T> {
167
179
  items: T[];
@@ -274,6 +286,75 @@ declare function useSwypeDepositAmount(): {
274
286
  setAmount: (amount: number | null) => void;
275
287
  };
276
288
 
289
+ declare function fetchProviders(apiBaseUrl: string, token: string): Promise<Provider[]>;
290
+ declare function fetchChains(apiBaseUrl: string, token: string): Promise<Chain[]>;
291
+ declare function fetchAccounts(apiBaseUrl: string, token: string, credentialId: string): Promise<Account[]>;
292
+ interface CreateTransferParams {
293
+ /** Caller-supplied UUID v4 for idempotency. If omitted, a random UUID is generated. */
294
+ id?: string;
295
+ credentialId: string;
296
+ merchantAuthorization?: MerchantAuthorization;
297
+ sourceType: SourceType;
298
+ sourceId: string;
299
+ destination: Destination;
300
+ amount: number;
301
+ currency?: string;
302
+ }
303
+ declare function createTransfer(apiBaseUrl: string, token: string, params: CreateTransferParams): Promise<Transfer>;
304
+ declare function fetchMerchantPublicKey(apiBaseUrl: string, merchantId: string): Promise<MerchantPublicKey>;
305
+ declare function fetchTransfer(apiBaseUrl: string, token: string, transferId: string, authorizationSessionToken?: string): Promise<Transfer>;
306
+ /**
307
+ * Submit a passkey-signed UserOperation for a transfer.
308
+ * PATCH /v1/transfers/{transferId}
309
+ */
310
+ declare function signTransfer(apiBaseUrl: string, token: string, transferId: string, signedUserOp: Record<string, unknown>, authorizationSessionToken?: string): Promise<Transfer>;
311
+ declare function fetchAuthorizationSession(apiBaseUrl: string, sessionId: string): Promise<AuthorizationSessionDetail>;
312
+ /**
313
+ * Registers a WebAuthn passkey for the authenticated user.
314
+ * POST /v1/users/config/passkey
315
+ */
316
+ declare function registerPasskey(apiBaseUrl: string, token: string, credentialId: string, publicKey: string): Promise<void>;
317
+ /**
318
+ * Fetches the authenticated user's config, including passkey status.
319
+ * GET /v1/users/config
320
+ */
321
+ declare function fetchUserConfig(apiBaseUrl: string, token: string): Promise<{
322
+ id: string;
323
+ config: UserConfig;
324
+ }>;
325
+ declare function updateUserConfig(apiBaseUrl: string, token: string, config: {
326
+ defaultAllowance: number;
327
+ }): Promise<void>;
328
+ /**
329
+ * Updates the user's default allowance, authenticated by session ID.
330
+ * PATCH /v1/authorization-sessions/{id}/user-config
331
+ *
332
+ * This does not require a bearer token — the session ID itself serves
333
+ * as proof of authorization.
334
+ */
335
+ declare function updateUserConfigBySession(apiBaseUrl: string, sessionId: string, config: {
336
+ defaultAllowance: number;
337
+ }): Promise<void>;
338
+ declare function reportActionCompletion(apiBaseUrl: string, actionId: string, result: Record<string, unknown>): Promise<AuthorizationSessionDetail>;
339
+
340
+ type api_CreateTransferParams = CreateTransferParams;
341
+ declare const api_createTransfer: typeof createTransfer;
342
+ declare const api_fetchAccounts: typeof fetchAccounts;
343
+ declare const api_fetchAuthorizationSession: typeof fetchAuthorizationSession;
344
+ declare const api_fetchChains: typeof fetchChains;
345
+ declare const api_fetchMerchantPublicKey: typeof fetchMerchantPublicKey;
346
+ declare const api_fetchProviders: typeof fetchProviders;
347
+ declare const api_fetchTransfer: typeof fetchTransfer;
348
+ declare const api_fetchUserConfig: typeof fetchUserConfig;
349
+ declare const api_registerPasskey: typeof registerPasskey;
350
+ declare const api_reportActionCompletion: typeof reportActionCompletion;
351
+ declare const api_signTransfer: typeof signTransfer;
352
+ declare const api_updateUserConfig: typeof updateUserConfig;
353
+ declare const api_updateUserConfigBySession: typeof updateUserConfigBySession;
354
+ declare namespace api {
355
+ export { type api_CreateTransferParams as CreateTransferParams, api_createTransfer as createTransfer, api_fetchAccounts as fetchAccounts, api_fetchAuthorizationSession as fetchAuthorizationSession, api_fetchChains as fetchChains, api_fetchMerchantPublicKey as fetchMerchantPublicKey, api_fetchProviders as fetchProviders, api_fetchTransfer as fetchTransfer, api_fetchUserConfig as fetchUserConfig, api_registerPasskey as registerPasskey, api_reportActionCompletion as reportActionCompletion, api_signTransfer as signTransfer, api_updateUserConfig as updateUserConfig, api_updateUserConfigBySession as updateUserConfigBySession };
356
+ }
357
+
277
358
  interface SwypePaymentProps {
278
359
  /**
279
360
  * Where the funds go -- controlled by the host app (merchant).
@@ -297,8 +378,18 @@ interface SwypePaymentProps {
297
378
  * wallet extensions are unavailable.
298
379
  */
299
380
  useWalletConnector?: boolean;
381
+ /**
382
+ * Caller-supplied UUID v4 used as the transfer ID for idempotency.
383
+ *
384
+ * When provided, the transfer is created with this ID instead of a
385
+ * randomly generated one. This allows callers to safely retry the payment
386
+ * flow without creating duplicate transfers.
387
+ */
388
+ idempotencyKey?: string;
389
+ /** Merchant-signed transfer authorization envelope required by the API. */
390
+ merchantAuthorization?: CreateTransferParams['merchantAuthorization'];
300
391
  }
301
- declare function SwypePayment({ destination, onComplete, onError, useWalletConnector, }: SwypePaymentProps): react_jsx_runtime.JSX.Element | null;
392
+ declare function SwypePayment({ destination, onComplete, onError, useWalletConnector, idempotencyKey, merchantAuthorization, }: SwypePaymentProps): react_jsx_runtime.JSX.Element | null;
302
393
 
303
394
  type AccessTokenGetter = () => Promise<string | null | undefined>;
304
395
  /**
@@ -320,17 +411,20 @@ declare function createPasskeyCredential(params: {
320
411
  publicKey: string;
321
412
  }>;
322
413
  /**
323
- * Checks whether the current device's platform authenticator holds a passkey
324
- * matching the given credential ID.
325
- *
326
- * Uses `navigator.credentials.get()` with a throwaway challenge and a short
327
- * timeout. If the authenticator responds, the device has the key. If it
328
- * throws (NotAllowedError, timeout, etc.), the device does not.
329
- *
330
- * @param credentialId - Base64-encoded WebAuthn credential ID from the server.
331
- * @returns `true` if the device can authenticate with this credential.
414
+ * @deprecated Use {@link findDevicePasskey} instead, which checks all
415
+ * credentials in a single WebAuthn call.
332
416
  */
333
417
  declare function deviceHasPasskey(credentialId: string): Promise<boolean>;
418
+ /**
419
+ * Determines which (if any) of the given server-registered passkeys exists on
420
+ * the current device. All credential IDs are passed in a single
421
+ * `navigator.credentials.get()` call so the browser shows at most one prompt
422
+ * and the platform authenticator automatically selects the matching key.
423
+ *
424
+ * @param credentialIds - Base64-encoded WebAuthn credential IDs from the server.
425
+ * @returns The matching credential ID, or `null` if none are on this device.
426
+ */
427
+ declare function findDevicePasskey(credentialIds: string[]): Promise<string | null>;
334
428
  interface UseTransferPollingResult {
335
429
  transfer: Transfer | null;
336
430
  error: string | null;
@@ -409,68 +503,4 @@ interface UseTransferSigningOptions {
409
503
  */
410
504
  declare function useTransferSigning(pollIntervalMs?: number, options?: UseTransferSigningOptions): UseTransferSigningResult;
411
505
 
412
- declare function fetchProviders(apiBaseUrl: string, token: string): Promise<Provider[]>;
413
- declare function fetchChains(apiBaseUrl: string, token: string): Promise<Chain[]>;
414
- declare function fetchAccounts(apiBaseUrl: string, token: string, credentialId: string): Promise<Account[]>;
415
- interface CreateTransferParams {
416
- credentialId: string;
417
- sourceType: SourceType;
418
- sourceId: string;
419
- destination: Destination;
420
- amount: number;
421
- currency?: string;
422
- }
423
- declare function createTransfer(apiBaseUrl: string, token: string, params: CreateTransferParams): Promise<Transfer>;
424
- declare function fetchTransfer(apiBaseUrl: string, token: string, transferId: string, authorizationSessionToken?: string): Promise<Transfer>;
425
- /**
426
- * Submit a passkey-signed UserOperation for a transfer.
427
- * PATCH /v1/transfers/{transferId}
428
- */
429
- declare function signTransfer(apiBaseUrl: string, token: string, transferId: string, signedUserOp: Record<string, unknown>, authorizationSessionToken?: string): Promise<Transfer>;
430
- declare function fetchAuthorizationSession(apiBaseUrl: string, sessionId: string): Promise<AuthorizationSessionDetail>;
431
- /**
432
- * Registers a WebAuthn passkey for the authenticated user.
433
- * POST /v1/users/config/passkey
434
- */
435
- declare function registerPasskey(apiBaseUrl: string, token: string, credentialId: string, publicKey: string): Promise<void>;
436
- /**
437
- * Fetches the authenticated user's config, including passkey status.
438
- * GET /v1/users/config
439
- */
440
- declare function fetchUserConfig(apiBaseUrl: string, token: string): Promise<{
441
- id: string;
442
- config: UserConfig;
443
- }>;
444
- declare function updateUserConfig(apiBaseUrl: string, token: string, config: {
445
- defaultAllowance: number;
446
- }): Promise<void>;
447
- /**
448
- * Updates the user's default allowance, authenticated by session ID.
449
- * PATCH /v1/authorization-sessions/{id}/user-config
450
- *
451
- * This does not require a bearer token — the session ID itself serves
452
- * as proof of authorization.
453
- */
454
- declare function updateUserConfigBySession(apiBaseUrl: string, sessionId: string, config: {
455
- defaultAllowance: number;
456
- }): Promise<void>;
457
- declare function reportActionCompletion(apiBaseUrl: string, actionId: string, result: Record<string, unknown>): Promise<AuthorizationSessionDetail>;
458
-
459
- type api_CreateTransferParams = CreateTransferParams;
460
- declare const api_createTransfer: typeof createTransfer;
461
- declare const api_fetchAccounts: typeof fetchAccounts;
462
- declare const api_fetchAuthorizationSession: typeof fetchAuthorizationSession;
463
- declare const api_fetchChains: typeof fetchChains;
464
- declare const api_fetchProviders: typeof fetchProviders;
465
- declare const api_fetchTransfer: typeof fetchTransfer;
466
- declare const api_fetchUserConfig: typeof fetchUserConfig;
467
- declare const api_registerPasskey: typeof registerPasskey;
468
- declare const api_reportActionCompletion: typeof reportActionCompletion;
469
- declare const api_signTransfer: typeof signTransfer;
470
- declare const api_updateUserConfig: typeof updateUserConfig;
471
- declare const api_updateUserConfigBySession: typeof updateUserConfigBySession;
472
- declare namespace api {
473
- export { type api_CreateTransferParams as CreateTransferParams, api_createTransfer as createTransfer, api_fetchAccounts as fetchAccounts, api_fetchAuthorizationSession as fetchAuthorizationSession, api_fetchChains as fetchChains, api_fetchProviders as fetchProviders, api_fetchTransfer as fetchTransfer, api_fetchUserConfig as fetchUserConfig, api_registerPasskey as registerPasskey, api_reportActionCompletion as reportActionCompletion, api_signTransfer as signTransfer, api_updateUserConfig as updateUserConfig, api_updateUserConfigBySession as updateUserConfigBySession };
474
- }
475
-
476
- export { type Account, type ActionExecutionResult, type AdvancedSettings, type Amount, type AuthorizationAction, type AuthorizationSession, type AuthorizationSessionDetail, type Chain, type Destination, type ErrorResponse, type ListResponse, type PaymentStep, type Provider, type SourceOption, type SourceSelection, type SourceType, SwypePayment, type SwypePaymentProps, SwypeProvider, type SwypeProviderProps, type ThemeMode, type ThemeTokens, type TokenBalance, type Transfer, type TransferDestination, type UserConfig, type Wallet, type WalletSource, type WalletToken, createPasskeyCredential, darkTheme, deviceHasPasskey, getTheme, lightTheme, api as swypeApi, useAuthorizationExecutor, useSwypeConfig, useSwypeDepositAmount, useTransferPolling, useTransferSigning };
506
+ export { type Account, type ActionExecutionResult, type AdvancedSettings, type Amount, type AuthorizationAction, type AuthorizationSession, type AuthorizationSessionDetail, type Chain, type Destination, type ErrorResponse, type ListResponse, type MerchantAuthorization, type MerchantPublicKey, type PaymentStep, type Provider, type SourceOption, type SourceSelection, type SourceType, SwypePayment, type SwypePaymentProps, SwypeProvider, type SwypeProviderProps, type ThemeMode, type ThemeTokens, type TokenBalance, type Transfer, type TransferDestination, type UserConfig, type Wallet, type WalletSource, type WalletToken, createPasskeyCredential, darkTheme, deviceHasPasskey, findDevicePasskey, getTheme, lightTheme, api as swypeApi, useAuthorizationExecutor, useSwypeConfig, useSwypeDepositAmount, useTransferPolling, useTransferSigning };
package/dist/index.d.ts CHANGED
@@ -162,6 +162,18 @@ interface Destination {
162
162
  symbol: string;
163
163
  };
164
164
  }
165
+ /** Merchant-signed authorization envelope required for transfer creation. */
166
+ interface MerchantAuthorization {
167
+ merchantId: string;
168
+ payload: string;
169
+ signature: string;
170
+ }
171
+ /** Public key metadata used to verify merchant-signed payment links. */
172
+ interface MerchantPublicKey {
173
+ merchantId: string;
174
+ algorithm: string;
175
+ publicKey: string;
176
+ }
165
177
  /** List response wrapper */
166
178
  interface ListResponse<T> {
167
179
  items: T[];
@@ -274,6 +286,75 @@ declare function useSwypeDepositAmount(): {
274
286
  setAmount: (amount: number | null) => void;
275
287
  };
276
288
 
289
+ declare function fetchProviders(apiBaseUrl: string, token: string): Promise<Provider[]>;
290
+ declare function fetchChains(apiBaseUrl: string, token: string): Promise<Chain[]>;
291
+ declare function fetchAccounts(apiBaseUrl: string, token: string, credentialId: string): Promise<Account[]>;
292
+ interface CreateTransferParams {
293
+ /** Caller-supplied UUID v4 for idempotency. If omitted, a random UUID is generated. */
294
+ id?: string;
295
+ credentialId: string;
296
+ merchantAuthorization?: MerchantAuthorization;
297
+ sourceType: SourceType;
298
+ sourceId: string;
299
+ destination: Destination;
300
+ amount: number;
301
+ currency?: string;
302
+ }
303
+ declare function createTransfer(apiBaseUrl: string, token: string, params: CreateTransferParams): Promise<Transfer>;
304
+ declare function fetchMerchantPublicKey(apiBaseUrl: string, merchantId: string): Promise<MerchantPublicKey>;
305
+ declare function fetchTransfer(apiBaseUrl: string, token: string, transferId: string, authorizationSessionToken?: string): Promise<Transfer>;
306
+ /**
307
+ * Submit a passkey-signed UserOperation for a transfer.
308
+ * PATCH /v1/transfers/{transferId}
309
+ */
310
+ declare function signTransfer(apiBaseUrl: string, token: string, transferId: string, signedUserOp: Record<string, unknown>, authorizationSessionToken?: string): Promise<Transfer>;
311
+ declare function fetchAuthorizationSession(apiBaseUrl: string, sessionId: string): Promise<AuthorizationSessionDetail>;
312
+ /**
313
+ * Registers a WebAuthn passkey for the authenticated user.
314
+ * POST /v1/users/config/passkey
315
+ */
316
+ declare function registerPasskey(apiBaseUrl: string, token: string, credentialId: string, publicKey: string): Promise<void>;
317
+ /**
318
+ * Fetches the authenticated user's config, including passkey status.
319
+ * GET /v1/users/config
320
+ */
321
+ declare function fetchUserConfig(apiBaseUrl: string, token: string): Promise<{
322
+ id: string;
323
+ config: UserConfig;
324
+ }>;
325
+ declare function updateUserConfig(apiBaseUrl: string, token: string, config: {
326
+ defaultAllowance: number;
327
+ }): Promise<void>;
328
+ /**
329
+ * Updates the user's default allowance, authenticated by session ID.
330
+ * PATCH /v1/authorization-sessions/{id}/user-config
331
+ *
332
+ * This does not require a bearer token — the session ID itself serves
333
+ * as proof of authorization.
334
+ */
335
+ declare function updateUserConfigBySession(apiBaseUrl: string, sessionId: string, config: {
336
+ defaultAllowance: number;
337
+ }): Promise<void>;
338
+ declare function reportActionCompletion(apiBaseUrl: string, actionId: string, result: Record<string, unknown>): Promise<AuthorizationSessionDetail>;
339
+
340
+ type api_CreateTransferParams = CreateTransferParams;
341
+ declare const api_createTransfer: typeof createTransfer;
342
+ declare const api_fetchAccounts: typeof fetchAccounts;
343
+ declare const api_fetchAuthorizationSession: typeof fetchAuthorizationSession;
344
+ declare const api_fetchChains: typeof fetchChains;
345
+ declare const api_fetchMerchantPublicKey: typeof fetchMerchantPublicKey;
346
+ declare const api_fetchProviders: typeof fetchProviders;
347
+ declare const api_fetchTransfer: typeof fetchTransfer;
348
+ declare const api_fetchUserConfig: typeof fetchUserConfig;
349
+ declare const api_registerPasskey: typeof registerPasskey;
350
+ declare const api_reportActionCompletion: typeof reportActionCompletion;
351
+ declare const api_signTransfer: typeof signTransfer;
352
+ declare const api_updateUserConfig: typeof updateUserConfig;
353
+ declare const api_updateUserConfigBySession: typeof updateUserConfigBySession;
354
+ declare namespace api {
355
+ export { type api_CreateTransferParams as CreateTransferParams, api_createTransfer as createTransfer, api_fetchAccounts as fetchAccounts, api_fetchAuthorizationSession as fetchAuthorizationSession, api_fetchChains as fetchChains, api_fetchMerchantPublicKey as fetchMerchantPublicKey, api_fetchProviders as fetchProviders, api_fetchTransfer as fetchTransfer, api_fetchUserConfig as fetchUserConfig, api_registerPasskey as registerPasskey, api_reportActionCompletion as reportActionCompletion, api_signTransfer as signTransfer, api_updateUserConfig as updateUserConfig, api_updateUserConfigBySession as updateUserConfigBySession };
356
+ }
357
+
277
358
  interface SwypePaymentProps {
278
359
  /**
279
360
  * Where the funds go -- controlled by the host app (merchant).
@@ -297,8 +378,18 @@ interface SwypePaymentProps {
297
378
  * wallet extensions are unavailable.
298
379
  */
299
380
  useWalletConnector?: boolean;
381
+ /**
382
+ * Caller-supplied UUID v4 used as the transfer ID for idempotency.
383
+ *
384
+ * When provided, the transfer is created with this ID instead of a
385
+ * randomly generated one. This allows callers to safely retry the payment
386
+ * flow without creating duplicate transfers.
387
+ */
388
+ idempotencyKey?: string;
389
+ /** Merchant-signed transfer authorization envelope required by the API. */
390
+ merchantAuthorization?: CreateTransferParams['merchantAuthorization'];
300
391
  }
301
- declare function SwypePayment({ destination, onComplete, onError, useWalletConnector, }: SwypePaymentProps): react_jsx_runtime.JSX.Element | null;
392
+ declare function SwypePayment({ destination, onComplete, onError, useWalletConnector, idempotencyKey, merchantAuthorization, }: SwypePaymentProps): react_jsx_runtime.JSX.Element | null;
302
393
 
303
394
  type AccessTokenGetter = () => Promise<string | null | undefined>;
304
395
  /**
@@ -320,17 +411,20 @@ declare function createPasskeyCredential(params: {
320
411
  publicKey: string;
321
412
  }>;
322
413
  /**
323
- * Checks whether the current device's platform authenticator holds a passkey
324
- * matching the given credential ID.
325
- *
326
- * Uses `navigator.credentials.get()` with a throwaway challenge and a short
327
- * timeout. If the authenticator responds, the device has the key. If it
328
- * throws (NotAllowedError, timeout, etc.), the device does not.
329
- *
330
- * @param credentialId - Base64-encoded WebAuthn credential ID from the server.
331
- * @returns `true` if the device can authenticate with this credential.
414
+ * @deprecated Use {@link findDevicePasskey} instead, which checks all
415
+ * credentials in a single WebAuthn call.
332
416
  */
333
417
  declare function deviceHasPasskey(credentialId: string): Promise<boolean>;
418
+ /**
419
+ * Determines which (if any) of the given server-registered passkeys exists on
420
+ * the current device. All credential IDs are passed in a single
421
+ * `navigator.credentials.get()` call so the browser shows at most one prompt
422
+ * and the platform authenticator automatically selects the matching key.
423
+ *
424
+ * @param credentialIds - Base64-encoded WebAuthn credential IDs from the server.
425
+ * @returns The matching credential ID, or `null` if none are on this device.
426
+ */
427
+ declare function findDevicePasskey(credentialIds: string[]): Promise<string | null>;
334
428
  interface UseTransferPollingResult {
335
429
  transfer: Transfer | null;
336
430
  error: string | null;
@@ -409,68 +503,4 @@ interface UseTransferSigningOptions {
409
503
  */
410
504
  declare function useTransferSigning(pollIntervalMs?: number, options?: UseTransferSigningOptions): UseTransferSigningResult;
411
505
 
412
- declare function fetchProviders(apiBaseUrl: string, token: string): Promise<Provider[]>;
413
- declare function fetchChains(apiBaseUrl: string, token: string): Promise<Chain[]>;
414
- declare function fetchAccounts(apiBaseUrl: string, token: string, credentialId: string): Promise<Account[]>;
415
- interface CreateTransferParams {
416
- credentialId: string;
417
- sourceType: SourceType;
418
- sourceId: string;
419
- destination: Destination;
420
- amount: number;
421
- currency?: string;
422
- }
423
- declare function createTransfer(apiBaseUrl: string, token: string, params: CreateTransferParams): Promise<Transfer>;
424
- declare function fetchTransfer(apiBaseUrl: string, token: string, transferId: string, authorizationSessionToken?: string): Promise<Transfer>;
425
- /**
426
- * Submit a passkey-signed UserOperation for a transfer.
427
- * PATCH /v1/transfers/{transferId}
428
- */
429
- declare function signTransfer(apiBaseUrl: string, token: string, transferId: string, signedUserOp: Record<string, unknown>, authorizationSessionToken?: string): Promise<Transfer>;
430
- declare function fetchAuthorizationSession(apiBaseUrl: string, sessionId: string): Promise<AuthorizationSessionDetail>;
431
- /**
432
- * Registers a WebAuthn passkey for the authenticated user.
433
- * POST /v1/users/config/passkey
434
- */
435
- declare function registerPasskey(apiBaseUrl: string, token: string, credentialId: string, publicKey: string): Promise<void>;
436
- /**
437
- * Fetches the authenticated user's config, including passkey status.
438
- * GET /v1/users/config
439
- */
440
- declare function fetchUserConfig(apiBaseUrl: string, token: string): Promise<{
441
- id: string;
442
- config: UserConfig;
443
- }>;
444
- declare function updateUserConfig(apiBaseUrl: string, token: string, config: {
445
- defaultAllowance: number;
446
- }): Promise<void>;
447
- /**
448
- * Updates the user's default allowance, authenticated by session ID.
449
- * PATCH /v1/authorization-sessions/{id}/user-config
450
- *
451
- * This does not require a bearer token — the session ID itself serves
452
- * as proof of authorization.
453
- */
454
- declare function updateUserConfigBySession(apiBaseUrl: string, sessionId: string, config: {
455
- defaultAllowance: number;
456
- }): Promise<void>;
457
- declare function reportActionCompletion(apiBaseUrl: string, actionId: string, result: Record<string, unknown>): Promise<AuthorizationSessionDetail>;
458
-
459
- type api_CreateTransferParams = CreateTransferParams;
460
- declare const api_createTransfer: typeof createTransfer;
461
- declare const api_fetchAccounts: typeof fetchAccounts;
462
- declare const api_fetchAuthorizationSession: typeof fetchAuthorizationSession;
463
- declare const api_fetchChains: typeof fetchChains;
464
- declare const api_fetchProviders: typeof fetchProviders;
465
- declare const api_fetchTransfer: typeof fetchTransfer;
466
- declare const api_fetchUserConfig: typeof fetchUserConfig;
467
- declare const api_registerPasskey: typeof registerPasskey;
468
- declare const api_reportActionCompletion: typeof reportActionCompletion;
469
- declare const api_signTransfer: typeof signTransfer;
470
- declare const api_updateUserConfig: typeof updateUserConfig;
471
- declare const api_updateUserConfigBySession: typeof updateUserConfigBySession;
472
- declare namespace api {
473
- export { type api_CreateTransferParams as CreateTransferParams, api_createTransfer as createTransfer, api_fetchAccounts as fetchAccounts, api_fetchAuthorizationSession as fetchAuthorizationSession, api_fetchChains as fetchChains, api_fetchProviders as fetchProviders, api_fetchTransfer as fetchTransfer, api_fetchUserConfig as fetchUserConfig, api_registerPasskey as registerPasskey, api_reportActionCompletion as reportActionCompletion, api_signTransfer as signTransfer, api_updateUserConfig as updateUserConfig, api_updateUserConfigBySession as updateUserConfigBySession };
474
- }
475
-
476
- export { type Account, type ActionExecutionResult, type AdvancedSettings, type Amount, type AuthorizationAction, type AuthorizationSession, type AuthorizationSessionDetail, type Chain, type Destination, type ErrorResponse, type ListResponse, type PaymentStep, type Provider, type SourceOption, type SourceSelection, type SourceType, SwypePayment, type SwypePaymentProps, SwypeProvider, type SwypeProviderProps, type ThemeMode, type ThemeTokens, type TokenBalance, type Transfer, type TransferDestination, type UserConfig, type Wallet, type WalletSource, type WalletToken, createPasskeyCredential, darkTheme, deviceHasPasskey, getTheme, lightTheme, api as swypeApi, useAuthorizationExecutor, useSwypeConfig, useSwypeDepositAmount, useTransferPolling, useTransferSigning };
506
+ export { type Account, type ActionExecutionResult, type AdvancedSettings, type Amount, type AuthorizationAction, type AuthorizationSession, type AuthorizationSessionDetail, type Chain, type Destination, type ErrorResponse, type ListResponse, type MerchantAuthorization, type MerchantPublicKey, type PaymentStep, type Provider, type SourceOption, type SourceSelection, type SourceType, SwypePayment, type SwypePaymentProps, SwypeProvider, type SwypeProviderProps, type ThemeMode, type ThemeTokens, type TokenBalance, type Transfer, type TransferDestination, type UserConfig, type Wallet, type WalletSource, type WalletToken, createPasskeyCredential, darkTheme, deviceHasPasskey, findDevicePasskey, getTheme, lightTheme, api as swypeApi, useAuthorizationExecutor, useSwypeConfig, useSwypeDepositAmount, useTransferPolling, useTransferSigning };