@getpara/core-sdk 3.0.0-alpha.1 → 3.1.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (106) hide show
  1. package/dist/cjs/ParaCore.js +436 -86
  2. package/dist/cjs/constants.js +1 -1
  3. package/dist/cjs/cryptography/utils.js +5 -2
  4. package/dist/cjs/errors.js +10 -0
  5. package/dist/cjs/external/userManagementClient.js +21 -4
  6. package/dist/cjs/index.js +67 -1
  7. package/dist/cjs/services/AuthService.js +66 -47
  8. package/dist/cjs/services/LoginFlowService.js +30 -27
  9. package/dist/cjs/services/PollingService.js +100 -75
  10. package/dist/cjs/services/PortalUrlService.js +112 -19
  11. package/dist/cjs/services/PregenWalletService.js +125 -76
  12. package/dist/cjs/services/SessionManagementService.js +81 -10
  13. package/dist/cjs/services/SignupFlowService.js +52 -47
  14. package/dist/cjs/services/VerificationFlowService.js +13 -10
  15. package/dist/cjs/services/WalletService.js +51 -36
  16. package/dist/cjs/shares/enclave.js +44 -24
  17. package/dist/cjs/state/CoreStateManager.js +17 -5
  18. package/dist/cjs/state/actors/setupPara.js +4 -1
  19. package/dist/cjs/state/machines/walletStateMachine.js +22 -0
  20. package/dist/cjs/telemetry/BeaconSpanProcessor.js +99 -0
  21. package/dist/cjs/telemetry/config.js +15 -0
  22. package/dist/cjs/telemetry/init.js +193 -0
  23. package/dist/cjs/telemetry/modalSession.js +54 -0
  24. package/dist/cjs/telemetry/session.js +39 -0
  25. package/dist/cjs/telemetry/tracer.js +126 -0
  26. package/dist/cjs/telemetry/uxAction.js +30 -0
  27. package/dist/cjs/telemetry/uxBaggagePropagator.js +58 -0
  28. package/dist/cjs/telemetry/uxState.js +46 -0
  29. package/dist/cjs/telemetry/uxStateSpanProcessor.js +51 -0
  30. package/dist/cjs/utils/configEncoding.js +98 -0
  31. package/dist/cjs/utils/deprecation.js +13 -13
  32. package/dist/cjs/utils/index.js +11 -0
  33. package/dist/cjs/utils/partnerConfig.js +103 -0
  34. package/dist/cjs/utils/partnerConfigGating.js +83 -0
  35. package/dist/cjs/utils/stateErrorHelpers.js +6 -1
  36. package/dist/cjs/utils/url.js +10 -2
  37. package/dist/esm/ParaCore.js +441 -88
  38. package/dist/esm/constants.js +1 -1
  39. package/dist/esm/cryptography/utils.js +5 -2
  40. package/dist/esm/errors.js +9 -0
  41. package/dist/esm/external/userManagementClient.js +21 -4
  42. package/dist/esm/index.js +58 -4
  43. package/dist/esm/services/AuthService.js +66 -47
  44. package/dist/esm/services/LoginFlowService.js +30 -27
  45. package/dist/esm/services/PollingService.js +100 -75
  46. package/dist/esm/services/PortalUrlService.js +112 -19
  47. package/dist/esm/services/PregenWalletService.js +125 -76
  48. package/dist/esm/services/SessionManagementService.js +69 -11
  49. package/dist/esm/services/SignupFlowService.js +52 -47
  50. package/dist/esm/services/VerificationFlowService.js +13 -10
  51. package/dist/esm/services/WalletService.js +51 -36
  52. package/dist/esm/shares/enclave.js +44 -24
  53. package/dist/esm/state/CoreStateManager.js +17 -5
  54. package/dist/esm/state/actors/setupPara.js +4 -1
  55. package/dist/esm/state/machines/walletStateMachine.js +22 -0
  56. package/dist/esm/telemetry/BeaconSpanProcessor.js +74 -0
  57. package/dist/esm/telemetry/config.js +0 -0
  58. package/dist/esm/telemetry/init.js +130 -0
  59. package/dist/esm/telemetry/modalSession.js +29 -0
  60. package/dist/esm/telemetry/session.js +16 -0
  61. package/dist/esm/telemetry/tracer.js +84 -0
  62. package/dist/esm/telemetry/uxAction.js +8 -0
  63. package/dist/esm/telemetry/uxBaggagePropagator.js +35 -0
  64. package/dist/esm/telemetry/uxState.js +21 -0
  65. package/dist/esm/telemetry/uxStateSpanProcessor.js +28 -0
  66. package/dist/esm/utils/configEncoding.js +45 -0
  67. package/dist/esm/utils/deprecation.js +11 -12
  68. package/dist/esm/utils/index.js +6 -0
  69. package/dist/esm/utils/partnerConfig.js +67 -0
  70. package/dist/esm/utils/partnerConfigGating.js +61 -0
  71. package/dist/esm/utils/stateErrorHelpers.js +6 -1
  72. package/dist/esm/utils/url.js +10 -2
  73. package/dist/types/ParaCore.d.ts +101 -19
  74. package/dist/types/PlatformUtils.d.ts +1 -0
  75. package/dist/types/errors.d.ts +26 -0
  76. package/dist/types/external/userManagementClient.d.ts +2 -1
  77. package/dist/types/index.d.ts +15 -3
  78. package/dist/types/services/types/AuthServiceTypes.d.ts +10 -3
  79. package/dist/types/services/types/PortalUrlServiceTypes.d.ts +3 -3
  80. package/dist/types/services/types/WalletServiceTypes.d.ts +4 -0
  81. package/dist/types/state/actors/setupPara.d.ts +18 -0
  82. package/dist/types/state/machines/authStateMachine.d.ts +1 -1
  83. package/dist/types/state/machines/coreStateMachine.d.ts +30 -6
  84. package/dist/types/state/machines/walletStateMachine.d.ts +4 -0
  85. package/dist/types/state/types/core.d.ts +7 -1
  86. package/dist/types/telemetry/BeaconSpanProcessor.d.ts +10 -0
  87. package/dist/types/telemetry/config.d.ts +4 -0
  88. package/dist/types/telemetry/init.d.ts +17 -0
  89. package/dist/types/telemetry/modalSession.d.ts +5 -0
  90. package/dist/types/telemetry/session.d.ts +2 -0
  91. package/dist/types/telemetry/tracer.d.ts +10 -0
  92. package/dist/types/telemetry/uxAction.d.ts +3 -0
  93. package/dist/types/telemetry/uxBaggagePropagator.d.ts +7 -0
  94. package/dist/types/telemetry/uxState.d.ts +8 -0
  95. package/dist/types/telemetry/uxStateSpanProcessor.d.ts +9 -0
  96. package/dist/types/types/config.d.ts +15 -3
  97. package/dist/types/types/coreApi.d.ts +7 -9
  98. package/dist/types/types/serviceInterfaces.d.ts +5 -3
  99. package/dist/types/types/util.d.ts +2 -15
  100. package/dist/types/utils/configEncoding.d.ts +51 -0
  101. package/dist/types/utils/deprecation.d.ts +3 -1
  102. package/dist/types/utils/index.d.ts +2 -0
  103. package/dist/types/utils/partnerConfig.d.ts +28 -0
  104. package/dist/types/utils/partnerConfigGating.d.ts +48 -0
  105. package/dist/types/utils/url.d.ts +3 -2
  106. package/package.json +15 -4
