Lightning Labs

LND Wallet Kit API

LND Wallet Kit API endpoints from Lightning Labs

Finance & banking#openapi

Fork copies the collection into your workspace, without the publisher's secrets, so you can add your own key and send requests. Star saves it to your starred APIs (Account › Marketplace) and helps others find it.

Overview

LND Wallet Kit API endpoints from Lightning Labs

Endpoints 30

WalletKit

  • POSTlncli: `wallet bumpforceclosefee` BumpForceCloseFee is an endpoint that allows users to bump the fee of a channel force close. This only works for channels with option_anchors./v2/wallet/BumpForceCloseFee
  • GETlncli: `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./v2/wallet/accounts
  • POSTlncli: `wallet accounts create` XCreateAccount is an experimental API that creates a new named account within the wallet, deriving the account's keys from the wallet's master key./v2/wallet/accounts/createIn contrast to ImportAccount, which registers a watch-only account from an externally supplied extended public key, the account created here is fully owned by…
  • POSTlncli: `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 derivation path m/). This may be required by some hardware wallets for proper identification and signing./v2/wallet/accounts/importThe address type can usually be inferred from the key's version, but may be required for certain keys to map them into the proper scope. For BIP-0044 keys, an…
  • POSTNextAddr returns the next unused address within the wallet./v2/wallet/address/next
  • POSTlncli: `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 lnd wallet has to possess the private key of the address otherwise an error is returned./v2/wallet/address/signmessageThis method aims to provide full compatibility with the bitcoin-core and btcd implementation. Bitcoin-core's algorithm is not specified in a BIP and only…
  • POSTlncli: `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 it is verified that the recovered public key of the signature equals the public key of the provided address. There is no dependence on the private key of the address therefore also external addresses are allowed to verify signatures. Supported address types are P2PKH, P2WKH, NP2WKH, P2TR./v2/wallet/address/verifymessageThis method is the counterpart of the related signing method (SignMessageWithAddr) and aims to provide full compatibility to bitcoin-core's implementation.…
  • GETlncli: `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./v2/wallet/addresses
  • POSTlncli: `wallet bumpfee` BumpFee is an endpoint that allows users to interact with lnd's sweeper directly. It takes an outpoint from an unconfirmed transaction and sends it to the sweeper for potential fee bumping. Depending on whether the outpoint has been registered in the sweeper (an existing input, e.g., an anchor output) or not (a new input, e.g., an unconfirmed wallet utxo), this will either be an RBF or CPFP attempt./v2/wallet/bumpfeeWhen receiving an input, lnd’s sweeper needs to understand its time sensitivity to make economical fee bumps - internally a fee function is created using the…
  • GETlncli: `wallet estimatefeerate` EstimateFee attempts to query the internal fee estimator of the wallet to determine the fee (in sat/kw) to attach to a transaction in order to achieve the confirmation target./v2/wallet/estimatefee/:conf_target
  • POSTDeriveKey attempts to derive an arbitrary key specified by the passed KeyLocator./v2/wallet/key
  • POSTlncli: `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 the BIP-0086 style output script. Use ImportTapscript for more advanced key spend or script spend outputs./v2/wallet/key/importNOTE: Events (deposits/spends) for a key will only be detected by lnd if they happen after the import. Rescans to detect past events will be supported later on.
  • POSTDeriveNextKey attempts to derive the *next* key within the key family (account in BIP43) specified. This method should return the next external child within this branch./v2/wallet/key/next
  • POSTlncli: `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 non-witness inputs or inputs without UTXO information attached or inputs without witness data that do not belong to lnd's wallet, this method will fail. If no error is returned, the PSBT is ready to be extracted and the final TX within to be broadcast./v2/wallet/psbt/finalizeNOTE: This method does NOT publish the transaction once finalized. It is the caller's responsibility to either publish the transaction on success or…
  • POSTlncli: `wallet psbt fund` FundPsbt creates a fully populated PSBT that contains enough inputs to fund the outputs specified in the template. There are three ways a user can specify what we call the template (a list of inputs and outputs to use in the PSBT): Either as a PSBT packet directly with no coin selection (using the legacy "psbt" field), a PSBT with advanced coin selection support (using the new "coin_select" field) or as a raw RPC message (using the "raw" field). The legacy "psbt" and "raw" modes, the following restrictions apply: 1. If there are no inputs specified in the template, coin selection is performed automatically. 2. If the template does contain any inputs, it is assumed that full coin selection happened externally and no additional inputs are added. If the specified inputs aren't enough to fund the outputs with the given fee rate, an error is returned./v2/wallet/psbt/fundThe new "coin_select" mode does not have these restrictions and allows the user to specify a PSBT with inputs and outputs and still perform coin selection on…
  • POSTlncli: `wallet psbt sign` SignPsbt expects a partial transaction with all inputs and outputs fully declared and tries to sign all unsigned inputs that have all required fields (UTXO information, BIP32 derivation information, witness or sig scripts) set. If no error is returned, the PSBT is ready to be given to the next signer or to be finalized if lnd was the last signer./v2/wallet/psbt/signNOTE: This RPC only signs inputs (and only those it can sign), it does not perform any other tasks (such as coin selection, UTXO locking or input/output/fee…
  • POSTlncli: `wallet removetx` RemoveTransaction attempts to remove the provided transaction from the internal transaction store of the wallet./v2/wallet/removetx
  • GETlncli: `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./v2/wallet/reserve
  • POSTSendOutputs is similar to the existing sendmany call in Bitcoind, and allows the caller to create a transaction that sends to several outputs at once. This is ideal when wanting to batch create a set of transactions./v2/wallet/send
  • GETlncli: `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./v2/wallet/sweeps
  • GETlncli: `wallet 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 transaction./v2/wallet/sweeps/pendingNOTE: Some of the fields within PendingSweepsRequest are not guaranteed to remain supported. This is an advanced API that depends on the internals of the…
  • POSTImportTapscript imports a Taproot script and internal key and adds the resulting Taproot output key as a watch-only output script into the wallet. For BIP-0086 style Taproot keys (no root hash commitment and no script spend path) use ImportPublicKey./v2/wallet/tapscript/importNOTE: Events (deposits/spends) for a key will only be detected by lnd if they happen after the import. Rescans to detect past events will be supported later…
  • GETlncli: `wallet gettx` GetTransaction returns details for a transaction found in the wallet./v2/wallet/tx
  • POSTlncli: `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 chain./v2/wallet/tx
  • POSTlncli: `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 existing transaction label. Labels must not be empty, and cannot exceed 500 characters./v2/wallet/tx/label
  • POSTlncli: `wallet submitpackage` SubmitPackage submits a package of related transactions (topologically sorted, unconfirmed parents first and the child last) for atomic validation and acceptance. Real package submission is only performed by the bitcoind backend, via the node's submitpackage RPC, which lets a zero-fee v3/TRUC parent be accepted via its fee-paying CPFP child. The btcd backend does not support submitpackage and returns an error. A neutrino light client has no mempool and cannot atomically accept a package; as a best effort it broadcasts the transactions individually and relies on a peer's 1p1c package relay, returning an unverified result (not a package-accept verdict)./v2/wallet/tx/package
  • POSTListUnspent returns a list of all utxos spendable by the wallet with a number of confirmations between the specified minimum and maximum. By default, all utxos are listed. To list only the unconfirmed utxos, set the unconfirmed_only to true./v2/wallet/utxos
  • POSTlncli: `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`./v2/wallet/utxos/leaseSet no_expiry to reserve an unused output without a timeout. The owner must release an abandoned reservation; the first confirmed spend removes it…
  • POSTlncli: `wallet listleases` ListLeases lists all currently locked utxos./v2/wallet/utxos/leases
  • POSTlncli: `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. A retained release-after-spend lease can also be released after its spending transaction has been observed./v2/wallet/utxos/release

API details

Authentication
None declared in the description
Operations
30 operations on 29 pathsPOST 23GET 7
Main resources
WalletKit 30
Response formats
application/json
Description format
Swagger 2.0, API version version not set

How to test the LND Wallet Kit API in Swastik Codes

  1. Open the APISelect “Fork & run in Swastik Codes” on this page. Sign in or create a free account if asked.
  2. Fork it into your workspaceChoose a workspace. You get your own copy of the LND Wallet Kit API collection, without the publisher's secrets.
  3. Add your credentialsOpen the collection's variables or an environment and enter your API key or token, if the API needs one.
  4. Send a requestPick an endpoint, for example “lncli: `wallet bumpforceclosefee` BumpForceCloseFee is an endpoint that allows users to bump the fee of a channel force close. This only works for channels with option_anchors.” (POST /v2/wallet/BumpForceCloseFee), and press Send. Check the response, add tests and run the whole collection with the runner.

Frequently asked questions

What is the LND Wallet Kit API?

LND Wallet Kit API endpoints from Lightning Labs It is listed under Finance & banking and has 30 endpoints.

Who publishes the LND Wallet Kit API?

It is listed from Lightning Labs's public API description (an OpenAPI document), not published by Lightning Labs on Swastik Codes. Anyone who controls lightning.engineering can claim the profile by adding a DNS TXT record.

How do I authenticate with the LND Wallet Kit API?

Its OpenAPI description does not declare an authentication scheme. Some endpoints may be open; check the provider's documentation before relying on that.

How many endpoints does the LND Wallet Kit API have?

30 operations on 29 paths (23 POST, 7 GET). The largest groups are WalletKit.

Is forking the LND Wallet Kit API free?

Yes. Forking copies the collection into your workspace for free. It has been starred 0 times and forked 0 times.

Suggest an API

Tell us which public API is missing. We check it, then add it here with its endpoints when it has an OpenAPI (Swagger) description.