@swype-org/react-sdk 0.1.218 → 0.1.219

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
@@ -385,29 +385,101 @@ declare function updateUserConfig(apiBaseUrl: string, token: string, config: {
385
385
  declare function updateUserConfigBySession(apiBaseUrl: string, sessionId: string, config: {
386
386
  defaultAllowance: number;
387
387
  }): Promise<void>;
388
+ interface CreateGuestTransferParams {
389
+ id?: string;
390
+ merchantAuthorization: MerchantAuthorization;
391
+ destinations: Array<{
392
+ chainId: string;
393
+ token: {
394
+ address: string;
395
+ };
396
+ address: string;
397
+ }>;
398
+ amount: number;
399
+ currency?: string;
400
+ providerId: string;
401
+ }
402
+ interface GuestTransferResult {
403
+ id: string;
404
+ status: string;
405
+ guestSessionToken: string;
406
+ uri: string | null;
407
+ expiresAt: string | null;
408
+ amount: {
409
+ amount: number;
410
+ currency: string;
411
+ };
412
+ destinations: Transfer['destinations'];
413
+ sources: Transfer['sources'];
414
+ createDate: string;
415
+ updateDate: string;
416
+ }
417
+ /**
418
+ * Create a guest transfer (no Privy auth required).
419
+ * POST /v1/transfers with type=guest
420
+ */
421
+ declare function createGuestTransfer(apiBaseUrl: string, params: CreateGuestTransferParams): Promise<GuestTransferResult>;
422
+ /**
423
+ * Look up a guest transfer by session token.
424
+ * GET /v1/transfers?guestToken=...
425
+ */
426
+ declare function getTransferByGuestToken(apiBaseUrl: string, guestToken: string): Promise<Transfer>;
427
+ /**
428
+ * Set the sender's wallet address and selected source token on a guest transfer.
429
+ * PUT /v1/transfers/:id/sender
430
+ */
431
+ declare function setTransferSender(apiBaseUrl: string, transferId: string, guestSessionToken: string, senderAddress: string, sourceChainId: string, sourceToken: string): Promise<Transfer>;
432
+ /**
433
+ * Submit the origin chain tx hash for a guest transfer.
434
+ * PATCH /v1/transfers/:id with { originTxHash }
435
+ */
436
+ declare function signGuestTransfer(apiBaseUrl: string, transferId: string, guestSessionToken: string, originTxHash: string): Promise<Transfer>;
437
+ /**
438
+ * Poll a guest transfer by ID using the guest session token.
439
+ * GET /v1/transfers/:id with x-guest-session-token header
440
+ */
441
+ declare function getGuestTransfer(apiBaseUrl: string, transferId: string, guestSessionToken: string): Promise<Transfer>;
442
+ /** Balance option returned by the guest transfer balances endpoint. */
443
+ interface GuestBalanceOption extends SourceOption {
444
+ sourceChainId: string;
445
+ }
446
+ /**
447
+ * Fetch stablecoin balances for a wallet address, scoped to a guest transfer.
448
+ * GET /v1/transfers/:id/balances?walletAddress=...
449
+ */
450
+ declare function fetchGuestTransferBalances(apiBaseUrl: string, transferId: string, guestSessionToken: string, walletAddress: string): Promise<GuestBalanceOption[]>;
388
451
  declare function reportActionCompletion(apiBaseUrl: string, actionId: string, result: Record<string, unknown>): Promise<AuthorizationSessionDetail>;
389
452
 
390
453
  type api_CreateAccountParams = CreateAccountParams;
454
+ type api_CreateGuestTransferParams = CreateGuestTransferParams;
391
455
  type api_CreateTransferParams = CreateTransferParams;
456
+ type api_GuestBalanceOption = GuestBalanceOption;
457
+ type api_GuestTransferResult = GuestTransferResult;
392
458
  declare const api_createAccount: typeof createAccount;
393
459
  declare const api_createAccountAuthorizationSession: typeof createAccountAuthorizationSession;
460
+ declare const api_createGuestTransfer: typeof createGuestTransfer;
394
461
  declare const api_createTransfer: typeof createTransfer;
395
462
  declare const api_fetchAccount: typeof fetchAccount;
396
463
  declare const api_fetchAccounts: typeof fetchAccounts;
397
464
  declare const api_fetchAuthorizationSession: typeof fetchAuthorizationSession;
398
465
  declare const api_fetchChains: typeof fetchChains;
466
+ declare const api_fetchGuestTransferBalances: typeof fetchGuestTransferBalances;
399
467
  declare const api_fetchMerchantPublicKey: typeof fetchMerchantPublicKey;
400
468
  declare const api_fetchProviders: typeof fetchProviders;
401
469
  declare const api_fetchTransfer: typeof fetchTransfer;
402
470
  declare const api_fetchUserConfig: typeof fetchUserConfig;
471
+ declare const api_getGuestTransfer: typeof getGuestTransfer;
472
+ declare const api_getTransferByGuestToken: typeof getTransferByGuestToken;
403
473
  declare const api_registerPasskey: typeof registerPasskey;
404
474
  declare const api_reportActionCompletion: typeof reportActionCompletion;
405
475
  declare const api_reportPasskeyActivity: typeof reportPasskeyActivity;
476
+ declare const api_setTransferSender: typeof setTransferSender;
477
+ declare const api_signGuestTransfer: typeof signGuestTransfer;
406
478
  declare const api_signTransfer: typeof signTransfer;
407
479
  declare const api_updateUserConfig: typeof updateUserConfig;
408
480
  declare const api_updateUserConfigBySession: typeof updateUserConfigBySession;
409
481
  declare namespace api {
410
- export { type api_CreateAccountParams as CreateAccountParams, type api_CreateTransferParams as CreateTransferParams, api_createAccount as createAccount, api_createAccountAuthorizationSession as createAccountAuthorizationSession, api_createTransfer as createTransfer, api_fetchAccount as fetchAccount, 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_reportPasskeyActivity as reportPasskeyActivity, api_signTransfer as signTransfer, api_updateUserConfig as updateUserConfig, api_updateUserConfigBySession as updateUserConfigBySession };
482
+ export { type api_CreateAccountParams as CreateAccountParams, type api_CreateGuestTransferParams as CreateGuestTransferParams, type api_CreateTransferParams as CreateTransferParams, type api_GuestBalanceOption as GuestBalanceOption, type api_GuestTransferResult as GuestTransferResult, api_createAccount as createAccount, api_createAccountAuthorizationSession as createAccountAuthorizationSession, api_createGuestTransfer as createGuestTransfer, api_createTransfer as createTransfer, api_fetchAccount as fetchAccount, api_fetchAccounts as fetchAccounts, api_fetchAuthorizationSession as fetchAuthorizationSession, api_fetchChains as fetchChains, api_fetchGuestTransferBalances as fetchGuestTransferBalances, api_fetchMerchantPublicKey as fetchMerchantPublicKey, api_fetchProviders as fetchProviders, api_fetchTransfer as fetchTransfer, api_fetchUserConfig as fetchUserConfig, api_getGuestTransfer as getGuestTransfer, api_getTransferByGuestToken as getTransferByGuestToken, api_registerPasskey as registerPasskey, api_reportActionCompletion as reportActionCompletion, api_reportPasskeyActivity as reportPasskeyActivity, api_setTransferSender as setTransferSender, api_signGuestTransfer as signGuestTransfer, api_signTransfer as signTransfer, api_updateUserConfig as updateUserConfig, api_updateUserConfigBySession as updateUserConfigBySession };
411
483
  }
412
484
 
413
485
  interface BlinkPaymentProps {
package/dist/index.d.ts CHANGED
@@ -385,29 +385,101 @@ declare function updateUserConfig(apiBaseUrl: string, token: string, config: {
385
385
  declare function updateUserConfigBySession(apiBaseUrl: string, sessionId: string, config: {
386
386
  defaultAllowance: number;
387
387
  }): Promise<void>;
388
+ interface CreateGuestTransferParams {
389
+ id?: string;
390
+ merchantAuthorization: MerchantAuthorization;
391
+ destinations: Array<{
392
+ chainId: string;
393
+ token: {
394
+ address: string;
395
+ };
396
+ address: string;
397
+ }>;
398
+ amount: number;
399
+ currency?: string;
400
+ providerId: string;
401
+ }
402
+ interface GuestTransferResult {
403
+ id: string;
404
+ status: string;
405
+ guestSessionToken: string;
406
+ uri: string | null;
407
+ expiresAt: string | null;
408
+ amount: {
409
+ amount: number;
410
+ currency: string;
411
+ };
412
+ destinations: Transfer['destinations'];
413
+ sources: Transfer['sources'];
414
+ createDate: string;
415
+ updateDate: string;
416
+ }
417
+ /**
418
+ * Create a guest transfer (no Privy auth required).
419
+ * POST /v1/transfers with type=guest
420
+ */
421
+ declare function createGuestTransfer(apiBaseUrl: string, params: CreateGuestTransferParams): Promise<GuestTransferResult>;
422
+ /**
423
+ * Look up a guest transfer by session token.
424
+ * GET /v1/transfers?guestToken=...
425
+ */
426
+ declare function getTransferByGuestToken(apiBaseUrl: string, guestToken: string): Promise<Transfer>;
427
+ /**
428
+ * Set the sender's wallet address and selected source token on a guest transfer.
429
+ * PUT /v1/transfers/:id/sender
430
+ */
431
+ declare function setTransferSender(apiBaseUrl: string, transferId: string, guestSessionToken: string, senderAddress: string, sourceChainId: string, sourceToken: string): Promise<Transfer>;
432
+ /**
433
+ * Submit the origin chain tx hash for a guest transfer.
434
+ * PATCH /v1/transfers/:id with { originTxHash }
435
+ */
436
+ declare function signGuestTransfer(apiBaseUrl: string, transferId: string, guestSessionToken: string, originTxHash: string): Promise<Transfer>;
437
+ /**
438
+ * Poll a guest transfer by ID using the guest session token.
439
+ * GET /v1/transfers/:id with x-guest-session-token header
440
+ */
441
+ declare function getGuestTransfer(apiBaseUrl: string, transferId: string, guestSessionToken: string): Promise<Transfer>;
442
+ /** Balance option returned by the guest transfer balances endpoint. */
443
+ interface GuestBalanceOption extends SourceOption {
444
+ sourceChainId: string;
445
+ }
446
+ /**
447
+ * Fetch stablecoin balances for a wallet address, scoped to a guest transfer.
448
+ * GET /v1/transfers/:id/balances?walletAddress=...
449
+ */
450
+ declare function fetchGuestTransferBalances(apiBaseUrl: string, transferId: string, guestSessionToken: string, walletAddress: string): Promise<GuestBalanceOption[]>;
388
451
  declare function reportActionCompletion(apiBaseUrl: string, actionId: string, result: Record<string, unknown>): Promise<AuthorizationSessionDetail>;
389
452
 
390
453
  type api_CreateAccountParams = CreateAccountParams;
454
+ type api_CreateGuestTransferParams = CreateGuestTransferParams;
391
455
  type api_CreateTransferParams = CreateTransferParams;
456
+ type api_GuestBalanceOption = GuestBalanceOption;
457
+ type api_GuestTransferResult = GuestTransferResult;
392
458
  declare const api_createAccount: typeof createAccount;
393
459
  declare const api_createAccountAuthorizationSession: typeof createAccountAuthorizationSession;
460
+ declare const api_createGuestTransfer: typeof createGuestTransfer;
394
461
  declare const api_createTransfer: typeof createTransfer;
395
462
  declare const api_fetchAccount: typeof fetchAccount;
396
463
  declare const api_fetchAccounts: typeof fetchAccounts;
397
464
  declare const api_fetchAuthorizationSession: typeof fetchAuthorizationSession;
398
465
  declare const api_fetchChains: typeof fetchChains;
466
+ declare const api_fetchGuestTransferBalances: typeof fetchGuestTransferBalances;
399
467
  declare const api_fetchMerchantPublicKey: typeof fetchMerchantPublicKey;
400
468
  declare const api_fetchProviders: typeof fetchProviders;
401
469
  declare const api_fetchTransfer: typeof fetchTransfer;
402
470
  declare const api_fetchUserConfig: typeof fetchUserConfig;
471
+ declare const api_getGuestTransfer: typeof getGuestTransfer;
472
+ declare const api_getTransferByGuestToken: typeof getTransferByGuestToken;
403
473
  declare const api_registerPasskey: typeof registerPasskey;
404
474
  declare const api_reportActionCompletion: typeof reportActionCompletion;
405
475
  declare const api_reportPasskeyActivity: typeof reportPasskeyActivity;
476
+ declare const api_setTransferSender: typeof setTransferSender;
477
+ declare const api_signGuestTransfer: typeof signGuestTransfer;
406
478
  declare const api_signTransfer: typeof signTransfer;
407
479
  declare const api_updateUserConfig: typeof updateUserConfig;
408
480
  declare const api_updateUserConfigBySession: typeof updateUserConfigBySession;
409
481
  declare namespace api {
410
- export { type api_CreateAccountParams as CreateAccountParams, type api_CreateTransferParams as CreateTransferParams, api_createAccount as createAccount, api_createAccountAuthorizationSession as createAccountAuthorizationSession, api_createTransfer as createTransfer, api_fetchAccount as fetchAccount, 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_reportPasskeyActivity as reportPasskeyActivity, api_signTransfer as signTransfer, api_updateUserConfig as updateUserConfig, api_updateUserConfigBySession as updateUserConfigBySession };
482
+ export { type api_CreateAccountParams as CreateAccountParams, type api_CreateGuestTransferParams as CreateGuestTransferParams, type api_CreateTransferParams as CreateTransferParams, type api_GuestBalanceOption as GuestBalanceOption, type api_GuestTransferResult as GuestTransferResult, api_createAccount as createAccount, api_createAccountAuthorizationSession as createAccountAuthorizationSession, api_createGuestTransfer as createGuestTransfer, api_createTransfer as createTransfer, api_fetchAccount as fetchAccount, api_fetchAccounts as fetchAccounts, api_fetchAuthorizationSession as fetchAuthorizationSession, api_fetchChains as fetchChains, api_fetchGuestTransferBalances as fetchGuestTransferBalances, api_fetchMerchantPublicKey as fetchMerchantPublicKey, api_fetchProviders as fetchProviders, api_fetchTransfer as fetchTransfer, api_fetchUserConfig as fetchUserConfig, api_getGuestTransfer as getGuestTransfer, api_getTransferByGuestToken as getTransferByGuestToken, api_registerPasskey as registerPasskey, api_reportActionCompletion as reportActionCompletion, api_reportPasskeyActivity as reportPasskeyActivity, api_setTransferSender as setTransferSender, api_signGuestTransfer as signGuestTransfer, api_signTransfer as signTransfer, api_updateUserConfig as updateUserConfig, api_updateUserConfigBySession as updateUserConfigBySession };
411
483
  }
412
484
 
413
485
  interface BlinkPaymentProps {