@b3dotfun/sdk 0.0.56 → 0.0.57-test.0

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.
@@ -78,7 +78,6 @@ export interface paths {
78
78
  /**
79
79
  * Get Coinbase onramp options
80
80
  * @description Retrieves available Coinbase onramp configuration options.
81
- *
82
81
  */
83
82
  get: {
84
83
  parameters: {
@@ -288,12 +287,12 @@ export interface paths {
288
287
  */
289
288
  get: {
290
289
  parameters: {
291
- query?: {
290
+ query: {
292
291
  /**
293
- * @description Optional address of the order creator (if not provided, returns all orders)
292
+ * @description Address of the order creator
294
293
  * @example 0x58241893EF1f86C9fBd8109Cd44Ea961fDb474e1
295
294
  */
296
- creatorAddress?: string;
295
+ creatorAddress: string;
297
296
  /**
298
297
  * @description Maximum number of orders to return
299
298
  * @example 20
@@ -59,7 +59,7 @@ exports.EVM_MAINNET = {
59
59
  name: "Arbitrum",
60
60
  type: chain_1.ChainType.EVM,
61
61
  logoUrl: "https://assets.relay.link/icons/square/42161/light.png",
62
- nativeRequired: (0, viem_1.parseEther)("0.0003"),
62
+ nativeRequired: (0, viem_1.parseEther)("0.0001"),
63
63
  canDepositNative: true,
64
64
  defaultToken: (0, token_1.getEthToken)(chains_1.arbitrum.id),
65
65
  nativeToken: (0, token_1.getEthToken)(chains_1.arbitrum.id),
@@ -104,7 +104,7 @@ exports.EVM_MAINNET = {
104
104
  name: chains_1.polygon.name,
105
105
  logoUrl: "https://assets.relay.link/icons/square/137/light.png",
106
106
  type: chain_1.ChainType.EVM,
107
- nativeRequired: (0, viem_1.parseEther)("0.1"),
107
+ nativeRequired: (0, viem_1.parseEther)("0.5"),
108
108
  canDepositNative: true,
109
109
  defaultToken: (0, token_1.getPolToken)(),
110
110
  nativeToken: (0, token_1.getPolToken)(),
@@ -164,7 +164,7 @@ exports.EVM_MAINNET = {
164
164
  name: chains_1.abstract.name,
165
165
  logoUrl: "https://assets.relay.link/icons/square/2741/light.png",
166
166
  type: chain_1.ChainType.EVM,
167
- nativeRequired: (0, viem_1.parseEther)("0.0001"),
167
+ nativeRequired: (0, viem_1.parseEther)("0.0002"),
168
168
  canDepositNative: true,
169
169
  defaultToken: (0, token_1.getEthToken)(chains_1.abstract.id),
170
170
  nativeToken: (0, token_1.getEthToken)(chains_1.abstract.id),
@@ -9,13 +9,13 @@ const anyspend_1 = require("../../../../anyspend");
9
9
  const ChainTokenIcon_1 = require("../../../../anyspend/react/components/common/ChainTokenIcon");
10
10
  const react_1 = require("../../../../global-account/react");
11
11
  const number_1 = require("../../../../shared/utils/number");
12
+ const invariant_1 = __importDefault(require("invariant"));
12
13
  const lucide_react_1 = require("lucide-react");
13
14
  const react_2 = require("react");
14
15
  const react_number_format_1 = require("react-number-format");
15
16
  const sonner_1 = require("sonner");
16
17
  const react_3 = require("thirdweb/react");
17
18
  const viem_1 = require("viem");
18
- const invariant_1 = __importDefault(require("invariant"));
19
19
  // Panel view enum for managing navigation between token list and send form
20
20
  var TokenPanelView;
21
21
  (function (TokenPanelView) {
@@ -134,11 +134,12 @@ function ContentTokens({ activeTab }) {
134
134
  };
135
135
  // Execute token transfer transaction
136
136
  const handleSend = async () => {
137
- if (!displayToken || !recipientAddress || !sendAmount || parseFloat(sendAmount) <= 0) {
137
+ const sendAmountWithoutCommas = sendAmount.replace(/,/g, "");
138
+ if (!displayToken || !recipientAddress || !sendAmount || parseFloat(sendAmountWithoutCommas) <= 0) {
138
139
  return;
139
140
  }
140
141
  setIsSending(true);
141
- const amountInWei = (0, viem_1.parseUnits)(sendAmount, displayToken.decimals);
142
+ const amountInWei = (0, viem_1.parseUnits)(sendAmountWithoutCommas, displayToken.decimals);
142
143
  // Prepare analytics event data
143
144
  const analyticsData = {
144
145
  amount: sendAmount,
@@ -64,7 +64,7 @@ function LoginStepCustom({ onSuccess, onError, chain, strategies, maxInitialWall
64
64
  setIsAuthenticating(false);
65
65
  }
66
66
  };
67
- return ((0, jsx_runtime_1.jsxs)(react_1.LoginStepContainer, { partnerId: partnerId, children: [authStrategies.length > 0 && ((0, jsx_runtime_1.jsx)("div", { className: "mb-6 grid w-full grid-cols-4 gap-4", children: authStrategies.map(strategy => {
67
+ return ((0, jsx_runtime_1.jsxs)(react_1.LoginStepContainer, { partnerId: partnerId, children: [authStrategies.length > 0 && ((0, jsx_runtime_1.jsx)("div", { className: `mb-6 w-full ${authStrategies.length <= 3 ? "space-y-3 px-3" : "grid grid-cols-4 gap-4"}`, children: authStrategies.map(strategy => {
68
68
  console.log("strategy", strategy);
69
69
  return ((0, jsx_runtime_1.jsx)(react_1.AuthButton, { strategy: strategy, onClick: () => handleConnect(strategy), isLoading: isLoading }, strategy));
70
70
  }) })), (0, jsx_runtime_1.jsx)("div", { className: "mb-4 w-full space-y-2", children: initialWallets.map(walletId => ((0, jsx_runtime_1.jsx)(react_1.WalletRow, { walletId: walletId, onClick: () => handleConnect(walletId), isLoading: isLoading }, walletId))) }), additionalWallets.length > 0 && ((0, jsx_runtime_1.jsxs)("div", { className: "w-full", children: [(0, jsx_runtime_1.jsx)(react_1.Button, { onClick: () => setShowAllWallets(!showAllWallets), className: "mb-2 w-full bg-transparent text-gray-600 hover:bg-gray-100", children: showAllWallets ? "Show less" : "More options" }), showAllWallets && ((0, jsx_runtime_1.jsx)("div", { className: "max-h-60 space-y-2 overflow-y-auto", children: additionalWallets.map(walletId => ((0, jsx_runtime_1.jsx)(react_1.WalletRow, { walletId: walletId, onClick: () => handleConnect(walletId), isLoading: isLoading }, walletId))) }))] }))] }));
@@ -78,7 +78,6 @@ export interface paths {
78
78
  /**
79
79
  * Get Coinbase onramp options
80
80
  * @description Retrieves available Coinbase onramp configuration options.
81
- *
82
81
  */
83
82
  get: {
84
83
  parameters: {
@@ -288,12 +287,12 @@ export interface paths {
288
287
  */
289
288
  get: {
290
289
  parameters: {
291
- query?: {
290
+ query: {
292
291
  /**
293
- * @description Optional address of the order creator (if not provided, returns all orders)
292
+ * @description Address of the order creator
294
293
  * @example 0x58241893EF1f86C9fBd8109Cd44Ea961fDb474e1
295
294
  */
296
- creatorAddress?: string;
295
+ creatorAddress: string;
297
296
  /**
298
297
  * @description Maximum number of orders to return
299
298
  * @example 20
@@ -35,7 +35,7 @@ export const EVM_MAINNET = {
35
35
  name: "Arbitrum",
36
36
  type: ChainType.EVM,
37
37
  logoUrl: "https://assets.relay.link/icons/square/42161/light.png",
38
- nativeRequired: parseEther("0.0003"),
38
+ nativeRequired: parseEther("0.0001"),
39
39
  canDepositNative: true,
40
40
  defaultToken: getEthToken(arbitrum.id),
41
41
  nativeToken: getEthToken(arbitrum.id),
@@ -80,7 +80,7 @@ export const EVM_MAINNET = {
80
80
  name: polygon.name,
81
81
  logoUrl: "https://assets.relay.link/icons/square/137/light.png",
82
82
  type: ChainType.EVM,
83
- nativeRequired: parseEther("0.1"),
83
+ nativeRequired: parseEther("0.5"),
84
84
  canDepositNative: true,
85
85
  defaultToken: getPolToken(),
86
86
  nativeToken: getPolToken(),
@@ -140,7 +140,7 @@ export const EVM_MAINNET = {
140
140
  name: abstract.name,
141
141
  logoUrl: "https://assets.relay.link/icons/square/2741/light.png",
142
142
  type: ChainType.EVM,
143
- nativeRequired: parseEther("0.0001"),
143
+ nativeRequired: parseEther("0.0002"),
144
144
  canDepositNative: true,
145
145
  defaultToken: getEthToken(abstract.id),
146
146
  nativeToken: getEthToken(abstract.id),
@@ -3,13 +3,13 @@ import { ALL_CHAINS, getExplorerTxUrl } from "../../../../anyspend/index.js";
3
3
  import { ChainTokenIcon } from "../../../../anyspend/react/components/common/ChainTokenIcon.js";
4
4
  import { Button, TransitionPanel, useAnalytics, useSimBalance, useUnifiedChainSwitchAndExecute, } from "../../../../global-account/react/index.js";
5
5
  import { formatDisplayNumber, formatTokenAmount } from "../../../../shared/utils/number.js";
6
+ import invariant from "invariant";
6
7
  import { ArrowLeft, CircleHelp, Copy, Loader2, Send } from "lucide-react";
7
8
  import { useEffect, useMemo, useRef, useState } from "react";
8
9
  import { NumericFormat } from "react-number-format";
9
10
  import { toast } from "sonner";
10
11
  import { useActiveAccount } from "thirdweb/react";
11
12
  import { encodeFunctionData, erc20Abi, isAddress, parseUnits } from "viem";
12
- import invariant from "invariant";
13
13
  // Panel view enum for managing navigation between token list and send form
14
14
  var TokenPanelView;
15
15
  (function (TokenPanelView) {
@@ -128,11 +128,12 @@ export function ContentTokens({ activeTab }) {
128
128
  };
129
129
  // Execute token transfer transaction
130
130
  const handleSend = async () => {
131
- if (!displayToken || !recipientAddress || !sendAmount || parseFloat(sendAmount) <= 0) {
131
+ const sendAmountWithoutCommas = sendAmount.replace(/,/g, "");
132
+ if (!displayToken || !recipientAddress || !sendAmount || parseFloat(sendAmountWithoutCommas) <= 0) {
132
133
  return;
133
134
  }
134
135
  setIsSending(true);
135
- const amountInWei = parseUnits(sendAmount, displayToken.decimals);
136
+ const amountInWei = parseUnits(sendAmountWithoutCommas, displayToken.decimals);
136
137
  // Prepare analytics event data
137
138
  const analyticsData = {
138
139
  amount: sendAmount,
@@ -61,7 +61,7 @@ export function LoginStepCustom({ onSuccess, onError, chain, strategies, maxInit
61
61
  setIsAuthenticating(false);
62
62
  }
63
63
  };
64
- return (_jsxs(LoginStepContainer, { partnerId: partnerId, children: [authStrategies.length > 0 && (_jsx("div", { className: "mb-6 grid w-full grid-cols-4 gap-4", children: authStrategies.map(strategy => {
64
+ return (_jsxs(LoginStepContainer, { partnerId: partnerId, children: [authStrategies.length > 0 && (_jsx("div", { className: `mb-6 w-full ${authStrategies.length <= 3 ? "space-y-3 px-3" : "grid grid-cols-4 gap-4"}`, children: authStrategies.map(strategy => {
65
65
  console.log("strategy", strategy);
66
66
  return (_jsx(AuthButton, { strategy: strategy, onClick: () => handleConnect(strategy), isLoading: isLoading }, strategy));
67
67
  }) })), _jsx("div", { className: "mb-4 w-full space-y-2", children: initialWallets.map(walletId => (_jsx(WalletRow, { walletId: walletId, onClick: () => handleConnect(walletId), isLoading: isLoading }, walletId))) }), additionalWallets.length > 0 && (_jsxs("div", { className: "w-full", children: [_jsx(Button, { onClick: () => setShowAllWallets(!showAllWallets), className: "mb-2 w-full bg-transparent text-gray-600 hover:bg-gray-100", children: showAllWallets ? "Show less" : "More options" }), showAllWallets && (_jsx("div", { className: "max-h-60 space-y-2 overflow-y-auto", children: additionalWallets.map(walletId => (_jsx(WalletRow, { walletId: walletId, onClick: () => handleConnect(walletId), isLoading: isLoading }, walletId))) }))] }))] }));
@@ -78,7 +78,6 @@ export interface paths {
78
78
  /**
79
79
  * Get Coinbase onramp options
80
80
  * @description Retrieves available Coinbase onramp configuration options.
81
- *
82
81
  */
83
82
  get: {
84
83
  parameters: {
@@ -288,12 +287,12 @@ export interface paths {
288
287
  */
289
288
  get: {
290
289
  parameters: {
291
- query?: {
290
+ query: {
292
291
  /**
293
- * @description Optional address of the order creator (if not provided, returns all orders)
292
+ * @description Address of the order creator
294
293
  * @example 0x58241893EF1f86C9fBd8109Cd44Ea961fDb474e1
295
294
  */
296
- creatorAddress?: string;
295
+ creatorAddress: string;
297
296
  /**
298
297
  * @description Maximum number of orders to return
299
298
  * @example 20
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@b3dotfun/sdk",
3
- "version": "0.0.56",
3
+ "version": "0.0.57-test.0",
4
4
  "source": "src/index.ts",
5
5
  "main": "./dist/cjs/index.js",
6
6
  "react-native": "./dist/cjs/index.native.js",
@@ -277,7 +277,7 @@
277
277
  "constants"
278
278
  ],
279
279
  "dependencies": {
280
- "@b3dotfun/b3-api": "0.0.66",
280
+ "@b3dotfun/b3-api": "0.0.76",
281
281
  "@b3dotfun/basement-api": "0.0.11",
282
282
  "@feathersjs/authentication-client": "5.0.33",
283
283
  "@feathersjs/feathers": "5.0.33",
@@ -79,7 +79,6 @@ export interface paths {
79
79
  /**
80
80
  * Get Coinbase onramp options
81
81
  * @description Retrieves available Coinbase onramp configuration options.
82
- *
83
82
  */
84
83
  get: {
85
84
  parameters: {
@@ -289,12 +288,12 @@ export interface paths {
289
288
  */
290
289
  get: {
291
290
  parameters: {
292
- query?: {
291
+ query: {
293
292
  /**
294
- * @description Optional address of the order creator (if not provided, returns all orders)
293
+ * @description Address of the order creator
295
294
  * @example 0x58241893EF1f86C9fBd8109Cd44Ea961fDb474e1
296
295
  */
297
- creatorAddress?: string;
296
+ creatorAddress: string;
298
297
  /**
299
298
  * @description Maximum number of orders to return
300
299
  * @example 20
@@ -53,7 +53,7 @@ export const EVM_MAINNET: Record<number, IEVMChain> = {
53
53
  name: "Arbitrum",
54
54
  type: ChainType.EVM,
55
55
  logoUrl: "https://assets.relay.link/icons/square/42161/light.png",
56
- nativeRequired: parseEther("0.0003"),
56
+ nativeRequired: parseEther("0.0001"),
57
57
  canDepositNative: true,
58
58
  defaultToken: getEthToken(arbitrum.id),
59
59
  nativeToken: getEthToken(arbitrum.id),
@@ -107,7 +107,7 @@ export const EVM_MAINNET: Record<number, IEVMChain> = {
107
107
  name: polygon.name,
108
108
  logoUrl: "https://assets.relay.link/icons/square/137/light.png",
109
109
  type: ChainType.EVM,
110
- nativeRequired: parseEther("0.1"),
110
+ nativeRequired: parseEther("0.5"),
111
111
  canDepositNative: true,
112
112
  defaultToken: getPolToken(),
113
113
  nativeToken: getPolToken(),
@@ -176,7 +176,7 @@ export const EVM_MAINNET: Record<number, IEVMChain> = {
176
176
  name: abstract.name,
177
177
  logoUrl: "https://assets.relay.link/icons/square/2741/light.png",
178
178
  type: ChainType.EVM,
179
- nativeRequired: parseEther("0.0001"),
179
+ nativeRequired: parseEther("0.0002"),
180
180
  canDepositNative: true,
181
181
  defaultToken: getEthToken(abstract.id),
182
182
  nativeToken: getEthToken(abstract.id),
@@ -8,6 +8,7 @@ import {
8
8
  useUnifiedChainSwitchAndExecute,
9
9
  } from "@b3dotfun/sdk/global-account/react";
10
10
  import { formatDisplayNumber, formatTokenAmount } from "@b3dotfun/sdk/shared/utils/number";
11
+ import invariant from "invariant";
11
12
  import { ArrowLeft, CircleHelp, Copy, Loader2, Send } from "lucide-react";
12
13
  import { useEffect, useMemo, useRef, useState } from "react";
13
14
  import { NumericFormat } from "react-number-format";
@@ -15,7 +16,6 @@ import { toast } from "sonner";
15
16
  import { useActiveAccount } from "thirdweb/react";
16
17
  import { encodeFunctionData, erc20Abi, isAddress, parseUnits } from "viem";
17
18
  import { SimBalanceItem } from "../../hooks/useSimBalance";
18
- import invariant from "invariant";
19
19
 
20
20
  // Panel view enum for managing navigation between token list and send form
21
21
  enum TokenPanelView {
@@ -156,13 +156,15 @@ export function ContentTokens({ activeTab }: ContentTokensProps) {
156
156
 
157
157
  // Execute token transfer transaction
158
158
  const handleSend = async () => {
159
- if (!displayToken || !recipientAddress || !sendAmount || parseFloat(sendAmount) <= 0) {
159
+ const sendAmountWithoutCommas = sendAmount.replace(/,/g, "");
160
+
161
+ if (!displayToken || !recipientAddress || !sendAmount || parseFloat(sendAmountWithoutCommas) <= 0) {
160
162
  return;
161
163
  }
162
164
 
163
165
  setIsSending(true);
164
166
 
165
- const amountInWei = parseUnits(sendAmount, displayToken.decimals);
167
+ const amountInWei = parseUnits(sendAmountWithoutCommas, displayToken.decimals);
166
168
 
167
169
  // Prepare analytics event data
168
170
  const analyticsData = {
@@ -97,7 +97,7 @@ export function LoginStepCustom({
97
97
  <LoginStepContainer partnerId={partnerId}>
98
98
  {/* Auth Strategies */}
99
99
  {authStrategies.length > 0 && (
100
- <div className="mb-6 grid w-full grid-cols-4 gap-4">
100
+ <div className={`mb-6 w-full ${authStrategies.length <= 3 ? "space-y-3 px-3" : "grid grid-cols-4 gap-4"}`}>
101
101
  {authStrategies.map(strategy => {
102
102
  console.log("strategy", strategy);
103
103
  return (