@b3dotfun/sdk 0.1.70-alpha.1 → 0.1.70-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.
- package/constants/chains/b3Chain.js +3 -1
- package/dist/cjs/anyspend/constants/rpc.d.ts +2 -1
- package/dist/cjs/anyspend/constants/rpc.js +4 -2
- package/dist/cjs/anyspend/react/components/AnySpendBondKit.d.ts +1 -1
- package/dist/cjs/anyspend/react/components/AnySpendBondKit.js +2 -2
- package/dist/cjs/anyspend/react/components/AnySpendBuySpin.d.ts +2 -1
- package/dist/cjs/anyspend/react/components/AnySpendBuySpin.js +2 -2
- package/dist/cjs/anyspend/react/components/AnySpendCustomExactIn.d.ts +2 -0
- package/dist/cjs/anyspend/react/components/AnySpendCustomExactIn.js +21 -14
- package/dist/cjs/anyspend/react/components/AnySpendDeposit.js +9 -3
- package/dist/cjs/anyspend/react/components/AnySpendDepositUpside.d.ts +2 -1
- package/dist/cjs/anyspend/react/components/AnySpendDepositUpside.js +2 -2
- package/dist/cjs/anyspend/react/components/AnySpendStakeB3.d.ts +2 -1
- package/dist/cjs/anyspend/react/components/AnySpendStakeB3.js +2 -2
- package/dist/cjs/anyspend/react/components/AnySpendStakeB3ExactIn.d.ts +2 -1
- package/dist/cjs/anyspend/react/components/AnySpendStakeB3ExactIn.js +2 -2
- package/dist/cjs/anyspend/react/components/AnySpendStakeUpsideExactIn.d.ts +2 -1
- package/dist/cjs/anyspend/react/components/AnySpendStakeUpsideExactIn.js +2 -2
- package/dist/cjs/anyspend/react/components/AnySpendWorkflowTrigger.d.ts +3 -1
- package/dist/cjs/anyspend/react/components/AnySpendWorkflowTrigger.js +2 -2
- package/dist/cjs/anyspend/react/components/AnyspendDepositHype.d.ts +2 -1
- package/dist/cjs/anyspend/react/components/AnyspendDepositHype.js +2 -2
- package/dist/cjs/anyspend/react/components/AnyspendSignatureMint.d.ts +2 -1
- package/dist/cjs/anyspend/react/components/AnyspendSignatureMint.js +2 -2
- package/dist/cjs/anyspend/react/components/checkout/AnySpendCheckout.d.ts +3 -1
- package/dist/cjs/anyspend/react/components/checkout/AnySpendCheckout.js +2 -2
- package/dist/cjs/anyspend/react/components/checkout/AnySpendCheckoutTrigger.d.ts +3 -1
- package/dist/cjs/anyspend/react/components/checkout/AnySpendCheckoutTrigger.js +2 -2
- package/dist/cjs/anyspend/react/components/checkout/CheckoutPaymentPanel.d.ts +3 -1
- package/dist/cjs/anyspend/react/components/checkout/CheckoutPaymentPanel.js +13 -3
- package/dist/cjs/anyspend/react/hooks/useCreateDepositFirstOrder.d.ts +3 -3
- package/dist/cjs/anyspend/utils/chain.d.ts +39 -1
- package/dist/cjs/anyspend/utils/chain.js +23 -2
- package/dist/cjs/anyspend/utils/token.d.ts +2 -0
- package/dist/cjs/anyspend/utils/token.js +15 -1
- package/dist/cjs/app.shared.d.ts +9 -1
- package/dist/cjs/app.shared.js +19 -0
- package/dist/cjs/global-account/app.native.d.ts +1 -1
- package/dist/cjs/global-account/better-auth-client.d.ts +3314 -36
- package/dist/cjs/global-account/better-auth-client.js +28 -3
- package/dist/cjs/global-account/bsmnt.d.ts +2 -2
- package/dist/cjs/global-account/bsmnt.native.d.ts +1 -1
- package/dist/cjs/global-account/client-manager.d.ts +7 -5
- package/dist/cjs/global-account/client-manager.js +19 -4
- package/dist/cjs/global-account/react/components/AvatarEditor/AvatarEditor.js +6 -11
- package/dist/cjs/global-account/react/components/B3Provider/B3ConfigProvider.d.ts +1 -5
- package/dist/cjs/global-account/react/components/B3Provider/B3ConfigProvider.js +1 -2
- package/dist/cjs/global-account/react/components/B3Provider/B3Provider.d.ts +8 -13
- package/dist/cjs/global-account/react/components/B3Provider/B3Provider.js +24 -3
- package/dist/cjs/global-account/react/components/B3Provider/BetterAuthProvider.js +48 -8
- package/dist/cjs/global-account/react/components/ManageAccount/SettingsProfileCard.js +1 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3Flow.js +1 -5
- package/dist/cjs/global-account/react/components/SignInWithB3/utils/signInUtils.d.ts +3 -2
- package/dist/cjs/global-account/react/components/SignInWithB3/utils/signInUtils.js +1 -3
- package/dist/cjs/global-account/react/components/index.d.ts +0 -2
- package/dist/cjs/global-account/react/components/index.js +3 -7
- package/dist/cjs/global-account/react/hooks/index.d.ts +0 -1
- package/dist/cjs/global-account/react/hooks/index.js +2 -4
- package/dist/cjs/global-account/react/hooks/useAuth.d.ts +3 -3
- package/dist/cjs/global-account/react/hooks/useAuthentication.d.ts +1 -1
- package/dist/cjs/global-account/react/hooks/useAuthentication.js +1 -1
- package/dist/cjs/global-account/react/hooks/useBetterAuth.d.ts +1656 -21
- package/dist/cjs/global-account/react/hooks/useBetterAuth.js +13 -14
- package/dist/cjs/global-account/react/hooks/useClient.d.ts +3 -3
- package/dist/cjs/global-account/react/hooks/useNativeBalance.js +2 -2
- package/dist/cjs/global-account/react/hooks/useSiwe.d.ts +1 -1
- package/dist/cjs/global-account/react/hooks/useSiwe.native.d.ts +1 -1
- package/dist/cjs/global-account/react/hooks/useTWAuth.d.ts +1 -1
- package/dist/cjs/global-account/react/hooks/useUnifiedChainSwitchAndExecute.js +20 -17
- package/dist/cjs/global-account/react/stores/useModalStore.d.ts +28 -0
- package/dist/cjs/global-account/types/b3-api.types.d.ts +5 -0
- package/dist/cjs/global-account/types/feature-flags.d.ts +5 -5
- package/dist/cjs/notifications/services/api.js +1 -0
- package/dist/cjs/shared/constants/chains/b3Chain.d.ts +6 -54
- package/dist/cjs/shared/constants/chains/b3Chain.js +5 -41
- package/dist/cjs/shared/constants/chains/supported.d.ts +1 -49
- package/dist/cjs/shared/constants/chains/supported.js +8 -36
- package/dist/cjs/shared/utils/chain-transformers.d.ts +4 -4
- package/dist/cjs/shared/utils/chain-transformers.js +38 -37
- package/dist/cjs/shared/utils/thirdweb-insights.js +2 -2
- package/dist/cjs/shared/utils/upload.d.ts +9 -0
- package/dist/cjs/shared/utils/upload.js +34 -0
- package/dist/esm/anyspend/constants/rpc.d.ts +2 -1
- package/dist/esm/anyspend/constants/rpc.js +3 -1
- package/dist/esm/anyspend/react/components/AnySpendBondKit.d.ts +1 -1
- package/dist/esm/anyspend/react/components/AnySpendBondKit.js +2 -2
- package/dist/esm/anyspend/react/components/AnySpendBuySpin.d.ts +2 -1
- package/dist/esm/anyspend/react/components/AnySpendBuySpin.js +2 -2
- package/dist/esm/anyspend/react/components/AnySpendCustomExactIn.d.ts +2 -0
- package/dist/esm/anyspend/react/components/AnySpendCustomExactIn.js +21 -14
- package/dist/esm/anyspend/react/components/AnySpendDeposit.js +10 -4
- package/dist/esm/anyspend/react/components/AnySpendDepositUpside.d.ts +2 -1
- package/dist/esm/anyspend/react/components/AnySpendDepositUpside.js +2 -2
- package/dist/esm/anyspend/react/components/AnySpendStakeB3.d.ts +2 -1
- package/dist/esm/anyspend/react/components/AnySpendStakeB3.js +2 -2
- package/dist/esm/anyspend/react/components/AnySpendStakeB3ExactIn.d.ts +2 -1
- package/dist/esm/anyspend/react/components/AnySpendStakeB3ExactIn.js +2 -2
- package/dist/esm/anyspend/react/components/AnySpendStakeUpsideExactIn.d.ts +2 -1
- package/dist/esm/anyspend/react/components/AnySpendStakeUpsideExactIn.js +2 -2
- package/dist/esm/anyspend/react/components/AnySpendWorkflowTrigger.d.ts +3 -1
- package/dist/esm/anyspend/react/components/AnySpendWorkflowTrigger.js +2 -2
- package/dist/esm/anyspend/react/components/AnyspendDepositHype.d.ts +2 -1
- package/dist/esm/anyspend/react/components/AnyspendDepositHype.js +2 -2
- package/dist/esm/anyspend/react/components/AnyspendSignatureMint.d.ts +2 -1
- package/dist/esm/anyspend/react/components/AnyspendSignatureMint.js +2 -2
- package/dist/esm/anyspend/react/components/checkout/AnySpendCheckout.d.ts +3 -1
- package/dist/esm/anyspend/react/components/checkout/AnySpendCheckout.js +2 -2
- package/dist/esm/anyspend/react/components/checkout/AnySpendCheckoutTrigger.d.ts +3 -1
- package/dist/esm/anyspend/react/components/checkout/AnySpendCheckoutTrigger.js +2 -2
- package/dist/esm/anyspend/react/components/checkout/CheckoutPaymentPanel.d.ts +3 -1
- package/dist/esm/anyspend/react/components/checkout/CheckoutPaymentPanel.js +14 -4
- package/dist/esm/anyspend/react/hooks/useCreateDepositFirstOrder.d.ts +3 -3
- package/dist/esm/anyspend/utils/chain.d.ts +39 -1
- package/dist/esm/anyspend/utils/chain.js +24 -3
- package/dist/esm/anyspend/utils/token.d.ts +2 -0
- package/dist/esm/anyspend/utils/token.js +13 -0
- package/dist/esm/app.shared.d.ts +9 -1
- package/dist/esm/app.shared.js +17 -0
- package/dist/esm/global-account/app.native.d.ts +1 -1
- package/dist/esm/global-account/better-auth-client.d.ts +3314 -36
- package/dist/esm/global-account/better-auth-client.js +27 -4
- package/dist/esm/global-account/bsmnt.d.ts +2 -2
- package/dist/esm/global-account/bsmnt.native.d.ts +1 -1
- package/dist/esm/global-account/client-manager.d.ts +7 -5
- package/dist/esm/global-account/client-manager.js +19 -5
- package/dist/esm/global-account/react/components/AvatarEditor/AvatarEditor.js +6 -11
- package/dist/esm/global-account/react/components/B3Provider/B3ConfigProvider.d.ts +1 -5
- package/dist/esm/global-account/react/components/B3Provider/B3ConfigProvider.js +1 -2
- package/dist/esm/global-account/react/components/B3Provider/B3Provider.d.ts +8 -13
- package/dist/esm/global-account/react/components/B3Provider/B3Provider.js +25 -4
- package/dist/esm/global-account/react/components/B3Provider/BetterAuthProvider.js +48 -8
- package/dist/esm/global-account/react/components/ManageAccount/SettingsProfileCard.js +1 -1
- package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3Flow.js +1 -5
- package/dist/esm/global-account/react/components/SignInWithB3/utils/signInUtils.d.ts +3 -2
- package/dist/esm/global-account/react/components/SignInWithB3/utils/signInUtils.js +1 -3
- package/dist/esm/global-account/react/components/index.d.ts +0 -2
- package/dist/esm/global-account/react/components/index.js +0 -2
- package/dist/esm/global-account/react/hooks/index.d.ts +0 -1
- package/dist/esm/global-account/react/hooks/index.js +0 -1
- package/dist/esm/global-account/react/hooks/useAuth.d.ts +3 -3
- package/dist/esm/global-account/react/hooks/useAuthentication.d.ts +1 -1
- package/dist/esm/global-account/react/hooks/useAuthentication.js +1 -1
- package/dist/esm/global-account/react/hooks/useBetterAuth.d.ts +1656 -21
- package/dist/esm/global-account/react/hooks/useBetterAuth.js +13 -14
- package/dist/esm/global-account/react/hooks/useClient.d.ts +3 -3
- package/dist/esm/global-account/react/hooks/useNativeBalance.js +1 -1
- package/dist/esm/global-account/react/hooks/useSiwe.d.ts +1 -1
- package/dist/esm/global-account/react/hooks/useSiwe.native.d.ts +1 -1
- package/dist/esm/global-account/react/hooks/useTWAuth.d.ts +1 -1
- package/dist/esm/global-account/react/hooks/useUnifiedChainSwitchAndExecute.js +20 -17
- package/dist/esm/global-account/react/stores/useModalStore.d.ts +28 -0
- package/dist/esm/global-account/types/b3-api.types.d.ts +5 -0
- package/dist/esm/global-account/types/feature-flags.d.ts +5 -5
- package/dist/esm/notifications/services/api.js +1 -0
- package/dist/esm/shared/constants/chains/b3Chain.d.ts +6 -54
- package/dist/esm/shared/constants/chains/b3Chain.js +4 -38
- package/dist/esm/shared/constants/chains/supported.d.ts +1 -49
- package/dist/esm/shared/constants/chains/supported.js +7 -35
- package/dist/esm/shared/utils/chain-transformers.d.ts +4 -4
- package/dist/esm/shared/utils/chain-transformers.js +38 -37
- package/dist/esm/shared/utils/thirdweb-insights.js +2 -2
- package/dist/esm/shared/utils/upload.d.ts +9 -0
- package/dist/esm/shared/utils/upload.js +31 -0
- package/dist/styles/index.css +1 -1
- package/dist/types/anyspend/constants/rpc.d.ts +2 -1
- package/dist/types/anyspend/react/components/AnySpendBondKit.d.ts +1 -1
- package/dist/types/anyspend/react/components/AnySpendBuySpin.d.ts +2 -1
- package/dist/types/anyspend/react/components/AnySpendCustomExactIn.d.ts +2 -0
- package/dist/types/anyspend/react/components/AnySpendDepositUpside.d.ts +2 -1
- package/dist/types/anyspend/react/components/AnySpendStakeB3.d.ts +2 -1
- package/dist/types/anyspend/react/components/AnySpendStakeB3ExactIn.d.ts +2 -1
- package/dist/types/anyspend/react/components/AnySpendStakeUpsideExactIn.d.ts +2 -1
- package/dist/types/anyspend/react/components/AnySpendWorkflowTrigger.d.ts +3 -1
- package/dist/types/anyspend/react/components/AnyspendDepositHype.d.ts +2 -1
- package/dist/types/anyspend/react/components/AnyspendSignatureMint.d.ts +2 -1
- package/dist/types/anyspend/react/components/checkout/AnySpendCheckout.d.ts +3 -1
- package/dist/types/anyspend/react/components/checkout/AnySpendCheckoutTrigger.d.ts +3 -1
- package/dist/types/anyspend/react/components/checkout/CheckoutPaymentPanel.d.ts +3 -1
- package/dist/types/anyspend/react/hooks/useCreateDepositFirstOrder.d.ts +3 -3
- package/dist/types/anyspend/utils/chain.d.ts +39 -1
- package/dist/types/anyspend/utils/token.d.ts +2 -0
- package/dist/types/app.shared.d.ts +9 -1
- package/dist/types/global-account/app.native.d.ts +1 -1
- package/dist/types/global-account/better-auth-client.d.ts +3314 -36
- package/dist/types/global-account/bsmnt.d.ts +2 -2
- package/dist/types/global-account/bsmnt.native.d.ts +1 -1
- package/dist/types/global-account/client-manager.d.ts +7 -5
- package/dist/types/global-account/react/components/B3Provider/B3ConfigProvider.d.ts +1 -5
- package/dist/types/global-account/react/components/B3Provider/B3Provider.d.ts +8 -13
- package/dist/types/global-account/react/components/SignInWithB3/utils/signInUtils.d.ts +3 -2
- package/dist/types/global-account/react/components/index.d.ts +0 -2
- package/dist/types/global-account/react/hooks/index.d.ts +0 -1
- package/dist/types/global-account/react/hooks/useAuth.d.ts +3 -3
- package/dist/types/global-account/react/hooks/useAuthentication.d.ts +1 -1
- package/dist/types/global-account/react/hooks/useBetterAuth.d.ts +1656 -21
- package/dist/types/global-account/react/hooks/useClient.d.ts +3 -3
- package/dist/types/global-account/react/hooks/useSiwe.d.ts +1 -1
- package/dist/types/global-account/react/hooks/useSiwe.native.d.ts +1 -1
- package/dist/types/global-account/react/hooks/useTWAuth.d.ts +1 -1
- package/dist/types/global-account/react/stores/useModalStore.d.ts +28 -0
- package/dist/types/global-account/types/b3-api.types.d.ts +5 -0
- package/dist/types/global-account/types/feature-flags.d.ts +5 -5
- package/dist/types/shared/constants/chains/b3Chain.d.ts +6 -54
- package/dist/types/shared/constants/chains/supported.d.ts +1 -49
- package/dist/types/shared/utils/chain-transformers.d.ts +4 -4
- package/dist/types/shared/utils/upload.d.ts +9 -0
- package/node_modules/@b3/chain-registry/chains.json +1160 -0
- package/node_modules/@b3/chain-registry/package.json +14 -0
- package/node_modules/@b3/chain-registry/src/index.ts +169 -0
- package/node_modules/@b3/chain-registry/tsconfig.json +16 -0
- package/package.json +76 -28
- package/src/anyspend/constants/rpc.ts +3 -2
- package/src/anyspend/react/components/AnySpendBondKit.tsx +2 -0
- package/src/anyspend/react/components/AnySpendBuySpin.tsx +3 -0
- package/src/anyspend/react/components/AnySpendCustomExactIn.tsx +29 -14
- package/src/anyspend/react/components/AnySpendDeposit.tsx +13 -3
- package/src/anyspend/react/components/AnySpendDepositUpside.tsx +3 -0
- package/src/anyspend/react/components/AnySpendStakeB3.tsx +3 -0
- package/src/anyspend/react/components/AnySpendStakeB3ExactIn.tsx +3 -0
- package/src/anyspend/react/components/AnySpendStakeUpsideExactIn.tsx +3 -0
- package/src/anyspend/react/components/AnySpendWorkflowTrigger.tsx +4 -0
- package/src/anyspend/react/components/AnyspendDepositHype.tsx +3 -0
- package/src/anyspend/react/components/AnyspendSignatureMint.tsx +3 -0
- package/src/anyspend/react/components/checkout/AnySpendCheckout.tsx +4 -0
- package/src/anyspend/react/components/checkout/AnySpendCheckoutTrigger.tsx +4 -0
- package/src/anyspend/react/components/checkout/CheckoutPaymentPanel.tsx +97 -79
- package/src/anyspend/react/hooks/useAnyspendQuote.ts +13 -13
- package/src/anyspend/react/hooks/useCreateDepositFirstOrder.ts +4 -4
- package/src/anyspend/types/api_req_res.ts +10 -5
- package/src/anyspend/utils/chain.ts +26 -1
- package/src/anyspend/utils/token.ts +14 -0
- package/src/app.shared.ts +21 -1
- package/src/global-account/app.native.ts +5 -1
- package/src/global-account/better-auth-client.ts +30 -4
- package/src/global-account/bsmnt.native.ts +5 -1
- package/src/global-account/bsmnt.ts +9 -2
- package/src/global-account/client-manager.ts +41 -9
- package/src/global-account/react/components/AvatarEditor/AvatarEditor.tsx +6 -11
- package/src/global-account/react/components/B3Provider/B3ConfigProvider.tsx +0 -6
- package/src/global-account/react/components/B3Provider/B3Provider.tsx +49 -32
- package/src/global-account/react/components/B3Provider/BetterAuthProvider.tsx +53 -8
- package/src/global-account/react/components/ManageAccount/SettingsProfileCard.tsx +1 -1
- package/src/global-account/react/components/SignInWithB3/SignInWithB3Flow.tsx +1 -4
- package/src/global-account/react/components/SignInWithB3/utils/signInUtils.ts +2 -4
- package/src/global-account/react/components/index.ts +0 -2
- package/src/global-account/react/components/ui/button.tsx +1 -2
- package/src/global-account/react/hooks/index.ts +0 -1
- package/src/global-account/react/hooks/useAuth.ts +2 -2
- package/src/global-account/react/hooks/useAuthentication.ts +2 -2
- package/src/global-account/react/hooks/useBetterAuth.ts +14 -15
- package/src/global-account/react/hooks/useClient.ts +11 -2
- package/src/global-account/react/hooks/useNativeBalance.tsx +1 -1
- package/src/global-account/react/hooks/useSiwe.native.tsx +1 -1
- package/src/global-account/react/hooks/useSiwe.tsx +1 -1
- package/src/global-account/react/hooks/useTWAuth.tsx +1 -1
- package/src/global-account/react/hooks/useUnifiedChainSwitchAndExecute.ts +22 -20
- package/src/global-account/react/stores/useModalStore.ts +28 -0
- package/src/global-account/types/b3-api.types.ts +5 -1
- package/src/notifications/services/api.ts +1 -0
- package/src/shared/constants/chains/b3Chain.ts +4 -43
- package/src/shared/constants/chains/supported.ts +9 -48
- package/src/shared/utils/chain-transformers.ts +41 -39
- package/src/shared/utils/thirdweb-insights.ts +2 -2
- package/src/shared/utils/upload.ts +48 -0
- package/src/styles/index.css +27 -0
- package/dist/cjs/global-account/react/components/B3Provider/BetterAuthClientProvider.d.ts +0 -17
- package/dist/cjs/global-account/react/components/B3Provider/BetterAuthClientProvider.js +0 -31
- package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3Privy.d.ts +0 -10
- package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3Privy.js +0 -46
- package/dist/cjs/global-account/react/hooks/useHandleConnectWithPrivy.d.ts +0 -11
- package/dist/cjs/global-account/react/hooks/useHandleConnectWithPrivy.js +0 -70
- package/dist/cjs/global-account/types/chain-networks.d.ts +0 -44
- package/dist/cjs/global-account/types/chain-networks.js +0 -48
- package/dist/cjs/shared/generated/chain-networks.json +0 -684
- package/dist/esm/global-account/react/components/B3Provider/BetterAuthClientProvider.d.ts +0 -17
- package/dist/esm/global-account/react/components/B3Provider/BetterAuthClientProvider.js +0 -27
- package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3Privy.d.ts +0 -10
- package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3Privy.js +0 -43
- package/dist/esm/global-account/react/hooks/useHandleConnectWithPrivy.d.ts +0 -11
- package/dist/esm/global-account/react/hooks/useHandleConnectWithPrivy.js +0 -67
- package/dist/esm/global-account/types/chain-networks.d.ts +0 -44
- package/dist/esm/global-account/types/chain-networks.js +0 -45
- package/dist/esm/shared/generated/chain-networks.json +0 -684
- package/dist/types/global-account/react/components/B3Provider/BetterAuthClientProvider.d.ts +0 -17
- package/dist/types/global-account/react/components/SignInWithB3/SignInWithB3Privy.d.ts +0 -10
- package/dist/types/global-account/react/hooks/useHandleConnectWithPrivy.d.ts +0 -11
- package/dist/types/global-account/types/chain-networks.d.ts +0 -44
- package/src/global-account/react/components/B3Provider/BetterAuthClientProvider.tsx +0 -40
- package/src/global-account/react/components/SignInWithB3/SignInWithB3Privy.tsx +0 -63
- package/src/global-account/react/hooks/useHandleConnectWithPrivy.tsx +0 -79
- package/src/global-account/types/chain-networks.ts +0 -54
- package/src/shared/generated/chain-networks.json +0 -684
|
@@ -9,7 +9,7 @@ const app_1 = __importDefault(require("../../../global-account/app"));
|
|
|
9
9
|
const react_1 = require("../../../global-account/react");
|
|
10
10
|
const debug_1 = require("../../../shared/utils/debug");
|
|
11
11
|
const react_2 = require("react");
|
|
12
|
-
const
|
|
12
|
+
const better_auth_client_1 = require("../../better-auth-client");
|
|
13
13
|
const useUserQuery_1 = require("./useUserQuery");
|
|
14
14
|
const debug = (0, debug_1.debugB3React)("useBetterAuth");
|
|
15
15
|
/** Thrown when email verification is required before the user can sign in. */
|
|
@@ -30,7 +30,6 @@ exports.EmailVerificationRequiredError = EmailVerificationRequiredError;
|
|
|
30
30
|
*/
|
|
31
31
|
function useBetterAuth() {
|
|
32
32
|
const { partnerId } = (0, react_1.useB3Config)();
|
|
33
|
-
const betterAuthClient = (0, BetterAuthClientProvider_1.useBetterAuthClient)();
|
|
34
33
|
const { setUser } = (0, useUserQuery_1.useUserQuery)();
|
|
35
34
|
const setIsAuthenticated = (0, react_1.useAuthStore)(state => state.setIsAuthenticated);
|
|
36
35
|
const setIsAuthenticating = (0, react_1.useAuthStore)(state => state.setIsAuthenticating);
|
|
@@ -58,7 +57,7 @@ function useBetterAuth() {
|
|
|
58
57
|
setHasStartedConnecting(true);
|
|
59
58
|
setIsAuthenticating(true);
|
|
60
59
|
try {
|
|
61
|
-
const result = await
|
|
60
|
+
const result = await (0, better_auth_client_1.getBetterAuthClient)().signIn.email({ email, password });
|
|
62
61
|
if (result.error) {
|
|
63
62
|
throw new Error(result.error.message || "Sign in failed");
|
|
64
63
|
}
|
|
@@ -73,13 +72,13 @@ function useBetterAuth() {
|
|
|
73
72
|
debug("Sign in failed", error);
|
|
74
73
|
throw error;
|
|
75
74
|
}
|
|
76
|
-
}, [exchangeForFeathersJWT, setIsAuthenticating, setHasStartedConnecting
|
|
75
|
+
}, [exchangeForFeathersJWT, setIsAuthenticating, setHasStartedConnecting]);
|
|
77
76
|
const signUpWithEmail = (0, react_2.useCallback)(async (email, password, name, verifyCallbackURL) => {
|
|
78
77
|
debug("Signing up with email", { email, name });
|
|
79
78
|
setHasStartedConnecting(true);
|
|
80
79
|
setIsAuthenticating(true);
|
|
81
80
|
try {
|
|
82
|
-
const result = await
|
|
81
|
+
const result = await (0, better_auth_client_1.getBetterAuthClient)().signUp.email({ email, password, name });
|
|
83
82
|
if (result.error) {
|
|
84
83
|
throw new Error(result.error.message || "Sign up failed");
|
|
85
84
|
}
|
|
@@ -88,7 +87,7 @@ function useBetterAuth() {
|
|
|
88
87
|
// requireEmailVerification is enabled — send verification email with
|
|
89
88
|
// a callbackURL Better Auth redirects to after server-side verify.
|
|
90
89
|
// Pass verifyCallbackURL to land on a dedicated confirmation page.
|
|
91
|
-
await
|
|
90
|
+
await (0, better_auth_client_1.getBetterAuthClient)().sendVerificationEmail({
|
|
92
91
|
email,
|
|
93
92
|
callbackURL: verifyCallbackURL || `${window.location.origin}?authStrategy=better-auth`,
|
|
94
93
|
});
|
|
@@ -101,13 +100,13 @@ function useBetterAuth() {
|
|
|
101
100
|
debug("Sign up failed", error);
|
|
102
101
|
throw error;
|
|
103
102
|
}
|
|
104
|
-
}, [exchangeForFeathersJWT, setIsAuthenticating, setHasStartedConnecting
|
|
103
|
+
}, [exchangeForFeathersJWT, setIsAuthenticating, setHasStartedConnecting]);
|
|
105
104
|
const signInWithSocial = (0, react_2.useCallback)(async (provider) => {
|
|
106
105
|
debug("Signing in with social provider", { provider });
|
|
107
106
|
setHasStartedConnecting(true);
|
|
108
107
|
setIsAuthenticating(true);
|
|
109
108
|
try {
|
|
110
|
-
const result = await
|
|
109
|
+
const result = await (0, better_auth_client_1.getBetterAuthClient)().signIn.social({
|
|
111
110
|
provider,
|
|
112
111
|
callbackURL: window.location.href,
|
|
113
112
|
});
|
|
@@ -122,10 +121,10 @@ function useBetterAuth() {
|
|
|
122
121
|
debug("Social sign in failed", error);
|
|
123
122
|
throw error;
|
|
124
123
|
}
|
|
125
|
-
}, [setIsAuthenticating, setHasStartedConnecting
|
|
124
|
+
}, [setIsAuthenticating, setHasStartedConnecting]);
|
|
126
125
|
const requestPasswordReset = (0, react_2.useCallback)(async (email, redirectTo) => {
|
|
127
126
|
debug("Requesting password reset", { email });
|
|
128
|
-
const result = await
|
|
127
|
+
const result = await (0, better_auth_client_1.getBetterAuthClient)().requestPasswordReset({
|
|
129
128
|
email,
|
|
130
129
|
redirectTo,
|
|
131
130
|
});
|
|
@@ -134,10 +133,10 @@ function useBetterAuth() {
|
|
|
134
133
|
}
|
|
135
134
|
debug("Password reset email sent");
|
|
136
135
|
return result;
|
|
137
|
-
}, [
|
|
136
|
+
}, []);
|
|
138
137
|
const resetPassword = (0, react_2.useCallback)(async (newPassword, token) => {
|
|
139
138
|
debug("Resetting password");
|
|
140
|
-
const result = await
|
|
139
|
+
const result = await (0, better_auth_client_1.getBetterAuthClient)().resetPassword({
|
|
141
140
|
newPassword,
|
|
142
141
|
token,
|
|
143
142
|
});
|
|
@@ -146,7 +145,7 @@ function useBetterAuth() {
|
|
|
146
145
|
}
|
|
147
146
|
debug("Password reset successful");
|
|
148
147
|
return result;
|
|
149
|
-
}, [
|
|
148
|
+
}, []);
|
|
150
149
|
return {
|
|
151
150
|
signInWithEmail,
|
|
152
151
|
signUpWithEmail,
|
|
@@ -154,6 +153,6 @@ function useBetterAuth() {
|
|
|
154
153
|
requestPasswordReset,
|
|
155
154
|
resetPassword,
|
|
156
155
|
exchangeForFeathersJWT,
|
|
157
|
-
betterAuthClient,
|
|
156
|
+
betterAuthClient: (0, better_auth_client_1.getBetterAuthClient)(),
|
|
158
157
|
};
|
|
159
158
|
}
|
|
@@ -7,10 +7,10 @@ export declare function useClient(): {
|
|
|
7
7
|
getCurrentClient: () => import("@b3dotfun/b3-api").ClientApplication;
|
|
8
8
|
getClientByType: (type: ClientType) => import("@b3dotfun/b3-api").ClientApplication;
|
|
9
9
|
switchClientType: (type: ClientType) => void;
|
|
10
|
-
authenticateWithType: (type: ClientType, accessToken: string, identityToken: string, params?: Record<string, any>) => Promise<
|
|
10
|
+
authenticateWithType: (type: ClientType, accessToken: string, identityToken: string, params?: Record<string, any>) => Promise<Record<string, any> | null>;
|
|
11
11
|
authenticateWithBoth: (accessToken: string, identityToken: string, params?: Record<string, any>) => Promise<{
|
|
12
|
-
socket:
|
|
13
|
-
rest:
|
|
12
|
+
socket: Record<string, any> | null;
|
|
13
|
+
rest: Record<string, any> | null;
|
|
14
14
|
success: boolean;
|
|
15
15
|
}>;
|
|
16
16
|
};
|
|
@@ -4,7 +4,7 @@ exports.useNativeBalance = useNativeBalance;
|
|
|
4
4
|
exports.useNativeBalanceFromRPC = useNativeBalanceFromRPC;
|
|
5
5
|
const react_1 = require("../../../global-account/react");
|
|
6
6
|
const constants_1 = require("../../../shared/constants");
|
|
7
|
-
const
|
|
7
|
+
const b3Chain_1 = require("../../../shared/constants/chains/b3Chain");
|
|
8
8
|
const formatNumber_1 = require("../../../shared/utils/formatNumber");
|
|
9
9
|
const react_query_1 = require("@tanstack/react-query");
|
|
10
10
|
const viem_1 = require("viem");
|
|
@@ -90,7 +90,7 @@ function useNativeBalanceFromRPC(address, chainId) {
|
|
|
90
90
|
return 0;
|
|
91
91
|
try {
|
|
92
92
|
const publicClient = (0, viem_1.createPublicClient)({
|
|
93
|
-
chain: chainId === 8333 ?
|
|
93
|
+
chain: chainId === 8333 ? b3Chain_1.b3Mainnet : b3Chain_1.b3Testnet,
|
|
94
94
|
transport: (0, viem_1.http)(chainId === 8333 ? constants_1.PUBLIC_BASE_RPC_URL : undefined),
|
|
95
95
|
});
|
|
96
96
|
const balance = await publicClient.getBalance({
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Account } from "thirdweb/wallets";
|
|
2
2
|
export declare function useSiwe(): {
|
|
3
|
-
authenticate: (account: Account, partnerId: string) => Promise<
|
|
3
|
+
authenticate: (account: Account, partnerId: string) => Promise<Record<string, any>>;
|
|
4
4
|
};
|
|
@@ -1,4 +1,4 @@
|
|
|
1
1
|
import { Account } from "thirdweb/wallets";
|
|
2
2
|
export declare function useSiwe(): {
|
|
3
|
-
authenticate: (account: Account, partnerId: string) => Promise<
|
|
3
|
+
authenticate: (account: Account, partnerId: string) => Promise<Record<string, any>>;
|
|
4
4
|
};
|
|
@@ -3,5 +3,5 @@ import { Wallet } from "thirdweb/wallets";
|
|
|
3
3
|
* @deprecated Use useAuth() instead
|
|
4
4
|
*/
|
|
5
5
|
export declare function useTWAuth(): {
|
|
6
|
-
authenticate: (wallet: Wallet, partnerId: string) => Promise<
|
|
6
|
+
authenticate: (wallet: Wallet, partnerId: string) => Promise<Record<string, any>>;
|
|
7
7
|
};
|
|
@@ -14,18 +14,16 @@ const react_2 = require("react");
|
|
|
14
14
|
const thirdweb_2 = require("thirdweb");
|
|
15
15
|
const viem_1 = require("viem");
|
|
16
16
|
const wagmi_1 = require("wagmi");
|
|
17
|
+
const B3ConfigProvider_1 = require("../components/B3Provider/B3ConfigProvider");
|
|
17
18
|
const useB3Account_1 = require("../components/B3Provider/useB3Account");
|
|
18
19
|
const useAccountWallet_1 = require("./useAccountWallet");
|
|
19
|
-
const partnerId = String(process.env.PUBLIC_THIRDWEB_PARTNER_ID ||
|
|
20
|
-
process.env.NEXT_PUBLIC_THIRDWEB_PARTNER_ID ||
|
|
21
|
-
process.env.PUBLIC_GLOBAL_ACCOUNTS_PARTNER_ID ||
|
|
22
|
-
process.env.NEXT_PUBLIC_GLOBAL_ACCOUNTS_PARTNER_ID);
|
|
23
|
-
(0, invariant_1.default)(partnerId, "Partner ID is required");
|
|
24
20
|
function useUnifiedChainSwitchAndExecute() {
|
|
25
21
|
const { switchChainAsync } = (0, wagmi_1.useSwitchChain)();
|
|
26
22
|
const [isSwitchingOrExecuting, setIsSwitchingOrExecuting] = (0, react_2.useState)(false);
|
|
27
23
|
const { isActiveSmartWallet, isActiveEOAWallet, connectedEOAWallet } = (0, useAccountWallet_1.useAccountWallet)();
|
|
28
24
|
const aaAccount = (0, useB3Account_1.useB3Account)();
|
|
25
|
+
// From context, not process.env: partnerId is hashed into the server intent key and must match the ecosystem wallet.
|
|
26
|
+
const { partnerId } = (0, B3ConfigProvider_1.useB3Config)();
|
|
29
27
|
// Handle EOA wallet chain switch and execute transaction
|
|
30
28
|
const handleEOASwitchChainAndSendTransaction = (0, react_2.useCallback)(async (targetChainId, params) => {
|
|
31
29
|
if (!connectedEOAWallet) {
|
|
@@ -118,18 +116,23 @@ function useUnifiedChainSwitchAndExecute() {
|
|
|
118
116
|
data: params.data,
|
|
119
117
|
value: params.value,
|
|
120
118
|
});
|
|
121
|
-
//
|
|
122
|
-
|
|
123
|
-
|
|
124
|
-
|
|
125
|
-
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
|
|
129
|
-
|
|
119
|
+
// Pre-register an intent to authorize the signature server-side; skip if partnerId is missing.
|
|
120
|
+
if (partnerId) {
|
|
121
|
+
try {
|
|
122
|
+
await app_1.default.service("global-accounts-intents").create({
|
|
123
|
+
partnerId,
|
|
124
|
+
chainId: targetChainId,
|
|
125
|
+
to: params.to,
|
|
126
|
+
data: params.data || "0x",
|
|
127
|
+
value: params.value.toString(),
|
|
128
|
+
});
|
|
129
|
+
}
|
|
130
|
+
catch (err) {
|
|
131
|
+
console.error("Create global-accounts-intents error", err);
|
|
132
|
+
}
|
|
130
133
|
}
|
|
131
|
-
|
|
132
|
-
console.
|
|
134
|
+
else if (process.env.NODE_ENV !== "production") {
|
|
135
|
+
console.warn("useUnifiedChainSwitchAndExecute: missing partnerId from B3Config — skipping intent pre-authorization");
|
|
133
136
|
}
|
|
134
137
|
react_1.toast.info("Sending transaction…");
|
|
135
138
|
const start = performance.now();
|
|
@@ -150,7 +153,7 @@ function useUnifiedChainSwitchAndExecute() {
|
|
|
150
153
|
finally {
|
|
151
154
|
setIsSwitchingOrExecuting(false);
|
|
152
155
|
}
|
|
153
|
-
}, [aaAccount]);
|
|
156
|
+
}, [aaAccount, partnerId]);
|
|
154
157
|
// Unified switch chain and execute function
|
|
155
158
|
const switchChainAndExecute = (0, react_2.useCallback)(async (targetChainId, params) => {
|
|
156
159
|
// Check which wallet type is active
|
|
@@ -135,6 +135,8 @@ export interface AnySpendModalProps extends BaseModalProps {
|
|
|
135
135
|
disableUrlParamManagement?: boolean;
|
|
136
136
|
/** Staging environment support */
|
|
137
137
|
isStaging?: boolean;
|
|
138
|
+
/** Whether to show the "Pay with Fiat" tab. Defaults to true. When false, the fiat tab is hidden and activeTab is forced to "crypto". */
|
|
139
|
+
showFiatOption?: boolean;
|
|
138
140
|
}
|
|
139
141
|
/**
|
|
140
142
|
* Props for the AnySpend NFT modal
|
|
@@ -151,6 +153,8 @@ export interface AnySpendNftProps extends BaseModalProps {
|
|
|
151
153
|
onSuccess?: (txHash?: string) => void;
|
|
152
154
|
/** Client-provided reference ID for tracking orders */
|
|
153
155
|
clientReferenceId?: string;
|
|
156
|
+
/** Whether to show fiat payment option. Defaults to true. */
|
|
157
|
+
showFiatOption?: boolean;
|
|
154
158
|
}
|
|
155
159
|
/**
|
|
156
160
|
* Props for the AnySpend tournament modal
|
|
@@ -224,6 +228,8 @@ export interface AnySpendStakeB3Props extends BaseModalProps {
|
|
|
224
228
|
stakeAmount?: string;
|
|
225
229
|
/** Callback function called when the stake is successful */
|
|
226
230
|
onSuccess?: () => void;
|
|
231
|
+
/** Whether to show fiat payment option. Defaults to true. */
|
|
232
|
+
showFiatOption?: boolean;
|
|
227
233
|
}
|
|
228
234
|
/**
|
|
229
235
|
* Props for the AnySpend Stake B3 (Custom Exact In) modal
|
|
@@ -238,6 +244,8 @@ export interface AnySpendStakeB3ExactInProps extends BaseModalProps {
|
|
|
238
244
|
stakeAmount?: string;
|
|
239
245
|
/** Callback function called when the stake is successful */
|
|
240
246
|
onSuccess?: () => void;
|
|
247
|
+
/** Whether to show fiat payment option. Defaults to true. */
|
|
248
|
+
showFiatOption?: boolean;
|
|
241
249
|
}
|
|
242
250
|
/**
|
|
243
251
|
* Props for the AnySpend Stake Contract modal
|
|
@@ -258,6 +266,8 @@ export interface AnySpendStakeUpsideProps extends BaseModalProps {
|
|
|
258
266
|
activeTab?: "crypto" | "fiat";
|
|
259
267
|
/** Callback function called when the stake is successful */
|
|
260
268
|
onSuccess?: () => void;
|
|
269
|
+
/** Whether to show fiat payment option. Defaults to true. */
|
|
270
|
+
showFiatOption?: boolean;
|
|
261
271
|
}
|
|
262
272
|
/**
|
|
263
273
|
* Props for the AnySpend Stake Upside (Exact In) modal
|
|
@@ -274,6 +284,8 @@ export interface AnySpendStakeUpsideExactInProps extends BaseModalProps {
|
|
|
274
284
|
token: components["schemas"]["Token"];
|
|
275
285
|
/** Callback function called when the stake is successful */
|
|
276
286
|
onSuccess?: () => void;
|
|
287
|
+
/** Whether to show fiat payment option. Defaults to true. */
|
|
288
|
+
showFiatOption?: boolean;
|
|
277
289
|
}
|
|
278
290
|
/**
|
|
279
291
|
* Props for the AnySpend Deposit Upside (Exact In) modal
|
|
@@ -296,6 +308,8 @@ export interface AnySpendDepositUpsideProps extends BaseModalProps {
|
|
|
296
308
|
destinationTokenAmount?: string;
|
|
297
309
|
/** Callback function called when the deposit is successful */
|
|
298
310
|
onSuccess?: () => void;
|
|
311
|
+
/** Whether to show fiat payment option. Defaults to true. */
|
|
312
|
+
showFiatOption?: boolean;
|
|
299
313
|
}
|
|
300
314
|
/**
|
|
301
315
|
* Props for the AnySpend Buy Spin modal
|
|
@@ -314,6 +328,8 @@ export interface AnySpendBuySpinProps extends BaseModalProps {
|
|
|
314
328
|
onSuccess?: (txHash?: string) => void;
|
|
315
329
|
/** Prefill quantity of spins to purchase */
|
|
316
330
|
prefillQuantity?: string;
|
|
331
|
+
/** Whether to show fiat payment option. Defaults to true. */
|
|
332
|
+
showFiatOption?: boolean;
|
|
317
333
|
}
|
|
318
334
|
/**
|
|
319
335
|
* Props for the AnySpend Signature Mint modal
|
|
@@ -328,6 +344,8 @@ export interface AnySpendSignatureMintProps extends BaseModalProps {
|
|
|
328
344
|
imageUrl?: string;
|
|
329
345
|
/** Callback function called when minting is successful */
|
|
330
346
|
onSuccess?: (txHash?: string) => void;
|
|
347
|
+
/** Whether to show fiat payment option. Defaults to true. */
|
|
348
|
+
showFiatOption?: boolean;
|
|
331
349
|
}
|
|
332
350
|
/**
|
|
333
351
|
* Props for the AnySpend bondKit modal
|
|
@@ -352,6 +370,8 @@ export interface AnySpendBondKitProps extends BaseModalProps {
|
|
|
352
370
|
b3Amount?: string;
|
|
353
371
|
/** Callback function called when purchase is successful */
|
|
354
372
|
onSuccess?: (txHash?: string) => void;
|
|
373
|
+
/** Whether to show fiat payment option. Defaults to true. */
|
|
374
|
+
showFiatOption?: boolean;
|
|
355
375
|
}
|
|
356
376
|
export interface LinkAccountModalProps extends BaseModalProps {
|
|
357
377
|
type: "linkAccount";
|
|
@@ -398,6 +418,8 @@ export interface AnySpendDepositHypeProps extends BaseModalProps {
|
|
|
398
418
|
customRecipientLabel?: string;
|
|
399
419
|
/** Custom label for the return home button (overrides "Return to Home" / "Close") */
|
|
400
420
|
returnHomeLabel?: string;
|
|
421
|
+
/** Whether to show fiat payment option. Defaults to true. */
|
|
422
|
+
showFiatOption?: boolean;
|
|
401
423
|
}
|
|
402
424
|
export interface AvatarEditorModalProps extends BaseModalProps {
|
|
403
425
|
/** Modal type identifier */
|
|
@@ -483,6 +505,8 @@ export interface AnySpendCollectorClubPurchaseProps extends BaseModalProps {
|
|
|
483
505
|
isStaging?: boolean;
|
|
484
506
|
/** Optional discount code to apply to the purchase */
|
|
485
507
|
discountCode?: string;
|
|
508
|
+
/** Whether to show the "Pay with fiat" tab. Defaults to true. */
|
|
509
|
+
showFiatOption?: boolean;
|
|
486
510
|
}
|
|
487
511
|
/**
|
|
488
512
|
* Props for the AnySpend Deposit modal
|
|
@@ -543,6 +567,8 @@ export interface AnySpendCheckoutTriggerModalProps extends BaseModalProps {
|
|
|
543
567
|
returnUrl?: string;
|
|
544
568
|
/** Label for the return button */
|
|
545
569
|
returnLabel?: string;
|
|
570
|
+
/** Whether to show fiat payment options (card + coinbase). Defaults to true. */
|
|
571
|
+
showFiatOption?: boolean;
|
|
546
572
|
}
|
|
547
573
|
export interface AnySpendWorkflowTriggerModalProps extends BaseModalProps {
|
|
548
574
|
/** Modal type identifier */
|
|
@@ -571,6 +597,8 @@ export interface AnySpendWorkflowTriggerModalProps extends BaseModalProps {
|
|
|
571
597
|
actionLabel?: string;
|
|
572
598
|
/** Custom class names */
|
|
573
599
|
classes?: AnySpendAllClasses;
|
|
600
|
+
/** Whether to show fiat payment option. Defaults to true. */
|
|
601
|
+
showFiatOption?: boolean;
|
|
574
602
|
}
|
|
575
603
|
export interface AnySpendDepositModalProps extends BaseModalProps {
|
|
576
604
|
/** Modal type identifier */
|
|
@@ -3,9 +3,13 @@
|
|
|
3
3
|
*/
|
|
4
4
|
type ObjectId = string;
|
|
5
5
|
interface PartnerIds {
|
|
6
|
+
/** @deprecated Privy is no longer used for authentication. This field exists for legacy data compatibility only. */
|
|
6
7
|
privyId?: string;
|
|
7
8
|
thirdwebId?: string;
|
|
8
9
|
}
|
|
10
|
+
/**
|
|
11
|
+
* @deprecated Privy is no longer used for authentication. This type exists for legacy data compatibility only.
|
|
12
|
+
*/
|
|
9
13
|
interface PrivyLinkedAccount {
|
|
10
14
|
type: string;
|
|
11
15
|
address?: string;
|
|
@@ -45,6 +49,7 @@ interface User {
|
|
|
45
49
|
createdAt: number;
|
|
46
50
|
updatedAt: number;
|
|
47
51
|
partnerIds: PartnerIds;
|
|
52
|
+
/** @deprecated Privy is no longer used for authentication. This field exists for legacy data compatibility only. */
|
|
48
53
|
privyLinkedAccounts?: PrivyLinkedAccount[];
|
|
49
54
|
twProfiles?: TWProfile[];
|
|
50
55
|
}
|
|
@@ -1,8 +1,8 @@
|
|
|
1
1
|
import { Static } from "@feathersjs/typebox";
|
|
2
|
-
export declare const featureFlagsSchema: import("@
|
|
3
|
-
_id: import("@
|
|
4
|
-
id: import("@
|
|
5
|
-
enabled: import("@
|
|
6
|
-
description: import("@
|
|
2
|
+
export declare const featureFlagsSchema: import("@sinclair/typebox").TObject<{
|
|
3
|
+
_id: import("@sinclair/typebox").TUnion<[import("@sinclair/typebox").TString<string>, import("@sinclair/typebox").TObject<{}>]>;
|
|
4
|
+
id: import("@sinclair/typebox").TString<string>;
|
|
5
|
+
enabled: import("@sinclair/typebox").TBoolean;
|
|
6
|
+
description: import("@sinclair/typebox").TString<string>;
|
|
7
7
|
}>;
|
|
8
8
|
export type FeatureFlags = Static<typeof featureFlagsSchema>;
|
|
@@ -4,6 +4,7 @@ exports.notificationsAPI = void 0;
|
|
|
4
4
|
exports.setApiUrl = setApiUrl;
|
|
5
5
|
exports.getApiUrl = getApiUrl;
|
|
6
6
|
const auth_token_1 = require("../../shared/utils/auth-token");
|
|
7
|
+
// Hardcoded default; consumers override via `B3Provider.notificationsApiUrl`.
|
|
7
8
|
const DEFAULT_API_URL = "https://notifications.b3.fun";
|
|
8
9
|
let apiUrl = DEFAULT_API_URL;
|
|
9
10
|
function setApiUrl(url) {
|
|
@@ -1,4 +1,3 @@
|
|
|
1
|
-
import { ChainNetworks } from "../../../global-account/types/chain-networks";
|
|
2
1
|
import { Chain as ThirdwebChain } from "thirdweb";
|
|
3
2
|
import { Chain } from "viem";
|
|
4
3
|
export declare const nullAddress = "0x0000000000000000000000000000000000000000";
|
|
@@ -33,8 +32,8 @@ export declare const b3Mainnet: {
|
|
|
33
32
|
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
34
33
|
rpcUrls: {
|
|
35
34
|
readonly default: {
|
|
36
|
-
readonly http: readonly ["https://
|
|
37
|
-
readonly ws: readonly ["wss://
|
|
35
|
+
readonly http: readonly ["https://mainnet-rpc.b3.fun"];
|
|
36
|
+
readonly ws: readonly ["wss://mainnet-rpc.b3.fun/ws"];
|
|
38
37
|
};
|
|
39
38
|
};
|
|
40
39
|
sourceId?: number | undefined | undefined;
|
|
@@ -43,7 +42,7 @@ export declare const b3Mainnet: {
|
|
|
43
42
|
fees?: import("viem").ChainFees<undefined> | undefined;
|
|
44
43
|
formatters?: undefined;
|
|
45
44
|
serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable> | undefined;
|
|
46
|
-
readonly rpc: "https://
|
|
45
|
+
readonly rpc: "https://mainnet-rpc.b3.fun";
|
|
47
46
|
readonly icon: {
|
|
48
47
|
readonly url: "https://cdn.b3.fun/b3_logo.svg";
|
|
49
48
|
readonly width: 32;
|
|
@@ -51,55 +50,8 @@ export declare const b3Mainnet: {
|
|
|
51
50
|
readonly format: "svg";
|
|
52
51
|
};
|
|
53
52
|
};
|
|
54
|
-
export declare const getViemChainConfig: (config: ChainNetworks) => {
|
|
55
|
-
blockExplorers: {
|
|
56
|
-
readonly default: {
|
|
57
|
-
readonly name: string;
|
|
58
|
-
readonly url: string;
|
|
59
|
-
};
|
|
60
|
-
};
|
|
61
|
-
blockTime?: number | undefined | undefined;
|
|
62
|
-
contracts?: {
|
|
63
|
-
[x: string]: import("viem").ChainContract | {
|
|
64
|
-
[sourceId: number]: import("viem").ChainContract | undefined;
|
|
65
|
-
} | undefined;
|
|
66
|
-
ensRegistry?: import("viem").ChainContract | undefined;
|
|
67
|
-
ensUniversalResolver?: import("viem").ChainContract | undefined;
|
|
68
|
-
multicall3?: import("viem").ChainContract | undefined;
|
|
69
|
-
erc6492Verifier?: import("viem").ChainContract | undefined;
|
|
70
|
-
} | undefined;
|
|
71
|
-
ensTlds?: readonly string[] | undefined;
|
|
72
|
-
id: number;
|
|
73
|
-
name: string;
|
|
74
|
-
nativeCurrency: {
|
|
75
|
-
symbol: string;
|
|
76
|
-
name: string;
|
|
77
|
-
decimals: number;
|
|
78
|
-
};
|
|
79
|
-
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
80
|
-
rpcUrls: {
|
|
81
|
-
readonly default: {
|
|
82
|
-
readonly http: readonly [string];
|
|
83
|
-
readonly ws: readonly [string];
|
|
84
|
-
};
|
|
85
|
-
};
|
|
86
|
-
sourceId?: number | undefined | undefined;
|
|
87
|
-
testnet: true | undefined;
|
|
88
|
-
custom?: Record<string, unknown> | undefined;
|
|
89
|
-
fees?: import("viem").ChainFees<undefined> | undefined;
|
|
90
|
-
formatters?: undefined;
|
|
91
|
-
serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable> | undefined;
|
|
92
|
-
readonly rpc: string;
|
|
93
|
-
readonly icon: {
|
|
94
|
-
format: string;
|
|
95
|
-
url: string;
|
|
96
|
-
width: number;
|
|
97
|
-
height: number;
|
|
98
|
-
};
|
|
99
|
-
};
|
|
100
53
|
export declare const thirdwebB3Testnet: ThirdwebChain;
|
|
101
54
|
export declare const thirdwebB3Mainnet: ThirdwebChain;
|
|
102
|
-
export declare const getThirdwebChainConfig: (config: ChainNetworks) => ThirdwebChain;
|
|
103
55
|
export declare const b3Chain: Chain | {
|
|
104
56
|
blockExplorers: {
|
|
105
57
|
readonly default: {
|
|
@@ -128,8 +80,8 @@ export declare const b3Chain: Chain | {
|
|
|
128
80
|
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
129
81
|
rpcUrls: {
|
|
130
82
|
readonly default: {
|
|
131
|
-
readonly http: readonly ["https://
|
|
132
|
-
readonly ws: readonly ["wss://
|
|
83
|
+
readonly http: readonly ["https://mainnet-rpc.b3.fun"];
|
|
84
|
+
readonly ws: readonly ["wss://mainnet-rpc.b3.fun/ws"];
|
|
133
85
|
};
|
|
134
86
|
};
|
|
135
87
|
sourceId?: number | undefined | undefined;
|
|
@@ -138,7 +90,7 @@ export declare const b3Chain: Chain | {
|
|
|
138
90
|
fees?: import("viem").ChainFees<undefined> | undefined;
|
|
139
91
|
formatters?: undefined;
|
|
140
92
|
serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable> | undefined;
|
|
141
|
-
readonly rpc: "https://
|
|
93
|
+
readonly rpc: "https://mainnet-rpc.b3.fun";
|
|
142
94
|
readonly icon: {
|
|
143
95
|
readonly url: "https://cdn.b3.fun/b3_logo.svg";
|
|
144
96
|
readonly width: 32;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.b3Mask = exports.thirdwebB3Chain = exports.b3Chain = exports.
|
|
3
|
+
exports.b3Mask = exports.thirdwebB3Chain = exports.b3Chain = exports.thirdwebB3Mainnet = exports.thirdwebB3Testnet = exports.b3Mainnet = exports.b3Testnet = exports.viemToThirdwebChain = exports.avatarsNFTCollectionAddress = exports.nullAddress = void 0;
|
|
4
4
|
const thirdweb_1 = require("thirdweb");
|
|
5
5
|
const viem_1 = require("viem");
|
|
6
6
|
exports.nullAddress = "0x0000000000000000000000000000000000000000";
|
|
@@ -56,11 +56,11 @@ exports.b3Testnet = (0, viem_1.defineChain)({
|
|
|
56
56
|
exports.b3Mainnet = (0, viem_1.defineChain)({
|
|
57
57
|
id: 8333,
|
|
58
58
|
name: "B3",
|
|
59
|
-
rpc: "https://
|
|
59
|
+
rpc: "https://mainnet-rpc.b3.fun",
|
|
60
60
|
rpcUrls: {
|
|
61
61
|
default: {
|
|
62
|
-
http: ["https://
|
|
63
|
-
ws: ["wss://
|
|
62
|
+
http: ["https://mainnet-rpc.b3.fun"],
|
|
63
|
+
ws: ["wss://mainnet-rpc.b3.fun/ws"],
|
|
64
64
|
},
|
|
65
65
|
},
|
|
66
66
|
icon: {
|
|
@@ -81,27 +81,6 @@ exports.b3Mainnet = (0, viem_1.defineChain)({
|
|
|
81
81
|
decimals: 18,
|
|
82
82
|
},
|
|
83
83
|
});
|
|
84
|
-
const getViemChainConfig = (config) => (0, viem_1.defineChain)({
|
|
85
|
-
id: config.id,
|
|
86
|
-
name: config.name,
|
|
87
|
-
rpc: config.rpcUrls.default.http,
|
|
88
|
-
rpcUrls: {
|
|
89
|
-
default: {
|
|
90
|
-
http: [config.rpcUrls.default.http],
|
|
91
|
-
ws: [config.rpcUrls.default.ws],
|
|
92
|
-
},
|
|
93
|
-
},
|
|
94
|
-
icon: config.icon,
|
|
95
|
-
blockExplorers: {
|
|
96
|
-
default: {
|
|
97
|
-
name: config.blockExplorers.explorerTitle,
|
|
98
|
-
url: config.blockExplorers.default,
|
|
99
|
-
},
|
|
100
|
-
},
|
|
101
|
-
nativeCurrency: config.nativeCurrency,
|
|
102
|
-
testnet: config.testnet ? true : undefined,
|
|
103
|
-
});
|
|
104
|
-
exports.getViemChainConfig = getViemChainConfig;
|
|
105
84
|
exports.thirdwebB3Testnet = (0, thirdweb_1.defineChain)({
|
|
106
85
|
id: 1993,
|
|
107
86
|
name: "B3 Sepolia",
|
|
@@ -128,7 +107,7 @@ exports.thirdwebB3Testnet = (0, thirdweb_1.defineChain)({
|
|
|
128
107
|
exports.thirdwebB3Mainnet = (0, thirdweb_1.defineChain)({
|
|
129
108
|
id: 8333,
|
|
130
109
|
name: "B3",
|
|
131
|
-
rpc: "https://
|
|
110
|
+
rpc: "https://mainnet-rpc.b3.fun",
|
|
132
111
|
icon: {
|
|
133
112
|
url: "https://cdn.b3.fun/b3_logo.svg",
|
|
134
113
|
width: 32,
|
|
@@ -147,21 +126,6 @@ exports.thirdwebB3Mainnet = (0, thirdweb_1.defineChain)({
|
|
|
147
126
|
decimals: 18,
|
|
148
127
|
},
|
|
149
128
|
});
|
|
150
|
-
const getThirdwebChainConfig = (config) => (0, thirdweb_1.defineChain)({
|
|
151
|
-
id: config.id,
|
|
152
|
-
name: config.name,
|
|
153
|
-
rpc: config.rpcUrls.default.http,
|
|
154
|
-
icon: config.icon,
|
|
155
|
-
blockExplorers: [
|
|
156
|
-
{
|
|
157
|
-
name: config.blockExplorers.explorerTitle,
|
|
158
|
-
url: config.blockExplorers.default,
|
|
159
|
-
},
|
|
160
|
-
],
|
|
161
|
-
nativeCurrency: config.nativeCurrency,
|
|
162
|
-
testnet: config.testnet ? true : undefined,
|
|
163
|
-
});
|
|
164
|
-
exports.getThirdwebChainConfig = getThirdwebChainConfig;
|
|
165
129
|
exports.b3Chain = process.env.NEXT_PUBLIC_B3_CHAINID === "8333" ? exports.b3Mainnet : exports.b3Testnet;
|
|
166
130
|
exports.thirdwebB3Chain = process.env.NEXT_PUBLIC_B3_CHAINID === "8333" ? exports.thirdwebB3Mainnet : exports.thirdwebB3Testnet;
|
|
167
131
|
exports.b3Mask = "polygon( 2.209% 8.111%,2.211% 8.08%,2.212% 8.05%,2.212% 8.05%,2.238% 7.434%,2.295% 6.861%,2.382% 6.331%,2.498% 5.841%,2.644% 5.39%,2.817% 4.976%,3.018% 4.598%,3.247% 4.255%,3.502% 3.943%,3.783% 3.664%,3.783% 3.664%,4.107% 3.401%,4.464% 3.165%,4.857% 2.956%,5.285% 2.774%,5.749% 2.62%,6.249% 2.493%,6.786% 2.394%,7.361% 2.323%,7.974% 2.28%,8.625% 2.266%,8.642% 2.266%,8.66% 2.265%,8.66% 2.265%,16.702% 1.748%,24.751% 1.345%,32.805% 1.053%,40.864% 0.872%,48.924% 0.801%,56.984% 0.836%,65.044% 0.977%,73.101% 1.223%,81.153% 1.571%,89.2% 2.02%,89.2% 2.02%,89.394% 2.037%,89.59% 2.052%,89.789% 2.067%,89.989% 2.08%,90.19% 2.093%,90.393% 2.105%,90.596% 2.117%,90.8% 2.128%,91.004% 2.139%,91.207% 2.15%,91.207% 2.15%,91.357% 2.158%,91.506% 2.166%,91.655% 2.174%,91.803% 2.182%,91.95% 2.19%,92.097% 2.199%,92.242% 2.208%,92.386% 2.217%,92.529% 2.227%,92.67% 2.237%,92.67% 2.237%,93.011% 2.264%,93.347% 2.294%,93.677% 2.329%,94.002% 2.369%,94.321% 2.414%,94.634% 2.466%,94.94% 2.525%,95.239% 2.592%,95.53% 2.667%,95.813% 2.751%,95.813% 2.751%,96.087% 2.844%,96.349% 2.947%,96.6% 3.059%,96.839% 3.181%,97.066% 3.314%,97.282% 3.457%,97.485% 3.612%,97.676% 3.779%,97.855% 3.957%,98.021% 4.148%,98.021% 4.148%,98.172% 4.349%,98.313% 4.567%,98.444% 4.802%,98.563% 5.057%,98.67% 5.332%,98.764% 5.628%,98.845% 5.947%,98.912% 6.289%,98.964% 6.656%,99.001% 7.048%,99.002% 7.052%,99.002% 7.056%,99.002% 7.056%,99.127% 8.717%,99.245% 10.378%,99.355% 12.04%,99.46% 13.703%,99.56% 15.367%,99.654% 17.032%,99.745% 18.697%,99.832% 20.363%,99.917% 22.029%,100% 23.696%,100% 23.696%,100.219% 29.737%,100.382% 35.779%,100.489% 41.822%,100.539% 47.865%,100.534% 53.909%,100.472% 59.953%,100.353% 65.996%,100.179% 72.037%,99.947% 78.077%,99.659% 84.114%,99.659% 84.114%,99.655% 84.186%,99.651% 84.259%,99.646% 84.331%,99.642% 84.404%,99.637% 84.476%,99.633% 84.549%,99.629% 84.621%,99.624% 84.693%,99.615% 84.838%,99.615% 84.838%,99.565% 85.657%,99.515% 86.476%,99.464% 87.294%,99.412% 88.111%,99.36% 88.929%,99.306% 89.746%,99.251% 90.562%,99.194% 91.378%,99.135% 92.194%,99.074% 93.01%,99.072% 93.031%,99.071% 93.052%,99.071% 93.052%,99.049% 93.479%,99.012% 93.894%,98.959% 94.296%,98.89% 94.686%,98.805% 95.062%,98.702% 95.422%,98.582% 95.768%,98.444% 96.096%,98.288% 96.408%,98.113% 96.701%,98.113% 96.701%,97.92% 96.974%,97.703% 97.232%,97.461% 97.475%,97.194% 97.699%,96.898% 97.904%,96.574% 98.088%,96.219% 98.249%,95.833% 98.385%,95.414% 98.495%,94.961% 98.577%,94.961% 98.577%,92.494% 98.801%,90.025% 98.998%,87.553% 99.171%,85.079% 99.324%,82.604% 99.46%,80.126% 99.58%,77.648% 99.689%,75.169% 99.79%,72.689% 99.884%,70.208% 99.975%,69.528% 100%,69.528% 100%,69.528% 100%,69.528% 100%,69.528% 100%,69.528% 100%,69.528% 100%,69.527% 100%,69.527% 100%,69.527% 100%,69.527% 100%,63.379% 100.153%,57.23% 100.245%,51.081% 100.277%,44.931% 100.248%,38.783% 100.158%,32.635% 100.006%,26.489% 99.792%,20.346% 99.515%,14.205% 99.176%,8.068% 98.774%,8.058% 98.773%,8.048% 98.773%,8.048% 98.773%,7.501% 98.746%,6.992% 98.698%,6.518% 98.63%,6.079% 98.545%,5.673% 98.441%,5.299% 98.321%,4.956% 98.186%,4.641% 98.036%,4.354% 97.873%,4.094% 97.697%,4.094% 97.697%,3.862% 97.513%,3.65% 97.317%,3.457% 97.108%,3.281% 96.887%,3.123% 96.654%,2.98% 96.409%,2.852% 96.152%,2.737% 95.884%,2.635% 95.605%,2.545% 95.314%,2.545% 95.314%,2.463% 95.004%,2.391% 94.682%,2.329% 94.349%,2.276% 94.006%,2.23% 93.651%,2.192% 93.286%,2.159% 92.911%,2.131% 92.525%,2.106% 92.129%,2.085% 91.722%,2.085% 91.722%,2.081% 91.635%,2.077% 91.548%,2.073% 91.46%,2.069% 91.371%,2.066% 91.282%,2.062% 91.193%,2.058% 91.103%,2.054% 91.013%,2.051% 90.923%,2.047% 90.832%,2.047% 90.832%,2.033% 90.503%,2.019% 90.171%,2.003% 89.835%,1.986% 89.496%,1.966% 89.156%,1.944% 88.814%,1.918% 88.471%,1.889% 88.127%,1.855% 87.785%,1.817% 87.443%,1.817% 87.443%,1.594% 83.762%,1.403% 80.079%,1.241% 76.394%,1.104% 72.707%,0.99% 69.019%,0.894% 65.329%,0.813% 61.638%,0.744% 57.946%,0.682% 54.254%,0.626% 50.561%,0.626% 50.561%,0.637% 49.992%,0.648% 49.423%,0.659% 48.854%,0.67% 48.286%,0.681% 47.717%,0.692% 47.148%,0.703% 46.58%,0.713% 46.011%,0.724% 45.443%,0.734% 44.874%,0.734% 44.874%,0.782% 42.326%,0.831% 39.779%,0.884% 37.232%,0.941% 34.685%,1.006% 32.14%,1.078% 29.595%,1.161% 27.051%,1.255% 24.508%,1.363% 21.965%,1.485% 19.424%,1.485% 19.424%,1.493% 19.294%,1.5% 19.165%,1.508% 19.035%,1.515% 18.906%,1.523% 18.776%,1.531% 18.647%,1.538% 18.517%,1.546% 18.388%,1.553% 18.258%,1.561% 18.129%,1.561% 18.129%,1.619% 17.124%,1.678% 16.121%,1.737% 15.118%,1.798% 14.116%,1.86% 13.114%,1.925% 12.113%,1.991% 11.112%,2.06% 10.111%,2.133% 9.111%,2.209% 8.111% )";
|
|
@@ -1,48 +1,7 @@
|
|
|
1
1
|
import type { Chain as ThirdwebChain } from "thirdweb";
|
|
2
2
|
export declare const supportedChains: import("viem").Chain[];
|
|
3
3
|
export declare const supportedChainsTW: ThirdwebChain[];
|
|
4
|
-
export declare const supportedChainNetworks:
|
|
5
|
-
formatters?: Record<string, any> | undefined;
|
|
6
|
-
contracts?: Record<string, {
|
|
7
|
-
blockCreated?: number | undefined;
|
|
8
|
-
address: string;
|
|
9
|
-
}> | undefined;
|
|
10
|
-
sourceId?: number | undefined;
|
|
11
|
-
testnet?: boolean | undefined;
|
|
12
|
-
fees?: Record<string, any> | undefined;
|
|
13
|
-
color?: string | undefined;
|
|
14
|
-
testnetConfigID?: number | undefined;
|
|
15
|
-
badge?: string | undefined;
|
|
16
|
-
enabledFeatures?: string[] | undefined;
|
|
17
|
-
blockExplorers: {
|
|
18
|
-
default: string;
|
|
19
|
-
explorerTitle: string;
|
|
20
|
-
};
|
|
21
|
-
id: number;
|
|
22
|
-
name: string;
|
|
23
|
-
nativeCurrency: {
|
|
24
|
-
symbol: string;
|
|
25
|
-
name: string;
|
|
26
|
-
decimals: number;
|
|
27
|
-
};
|
|
28
|
-
rpcUrls: {
|
|
29
|
-
default: {
|
|
30
|
-
http: string;
|
|
31
|
-
ws: string;
|
|
32
|
-
};
|
|
33
|
-
backups: {
|
|
34
|
-
type: "http" | "ws";
|
|
35
|
-
uri: string;
|
|
36
|
-
}[];
|
|
37
|
-
};
|
|
38
|
-
_id: string | {};
|
|
39
|
-
icon: {
|
|
40
|
-
format: string;
|
|
41
|
-
url: string;
|
|
42
|
-
width: number;
|
|
43
|
-
height: number;
|
|
44
|
-
};
|
|
45
|
-
}[];
|
|
4
|
+
export declare const supportedChainNetworks: import("@b3/chain-registry").ChainDefinition[];
|
|
46
5
|
export declare const coingeckoChains: Record<number, {
|
|
47
6
|
coingecko_id: string;
|
|
48
7
|
name: string;
|
|
@@ -56,14 +15,7 @@ export declare function getCoingeckoChainInfo(chainId: number): {
|
|
|
56
15
|
export declare const b3MainnetThirdWeb: Readonly<import("thirdweb/chains").ChainOptions & {
|
|
57
16
|
rpc: string;
|
|
58
17
|
}>;
|
|
59
|
-
export declare const b3TestnetThirdWeb: Readonly<import("thirdweb/chains").ChainOptions & {
|
|
60
|
-
rpc: string;
|
|
61
|
-
}>;
|
|
62
18
|
export declare const b3Mainnet: import("viem").Chain;
|
|
63
|
-
export declare const b3Testnet: import("viem").Chain;
|
|
64
19
|
export declare const baseMainnet: import("viem").Chain;
|
|
65
|
-
/**
|
|
66
|
-
* Get a Thirdweb chain by chain ID from supportedChainsTW
|
|
67
|
-
*/
|
|
68
20
|
export declare function getThirdwebChain(chainId: number): ThirdwebChain;
|
|
69
21
|
export declare function getChainLogo(chainId: number): string;
|