lnd.xprv/lnrpc/walletrpc/walletkit.swagger.json
2020-05-25 11:33:33 +02:00

297 lines
12 KiB
JSON

{
"swagger": "2.0",
"info": {
"title": "walletrpc/walletkit.proto",
"version": "version not set"
},
"schemes": [
"http",
"https"
],
"consumes": [
"application/json"
],
"produces": [
"application/json"
],
"paths": {},
"definitions": {
"ListSweepsResponseTransactionIDs": {
"type": "object",
"properties": {
"transaction_ids": {
"type": "array",
"items": {
"type": "string"
},
"description": "Reversed, hex-encoded string representing the transaction ids of the\nsweeps that our node has broadcast. Note that these transactions may\nnot have confirmed yet, we record sweeps on broadcast, not confirmation."
}
}
},
"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."
}
}
},
"lnrpcTransaction": {
"type": "object",
"properties": {
"tx_hash": {
"type": "string",
"title": "The transaction hash"
},
"amount": {
"type": "string",
"format": "int64",
"title": "The transaction amount, denominated in satoshis"
},
"num_confirmations": {
"type": "integer",
"format": "int32",
"title": "The number of confirmations"
},
"block_hash": {
"type": "string",
"title": "The hash of the block this transaction was included in"
},
"block_height": {
"type": "integer",
"format": "int32",
"title": "The height of the block this transaction was included in"
},
"time_stamp": {
"type": "string",
"format": "int64",
"title": "Timestamp of this transaction"
},
"total_fees": {
"type": "string",
"format": "int64",
"title": "Fees paid for this transaction"
},
"dest_addresses": {
"type": "array",
"items": {
"type": "string"
},
"title": "Addresses that received funds for this transaction"
},
"raw_tx_hex": {
"type": "string",
"description": "The raw transaction hex."
},
"label": {
"type": "string",
"description": "A label that was optionally set on transaction broadcast."
}
}
},
"lnrpcTransactionDetails": {
"type": "object",
"properties": {
"transactions": {
"type": "array",
"items": {
"$ref": "#/definitions/lnrpcTransaction"
},
"description": "The list of transactions relevant to the wallet."
}
}
},
"signrpcKeyDescriptor": {
"type": "object",
"properties": {
"raw_key_bytes": {
"type": "string",
"format": "byte",
"description": "The raw bytes of the key being identified. Either this or the KeyLocator\nmust be specified."
},
"key_loc": {
"$ref": "#/definitions/signrpcKeyLocator",
"description": "The key locator that identifies which key to use for signing. Either this\nor the raw bytes of the target key must be specified."
}
}
},
"signrpcKeyLocator": {
"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."
}
}
},
"signrpcTxOut": {
"type": "object",
"properties": {
"value": {
"type": "string",
"format": "int64",
"description": "The value of the output being spent."
},
"pk_script": {
"type": "string",
"format": "byte",
"description": "The script of the output being spent."
}
}
},
"walletrpcAddrResponse": {
"type": "object",
"properties": {
"addr": {
"type": "string",
"description": "The address encoded using a bech32 format."
}
}
},
"walletrpcBumpFeeResponse": {
"type": "object"
},
"walletrpcEstimateFeeResponse": {
"type": "object",
"properties": {
"sat_per_kw": {
"type": "string",
"format": "int64",
"description": "The amount of satoshis per kw that should be used in order to reach the\nconfirmation target in the request."
}
}
},
"walletrpcLabelTransactionResponse": {
"type": "object"
},
"walletrpcListSweepsResponse": {
"type": "object",
"properties": {
"transaction_details": {
"$ref": "#/definitions/lnrpcTransactionDetails"
},
"transaction_ids": {
"$ref": "#/definitions/ListSweepsResponseTransactionIDs"
}
}
},
"walletrpcPendingSweep": {
"type": "object",
"properties": {
"outpoint": {
"$ref": "#/definitions/lnrpcOutPoint",
"description": "The outpoint of the output we're attempting to sweep."
},
"witness_type": {
"$ref": "#/definitions/walletrpcWitnessType",
"description": "The witness type of the output we're attempting to sweep."
},
"amount_sat": {
"type": "integer",
"format": "int64",
"description": "The value of the output we're attempting to sweep."
},
"sat_per_byte": {
"type": "integer",
"format": "int64",
"description": "The fee rate we'll use to sweep the output. The fee rate is only determined\nonce a sweeping transaction for the output is created, so it's possible for\nthis to be 0 before this."
},
"broadcast_attempts": {
"type": "integer",
"format": "int64",
"description": "The number of broadcast attempts we've made to sweep the output."
},
"next_broadcast_height": {
"type": "integer",
"format": "int64",
"description": "The next height of the chain at which we'll attempt to broadcast the\nsweep transaction of the output."
},
"requested_conf_target": {
"type": "integer",
"format": "int64",
"description": "The requested confirmation target for this output."
},
"requested_sat_per_byte": {
"type": "integer",
"format": "int64",
"description": "The requested fee rate, expressed in sat/byte, for this output."
},
"force": {
"type": "boolean",
"format": "boolean",
"description": "Whether this input must be force-swept. This means that it is swept even\nif it has a negative yield."
}
}
},
"walletrpcPendingSweepsResponse": {
"type": "object",
"properties": {
"pending_sweeps": {
"type": "array",
"items": {
"$ref": "#/definitions/walletrpcPendingSweep"
},
"description": "The set of outputs currently being swept by lnd's central batching engine."
}
}
},
"walletrpcPublishResponse": {
"type": "object",
"properties": {
"publish_error": {
"type": "string",
"description": "If blank, then no error occurred and the transaction was successfully\npublished. If not the empty string, then a string representation of the\nbroadcast error.\n\nTODO(roasbeef): map to a proper enum type"
}
}
},
"walletrpcSendOutputsResponse": {
"type": "object",
"properties": {
"raw_tx": {
"type": "string",
"format": "byte",
"description": "The serialized transaction sent out on the network."
}
}
},
"walletrpcWitnessType": {
"type": "string",
"enum": [
"UNKNOWN_WITNESS",
"COMMITMENT_TIME_LOCK",
"COMMITMENT_NO_DELAY",
"COMMITMENT_REVOKE",
"HTLC_OFFERED_REVOKE",
"HTLC_ACCEPTED_REVOKE",
"HTLC_OFFERED_TIMEOUT_SECOND_LEVEL",
"HTLC_ACCEPTED_SUCCESS_SECOND_LEVEL",
"HTLC_OFFERED_REMOTE_TIMEOUT",
"HTLC_ACCEPTED_REMOTE_SUCCESS",
"HTLC_SECOND_LEVEL_REVOKE",
"WITNESS_KEY_HASH",
"NESTED_WITNESS_KEY_HASH",
"COMMITMENT_ANCHOR"
],
"default": "UNKNOWN_WITNESS",
"description": " - COMMITMENT_TIME_LOCK: A witness that allows us to spend the output of a commitment transaction\nafter a relative lock-time lockout.\n - COMMITMENT_NO_DELAY: A witness that allows us to spend a settled no-delay output immediately on a\ncounterparty's commitment transaction.\n - COMMITMENT_REVOKE: A witness that allows us to sweep the settled output of a malicious\ncounterparty's who broadcasts a revoked commitment transaction.\n - HTLC_OFFERED_REVOKE: A witness that allows us to sweep an HTLC which we offered to the remote\nparty in the case that they broadcast a revoked commitment state.\n - HTLC_ACCEPTED_REVOKE: A witness that allows us to sweep an HTLC output sent to us in the case that\nthe remote party broadcasts a revoked commitment state.\n - HTLC_OFFERED_TIMEOUT_SECOND_LEVEL: A witness that allows us to sweep an HTLC output that we extended to a\nparty, but was never fulfilled. This HTLC output isn't directly on the\ncommitment transaction, but is the result of a confirmed second-level HTLC\ntransaction. As a result, we can only spend this after a CSV delay.\n - HTLC_ACCEPTED_SUCCESS_SECOND_LEVEL: A witness that allows us to sweep an HTLC output that was offered to us, and\nfor which we have a payment preimage. This HTLC output isn't directly on our\ncommitment transaction, but is the result of confirmed second-level HTLC\ntransaction. As a result, we can only spend this after a CSV delay.\n - HTLC_OFFERED_REMOTE_TIMEOUT: A witness that allows us to sweep an HTLC that we offered to the remote\nparty which lies in the commitment transaction of the remote party. We can\nspend this output after the absolute CLTV timeout of the HTLC as passed.\n - HTLC_ACCEPTED_REMOTE_SUCCESS: A witness that allows us to sweep an HTLC that was offered to us by the\nremote party. We use this witness in the case that the remote party goes to\nchain, and we know the pre-image to the HTLC. We can sweep this without any\nadditional timeout.\n - HTLC_SECOND_LEVEL_REVOKE: A witness that allows us to sweep an HTLC from the remote party's commitment\ntransaction in the case that the broadcast a revoked commitment, but then\nalso immediately attempt to go to the second level to claim the HTLC.\n - WITNESS_KEY_HASH: A witness type that allows us to spend a regular p2wkh output that's sent to\nan output which is under complete control of the backing wallet.\n - NESTED_WITNESS_KEY_HASH: A witness type that allows us to sweep an output that sends to a nested P2SH\nscript that pays to a key solely under our control.\n - COMMITMENT_ANCHOR: A witness type that allows us to spend our anchor on the commitment\ntransaction."
}
}
}