@b3dotfun/sdk 0.1.70-alpha.1 → 0.1.70-alpha.10
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
|
@@ -1,51 +1,53 @@
|
|
|
1
|
-
import type {
|
|
1
|
+
import type { ChainDefinition } from "@b3/chain-registry";
|
|
2
2
|
import type { Chain as ThirdwebChain } from "thirdweb";
|
|
3
3
|
import { defineChain as defineThirdwebChain } from "thirdweb";
|
|
4
|
-
import { Chain } from "viem";
|
|
4
|
+
import type { Chain } from "viem";
|
|
5
5
|
|
|
6
|
-
|
|
6
|
+
// fallbackRpc is validated non-null at chain-registry module init for every
|
|
7
|
+
// anyspend EVM chain (see ANYSPEND_EVM_CHAINS in @b3/chain-registry). Callers
|
|
8
|
+
// outside the anyspend EVM set must ensure their own data shape.
|
|
9
|
+
|
|
10
|
+
// Derive icon format from URL extension. Thirdweb chain config carries an
|
|
11
|
+
// explicit `format` field; the old chain-networks.json had per-chain values
|
|
12
|
+
// (svg/png/etc.) but @b3/chain-registry only stores `logoUrl`. URL extension
|
|
13
|
+
// is reliable across our current chain set — 9/11 anyspend chains use .png
|
|
14
|
+
// (trustwallet/relay/coinmarketcap), 2 use .svg (Base, Plume from cdn.b3.fun).
|
|
15
|
+
function inferIconFormat(url: string): string {
|
|
16
|
+
const match = url.toLowerCase().match(/\.([a-z0-9]+)(?:\?|#|$)/);
|
|
17
|
+
const ext = match?.[1];
|
|
18
|
+
if (ext === "png" || ext === "jpg" || ext === "jpeg" || ext === "gif" || ext === "webp") return ext;
|
|
19
|
+
return "svg";
|
|
20
|
+
}
|
|
21
|
+
|
|
22
|
+
export function toViemChain(chain: ChainDefinition): Chain {
|
|
23
|
+
if (!chain.fallbackRpc) {
|
|
24
|
+
throw new Error(`toViemChain: chain ${chain.chainId} (${chain.key}) has no fallbackRpc`);
|
|
25
|
+
}
|
|
7
26
|
return {
|
|
8
|
-
id:
|
|
9
|
-
name:
|
|
10
|
-
nativeCurrency:
|
|
11
|
-
rpcUrls: {
|
|
12
|
-
default: {
|
|
13
|
-
http: [network.rpcUrls.default.http],
|
|
14
|
-
webSocket: network.rpcUrls.default.ws ? [network.rpcUrls.default.ws] : undefined,
|
|
15
|
-
},
|
|
16
|
-
},
|
|
27
|
+
id: chain.chainId,
|
|
28
|
+
name: chain.name,
|
|
29
|
+
nativeCurrency: chain.nativeCurrency,
|
|
30
|
+
rpcUrls: { default: { http: [chain.fallbackRpc] } },
|
|
17
31
|
blockExplorers: {
|
|
18
|
-
default: {
|
|
19
|
-
name: network.blockExplorers.explorerTitle,
|
|
20
|
-
url: network.blockExplorers.default,
|
|
21
|
-
},
|
|
32
|
+
default: { name: `${chain.name} Explorer`, url: chain.explorer },
|
|
22
33
|
},
|
|
23
|
-
|
|
24
|
-
testnet: network.testnet,
|
|
25
|
-
sourceId: network.sourceId,
|
|
26
|
-
formatters: network.formatters,
|
|
27
|
-
fees: network.fees,
|
|
34
|
+
testnet: chain.isTestnet,
|
|
28
35
|
};
|
|
29
36
|
}
|
|
30
37
|
|
|
31
|
-
export function toThirdwebChain(
|
|
38
|
+
export function toThirdwebChain(chain: ChainDefinition): ThirdwebChain {
|
|
39
|
+
if (!chain.fallbackRpc) {
|
|
40
|
+
throw new Error(`toThirdwebChain: chain ${chain.chainId} (${chain.key}) has no fallbackRpc`);
|
|
41
|
+
}
|
|
32
42
|
return defineThirdwebChain({
|
|
33
|
-
id:
|
|
34
|
-
name:
|
|
35
|
-
nativeCurrency:
|
|
36
|
-
rpc:
|
|
37
|
-
icon:
|
|
38
|
-
url:
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
},
|
|
43
|
-
blockExplorers: [
|
|
44
|
-
{
|
|
45
|
-
name: network.blockExplorers.explorerTitle,
|
|
46
|
-
url: network.blockExplorers.default,
|
|
47
|
-
},
|
|
48
|
-
],
|
|
49
|
-
testnet: network.testnet ? true : undefined,
|
|
43
|
+
id: chain.chainId,
|
|
44
|
+
name: chain.name,
|
|
45
|
+
nativeCurrency: chain.nativeCurrency,
|
|
46
|
+
rpc: chain.fallbackRpc,
|
|
47
|
+
icon: chain.logoUrl
|
|
48
|
+
? { url: chain.logoUrl, width: 32, height: 32, format: inferIconFormat(chain.logoUrl) }
|
|
49
|
+
: undefined,
|
|
50
|
+
blockExplorers: [{ name: `${chain.name} Explorer`, url: chain.explorer }],
|
|
51
|
+
testnet: chain.isTestnet ? true : undefined,
|
|
50
52
|
});
|
|
51
53
|
}
|
|
@@ -291,7 +291,7 @@ export async function getNativeTokenBalance(address: string, chainId: number): P
|
|
|
291
291
|
|
|
292
292
|
try {
|
|
293
293
|
// Find chain info from supported chains
|
|
294
|
-
const chainInfo = supportedChainNetworks.find(chain => chain.
|
|
294
|
+
const chainInfo = supportedChainNetworks.find(chain => chain.chainId === chainId);
|
|
295
295
|
|
|
296
296
|
// Create a chain object from the chainId
|
|
297
297
|
const chain = defineChain({
|
|
@@ -323,7 +323,7 @@ export async function getNativeTokenBalance(address: string, chainId: number): P
|
|
|
323
323
|
balance: balance.value.toString(),
|
|
324
324
|
metadata: {
|
|
325
325
|
logoURI:
|
|
326
|
-
chainInfo?.
|
|
326
|
+
chainInfo?.logoUrl ||
|
|
327
327
|
"https://raw.githubusercontent.com/trustwallet/assets/master/blockchains/ethereum/info/logo.png",
|
|
328
328
|
},
|
|
329
329
|
// Add native token info in extra_metadata
|
|
@@ -0,0 +1,48 @@
|
|
|
1
|
+
const DEFAULT_UPLOADS_URL = "https://uploads.b3.fun";
|
|
2
|
+
|
|
3
|
+
const ALLOWED_TYPES = ["image/jpeg", "image/png", "image/gif", "image/webp"];
|
|
4
|
+
const MAX_FILE_SIZE = 5 * 1024 * 1024; // 5MB
|
|
5
|
+
|
|
6
|
+
interface UploadResponse {
|
|
7
|
+
success: boolean;
|
|
8
|
+
data?: { url: string; filename: string; size: number; contentType: string };
|
|
9
|
+
error?: string;
|
|
10
|
+
}
|
|
11
|
+
|
|
12
|
+
interface UploadOptions {
|
|
13
|
+
baseUrl?: string;
|
|
14
|
+
}
|
|
15
|
+
|
|
16
|
+
/**
|
|
17
|
+
* Upload a file to the B3 uploads service (Cloudflare R2).
|
|
18
|
+
* Returns the public URL of the uploaded asset.
|
|
19
|
+
*/
|
|
20
|
+
export async function uploadFile(file: File, options?: UploadOptions): Promise<string> {
|
|
21
|
+
if (!ALLOWED_TYPES.includes(file.type)) {
|
|
22
|
+
throw new Error(`Invalid file type. Allowed: ${ALLOWED_TYPES.join(", ")}`);
|
|
23
|
+
}
|
|
24
|
+
if (file.size > MAX_FILE_SIZE) {
|
|
25
|
+
throw new Error(`File too large. Maximum size: ${MAX_FILE_SIZE / 1024 / 1024}MB`);
|
|
26
|
+
}
|
|
27
|
+
|
|
28
|
+
const uploadsUrl = options?.baseUrl || DEFAULT_UPLOADS_URL;
|
|
29
|
+
const formData = new FormData();
|
|
30
|
+
formData.append("file", file);
|
|
31
|
+
|
|
32
|
+
const res = await fetch(`${uploadsUrl}/upload/image`, {
|
|
33
|
+
method: "POST",
|
|
34
|
+
body: formData,
|
|
35
|
+
});
|
|
36
|
+
|
|
37
|
+
if (!res.ok) {
|
|
38
|
+
const body: UploadResponse = await res.json().catch(() => ({ success: false, error: "Upload failed" }));
|
|
39
|
+
throw new Error(body.error || `Upload failed (${res.status})`);
|
|
40
|
+
}
|
|
41
|
+
|
|
42
|
+
const body: UploadResponse = await res.json().catch(() => ({ success: false, error: "Invalid response" }));
|
|
43
|
+
if (!body.success || !body.data) {
|
|
44
|
+
throw new Error(body.error || "Upload failed");
|
|
45
|
+
}
|
|
46
|
+
|
|
47
|
+
return body.data.url;
|
|
48
|
+
}
|
package/src/styles/index.css
CHANGED
|
@@ -321,6 +321,33 @@ html[data-theme="dark"] .b3-root,
|
|
|
321
321
|
padding: 0 !important;
|
|
322
322
|
}
|
|
323
323
|
|
|
324
|
+
/*
|
|
325
|
+
* Relay Kit's "Unverified Token" confirmation dialog (rendered by the Relay
|
|
326
|
+
* TokenSelector inside the AnySpend modal) portals to <body> with its overlay
|
|
327
|
+
* at inline `z-index: 10001` and its content at `z-index: 1000` (inside that
|
|
328
|
+
* overlay). The AnySpend / B3 modal that hosts the TokenSelector — and the
|
|
329
|
+
* TokenSelector's own token-list overlay — get stacked at z-indexes >= 10001
|
|
330
|
+
* by host apps (b3os-web bumps `.b3-modal` to 10001 and the Relay token-list
|
|
331
|
+
* overlay to 10003), so this confirmation dialog ends up *behind* the modal it
|
|
332
|
+
* was launched from and becomes invisible / unclickable.
|
|
333
|
+
*
|
|
334
|
+
* Relay exposes no z-index theming, so force the confirmation overlay (and
|
|
335
|
+
* therefore its content, which lives inside it) above the host stack. The
|
|
336
|
+
* highest known host z-index is 10003 (b3os-web's Relay token-list overlay),
|
|
337
|
+
* so 99999 is comfortably sufficient. The `z-index: 10001` inline value is
|
|
338
|
+
* unique to Relay's UnverifiedTokenModal — its other modals (token list, etc.)
|
|
339
|
+
* default to `z-index: 9999`.
|
|
340
|
+
*
|
|
341
|
+
* NOTE: this selector is intentionally prefixed with `body` so it is NOT
|
|
342
|
+
* scoped under `.b3-root` by postcss-prefix-selector (see postcss.config.js).
|
|
343
|
+
* Relay's modal portals to <body>, OUTSIDE the `.b3-root` subtree, so a
|
|
344
|
+
* `.b3-root`-scoped rule would never match it.
|
|
345
|
+
*/
|
|
346
|
+
body .relay-kit-reset[style*="z-index: 10001"],
|
|
347
|
+
body .relay-kit-reset[style*="z-index:10001"] {
|
|
348
|
+
z-index: 99999 !important;
|
|
349
|
+
}
|
|
350
|
+
|
|
324
351
|
.b3-modal-back-button:hover {
|
|
325
352
|
@apply border-none !text-black;
|
|
326
353
|
}
|
|
@@ -1,17 +0,0 @@
|
|
|
1
|
-
import { type B3BetterAuthClient } from "../../../better-auth-client";
|
|
2
|
-
/**
|
|
3
|
-
* Provides a Better Auth client instance to the subtree.
|
|
4
|
-
*
|
|
5
|
-
* When `apiUrl` is supplied, a custom client targeting that URL is created
|
|
6
|
-
* (e.g. `http://localhost:3031` for local development). Otherwise, the
|
|
7
|
-
* default singleton (which uses `B3_API_URL` / `NEXT_PUBLIC_B3_API`) is used.
|
|
8
|
-
*/
|
|
9
|
-
export declare function BetterAuthClientProvider({ children, apiUrl, }: {
|
|
10
|
-
children: React.ReactNode;
|
|
11
|
-
apiUrl?: string;
|
|
12
|
-
}): import("react/jsx-runtime").JSX.Element;
|
|
13
|
-
/**
|
|
14
|
-
* Returns the Better Auth client from the nearest `BetterAuthClientProvider`.
|
|
15
|
-
* Falls back to the default singleton if no provider is present.
|
|
16
|
-
*/
|
|
17
|
-
export declare function useBetterAuthClient(): B3BetterAuthClient;
|
|
@@ -1,31 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.BetterAuthClientProvider = BetterAuthClientProvider;
|
|
4
|
-
exports.useBetterAuthClient = useBetterAuthClient;
|
|
5
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
6
|
-
const react_1 = require("react");
|
|
7
|
-
const better_auth_client_1 = require("../../../better-auth-client");
|
|
8
|
-
const BetterAuthClientContext = (0, react_1.createContext)(better_auth_client_1.betterAuthClient);
|
|
9
|
-
/**
|
|
10
|
-
* Provides a Better Auth client instance to the subtree.
|
|
11
|
-
*
|
|
12
|
-
* When `apiUrl` is supplied, a custom client targeting that URL is created
|
|
13
|
-
* (e.g. `http://localhost:3031` for local development). Otherwise, the
|
|
14
|
-
* default singleton (which uses `B3_API_URL` / `NEXT_PUBLIC_B3_API`) is used.
|
|
15
|
-
*/
|
|
16
|
-
function BetterAuthClientProvider({ children, apiUrl, }) {
|
|
17
|
-
const client = (0, react_1.useMemo)(() => {
|
|
18
|
-
if (apiUrl) {
|
|
19
|
-
return (0, better_auth_client_1.createB3BetterAuthClient)(apiUrl);
|
|
20
|
-
}
|
|
21
|
-
return better_auth_client_1.betterAuthClient;
|
|
22
|
-
}, [apiUrl]);
|
|
23
|
-
return (0, jsx_runtime_1.jsx)(BetterAuthClientContext.Provider, { value: client, children: children });
|
|
24
|
-
}
|
|
25
|
-
/**
|
|
26
|
-
* Returns the Better Auth client from the nearest `BetterAuthClientProvider`.
|
|
27
|
-
* Falls back to the default singleton if no provider is present.
|
|
28
|
-
*/
|
|
29
|
-
function useBetterAuthClient() {
|
|
30
|
-
return (0, react_1.useContext)(BetterAuthClientContext);
|
|
31
|
-
}
|
|
@@ -1,10 +0,0 @@
|
|
|
1
|
-
import type { Chain } from "thirdweb";
|
|
2
|
-
import { Account } from "thirdweb/wallets";
|
|
3
|
-
interface SignInWithB3PrivyProps {
|
|
4
|
-
onError?: (error: Error) => Promise<void>;
|
|
5
|
-
onSuccess: (account: Account) => Promise<void>;
|
|
6
|
-
accessToken?: string;
|
|
7
|
-
chain: Chain;
|
|
8
|
-
}
|
|
9
|
-
export declare function SignInWithB3Privy({ onSuccess, onError, chain }: SignInWithB3PrivyProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
-
export {};
|
|
@@ -1,46 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.SignInWithB3Privy = SignInWithB3Privy;
|
|
4
|
-
const jsx_runtime_1 = require("react/jsx-runtime");
|
|
5
|
-
const react_1 = require("../../../../global-account/react");
|
|
6
|
-
const debug_1 = require("../../../../shared/utils/debug");
|
|
7
|
-
const react_2 = require("react");
|
|
8
|
-
const debug = (0, debug_1.debugB3React)("SignInWithB3Privy");
|
|
9
|
-
function SignInWithB3Privy({ onSuccess, onError, chain }) {
|
|
10
|
-
const { partnerId } = (0, react_1.useB3Config)();
|
|
11
|
-
const { isLoading, connectTw, fullToken } = (0, react_1.useHandleConnectWithPrivy)(chain, onSuccess);
|
|
12
|
-
const setIsAuthenticating = (0, react_1.useAuthStore)(state => state.setIsAuthenticating);
|
|
13
|
-
const setIsAuthenticated = (0, react_1.useAuthStore)(state => state.setIsAuthenticated);
|
|
14
|
-
const { logout } = (0, react_1.useAuthentication)(partnerId, { skipAutoConnect: true });
|
|
15
|
-
debug("@@SignInWithB3Privy", {
|
|
16
|
-
isLoading,
|
|
17
|
-
fullToken,
|
|
18
|
-
});
|
|
19
|
-
(0, react_2.useEffect)(() => {
|
|
20
|
-
async function autoConnect() {
|
|
21
|
-
try {
|
|
22
|
-
const connectResult = await connectTw();
|
|
23
|
-
const account = connectResult?.getAccount();
|
|
24
|
-
if (!account) {
|
|
25
|
-
setIsAuthenticated(false);
|
|
26
|
-
return;
|
|
27
|
-
}
|
|
28
|
-
await onSuccess(account);
|
|
29
|
-
setIsAuthenticated(true);
|
|
30
|
-
}
|
|
31
|
-
catch (error) {
|
|
32
|
-
console.error("Failed to connect:", error);
|
|
33
|
-
await onError?.(error);
|
|
34
|
-
await logout();
|
|
35
|
-
setIsAuthenticated(false);
|
|
36
|
-
}
|
|
37
|
-
finally {
|
|
38
|
-
debug("setIsAuthenticating:false:7");
|
|
39
|
-
setIsAuthenticating(false);
|
|
40
|
-
}
|
|
41
|
-
}
|
|
42
|
-
autoConnect();
|
|
43
|
-
}, [connectTw, onSuccess, onError, setIsAuthenticated, logout, setIsAuthenticating]);
|
|
44
|
-
// Currently we auto login, so we can show loading immediately and the onSuccess will proceed to the next modal
|
|
45
|
-
return ((0, jsx_runtime_1.jsx)("div", { className: "flex aspect-square items-center justify-center p-6", children: (0, jsx_runtime_1.jsx)(react_1.Loading, { variant: "white", size: "lg" }) }));
|
|
46
|
-
}
|
|
@@ -1,11 +0,0 @@
|
|
|
1
|
-
import { Chain } from "thirdweb";
|
|
2
|
-
import { Account } from "thirdweb/wallets";
|
|
3
|
-
/**
|
|
4
|
-
* This essentially wraps our useConnect hook to handle the Privy auth flow.
|
|
5
|
-
* Currently, this is for the basement-privy strategy
|
|
6
|
-
*/
|
|
7
|
-
export declare function useHandleConnectWithPrivy(chain?: Chain, onSuccess?: (account: Account) => void): {
|
|
8
|
-
connectTw: () => Promise<import("thirdweb/wallets").Wallet | null | undefined>;
|
|
9
|
-
isLoading: boolean;
|
|
10
|
-
fullToken: string | null;
|
|
11
|
-
};
|
|
@@ -1,70 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.useHandleConnectWithPrivy = useHandleConnectWithPrivy;
|
|
4
|
-
const react_1 = require("../../../global-account/react");
|
|
5
|
-
const debug_1 = require("../../../shared/utils/debug");
|
|
6
|
-
const react_auth_1 = require("@privy-io/react-auth");
|
|
7
|
-
const react_2 = require("react");
|
|
8
|
-
const debug = (0, debug_1.debugB3React)("@@b3:useHandleConnectWithPrivy");
|
|
9
|
-
/**
|
|
10
|
-
* This essentially wraps our useConnect hook to handle the Privy auth flow.
|
|
11
|
-
* Currently, this is for the basement-privy strategy
|
|
12
|
-
*/
|
|
13
|
-
function useHandleConnectWithPrivy(chain, onSuccess) {
|
|
14
|
-
const { partnerId } = (0, react_1.useB3Config)();
|
|
15
|
-
if (!chain) {
|
|
16
|
-
throw new Error("Chain is required");
|
|
17
|
-
}
|
|
18
|
-
const { connect } = (0, react_1.useConnect)(partnerId, chain);
|
|
19
|
-
const [isLoading, setIsLoading] = (0, react_2.useState)(true);
|
|
20
|
-
const isConnecting = (0, react_2.useRef)(false);
|
|
21
|
-
const { identityToken } = (0, react_auth_1.useIdentityToken)();
|
|
22
|
-
const { getAccessToken } = (0, react_auth_1.usePrivy)();
|
|
23
|
-
const [fullToken, setFullToken] = (0, react_2.useState)(null);
|
|
24
|
-
const connectTw = (0, react_2.useCallback)(async () => {
|
|
25
|
-
if (isConnecting.current) {
|
|
26
|
-
debug("@@connectTw:skipping:isConnecting", isConnecting.current);
|
|
27
|
-
return;
|
|
28
|
-
}
|
|
29
|
-
setIsLoading(true);
|
|
30
|
-
isConnecting.current = true;
|
|
31
|
-
// Form token
|
|
32
|
-
const accessToken = await getAccessToken();
|
|
33
|
-
const fullToken = `${accessToken}+${identityToken}`;
|
|
34
|
-
setFullToken(fullToken);
|
|
35
|
-
debug("@@connectTw:fullToken", fullToken);
|
|
36
|
-
if (!fullToken)
|
|
37
|
-
throw new Error("Token is not set");
|
|
38
|
-
// Connect to TW via privy
|
|
39
|
-
const wallet = await connect({
|
|
40
|
-
strategy: "auth_endpoint",
|
|
41
|
-
payload: JSON.stringify({
|
|
42
|
-
strategy: "basement",
|
|
43
|
-
accessToken: fullToken,
|
|
44
|
-
}),
|
|
45
|
-
});
|
|
46
|
-
debug("@@useHandleConnectWithPrivy:connect:return", wallet);
|
|
47
|
-
setIsLoading(false);
|
|
48
|
-
// Handle onsuccess & more
|
|
49
|
-
try {
|
|
50
|
-
debug("@@autoLogin:starting", fullToken);
|
|
51
|
-
const account = wallet?.getAccount();
|
|
52
|
-
if (!account) {
|
|
53
|
-
throw new Error("Failed to connect");
|
|
54
|
-
}
|
|
55
|
-
onSuccess?.(account);
|
|
56
|
-
if (!account) {
|
|
57
|
-
throw new Error("Failed to connect");
|
|
58
|
-
}
|
|
59
|
-
}
|
|
60
|
-
catch (error) {
|
|
61
|
-
console.error("@@Error signing in with Privy", error);
|
|
62
|
-
}
|
|
63
|
-
finally {
|
|
64
|
-
isConnecting.current = false;
|
|
65
|
-
setIsLoading(false);
|
|
66
|
-
}
|
|
67
|
-
return wallet;
|
|
68
|
-
}, [connect, getAccessToken, identityToken, onSuccess]);
|
|
69
|
-
return { connectTw, isLoading, fullToken };
|
|
70
|
-
}
|
|
@@ -1,44 +0,0 @@
|
|
|
1
|
-
import { Static } from "@feathersjs/typebox";
|
|
2
|
-
export declare const chainNetworksSchema: import("@feathersjs/typebox").TObject<{
|
|
3
|
-
_id: import("@feathersjs/typebox").TUnion<[import("@feathersjs/typebox").TString<string>, import("@feathersjs/typebox").TObject<{}>]>;
|
|
4
|
-
id: import("@feathersjs/typebox").TInteger;
|
|
5
|
-
name: import("@feathersjs/typebox").TString<string>;
|
|
6
|
-
rpcUrls: import("@feathersjs/typebox").TObject<{
|
|
7
|
-
default: import("@feathersjs/typebox").TObject<{
|
|
8
|
-
http: import("@feathersjs/typebox").TString<"uri">;
|
|
9
|
-
ws: import("@feathersjs/typebox").TString<"uri">;
|
|
10
|
-
}>;
|
|
11
|
-
backups: import("@feathersjs/typebox").TArray<import("@feathersjs/typebox").TObject<{
|
|
12
|
-
type: import("@feathersjs/typebox").TUnion<[import("@feathersjs/typebox").TLiteral<"http">, import("@feathersjs/typebox").TLiteral<"ws">]>;
|
|
13
|
-
uri: import("@feathersjs/typebox").TString<string>;
|
|
14
|
-
}>>;
|
|
15
|
-
}>;
|
|
16
|
-
icon: import("@feathersjs/typebox").TObject<{
|
|
17
|
-
url: import("@feathersjs/typebox").TString<"uri">;
|
|
18
|
-
width: import("@feathersjs/typebox").TInteger;
|
|
19
|
-
height: import("@feathersjs/typebox").TInteger;
|
|
20
|
-
format: import("@feathersjs/typebox").TString<string>;
|
|
21
|
-
}>;
|
|
22
|
-
blockExplorers: import("@feathersjs/typebox").TObject<{
|
|
23
|
-
explorerTitle: import("@feathersjs/typebox").TString<string>;
|
|
24
|
-
default: import("@feathersjs/typebox").TString<"uri">;
|
|
25
|
-
}>;
|
|
26
|
-
nativeCurrency: import("@feathersjs/typebox").TObject<{
|
|
27
|
-
name: import("@feathersjs/typebox").TString<string>;
|
|
28
|
-
symbol: import("@feathersjs/typebox").TString<string>;
|
|
29
|
-
decimals: import("@feathersjs/typebox").TInteger;
|
|
30
|
-
}>;
|
|
31
|
-
testnet: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TBoolean>;
|
|
32
|
-
testnetConfigID: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TInteger>;
|
|
33
|
-
sourceId: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TInteger>;
|
|
34
|
-
contracts: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TRecord<import("@feathersjs/typebox").TString<string>, import("@feathersjs/typebox").TObject<{
|
|
35
|
-
address: import("@feathersjs/typebox").TString<string>;
|
|
36
|
-
blockCreated: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TInteger>;
|
|
37
|
-
}>>>;
|
|
38
|
-
formatters: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TRecord<import("@feathersjs/typebox").TString<string>, import("@feathersjs/typebox").TAny>>;
|
|
39
|
-
fees: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TRecord<import("@feathersjs/typebox").TString<string>, import("@feathersjs/typebox").TAny>>;
|
|
40
|
-
badge: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TString<"uri">>;
|
|
41
|
-
color: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TString<string>>;
|
|
42
|
-
enabledFeatures: import("@feathersjs/typebox").TOptional<import("@feathersjs/typebox").TArray<import("@feathersjs/typebox").TString<string>>>;
|
|
43
|
-
}>;
|
|
44
|
-
export type ChainNetworks = Static<typeof chainNetworksSchema>;
|
|
@@ -1,48 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
|
-
exports.chainNetworksSchema = void 0;
|
|
4
|
-
const typebox_1 = require("@feathersjs/typebox");
|
|
5
|
-
const ChainContractSchema = typebox_1.Type.Object({
|
|
6
|
-
address: typebox_1.Type.String(),
|
|
7
|
-
blockCreated: typebox_1.Type.Optional(typebox_1.Type.Integer()),
|
|
8
|
-
});
|
|
9
|
-
exports.chainNetworksSchema = typebox_1.Type.Object({
|
|
10
|
-
_id: (0, typebox_1.ObjectIdSchema)(),
|
|
11
|
-
id: typebox_1.Type.Integer(),
|
|
12
|
-
name: typebox_1.Type.String(),
|
|
13
|
-
rpcUrls: typebox_1.Type.Object({
|
|
14
|
-
default: typebox_1.Type.Object({
|
|
15
|
-
http: typebox_1.Type.String({ format: "uri" }),
|
|
16
|
-
ws: typebox_1.Type.String({ format: "uri" }),
|
|
17
|
-
}),
|
|
18
|
-
backups: typebox_1.Type.Array(typebox_1.Type.Object({
|
|
19
|
-
type: typebox_1.Type.Union([typebox_1.Type.Literal("http"), typebox_1.Type.Literal("ws")]),
|
|
20
|
-
uri: typebox_1.Type.String(),
|
|
21
|
-
})),
|
|
22
|
-
}),
|
|
23
|
-
icon: typebox_1.Type.Object({
|
|
24
|
-
url: typebox_1.Type.String({ format: "uri" }),
|
|
25
|
-
width: typebox_1.Type.Integer(),
|
|
26
|
-
height: typebox_1.Type.Integer(),
|
|
27
|
-
format: typebox_1.Type.String(),
|
|
28
|
-
}),
|
|
29
|
-
blockExplorers: typebox_1.Type.Object({
|
|
30
|
-
explorerTitle: typebox_1.Type.String(),
|
|
31
|
-
default: typebox_1.Type.String({ format: "uri" }),
|
|
32
|
-
}),
|
|
33
|
-
nativeCurrency: typebox_1.Type.Object({
|
|
34
|
-
name: typebox_1.Type.String(),
|
|
35
|
-
symbol: typebox_1.Type.String(),
|
|
36
|
-
decimals: typebox_1.Type.Integer(),
|
|
37
|
-
}),
|
|
38
|
-
testnet: typebox_1.Type.Optional(typebox_1.Type.Boolean()),
|
|
39
|
-
testnetConfigID: typebox_1.Type.Optional(typebox_1.Type.Integer()),
|
|
40
|
-
// Additional required Viem fields that can't be derived
|
|
41
|
-
sourceId: typebox_1.Type.Optional(typebox_1.Type.Integer()),
|
|
42
|
-
contracts: typebox_1.Type.Optional(typebox_1.Type.Record(typebox_1.Type.String(), ChainContractSchema)),
|
|
43
|
-
formatters: typebox_1.Type.Optional(typebox_1.Type.Record(typebox_1.Type.String(), typebox_1.Type.Any())),
|
|
44
|
-
fees: typebox_1.Type.Optional(typebox_1.Type.Record(typebox_1.Type.String(), typebox_1.Type.Any())),
|
|
45
|
-
badge: typebox_1.Type.Optional(typebox_1.Type.String({ format: "uri" })),
|
|
46
|
-
color: typebox_1.Type.Optional(typebox_1.Type.String()),
|
|
47
|
-
enabledFeatures: typebox_1.Type.Optional(typebox_1.Type.Array(typebox_1.Type.String())),
|
|
48
|
-
}, { $id: "ChainNetworks", additionalProperties: false });
|