@hashlock-tech/sdk 0.1.0
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/LICENSE +21 -0
- package/README.md +250 -0
- package/dist/index.cjs +539 -0
- package/dist/index.cjs.map +1 -0
- package/dist/index.d.cts +446 -0
- package/dist/index.d.ts +446 -0
- package/dist/index.js +507 -0
- package/dist/index.js.map +1 -0
- package/package.json +56 -0
package/dist/index.d.ts
ADDED
|
@@ -0,0 +1,446 @@
|
|
|
1
|
+
type Side = 'BUY' | 'SELL';
|
|
2
|
+
type RFQStatus = 'ACTIVE' | 'QUOTES_RECEIVED' | 'ACCEPTED' | 'FILLED' | 'EXPIRED' | 'CANCELLED';
|
|
3
|
+
type QuoteStatus = 'PENDING' | 'ACCEPTED' | 'REJECTED' | 'EXPIRED';
|
|
4
|
+
type HTLCRole = 'INITIATOR' | 'COUNTERPARTY';
|
|
5
|
+
type TradeStatus = 'PROPOSED' | 'ACCEPTED' | 'FUNDING' | 'FUNDED' | 'INITIATOR_LOCKED' | 'BOTH_LOCKED' | 'EXECUTING' | 'SETTLING' | 'COMPLETED' | 'REFUNDED' | 'FAILED' | 'CANCELLED' | 'EXPIRED';
|
|
6
|
+
type HTLCStatus = 'PENDING' | 'ACTIVE' | 'WITHDRAWN' | 'REFUNDED' | 'EXPIRED' | 'INVALIDATED' | 'UNDER_FUNDED';
|
|
7
|
+
interface RFQ {
|
|
8
|
+
id: string;
|
|
9
|
+
userId: string;
|
|
10
|
+
baseToken: string;
|
|
11
|
+
quoteToken: string;
|
|
12
|
+
side: Side;
|
|
13
|
+
amount: string;
|
|
14
|
+
isBlind: boolean;
|
|
15
|
+
status: RFQStatus;
|
|
16
|
+
expiresAt: string | null;
|
|
17
|
+
createdAt: string;
|
|
18
|
+
quotesCount: number | null;
|
|
19
|
+
quotes: Quote[] | null;
|
|
20
|
+
}
|
|
21
|
+
interface Quote {
|
|
22
|
+
id: string;
|
|
23
|
+
rfqId: string;
|
|
24
|
+
marketMakerId: string;
|
|
25
|
+
price: string;
|
|
26
|
+
amount: string;
|
|
27
|
+
expiresAt: string | null;
|
|
28
|
+
status: QuoteStatus;
|
|
29
|
+
createdAt: string;
|
|
30
|
+
deliveryDelayHours: number | null;
|
|
31
|
+
collateralBtcSats: string | null;
|
|
32
|
+
isCollateralBacked: boolean;
|
|
33
|
+
}
|
|
34
|
+
interface Trade {
|
|
35
|
+
id: string;
|
|
36
|
+
initiatorId: string;
|
|
37
|
+
counterpartyId: string;
|
|
38
|
+
baseToken: string | null;
|
|
39
|
+
quoteToken: string | null;
|
|
40
|
+
side: Side | null;
|
|
41
|
+
baseAmount: string | null;
|
|
42
|
+
quoteAmount: string | null;
|
|
43
|
+
price: string;
|
|
44
|
+
status: TradeStatus;
|
|
45
|
+
createdAt: string;
|
|
46
|
+
}
|
|
47
|
+
interface HTLC {
|
|
48
|
+
id: string;
|
|
49
|
+
tradeId: string;
|
|
50
|
+
role: HTLCRole;
|
|
51
|
+
status: HTLCStatus;
|
|
52
|
+
contractAddress: string | null;
|
|
53
|
+
hashlock: string | null;
|
|
54
|
+
timelock: number | null;
|
|
55
|
+
amount: string | null;
|
|
56
|
+
txHash: string | null;
|
|
57
|
+
chainType: string | null;
|
|
58
|
+
preimage: string | null;
|
|
59
|
+
}
|
|
60
|
+
interface HTLCStatusResult {
|
|
61
|
+
tradeId: string;
|
|
62
|
+
status: string;
|
|
63
|
+
initiatorHTLC: HTLC | null;
|
|
64
|
+
counterpartyHTLC: HTLC | null;
|
|
65
|
+
}
|
|
66
|
+
interface CreateRFQInput {
|
|
67
|
+
/** Base asset symbol (e.g., 'ETH', 'BTC') */
|
|
68
|
+
baseToken: string;
|
|
69
|
+
/** Quote asset symbol (e.g., 'USDT', 'USDC') */
|
|
70
|
+
quoteToken: string;
|
|
71
|
+
/** BUY or SELL */
|
|
72
|
+
side: Side;
|
|
73
|
+
/** Amount in base token units (e.g., '1.5') */
|
|
74
|
+
amount: string;
|
|
75
|
+
/** Expiration time in seconds (default: server-configured) */
|
|
76
|
+
expiresIn?: number;
|
|
77
|
+
/** Hide counterparty identity in blind auction mode */
|
|
78
|
+
isBlind?: boolean;
|
|
79
|
+
}
|
|
80
|
+
interface SubmitQuoteInput {
|
|
81
|
+
/** ID of the RFQ to respond to */
|
|
82
|
+
rfqId: string;
|
|
83
|
+
/** Price per unit of base token in quote token terms */
|
|
84
|
+
price: string;
|
|
85
|
+
/** Amount of base token */
|
|
86
|
+
amount: string;
|
|
87
|
+
/** Expiration time in seconds */
|
|
88
|
+
expiresIn?: number;
|
|
89
|
+
}
|
|
90
|
+
interface FundHTLCInput {
|
|
91
|
+
/** Trade ID */
|
|
92
|
+
tradeId: string;
|
|
93
|
+
/** Transaction hash from on-chain HTLC creation */
|
|
94
|
+
txHash: string;
|
|
95
|
+
/** Your role in this trade */
|
|
96
|
+
role: HTLCRole;
|
|
97
|
+
/** Timelock as Unix timestamp */
|
|
98
|
+
timelock?: number;
|
|
99
|
+
/** SHA-256 hashlock (0x-prefixed) */
|
|
100
|
+
hashlock?: string;
|
|
101
|
+
/** 'evm', 'bitcoin', or 'sui' */
|
|
102
|
+
chainType?: string;
|
|
103
|
+
/** Compressed public key (BTC only) */
|
|
104
|
+
senderPubKey?: string;
|
|
105
|
+
/** Compressed public key (BTC only) */
|
|
106
|
+
receiverPubKey?: string;
|
|
107
|
+
/** Hex-encoded redeem script (BTC only) */
|
|
108
|
+
redeemScript?: string;
|
|
109
|
+
/** Pre-signed refund tx hex (BTC only) */
|
|
110
|
+
refundTxHex?: string;
|
|
111
|
+
/** Preimage for initiator (kept encrypted server-side) */
|
|
112
|
+
preimage?: string;
|
|
113
|
+
}
|
|
114
|
+
interface ClaimHTLCInput {
|
|
115
|
+
/** Trade ID */
|
|
116
|
+
tradeId: string;
|
|
117
|
+
/** Transaction hash of the on-chain claim tx */
|
|
118
|
+
txHash: string;
|
|
119
|
+
/** The 32-byte preimage (0x-prefixed hex) */
|
|
120
|
+
preimage: string;
|
|
121
|
+
/** Chain type ('evm' | 'bitcoin' | 'sui') */
|
|
122
|
+
chainType?: string;
|
|
123
|
+
}
|
|
124
|
+
interface RefundHTLCInput {
|
|
125
|
+
/** Trade ID */
|
|
126
|
+
tradeId: string;
|
|
127
|
+
/** Transaction hash of the on-chain refund tx */
|
|
128
|
+
txHash: string;
|
|
129
|
+
/** Chain type ('evm' | 'bitcoin' | 'sui') */
|
|
130
|
+
chainType?: string;
|
|
131
|
+
}
|
|
132
|
+
interface PrepareBitcoinHTLCInput {
|
|
133
|
+
tradeId: string;
|
|
134
|
+
role: HTLCRole;
|
|
135
|
+
senderPubKey: string;
|
|
136
|
+
receiverPubKey: string;
|
|
137
|
+
/** Unix timestamp for HTLC expiry */
|
|
138
|
+
timelock: number;
|
|
139
|
+
/** Amount in satoshis */
|
|
140
|
+
amountSats: string;
|
|
141
|
+
}
|
|
142
|
+
interface BitcoinHTLCPrepareResult {
|
|
143
|
+
tradeId: string;
|
|
144
|
+
htlcId: string;
|
|
145
|
+
htlcAddress: string;
|
|
146
|
+
redeemScript: string;
|
|
147
|
+
hashlock: string;
|
|
148
|
+
preimageHash: string | null;
|
|
149
|
+
timelock: number;
|
|
150
|
+
amountSats: string;
|
|
151
|
+
estimatedClaimFee: number;
|
|
152
|
+
estimatedRefundFee: number;
|
|
153
|
+
refundPsbt: string;
|
|
154
|
+
}
|
|
155
|
+
interface BuildBitcoinClaimPSBTInput {
|
|
156
|
+
tradeId: string;
|
|
157
|
+
htlcId: string;
|
|
158
|
+
/** 32-byte preimage (hex) */
|
|
159
|
+
preimage: string;
|
|
160
|
+
/** Claimer's compressed public key */
|
|
161
|
+
destinationPubKey: string;
|
|
162
|
+
/** Fee rate in sat/vB (default: 10) */
|
|
163
|
+
feeRate?: number;
|
|
164
|
+
}
|
|
165
|
+
interface BitcoinClaimPSBTResult {
|
|
166
|
+
tradeId: string;
|
|
167
|
+
htlcId: string;
|
|
168
|
+
psbtBase64: string;
|
|
169
|
+
fee: number;
|
|
170
|
+
utxoTxid: string;
|
|
171
|
+
utxoVout: number;
|
|
172
|
+
}
|
|
173
|
+
interface BroadcastBitcoinTxInput {
|
|
174
|
+
tradeId: string;
|
|
175
|
+
txHex: string;
|
|
176
|
+
}
|
|
177
|
+
interface BitcoinBroadcastResult {
|
|
178
|
+
txid: string;
|
|
179
|
+
success: boolean;
|
|
180
|
+
}
|
|
181
|
+
interface FundHTLCResult {
|
|
182
|
+
tradeId: string;
|
|
183
|
+
txHash: string;
|
|
184
|
+
status: string;
|
|
185
|
+
}
|
|
186
|
+
interface ConfirmDirectTradeInput {
|
|
187
|
+
counterpartyId: string;
|
|
188
|
+
baseToken: string;
|
|
189
|
+
quoteToken: string;
|
|
190
|
+
side: Side;
|
|
191
|
+
baseAmount: string;
|
|
192
|
+
price: string;
|
|
193
|
+
chainId: string;
|
|
194
|
+
broadcastRfqId?: string;
|
|
195
|
+
conversationId?: string;
|
|
196
|
+
}
|
|
197
|
+
interface ConfirmSettlementWalletsInput {
|
|
198
|
+
tradeId: string;
|
|
199
|
+
sendWalletId: string;
|
|
200
|
+
receiveWalletId: string;
|
|
201
|
+
}
|
|
202
|
+
interface HashLockConfig {
|
|
203
|
+
/** GraphQL endpoint URL */
|
|
204
|
+
endpoint: string;
|
|
205
|
+
/** JWT access token for authentication */
|
|
206
|
+
accessToken?: string;
|
|
207
|
+
/** Request timeout in milliseconds (default: 30000) */
|
|
208
|
+
timeout?: number;
|
|
209
|
+
/** Number of retry attempts for failed requests (default: 3) */
|
|
210
|
+
retries?: number;
|
|
211
|
+
/** Custom fetch implementation (for Node.js < 18 or testing) */
|
|
212
|
+
fetch?: typeof fetch;
|
|
213
|
+
}
|
|
214
|
+
|
|
215
|
+
/** Mainnet endpoint */
|
|
216
|
+
declare const MAINNET_ENDPOINT = "http://142.93.106.129/graphql";
|
|
217
|
+
/**
|
|
218
|
+
* HashLock SDK — TypeScript client for HashLock OTC trading platform.
|
|
219
|
+
*
|
|
220
|
+
* @example
|
|
221
|
+
* ```ts
|
|
222
|
+
* import { HashLock } from '@hashlock/sdk';
|
|
223
|
+
*
|
|
224
|
+
* const hl = new HashLock({
|
|
225
|
+
* endpoint: 'http://142.93.106.129/graphql',
|
|
226
|
+
* accessToken: 'your-jwt-token',
|
|
227
|
+
* });
|
|
228
|
+
*
|
|
229
|
+
* const rfq = await hl.createRFQ({
|
|
230
|
+
* baseToken: 'ETH',
|
|
231
|
+
* quoteToken: 'USDT',
|
|
232
|
+
* side: 'SELL',
|
|
233
|
+
* amount: '1.0',
|
|
234
|
+
* });
|
|
235
|
+
* ```
|
|
236
|
+
*/
|
|
237
|
+
declare class HashLock {
|
|
238
|
+
private client;
|
|
239
|
+
constructor(config: HashLockConfig);
|
|
240
|
+
/** Update the access token (e.g., after login or token refresh) */
|
|
241
|
+
setAccessToken(token: string): void;
|
|
242
|
+
/**
|
|
243
|
+
* Create a Request for Quote (RFQ).
|
|
244
|
+
* Broadcasts to market makers who can respond with prices.
|
|
245
|
+
*
|
|
246
|
+
* @example
|
|
247
|
+
* ```ts
|
|
248
|
+
* const rfq = await hl.createRFQ({
|
|
249
|
+
* baseToken: 'ETH',
|
|
250
|
+
* quoteToken: 'USDT',
|
|
251
|
+
* side: 'SELL',
|
|
252
|
+
* amount: '10.0',
|
|
253
|
+
* expiresIn: 300, // 5 minutes
|
|
254
|
+
* });
|
|
255
|
+
* console.log(`RFQ created: ${rfq.id}`);
|
|
256
|
+
* ```
|
|
257
|
+
*/
|
|
258
|
+
createRFQ(input: CreateRFQInput): Promise<RFQ>;
|
|
259
|
+
/**
|
|
260
|
+
* Get a single RFQ by ID.
|
|
261
|
+
*/
|
|
262
|
+
getRFQ(id: string): Promise<RFQ | null>;
|
|
263
|
+
/**
|
|
264
|
+
* List RFQs with optional status filter and pagination.
|
|
265
|
+
*/
|
|
266
|
+
listRFQs(params?: {
|
|
267
|
+
status?: RFQStatus;
|
|
268
|
+
page?: number;
|
|
269
|
+
pageSize?: number;
|
|
270
|
+
}): Promise<{
|
|
271
|
+
rfqs: RFQ[];
|
|
272
|
+
total: number;
|
|
273
|
+
page: number;
|
|
274
|
+
pageSize: number;
|
|
275
|
+
}>;
|
|
276
|
+
/**
|
|
277
|
+
* Cancel an active RFQ.
|
|
278
|
+
*/
|
|
279
|
+
cancelRFQ(id: string): Promise<RFQ>;
|
|
280
|
+
/**
|
|
281
|
+
* Submit a price quote in response to an RFQ.
|
|
282
|
+
*
|
|
283
|
+
* @example
|
|
284
|
+
* ```ts
|
|
285
|
+
* const quote = await hl.submitQuote({
|
|
286
|
+
* rfqId: 'rfq-uuid',
|
|
287
|
+
* price: '3450.00',
|
|
288
|
+
* amount: '10.0',
|
|
289
|
+
* });
|
|
290
|
+
* ```
|
|
291
|
+
*/
|
|
292
|
+
submitQuote(input: SubmitQuoteInput): Promise<Quote>;
|
|
293
|
+
/**
|
|
294
|
+
* Accept a quote — creates a trade from the RFQ flow.
|
|
295
|
+
*/
|
|
296
|
+
acceptQuote(quoteId: string): Promise<Quote>;
|
|
297
|
+
/**
|
|
298
|
+
* Get all quotes for an RFQ.
|
|
299
|
+
*/
|
|
300
|
+
getQuotes(rfqId: string): Promise<Quote[]>;
|
|
301
|
+
/**
|
|
302
|
+
* Get a single trade by ID.
|
|
303
|
+
*/
|
|
304
|
+
getTrade(id: string): Promise<Trade | null>;
|
|
305
|
+
/**
|
|
306
|
+
* List trades with optional status filter.
|
|
307
|
+
*/
|
|
308
|
+
listTrades(params?: {
|
|
309
|
+
status?: TradeStatus;
|
|
310
|
+
page?: number;
|
|
311
|
+
pageSize?: number;
|
|
312
|
+
}): Promise<{
|
|
313
|
+
trades: Trade[];
|
|
314
|
+
total: number;
|
|
315
|
+
}>;
|
|
316
|
+
/**
|
|
317
|
+
* Create a direct trade from 1-on-1 chat (skips RFQ flow).
|
|
318
|
+
*/
|
|
319
|
+
confirmDirectTrade(input: ConfirmDirectTradeInput): Promise<Trade>;
|
|
320
|
+
/**
|
|
321
|
+
* Accept a proposed trade.
|
|
322
|
+
*/
|
|
323
|
+
acceptTrade(tradeId: string): Promise<Trade>;
|
|
324
|
+
/**
|
|
325
|
+
* Cancel a trade.
|
|
326
|
+
*/
|
|
327
|
+
cancelTrade(tradeId: string): Promise<Trade>;
|
|
328
|
+
/**
|
|
329
|
+
* Confirm settlement wallets for a trade.
|
|
330
|
+
*/
|
|
331
|
+
confirmSettlementWallets(input: ConfirmSettlementWalletsInput): Promise<Trade>;
|
|
332
|
+
/**
|
|
333
|
+
* Record an on-chain HTLC funding transaction.
|
|
334
|
+
* Called after the user sends an ETH/ERC20 lock tx on-chain.
|
|
335
|
+
*
|
|
336
|
+
* @example
|
|
337
|
+
* ```ts
|
|
338
|
+
* // After sending ETH lock tx on-chain via ethers/viem:
|
|
339
|
+
* const result = await hl.fundHTLC({
|
|
340
|
+
* tradeId: 'trade-uuid',
|
|
341
|
+
* txHash: '0xabc...',
|
|
342
|
+
* role: 'INITIATOR',
|
|
343
|
+
* timelock: Math.floor(Date.now() / 1000) + 3600,
|
|
344
|
+
* hashlock: '0x...',
|
|
345
|
+
* });
|
|
346
|
+
* ```
|
|
347
|
+
*/
|
|
348
|
+
fundHTLC(input: FundHTLCInput): Promise<FundHTLCResult>;
|
|
349
|
+
/**
|
|
350
|
+
* Record an on-chain HTLC claim (preimage reveal).
|
|
351
|
+
*
|
|
352
|
+
* @example
|
|
353
|
+
* ```ts
|
|
354
|
+
* const result = await hl.claimHTLC({
|
|
355
|
+
* tradeId: 'trade-uuid',
|
|
356
|
+
* txHash: '0xdef...',
|
|
357
|
+
* preimage: '0x...',
|
|
358
|
+
* });
|
|
359
|
+
* ```
|
|
360
|
+
*/
|
|
361
|
+
claimHTLC(input: ClaimHTLCInput): Promise<HTLCStatusResult>;
|
|
362
|
+
/**
|
|
363
|
+
* Record an on-chain HTLC refund (after timelock expiry).
|
|
364
|
+
*
|
|
365
|
+
* @example
|
|
366
|
+
* ```ts
|
|
367
|
+
* const result = await hl.refundHTLC({
|
|
368
|
+
* tradeId: 'trade-uuid',
|
|
369
|
+
* txHash: '0x...',
|
|
370
|
+
* });
|
|
371
|
+
* ```
|
|
372
|
+
*/
|
|
373
|
+
refundHTLC(input: RefundHTLCInput): Promise<HTLCStatusResult>;
|
|
374
|
+
/**
|
|
375
|
+
* Get HTLC status for a trade (both initiator and counterparty HTLCs).
|
|
376
|
+
*/
|
|
377
|
+
getHTLCStatus(tradeId: string): Promise<HTLCStatusResult | null>;
|
|
378
|
+
/**
|
|
379
|
+
* Get all HTLCs for a trade.
|
|
380
|
+
*/
|
|
381
|
+
getHTLCs(tradeId: string): Promise<HTLC[]>;
|
|
382
|
+
/**
|
|
383
|
+
* Prepare a Bitcoin HTLC. Returns P2WSH address and redeem script.
|
|
384
|
+
* The client funds this address, then calls fundHTLC with the txHash.
|
|
385
|
+
*
|
|
386
|
+
* @example
|
|
387
|
+
* ```ts
|
|
388
|
+
* const btcHtlc = await hl.prepareBitcoinHTLC({
|
|
389
|
+
* tradeId: 'trade-uuid',
|
|
390
|
+
* role: 'INITIATOR',
|
|
391
|
+
* senderPubKey: '02abc...',
|
|
392
|
+
* receiverPubKey: '03def...',
|
|
393
|
+
* timelock: Math.floor(Date.now() / 1000) + 7200,
|
|
394
|
+
* amountSats: '100000', // 0.001 BTC
|
|
395
|
+
* });
|
|
396
|
+
* console.log(`Fund this address: ${btcHtlc.htlcAddress}`);
|
|
397
|
+
* ```
|
|
398
|
+
*/
|
|
399
|
+
prepareBitcoinHTLC(input: PrepareBitcoinHTLCInput): Promise<BitcoinHTLCPrepareResult>;
|
|
400
|
+
/**
|
|
401
|
+
* Build an unsigned claim PSBT for a Bitcoin HTLC.
|
|
402
|
+
* The client signs with their wallet, then broadcasts via broadcastBitcoinTx.
|
|
403
|
+
*/
|
|
404
|
+
buildBitcoinClaimPSBT(input: BuildBitcoinClaimPSBTInput): Promise<BitcoinClaimPSBTResult>;
|
|
405
|
+
/**
|
|
406
|
+
* Broadcast a signed Bitcoin transaction.
|
|
407
|
+
*/
|
|
408
|
+
broadcastBitcoinTx(input: BroadcastBitcoinTxInput): Promise<BitcoinBroadcastResult>;
|
|
409
|
+
}
|
|
410
|
+
|
|
411
|
+
/**
|
|
412
|
+
* Base error class for all HashLock SDK errors.
|
|
413
|
+
*/
|
|
414
|
+
declare class HashLockError extends Error {
|
|
415
|
+
readonly code: string;
|
|
416
|
+
readonly details?: unknown | undefined;
|
|
417
|
+
constructor(message: string, code: string, details?: unknown | undefined);
|
|
418
|
+
}
|
|
419
|
+
/**
|
|
420
|
+
* GraphQL returned errors in the response.
|
|
421
|
+
*/
|
|
422
|
+
declare class GraphQLError extends HashLockError {
|
|
423
|
+
readonly errors: Array<{
|
|
424
|
+
message: string;
|
|
425
|
+
path?: string[];
|
|
426
|
+
}>;
|
|
427
|
+
constructor(message: string, errors: Array<{
|
|
428
|
+
message: string;
|
|
429
|
+
path?: string[];
|
|
430
|
+
}>);
|
|
431
|
+
}
|
|
432
|
+
/**
|
|
433
|
+
* Network-level error (timeout, DNS failure, etc.).
|
|
434
|
+
*/
|
|
435
|
+
declare class NetworkError extends HashLockError {
|
|
436
|
+
readonly cause?: Error | undefined;
|
|
437
|
+
constructor(message: string, cause?: Error | undefined);
|
|
438
|
+
}
|
|
439
|
+
/**
|
|
440
|
+
* Authentication error — token missing or expired.
|
|
441
|
+
*/
|
|
442
|
+
declare class AuthError extends HashLockError {
|
|
443
|
+
constructor(message?: string);
|
|
444
|
+
}
|
|
445
|
+
|
|
446
|
+
export { AuthError, type BitcoinBroadcastResult, type BitcoinClaimPSBTResult, type BitcoinHTLCPrepareResult, type BroadcastBitcoinTxInput, type BuildBitcoinClaimPSBTInput, type ClaimHTLCInput, type ConfirmDirectTradeInput, type ConfirmSettlementWalletsInput, type CreateRFQInput, type FundHTLCInput, type FundHTLCResult, GraphQLError, type HTLC, type HTLCRole, type HTLCStatus, type HTLCStatusResult, HashLock, type HashLockConfig, HashLockError, MAINNET_ENDPOINT, NetworkError, type PrepareBitcoinHTLCInput, type Quote, type QuoteStatus, type RFQ, type RFQStatus, type RefundHTLCInput, type Side, type SubmitQuoteInput, type Trade, type TradeStatus };
|