-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathtype.d.ts
78 lines (72 loc) · 1.72 KB
/
type.d.ts
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
interface Window {
Jupiter: any;
}
type PriceData = {
symbol: string;
price: number;
priceChange24h: number;
sparklineData: number[];
lastUpdated: string;
From?: string;
To?: string;
"Input Amount"?: string;
"Expected Output"?: string;
"Minimum Output Amount"?: string;
"Price Impact"?: string;
Route?: string;
inputMint?: string;
outputMint?: string;
inAmount?: string;
outAmount?: string;
otherAmountThreshold?: string;
priceImpactPct?: number;
routePlan?: any[];
};
type Message = {
sender: "user" | "bot"
content: string
priceData?: PriceData
quoteData?: any
isSwapConfirmation?: boolean
inputAmount?: number
outputAmount?: number
actionType?: string
}
type QuoteData = {
inputMint: string;
inAmount: string;
outputMint: string;
outAmount: string;
otherAmountThreshold: string;
swapMode: string;
slippageBps: number;
platformFee: null | any; // Update this if you know the specific structure
priceImpactPct: string;
routePlan: Array<{
swapInfo: {
ammKey: string;
label: string;
inputMint: string;
outputMint: string;
inAmount: string;
outAmount: string;
feeAmount: string;
feeMint: string;
};
percent: number;
}>;
};
type TransactionDetails = {
transaction: string | Uint8Array | Transaction;
connection: string;
network: string;
};
type SwapConfirmationButtonsProps = {
onConfirm: () => void;
onCancel: () => void;
};
type SwapConfirmation = {
message: string;
options: Array<{ label: string; value: string }>;
transactionDetails: TransactionDetails;
};