On this page

latest contributor to this doc

Last Edit:

@gcharang

Maker Events

structuresmaker_events

The atomic swap process goes through a series of steps to perform and confirm transactions, then release funds accordingly. If a swap fails, the taker payment will be returned to the taker's address (minus network transaction fees). Sometimes failed swaps were due to a taker or maker going offline in the middle of a swap, so Swap Watcher seednodes were created to process certain events on behalf of the maker/taker.

Swap watchers act to complete a swap or refund if one or both sides go offline for too long. This is done in a non-custodial manner, and funds are still governed by HTLC which can only be released to either the maker or the taker's address, and only after specific conditions are met, such as completion on the side that is online and/or a timeout.

Takers send all the necessary information to watch the swap on taker/maker chains together with two signed transactions to watchers: one to spend the maker payment (maker payment spend) and the other to refund the taker payment (taker payment refund). If the maker proceeds with the swap and spends the taker payment (and therefore exposes the secret), and the taker doesn't respond for a duration, the watcher sends the maker payment spend transaction to the chain on behalf of the taker (after appending the secret to the redeem script). If the taker sends the taker payment but the maker doesn't spend it, and the taker doesn't send the refund transaction for a duration, then the watchers complete the process by sending the taker payment refund transaction to the chain.

Click on the Events below to view thier structure:

Click on the Events below to view thier structure:

The Started event indicates that mandatory pre-checks passed, such as "available balance," and that the swap started successfully.

The swap goes to the negotiation stage after this event occurs.

Parameter* = requiredTypeDescription
lock_duration*
number (integer)
the lock duration of swap payments in seconds. The sender can refund the transaction when the lock duration is passed. The taker payment is locked for the lock duration. The maker payment is locked for lock duration * 2
maker_amount*
string (numeric)
the amount of coins to be swapped by maker
maker_coin*
string
the ticker of the maker coin
maker_coin_start_block*
number (integer)
the maker coin block number at the start of the swap
maker_payment_confirmations*
number (integer)
the required number of blockchain confirmations for maker payment
maker_payment_lock*
number (UTC timestamp in seconds)
the maker payment is locked until this timestamp
my_persistent_pub*
string (hexadecimal)
a persistent secp256k1 public key of maker node
secret*
string (hexadecimal)
a random secret, the hash of which is used to lock atomic-swap payments
secret_hash*
string (hexadecimal)
the hash of the swap secret
started_at*
number (UTC timestamp in seconds)
the timestamp at the start of the swap
taker*
string (hexadecimal)
the p2p ID of taker node
taker_amount*
string (numeric)
the amount of coins to be swapped by taker
taker_coin*
string
the ticker of the taker coin
taker_coin_start_block*
number (integer)
the taker coin block number at the start of the swap
taker_payment_confirmations*
number (integer)
the required number of blockchain confirmations for taker payment
uuid*
string
the swap uuid
maker_payment_requires_nota
bool
Optional. whether dPoW notarization is required for maker payment; can be null; available since beta-2.0.1738
taker_payment_requires_nota
bool
Optional. whether dPoW notarization is required for taker payment; can be null; available since beta-2.0.1738
TODO: Example TBA

The StartFailed event indicates that some of the pre-checks did not pass, and therefore the swap did not start.

The swap finishes immediately when this event occurs.

Parameter* = requiredTypeDescription
error*
string
error description with stack trace
TODO: Example TBA

The Negotiated event indicates that maker has received and validated swap negotiation data from taker.

Maker starts waiting for taker to send the dex fee after this event occurs.

