2
0
mirror of https://github.com/lightninglabs/loop synced 2024-11-16 00:12:52 +00:00
loop/looprpc/client.swagger.json

782 lines
31 KiB
JSON
Raw Normal View History

{
"swagger": "2.0",
"info": {
"title": "client.proto",
"version": "version not set"
},
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {
2019-09-05 03:48:48 +00:00
"/v1/loop/in": {
"post": {
2020-02-05 02:45:27 +00:00
"summary": "* loop: `in`\nLoopIn initiates a loop in swap with the given parameters. The call\nreturns after the swap has been set up with the swap server. From that\npoint onwards, progress can be tracked via the SwapStatus stream\nthat is returned from Monitor().",
2019-09-05 03:48:48 +00:00
"operationId": "LoopIn",
"responses": {
"200": {
2019-11-15 12:57:03 +00:00
"description": "A successful response.",
2019-09-05 03:48:48 +00:00
"schema": {
"$ref": "#/definitions/looprpcSwapResponse"
}
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
2019-09-05 03:48:48 +00:00
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/looprpcLoopInRequest"
}
}
],
"tags": [
"SwapClient"
]
}
},
"/v1/loop/in/quote/{amt}": {
"get": {
2020-02-05 02:45:27 +00:00
"summary": "* loop: `quote`\nGetQuote returns a quote for a swap with the provided parameters.",
2019-09-05 03:48:48 +00:00
"operationId": "GetLoopInQuote",
"responses": {
"200": {
2019-11-15 12:57:03 +00:00
"description": "A successful response.",
2019-09-05 03:48:48 +00:00
"schema": {
2020-07-14 13:20:37 +00:00
"$ref": "#/definitions/looprpcInQuoteResponse"
2019-09-05 03:48:48 +00:00
}
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
2019-09-05 03:48:48 +00:00
}
},
"parameters": [
{
"name": "amt",
2019-11-15 12:57:03 +00:00
"description": "*\nThe amount to swap in satoshis.",
2019-09-05 03:48:48 +00:00
"in": "path",
"required": true,
"type": "string",
"format": "int64"
},
{
"name": "conf_target",
"description": "*\nThe confirmation target that should be used either for the sweep of the\non-chain HTLC broadcast by the swap server in the case of a Loop Out, or for\nthe confirmation of the on-chain HTLC broadcast by the swap client in the\ncase of a Loop In.",
"in": "query",
"required": false,
"type": "integer",
"format": "int32"
},
{
"name": "external_htlc",
"description": "*\nIf external_htlc is true, we expect the htlc to be published by an external\nactor.",
"in": "query",
"required": false,
"type": "boolean",
"format": "boolean"
},
{
"name": "swap_publication_deadline",
2020-02-21 08:55:52 +00:00
"description": "*\nThe latest time (in unix seconds) we allow the server to wait before\npublishing the HTLC on chain. Setting this to a larger value will give the\nserver the opportunity to batch multiple swaps together, and wait for\nlow-fee periods before publishing the HTLC, potentially resulting in a\nlower total swap fee. This only has an effect on loop out quotes.",
"in": "query",
"required": false,
"type": "string",
"format": "uint64"
2019-09-05 03:48:48 +00:00
}
],
"tags": [
"SwapClient"
]
}
},
"/v1/loop/in/terms": {
"get": {
2020-02-05 02:45:27 +00:00
"summary": "* loop: `terms`\nGetTerms returns the terms that the server enforces for swaps.",
2019-09-05 03:48:48 +00:00
"operationId": "GetLoopInTerms",
"responses": {
"200": {
2019-11-15 12:57:03 +00:00
"description": "A successful response.",
2019-09-05 03:48:48 +00:00
"schema": {
2020-07-14 13:13:55 +00:00
"$ref": "#/definitions/looprpcInTermsResponse"
2019-09-05 03:48:48 +00:00
}
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
2019-09-05 03:48:48 +00:00
}
},
"tags": [
"SwapClient"
]
}
},
"/v1/loop/out": {
"post": {
"summary": "* loop: `out`\nLoopOut initiates an loop out swap with the given parameters. The call\nreturns after the swap has been set up with the swap server. From that\npoint onwards, progress can be tracked via the SwapStatus stream that is\nreturned from Monitor().",
"operationId": "LoopOut",
"responses": {
"200": {
2019-11-15 12:57:03 +00:00
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/looprpcSwapResponse"
}
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
}
},
"parameters": [
{
"name": "body",
"in": "body",
"required": true,
"schema": {
"$ref": "#/definitions/looprpcLoopOutRequest"
}
}
],
"tags": [
"SwapClient"
]
}
},
"/v1/loop/out/quote/{amt}": {
"get": {
"summary": "* loop: `quote`\nLoopOutQuote returns a quote for a loop out swap with the provided\nparameters.",
"operationId": "LoopOutQuote",
"responses": {
"200": {
2019-11-15 12:57:03 +00:00
"description": "A successful response.",
"schema": {
2020-07-14 13:20:37 +00:00
"$ref": "#/definitions/looprpcOutQuoteResponse"
}
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
}
},
"parameters": [
{
"name": "amt",
2019-11-15 12:57:03 +00:00
"description": "*\nThe amount to swap in satoshis.",
"in": "path",
"required": true,
"type": "string",
"format": "int64"
},
{
"name": "conf_target",
"description": "*\nThe confirmation target that should be used either for the sweep of the\non-chain HTLC broadcast by the swap server in the case of a Loop Out, or for\nthe confirmation of the on-chain HTLC broadcast by the swap client in the\ncase of a Loop In.",
"in": "query",
"required": false,
"type": "integer",
"format": "int32"
},
{
"name": "external_htlc",
"description": "*\nIf external_htlc is true, we expect the htlc to be published by an external\nactor.",
"in": "query",
"required": false,
"type": "boolean",
"format": "boolean"
},
{
"name": "swap_publication_deadline",
2020-02-21 08:55:52 +00:00
"description": "*\nThe latest time (in unix seconds) we allow the server to wait before\npublishing the HTLC on chain. Setting this to a larger value will give the\nserver the opportunity to batch multiple swaps together, and wait for\nlow-fee periods before publishing the HTLC, potentially resulting in a\nlower total swap fee. This only has an effect on loop out quotes.",
"in": "query",
"required": false,
"type": "string",
"format": "uint64"
}
],
"tags": [
"SwapClient"
]
}
},
"/v1/loop/out/terms": {
"get": {
"summary": "* loop: `terms`\nLoopOutTerms returns the terms that the server enforces for a loop out swap.",
"operationId": "LoopOutTerms",
"responses": {
"200": {
2019-11-15 12:57:03 +00:00
"description": "A successful response.",
"schema": {
2020-07-14 13:13:55 +00:00
"$ref": "#/definitions/looprpcOutTermsResponse"
}
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
}
},
"tags": [
"SwapClient"
]
}
2019-11-15 12:57:03 +00:00
},
"/v1/loop/swap/{id}": {
"get": {
2020-02-05 02:45:27 +00:00
"summary": "* loop: `swapinfo`\nSwapInfo returns all known details about a single swap.",
"operationId": "SwapInfo",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/looprpcSwapStatus"
}
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
}
},
"parameters": [
{
"name": "id",
"description": "*\nThe swap identifier which currently is the hash that locks the HTLCs. When\nusing REST, this field must be encoded as URL safe base64.",
"in": "path",
"required": true,
"type": "string",
"format": "byte"
}
],
"tags": [
"SwapClient"
]
}
},
"/v1/loop/swaps": {
"get": {
2020-02-05 02:45:27 +00:00
"summary": "* loop: `listswaps`\nListSwaps returns a list of all currently known swaps and their current\nstatus.",
"operationId": "ListSwaps",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/looprpcListSwapsResponse"
}
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
}
},
"tags": [
"SwapClient"
]
}
},
2019-11-15 12:57:03 +00:00
"/v1/lsat/tokens": {
"get": {
2020-02-05 02:45:27 +00:00
"summary": "* loop: `listauth`\nGetLsatTokens returns all LSAT tokens the daemon ever paid for.",
2019-11-15 12:57:03 +00:00
"operationId": "GetLsatTokens",
"responses": {
"200": {
"description": "A successful response.",
"schema": {
"$ref": "#/definitions/looprpcTokensResponse"
}
},
"default": {
"description": "An unexpected error response",
"schema": {
"$ref": "#/definitions/runtimeError"
}
2019-11-15 12:57:03 +00:00
}
},
"tags": [
"SwapClient"
]
}
}
},
"definitions": {
"looprpcFailureReason": {
"type": "string",
"enum": [
"FAILURE_REASON_NONE",
"FAILURE_REASON_OFFCHAIN",
"FAILURE_REASON_TIMEOUT",
"FAILURE_REASON_SWEEP_TIMEOUT",
"FAILURE_REASON_INSUFFICIENT_VALUE",
"FAILURE_REASON_TEMPORARY",
"FAILURE_REASON_INCORRECT_AMOUNT"
],
"default": "FAILURE_REASON_NONE",
"description": " - FAILURE_REASON_NONE: FAILURE_REASON_NONE is set when the swap did not fail, it is either in\nprogress or succeeded.\n - FAILURE_REASON_OFFCHAIN: FAILURE_REASON_OFFCHAIN indicates that a loop out failed because it wasn't\npossible to find a route for one or both off chain payments that met the fee\nand timelock limits required.\n - FAILURE_REASON_TIMEOUT: FAILURE_REASON_TIMEOUT indicates that the swap failed because on chain htlc\ndid not confirm before its expiry, or it confirmed too late for us to reveal\nour preimage and claim.\n - FAILURE_REASON_SWEEP_TIMEOUT: FAILURE_REASON_SWEEP_TIMEOUT indicates that a loop out permanently failed\nbecause the on chain htlc wasn't swept before the server revoked the\nhtlc.\n - FAILURE_REASON_INSUFFICIENT_VALUE: FAILURE_REASON_INSUFFICIENT_VALUE indicates that a loop out has failed\nbecause the on chain htlc had a lower value than requested.\n - FAILURE_REASON_TEMPORARY: FAILURE_REASON_TEMPORARY indicates that a swap cannot continue due to an\ninternal error. Manual intervention such as a restart is required.\n - FAILURE_REASON_INCORRECT_AMOUNT: FAILURE_REASON_INCORRECT_AMOUNT indicates that a loop in permanently failed\nbecause the amount extended by an external loop in htlc is insufficient."
},
2020-07-14 13:20:37 +00:00
"looprpcInQuoteResponse": {
"type": "object",
"properties": {
"swap_fee_sat": {
"type": "string",
"format": "int64",
"description": "*\nThe fee that the swap server is charging for the swap."
},
"htlc_publish_fee_sat": {
"type": "string",
"format": "int64",
"description": "An estimate of the on-chain fee that needs to be paid to publish the HTLC\nIf a miner fee of 0 is returned, it means the external_htlc flag was set for\na loop in and the fee estimation was skipped. If a miner fee of -1 is\nreturned, it means lnd's wallet tried to estimate the fee but was unable to\ncreate a sample estimation transaction because not enough funds are\navailable. An information message should be shown to the user in this case."
},
"cltv_delta": {
"type": "integer",
"format": "int32",
"title": "*\nOn-chain cltv expiry delta"
}
}
},
2020-07-14 13:13:55 +00:00
"looprpcInTermsResponse": {
"type": "object",
"properties": {
"min_swap_amount": {
"type": "string",
"format": "int64",
"title": "*\nMinimum swap amount (sat)"
},
"max_swap_amount": {
"type": "string",
"format": "int64",
"title": "*\nMaximum swap amount (sat)"
}
}
},
"looprpcListSwapsResponse": {
"type": "object",
"properties": {
"swaps": {
"type": "array",
"items": {
"$ref": "#/definitions/looprpcSwapStatus"
},
"description": "*\nThe list of all currently known swaps and their status."
}
}
},
2019-09-05 03:48:48 +00:00
"looprpcLoopInRequest": {
"type": "object",
"properties": {
"amt": {
"type": "string",
"format": "int64",
"description": "*\nRequested swap amount in sat. This does not include the swap and miner \nfee."
},
"max_swap_fee": {
"type": "string",
"format": "int64",
"description": "*\nMaximum we are willing to pay the server for the swap. This value is not\ndisclosed in the swap initiation call, but if the server asks for a\nhigher fee, we abort the swap. Typically this value is taken from the\nresponse of the GetQuote call."
},
"max_miner_fee": {
"type": "string",
"format": "int64",
2020-07-17 14:10:29 +00:00
"description": "*\nMaximum in on-chain fees that we are willing to spend. If we want to\npublish the on-chain htlc and the fee estimate turns out higher than this\nvalue, we cancel the swap. \n\nmax_miner_fee is typically taken from the response of the GetQuote call."
2019-09-05 03:48:48 +00:00
},
"last_hop": {
2019-09-05 03:48:48 +00:00
"type": "string",
"format": "byte",
"description": "*\nThe last hop to use for the loop in swap. If empty, the last hop is selected\nbased on the lowest routing fee for the swap payment from the server."
2019-09-05 03:48:48 +00:00
},
"external_htlc": {
"type": "boolean",
"format": "boolean",
"description": "*\nIf external_htlc is true, we expect the htlc to be published by an external\nactor."
},
"htlc_conf_target": {
"type": "integer",
"format": "int32",
"description": "*\nThe number of blocks that the on chain htlc should confirm within."
},
"label": {
"type": "string",
"description": "An optional label for this swap. This field is limited to 500 characters\nand may not be one of the reserved values in loop/labels Reserved list."
2019-09-05 03:48:48 +00:00
}
}
},
"looprpcLoopOutRequest": {
"type": "object",
"properties": {
"amt": {
"type": "string",
"format": "int64",
"description": "*\nRequested swap amount in sat. This does not include the swap and miner fee."
},
"dest": {
"type": "string",
"description": "*\nBase58 encoded destination address for the swap."
},
"max_swap_routing_fee": {
"type": "string",
"format": "int64",
2020-06-15 09:30:12 +00:00
"description": "*\nMaximum off-chain fee in sat that may be paid for swap payment to the server.\nThis limit is applied during path finding. Typically this value is taken\nfrom the response of the GetQuote call."
},
"max_prepay_routing_fee": {
"type": "string",
"format": "int64",
2020-06-15 09:30:12 +00:00
"description": "*\nMaximum off-chain fee in sat that may be paid for the prepay to the server.\nThis limit is applied during path finding. Typically this value is taken\nfrom the response of the GetQuote call."
},
"max_swap_fee": {
"type": "string",
"format": "int64",
"description": "*\nMaximum we are willing to pay the server for the swap. This value is not\ndisclosed in the swap initiation call, but if the server asks for a\nhigher fee, we abort the swap. Typically this value is taken from the\nresponse of the GetQuote call. It includes the prepay amount."
},
"max_prepay_amt": {
"type": "string",
"format": "int64",
"description": "*\nMaximum amount of the swap fee that may be charged as a prepayment."
},
"max_miner_fee": {
"type": "string",
"format": "int64",
2020-07-17 14:10:29 +00:00
"description": "*\nMaximum in on-chain fees that we are willing to spend. If we want to\nsweep the on-chain htlc and the fee estimate turns out higher than this\nvalue, we cancel the swap. If the fee estimate is lower, we publish the\nsweep tx.\n\nIf the sweep tx is not confirmed, we are forced to ratchet up fees until it\nis swept. Possibly even exceeding max_miner_fee if we get close to the htlc\ntimeout. Because the initial publication revealed the preimage, we have no\nother choice. The server may already have pulled the off-chain htlc. Only\nwhen the fee becomes higher than the swap amount, we can only wait for fees\nto come down and hope - if we are past the timeout - that the server is not\npublishing the revocation.\n\nmax_miner_fee is typically taken from the response of the GetQuote call."
},
"loop_out_channel": {
"type": "string",
"format": "uint64",
"description": "*\nDeprecated, use outgoing_chan_set. The channel to loop out, the channel\nto loop out is selected based on the lowest routing fee for the swap\npayment to the server."
},
"outgoing_chan_set": {
"type": "array",
"items": {
"type": "string",
"format": "uint64"
},
"description": "*\nA restriction on the channel set that may be used to loop out. The actual\nchannel(s) that will be used are selected based on the lowest routing fee\nfor the swap payment to the server."
},
"sweep_conf_target": {
"type": "integer",
"format": "int32",
"description": "*\nThe number of blocks from the on-chain HTLC's confirmation height that it\nshould be swept within."
},
"swap_publication_deadline": {
"type": "string",
"format": "uint64",
"description": "*\nThe latest time (in unix seconds) we allow the server to wait before\npublishing the HTLC on chain. Setting this to a larger value will give the\nserver the opportunity to batch multiple swaps together, and wait for\nlow-fee periods before publishing the HTLC, potentially resulting in a\nlower total swap fee."
},
"label": {
"type": "string",
"description": "An optional label for this swap. This field is limited to 500 characters\nand may not start with the prefix [reserved], which is used to tag labels\nproduced by the daemon."
}
}
},
2019-11-15 12:57:03 +00:00
"looprpcLsatToken": {
"type": "object",
"properties": {
"base_macaroon": {
"type": "string",
"format": "byte",
"description": "*\nThe base macaroon that was baked by the auth server."
},
"payment_hash": {
"type": "string",
"format": "byte",
"description": "*\nThe payment hash of the payment that was paid to obtain the token."
},
"payment_preimage": {
"type": "string",
"format": "byte",
"description": "*\nThe preimage of the payment hash, knowledge of this is proof that the\npayment has been paid. If the preimage is set to all zeros, this means the\npayment is still pending and the token is not yet fully valid."
},
"amount_paid_msat": {
"type": "string",
"format": "int64",
"description": "*\nThe amount of millisatoshis that was paid to get the token."
},
"routing_fee_paid_msat": {
"type": "string",
"format": "int64",
"description": "*\nThe amount of millisatoshis paid in routing fee to pay for the token."
},
"time_created": {
"type": "string",
"format": "int64",
"description": "*\nThe creation time of the token as UNIX timestamp in seconds."
},
"expired": {
"type": "boolean",
"format": "boolean",
"description": "*\nIndicates whether the token is expired or still valid."
},
"storage_name": {
"type": "string",
"description": "*\nIdentifying attribute of this token in the store. Currently represents the\nfile name of the token where it's stored on the file system."
}
}
},
2020-07-14 13:20:37 +00:00
"looprpcOutQuoteResponse": {
"type": "object",
"properties": {
2020-07-14 13:20:37 +00:00
"swap_fee_sat": {
"type": "string",
"format": "int64",
"description": "*\nThe fee that the swap server is charging for the swap."
},
2020-07-14 13:20:37 +00:00
"prepay_amt_sat": {
"type": "string",
"format": "int64",
"description": "*\nThe part of the swap fee that is requested as a prepayment."
},
2020-07-14 13:20:37 +00:00
"htlc_sweep_fee_sat": {
"type": "string",
"format": "int64",
2020-07-14 13:20:37 +00:00
"description": "*\nAn estimate of the on-chain fee that needs to be paid to sweep the HTLC for\na loop out."
},
"swap_payment_dest": {
"type": "string",
"format": "byte",
"description": "*\nThe node pubkey where the swap payment needs to be paid\nto. This can be used to test connectivity before initiating the swap."
},
"cltv_delta": {
"type": "integer",
"format": "int32",
"title": "*\nOn-chain cltv expiry delta"
}
}
},
2020-07-14 13:20:37 +00:00
"looprpcOutTermsResponse": {
"type": "object",
"properties": {
"min_swap_amount": {
"type": "string",
"format": "int64",
"title": "*\nMinimum swap amount (sat)"
},
"max_swap_amount": {
"type": "string",
"format": "int64",
"title": "*\nMaximum swap amount (sat)"
2020-07-15 11:00:27 +00:00
},
"min_cltv_delta": {
"type": "integer",
"format": "int32",
"description": "The minimally accepted cltv delta of the on-chain htlc."
},
"max_cltv_delta": {
"type": "integer",
"format": "int32",
"description": "The maximally accepted cltv delta of the on-chain htlc."
2020-07-14 13:20:37 +00:00
}
}
},
"looprpcSwapResponse": {
"type": "object",
"properties": {
"id": {
"type": "string",
2020-01-31 12:57:28 +00:00
"description": "*\nSwap identifier to track status in the update stream that is returned from\nthe Start() call. Currently this is the hash that locks the htlcs.\nDEPRECATED: To make the API more consistent, this field is deprecated in\nfavor of id_bytes and will be removed in a future release."
},
"id_bytes": {
"type": "string",
"format": "byte",
"description": "*\nSwap identifier to track status in the update stream that is returned from\nthe Start() call. Currently this is the hash that locks the htlcs."
},
"htlc_address": {
"type": "string",
"description": "*\nDEPRECATED. This field stores the address of the onchain htlc, but\ndepending on the request, the semantics are different.\n- For internal loop-in htlc_address contains the address of the\nnative segwit (P2WSH) htlc.\n- For external loop-in htlc_address contains the address of the\nnested segwit (NP2WSH) htlc.\n- For loop-out htlc_address always contains the native segwit (P2WSH)\nhtlc address."
},
"htlc_address_np2wsh": {
"type": "string",
"description": "*\nThe nested segwit address of the on-chain htlc.\nThis field remains empty for loop-out."
},
"htlc_address_p2wsh": {
"type": "string",
"description": "*\nThe native segwit address of the on-chain htlc.\nUsed for both loop-in and loop-out."
},
"server_message": {
"type": "string",
"description": "A human-readable message received from the loop server."
}
}
},
"looprpcSwapState": {
"type": "string",
"enum": [
"INITIATED",
"PREIMAGE_REVEALED",
2019-03-12 15:10:37 +00:00
"HTLC_PUBLISHED",
"SUCCESS",
"FAILED",
"INVOICE_SETTLED"
],
"default": "INITIATED",
"description": " - INITIATED: *\nINITIATED is the initial state of a swap. At that point, the initiation\ncall to the server has been made and the payment process has been started\nfor the swap and prepayment invoices.\n - PREIMAGE_REVEALED: *\nPREIMAGE_REVEALED is reached when the sweep tx publication is first\nattempted. From that point on, we should consider the preimage to no\nlonger be secret and we need to do all we can to get the sweep confirmed.\nThis state will mostly coalesce with StateHtlcConfirmed, except in the\ncase where we wait for fees to come down before we sweep.\n - HTLC_PUBLISHED: *\nHTLC_PUBLISHED is reached when the htlc tx has been published in a loop in\nswap.\n - SUCCESS: *\nSUCCESS is the final swap state that is reached when the sweep tx has\nthe required confirmation depth.\n - FAILED: *\nFAILED is the final swap state for a failed swap with or without loss of\nthe swap amount.\n - INVOICE_SETTLED: *\nINVOICE_SETTLED is reached when the swap invoice in a loop in swap has been\npaid, but we are still waiting for the htlc spend to confirm."
},
"looprpcSwapStatus": {
"type": "object",
"properties": {
"amt": {
"type": "string",
"format": "int64",
"description": "*\nRequested swap amount in sat. This does not include the swap and miner\nfee."
},
"id": {
"type": "string",
2020-01-31 12:57:28 +00:00
"description": "*\nSwap identifier to track status in the update stream that is returned from\nthe Start() call. Currently this is the hash that locks the htlcs.\nDEPRECATED: To make the API more consistent, this field is deprecated in\nfavor of id_bytes and will be removed in a future release."
},
"id_bytes": {
"type": "string",
"format": "byte",
"description": "*\nSwap identifier to track status in the update stream that is returned from\nthe Start() call. Currently this is the hash that locks the htlcs."
},
"type": {
"$ref": "#/definitions/looprpcSwapType",
"title": "*\nSwap type"
},
"state": {
"$ref": "#/definitions/looprpcSwapState",
"description": "*\nState the swap is currently in, see State enum."
},
"failure_reason": {
"$ref": "#/definitions/looprpcFailureReason",
"description": "A failure reason for the swap, only set if the swap has failed."
},
"initiation_time": {
"type": "string",
"format": "int64",
"description": "*\nInitiation time of the swap."
},
"last_update_time": {
"type": "string",
"format": "int64",
"description": "*\nInitiation time of the swap."
},
"htlc_address": {
"type": "string",
"description": "*\nDEPRECATED: This field stores the address of the onchain htlc.\n- For internal loop-in htlc_address contains the address of the\nnative segwit (P2WSH) htlc.\n- For external loop-in htlc_address contains the nested segwit (NP2WSH)\naddress.\n- For loop-out htlc_address always contains the native segwit (P2WSH)\nhtlc address."
},
"htlc_address_p2wsh": {
"type": "string",
"description": "HTLC address (native segwit), used in loop-in and loop-out swaps."
},
"htlc_address_np2wsh": {
"type": "string",
"description": "HTLC address (nested segwit), used in loop-in swaps only."
},
"cost_server": {
"type": "string",
"format": "int64",
"title": "/ Swap server cost"
},
"cost_onchain": {
"type": "string",
"format": "int64",
"title": "On-chain transaction cost"
},
"cost_offchain": {
"type": "string",
"format": "int64",
"title": "Off-chain routing fees"
},
"label": {
"type": "string",
"description": "An optional label given to the swap on creation."
}
}
},
"looprpcSwapType": {
"type": "string",
"enum": [
2019-03-12 15:10:37 +00:00
"LOOP_OUT",
"LOOP_IN"
],
"default": "LOOP_OUT",
2019-03-12 15:10:37 +00:00
"title": "- LOOP_OUT: LOOP_OUT indicates an loop out swap (off-chain to on-chain)\n - LOOP_IN: LOOP_IN indicates a loop in swap (on-chain to off-chain)"
},
2019-11-15 12:57:03 +00:00
"looprpcTokensResponse": {
"type": "object",
"properties": {
"tokens": {
"type": "array",
"items": {
"$ref": "#/definitions/looprpcLsatToken"
},
"description": "*\nList of all tokens the daemon knows of, including old/expired tokens."
}
}
},
"protobufAny": {
"type": "object",
"properties": {
"type_url": {
"type": "string"
},
"value": {
"type": "string",
"format": "byte"
}
}
},
"runtimeError": {
"type": "object",
"properties": {
"error": {
"type": "string"
},
"code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
},
"details": {
"type": "array",
"items": {
"$ref": "#/definitions/protobufAny"
}
}
}
},
2019-11-15 12:57:03 +00:00
"runtimeStreamError": {
"type": "object",
"properties": {
"grpc_code": {
"type": "integer",
"format": "int32"
},
"http_code": {
"type": "integer",
"format": "int32"
},
"message": {
"type": "string"
},
"http_status": {
"type": "string"
},
"details": {
"type": "array",
"items": {
"$ref": "#/definitions/protobufAny"
}
}
}
}
}
}