@b3dotfun/sdk 0.0.29 → 0.0.30-alpha.1

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (126) hide show
  1. package/dist/cjs/anyspend/constants/index.d.ts +1 -0
  2. package/dist/cjs/anyspend/constants/index.js +2 -1
  3. package/dist/cjs/anyspend/react/components/AnySpend.js +2 -2
  4. package/dist/cjs/anyspend/react/components/AnySpendBondKit.d.ts +1 -1
  5. package/dist/cjs/anyspend/react/components/AnySpendBondKit.js +23 -24
  6. package/dist/cjs/anyspend/react/components/AnySpendBuySpin.js +2 -1
  7. package/dist/cjs/anyspend/react/components/AnySpendCustom.js +1 -1
  8. package/dist/cjs/anyspend/react/components/AnySpendStakeB3.js +2 -1
  9. package/dist/cjs/anyspend/react/components/AnyspendDepositHype.d.ts +4 -2
  10. package/dist/cjs/anyspend/react/components/AnyspendDepositHype.js +17 -10
  11. package/dist/cjs/anyspend/react/components/common/ConnectWalletPayment.js +9 -1
  12. package/dist/cjs/anyspend/react/components/common/CryptoPaymentMethod.js +124 -41
  13. package/dist/cjs/anyspend/react/components/common/OrderDetails.js +6 -3
  14. package/dist/cjs/anyspend/react/components/common/OrderDetailsCollapsible.js +6 -4
  15. package/dist/cjs/anyspend/react/components/common/OrderStatus.d.ts +2 -0
  16. package/dist/cjs/anyspend/react/components/common/OrderStatus.js +2 -2
  17. package/dist/cjs/anyspend/react/components/common/OrderTokenAmount.js +1 -1
  18. package/dist/cjs/anyspend/react/components/common/PanelOnramp.d.ts +2 -1
  19. package/dist/cjs/anyspend/react/components/common/PanelOnramp.js +2 -2
  20. package/dist/cjs/anyspend/react/components/common/PaySection.js +6 -4
  21. package/dist/cjs/anyspend/react/hooks/useAnyspendFlow.d.ts +2 -1
  22. package/dist/cjs/anyspend/react/hooks/useAnyspendFlow.js +34 -3
  23. package/dist/cjs/anyspend/react/hooks/useSigMint.d.ts +1 -1
  24. package/dist/cjs/bondkit/abis/BondkitTokenABI.d.ts +62 -17
  25. package/dist/cjs/bondkit/abis/BondkitTokenABI.js +41 -9
  26. package/dist/cjs/bondkit/abis/BondkitTokenFactoryABI.d.ts +0 -25
  27. package/dist/cjs/bondkit/abis/BondkitTokenFactoryABI.js +0 -9
  28. package/dist/cjs/bondkit/constants.js +1 -1
  29. package/dist/cjs/global-account/react/components/LinkAccount/LinkAccount.js +28 -15
  30. package/dist/cjs/global-account/react/components/ManageAccount/ManageAccount.js +1 -1
  31. package/dist/cjs/global-account/react/hooks/useB3BalanceFromAddresses.js +2 -1
  32. package/dist/cjs/global-account/react/hooks/useNativeBalance.js +2 -1
  33. package/dist/cjs/global-account/react/hooks/useUnifiedChainSwitchAndExecute.d.ts +1 -0
  34. package/dist/cjs/global-account/react/hooks/useUnifiedChainSwitchAndExecute.js +1 -0
  35. package/dist/cjs/global-account/react/stores/useModalStore.d.ts +4 -2
  36. package/dist/cjs/shared/constants/chains/b3Chain.d.ts +2 -2
  37. package/dist/cjs/shared/constants/chains/supported.d.ts +4 -4
  38. package/dist/cjs/shared/constants/index.d.ts +1 -0
  39. package/dist/cjs/shared/constants/index.js +2 -1
  40. package/dist/esm/anyspend/constants/index.d.ts +1 -0
  41. package/dist/esm/anyspend/constants/index.js +1 -0
  42. package/dist/esm/anyspend/react/components/AnySpend.js +2 -2
  43. package/dist/esm/anyspend/react/components/AnySpendBondKit.d.ts +1 -1
  44. package/dist/esm/anyspend/react/components/AnySpendBondKit.js +23 -24
  45. package/dist/esm/anyspend/react/components/AnySpendBuySpin.js +2 -1
  46. package/dist/esm/anyspend/react/components/AnySpendCustom.js +1 -1
  47. package/dist/esm/anyspend/react/components/AnySpendStakeB3.js +2 -1
  48. package/dist/esm/anyspend/react/components/AnyspendDepositHype.d.ts +4 -2
  49. package/dist/esm/anyspend/react/components/AnyspendDepositHype.js +19 -12
  50. package/dist/esm/anyspend/react/components/common/ConnectWalletPayment.js +6 -1
  51. package/dist/esm/anyspend/react/components/common/CryptoPaymentMethod.js +126 -43
  52. package/dist/esm/anyspend/react/components/common/OrderDetails.js +7 -4
  53. package/dist/esm/anyspend/react/components/common/OrderDetailsCollapsible.js +7 -5
  54. package/dist/esm/anyspend/react/components/common/OrderStatus.d.ts +2 -0
  55. package/dist/esm/anyspend/react/components/common/OrderStatus.js +2 -2
  56. package/dist/esm/anyspend/react/components/common/OrderTokenAmount.js +1 -1
  57. package/dist/esm/anyspend/react/components/common/PanelOnramp.d.ts +2 -1
  58. package/dist/esm/anyspend/react/components/common/PanelOnramp.js +2 -2
  59. package/dist/esm/anyspend/react/components/common/PaySection.js +7 -5
  60. package/dist/esm/anyspend/react/hooks/useAnyspendFlow.d.ts +2 -1
  61. package/dist/esm/anyspend/react/hooks/useAnyspendFlow.js +35 -4
  62. package/dist/esm/anyspend/react/hooks/useSigMint.d.ts +1 -1
  63. package/dist/esm/bondkit/abis/BondkitTokenABI.d.ts +62 -17
  64. package/dist/esm/bondkit/abis/BondkitTokenABI.js +41 -9
  65. package/dist/esm/bondkit/abis/BondkitTokenFactoryABI.d.ts +0 -25
  66. package/dist/esm/bondkit/abis/BondkitTokenFactoryABI.js +0 -9
  67. package/dist/esm/bondkit/constants.js +1 -1
  68. package/dist/esm/global-account/react/components/LinkAccount/LinkAccount.js +28 -15
  69. package/dist/esm/global-account/react/components/ManageAccount/ManageAccount.js +1 -1
  70. package/dist/esm/global-account/react/hooks/useB3BalanceFromAddresses.js +2 -1
  71. package/dist/esm/global-account/react/hooks/useNativeBalance.js +2 -1
  72. package/dist/esm/global-account/react/hooks/useUnifiedChainSwitchAndExecute.d.ts +1 -0
  73. package/dist/esm/global-account/react/hooks/useUnifiedChainSwitchAndExecute.js +1 -0
  74. package/dist/esm/global-account/react/stores/useModalStore.d.ts +4 -2
  75. package/dist/esm/shared/constants/chains/b3Chain.d.ts +2 -2
  76. package/dist/esm/shared/constants/chains/supported.d.ts +4 -4
  77. package/dist/esm/shared/constants/index.d.ts +1 -0
  78. package/dist/esm/shared/constants/index.js +1 -0
  79. package/dist/styles/index.css +1 -1
  80. package/dist/types/anyspend/constants/index.d.ts +1 -0
  81. package/dist/types/anyspend/react/components/AnySpendBondKit.d.ts +1 -1
  82. package/dist/types/anyspend/react/components/AnyspendDepositHype.d.ts +4 -2
  83. package/dist/types/anyspend/react/components/common/OrderStatus.d.ts +2 -0
  84. package/dist/types/anyspend/react/components/common/PanelOnramp.d.ts +2 -1
  85. package/dist/types/anyspend/react/hooks/useAnyspendFlow.d.ts +2 -1
  86. package/dist/types/anyspend/react/hooks/useSigMint.d.ts +1 -1
  87. package/dist/types/bondkit/abis/BondkitTokenABI.d.ts +62 -17
  88. package/dist/types/bondkit/abis/BondkitTokenFactoryABI.d.ts +0 -25
  89. package/dist/types/global-account/react/hooks/useUnifiedChainSwitchAndExecute.d.ts +1 -0
  90. package/dist/types/global-account/react/stores/useModalStore.d.ts +4 -2
  91. package/dist/types/shared/constants/chains/b3Chain.d.ts +2 -2
  92. package/dist/types/shared/constants/chains/supported.d.ts +4 -4
  93. package/dist/types/shared/constants/index.d.ts +1 -0
  94. package/package.json +1 -1
  95. package/src/anyspend/constants/index.ts +2 -0
  96. package/src/anyspend/react/components/AnySpend.tsx +2 -1
  97. package/src/anyspend/react/components/AnySpendBondKit.tsx +28 -28
  98. package/src/anyspend/react/components/AnySpendBuySpin.tsx +2 -1
  99. package/src/anyspend/react/components/AnySpendCustom.tsx +1 -1
  100. package/src/anyspend/react/components/AnySpendStakeB3.tsx +2 -1
  101. package/src/anyspend/react/components/AnyspendDepositHype.tsx +143 -130
  102. package/src/anyspend/react/components/common/ConnectWalletPayment.tsx +9 -0
  103. package/src/anyspend/react/components/common/CryptoPaymentMethod.tsx +243 -104
  104. package/src/anyspend/react/components/common/OrderDetails.tsx +7 -3
  105. package/src/anyspend/react/components/common/OrderDetailsCollapsible.tsx +10 -4
  106. package/src/anyspend/react/components/common/OrderStatus.tsx +9 -2
  107. package/src/anyspend/react/components/common/OrderTokenAmount.tsx +2 -2
  108. package/src/anyspend/react/components/common/PanelOnramp.tsx +3 -1
  109. package/src/anyspend/react/components/common/PaySection.tsx +10 -8
  110. package/src/anyspend/react/hooks/useAnyspendFlow.ts +41 -3
  111. package/src/bondkit/abis/BondkitTokenABI.ts +41 -9
  112. package/src/bondkit/abis/BondkitTokenFactoryABI.ts +0 -9
  113. package/src/bondkit/constants.ts +1 -1
  114. package/src/global-account/react/components/LinkAccount/LinkAccount.tsx +26 -10
  115. package/src/global-account/react/components/ManageAccount/ManageAccount.tsx +5 -1
  116. package/src/global-account/react/hooks/useB3BalanceFromAddresses.ts +2 -1
  117. package/src/global-account/react/hooks/useNativeBalance.tsx +2 -1
  118. package/src/global-account/react/hooks/useUnifiedChainSwitchAndExecute.ts +1 -0
  119. package/src/global-account/react/stores/useModalStore.ts +4 -2
  120. package/src/shared/constants/index.ts +2 -0
  121. package/dist/cjs/anyspend/abis/bondKit.d.ts +0 -35
  122. package/dist/cjs/anyspend/abis/bondKit.js +0 -29
  123. package/dist/esm/anyspend/abis/bondKit.d.ts +0 -35
  124. package/dist/esm/anyspend/abis/bondKit.js +0 -26
  125. package/dist/types/anyspend/abis/bondKit.d.ts +0 -35
  126. package/src/anyspend/abis/bondKit.ts +0 -26