Parameter* = requiredTypeDescription
taker_payment_locktime*
number (UTC timestamp in seconds)
the taker payment is locked until this timestamp
taker_pubkey*
string (hexadecimal)
a persistent secp256k1 public key of taker node
{
  "data": {
    "lock_duration": 7800,
    "maker_amount": "1",
    "maker_coin": "DOC",
    "maker_coin_start_block": 154221,
    "maker_payment_confirmations": 1,
    "maker_payment_lock": 1561545442,
    "my_persistent_pub": "02031d4256c4bc9f99ac88bf3dba21773132281f65f9bf23a59928bce08961e2f3",
    "secret": "ea774bc94dce44c138920c6e9255e31d5645e60c0b64e9a059ab025f1dd2fdc6",
    "started_at": 1561529842,
    "taker": "5a2f1c468b7083c4f7649bf68a50612ffe7c38b1d62e1ece3829ca88e7e7fd12",
    "taker_amount": "1",
    "taker_coin": "MARTY",
    "taker_coin_start_block": 141363,
    "taker_payment_confirmations": 1,
    "uuid": "6bf6e313-e610-4a9a-ba8c-57fc34a124aa"
  },
  "type": "Started"
}

The NegotiateFailed event indicates that taker negotiation data was not received or did not pass validation.

The swap finishes immediately when this event occurs.

Parameter* = requiredTypeDescription
error*
string
error description with stack trace
{
  "data": {
    "error": "taker_swap:547] \"taker_swap:543] timeout (180.0 > 180.0)\""
  },
  "type": "NegotiateFailed"
}

The TakerFeeValidated event indicates that maker received and validated dex fee data from taker.

Maker sends their payment after this event occurs.

Parameter* = requiredTypeDescription
tx_hash*
string
the hash of the transaction
tx_hex*
string
transaction bytes in hexadecimal format
{
  "data": {
    "tx_hash": "a59203eb2328827de00bed699a29389792906e4f39fdea145eb40dc6b3821bd6",
    "tx_hex": "f8690284ee6b280082520894d8997941dd1346e9231118d5685d866294f59e5b865af3107a4000801ca0743d2b7c9fad65805d882179062012261be328d7628ae12ee08eff8d7657d993a07eecbd051f49d35279416778faa4664962726d516ce65e18755c9b9406a9c2fd"
  },
  "type": "TakerFeeValidated"
}

The TakerFeeValidateFailed event indicates that taker dex fee data was not received or did not pass validation.

The swap finishes immediately when this event occurs.

Parameter* = requiredTypeDescription
error*
string
error description with stack trace
TODO: Example TBA

The MakerPaymentTransactionFailed event indicates that maker was not able to broadcast his payment transaction to maker coin blockchain.

The swap finishes immediately when this event occurs.

Parameter* = requiredTypeDescription
error*
string
error description with stack trace
{
  "data": {
    "error": "lp_swap:1888] eth:654] RPC error: Error { code: ServerError(-32010), message: \"Transaction with the same hash was already imported.\", data: None }"
  },
  "type": "MakerPaymentTransactionFailed"
}

The MakerPaymentSent event indicates that maker has broadcast the maker payment transaction.

Maker starts waiting for taker to send his payment after this event occurs.