@@ -1,11 +1,11 @@
1
1
  import { ParaCore } from './ParaCore.js';
2
- export { type Auth, type AuthInfo, type PrimaryAuthInfo, type VerifiedAuthInfo, type VerifiedAuth, AuthMethod, type TAuthMethod, AuthMethodStatus, type AuthExtras, type CurrentWalletIds, EmailTheme, type PartnerEntity, type WalletEntity, Network, type TNetwork, WalletType, type TWalletType, WalletScheme, type TWalletScheme, OnRampAsset, type TOnRampAsset, OnRampPurchaseType, OnRampProvider, OnRampPurchaseStatus, type OnRampConfig, type OnRampAssets, type OnRampPurchase, type OnRampAssetInfo, type ProviderAssetInfo, OnRampMethod, type Theme, OAuthMethod, type TOAuthMethod, type TLinkedAccountType, type SupportedAccountLinks, type SupportedWalletTypes, type TPregenIdentifierType, type PregenIds, type LinkedAccount, type LinkedAccounts, type TExternalWallet, type ExternalWalletInfo, type PregenAuth, type Setup2faResponse, type TelegramAuthResponse, type VerifyExternalWalletParams, type AssetMetadata, type AssetMetadataIndexed, type AssetValue, type BalancesConfig, type WalletBalance, type ProfileBalance, type OfframpDepositRequest, type WalletWithMetadata, RecoveryStatus, ThemeMode, NON_ED25519, PREGEN_IDENTIFIER_TYPES, WALLET_TYPES, WALLET_SCHEMES, OAUTH_METHODS, LINKED_ACCOUNT_TYPES, EXTERNAL_WALLET_TYPES, EVM_WALLETS, SOLANA_WALLETS, COSMOS_WALLETS, formatAssetQuantity, formatCurrency, type EstimateTransactionOpts, type EstimateTransactionResult, type BroadcastTransactionOpts, type BroadcastTransactionResult, type PendingTransactionEntity, type SerializedDecodedTx, type SerializedTxData, type GetPendingTransactionResponse, } from '@getpara/user-management-client';
2
+ export { type Auth, type AuthInfo, type PrimaryAuthInfo, type VerifiedAuthInfo, type VerifiedAuth, AuthMethod, type TAuthMethod, AuthMethodStatus, AuthLayout, type TAuthLayout, type AuthExtras, type CurrentWalletIds, EmailTheme, type PartnerEntity, type PartnerAppConfig, type WalletEntity, Network, type TNetwork, WalletType, type TWalletType, WalletScheme, type TWalletScheme, OnRampAsset, type TOnRampAsset, OnRampPurchaseType, OnRampProvider, OnRampPurchaseStatus, type OnRampConfig, type OnRampAssets, type OnRampPurchase, type OnRampAssetInfo, type ProviderAssetInfo, OnRampMethod, OAuthMethod, type TOAuthMethod, type TLinkedAccountType, type SupportedAccountLinks, type SupportedWalletTypes, type TPregenIdentifierType, type PregenIds, type LinkedAccount, type LinkedAccounts, type TExternalWallet, type ExternalWalletInfo, type PregenAuth, type Setup2faResponse, type TelegramAuthResponse, type VerifyExternalWalletParams, type AssetMetadata, type AssetMetadataIndexed, type AssetValue, type BalancesConfig, type WalletBalance, type ProfileBalance, type OfframpDepositRequest, type WalletWithMetadata, RecoveryStatus, ThemeMode, NON_ED25519, PREGEN_IDENTIFIER_TYPES, WALLET_TYPES, WALLET_SCHEMES, OAUTH_METHODS, LINKED_ACCOUNT_TYPES, EXTERNAL_WALLET_TYPES, EVM_WALLETS, SOLANA_WALLETS, COSMOS_WALLETS, formatAssetQuantity, formatCurrency, type EstimateTransactionOpts, type EstimateTransactionResult, type BroadcastTransactionOpts, type BroadcastTransactionResult, type PendingTransactionEntity, type SerializedDecodedTx, type SerializedTxData, type GetPendingTransactionResponse, DeliveryChannel, type PartnerThemeConfig as Theme, } from '@getpara/user-management-client';
3
3
  export { PopupType, PregenIdentifierType, type AuthStateSignup, type AuthStateVerify, type AuthStateLogin, type AuthState, type OAuthResponse, type CoreAuthInfo, type SignatureRes, type FullSignatureRes, type SuccessfulSignatureRes, type DeniedSignatureRes, type DeniedSignatureResWithUrl, type Wallet, type AvailableWallet, type AccountLinkInProgress, AccountLinkError, type InternalInterface, type Verify2faParams, type Verify2faResponse, type StorageType, type TelegramParams, type CreateParaSignerBaseOptions, } from './types/index.js';
4
4
  export * from './types/smartAccounts.js';
5
5
  export * from './types/coreApi.js';
6
6
  export * from './types/events.js';
7
7
  export * from './types/config.js';
8
- export { getPortalDomain, dispatchEvent, onParaEvent, offParaEvent, entityToWallet, constructUrl, shortenUrl, isPortal, } from './utils/index.js';
8
+ export { getPortalDomain, dispatchEvent, onParaEvent, offParaEvent, entityToWallet, constructUrl, shortenUrl, isPortal, warnOnce, } from './utils/index.js';
9
9
  export { PREFIX as STORAGE_PREFIX, PARA_PREFIX as PARA_STORAGE_PREFIX, LOCAL_STORAGE_CURRENT_WALLET_IDS, LOCAL_STORAGE_WALLETS, } from './constants.js';
10
10
  export { distributeNewShare } from './shares/shareDistribution.js';
11
11
  export { KeyContainer } from './shares/KeyContainer.js';
