@@ -21,165 +21,194 @@ export type PunishTimelock = number;
21
21
export type Amount = number ;
22
22
23
23
export interface BuyXmrArgs {
24
- seller : string ;
25
- bitcoin_change_address : string ;
26
- monero_receive_address : string ;
24
+ seller : string ;
25
+ bitcoin_change_address : string ;
26
+ monero_receive_address : string ;
27
27
}
28
28
29
29
export interface ResumeArgs {
30
- swap_id : string ;
30
+ swap_id : string ;
31
31
}
32
32
33
33
export interface CancelAndRefundArgs {
34
- swap_id : string ;
34
+ swap_id : string ;
35
35
}
36
36
37
37
export interface MoneroRecoveryArgs {
38
- swap_id : string ;
38
+ swap_id : string ;
39
39
}
40
40
41
41
export interface WithdrawBtcArgs {
42
- amount ?: number ;
43
- address : string ;
42
+ amount ?: number ;
43
+ address : string ;
44
44
}
45
45
46
46
export interface BalanceArgs {
47
- force_refresh : boolean ;
47
+ force_refresh : boolean ;
48
48
}
49
49
50
50
export interface ListSellersArgs {
51
- rendezvous_point : string ;
51
+ rendezvous_point : string ;
52
52
}
53
53
54
54
export interface StartDaemonArgs {
55
- server_address : string ;
55
+ server_address : string ;
56
56
}
57
57
58
58
export interface GetSwapInfoArgs {
59
- swap_id : string ;
59
+ swap_id : string ;
60
60
}
61
61
62
62
export interface ResumeSwapResponse {
63
- result : string ;
63
+ result : string ;
64
64
}
65
65
66
66
export interface BalanceResponse {
67
- balance : number ;
67
+ balance : number ;
68
68
}
69
69
70
70
/** Represents a quote for buying XMR. */
71
71
export interface BidQuote {
72
- /** The price at which the maker is willing to buy at. */
73
- price : number ;
74
- /**
75
- * The minimum quantity the maker is willing to buy.
76
- * #[typeshare(serialized_as = "number")]
77
- */
78
- min_quantity : number ;
79
- /** The maximum quantity the maker is willing to buy. */
80
- max_quantity : number ;
72
+ /** The price at which the maker is willing to buy at. */
73
+ price : number ;
74
+ /**
75
+ * The minimum quantity the maker is willing to buy.
76
+ * #[typeshare(serialized_as = "number")]
77
+ */
78
+ min_quantity : number ;
79
+ /** The maximum quantity the maker is willing to buy. */
80
+ max_quantity : number ;
81
81
}
82
82
83
83
export interface BuyXmrResponse {
84
- swap_id : string ;
85
- quote : BidQuote ;
84
+ swap_id : string ;
85
+ quote : BidQuote ;
86
86
}
87
87
88
88
export interface GetHistoryEntry {
89
- swap_id : string ;
90
- state : string ;
89
+ swap_id : string ;
90
+ state : string ;
91
91
}
92
92
93
93
export interface GetHistoryResponse {
94
- swaps : GetHistoryEntry [ ] ;
94
+ swaps : GetHistoryEntry [ ] ;
95
95
}
96
96
97
97
export interface Seller {
98
- peer_id : string ;
99
- addresses : string [ ] ;
100
- }
101
-
102
- export type ExpiredTimelocks =
103
- | { type : "None" , content : {
104
- blocks_left : number ;
105
- } }
106
- | { type : "Cancel" , content : {
107
- blocks_left : number ;
108
- } }
109
- | { type : "Punish" , content ?: undefined } ;
98
+ peer_id : string ;
99
+ addresses : string [ ] ;
100
+ }
101
+
102
+ export type ExpiredTimelocks =
103
+ | {
104
+ type : "None" ;
105
+ content : {
106
+ blocks_left : number ;
107
+ } ;
108
+ }
109
+ | {
110
+ type : "Cancel" ;
111
+ content : {
112
+ blocks_left : number ;
113
+ } ;
114
+ }
115
+ | { type : "Punish" ; content ?: undefined } ;
110
116
111
117
export interface GetSwapInfoResponse {
112
- swap_id : string ;
113
- seller : Seller ;
114
- completed : boolean ;
115
- start_date : string ;
116
- state_name : string ;
117
- xmr_amount : number ;
118
- btc_amount : number ;
119
- tx_lock_id : string ;
120
- tx_cancel_fee : number ;
121
- tx_refund_fee : number ;
122
- tx_lock_fee : number ;
123
- btc_refund_address : string ;
124
- cancel_timelock : CancelTimelock ;
125
- punish_timelock : PunishTimelock ;
126
- timelock ?: ExpiredTimelocks ;
118
+ swap_id : string ;
119
+ seller : Seller ;
120
+ completed : boolean ;
121
+ start_date : string ;
122
+ state_name : string ;
123
+ xmr_amount : number ;
124
+ btc_amount : number ;
125
+ tx_lock_id : string ;
126
+ tx_cancel_fee : number ;
127
+ tx_refund_fee : number ;
128
+ tx_lock_fee : number ;
129
+ btc_refund_address : string ;
130
+ cancel_timelock : CancelTimelock ;
131
+ punish_timelock : PunishTimelock ;
132
+ timelock ?: ExpiredTimelocks ;
127
133
}
128
134
129
135
export interface WithdrawBtcResponse {
130
- amount : number ;
131
- txid : string ;
136
+ amount : number ;
137
+ txid : string ;
132
138
}
133
139
134
140
export interface SuspendCurrentSwapResponse {
135
- swap_id : string ;
136
- }
137
-
138
- export type TauriSwapProgressEvent =
139
- | { type : "Initiated" , content ?: undefined }
140
- | { type : "ReceivedQuote" , content : BidQuote }
141
- | { type : "WaitingForBtcDeposit" , content : {
142
- deposit_address : string ;
143
- max_giveable : number ;
144
- min_deposit_until_swap_will_start : number ;
145
- max_deposit_until_maximum_amount_is_reached : number ;
146
- min_bitcoin_lock_tx_fee : number ;
147
- quote : BidQuote ;
148
- } }
149
- | { type : "Started" , content : {
150
- btc_lock_amount : number ;
151
- btc_tx_lock_fee : number ;
152
- } }
153
- | { type : "BtcLockTxInMempool" , content : {
154
- btc_lock_txid : string ;
155
- btc_lock_confirmations : number ;
156
- } }
157
- | { type : "XmrLockTxInMempool" , content : {
158
- xmr_lock_txid : string ;
159
- xmr_lock_tx_confirmations : number ;
160
- } }
161
- | { type : "XmrLocked" , content ?: undefined }
162
- | { type : "BtcRedeemed" , content ?: undefined }
163
- | { type : "XmrRedeemInMempool" , content : {
164
- xmr_redeem_txid : string ;
165
- xmr_redeem_address : string ;
166
- } }
167
- | { type : "BtcCancelled" , content : {
168
- btc_cancel_txid : string ;
169
- } }
170
- | { type : "BtcRefunded" , content : {
171
- btc_refund_txid : string ;
172
- } }
173
- | { type : "BtcPunished" , content ?: undefined }
174
- | { type : "AttemptingCooperativeRedeem" , content ?: undefined }
175
- | { type : "CooperativeRedeemAccepted" , content ?: undefined }
176
- | { type : "CooperativeRedeemRejected" , content : {
177
- reason : string ;
178
- } }
179
- | { type : "Released" , content ?: undefined } ;
141
+ swap_id : string ;
142
+ }
143
+
144
+ export type TauriSwapProgressEvent =
145
+ | { type : "Initiated" ; content ?: undefined }
146
+ | { type : "ReceivedQuote" ; content : BidQuote }
147
+ | {
148
+ type : "WaitingForBtcDeposit" ;
149
+ content : {
150
+ deposit_address : string ;
151
+ max_giveable : number ;
152
+ min_deposit_until_swap_will_start : number ;
153
+ max_deposit_until_maximum_amount_is_reached : number ;
154
+ min_bitcoin_lock_tx_fee : number ;
155
+ quote : BidQuote ;
156
+ } ;
157
+ }
158
+ | {
159
+ type : "Started" ;
160
+ content : {
161
+ btc_lock_amount : number ;
162
+ btc_tx_lock_fee : number ;
163
+ } ;
164
+ }
165
+ | {
166
+ type : "BtcLockTxInMempool" ;
167
+ content : {
168
+ btc_lock_txid : string ;
169
+ btc_lock_confirmations : number ;
170
+ } ;
171
+ }
172
+ | {
173
+ type : "XmrLockTxInMempool" ;
174
+ content : {
175
+ xmr_lock_txid : string ;
176
+ xmr_lock_tx_confirmations : number ;
177
+ } ;
178
+ }
179
+ | { type : "XmrLocked" ; content ?: undefined }
180
+ | { type : "BtcRedeemed" ; content ?: undefined }
181
+ | {
182
+ type : "XmrRedeemInMempool" ;
183
+ content : {
184
+ xmr_redeem_txid : string ;
185
+ xmr_redeem_address : string ;
186
+ } ;
187
+ }
188
+ | {
189
+ type : "BtcCancelled" ;
190
+ content : {
191
+ btc_cancel_txid : string ;
192
+ } ;
193
+ }
194
+ | {
195
+ type : "BtcRefunded" ;
196
+ content : {
197
+ btc_refund_txid : string ;
198
+ } ;
199
+ }
200
+ | { type : "BtcPunished" ; content ?: undefined }
201
+ | { type : "AttemptingCooperativeRedeem" ; content ?: undefined }
202
+ | { type : "CooperativeRedeemAccepted" ; content ?: undefined }
203
+ | {
204
+ type : "CooperativeRedeemRejected" ;
205
+ content : {
206
+ reason : string ;
207
+ } ;
208
+ }
209
+ | { type : "Released" ; content ?: undefined } ;
180
210
181
211
export interface TauriSwapProgressEventWrapper {
182
- swap_id : string ;
183
- event : TauriSwapProgressEvent ;
212
+ swap_id : string ;
213
+ event : TauriSwapProgressEvent ;
184
214
}
185
-
0 commit comments