@b3dotfun/sdk 0.0.49-alpha.1 → 0.0.49-alpha.11

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 (106) hide show
  1. package/dist/cjs/anyspend/constants/index.d.ts +1 -0
  2. package/dist/cjs/anyspend/constants/index.js +12 -2
  3. package/dist/cjs/anyspend/react/components/AnySpend.js +10 -1
  4. package/dist/cjs/anyspend/react/components/AnyspendDepositHype.js +1 -1
  5. package/dist/cjs/anyspend/react/components/common/CryptoReceiveSection.js +15 -9
  6. package/dist/cjs/anyspend/react/components/common/FeeDetailPanel.js +2 -2
  7. package/dist/cjs/anyspend/react/components/common/OrderDetails.d.ts +1 -0
  8. package/dist/cjs/anyspend/react/components/common/OrderDetails.js +6 -6
  9. package/dist/cjs/anyspend/react/components/common/OrderDetailsCollapsible.d.ts +1 -0
  10. package/dist/cjs/anyspend/react/components/common/OrderDetailsCollapsible.js +3 -2
  11. package/dist/cjs/anyspend/react/components/common/OrderToken.js +1 -1
  12. package/dist/cjs/anyspend/react/components/common/OrderTokenAmount.js +1 -1
  13. package/dist/cjs/anyspend/react/components/common/OrderTokenAmountFiat.js +1 -1
  14. package/dist/cjs/anyspend/react/components/common/OrderTokenAmountNew.js +1 -1
  15. package/dist/cjs/anyspend/react/contexts/FeatureFlagsContext.js +1 -1
  16. package/dist/cjs/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +24 -12
  17. package/dist/cjs/anyspend/types/api.d.ts +14 -2
  18. package/dist/cjs/anyspend/utils/chain.js +4 -4
  19. package/dist/cjs/bondkit/bondkitToken.d.ts +3 -1
  20. package/dist/cjs/bondkit/bondkitToken.js +19 -0
  21. package/dist/cjs/bondkit/components/TradingView.d.ts +1 -1
  22. package/dist/cjs/bondkit/components/TradingView.js +14 -3
  23. package/dist/cjs/bondkit/components/index.d.ts +1 -1
  24. package/dist/cjs/bondkit/components/index.js +1 -1
  25. package/dist/cjs/bondkit/components/types.d.ts +1 -0
  26. package/dist/cjs/bondkit/config.d.ts +1 -0
  27. package/dist/cjs/bondkit/config.js +1 -0
  28. package/dist/cjs/bondkit/index.d.ts +1 -1
  29. package/dist/cjs/bondkit/index.js +2 -6
  30. package/dist/cjs/bondkit/types.d.ts +15 -0
  31. package/dist/cjs/global-account/react/components/B3Provider/B3Provider.d.ts +1 -1
  32. package/dist/cjs/global-account/react/components/B3Provider/B3Provider.js +1 -1
  33. package/dist/cjs/global-account/react/components/B3Provider/RelayKitProviderWrapper.js +2 -2
  34. package/dist/cjs/shared/generated/chain-networks.json +40 -7
  35. package/dist/esm/anyspend/constants/index.d.ts +1 -0
  36. package/dist/esm/anyspend/constants/index.js +11 -1
  37. package/dist/esm/anyspend/react/components/AnySpend.js +10 -1
  38. package/dist/esm/anyspend/react/components/AnyspendDepositHype.js +1 -1
  39. package/dist/esm/anyspend/react/components/common/CryptoReceiveSection.js +15 -9
  40. package/dist/esm/anyspend/react/components/common/FeeDetailPanel.js +2 -2
  41. package/dist/esm/anyspend/react/components/common/OrderDetails.d.ts +1 -0
  42. package/dist/esm/anyspend/react/components/common/OrderDetails.js +6 -6
  43. package/dist/esm/anyspend/react/components/common/OrderDetailsCollapsible.d.ts +1 -0
  44. package/dist/esm/anyspend/react/components/common/OrderDetailsCollapsible.js +4 -3
  45. package/dist/esm/anyspend/react/components/common/OrderToken.js +1 -1
  46. package/dist/esm/anyspend/react/components/common/OrderTokenAmount.js +1 -1
  47. package/dist/esm/anyspend/react/components/common/OrderTokenAmountFiat.js +1 -1
  48. package/dist/esm/anyspend/react/components/common/OrderTokenAmountNew.js +1 -1
  49. package/dist/esm/anyspend/react/contexts/FeatureFlagsContext.js +1 -1
  50. package/dist/esm/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +24 -12
  51. package/dist/esm/anyspend/types/api.d.ts +14 -2
  52. package/dist/esm/anyspend/utils/chain.js +4 -4
  53. package/dist/esm/bondkit/bondkitToken.d.ts +3 -1
  54. package/dist/esm/bondkit/bondkitToken.js +19 -0
  55. package/dist/esm/bondkit/components/TradingView.d.ts +1 -1
  56. package/dist/esm/bondkit/components/TradingView.js +14 -3
  57. package/dist/esm/bondkit/components/index.d.ts +1 -1
  58. package/dist/esm/bondkit/components/index.js +1 -1
  59. package/dist/esm/bondkit/components/types.d.ts +1 -0
  60. package/dist/esm/bondkit/config.d.ts +1 -0
  61. package/dist/esm/bondkit/config.js +1 -0
  62. package/dist/esm/bondkit/index.d.ts +1 -1
  63. package/dist/esm/bondkit/index.js +1 -1
  64. package/dist/esm/bondkit/types.d.ts +15 -0
  65. package/dist/esm/global-account/react/components/B3Provider/B3Provider.d.ts +1 -1
  66. package/dist/esm/global-account/react/components/B3Provider/B3Provider.js +1 -1
  67. package/dist/esm/global-account/react/components/B3Provider/RelayKitProviderWrapper.js +2 -2
  68. package/dist/esm/shared/generated/chain-networks.json +40 -7
  69. package/dist/types/anyspend/constants/index.d.ts +1 -0
  70. package/dist/types/anyspend/react/components/common/OrderDetails.d.ts +1 -0
  71. package/dist/types/anyspend/react/components/common/OrderDetailsCollapsible.d.ts +1 -0
  72. package/dist/types/anyspend/react/hooks/useAnyspendOrderHistory.d.ts +24 -12
  73. package/dist/types/anyspend/types/api.d.ts +14 -2
  74. package/dist/types/bondkit/bondkitToken.d.ts +3 -1
  75. package/dist/types/bondkit/components/TradingView.d.ts +1 -1
  76. package/dist/types/bondkit/components/index.d.ts +1 -1
  77. package/dist/types/bondkit/components/types.d.ts +1 -0
  78. package/dist/types/bondkit/config.d.ts +1 -0
  79. package/dist/types/bondkit/index.d.ts +1 -1
  80. package/dist/types/bondkit/types.d.ts +15 -0
  81. package/dist/types/global-account/react/components/B3Provider/B3Provider.d.ts +1 -1
  82. package/package.json +3 -3
  83. package/src/anyspend/constants/index.ts +12 -1
  84. package/src/anyspend/react/components/AnySpend.tsx +13 -0
  85. package/src/anyspend/react/components/AnyspendDepositHype.tsx +1 -0
  86. package/src/anyspend/react/components/common/CryptoReceiveSection.tsx +17 -9
  87. package/src/anyspend/react/components/common/FeeDetailPanel.tsx +33 -6
  88. package/src/anyspend/react/components/common/OrderDetails.tsx +7 -0
  89. package/src/anyspend/react/components/common/OrderDetailsCollapsible.tsx +16 -0
  90. package/src/anyspend/react/components/common/OrderToken.tsx +1 -1
  91. package/src/anyspend/react/components/common/OrderTokenAmount.tsx +1 -1
  92. package/src/anyspend/react/components/common/OrderTokenAmountFiat.tsx +1 -1
  93. package/src/anyspend/react/components/common/OrderTokenAmountNew.tsx +1 -1
  94. package/src/anyspend/react/contexts/FeatureFlagsContext.tsx +2 -2
  95. package/src/anyspend/types/api.ts +14 -2
  96. package/src/anyspend/utils/chain.ts +4 -4
  97. package/src/bondkit/bondkitToken.ts +24 -0
  98. package/src/bondkit/components/TradingView.tsx +15 -3
  99. package/src/bondkit/components/index.ts +1 -1
  100. package/src/bondkit/components/types.ts +1 -0
  101. package/src/bondkit/config.ts +2 -0
  102. package/src/bondkit/index.ts +1 -1
  103. package/src/bondkit/types.ts +19 -0
  104. package/src/global-account/react/components/B3Provider/B3Provider.tsx +1 -1
  105. package/src/global-account/react/components/B3Provider/RelayKitProviderWrapper.tsx +2 -2
  106. package/src/shared/generated/chain-networks.json +40 -7
