@b3dotfun/sdk 0.1.69-alpha.1 → 0.1.69-alpha.11

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 (161) hide show
  1. package/dist/cjs/anyspend/react/components/AnySpendStakeB3.js +1 -1
  2. package/dist/cjs/anyspend/react/components/AnySpendStakeB3ExactIn.js +1 -1
  3. package/dist/cjs/anyspend/react/components/checkout/CheckoutPaymentPanel.js +2 -4
  4. package/dist/cjs/anyspend/react/components/checkout/CheckoutSuccess.d.ts +2 -1
  5. package/dist/cjs/anyspend/react/components/checkout/CheckoutSuccess.js +5 -3
  6. package/dist/cjs/anyspend/react/components/checkout/FiatCheckoutPanel.js +1 -2
  7. package/dist/cjs/anyspend/react/components/checkout/KycGate.js +1 -2
  8. package/dist/cjs/anyspend/react/components/common/OrderDetails.js +5 -0
  9. package/dist/cjs/anyspend/react/components/common/OrderStatus.js +37 -6
  10. package/dist/cjs/anyspend/react/components/common/StepProgress.d.ts +2 -0
  11. package/dist/cjs/anyspend/react/components/common/StepProgress.js +7 -2
  12. package/dist/cjs/anyspend/react/hooks/useAnyspendCreateOnrampOrder.js +4 -6
  13. package/dist/cjs/anyspend/react/hooks/useKycStatus.d.ts +3 -1
  14. package/dist/cjs/anyspend/react/hooks/useKycStatus.js +11 -7
  15. package/dist/cjs/app.shared.js +9 -7
  16. package/dist/cjs/global-account/bsmnt.d.ts +0 -1
  17. package/dist/cjs/global-account/bsmnt.js +0 -6
  18. package/dist/cjs/global-account/react/components/B3DynamicModal.js +5 -2
  19. package/dist/cjs/global-account/react/components/B3Provider/B3Provider.d.ts +2 -1
  20. package/dist/cjs/global-account/react/components/B3Provider/B3Provider.js +2 -2
  21. package/dist/cjs/global-account/react/components/B3Provider/B3Provider.native.js +2 -1
  22. package/dist/cjs/global-account/react/components/B3Provider/LocalSDKProvider.d.ts +3 -1
  23. package/dist/cjs/global-account/react/components/B3Provider/LocalSDKProvider.js +3 -1
  24. package/dist/cjs/global-account/react/components/ManageAccount/SessionDurationContent.d.ts +5 -0
  25. package/dist/cjs/global-account/react/components/ManageAccount/SessionDurationContent.js +57 -0
  26. package/dist/cjs/global-account/react/components/ManageAccount/SettingsContent.js +12 -29
  27. package/dist/cjs/global-account/react/components/SignInWithB3/components/AuthButton.js +10 -1
  28. package/dist/cjs/global-account/react/components/SignInWithB3/steps/LoginStepCustom.js +96 -15
  29. package/dist/cjs/global-account/react/components/SignInWithB3/utils/signInUtils.d.ts +5 -3
  30. package/dist/cjs/global-account/react/components/SignInWithB3/utils/signInUtils.js +15 -2
  31. package/dist/cjs/global-account/react/components/Toast/ToastContext.d.ts +3 -0
  32. package/dist/cjs/global-account/react/components/Toast/ToastContext.js +30 -7
  33. package/dist/cjs/global-account/react/hooks/useAuth.js +26 -15
  34. package/dist/cjs/global-account/react/hooks/useAuthentication.js +23 -12
  35. package/dist/cjs/global-account/react/hooks/useConnect.d.ts +2 -2
  36. package/dist/cjs/global-account/react/hooks/useFirstEOA.d.ts +8 -8
  37. package/dist/cjs/global-account/react/hooks/useTWAuth.js +0 -1
  38. package/dist/cjs/global-account/react/stores/useModalStore.d.ts +10 -1
  39. package/dist/cjs/global-account/react/utils/createWagmiConfig.d.ts +0 -18
  40. package/dist/cjs/global-account/react/utils/createWagmiConfig.js +0 -17
  41. package/dist/cjs/global-account/react/utils/index.d.ts +0 -1
  42. package/dist/cjs/global-account/react/utils/index.js +0 -1
  43. package/dist/cjs/shared/utils/session-duration.d.ts +15 -0
  44. package/dist/cjs/shared/utils/session-duration.js +69 -0
  45. package/dist/esm/anyspend/react/components/AnySpendStakeB3.js +2 -2
  46. package/dist/esm/anyspend/react/components/AnySpendStakeB3ExactIn.js +2 -2
  47. package/dist/esm/anyspend/react/components/checkout/CheckoutPaymentPanel.js +2 -4
  48. package/dist/esm/anyspend/react/components/checkout/CheckoutSuccess.d.ts +2 -1
  49. package/dist/esm/anyspend/react/components/checkout/CheckoutSuccess.js +5 -3
  50. package/dist/esm/anyspend/react/components/checkout/FiatCheckoutPanel.js +2 -3
  51. package/dist/esm/anyspend/react/components/checkout/KycGate.js +2 -3
  52. package/dist/esm/anyspend/react/components/common/OrderDetails.js +6 -1
  53. package/dist/esm/anyspend/react/components/common/OrderStatus.js +34 -3
  54. package/dist/esm/anyspend/react/components/common/StepProgress.d.ts +2 -0
  55. package/dist/esm/anyspend/react/components/common/StepProgress.js +4 -2
  56. package/dist/esm/anyspend/react/hooks/useAnyspendCreateOnrampOrder.js +5 -7
  57. package/dist/esm/anyspend/react/hooks/useKycStatus.d.ts +3 -1
  58. package/dist/esm/anyspend/react/hooks/useKycStatus.js +9 -5
  59. package/dist/esm/app.shared.js +9 -7
  60. package/dist/esm/global-account/bsmnt.d.ts +0 -1
  61. package/dist/esm/global-account/bsmnt.js +0 -5
  62. package/dist/esm/global-account/react/components/B3DynamicModal.js +5 -2
  63. package/dist/esm/global-account/react/components/B3Provider/B3Provider.d.ts +2 -1
  64. package/dist/esm/global-account/react/components/B3Provider/B3Provider.js +2 -2
  65. package/dist/esm/global-account/react/components/B3Provider/B3Provider.native.js +2 -1
  66. package/dist/esm/global-account/react/components/B3Provider/LocalSDKProvider.d.ts +3 -1
  67. package/dist/esm/global-account/react/components/B3Provider/LocalSDKProvider.js +3 -1
  68. package/dist/esm/global-account/react/components/ManageAccount/SessionDurationContent.d.ts +5 -0
  69. package/dist/esm/global-account/react/components/ManageAccount/SessionDurationContent.js +52 -0
  70. package/dist/esm/global-account/react/components/ManageAccount/SettingsContent.js +12 -29
  71. package/dist/esm/global-account/react/components/SignInWithB3/components/AuthButton.js +11 -2
  72. package/dist/esm/global-account/react/components/SignInWithB3/steps/LoginStepCustom.js +100 -19
  73. package/dist/esm/global-account/react/components/SignInWithB3/utils/signInUtils.d.ts +5 -3
  74. package/dist/esm/global-account/react/components/SignInWithB3/utils/signInUtils.js +14 -1
  75. package/dist/esm/global-account/react/components/Toast/ToastContext.d.ts +3 -0
  76. package/dist/esm/global-account/react/components/Toast/ToastContext.js +30 -7
  77. package/dist/esm/global-account/react/hooks/useAuth.js +28 -17
  78. package/dist/esm/global-account/react/hooks/useAuthentication.js +24 -13
  79. package/dist/esm/global-account/react/hooks/useConnect.d.ts +2 -2
  80. package/dist/esm/global-account/react/hooks/useFirstEOA.d.ts +8 -8
  81. package/dist/esm/global-account/react/hooks/useTWAuth.js +0 -1
  82. package/dist/esm/global-account/react/stores/useModalStore.d.ts +10 -1
  83. package/dist/esm/global-account/react/utils/createWagmiConfig.d.ts +0 -18
  84. package/dist/esm/global-account/react/utils/createWagmiConfig.js +0 -16
  85. package/dist/esm/global-account/react/utils/index.d.ts +0 -1
  86. package/dist/esm/global-account/react/utils/index.js +0 -1
  87. package/dist/esm/shared/utils/session-duration.d.ts +15 -0
  88. package/dist/esm/shared/utils/session-duration.js +64 -0
  89. package/dist/styles/index.css +1 -1
  90. package/dist/types/anyspend/react/components/checkout/CheckoutSuccess.d.ts +2 -1
  91. package/dist/types/anyspend/react/components/common/StepProgress.d.ts +2 -0
  92. package/dist/types/anyspend/react/hooks/useKycStatus.d.ts +3 -1
  93. package/dist/types/global-account/bsmnt.d.ts +0 -1
  94. package/dist/types/global-account/react/components/B3Provider/B3Provider.d.ts +2 -1
  95. package/dist/types/global-account/react/components/B3Provider/LocalSDKProvider.d.ts +3 -1
  96. package/dist/types/global-account/react/components/ManageAccount/SessionDurationContent.d.ts +5 -0
  97. package/dist/types/global-account/react/components/SignInWithB3/utils/signInUtils.d.ts +5 -3
  98. package/dist/types/global-account/react/components/Toast/ToastContext.d.ts +3 -0
  99. package/dist/types/global-account/react/hooks/useConnect.d.ts +2 -2
  100. package/dist/types/global-account/react/hooks/useFirstEOA.d.ts +8 -8
  101. package/dist/types/global-account/react/stores/useModalStore.d.ts +10 -1
  102. package/dist/types/global-account/react/utils/createWagmiConfig.d.ts +0 -18
  103. package/dist/types/global-account/react/utils/index.d.ts +0 -1
  104. package/dist/types/shared/utils/session-duration.d.ts +15 -0
  105. package/package.json +2 -6
  106. package/src/anyspend/react/components/AnySpendStakeB3.tsx +2 -2
  107. package/src/anyspend/react/components/AnySpendStakeB3ExactIn.tsx +2 -2
  108. package/src/anyspend/react/components/checkout/CheckoutPaymentPanel.tsx +2 -4
  109. package/src/anyspend/react/components/checkout/CheckoutSuccess.tsx +13 -3
  110. package/src/anyspend/react/components/checkout/FiatCheckoutPanel.tsx +9 -3
  111. package/src/anyspend/react/components/checkout/KycGate.tsx +8 -3
  112. package/src/anyspend/react/components/common/OrderDetails.tsx +8 -0
  113. package/src/anyspend/react/components/common/OrderStatus.tsx +38 -3
  114. package/src/anyspend/react/components/common/StepProgress.tsx +15 -5
  115. package/src/anyspend/react/hooks/useAnyspendCreateOnrampOrder.ts +5 -7
  116. package/src/anyspend/react/hooks/useKycStatus.ts +8 -5
  117. package/src/app.shared.ts +9 -8
  118. package/src/global-account/bsmnt.ts +0 -6
  119. package/src/global-account/react/components/B3DynamicModal.tsx +5 -2
  120. package/src/global-account/react/components/B3Provider/B3Provider.native.tsx +2 -1
  121. package/src/global-account/react/components/B3Provider/B3Provider.tsx +7 -1
  122. package/src/global-account/react/components/B3Provider/LocalSDKProvider.tsx +5 -0
  123. package/src/global-account/react/components/ManageAccount/SessionDurationContent.tsx +107 -0
  124. package/src/global-account/react/components/ManageAccount/SettingsContent.tsx +28 -30
  125. package/src/global-account/react/components/SignInWithB3/components/AuthButton.tsx +21 -2
  126. package/src/global-account/react/components/SignInWithB3/steps/LoginStepCustom.tsx +207 -54
  127. package/src/global-account/react/components/SignInWithB3/utils/signInUtils.ts +19 -3
  128. package/src/global-account/react/components/Toast/ToastContext.tsx +39 -7
  129. package/src/global-account/react/hooks/useAuth.ts +28 -17
  130. package/src/global-account/react/hooks/useAuthentication.ts +24 -13
  131. package/src/global-account/react/hooks/useConnect.tsx +2 -2
  132. package/src/global-account/react/hooks/useTWAuth.tsx +0 -1
  133. package/src/global-account/react/stores/useModalStore.ts +11 -0
  134. package/src/global-account/react/utils/createWagmiConfig.tsx +0 -18
  135. package/src/global-account/react/utils/index.ts +0 -1
  136. package/src/shared/utils/session-duration.ts +64 -0
  137. package/src/types/torph.d.ts +4 -0
  138. package/dist/cjs/global-account/react/components/AvatarCreator/AvatarCreator.d.ts +0 -6
  139. package/dist/cjs/global-account/react/components/AvatarCreator/AvatarCreator.js +0 -54
  140. package/dist/cjs/global-account/react/components/ProfileAvatar.d.ts +0 -0
  141. package/dist/cjs/global-account/react/components/ProfileAvatar.js +0 -127
  142. package/dist/cjs/global-account/react/hooks/useRPMToken.d.ts +0 -7
  143. package/dist/cjs/global-account/react/hooks/useRPMToken.js +0 -11
  144. package/dist/cjs/global-account/react/utils/updateAvatar.d.ts +0 -4
  145. package/dist/cjs/global-account/react/utils/updateAvatar.js +0 -54
  146. package/dist/esm/global-account/react/components/AvatarCreator/AvatarCreator.d.ts +0 -6
  147. package/dist/esm/global-account/react/components/AvatarCreator/AvatarCreator.js +0 -51
  148. package/dist/esm/global-account/react/components/ProfileAvatar.d.ts +0 -0
  149. package/dist/esm/global-account/react/components/ProfileAvatar.js +0 -127
  150. package/dist/esm/global-account/react/hooks/useRPMToken.d.ts +0 -7
  151. package/dist/esm/global-account/react/hooks/useRPMToken.js +0 -8
  152. package/dist/esm/global-account/react/utils/updateAvatar.d.ts +0 -4
  153. package/dist/esm/global-account/react/utils/updateAvatar.js +0 -18
  154. package/dist/types/global-account/react/components/AvatarCreator/AvatarCreator.d.ts +0 -6
  155. package/dist/types/global-account/react/components/ProfileAvatar.d.ts +0 -0
  156. package/dist/types/global-account/react/hooks/useRPMToken.d.ts +0 -7
  157. package/dist/types/global-account/react/utils/updateAvatar.d.ts +0 -4
  158. package/src/global-account/react/components/AvatarCreator/AvatarCreator.tsx +0 -90
  159. package/src/global-account/react/components/ProfileAvatar.tsx +0 -138
  160. package/src/global-account/react/hooks/useRPMToken.ts +0 -17
  161. package/src/global-account/react/utils/updateAvatar.ts +0 -21