Parameter* = requiredTypeDescription
tx_hash*
string
the hash of the transaction
tx_hex*
string
transaction bytes in hexadecimal format
{
  "data": {
    "tx_hash": "efa90a2918e6793c8a2725c06ee34d0fa76c43bc85e680be195414e7aee36154",
    "tx_hex": "0400008085202f890cdcd071edda0d5f489b0be9c8b521ad608bb6d7f43f6e7a491843e7a4d0078f85000000006b483045022100fbc3bd09f8e1821ed671d1b1d2ed355833fb42c0bc435fef2da5c5b0a980b9a002204ef92b35576069d640ca0ac08f46645e5ade36afd5f19fb6aad19cfc9fb221fb012102031d4256c4bc9f99ac88bf3dba21773132281f65f9bf23a59928bce08961e2f3ffffffffe6ae2a3ce221a6612d9e640bdbe10a2e477b3bc68a1aeee4a6784cb18648a785010000006a47304402202000a7e60ae2ce1529247875623ef2c5b42448dcaeac8de0f8f0e2f8e5bd8a6b0220426321a004b793172014f522efbca77a3dc92e86ce0a75330d8ceb83072ad4e7012102031d4256c4bc9f99ac88bf3dba21773132281f65f9bf23a59928bce08961e2f3ffffffff9335553edcbac9559cae517a3e25b880a48fabf661c4ac338394972eef4572da000000006b4830450221008ded7230f2fb37a42b94f96174ec192baf4cd9e9e68fb9b6cf0463a36a6093e00220538de51ceda1617f3964a2350802377940fdfa018cc1043d77c66081b1cab0c4012102031d4256c4bc9f99ac88bf3dba21773132281f65f9bf23a59928bce08961e2f3fffffffff91b5d3733877f84108de77fec46bee156766e1a6837fa7b580ccbc3905acb14000000006b483045022100d07cf1fd20e07aafdc942ba56f6b45baee61b93145a2bdba391e2cdb8024bf15022056ea8183990703ef05018df2fe8bd5ec678ec0f9207b0283292b2cdafc5e1e0c012102031d4256c4bc9f99ac88bf3dba21773132281f65f9bf23a59928bce08961e2f3ffffffff147870387ca938b2b6e7daa96ba2496014f125c0e4e576273ef36ee8186c415a000000006a47304402204c5b15b641d7e34444456d2ea6663bdc8bd8216e309a7220814474f346b8425e0220634d1dd943b416b7a807704d7f7a3d46a60d88ef4e20734588a0b302c55fa82d012102031d4256c4bc9f99ac88bf3dba21773132281f65f9bf23a59928bce08961e2f3ffffffffd2b954ae9b4a61fad9f7bc956d24e38d7b6fe313da824bd3bd91287d5a6b49d9000000006b483045022100a7387d9ab7b2c92d3cbce525e96ffac5ae3ef14f848661741ada0db17715c4a002202c1417d5e3e04b1a2d1774a83bb8d5aa1c0536c100138123089fa69921b5d976012102031d4256c4bc9f99ac88bf3dba21773132281f65f9bf23a59928bce08961e2f3ffffffff28792a2e26d9d7be0467fac52b12ece67410b23eea845008257979bd87d083e3000000006a473044022027c40517c33cd3202d4310cfd2c75f38e6d7804b255fc3838a32ea26e5a3cb0002202b4399e1d7e655b64f699318f2bfbdced49f064ee54e9d6a678668fce51caf96012102031d4256c4bc9f99ac88bf3dba21773132281f65f9bf23a59928bce08961e2f3ffffffffa8bf797bacd213b74a9977ae1b956afe3af33a1ee94324e010a16db891a07441000000006a473044022004cbb1d970b9f02c578b5c1d7de33361581eebc19c3cd8d2e50b0211ca4ef13702200c93b9fe5428055b6274dc8e52073c3e87f5b5e4206134d745928ccfc9393919012102031d4256c4bc9f99ac88bf3dba21773132281f65f9bf23a59928bce08961e2f3ffffffff2b6fd82c9a68111b67ad85a614a6ecb50f7b6eac3d21d8ebefd9a6065cdf5729000000006b483045022100fdff16c595c7b4a9b4fc1e445b565f7b29fe5b7a08f79291b0ff585c7b72ac2902200c694aa124013bd419ce2349f15d10435827868d35db939b9d3c344d16e78420012102031d4256c4bc9f99ac88bf3dba21773132281f65f9bf23a59928bce08961e2f3ffffffff6a5468dd8c83553dc51022f2a2fb772cf91c8607dc2ca1b8f203ac534612ab29000000006b483045022100ba7cc79e7ae3720238bfc5caa225dc8017d6a0d1cb1ec66abaf724fd20b3b7ab02206e8c942756604af0f63b74af495a9b3b7f4a44c489267f69a14cf2b1b953f46e012102031d4256c4bc9f99ac88bf3dba21773132281f65f9bf23a59928bce08961e2f3ffffffff5f9f48a91d343fd5aef1d85f00850070931459ab256697afb728d1c81c1fa1d2000000006a47304402200ec85fc66f963e7504eb27361a4b4bb17de60e459da414fdc3962476de636134022056b62c15cf7f9b4e7d4e11c03e4e541dd348919b8c55efa4f1927e2fdd5ae8ea012102031d4256c4bc9f99ac88bf3dba21773132281f65f9bf23a59928bce08961e2f3ffffffffee1f455924d3167e7f7abf452c1856e9abdcfe27dc889942dd249cb376169d38000000006b48304502210089274eed807c5d23d819f6dfa8a358a9748e56f2080be4396ef77bb19d91b17402207fc7b22c879534fffe0eeaaec8fc284e22c2756f380c05ea57b881a96b09f3af012102031d4256c4bc9f99ac88bf3dba21773132281f65f9bf23a59928bce08961e2f3ffffffff0200e1f5050000000017a9144eb3a361d8a15d7f6a8ef9d1cf44962a90c44d5487bb7e1e00000000001976a91405aab5342166f8594baf17a7d9bef5d56744332788ac490e135d000000000000000000000000000000"
  },
  "type": "MakerPaymentSent"
}