@@ -22,10 +22,22 @@ export * from './utils/phone.js';
22
22
  export * from './utils/config.js';
23
23
  export { isWalletSupported } from './utils/wallet.js';
24
24
  export { getNetworkPrefix, getOnRampAssets, getOnRampNetworks, toAssetInfoArray } from './utils/onRamps.js';
25
- export { getPortalBaseURL } from './utils/url.js';
25
+ export { getPortalBaseURL, getParaConnectBaseUrl } from './utils/url.js';
26
+ export { encodeConfigParams, tryDecodeConfig, isCompressionStreamSupported, ENCODED_CONFIG_VERSION, } from './utils/configEncoding.js';
27
+ export type { EncodedConfig, EncodedAppConfig } from './utils/configEncoding.js';
26
28
  export { retrieve as transmissionUtilsRetrieve } from './transmission/transmissionUtils.js';
27
29
  export type { ShareData } from './shares/enclave.js';
28
30
  export type { StateSnapshot, AuthStateInfo } from './state/types/core';
29
31
  export type * from './services/types';
32
+ export { getTracer, wrapWithSpan, wrapWithSpanInContext, extractTraceContextFromUrl, getUrlTraceCarrier, setDefaultParentContext, getDefaultParentContext, SpanStatusCode, } from './telemetry/tracer.js';
33
+ export type { Span, Attributes, Context } from './telemetry/tracer.js';
34
+ export { getOrCreateSessionId } from './telemetry/session.js';
35
+ export { initTelemetry, isTelemetryInitialized, onTelemetryReady, flushTelemetry } from './telemetry/init.js';
36
+ export { getUxState, setCurrentView, setLastInteraction } from './telemetry/uxState.js';
37
+ export { setCurrentUserId } from './telemetry/uxStateSpanProcessor.js';
38
+ export { recordActionOnSpan, type UxActionOutcome } from './telemetry/uxAction.js';
39
+ export { startModalSession, endModalSession, getModalSessionContext } from './telemetry/modalSession.js';
40
+ export type { InitTelemetryOpts } from './telemetry/init.js';
41
+ export type { PartnerTelemetryConfig } from './telemetry/config.js';
30
42
  export declare const paraVersion: string;
31
43
  export default ParaCore;
@@ -1,4 +1,4 @@
1
- import type { Auth, AuthExtras, AuthMethod, AuthType, ExternalWalletInfo, PrimaryAuth, PrimaryAuthInfo, ServerAuthState, ServerAuthStateLogin, TAuthMethod, Theme, TOAuthMethod } from '@getpara/user-management-client';
1
+ import type { Auth, AuthExtras, AuthMethod, AuthType, DeliveryChannel, ExternalWalletInfo, PrimaryAuth, PrimaryAuthInfo, ServerAuthState, ServerAuthStateLogin, TAuthMethod, PartnerThemeConfig, TOAuthMethod } from '@getpara/user-management-client';
2
2
  import type { AuthState, AuthStateDone, AuthStateLogin, AuthStateSignup, AuthStateVerify, CoreAuthInfo, WithCustomTheme, WithSessionLookupId, WithShorten, WithUseShortUrls } from '../../types/index.js';
3
3
  import type { InitOAuthPollingParams, PollingCallbacks } from './PollingServiceTypes.js';
4
4
  import { PerformConnectExternalWalletResponse, ExternalSignMessageParams } from './ExternalWalletServiceTypes.js';
@@ -36,7 +36,7 @@ export type PrepareAuthStateMethod = <T extends ServerAuthState>(serverAuthState
36
36
  }) => Promise<AuthState>;
37
37
  export type PrepareLoginStateMethod = (loginState: ServerAuthStateLogin, options: {
38
38
  useShortUrls?: boolean;
39
- portalTheme?: Theme;
39
+ portalTheme?: PartnerThemeConfig;
40
40
  sessionLookupId: string;
41
41
  }) => Promise<AuthStateLogin>;