@@ -57,11 +57,6 @@ export const BondkitTokenFactoryABI = [
57
57
  name: "ValidationInvalidLPSplitRatio",
58
58
  type: "error",
59
59
  },
60
- {
61
- inputs: [{ internalType: "address", name: "providedAddress", type: "address" }],
62
- name: "ValidationInvalidMigrationAdminAddress",
63
- type: "error",
64
- },
65
60
  {
66
61
  inputs: [{ internalType: "uint24", name: "value", type: "uint24" }],
67
62
  name: "ValidationInvalidV4PoolFee",
@@ -80,7 +75,6 @@ export const BondkitTokenFactoryABI = [
80
75
  { indexed: false, internalType: "string", name: "name", type: "string" },
81
76
  { indexed: false, internalType: "string", name: "symbol", type: "string" },
82
77
  { indexed: true, internalType: "address", name: "feeRecipient", type: "address" },
83
- { indexed: false, internalType: "address", name: "migrationAdmin", type: "address" },
84
78
  ],
85
79
  name: "BondkitTokenCreated",
86
80
  type: "event",
@@ -132,7 +126,6 @@ export const BondkitTokenFactoryABI = [
132
126
  { internalType: "uint256", name: "lpSplitRatioFeeRecipientBps", type: "uint256" },
133
127
  { internalType: "uint256", name: "targetAmount", type: "uint256" },
134
128
  { internalType: "address", name: "tradingToken", type: "address" },
135
- { internalType: "address", name: "migrationAdminAddress", type: "address" },
136
129
  { internalType: "address", name: "bondingPhaseSplitter", type: "address" },
137
130
  { internalType: "address", name: "v4PoolManager", type: "address" },
138
131
  { internalType: "address", name: "v4Hook", type: "address" },
@@ -175,7 +168,6 @@ export const BondkitTokenFactoryABI = [
175
168
  { internalType: "uint256", name: "lpSplitRatioFeeRecipientBps", type: "uint256" },
176
169
  { internalType: "uint256", name: "targetAmount", type: "uint256" },
177
170
  { internalType: "address", name: "tradingToken", type: "address" },
178
- { internalType: "address", name: "migrationAdminAddress", type: "address" },
179
171
  { internalType: "address", name: "bondingPhaseSplitter", type: "address" },
180
172
  { internalType: "address", name: "v4PoolManager", type: "address" },
181
173
  { internalType: "address", name: "v4Hook", type: "address" },
@@ -227,7 +219,6 @@ export const BondkitTokenFactoryABI = [
227
219
  { internalType: "uint256", name: "lpSplitRatioFeeRecipientBps", type: "uint256" },
228
220
  { internalType: "uint256", name: "targetAmount", type: "uint256" },
229
221
  { internalType: "address", name: "tradingToken", type: "address" },
230
- { internalType: "address", name: "migrationAdminAddress", type: "address" },
231
222
  { internalType: "address", name: "bondingPhaseSplitter", type: "address" },
232
223
  { internalType: "address", name: "v4PoolManager", type: "address" },
233
224
  { internalType: "address", name: "v4Hook", type: "address" },
@@ -1,2 +1,2 @@
1
- export const BaseBondkitTokenFactoryContractAddress = "0x0ccA36e9BE8Fdf456dE4BC20b378B1560Aeb6653";
1
+ export const BaseBondkitTokenFactoryContractAddress = "0x5d641bbB206d4B5585eCCd919F36270200A9A2Ad";
2
2
  export const BaseMainnetRpcUrl = "https://base-rpc.publicnode.com";
@@ -1,4 +1,5 @@
1
1
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { ecosystemWalletId } from "../../../../shared/constants/index.js";
2
3
  import { client } from "../../../../shared/utils/thirdweb.js";
3
4
  import { Loader2 } from "lucide-react";
4
5
  import { useCallback, useEffect, useState } from "react";
@@ -94,6 +95,10 @@ export function LinkAccount({ onSuccess: onSuccessCallback, onError, onClose, ch
94
95
  client,
95
96
  strategy: "email",
96
97
  email,
98
+ ecosystem: {
99
+ id: ecosystemWalletId,
100
+ partnerId: partnerId,
101
+ },
97
102
  });
98
103
  }
99
104
  else if (selectedMethod === "phone") {
@@ -101,6 +106,10 @@ export function LinkAccount({ onSuccess: onSuccessCallback, onError, onClose, ch
101
106
  client,
102
107
  strategy: "phone",
103
108
  phoneNumber: phone,
109
+ ecosystem: {
110
+ id: ecosystemWalletId,
111
+ partnerId: partnerId,
112
+ },
104
113
  });
105
114
  }
106
115
  setOtpSent(true);
@@ -114,10 +123,12 @@ export function LinkAccount({ onSuccess: onSuccessCallback, onError, onClose, ch
114
123
  };
115
124
  const handleLinkAccount = async () => {
116
125
  if (!otp) {
126
+ console.error("No OTP entered");
117
127
  setError("Please enter the verification code");
118
128
  return;
119
129
  }
120
130
  try {
131
+ setOtpSent(false);
121
132
  setLinkingState(true, selectedMethod);
122
133
  setError(null);
123
134
  if (selectedMethod === "email") {
@@ -136,17 +147,12 @@ export function LinkAccount({ onSuccess: onSuccessCallback, onError, onClose, ch
136
147
  verificationCode: otp,
137
148
  }, mutationOptions);
138
149
  }
139
- onSuccess?.();
140
- onClose?.();
141
150
  }
142
151
  catch (error) {
143
152
  console.error("Error linking account:", error);
144
153
  setError(error instanceof Error ? error.message : "Failed to link account");
145
154
  onError?.(error);
146
155
  }
147
- finally {
148
- setLinkingState(false);
149
- }
150
156
  };
151
157
  const handleSocialLink = async (strategy) => {
152
158
  try {
@@ -197,17 +203,24 @@ export function LinkAccount({ onSuccess: onSuccessCallback, onError, onClose, ch
197
203
  setError(null);
198
204
  setLinkingState(false);
199
205
  }, [isLinking, setSelectedMethod, setEmail, setPhone, setOtp, setOtpSent, setError, setLinkingState]);
206
+ const handleFinishedLinking = useCallback((success) => {
207
+ if (success) {
208
+ onSuccess?.();
209
+ onClose?.();
210
+ }
211
+ setLinkingState(false);
212
+ navigateBack();
213
+ setB3ModalContentType({
214
+ type: "manageAccount",
215
+ activeTab: "settings",
216
+ setActiveTab: () => { },
217
+ chain,
218
+ partnerId,
219
+ });
220
+ }, [chain, navigateBack, partnerId, setB3ModalContentType, setLinkingState, onSuccess, onClose]);
200
221
  useEffect(() => {
201
222
  if (isLinking) {
202
- setLinkingState(false);
203
- navigateBack();
204
- setB3ModalContentType({
205
- type: "manageAccount",
206
- activeTab: "settings",
207
- setActiveTab: () => { },
208
- chain,
209
- partnerId,
210
- });
223
+ handleFinishedLinking(true);
211
224
  }
212
225
  // eslint-disable-next-line react-hooks/exhaustive-deps
213
226
  }, [profiles.length]);
@@ -221,5 +234,5 @@ export function LinkAccount({ onSuccess: onSuccessCallback, onError, onClose, ch
221
234
  else {
222
235
  handleSocialLink(method.id);
223
236
  }
224
- }, disabled: linkingMethod === method.id, children: isLinking && linkingMethod === method.id ? _jsx(Loader2, { className: "animate-spin" }) : method.label }, method.id))), availableAuthMethods.length === 0 && (_jsx("div", { className: "text-b3-foreground-muted py-8 text-center", children: "All available authentication methods have been connected" }))] })) : (_jsxs("div", { className: "space-y-4", children: [selectedMethod === "email" && (_jsxs("div", { className: "space-y-2", children: [_jsx("label", { className: "text-b3-grey font-neue-montreal-medium text-sm", children: "Email Address" }), _jsx("input", { type: "email", placeholder: "Enter your email", className: "bg-b3-line text-b3-grey font-neue-montreal-medium focus:ring-b3-primary-blue/20 w-full rounded-xl p-4 focus:outline-none focus:ring-2", value: email, onChange: e => setEmail(e.target.value), disabled: otpSent || (isLinking && linkingMethod === "email") })] })), selectedMethod === "phone" && (_jsxs("div", { className: "space-y-2", children: [_jsx("label", { className: "text-b3-grey font-neue-montreal-medium text-sm", children: "Phone Number" }), _jsx("input", { type: "tel", placeholder: "Enter your phone number", className: "bg-b3-line text-b3-grey font-neue-montreal-medium focus:ring-b3-primary-blue/20 w-full rounded-xl p-4 focus:outline-none focus:ring-2", value: phone, onChange: e => setPhone(e.target.value), disabled: otpSent || (isLinking && linkingMethod === "phone") }), _jsx("p", { className: "text-b3-foreground-muted font-neue-montreal-medium text-sm", children: "Include country code (e.g., +1 for US)" })] })), error && _jsx("div", { className: "text-b3-negative font-neue-montreal-medium py-2 text-sm", children: error }), otpSent ? (_jsxs("div", { className: "space-y-4", children: [_jsxs("div", { className: "space-y-2", children: [_jsx("label", { className: "text-b3-grey font-neue-montreal-medium text-sm", children: "Verification Code" }), _jsx("input", { type: "text", placeholder: "Enter verification code", className: "bg-b3-line text-b3-grey font-neue-montreal-medium focus:ring-b3-primary-blue/20 w-full rounded-xl p-4 focus:outline-none focus:ring-2", value: otp, onChange: e => setOtp(e.target.value), disabled: isLinking && linkingMethod === selectedMethod })] }), _jsx(Button, { className: "bg-b3-primary-blue hover:bg-b3-primary-blue/90 font-neue-montreal-semibold h-12 w-full text-white", onClick: handleLinkAccount, disabled: !otp || (isLinking && linkingMethod === selectedMethod), children: isLinking && linkingMethod === selectedMethod ? _jsx(Loader2, { className: "animate-spin" }) : "Link Account" })] })) : (_jsx(Button, { className: "bg-b3-primary-blue hover:bg-b3-primary-blue/90 font-neue-montreal-semibold h-12 w-full text-white", onClick: handleSendOTP, disabled: (!email && !phone) || (isLinking && linkingMethod === selectedMethod), children: isLinking && linkingMethod === selectedMethod ? (_jsx(Loader2, { className: "animate-spin" })) : ("Send Verification Code") }))] }))] }));
237
+ }, disabled: linkingMethod === method.id, children: isLinking && linkingMethod === method.id ? _jsx(Loader2, { className: "animate-spin" }) : method.label }, method.id))), availableAuthMethods.length === 0 && (_jsx("div", { className: "text-b3-foreground-muted py-8 text-center", children: "All available authentication methods have been connected" }))] })) : (_jsxs("div", { className: "space-y-4", children: [selectedMethod === "email" && (_jsxs("div", { className: "space-y-2", children: [_jsx("label", { className: "text-b3-grey font-neue-montreal-medium text-sm", children: "Email Address" }), _jsx("input", { type: "email", placeholder: "Enter your email", className: "bg-b3-line text-b3-grey font-neue-montreal-medium focus:ring-b3-primary-blue/20 w-full rounded-xl p-4 focus:outline-none focus:ring-2", value: email, onChange: e => setEmail(e.target.value), disabled: otpSent || (isLinking && linkingMethod === "email") })] })), selectedMethod === "phone" && (_jsxs("div", { className: "space-y-2", children: [_jsx("label", { className: "text-b3-grey font-neue-montreal-medium text-sm", children: "Phone Number" }), _jsx("input", { type: "tel", placeholder: "Enter your phone number", className: "bg-b3-line text-b3-grey font-neue-montreal-medium focus:ring-b3-primary-blue/20 w-full rounded-xl p-4 focus:outline-none focus:ring-2", value: phone, onChange: e => setPhone(e.target.value), disabled: otpSent || (isLinking && linkingMethod === "phone") }), _jsx("p", { className: "text-b3-foreground-muted font-neue-montreal-medium text-sm", children: "Include country code (e.g., +1 for US)" })] })), error && _jsx("div", { className: "text-b3-negative font-neue-montreal-medium py-2 text-sm", children: error }), otpSent ? (_jsxs("div", { className: "space-y-4", children: [_jsxs("div", { className: "space-y-2", children: [_jsx("label", { className: "text-b3-grey font-neue-montreal-medium text-sm", children: "Verification Code" }), _jsx("input", { type: "text", placeholder: "Enter verification code", className: "bg-b3-line text-b3-grey font-neue-montreal-medium focus:ring-b3-primary-blue/20 w-full rounded-xl p-4 focus:outline-none focus:ring-2", value: otp, onChange: e => setOtp(e.target.value) })] }), _jsx(Button, { className: "bg-b3-primary-blue hover:bg-b3-primary-blue/90 font-neue-montreal-semibold h-12 w-full text-white", onClick: handleLinkAccount, children: "Link Account" })] })) : (_jsx(Button, { className: "bg-b3-primary-blue hover:bg-b3-primary-blue/90 font-neue-montreal-semibold h-12 w-full text-white", onClick: handleSendOTP, disabled: (!email && !phone) || (isLinking && linkingMethod === selectedMethod), children: isLinking && linkingMethod === selectedMethod ? (_jsx(Loader2, { className: "animate-spin" })) : ("Send Verification Code") }))] }))] }));
225
238
  }