The MakerPaymentDataSendFailed event indicates that maker was not able to send his payment data to taker due to a network error. When this event occurs, maker starts waiting for maker payment lock time expiration to issue a refund.

Parameter* = requiredTypeDescription
error*
string
error description with stack trace
TODO: Example TBA

The MakerPaymentWaitConfirmFailed event indicates that maker payment transaction did not reach the required number of confirmations before the internal timeout expiration.

When this event occurs maker starts waiting for maker payment lock time expiration to issue a refund.

Parameter* = requiredTypeDescription
error*
string
error description with stack trace
{
  "type": "MakerPaymentWaitConfirmFailed",
  "data": {
    "error": "An error"
  }
}

The TakerPaymentReceived event indicates that maker received the taker payment transaction data.

Maker starts waiting for taker payment confirmation after this event occurs.

Parameter* = requiredTypeDescription
tx_hash*
string
the hash of the transaction
tx_hex*
string
transaction bytes in hexadecimal format
{
  "data": {
    "tx_hash": "7e0e38e31dbe80792ef320b8c0a7cb9259127427ef8c2fca1d796f24484046a5",
    "tx_hex": "0400008085202f892082f6916932f9bf674a3fb00c3d5d765303ab68461f4abe0f91cc1162546914a9010000006b483045022100999b8bb0224476b5c344a466d0051ec7a8c312574ad8956a4177a42625cb86e302205a6664396bff3f2e6fe57adb7e082a26d1b8da9ee77b3fc24aa4148fdd5c84db012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffffcad29a146b81bcaa44744efbec5149b6e3ca32bace140f75ad5794288d5bff6c000000006b483045022100b4dbfe88561c201fb8fbaf5bbf5bc0985893c909429c579425da84b02d23cc12022075f1e1e3eba38d167a6e84aac23faee5a2eb0799511e647213cee168529d4e5d012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffffa13eeacd04b3e26ae3f41530b560c615dafa0fd4235cc5b22d48ab97e7c3399c000000006a47304402201158306fe668cbf56ad3f586dc83c1cda9efab44cef46da6bc0fe242292c85ed02201d622fe283410320e760233ae81dc53df65406b09fd07f8649f1775689219c35012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffff4352b9f1f01dde4209b9e91076a3cfcabdaa23d9d5a313abfe7edb67ee4273e3000000006b483045022100825242fb3c6d460580016e93718ae1f43917e53abcc1558a64a6ab6f406763dd0220543936ce4c725e5e9f03831274a8475b535171bb29e1919fcf52ba2a9c85a553012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffffcc0fa94b5973c893e61d470ae3982b0bedfd29cb0da2c60a362de438598f108c000000006b4830450221008c70a8e10ca37819e5a4d9783366e729e690d78f2fdd8a1f4812ddc14ec7d6ad022035ba8cb4d4e50684107f8af5c184582687b5d7dfda5d9be1bd45e45749c77f08012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffffb0bd3bb9fedb7bbf49ca1612c955ba6095202186cef5be6952aed3dd32da4268000000006a4730440220592216d63c199faa587a4a6cbe11ca26027368a116b50818ce30eced59ca887202201bcafcf88f9f2632151596732f839d77cbe2f2243822c8551faffecc90b5dc19012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffff65cf2831fc200e55aaacbe0881ad0edfb298ee6d4421b08b048aecc151716bd1000000006a47304402202032eb1ccebc3be4b94bae343d1d168e87040d2d20977c47d073d6bf490ef6c00220067656e00c4b8930167c54078609925cec7b893a52bcb9304e6b2602f564413e012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffffeaf67880bee214acecc74b12f648c1014d6394c4abf99832d408981bb460e999000000006b483045022100b9ae1cc824149220ac517298e6f21c26939485b31d0ae19d97d986c5f8f34e4502200a90578cf2c1835dbea00484af1f225711c255f1d0a3208f2e4f1154f0db2c9a012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffffad089c3fe7987a44f150f34b7ac66972de76dd84c739bdeddf360ab029dfd4d6000000006a473044022015f0386ed67a61626fbe5ae79e0d39d38e7b4072b648e8a26e23adadc0a8e5bc02202398188fa2feb26994e5c1e7e758788de3d5f0f0096f956a0cd58804710bea6a012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffffd6c66730546c62dd003b5af1f1e5ecfd339c62db0169c1d499584e09a8a9b288000000006b4830450221008d4c73f0e3c9d913ba32fd864167649242e3e891412ab80bdd3f7ff43a238ee20220602738e98008b146256b51d0df99e222aa165f2ce351241ebc23d8a098e2b0db012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffff12d9eff354f46cbd4446a0bff27a6a635ff5b1dc8a5dd8b0178bb5f89c9ec080000000006b48304502210098d3349ba9b13560748949933d2704663a5ab52cdc804afa1ac4da3e5992e0a002201525d7ad8466ad260219f3873fb7781addbd363f91e8063bfa86c7ed4e385b84012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffff69e16767806ea5f069b7d46674f7aa747fcc6e541189ce7fcf92edcfd7642ff4000000006b4830450221008a5ebfe904c87f21947a44d8418190be5893993a683fde0f96df8a9487923da002205be1bbd8b518ba2f303cae23bc20806e84ffbba6a03f032385b15edb8df107f4012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640fffffffff4fbabd508178f553e676d67ce325796b03aa249b41a23c681c1ad9dedb45ae7000000006a47304402207cea6824abe1ce35e18954b858d45243e2cb57d27d782adc5b6b07ebd21a02d7022007ba0469b298c4b1a7c4a148fa16bae93d28593b34e197c10ac0d1faf9cc1bfa012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffff14867aa59932d895be607fb7398f5594e39d9fa2e1c7daaed7b1390dbfdddcab000000006b4830450221009fb6e1885a3658c593809f95ecd2049f8ef9e00379686ac236b17312c9613d4c02200a90578cf2c1835dbea00484af1f225711c255f1d0a3208f2e4f1154f0db2c9a012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffffad089c3fe7987a44f150f34b7ac66972de76dd84c739bdeddf360ab029dfd4d6000000006a47304402206e7ff765ba47a8785008f64f49c8e73232d582b2b2d0a49be0880c2557de8f8602206448423a6a37ad9740eb316513b31f73599ae14f65623709fb5443ae609f3e2e012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffff3c091681df17b46f280bc9d8011c1bb31397637ce945b393f70380f8cd0a8b0d010000006a47304402206ca8717000f3086d364318f56d52e2369c40b88a1cb86455a8db262b4816698a02206711caf453bfda6b1b3542e27e68c3180f92f0548326d74e30b3ed18cd2c2353012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffff91f32d98b581def165495aff6b69530e1f3de7f68fabfeb93730cf9793bbcd2a000000006a47304402200a8cd5e29ee7ff136772ea1789a39a027eaa1cd92f90f9d57fd8cf77202251f402203dd2bc282a838a5730e840a0d22b4f0edbe3cb2da00466c66bc2b5c66fc8b032012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffff854d9226c28a1f5fe440e08f41000f3547f304ecf9cc010d0b5bc845ef1f039a000000006b483045022100fe6cce49975cc78af1c394bc02d995710833ba08cf7f8dd5f99add2cc7db26c40220793491309c215d8314a1c142bef7ec6b9a397249bec1c00a0a5ab47dfc1208b6012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffff593bc907aa71f3b0f7aa8c48bb5f650595e65a5a733a9601a8374ed978eec9a7000000006a47304402206362ae3c4cf1a19ba0e43424b03af542077b49761172c1ad26d802f54b1b6ca602206bc7edb655bb0024c0e48c1f4c18c8864f8d1ce59ae55cd81dc0bd1234430691012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffff3b9da8c5ab0c0cd6b40f602ea6ed8e36a48034b182b9d1a77ffebd15fe203b94000000006b483045022100f8610eae25899663cb5fa9a4575d937da57cdfd41958794bbb4c02f8bed75da40220262d40e019ec3a57b252f4150d509cce6f8a2dbd83184a9fc2ed56aba8018b15012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffff0897c8a57e15e7f3893b195d65cf6c6001b29c8c9734213d7a3131f57b9eca2e000000006b483045022100c485cbd6408cf0759bcf23c4154249882934b522a93c6b49e62412305bf7646902201cc4b668af4bb22fe57c32c4d34e822bceb12f6bd6923afdabf4894752a56ec3012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffffffdc7000f7c45b62960623fa3a277e8a55348a4fe4936fef1224b6953434a249000000006b4830450221008a51a9c26f475d5c0838afe9d51524f95adfb21a9b0a02eae31cb01dc0a31fab022071c5492fbc7270731d4a4947a69398bf99dd28c65bb69d19910bf53a515274c8012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffff10ec2af7e31ca28e27177215904d9a59abf80f0652b24e3f749f14fb7b2264ec000000006b483045022100fe4269f8f5ca53ebcff6fb782142a6228f0e50498a531b7a9c0d54768af9854102207cc740a9ea359569b49d69a94215ce3e23aeda5779cebc434ad3d608e1752990012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffff5e3830c088dd6ea412d778b0a700ef27c183cf03e19f3d6f71bc5eaf53b2c22e000000006b4830450221009788a7e7f2407ba2f7c504091fbdf8f8498367781e8a357616d68e2a6770b4e70220518c92f5fb21e6bfd7d870a783b2a5572ce003f2dbb237ec59df419c9a148966012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffff51630ccb0ad32b24cc7ae1b3602950ba518dca6aa65ef560e57f08c23eed8d80000000006a47304402201aa556153ffeb13aa674353bf88c04a7af15c7eb32e1a835464e4b613c31dc2802200395858c29a46e9108de1f90b401ee26c296388b4073143b63f849b2cce461af012102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ffffffff0200e1f5050000000017a914ab802c4d644be63fd1a72834ff63b650d6b5353987bb7e1e00000000001976a91464ae8510aac9546d5e7704e31ce177451386455588ac680e135d000000000000000000000000000000"
  },
  "type": "TakerPaymentReceived"
}