@@ -1,16 +1,17 @@
1
1
  "use client";
2
- import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
2
+ import { jsx as _jsx, jsxs as _jsxs, Fragment as _Fragment } from "react/jsx-runtime";
3
3
  import { ALL_CHAINS, capitalizeFirstLetter, getChainName } from "../../../../anyspend/index.js";
4
4
  import { CopyToClipboard } from "../../../../global-account/react/index.js";
5
5
  import { cn } from "../../../../shared/utils/index.js";
6
6
  import centerTruncate from "../../../../shared/utils/centerTruncate.js";
7
+ import { formatNumber } from "../../../../shared/utils/formatNumber.js";
7
8
  import { formatTokenAmount } from "../../../../shared/utils/number.js";
8
9
  import { ChevronDown, Copy } from "lucide-react";
9
10
  import { motion } from "motion/react";
10
11
  import { memo, useState } from "react";
11
12
  import { toast } from "sonner";
12
13
  import { b3 } from "viem/chains";
13
- export const OrderDetailsCollapsible = memo(function OrderDetailsCollapsible({ order, dstToken, tournament, nft, recipientName, formattedExpectedDstAmount, className, showTotal = false, totalAmount, }) {
14
+ export const OrderDetailsCollapsible = memo(function OrderDetailsCollapsible({ order, dstToken, tournament, nft, recipientName, formattedExpectedDstAmount, className, showTotal = false, totalAmount, points, }) {
14
15
  const [showOrderDetails, setShowOrderDetails] = useState(true);
15
16
  // Calculate expected amount if not provided
16
17
  const expectedDstAmount = order.type === "mint_nft" ||
@@ -33,5 +34,5 @@ export const OrderDetailsCollapsible = memo(function OrderDetailsCollapsible({ o
33
34
  ? order.metadata.action
34
35
  ? capitalizeFirstLetter(order.metadata.action)
35
36
  : "Contract execution"
36
- : "" }), _jsxs("div", { className: "order-details-expected-value flex items-end gap-2", children: [order.type === "swap" ? (`~${finalFormattedExpectedDstAmount} ${dstToken.symbol}`) : order.type === "mint_nft" ? (_jsxs("div", { className: "order-details-nft-info flex items-center gap-2", children: [_jsx("img", { src: nft?.imageUrl, alt: nft?.name || "NFT", className: "order-details-nft-image h-5 w-5" }), _jsx("div", { className: "order-details-nft-name", children: nft?.name || "NFT" })] })) : order.type === "join_tournament" || order.type === "fund_tournament" ? (_jsxs("div", { className: "order-details-tournament-info flex items-center gap-2", children: [_jsx("img", { src: tournament?.imageUrl, alt: tournament?.name || "Tournament", className: "order-details-tournament-image h-5 w-5" }), _jsx("div", { className: "order-details-tournament-name", children: tournament?.name || "Tournament" })] })) : order.type === "hype_duel" ? (_jsx("div", { className: "order-details-hype-info flex items-center gap-2", children: _jsxs("div", { className: "order-details-hype-amount", children: [formatTokenAmount(BigInt(order.payload.expectedDstAmount), dstToken.decimals), " HYPE"] }) })) : null, _jsxs("div", { className: "order-details-chain-info text-as-primary/50 flex items-center gap-2", children: [_jsxs("span", { className: "order-details-chain-text", children: ["on ", order.dstChain !== b3.id && getChainName(order.dstChain)] }), _jsx("img", { src: ALL_CHAINS[order.dstChain].logoUrl, alt: getChainName(order.dstChain), className: cn("order-details-chain-logo h-3", order.dstChain !== b3.id && "w-3 rounded-full", order.dstChain === b3.id && "h-4") })] })] })] }), _jsx("div", { className: "order-details-divider divider w-full" }), _jsxs("div", { className: "order-details-id-total-section flex w-full justify-between gap-4", children: [_jsx("div", { className: "order-details-id-total-label text-as-tertiarry", children: showTotal ? "Total (included fee)" : "Order ID" }), _jsx("div", { className: "order-details-id-total-value text-as-primary overflow-hidden text-ellipsis whitespace-nowrap", children: showTotal && totalAmount ? totalAmount : order.id })] })] }) })) : (_jsxs("div", { className: "order-details-collapsed flex w-full items-center", children: [_jsx("div", { className: "order-details-collapsed-divider divider w-full" }), _jsx("button", { className: "order-details-collapsed-button whitespace-nowrap text-sm", onClick: () => setShowOrderDetails(true), children: "Order Details" }), _jsx(ChevronDown, { className: "order-details-collapsed-chevron text-as-primary mx-1 h-4 min-h-4 w-4 min-w-4" }), _jsx("div", { className: "order-details-collapsed-divider divider w-full" })] })) }));
37
+ : "" }), _jsxs("div", { className: "order-details-expected-value flex items-end gap-2", children: [order.type === "swap" ? (`~${finalFormattedExpectedDstAmount} ${dstToken.symbol}`) : order.type === "mint_nft" ? (_jsxs("div", { className: "order-details-nft-info flex items-center gap-2", children: [_jsx("img", { src: nft?.imageUrl, alt: nft?.name || "NFT", className: "order-details-nft-image h-5 w-5" }), _jsx("div", { className: "order-details-nft-name", children: nft?.name || "NFT" })] })) : order.type === "join_tournament" || order.type === "fund_tournament" ? (_jsxs("div", { className: "order-details-tournament-info flex items-center gap-2", children: [_jsx("img", { src: tournament?.imageUrl, alt: tournament?.name || "Tournament", className: "order-details-tournament-image h-5 w-5" }), _jsx("div", { className: "order-details-tournament-name", children: tournament?.name || "Tournament" })] })) : order.type === "hype_duel" ? (_jsx("div", { className: "order-details-hype-info flex items-center gap-2", children: _jsxs("div", { className: "order-details-hype-amount", children: [formatTokenAmount(BigInt(order.payload.expectedDstAmount), dstToken.decimals), " HYPE"] }) })) : null, _jsxs("div", { className: "order-details-chain-info text-as-primary/50 flex items-center gap-2", children: [_jsxs("span", { className: "order-details-chain-text", children: ["on ", order.dstChain !== b3.id && getChainName(order.dstChain)] }), _jsx("img", { src: ALL_CHAINS[order.dstChain].logoUrl, alt: getChainName(order.dstChain), className: cn("order-details-chain-logo h-3", order.dstChain !== b3.id && "w-3 rounded-full", order.dstChain === b3.id && "h-4") })] })] })] }), points !== undefined && points !== null && (_jsxs(_Fragment, { children: [_jsx("div", { className: "order-details-divider divider w-full" }), _jsxs("div", { className: "order-details-points-section flex w-full justify-between gap-4", children: [_jsx("div", { className: "order-details-points-label text-as-tertiarry", children: "Points" }), _jsxs("div", { className: "order-details-points-value text-as-brand font-semibold", children: ["+", formatNumber(points), " pts"] })] })] })), _jsx("div", { className: "order-details-divider divider w-full" }), _jsxs("div", { className: "order-details-id-total-section flex w-full justify-between gap-4", children: [_jsx("div", { className: "order-details-id-total-label text-as-tertiarry", children: showTotal ? "Total (included fee)" : "Order ID" }), _jsx("div", { className: "order-details-id-total-value text-as-primary overflow-hidden text-ellipsis whitespace-nowrap", children: showTotal && totalAmount ? totalAmount : order.id })] })] }) })) : (_jsxs("div", { className: "order-details-collapsed flex w-full items-center", children: [_jsx("div", { className: "order-details-collapsed-divider divider w-full" }), _jsx("button", { className: "order-details-collapsed-button whitespace-nowrap text-sm", onClick: () => setShowOrderDetails(true), children: "Order Details" }), _jsx(ChevronDown, { className: "order-details-collapsed-chevron text-as-primary mx-1 h-4 min-h-4 w-4 min-w-4" }), _jsx("div", { className: "order-details-collapsed-divider divider w-full" })] })) }));
37
38
  });
