@b3dotfun/sdk 0.1.70-alpha.2 → 0.1.70-alpha.21
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/README.md +3 -3
- package/constants/chains/b3Chain.js +3 -1
- package/dist/cjs/anyspend/constants/rpc.d.ts +3 -1
- package/dist/cjs/anyspend/constants/rpc.js +6 -2
- package/dist/cjs/anyspend/react/components/AnySpend.d.ts +9 -1
- package/dist/cjs/anyspend/react/components/AnySpend.js +123 -46
- package/dist/cjs/anyspend/react/components/AnySpendCustomExactIn.js +8 -10
- package/dist/cjs/anyspend/react/components/AnySpendDeposit.d.ts +15 -3
- package/dist/cjs/anyspend/react/components/AnySpendDeposit.js +78 -25
- package/dist/cjs/anyspend/react/components/AnySpendStakeB3.js +32 -13
- package/dist/cjs/anyspend/react/components/AnySpendStakeB3ExactIn.js +32 -10
- package/dist/cjs/anyspend/react/components/QRDeposit.d.ts +22 -3
- package/dist/cjs/anyspend/react/components/QRDeposit.js +25 -16
- package/dist/cjs/anyspend/react/components/checkout/CryptoPayPanel.js +18 -11
- package/dist/cjs/anyspend/react/components/common/PureTransferView.d.ts +30 -0
- package/dist/cjs/anyspend/react/components/common/PureTransferView.js +64 -0
- package/dist/cjs/anyspend/react/components/common/TokenBalance.js +4 -5
- package/dist/cjs/anyspend/react/hooks/useCreateDepositFirstOrder.d.ts +3 -3
- package/dist/cjs/anyspend/react/hooks/useSigMint.d.ts +1 -1
- package/dist/cjs/anyspend/utils/address.d.ts +2 -1
- package/dist/cjs/anyspend/utils/address.js +12 -9
- package/dist/cjs/anyspend/utils/chain.d.ts +84 -1
- package/dist/cjs/anyspend/utils/chain.js +73 -3
- 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 +51 -4
- package/dist/cjs/global-account/react/components/AvatarEditor/AvatarEditor.js +6 -11
- package/dist/cjs/global-account/react/components/B3Provider/B3ConfigProvider.d.ts +11 -0
- package/dist/cjs/global-account/react/components/B3Provider/B3ConfigProvider.js +12 -0
- package/dist/cjs/global-account/react/components/B3Provider/B3Provider.d.ts +12 -2
- package/dist/cjs/global-account/react/components/B3Provider/B3Provider.js +25 -3
- package/dist/cjs/global-account/react/components/B3Provider/BetterAuthProvider.js +45 -4
- package/dist/cjs/global-account/react/components/B3Provider/RelayKitProviderWrapper.d.ts +1 -2
- package/dist/cjs/global-account/react/components/B3Provider/RelayKitProviderWrapper.js +11 -5
- package/dist/cjs/global-account/react/components/ManageAccount/ContentTokens.js +23 -15
- package/dist/cjs/global-account/react/components/ManageAccount/NFTContent.js +2 -2
- package/dist/cjs/global-account/react/components/ManageAccount/ProfileSection.js +8 -6
- package/dist/cjs/global-account/react/components/ManageAccount/SettingsProfileCard.js +1 -1
- package/dist/cjs/global-account/react/components/ManageAccount/TokenContent.js +17 -8
- package/dist/cjs/global-account/react/components/Send/Send.js +15 -11
- package/dist/cjs/global-account/react/components/SignInWithB3/BetterAuthSignIn.js +3 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/SignInWithB3Flow.js +1 -5
- package/dist/cjs/global-account/react/components/SignInWithB3/components/AuthButton.js +2 -1
- package/dist/cjs/global-account/react/components/SignInWithB3/steps/LoginStepBetterAuth.js +1 -0
- 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 +3 -3
- package/dist/cjs/global-account/react/components/index.d.ts +1 -1
- package/dist/cjs/global-account/react/components/index.js +3 -3
- package/dist/cjs/global-account/react/hooks/index.d.ts +2 -3
- package/dist/cjs/global-account/react/hooks/index.js +7 -10
- package/dist/cjs/global-account/react/hooks/useAuth.d.ts +5 -4
- package/dist/cjs/global-account/react/hooks/useAuth.js +1 -0
- package/dist/cjs/global-account/react/hooks/useAuthentication.d.ts +3 -2
- package/dist/cjs/global-account/react/hooks/useAuthentication.js +2 -1
- package/dist/cjs/global-account/react/hooks/useBetterAuth.d.ts +1657 -22
- package/dist/cjs/global-account/react/hooks/useBetterAuth.js +7 -7
- package/dist/cjs/global-account/react/hooks/useClient.d.ts +3 -3
- package/dist/cjs/global-account/react/hooks/useFirstEOA.d.ts +4 -7666
- package/dist/cjs/global-account/react/hooks/useFirstEOA.js +1 -0
- package/dist/cjs/global-account/react/hooks/useNativeBalance.js +2 -2
- package/dist/cjs/global-account/react/hooks/usePortfolioBalance.d.ts +15 -0
- package/dist/cjs/global-account/react/hooks/usePortfolioBalance.js +76 -0
- package/dist/cjs/global-account/react/hooks/usePortfolioCollectibles.d.ts +12 -0
- package/dist/cjs/global-account/react/hooks/usePortfolioCollectibles.js +178 -0
- 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.d.ts +1 -0
- package/dist/cjs/global-account/react/hooks/useUnifiedChainSwitchAndExecute.js +37 -27
- package/dist/cjs/global-account/react/stores/useModalStore.d.ts +14 -2
- 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 +30 -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/constants/index.d.ts +4 -0
- 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/cjs/shared/utils/zerionPositions.d.ts +96 -0
- package/dist/cjs/shared/utils/zerionPositions.js +188 -0
- package/dist/esm/anyspend/constants/rpc.d.ts +3 -1
- package/dist/esm/anyspend/constants/rpc.js +5 -1
- package/dist/esm/anyspend/react/components/AnySpend.d.ts +9 -1
- package/dist/esm/anyspend/react/components/AnySpend.js +124 -47
- package/dist/esm/anyspend/react/components/AnySpendCustomExactIn.js +9 -11
- package/dist/esm/anyspend/react/components/AnySpendDeposit.d.ts +15 -3
- package/dist/esm/anyspend/react/components/AnySpendDeposit.js +80 -27
- package/dist/esm/anyspend/react/components/AnySpendStakeB3.js +33 -14
- package/dist/esm/anyspend/react/components/AnySpendStakeB3ExactIn.js +33 -11
- package/dist/esm/anyspend/react/components/QRDeposit.d.ts +22 -3
- package/dist/esm/anyspend/react/components/QRDeposit.js +27 -18
- package/dist/esm/anyspend/react/components/checkout/CryptoPayPanel.js +21 -14
- package/dist/esm/anyspend/react/components/common/PureTransferView.d.ts +30 -0
- package/dist/esm/anyspend/react/components/common/PureTransferView.js +61 -0
- package/dist/esm/anyspend/react/components/common/TokenBalance.js +6 -7
- package/dist/esm/anyspend/react/hooks/useCreateDepositFirstOrder.d.ts +3 -3
- package/dist/esm/anyspend/react/hooks/useSigMint.d.ts +1 -1
- package/dist/esm/anyspend/utils/address.d.ts +2 -1
- package/dist/esm/anyspend/utils/address.js +9 -6
- package/dist/esm/anyspend/utils/chain.d.ts +84 -1
- package/dist/esm/anyspend/utils/chain.js +73 -5
- 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 +51 -5
- package/dist/esm/global-account/react/components/AvatarEditor/AvatarEditor.js +6 -11
- package/dist/esm/global-account/react/components/B3Provider/B3ConfigProvider.d.ts +11 -0
- package/dist/esm/global-account/react/components/B3Provider/B3ConfigProvider.js +11 -0
- package/dist/esm/global-account/react/components/B3Provider/B3Provider.d.ts +12 -2
- package/dist/esm/global-account/react/components/B3Provider/B3Provider.js +26 -4
- package/dist/esm/global-account/react/components/B3Provider/BetterAuthProvider.js +46 -5
- package/dist/esm/global-account/react/components/B3Provider/RelayKitProviderWrapper.d.ts +1 -2
- package/dist/esm/global-account/react/components/B3Provider/RelayKitProviderWrapper.js +11 -5
- package/dist/esm/global-account/react/components/ManageAccount/ContentTokens.js +24 -16
- package/dist/esm/global-account/react/components/ManageAccount/NFTContent.js +3 -3
- package/dist/esm/global-account/react/components/ManageAccount/ProfileSection.js +9 -7
- package/dist/esm/global-account/react/components/ManageAccount/SettingsProfileCard.js +1 -1
- package/dist/esm/global-account/react/components/ManageAccount/TokenContent.js +18 -9
- package/dist/esm/global-account/react/components/Send/Send.js +16 -12
- package/dist/esm/global-account/react/components/SignInWithB3/BetterAuthSignIn.js +3 -1
- package/dist/esm/global-account/react/components/SignInWithB3/SignInWithB3Flow.js +1 -5
- package/dist/esm/global-account/react/components/SignInWithB3/components/AuthButton.js +2 -1
- package/dist/esm/global-account/react/components/SignInWithB3/steps/LoginStepBetterAuth.js +1 -0
- 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 +3 -3
- package/dist/esm/global-account/react/components/index.d.ts +1 -1
- package/dist/esm/global-account/react/components/index.js +1 -1
- package/dist/esm/global-account/react/hooks/index.d.ts +2 -3
- package/dist/esm/global-account/react/hooks/index.js +2 -3
- package/dist/esm/global-account/react/hooks/useAuth.d.ts +5 -4
- package/dist/esm/global-account/react/hooks/useAuth.js +1 -0
- package/dist/esm/global-account/react/hooks/useAuthentication.d.ts +3 -2
- package/dist/esm/global-account/react/hooks/useAuthentication.js +2 -1
- package/dist/esm/global-account/react/hooks/useBetterAuth.d.ts +1657 -22
- package/dist/esm/global-account/react/hooks/useBetterAuth.js +8 -8
- package/dist/esm/global-account/react/hooks/useClient.d.ts +3 -3
- package/dist/esm/global-account/react/hooks/useFirstEOA.d.ts +4 -7666
- package/dist/esm/global-account/react/hooks/useFirstEOA.js +1 -0
- package/dist/esm/global-account/react/hooks/useNativeBalance.js +1 -1
- package/dist/esm/global-account/react/hooks/usePortfolioBalance.d.ts +15 -0
- package/dist/esm/global-account/react/hooks/usePortfolioBalance.js +72 -0
- package/dist/esm/global-account/react/hooks/usePortfolioCollectibles.d.ts +12 -0
- package/dist/esm/global-account/react/hooks/usePortfolioCollectibles.js +175 -0
- 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.d.ts +1 -0
- package/dist/esm/global-account/react/hooks/useUnifiedChainSwitchAndExecute.js +37 -27
- package/dist/esm/global-account/react/stores/useModalStore.d.ts +14 -2
- 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 +30 -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/constants/index.d.ts +4 -0
- 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/esm/shared/utils/zerionPositions.d.ts +96 -0
- package/dist/esm/shared/utils/zerionPositions.js +180 -0
- package/dist/styles/index.css +1 -1
- package/dist/types/anyspend/constants/rpc.d.ts +3 -1
- package/dist/types/anyspend/react/components/AnySpend.d.ts +9 -1
- package/dist/types/anyspend/react/components/AnySpendDeposit.d.ts +15 -3
- package/dist/types/anyspend/react/components/QRDeposit.d.ts +22 -3
- package/dist/types/anyspend/react/components/common/PureTransferView.d.ts +30 -0
- package/dist/types/anyspend/react/hooks/useCreateDepositFirstOrder.d.ts +3 -3
- package/dist/types/anyspend/react/hooks/useSigMint.d.ts +1 -1
- package/dist/types/anyspend/utils/address.d.ts +2 -1
- package/dist/types/anyspend/utils/chain.d.ts +84 -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 +11 -0
- package/dist/types/global-account/react/components/B3Provider/B3Provider.d.ts +12 -2
- package/dist/types/global-account/react/components/B3Provider/RelayKitProviderWrapper.d.ts +1 -2
- package/dist/types/global-account/react/components/SignInWithB3/utils/signInUtils.d.ts +3 -2
- package/dist/types/global-account/react/components/index.d.ts +1 -1
- package/dist/types/global-account/react/hooks/index.d.ts +2 -3
- package/dist/types/global-account/react/hooks/useAuth.d.ts +5 -4
- package/dist/types/global-account/react/hooks/useAuthentication.d.ts +3 -2
- package/dist/types/global-account/react/hooks/useBetterAuth.d.ts +1657 -22
- package/dist/types/global-account/react/hooks/useClient.d.ts +3 -3
- package/dist/types/global-account/react/hooks/useFirstEOA.d.ts +4 -7666
- package/dist/types/global-account/react/hooks/usePortfolioBalance.d.ts +15 -0
- package/dist/types/global-account/react/hooks/usePortfolioCollectibles.d.ts +12 -0
- 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/hooks/useUnifiedChainSwitchAndExecute.d.ts +1 -0
- package/dist/types/global-account/react/stores/useModalStore.d.ts +14 -2
- 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 +30 -54
- package/dist/types/shared/constants/chains/supported.d.ts +1 -49
- package/dist/types/shared/constants/index.d.ts +4 -0
- package/dist/types/shared/utils/chain-transformers.d.ts +4 -4
- package/dist/types/shared/utils/upload.d.ts +9 -0
- package/dist/types/shared/utils/zerionPositions.d.ts +96 -0
- package/node_modules/@b3/chain-registry/chains.json +1225 -0
- package/node_modules/@b3/chain-registry/dist/chains.json +1225 -0
- package/node_modules/@b3/chain-registry/dist/index.cjs +1676 -0
- package/node_modules/@b3/chain-registry/dist/index.d.cts +195 -0
- package/node_modules/@b3/chain-registry/dist/index.d.ts +195 -0
- package/node_modules/@b3/chain-registry/dist/index.mjs +1604 -0
- package/node_modules/@b3/chain-registry/dist/src/index.d.ts +193 -0
- package/node_modules/@b3/chain-registry/dist/src/index.js +408 -0
- package/node_modules/@b3/chain-registry/package.json +66 -0
- package/node_modules/@b3/chain-registry/src/index.test.ts +432 -0
- package/node_modules/@b3/chain-registry/src/index.ts +672 -0
- package/package.json +81 -30
- package/src/anyspend/README.md +2 -2
- package/src/anyspend/constants/rpc.ts +5 -2
- package/src/anyspend/docs/components.md +6 -6
- package/src/anyspend/docs/contributing.md +1 -1
- package/src/anyspend/docs/hooks.md +3 -3
- package/src/anyspend/docs/installation.md +2 -2
- package/src/anyspend/react/components/AnySpend.tsx +163 -47
- package/src/anyspend/react/components/AnySpendCustomExactIn.tsx +10 -11
- package/src/anyspend/react/components/AnySpendDeposit.tsx +130 -31
- package/src/anyspend/react/components/AnySpendStakeB3.tsx +55 -14
- package/src/anyspend/react/components/AnySpendStakeB3ExactIn.tsx +55 -11
- package/src/anyspend/react/components/QRDeposit.tsx +101 -22
- package/src/anyspend/react/components/__tests__/QRDeposit.test.tsx +331 -0
- package/src/anyspend/react/components/checkout/CryptoPayPanel.tsx +38 -16
- package/src/anyspend/react/components/common/PureTransferView.tsx +212 -0
- package/src/anyspend/react/components/common/TokenBalance.tsx +10 -7
- package/src/anyspend/react/hooks/useAnyspendQuote.ts +13 -13
- package/src/anyspend/react/hooks/useCreateDepositFirstOrder.ts +4 -4
- package/src/anyspend/services/gas.test.ts +95 -18
- package/src/anyspend/types/api_req_res.ts +10 -5
- package/src/anyspend/utils/__tests__/address.test.ts +39 -0
- package/src/anyspend/utils/__tests__/deprecatedChains.test.ts +44 -0
- package/src/anyspend/utils/__tests__/toRegistryChainId.test.ts +17 -0
- package/src/anyspend/utils/address.ts +8 -6
- package/src/anyspend/utils/chain.ts +79 -3
- 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 +74 -9
- package/src/global-account/react/components/AvatarEditor/AvatarEditor.tsx +6 -11
- package/src/global-account/react/components/B3Provider/B3ConfigProvider.tsx +12 -0
- package/src/global-account/react/components/B3Provider/B3Provider.tsx +40 -4
- package/src/global-account/react/components/B3Provider/BetterAuthProvider.tsx +51 -5
- package/src/global-account/react/components/B3Provider/RelayKitProviderWrapper.tsx +11 -11
- package/src/global-account/react/components/ManageAccount/ContentTokens.tsx +50 -21
- package/src/global-account/react/components/ManageAccount/NFTContent.tsx +5 -3
- package/src/global-account/react/components/ManageAccount/ProfileSection.tsx +10 -6
- package/src/global-account/react/components/ManageAccount/SettingsProfileCard.tsx +1 -1
- package/src/global-account/react/components/ManageAccount/TokenContent.tsx +22 -9
- package/src/global-account/react/components/Send/Send.tsx +39 -15
- package/src/global-account/react/components/SignInWithB3/BetterAuthSignIn.tsx +12 -1
- package/src/global-account/react/components/SignInWithB3/SignInWithB3Flow.tsx +1 -4
- package/src/global-account/react/components/SignInWithB3/components/AuthButton.tsx +9 -1
- package/src/global-account/react/components/SignInWithB3/steps/LoginStepBetterAuth.tsx +1 -0
- package/src/global-account/react/components/SignInWithB3/utils/signInUtils.ts +4 -4
- package/src/global-account/react/components/index.ts +1 -1
- package/src/global-account/react/components/ui/button.tsx +1 -2
- package/src/global-account/react/hooks/__tests__/useUnifiedChainSwitchAndExecute.test.tsx +156 -0
- package/src/global-account/react/hooks/index.ts +2 -3
- package/src/global-account/react/hooks/useAuth.ts +5 -4
- package/src/global-account/react/hooks/useAuthentication.ts +5 -4
- package/src/global-account/react/hooks/useBetterAuth.ts +10 -10
- package/src/global-account/react/hooks/useClient.ts +11 -2
- package/src/global-account/react/hooks/useFirstEOA.tsx +9 -2
- package/src/global-account/react/hooks/useNativeBalance.tsx +1 -1
- package/src/global-account/react/hooks/usePortfolioBalance.ts +89 -0
- package/src/global-account/react/hooks/usePortfolioCollectibles.ts +212 -0
- 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 +47 -31
- package/src/global-account/react/stores/useModalStore.ts +14 -2
- 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/constants/index.ts +8 -0
- package/src/shared/react/hooks/__tests__/useCurrencyConversion.test.ts +54 -43
- package/src/shared/utils/__tests__/zerionPositions.test.ts +248 -0
- 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/shared/utils/zerionPositions.ts +247 -0
- package/src/styles/index.css +27 -0
- 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/react/hooks/useSimBalance.d.ts +0 -59
- package/dist/cjs/global-account/react/hooks/useSimBalance.js +0 -98
- package/dist/cjs/global-account/react/hooks/useSimCollectibles.d.ts +0 -45
- package/dist/cjs/global-account/react/hooks/useSimCollectibles.js +0 -190
- package/dist/cjs/global-account/react/utils/simdune.d.ts +0 -7
- package/dist/cjs/global-account/react/utils/simdune.js +0 -21
- 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/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/react/hooks/useSimBalance.d.ts +0 -59
- package/dist/esm/global-account/react/hooks/useSimBalance.js +0 -93
- package/dist/esm/global-account/react/hooks/useSimCollectibles.d.ts +0 -45
- package/dist/esm/global-account/react/hooks/useSimCollectibles.js +0 -187
- package/dist/esm/global-account/react/utils/simdune.d.ts +0 -7
- package/dist/esm/global-account/react/utils/simdune.js +0 -17
- 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/SignInWithB3/SignInWithB3Privy.d.ts +0 -10
- package/dist/types/global-account/react/hooks/useHandleConnectWithPrivy.d.ts +0 -11
- package/dist/types/global-account/react/hooks/useSimBalance.d.ts +0 -59
- package/dist/types/global-account/react/hooks/useSimCollectibles.d.ts +0 -45
- package/dist/types/global-account/react/utils/simdune.d.ts +0 -7
- package/dist/types/global-account/types/chain-networks.d.ts +0 -44
- 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/react/hooks/useSimBalance.ts +0 -164
- package/src/global-account/react/hooks/useSimCollectibles.ts +0 -238
- package/src/global-account/react/utils/simdune.ts +0 -20
- package/src/global-account/types/chain-networks.ts +0 -54
- package/src/shared/generated/chain-networks.json +0 -684
|
@@ -14,6 +14,22 @@ export interface QRDepositProps {
|
|
|
14
14
|
destinationToken: components["schemas"]["Token"];
|
|
15
15
|
/** The destination chain ID */
|
|
16
16
|
destinationChainId: number;
|
|
17
|
+
/**
|
|
18
|
+
* Human-formatted destination amount (e.g. "9.365547"), shown as an APPROXIMATE
|
|
19
|
+
* target in swap mode only. The QR deposit path accepts an arbitrary sent amount,
|
|
20
|
+
* so this is never a guaranteed receive figure — the UI frames it as "any amount
|
|
21
|
+
* works". Omitted when no fixed amount is set or the destination decimals are
|
|
22
|
+
* unresolved (to avoid a mis-scaled number). Ignored in pure-transfer mode.
|
|
23
|
+
*/
|
|
24
|
+
destinationAmountDisplay?: string;
|
|
25
|
+
/**
|
|
26
|
+
* When true, the deposit is a PURE TRANSFER: the destination token/chain mirror
|
|
27
|
+
* the user's currently selected source token/chain, so the exact token the user
|
|
28
|
+
* sends lands in their wallet on the same chain — no swap/bridge order is created.
|
|
29
|
+
* The `destinationToken`/`destinationChainId` props are then used only as the
|
|
30
|
+
* initial source selection (they must be fully resolved before mount). Defaults to false.
|
|
31
|
+
*/
|
|
32
|
+
pureTransferOnly?: boolean;
|
|
17
33
|
/** Creator address (optional) */
|
|
18
34
|
creatorAddress?: string;
|
|
19
35
|
/** Contract config for custom execution after deposit */
|
|
@@ -24,8 +40,11 @@ export interface QRDepositProps {
|
|
|
24
40
|
onClose?: () => void;
|
|
25
41
|
/** Callback when order is created successfully */
|
|
26
42
|
onOrderCreated?: (orderId: string) => void;
|
|
27
|
-
/**
|
|
28
|
-
|
|
43
|
+
/**
|
|
44
|
+
* Callback when deposit is completed. The argument carries the deposited amount string
|
|
45
|
+
* (e.g. "200.00") on the pure-transfer path, or the order tx hash otherwise.
|
|
46
|
+
*/
|
|
47
|
+
onSuccess?: (amountOrTxHash?: string) => void;
|
|
29
48
|
/** Custom classes for styling */
|
|
30
49
|
classes?: QRDepositClasses;
|
|
31
50
|
}
|
|
@@ -43,4 +62,4 @@ export interface QRDepositProps {
|
|
|
43
62
|
* onSuccess={(txHash) => console.log("Deposit complete:", txHash)}
|
|
44
63
|
* />
|
|
45
64
|
*/
|
|
46
|
-
export declare function QRDeposit({ mode, recipientAddress, sourceToken: sourceTokenProp, sourceChainId: sourceChainIdProp, destinationToken, destinationChainId, creatorAddress, depositContractConfig, onBack, onClose, onOrderCreated, onSuccess, classes, }: QRDepositProps): import("react/jsx-runtime").JSX.Element;
|
|
65
|
+
export declare function QRDeposit({ mode, recipientAddress, sourceToken: sourceTokenProp, sourceChainId: sourceChainIdProp, destinationToken, destinationChainId, destinationAmountDisplay, pureTransferOnly, creatorAddress, depositContractConfig, onBack, onClose, onOrderCreated, onSuccess, classes, }: QRDepositProps): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,30 @@
|
|
|
1
|
+
import type { components } from "@b3dotfun/sdk/anyspend/types/api";
|
|
2
|
+
import type { TransferResult } from "../../hooks/useWatchTransfer";
|
|
3
|
+
export interface PureTransferViewProps {
|
|
4
|
+
mode?: "modal" | "page";
|
|
5
|
+
/** The recipient address where funds will land (the user's own wallet) */
|
|
6
|
+
recipientAddress: string;
|
|
7
|
+
/** Chain ID to watch on */
|
|
8
|
+
chainId: number;
|
|
9
|
+
/** Token the user sends — drives the QR code and balance watcher */
|
|
10
|
+
token: components["schemas"]["Token"];
|
|
11
|
+
/** Human-readable amount to display (display-only; skip row if empty or "0") */
|
|
12
|
+
displayAmount?: string;
|
|
13
|
+
/** Whether this panel is the currently active panel; gates the balance watcher */
|
|
14
|
+
isActive?: boolean;
|
|
15
|
+
/** Callback when back chevron is clicked */
|
|
16
|
+
onBack?: () => void;
|
|
17
|
+
/** Callback when X close button is clicked */
|
|
18
|
+
onClose?: () => void;
|
|
19
|
+
/** Callback when an incoming transfer is detected */
|
|
20
|
+
onTransferDetected?: (result: TransferResult) => void;
|
|
21
|
+
}
|
|
22
|
+
/**
|
|
23
|
+
* A self-contained view that shows the recipient address as a QR code + copy button and
|
|
24
|
+
* watches for an incoming same-chain/same-token transfer via `useWatchTransfer`. When a
|
|
25
|
+
* transfer is detected it renders `TransferResultScreen`.
|
|
26
|
+
*
|
|
27
|
+
* This is the "TRANSFER_CRYPTO" path for same-token AnySpend deposits — no relayer order,
|
|
28
|
+
* no fee; the user simply sends the token directly to their own address.
|
|
29
|
+
*/
|
|
30
|
+
export declare function PureTransferView({ mode, recipientAddress, chainId, token, displayAmount, isActive, onBack, onClose, onTransferDetected, }: PureTransferViewProps): import("react/jsx-runtime").JSX.Element | null;
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { components } from "@b3dotfun/sdk/anyspend/types/api";
|
|
2
|
-
import { CreateOrderResponse } from "@b3dotfun/sdk/anyspend/types/api_req_res";
|
|
3
|
-
import { DepositContractConfig } from "../components/AnySpendDeposit";
|
|
1
|
+
import type { components } from "@b3dotfun/sdk/anyspend/types/api";
|
|
2
|
+
import type { CreateOrderResponse } from "@b3dotfun/sdk/anyspend/types/api_req_res";
|
|
3
|
+
import type { DepositContractConfig } from "../components/AnySpendDeposit";
|
|
4
4
|
export type CreateDepositFirstOrderParams = {
|
|
5
5
|
recipientAddress: string;
|
|
6
6
|
srcChain: number;
|
|
@@ -10,9 +10,9 @@ export declare const useGenerateSigMintData: ({ recipientAddress, contractAddres
|
|
|
10
10
|
description?: string | undefined;
|
|
11
11
|
status?: "ACTIVE" | "INACTIVE" | "DRAFT" | undefined;
|
|
12
12
|
metadata?: {} | undefined;
|
|
13
|
+
logoURI?: string | undefined;
|
|
13
14
|
createdAt?: string | undefined;
|
|
14
15
|
updatedAt?: string | undefined;
|
|
15
|
-
logoURI?: string | undefined;
|
|
16
16
|
creator?: string | undefined;
|
|
17
17
|
signatureRequestBody?: {
|
|
18
18
|
currency?: string | undefined;
|
|
@@ -1,4 +1,5 @@
|
|
|
1
|
-
|
|
1
|
+
import { isSolanaAddress } from "@b3/chain-registry/runtime";
|
|
2
|
+
export { isSolanaAddress };
|
|
2
3
|
export declare function isEvmOrSolanaAddress(address: string): boolean;
|
|
3
4
|
/**
|
|
4
5
|
* Check if an address is Hyperliquid's special USDC address.
|
|
@@ -45,7 +45,7 @@ export declare const hyperEVM: {
|
|
|
45
45
|
id: 999;
|
|
46
46
|
name: "HyperEVM";
|
|
47
47
|
nativeCurrency: {
|
|
48
|
-
readonly name: "
|
|
48
|
+
readonly name: "Hyperliquid";
|
|
49
49
|
readonly symbol: "HYPE";
|
|
50
50
|
readonly decimals: 18;
|
|
51
51
|
};
|
|
@@ -56,11 +56,73 @@ export declare const hyperEVM: {
|
|
|
56
56
|
};
|
|
57
57
|
};
|
|
58
58
|
sourceId?: number | undefined | undefined;
|
|
59
|
+
supportsTransactionReplacementDetection?: boolean | undefined | undefined;
|
|
59
60
|
testnet?: boolean | undefined | undefined;
|
|
60
61
|
custom?: Record<string, unknown> | undefined;
|
|
62
|
+
extendSchema?: Record<string, unknown> | undefined;
|
|
61
63
|
fees?: import("viem").ChainFees<undefined> | undefined;
|
|
62
64
|
formatters?: undefined;
|
|
65
|
+
prepareTransactionRequest?: ((args: import("viem").PrepareTransactionRequestParameters, options: {
|
|
66
|
+
client: import("viem").Client;
|
|
67
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
68
|
+
}) => Promise<import("viem").PrepareTransactionRequestParameters>) | [fn: ((args: import("viem").PrepareTransactionRequestParameters, options: {
|
|
69
|
+
client: import("viem").Client;
|
|
70
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
71
|
+
}) => Promise<import("viem").PrepareTransactionRequestParameters>) | undefined, options: {
|
|
72
|
+
runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
|
|
73
|
+
}] | undefined;
|
|
63
74
|
serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable> | undefined;
|
|
75
|
+
verifyHash?: ((client: import("viem").Client, parameters: import("viem").VerifyHashActionParameters) => Promise<import("viem").VerifyHashActionReturnType>) | undefined;
|
|
76
|
+
};
|
|
77
|
+
export declare const plume: {
|
|
78
|
+
blockExplorers: {
|
|
79
|
+
readonly default: {
|
|
80
|
+
readonly name: "Plume Explorer";
|
|
81
|
+
readonly url: "https://explorer.plume.org";
|
|
82
|
+
};
|
|
83
|
+
};
|
|
84
|
+
blockTime?: number | undefined | undefined;
|
|
85
|
+
contracts?: {
|
|
86
|
+
[x: string]: import("viem").ChainContract | {
|
|
87
|
+
[sourceId: number]: import("viem").ChainContract | undefined;
|
|
88
|
+
} | undefined;
|
|
89
|
+
ensRegistry?: import("viem").ChainContract | undefined;
|
|
90
|
+
ensUniversalResolver?: import("viem").ChainContract | undefined;
|
|
91
|
+
multicall3?: import("viem").ChainContract | undefined;
|
|
92
|
+
erc6492Verifier?: import("viem").ChainContract | undefined;
|
|
93
|
+
} | undefined;
|
|
94
|
+
ensTlds?: readonly string[] | undefined;
|
|
95
|
+
id: 98866;
|
|
96
|
+
name: "Plume";
|
|
97
|
+
nativeCurrency: {
|
|
98
|
+
readonly name: "Plume";
|
|
99
|
+
readonly symbol: "PLUME";
|
|
100
|
+
readonly decimals: 18;
|
|
101
|
+
};
|
|
102
|
+
experimental_preconfirmationTime?: number | undefined | undefined;
|
|
103
|
+
rpcUrls: {
|
|
104
|
+
readonly default: {
|
|
105
|
+
readonly http: readonly ["https://rpc.plume.org"];
|
|
106
|
+
};
|
|
107
|
+
};
|
|
108
|
+
sourceId?: number | undefined | undefined;
|
|
109
|
+
supportsTransactionReplacementDetection?: boolean | undefined | undefined;
|
|
110
|
+
testnet?: boolean | undefined | undefined;
|
|
111
|
+
custom?: Record<string, unknown> | undefined;
|
|
112
|
+
extendSchema?: Record<string, unknown> | undefined;
|
|
113
|
+
fees?: import("viem").ChainFees<undefined> | undefined;
|
|
114
|
+
formatters?: undefined;
|
|
115
|
+
prepareTransactionRequest?: ((args: import("viem").PrepareTransactionRequestParameters, options: {
|
|
116
|
+
client: import("viem").Client;
|
|
117
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
118
|
+
}) => Promise<import("viem").PrepareTransactionRequestParameters>) | [fn: ((args: import("viem").PrepareTransactionRequestParameters, options: {
|
|
119
|
+
client: import("viem").Client;
|
|
120
|
+
phase: "beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters";
|
|
121
|
+
}) => Promise<import("viem").PrepareTransactionRequestParameters>) | undefined, options: {
|
|
122
|
+
runAt: readonly ("beforeFillTransaction" | "beforeFillParameters" | "afterFillParameters")[];
|
|
123
|
+
}] | undefined;
|
|
124
|
+
serializers?: import("viem").ChainSerializers<undefined, import("viem").TransactionSerializable> | undefined;
|
|
125
|
+
verifyHash?: ((client: import("viem").Client, parameters: import("viem").VerifyHashActionParameters) => Promise<import("viem").VerifyHashActionReturnType>) | undefined;
|
|
64
126
|
};
|
|
65
127
|
export declare const EVM_MAINNET: Record<number, IEVMChain>;
|
|
66
128
|
export declare const EVM_TESTNET: Record<number, IEVMChain>;
|
|
@@ -68,6 +130,14 @@ export declare const SOLANA_MAINNET: ISolanaChain;
|
|
|
68
130
|
export declare const HYPERLIQUID_MAINNET: IHyperliquidChain;
|
|
69
131
|
export declare const EVM_CHAINS: Record<number, IEVMChain>;
|
|
70
132
|
export declare const SOLANA_CHAINS: Record<number, ISolanaChain>;
|
|
133
|
+
/**
|
|
134
|
+
* Translate a Relay-numbered chain id into the id the chain registry uses.
|
|
135
|
+
*
|
|
136
|
+
* Relay numbers Solana 792703809; every other chain shares the universal EVM id. Balance rows are
|
|
137
|
+
* keyed by the registry's id, so handing Relay's number to a balance lookup matches nothing at all
|
|
138
|
+
* — and a funded Solana wallet then reads as empty rather than as unreadable.
|
|
139
|
+
*/
|
|
140
|
+
export declare function toRegistryChainId(chainId: number): number;
|
|
71
141
|
export declare const HYPERLIQUID_CHAINS: Record<number, IHyperliquidChain>;
|
|
72
142
|
export declare const ALL_CHAINS: Record<number, IBaseChain>;
|
|
73
143
|
export declare function getSolanaChains(network: "mainnet" | "testnet"): ISolanaChain;
|
|
@@ -90,6 +160,19 @@ export declare function getNativeToken(chainId: number): components["schemas"]["
|
|
|
90
160
|
export declare function isEvmChain(chainId: number): boolean;
|
|
91
161
|
export declare function isHyperliquidChain(chainId: number): boolean;
|
|
92
162
|
export declare function getHyperliquidChain(chainId: number): IHyperliquidChain;
|
|
163
|
+
/**
|
|
164
|
+
* Chains AnySpend no longer accepts orders on, as either source or destination.
|
|
165
|
+
*
|
|
166
|
+
* They stay in ALL_CHAINS on purpose. That map answers "what is this chain" — name, logo, token,
|
|
167
|
+
* decimals — which every order that ever existed still needs in order to render; removing an entry
|
|
168
|
+
* would make getChainName and friends throw on historical rows. Whether new orders are accepted is
|
|
169
|
+
* this separate question.
|
|
170
|
+
*
|
|
171
|
+
* anyspend-service imports this list rather than keeping its own, so the API and the chain picker
|
|
172
|
+
* can never disagree about what is on offer.
|
|
173
|
+
*/
|
|
174
|
+
export declare const DEPRECATED_CHAIN_IDS: readonly number[];
|
|
175
|
+
export declare function isDeprecatedChain(chainId?: number): boolean;
|
|
93
176
|
/**
|
|
94
177
|
* Get available chain IDs for AnySpend based on context (source or destination).
|
|
95
178
|
* Filters out chains that shouldn't be available for the given context.
|
|
@@ -1,6 +1,7 @@
|
|
|
1
1
|
import { components } from "@b3dotfun/sdk/anyspend/types/api";
|
|
2
2
|
export declare const HYPERLIQUID_CHAIN_ID = 1337;
|
|
3
3
|
export declare const HYPEREVM_CHAIN_ID = 999;
|
|
4
|
+
export declare const PLUME_CHAIN_ID = 98866;
|
|
4
5
|
/**
|
|
5
6
|
* Hyperliquid uses a special 34-character USDC address format (0x + 32 hex digits)
|
|
6
7
|
* instead of the standard 42-character EVM address format.
|
|
@@ -15,3 +16,4 @@ export declare function getBnbToken(): components["schemas"]["Token"];
|
|
|
15
16
|
export declare function getAvaxToken(): components["schemas"]["Token"];
|
|
16
17
|
export declare function getHyperEVMNativeToken(): components["schemas"]["Token"];
|
|
17
18
|
export declare function getHyperliquidUSDCToken(): components["schemas"]["Token"];
|
|
19
|
+
export declare function getPlumeNativeToken(): components["schemas"]["Token"];
|
|
@@ -1,7 +1,15 @@
|
|
|
1
1
|
import { ClientApplication } from "@b3dotfun/b3-api";
|
|
2
2
|
import { AuthenticationClient } from "@feathersjs/authentication-client";
|
|
3
|
+
/** Default API URL derived from environment variables. */
|
|
3
4
|
export declare const B3_API_URL: string;
|
|
4
|
-
|
|
5
|
+
/**
|
|
6
|
+
* Override the B3 API URL at runtime. Called by `B3Provider` when an
|
|
7
|
+
* `apiUrl` prop is provided. Pass `null` to revert to the default.
|
|
8
|
+
*/
|
|
9
|
+
export declare function setB3ApiUrl(url: string | null): void;
|
|
10
|
+
/** Get the current B3 API URL (prefers runtime override, then env var). */
|
|
11
|
+
export declare function getB3ApiUrl(): string;
|
|
12
|
+
export declare const authenticate: (app: ClientApplication, accessToken: string, identityToken: string, params?: Record<string, any>) => Promise<Record<string, any> | null>;
|
|
5
13
|
export declare class MyAuthenticationClient extends AuthenticationClient {
|
|
6
14
|
getFromLocation(location: any): Promise<any>;
|
|
7
15
|
}
|
|
@@ -1,5 +1,5 @@
|
|
|
1
1
|
import { MMKV } from "react-native-mmkv";
|
|
2
2
|
export declare const localStoreInstance: MMKV;
|
|
3
3
|
declare const app: import("@b3dotfun/b3-api").ClientApplication;
|
|
4
|
-
export declare const authenticate: (accessToken: string, identityToken: string, params?: Record<string, any>) => Promise<
|
|
4
|
+
export declare const authenticate: (accessToken: string, identityToken: string, params?: Record<string, any>) => Promise<Record<string, any> | null>;
|
|
5
5
|
export default app;
|