The TakerPaymentReceived event indicates that maker started waiting for taker payment confirmation.

This event does not have additional data.

The TakerPaymentValidateFailed event indicates that taker payment did not pass validation. For example, taker payment may have an invalid amount or the payment might be locked with a non-matching hash or timestamp.

When this event occurs maker starts waiting for maker payment lock time expiration to issue a refund.

Parameter* = requiredTypeDescription
error*
string
error description with stack trace
{
  "type": "TakerPaymentValidateFailed",
  "data": {
    "error": "Origin Taker error event: MakerPaymentWaitConfirmFailed(SwapError { error: \"An error\" })"
  }
}

The MakerPaymentWaitConfirmFailed event indicates that the taker payment transaction did not reach the required number of confirmations before the internal timeout expiration.

When this event occurs maker starts waiting for maker payment lock time expiration to issue a refund.

Parameter* = requiredTypeDescription
error*
string
error description with stack trace
TODO: Example TBA

The TakerPaymentValidatedAndConfirmed event indicates that maker validated taker payment and payment was confirmed the required number of times.

Maker attempts to spend the taker payment after this event occurs.

This event does not have additional data.

The TakerPaymentSpendFailed event indicates that maker payment was not able to spend taker payment.

When this event occurs maker starts waiting for maker payment lock time expiration to issue a refund.

