@b3dotfun/sdk 0.0.1-alpha.19 → 0.0.1-alpha.2
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 +230 -328
- package/dist/cjs/anyspend/react/components/AnySpend.d.ts +1 -2
- package/dist/cjs/anyspend/react/components/AnySpend.js +4 -4
- package/dist/cjs/anyspend/react/components/AnySpendBuySpin.d.ts +1 -2
- package/dist/cjs/anyspend/react/components/AnySpendBuySpin.js +50 -123
- package/dist/cjs/anyspend/react/components/common/OrderHistoryItem.js +1 -5
- package/dist/cjs/anyspend/react/components/common/TokenBalance.js +1 -1
- package/dist/cjs/anyspend/utils/chain.js +0 -3
- package/dist/cjs/global-account/react/components/B3DynamicModal.js +2 -2
- package/dist/{esm/global-account/react/components/B3Provider → cjs/global-account/react/components}/B3Provider.d.ts +29 -3
- package/dist/cjs/global-account/react/components/{B3Provider/B3Provider.js → B3Provider.js} +34 -6
- package/dist/cjs/global-account/react/components/{B3Provider/B3Provider.native.d.ts → B3Provider.native.d.ts} +25 -2
- package/dist/cjs/global-account/react/components/{B3Provider/B3Provider.native.js → B3Provider.native.js} +28 -5
- package/dist/cjs/global-account/react/components/StyleRoot.js +2 -2
- package/dist/cjs/global-account/react/components/index.d.ts +6 -8
- package/dist/cjs/global-account/react/components/index.js +16 -18
- package/dist/cjs/global-account/react/hooks/index.d.ts +1 -1
- package/dist/cjs/global-account/react/hooks/index.js +1 -2
- package/dist/cjs/global-account/react/hooks/useBestTransactionPath.js +3 -3
- package/dist/cjs/global-account/react/hooks/useTokenBalance.js +1 -1
- package/dist/cjs/global-account/react/stores/useModalStore.d.ts +0 -2
- package/dist/cjs/global-account/types/chain-networks.d.ts +34 -34
- package/dist/cjs/global-account/types/feature-flags.d.ts +5 -5
- package/dist/cjs/shared/constants/chains/b3Chain.d.ts +1 -1
- package/dist/cjs/shared/constants/chains/supported.d.ts +7 -8
- package/dist/cjs/shared/constants/chains/supported.js +1 -8
- package/dist/cjs/shared/utils/chains.js +0 -4
- package/dist/cjs/shared/utils/number.js +1 -1
- package/dist/cjs/styles/index.d.ts +20 -0
- package/dist/cjs/styles/index.js +22 -0
- package/dist/esm/anyspend/react/components/AnySpend.d.ts +1 -2
- package/dist/esm/anyspend/react/components/AnySpend.js +4 -4
- package/dist/esm/anyspend/react/components/AnySpendBuySpin.d.ts +1 -2
- package/dist/esm/anyspend/react/components/AnySpendBuySpin.js +50 -123
- package/dist/esm/anyspend/react/components/common/OrderHistoryItem.js +1 -5
- package/dist/esm/anyspend/react/components/common/TokenBalance.js +1 -1
- package/dist/esm/anyspend/utils/chain.js +0 -3
- package/dist/esm/global-account/react/components/B3DynamicModal.js +1 -1
- package/dist/{cjs/global-account/react/components/B3Provider → esm/global-account/react/components}/B3Provider.d.ts +29 -3
- package/dist/esm/global-account/react/components/{B3Provider/B3Provider.js → B3Provider.js} +32 -5
- package/dist/esm/global-account/react/components/{B3Provider/B3Provider.native.d.ts → B3Provider.native.d.ts} +25 -2
- package/dist/esm/global-account/react/components/{B3Provider/B3Provider.native.js → B3Provider.native.js} +26 -5
- package/dist/esm/global-account/react/components/StyleRoot.js +1 -1
- package/dist/esm/global-account/react/components/index.d.ts +6 -8
- package/dist/esm/global-account/react/components/index.js +5 -7
- package/dist/esm/global-account/react/hooks/index.d.ts +1 -1
- package/dist/esm/global-account/react/hooks/index.js +1 -1
- package/dist/esm/global-account/react/hooks/useBestTransactionPath.js +3 -3
- package/dist/esm/global-account/react/hooks/useTokenBalance.js +1 -1
- package/dist/esm/global-account/react/stores/useModalStore.d.ts +0 -2
- package/dist/esm/global-account/types/chain-networks.d.ts +34 -34
- package/dist/esm/global-account/types/feature-flags.d.ts +5 -5
- package/dist/esm/shared/constants/chains/b3Chain.d.ts +1 -1
- package/dist/esm/shared/constants/chains/supported.d.ts +7 -8
- package/dist/esm/shared/constants/chains/supported.js +0 -7
- package/dist/esm/shared/utils/chains.js +0 -4
- package/dist/esm/shared/utils/number.js +1 -1
- package/dist/esm/styles/index.d.ts +20 -0
- package/dist/esm/styles/index.js +20 -0
- package/dist/styles/index.css +1 -1
- package/dist/types/anyspend/react/components/AnySpend.d.ts +1 -2
- package/dist/types/anyspend/react/components/AnySpendBuySpin.d.ts +1 -2
- package/dist/types/global-account/react/components/{B3Provider/B3Provider.d.ts → B3Provider.d.ts} +28 -2
- package/dist/types/global-account/react/components/{B3Provider/B3Provider.native.d.ts → B3Provider.native.d.ts} +24 -1
- package/dist/types/global-account/react/components/index.d.ts +6 -8
- package/dist/types/global-account/react/hooks/index.d.ts +1 -1
- package/dist/types/global-account/react/stores/useModalStore.d.ts +0 -2
- package/dist/types/global-account/types/chain-networks.d.ts +34 -34
- package/dist/types/global-account/types/feature-flags.d.ts +5 -5
- package/dist/types/shared/constants/chains/b3Chain.d.ts +1 -1
- package/dist/types/shared/constants/chains/supported.d.ts +7 -8
- package/dist/types/styles/index.d.ts +20 -0
- package/package.json +24 -26
- package/src/anyspend/react/components/AnySpend.tsx +5 -6
- package/src/anyspend/react/components/AnySpendBuySpin.tsx +179 -232
- package/src/anyspend/react/components/common/OrderHistoryItem.tsx +1 -5
- package/src/anyspend/react/components/common/TokenBalance.tsx +1 -1
- package/src/anyspend/utils/chain.ts +0 -3
- package/src/global-account/react/components/B3DynamicModal.tsx +1 -1
- package/src/global-account/react/components/{B3Provider/B3Provider.native.tsx → B3Provider.native.tsx} +45 -4
- package/src/global-account/react/components/{B3Provider/B3Provider.tsx → B3Provider.tsx} +53 -4
- package/src/global-account/react/components/StyleRoot.tsx +1 -1
- package/src/global-account/react/components/index.ts +6 -8
- package/src/global-account/react/hooks/index.ts +1 -1
- package/src/global-account/react/hooks/useBestTransactionPath.tsx +3 -3
- package/src/global-account/react/hooks/useTokenBalance.tsx +1 -1
- package/src/global-account/react/stores/useModalStore.ts +0 -2
- package/src/shared/constants/chains/supported.ts +4 -12
- package/src/shared/utils/chains.ts +1 -4
- package/src/shared/utils/number.ts +1 -1
- package/src/styles/index.ts +24 -0
- package/dist/cjs/anyspend/index.native.d.ts +0 -13
- package/dist/cjs/anyspend/index.native.js +0 -35
- package/dist/cjs/global-account/react/components/B3Provider/types.d.ts +0 -25
- package/dist/cjs/global-account/react/components/B3Provider/types.js +0 -20
- package/dist/cjs/global-account/react/components/B3Provider/useB3.d.ts +0 -5
- package/dist/cjs/global-account/react/components/B3Provider/useB3.js +0 -17
- package/dist/cjs/global-account/react/index.native.d.ts +0 -7
- package/dist/cjs/global-account/react/index.native.js +0 -21
- package/dist/esm/anyspend/index.native.d.ts +0 -13
- package/dist/esm/anyspend/index.native.js +0 -19
- package/dist/esm/global-account/react/components/B3Provider/types.d.ts +0 -25
- package/dist/esm/global-account/react/components/B3Provider/types.js +0 -17
- package/dist/esm/global-account/react/components/B3Provider/useB3.d.ts +0 -5
- package/dist/esm/global-account/react/components/B3Provider/useB3.js +0 -14
- package/dist/esm/global-account/react/index.native.d.ts +0 -7
- package/dist/esm/global-account/react/index.native.js +0 -11
- package/dist/types/anyspend/index.native.d.ts +0 -13
- package/dist/types/global-account/react/components/B3Provider/types.d.ts +0 -25
- package/dist/types/global-account/react/components/B3Provider/useB3.d.ts +0 -5
- package/dist/types/global-account/react/index.native.d.ts +0 -7
- package/src/anyspend/index.native.ts +0 -24
- package/src/global-account/react/components/B3Provider/types.ts +0 -40
- package/src/global-account/react/components/B3Provider/useB3.ts +0 -17
- package/src/global-account/react/index.native.ts +0 -14
package/package.json
CHANGED
|
@@ -1,29 +1,34 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@b3dotfun/sdk",
|
|
3
|
-
"version": "0.0.1-alpha.
|
|
3
|
+
"version": "0.0.1-alpha.2",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"react-native": "./dist/cjs/index.native.js",
|
|
7
7
|
"module": "./dist/esm/index.js",
|
|
8
8
|
"types": "./dist/types/index.d.ts",
|
|
9
9
|
"exports": {
|
|
10
|
-
"./
|
|
10
|
+
"./styles": "./dist/types/styles/index.d.ts",
|
|
11
|
+
".": {
|
|
12
|
+
"react-native": {
|
|
13
|
+
"types": "./dist/types/global-account/index.native.d.ts",
|
|
14
|
+
"import": "./dist/esm/global-account/index.native.js",
|
|
15
|
+
"require": "./dist/cjs/global-account/index.native.js"
|
|
16
|
+
},
|
|
17
|
+
"default": {
|
|
18
|
+
"types": "./dist/types/global-account/index.d.ts",
|
|
19
|
+
"import": "./dist/esm/global-account/index.js",
|
|
20
|
+
"require": "./dist/cjs/global-account/index.js"
|
|
21
|
+
}
|
|
22
|
+
},
|
|
11
23
|
"./anyspend": {
|
|
12
24
|
"types": "./dist/types/anyspend/index.d.ts",
|
|
13
25
|
"import": "./dist/esm/anyspend/index.js",
|
|
14
26
|
"require": "./dist/cjs/anyspend/index.js"
|
|
15
27
|
},
|
|
16
28
|
"./anyspend/react": {
|
|
17
|
-
"
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
"require": "./dist/cjs/anyspend/react/index.native.js"
|
|
21
|
-
},
|
|
22
|
-
"default": {
|
|
23
|
-
"types": "./dist/types/anyspend/react/index.d.ts",
|
|
24
|
-
"import": "./dist/esm/anyspend/react/index.js",
|
|
25
|
-
"require": "./dist/cjs/anyspend/react/index.js"
|
|
26
|
-
}
|
|
29
|
+
"types": "./dist/types/anyspend/react/index.d.ts",
|
|
30
|
+
"import": "./dist/esm/anyspend/react/index.js",
|
|
31
|
+
"require": "./dist/cjs/anyspend/react/index.js"
|
|
27
32
|
},
|
|
28
33
|
"./anyspend/types": {
|
|
29
34
|
"types": "./dist/types/anyspend/types/index.d.ts",
|
|
@@ -68,16 +73,9 @@
|
|
|
68
73
|
}
|
|
69
74
|
},
|
|
70
75
|
"./global-account/react": {
|
|
71
|
-
"
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
"require": "./dist/cjs/global-account/react/index.native.js"
|
|
75
|
-
},
|
|
76
|
-
"default": {
|
|
77
|
-
"types": "./dist/types/global-account/react/index.d.ts",
|
|
78
|
-
"import": "./dist/esm/global-account/react/index.js",
|
|
79
|
-
"require": "./dist/cjs/global-account/react/index.js"
|
|
80
|
-
}
|
|
76
|
+
"types": "./dist/types/global-account/react/index.d.ts",
|
|
77
|
+
"import": "./dist/esm/global-account/react/index.js",
|
|
78
|
+
"require": "./dist/cjs/global-account/react/index.js"
|
|
81
79
|
},
|
|
82
80
|
"./global-account/types": {
|
|
83
81
|
"types": "./dist/types/global-account/types.d.ts",
|
|
@@ -170,7 +168,7 @@
|
|
|
170
168
|
"dependencies": {
|
|
171
169
|
"@amplitude/analytics-browser": "2.14.0",
|
|
172
170
|
"@b3dotfun/b3-api": "0.0.21",
|
|
173
|
-
"@b3dotfun/basement-api": "0.0.
|
|
171
|
+
"@b3dotfun/basement-api": "0.0.10",
|
|
174
172
|
"@chakra-ui/react": "2.10.7",
|
|
175
173
|
"@feathersjs/authentication-client": "5.0.33",
|
|
176
174
|
"@feathersjs/feathers": "5.0.33",
|
|
@@ -215,14 +213,14 @@
|
|
|
215
213
|
"vaul": "^1.1.2",
|
|
216
214
|
"viem": "2.27.2",
|
|
217
215
|
"wagmi": "2.14.15",
|
|
218
|
-
"zustand": "4.5.6"
|
|
219
|
-
"zod": "3.25.51"
|
|
216
|
+
"zustand": "4.5.6"
|
|
220
217
|
},
|
|
221
218
|
"devDependencies": {
|
|
222
219
|
"@feathersjs/authentication-client": "5.0.33",
|
|
223
220
|
"@feathersjs/feathers": "5.0.33",
|
|
224
221
|
"@feathersjs/socketio-client": "5.0.33",
|
|
225
222
|
"@feathersjs/typebox": "5.0.33",
|
|
223
|
+
"@privy-io/react-auth": "2.8.0",
|
|
226
224
|
"@types/big.js": "^6.2.2",
|
|
227
225
|
"@types/invariant": "2.2.37",
|
|
228
226
|
"@types/js-cookie": "3.0.6",
|
|
@@ -255,7 +253,7 @@
|
|
|
255
253
|
}
|
|
256
254
|
},
|
|
257
255
|
"peerDependencies": {
|
|
258
|
-
"@privy-io/react-auth": "
|
|
256
|
+
"@privy-io/react-auth": "*",
|
|
259
257
|
"@react-three/postprocessing": "2.16.6",
|
|
260
258
|
"@readyplayerme/visage": "6.10.0",
|
|
261
259
|
"@tanstack/react-query": "5.55.0",
|
|
@@ -15,6 +15,7 @@ import {
|
|
|
15
15
|
ShinyButton,
|
|
16
16
|
StyleRoot,
|
|
17
17
|
TransitionPanel,
|
|
18
|
+
useAccountAssets,
|
|
18
19
|
useAccountWallet,
|
|
19
20
|
useOnchainName,
|
|
20
21
|
useRouter,
|
|
@@ -22,8 +23,8 @@ import {
|
|
|
22
23
|
useTokenData,
|
|
23
24
|
useTokenFromUrl
|
|
24
25
|
} from "@b3dotfun/sdk/global-account/react";
|
|
25
|
-
import { cn } from "@b3dotfun/sdk/shared/utils/cn";
|
|
26
26
|
import { shortenAddress } from "@b3dotfun/sdk/shared/utils/formatAddress";
|
|
27
|
+
import { cn } from "@b3dotfun/sdk/shared/utils/cn";
|
|
27
28
|
import { formatDisplayNumber, formatTokenAmount } from "@b3dotfun/sdk/shared/utils/number";
|
|
28
29
|
import { motion } from "framer-motion";
|
|
29
30
|
import invariant from "invariant";
|
|
@@ -65,8 +66,7 @@ export function AnySpend({
|
|
|
65
66
|
mode = "modal",
|
|
66
67
|
defaultActiveTab = "crypto",
|
|
67
68
|
loadOrder,
|
|
68
|
-
hideTransactionHistoryButton
|
|
69
|
-
recipientAddress: recipientAddressFromProps
|
|
69
|
+
hideTransactionHistoryButton
|
|
70
70
|
}: {
|
|
71
71
|
destinationTokenAddress?: string;
|
|
72
72
|
destinationTokenChainId?: number;
|
|
@@ -75,7 +75,6 @@ export function AnySpend({
|
|
|
75
75
|
defaultActiveTab?: "crypto" | "fiat";
|
|
76
76
|
loadOrder?: string;
|
|
77
77
|
hideTransactionHistoryButton?: boolean;
|
|
78
|
-
recipientAddress?: string;
|
|
79
78
|
}) {
|
|
80
79
|
const searchParams = useSearchParamsSSR();
|
|
81
80
|
const router = useRouter();
|
|
@@ -375,8 +374,8 @@ export function AnySpend({
|
|
|
375
374
|
|
|
376
375
|
// Set default recipient address when wallet changes
|
|
377
376
|
useEffect(() => {
|
|
378
|
-
setRecipientAddress(
|
|
379
|
-
}, [
|
|
377
|
+
setRecipientAddress(globalAddress);
|
|
378
|
+
}, [globalAddress]);
|
|
380
379
|
|
|
381
380
|
// Get anyspend price
|
|
382
381
|
const activeInputAmountInWei = isSrcInputDirty
|