@yieldfabric/wallet 0.2.0 → 0.2.2

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
@@ -524,6 +524,10 @@ interface WalletRuntimeConfig extends ModeConfig {
524
524
  * cache reset + `userChanged` event dispatch here. Hosts that
525
525
  * don't use Apollo can omit this. */
526
526
  onSessionBootstrapped?: (userId: string) => void | Promise<void>;
527
+ /** Runs BEFORE the session is torn down on `logout` / `logoutAll`,
528
+ * while the token is still valid — the host forgets this device's push
529
+ * subscription here. Failures are swallowed; sign-out always proceeds. */
530
+ onBeforeLogout?: () => void | Promise<void>;
527
531
  /** Optional toast / error reporting hooks for wallet-internal
528
532
  * events that the host might want to surface (background poller
529
533
  * failures, queue subscription drops, etc.). */
@@ -1371,15 +1375,7 @@ interface EntityEvent {
1371
1375
  * to filter / style. */
1372
1376
  source?: string;
1373
1377
  }
1374
- /**
1375
- * Subscribe to entity SSE events from the Payments service.
1376
- * Uses `access_token` query param because browser EventSource cannot send Authorization headers.
1377
- *
1378
- * Manages its own reconnection with fresh tokens on each attempt (browser-native
1379
- * EventSource reconnect reuses the original URL, which fails if the token expired).
1380
- *
1381
- * @returns Unsubscribe function that closes the EventSource and stops reconnection.
1382
- */
1378
+ /** Subscribe with a fresh header bearer on each connection. */
1383
1379
  declare function subscribeEntityEvents(entityId: string, onEvent: (event: EntityEvent) => void, onError?: (err: any) => void): () => void;
1384
1380
 
1385
1381
  type EventHandler = (event: EntityEvent) => void;
@@ -4234,6 +4230,28 @@ interface WalletCenterContextValue {
4234
4230
  requestedView: WalletCenterView;
4235
4231
  openWalletCenter: (view?: WalletCenterView) => void;
4236
4232
  closeWalletCenter: () => void;
4233
+ /** Where the center renders while a host holds it: inside that element,
4234
+ * as a page of the host's own frame, instead of over the app as a
4235
+ * drawer. A phone frame with a Wallet tab hosts it; `null` (the
4236
+ * default) is the drawer. One host at a time — the last to claim wins,
4237
+ * and a host must release (`setHost(null)`) when it unmounts. */
4238
+ host: HTMLElement | null;
4239
+ setHost: (host: HTMLElement | null) => void;
4240
+ /** What the host wants the center to know about itself — today the label
4241
+ * of the page it will show again when the center's own way back is
4242
+ * taken. SEPARATE from `setHost` on purpose: releasing and re-claiming
4243
+ * the host swaps the center between a portal and the drawer, which
4244
+ * REMOUNTS it and throws away which section the person was reading. A
4245
+ * changing label must never do that. */
4246
+ hostOptions: WalletCenterHostOptions;
4247
+ setHostOptions: (options: WalletCenterHostOptions) => void;
4248
+ /** What the center has in front of it while hosted, for the host's own
4249
+ * title bar to name: the section, or the message being read. */
4250
+ hostTitle: string | null;
4251
+ setHostTitle: (title: string | null) => void;
4252
+ }
4253
+ interface WalletCenterHostOptions {
4254
+ backLabel?: string;
4237
4255
  }
4238
4256
  declare function WalletCenterProvider({ children }: {
4239
4257
  children: ReactNode;
@@ -4253,6 +4271,11 @@ interface WalletCenterProps {
4253
4271
  * SDK-owned wallet shell. Consumer apps configure its ordered modules,
4254
4272
  * directory and actor list; the SDK owns layout, responsive behavior and
4255
4273
  * navigation state.
4274
+ *
4275
+ * Mounted once, near the app root. It renders as a drawer over the app —
4276
+ * unless a host has claimed it through `useWalletCenter().setHost`, in
4277
+ * which case it renders inside that element as a page of the host's own
4278
+ * frame (no overlay, no close control: the frame carries the way out).
4256
4279
  */
4257
4280
  declare function WalletCenter({ config, selectorRegistry, addressLabels, renderSimpleSummary, onSigned, onRetried, onCanceled, }: WalletCenterProps): react_jsx_runtime.JSX.Element | null;
4258
4281
 
@@ -7859,4 +7882,13 @@ interface PhoneVerificationProps {
7859
7882
  }
7860
7883
  declare function PhoneVerification({ profile, onUpdated, inputClassName, primaryButtonClassName, secondaryButtonClassName, labelClassName, mutedClassName, errorClassName, buttonRowClassName, readOnly, valueClassName, }: PhoneVerificationProps): react_jsx_runtime.JSX.Element;
7861
7884
 
7862
- export { type AcceptObligationResponse, type AcceptPaymentResponse, type AcceptState, AccessFlow, type AccessFlowBranding, type AccessFlowMessages, type AccessFlowMessagesOverride, type AccessFlowMode, type AccessFlowProps, AccountOpeningPanel, type AccountOpeningStage, type AccountOpeningState, type AccountOpeningStatus, type AccountSignerCustody, type ActivateChainAccountOptions, AddCardDialog, type AddCardDialogProps, type AddChainParams, type AddMemberRequest, type AltLoginSuccess, type ApiKeyInfo, type AppAuthContextValue, type AuthProviderId, type AuthProviderImpl, type AuthResult, AvatarPicker, type BalanceResponse, type BalanceRow, BankAccountCard, type BankAccountCardFields, type BilledGroup, BillingCenter, type BillingCenterProps, BillingChip, type BillingChipTone, type BillingColumn, type BillingGateInfo, type BillingLineItem, type BillingRecoveryAction, type BillingStatus, type BillingSummary, type BlockExplorer, BrandingProvider, type BrandingProviderProps, BrowserLocalStorageTokenStore, type BuildCreditCheckoutReturnUrlsOptions, BusinessVerificationSection, type BusinessVerificationSectionProps, Button, BuyCreditsDialog, type BuyCreditsDialogProps, type BuyCreditsTarget, CHOOSER_META, CREDIT_CHECKOUT_RETRY_REQUESTED_EVENT, CREDIT_CHECKOUT_RETRY_REQUIRED_EVENT, CREDIT_CHECKOUT_SYNCED_EVENT, type CancelPaymentResponse, Card, type CardRequiredContext, CardRequiredError, CardRequiredHost, type CardRequiredRequest, type CardRequiredSource, ChainAccountActivationError, type ChainAccountActivationErrorMetadata, ChainAccountActivationHttpError, type ChainAccountActivationResource, type ChainAccountActivationStatus, type ChainAccountEntityKind, type ChainAccountReady, type ChainAccountRequiredContext, ChainAccountRequiredError, ChainAccountRequiredHost, type ChainAccountRequiredRequest, type ChainAccountRequiredSource, type ChainAccountRestExpectedTarget, type ChainAddresses, type ChainConfigResponse, ChainMismatchError, ChainNotConfiguredError, ChangePasswordModal, type ChangePasswordModalProps, type ChooserCardProps, type ChromeMode, type ConfirmOptions, type ConnectStatus, type Contract, type CreateGroupRequest, type CreditBalanceSyncResponse, type CreditCheckoutKind, type CreditCheckoutRetryDetail, type CreditCheckoutReturnContext, type CreditCheckoutReturnMarker, type CreditCheckoutReturnUrls, type CreditCheckoutState, type CreditCheckoutStatusResponse, type CreditCheckoutSyncedDetail, CreditExhaustedHost, type CreditGateInfo, type CreditPlan, type CreditRequiredContext, CreditRequiredError, type CreditRequiredReason, type CreditRequiredRequest, type CreditRequiredSource, type CreditTopup, DEFAULT_APP_DELEGATION_SCOPE, DEFAULT_AUTH_PROVIDERS, DEFAULT_KYC_PROVIDERS, DEFAULT_MESSAGES, DEFAULT_OWNED_GROUP_DELEGATION_SCOPE, DailySpendChart, type DailyUsagePoint, type DecimalsErrorReason, type DelegationRequest, type DelegationResponse, type DelegationSessionMetadata, type DelegationToken, type DirectDelegationSessionMetadata, Drawer, EarningsSection, type EarningsSectionProps, type EarningsShare, type EarningsSummary, type EarningsTerms, type EarningsTotals, type EmailVerificationConfirmResult, type EmailVerificationStartResult, type EmailVerificationStatus, type EntityEvent, type EntityEventType, EntitySSEProvider, type EoaHandle, type EoaSendInput, type EoaSendStatus, ExecutionMode, GROUP_ACCOUNT_OPERATION_KEYS, type GasPricing, type GasPricingChain, type GenerateApiKeyRequest, type GenerateApiKeyResponse, GenericSignDialog, type GenericSignDialogProps, type GlobalNotificationCallbacks, GlobalNotificationService, type Group, type GroupAccountOperationExpectation, type GroupAccountOperationMutationStatus, type GroupAccountOperationReadStatus, type GroupAccountOperationResource, type GroupAccountOperationWire, type GroupAccountOwner, type GroupAccountOwnersResponse, type GroupBillingPolicy, type GroupBillingPolicyResponse, GroupBillingSection, type GroupBillingSectionProps, type GroupEarnings, type GroupEarningsRow, type GroupMember, GroupOwnershipPanel, type GroupOwnershipPanelProps, type GroupOwnershipRelationship, type GroupOwnershipRelationshipsResponse, type GroupOwnershipStatus, type GroupWalletOwnerOperationResponse, type GroupWalletOwnerOperationStatusResponse, IdentityCard, type IdentityStatus, type IdentityStatusScope, IncomingPaymentsCenter, type IncomingPaymentsCenterProps, IncomingPaymentsInbox, type IncomingPaymentsInboxProps, IncomingPaymentsLauncher, type IncomingPaymentsLauncherProps, KeyBalances, type KeyBalancesProps, type KeyContext, type KeyPair, type KeySelection, SecurityPage as KeysManager, type KycProviderId, type KycProviderImpl, LineItemDrawer, type LineItemsCursor, type LineItemsPage, LineItemsTable, type LineItemsTableProps, LoadingSpinner, LoginAltMethods, type LoginAltMethodsProps, LoginComponent, LoginForm, type LoginKey, LoginLayout, type LoginLayoutProps, LoginPage, type LoginPageProps, type LoginRequest, LoginShell, type LoginShellProps, METER_LABELS, type ManualTransactionTuple, type MeterTotal, type ModeConfig, type NftOwnedSignerBinding, type NonceBoundManualEnvelope, type NonceResponse, OnboardingMethodCard, OnboardingPlanHttpError, type OnboardingPlanIntent, type OnboardingPlanIntentResponse, type OnboardingPolicyDoc, OnboardingPolicyHttpError, type OnboardingPolicyResponse, OnboardingPolicySection, type OnboardingPolicySectionProps, type OnboardingSnapshot, type OnboardingStatus, OnboardingWizard, type OnboardingWizardProps, type OwnedDelegationSessionMetadata, type OwnedGroupAuthorizationBinding, type OwnedGroupDelegationRequest, type OwnedGroupDelegationResponse, type OwnedGroupMembershipEdge, type OwnedGroupProjection, type OwnedGroupSignerCustody, type OwnedGroupUnsignedAuthorization, type OwnedGroupsResponse, type PasskeyContext, type PasskeyExchangeResponse, type Payment, type PaymentAsset, type PaymentDirection, type PaymentParty, PaymentStatusEnum, type PendingInboxItem, PendingPaymentCard, type PendingPaymentCardProps, type PendingPaymentKind, PhoneVerification, type PlatformOnboardingInfo, Profile as ProfileEditor, type ProfileEditorProps, type ProfilePatch, ProviderConfigProvider, type ProvidersConfigResponse, type PublicBillingCatalog, type QueueMessage, RedirectTo, type RedirectToProps, type RegisteredWalletMetadata, type RemintBillingTokensOptions, type RpcRequest, SendFromKey, type SendFromKeyProps, type SendInstantArgs, type SendInstantResponse, type SendPaymentAsset, SendPaymentDrawer, type SendPaymentDrawerProps, SendPaymentForm, type SendPaymentFormProps, type SendTxParams, type SetDirectDelegationSession, type SetOnboardingPolicyInput, type SetOwnedDelegationSession, type SetupIntentResponse, type SignOptions, type SignRequest, type SignResponse, SignatureCenterRow, type SignatureCenterRowProps, SignaturePreviewDrawer as SignatureDrawer, SignatureQueueProvider, SignatureWorkflow, type SignatureWorkflowNotifyPayload, type SignatureWorkflowProps, type SigninPayload, type SignupFlowProps, type SimpleSummaryInput, SkeletonAvatar, type SpendMeter, type SponsorshipInfo, SponsorshipSessionError, type SponsorshipSessionResponse, type SponsorshipSettings, type StatusColor, StepShell, type StepShellProps, type StripeIdentitySession, Toast, type ToastProps, type TokenInfo, type TokenManagerConfig, type TokenStore, type TxReceipt, type UpdateGroupRequest, type UsageBreakdownRow, type UseEoaSendOptions, type UseEoaSendResult, type UseIncomingPaymentDecimalsResult, type UseIncomingPaymentsOptions, type UseIncomingPaymentsResult, type UseKeyBalanceOptions, type UseKeyBalanceResult, type UseSendPaymentResult, type UseSignatureQueueResult, type UserDisplayProfile, type UserProfile, type VerificationLaunchOption, type VerificationMissing, type VerificationProfile, type VerificationProfileRequirement, type VerificationProfilesResponse, type VerificationRecord, type VerificationRequiredContext, VerificationRequiredError, VerificationRequiredHost, type VerificationRequiredRequest, type VerificationStatus, VerifiedBadge, type VirtualAccount, type WalletAuthContextValue, WalletAuthProvider, WalletCenter, type WalletCenterActor, type WalletCenterBuiltinId, type WalletCenterBuiltinModule, type WalletCenterClassNames, type WalletCenterConfig, type WalletCenterDirectoryGroup, type WalletCenterDirectoryModule, type WalletCenterIcon, type WalletCenterIdentity, type WalletCenterIdentityAction, type WalletCenterModule, type WalletCenterNavigationItem, type WalletCenterPanelContext, type WalletCenterPanelModule, type WalletCenterProps, WalletCenterProvider, type WalletCenterRouteModule, type WalletCenterRuntime, type WalletCenterStatus, WalletCenterTrigger, type WalletCenterTriggerProps, type WalletCenterView, type WalletCenterVisibility, WalletConfigProvider, type WalletDrawerClassNames, type WalletIdentity, WalletIdentityError, WalletNotRegisteredError, type WalletProfileClassNames, WalletProvider, type WalletProviderProps, type WalletRegistrationAuthContext, type WalletRegistrationRequestContext, type WalletRegistrationTokenPurpose, type WalletRuntimeConfig, type WalletSecurityClassNames, type WalletSigner, type WalletUiConfig, YieldFabricLockup, activateChainAccount, activateChainAccountAndRefresh, addChainParamsByChainId, agentMinutesFromMicros, apiKeysService, assertChain, authService, balanceService, billingGateInfoForActiveToken, billingGateInfoFromToken, billingRecoveryAction, billingService, breakdownKeyLabel, buildAuthRegistry, buildCreditCheckoutReturnUrls, buildInbox, buildKycRegistry, buildSendParams, canReexecuteMessage, canonicalEip155ChainId, canonicalEvmAddress, canonicalGroupOperationUuid, canonicalU256Decimal, cardRequiredGate, chainAccountMode, chainAccountRequiredGate, chainAddressesToLabels, chainIdToHex, chainNames, computeMetaTransactionDigest, confirmMyEmailVerification, contractNeedsObligationAccept, convertAmountToRaw, createPasskey, createStripeIdentitySession, createSumsubAccessToken, creditCheckoutTargetGroupId, creditGateInfoForActiveToken, creditPlanTotalAllowanceUsd, creditRequiredGate, decodeJwtPayload as decodeJwtClaims, defaultTokenStore, defaultWalletCenterModules, defineWalletDirectory, defineWalletPanel, defineWalletRoute, delegationService, effectiveStatus, enabledPaymentChainIds, encodeApprove, encodeBalanceOf, encodeTransfer, ensureCardOnFile, ensureCreditAvailable, ensureVerified, exchange, extractCurrency, extractTokenAssetId, featureLabel, fetchAccountOpeningStatus, fetchNonce, fetchVerificationStatus, fetchWithChainAccountActivationRetry, findWalletRegistration, formatAgentMinutes, formatAgentTime, formatPages, formatPayment, formatRelativeTime, formatTxHashShort, formatUnits, formatUsdMicros, freshTokenForSameChainActor, gasOpLabel, getActiveChainId, getActiveUserChainId, getAddChainParams, getAuthServiceUrl, getBlockExplorer, getBlockExplorerAddressUrl, getBlockExplorerTxUrl, getChainAccountActivationStatus, getChainConfig, getChainIdFromToken, getCurrentChainId, getDefaultChainAddressLabels, getDefaultChainId, getErc20Allowance, getErc20Balance, getErc20Decimals, getErc20Symbol, getIdentityStatus, getIdentityStatusForProviders, getMyEmailVerificationStatus, getMyProfile, getNativeBalance, getPaymentsServiceUrl, getReceipt, getWebSocketUrl, groupInbox, groupsService, hasActiveAuthToken, humanizeMessageType, invalidateOnboardingState, invalidateWalletCount, isEoaKey, isExactSponsoredUserToken, isLiveMode, isPaymentChainEnabled, isStaffRole, itemAgentTime, itemLabel, keyPairToEoaHandle, keysService, knownAuthProviderIds, knownKycProviderIds, kycKindOf, link, listMyLoginKeys, listMyVerifications, llmCategoryLabel, makeWalletId, manualChainAccountRequiredContext, messagesService, needsPaymentAcceptance, nftOwnedSignerBinding, onboardingPlanService, onboardingPolicyService, ownedGroupUserSignerCustody, parseChainAccountRequired, parseChainAccountRequiredRest, parseGroupAccountOperationWire, parseUnits, parseVerificationRequired, parseWalletId, passkeyLabel, patchMyEmail, patchMyProfile, paymentsService, paymentsUrlMap, personalJwtHasGroupPayer, personalSessionHasGroupPayer, promptCardCapture, promptCreditPurchase, promptVerification, readCreditCheckoutReturnMarker, recordCredentialIssued, refreshChainAccountSession, registerBlockExplorer, registeredWalletsFromMetadata, remintTokensAfterCardChange, requireActiveUserChainId, requireChainIdFromToken, requireWalletRegistrationChain, requireWalletRegistrationSessionChain, resetDecimalsWarningCache, resolveAuth, resolveKyc, resolveKycInstance, resolvePaymentDirection, resolveWalletIdentityForChain, retryOnceAfterChainAccountActivation, selectWalletRegistration, setAuthRegistry, setGroupVerificationProfiles, setKycRegistry, setModeConfig, signInChallengeViaPasskey, signInWithPasskey, signUpRegisterViaPasskey, signUpWithPasskey, signWithPasskey, signatureSignin, snapshotNeedsPrepaidPlan, startMyEmailVerification, statusToColor, subscribeEntityEvents, switchChain, syntheticPasskeyAddress, testChainIds, tokenManager, tryParseWalletId, unlink, useAuth, useAuthContext, useBranding, useEntitySSE, useEoaSend, useForm, useGenericSigner, useIncomingPaymentDecimals, useIncomingPayments, useKeyBalance, useLogin, useLoginWithForm, useOnboardingState as useOnboardingRouting, useOnboardingState$1 as useOnboardingState, usePaymentDecimals, useProviderConfig, useSendPayment, useSignatureQueue, useTapToCancel, useThemeClasses, useTokenStore, useWalletCenter, useWalletConfig, useWalletNavigate, useWalletSigner, userIdentityStatusScopes, validateWalletCenterModules, verificationRequiredGate, verifyMetaTransactionDigest, verifyNftAuthorizationBinding, walletCenter, walletRegistrationAuthContext, walletRegistrationMatches, walletRegistrationsForChain, withoutCreditCheckoutReturnMarker };
7885
+ /** Header-authenticated JSON SSE, shared by wallet and consumer chat streams. */
7886
+ interface JsonEventStreamOptions<T> {
7887
+ url: () => string;
7888
+ token: () => string | null | undefined;
7889
+ onEvent: (event: T) => void;
7890
+ onError?: (error: Error) => void;
7891
+ }
7892
+ declare function subscribeJsonEvents<T>(options: JsonEventStreamOptions<T>): () => void;
7893
+
7894
+ export { type AcceptObligationResponse, type AcceptPaymentResponse, type AcceptState, AccessFlow, type AccessFlowBranding, type AccessFlowMessages, type AccessFlowMessagesOverride, type AccessFlowMode, type AccessFlowProps, AccountOpeningPanel, type AccountOpeningStage, type AccountOpeningState, type AccountOpeningStatus, type AccountSignerCustody, type ActivateChainAccountOptions, AddCardDialog, type AddCardDialogProps, type AddChainParams, type AddMemberRequest, type AltLoginSuccess, type ApiKeyInfo, type AppAuthContextValue, type AuthProviderId, type AuthProviderImpl, type AuthResult, AvatarPicker, type BalanceResponse, type BalanceRow, BankAccountCard, type BankAccountCardFields, type BilledGroup, BillingCenter, type BillingCenterProps, BillingChip, type BillingChipTone, type BillingColumn, type BillingGateInfo, type BillingLineItem, type BillingRecoveryAction, type BillingStatus, type BillingSummary, type BlockExplorer, BrandingProvider, type BrandingProviderProps, BrowserLocalStorageTokenStore, type BuildCreditCheckoutReturnUrlsOptions, BusinessVerificationSection, type BusinessVerificationSectionProps, Button, BuyCreditsDialog, type BuyCreditsDialogProps, type BuyCreditsTarget, CHOOSER_META, CREDIT_CHECKOUT_RETRY_REQUESTED_EVENT, CREDIT_CHECKOUT_RETRY_REQUIRED_EVENT, CREDIT_CHECKOUT_SYNCED_EVENT, type CancelPaymentResponse, Card, type CardRequiredContext, CardRequiredError, CardRequiredHost, type CardRequiredRequest, type CardRequiredSource, ChainAccountActivationError, type ChainAccountActivationErrorMetadata, ChainAccountActivationHttpError, type ChainAccountActivationResource, type ChainAccountActivationStatus, type ChainAccountEntityKind, type ChainAccountReady, type ChainAccountRequiredContext, ChainAccountRequiredError, ChainAccountRequiredHost, type ChainAccountRequiredRequest, type ChainAccountRequiredSource, type ChainAccountRestExpectedTarget, type ChainAddresses, type ChainConfigResponse, ChainMismatchError, ChainNotConfiguredError, ChangePasswordModal, type ChangePasswordModalProps, type ChooserCardProps, type ChromeMode, type ConfirmOptions, type ConnectStatus, type Contract, type CreateGroupRequest, type CreditBalanceSyncResponse, type CreditCheckoutKind, type CreditCheckoutRetryDetail, type CreditCheckoutReturnContext, type CreditCheckoutReturnMarker, type CreditCheckoutReturnUrls, type CreditCheckoutState, type CreditCheckoutStatusResponse, type CreditCheckoutSyncedDetail, CreditExhaustedHost, type CreditGateInfo, type CreditPlan, type CreditRequiredContext, CreditRequiredError, type CreditRequiredReason, type CreditRequiredRequest, type CreditRequiredSource, type CreditTopup, DEFAULT_APP_DELEGATION_SCOPE, DEFAULT_AUTH_PROVIDERS, DEFAULT_KYC_PROVIDERS, DEFAULT_MESSAGES, DEFAULT_OWNED_GROUP_DELEGATION_SCOPE, DailySpendChart, type DailyUsagePoint, type DecimalsErrorReason, type DelegationRequest, type DelegationResponse, type DelegationSessionMetadata, type DelegationToken, type DirectDelegationSessionMetadata, Drawer, EarningsSection, type EarningsSectionProps, type EarningsShare, type EarningsSummary, type EarningsTerms, type EarningsTotals, type EmailVerificationConfirmResult, type EmailVerificationStartResult, type EmailVerificationStatus, type EntityEvent, type EntityEventType, EntitySSEProvider, type EoaHandle, type EoaSendInput, type EoaSendStatus, ExecutionMode, GROUP_ACCOUNT_OPERATION_KEYS, type GasPricing, type GasPricingChain, type GenerateApiKeyRequest, type GenerateApiKeyResponse, GenericSignDialog, type GenericSignDialogProps, type GlobalNotificationCallbacks, GlobalNotificationService, type Group, type GroupAccountOperationExpectation, type GroupAccountOperationMutationStatus, type GroupAccountOperationReadStatus, type GroupAccountOperationResource, type GroupAccountOperationWire, type GroupAccountOwner, type GroupAccountOwnersResponse, type GroupBillingPolicy, type GroupBillingPolicyResponse, GroupBillingSection, type GroupBillingSectionProps, type GroupEarnings, type GroupEarningsRow, type GroupMember, GroupOwnershipPanel, type GroupOwnershipPanelProps, type GroupOwnershipRelationship, type GroupOwnershipRelationshipsResponse, type GroupOwnershipStatus, type GroupWalletOwnerOperationResponse, type GroupWalletOwnerOperationStatusResponse, IdentityCard, type IdentityStatus, type IdentityStatusScope, IncomingPaymentsCenter, type IncomingPaymentsCenterProps, IncomingPaymentsInbox, type IncomingPaymentsInboxProps, IncomingPaymentsLauncher, type IncomingPaymentsLauncherProps, type JsonEventStreamOptions, KeyBalances, type KeyBalancesProps, type KeyContext, type KeyPair, type KeySelection, SecurityPage as KeysManager, type KycProviderId, type KycProviderImpl, LineItemDrawer, type LineItemsCursor, type LineItemsPage, LineItemsTable, type LineItemsTableProps, LoadingSpinner, LoginAltMethods, type LoginAltMethodsProps, LoginComponent, LoginForm, type LoginKey, LoginLayout, type LoginLayoutProps, LoginPage, type LoginPageProps, type LoginRequest, LoginShell, type LoginShellProps, METER_LABELS, type ManualTransactionTuple, type MeterTotal, type ModeConfig, type NftOwnedSignerBinding, type NonceBoundManualEnvelope, type NonceResponse, OnboardingMethodCard, OnboardingPlanHttpError, type OnboardingPlanIntent, type OnboardingPlanIntentResponse, type OnboardingPolicyDoc, OnboardingPolicyHttpError, type OnboardingPolicyResponse, OnboardingPolicySection, type OnboardingPolicySectionProps, type OnboardingSnapshot, type OnboardingStatus, OnboardingWizard, type OnboardingWizardProps, type OwnedDelegationSessionMetadata, type OwnedGroupAuthorizationBinding, type OwnedGroupDelegationRequest, type OwnedGroupDelegationResponse, type OwnedGroupMembershipEdge, type OwnedGroupProjection, type OwnedGroupSignerCustody, type OwnedGroupUnsignedAuthorization, type OwnedGroupsResponse, type PasskeyContext, type PasskeyExchangeResponse, type Payment, type PaymentAsset, type PaymentDirection, type PaymentParty, PaymentStatusEnum, type PendingInboxItem, PendingPaymentCard, type PendingPaymentCardProps, type PendingPaymentKind, PhoneVerification, type PlatformOnboardingInfo, Profile as ProfileEditor, type ProfileEditorProps, type ProfilePatch, ProviderConfigProvider, type ProvidersConfigResponse, type PublicBillingCatalog, type QueueMessage, RedirectTo, type RedirectToProps, type RegisteredWalletMetadata, type RemintBillingTokensOptions, type RpcRequest, SendFromKey, type SendFromKeyProps, type SendInstantArgs, type SendInstantResponse, type SendPaymentAsset, SendPaymentDrawer, type SendPaymentDrawerProps, SendPaymentForm, type SendPaymentFormProps, type SendTxParams, type SetDirectDelegationSession, type SetOnboardingPolicyInput, type SetOwnedDelegationSession, type SetupIntentResponse, type SignOptions, type SignRequest, type SignResponse, SignatureCenterRow, type SignatureCenterRowProps, SignaturePreviewDrawer as SignatureDrawer, SignatureQueueProvider, SignatureWorkflow, type SignatureWorkflowNotifyPayload, type SignatureWorkflowProps, type SigninPayload, type SignupFlowProps, type SimpleSummaryInput, SkeletonAvatar, type SpendMeter, type SponsorshipInfo, SponsorshipSessionError, type SponsorshipSessionResponse, type SponsorshipSettings, type StatusColor, StepShell, type StepShellProps, type StripeIdentitySession, Toast, type ToastProps, type TokenInfo, type TokenManagerConfig, type TokenStore, type TxReceipt, type UpdateGroupRequest, type UsageBreakdownRow, type UseEoaSendOptions, type UseEoaSendResult, type UseIncomingPaymentDecimalsResult, type UseIncomingPaymentsOptions, type UseIncomingPaymentsResult, type UseKeyBalanceOptions, type UseKeyBalanceResult, type UseSendPaymentResult, type UseSignatureQueueResult, type UserDisplayProfile, type UserProfile, type VerificationLaunchOption, type VerificationMissing, type VerificationProfile, type VerificationProfileRequirement, type VerificationProfilesResponse, type VerificationRecord, type VerificationRequiredContext, VerificationRequiredError, VerificationRequiredHost, type VerificationRequiredRequest, type VerificationStatus, VerifiedBadge, type VirtualAccount, type WalletAuthContextValue, WalletAuthProvider, WalletCenter, type WalletCenterActor, type WalletCenterBuiltinId, type WalletCenterBuiltinModule, type WalletCenterClassNames, type WalletCenterConfig, type WalletCenterDirectoryGroup, type WalletCenterDirectoryModule, type WalletCenterIcon, type WalletCenterIdentity, type WalletCenterIdentityAction, type WalletCenterModule, type WalletCenterNavigationItem, type WalletCenterPanelContext, type WalletCenterPanelModule, type WalletCenterProps, WalletCenterProvider, type WalletCenterRouteModule, type WalletCenterRuntime, type WalletCenterStatus, WalletCenterTrigger, type WalletCenterTriggerProps, type WalletCenterView, type WalletCenterVisibility, WalletConfigProvider, type WalletDrawerClassNames, type WalletIdentity, WalletIdentityError, WalletNotRegisteredError, type WalletProfileClassNames, WalletProvider, type WalletProviderProps, type WalletRegistrationAuthContext, type WalletRegistrationRequestContext, type WalletRegistrationTokenPurpose, type WalletRuntimeConfig, type WalletSecurityClassNames, type WalletSigner, type WalletUiConfig, YieldFabricLockup, activateChainAccount, activateChainAccountAndRefresh, addChainParamsByChainId, agentMinutesFromMicros, apiKeysService, assertChain, authService, balanceService, billingGateInfoForActiveToken, billingGateInfoFromToken, billingRecoveryAction, billingService, breakdownKeyLabel, buildAuthRegistry, buildCreditCheckoutReturnUrls, buildInbox, buildKycRegistry, buildSendParams, canReexecuteMessage, canonicalEip155ChainId, canonicalEvmAddress, canonicalGroupOperationUuid, canonicalU256Decimal, cardRequiredGate, chainAccountMode, chainAccountRequiredGate, chainAddressesToLabels, chainIdToHex, chainNames, computeMetaTransactionDigest, confirmMyEmailVerification, contractNeedsObligationAccept, convertAmountToRaw, createPasskey, createStripeIdentitySession, createSumsubAccessToken, creditCheckoutTargetGroupId, creditGateInfoForActiveToken, creditPlanTotalAllowanceUsd, creditRequiredGate, decodeJwtPayload as decodeJwtClaims, defaultTokenStore, defaultWalletCenterModules, defineWalletDirectory, defineWalletPanel, defineWalletRoute, delegationService, effectiveStatus, enabledPaymentChainIds, encodeApprove, encodeBalanceOf, encodeTransfer, ensureCardOnFile, ensureCreditAvailable, ensureVerified, exchange, extractCurrency, extractTokenAssetId, featureLabel, fetchAccountOpeningStatus, fetchNonce, fetchVerificationStatus, fetchWithChainAccountActivationRetry, findWalletRegistration, formatAgentMinutes, formatAgentTime, formatPages, formatPayment, formatRelativeTime, formatTxHashShort, formatUnits, formatUsdMicros, freshTokenForSameChainActor, gasOpLabel, getActiveChainId, getActiveUserChainId, getAddChainParams, getAuthServiceUrl, getBlockExplorer, getBlockExplorerAddressUrl, getBlockExplorerTxUrl, getChainAccountActivationStatus, getChainConfig, getChainIdFromToken, getCurrentChainId, getDefaultChainAddressLabels, getDefaultChainId, getErc20Allowance, getErc20Balance, getErc20Decimals, getErc20Symbol, getIdentityStatus, getIdentityStatusForProviders, getMyEmailVerificationStatus, getMyProfile, getNativeBalance, getPaymentsServiceUrl, getReceipt, getWebSocketUrl, groupInbox, groupsService, hasActiveAuthToken, humanizeMessageType, invalidateOnboardingState, invalidateWalletCount, isEoaKey, isExactSponsoredUserToken, isLiveMode, isPaymentChainEnabled, isStaffRole, itemAgentTime, itemLabel, keyPairToEoaHandle, keysService, knownAuthProviderIds, knownKycProviderIds, kycKindOf, link, listMyLoginKeys, listMyVerifications, llmCategoryLabel, makeWalletId, manualChainAccountRequiredContext, messagesService, needsPaymentAcceptance, nftOwnedSignerBinding, onboardingPlanService, onboardingPolicyService, ownedGroupUserSignerCustody, parseChainAccountRequired, parseChainAccountRequiredRest, parseGroupAccountOperationWire, parseUnits, parseVerificationRequired, parseWalletId, passkeyLabel, patchMyEmail, patchMyProfile, paymentsService, paymentsUrlMap, personalJwtHasGroupPayer, personalSessionHasGroupPayer, promptCardCapture, promptCreditPurchase, promptVerification, readCreditCheckoutReturnMarker, recordCredentialIssued, refreshChainAccountSession, registerBlockExplorer, registeredWalletsFromMetadata, remintTokensAfterCardChange, requireActiveUserChainId, requireChainIdFromToken, requireWalletRegistrationChain, requireWalletRegistrationSessionChain, resetDecimalsWarningCache, resolveAuth, resolveKyc, resolveKycInstance, resolvePaymentDirection, resolveWalletIdentityForChain, retryOnceAfterChainAccountActivation, selectWalletRegistration, setAuthRegistry, setGroupVerificationProfiles, setKycRegistry, setModeConfig, signInChallengeViaPasskey, signInWithPasskey, signUpRegisterViaPasskey, signUpWithPasskey, signWithPasskey, signatureSignin, snapshotNeedsPrepaidPlan, startMyEmailVerification, statusToColor, subscribeEntityEvents, subscribeJsonEvents, switchChain, syntheticPasskeyAddress, testChainIds, tokenManager, tryParseWalletId, unlink, useAuth, useAuthContext, useBranding, useEntitySSE, useEoaSend, useForm, useGenericSigner, useIncomingPaymentDecimals, useIncomingPayments, useKeyBalance, useLogin, useLoginWithForm, useOnboardingState as useOnboardingRouting, useOnboardingState$1 as useOnboardingState, usePaymentDecimals, useProviderConfig, useSendPayment, useSignatureQueue, useTapToCancel, useThemeClasses, useTokenStore, useWalletCenter, useWalletConfig, useWalletNavigate, useWalletSigner, userIdentityStatusScopes, validateWalletCenterModules, verificationRequiredGate, verifyMetaTransactionDigest, verifyNftAuthorizationBinding, walletCenter, walletRegistrationAuthContext, walletRegistrationMatches, walletRegistrationsForChain, withoutCreditCheckoutReturnMarker };
package/dist/index.d.ts CHANGED
@@ -524,6 +524,10 @@ interface WalletRuntimeConfig extends ModeConfig {
524
524
  * cache reset + `userChanged` event dispatch here. Hosts that
525
525
  * don't use Apollo can omit this. */
526
526
  onSessionBootstrapped?: (userId: string) => void | Promise<void>;
527
+ /** Runs BEFORE the session is torn down on `logout` / `logoutAll`,
528
+ * while the token is still valid — the host forgets this device's push
529
+ * subscription here. Failures are swallowed; sign-out always proceeds. */
530
+ onBeforeLogout?: () => void | Promise<void>;
527
531
  /** Optional toast / error reporting hooks for wallet-internal
528
532
  * events that the host might want to surface (background poller
529
533
  * failures, queue subscription drops, etc.). */
@@ -1371,15 +1375,7 @@ interface EntityEvent {
1371
1375
  * to filter / style. */
1372
1376
  source?: string;
1373
1377
  }
1374
- /**
1375
- * Subscribe to entity SSE events from the Payments service.
1376
- * Uses `access_token` query param because browser EventSource cannot send Authorization headers.
1377
- *
1378
- * Manages its own reconnection with fresh tokens on each attempt (browser-native
1379
- * EventSource reconnect reuses the original URL, which fails if the token expired).
1380
- *
1381
- * @returns Unsubscribe function that closes the EventSource and stops reconnection.
1382
- */
1378
+ /** Subscribe with a fresh header bearer on each connection. */
1383
1379
  declare function subscribeEntityEvents(entityId: string, onEvent: (event: EntityEvent) => void, onError?: (err: any) => void): () => void;
1384
1380
 
1385
1381
  type EventHandler = (event: EntityEvent) => void;
@@ -4234,6 +4230,28 @@ interface WalletCenterContextValue {
4234
4230
  requestedView: WalletCenterView;
4235
4231
  openWalletCenter: (view?: WalletCenterView) => void;
4236
4232
  closeWalletCenter: () => void;
4233
+ /** Where the center renders while a host holds it: inside that element,
4234
+ * as a page of the host's own frame, instead of over the app as a
4235
+ * drawer. A phone frame with a Wallet tab hosts it; `null` (the
4236
+ * default) is the drawer. One host at a time — the last to claim wins,
4237
+ * and a host must release (`setHost(null)`) when it unmounts. */
4238
+ host: HTMLElement | null;
4239
+ setHost: (host: HTMLElement | null) => void;
4240
+ /** What the host wants the center to know about itself — today the label
4241
+ * of the page it will show again when the center's own way back is
4242
+ * taken. SEPARATE from `setHost` on purpose: releasing and re-claiming
4243
+ * the host swaps the center between a portal and the drawer, which
4244
+ * REMOUNTS it and throws away which section the person was reading. A
4245
+ * changing label must never do that. */
4246
+ hostOptions: WalletCenterHostOptions;
4247
+ setHostOptions: (options: WalletCenterHostOptions) => void;
4248
+ /** What the center has in front of it while hosted, for the host's own
4249
+ * title bar to name: the section, or the message being read. */
4250
+ hostTitle: string | null;
4251
+ setHostTitle: (title: string | null) => void;
4252
+ }
4253
+ interface WalletCenterHostOptions {
4254
+ backLabel?: string;
4237
4255
  }
4238
4256
  declare function WalletCenterProvider({ children }: {
4239
4257
  children: ReactNode;
@@ -4253,6 +4271,11 @@ interface WalletCenterProps {
4253
4271
  * SDK-owned wallet shell. Consumer apps configure its ordered modules,
4254
4272
  * directory and actor list; the SDK owns layout, responsive behavior and
4255
4273
  * navigation state.
4274
+ *
4275
+ * Mounted once, near the app root. It renders as a drawer over the app —
4276
+ * unless a host has claimed it through `useWalletCenter().setHost`, in
4277
+ * which case it renders inside that element as a page of the host's own
4278
+ * frame (no overlay, no close control: the frame carries the way out).
4256
4279
  */
4257
4280
  declare function WalletCenter({ config, selectorRegistry, addressLabels, renderSimpleSummary, onSigned, onRetried, onCanceled, }: WalletCenterProps): react_jsx_runtime.JSX.Element | null;
4258
4281
 
@@ -7859,4 +7882,13 @@ interface PhoneVerificationProps {
7859
7882
  }
7860
7883
  declare function PhoneVerification({ profile, onUpdated, inputClassName, primaryButtonClassName, secondaryButtonClassName, labelClassName, mutedClassName, errorClassName, buttonRowClassName, readOnly, valueClassName, }: PhoneVerificationProps): react_jsx_runtime.JSX.Element;
7861
7884
 
7862
- export { type AcceptObligationResponse, type AcceptPaymentResponse, type AcceptState, AccessFlow, type AccessFlowBranding, type AccessFlowMessages, type AccessFlowMessagesOverride, type AccessFlowMode, type AccessFlowProps, AccountOpeningPanel, type AccountOpeningStage, type AccountOpeningState, type AccountOpeningStatus, type AccountSignerCustody, type ActivateChainAccountOptions, AddCardDialog, type AddCardDialogProps, type AddChainParams, type AddMemberRequest, type AltLoginSuccess, type ApiKeyInfo, type AppAuthContextValue, type AuthProviderId, type AuthProviderImpl, type AuthResult, AvatarPicker, type BalanceResponse, type BalanceRow, BankAccountCard, type BankAccountCardFields, type BilledGroup, BillingCenter, type BillingCenterProps, BillingChip, type BillingChipTone, type BillingColumn, type BillingGateInfo, type BillingLineItem, type BillingRecoveryAction, type BillingStatus, type BillingSummary, type BlockExplorer, BrandingProvider, type BrandingProviderProps, BrowserLocalStorageTokenStore, type BuildCreditCheckoutReturnUrlsOptions, BusinessVerificationSection, type BusinessVerificationSectionProps, Button, BuyCreditsDialog, type BuyCreditsDialogProps, type BuyCreditsTarget, CHOOSER_META, CREDIT_CHECKOUT_RETRY_REQUESTED_EVENT, CREDIT_CHECKOUT_RETRY_REQUIRED_EVENT, CREDIT_CHECKOUT_SYNCED_EVENT, type CancelPaymentResponse, Card, type CardRequiredContext, CardRequiredError, CardRequiredHost, type CardRequiredRequest, type CardRequiredSource, ChainAccountActivationError, type ChainAccountActivationErrorMetadata, ChainAccountActivationHttpError, type ChainAccountActivationResource, type ChainAccountActivationStatus, type ChainAccountEntityKind, type ChainAccountReady, type ChainAccountRequiredContext, ChainAccountRequiredError, ChainAccountRequiredHost, type ChainAccountRequiredRequest, type ChainAccountRequiredSource, type ChainAccountRestExpectedTarget, type ChainAddresses, type ChainConfigResponse, ChainMismatchError, ChainNotConfiguredError, ChangePasswordModal, type ChangePasswordModalProps, type ChooserCardProps, type ChromeMode, type ConfirmOptions, type ConnectStatus, type Contract, type CreateGroupRequest, type CreditBalanceSyncResponse, type CreditCheckoutKind, type CreditCheckoutRetryDetail, type CreditCheckoutReturnContext, type CreditCheckoutReturnMarker, type CreditCheckoutReturnUrls, type CreditCheckoutState, type CreditCheckoutStatusResponse, type CreditCheckoutSyncedDetail, CreditExhaustedHost, type CreditGateInfo, type CreditPlan, type CreditRequiredContext, CreditRequiredError, type CreditRequiredReason, type CreditRequiredRequest, type CreditRequiredSource, type CreditTopup, DEFAULT_APP_DELEGATION_SCOPE, DEFAULT_AUTH_PROVIDERS, DEFAULT_KYC_PROVIDERS, DEFAULT_MESSAGES, DEFAULT_OWNED_GROUP_DELEGATION_SCOPE, DailySpendChart, type DailyUsagePoint, type DecimalsErrorReason, type DelegationRequest, type DelegationResponse, type DelegationSessionMetadata, type DelegationToken, type DirectDelegationSessionMetadata, Drawer, EarningsSection, type EarningsSectionProps, type EarningsShare, type EarningsSummary, type EarningsTerms, type EarningsTotals, type EmailVerificationConfirmResult, type EmailVerificationStartResult, type EmailVerificationStatus, type EntityEvent, type EntityEventType, EntitySSEProvider, type EoaHandle, type EoaSendInput, type EoaSendStatus, ExecutionMode, GROUP_ACCOUNT_OPERATION_KEYS, type GasPricing, type GasPricingChain, type GenerateApiKeyRequest, type GenerateApiKeyResponse, GenericSignDialog, type GenericSignDialogProps, type GlobalNotificationCallbacks, GlobalNotificationService, type Group, type GroupAccountOperationExpectation, type GroupAccountOperationMutationStatus, type GroupAccountOperationReadStatus, type GroupAccountOperationResource, type GroupAccountOperationWire, type GroupAccountOwner, type GroupAccountOwnersResponse, type GroupBillingPolicy, type GroupBillingPolicyResponse, GroupBillingSection, type GroupBillingSectionProps, type GroupEarnings, type GroupEarningsRow, type GroupMember, GroupOwnershipPanel, type GroupOwnershipPanelProps, type GroupOwnershipRelationship, type GroupOwnershipRelationshipsResponse, type GroupOwnershipStatus, type GroupWalletOwnerOperationResponse, type GroupWalletOwnerOperationStatusResponse, IdentityCard, type IdentityStatus, type IdentityStatusScope, IncomingPaymentsCenter, type IncomingPaymentsCenterProps, IncomingPaymentsInbox, type IncomingPaymentsInboxProps, IncomingPaymentsLauncher, type IncomingPaymentsLauncherProps, KeyBalances, type KeyBalancesProps, type KeyContext, type KeyPair, type KeySelection, SecurityPage as KeysManager, type KycProviderId, type KycProviderImpl, LineItemDrawer, type LineItemsCursor, type LineItemsPage, LineItemsTable, type LineItemsTableProps, LoadingSpinner, LoginAltMethods, type LoginAltMethodsProps, LoginComponent, LoginForm, type LoginKey, LoginLayout, type LoginLayoutProps, LoginPage, type LoginPageProps, type LoginRequest, LoginShell, type LoginShellProps, METER_LABELS, type ManualTransactionTuple, type MeterTotal, type ModeConfig, type NftOwnedSignerBinding, type NonceBoundManualEnvelope, type NonceResponse, OnboardingMethodCard, OnboardingPlanHttpError, type OnboardingPlanIntent, type OnboardingPlanIntentResponse, type OnboardingPolicyDoc, OnboardingPolicyHttpError, type OnboardingPolicyResponse, OnboardingPolicySection, type OnboardingPolicySectionProps, type OnboardingSnapshot, type OnboardingStatus, OnboardingWizard, type OnboardingWizardProps, type OwnedDelegationSessionMetadata, type OwnedGroupAuthorizationBinding, type OwnedGroupDelegationRequest, type OwnedGroupDelegationResponse, type OwnedGroupMembershipEdge, type OwnedGroupProjection, type OwnedGroupSignerCustody, type OwnedGroupUnsignedAuthorization, type OwnedGroupsResponse, type PasskeyContext, type PasskeyExchangeResponse, type Payment, type PaymentAsset, type PaymentDirection, type PaymentParty, PaymentStatusEnum, type PendingInboxItem, PendingPaymentCard, type PendingPaymentCardProps, type PendingPaymentKind, PhoneVerification, type PlatformOnboardingInfo, Profile as ProfileEditor, type ProfileEditorProps, type ProfilePatch, ProviderConfigProvider, type ProvidersConfigResponse, type PublicBillingCatalog, type QueueMessage, RedirectTo, type RedirectToProps, type RegisteredWalletMetadata, type RemintBillingTokensOptions, type RpcRequest, SendFromKey, type SendFromKeyProps, type SendInstantArgs, type SendInstantResponse, type SendPaymentAsset, SendPaymentDrawer, type SendPaymentDrawerProps, SendPaymentForm, type SendPaymentFormProps, type SendTxParams, type SetDirectDelegationSession, type SetOnboardingPolicyInput, type SetOwnedDelegationSession, type SetupIntentResponse, type SignOptions, type SignRequest, type SignResponse, SignatureCenterRow, type SignatureCenterRowProps, SignaturePreviewDrawer as SignatureDrawer, SignatureQueueProvider, SignatureWorkflow, type SignatureWorkflowNotifyPayload, type SignatureWorkflowProps, type SigninPayload, type SignupFlowProps, type SimpleSummaryInput, SkeletonAvatar, type SpendMeter, type SponsorshipInfo, SponsorshipSessionError, type SponsorshipSessionResponse, type SponsorshipSettings, type StatusColor, StepShell, type StepShellProps, type StripeIdentitySession, Toast, type ToastProps, type TokenInfo, type TokenManagerConfig, type TokenStore, type TxReceipt, type UpdateGroupRequest, type UsageBreakdownRow, type UseEoaSendOptions, type UseEoaSendResult, type UseIncomingPaymentDecimalsResult, type UseIncomingPaymentsOptions, type UseIncomingPaymentsResult, type UseKeyBalanceOptions, type UseKeyBalanceResult, type UseSendPaymentResult, type UseSignatureQueueResult, type UserDisplayProfile, type UserProfile, type VerificationLaunchOption, type VerificationMissing, type VerificationProfile, type VerificationProfileRequirement, type VerificationProfilesResponse, type VerificationRecord, type VerificationRequiredContext, VerificationRequiredError, VerificationRequiredHost, type VerificationRequiredRequest, type VerificationStatus, VerifiedBadge, type VirtualAccount, type WalletAuthContextValue, WalletAuthProvider, WalletCenter, type WalletCenterActor, type WalletCenterBuiltinId, type WalletCenterBuiltinModule, type WalletCenterClassNames, type WalletCenterConfig, type WalletCenterDirectoryGroup, type WalletCenterDirectoryModule, type WalletCenterIcon, type WalletCenterIdentity, type WalletCenterIdentityAction, type WalletCenterModule, type WalletCenterNavigationItem, type WalletCenterPanelContext, type WalletCenterPanelModule, type WalletCenterProps, WalletCenterProvider, type WalletCenterRouteModule, type WalletCenterRuntime, type WalletCenterStatus, WalletCenterTrigger, type WalletCenterTriggerProps, type WalletCenterView, type WalletCenterVisibility, WalletConfigProvider, type WalletDrawerClassNames, type WalletIdentity, WalletIdentityError, WalletNotRegisteredError, type WalletProfileClassNames, WalletProvider, type WalletProviderProps, type WalletRegistrationAuthContext, type WalletRegistrationRequestContext, type WalletRegistrationTokenPurpose, type WalletRuntimeConfig, type WalletSecurityClassNames, type WalletSigner, type WalletUiConfig, YieldFabricLockup, activateChainAccount, activateChainAccountAndRefresh, addChainParamsByChainId, agentMinutesFromMicros, apiKeysService, assertChain, authService, balanceService, billingGateInfoForActiveToken, billingGateInfoFromToken, billingRecoveryAction, billingService, breakdownKeyLabel, buildAuthRegistry, buildCreditCheckoutReturnUrls, buildInbox, buildKycRegistry, buildSendParams, canReexecuteMessage, canonicalEip155ChainId, canonicalEvmAddress, canonicalGroupOperationUuid, canonicalU256Decimal, cardRequiredGate, chainAccountMode, chainAccountRequiredGate, chainAddressesToLabels, chainIdToHex, chainNames, computeMetaTransactionDigest, confirmMyEmailVerification, contractNeedsObligationAccept, convertAmountToRaw, createPasskey, createStripeIdentitySession, createSumsubAccessToken, creditCheckoutTargetGroupId, creditGateInfoForActiveToken, creditPlanTotalAllowanceUsd, creditRequiredGate, decodeJwtPayload as decodeJwtClaims, defaultTokenStore, defaultWalletCenterModules, defineWalletDirectory, defineWalletPanel, defineWalletRoute, delegationService, effectiveStatus, enabledPaymentChainIds, encodeApprove, encodeBalanceOf, encodeTransfer, ensureCardOnFile, ensureCreditAvailable, ensureVerified, exchange, extractCurrency, extractTokenAssetId, featureLabel, fetchAccountOpeningStatus, fetchNonce, fetchVerificationStatus, fetchWithChainAccountActivationRetry, findWalletRegistration, formatAgentMinutes, formatAgentTime, formatPages, formatPayment, formatRelativeTime, formatTxHashShort, formatUnits, formatUsdMicros, freshTokenForSameChainActor, gasOpLabel, getActiveChainId, getActiveUserChainId, getAddChainParams, getAuthServiceUrl, getBlockExplorer, getBlockExplorerAddressUrl, getBlockExplorerTxUrl, getChainAccountActivationStatus, getChainConfig, getChainIdFromToken, getCurrentChainId, getDefaultChainAddressLabels, getDefaultChainId, getErc20Allowance, getErc20Balance, getErc20Decimals, getErc20Symbol, getIdentityStatus, getIdentityStatusForProviders, getMyEmailVerificationStatus, getMyProfile, getNativeBalance, getPaymentsServiceUrl, getReceipt, getWebSocketUrl, groupInbox, groupsService, hasActiveAuthToken, humanizeMessageType, invalidateOnboardingState, invalidateWalletCount, isEoaKey, isExactSponsoredUserToken, isLiveMode, isPaymentChainEnabled, isStaffRole, itemAgentTime, itemLabel, keyPairToEoaHandle, keysService, knownAuthProviderIds, knownKycProviderIds, kycKindOf, link, listMyLoginKeys, listMyVerifications, llmCategoryLabel, makeWalletId, manualChainAccountRequiredContext, messagesService, needsPaymentAcceptance, nftOwnedSignerBinding, onboardingPlanService, onboardingPolicyService, ownedGroupUserSignerCustody, parseChainAccountRequired, parseChainAccountRequiredRest, parseGroupAccountOperationWire, parseUnits, parseVerificationRequired, parseWalletId, passkeyLabel, patchMyEmail, patchMyProfile, paymentsService, paymentsUrlMap, personalJwtHasGroupPayer, personalSessionHasGroupPayer, promptCardCapture, promptCreditPurchase, promptVerification, readCreditCheckoutReturnMarker, recordCredentialIssued, refreshChainAccountSession, registerBlockExplorer, registeredWalletsFromMetadata, remintTokensAfterCardChange, requireActiveUserChainId, requireChainIdFromToken, requireWalletRegistrationChain, requireWalletRegistrationSessionChain, resetDecimalsWarningCache, resolveAuth, resolveKyc, resolveKycInstance, resolvePaymentDirection, resolveWalletIdentityForChain, retryOnceAfterChainAccountActivation, selectWalletRegistration, setAuthRegistry, setGroupVerificationProfiles, setKycRegistry, setModeConfig, signInChallengeViaPasskey, signInWithPasskey, signUpRegisterViaPasskey, signUpWithPasskey, signWithPasskey, signatureSignin, snapshotNeedsPrepaidPlan, startMyEmailVerification, statusToColor, subscribeEntityEvents, switchChain, syntheticPasskeyAddress, testChainIds, tokenManager, tryParseWalletId, unlink, useAuth, useAuthContext, useBranding, useEntitySSE, useEoaSend, useForm, useGenericSigner, useIncomingPaymentDecimals, useIncomingPayments, useKeyBalance, useLogin, useLoginWithForm, useOnboardingState as useOnboardingRouting, useOnboardingState$1 as useOnboardingState, usePaymentDecimals, useProviderConfig, useSendPayment, useSignatureQueue, useTapToCancel, useThemeClasses, useTokenStore, useWalletCenter, useWalletConfig, useWalletNavigate, useWalletSigner, userIdentityStatusScopes, validateWalletCenterModules, verificationRequiredGate, verifyMetaTransactionDigest, verifyNftAuthorizationBinding, walletCenter, walletRegistrationAuthContext, walletRegistrationMatches, walletRegistrationsForChain, withoutCreditCheckoutReturnMarker };
7885
+ /** Header-authenticated JSON SSE, shared by wallet and consumer chat streams. */
7886
+ interface JsonEventStreamOptions<T> {
7887
+ url: () => string;
7888
+ token: () => string | null | undefined;
7889
+ onEvent: (event: T) => void;
7890
+ onError?: (error: Error) => void;
7891
+ }
7892
+ declare function subscribeJsonEvents<T>(options: JsonEventStreamOptions<T>): () => void;
7893
+
7894
+ export { type AcceptObligationResponse, type AcceptPaymentResponse, type AcceptState, AccessFlow, type AccessFlowBranding, type AccessFlowMessages, type AccessFlowMessagesOverride, type AccessFlowMode, type AccessFlowProps, AccountOpeningPanel, type AccountOpeningStage, type AccountOpeningState, type AccountOpeningStatus, type AccountSignerCustody, type ActivateChainAccountOptions, AddCardDialog, type AddCardDialogProps, type AddChainParams, type AddMemberRequest, type AltLoginSuccess, type ApiKeyInfo, type AppAuthContextValue, type AuthProviderId, type AuthProviderImpl, type AuthResult, AvatarPicker, type BalanceResponse, type BalanceRow, BankAccountCard, type BankAccountCardFields, type BilledGroup, BillingCenter, type BillingCenterProps, BillingChip, type BillingChipTone, type BillingColumn, type BillingGateInfo, type BillingLineItem, type BillingRecoveryAction, type BillingStatus, type BillingSummary, type BlockExplorer, BrandingProvider, type BrandingProviderProps, BrowserLocalStorageTokenStore, type BuildCreditCheckoutReturnUrlsOptions, BusinessVerificationSection, type BusinessVerificationSectionProps, Button, BuyCreditsDialog, type BuyCreditsDialogProps, type BuyCreditsTarget, CHOOSER_META, CREDIT_CHECKOUT_RETRY_REQUESTED_EVENT, CREDIT_CHECKOUT_RETRY_REQUIRED_EVENT, CREDIT_CHECKOUT_SYNCED_EVENT, type CancelPaymentResponse, Card, type CardRequiredContext, CardRequiredError, CardRequiredHost, type CardRequiredRequest, type CardRequiredSource, ChainAccountActivationError, type ChainAccountActivationErrorMetadata, ChainAccountActivationHttpError, type ChainAccountActivationResource, type ChainAccountActivationStatus, type ChainAccountEntityKind, type ChainAccountReady, type ChainAccountRequiredContext, ChainAccountRequiredError, ChainAccountRequiredHost, type ChainAccountRequiredRequest, type ChainAccountRequiredSource, type ChainAccountRestExpectedTarget, type ChainAddresses, type ChainConfigResponse, ChainMismatchError, ChainNotConfiguredError, ChangePasswordModal, type ChangePasswordModalProps, type ChooserCardProps, type ChromeMode, type ConfirmOptions, type ConnectStatus, type Contract, type CreateGroupRequest, type CreditBalanceSyncResponse, type CreditCheckoutKind, type CreditCheckoutRetryDetail, type CreditCheckoutReturnContext, type CreditCheckoutReturnMarker, type CreditCheckoutReturnUrls, type CreditCheckoutState, type CreditCheckoutStatusResponse, type CreditCheckoutSyncedDetail, CreditExhaustedHost, type CreditGateInfo, type CreditPlan, type CreditRequiredContext, CreditRequiredError, type CreditRequiredReason, type CreditRequiredRequest, type CreditRequiredSource, type CreditTopup, DEFAULT_APP_DELEGATION_SCOPE, DEFAULT_AUTH_PROVIDERS, DEFAULT_KYC_PROVIDERS, DEFAULT_MESSAGES, DEFAULT_OWNED_GROUP_DELEGATION_SCOPE, DailySpendChart, type DailyUsagePoint, type DecimalsErrorReason, type DelegationRequest, type DelegationResponse, type DelegationSessionMetadata, type DelegationToken, type DirectDelegationSessionMetadata, Drawer, EarningsSection, type EarningsSectionProps, type EarningsShare, type EarningsSummary, type EarningsTerms, type EarningsTotals, type EmailVerificationConfirmResult, type EmailVerificationStartResult, type EmailVerificationStatus, type EntityEvent, type EntityEventType, EntitySSEProvider, type EoaHandle, type EoaSendInput, type EoaSendStatus, ExecutionMode, GROUP_ACCOUNT_OPERATION_KEYS, type GasPricing, type GasPricingChain, type GenerateApiKeyRequest, type GenerateApiKeyResponse, GenericSignDialog, type GenericSignDialogProps, type GlobalNotificationCallbacks, GlobalNotificationService, type Group, type GroupAccountOperationExpectation, type GroupAccountOperationMutationStatus, type GroupAccountOperationReadStatus, type GroupAccountOperationResource, type GroupAccountOperationWire, type GroupAccountOwner, type GroupAccountOwnersResponse, type GroupBillingPolicy, type GroupBillingPolicyResponse, GroupBillingSection, type GroupBillingSectionProps, type GroupEarnings, type GroupEarningsRow, type GroupMember, GroupOwnershipPanel, type GroupOwnershipPanelProps, type GroupOwnershipRelationship, type GroupOwnershipRelationshipsResponse, type GroupOwnershipStatus, type GroupWalletOwnerOperationResponse, type GroupWalletOwnerOperationStatusResponse, IdentityCard, type IdentityStatus, type IdentityStatusScope, IncomingPaymentsCenter, type IncomingPaymentsCenterProps, IncomingPaymentsInbox, type IncomingPaymentsInboxProps, IncomingPaymentsLauncher, type IncomingPaymentsLauncherProps, type JsonEventStreamOptions, KeyBalances, type KeyBalancesProps, type KeyContext, type KeyPair, type KeySelection, SecurityPage as KeysManager, type KycProviderId, type KycProviderImpl, LineItemDrawer, type LineItemsCursor, type LineItemsPage, LineItemsTable, type LineItemsTableProps, LoadingSpinner, LoginAltMethods, type LoginAltMethodsProps, LoginComponent, LoginForm, type LoginKey, LoginLayout, type LoginLayoutProps, LoginPage, type LoginPageProps, type LoginRequest, LoginShell, type LoginShellProps, METER_LABELS, type ManualTransactionTuple, type MeterTotal, type ModeConfig, type NftOwnedSignerBinding, type NonceBoundManualEnvelope, type NonceResponse, OnboardingMethodCard, OnboardingPlanHttpError, type OnboardingPlanIntent, type OnboardingPlanIntentResponse, type OnboardingPolicyDoc, OnboardingPolicyHttpError, type OnboardingPolicyResponse, OnboardingPolicySection, type OnboardingPolicySectionProps, type OnboardingSnapshot, type OnboardingStatus, OnboardingWizard, type OnboardingWizardProps, type OwnedDelegationSessionMetadata, type OwnedGroupAuthorizationBinding, type OwnedGroupDelegationRequest, type OwnedGroupDelegationResponse, type OwnedGroupMembershipEdge, type OwnedGroupProjection, type OwnedGroupSignerCustody, type OwnedGroupUnsignedAuthorization, type OwnedGroupsResponse, type PasskeyContext, type PasskeyExchangeResponse, type Payment, type PaymentAsset, type PaymentDirection, type PaymentParty, PaymentStatusEnum, type PendingInboxItem, PendingPaymentCard, type PendingPaymentCardProps, type PendingPaymentKind, PhoneVerification, type PlatformOnboardingInfo, Profile as ProfileEditor, type ProfileEditorProps, type ProfilePatch, ProviderConfigProvider, type ProvidersConfigResponse, type PublicBillingCatalog, type QueueMessage, RedirectTo, type RedirectToProps, type RegisteredWalletMetadata, type RemintBillingTokensOptions, type RpcRequest, SendFromKey, type SendFromKeyProps, type SendInstantArgs, type SendInstantResponse, type SendPaymentAsset, SendPaymentDrawer, type SendPaymentDrawerProps, SendPaymentForm, type SendPaymentFormProps, type SendTxParams, type SetDirectDelegationSession, type SetOnboardingPolicyInput, type SetOwnedDelegationSession, type SetupIntentResponse, type SignOptions, type SignRequest, type SignResponse, SignatureCenterRow, type SignatureCenterRowProps, SignaturePreviewDrawer as SignatureDrawer, SignatureQueueProvider, SignatureWorkflow, type SignatureWorkflowNotifyPayload, type SignatureWorkflowProps, type SigninPayload, type SignupFlowProps, type SimpleSummaryInput, SkeletonAvatar, type SpendMeter, type SponsorshipInfo, SponsorshipSessionError, type SponsorshipSessionResponse, type SponsorshipSettings, type StatusColor, StepShell, type StepShellProps, type StripeIdentitySession, Toast, type ToastProps, type TokenInfo, type TokenManagerConfig, type TokenStore, type TxReceipt, type UpdateGroupRequest, type UsageBreakdownRow, type UseEoaSendOptions, type UseEoaSendResult, type UseIncomingPaymentDecimalsResult, type UseIncomingPaymentsOptions, type UseIncomingPaymentsResult, type UseKeyBalanceOptions, type UseKeyBalanceResult, type UseSendPaymentResult, type UseSignatureQueueResult, type UserDisplayProfile, type UserProfile, type VerificationLaunchOption, type VerificationMissing, type VerificationProfile, type VerificationProfileRequirement, type VerificationProfilesResponse, type VerificationRecord, type VerificationRequiredContext, VerificationRequiredError, VerificationRequiredHost, type VerificationRequiredRequest, type VerificationStatus, VerifiedBadge, type VirtualAccount, type WalletAuthContextValue, WalletAuthProvider, WalletCenter, type WalletCenterActor, type WalletCenterBuiltinId, type WalletCenterBuiltinModule, type WalletCenterClassNames, type WalletCenterConfig, type WalletCenterDirectoryGroup, type WalletCenterDirectoryModule, type WalletCenterIcon, type WalletCenterIdentity, type WalletCenterIdentityAction, type WalletCenterModule, type WalletCenterNavigationItem, type WalletCenterPanelContext, type WalletCenterPanelModule, type WalletCenterProps, WalletCenterProvider, type WalletCenterRouteModule, type WalletCenterRuntime, type WalletCenterStatus, WalletCenterTrigger, type WalletCenterTriggerProps, type WalletCenterView, type WalletCenterVisibility, WalletConfigProvider, type WalletDrawerClassNames, type WalletIdentity, WalletIdentityError, WalletNotRegisteredError, type WalletProfileClassNames, WalletProvider, type WalletProviderProps, type WalletRegistrationAuthContext, type WalletRegistrationRequestContext, type WalletRegistrationTokenPurpose, type WalletRuntimeConfig, type WalletSecurityClassNames, type WalletSigner, type WalletUiConfig, YieldFabricLockup, activateChainAccount, activateChainAccountAndRefresh, addChainParamsByChainId, agentMinutesFromMicros, apiKeysService, assertChain, authService, balanceService, billingGateInfoForActiveToken, billingGateInfoFromToken, billingRecoveryAction, billingService, breakdownKeyLabel, buildAuthRegistry, buildCreditCheckoutReturnUrls, buildInbox, buildKycRegistry, buildSendParams, canReexecuteMessage, canonicalEip155ChainId, canonicalEvmAddress, canonicalGroupOperationUuid, canonicalU256Decimal, cardRequiredGate, chainAccountMode, chainAccountRequiredGate, chainAddressesToLabels, chainIdToHex, chainNames, computeMetaTransactionDigest, confirmMyEmailVerification, contractNeedsObligationAccept, convertAmountToRaw, createPasskey, createStripeIdentitySession, createSumsubAccessToken, creditCheckoutTargetGroupId, creditGateInfoForActiveToken, creditPlanTotalAllowanceUsd, creditRequiredGate, decodeJwtPayload as decodeJwtClaims, defaultTokenStore, defaultWalletCenterModules, defineWalletDirectory, defineWalletPanel, defineWalletRoute, delegationService, effectiveStatus, enabledPaymentChainIds, encodeApprove, encodeBalanceOf, encodeTransfer, ensureCardOnFile, ensureCreditAvailable, ensureVerified, exchange, extractCurrency, extractTokenAssetId, featureLabel, fetchAccountOpeningStatus, fetchNonce, fetchVerificationStatus, fetchWithChainAccountActivationRetry, findWalletRegistration, formatAgentMinutes, formatAgentTime, formatPages, formatPayment, formatRelativeTime, formatTxHashShort, formatUnits, formatUsdMicros, freshTokenForSameChainActor, gasOpLabel, getActiveChainId, getActiveUserChainId, getAddChainParams, getAuthServiceUrl, getBlockExplorer, getBlockExplorerAddressUrl, getBlockExplorerTxUrl, getChainAccountActivationStatus, getChainConfig, getChainIdFromToken, getCurrentChainId, getDefaultChainAddressLabels, getDefaultChainId, getErc20Allowance, getErc20Balance, getErc20Decimals, getErc20Symbol, getIdentityStatus, getIdentityStatusForProviders, getMyEmailVerificationStatus, getMyProfile, getNativeBalance, getPaymentsServiceUrl, getReceipt, getWebSocketUrl, groupInbox, groupsService, hasActiveAuthToken, humanizeMessageType, invalidateOnboardingState, invalidateWalletCount, isEoaKey, isExactSponsoredUserToken, isLiveMode, isPaymentChainEnabled, isStaffRole, itemAgentTime, itemLabel, keyPairToEoaHandle, keysService, knownAuthProviderIds, knownKycProviderIds, kycKindOf, link, listMyLoginKeys, listMyVerifications, llmCategoryLabel, makeWalletId, manualChainAccountRequiredContext, messagesService, needsPaymentAcceptance, nftOwnedSignerBinding, onboardingPlanService, onboardingPolicyService, ownedGroupUserSignerCustody, parseChainAccountRequired, parseChainAccountRequiredRest, parseGroupAccountOperationWire, parseUnits, parseVerificationRequired, parseWalletId, passkeyLabel, patchMyEmail, patchMyProfile, paymentsService, paymentsUrlMap, personalJwtHasGroupPayer, personalSessionHasGroupPayer, promptCardCapture, promptCreditPurchase, promptVerification, readCreditCheckoutReturnMarker, recordCredentialIssued, refreshChainAccountSession, registerBlockExplorer, registeredWalletsFromMetadata, remintTokensAfterCardChange, requireActiveUserChainId, requireChainIdFromToken, requireWalletRegistrationChain, requireWalletRegistrationSessionChain, resetDecimalsWarningCache, resolveAuth, resolveKyc, resolveKycInstance, resolvePaymentDirection, resolveWalletIdentityForChain, retryOnceAfterChainAccountActivation, selectWalletRegistration, setAuthRegistry, setGroupVerificationProfiles, setKycRegistry, setModeConfig, signInChallengeViaPasskey, signInWithPasskey, signUpRegisterViaPasskey, signUpWithPasskey, signWithPasskey, signatureSignin, snapshotNeedsPrepaidPlan, startMyEmailVerification, statusToColor, subscribeEntityEvents, subscribeJsonEvents, switchChain, syntheticPasskeyAddress, testChainIds, tokenManager, tryParseWalletId, unlink, useAuth, useAuthContext, useBranding, useEntitySSE, useEoaSend, useForm, useGenericSigner, useIncomingPaymentDecimals, useIncomingPayments, useKeyBalance, useLogin, useLoginWithForm, useOnboardingState as useOnboardingRouting, useOnboardingState$1 as useOnboardingState, usePaymentDecimals, useProviderConfig, useSendPayment, useSignatureQueue, useTapToCancel, useThemeClasses, useTokenStore, useWalletCenter, useWalletConfig, useWalletNavigate, useWalletSigner, userIdentityStatusScopes, validateWalletCenterModules, verificationRequiredGate, verifyMetaTransactionDigest, verifyNftAuthorizationBinding, walletCenter, walletRegistrationAuthContext, walletRegistrationMatches, walletRegistrationsForChain, withoutCreditCheckoutReturnMarker };