"summary":"loop: `suggestswaps`\nSuggestSwaps returns a list of recommended swaps based on the current\nstate of your node's channels and it's liquidity manager parameters.\nNote that only loop out suggestions are currently supported.\n[EXPERIMENTAL]: endpoint is subject to change.",
"summary":"loop: `getparams`\nGetLiquidityParams gets the parameters that the daemon's liquidity manager\nis currently configured with. This may be nil if nothing is configured.\n[EXPERIMENTAL]: endpoint is subject to change.",
"summary":"loop: `setparams`\nSetLiquidityParams sets a new set of parameters for the daemon's liquidity\nmanager. Note that the full set of parameters must be provided, because\nthis call fully overwrites our existing parameters.\n[EXPERIMENTAL]: endpoint is subject to change.",
"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().",
"description":"The amount to swap in satoshis. In the loop-in case this can either be taken\nfrom the connected lnd wallet or coin-selected from static address deposits.\nThis is controlled by the select_deposits flag. If deposit_outpoints are\nspecified, the coins are taken out of that.",
"description":"The 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.",
"description":"The 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.",
"description":"Optionally the client can specify the last hop pubkey when requesting a\nloop-in quote. This is useful to get better off-chain routing fee from the\nserver.",
"description":"Private indicates whether the destination node should be considered\nprivate. In which case, loop will generate hophints to assist with\nprobing and payment.",
"description":"Static address deposit outpoints that will be quoted for. This option only\npertains to loop in swaps. If the amt field is set as well the respective\npartial amount will be swapped. Cannot be used in conjunction with\nauto_select_deposits.",
"description":"The asset id to use to pay for the swap invoice. If set an\nasset client is needed to set to be able to pay the invoice.",
"in":"query",
"required":false,
"type":"string",
"format":"byte"
},
{
"name":"asset_info.asset_edge_node",
"description":"The node identity public key of the peer to ask for a quote for sending out\nthe assets and converting them to satoshis. This must be specified if\nan asset id is set.",
"in":"query",
"required":false,
"type":"string",
"format":"byte"
},
{
"name":"asset_info.max_limit_multiplier",
"description":"An optional maximum multiplier for the rfq rate. If not set, the default\nwill be 1.1. This means if we request a loop out quote for 1 BTC, the off\nchain cost will be at most 1.1 BTC.",
"in":"query",
"required":false,
"type":"number",
"format":"double"
},
{
"name":"asset_info.expiry",
"description":"An optional expiry unix timestamp for when the rfq quote should expire.",
"description":"In the legacy loop-in case this field must be set to false.\nIf set to true, the swap amount will be automatically selected from the\nstatic address deposits. If set to true, deposit_outpoints must be empty.\nThis option only pertains to loop in swaps.",
"description":"If set to true the server will immediately publish the swap in exchange for\na higher fee. This can be useful if the client expects change from a swap.\nNote that this feature is only available for static address loop in swaps.",
"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().",
"description":"The amount to swap in satoshis. In the loop-in case this can either be taken\nfrom the connected lnd wallet or coin-selected from static address deposits.\nThis is controlled by the select_deposits flag. If deposit_outpoints are\nspecified, the coins are taken out of that.",
"description":"The 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.",
"description":"The 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.",
"description":"Optionally the client can specify the last hop pubkey when requesting a\nloop-in quote. This is useful to get better off-chain routing fee from the\nserver.",
"description":"Private indicates whether the destination node should be considered\nprivate. In which case, loop will generate hophints to assist with\nprobing and payment.",
"description":"Static address deposit outpoints that will be quoted for. This option only\npertains to loop in swaps. If the amt field is set as well the respective\npartial amount will be swapped. Cannot be used in conjunction with\nauto_select_deposits.",
"description":"The asset id to use to pay for the swap invoice. If set an\nasset client is needed to set to be able to pay the invoice.",
"in":"query",
"required":false,
"type":"string",
"format":"byte"
},
{
"name":"asset_info.asset_edge_node",
"description":"The node identity public key of the peer to ask for a quote for sending out\nthe assets and converting them to satoshis. This must be specified if\nan asset id is set.",
"in":"query",
"required":false,
"type":"string",
"format":"byte"
},
{
"name":"asset_info.max_limit_multiplier",
"description":"An optional maximum multiplier for the rfq rate. If not set, the default\nwill be 1.1. This means if we request a loop out quote for 1 BTC, the off\nchain cost will be at most 1.1 BTC.",
"in":"query",
"required":false,
"type":"number",
"format":"double"
},
{
"name":"asset_info.expiry",
"description":"An optional expiry unix timestamp for when the rfq quote should expire.",
"description":"In the legacy loop-in case this field must be set to false.\nIf set to true, the swap amount will be automatically selected from the\nstatic address deposits. If set to true, deposit_outpoints must be empty.\nThis option only pertains to loop in swaps.",
"description":"If set to true the server will immediately publish the swap in exchange for\na higher fee. This can be useful if the client expects change from a swap.\nNote that this feature is only available for static address loop in swaps.",
"summary":"loop: `sweephtlc`\nSweepHtlc spends a swap HTLC output via the preimage (success) path using\nthe swap's known preimage or an optionally supplied one.",
"operationId":"SwapClient_SweepHtlc",
"responses":{
"200":{
"description":"A successful response.",
"schema":{
"$ref":"#/definitions/looprpcSweepHtlcResponse"
}
},
"default":{
"description":"An unexpected error response.",
"schema":{
"$ref":"#/definitions/rpcStatus"
}
}
},
"parameters":[
{
"name":"body",
"description":"SweepHtlcRequest instructs loopd to sweep a swap HTLC via its success path.",
"description":"The swap identifier which currently is the hash that locks the HTLCs. When\nusing REST, this field must be encoded as URL safe base64.",
"description":"The type of the swap.\n\n - ANY: ANY indicates that no filter is applied.\n - 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).",
"description":"Filters the list of all stored deposits by deposit state.\n\n - UNKNOWN_STATE: UNKNOWN_STATE is the default state of a deposit.\n - DEPOSITED: DEPOSITED indicates that the deposit has been sufficiently confirmed on\nchain.\n - WITHDRAWING: WITHDRAWING indicates that the deposit is currently being withdrawn. It\nflips to WITHDRAWN once the withdrawal transaction has been sufficiently\nconfirmed.\n - WITHDRAWN: WITHDRAWN indicates that the deposit has been withdrawn.\n - LOOPING_IN: LOOPING_IN indicates that the deposit is currently being used in a static\naddress loop-in swap.\n - LOOPED_IN: LOOPED_IN indicates that the deposit was used in a static address loop-in\nswap.\n - SWEEP_HTLC_TIMEOUT: SWEEP_HTLC_TIMEOUT indicates that the deposit is part of an active loop-in\nof which the respective htlc was published by the server and the timeout\npath has opened up for the client to sweep.\n - HTLC_TIMEOUT_SWEPT: HTLC_TIMEOUT_SWEPT indicates that the timeout path of the htlc has been\nswept by the client.\n - PUBLISH_EXPIRED: PUBLISH_EXPIRED indicates that the deposit has expired and the sweep\ntransaction has been published.\n - WAIT_FOR_EXPIRY_SWEEP: WAIT_FOR_EXPIRY_SWEEP indicates that the deposit has expired and the sweep\ntransaction has not yet been sufficiently confirmed.\n - EXPIRED: EXPIRED indicates that the deposit has expired and the sweep transaction\nhas been sufficiently confirmed.\n - OPENING_CHANNEL: OPENING_CHANNEL indicates that the channel open in which the deposit was\nused is in progress.\n - CHANNEL_PUBLISHED: CHANNEL_PUBLISHED indicates that the channel open was finalized and\npublished and that it should be managed from lnd from now on.",
"description":" - ANY: ANY indicates that no filter is applied.\n - 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)."
"description":"The size of the pre-crafted output to be used as the channel point for this\nchannel funding."
},
"chan_point":{
"$ref":"#/definitions/lnrpcChannelPoint",
"description":"The target channel point to refrence in created commitment transactions."
},
"local_key":{
"$ref":"#/definitions/lnrpcKeyDescriptor",
"description":"Our local key to use when creating the multi-sig output."
},
"remote_key":{
"type":"string",
"format":"byte",
"description":"The key of the remote party to use when creating the multi-sig output."
},
"pending_chan_id":{
"type":"string",
"format":"byte",
"description":"If non-zero, then this will be used as the pending channel ID on the wire\nprotocol to initate the funding request. This is an optional field, and\nshould only be set if the responder is already expecting a specific pending\nchannel ID."
},
"thaw_height":{
"type":"integer",
"format":"int64",
"description":"This uint32 indicates if this channel is to be considered 'frozen'. A frozen\nchannel does not allow a cooperative channel close by the initiator. The\nthaw_height is the height that this restriction stops applying to the\nchannel. The height can be interpreted in two ways: as a relative height if\nthe value is less than 500,000, or as an absolute height otherwise."
},
"musig2":{
"type":"boolean",
"description":"Indicates that the funding output is using a MuSig2 multi-sig output."
}
}
},
"lnrpcChannelPoint":{
"type":"object",
"properties":{
"funding_txid_bytes":{
"type":"string",
"format":"byte",
"description":"Txid of the funding transaction. When using REST, this field must be\nencoded as base64."
},
"funding_txid_str":{
"type":"string",
"description":"Hex-encoded string representing the byte-reversed hash of the funding\ntransaction."
},
"output_index":{
"type":"integer",
"format":"int64",
"title":"The index of the output of the funding transaction"
}
}
},
"lnrpcCommitmentType":{
"type":"string",
"enum":[
"UNKNOWN_COMMITMENT_TYPE",
"LEGACY",
"STATIC_REMOTE_KEY",
"ANCHORS",
"SCRIPT_ENFORCED_LEASE",
"SIMPLE_TAPROOT",
"SIMPLE_TAPROOT_OVERLAY"
],
"default":"UNKNOWN_COMMITMENT_TYPE",
"description":" - UNKNOWN_COMMITMENT_TYPE: Returned when the commitment type isn't known or unavailable.\n - LEGACY: A channel using the legacy commitment format having tweaked to_remote\nkeys.\n - STATIC_REMOTE_KEY: A channel that uses the modern commitment format where the key in the\noutput of the remote party does not change each state. This makes back\nup and recovery easier as when the channel is closed, the funds go\ndirectly to that key.\n - ANCHORS: A channel that uses a commitment format that has anchor outputs on the\ncommitments, allowing fee bumping after a force close transaction has\nbeen broadcast.\n - SCRIPT_ENFORCED_LEASE: A channel that uses a commitment type that builds upon the anchors\ncommitment format, but in addition requires a CLTV clause to spend outputs\npaying to the channel initiator. This is intended for use on leased channels\nto guarantee that the channel initiator has no incentives to close a leased\nchannel before its maturity date.\n - SIMPLE_TAPROOT: A channel that uses musig2 for the funding output, and the new tapscript\nfeatures where relevant.\n - SIMPLE_TAPROOT_OVERLAY: Identical to the SIMPLE_TAPROOT channel type, but with extra functionality.\nThis channel type also commits to additional meta data in the tapscript\nleaves for the scripts in a channel."
},
"lnrpcFundingShim":{
"type":"object",
"properties":{
"chan_point_shim":{
"$ref":"#/definitions/lnrpcChanPointShim",
"description":"A channel shim where the channel point was fully constructed outside\nof lnd's wallet and the transaction might already be published."
},
"psbt_shim":{
"$ref":"#/definitions/lnrpcPsbtShim",
"description":"A channel shim that uses a PSBT to fund and sign the channel funding\ntransaction."
}
}
},
"lnrpcKeyDescriptor":{
"type":"object",
"properties":{
"raw_key_bytes":{
"type":"string",
"format":"byte",
"description":"The raw bytes of the key being identified."
},
"key_loc":{
"$ref":"#/definitions/lnrpcKeyLocator",
"description":"The key locator that identifies which key to use for signing."
}
}
},
"lnrpcKeyLocator":{
"type":"object",
"properties":{
"key_family":{
"type":"integer",
"format":"int32",
"description":"The family of key being identified."
},
"key_index":{
"type":"integer",
"format":"int32",
"description":"The precise index of the key being identified."
}
}
},
"lnrpcOpenChannelRequest":{
"type":"object",
"properties":{
"sat_per_vbyte":{
"type":"string",
"format":"uint64",
"description":"A manual fee rate set in sat/vbyte that should be used when crafting the\nfunding transaction."
},
"node_pubkey":{
"type":"string",
"format":"byte",
"description":"The pubkey of the node to open a channel with. When using REST, this field\nmust be encoded as base64."
},
"node_pubkey_string":{
"type":"string",
"description":"The hex encoded pubkey of the node to open a channel with. Deprecated now\nthat the REST gateway supports base64 encoding of bytes fields."
},
"local_funding_amount":{
"type":"string",
"format":"int64",
"title":"The number of satoshis the wallet should commit to the channel"
},
"push_sat":{
"type":"string",
"format":"int64",
"title":"The number of satoshis to push to the remote side as part of the initial\ncommitment state"
},
"target_conf":{
"type":"integer",
"format":"int32",
"description":"The target number of blocks that the funding transaction should be\nconfirmed by."
},
"sat_per_byte":{
"type":"string",
"format":"int64",
"description":"Deprecated, use sat_per_vbyte.\nA manual fee rate set in sat/vbyte that should be used when crafting the\nfunding transaction."
},
"private":{
"type":"boolean",
"description":"Whether this channel should be private, not announced to the greater\nnetwork."
},
"min_htlc_msat":{
"type":"string",
"format":"int64",
"description":"The minimum value in millisatoshi we will require for incoming HTLCs on\nthe channel."
},
"remote_csv_delay":{
"type":"integer",
"format":"int64",
"description":"The delay we require on the remote's commitment transaction. If this is\nnot set, it will be scaled automatically with the channel size."
},
"min_confs":{
"type":"integer",
"format":"int32",
"description":"The minimum number of confirmations each one of your outputs used for\nthe funding transaction must satisfy."
},
"spend_unconfirmed":{
"type":"boolean",
"description":"Whether unconfirmed outputs should be used as inputs for the funding\ntransaction."
},
"close_address":{
"type":"string",
"description":"Close address is an optional address which specifies the address to which\nfunds should be paid out to upon cooperative close. This field may only be\nset if the peer supports the option upfront feature bit (call listpeers\nto check). The remote peer will only accept cooperative closes to this\naddress if it is set.\n\nNote: If this value is set on channel creation, you will *not* be able to\ncooperatively close out to a different address."
},
"funding_shim":{
"$ref":"#/definitions/lnrpcFundingShim",
"description":"Funding shims are an optional argument that allow the caller to intercept\ncertain funding functionality. For example, a shim can be provided to use a\nparticular key for the commitment key (ideally cold) rather than use one\nthat is generated by the wallet as normal, or signal that signing will be\ncarried out in an interactive manner (PSBT based)."
},
"remote_max_value_in_flight_msat":{
"type":"string",
"format":"uint64",
"description":"The maximum amount of coins in millisatoshi that can be pending within\nthe channel. It only applies to the remote party."
},
"remote_max_htlcs":{
"type":"integer",
"format":"int64",
"description":"The maximum number of concurrent HTLCs we will allow the remote party to add\nto the commitment transaction."
},
"max_local_csv":{
"type":"integer",
"format":"int64",
"description":"Max local csv is the maximum csv delay we will allow for our own commitment\ntransaction."
},
"commitment_type":{
"$ref":"#/definitions/lnrpcCommitmentType",
"description":"The explicit commitment type to use. Note this field will only be used if\nthe remote peer supports explicit channel negotiation."
},
"zero_conf":{
"type":"boolean",
"description":"If this is true, then a zero-conf channel open will be attempted."
},
"scid_alias":{
"type":"boolean",
"description":"If this is true, then an option-scid-alias channel-type open will be\nattempted."
},
"base_fee":{
"type":"string",
"format":"uint64",
"description":"The base fee charged regardless of the number of milli-satoshis sent."
},
"fee_rate":{
"type":"string",
"format":"uint64",
"description":"The fee rate in ppm (parts per million) that will be charged in\nproportion of the value of each forwarded HTLC."
},
"use_base_fee":{
"type":"boolean",
"description":"If use_base_fee is true the open channel announcement will update the\nchannel base fee with the value specified in base_fee. In the case of\na base_fee of 0 use_base_fee is needed downstream to distinguish whether\nto use the default base fee value specified in the config or 0."
},
"use_fee_rate":{
"type":"boolean",
"description":"If use_fee_rate is true the open channel announcement will update the\nchannel fee rate with the value specified in fee_rate. In the case of\na fee_rate of 0 use_fee_rate is needed downstream to distinguish whether\nto use the default fee rate value specified in the config or 0."
},
"remote_chan_reserve_sat":{
"type":"string",
"format":"uint64",
"description":"The number of satoshis we require the remote peer to reserve. This value,\nif specified, must be above the dust limit and below 20% of the channel\ncapacity."
},
"fund_max":{
"type":"boolean",
"description":"If set, then lnd will attempt to commit all the coins under control of the\ninternal wallet to open the channel, and the LocalFundingAmount field must\nbe zero and is ignored."
},
"memo":{
"type":"string",
"description":"An optional note-to-self to go along with the channel containing some\nuseful information. This is only ever stored locally and in no way impacts\nthe channel's operation."
},
"outpoints":{
"type":"array",
"items":{
"type":"object",
"$ref":"#/definitions/lnrpcOutPoint"
},
"description":"A list of selected outpoints that are allocated for channel funding."
}
}
},
"lnrpcOutPoint":{
"type":"object",
"properties":{
"txid_bytes":{
"type":"string",
"format":"byte",
"description":"Raw bytes representing the transaction id."
},
"txid_str":{
"type":"string",
"description":"Reversed, hex-encoded string representing the transaction id."
},
"output_index":{
"type":"integer",
"format":"int64",
"description":"The index of the output on the transaction."
}
}
},
"lnrpcPsbtShim":{
"type":"object",
"properties":{
"pending_chan_id":{
"type":"string",
"format":"byte",
"description":"A unique identifier of 32 random bytes that will be used as the pending\nchannel ID to identify the PSBT state machine when interacting with it and\non the wire protocol to initiate the funding request."
},
"base_psbt":{
"type":"string",
"format":"byte",
"description":"An optional base PSBT the new channel output will be added to. If this is\nnon-empty, it must be a binary serialized PSBT."
},
"no_publish":{
"type":"boolean",
"description":"If a channel should be part of a batch (multiple channel openings in one\ntransaction), it can be dangerous if the whole batch transaction is\npublished too early before all channel opening negotiations are completed.\nThis flag prevents this particular channel from broadcasting the transaction\nafter the negotiation with the remote peer. In a batch of channel openings\nthis flag should be set to true for every channel but the very last."
"description":"The asset id to use to pay for the swap invoice. If set an\nasset client is needed to set to be able to pay the invoice."
},
"asset_edge_node":{
"type":"string",
"format":"byte",
"description":"The node identity public key of the peer to ask for a quote for sending out\nthe assets and converting them to satoshis. This must be specified if\nan asset id is set."
},
"max_limit_multiplier":{
"type":"number",
"format":"double",
"description":"An optional maximum multiplier for the rfq rate. If not set, the default\nwill be 1.1. This means if we request a loop out quote for 1 BTC, the off\nchain cost will be at most 1.1 BTC."
},
"expiry":{
"type":"string",
"format":"int64",
"description":"An optional expiry unix timestamp for when the rfq quote should expire."
}
}
},
"looprpcAssetRfqInfo":{
"type":"object",
"properties":{
"prepay_rfq_id":{
"type":"string",
"format":"byte",
"description":"The Prepay RFQ ID to use to pay for the prepay invoice."
"description":" - AUTO_REASON_BUDGET_NOT_STARTED: Budget not started indicates that we do not recommend any swaps because\nthe start time for our budget has not arrived yet.\n - AUTO_REASON_SWEEP_FEES: Sweep fees indicates that the estimated fees to sweep swaps are too high\nright now.\n - AUTO_REASON_BUDGET_ELAPSED: Budget elapsed indicates that the autoloop budget for the period has been\nelapsed.\n - AUTO_REASON_IN_FLIGHT: In flight indicates that the limit on in-flight automatically dispatched\nswaps has already been reached.\n - AUTO_REASON_SWAP_FEE: Swap fee indicates that the server fee for a specific swap is too high.\n - AUTO_REASON_MINER_FEE: Miner fee indicates that the miner fee for a specific swap is to high.\n - AUTO_REASON_PREPAY: Prepay indicates that the prepay fee for a specific swap is too high.\n - AUTO_REASON_FAILURE_BACKOFF: Failure backoff indicates that a swap has recently failed for this target,\nand the backoff period has not yet passed.\n - AUTO_REASON_LOOP_OUT: Loop out indicates that a loop out swap is currently utilizing the channel,\nso it is not eligible.\n - AUTO_REASON_LOOP_IN: Loop In indicates that a loop in swap is currently in flight for the peer,\nso it is not eligible.\n - AUTO_REASON_LIQUIDITY_OK: Liquidity ok indicates that a target meets the liquidity balance expressed\nin its rule, so no swap is needed.\n - AUTO_REASON_BUDGET_INSUFFICIENT: Budget insufficient indicates that we cannot perform a swap because we do\nnot have enough pending budget available. This differs from budget elapsed,\nbecause we still have some budget available, but we have allocated it to\nother swaps.\n - AUTO_REASON_FEE_INSUFFICIENT: Fee insufficient indicates that the fee estimate for a swap is higher than\nthe portion of total swap amount that we allow fees to consume.\n - AUTO_REASON_STATIC_LOOP_IN_NO_CANDIDATE: No static loop-in candidate indicates that static loop-in autoloop was\nselected, but no full-deposit static candidate fit the rule.\n - AUTO_REASON_CUSTOM_CHANNEL_DATA: Custom channel data indicates that the target channel carries custom\nchannel data and is excluded from the standard autoloop planner."
"description":" - UNKNOWN_STATE: UNKNOWN_STATE is the default state of a deposit.\n - DEPOSITED: DEPOSITED indicates that the deposit has been sufficiently confirmed on\nchain.\n - WITHDRAWING: WITHDRAWING indicates that the deposit is currently being withdrawn. It\nflips to WITHDRAWN once the withdrawal transaction has been sufficiently\nconfirmed.\n - WITHDRAWN: WITHDRAWN indicates that the deposit has been withdrawn.\n - LOOPING_IN: LOOPING_IN indicates that the deposit is currently being used in a static\naddress loop-in swap.\n - LOOPED_IN: LOOPED_IN indicates that the deposit was used in a static address loop-in\nswap.\n - SWEEP_HTLC_TIMEOUT: SWEEP_HTLC_TIMEOUT indicates that the deposit is part of an active loop-in\nof which the respective htlc was published by the server and the timeout\npath has opened up for the client to sweep.\n - HTLC_TIMEOUT_SWEPT: HTLC_TIMEOUT_SWEPT indicates that the timeout path of the htlc has been\nswept by the client.\n - PUBLISH_EXPIRED: PUBLISH_EXPIRED indicates that the deposit has expired and the sweep\ntransaction has been published.\n - WAIT_FOR_EXPIRY_SWEEP: WAIT_FOR_EXPIRY_SWEEP indicates that the deposit has expired and the sweep\ntransaction has not yet been sufficiently confirmed.\n - EXPIRED: EXPIRED indicates that the deposit has expired and the sweep transaction\nhas been sufficiently confirmed.\n - OPENING_CHANNEL: OPENING_CHANNEL indicates that the channel open in which the deposit was\nused is in progress.\n - CHANNEL_PUBLISHED: CHANNEL_PUBLISHED indicates that the channel open was finalized and\npublished and that it should be managed from lnd from now on."
"description":"Set to true to enable easy autoloop for this asset. If set the client will\nautomatically dispatch swaps in order to meet the configured local balance\ntarget size. Currently only loop out is supported, meaning that easy\nautoloop can only reduce the funds that are held as balance in channels."
},
"local_target_asset_amt":{
"type":"string",
"format":"uint64",
"description":"The local balance target size, expressed in the asset's base units. This is\nused by easy autoloop to determine how much liquidity should be maintained\nin channels."
"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.\n - FAILURE_REASON_ABANDONED: FAILURE_REASON_ABANDONED indicates that a swap permanently failed because\nthe client manually abandoned the swap.\n - FAILURE_REASON_INSUFFICIENT_CONFIRMED_BALANCE: FAILURE_REASON_INSUFFICIENT_CONFIRMED_BALANCE indicates that a swap\nwasn't published due to insufficient confirmed balance.\n - FAILURE_REASON_INCORRECT_HTLC_AMT_SWEPT: FAILURE_REASON_INCORRECT_HTLC_AMT_SWEPT indicates that a swap\nwasn't published due to insufficient confirmed balance."
"description":"The coefficient is the fractional value scaled-up as an integer. This\ninteger is represented as a string as it may be too large to fit in a\nuint64."
},
"scale":{
"type":"integer",
"format":"int64",
"description":"The scale is the component that determines how many decimal places\nthe coefficient should be divided by to obtain the fractional value."
}
},
"description":"FixedPoint is a scaled integer representation of a fractional number.\n\nThis type consists of two integer fields: a coefficient and a scale.\nUsing this format enables precise and consistent representation of fractional\nnumbers while avoiding floating-point data types, which are prone to\nprecision errors.\n\nThe relationship between the fractional representation and its fixed-point\nrepresentation is expressed as:\n```\nV = F_c / (10^F_s)\n```\nwhere:\n\n* `V` is the fractional value.\n\n* `F_c` is the coefficient component of the fixed-point representation. It is\n the scaled-up fractional value represented as an integer.\n\n* `F_s` is the scale component. It is an integer specifying how\n many decimal places `F_c` should be divided by to obtain the fractional\n representation."
"description":"The Git commit hash the Loop binary build was based on. If the build had\nuncommited changes, this field will contain the most recent commit hash,\nsuffixed by \"-dirty\"."
"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."
"description":"If the quote request was for a static address loop in and only contained\ndeposit outpoints the quote response will return the total amount of the\nselected deposits."
"description":"The reservations to use for the swap."
},
"outgoing_chan_set":{
"type":"array",
"items":{
"type":"string",
"format":"uint64"
},
"description":"A 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."
},
"dest_addr":{
"type":"string",
"description":"An optional address to sweep the onchain funds to. If not set, the funds\nwill be swept to the wallet's internal address."
"description":"The base macaroon that was baked by the auth server."
},
"payment_hash":{
"type":"string",
"format":"byte",
"description":"The payment hash of the payment that was paid to obtain the token."
},
"payment_preimage":{
"type":"string",
"format":"byte",
"description":"The 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":"The amount of millisatoshis that was paid to get the token."
},
"routing_fee_paid_msat":{
"type":"string",
"format":"int64",
"description":"The amount of millisatoshis paid in routing fee to pay for the token."
},
"time_created":{
"type":"string",
"format":"int64",
"description":"The creation time of the token as UNIX timestamp in seconds."
},
"expired":{
"type":"boolean",
"description":"Indicates whether the token is expired or still valid."
},
"storage_name":{
"type":"string",
"description":"Identifying attribute of this token in the store. Currently represents the\nfile name of the token where it's stored on the file system."
"description":"The parts per million of swap amount that is allowed to be allocated to swap\nfees. This value is applied across swap categories and may not be set in\nconjunction with sweep fee rate, swap fee ppm, routing fee ppm, prepay\nrouting, max prepay and max miner fee."
"description":"The limit we place on our estimated sweep cost for a swap in sat/vByte. If\nthe estimated fee for our sweep transaction within the specified\nconfirmation target is above this value, we will not suggest any swaps."
},
"max_swap_fee_ppm":{
"type":"string",
"format":"uint64",
"description":"The maximum fee paid to the server for facilitating the swap, expressed\nas parts per million of the swap volume."
},
"max_routing_fee_ppm":{
"type":"string",
"format":"uint64",
"description":"The maximum fee paid to route the swap invoice off chain, expressed as\nparts per million of the volume being routed."
},
"max_prepay_routing_fee_ppm":{
"type":"string",
"format":"uint64",
"description":"The maximum fee paid to route the prepay invoice off chain, expressed as\nparts per million of the volume being routed."
},
"max_prepay_sat":{
"type":"string",
"format":"uint64",
"description":"The maximum no-show penalty in satoshis paid for a swap."
},
"max_miner_fee_sat":{
"type":"string",
"format":"uint64",
"description":"The maximum miner fee we will pay to sweep the swap on chain. Note that we\nwill not suggest a swap if the estimate is above the sweep limit set by\nthese parameters, and we use the current fee estimate to sweep on chain so\nthis value is only a cap placed on the amount we spend on fees in the case\nwhere the swap needs to be claimed on chain, but fees have suddenly spiked."
},
"sweep_conf_target":{
"type":"integer",
"format":"int32",
"description":"The number of blocks from the on-chain HTLC's confirmation height that it\nshould be swept within."
},
"failure_backoff_sec":{
"type":"string",
"format":"uint64",
"description":"The amount of time we require pass since a channel was part of a failed\nswap due to off chain payment failure until it will be considered for swap\nsuggestions again, expressed in seconds."
"description":"Set to true to enable automatic dispatch of swaps. All swaps will be limited\nto the fee categories set by these parameters, and total expenditure will\nbe limited to the autoloop budget."
"description":"Deprecated, use autoloop_budget_refresh_period_sec. The start time for\nautoloop budget, expressed as a unix timestamp in seconds. If this value is\n0, the budget will be applied for all automatically dispatched swaps. Swaps\nthat were completed before this date will not be included in budget\ncalculations."
"description":"The minimum amount, expressed in satoshis, that the autoloop client will\ndispatch a swap for. This value is subject to the server-side limits\nspecified by the LoopOutTerms endpoint."
},
"max_swap_amount":{
"type":"string",
"format":"uint64",
"description":"The maximum amount, expressed in satoshis, that the autoloop client will\ndispatch a swap for. This value is subject to the server-side limits\nspecified by the LoopOutTerms endpoint."
"description":"Set to true to enable easy autoloop. If set, all channel/peer rules will be\noverridden and the client will automatically dispatch swaps in order to meet\nthe configured local balance target size. Currently only loop out is\nsupported, meaning that easy autoloop can only reduce the funds that are\nheld as balance in channels."
},
"easy_autoloop_local_target_sat":{
"type":"string",
"format":"uint64",
"description":"The local balance target size, expressed in satoshis. This is used by easy\nautoloop to determine how much liquidity should be maintained in channels."
"description":"An alternative destination address source for the swap. This field\nrepresents the name of the account in the backing lnd instance.\nRefer to lnd's wallet import functions for reference."
},
"account_addr_type":{
"$ref":"#/definitions/looprpcAddressType",
"description":"The address type of the account specified in the account field."
"description":"Set to true to enable fast swap publication. If set, the server will\npublish the HTLC immediately after receiving the swap request. This\nsetting has direct implications on the swap fees, as fast swaps may\nnot be able to be batched with other swaps."
"description":"A list of peers (their public keys) that should be excluded from the easy\nautoloop run. If set, channels connected to these peers won't be\nconsidered for easy autoloop swaps."
"description":"Type indicates the type of rule that this message rule represents. Setting\nthis value will determine which fields are used in the message. The comments\non each field in this message will be prefixed with the LiquidityRuleType\nthey belong to."
},
"incoming_threshold":{
"type":"integer",
"format":"int64",
"description":"THRESHOLD: The percentage of total capacity that incoming capacity should\nnot drop beneath."
},
"outgoing_threshold":{
"type":"integer",
"format":"int64",
"description":"THRESHOLD: The percentage of total capacity that outgoing capacity should\nnot drop beneath."
"description":"Maximum 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."
"description":"Maximum 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."
"description":"The 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."
"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."
"description":"An optional identification string that will be appended to the user agent\nstring sent to the server to give information about the usage of loop. This\ninitiator part is meant for user interfaces to add their name to give the\nfull picture of the binary used (loopd, LiT) and the method used for\ntriggering the swap (loop CLI, autolooper, LiT UI, other 3rd party UI)."
"description":"Optional route hints to reach the destination through private channels."
},
"private":{
"type":"boolean",
"description":"Private indicates whether the destination node should be considered\nprivate. In which case, loop will generate hophints to assist with\nprobing and payment."
"description":" - LOOP_IN_SOURCE_WALLET: Use the legacy wallet-funded loop-in flow.\n - LOOP_IN_SOURCE_STATIC_ADDRESS: Use deposited static-address funds for loop-in autoloops."
"description":"Maximum off-chain fee in sat that may be paid for swap payment to the\nserver. This limit is applied during path finding. Typically this value is\ntaken from the response of the GetQuote call."
"description":"Maximum 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."
"description":"Maximum 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."
"description":"Maximum 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."
"description":"Deprecated, 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."
"description":"A 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."
"description":"The 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."
"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."
"description":"An optional identification string that will be appended to the user agent\nstring sent to the server to give information about the usage of loop. This\ninitiator part is meant for user interfaces to add their name to give the\nfull picture of the binary used (loopd, LiT) and the method used for\ntriggering the swap (loop CLI, autolooper, LiT UI, other 3rd party UI)."
"description":"An alternative destination address source for the swap. This field\nrepresents the name of the account in the backing lnd instance.\nRefer to lnd's wallet import functions for reference."
},
"account_addr_type":{
"$ref":"#/definitions/looprpcAddressType",
"description":"The address type of the account specified in the account field."
"description":"A flag indicating whether the defined destination address does not belong to\nthe wallet. This is used to flag whether this loop out swap could have its\nassociated sweep batched."
"description":"The reservations to use for the swap. If this field is set, loop will try\nto use the instant out flow using the given reservations. If the\nreservations are not sufficient, the swap will fail. The swap amount must\nbe equal to the sum of the amounts of the reservations."
"description":"The timeout in seconds to use for off-chain payments. Note that the swap\npayment is attempted multiple times where each attempt will set this value\nas the timeout for the payment."
"description":"The optional asset information to use for the swap. If set, the swap will\nbe paid in the specified asset using the provided edge node. An Asset client\nmust be connected to the loop client to use this feature."
},
"asset_rfq_info":{
"$ref":"#/definitions/looprpcAssetRfqInfo",
"description":"The optional RFQ information to use for the swap. If set, the swap will\nuse the provided RFQs to pay for the swap invoice."
"description":"Parameters is the desired new set of parameters for the liquidity management\nsubsystem. Note that the current set of parameters will be completely\noverwritten by the parameters provided (if they are valid), so the full set\nof parameters should be provided for each call."
"description":"The outpoints of the deposits to loop-in."
},
"max_swap_fee_satoshis":{
"type":"string",
"format":"int64",
"description":"Maximum satoshis we are willing to pay the server for the swap. This value\nis not disclosed 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."
},
"last_hop":{
"type":"string",
"format":"byte",
"description":"Optionally the client can specify the last hop pubkey when requesting a\nloop-in quote. This is useful to get better off-chain routing fee from the\nserver."
},
"label":{
"type":"string",
"description":"An optional label for this swap. This field is limited to 500 characters and\nmay not be one of the reserved values in loop/labels Reserved list."
},
"initiator":{
"type":"string",
"description":"An optional identification string that will be appended to the user agent\nstring sent to the server to give information about the usage of loop. This\ninitiator part is meant for user interfaces to add their name to give the\nfull picture of the binary used (loopd, LiT) and the method used for\ntriggering the swap (loop CLI, autolooper, LiT UI, other 3rd party UI)."
"description":"Optional route hints to reach the destination through private channels."
},
"private":{
"type":"boolean",
"description":"Private indicates whether the destination node should be considered private.\nIn which case, loop will generate hop hints to assist with probing and\npayment."
},
"payment_timeout_seconds":{
"type":"integer",
"format":"int64",
"description":"The swap payment timeout allows the user to specify an upper limit for the\namount of time the server is allowed to take to fulfill the off-chain swap\npayment. If the timeout is reached the swap will be aborted on the server\nside and the client can retry the swap with different parameters."
},
"amount":{
"type":"string",
"format":"int64",
"description":"The optional swap amount the client is attempting to swap. It can be\nprovided in combination with the outpoints or separately. If provided with\noutpoints the client takes out this amount from the sum of provided\noutpoints and sends the change back to the static address. If the amount is\nprovided without outpoints, the client will select deposits automatically.\nThe coin selection strategy is simplified by sorting all available deposits\nin descending order by amount, and equal amounts in ascending order of\nblocks until expiry, and then selecting the largest deposits first until the\namount is reached. The change will be sent back to the static address. If a\nsubset of outpoints suffice to cover the specified amount the swap will be\ncanceled to allow the user to safe on transaction fees."
},
"fast":{
"type":"boolean",
"description":"If set, request the server to use fast publication behavior."
"description":"An optional identification string that will be appended to the user agent\nstring sent to the server to give information about the usage of loop. This\ninitiator part is meant for user interfaces to add their name to give the\nfull picture of the binary used (loopd, LiT) and the method used for\ntriggering the swap (loop CLI, autolooper, LiT UI, other 3rd party UI)."
},
"payment_timeout_seconds":{
"type":"integer",
"format":"int64",
"description":"The swap payment timeout allows the user to specify an upper limit for the\namount of time the server is allowed to take to fulfill the off-chain swap\npayment. If the timeout is reached the swap will be aborted on the server\nside and the client can retry the swap with different parameters."
"description":"The selected deposits that is withdrawn from."
},
"total_deposit_amount_satoshis":{
"type":"string",
"format":"int64",
"description":"The sum of the deposit values that was selected for withdrawal."
},
"withdrawn_amount_satoshis":{
"type":"string",
"format":"int64",
"description":"The actual amount that was withdrawn from the selected deposits. This value\nrepresents the sum of selected deposit values minus tx fees minus optional\nchange output."
},
"change_amount_satoshis":{
"type":"string",
"format":"int64",
"description":"An optional change."
},
"confirmation_height":{
"type":"integer",
"format":"int64",
"description":"The confirmation block height of the withdrawal transaction."
"description":"Swap 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."
"description":"Swap identifier to track status in the update stream that is returned from\nthe Start() call. Currently this is the hash that locks the htlcs."
"description":"DEPRECATED. 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 loop-out htlc_address always contains the native segwit (P2WSH)\nhtlc address."
"description":" - INITIATED: INITIATED 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: PREIMAGE_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: HTLC_PUBLISHED is reached when the htlc tx has been published in a loop in\nswap.\n - SUCCESS: SUCCESS is the final swap state that is reached when the sweep tx has\nthe required confirmation depth.\n - FAILED: FAILED is the final swap state for a failed swap with or without loss of\nthe swap amount.\n - INVOICE_SETTLED: INVOICE_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."
"description":"Swap 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."
"description":"Swap identifier to track status in the update stream that is returned from\nthe Start() call. Currently this is the hash that locks the htlcs."
"description":"DEPRECATED: 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 loop-out htlc_address always contains the native segwit (P2WSH)\nhtlc address."
"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)"
"description":"The outpoints of the deposits to withdraw."
},
"all":{
"type":"boolean",
"description":"If set to true, all deposits will be withdrawn."
},
"dest_addr":{
"type":"string",
"description":"The address to withdraw the funds to."
},
"sat_per_vbyte":{
"type":"string",
"format":"int64",
"description":"The fee rate in sat/vbyte to use for the withdrawal transaction."
},
"amount":{
"type":"string",
"format":"int64",
"description":"The amount in satoshis that should be withdrawn from the selected deposits.\nIf there is change, it will be sent back to the static address. The fees for\nthe transaction are taken from the change output. If the change is below\nthe dust limit, there won't be a change output and the dust goes towards\nfees."