@b3dotfun/sdk 0.0.44-alpha.1 → 0.0.44-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/react/components/AnySpend.js +12 -13
- package/dist/cjs/anyspend/react/components/AnyspendDepositHype.js +13 -14
- package/dist/cjs/anyspend/react/components/common/OrderHistory.js +2 -2
- package/dist/cjs/anyspend/react/components/common/OrderHistoryItem.js +6 -3
- package/dist/cjs/anyspend/types/api.d.ts +176 -0
- package/dist/esm/anyspend/react/components/AnySpend.js +13 -14
- package/dist/esm/anyspend/react/components/AnyspendDepositHype.js +14 -15
- package/dist/esm/anyspend/react/components/common/OrderHistory.js +2 -2
- package/dist/esm/anyspend/react/components/common/OrderHistoryItem.js +8 -5
- package/dist/esm/anyspend/types/api.d.ts +176 -0
- package/dist/styles/index.css +1 -1
- package/dist/types/anyspend/types/api.d.ts +176 -0
- package/package.json +2 -1
- package/src/anyspend/react/components/AnySpend.tsx +20 -18
- package/src/anyspend/react/components/AnyspendDepositHype.tsx +21 -20
- package/src/anyspend/react/components/common/OrderHistory.tsx +11 -11
- package/src/anyspend/react/components/common/OrderHistoryItem.tsx +104 -130
- package/src/anyspend/types/api.ts +176 -0
- package/dist/cjs/anyspend/react/components/common/ErrorSection.d.ts +0 -6
- package/dist/cjs/anyspend/react/components/common/ErrorSection.js +0 -12
- package/dist/esm/anyspend/react/components/common/ErrorSection.d.ts +0 -6
- package/dist/esm/anyspend/react/components/common/ErrorSection.js +0 -9
- package/dist/types/anyspend/react/components/common/ErrorSection.d.ts +0 -6
- package/src/anyspend/react/components/common/ErrorSection.tsx +0 -21
|
@@ -2,6 +2,7 @@ import { ALL_CHAINS, getChainName, getStatusDisplay } from "@b3dotfun/sdk/anyspe
|
|
|
2
2
|
import { Badge, Button, useIsMobile } from "@b3dotfun/sdk/global-account/react";
|
|
3
3
|
import { cn } from "@b3dotfun/sdk/shared/utils";
|
|
4
4
|
import { formatTokenAmount } from "@b3dotfun/sdk/shared/utils/number";
|
|
5
|
+
import { getVendorDisplayName } from "@b3dotfun/sdk/shared/utils/payment.utils";
|
|
5
6
|
import { ArrowRight, ChevronDown } from "lucide-react";
|
|
6
7
|
import TimeAgo from "react-timeago";
|
|
7
8
|
import { b3 } from "viem/chains";
|
|
@@ -31,153 +32,126 @@ export function OrderHistoryItem({ order, onSelectOrder, mode }: OrderHistoryIte
|
|
|
31
32
|
|
|
32
33
|
const isSmallView = useIsMobile() || mode === "modal";
|
|
33
34
|
|
|
35
|
+
// Check if this is a one-click payment order
|
|
36
|
+
const isOneClickPayment = !!order.oneClickBuyUrl;
|
|
37
|
+
const vendorName = order.onrampMetadata?.vendor ? getVendorDisplayName(order.onrampMetadata.vendor) : null;
|
|
38
|
+
|
|
34
39
|
return (
|
|
35
40
|
<div
|
|
36
41
|
key={`anyspend-${order.id}`}
|
|
37
42
|
className={cn(
|
|
38
|
-
"bg-as-
|
|
39
|
-
onSelectOrder && "
|
|
43
|
+
"bg-as-surface-secondary hover:bg-as-surface-tertiary rounded-xl p-4 transition-all",
|
|
44
|
+
onSelectOrder && "cursor-pointer",
|
|
40
45
|
)}
|
|
41
46
|
onClick={() => onSelectOrder?.(order.id)}
|
|
42
47
|
>
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
className={cn(
|
|
46
|
-
"px-3 py-1 text-xs",
|
|
47
|
-
orderDisplayStatus === "processing" && "bg-yellow-500/10 text-yellow-500",
|
|
48
|
-
orderDisplayStatus === "success" && "bg-green-500/10 text-green-500",
|
|
49
|
-
orderDisplayStatus === "failure" && "bg-red-500/10 text-red-500",
|
|
50
|
-
)}
|
|
51
|
-
>
|
|
52
|
-
{orderStatusText}
|
|
53
|
-
</Badge>
|
|
54
|
-
|
|
48
|
+
{/* Header: Status and Time */}
|
|
49
|
+
<div className="mb-3 flex items-center justify-between">
|
|
55
50
|
<div className="flex items-center gap-2">
|
|
56
|
-
<
|
|
57
|
-
|
|
58
|
-
|
|
51
|
+
<div
|
|
52
|
+
className={cn(
|
|
53
|
+
"text-xs font-semibold",
|
|
54
|
+
orderDisplayStatus === "processing" && "text-yellow-600",
|
|
55
|
+
orderDisplayStatus === "success" && "text-green-600",
|
|
56
|
+
orderDisplayStatus === "failure" && "text-red-600",
|
|
57
|
+
)}
|
|
58
|
+
>
|
|
59
|
+
{orderStatusText}
|
|
60
|
+
</div>
|
|
61
|
+
{isOneClickPayment && vendorName && (
|
|
62
|
+
<Badge variant="outline" className="text-as-secondary px-2 py-0.5 text-[10px]">
|
|
63
|
+
{vendorName}
|
|
64
|
+
</Badge>
|
|
65
|
+
)}
|
|
66
|
+
</div>
|
|
67
|
+
<div className="text-as-secondary text-[10px] font-medium uppercase tracking-wide">
|
|
68
|
+
<TimeAgo date={new Date(order.createdAt)} />
|
|
59
69
|
</div>
|
|
60
70
|
</div>
|
|
61
71
|
|
|
62
|
-
{
|
|
63
|
-
|
|
64
|
-
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
|
|
68
|
-
|
|
69
|
-
|
|
70
|
-
|
|
71
|
-
|
|
72
|
-
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
{nft ? (
|
|
76
|
-
<img src={nft.imageUrl} alt={nft.name} className="h-6 w-6" />
|
|
77
|
-
) : tournament ? (
|
|
78
|
-
<img src={tournament.imageUrl} alt={tournament.name} className="h-6 w-6" />
|
|
79
|
-
) : (
|
|
80
|
-
<img src={dstToken.metadata.logoURI} alt={dstToken.symbol} className="h-6 w-6" />
|
|
81
|
-
)}
|
|
82
|
-
{nft ? nft.name : tournament ? tournament.name : dstToken.symbol}
|
|
83
|
-
</span>
|
|
84
|
-
|
|
85
|
-
<span className="flex items-center gap-2">
|
|
86
|
-
{` on `}
|
|
87
|
-
<span className="text-as-primary flex items-center gap-2">
|
|
88
|
-
<img src={ALL_CHAINS[order.dstChain]?.logoUrl} alt={getChainName(order.dstChain)} className="h-4" />
|
|
89
|
-
{order.dstChain !== b3.id && getChainName(order.dstChain)}
|
|
90
|
-
</span>
|
|
91
|
-
</span>
|
|
92
|
-
</h3>
|
|
93
|
-
|
|
94
|
-
<p className="label-style text-as-primary/30 mt-1 flex items-center gap-2 text-xs">
|
|
95
|
-
Paying via{" "}
|
|
96
|
-
<img src="https://cdn.b3.fun/coinbase-wordmark-blue.svg" alt="Coinbase" className="-mt-1 h-3" />
|
|
97
|
-
</p>
|
|
98
|
-
</div>
|
|
99
|
-
</div>
|
|
100
|
-
) : (
|
|
101
|
-
<div className={cn("mb-3 mt-4 flex items-center gap-1", isSmallView && "flex-col")}>
|
|
102
|
-
<div className="bg-b3-react-background flex w-full flex-1 flex-col gap-1 overflow-hidden rounded-lg border p-4 px-5">
|
|
103
|
-
<div className="flex items-center gap-2">
|
|
104
|
-
<img
|
|
105
|
-
src={order.metadata.srcToken.metadata.logoURI}
|
|
106
|
-
alt={order.metadata.srcToken.symbol}
|
|
107
|
-
className="h-6 w-6 rounded-full"
|
|
108
|
-
/>
|
|
109
|
-
<div className="text-as-primary flex items-center gap-2 overflow-hidden text-ellipsis whitespace-nowrap text-xl font-semibold">
|
|
110
|
-
{formatTokenAmount(BigInt(order.srcAmount), order.metadata.srcToken.decimals)}{" "}
|
|
111
|
-
{order.metadata.srcToken.symbol}
|
|
112
|
-
</div>
|
|
72
|
+
{/* Main Content: From -> To */}
|
|
73
|
+
<div className="flex items-center gap-4">
|
|
74
|
+
{/* From Section */}
|
|
75
|
+
<div className="flex min-w-0 flex-1 items-center gap-2">
|
|
76
|
+
<img
|
|
77
|
+
src={order.metadata.srcToken.metadata.logoURI}
|
|
78
|
+
alt={order.metadata.srcToken.symbol}
|
|
79
|
+
className="h-8 w-8 shrink-0 rounded-full"
|
|
80
|
+
/>
|
|
81
|
+
<div className="min-w-0 flex-1">
|
|
82
|
+
<div className="text-as-primary truncate text-sm font-bold">
|
|
83
|
+
{formatTokenAmount(BigInt(order.srcAmount), order.metadata.srcToken.decimals)}{" "}
|
|
84
|
+
{order.metadata.srcToken.symbol}
|
|
113
85
|
</div>
|
|
114
|
-
|
|
115
|
-
|
|
116
|
-
|
|
117
|
-
<img
|
|
118
|
-
src={ALL_CHAINS[order.srcChain]?.logoUrl}
|
|
119
|
-
alt={getChainName(order.srcChain)}
|
|
120
|
-
className={cn("h-4", order.srcChain !== b3.id && "w-4 rounded-full", order.srcChain === b3.id && "h-3")}
|
|
121
|
-
/>
|
|
122
|
-
{getChainName(order.srcChain)}
|
|
86
|
+
<div className="text-as-secondary flex items-center gap-1 text-xs">
|
|
87
|
+
<img src={ALL_CHAINS[order.srcChain]?.logoUrl} alt={getChainName(order.srcChain)} className="h-3 w-3" />
|
|
88
|
+
<span className="truncate">{getChainName(order.srcChain)}</span>
|
|
123
89
|
</div>
|
|
124
90
|
</div>
|
|
91
|
+
</div>
|
|
125
92
|
|
|
126
|
-
|
|
127
|
-
|
|
128
|
-
</div>
|
|
93
|
+
{/* Arrow */}
|
|
94
|
+
<ArrowRight className="text-as-secondary h-5 w-5 shrink-0 opacity-30" />
|
|
129
95
|
|
|
130
|
-
|
|
131
|
-
|
|
132
|
-
|
|
133
|
-
|
|
134
|
-
|
|
135
|
-
|
|
136
|
-
|
|
137
|
-
|
|
138
|
-
|
|
139
|
-
|
|
140
|
-
|
|
141
|
-
|
|
142
|
-
|
|
143
|
-
|
|
144
|
-
|
|
145
|
-
|
|
146
|
-
|
|
147
|
-
|
|
148
|
-
|
|
149
|
-
|
|
150
|
-
|
|
151
|
-
|
|
152
|
-
|
|
153
|
-
|
|
154
|
-
|
|
155
|
-
|
|
156
|
-
|
|
157
|
-
|
|
158
|
-
|
|
159
|
-
|
|
160
|
-
|
|
161
|
-
|
|
162
|
-
|
|
163
|
-
|
|
164
|
-
|
|
165
|
-
<
|
|
166
|
-
|
|
167
|
-
|
|
168
|
-
|
|
169
|
-
|
|
170
|
-
|
|
171
|
-
|
|
172
|
-
|
|
96
|
+
{/* To Section */}
|
|
97
|
+
<div className="flex min-w-0 flex-1 items-center gap-2">
|
|
98
|
+
{nft ? (
|
|
99
|
+
<>
|
|
100
|
+
<img src={nft.imageUrl} alt={nft.name} className="h-8 w-8 shrink-0 rounded-full" />
|
|
101
|
+
<div className="min-w-0 flex-1">
|
|
102
|
+
<div className="text-as-primary truncate text-sm font-bold">{nft.name}</div>
|
|
103
|
+
<div className="text-as-secondary flex items-center gap-1 text-xs">
|
|
104
|
+
<img
|
|
105
|
+
src={ALL_CHAINS[order.dstChain]?.logoUrl}
|
|
106
|
+
alt={getChainName(order.dstChain)}
|
|
107
|
+
className="h-3 w-3"
|
|
108
|
+
/>
|
|
109
|
+
<span className="truncate">{getChainName(order.dstChain)}</span>
|
|
110
|
+
</div>
|
|
111
|
+
</div>
|
|
112
|
+
</>
|
|
113
|
+
) : tournament ? (
|
|
114
|
+
<>
|
|
115
|
+
<img src={tournament.imageUrl} alt={tournament.name} className="h-8 w-8 shrink-0 rounded-full" />
|
|
116
|
+
<div className="min-w-0 flex-1">
|
|
117
|
+
<div className="text-as-primary truncate text-sm font-bold">{tournament.name}</div>
|
|
118
|
+
<div className="text-as-secondary flex items-center gap-1 text-xs">
|
|
119
|
+
<img
|
|
120
|
+
src={ALL_CHAINS[order.dstChain]?.logoUrl}
|
|
121
|
+
alt={getChainName(order.dstChain)}
|
|
122
|
+
className="h-3 w-3"
|
|
123
|
+
/>
|
|
124
|
+
<span className="truncate">{getChainName(order.dstChain)}</span>
|
|
125
|
+
</div>
|
|
126
|
+
</div>
|
|
127
|
+
</>
|
|
128
|
+
) : (
|
|
129
|
+
<>
|
|
130
|
+
<img src={dstToken.metadata.logoURI} alt={dstToken.symbol} className="h-8 w-8 shrink-0 rounded-full" />
|
|
131
|
+
<div className="min-w-0 flex-1">
|
|
132
|
+
<div className="text-as-primary truncate text-sm font-bold">
|
|
133
|
+
{formatTokenAmount(
|
|
134
|
+
actualDstAmount
|
|
135
|
+
? BigInt(actualDstAmount)
|
|
136
|
+
: expectedDstAmount
|
|
137
|
+
? BigInt(expectedDstAmount)
|
|
138
|
+
: BigInt(0),
|
|
139
|
+
dstToken.decimals,
|
|
140
|
+
)}{" "}
|
|
141
|
+
{dstToken.symbol}
|
|
142
|
+
</div>
|
|
143
|
+
<div className="text-as-secondary flex items-center gap-1 text-xs">
|
|
144
|
+
<img
|
|
145
|
+
src={ALL_CHAINS[order.dstChain]?.logoUrl}
|
|
146
|
+
alt={getChainName(order.dstChain)}
|
|
147
|
+
className="h-3 w-3"
|
|
148
|
+
/>
|
|
149
|
+
<span className="truncate">{getChainName(order.dstChain)}</span>
|
|
150
|
+
</div>
|
|
151
|
+
</div>
|
|
152
|
+
</>
|
|
153
|
+
)}
|
|
173
154
|
</div>
|
|
174
|
-
)}
|
|
175
|
-
|
|
176
|
-
<div className="flex items-center justify-end">
|
|
177
|
-
<Button variant="link" size="sm" className="h-auto" onClick={() => onSelectOrder?.(order.id)}>
|
|
178
|
-
{orderDisplayStatus === "processing" ? "Proceed with payment" : "Details"}{" "}
|
|
179
|
-
<ArrowRight className="ml-2 h-3 w-3" />
|
|
180
|
-
</Button>
|
|
181
155
|
</div>
|
|
182
156
|
</div>
|
|
183
157
|
);
|
|
@@ -5,6 +5,12 @@
|
|
|
5
5
|
|
|
6
6
|
export interface paths {
|
|
7
7
|
"/chains/{chainId}/tokens": {
|
|
8
|
+
parameters: {
|
|
9
|
+
query?: never;
|
|
10
|
+
header?: never;
|
|
11
|
+
path?: never;
|
|
12
|
+
cookie?: never;
|
|
13
|
+
};
|
|
8
14
|
/**
|
|
9
15
|
* Get tokens for a chain
|
|
10
16
|
* @description Retrieves available tokens for a specific blockchain
|
|
@@ -20,6 +26,7 @@ export interface paths {
|
|
|
20
26
|
/** @description Maximum number of tokens to return */
|
|
21
27
|
limit?: number;
|
|
22
28
|
};
|
|
29
|
+
header?: never;
|
|
23
30
|
path: {
|
|
24
31
|
/**
|
|
25
32
|
* @description Blockchain chain ID
|
|
@@ -27,10 +34,15 @@ export interface paths {
|
|
|
27
34
|
*/
|
|
28
35
|
chainId: number;
|
|
29
36
|
};
|
|
37
|
+
cookie?: never;
|
|
30
38
|
};
|
|
39
|
+
requestBody?: never;
|
|
31
40
|
responses: {
|
|
32
41
|
/** @description Tokens retrieved successfully */
|
|
33
42
|
200: {
|
|
43
|
+
headers: {
|
|
44
|
+
[name: string]: unknown;
|
|
45
|
+
};
|
|
34
46
|
content: {
|
|
35
47
|
"application/json": {
|
|
36
48
|
/** @example true */
|
|
@@ -61,6 +73,9 @@ export interface paths {
|
|
|
61
73
|
};
|
|
62
74
|
/** @description Bad request */
|
|
63
75
|
400: {
|
|
76
|
+
headers: {
|
|
77
|
+
[name: string]: unknown;
|
|
78
|
+
};
|
|
64
79
|
content: {
|
|
65
80
|
"application/json": {
|
|
66
81
|
/** @example false */
|
|
@@ -74,8 +89,21 @@ export interface paths {
|
|
|
74
89
|
};
|
|
75
90
|
};
|
|
76
91
|
};
|
|
92
|
+
put?: never;
|
|
93
|
+
post?: never;
|
|
94
|
+
delete?: never;
|
|
95
|
+
options?: never;
|
|
96
|
+
head?: never;
|
|
97
|
+
patch?: never;
|
|
98
|
+
trace?: never;
|
|
77
99
|
};
|
|
78
100
|
"/onramp/coinbase/options": {
|
|
101
|
+
parameters: {
|
|
102
|
+
query?: never;
|
|
103
|
+
header?: never;
|
|
104
|
+
path?: never;
|
|
105
|
+
cookie?: never;
|
|
106
|
+
};
|
|
79
107
|
/**
|
|
80
108
|
* Get Coinbase onramp options
|
|
81
109
|
* @description Retrieves available Coinbase onramp configuration options.
|
|
@@ -108,10 +136,17 @@ export interface paths {
|
|
|
108
136
|
*/
|
|
109
137
|
chainIds?: string[];
|
|
110
138
|
};
|
|
139
|
+
header?: never;
|
|
140
|
+
path?: never;
|
|
141
|
+
cookie?: never;
|
|
111
142
|
};
|
|
143
|
+
requestBody?: never;
|
|
112
144
|
responses: {
|
|
113
145
|
/** @description Coinbase options retrieved successfully */
|
|
114
146
|
200: {
|
|
147
|
+
headers: {
|
|
148
|
+
[name: string]: unknown;
|
|
149
|
+
};
|
|
115
150
|
content: {
|
|
116
151
|
"application/json": {
|
|
117
152
|
/** @example true */
|
|
@@ -214,6 +249,9 @@ export interface paths {
|
|
|
214
249
|
};
|
|
215
250
|
/** @description Bad request */
|
|
216
251
|
400: {
|
|
252
|
+
headers: {
|
|
253
|
+
[name: string]: unknown;
|
|
254
|
+
};
|
|
217
255
|
content: {
|
|
218
256
|
"application/json": {
|
|
219
257
|
/** @example false */
|
|
@@ -227,8 +265,21 @@ export interface paths {
|
|
|
227
265
|
};
|
|
228
266
|
};
|
|
229
267
|
};
|
|
268
|
+
put?: never;
|
|
269
|
+
post?: never;
|
|
270
|
+
delete?: never;
|
|
271
|
+
options?: never;
|
|
272
|
+
head?: never;
|
|
273
|
+
patch?: never;
|
|
274
|
+
trace?: never;
|
|
230
275
|
};
|
|
231
276
|
"/onramp/stripe/supported": {
|
|
277
|
+
parameters: {
|
|
278
|
+
query?: never;
|
|
279
|
+
header?: never;
|
|
280
|
+
path?: never;
|
|
281
|
+
cookie?: never;
|
|
282
|
+
};
|
|
232
283
|
/**
|
|
233
284
|
* Check Stripe support
|
|
234
285
|
* @description Checks if Stripe onramp and Stripe Web2 are supported based on IP address location and optional transaction amount
|
|
@@ -242,10 +293,17 @@ export interface paths {
|
|
|
242
293
|
*/
|
|
243
294
|
usdAmount?: string;
|
|
244
295
|
};
|
|
296
|
+
header?: never;
|
|
297
|
+
path?: never;
|
|
298
|
+
cookie?: never;
|
|
245
299
|
};
|
|
300
|
+
requestBody?: never;
|
|
246
301
|
responses: {
|
|
247
302
|
/** @description Stripe support status retrieved successfully */
|
|
248
303
|
200: {
|
|
304
|
+
headers: {
|
|
305
|
+
[name: string]: unknown;
|
|
306
|
+
};
|
|
249
307
|
content: {
|
|
250
308
|
"application/json": {
|
|
251
309
|
/** @example true */
|
|
@@ -268,6 +326,9 @@ export interface paths {
|
|
|
268
326
|
};
|
|
269
327
|
/** @description Bad request */
|
|
270
328
|
400: {
|
|
329
|
+
headers: {
|
|
330
|
+
[name: string]: unknown;
|
|
331
|
+
};
|
|
271
332
|
content: {
|
|
272
333
|
"application/json": {
|
|
273
334
|
/** @example false */
|
|
@@ -281,8 +342,21 @@ export interface paths {
|
|
|
281
342
|
};
|
|
282
343
|
};
|
|
283
344
|
};
|
|
345
|
+
put?: never;
|
|
346
|
+
post?: never;
|
|
347
|
+
delete?: never;
|
|
348
|
+
options?: never;
|
|
349
|
+
head?: never;
|
|
350
|
+
patch?: never;
|
|
351
|
+
trace?: never;
|
|
284
352
|
};
|
|
285
353
|
"/orders": {
|
|
354
|
+
parameters: {
|
|
355
|
+
query?: never;
|
|
356
|
+
header?: never;
|
|
357
|
+
path?: never;
|
|
358
|
+
cookie?: never;
|
|
359
|
+
};
|
|
286
360
|
/**
|
|
287
361
|
* Get orders by creator
|
|
288
362
|
* @description Retrieves all orders created by a specific address
|
|
@@ -306,10 +380,17 @@ export interface paths {
|
|
|
306
380
|
*/
|
|
307
381
|
offset?: string;
|
|
308
382
|
};
|
|
383
|
+
header?: never;
|
|
384
|
+
path?: never;
|
|
385
|
+
cookie?: never;
|
|
309
386
|
};
|
|
387
|
+
requestBody?: never;
|
|
310
388
|
responses: {
|
|
311
389
|
/** @description Orders retrieved successfully */
|
|
312
390
|
200: {
|
|
391
|
+
headers: {
|
|
392
|
+
[name: string]: unknown;
|
|
393
|
+
};
|
|
313
394
|
content: {
|
|
314
395
|
"application/json": {
|
|
315
396
|
/** @example true */
|
|
@@ -325,6 +406,9 @@ export interface paths {
|
|
|
325
406
|
};
|
|
326
407
|
/** @description Bad request */
|
|
327
408
|
400: {
|
|
409
|
+
headers: {
|
|
410
|
+
[name: string]: unknown;
|
|
411
|
+
};
|
|
328
412
|
content: {
|
|
329
413
|
"application/json": {
|
|
330
414
|
/** @example false */
|
|
@@ -338,11 +422,18 @@ export interface paths {
|
|
|
338
422
|
};
|
|
339
423
|
};
|
|
340
424
|
};
|
|
425
|
+
put?: never;
|
|
341
426
|
/**
|
|
342
427
|
* Create a new order
|
|
343
428
|
* @description Creates a new order for token transactions across chains
|
|
344
429
|
*/
|
|
345
430
|
post: {
|
|
431
|
+
parameters: {
|
|
432
|
+
query?: never;
|
|
433
|
+
header?: never;
|
|
434
|
+
path?: never;
|
|
435
|
+
cookie?: never;
|
|
436
|
+
};
|
|
346
437
|
requestBody: {
|
|
347
438
|
content: {
|
|
348
439
|
"application/json": components["schemas"]["OrderRequest"];
|
|
@@ -351,6 +442,9 @@ export interface paths {
|
|
|
351
442
|
responses: {
|
|
352
443
|
/** @description Order created successfully */
|
|
353
444
|
200: {
|
|
445
|
+
headers: {
|
|
446
|
+
[name: string]: unknown;
|
|
447
|
+
};
|
|
354
448
|
content: {
|
|
355
449
|
"application/json": {
|
|
356
450
|
/** @example true */
|
|
@@ -365,6 +459,9 @@ export interface paths {
|
|
|
365
459
|
};
|
|
366
460
|
/** @description Bad request */
|
|
367
461
|
400: {
|
|
462
|
+
headers: {
|
|
463
|
+
[name: string]: unknown;
|
|
464
|
+
};
|
|
368
465
|
content: {
|
|
369
466
|
"application/json": {
|
|
370
467
|
/** @example false */
|
|
@@ -378,14 +475,27 @@ export interface paths {
|
|
|
378
475
|
};
|
|
379
476
|
};
|
|
380
477
|
};
|
|
478
|
+
delete?: never;
|
|
479
|
+
options?: never;
|
|
480
|
+
head?: never;
|
|
481
|
+
patch?: never;
|
|
482
|
+
trace?: never;
|
|
381
483
|
};
|
|
382
484
|
"/orders/{orderId}": {
|
|
485
|
+
parameters: {
|
|
486
|
+
query?: never;
|
|
487
|
+
header?: never;
|
|
488
|
+
path?: never;
|
|
489
|
+
cookie?: never;
|
|
490
|
+
};
|
|
383
491
|
/**
|
|
384
492
|
* Get order and transactions
|
|
385
493
|
* @description Retrieves order details along with associated transactions
|
|
386
494
|
*/
|
|
387
495
|
get: {
|
|
388
496
|
parameters: {
|
|
497
|
+
query?: never;
|
|
498
|
+
header?: never;
|
|
389
499
|
path: {
|
|
390
500
|
/**
|
|
391
501
|
* @description Unique order identifier
|
|
@@ -393,10 +503,15 @@ export interface paths {
|
|
|
393
503
|
*/
|
|
394
504
|
orderId: string;
|
|
395
505
|
};
|
|
506
|
+
cookie?: never;
|
|
396
507
|
};
|
|
508
|
+
requestBody?: never;
|
|
397
509
|
responses: {
|
|
398
510
|
/** @description Order and transactions retrieved successfully */
|
|
399
511
|
200: {
|
|
512
|
+
headers: {
|
|
513
|
+
[name: string]: unknown;
|
|
514
|
+
};
|
|
400
515
|
content: {
|
|
401
516
|
"application/json": {
|
|
402
517
|
/** @example true */
|
|
@@ -448,6 +563,9 @@ export interface paths {
|
|
|
448
563
|
};
|
|
449
564
|
/** @description Bad request */
|
|
450
565
|
400: {
|
|
566
|
+
headers: {
|
|
567
|
+
[name: string]: unknown;
|
|
568
|
+
};
|
|
451
569
|
content: {
|
|
452
570
|
"application/json": {
|
|
453
571
|
/** @example false */
|
|
@@ -461,6 +579,9 @@ export interface paths {
|
|
|
461
579
|
};
|
|
462
580
|
/** @description Order not found */
|
|
463
581
|
404: {
|
|
582
|
+
headers: {
|
|
583
|
+
[name: string]: unknown;
|
|
584
|
+
};
|
|
464
585
|
content: {
|
|
465
586
|
"application/json": {
|
|
466
587
|
/** @example false */
|
|
@@ -474,13 +595,34 @@ export interface paths {
|
|
|
474
595
|
};
|
|
475
596
|
};
|
|
476
597
|
};
|
|
598
|
+
put?: never;
|
|
599
|
+
post?: never;
|
|
600
|
+
delete?: never;
|
|
601
|
+
options?: never;
|
|
602
|
+
head?: never;
|
|
603
|
+
patch?: never;
|
|
604
|
+
trace?: never;
|
|
477
605
|
};
|
|
478
606
|
"/orders/quote": {
|
|
607
|
+
parameters: {
|
|
608
|
+
query?: never;
|
|
609
|
+
header?: never;
|
|
610
|
+
path?: never;
|
|
611
|
+
cookie?: never;
|
|
612
|
+
};
|
|
613
|
+
get?: never;
|
|
614
|
+
put?: never;
|
|
479
615
|
/**
|
|
480
616
|
* Get anyspend quote
|
|
481
617
|
* @description Retrieves a quote to swap, execute contract, or participate in HypeDuel
|
|
482
618
|
*/
|
|
483
619
|
post: {
|
|
620
|
+
parameters: {
|
|
621
|
+
query?: never;
|
|
622
|
+
header?: never;
|
|
623
|
+
path?: never;
|
|
624
|
+
cookie?: never;
|
|
625
|
+
};
|
|
484
626
|
requestBody: {
|
|
485
627
|
content: {
|
|
486
628
|
"application/json":
|
|
@@ -680,6 +822,9 @@ export interface paths {
|
|
|
680
822
|
responses: {
|
|
681
823
|
/** @description Quote retrieved successfully */
|
|
682
824
|
200: {
|
|
825
|
+
headers: {
|
|
826
|
+
[name: string]: unknown;
|
|
827
|
+
};
|
|
683
828
|
content: {
|
|
684
829
|
"application/json": {
|
|
685
830
|
/** @example true */
|
|
@@ -858,6 +1003,9 @@ export interface paths {
|
|
|
858
1003
|
};
|
|
859
1004
|
/** @description Bad request */
|
|
860
1005
|
400: {
|
|
1006
|
+
headers: {
|
|
1007
|
+
[name: string]: unknown;
|
|
1008
|
+
};
|
|
861
1009
|
content: {
|
|
862
1010
|
"application/json": {
|
|
863
1011
|
/** @example false */
|
|
@@ -871,8 +1019,19 @@ export interface paths {
|
|
|
871
1019
|
};
|
|
872
1020
|
};
|
|
873
1021
|
};
|
|
1022
|
+
delete?: never;
|
|
1023
|
+
options?: never;
|
|
1024
|
+
head?: never;
|
|
1025
|
+
patch?: never;
|
|
1026
|
+
trace?: never;
|
|
874
1027
|
};
|
|
875
1028
|
"/stripe/clientSecret": {
|
|
1029
|
+
parameters: {
|
|
1030
|
+
query?: never;
|
|
1031
|
+
header?: never;
|
|
1032
|
+
path?: never;
|
|
1033
|
+
cookie?: never;
|
|
1034
|
+
};
|
|
876
1035
|
/**
|
|
877
1036
|
* Get Stripe client secret
|
|
878
1037
|
* @description Retrieves a Stripe client secret for payment processing using a payment intent ID
|
|
@@ -886,10 +1045,17 @@ export interface paths {
|
|
|
886
1045
|
*/
|
|
887
1046
|
paymentIntentId: string;
|
|
888
1047
|
};
|
|
1048
|
+
header?: never;
|
|
1049
|
+
path?: never;
|
|
1050
|
+
cookie?: never;
|
|
889
1051
|
};
|
|
1052
|
+
requestBody?: never;
|
|
890
1053
|
responses: {
|
|
891
1054
|
/** @description Client secret retrieved successfully */
|
|
892
1055
|
200: {
|
|
1056
|
+
headers: {
|
|
1057
|
+
[name: string]: unknown;
|
|
1058
|
+
};
|
|
893
1059
|
content: {
|
|
894
1060
|
"application/json": {
|
|
895
1061
|
/** @example true */
|
|
@@ -908,6 +1074,9 @@ export interface paths {
|
|
|
908
1074
|
};
|
|
909
1075
|
/** @description Bad request - PaymentIntentId is required or invalid */
|
|
910
1076
|
400: {
|
|
1077
|
+
headers: {
|
|
1078
|
+
[name: string]: unknown;
|
|
1079
|
+
};
|
|
911
1080
|
content: {
|
|
912
1081
|
"application/json": {
|
|
913
1082
|
/** @example false */
|
|
@@ -921,6 +1090,13 @@ export interface paths {
|
|
|
921
1090
|
};
|
|
922
1091
|
};
|
|
923
1092
|
};
|
|
1093
|
+
put?: never;
|
|
1094
|
+
post?: never;
|
|
1095
|
+
delete?: never;
|
|
1096
|
+
options?: never;
|
|
1097
|
+
head?: never;
|
|
1098
|
+
patch?: never;
|
|
1099
|
+
trace?: never;
|
|
924
1100
|
};
|
|
925
1101
|
}
|
|
926
1102
|
export type webhooks = Record<string, never>;
|