Skip to content

Commit de028d5

Browse files
committed
add missing swap watcher events
1 parent 75c7103 commit de028d5

File tree

1 file changed

+66
-0
lines changed
  • src/pages/komodo-defi-framework/api/common_structures/swaps/taker_events

1 file changed

+66
-0
lines changed

src/pages/komodo-defi-framework/api/common_structures/swaps/taker_events/index.mdx

+66
Original file line numberDiff line numberDiff line change
@@ -21,6 +21,8 @@ Click on an Event below to view its structure:
2121
* [TakerPaymentSent](/komodo-defi-framework/api/common_structures/swaps/taker_events/#taker-payment-sent)
2222
* [TakerPaymentSpent](/komodo-defi-framework/api/common_structures/swaps/taker_events/#taker-payment-spent)
2323
* [MakerPaymentSpent](/komodo-defi-framework/api/common_structures/swaps/taker_events/#maker-payment-spent)
24+
* [MakerPaymentSpentByWatcher](/komodo-defi-framework/api/common_structures/swaps/taker_events/#maker-payment-spent-by-watcher)
25+
2426
* [Finished](/komodo-defi-framework/api/common_structures/swaps/taker_events/#finished)
2527

2628
## Taker Error Events
@@ -40,6 +42,7 @@ Click on an Event below to view its structure:
4042
* [TakerPaymentWaitRefundStarted](/komodo-defi-framework/api/common_structures/swaps/taker_events/#taker-payment-wait-refund-started)
4143
* [TakerPaymentRefundStarted](/komodo-defi-framework/api/common_structures/swaps/taker_events/#taker-payment-refund-started)
4244
* [TakerPaymentRefunded](/komodo-defi-framework/api/common_structures/swaps/taker_events/#taker-payment-refunded)
45+
* [TakerPaymentRefundedByWatcher](/komodo-defi-framework/api/common_structures/swaps/taker_events/#taker-payment-refunded-by-watcher)
4346
* [TakerPaymentRefundFailed](/komodo-defi-framework/api/common_structures/swaps/taker_events/#taker-payment-refund-failed)
4447
* [TakerPaymentRefundFinished](/komodo-defi-framework/api/common_structures/swaps/taker_events/#taker-payment-refund-finished)
4548

@@ -114,6 +117,7 @@ Click on an Event below to view its structure:
114117
```
115118
</CollapsibleSection>
116119

120+
117121
#### StartFailed
118122

119123
The `StartFailed` event indicates that some of the pre-checks did not pass, and therefore the swap did not start.
@@ -130,6 +134,7 @@ The swap finishes immediately when this event occurs.
130134
```
131135
</CollapsibleSection>
132136

137+
133138
#### Negotiated
134139

135140
The `Negotiated` event indicates that taker has received and validated swap negotiation data from maker.
@@ -157,6 +162,7 @@ Taker sends dex fee after this event occurs.
157162
```
158163
</CollapsibleSection>
159164

165+
160166
#### NegotiateFailed
161167

162168
The `NegotiateFailed` event indicates that maker negotiation data was not received or did not pass validation.
@@ -178,6 +184,7 @@ The swap finishes immediately when this event occurs.
178184
```
179185
</CollapsibleSection>
180186

187+
181188
#### TakerFeeSent
182189

183190
The `TakerFeeSent` event indicates that taker broadcast the dex fee transaction.
@@ -201,6 +208,7 @@ Taker starts waiting for maker payment after this event occurs.
201208
```
202209
</CollapsibleSection>
203210

211+
204212
#### TakerFeeSendFailed
205213

206214
The `TakerFeeSendFailed` event indicates that the taker dex fee transaction failed to broadcast to the taker coin blockchain, or that the taker failed to send the transaction data to maker.
@@ -217,6 +225,7 @@ The swap finishes immediately when this event occurs.
217225
```
218226
</CollapsibleSection>
219227

228+
220229
#### TakerPaymentInstructionsReceived
221230

222231
The `TakerPaymentInstructionsReceived` event indicates that the taker has received payment instructions.
@@ -232,6 +241,7 @@ This event does not have additional data.
232241
```
233242
</CollapsibleSection>
234243

244+
235245
#### MakerPaymentValidateFailed
236246

237247
The `MakerPaymentValidateFailed` event indicates that taker was not able to receive or validate the maker payment transaction.
@@ -248,6 +258,7 @@ The swap finishes immediately when this event occurs.
248258
```
249259
</CollapsibleSection>
250260

261+
251262
#### MakerPaymentReceived
252263

253264
The `MakerPaymentReceived` event indicates that taker received the maker payment transaction data.
@@ -295,6 +306,7 @@ Taker swap finishes immediately when this event occurs.
295306
```
296307
</CollapsibleSection>
297308

309+
298310
#### MakerPaymentValidatedAndConfirmed
299311

300312
The `MakerPaymentValidatedAndConfirmed` event indicates that taker validated maker payment and the payment was confirmed the required number of times.
@@ -311,6 +323,7 @@ This event does not have additional data.
311323
```
312324
</CollapsibleSection>
313325

326+
314327
#### TakerPaymentSent
315328

316329
The `TakerPaymentSent` event indicates that taker broadcast taker payment transaction to taker coin blockchain.
@@ -334,6 +347,7 @@ Taker starts waiting for maker to spend this transaction.
334347
```
335348
</CollapsibleSection>
336349

350+
337351
#### TakerPaymentTransactionFailed
338352

339353
The `TakerPaymentTransactionFailed` event indicates that taker failed to broadcast transaction to taker coin blockchain.
@@ -350,6 +364,7 @@ The swap finishes immediately when this event occurs.
350364
```
351365
</CollapsibleSection>
352366

367+
353368
#### TakerPaymentWaitConfirmFailed
354369

355370
The `TakerPaymentWaitConfirmFailed` event indicates that the taker payment transaction did not reach the required number of confirmations before the internal timeout expiration.
@@ -366,6 +381,7 @@ When this event occurs taker starts waiting for taker payment lock time expirati
366381
```
367382
</CollapsibleSection>
368383

384+
369385
#### TakerPaymentDataSendFailed
370386

371387
The `TakerPaymentDataSendFailed` event indicates that taker was not able to send his payment data to maker due to a network error.
@@ -382,6 +398,7 @@ When this event occurs taker starts waiting for taker payment lock time expirati
382398
```
383399
</CollapsibleSection>
384400

401+
385402
#### TakerPaymentSpent
386403

387404
The `TakerPaymentSpent` event indicates that maker spent taker payment and taker discovered the transaction.
@@ -410,6 +427,7 @@ When this event occurs taker extracts the secret from the transaction and attemp
410427
```
411428
</CollapsibleSection>
412429

430+
413431
#### TakerPaymentWaitForSpendFailed
414432

415433
The `TakerPaymentWaitForSpendFailed` event indicates that maker did not spend taker payment before lock time expiration.
@@ -426,6 +444,7 @@ When this event occurs taker attempts to refund the payment.
426444
```
427445
</CollapsibleSection>
428446

447+
429448
#### MakerPaymentSpendFailed
430449

431450
The `MakerPaymentSpendFailed` event indicates that taker failed to broadcast **maker payment spend** transaction to the maker coin blockchain.
@@ -447,6 +466,7 @@ The swap finishes immediately when this event occurs.
447466
```
448467
</CollapsibleSection>
449468

469+
450470
#### MakerPaymentSpent
451471

452472
The `MakerPaymentSpent` event indicates that taker spent maker payment.
@@ -470,6 +490,31 @@ The swap finishes immediately when this event occurs.
470490
```
471491
</CollapsibleSection>
472492

493+
494+
#### MakerPaymentSpentByWatcher
495+
496+
The `MakerPaymentSpentByWatcher` event indicates that the maker payment has been released to the taker while the taker was offline.
497+
498+
The swap finishes immediately when this event occurs.
499+
500+
| Structure | Type | Description |
501+
| --------- | ------ | --------------------------------------- |
502+
| tx\_hash | string | the hash of the transaction |
503+
| tx\_hex | string | transaction bytes in hexadecimal format |
504+
505+
<CollapsibleSection expandedText="Hide Event" collapsedText="Show Event">
506+
```json
507+
{
508+
"type" : "MakerPaymentSpentByWatcher",
509+
"data" : {
510+
"tx_hash" : "a2513faf3d479b8e14096be9b0ba8977d669a7a9ca722be0e2bbe3833fa51a4e",
511+
"tx_hex" : "0400008085202f8901d331b98aec95c8ed36484398b7bdec98858d5efae3ac0eb8be4cb39ef016e0fd00000000d7473044022049a5831a2ef057c5a119b19a694dc653e37a1a8b0122125132aecd5dd47312ff02206672c43113830247623f508ee49ba2db15732c22d8f2fec3c8acfc1f19b84654012017456a9b1b3817b612737c929a731e241a28147fc0530e876f9f79e34abd86f7004c6b630457f7ec64b17521031bb83b58ec130e28e0a6d5d2acf2eb01b0d3f1670e021d47d31db8a858219da8ac6782012088a914c1eae4df923e04a343030902472e70664a525e6d8821023c5ba1d7ef6fa015eb33defb3aba2a961898a51bbb7ff30344d07ba75ad3f289ac68ffffffff01b2530000000000001976a91484c74592ed8ac05340906784d277ca4d4e0af08e88ac57f7ec64000000000000000000000000000000"
512+
}
513+
}
514+
```
515+
</CollapsibleSection>
516+
517+
473518
#### TakerPaymentWaitRefundStarted
474519

475520
`TakerPaymentWaitRefundStarted` event indicates that taker started waiting for lock time expiration to refund the payment.
@@ -483,6 +528,7 @@ The swap finishes immediately when this event occurs.
483528
```
484529
</CollapsibleSection>
485530

531+
486532
#### TakerPaymentRefundStarted
487533

488534
`TakerPaymentRefundStarted` event indicates that taker was has initiated the refund process.
@@ -493,6 +539,23 @@ The swap finishes immediately when this event occurs.
493539
```
494540
</CollapsibleSection>
495541

542+
543+
#### TakerPaymentRefundedByWatcher
544+
545+
The `TakerPaymentRefundedByWatcher` is fired if the watcher refunded the taker payment for the taker while the taker is offline.
546+
It will be shown in the swap status when the taker runs the defi framework again after being offline (if the watcher refunded the swap during the time the taker was offline).
547+
548+
| Structure | Type | Description |
549+
| --------- | ------ | ---------------------------------- |
550+
| error | string | error description with stack trace |
551+
552+
<CollapsibleSection expandedText="Hide Event" collapsedText="Show Event">
553+
```json
554+
TODO: Example TBA
555+
```
556+
</CollapsibleSection>
557+
558+
496559
#### TakerPaymentRefundFailed
497560

498561
`TakerPaymentRefundFailed` event indicates that taker was not able to broadcast a refund transaction to taker coin blockchain.
@@ -508,6 +571,7 @@ The swap finishes immediately when this event occurs.
508571
```
509572
</CollapsibleSection>
510573

574+
511575
#### TakerPaymentRefunded
512576

513577
The `TakerPaymentRefunded` event indicates that taker broadcast the taker payment refund transaction.
@@ -519,6 +583,7 @@ The swap finishes immediately when this event occurs.
519583
| tx\_hash | string | the hash of the transaction |
520584
| tx\_hex | string | transaction bytes in hexadecimal format |
521585

586+
522587
#### TakerPaymentRefundFinished
523588

524589
The `TakerPaymentRefundFinished` event indicates that taker refund process is complete.
@@ -531,6 +596,7 @@ The swap finishes immediately when this event occurs. This event does not have a
531596
```
532597
</CollapsibleSection>
533598

599+
534600
#### Finished
535601

536602
The `Finished` event indicates that the swap finished.

0 commit comments

Comments
 (0)