@@ -0,0 +1,5 @@
1
+ interface SessionDurationContentProps {
2
+ partnerId: string;
3
+ }
4
+ declare const SessionDurationContent: ({ partnerId }: SessionDurationContentProps) => import("react/jsx-runtime").JSX.Element;
5
+ export default SessionDurationContent;
@@ -3,15 +3,17 @@ import { SingleStepAuthArgsType, Wallet } from "thirdweb/wallets";
3
3
  type WalletType = Wallet["id"];
4
4
  type StrategyType = SingleStepAuthArgsType["strategy"];
5
5
  type CustomStrategyType = "basement" | "privy";
6
- type AllowedStrategies = StrategyType | WalletType | CustomStrategyType;
7
- export declare const allowedStrategies: readonly ["apple", "google", "x", "discord", "guest", "walletConnect", "io.metamask", "com.coinbase.wallet", "basement", "privy"];
6
+ type AllowedStrategies = StrategyType | WalletType | CustomStrategyType | "email";
7
+ type NonWalletStrategyType = Exclude<AllowedStrategies, WalletType>;
8
+ export declare const allowedStrategies: readonly ["apple", "google", "github", "x", "discord", "email", "guest", "walletConnect", "io.metamask", "com.coinbase.wallet", "basement", "privy"];
8
9
  export type AllowedStrategy = (typeof allowedStrategies)[number];