@@ -5,7 +5,7 @@ import { Button, useAccountWallet, useTokenBalancesByChain } from "../../../../g
5
5
  import { cn } from "../../../../shared/utils/index.js";
6
6
  import { formatTokenAmount } from "../../../../shared/utils/number.js";
7
7
  import { simpleHashChainToChainName } from "../../../../shared/utils/simplehash.js";
8
- import { TokenSelector } from "@reservoir0x/relay-kit-ui";
8
+ import { TokenSelector } from "@relayprotocol/relay-kit-ui";
9
9
  import { CheckCircle2, ChevronsUpDown } from "lucide-react";
10
10
  import { useMemo } from "react";
11
11
  import { ChainTokenIcon } from "./ChainTokenIcon.js";
@@ -6,7 +6,7 @@ import { NumericFormat } from "react-number-format";
6
6
  import { ALL_CHAINS, RELAY_SOLANA_MAINNET_CHAIN_ID } from "../../../../anyspend/index.js";
7
7
  import { Button } from "../../../../global-account/react/index.js";
8
8
  import { cn } from "../../../../shared/utils/index.js";
9
- import { TokenSelector } from "@reservoir0x/relay-kit-ui";
9
+ import { TokenSelector } from "@relayprotocol/relay-kit-ui";
10
10
  import { ChainTokenIcon } from "./ChainTokenIcon.js";