Parameter* = requiredTypeDescription
error*
string
error description with stack trace
{
  "type": "TakerPaymentValidatedAndConfirmed"
}

The TakerPaymentSpent event indicates that maker has broadcast the taker payment spend transaction.

Maker starts waiting for taker payment spend confirmation after this event occurs.

Parameter* = requiredTypeDescription
tx_hash*
string
the hash of the transaction
tx_hex*
string
transaction bytes in hexadecimal format
{
  "data": {
    "secret": "fb968d5460399f20ffd09906dc8f65c21fbb5cb8077a8e6d7126d0526586ca96",
    "transaction": {
      "tx_hash": "68f5ec617bd9a4a24d7af0ce9762d87f7baadc13a66739fd4a2575630ecc1827",
      "tx_hex": "0400008085202f890161394fc7f1ddcf732f838d7d74e59ed7d968117ac170b3adde9e0404b26a929500000000d8483045022100a33d976cf509d6f9e66c297db30c0f44cced2241ee9c01c5ec8d3cbbf3d41172022039a6e02c3a3c85e3861ab1d2f13ba52677a3b1344483b2ae443723ba5bb1353f0120fb968d5460399f20ffd09906dc8f65c21fbb5cb8077a8e6d7126d0526586ca96004c6b63049858835db1752102031d4256c4bc9f99ac88bf3dba21773132281f65f9bf23a59928bce08961e2f3ac6782012088a914eba736c5cc9bb33dee15b4a9c855a7831a484d84882102631dcf1d4b1b693aa8c2751afc68e4794b1e5996566cfc701a663f8b7bbbe640ac68ffffffff011880d717000000001976a91464ae8510aac9546d5e7704e31ce177451386455588ac942c835d000000000000000000000000000000"
    }
  },
  "type": "TakerPaymentSpent"
}

