mirror of
https://github.com/lightningnetwork/lnd.git
synced 2025-02-23 14:40:30 +01:00
lnrpc: add walletrpc doc tags to enable lncli api doc generation
This commit is contained in:
parent
0759b2657c
commit
c0da9ca1b0
3 changed files with 86 additions and 34 deletions
|
@ -7,6 +7,24 @@ package walletrpc;
|
|||
|
||||
option go_package = "github.com/lightningnetwork/lnd/lnrpc/walletrpc";
|
||||
|
||||
/*
|
||||
* Comments in this file will be directly parsed into the API
|
||||
* Documentation as descriptions of the associated method, message, or field.
|
||||
* These descriptions should go right above the definition of the object, and
|
||||
* can be in either block or // comment format.
|
||||
*
|
||||
* An RPC method can be matched to an lncli command by placing a line in the
|
||||
* beginning of the description in exactly the following format:
|
||||
* lncli: `methodname`
|
||||
*
|
||||
* Failure to specify the exact name of the command will cause documentation
|
||||
* generation to fail.
|
||||
*
|
||||
* More information on how exactly the gRPC documentation is generated from
|
||||
* this proto file can be found here:
|
||||
* https://github.com/lightninglabs/lightning-api
|
||||
*/
|
||||
|
||||
// WalletKit is a service that gives access to the core functionalities of the
|
||||
// daemon's wallet.
|
||||
service WalletKit {
|
||||
|
@ -18,7 +36,7 @@ service WalletKit {
|
|||
*/
|
||||
rpc ListUnspent (ListUnspentRequest) returns (ListUnspentResponse);
|
||||
|
||||
/*
|
||||
/* lncli: `wallet leaseoutput`
|
||||
LeaseOutput locks an output to the given ID, preventing it from being
|
||||
available for any future coin selection attempts. The absolute time of the
|
||||
lock's expiration is returned. The expiration of the lock can be extended by
|
||||
|
@ -27,14 +45,14 @@ service WalletKit {
|
|||
*/
|
||||
rpc LeaseOutput (LeaseOutputRequest) returns (LeaseOutputResponse);
|
||||
|
||||
/*
|
||||
/* lncli: `wallet releaseoutput`
|
||||
ReleaseOutput unlocks an output, allowing it to be available for coin
|
||||
selection if it remains unspent. The ID should match the one used to
|
||||
originally lock the output.
|
||||
*/
|
||||
rpc ReleaseOutput (ReleaseOutputRequest) returns (ReleaseOutputResponse);
|
||||
|
||||
/*
|
||||
/* lncli: `wallet listleases`
|
||||
ListLeases lists all currently locked utxos.
|
||||
*/
|
||||
rpc ListLeases (ListLeasesRequest) returns (ListLeasesResponse);
|
||||
|
@ -57,14 +75,14 @@ service WalletKit {
|
|||
*/
|
||||
rpc NextAddr (AddrRequest) returns (AddrResponse);
|
||||
|
||||
/*
|
||||
/* lncli: `wallet accounts list`
|
||||
ListAccounts retrieves all accounts belonging to the wallet by default. A
|
||||
name and key scope filter can be provided to filter through all of the
|
||||
wallet accounts and return only those matching.
|
||||
*/
|
||||
rpc ListAccounts (ListAccountsRequest) returns (ListAccountsResponse);
|
||||
|
||||
/*
|
||||
/* lncli: `wallet requiredreserve`
|
||||
RequiredReserve returns the minimum amount of satoshis that should be kept
|
||||
in the wallet in order to fee bump anchor channels if necessary. The value
|
||||
scales with the number of public anchor channels but is capped at a maximum.
|
||||
|
@ -72,14 +90,14 @@ service WalletKit {
|
|||
rpc RequiredReserve (RequiredReserveRequest)
|
||||
returns (RequiredReserveResponse);
|
||||
|
||||
/*
|
||||
/* lncli: `wallet addresses list`
|
||||
ListAddresses retrieves all the addresses along with their balance. An
|
||||
account name filter can be provided to filter through all of the
|
||||
wallet accounts and return the addresses of only those matching.
|
||||
*/
|
||||
rpc ListAddresses (ListAddressesRequest) returns (ListAddressesResponse);
|
||||
|
||||
/*
|
||||
/* lncli: `wallet addresses signmessage`
|
||||
SignMessageWithAddr returns the compact signature (base64 encoded) created
|
||||
with the private key of the provided address. This requires the address
|
||||
to be solely based on a public key lock (no scripts). Obviously the internal
|
||||
|
@ -96,7 +114,7 @@ service WalletKit {
|
|||
rpc SignMessageWithAddr (SignMessageWithAddrRequest)
|
||||
returns (SignMessageWithAddrResponse);
|
||||
|
||||
/*
|
||||
/* lncli: `wallet addresses verifymessage`
|
||||
VerifyMessageWithAddr returns the validity and the recovered public key of
|
||||
the provided compact signature (base64 encoded). The verification is
|
||||
twofold. First the validity of the signature itself is checked and then
|
||||
|
@ -120,7 +138,7 @@ service WalletKit {
|
|||
rpc VerifyMessageWithAddr (VerifyMessageWithAddrRequest)
|
||||
returns (VerifyMessageWithAddrResponse);
|
||||
|
||||
/*
|
||||
/* lncli: `wallet accounts import`
|
||||
ImportAccount imports an account backed by an account extended public key.
|
||||
The master key fingerprint denotes the fingerprint of the root key
|
||||
corresponding to the account public key (also known as the key with
|
||||
|
@ -147,7 +165,7 @@ service WalletKit {
|
|||
*/
|
||||
rpc ImportAccount (ImportAccountRequest) returns (ImportAccountResponse);
|
||||
|
||||
/*
|
||||
/* lncli: `wallet accounts import-pubkey`
|
||||
ImportPublicKey imports a public key as watch-only into the wallet. The
|
||||
public key is converted into a simple address of the given type and that
|
||||
address script is watched on chain. For Taproot keys, this will only watch
|
||||
|
@ -177,7 +195,7 @@ service WalletKit {
|
|||
rpc ImportTapscript (ImportTapscriptRequest)
|
||||
returns (ImportTapscriptResponse);
|
||||
|
||||
/*
|
||||
/* lncli: `wallet publishtx`
|
||||
PublishTransaction attempts to publish the passed transaction to the
|
||||
network. Once this returns without an error, the wallet will continually
|
||||
attempt to re-broadcast the transaction on start up, until it enters the
|
||||
|
@ -199,7 +217,7 @@ service WalletKit {
|
|||
*/
|
||||
rpc EstimateFee (EstimateFeeRequest) returns (EstimateFeeResponse);
|
||||
|
||||
/*
|
||||
/* lncli: `pendingsweeps`
|
||||
PendingSweeps returns lists of on-chain outputs that lnd is currently
|
||||
attempting to sweep within its central batching engine. Outputs with similar
|
||||
fee rates are batched together in order to sweep them within a single
|
||||
|
@ -211,7 +229,7 @@ service WalletKit {
|
|||
*/
|
||||
rpc PendingSweeps (PendingSweepsRequest) returns (PendingSweepsResponse);
|
||||
|
||||
/*
|
||||
/* lncli: `wallet bumpfee`
|
||||
BumpFee bumps the fee of an arbitrary input within a transaction. This RPC
|
||||
takes a different approach than bitcoind's bumpfee command. lnd has a
|
||||
central batching engine in which inputs with similar fee rates are batched
|
||||
|
@ -240,14 +258,14 @@ service WalletKit {
|
|||
*/
|
||||
rpc BumpFee (BumpFeeRequest) returns (BumpFeeResponse);
|
||||
|
||||
/*
|
||||
/* lncli: `wallet listsweeps`
|
||||
ListSweeps returns a list of the sweep transactions our node has produced.
|
||||
Note that these sweeps may not be confirmed yet, as we record sweeps on
|
||||
broadcast, not confirmation.
|
||||
*/
|
||||
rpc ListSweeps (ListSweepsRequest) returns (ListSweepsResponse);
|
||||
|
||||
/*
|
||||
/* lncli: `wallet labeltx`
|
||||
LabelTransaction adds a label to a transaction. If the transaction already
|
||||
has a label the call will fail unless the overwrite bool is set. This will
|
||||
overwrite the exiting transaction label. Labels must not be empty, and
|
||||
|
@ -256,7 +274,7 @@ service WalletKit {
|
|||
rpc LabelTransaction (LabelTransactionRequest)
|
||||
returns (LabelTransactionResponse);
|
||||
|
||||
/*
|
||||
/* lncli: `wallet psbt fund`
|
||||
FundPsbt creates a fully populated PSBT that contains enough inputs to fund
|
||||
the outputs specified in the template. There are two ways of specifying a
|
||||
template: Either by passing in a PSBT with at least one output declared or
|
||||
|
@ -293,7 +311,7 @@ service WalletKit {
|
|||
*/
|
||||
rpc SignPsbt (SignPsbtRequest) returns (SignPsbtResponse);
|
||||
|
||||
/*
|
||||
/* lncli: `wallet psbt finalize`
|
||||
FinalizePsbt expects a partial transaction with all inputs and outputs fully
|
||||
declared and tries to sign all inputs that belong to the wallet. Lnd must be
|
||||
the last signer of the transaction. That means, if there are any unsigned
|
||||
|
|
|
@ -18,7 +18,7 @@
|
|||
"paths": {
|
||||
"/v2/wallet/accounts": {
|
||||
"get": {
|
||||
"summary": "ListAccounts retrieves all accounts belonging to the wallet by default. A\nname and key scope filter can be provided to filter through all of the\nwallet accounts and return only those matching.",
|
||||
"summary": "lncli: `wallet accounts list`\nListAccounts retrieves all accounts belonging to the wallet by default. A\nname and key scope filter can be provided to filter through all of the\nwallet accounts and return only those matching.",
|
||||
"operationId": "WalletKit_ListAccounts",
|
||||
"responses": {
|
||||
"200": {
|
||||
|
@ -65,7 +65,7 @@
|
|||
},
|
||||
"/v2/wallet/accounts/import": {
|
||||
"post": {
|
||||
"summary": "ImportAccount imports an account backed by an account extended public key.\nThe master key fingerprint denotes the fingerprint of the root key\ncorresponding to the account public key (also known as the key with\nderivation path m/). This may be required by some hardware wallets for\nproper identification and signing.",
|
||||
"summary": "lncli: `wallet accounts import`\nImportAccount imports an account backed by an account extended public key.\nThe master key fingerprint denotes the fingerprint of the root key\ncorresponding to the account public key (also known as the key with\nderivation path m/). This may be required by some hardware wallets for\nproper identification and signing.",
|
||||
"description": "The address type can usually be inferred from the key's version, but may be\nrequired for certain keys to map them into the proper scope.\n\nFor BIP-0044 keys, an address type must be specified as we intend to not\nsupport importing BIP-0044 keys into the wallet using the legacy\npay-to-pubkey-hash (P2PKH) scheme. A nested witness address type will force\nthe standard BIP-0049 derivation scheme, while a witness address type will\nforce the standard BIP-0084 derivation scheme.\n\nFor BIP-0049 keys, an address type must also be specified to make a\ndistinction between the standard BIP-0049 address schema (nested witness\npubkeys everywhere) and our own BIP-0049Plus address schema (nested pubkeys\nexternally, witness pubkeys internally).\n\nNOTE: Events (deposits/spends) for keys derived from an account will only be\ndetected by lnd if they happen after the import. Rescans to detect past\nevents will be supported later on.",
|
||||
"operationId": "WalletKit_ImportAccount",
|
||||
"responses": {
|
||||
|
@ -132,7 +132,7 @@
|
|||
},
|
||||
"/v2/wallet/address/signmessage": {
|
||||
"post": {
|
||||
"summary": "SignMessageWithAddr returns the compact signature (base64 encoded) created\nwith the private key of the provided address. This requires the address\nto be solely based on a public key lock (no scripts). Obviously the internal\nlnd wallet has to possess the private key of the address otherwise\nan error is returned.",
|
||||
"summary": "lncli: `wallet addresses signmessage`\nSignMessageWithAddr returns the compact signature (base64 encoded) created\nwith the private key of the provided address. This requires the address\nto be solely based on a public key lock (no scripts). Obviously the internal\nlnd wallet has to possess the private key of the address otherwise\nan error is returned.",
|
||||
"description": "This method aims to provide full compatibility with the bitcoin-core and\nbtcd implementation. Bitcoin-core's algorithm is not specified in a\nBIP and only applicable for legacy addresses. This method enhances the\nsigning for additional address types: P2WKH, NP2WKH, P2TR.\nFor P2TR addresses this represents a special case. ECDSA is used to create\na compact signature which makes the public key of the signature recoverable.",
|
||||
"operationId": "WalletKit_SignMessageWithAddr",
|
||||
"responses": {
|
||||
|
@ -166,7 +166,7 @@
|
|||
},
|
||||
"/v2/wallet/address/verifymessage": {
|
||||
"post": {
|
||||
"summary": "VerifyMessageWithAddr returns the validity and the recovered public key of\nthe provided compact signature (base64 encoded). The verification is\ntwofold. First the validity of the signature itself is checked and then\nit is verified that the recovered public key of the signature equals\nthe public key of the provided address. There is no dependence on the\nprivate key of the address therefore also external addresses are allowed\nto verify signatures.\nSupported address types are P2PKH, P2WKH, NP2WKH, P2TR.",
|
||||
"summary": "lncli: `wallet addresses verifymessage`\nVerifyMessageWithAddr returns the validity and the recovered public key of\nthe provided compact signature (base64 encoded). The verification is\ntwofold. First the validity of the signature itself is checked and then\nit is verified that the recovered public key of the signature equals\nthe public key of the provided address. There is no dependence on the\nprivate key of the address therefore also external addresses are allowed\nto verify signatures.\nSupported address types are P2PKH, P2WKH, NP2WKH, P2TR.",
|
||||
"description": "This method is the counterpart of the related signing method\n(SignMessageWithAddr) and aims to provide full compatibility to\nbitcoin-core's implementation. Although bitcoin-core/btcd only provide\nthis functionality for legacy addresses this function enhances it to\nthe address types: P2PKH, P2WKH, NP2WKH, P2TR.\n\nThe verification for P2TR addresses is a special case and requires the\nECDSA compact signature to compare the reovered public key to the internal\ntaproot key. The compact ECDSA signature format was used because there\nare still no known compact signature schemes for schnorr signatures.",
|
||||
"operationId": "WalletKit_VerifyMessageWithAddr",
|
||||
"responses": {
|
||||
|
@ -200,7 +200,7 @@
|
|||
},
|
||||
"/v2/wallet/addresses": {
|
||||
"get": {
|
||||
"summary": "ListAddresses retrieves all the addresses along with their balance. An\naccount name filter can be provided to filter through all of the\nwallet accounts and return the addresses of only those matching.",
|
||||
"summary": "lncli: `wallet addresses list`\nListAddresses retrieves all the addresses along with their balance. An\naccount name filter can be provided to filter through all of the\nwallet accounts and return the addresses of only those matching.",
|
||||
"operationId": "WalletKit_ListAddresses",
|
||||
"responses": {
|
||||
"200": {
|
||||
|
@ -239,7 +239,7 @@
|
|||
},
|
||||
"/v2/wallet/bumpfee": {
|
||||
"post": {
|
||||
"summary": "BumpFee bumps the fee of an arbitrary input within a transaction. This RPC\ntakes a different approach than bitcoind's bumpfee command. lnd has a\ncentral batching engine in which inputs with similar fee rates are batched\ntogether to save on transaction fees. Due to this, we cannot rely on\nbumping the fee on a specific transaction, since transactions can change at\nany point with the addition of new inputs. The list of inputs that\ncurrently exist within lnd's central batching engine can be retrieved\nthrough the PendingSweeps RPC.",
|
||||
"summary": "lncli: `wallet bumpfee`\nBumpFee bumps the fee of an arbitrary input within a transaction. This RPC\ntakes a different approach than bitcoind's bumpfee command. lnd has a\ncentral batching engine in which inputs with similar fee rates are batched\ntogether to save on transaction fees. Due to this, we cannot rely on\nbumping the fee on a specific transaction, since transactions can change at\nany point with the addition of new inputs. The list of inputs that\ncurrently exist within lnd's central batching engine can be retrieved\nthrough the PendingSweeps RPC.",
|
||||
"description": "When bumping the fee of an input that currently exists within lnd's central\nbatching engine, a higher fee transaction will be created that replaces the\nlower fee transaction through the Replace-By-Fee (RBF) policy. If it\n\nThis RPC also serves useful when wanting to perform a Child-Pays-For-Parent\n(CPFP), where the child transaction pays for its parent's fee. This can be\ndone by specifying an outpoint within the low fee transaction that is under\nthe control of the wallet.\n\nThe fee preference can be expressed either as a specific fee rate or a delta\nof blocks in which the output should be swept on-chain within. If a fee\npreference is not explicitly specified, then an error is returned.\n\nNote that this RPC currently doesn't perform any validation checks on the\nfee preference being provided. For now, the responsibility of ensuring that\nthe new fee preference is sufficient is delegated to the user.",
|
||||
"operationId": "WalletKit_BumpFee",
|
||||
"responses": {
|
||||
|
@ -339,7 +339,7 @@
|
|||
},
|
||||
"/v2/wallet/key/import": {
|
||||
"post": {
|
||||
"summary": "ImportPublicKey imports a public key as watch-only into the wallet. The\npublic key is converted into a simple address of the given type and that\naddress script is watched on chain. For Taproot keys, this will only watch\nthe BIP-0086 style output script. Use ImportTapscript for more advanced key\nspend or script spend outputs.",
|
||||
"summary": "lncli: `wallet accounts import-pubkey`\nImportPublicKey imports a public key as watch-only into the wallet. The\npublic key is converted into a simple address of the given type and that\naddress script is watched on chain. For Taproot keys, this will only watch\nthe BIP-0086 style output script. Use ImportTapscript for more advanced key\nspend or script spend outputs.",
|
||||
"description": "NOTE: Events (deposits/spends) for a key will only be detected by lnd if\nthey happen after the import. Rescans to detect past events will be\nsupported later on.",
|
||||
"operationId": "WalletKit_ImportPublicKey",
|
||||
"responses": {
|
||||
|
@ -406,7 +406,7 @@
|
|||
},
|
||||
"/v2/wallet/psbt/finalize": {
|
||||
"post": {
|
||||
"summary": "FinalizePsbt expects a partial transaction with all inputs and outputs fully\ndeclared and tries to sign all inputs that belong to the wallet. Lnd must be\nthe last signer of the transaction. That means, if there are any unsigned\nnon-witness inputs or inputs without UTXO information attached or inputs\nwithout witness data that do not belong to lnd's wallet, this method will\nfail. If no error is returned, the PSBT is ready to be extracted and the\nfinal TX within to be broadcast.",
|
||||
"summary": "lncli: `wallet psbt finalize`\nFinalizePsbt expects a partial transaction with all inputs and outputs fully\ndeclared and tries to sign all inputs that belong to the wallet. Lnd must be\nthe last signer of the transaction. That means, if there are any unsigned\nnon-witness inputs or inputs without UTXO information attached or inputs\nwithout witness data that do not belong to lnd's wallet, this method will\nfail. If no error is returned, the PSBT is ready to be extracted and the\nfinal TX within to be broadcast.",
|
||||
"description": "NOTE: This method does NOT publish the transaction once finalized. It is the\ncaller's responsibility to either publish the transaction on success or\nunlock/release any locked UTXOs in case of an error in this method.",
|
||||
"operationId": "WalletKit_FinalizePsbt",
|
||||
"responses": {
|
||||
|
@ -440,7 +440,7 @@
|
|||
},
|
||||
"/v2/wallet/psbt/fund": {
|
||||
"post": {
|
||||
"summary": "FundPsbt creates a fully populated PSBT that contains enough inputs to fund\nthe outputs specified in the template. There are two ways of specifying a\ntemplate: Either by passing in a PSBT with at least one output declared or\nby passing in a raw TxTemplate message.",
|
||||
"summary": "lncli: `wallet psbt fund`\nFundPsbt creates a fully populated PSBT that contains enough inputs to fund\nthe outputs specified in the template. There are two ways of specifying a\ntemplate: Either by passing in a PSBT with at least one output declared or\nby passing in a raw TxTemplate message.",
|
||||
"description": "If there are no inputs specified in the template, coin selection is\nperformed automatically. If the template does contain any inputs, it is\nassumed that full coin selection happened externally and no additional\ninputs are added. If the specified inputs aren't enough to fund the outputs\nwith the given fee rate, an error is returned.\n\nAfter either selecting or verifying the inputs, all input UTXOs are locked\nwith an internal app ID.\n\nNOTE: If this method returns without an error, it is the caller's\nresponsibility to either spend the locked UTXOs (by finalizing and then\npublishing the transaction) or to unlock/release the locked UTXOs in case of\nan error on the caller's side.",
|
||||
"operationId": "WalletKit_FundPsbt",
|
||||
"responses": {
|
||||
|
@ -508,7 +508,7 @@
|
|||
},
|
||||
"/v2/wallet/reserve": {
|
||||
"get": {
|
||||
"summary": "RequiredReserve returns the minimum amount of satoshis that should be kept\nin the wallet in order to fee bump anchor channels if necessary. The value\nscales with the number of public anchor channels but is capped at a maximum.",
|
||||
"summary": "lncli: `wallet requiredreserve`\nRequiredReserve returns the minimum amount of satoshis that should be kept\nin the wallet in order to fee bump anchor channels if necessary. The value\nscales with the number of public anchor channels but is capped at a maximum.",
|
||||
"operationId": "WalletKit_RequiredReserve",
|
||||
"responses": {
|
||||
"200": {
|
||||
|
@ -574,7 +574,7 @@
|
|||
},
|
||||
"/v2/wallet/sweeps": {
|
||||
"get": {
|
||||
"summary": "ListSweeps returns a list of the sweep transactions our node has produced.\nNote that these sweeps may not be confirmed yet, as we record sweeps on\nbroadcast, not confirmation.",
|
||||
"summary": "lncli: `wallet listsweeps`\nListSweeps returns a list of the sweep transactions our node has produced.\nNote that these sweeps may not be confirmed yet, as we record sweeps on\nbroadcast, not confirmation.",
|
||||
"operationId": "WalletKit_ListSweeps",
|
||||
"responses": {
|
||||
"200": {
|
||||
|
@ -606,7 +606,7 @@
|
|||
},
|
||||
"/v2/wallet/sweeps/pending": {
|
||||
"get": {
|
||||
"summary": "PendingSweeps returns lists of on-chain outputs that lnd is currently\nattempting to sweep within its central batching engine. Outputs with similar\nfee rates are batched together in order to sweep them within a single\ntransaction.",
|
||||
"summary": "lncli: `pendingsweeps`\nPendingSweeps returns lists of on-chain outputs that lnd is currently\nattempting to sweep within its central batching engine. Outputs with similar\nfee rates are batched together in order to sweep them within a single\ntransaction.",
|
||||
"description": "NOTE: Some of the fields within PendingSweepsRequest are not guaranteed to\nremain supported. This is an advanced API that depends on the internals of\nthe UtxoSweeper, so things may change.",
|
||||
"operationId": "WalletKit_PendingSweeps",
|
||||
"responses": {
|
||||
|
@ -664,7 +664,7 @@
|
|||
},
|
||||
"/v2/wallet/tx": {
|
||||
"post": {
|
||||
"summary": "PublishTransaction attempts to publish the passed transaction to the\nnetwork. Once this returns without an error, the wallet will continually\nattempt to re-broadcast the transaction on start up, until it enters the\nchain.",
|
||||
"summary": "lncli: `wallet publishtx`\nPublishTransaction attempts to publish the passed transaction to the\nnetwork. Once this returns without an error, the wallet will continually\nattempt to re-broadcast the transaction on start up, until it enters the\nchain.",
|
||||
"operationId": "WalletKit_PublishTransaction",
|
||||
"responses": {
|
||||
"200": {
|
||||
|
@ -697,7 +697,7 @@
|
|||
},
|
||||
"/v2/wallet/tx/label": {
|
||||
"post": {
|
||||
"summary": "LabelTransaction adds a label to a transaction. If the transaction already\nhas a label the call will fail unless the overwrite bool is set. This will\noverwrite the exiting transaction label. Labels must not be empty, and\ncannot exceed 500 characters.",
|
||||
"summary": "lncli: `wallet labeltx`\nLabelTransaction adds a label to a transaction. If the transaction already\nhas a label the call will fail unless the overwrite bool is set. This will\noverwrite the exiting transaction label. Labels must not be empty, and\ncannot exceed 500 characters.",
|
||||
"operationId": "WalletKit_LabelTransaction",
|
||||
"responses": {
|
||||
"200": {
|
||||
|
@ -763,7 +763,7 @@
|
|||
},
|
||||
"/v2/wallet/utxos/lease": {
|
||||
"post": {
|
||||
"summary": "LeaseOutput locks an output to the given ID, preventing it from being\navailable for any future coin selection attempts. The absolute time of the\nlock's expiration is returned. The expiration of the lock can be extended by\nsuccessive invocations of this RPC. Outputs can be unlocked before their\nexpiration through `ReleaseOutput`.",
|
||||
"summary": "lncli: `wallet leaseoutput`\nLeaseOutput locks an output to the given ID, preventing it from being\navailable for any future coin selection attempts. The absolute time of the\nlock's expiration is returned. The expiration of the lock can be extended by\nsuccessive invocations of this RPC. Outputs can be unlocked before their\nexpiration through `ReleaseOutput`.",
|
||||
"operationId": "WalletKit_LeaseOutput",
|
||||
"responses": {
|
||||
"200": {
|
||||
|
@ -796,7 +796,7 @@
|
|||
},
|
||||
"/v2/wallet/utxos/leases": {
|
||||
"post": {
|
||||
"summary": "ListLeases lists all currently locked utxos.",
|
||||
"summary": "lncli: `wallet listleases`\nListLeases lists all currently locked utxos.",
|
||||
"operationId": "WalletKit_ListLeases",
|
||||
"responses": {
|
||||
"200": {
|
||||
|
@ -819,7 +819,7 @@
|
|||
},
|
||||
"/v2/wallet/utxos/release": {
|
||||
"post": {
|
||||
"summary": "ReleaseOutput unlocks an output, allowing it to be available for coin\nselection if it remains unspent. The ID should match the one used to\noriginally lock the output.",
|
||||
"summary": "lncli: `wallet releaseoutput`\nReleaseOutput unlocks an output, allowing it to be available for coin\nselection if it remains unspent. The ID should match the one used to\noriginally lock the output.",
|
||||
"operationId": "WalletKit_ReleaseOutput",
|
||||
"responses": {
|
||||
"200": {
|
||||
|
|
|
@ -24,16 +24,19 @@ type WalletKitClient interface {
|
|||
// default, all utxos are listed. To list only the unconfirmed utxos, set
|
||||
// the unconfirmed_only to true.
|
||||
ListUnspent(ctx context.Context, in *ListUnspentRequest, opts ...grpc.CallOption) (*ListUnspentResponse, error)
|
||||
// lncli: `wallet leaseoutput`
|
||||
// LeaseOutput locks an output to the given ID, preventing it from being
|
||||
// available for any future coin selection attempts. The absolute time of the
|
||||
// lock's expiration is returned. The expiration of the lock can be extended by
|
||||
// successive invocations of this RPC. Outputs can be unlocked before their
|
||||
// expiration through `ReleaseOutput`.
|
||||
LeaseOutput(ctx context.Context, in *LeaseOutputRequest, opts ...grpc.CallOption) (*LeaseOutputResponse, error)
|
||||
// lncli: `wallet releaseoutput`
|
||||
// ReleaseOutput unlocks an output, allowing it to be available for coin
|
||||
// selection if it remains unspent. The ID should match the one used to
|
||||
// originally lock the output.
|
||||
ReleaseOutput(ctx context.Context, in *ReleaseOutputRequest, opts ...grpc.CallOption) (*ReleaseOutputResponse, error)
|
||||
// lncli: `wallet listleases`
|
||||
// ListLeases lists all currently locked utxos.
|
||||
ListLeases(ctx context.Context, in *ListLeasesRequest, opts ...grpc.CallOption) (*ListLeasesResponse, error)
|
||||
// DeriveNextKey attempts to derive the *next* key within the key family
|
||||
|
@ -45,18 +48,22 @@ type WalletKitClient interface {
|
|||
DeriveKey(ctx context.Context, in *signrpc.KeyLocator, opts ...grpc.CallOption) (*signrpc.KeyDescriptor, error)
|
||||
// NextAddr returns the next unused address within the wallet.
|
||||
NextAddr(ctx context.Context, in *AddrRequest, opts ...grpc.CallOption) (*AddrResponse, error)
|
||||
// lncli: `wallet accounts list`
|
||||
// ListAccounts retrieves all accounts belonging to the wallet by default. A
|
||||
// name and key scope filter can be provided to filter through all of the
|
||||
// wallet accounts and return only those matching.
|
||||
ListAccounts(ctx context.Context, in *ListAccountsRequest, opts ...grpc.CallOption) (*ListAccountsResponse, error)
|
||||
// lncli: `wallet requiredreserve`
|
||||
// RequiredReserve returns the minimum amount of satoshis that should be kept
|
||||
// in the wallet in order to fee bump anchor channels if necessary. The value
|
||||
// scales with the number of public anchor channels but is capped at a maximum.
|
||||
RequiredReserve(ctx context.Context, in *RequiredReserveRequest, opts ...grpc.CallOption) (*RequiredReserveResponse, error)
|
||||
// lncli: `wallet addresses list`
|
||||
// ListAddresses retrieves all the addresses along with their balance. An
|
||||
// account name filter can be provided to filter through all of the
|
||||
// wallet accounts and return the addresses of only those matching.
|
||||
ListAddresses(ctx context.Context, in *ListAddressesRequest, opts ...grpc.CallOption) (*ListAddressesResponse, error)
|
||||
// lncli: `wallet addresses signmessage`
|
||||
// SignMessageWithAddr returns the compact signature (base64 encoded) created
|
||||
// with the private key of the provided address. This requires the address
|
||||
// to be solely based on a public key lock (no scripts). Obviously the internal
|
||||
|
@ -70,6 +77,7 @@ type WalletKitClient interface {
|
|||
// For P2TR addresses this represents a special case. ECDSA is used to create
|
||||
// a compact signature which makes the public key of the signature recoverable.
|
||||
SignMessageWithAddr(ctx context.Context, in *SignMessageWithAddrRequest, opts ...grpc.CallOption) (*SignMessageWithAddrResponse, error)
|
||||
// lncli: `wallet addresses verifymessage`
|
||||
// VerifyMessageWithAddr returns the validity and the recovered public key of
|
||||
// the provided compact signature (base64 encoded). The verification is
|
||||
// twofold. First the validity of the signature itself is checked and then
|
||||
|
@ -90,6 +98,7 @@ type WalletKitClient interface {
|
|||
// taproot key. The compact ECDSA signature format was used because there
|
||||
// are still no known compact signature schemes for schnorr signatures.
|
||||
VerifyMessageWithAddr(ctx context.Context, in *VerifyMessageWithAddrRequest, opts ...grpc.CallOption) (*VerifyMessageWithAddrResponse, error)
|
||||
// lncli: `wallet accounts import`
|
||||
// ImportAccount imports an account backed by an account extended public key.
|
||||
// The master key fingerprint denotes the fingerprint of the root key
|
||||
// corresponding to the account public key (also known as the key with
|
||||
|
@ -114,6 +123,7 @@ type WalletKitClient interface {
|
|||
// detected by lnd if they happen after the import. Rescans to detect past
|
||||
// events will be supported later on.
|
||||
ImportAccount(ctx context.Context, in *ImportAccountRequest, opts ...grpc.CallOption) (*ImportAccountResponse, error)
|
||||
// lncli: `wallet accounts import-pubkey`
|
||||
// ImportPublicKey imports a public key as watch-only into the wallet. The
|
||||
// public key is converted into a simple address of the given type and that
|
||||
// address script is watched on chain. For Taproot keys, this will only watch
|
||||
|
@ -136,6 +146,7 @@ type WalletKitClient interface {
|
|||
// NOTE: Taproot keys imported through this RPC currently _cannot_ be used for
|
||||
// funding PSBTs. Only tracking the balance and UTXOs is currently supported.
|
||||
ImportTapscript(ctx context.Context, in *ImportTapscriptRequest, opts ...grpc.CallOption) (*ImportTapscriptResponse, error)
|
||||
// lncli: `wallet publishtx`
|
||||
// PublishTransaction attempts to publish the passed transaction to the
|
||||
// network. Once this returns without an error, the wallet will continually
|
||||
// attempt to re-broadcast the transaction on start up, until it enters the
|
||||
|
@ -149,6 +160,7 @@ type WalletKitClient interface {
|
|||
// determine the fee (in sat/kw) to attach to a transaction in order to
|
||||
// achieve the confirmation target.
|
||||
EstimateFee(ctx context.Context, in *EstimateFeeRequest, opts ...grpc.CallOption) (*EstimateFeeResponse, error)
|
||||
// lncli: `pendingsweeps`
|
||||
// PendingSweeps returns lists of on-chain outputs that lnd is currently
|
||||
// attempting to sweep within its central batching engine. Outputs with similar
|
||||
// fee rates are batched together in order to sweep them within a single
|
||||
|
@ -158,6 +170,7 @@ type WalletKitClient interface {
|
|||
// remain supported. This is an advanced API that depends on the internals of
|
||||
// the UtxoSweeper, so things may change.
|
||||
PendingSweeps(ctx context.Context, in *PendingSweepsRequest, opts ...grpc.CallOption) (*PendingSweepsResponse, error)
|
||||
// lncli: `wallet bumpfee`
|
||||
// BumpFee bumps the fee of an arbitrary input within a transaction. This RPC
|
||||
// takes a different approach than bitcoind's bumpfee command. lnd has a
|
||||
// central batching engine in which inputs with similar fee rates are batched
|
||||
|
@ -184,15 +197,18 @@ type WalletKitClient interface {
|
|||
// fee preference being provided. For now, the responsibility of ensuring that
|
||||
// the new fee preference is sufficient is delegated to the user.
|
||||
BumpFee(ctx context.Context, in *BumpFeeRequest, opts ...grpc.CallOption) (*BumpFeeResponse, error)
|
||||
// lncli: `wallet listsweeps`
|
||||
// ListSweeps returns a list of the sweep transactions our node has produced.
|
||||
// Note that these sweeps may not be confirmed yet, as we record sweeps on
|
||||
// broadcast, not confirmation.
|
||||
ListSweeps(ctx context.Context, in *ListSweepsRequest, opts ...grpc.CallOption) (*ListSweepsResponse, error)
|
||||
// lncli: `wallet labeltx`
|
||||
// LabelTransaction adds a label to a transaction. If the transaction already
|
||||
// has a label the call will fail unless the overwrite bool is set. This will
|
||||
// overwrite the exiting transaction label. Labels must not be empty, and
|
||||
// cannot exceed 500 characters.
|
||||
LabelTransaction(ctx context.Context, in *LabelTransactionRequest, opts ...grpc.CallOption) (*LabelTransactionResponse, error)
|
||||
// lncli: `wallet psbt fund`
|
||||
// FundPsbt creates a fully populated PSBT that contains enough inputs to fund
|
||||
// the outputs specified in the template. There are two ways of specifying a
|
||||
// template: Either by passing in a PSBT with at least one output declared or
|
||||
|
@ -224,6 +240,7 @@ type WalletKitClient interface {
|
|||
// input/output/fee value validation, PSBT finalization). Any input that is
|
||||
// incomplete will be skipped.
|
||||
SignPsbt(ctx context.Context, in *SignPsbtRequest, opts ...grpc.CallOption) (*SignPsbtResponse, error)
|
||||
// lncli: `wallet psbt finalize`
|
||||
// FinalizePsbt expects a partial transaction with all inputs and outputs fully
|
||||
// declared and tries to sign all inputs that belong to the wallet. Lnd must be
|
||||
// the last signer of the transaction. That means, if there are any unsigned
|
||||
|
@ -480,16 +497,19 @@ type WalletKitServer interface {
|
|||
// default, all utxos are listed. To list only the unconfirmed utxos, set
|
||||
// the unconfirmed_only to true.
|
||||
ListUnspent(context.Context, *ListUnspentRequest) (*ListUnspentResponse, error)
|
||||
// lncli: `wallet leaseoutput`
|
||||
// LeaseOutput locks an output to the given ID, preventing it from being
|
||||
// available for any future coin selection attempts. The absolute time of the
|
||||
// lock's expiration is returned. The expiration of the lock can be extended by
|
||||
// successive invocations of this RPC. Outputs can be unlocked before their
|
||||
// expiration through `ReleaseOutput`.
|
||||
LeaseOutput(context.Context, *LeaseOutputRequest) (*LeaseOutputResponse, error)
|
||||
// lncli: `wallet releaseoutput`
|
||||
// ReleaseOutput unlocks an output, allowing it to be available for coin
|
||||
// selection if it remains unspent. The ID should match the one used to
|
||||
// originally lock the output.
|
||||
ReleaseOutput(context.Context, *ReleaseOutputRequest) (*ReleaseOutputResponse, error)
|
||||
// lncli: `wallet listleases`
|
||||
// ListLeases lists all currently locked utxos.
|
||||
ListLeases(context.Context, *ListLeasesRequest) (*ListLeasesResponse, error)
|
||||
// DeriveNextKey attempts to derive the *next* key within the key family
|
||||
|
@ -501,18 +521,22 @@ type WalletKitServer interface {
|
|||
DeriveKey(context.Context, *signrpc.KeyLocator) (*signrpc.KeyDescriptor, error)
|
||||
// NextAddr returns the next unused address within the wallet.
|
||||
NextAddr(context.Context, *AddrRequest) (*AddrResponse, error)
|
||||
// lncli: `wallet accounts list`
|
||||
// ListAccounts retrieves all accounts belonging to the wallet by default. A
|
||||
// name and key scope filter can be provided to filter through all of the
|
||||
// wallet accounts and return only those matching.
|
||||
ListAccounts(context.Context, *ListAccountsRequest) (*ListAccountsResponse, error)
|
||||
// lncli: `wallet requiredreserve`
|
||||
// RequiredReserve returns the minimum amount of satoshis that should be kept
|
||||
// in the wallet in order to fee bump anchor channels if necessary. The value
|
||||
// scales with the number of public anchor channels but is capped at a maximum.
|
||||
RequiredReserve(context.Context, *RequiredReserveRequest) (*RequiredReserveResponse, error)
|
||||
// lncli: `wallet addresses list`
|
||||
// ListAddresses retrieves all the addresses along with their balance. An
|
||||
// account name filter can be provided to filter through all of the
|
||||
// wallet accounts and return the addresses of only those matching.
|
||||
ListAddresses(context.Context, *ListAddressesRequest) (*ListAddressesResponse, error)
|
||||
// lncli: `wallet addresses signmessage`
|
||||
// SignMessageWithAddr returns the compact signature (base64 encoded) created
|
||||
// with the private key of the provided address. This requires the address
|
||||
// to be solely based on a public key lock (no scripts). Obviously the internal
|
||||
|
@ -526,6 +550,7 @@ type WalletKitServer interface {
|
|||
// For P2TR addresses this represents a special case. ECDSA is used to create
|
||||
// a compact signature which makes the public key of the signature recoverable.
|
||||
SignMessageWithAddr(context.Context, *SignMessageWithAddrRequest) (*SignMessageWithAddrResponse, error)
|
||||
// lncli: `wallet addresses verifymessage`
|
||||
// VerifyMessageWithAddr returns the validity and the recovered public key of
|
||||
// the provided compact signature (base64 encoded). The verification is
|
||||
// twofold. First the validity of the signature itself is checked and then
|
||||
|
@ -546,6 +571,7 @@ type WalletKitServer interface {
|
|||
// taproot key. The compact ECDSA signature format was used because there
|
||||
// are still no known compact signature schemes for schnorr signatures.
|
||||
VerifyMessageWithAddr(context.Context, *VerifyMessageWithAddrRequest) (*VerifyMessageWithAddrResponse, error)
|
||||
// lncli: `wallet accounts import`
|
||||
// ImportAccount imports an account backed by an account extended public key.
|
||||
// The master key fingerprint denotes the fingerprint of the root key
|
||||
// corresponding to the account public key (also known as the key with
|
||||
|
@ -570,6 +596,7 @@ type WalletKitServer interface {
|
|||
// detected by lnd if they happen after the import. Rescans to detect past
|
||||
// events will be supported later on.
|
||||
ImportAccount(context.Context, *ImportAccountRequest) (*ImportAccountResponse, error)
|
||||
// lncli: `wallet accounts import-pubkey`
|
||||
// ImportPublicKey imports a public key as watch-only into the wallet. The
|
||||
// public key is converted into a simple address of the given type and that
|
||||
// address script is watched on chain. For Taproot keys, this will only watch
|
||||
|
@ -592,6 +619,7 @@ type WalletKitServer interface {
|
|||
// NOTE: Taproot keys imported through this RPC currently _cannot_ be used for
|
||||
// funding PSBTs. Only tracking the balance and UTXOs is currently supported.
|
||||
ImportTapscript(context.Context, *ImportTapscriptRequest) (*ImportTapscriptResponse, error)
|
||||
// lncli: `wallet publishtx`
|
||||
// PublishTransaction attempts to publish the passed transaction to the
|
||||
// network. Once this returns without an error, the wallet will continually
|
||||
// attempt to re-broadcast the transaction on start up, until it enters the
|
||||
|
@ -605,6 +633,7 @@ type WalletKitServer interface {
|
|||
// determine the fee (in sat/kw) to attach to a transaction in order to
|
||||
// achieve the confirmation target.
|
||||
EstimateFee(context.Context, *EstimateFeeRequest) (*EstimateFeeResponse, error)
|
||||
// lncli: `pendingsweeps`
|
||||
// PendingSweeps returns lists of on-chain outputs that lnd is currently
|
||||
// attempting to sweep within its central batching engine. Outputs with similar
|
||||
// fee rates are batched together in order to sweep them within a single
|
||||
|
@ -614,6 +643,7 @@ type WalletKitServer interface {
|
|||
// remain supported. This is an advanced API that depends on the internals of
|
||||
// the UtxoSweeper, so things may change.
|
||||
PendingSweeps(context.Context, *PendingSweepsRequest) (*PendingSweepsResponse, error)
|
||||
// lncli: `wallet bumpfee`
|
||||
// BumpFee bumps the fee of an arbitrary input within a transaction. This RPC
|
||||
// takes a different approach than bitcoind's bumpfee command. lnd has a
|
||||
// central batching engine in which inputs with similar fee rates are batched
|
||||
|
@ -640,15 +670,18 @@ type WalletKitServer interface {
|
|||
// fee preference being provided. For now, the responsibility of ensuring that
|
||||
// the new fee preference is sufficient is delegated to the user.
|
||||
BumpFee(context.Context, *BumpFeeRequest) (*BumpFeeResponse, error)
|
||||
// lncli: `wallet listsweeps`
|
||||
// ListSweeps returns a list of the sweep transactions our node has produced.
|
||||
// Note that these sweeps may not be confirmed yet, as we record sweeps on
|
||||
// broadcast, not confirmation.
|
||||
ListSweeps(context.Context, *ListSweepsRequest) (*ListSweepsResponse, error)
|
||||
// lncli: `wallet labeltx`
|
||||
// LabelTransaction adds a label to a transaction. If the transaction already
|
||||
// has a label the call will fail unless the overwrite bool is set. This will
|
||||
// overwrite the exiting transaction label. Labels must not be empty, and
|
||||
// cannot exceed 500 characters.
|
||||
LabelTransaction(context.Context, *LabelTransactionRequest) (*LabelTransactionResponse, error)
|
||||
// lncli: `wallet psbt fund`
|
||||
// FundPsbt creates a fully populated PSBT that contains enough inputs to fund
|
||||
// the outputs specified in the template. There are two ways of specifying a
|
||||
// template: Either by passing in a PSBT with at least one output declared or
|
||||
|
@ -680,6 +713,7 @@ type WalletKitServer interface {
|
|||
// input/output/fee value validation, PSBT finalization). Any input that is
|
||||
// incomplete will be skipped.
|
||||
SignPsbt(context.Context, *SignPsbtRequest) (*SignPsbtResponse, error)
|
||||
// lncli: `wallet psbt finalize`
|
||||
// FinalizePsbt expects a partial transaction with all inputs and outputs fully
|
||||
// declared and tries to sign all inputs that belong to the wallet. Lnd must be
|
||||
// the last signer of the transaction. That means, if there are any unsigned
|
||||
|
|
Loading…
Add table
Reference in a new issue