@b3dotfun/sdk 0.0.28-alpha.0 → 0.0.28-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/dist/cjs/anyspend/abis/escrow.d.ts +987 -0
- package/dist/cjs/anyspend/abis/escrow.js +1275 -0
- package/dist/cjs/anyspend/react/components/AnySpend.js +10 -168
- package/dist/cjs/anyspend/react/components/AnySpendCustom.js +2 -2
- package/dist/cjs/anyspend/react/components/AnyspendDepositHype.d.ts +10 -0
- package/dist/cjs/anyspend/react/components/AnyspendDepositHype.js +263 -0
- package/dist/cjs/anyspend/react/components/common/CryptoReceiveSection.d.ts +17 -0
- package/dist/cjs/anyspend/react/components/common/CryptoReceiveSection.js +53 -0
- package/dist/cjs/anyspend/react/components/common/ErrorSection.d.ts +6 -0
- package/dist/cjs/anyspend/react/components/common/ErrorSection.js +12 -0
- package/dist/cjs/anyspend/react/components/common/PanelOnramp.d.ts +2 -1
- package/dist/cjs/anyspend/react/components/common/PanelOnramp.js +2 -2
- package/dist/cjs/anyspend/react/components/common/PaySection.d.ts +20 -0
- package/dist/cjs/anyspend/react/components/common/PaySection.js +58 -0
- package/dist/cjs/anyspend/react/components/common/TabSection.d.ts +10 -0
- package/dist/cjs/anyspend/react/components/common/TabSection.js +18 -0
- package/dist/cjs/anyspend/react/components/index.d.ts +2 -0
- package/dist/cjs/anyspend/react/components/index.js +5 -1
- package/dist/cjs/anyspend/react/hooks/useAnyspendFlow.d.ts +165 -0
- package/dist/cjs/anyspend/react/hooks/useAnyspendFlow.js +184 -0
- package/dist/cjs/anyspend/react/hooks/useSigMint.d.ts +2 -2
- package/dist/cjs/global-account/react/components/B3DynamicModal.js +3 -0
- package/dist/cjs/global-account/react/components/custom/Button.d.ts +1 -1
- package/dist/cjs/global-account/react/components/ui/button.d.ts +1 -1
- package/dist/cjs/global-account/react/components/ui/command.d.ts +2 -2
- package/dist/cjs/global-account/react/hooks/useSiwe.native.d.ts +4 -0
- package/dist/cjs/global-account/react/hooks/useSiwe.native.js +40 -0
- package/dist/cjs/global-account/react/stores/useModalStore.d.ts +17 -1
- package/dist/cjs/shared/constants/chains/b3Chain.d.ts +1 -1
- package/dist/cjs/shared/constants/chains/supported.d.ts +3 -3
- package/dist/esm/anyspend/abis/escrow.d.ts +987 -0
- package/dist/esm/anyspend/abis/escrow.js +1272 -0
- package/dist/esm/anyspend/react/components/AnySpend.js +12 -170
- package/dist/esm/anyspend/react/components/AnySpendCustom.js +3 -3
- package/dist/esm/anyspend/react/components/AnyspendDepositHype.d.ts +10 -0
- package/dist/esm/anyspend/react/components/AnyspendDepositHype.js +257 -0
- package/dist/esm/anyspend/react/components/common/CryptoReceiveSection.d.ts +17 -0
- package/dist/esm/anyspend/react/components/common/CryptoReceiveSection.js +50 -0
- package/dist/esm/anyspend/react/components/common/ErrorSection.d.ts +6 -0
- package/dist/esm/anyspend/react/components/common/ErrorSection.js +9 -0
- package/dist/esm/anyspend/react/components/common/PanelOnramp.d.ts +2 -1
- package/dist/esm/anyspend/react/components/common/PanelOnramp.js +2 -2
- package/dist/esm/anyspend/react/components/common/PaySection.d.ts +20 -0
- package/dist/esm/anyspend/react/components/common/PaySection.js +55 -0
- package/dist/esm/anyspend/react/components/common/TabSection.d.ts +10 -0
- package/dist/esm/anyspend/react/components/common/TabSection.js +15 -0
- package/dist/esm/anyspend/react/components/index.d.ts +2 -0
- package/dist/esm/anyspend/react/components/index.js +2 -0
- package/dist/esm/anyspend/react/hooks/useAnyspendFlow.d.ts +165 -0
- package/dist/esm/anyspend/react/hooks/useAnyspendFlow.js +180 -0
- package/dist/esm/anyspend/react/hooks/useSigMint.d.ts +2 -2
- package/dist/esm/global-account/react/components/B3DynamicModal.js +3 -0
- package/dist/esm/global-account/react/components/custom/Button.d.ts +1 -1
- package/dist/esm/global-account/react/components/ui/button.d.ts +1 -1
- package/dist/esm/global-account/react/components/ui/command.d.ts +2 -2
- package/dist/esm/global-account/react/hooks/useSiwe.native.d.ts +4 -0
- package/dist/esm/global-account/react/hooks/useSiwe.native.js +34 -0
- package/dist/esm/global-account/react/stores/useModalStore.d.ts +17 -1
- package/dist/esm/shared/constants/chains/b3Chain.d.ts +1 -1
- package/dist/esm/shared/constants/chains/supported.d.ts +3 -3
- package/dist/styles/index.css +1 -1
- package/dist/types/anyspend/abis/escrow.d.ts +987 -0
- package/dist/types/anyspend/react/components/AnyspendDepositHype.d.ts +10 -0
- package/dist/types/anyspend/react/components/common/CryptoReceiveSection.d.ts +17 -0
- package/dist/types/anyspend/react/components/common/ErrorSection.d.ts +6 -0
- package/dist/types/anyspend/react/components/common/PanelOnramp.d.ts +2 -1
- package/dist/types/anyspend/react/components/common/PaySection.d.ts +20 -0
- package/dist/types/anyspend/react/components/common/TabSection.d.ts +10 -0
- package/dist/types/anyspend/react/components/index.d.ts +2 -0
- package/dist/types/anyspend/react/hooks/useAnyspendFlow.d.ts +165 -0
- package/dist/types/anyspend/react/hooks/useSigMint.d.ts +2 -2
- package/dist/types/global-account/react/components/custom/Button.d.ts +1 -1
- package/dist/types/global-account/react/components/ui/button.d.ts +1 -1
- package/dist/types/global-account/react/components/ui/command.d.ts +2 -2
- package/dist/types/global-account/react/hooks/useSiwe.native.d.ts +4 -0
- package/dist/types/global-account/react/stores/useModalStore.d.ts +17 -1
- package/dist/types/shared/constants/chains/b3Chain.d.ts +1 -1
- package/dist/types/shared/constants/chains/supported.d.ts +3 -3
- package/package.json +13 -1
- package/src/anyspend/abis/escrow.ts +1272 -0
- package/src/anyspend/react/components/AnySpend.tsx +48 -389
- package/src/anyspend/react/components/AnySpendCustom.tsx +2 -10
- package/src/anyspend/react/components/AnyspendDepositHype.tsx +525 -0
- package/src/anyspend/react/components/common/CryptoReceiveSection.tsx +152 -0
- package/src/anyspend/react/components/common/ErrorSection.tsx +21 -0
- package/src/anyspend/react/components/common/PanelOnramp.tsx +4 -2
- package/src/anyspend/react/components/common/PaySection.tsx +222 -0
- package/src/anyspend/react/components/common/TabSection.tsx +58 -0
- package/src/anyspend/react/components/index.ts +2 -0
- package/src/anyspend/react/hooks/useAnyspendFlow.ts +226 -0
- package/src/global-account/react/components/B3DynamicModal.tsx +3 -0
- package/src/global-account/react/hooks/useSiwe.native.tsx +40 -0
- package/src/global-account/react/stores/useModalStore.ts +19 -1
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
export declare function AnySpendDepositHype(props: {
|
|
2
|
+
loadOrder?: string;
|
|
3
|
+
mode?: "modal" | "page";
|
|
4
|
+
recipientAddress: string;
|
|
5
|
+
paymentType?: "crypto" | "fiat";
|
|
6
|
+
sourceTokenAddress?: string;
|
|
7
|
+
sourceTokenChainId?: number;
|
|
8
|
+
onSuccess?: () => void;
|
|
9
|
+
depositContractAddress?: string;
|
|
10
|
+
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,17 @@
|
|
|
1
|
+
import { components } from "../../../types/api";
|
|
2
|
+
interface CryptoReceiveSectionProps {
|
|
3
|
+
isDepositMode?: boolean;
|
|
4
|
+
isBuyMode?: boolean;
|
|
5
|
+
selectedRecipientAddress?: string;
|
|
6
|
+
recipientName?: string;
|
|
7
|
+
onSelectRecipient: () => void;
|
|
8
|
+
dstAmount: string;
|
|
9
|
+
dstToken: components["schemas"]["Token"];
|
|
10
|
+
selectedDstChainId?: number;
|
|
11
|
+
setSelectedDstChainId?: (chainId: number) => void;
|
|
12
|
+
setSelectedDstToken?: (token: components["schemas"]["Token"]) => void;
|
|
13
|
+
onChangeDstAmount?: (value: string) => void;
|
|
14
|
+
anyspendQuote?: any;
|
|
15
|
+
}
|
|
16
|
+
export declare function CryptoReceiveSection({ isDepositMode, isBuyMode, selectedRecipientAddress, recipientName, onSelectRecipient, dstAmount, dstToken, selectedDstChainId, setSelectedDstChainId, setSelectedDstToken, onChangeDstAmount, anyspendQuote, }: CryptoReceiveSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
17
|
+
export {};
|
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
import { components } from "@b3dotfun/sdk/anyspend/types/api";
|
|
2
2
|
import { FiatPaymentMethod } from "./FiatPaymentMethod";
|
|
3
|
-
export declare function PanelOnramp({ srcAmountOnRamp, setSrcAmountOnRamp, selectedPaymentMethod, setActivePanel, _recipientAddress, destinationToken, destinationChainId, destinationAmount, onDestinationTokenChange, onDestinationChainChange, }: {
|
|
3
|
+
export declare function PanelOnramp({ srcAmountOnRamp, setSrcAmountOnRamp, selectedPaymentMethod, setActivePanel, _recipientAddress, destinationToken, destinationChainId, destinationAmount, onDestinationTokenChange, onDestinationChainChange, fiatPaymentMethodIndex, }: {
|
|
4
4
|
srcAmountOnRamp: string;
|
|
5
5
|
setSrcAmountOnRamp: (amount: string) => void;
|
|
6
6
|
selectedPaymentMethod?: FiatPaymentMethod;
|
|
@@ -11,4 +11,5 @@ export declare function PanelOnramp({ srcAmountOnRamp, setSrcAmountOnRamp, selec
|
|
|
11
11
|
destinationAmount?: string;
|
|
12
12
|
onDestinationTokenChange?: (token: components["schemas"]["Token"]) => void;
|
|
13
13
|
onDestinationChainChange?: (chainId: number) => void;
|
|
14
|
+
fiatPaymentMethodIndex: number;
|
|
14
15
|
}): import("react/jsx-runtime").JSX.Element;
|
|
@@ -0,0 +1,20 @@
|
|
|
1
|
+
import { components } from "../../../types/api";
|
|
2
|
+
import { CryptoPaymentMethodType } from "./CryptoPaymentMethod";
|
|
3
|
+
import { FiatPaymentMethod } from "./FiatPaymentMethod";
|
|
4
|
+
interface PaySectionProps {
|
|
5
|
+
paymentType: "crypto" | "fiat";
|
|
6
|
+
selectedSrcChainId: number;
|
|
7
|
+
setSelectedSrcChainId: (chainId: number) => void;
|
|
8
|
+
selectedSrcToken: components["schemas"]["Token"];
|
|
9
|
+
setSelectedSrcToken: (token: components["schemas"]["Token"]) => void;
|
|
10
|
+
srcAmount: string;
|
|
11
|
+
setSrcAmount: (amount: string) => void;
|
|
12
|
+
setIsSrcInputDirty: (dirty: boolean) => void;
|
|
13
|
+
selectedCryptoPaymentMethod: CryptoPaymentMethodType;
|
|
14
|
+
selectedFiatPaymentMethod: FiatPaymentMethod;
|
|
15
|
+
onSelectCryptoPaymentMethod: () => void;
|
|
16
|
+
onSelectFiatPaymentMethod: () => void;
|
|
17
|
+
anyspendQuote?: any;
|
|
18
|
+
}
|
|
19
|
+
export declare function PaySection({ paymentType, selectedSrcChainId, setSelectedSrcChainId, selectedSrcToken, setSelectedSrcToken, srcAmount, setSrcAmount, setIsSrcInputDirty, selectedCryptoPaymentMethod, selectedFiatPaymentMethod, onSelectCryptoPaymentMethod, onSelectFiatPaymentMethod, anyspendQuote, }: PaySectionProps): import("react/jsx-runtime").JSX.Element;
|
|
20
|
+
export {};
|
|
@@ -0,0 +1,10 @@
|
|
|
1
|
+
import { CryptoPaymentMethodType } from "./CryptoPaymentMethod";
|
|
2
|
+
import { FiatPaymentMethod } from "./FiatPaymentMethod";
|
|
3
|
+
interface TabSectionProps {
|
|
4
|
+
activeTab: "crypto" | "fiat";
|
|
5
|
+
setActiveTab: (tab: "crypto" | "fiat") => void;
|
|
6
|
+
setSelectedCryptoPaymentMethod: (method: CryptoPaymentMethodType) => void;
|
|
7
|
+
setSelectedFiatPaymentMethod: (method: FiatPaymentMethod) => void;
|
|
8
|
+
}
|
|
9
|
+
export declare function TabSection({ activeTab, setActiveTab, setSelectedCryptoPaymentMethod, setSelectedFiatPaymentMethod, }: TabSectionProps): import("react/jsx-runtime").JSX.Element;
|
|
10
|
+
export {};
|
|
@@ -9,6 +9,7 @@ export { AnySpendStakeB3 } from "./AnySpendStakeB3";
|
|
|
9
9
|
export { AnySpendTournament } from "./AnySpendTournament";
|
|
10
10
|
export { AnySpendNFTButton } from "./common/AnySpendNFTButton";
|
|
11
11
|
export { ChainTokenIcon } from "./common/ChainTokenIcon";
|
|
12
|
+
export { CryptoReceiveSection } from "./common/CryptoReceiveSection";
|
|
12
13
|
export { OrderDetails } from "./common/OrderDetails";
|
|
13
14
|
export { OrderDetailsCollapsible } from "./common/OrderDetailsCollapsible";
|
|
14
15
|
export { OrderHistory } from "./common/OrderHistory";
|
|
@@ -16,6 +17,7 @@ export { OrderHistoryItem } from "./common/OrderHistoryItem";
|
|
|
16
17
|
export { OrderStatus } from "./common/OrderStatus";
|
|
17
18
|
export { OrderToken } from "./common/OrderToken";
|
|
18
19
|
export { OrderTokenAmount } from "./common/OrderTokenAmount";
|
|
20
|
+
export { PaySection } from "./common/PaySection";
|
|
19
21
|
export { RecipientSelection } from "./common/RecipientSelection";
|
|
20
22
|
export { StepProgress } from "./common/StepProgress";
|
|
21
23
|
export { TokenBalance } from "./common/TokenBalance";
|
|
@@ -0,0 +1,165 @@
|
|
|
1
|
+
import { components } from "../../types/api";
|
|
2
|
+
import { CryptoPaymentMethodType } from "../components/common/CryptoPaymentMethod";
|
|
3
|
+
import { FiatPaymentMethod } from "../components/common/FiatPaymentMethod";
|
|
4
|
+
export declare enum PanelView {
|
|
5
|
+
MAIN = 0,
|
|
6
|
+
CRYPTO_PAYMENT_METHOD = 1,
|
|
7
|
+
FIAT_PAYMENT_METHOD = 2,
|
|
8
|
+
RECIPIENT_SELECTION = 3,
|
|
9
|
+
ORDER_DETAILS = 4,
|
|
10
|
+
LOADING = 5
|
|
11
|
+
}
|
|
12
|
+
interface UseAnyspendFlowProps {
|
|
13
|
+
paymentType?: "crypto" | "fiat";
|
|
14
|
+
recipientAddress?: string;
|
|
15
|
+
loadOrder?: string;
|
|
16
|
+
isDepositMode?: boolean;
|
|
17
|
+
onOrderSuccess?: (orderId: string) => void;
|
|
18
|
+
onTransactionSuccess?: () => void;
|
|
19
|
+
sourceTokenAddress?: string;
|
|
20
|
+
sourceTokenChainId?: number;
|
|
21
|
+
}
|
|
22
|
+
export declare function useAnyspendFlow({ paymentType, recipientAddress, loadOrder, isDepositMode, onOrderSuccess, onTransactionSuccess, sourceTokenAddress, sourceTokenChainId, }: UseAnyspendFlowProps): {
|
|
23
|
+
activePanel: PanelView;
|
|
24
|
+
setActivePanel: import("react").Dispatch<import("react").SetStateAction<PanelView>>;
|
|
25
|
+
orderId: string | undefined;
|
|
26
|
+
setOrderId: import("react").Dispatch<import("react").SetStateAction<string | undefined>>;
|
|
27
|
+
oat: {
|
|
28
|
+
success: boolean;
|
|
29
|
+
message: string;
|
|
30
|
+
data: {
|
|
31
|
+
order: components["schemas"]["Order"];
|
|
32
|
+
depositTxs: components["schemas"]["DepositTx"][] | null;
|
|
33
|
+
relayTx: components["schemas"]["RelayTx"] | null;
|
|
34
|
+
executeTx: components["schemas"]["ExecuteTx"] | null;
|
|
35
|
+
refundTxs: components["schemas"]["RefundTx"][] | null;
|
|
36
|
+
};
|
|
37
|
+
statusCode: number;
|
|
38
|
+
} | undefined;
|
|
39
|
+
selectedSrcChainId: number;
|
|
40
|
+
setSelectedSrcChainId: import("react").Dispatch<import("react").SetStateAction<number>>;
|
|
41
|
+
selectedDstChainId: number;
|
|
42
|
+
setSelectedDstChainId: import("react").Dispatch<import("react").SetStateAction<number>>;
|
|
43
|
+
selectedSrcToken: {
|
|
44
|
+
chainId: number;
|
|
45
|
+
address: string;
|
|
46
|
+
symbol: string;
|
|
47
|
+
name: string;
|
|
48
|
+
decimals: number;
|
|
49
|
+
metadata: {
|
|
50
|
+
logoURI?: string;
|
|
51
|
+
};
|
|
52
|
+
};
|
|
53
|
+
setSelectedSrcToken: import("react").Dispatch<import("react").SetStateAction<{
|
|
54
|
+
chainId: number;
|
|
55
|
+
address: string;
|
|
56
|
+
symbol: string;
|
|
57
|
+
name: string;
|
|
58
|
+
decimals: number;
|
|
59
|
+
metadata: {
|
|
60
|
+
logoURI?: string;
|
|
61
|
+
};
|
|
62
|
+
}>>;
|
|
63
|
+
srcAmount: string;
|
|
64
|
+
setSrcAmount: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
65
|
+
dstAmount: string;
|
|
66
|
+
setDstAmount: import("react").Dispatch<import("react").SetStateAction<string>>;
|
|
67
|
+
isSrcInputDirty: boolean;
|
|
68
|
+
setIsSrcInputDirty: import("react").Dispatch<import("react").SetStateAction<boolean>>;
|
|
69
|
+
selectedCryptoPaymentMethod: CryptoPaymentMethodType;
|
|
70
|
+
setSelectedCryptoPaymentMethod: import("react").Dispatch<import("react").SetStateAction<CryptoPaymentMethodType>>;
|
|
71
|
+
selectedFiatPaymentMethod: FiatPaymentMethod;
|
|
72
|
+
setSelectedFiatPaymentMethod: import("react").Dispatch<import("react").SetStateAction<FiatPaymentMethod>>;
|
|
73
|
+
selectedRecipientAddress: string | undefined;
|
|
74
|
+
setSelectedRecipientAddress: import("react").Dispatch<import("react").SetStateAction<string | undefined>>;
|
|
75
|
+
recipientName: string | null | undefined;
|
|
76
|
+
globalAddress: string | undefined;
|
|
77
|
+
anyspendQuote: {
|
|
78
|
+
success: boolean;
|
|
79
|
+
message: string;
|
|
80
|
+
data: {
|
|
81
|
+
operation?: string;
|
|
82
|
+
sender?: string;
|
|
83
|
+
recipient?: string;
|
|
84
|
+
currencyIn?: {
|
|
85
|
+
currency?: {
|
|
86
|
+
chainId?: number;
|
|
87
|
+
address?: string;
|
|
88
|
+
symbol?: string;
|
|
89
|
+
name?: string;
|
|
90
|
+
decimals?: number;
|
|
91
|
+
metadata?: {
|
|
92
|
+
logoURI?: string;
|
|
93
|
+
};
|
|
94
|
+
};
|
|
95
|
+
amount?: string;
|
|
96
|
+
amountFormatted?: string;
|
|
97
|
+
amountUsd?: string;
|
|
98
|
+
minimumAmount?: string;
|
|
99
|
+
};
|
|
100
|
+
currencyOut?: {
|
|
101
|
+
currency?: {
|
|
102
|
+
chainId?: number;
|
|
103
|
+
address?: string;
|
|
104
|
+
symbol?: string;
|
|
105
|
+
name?: string;
|
|
106
|
+
decimals?: number;
|
|
107
|
+
metadata?: {
|
|
108
|
+
logoURI?: string;
|
|
109
|
+
};
|
|
110
|
+
};
|
|
111
|
+
amount?: string;
|
|
112
|
+
amountFormatted?: string;
|
|
113
|
+
amountUsd?: string;
|
|
114
|
+
minimumAmount?: string;
|
|
115
|
+
};
|
|
116
|
+
totalImpact?: {
|
|
117
|
+
usd?: string;
|
|
118
|
+
percent?: string;
|
|
119
|
+
};
|
|
120
|
+
swapImpact?: {
|
|
121
|
+
usd?: string;
|
|
122
|
+
percent?: string;
|
|
123
|
+
};
|
|
124
|
+
rate?: string;
|
|
125
|
+
slippageTolerance?: {
|
|
126
|
+
origin?: {
|
|
127
|
+
usd?: string;
|
|
128
|
+
value?: string;
|
|
129
|
+
percent?: string;
|
|
130
|
+
};
|
|
131
|
+
destination?: {
|
|
132
|
+
usd?: string;
|
|
133
|
+
value?: string;
|
|
134
|
+
percent?: string;
|
|
135
|
+
};
|
|
136
|
+
};
|
|
137
|
+
timeEstimate?: number;
|
|
138
|
+
userBalance?: string;
|
|
139
|
+
};
|
|
140
|
+
statusCode: number;
|
|
141
|
+
} | undefined;
|
|
142
|
+
isLoadingAnyspendQuote: boolean;
|
|
143
|
+
getAnyspendQuoteError: Error | null;
|
|
144
|
+
activeInputAmountInWei: string;
|
|
145
|
+
geoData: import("@b3dotfun/sdk/anyspend/react").GeoData | undefined;
|
|
146
|
+
coinbaseAvailablePaymentMethods: {
|
|
147
|
+
id?: string;
|
|
148
|
+
min?: string;
|
|
149
|
+
max?: string;
|
|
150
|
+
}[];
|
|
151
|
+
stripeWeb2Support: {
|
|
152
|
+
isSupport: false;
|
|
153
|
+
} | {
|
|
154
|
+
isSupport: true;
|
|
155
|
+
formattedTotalUsd: string;
|
|
156
|
+
formattedOnrampUsd: string;
|
|
157
|
+
formattedFeeUsd: string;
|
|
158
|
+
};
|
|
159
|
+
getOnrampVendor: (paymentMethod: FiatPaymentMethod) => "coinbase" | "stripe" | "stripe-web2" | undefined;
|
|
160
|
+
createOrder: import("@tanstack/react-query").UseMutateFunction<any, Error, import("@b3dotfun/sdk/anyspend/react").CreateOrderParams, unknown>;
|
|
161
|
+
isCreatingOrder: boolean;
|
|
162
|
+
createOnrampOrder: import("@tanstack/react-query").UseMutateFunction<any, Error, import("@b3dotfun/sdk/anyspend/react").CreateOnrampOrderParams, unknown>;
|
|
163
|
+
isCreatingOnrampOrder: boolean;
|
|
164
|
+
};
|
|
165
|
+
export {};
|
|
@@ -28,10 +28,10 @@ export declare const useGenerateSigMintData: ({ recipientAddress, contractAddres
|
|
|
28
28
|
description?: string | undefined;
|
|
29
29
|
properties?: any;
|
|
30
30
|
image?: string | undefined;
|
|
31
|
+
backgroundColor?: string | undefined;
|
|
31
32
|
externalLink?: string | undefined;
|
|
32
33
|
appUri?: string | undefined;
|
|
33
34
|
attributes?: any;
|
|
34
|
-
backgroundColor?: string | undefined;
|
|
35
35
|
promptImageUrl?: string | undefined;
|
|
36
36
|
};
|
|
37
37
|
} | undefined;
|
|
@@ -48,8 +48,8 @@ export declare const useGenerateSigMintData: ({ recipientAddress, contractAddres
|
|
|
48
48
|
creatorMap?: {} | undefined;
|
|
49
49
|
chainId: number;
|
|
50
50
|
address: string;
|
|
51
|
-
title: string;
|
|
52
51
|
_id: string | {};
|
|
52
|
+
title: string;
|
|
53
53
|
};
|
|
54
54
|
} | null;
|
|
55
55
|
error: Error | null;
|
|
@@ -1,7 +1,7 @@
|
|
|
1
1
|
import * as React from "react";
|
|
2
2
|
declare const buttonVariants: (props?: ({
|
|
3
3
|
variant?: "link" | "default" | "b3" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
4
|
-
size?: "default" | "
|
|
4
|
+
size?: "default" | "icon" | "sm" | "lg" | null | undefined;
|
|
5
5
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
6
6
|
interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement> {
|
|
7
7
|
variant?: "default" | "outline";
|
|
@@ -2,7 +2,7 @@ import { type VariantProps } from "class-variance-authority";
|
|
|
2
2
|
import * as React from "react";
|
|
3
3
|
declare const buttonVariants: (props?: ({
|
|
4
4
|
variant?: "link" | "default" | "destructive" | "outline" | "secondary" | "ghost" | null | undefined;
|
|
5
|
-
size?: "default" | "
|
|
5
|
+
size?: "default" | "icon" | "sm" | "lg" | null | undefined;
|
|
6
6
|
} & import("class-variance-authority/dist/types").ClassProp) | undefined) => string;
|
|
7
7
|
export interface ButtonProps extends React.ButtonHTMLAttributes<HTMLButtonElement>, VariantProps<typeof buttonVariants> {
|
|
8
8
|
asChild?: boolean;
|
|
@@ -23,7 +23,7 @@ declare const CommandInput: React.ForwardRefExoticComponent<Omit<Omit<Pick<Pick<
|
|
|
23
23
|
ref?: React.Ref<HTMLInputElement>;
|
|
24
24
|
} & {
|
|
25
25
|
asChild?: boolean;
|
|
26
|
-
}, "key" |
|
|
26
|
+
}, "key" | keyof React.InputHTMLAttributes<HTMLInputElement> | "asChild">, "type" | "value" | "onChange"> & {
|
|
27
27
|
value?: string;
|
|
28
28
|
onValueChange?: (search: string) => void;
|
|
29
29
|
} & React.RefAttributes<HTMLInputElement>, "ref"> & React.RefAttributes<HTMLInputElement>>;
|
|
@@ -67,7 +67,7 @@ declare const CommandItem: React.ForwardRefExoticComponent<Omit<{
|
|
|
67
67
|
ref?: React.Ref<HTMLDivElement>;
|
|
68
68
|
} & {
|
|
69
69
|
asChild?: boolean;
|
|
70
|
-
}, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>>, "value" | "
|
|
70
|
+
}, "key" | "asChild" | keyof React.HTMLAttributes<HTMLDivElement>>, "value" | "onSelect" | "disabled"> & {
|
|
71
71
|
disabled?: boolean;
|
|
72
72
|
onSelect?: (value: string) => void;
|
|
73
73
|
value?: string;
|
|
@@ -287,10 +287,26 @@ export interface LinkAccountModalProps extends BaseModalProps {
|
|
|
287
287
|
partnerId: string;
|
|
288
288
|
chain: Chain;
|
|
289
289
|
}
|
|
290
|
+
export interface AnySpendDepositHypeProps extends BaseModalProps {
|
|
291
|
+
/** Modal type identifier */
|
|
292
|
+
type: "anySpendDepositHype";
|
|
293
|
+
/** Recipient address to receive the tokens */
|
|
294
|
+
recipientAddress: string;
|
|
295
|
+
/** Destination token address */
|
|
296
|
+
sourceTokenAddress?: string;
|
|
297
|
+
/** Source token chain ID */
|
|
298
|
+
sourceTokenChainId?: number;
|
|
299
|
+
/** Payment type - crypto or fiat */
|
|
300
|
+
paymentType?: "crypto" | "fiat";
|
|
301
|
+
/** Deposit contract address */
|
|
302
|
+
depositContractAddress: string;
|
|
303
|
+
/** Callback function called when the deposit is successful */
|
|
304
|
+
onSuccess?: () => void;
|
|
305
|
+
}
|
|
290
306
|
/**
|
|
291
307
|
* Union type of all possible modal content types
|
|
292
308
|
*/
|
|
293
|
-
export type ModalContentType = SignInWithB3ModalProps | RequestPermissionsModalProps | ManageAccountModalProps | AnySpendModalProps | AnyspendOrderDetailsProps | AnySpendNftProps | AnySpendJoinTournamentProps | AnySpendFundTournamentProps | TransakProps | AnySpendOrderHistoryProps | AnySpendStakeB3Props | AnySpendBuySpinProps | AnySpendSignatureMintProps | AnySpendBondKitProps | LinkAccountModalProps;
|
|
309
|
+
export type ModalContentType = SignInWithB3ModalProps | RequestPermissionsModalProps | ManageAccountModalProps | AnySpendModalProps | AnyspendOrderDetailsProps | AnySpendNftProps | AnySpendJoinTournamentProps | AnySpendFundTournamentProps | TransakProps | AnySpendOrderHistoryProps | AnySpendStakeB3Props | AnySpendBuySpinProps | AnySpendSignatureMintProps | AnySpendBondKitProps | LinkAccountModalProps | AnySpendDepositHypeProps;
|
|
294
310
|
/**
|
|
295
311
|
* State interface for the modal store
|
|
296
312
|
*/
|
|
@@ -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;
|
|
14
13
|
testnetConfigID?: number | undefined;
|
|
15
14
|
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 | {};
|
|
38
39
|
icon: {
|
|
39
40
|
format: string;
|
|
40
41
|
url: string;
|
|
41
|
-
height: number;
|
|
42
42
|
width: number;
|
|
43
|
+
height: number;
|
|
43
44
|
};
|
|
44
|
-
_id: string | {};
|
|
45
45
|
}[];
|
|
46
46
|
export declare const coingeckoChains: Record<number, {
|
|
47
47
|
coingecko_id: string;
|
package/package.json
CHANGED
|
@@ -1,6 +1,6 @@
|
|
|
1
1
|
{
|
|
2
2
|
"name": "@b3dotfun/sdk",
|
|
3
|
-
"version": "0.0.28-alpha.
|
|
3
|
+
"version": "0.0.28-alpha.2",
|
|
4
4
|
"source": "src/index.ts",
|
|
5
5
|
"main": "./dist/cjs/index.js",
|
|
6
6
|
"react-native": "./dist/cjs/index.native.js",
|
|
@@ -214,6 +214,18 @@
|
|
|
214
214
|
"types": "./dist/types/bondkit/components/TradingView/TradingView.d.ts",
|
|
215
215
|
"import": "./dist/esm/bondkit/components/TradingView/TradingView.js",
|
|
216
216
|
"require": "./dist/cjs/bondkit/components/TradingView/TradingView.js"
|
|
217
|
+
},
|
|
218
|
+
"./global-account/react/hooks/useSiwe": {
|
|
219
|
+
"react-native": {
|
|
220
|
+
"types": "./dist/types/global-account/react/hooks/useSiwe.native.d.ts",
|
|
221
|
+
"import": "./dist/esm/global-account/react/hooks/useSiwe.native.js",
|
|
222
|
+
"require": "./dist/cjs/global-account/react/hooks/useSiwe.native.js"
|
|
223
|
+
},
|
|
224
|
+
"default": {
|
|
225
|
+
"types": "./dist/types/global-account/react/hooks/useSiwe.d.ts",
|
|
226
|
+
"import": "./dist/esm/global-account/react/hooks/useSiwe.js",
|
|
227
|
+
"require": "./dist/cjs/global-account/react/hooks/useSiwe.js"
|
|
228
|
+
}
|
|
217
229
|
}
|
|
218
230
|
},
|
|
219
231
|
"files": [
|