42
42
  export interface AuthenticateWithEmailOrPhoneParams extends SignUpOrLogInParams {
@@ -145,6 +145,13 @@ export type AddCredentialMethod = (_: AddCredentialParams) => Promise<string | u
145
145
  export type SupportedUserAuthMethodsMethod = () => Promise<Set<AuthMethod>>;
146
146
  export interface ResendVerificationCodeParams {
147
147
  type?: 'SIGNUP' | 'LINK_ACCOUNT' | 'LOGIN';
148
+ deliveryChannel?: DeliveryChannel;
148
149
  }
149
- export type ResendVerificationCodeMethod = (_: ResendVerificationCodeParams) => Promise<void>;
150
+ export interface ResendVerificationCodeResponse {
151
+ deliveryChannel?: DeliveryChannel;
152
+ fallbackUsed?: boolean;
153
+ fallbackChannel?: DeliveryChannel;
154
+ isSmsAllowed?: boolean;
155
+ }
156
+ export type ResendVerificationCodeMethod = (_: ResendVerificationCodeParams) => Promise<ResendVerificationCodeResponse>;
150
157
  export {};
@@ -1,5 +1,5 @@
1
- import type { TAuthMethod, TOAuthMethod } from '@getpara/user-management-client';
2
- import type { AccountLinkInProgress, PortalTheme, WithAuthMethod, WithCustomTheme, WithSessionId, WithShorten } from '../../types/index.js';
1
+ import type { TAuthMethod, TOAuthMethod, PartnerThemeConfig } from '@getpara/user-management-client';
2
+ import type { AccountLinkInProgress, WithAuthMethod, WithCustomTheme, WithSessionId, WithShorten } from '../../types/index.js';
3
3
  type Device = {
4
4
  sessionId: string;
5
5
  encryptionKey: string;
@@ -11,7 +11,7 @@ export type PortalUrlOptions = {
11
11
  thisDevice?: Device;
12
12
  newDevice?: Device;
13
13
  sessionId?: string;
14
- portalTheme?: PortalTheme;
14
+ portalTheme?: PartnerThemeConfig;
15
15
  pathId?: string;
16
16
  shorten?: boolean;
17
17
  isEmbedded?: boolean;
@@ -111,6 +111,10 @@ export interface RequestFaucetParams {
111
111
  chain?: string;
112
112
  }
113
113
  export interface RequestFaucetResponse {
114
+ /**
115
+ * Hash for the submitted faucet funding transaction. Wait for confirmation
116
+ * before assuming funds are spendable.
117
+ */
114
118
  transactionHash: string;
115
119
  amount: string;
116
120
  chain: string;
@@ -1,2 +1,20 @@
1
1
  import { StateMachineInterface } from '../../types/serviceInterfaces.js';
2
+ /**
3
+ * Bootstraps the SDK. Runs the platform-specific `setup()` (Farcaster init,
4
+ * wallet-record backfill, etc.) AND an eager partner-record load via
5
+ * `touchSession` in parallel — both are independent network/IO tasks and
6
+ * the state machine only flips `isReady=true` once this actor resolves.
7
+ *
8
+ * Eager partner load lives here rather than inside each subclass's setup()
9
+ * so every consumer of core-sdk (ParaWeb, ParaServer, future subclasses)
10
+ * gets it for free — the state machine is the canonical SDK lifecycle,
11
+ * and "partner is loaded" is part of being ready.
12
+ *
13
+ * Skipped in the portal context where `ModalLayoutV2` runs its own
14
+ * getPartner fetch with separate telemetry plumbing — calling touchSession
15
+ * there would duplicate the call. Best-effort otherwise: a network failure
16
+ * keeps partner unloaded for now, partner-dependent code paths fall back
17
+ * to legacy props / lazy-load via `#assertPartner` at gated method
18
+ * call-sites, and the SDK still becomes ready.
19
+ */
2
20
  export declare const createSetupParaActor: (paraCoreInterface: StateMachineInterface) => import("xstate").PromiseActorLogic<void, {}, import("xstate").EventObject>;
@@ -842,7 +842,7 @@ export declare function createAuthStateMachine(paraCoreInterface: StateMachineIn
842
842
  data: {
843
843
  authState: ServerAuthState;
844
844
  sessionLookupId: string;
845
- portalTheme: import("../../types/util.js").PortalTheme;
845
+ portalTheme: import("@getpara/user-management-client").PartnerThemeConfig;
846
846
  useShortUrls: boolean;
847
847
  };
848
848
  finished: boolean;
@@ -842,7 +842,7 @@ export declare function createCoreStateMachine(paraCoreInterface: StateMachineIn
842
842
  data: {
843
843
  authState: import("@getpara/shared").ServerAuthState;
844
844
  sessionLookupId: string;
845
- portalTheme: import("../../types/util.js").PortalTheme;
845
+ portalTheme: import("@getpara/shared/dist/types/types/partnerAppConfig.js").PartnerThemeConfig;
846
846
  useShortUrls: boolean;
847
847
  };
848
848
  finished: boolean;
@@ -2889,6 +2889,10 @@ export declare function createCoreStateMachine(paraCoreInterface: StateMachineIn
2889
2889
  }];
2890
2890
  };
2891
2891
  readonly needs_wallets: {
2892
+ readonly always: readonly [{
2893
+ readonly target: "creating_wallets";
2894
+ readonly guard: "shouldAutoCreate";
2895
+ }];
2892
2896
  readonly on: {
2893
2897
  readonly WAIT_FOR_WALLET_CREATION: {
2894
2898
  readonly target: "claiming_wallets";
@@ -4584,7 +4588,7 @@ export declare function createCoreStateMachine(paraCoreInterface: StateMachineIn
4584
4588
  data: {
4585
4589
  authState: import("@getpara/shared").ServerAuthState;
4586
4590
  sessionLookupId: string;
4587
- portalTheme: import("../../types/util.js").PortalTheme;
4591
+ portalTheme: import("@getpara/shared/dist/types/types/partnerAppConfig.js").PartnerThemeConfig;
4588
4592
  useShortUrls: boolean;
4589
4593
  };
4590
4594
  finished: boolean;
@@ -6636,6 +6640,10 @@ export declare function createCoreStateMachine(paraCoreInterface: StateMachineIn
6636
6640
  }];
6637
6641
  };
6638
6642
  readonly needs_wallets: {
6643
+ readonly always: readonly [{
6644
+ readonly target: "creating_wallets";
6645
+ readonly guard: "shouldAutoCreate";
6646
+ }];
6639
6647
  readonly on: {
6640
6648
  readonly WAIT_FOR_WALLET_CREATION: {
6641
6649
  readonly target: "claiming_wallets";
@@ -8404,7 +8412,7 @@ export declare function createCoreStateMachine(paraCoreInterface: StateMachineIn
8404
8412
  data: {
8405
8413
  authState: import("@getpara/shared").ServerAuthState;
8406
8414
  sessionLookupId: string;
8407
- portalTheme: import("../../types/util.js").PortalTheme;
8415
+ portalTheme: import("@getpara/shared/dist/types/types/partnerAppConfig.js").PartnerThemeConfig;
8408
8416
  useShortUrls: boolean;
8409
8417
  };
8410
8418
  finished: boolean;
@@ -10456,6 +10464,10 @@ export declare function createCoreStateMachine(paraCoreInterface: StateMachineIn
10456
10464
  }];
10457
10465
  };
10458
10466
  readonly needs_wallets: {
10467
+ readonly always: readonly [{
10468
+ readonly target: "creating_wallets";
10469
+ readonly guard: "shouldAutoCreate";
10470
+ }];
10459
10471
  readonly on: {
10460
10472
  readonly WAIT_FOR_WALLET_CREATION: {
10461
10473
  readonly target: "claiming_wallets";
@@ -12162,7 +12174,7 @@ export declare function createCoreStateMachine(paraCoreInterface: StateMachineIn
12162
12174
  data: {
12163
12175
  authState: import("@getpara/shared").ServerAuthState;
12164
12176
  sessionLookupId: string;
12165
- portalTheme: import("../../types/util.js").PortalTheme;
12177
+ portalTheme: import("@getpara/shared/dist/types/types/partnerAppConfig.js").PartnerThemeConfig;
12166
12178
  useShortUrls: boolean;
12167
12179
  };
12168
12180
  finished: boolean;
@@ -14214,6 +14226,10 @@ export declare function createCoreStateMachine(paraCoreInterface: StateMachineIn
14214
14226
  }];
14215
14227
  };
14216
14228
  readonly needs_wallets: {
14229
+ readonly always: readonly [{
14230
+ readonly target: "creating_wallets";
14231
+ readonly guard: "shouldAutoCreate";
14232
+ }];
14217
14233
  readonly on: {
14218
14234
  readonly WAIT_FOR_WALLET_CREATION: {
14219
14235
  readonly target: "claiming_wallets";
@@ -16014,7 +16030,7 @@ export declare function createCoreStateMachine(paraCoreInterface: StateMachineIn
16014
16030
  data: {
16015
16031
  authState: import("@getpara/shared").ServerAuthState;
16016
16032
  sessionLookupId: string;
16017
- portalTheme: import("../../types/util.js").PortalTheme;
16033
+ portalTheme: import("@getpara/shared/dist/types/types/partnerAppConfig.js").PartnerThemeConfig;
16018
16034
  useShortUrls: boolean;
16019
16035
  };
16020
16036
  finished: boolean;
@@ -18066,6 +18082,10 @@ export declare function createCoreStateMachine(paraCoreInterface: StateMachineIn
18066
18082
  }];
18067
18083
  };
18068
18084
  readonly needs_wallets: {
18085
+ readonly always: readonly [{
18086
+ readonly target: "creating_wallets";
18087
+ readonly guard: "shouldAutoCreate";
18088
+ }];
18069
18089
  readonly on: {
18070
18090
  readonly WAIT_FOR_WALLET_CREATION: {
18071
18091
  readonly target: "claiming_wallets";
@@ -19773,7 +19793,7 @@ export declare function createCoreStateMachine(paraCoreInterface: StateMachineIn
19773
19793
  data: {
19774
19794
  authState: import("@getpara/shared").ServerAuthState;
19775
19795
  sessionLookupId: string;
19776
- portalTheme: import("../../types/util.js").PortalTheme;
19796
+ portalTheme: import("@getpara/shared/dist/types/types/partnerAppConfig.js").PartnerThemeConfig;
19777
19797
  useShortUrls: boolean;
19778
19798
  };
19779
19799
  finished: boolean;
@@ -21825,6 +21845,10 @@ export declare function createCoreStateMachine(paraCoreInterface: StateMachineIn
21825
21845
  }];
21826
21846
  };
21827
21847
  readonly needs_wallets: {
21848
+ readonly always: readonly [{
21849
+ readonly target: "creating_wallets";
21850
+ readonly guard: "shouldAutoCreate";
21851
+ }];
21828
21852
  readonly on: {
21829
21853
  readonly WAIT_FOR_WALLET_CREATION: {
21830
21854
  readonly target: "claiming_wallets";
@@ -211,6 +211,10 @@ export declare function createWalletStateMachine(paraCoreInterface: StateMachine
211
211
  }];
212
212
  };
213
213
  readonly needs_wallets: {
214
+ readonly always: readonly [{
215
+ readonly target: "creating_wallets";
216
+ readonly guard: "shouldAutoCreate";
217
+ }];
214
218
  readonly on: {
215
219
  readonly WAIT_FOR_WALLET_CREATION: {
216
220
  readonly target: "claiming_wallets";
@@ -1,4 +1,4 @@
1
- import type { BiometricLocationHint, CurrentWalletIds, ServerAuthState, TOAuthMethod } from '@getpara/user-management-client';
1
+ import type { BiometricLocationHint, CurrentWalletIds, DeliveryChannel, ServerAuthState, TOAuthMethod } from '@getpara/user-management-client';
2
2
  import type { AuthState, Wallet, WithCustomTheme, WithUseShortUrls } from '../../types/index.js';
3
3
  import { AuthMachine, AuthPhase } from './auth.js';
4
4
  import { WalletMachine, WalletPhase } from './wallet.js';
@@ -96,6 +96,12 @@ export type AuthStateInfo = {
96
96
  verificationUrl: string | null;
97
97
  /** Full (unshortened) verification URL. Used by preloaded iframe. */
98
98
  verificationFullUrl: string | null;
99
+ /** Channel the OTP was sent over — set on phone verifications so the UI can render channel-specific copy */
100
+ deliveryChannel: DeliveryChannel | null;
101
+ /** True when the server had to fall back from the primary channel (WhatsApp → SMS typically) */
102
+ fallbackUsed: boolean;
103
+ /** The channel actually used when fallbackUsed is true */
104
+ fallbackChannel: DeliveryChannel | null;
99
105
  /** External wallet verification data when signature is needed */
100
106
  externalWalletVerification: {
101
107
  signatureVerificationMessage: string;
@@ -0,0 +1,10 @@
1
+ import type { ReadableSpan, Span, SpanProcessor } from '@opentelemetry/sdk-trace-base';
2
+ import type { Context } from '@opentelemetry/api';
3
+ export declare class BeaconSpanProcessor implements SpanProcessor {
4
+ #private;
5
+ constructor(url: string);
6
+ onStart(_span: Span, _parentContext: Context): void;
7
+ onEnd(span: ReadableSpan): void;
8
+ forceFlush(): Promise<void>;
9
+ shutdown(): Promise<void>;
10
+ }
@@ -0,0 +1,4 @@
1
+ export type PartnerTelemetryConfig = {
2
+ enabled: boolean;
3
+ sample_rate: number;
4
+ };
@@ -0,0 +1,17 @@
1
+ import { type Attributes } from '@opentelemetry/api';
2
+ import type { SDKType } from '@getpara/user-management-client';
3
+ export type InitTelemetryOpts = {
4
+ tunnelUrl: string;
5
+ sampleRate: number;
6
+ sdkType: SDKType;
7
+ sdkVersion: string;
8
+ partnerId?: string;
9
+ resourceAttributes?: Attributes;
10
+ isDev?: boolean;
11
+ isPortal?: boolean;
12
+ };
13
+ export declare function onTelemetryReady(cb: () => void): void;
14
+ export declare function initTelemetry(opts: InitTelemetryOpts): Promise<void>;
15
+ export declare function isTelemetryInitialized(): boolean;
16
+ export declare function flushTelemetry(): Promise<void>;
17
+ export declare function __resetTelemetryForTests(): void;
@@ -0,0 +1,5 @@
1
+ import { type Context } from '@opentelemetry/api';
2
+ export declare function startModalSession(): void;
3
+ export declare function endModalSession(): void;
4
+ export declare function getModalSessionContext(): Context | undefined;
5
+ export declare function __resetModalSessionForTests(): void;
@@ -0,0 +1,2 @@
1
+ export declare function getOrCreateSessionId(): string;
2
+ export declare function __resetSessionForTests(): void;
@@ -0,0 +1,10 @@
1
+ import { type Attributes, type Context, type Span } from '@opentelemetry/api';
2
+ export declare function getTracer(): import("@opentelemetry/api").Tracer;
3
+ export declare function setDefaultParentContext(ctx: Context): void;
4
+ export declare function getDefaultParentContext(): Context | undefined;
5
+ export declare function wrapWithSpan<T>(name: string, fn: (span: Span) => Promise<T> | T, attributes?: Attributes): Promise<T>;
6
+ export declare function extractTraceContextFromUrl(search?: string): Context;
7
+ export declare function getUrlTraceCarrier(search?: string): Record<string, string>;
8
+ export declare function wrapWithSpanInContext<T>(parentContext: Context, name: string, fn: (span: Span, traceHeaders: Record<string, string>) => Promise<T> | T): Promise<T>;
9
+ export { SpanStatusCode } from '@opentelemetry/api';
10
+ export type { Span, Attributes, Context } from '@opentelemetry/api';
@@ -0,0 +1,3 @@
1
+ import type { Span } from '@opentelemetry/api';
2
+ export type UxActionOutcome = 'success' | 'error';
3
+ export declare function recordActionOnSpan(span: Span, targetId: string, outcome: UxActionOutcome): void;
@@ -0,0 +1,7 @@
1
+ import { type Context, type TextMapGetter, type TextMapPropagator, type TextMapSetter } from '@opentelemetry/api';
2
+ export declare class UxBaggagePropagator implements TextMapPropagator {
3
+ #private;
4
+ inject(ctx: Context, carrier: unknown, setter: TextMapSetter): void;
5
+ extract(ctx: Context, carrier: unknown, getter: TextMapGetter): Context;
6
+ fields(): string[];
7
+ }
@@ -0,0 +1,8 @@
1
+ export type UxState = {
2
+ view?: string;
3
+ lastInteraction?: string;
4
+ };
5
+ export declare function getUxState(): Readonly<UxState>;
6
+ export declare function setCurrentView(view: string | undefined): void;
7
+ export declare function setLastInteraction(targetId: string | undefined): void;
8
+ export declare function __resetUxStateForTests(): void;
@@ -0,0 +1,9 @@
1
+ import type { Context } from '@opentelemetry/api';
2
+ import type { Span, SpanProcessor } from '@opentelemetry/sdk-trace-base';
3
+ export declare function setCurrentUserId(userId: string | undefined): void;
4
+ export declare class UxStateSpanProcessor implements SpanProcessor {
5
+ onStart(span: Span, _parentContext: Context): void;
6
+ onEnd(): void;
7
+ forceFlush(): Promise<void>;
8
+ shutdown(): Promise<void>;
9
+ }
@@ -1,7 +1,6 @@
1
1
  import { AxiosInstance } from 'axios';
2
- import Client, { EmailTheme, Network, OnRampAsset, OnRampProvider, PregenAuth, TWalletScheme, TWalletType } from '@getpara/user-management-client';
2
+ import Client, { EmailTheme, Network, OnRampAsset, OnRampProvider, PregenAuth, SdkOverridableAppConfig, TWalletScheme, TWalletType, PartnerThemeConfig } from '@getpara/user-management-client';
3
3
  import { EnclaveClient } from '../shares/enclave.js';
4
- import type { PortalTheme } from './util.js';
5
4
  export declare enum Environment {
6
5
  DEV = "DEV",
7
6
  SANDBOX = "SANDBOX",
@@ -95,7 +94,7 @@ export interface ConstructorOpts {
95
94
  * Theme to use for the portal
96
95
  * @deprecated configure theming through the developer portal
97
96
  */
98
- portalTheme?: PortalTheme;
97
+ portalTheme?: PartnerThemeConfig;
99
98
  useDKLSForCreation?: boolean;
100
99
  disableWebSockets?: boolean;
101
100
  wasmOverride?: ArrayBuffer;
@@ -157,4 +156,17 @@ export interface ConstructorOpts {
157
156
  * @default false
158
157
  */
159
158
  enableDebugLogs?: boolean;
159
+ /**
160
+ * SDK-side overrides for partner-driven app config. Applied as the
161
+ * `#constructorOverrides` layer in `paraCore.config`'s merge chain. The React
162
+ * provider's `configOverrides` prop sits on top via a separate layer; React
163
+ * always wins when both surfaces touch the same key.
164
+ *
165
+ * Most partners should configure these in the developer portal — the constructor
166
+ * surface exists primarily for non-React contexts (`@getpara/server-sdk`,
167
+ * custom integrations) and dev-time iteration.
168
+ *
169
+ * The overridable subset is `SdkOverridableAppConfig`, enforced at compile time.
170
+ */
171
+ configOverrides?: Partial<SdkOverridableAppConfig>;
160
172
  }
@@ -1,9 +1,9 @@
1
- import { ExternalWalletInfo, OnRampPurchase, OnRampPurchaseCreateParams, Setup2faResponse, VerifiedAuth, WalletEntity, WalletParams, TWalletType, IssueJwtParams, IssueJwtResponse, TLinkedAccountType, LinkedAccounts, AuthMethod } from '@getpara/user-management-client';
1
+ import { ExternalWalletInfo, OnRampPurchase, OnRampPurchaseCreateParams, Setup2faResponse, VerifiedAuth, WalletEntity, WalletParams, TWalletType, IssueJwtParams, IssueJwtResponse, TLinkedAccountType, LinkedAccounts, AuthMethod, DeliveryChannel } from '@getpara/user-management-client';
2
2
  import type { OAuthResponse, WithCustomTheme, WithUseShortUrls, Verify2faParams, Verify2faResponse, AuthStateSignup, StorageType, CoreAuthInfo, TelegramParams } from './';
3
3
  import { ParaCore } from '../ParaCore.js';
4
4
  import { FullSignatureRes, Wallet } from './wallet.js';
5
5
  import { AccountLinkInProgress } from './accountLinking.js';
6
- import type { WaitForLoginParams, WaitForLoginResponse, WaitForSignupParams, WaitForWalletCreationParams, WaitForWalletCreationResponse, GetOAuthUrlParams, AddCredentialParams, LoginExternalWalletParams, LoginExternalWalletResponse, ResendVerificationCodeParams, SignUpOrLogInParams, SignUpOrLogInResponse, VerifyOAuthProcessParams, VerifyExternalWalletParams, VerifyExternalWalletResponse, VerifyFarcasterParams, VerifyTelegramParams, ClaimPregenWalletsParams, ClaimPregenWalletsResponse, CreateGuestWalletsResponse, CreatePregenWalletParams, CreatePregenWalletPerTypeParams, CreatePregenWalletPerTypeResponse, CreatePregenWalletResponse, CreateWalletParams, CreateWalletPerTypeParams, CreateWalletPerTypeResponse, CreateWalletResponse, DistributeNewWalletShareParams, GetPregenWalletsParams, GetPregenWalletsResponse, GetWalletBalanceParams, HasPregenWalletParams, PollingCallbacks, RefreshShareParams, RefreshShareResponse, RequestFaucetParams, RequestFaucetResponse, UpdatePregenWalletIdentifierParams, BaseVerifyExternalWalletParams, AuthenticateWithEmailOrPhoneParams, AuthenticateWithEmailOrPhoneResponse, AuthenticateWithOAuthParams, AuthenticateWithOAuthResponse } from '../services/types';
6
+ import type { WaitForLoginParams, WaitForLoginResponse, WaitForSignupParams, WaitForWalletCreationParams, WaitForWalletCreationResponse, GetOAuthUrlParams, AddCredentialParams, LoginExternalWalletParams, LoginExternalWalletResponse, ResendVerificationCodeParams, ResendVerificationCodeResponse, SignUpOrLogInParams, SignUpOrLogInResponse, VerifyOAuthProcessParams, VerifyExternalWalletParams, VerifyExternalWalletResponse, VerifyFarcasterParams, VerifyTelegramParams, ClaimPregenWalletsParams, ClaimPregenWalletsResponse, CreateGuestWalletsResponse, CreatePregenWalletParams, CreatePregenWalletPerTypeParams, CreatePregenWalletPerTypeResponse, CreatePregenWalletResponse, CreateWalletParams, CreateWalletPerTypeParams, CreateWalletPerTypeResponse, CreateWalletResponse, DistributeNewWalletShareParams, GetPregenWalletsParams, GetPregenWalletsResponse, GetWalletBalanceParams, HasPregenWalletParams, PollingCallbacks, RefreshShareParams, RefreshShareResponse, RequestFaucetParams, RequestFaucetResponse, UpdatePregenWalletIdentifierParams, BaseVerifyExternalWalletParams, AuthenticateWithEmailOrPhoneParams, AuthenticateWithEmailOrPhoneResponse, AuthenticateWithOAuthParams, AuthenticateWithOAuthResponse } from '../services/types';
7
7
  export declare const PARA_CORE_METHODS: readonly ["getAuthInfo", "signUpOrLogIn", "verifyNewAccount", "waitForLogin", "waitForSignup", "waitForWalletCreation", "getOAuthUrl", "verifyOAuth", "getFarcasterConnectUri", "verifyFarcaster", "verifyTelegram", "resendVerificationCode", "loginExternalWallet", "verifyExternalWallet", "setup2fa", "enable2fa", "verify2fa", "logout", "clearStorage", "isSessionActive", "isFullyLoggedIn", "refreshSession", "keepSessionAlive", "exportSession", "waitAndExportSession", "importSession", "getVerificationToken", "getWallets", "getWalletsByType", "fetchWallets", "createWallet", "createWalletPerType", "getPregenWallets", "hasPregenWallet", "updatePregenWalletIdentifier", "createPregenWallet", "createPregenWalletPerType", "claimPregenWallets", "createGuestWallets", "distributeNewWalletShare", "getUserShare", "setUserShare", "refreshShare", "signMessage", "signTransaction", "initiateOnRampTransaction", "getWalletBalance", "requestFaucet", "issueJwt", "getLinkedAccounts", "accountLinkInProgress", "addCredential", "exportPrivateKey", "authenticateWithEmailOrPhone", "authenticateWithOAuth"];
8
8
  export declare const PARA_INTERNAL_METHODS: readonly ["linkAccount", "unlinkAccount", "verifyEmailOrPhoneLink", "verifyOAuthLink", "verifyFarcasterLink", "verifyTelegramLink", "verifyExternalWalletLink", "accountLinkInProgress", "prepareLogin", "sendLoginCode", "supportedUserAuthMethods"];
9
9
  export type CoreMethodName = (typeof PARA_CORE_METHODS)[number];
@@ -189,7 +189,7 @@ export type CoreMethods = Record<CoreMethodName, {
189
189
  };
190
190
  resendVerificationCode: {
191
191
  params: ResendVerificationCodeParams;
192
- response: void;
192
+ response: ResendVerificationCodeResponse;
193
193
  };
194
194
  logout: {
195
195
  params: LogoutParams;
@@ -278,32 +278,26 @@ export type CoreMethods = Record<CoreMethodName, {
278
278
  params: CreateWalletPerTypeParams;
279
279
  response: CreateWalletPerTypeResponse;
280
280
  };
281
- /** @deprecated Use the REST API instead. See https://docs.getpara.com/v2/rest/migrate-from-sdk-pregen */
282
281
  getPregenWallets: {
283
282
  params: GetPregenWalletsParams;
284
283
  response: GetPregenWalletsResponse;
285
284
  };
286
- /** @deprecated Use the REST API instead. See https://docs.getpara.com/v2/rest/migrate-from-sdk-pregen */
287
285
  updatePregenWalletIdentifier: {
288
286
  params: UpdatePregenWalletIdentifierParams;
289
287
  response: void;
290
288
  };
291
- /** @deprecated Use the REST API instead. See https://docs.getpara.com/v2/rest/migrate-from-sdk-pregen */
292
289
  hasPregenWallet: {
293
290
  params: HasPregenWalletParams;
294
291
  response: boolean;
295
292
  };
296
- /** @deprecated Use the REST API instead. See https://docs.getpara.com/v2/rest/migrate-from-sdk-pregen */
297
293
  createPregenWallet: {
298
294
  params: CreatePregenWalletParams;
299
295
  response: CreatePregenWalletResponse;
300
296
  };
301
- /** @deprecated Use the REST API instead. See https://docs.getpara.com/v2/rest/migrate-from-sdk-pregen */
302
297
  createPregenWalletPerType: {
303
298
  params: CreatePregenWalletPerTypeParams;
304
299
  response: CreatePregenWalletPerTypeResponse;
305
300
  };
306
- /** @deprecated Use the REST API instead. See https://docs.getpara.com/v2/rest/migrate-from-sdk-pregen */
307
301
  claimPregenWallets: {
308
302
  params: ClaimPregenWalletsParams;
309
303
  response: ClaimPregenWalletsResponse;
@@ -429,6 +423,10 @@ export type InternalMethods = {
429
423
  params: void;
430
424
  response: {
431
425
  userId: string;
426
+ deliveryChannel?: DeliveryChannel;
427
+ fallbackUsed?: boolean;
428
+ fallbackChannel?: DeliveryChannel;
429
+ isSmsAllowed?: boolean;
432
430
  };
433
431
  };
434
432
  supportedUserAuthMethods: {
@@ -1,6 +1,6 @@
1
1
  import type { pki as pkiType } from 'node-forge';
2
- import type { PartnerEntity, BackupKitEmailProps, VerificationEmailProps, TLinkedAccountType } from '@getpara/user-management-client';
3
- import type { Ctx, Environment, AccountLinkInProgress, ConstructorOpts, PortalTheme } from './index.js';
2
+ import type { PartnerAppConfig, PartnerEntity, BackupKitEmailProps, VerificationEmailProps, TLinkedAccountType, PartnerThemeConfig } from '@getpara/user-management-client';
3
+ import type { Ctx, Environment, AccountLinkInProgress, ConstructorOpts } from './index.js';
4
4
  import type { PlatformUtils } from '../PlatformUtils.js';
5
5
  import type { AuthService } from '../services/AuthService.js';
6
6
  import type { WalletService } from '../services/WalletService.js';
@@ -71,13 +71,15 @@ export interface PortalUrlServiceInterface {
71
71
  isPartnerOptional: boolean | undefined;
72
72
  ctx: Ctx;
73
73
  get loginEncryptionKeyPair(): pkiType.rsa.KeyPair | undefined;
74
- portalTheme?: PortalTheme;
74
+ portalTheme?: PartnerThemeConfig;
75
75
  portalPrimaryButtonColor?: string;
76
76
  portalTextColor?: string;
77
77
  portalPrimaryButtonTextColor?: string;
78
78
  portalBackgroundColor?: string;
79
79
  borderRadius?: string;
80
80
  get accountLinkInProgress(): AccountLinkInProgress | undefined;
81
+ /** Merged partner-config surface (partner ⊕ SDK overrides); `{}` before the partner record loads. */
82
+ get config(): PartnerAppConfig;
81
83
  }
82
84
  export interface SessionManagementServiceInterface {
83
85
  displayModalError: (error?: string) => void;
@@ -1,17 +1,4 @@
1
- import { TAuthMethod, Theme } from '@getpara/user-management-client';
2
- /**
3
- * Extended portal theme type that adds new theming fields not yet in the
4
- * backend `Theme` type from `@getpara/user-management-client`.
5
- *
6
- * TODO: Remove this extension once the UMC `Theme` type includes
7
- * `foregroundMixRatio` and `cssOverrides`.
8
- */
9
- export type PortalTheme = Theme & {
10
- /** Controls how much the foreground/accent color is mixed into generated UI palette steps. */
11
- foregroundMixRatio?: number;
12
- /** Raw CSS variable overrides applied after theme generation. Advanced use. */
13
- cssOverrides?: Record<string, string>;
14
- };
1
+ import { TAuthMethod, PartnerThemeConfig } from '@getpara/user-management-client';
15
2
  export type WithAuthMethod = {
16
3
  /**
17
4
  * Which authorization method to use for the URL, either `'PASSKEY'`, `'PASSWORD'` or `'PIN'`.
@@ -22,7 +9,7 @@ export type WithCustomTheme = {
22
9
  /**
23
10
  * The theme to apply to generated URLs, if different from your configured theme.
24
11
  */
25
- portalTheme?: PortalTheme;
12
+ portalTheme?: PartnerThemeConfig;
26
13
  };
27
14
  export type WithUseShortUrls = {
28
15
  /**
@@ -0,0 +1,51 @@
1
+ import type { PartnerThemeConfig } from '@getpara/user-management-client';
2
+ /**
3
+ * Versioned envelope carried by the optional `c` URL search param when the
4
+ * plain-form portal URL would exceed the tier-1 length threshold. Mirrors the
5
+ * top-level shape of the partner config blob (theme + app slices); the auth
6
+ * slice was intentionally omitted since the portal renders no
7
+ * auth-method-selection UI and the params had no consumer.
8
+ *
9
+ * `v` is required and acts as the compat key. The portal validates it on
10
+ * decode and silently falls back to individual URL params on unknown versions
11
+ * — so future schema evolution (e.g. adding an auth slice if portal-side
12
+ * gating ever ships) is BW-compat: older portals just ignore the blob.
13
+ */
14
+ export declare const ENCODED_CONFIG_VERSION: 1;
15
+ export type EncodedAppConfig = {
16
+ appName?: string;
17
+ homepageUrl?: string;
18
+ };
19
+ export type EncodedConfig = {
20
+ v: typeof ENCODED_CONFIG_VERSION;
21
+ theme?: PartnerThemeConfig;
22
+ app?: EncodedAppConfig;
23
+ };
24
+ /**
25
+ * Feature detection — `CompressionStream` lands in Chrome 80 (2020), Firefox 113
26
+ * (May 2023), and Safari 16.4 (March 2023). The current portal browserslist
27
+ * resolves a minimum of iOS Safari 15.6 + Safari 15.6, which DON'T have it.
28
+ *
29
+ * On unsupported browsers, the SDK skips tier 2 emission and lets the portal
30
+ * URL fall through to tier 3 (`shortenUrl`) at the cost of ~150ms RTT. Adding
31
+ * a sync pako fallback (~45 KB on the cold path) is an option if iOS 15.x
32
+ * latency on long-URL flows becomes a real complaint — the seam lives here.
33
+ */
34
+ export declare function isCompressionStreamSupported(): boolean;
35
+ /**
36
+ * Encode the config blob as `base64url(gzip(JSON))`. Async because both
37
+ * `CompressionStream` (encode side) and `DecompressionStream` (decode side)
38
+ * are Streams API and produce async output.
39
+ *
40
+ * Returns `null` when `CompressionStream` is unavailable so callers can
41
+ * gracefully degrade to tier 3 instead of throwing.
42
+ */
43
+ export declare function encodeConfigParams(config: EncodedConfig): Promise<string | null>;
44
+ /**
45
+ * Inverse of `encodeConfigParams`. Never throws — returns `null` on any
46
+ * failure (corrupt base64, invalid gzip, invalid JSON, unknown `v`, etc.)
47
+ * so the portal can silently fall back to individual URL params.
48
+ *
49
+ * Async because `DecompressionStream` is part of the Streams API.
50
+ */
51
+ export declare function tryDecodeConfig(s: string): Promise<EncodedConfig | null>;
@@ -1 +1,3 @@
1
- export declare function warnPregenDeprecation(methodName: string): void;
1
+ export declare function warnOnce(scope: string, key: string, message: string): void;
2
+ /** Test-only: clear the warned set so tests can assert "warns once" across cases. */
3
+ export declare function _resetWarnOnceForTests(): void;
@@ -1,10 +1,12 @@
1
1
  export * from './autobind.js';
2
2
  export * from './config.js';
3
+ export { warnOnce } from './deprecation.js';
3
4
  export * from './events.js';
4
5
  export * from './formatting.js';
5
6
  export * from './json.js';
6
7
  export * from './listeners.js';
7
8
  export * from './onRamps.js';
9
+ export * from './partnerConfig.js';
8
10
  export * from './phone.js';
9
11
  export * from './polling.js';
10
12
  export * from './types.js';