9
10
  export declare function isWalletType(strategy: AllowedStrategies): strategy is WalletType;
10
- export declare function isStrategyType(strategy: AllowedStrategies): strategy is StrategyType;
11
+ export declare function isStrategyType(strategy: AllowedStrategies): strategy is NonWalletStrategyType;
11
12
  export declare function getConnectOptionsFromStrategy(strategy: AllowedStrategy): {
12
13
  strategy: StrategyType;
13
14
  wallet?: Wallet;
14
15
  chain?: Chain;
15
16
  };
16
17
  export declare const strategyIcons: Record<string, string>;
18
+ export declare const strategyLabels: Record<string, string>;
17
19
  export {};
@@ -11,6 +11,9 @@ interface ToastContextType {
11
11
  addToast: (type: ToastType, message: string, duration?: number) => string;
12
12
  removeToast: (id: string) => void;
13
13
  clearAll: () => void;
14
+ headerMode: boolean;
15
+ setHeaderMode: (enabled: boolean) => void;
16
+ latestToast: ToastItem | null;
14
17
  }
15
18
  export declare function ToastProvider({ children }: {
16
19
  children: React.ReactNode;
@@ -1,9 +1,9 @@
1
1
  import { Chain } from "thirdweb";
2
- import { SingleStepAuthArgsType } from "thirdweb/wallets";
2
+ import { MultiStepAuthArgsType, SingleStepAuthArgsType } from "thirdweb/wallets";
3
3
  /**
4
4
  * This hook is used to connect to a wallet using the thirdweb client.
5
5
  */
6
6
  export declare function useConnect(partnerId: string, chain?: Chain): {
7
- connect: (strategyOptions?: SingleStepAuthArgsType) => Promise<import("thirdweb/wallets").Wallet | null>;
7
+ connect: (strategyOptions?: MultiStepAuthArgsType | SingleStepAuthArgsType) => Promise<import("thirdweb/wallets").Wallet | null>;
8
8
  isLoading: boolean;
9
9
  };
@@ -7451,8 +7451,10 @@ export declare function useFirstEOA(chain?: {
7451
7451
  [x: `bool[${string}]`]: undefined;
7452
7452
  [x: `bytes[${string}]`]: undefined;
7453
7453
  [x: `bytes1[${string}]`]: undefined;
7454
- [x: `bytes4[${string}]`]: undefined;
7454
+ [x: `bytes7[${string}]`]: undefined;
7455
+ [x: `bytes14[${string}]`]: undefined;
7455
7456
  [x: `bytes30[${string}]`]: undefined;
7457
+ [x: `bytes5[${string}]`]: undefined;
7456
7458
  [x: `bytes18[${string}]`]: undefined;
7457
7459
  [x: `bytes6[${string}]`]: undefined;
7458
7460
  [x: `bytes9[${string}]`]: undefined;
@@ -7460,12 +7462,10 @@ export declare function useFirstEOA(chain?: {
7460
7462
  [x: `bytes10[${string}]`]: undefined;
7461
7463
  [x: `bytes2[${string}]`]: undefined;
7462
7464
  [x: `bytes3[${string}]`]: undefined;
7463
- [x: `bytes5[${string}]`]: undefined;
7464
- [x: `bytes7[${string}]`]: undefined;
7465
+ [x: `bytes4[${string}]`]: undefined;
7465
7466
  [x: `bytes11[${string}]`]: undefined;
7466
7467
  [x: `bytes12[${string}]`]: undefined;
7467
7468
  [x: `bytes13[${string}]`]: undefined;
7468
- [x: `bytes14[${string}]`]: undefined;
7469
7469
  [x: `bytes15[${string}]`]: undefined;
7470
7470
  [x: `bytes16[${string}]`]: undefined;
7471
7471
  [x: `bytes17[${string}]`]: undefined;
@@ -7553,8 +7553,10 @@ export declare function useFirstEOA(chain?: {
7553
7553
  bool?: undefined;
7554
7554
  bytes?: undefined;
7555
7555
  bytes1?: undefined;
7556
- bytes4?: undefined;
7556
+ bytes7?: undefined;
7557
+ bytes14?: undefined;
7557
7558
  bytes30?: undefined;
7559
+ bytes5?: undefined;
7558
7560
  bytes18?: undefined;
7559
7561
  bytes6?: undefined;
7560
7562
  bytes9?: undefined;
@@ -7562,12 +7564,10 @@ export declare function useFirstEOA(chain?: {
7562
7564
  bytes10?: undefined;
7563
7565
  bytes2?: undefined;
7564
7566
  bytes3?: undefined;
7565
- bytes5?: undefined;
7566
- bytes7?: undefined;
7567
+ bytes4?: undefined;
7567
7568
  bytes11?: undefined;
7568
7569
  bytes12?: undefined;
7569
7570
  bytes13?: undefined;
7570
- bytes14?: undefined;
7571
7571
  bytes15?: undefined;
7572
7572
  bytes16?: undefined;
7573
7573
  bytes17?: undefined;
@@ -425,6 +425,15 @@ export interface SendModalProps extends BaseModalProps {
425
425
  /** Callback function called when send is successful */
426
426
  onSuccess?: (txHash?: string) => void;
427
427
  }
428
+ /**
429
+ * Props for the Session Duration modal
430
+ * Allows users to configure how long they stay signed in
431
+ */
432
+ export interface SessionDurationModalProps extends BaseModalProps {
433
+ type: "sessionDuration";
434
+ partnerId: string;
435
+ chain: Chain;
436
+ }
428
437
  /**
429
438
  * Props for the Notifications modal
430
439
  * Allows users to manage notification settings and channels
@@ -626,7 +635,7 @@ export interface AnySpendDepositModalProps extends BaseModalProps {
626
635
  /**
627
636
  * Union type of all possible modal content types
628
637
  */
629
- export type ModalContentType = SignInWithB3ModalProps | RequestPermissionsModalProps | ManageAccountModalProps | AnySpendModalProps | AnyspendOrderDetailsProps | AnySpendNftProps | AnySpendJoinTournamentProps | AnySpendFundTournamentProps | AnySpendOrderHistoryProps | AnySpendStakeB3Props | AnySpendStakeB3ExactInProps | AnySpendStakeUpsideProps | AnySpendStakeUpsideExactInProps | AnySpendDepositUpsideProps | AnySpendBuySpinProps | AnySpendSignatureMintProps | AnySpendBondKitProps | LinkAccountModalProps | LinkNewAccountModalProps | AnySpendDepositHypeProps | AvatarEditorModalProps | DepositModalProps | SendModalProps | NotificationsModalProps | AnySpendCollectorClubPurchaseProps | AnySpendDepositModalProps | AnySpendWorkflowTriggerModalProps | AnySpendCheckoutTriggerModalProps;
638
+ export type ModalContentType = SignInWithB3ModalProps | RequestPermissionsModalProps | ManageAccountModalProps | AnySpendModalProps | AnyspendOrderDetailsProps | AnySpendNftProps | AnySpendJoinTournamentProps | AnySpendFundTournamentProps | AnySpendOrderHistoryProps | AnySpendStakeB3Props | AnySpendStakeB3ExactInProps | AnySpendStakeUpsideProps | AnySpendStakeUpsideExactInProps | AnySpendDepositUpsideProps | AnySpendBuySpinProps | AnySpendSignatureMintProps | AnySpendBondKitProps | LinkAccountModalProps | LinkNewAccountModalProps | AnySpendDepositHypeProps | AvatarEditorModalProps | DepositModalProps | SendModalProps | NotificationsModalProps | SessionDurationModalProps | AnySpendCollectorClubPurchaseProps | AnySpendDepositModalProps | AnySpendWorkflowTriggerModalProps | AnySpendCheckoutTriggerModalProps;
630
639
  /**
631
640
  * State interface for the modal store
632
641
  */
@@ -25,21 +25,3 @@ export declare function createWagmiConfig(options: CreateWagmiConfigOptions): im
25
25
  }, {
26
26
  "thirdweb:lastChainId": number;
27
27
  }>)[]>;
28
- /**
29
- * Returns a cached wagmi config for the given partnerId.
30
- * Use this instead of calling createWagmiConfig() directly inside React components or hooks
31
- * to avoid registering duplicate EventEmitter listeners on every render.
32
- */
33
- export declare function getCachedWagmiConfig(options: CreateWagmiConfigOptions): import("wagmi").Config<readonly [import("viem").Chain, ...import("viem").Chain[]], {
34
- [k: string]: import("viem").HttpTransport<undefined, false>;
35
- }, (CreateConnectorFn | CreateConnectorFn<import("thirdweb/dist/types/adapters/eip1193").EIP1193Provider | undefined, {
36
- connect<withCapabilities extends boolean = false>(parameters?: import("@thirdweb-dev/wagmi-adapter").ConnectionOptions<withCapabilities> | undefined): Promise<{
37
- accounts: withCapabilities extends true ? readonly {
38
- address: `0x${string}`;
39
- capabilities: Record<string, unknown>;
40
- }[] : readonly `0x${string}`[];
41
- chainId: number;
42
- }>;
43
- }, {
44
- "thirdweb:lastChainId": number;
45
- }>)[]>;
@@ -1,4 +1,3 @@
1
1
  export * from "./notificationsAPI";
2
2
  export * from "./profileDisplay";
3
3
  export * from "./toast";
4
- export * from "./updateAvatar";
@@ -0,0 +1,15 @@
1
+ export declare const SESSION_DURATION_OPTIONS: readonly [0, 1, 7, 14, 30];
2
+ export type SessionDurationDays = (typeof SESSION_DURATION_OPTIONS)[number];
3
+ /**
4
+ * Read session duration for a specific partner.
5
+ *
6
+ * preferences shape: { [partnerId]: { sessionDuration: number }, sessionDuration?: number }
7
+ *
8
+ * Priority: user.preferences[partnerId].sessionDuration
9
+ * → user.preferences.sessionDuration (global fallback)
10
+ * → localStorage (per-partner) → localStorage (global) → default 7d
11
+ */
12
+ export declare function getSessionDurationDays(userPreferences?: Record<string, any>, partnerId?: string): SessionDurationDays;
13
+ export declare const SESSION_DURATION_LABELS: Record<SessionDurationDays, string>;
14
+ /** Cache the preference locally so it's available immediately on next login */
15
+ export declare function setSessionDurationDays(days: SessionDurationDays, partnerId?: string): void;
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@b3dotfun/sdk",
3
- "version": "0.1.69-alpha.1",
3
+ "version": "0.1.69-alpha.11",
4
4
  "source": "src/index.ts",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "react-native": "./dist/cjs/index.native.js",
@@ -338,6 +338,7 @@
338
338
  "socket.io-client": "4.7.5",
339
339
  "sonner": "1.7.4",
340
340
  "tailwind-merge": "2.6.0",
341
+ "torph": "^0.0.9",
341
342
  "typescript": "5.8.2",
342
343
  "vaul": "^1.1.2",
343
344
  "zustand": "4.5.6"
@@ -387,8 +388,6 @@
387
388
  "@fingerprintjs/fingerprintjs-pro-react": "^2.7.0",
388
389
  "@privy-io/react-auth": "^2.8.0",
389
390
  "@react-three/postprocessing": "2.16.6",
390
- "@readyplayerme/react-avatar-creator": "0.5.0",
391
- "@readyplayerme/visage": "6.10.0",
392
391
  "@tanstack/react-query": "5.55.0",
393
392
  "@wagmi/core": "2.20.3",
394
393
  "react": "^18.0.0 || ^19.0.0",
@@ -403,9 +402,6 @@
403
402
  "@react-three/postprocessing": {
404
403
  "optional": true
405
404
  },
406
- "@readyplayerme/visage": {
407
- "optional": true
408
- },
409
405
  "react-native-mmkv": {
410
406
  "optional": true
411
407
  },
@@ -1,4 +1,4 @@
1
- import { ABI_ERC20_STAKING, B3_TOKEN, eqci } from "@b3dotfun/sdk/anyspend";
1
+ import { ABI_ERC20_STAKING, B3_TOKEN, eqci, getExplorerTxUrl } from "@b3dotfun/sdk/anyspend";
2
2
  import {
3
3
  Button,
4
4
  GlareCardRounded,
@@ -474,7 +474,7 @@ export function AnySpendStakeB3({
474
474
  >
475
475
  <div className="mb-6">
476
476
  <a
477
- href={`https://basescan.org/tx/${stakingTxHash}`}
477
+ href={getExplorerTxUrl(base.id, stakingTxHash)}
478
478
  target="_blank"
479
479
  rel="noopener noreferrer"
480
480
  className="text-as-primary/70 hover:text-as-primary block break-all text-center font-mono text-sm underline transition-colors"
@@ -1,4 +1,4 @@
1
- import { ABI_ERC20_STAKING, B3_TOKEN, eqci } from "@b3dotfun/sdk/anyspend";
1
+ import { ABI_ERC20_STAKING, B3_TOKEN, eqci, getExplorerTxUrl } from "@b3dotfun/sdk/anyspend";
2
2
  import { normalizeAddress } from "@b3dotfun/sdk/anyspend/utils";
3
3
  import {
4
4
  Button,
@@ -492,7 +492,7 @@ export function AnySpendStakeB3ExactIn({
492
492
  >
493
493
  <div className="mb-6">
494
494
  <a
495
- href={`https://basescan.org/tx/${stakingTxHash}`}
495
+ href={getExplorerTxUrl(base.id, stakingTxHash)}
496
496
  target="_blank"
497
497
  rel="noopener noreferrer"
498
498
  className="text-as-primary/70 hover:text-as-primary block break-all text-center font-mono text-sm underline transition-colors"
@@ -186,14 +186,12 @@ export function CheckoutPaymentPanel({
186
186
  const accordionButtonClass = (active: boolean) =>
187
187
  cn(
188
188
  "anyspend-payment-method-btn flex w-full items-center gap-3 px-4 py-4 text-left transition-colors",
189
- active
190
- ? "bg-white dark:bg-neutral-900"
191
- : "bg-white hover:bg-gray-50 dark:bg-neutral-900 dark:hover:bg-neutral-800",
189
+ !active && "hover:bg-gray-50 dark:hover:bg-neutral-800",
192
190
  classes?.paymentMethodButton,
193
191
  );
194
192
 
195
193
  const expandedPanelClass = cn(
196
- "anyspend-payment-method-panel border-t border-gray-100 bg-white px-4 py-4 dark:border-neutral-800 dark:bg-neutral-900",
194
+ "anyspend-payment-method-panel border-t border-gray-100 px-4 py-4 dark:border-neutral-800",
197
195
  );
198
196
 
199
197
  return (
@@ -1,5 +1,7 @@
1
1
  "use client";
2
2
 
3
+ import { getExplorerTxUrl } from "@b3dotfun/sdk/anyspend";
4
+ import { b3 } from "viem/chains";
3
5
  import { cn } from "@b3dotfun/sdk/shared/utils/cn";
4
6
  import { ExternalLink } from "lucide-react";
5
7
  import { motion } from "motion/react";
@@ -9,13 +11,21 @@ import type { AnySpendCheckoutClasses } from "./AnySpendCheckout";
9
11
 
10
12
  interface CheckoutSuccessProps {
11
13
  txHash?: string;
14
+ dstChainId?: number;
12
15
  orderId?: string;
13
16
  returnUrl?: string;
14
17
  returnLabel?: string;
15
18
  classes?: AnySpendCheckoutClasses;
16
19
  }
17
20
 
18
- export function CheckoutSuccess({ txHash, orderId, returnUrl, returnLabel, classes }: CheckoutSuccessProps) {
21
+ export function CheckoutSuccess({
22
+ txHash,
23
+ dstChainId,
24
+ orderId,
25
+ returnUrl,
26
+ returnLabel,
27
+ classes,
28
+ }: CheckoutSuccessProps) {
19
29
  const { content, slots } = useAnySpendCustomization();
20
30
 
21
31
  if (slots.successScreen) {
@@ -29,7 +39,7 @@ export function CheckoutSuccess({ txHash, orderId, returnUrl, returnLabel, class
29
39
  : "Your payment has been processed successfully.",
30
40
  txHash,
31
41
  orderId,
32
- explorerUrl: txHash ? `https://explorer.b3.fun/tx/${txHash}` : undefined,
42
+ explorerUrl: txHash ? getExplorerTxUrl(dstChainId ?? b3.id, txHash) : undefined,
33
43
  onDone: () => {
34
44
  if (returnUrl) window.location.href = returnUrl;
35
45
  },
@@ -69,7 +79,7 @@ export function CheckoutSuccess({ txHash, orderId, returnUrl, returnLabel, class
69
79
  initial={{ opacity: 0 }}
70
80
  animate={{ opacity: 1 }}
71
81
  transition={{ duration: 0.3, delay: 0.5, ease: "easeOut" }}
72
- href={`https://explorer.b3.fun/tx/${txHash}`}
82
+ href={getExplorerTxUrl(dstChainId ?? b3.id, txHash)}
73
83
  target="_blank"
74
84
  rel="noopener noreferrer"
75
85
  className="anyspend-success-tx-link mt-4 flex items-center gap-1.5 text-sm text-blue-600 hover:underline dark:text-blue-400"
@@ -10,14 +10,20 @@ import { USDC_BASE } from "@b3dotfun/sdk/anyspend/constants";
10
10
  import { cn } from "@b3dotfun/sdk/shared/utils/cn";
11
11
  import { formatUnits } from "@b3dotfun/sdk/shared/utils/number";
12
12
  import { getStripePromise } from "@b3dotfun/sdk/shared/utils/payment.utils";
13
- import { ShinyButton, TextShimmer, useB3Config, useModalStore, useTokenData } from "@b3dotfun/sdk/global-account/react";
13
+ import {
14
+ ShinyButton,
15
+ TextShimmer,
16
+ useAccountWallet,
17
+ useB3Config,
18
+ useModalStore,
19
+ useTokenData,
20
+ } from "@b3dotfun/sdk/global-account/react";
14
21
  import { thirdwebB3Chain } from "@b3dotfun/sdk/shared/constants/chains/b3Chain";
15
22
  import { AddressElement, Elements, PaymentElement, useElements, useStripe } from "@stripe/react-stripe-js";
16
23
  import type { PaymentIntentResult, StripePaymentElementOptions } from "@stripe/stripe-js";
17
24
  import { Loader2, Lock, Wallet } from "lucide-react";
18
25
  import { AnimatePresence, motion } from "motion/react";
19
26
  import { useCallback, useEffect, useMemo, useRef, useState } from "react";
20
- import { useAccount } from "wagmi";
21
27
  import type { AnySpendCheckoutClasses } from "./AnySpendCheckout";
22
28
  import { KycGate } from "./KycGate";
23
29
 
@@ -58,7 +64,7 @@ export function FiatCheckoutPanel({
58
64
  const onErrorRef = useRef(onError);
59
65
  onErrorRef.current = onError;
60
66
 
61
- const { address } = useAccount();
67
+ const { address } = useAccountWallet();
62
68
  const setB3ModalOpen = useModalStore(state => state.setB3ModalOpen);
63
69
  const setB3ModalContentType = useModalStore(state => state.setB3ModalContentType);
64
70
 
@@ -1,12 +1,17 @@
1
1
  "use client";
2
2
 
3
3
  import { cn } from "@b3dotfun/sdk/shared/utils/cn";
4
- import { ShinyButton, TextShimmer, useB3Config, useModalStore } from "@b3dotfun/sdk/global-account/react";
4
+ import {
5
+ ShinyButton,
6
+ TextShimmer,
7
+ useAccountWallet,
8
+ useB3Config,
9
+ useModalStore,
10
+ } from "@b3dotfun/sdk/global-account/react";
5
11
  import { thirdwebB3Chain } from "@b3dotfun/sdk/shared/constants/chains/b3Chain";
6
12
  import { Loader2, ShieldCheck, AlertTriangle, Clock, Wallet } from "lucide-react";
7
13
  import { AnimatePresence, motion } from "motion/react";
8
14
  import { useCallback, useEffect, useRef, useState } from "react";
9
- import { useAccount } from "wagmi";
10
15
  import type { AnySpendCheckoutClasses } from "./AnySpendCheckout";
11
16
  import { useCreateKycInquiry, useKycStatus, useVerifyKyc, useWalletAuthHeaders } from "../../hooks/useKycStatus";
12
17
 
@@ -20,7 +25,7 @@ interface KycGateProps {
20
25
  }
21
26
 
22
27
  export function KycGate({ themeColor, classes, enabled = false, onStatusResolved }: KycGateProps) {
23
- const { address } = useAccount();
28
+ const { address } = useAccountWallet();
24
29
  const { partnerId } = useB3Config();
25
30
  // Gate the status fetch behind explicit user consent so the wallet
26
31
  // signature prompt doesn't fire automatically on tab open.
@@ -24,6 +24,7 @@ import {
24
24
  useB3Config,
25
25
  useModalStore,
26
26
  useProfile,
27
+ useToastContext,
27
28
  useUnifiedChainSwitchAndExecute,
28
29
  } from "@b3dotfun/sdk/global-account/react";
29
30
  import { useRouter, useSearchParams } from "@b3dotfun/sdk/shared/react/hooks";
@@ -231,6 +232,13 @@ export const OrderDetails = memo(function OrderDetails({
231
232
  const router = useRouter();
232
233
  const searchParams = useSearchParams();
233
234
 
235
+ const { setHeaderMode } = useToastContext();
236
+
237
+ useEffect(() => {
238
+ setHeaderMode(true);
239
+ return () => setHeaderMode(false);
240
+ }, [setHeaderMode]);
241
+
234
242
  // Get theme from B3Provider context
235
243
  const { theme } = useB3Config();
236
244
  const colorMode = theme || "light";
@@ -1,7 +1,9 @@
1
1
  import { getStatusDisplay } from "@b3dotfun/sdk/anyspend";
2
2
  import { components } from "@b3dotfun/sdk/anyspend/types/api";
3
3
  import { useSearchParams } from "@b3dotfun/sdk/shared/react";
4
- import { Clock, Loader2, RotateCcw, X } from "lucide-react";
4
+ import { AlertCircle, AlertTriangle, CheckCircle, Clock, Info, Loader2, RotateCcw, X } from "lucide-react";
5
+ import { useToastContext } from "@b3dotfun/sdk/global-account/react";
6
+ import type { ToastType } from "@b3dotfun/sdk/global-account/react";
5
7
  import React, { memo, useEffect, useRef } from "react";
6
8
  import { useAnySpendCustomization } from "../context/AnySpendCustomizationContext";
7
9
  import { AnimatedCheckmark } from "../icons/AnimatedCheckmark";
@@ -15,6 +17,20 @@ function getStepIndex(status: string): number {
15
17
  return -1;
16
18
  }
17
19
 
20
+ function getToastIcon(type: ToastType): React.ReactNode {
21
+ const iconClass = "h-5 w-5";
22
+ switch (type) {
23
+ case "success":
24
+ return <CheckCircle className={`${iconClass} text-green-500`} />;
25
+ case "error":
26
+ return <AlertCircle className={`${iconClass} text-red-500`} />;
27
+ case "info":
28
+ return <Info className={`${iconClass} text-blue-500`} />;
29
+ case "warning":
30
+ return <AlertTriangle className={`${iconClass} text-amber-500`} />;
31
+ }
32
+ }
33
+
18
34
  export const OrderStatus = memo(function OrderStatus({
19
35
  order,
20
36
  selectedCryptoPaymentMethod,
@@ -56,9 +72,28 @@ export const OrderStatus = memo(function OrderStatus({
56
72
  if (content.processingDescription) description = content.processingDescription;
57
73
  }
58
74
 
75
+ const { latestToast } = useToastContext();
76
+
77
+ // Override subtitle with toast notification when present (title stays unchanged)
78
+ let notificationIcon: React.ReactNode = undefined;
79
+ if (latestToast && currentStepIndex >= 0) {
80
+ description = latestToast.message;
81
+ notificationIcon = getToastIcon(latestToast.type);
82
+ }
83
+
59
84
  const paymentSteps: Step[] = [
60
- { id: 1, title: text, description: typeof description === "string" ? description : defaultDescription || "" },
61
- { id: 2, title: text, description: typeof description === "string" ? description : defaultDescription || "" },
85
+ {
86
+ id: 1,
87
+ title: text,
88
+ description: typeof description === "string" ? description : defaultDescription || "",
89
+ icon: notificationIcon,
90
+ },
91
+ {
92
+ id: 2,
93
+ title: text,
94
+ description: typeof description === "string" ? description : defaultDescription || "",
95
+ icon: notificationIcon,
96
+ },
62
97
  ];
63
98
 
64
99
  if (currentStepIndex === 0) {
@@ -1,12 +1,15 @@
1
1
  "use client";
2
2
 
3
+ import React from "react";
3
4
  import { motion } from "framer-motion";
5
+ import { TextMorph } from "torph/react";
4
6
  import { AnimatedCheckmark } from "../icons/AnimatedCheckmark";
5
7
 
6
8
  export interface Step {
7
9
  id: string | number;
8
10
  title: string;
9
11
  description?: string;
12
+ icon?: React.ReactNode;
10
13
  }
11
14
 
12
15
  export interface StepProgressProps {
@@ -32,8 +35,8 @@ export function StepProgress({
32
35
  {/* Step Progress Indicator */}
33
36
  <div className="flex items-center gap-2">
34
37
  {steps.map((_, index) => (
35
- <>
36
- <div key={index} className="flex items-center">
38
+ <React.Fragment key={index}>
39
+ <div className="flex items-center">
37
40
  {index < currentStepIndex ? (
38
41
  // Completed step - checkmark replaces the whole circle
39
42
  <motion.div
@@ -71,7 +74,7 @@ export function StepProgress({
71
74
  ))}
72
75
  </div>
73
76
  )}
74
- </>
77
+ </React.Fragment>
75
78
  ))}
76
79
  </div>
77
80
 
@@ -83,8 +86,15 @@ export function StepProgress({
83
86
  transition={{ delay: 0.3 }}
84
87
  className="text-center"
85
88
  >
86
- <h2 className="text-as-primary text-xl font-semibold">{currentStep.title}</h2>
87
- {currentStep.description && <p className="text-as-tertiary mt-1 text-sm">{currentStep.description}</p>}
89
+ <h2 className="text-as-primary text-xl font-semibold">
90
+ <TextMorph>{currentStep.title}</TextMorph>
91
+ </h2>
92
+ {currentStep.description && (
93
+ <p className="text-as-tertiary mt-1 flex items-center justify-center gap-1.5 text-sm">
94
+ {currentStep.icon}
95
+ <TextMorph>{currentStep.description}</TextMorph>
96
+ </p>
97
+ )}
88
98
  </motion.div>
89
99
  )}
90
100
  </div>
@@ -11,9 +11,8 @@ import { useMemo } from "react";
11
11
 
12
12
  import { parseUnits } from "viem";
13
13
  import { base } from "viem/chains";
14
- import { useAccount } from "wagmi";
15
14
  import { CreateOrderParams } from "./useAnyspendCreateOrder";
16
- import { getCachedWalletHeaders } from "./useKycStatus";
15
+ import { getCachedWalletHeaders, useWalletAuthHeaders } from "./useKycStatus";
17
16
  import { useValidatedClientReferenceId } from "./useValidatedClientReferenceId";
18
17
 
19
18
  export type OnrampOptions = {
@@ -42,7 +41,7 @@ export type UseAnyspendCreateOnrampOrderProps = {
42
41
  export function useAnyspendCreateOnrampOrder({ onSuccess, onError }: UseAnyspendCreateOnrampOrderProps = {}) {
43
42
  // Get B3 context values
44
43
  const { partnerId } = useB3Config();
45
- const { address } = useAccount();
44
+ const { address, getHeaders: getWalletAuthHeaders } = useWalletAuthHeaders();
46
45
 
47
46
  // Get validated client reference ID from B3 context
48
47
  const createValidatedClientReferenceId = useValidatedClientReferenceId();
@@ -86,12 +85,11 @@ export function useAnyspendCreateOnrampOrder({ onSuccess, onError }: UseAnyspend
86
85
 
87
86
  // For card payments, include wallet auth headers so the backend can verify
88
87
  // KYC by the signing wallet address (may differ from the B3 JWT address).
89
- // Only use already-cached headers never trigger a fresh wallet signature
90
- // here, as that would prompt the user without their explicit consent.
91
- // KycGate pre-caches the headers in the "Continue to Verify" user-gesture.
88
+ // First try cached headers (from KycGate), then sign on-the-fly.
89
+ // The user is already clicking "Continue"/"Pay" so signing here is acceptable.
92
90
  let kycWalletHeaders: Record<string, string> | undefined;
93
91
  if (onramp.vendor === "stripe-web2" && address) {
94
- kycWalletHeaders = getCachedWalletHeaders(address);
92
+ kycWalletHeaders = getCachedWalletHeaders(address) || (await getWalletAuthHeaders());
95
93
  }
96
94
 
97
95
  return await anyspendService.createOrder({
@@ -1,9 +1,9 @@
1
1
  "use client";
2
2
 
3
3
  import { ANYSPEND_MAINNET_BASE_URL } from "@b3dotfun/sdk/anyspend/constants";
4
+ import { useAccountWallet } from "@b3dotfun/sdk/global-account/react";
4
5
  import { useMutation, useQuery } from "@tanstack/react-query";
5
6
  import { useCallback } from "react";
6
- import { useAccount, useSignMessage } from "wagmi";
7
7
 
8
8
  export interface KycStatusResponse {
9
9
  kycRequired: boolean;
@@ -46,14 +46,17 @@ export function getCachedWalletHeaders(address: string): Record<string, string>
46
46
 
47
47
  /**
48
48
  * Returns a function that builds the wallet-signature auth headers.
49
+ * Uses useAccountWallet (thirdweb) instead of wagmi so signing works
50
+ * for all wallet types (social login, EOA, smart wallet, etc.).
49
51
  * Caches signatures for 4 minutes (server allows 5-minute window).
50
52
  */
51
53
  export function useWalletAuthHeaders() {
52
- const { address } = useAccount();
53
- const { signMessageAsync } = useSignMessage();
54
+ const { address, wallet } = useAccountWallet();
55
+ const signMessage = wallet.signMessage;
54
56
 
55
57
  const getHeaders = useCallback(async (): Promise<Record<string, string>> => {
56
58
  if (!address) throw new Error("No wallet connected");
59
+ if (!signMessage) throw new Error("Wallet does not support message signing");
57
60
  const walletAddress = address.toLowerCase();
58
61
 
59
62
  const cached = headerCache.get(walletAddress);
@@ -61,7 +64,7 @@ export function useWalletAuthHeaders() {
61
64
 
62
65
  const timestamp = Math.floor(Date.now() / 1000);
63
66
  const message = buildWalletAuthMessage(walletAddress, timestamp);
64
- const signature = await signMessageAsync({ message });
67
+ const signature = await signMessage({ message });
65
68
 
66
69
  const headers = {
67
70
  "X-Wallet-Address": walletAddress,
@@ -71,7 +74,7 @@ export function useWalletAuthHeaders() {
71
74
  // Cache for 4 minutes so repeated fetches don't re-prompt the user
72
75
  headerCache.set(walletAddress, { headers, expiresAt: Date.now() + 4 * 60 * 1000 });
73
76
  return headers;
74
- }, [address, signMessageAsync]);
77
+ }, [address, signMessage]);
75
78
 
76
79
  return { address, getHeaders };
77
80
  }
package/src/app.shared.ts CHANGED
@@ -2,12 +2,11 @@ import { ClientApplication } from "@b3dotfun/b3-api";
2
2
  import { AuthenticationClient } from "@feathersjs/authentication-client";
3
3
  import Cookies from "js-cookie";
4
4
  import { B3_AUTH_COOKIE_NAME } from "./shared/constants";
5
+ import { getSessionDurationDays } from "./shared/utils/session-duration";
5
6
 
6
7
  export const B3_API_URL =
7
8
  process.env.EXPO_PUBLIC_B3_API || process.env.NEXT_PUBLIC_B3_API || process.env.PUBLIC_B3_API || "https://api.b3.fun";
8
9
 
9
- const DEV_USER_GROUP = 4;
10
-
11
10
  export const authenticate = async (
12
11
  app: ClientApplication,
13
12
  accessToken: string,
@@ -33,12 +32,14 @@ export const authenticate = async (
33
32
  },
34
33
  );
35
34
 
36
- // Extend cookie expiration to 30 days for dev users
37
- if (response?.user?.userGroups?.includes(DEV_USER_GROUP)) {
38
- const token = Cookies.get(B3_AUTH_COOKIE_NAME);
39
- if (token) {
40
- Cookies.set(B3_AUTH_COOKIE_NAME, token, { expires: 30 });
41
- }
35
+ const token = Cookies.get(B3_AUTH_COOKIE_NAME);
36
+ if (token) {
37
+ const days = getSessionDurationDays(response?.user?.preferences, params?.partnerId);
38
+ Cookies.set(B3_AUTH_COOKIE_NAME, token, {
39
+ ...(days > 0 ? { expires: days } : {}),
40
+ secure: true,
41
+ sameSite: "Lax",
42
+ });
42
43
  }
43
44
 
44
45
  return response;
@@ -73,12 +73,6 @@ export const resetSocket = () => {
73
73
  // reset the socket connection
74
74
  };
75
75
 
76
- export function extractAvatarIdFromUrl(url: string): string | null {
77
- const regex = /https:\/\/models\.readyplayer\.me\/([a-f0-9]{24})\.[a-zA-Z0-9]+/;
78
- const match = url.match(regex);
79
- return match ? match[1] : null;
80
- }
81
-
82
76
  export const authenticateWithB3JWT = async (fullToken: string, params?: Record<string, any>) => {
83
77
  // Do not authenticate if there is no token
84
78
  if (!fullToken) {