The TakerPaymentSpendConfirmStarted event indicates that maker started waiting for taker payment spend transaction confirmation.

This event does not have additional data.

The TakerPaymentSpendConfirmFailed event indicates that the taker payment spend transaction did not reach the required number of confirmations before the maker payment lock time expiration or the taker payment spend transaction rejected for some reason.

Maker attempts to refund the maker payment.

Parameter* = requiredTypeDescription
error*
string
error description with stack trace
TODO: Example TBA

The TakerPaymentSpendConfirmed event indicates that the taker payment spend transaction was confirmed the required number of times.

The swap finishes immediately when this event occurs.

This event does not have additional data.

The MakerPaymentWaitRefundStarted event indicates that maker started waiting for lock time expiration to refund the payment.

Parameter* = requiredTypeDescription
wait_until*
number (UTC timestamp)
the timestamp at which a refund will occur
{
  "type": "TakerPaymentSpendConfirmed"
}

The MakerPaymentRefundFailed event indicates that maker was not able to broadcast a refund transaction to the maker coin blockchain.

The swap finishes immediately when this event occurs.

Parameter* = requiredTypeDescription
error*
string
error description with stack trace
TODO: Example TBA

The MakerPaymentRefunded event indicates that maker has broadcast the maker payment refund transaction.

The swap finishes immediately when this event occurs.

Parameter* = requiredTypeDescription
tx_hash*
string
the hash of the transaction
tx_hex*
string
transaction bytes in hexadecimal format
TODO: Example TBA

The Finished event indicates that the swap finished.

This event does not have additional data.