@@ -134,5 +134,5 @@ export function ManageAccount({ onLogout, onSwap: _onSwap, onDeposit: _onDeposit
134
134
  if (["balance", "assets", "apps", "settings"].includes(tab)) {
135
135
  setActiveTab?.(tab);
136
136
  }
137
- }, children: [_jsxs(TabsListPrimitive, { className: "font-neue-montreal-semibold text-b3-grey flex h-8 w-full items-start justify-start gap-8 border-0 text-xl md:p-4", children: [_jsx(TabTriggerPrimitive, { value: "balance", className: "data-[state=active]:text-b3-primary-blue data-[state=active]:border-b-b3-primary-blue flex-none rounded-none border-0 p-0 pb-1 text-xl leading-none tracking-wide transition-colors data-[state=active]:border-b data-[state=active]:bg-white md:pb-4", children: "Overview" }), _jsx(TabTriggerPrimitive, { value: "assets", className: "data-[state=active]:text-b3-primary-blue data-[state=active]:border-b-b3-primary-blue flex-none rounded-none border-0 p-0 pb-1 text-xl leading-none tracking-wide transition-colors data-[state=active]:border-b data-[state=active]:bg-white md:pb-4", children: "Mints" }), _jsx(TabTriggerPrimitive, { value: "apps", className: "data-[state=active]:text-b3-primary-blue data-[state=active]:border-b-b3-primary-blue flex-none rounded-none border-0 p-0 pb-1 text-xl leading-none tracking-wide transition-colors data-[state=active]:border-b data-[state=active]:bg-white md:pb-4", children: "Apps" }), _jsx(TabTriggerPrimitive, { value: "settings", className: "data-[state=active]:text-b3-primary-blue data-[state=active]:border-b-b3-primary-blue flex-none rounded-none border-0 p-0 pb-1 text-xl leading-none tracking-wide transition-colors data-[state=active]:border-b data-[state=active]:bg-white md:pb-4", children: "Settings" })] }), _jsx(TabsContentPrimitive, { value: "balance", className: "pt-4 md:p-4", children: _jsx(BalanceContent, {}) }), _jsx(TabsContentPrimitive, { value: "assets", className: "pt-4 md:p-4", children: _jsx(AssetsContent, {}) }), _jsx(TabsContentPrimitive, { value: "apps", className: "pt-4 md:p-4", children: _jsx(AppsContent, {}) }), _jsx(TabsContentPrimitive, { value: "settings", className: "pt-4 md:p-4", children: _jsx(SettingsContent, {}) })] }) }) }));
137
+ }, children: [_jsxs(TabsListPrimitive, { className: "font-neue-montreal-semibold text-b3-grey flex h-8 w-full items-start justify-start gap-8 border-0 text-xl md:p-4", children: [_jsx(TabTriggerPrimitive, { value: "balance", className: "data-[state=active]:text-b3-primary-blue data-[state=active]:border-b-b3-primary-blue flex-none rounded-none border-0 p-0 pb-1 text-xl leading-none tracking-wide transition-colors data-[state=active]:border-b data-[state=active]:bg-white md:pb-4", children: "Overview" }), _jsx(TabTriggerPrimitive, { value: "assets", className: "data-[state=active]:text-b3-primary-blue data-[state=active]:border-b-b3-primary-blue flex-none rounded-none border-0 p-0 pb-1 text-xl leading-none tracking-wide transition-colors data-[state=active]:border-b data-[state=active]:bg-white md:pb-4", children: "Mints" }), _jsx(TabTriggerPrimitive, { value: "settings", className: "data-[state=active]:text-b3-primary-blue data-[state=active]:border-b-b3-primary-blue flex-none rounded-none border-0 p-0 pb-1 text-xl leading-none tracking-wide transition-colors data-[state=active]:border-b data-[state=active]:bg-white md:pb-4", children: "Settings" })] }), _jsx(TabsContentPrimitive, { value: "balance", className: "pt-4 md:p-4", children: _jsx(BalanceContent, {}) }), _jsx(TabsContentPrimitive, { value: "assets", className: "pt-4 md:p-4", children: _jsx(AssetsContent, {}) }), _jsx(TabsContentPrimitive, { value: "apps", className: "pt-4 md:p-4", children: _jsx(AppsContent, {}) }), _jsx(TabsContentPrimitive, { value: "settings", className: "pt-4 md:p-4", children: _jsx(SettingsContent, {}) })] }) }) }));
138
138
  }