11
11
  export function OrderTokenAmount({ disabled, inputValue, onChangeInput, context, address, chainId, setChainId, token, setToken, hideTokenSelect = false, canEditAmount = true, className, innerClassName, amountClassName, tokenSelectClassName, onTokenSelect, }) {
12
12
  // Track previous token to detect changes
@@ -5,7 +5,7 @@ import { useEffect, useRef } from "react";
5
5
  import { NumericFormat } from "react-number-format";
6
6
  import { ALL_CHAINS, RELAY_SOLANA_MAINNET_CHAIN_ID } from "../../../../anyspend/index.js";
7
7
  import { cn } from "../../../../shared/utils/index.js";
8
- import { TokenSelector } from "@reservoir0x/relay-kit-ui";
8
+ import { TokenSelector } from "@relayprotocol/relay-kit-ui";
9
9
  import { ChainTokenIcon } from "./ChainTokenIcon.js";
10
10
  export function OrderTokenAmountFiat({ disabled, inputValue, onChangeInput, context, address, chainId, setChainId, token, setToken, className, }) {
11
11
  // Track previous token to detect changes
@@ -6,7 +6,7 @@ import { NumericFormat } from "react-number-format";
6
6
  import { ALL_CHAINS, RELAY_SOLANA_MAINNET_CHAIN_ID } from "../../../../anyspend/index.js";
7
7
  import { Button } from "../../../../global-account/react/index.js";
8
8
  import { cn } from "../../../../shared/utils/index.js";
9
- import { TokenSelector } from "@reservoir0x/relay-kit-ui";
9
+ import { TokenSelector } from "@relayprotocol/relay-kit-ui";
10
10
  import { ChainTokenIcon } from "./ChainTokenIcon.js";
11
11
  export function OrderTokenAmountFiat({ disabled, inputValue, onChangeInput, context, address, chainId, setChainId, token, setToken, hideTokenSelect = false, canEditAmount = true, className, showAsReceiveAmount = false, }) {
12
12
  // Track previous token to detect changes
@@ -3,7 +3,7 @@ import { jsx as _jsx } from "react/jsx-runtime";
3
3
  import { createContext, useContext } from "react";
4
4
  const FeatureFlagsContext = createContext(undefined);
5
5
  const defaultFeatureFlags = {
6
- showPoints: false,
6
+ showPoints: true,
7
7
  };
8
8
  export function FeatureFlagsProvider({ children, featureFlags = defaultFeatureFlags }) {
9
9
  return _jsx(FeatureFlagsContext.Provider, { value: { featureFlags }, children: children });
@@ -20,7 +20,8 @@ export declare function useAnyspendOrderHistory(creatorAddress: string | undefin
20
20
  oneClickBuyUrl: string | null;
21
21
  stripePaymentIntentId: string | null;
22
22
  settlement: {
23
- actualDstAmount: string | null;
23
+ actualDstAmount?: string;
24
+ relay?: Record<string, never>;
24
25
  } | null;
25
26
  fee?: Omit<import("../..").components["schemas"]["Fee"], "type"> | null;
26
27
  } & {
@@ -48,7 +49,8 @@ export declare function useAnyspendOrderHistory(creatorAddress: string | undefin
48
49
  oneClickBuyUrl: string | null;
49
50
  stripePaymentIntentId: string | null;
50
51
  settlement: {
51
- actualDstAmount: string | null;
52
+ actualDstAmount?: string;
53
+ relay?: Record<string, never>;
52
54
  } | null;
53
55
  fee?: Omit<import("../..").components["schemas"]["Fee"], "type"> | null;
54
56
  } & {
@@ -76,7 +78,8 @@ export declare function useAnyspendOrderHistory(creatorAddress: string | undefin
76
78
  oneClickBuyUrl: string | null;
77
79
  stripePaymentIntentId: string | null;
78
80
  settlement: {
79
- actualDstAmount: string | null;
81
+ actualDstAmount?: string;
82
+ relay?: Record<string, never>;
80
83
  } | null;
81
84
  fee?: Omit<import("../..").components["schemas"]["Fee"], "type"> | null;
82
85
  } & {
@@ -104,7 +107,8 @@ export declare function useAnyspendOrderHistory(creatorAddress: string | undefin
104
107
  oneClickBuyUrl: string | null;
105
108
  stripePaymentIntentId: string | null;
106
109
  settlement: {
107
- actualDstAmount: string | null;
110
+ actualDstAmount?: string;
111
+ relay?: Record<string, never>;
108
112
  } | null;
109
113
  fee?: Omit<import("../..").components["schemas"]["Fee"], "type"> | null;
110
114
  } & {
@@ -132,7 +136,8 @@ export declare function useAnyspendOrderHistory(creatorAddress: string | undefin
132
136
  oneClickBuyUrl: string | null;
133
137
  stripePaymentIntentId: string | null;
134
138
  settlement: {
135
- actualDstAmount: string | null;
139
+ actualDstAmount?: string;
140
+ relay?: Record<string, never>;
136
141
  } | null;
137
142
  fee?: Omit<import("../..").components["schemas"]["Fee"], "type"> | null;
138
143
  } & {
@@ -160,7 +165,8 @@ export declare function useAnyspendOrderHistory(creatorAddress: string | undefin
160
165
  oneClickBuyUrl: string | null;
161
166
  stripePaymentIntentId: string | null;
162
167
  settlement: {
163
- actualDstAmount: string | null;
168
+ actualDstAmount?: string;
169
+ relay?: Record<string, never>;
164
170
  } | null;
165
171
  fee?: Omit<import("../..").components["schemas"]["Fee"], "type"> | null;
166
172
  } & {
@@ -191,7 +197,8 @@ export declare function useAnyspendOrderHistory(creatorAddress: string | undefin
191
197
  oneClickBuyUrl: string | null;
192
198
  stripePaymentIntentId: string | null;
193
199
  settlement: {
194
- actualDstAmount: string | null;
200
+ actualDstAmount?: string;
201
+ relay?: Record<string, never>;
195
202
  } | null;
196
203
  fee?: Omit<import("../..").components["schemas"]["Fee"], "type"> | null;
197
204
  } & {
@@ -219,7 +226,8 @@ export declare function useAnyspendOrderHistory(creatorAddress: string | undefin
219
226
  oneClickBuyUrl: string | null;
220
227
  stripePaymentIntentId: string | null;
221
228
  settlement: {
222
- actualDstAmount: string | null;
229
+ actualDstAmount?: string;
230
+ relay?: Record<string, never>;
223
231
  } | null;
224
232
  fee?: Omit<import("../..").components["schemas"]["Fee"], "type"> | null;
225
233
  } & {
@@ -247,7 +255,8 @@ export declare function useAnyspendOrderHistory(creatorAddress: string | undefin
247
255
  oneClickBuyUrl: string | null;
248
256
  stripePaymentIntentId: string | null;
249
257
  settlement: {
250
- actualDstAmount: string | null;
258
+ actualDstAmount?: string;
259
+ relay?: Record<string, never>;
251
260
  } | null;
252
261
  fee?: Omit<import("../..").components["schemas"]["Fee"], "type"> | null;
253
262
  } & {
@@ -275,7 +284,8 @@ export declare function useAnyspendOrderHistory(creatorAddress: string | undefin
275
284
  oneClickBuyUrl: string | null;
276
285
  stripePaymentIntentId: string | null;
277
286
  settlement: {
278
- actualDstAmount: string | null;
287
+ actualDstAmount?: string;
288
+ relay?: Record<string, never>;
279
289
  } | null;
280
290
  fee?: Omit<import("../..").components["schemas"]["Fee"], "type"> | null;
281
291
  } & {
@@ -303,7 +313,8 @@ export declare function useAnyspendOrderHistory(creatorAddress: string | undefin
303
313
  oneClickBuyUrl: string | null;
304
314
  stripePaymentIntentId: string | null;
305
315
  settlement: {
306
- actualDstAmount: string | null;
316
+ actualDstAmount?: string;
317
+ relay?: Record<string, never>;
307
318
  } | null;
308
319
  fee?: Omit<import("../..").components["schemas"]["Fee"], "type"> | null;
309
320
  } & {
@@ -331,7 +342,8 @@ export declare function useAnyspendOrderHistory(creatorAddress: string | undefin
331
342
  oneClickBuyUrl: string | null;
332
343
  stripePaymentIntentId: string | null;
333
344
  settlement: {
334
- actualDstAmount: string | null;
345
+ actualDstAmount?: string;
346
+ relay?: Record<string, never>;
335
347
  } | null;
336
348
  fee?: Omit<import("../..").components["schemas"]["Fee"], "type"> | null;
337
349
  } & {
@@ -1317,10 +1317,22 @@ export interface components {
1317
1317
  /** @description Settlement information for executed orders */
1318
1318
  settlement: {
1319
1319
  /**
1320
- * @description Actual received amount after execution
1320
+ * @description Actual received amount after execution (only for swap/hypeduel orders). Optional - only present for swap/hypeduel orders.
1321
1321
  * @example 990000
1322
1322
  */
1323
- actualDstAmount: string | null;
1323
+ actualDstAmount?: string;
1324
+ /**
1325
+ * @description Complete relay API response data. Contains transaction details, state changes, fees, and execution status. Optional - can be backfilled by querying Relay API /requests/v2 endpoint.
1326
+ * @example {
1327
+ * "status": "success",
1328
+ * "metadata": {
1329
+ * "currencyOut": {
1330
+ * "amount": "990000"
1331
+ * }
1332
+ * }
1333
+ * }
1334
+ */
1335
+ relay?: Record<string, never>;
1324
1336
  } | null;
1325
1337
  /** @description Fee structure for the order including Stripe and AnySpend fees */
1326
1338
  fee?: Omit<components["schemas"]["Fee"], "type"> | null;
@@ -83,7 +83,7 @@ export const EVM_MAINNET = {
83
83
  viem: getCustomEvmChain(polygon, "https://purple-young-field.matic.quiknode.pro/ca54f365c1a4c7f970223eb8087e0fc579feba12/"),
84
84
  pollingInterval: 1000, // 1 second for Polygon
85
85
  zapperEnum: "POLYGON_MAINNET",
86
- coingeckoName: "polygon",
86
+ coingeckoName: "polygon_pos",
87
87
  },
88
88
  [avalanche.id]: {
89
89
  id: avalanche.id,
@@ -97,7 +97,7 @@ export const EVM_MAINNET = {
97
97
  viem: getCustomEvmChain(avalanche, "https://avalanche-c-chain-rpc.publicnode.com"),
98
98
  pollingInterval: 1000, // 1 second for Avalanche
99
99
  zapperEnum: "AVALANCHE_MAINNET",
100
- coingeckoName: "avalanche",
100
+ coingeckoName: "avax",
101
101
  },
102
102
  [bsc.id]: {
103
103
  id: bsc.id,
@@ -138,8 +138,8 @@ export const EVM_MAINNET = {
138
138
  nativeToken: getEthToken(abstract.id),
139
139
  viem: getCustomEvmChain(abstract, "https://cosmopolitan-nameless-mountain.abstract-mainnet.quiknode.pro/863853304b986b582bdacf625ce3350397c560f8/"),
140
140
  pollingInterval: 3000, // 3 seconds for Abstract
141
- zapperEnum: "B3_MAINNET",
142
- coingeckoName: "b3",
141
+ zapperEnum: "ABSTRACT_MAINNET",
142
+ coingeckoName: "abstract",
143
143
  },
144
144
  };
145
145
  export const EVM_TESTNET = {
@@ -1,6 +1,6 @@
1
1
  import type { Address, EIP1193Provider, GetContractReturnType, Hex, PublicClient, WalletClient } from "viem";
2
2
  import { BondkitTokenABI } from "./abis";
3
- import type { BondkitTokenInitializationConfig, GetTransactionHistoryOptions, SwapQuote, TokenDetails, TransactionResponse } from "./types";
3
+ import type { BondkitTokenInitializationConfig, GetTransactionHistoryOptions, MarketCapChartResponse, SwapQuote, TokenDetails, TransactionResponse } from "./types";
4
4
  import { TokenStatus } from "./types";
5
5
  type ExecuteWriteOptions = {
6
6
  value?: bigint;
@@ -16,6 +16,7 @@ export declare class BondkitToken {
16
16
  private walletKey?;
17
17
  private rpcUrl;
18
18
  private apiEndpoint;
19
+ private chartApiEndpoint;
19
20
  private walletClientInstance;
20
21
  private connectedProvider?;
21
22
  private tradingToken?;
@@ -56,6 +57,7 @@ export declare class BondkitToken {
56
57
  threshold: number;
57
58
  } | undefined>;
58
59
  getTransactionHistory(options?: GetTransactionHistoryOptions): Promise<TransactionResponse | undefined>;
60
+ getMarketCapChartData(): Promise<MarketCapChartResponse | undefined>;
59
61
  private executeWrite;
60
62
  /** Helper method to wait for transaction confirmation with OKX wallet fallback */
61
63
  waitForTransaction(hash: Hex): Promise<import("viem").TransactionReceipt>;
@@ -18,6 +18,7 @@ export class BondkitToken {
18
18
  this.chain = sdkConfig.chain;
19
19
  this.rpcUrl = sdkConfig.rpcUrl;
20
20
  this.apiEndpoint = sdkConfig.apiEndpoint;
21
+ this.chartApiEndpoint = sdkConfig.chartApiEndpoint;
21
22
  if (walletKey && !walletKey.startsWith("0x")) {
22
23
  this.walletKey = `0x${walletKey}`;
23
24
  }
@@ -386,6 +387,24 @@ export class BondkitToken {
386
387
  return undefined;
387
388
  }
388
389
  }
390
+ // --- Market Cap Chart Data --- //
391
+ async getMarketCapChartData() {
392
+ try {
393
+ const url = new URL("/recent_marketcap", this.chartApiEndpoint);
394
+ url.searchParams.set("contractAddress", this.contractAddress);
395
+ url.searchParams.set("chainId", this.chain.id.toString());
396
+ const response = await fetch(url.toString());
397
+ if (!response.ok) {
398
+ throw new Error(`HTTP error! status: ${response.status}`);
399
+ }
400
+ const result = await response.json();
401
+ return result;
402
+ }
403
+ catch (e) {
404
+ console.warn("Error fetching market cap chart data:", e);
405
+ return undefined;
406
+ }
407
+ }
389
408
  // --- Write Methods --- //
390
409
  async executeWrite(functionName, args, options) {
391
410
  if (!this.walletClientInstance.account && !this.walletKey) {
@@ -1,3 +1,3 @@
1
1
  import { TradingViewProps } from "./types";
2
- declare const TradingView: ({ className, tokenAddress, tokenSymbol }: TradingViewProps) => import("react/jsx-runtime").JSX.Element;
2
+ declare const TradingView: ({ className, tokenAddress, tokenSymbol, chainId }: TradingViewProps) => import("react/jsx-runtime").JSX.Element;
3
3
  export default TradingView;
@@ -2,17 +2,21 @@
2
2
  import { jsx as _jsx, jsxs as _jsxs } from "react/jsx-runtime";
3
3
  import { Loader2 } from "lucide-react";
4
4
  import { useEffect, useRef, useState } from "react";
5
+ import { getConfig } from "../config.js";
5
6
  import { loadScriptFromCDN } from "./utils/cdn-loader.js";
6
7
  import { formatNumberSmall } from "./utils/format.js";
7
8
  // TradingView will be available on window after loading from CDN
8
9
  // Datafeed will be implemented inline
9
10
  // Mock loading overlay - replace with your actual loading component
10
11
  const GifLoadingOverlay = ({ className }) => (_jsx("div", { className: `absolute inset-0 flex items-center justify-center bg-white/50 backdrop-blur-sm ${className || ""}`, children: _jsx(Loader2, { className: "text-secondary-grey h-8 w-8 animate-spin" }) }));
11
- const TradingView = ({ className, tokenAddress, tokenSymbol }) => {
12
+ const TradingView = ({ className, tokenAddress, tokenSymbol, chainId = 8453 }) => {
12
13
  // Use token info for the current trade
13
14
  const currentTrade = {
14
15
  product_id: tokenAddress && tokenSymbol ? `${tokenSymbol}-${tokenAddress}` : "BONDKIT",
15
16
  };
17
+ // Get chart API endpoint from config
18
+ const config = getConfig(chainId);
19
+ const chartApiUrl = `${config.chartApiEndpoint}/udf`;
16
20
  const [tradingViewDefaultInterval, setTradingViewDefaultInterval] = useState("60");
17
21
  const [tradingViewTimezone, setTradingViewTimezone] = useState("");
18
22
  const chartContainerRef = useRef(null);
@@ -124,7 +128,7 @@ const TradingView = ({ className, tokenAddress, tokenSymbol }) => {
124
128
  unsubscribeBars: () => { },
125
129
  };
126
130
  };
127
- const datafeed = createUDFDatafeed("https://b3-udf-worker.sean-430.workers.dev/bondkit/udf");
131
+ const datafeed = createUDFDatafeed(chartApiUrl);
128
132
  // Calculate timeframe for last 2 days
129
133
  const currentTime = Math.floor(Date.now() / 1000);
130
134
  const twoDaysAgo = currentTime - 2 * 24 * 60 * 60; // 2 days in seconds
@@ -244,7 +248,14 @@ const TradingView = ({ className, tokenAddress, tokenSymbol }) => {
244
248
  tvWidgetRef.current = null;
245
249
  }
246
250
  };
247
- }, [librariesLoaded, currentTrade?.product_id, tradingViewDefaultInterval, tradingViewTimezone]);
251
+ }, [
252
+ librariesLoaded,
253
+ currentTrade?.product_id,
254
+ tradingViewDefaultInterval,
255
+ tradingViewTimezone,
256
+ chartApiUrl,
257
+ chainId,
258
+ ]);
248
259
  useEffect(() => {
249
260
  if (chartLoaded &&
250
261
  currentTrade?.product_id &&
@@ -1,5 +1,5 @@
1
+ export * from "./config/cdn";
1
2
  export { default as TradingView } from "./TradingView";
2
3
  export type { TradingViewProps } from "./types";
3
4
  export * from "./utils/cdn-loader";
4
5
  export * from "./utils/format";
5
- export * from "./config/cdn";
@@ -1,4 +1,4 @@
1
+ export * from "./config/cdn.js";
1
2
  export { default as TradingView } from "./TradingView.js";
2
3
  export * from "./utils/cdn-loader.js";
3
4
  export * from "./utils/format.js";
4
- export * from "./config/cdn.js";
@@ -5,4 +5,5 @@ export interface TradingViewProps {
5
5
  className?: string;
6
6
  tokenAddress?: string;
7
7
  tokenSymbol?: string;
8
+ chainId?: number;
8
9
  }
@@ -5,6 +5,7 @@ export interface Config {
5
5
  rpcUrl: string;
6
6
  factoryAddress: Address;
7
7
  apiEndpoint: string;
8
+ chartApiEndpoint: string;
8
9
  }
9
10
  export type SupportedChainId = typeof base.id;
10
11
  export declare const getConfig: (chainId: number, rpcUrl?: string) => Config;
@@ -5,6 +5,7 @@ const baseMainnetConfig = {
5
5
  rpcUrl: BaseMainnetRpcUrl,
6
6
  factoryAddress: BaseBondkitTokenFactoryContractAddress,
7
7
  apiEndpoint: "https://api.b3.fun/bondkit-tokens",
8
+ chartApiEndpoint: "https://bondkit-chart-api.b3.fun",
8
9
  };
9
10
  export const getConfig = (chainId, rpcUrl) => {
10
11
  if (chainId === base.id) {
@@ -5,4 +5,4 @@ export * from "./constants";
5
5
  export * from "./types";
6
6
  export * from "./abis";
7
7
  export { BondkitSwapService } from "./swapService";
8
- export { default as TradingView } from "./components/TradingView";
8
+ export * from "./components";
@@ -11,4 +11,4 @@ export * from "./abis/index.js";
11
11
  // Swap functionality
12
12
  export { BondkitSwapService } from "./swapService.js";
13
13
  // Components
14
- export { default as TradingView } from "./components/TradingView.js";
14
+ export * from "./components/index.js";
@@ -86,3 +86,18 @@ export interface SwapQuote {
86
86
  executionPrice: string;
87
87
  fee: string;
88
88
  }
89
+ export interface MarketCapDataPoint {
90
+ time: string;
91
+ value: string;
92
+ }
93
+ export interface TokenInfo {
94
+ contractAddress: string;
95
+ chainId: number;
96
+ name: string;
97
+ symbol: string;
98
+ found: boolean;
99
+ }
100
+ export interface MarketCapChartResponse {
101
+ tokenInfo: TokenInfo;
102
+ data: MarketCapDataPoint[];
103
+ }
@@ -1,5 +1,5 @@
1
1
  import { PermissionsConfig } from "../../../../global-account/types/permissions";
2
- import "@reservoir0x/relay-kit-ui/styles.css";
2
+ import "@relayprotocol/relay-kit-ui/styles.css";
3
3
  import { Account } from "thirdweb/wallets";
4
4
  import { ClientType } from "../../../client-manager";
5
5
  import { B3ContextType } from "./types";
@@ -3,7 +3,7 @@ import { RelayKitProviderWrapper, TooltipProvider, useAuthentication, useAuthSto
3
3
  import { useWagmiConfig } from "../../../../global-account/react/hooks/useWagmiConfig.js";
4
4
  import { loadGA4Script } from "../../../../global-account/utils/analytics.js";
5
5
  import { debugB3React } from "../../../../shared/utils/debug.js";
6
- import "@reservoir0x/relay-kit-ui/styles.css";
6
+ import "@relayprotocol/relay-kit-ui/styles.css";
7
7
  import { QueryClient, QueryClientProvider } from "@tanstack/react-query";
8
8
  import { useCallback, useEffect, useState } from "react";
9
9
  import { Toaster } from "sonner";
@@ -1,6 +1,6 @@
1
1
  import { Fragment as _Fragment, jsx as _jsx } from "react/jsx-runtime";
2
- import { RelayKitProvider } from "@reservoir0x/relay-kit-ui";
3
- import { fetchChainConfigs, MAINNET_RELAY_API } from "@reservoir0x/relay-sdk";
2
+ import { RelayKitProvider } from "@relayprotocol/relay-kit-ui";
3
+ import { fetchChainConfigs, MAINNET_RELAY_API } from "@relayprotocol/relay-sdk";
4
4
  import { useEffect, useState } from "react";
5
5
  export function RelayKitProviderWrapper({ children, simDuneApiKey, }) {
6
6
  const [relayChains, setRelayChains] = useState([]);
@@ -65,7 +65,7 @@
65
65
  {
66
66
  "_id": "66f2044afe5a3ac32a1de9ff",
67
67
  "id": 8453,
68
- "name": "Base Mainnet",
68
+ "name": "Base",
69
69
  "rpcUrls": {
70
70
  "default": {
71
71
  "http": "https://base-rpc.publicnode.com",
@@ -524,7 +524,7 @@
524
524
  "testnet": true,
525
525
  "badge": "https://cdn.b3.fun/b4-logo.png",
526
526
  "color": "#3368ef",
527
- "enabledFeatures": ["explorer"]
527
+ "enabledFeatures": ["explorer", "basement"]
528
528
  },
529
529
  {
530
530
  "_id": "684afdec4a478ffb44a4f83f",
@@ -620,7 +620,7 @@
620
620
  "enabledFeatures": ["explorer"]
621
621
  },
622
622
  {
623
- "_id": "68a351c603e65c07b7645581",
623
+ "_id": "68aefec4130155af4cf50711",
624
624
  "id": 1448000,
625
625
  "name": "XRPLT",
626
626
  "rpcUrls": {
@@ -631,21 +631,54 @@
631
631
  "backups": []
632
632
  },
633
633
  "icon": {
634
- "url": "https://cdn.b3.fun/xrpl_logo.svg",
634
+ "url": "https://cdn.b3.fun/xrpl-black.svg",
635
635
  "width": 32,
636
636
  "height": 32,
637
637
  "format": "svg"
638
638
  },
639
639
  "blockExplorers": {
640
- "default": "https://xrplt.explorer.caldera.xyz/",
640
+ "default": "https://xrplt.explorer.caldera.xyz",
641
641
  "explorerTitle": "XRPLT Explorer"
642
642
  },
643
643
  "nativeCurrency": {
644
644
  "name": "XRP",
645
645
  "symbol": "XRP",
646
- "decimals": 18
646
+ "decimals": 6
647
647
  },
648
648
  "testnet": true,
649
- "enabledFeatures": ["xcade", "explorer"]
649
+ "badge": "https://cdn.b3.fun/xrpl-black.svg",
650
+ "color": "#000000",
651
+ "enabledFeatures": ["basement", "explorer"]
652
+ },
653
+ {
654
+ "_id": "68eabd8a234b8958b152d6e0",
655
+ "id": 2741,
656
+ "name": "Abstract",
657
+ "rpcUrls": {
658
+ "default": {
659
+ "http": "https://cosmopolitan-nameless-mountain.abstract-mainnet.quiknode.pro/863853304b986b582bdacf625ce3350397c560f8/",
660
+ "ws": "wss://cosmopolitan-nameless-mountain.abstract-mainnet.quiknode.pro/863853304b986b582bdacf625ce3350397c560f8/"
661
+ },
662
+ "backups": []
663
+ },
664
+ "icon": {
665
+ "url": "https://assets.relay.link/icons/square/2741/light.png",
666
+ "width": 261,
667
+ "height": 261,
668
+ "format": "png"
669
+ },
670
+ "blockExplorers": {
671
+ "default": "https://abscan.org",
672
+ "explorerTitle": "Abscan"
673
+ },
674
+ "nativeCurrency": {
675
+ "name": "ETH",
676
+ "symbol": "ETH",
677
+ "decimals": 18
678
+ },
679
+ "testnet": false,
680
+ "badge": "https://assets.relay.link/icons/square/2741/light.png",
681
+ "color": "#6eb998",
682
+ "enabledFeatures": ["basement"]
650
683
  }
651
684
  ]
@@ -6,6 +6,7 @@ export declare const RELAY_SOLANA_MAINNET_CHAIN_ID = 792703809;
6
6
  export declare const SOLANA_ASSOCIATED_TOKEN_ACCOUNT_PROGRAM_ID = "ATokenGPvbdGVxr1b2hvZbsiqW5xWH25efTNsLJA8knL";
7
7
  export declare const SOLANA_TOKEN_2022_PROGRAM_ID = "TokenzQdBNbLqP5VEhdkAS6EPFLC1PHnBqCXEpPxuEb";
8
8
  export declare const B3_TOKEN: components["schemas"]["Token"];
9
+ export declare const ANYSPEND_TOKEN: components["schemas"]["Token"];
9
10
  export declare const USDC_BASE: components["schemas"]["Token"];
10
11
  export declare const ETH_BASE: components["schemas"]["Token"];
11
12
  export declare const NFT_CONTRACTS: components["schemas"]["NftContract"][];
@@ -12,6 +12,7 @@ interface OrderDetailsProps {
12
12
  onPaymentMethodChange?: (method: CryptoPaymentMethodType) => void;
13
13
  onBack?: () => void;
14
14
  disableUrlParamManagement?: boolean;
15
+ points?: number | undefined;
15
16
  }
16
17
  export declare const OrderDetails: import("react").NamedExoticComponent<OrderDetailsProps>;
17
18
  export declare const OrderDetailsLoadingView: import("react/jsx-runtime").JSX.Element;
@@ -13,6 +13,7 @@ interface OrderDetailsCollapsibleProps {
13
13
  className?: string;
14
14
  showTotal?: boolean;
15
15
  totalAmount?: string;
16
+ points?: number;
16
17
  }
17
18
  export declare const OrderDetailsCollapsible: import("react").NamedExoticComponent<OrderDetailsCollapsibleProps>;
18
19
  export {};