/
transaction-response.ts
62 lines (51 loc) · 1.17 KB
/
transaction-response.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
import { Estimation } from 'src/features/cross-chain/calculation-manager/providers/debridge-provider/models/estimation-response';
interface DlnEvmTransaction {
to: string;
data: string;
value: string;
allowanceTarget: string;
allowanceValue: string;
}
interface DlnSolanaTransaction {
data: string;
}
/**
* Swap transaction response.
*/
export interface TransactionResponse<T> {
/**
* Trade estimation response.
*/
estimation: Estimation;
/**
* Tells API server to prepend operating expenses to the input amount.
*/
prependedOperatingExpenseCost: string;
/**
* Provider fee.
*/
fixFee: string;
/**
* Transaction data.
*/
tx: T;
}
export interface DlnEvmTransactionResponse extends TransactionResponse<DlnEvmTransaction> {}
export interface DlnSolanaTransactionResponse extends TransactionResponse<DlnSolanaTransaction> {}
/**
* Swap transaction error response.
*/
export interface TransactionErrorResponse {
/**
* Error code.
*/
errorCode: number;
/**
* Error ID.
*/
errorId: string;
/**
* Error message.
*/
errorMessage: string;
}