@@ -1,4 +1,5 @@
1
1
  import { B3_TOKEN } from "../../../anyspend/index.js";
2
+ import { PUBLIC_BASE_RPC_URL } from "../../../shared/constants/index.js";
2
3
  import { formatNumber } from "../../../shared/utils/formatNumber.js";
3
4
  import { useQuery } from "@tanstack/react-query";
4
5
  import { createPublicClient, formatUnits, http } from "viem";
@@ -17,7 +18,7 @@ const abi = [
17
18
  // Create a public client for Base
18
19
  const client = createPublicClient({
19
20
  chain: base,
20
- transport: http(),
21
+ transport: http(PUBLIC_BASE_RPC_URL),
21
22
  });
22
23
  async function fetchB3Balances(addresses) {
23
24
  try {
@@ -1,3 +1,4 @@
1
+ import { PUBLIC_BASE_RPC_URL } from "../../../shared/constants/index.js";
1
2
  import { b3Mainnet, b3Testnet } from "../../../shared/constants/chains/supported.js";
2
3
  import { formatNumber } from "../../../shared/utils/formatNumber.js";
3
4
  import { useQuery } from "@tanstack/react-query";
@@ -86,7 +87,7 @@ export function useNativeBalanceFromRPC(address, chainId) {
86
87
  try {
87
88
  const publicClient = createPublicClient({
88
89
  chain: chainId === 8333 ? b3Mainnet : b3Testnet,
89
- transport: http(),
90
+ transport: http(chainId === 8333 ? PUBLIC_BASE_RPC_URL : undefined),
90
91
  });
91
92
  const balance = await publicClient.getBalance({
92
93
  address: address,
@@ -5,6 +5,7 @@ export interface UnifiedTransactionParams {
5
5
  }
6
6
  export declare function useUnifiedChainSwitchAndExecute(): {
7
7
  switchChainAndExecute: (targetChainId: number, params: UnifiedTransactionParams) => Promise<string | undefined>;
8
+ switchChainAndExecuteWithEOA: (targetChainId: number, params: UnifiedTransactionParams) => Promise<string | undefined>;
8
9
  isSwitchingOrExecuting: boolean;
9
10
  isActiveSmartWallet: boolean | undefined;
10
11
  isActiveEOAWallet: boolean | undefined;
@@ -158,6 +158,7 @@ export function useUnifiedChainSwitchAndExecute() {
158
158
  }, [isActiveSmartWallet, isActiveEOAWallet, handleAASendTransaction, handleEOASwitchChainAndSendTransaction]);
159
159
  return {
160
160
  switchChainAndExecute,
161
+ switchChainAndExecuteWithEOA: handleEOASwitchChainAndSendTransaction,
161
162
  isSwitchingOrExecuting,
162
163
  isActiveSmartWallet,
163
164
  isActiveEOAWallet,
@@ -273,8 +273,8 @@ export interface AnySpendBondKitProps extends BaseModalProps {
273
273
  imageUrl?: string;
274
274
  /** Token name to display */
275
275
  tokenName?: string;
276
- /** Optional pre-filled ETH amount */
277
- ethAmount?: string;
276
+ /** Optional pre-filled B3 amount */
277
+ b3Amount?: string;
278
278
  /** Callback function called when purchase is successful */
279
279
  onSuccess?: (txHash?: string) => void;
280
280
  }
@@ -300,6 +300,8 @@ export interface AnySpendDepositHypeProps extends BaseModalProps {
300
300
  paymentType?: "crypto" | "fiat";
301
301
  /** Deposit contract address */
302
302
  depositContractAddress: string;
303
+ /** Main footer */
304
+ mainFooter?: React.ReactNode;
303
305
  /** Callback function called when the deposit is successful */
304
306
  onSuccess?: () => void;
305
307
  }
@@ -88,9 +88,9 @@ export declare const getViemChainConfig: (config: ChainNetworks) => {
88
88
  readonly rpc: string;
89
89
  readonly icon: {
90
90
  format: string;
91
- url: string;
92
- width: number;
93
91
  height: number;
92
+ width: number;
93
+ url: string;
94
94
  };
95
95
  };
96
96
  export declare const thirdwebB3Testnet: ThirdwebChain;
@@ -10,9 +10,9 @@ export declare const supportedChainNetworks: {
10
10
  testnet?: boolean | undefined;
11
11
  fees?: Record<string, any> | undefined;
12
12
  formatters?: Record<string, any> | undefined;
13
+ color?: string | undefined;
13
14
  testnetConfigID?: number | undefined;
14
15
  badge?: string | undefined;
15
- color?: string | undefined;
16
16
  enabledFeatures?: string[] | undefined;
17
17
  blockExplorers: {
18
18
  default: string;
@@ -35,13 +35,13 @@ export declare const supportedChainNetworks: {
35
35
  uri: string;
36
36
  }[];
37
37
  };
38
- _id: string | {};
39
38
  icon: {
40
39
  format: string;
41
- url: string;
42
- width: number;
43
40
  height: number;
41
+ width: number;
42
+ url: string;
44
43
  };
44
+ _id: string | {};
45
45
  }[];
46
46
  export declare const coingeckoChains: Record<number, {
47
47
  coingecko_id: string;
@@ -14,3 +14,4 @@ export declare const THIRDWEB_CLIENT_ID: string;
14
14
  export declare const CLIENT_APP_BUNDLE_ID: string;
15
15
  export declare const B3_AUTH_COOKIE_NAME = "b3-auth";
16
16
  export declare const ENS_GATEWAY_URL = "https://ens-gateway.b3.fun/";
17
+ export declare const PUBLIC_BASE_RPC_URL = "https://base-rpc.publicnode.com";
@@ -19,3 +19,4 @@ export const THIRDWEB_CLIENT_ID = process.env.NEXT_PUBLIC_THIRDWEB_CLIENT_ID ||
19
19
  export const CLIENT_APP_BUNDLE_ID = process.env.EXPO_PUBLIC_B3_BUNDLE_ID || "";
20
20
  export const B3_AUTH_COOKIE_NAME = "b3-auth";
21
21
  export const ENS_GATEWAY_URL = "https://ens-gateway.b3.fun/";
22
+ export const PUBLIC_BASE_RPC_URL = "https://base-rpc.publicnode.com";