🤖gRPC API
This page was automatically generated.
Paths for the REST proxy of the gRPC interface can be found here.
boltzrpc.Boltz
Methods
GetInfo
Gets general information about the daemon like the chain of the lightning node it is connected to and the IDs of pending swaps.
Request | Response |
---|---|
GetServiceInfo
Fetches the latest limits and fees from the Boltz backend API it is connected to.
Request | Response |
---|---|
GetPairInfo
Fetches information about a specific pair for a chain swap.
Request | Response |
---|---|
GetPairs
Fetches all available pairs for submarine and reverse swaps.
Request | Response |
---|---|
ListSwaps
Returns a list of all swaps, reverse swaps, and chain swaps in the database.
Request | Response |
---|---|
GetStats
Returns stats of all swaps, reverse swaps, and chain swaps in the database.
Request | Response |
---|---|
RefundSwap
Refund a failed swap manually. This is only required when no refund address has been set and the swap does not have an associated wallet.
Request | Response |
---|---|
ClaimSwaps
Claim swaps manually. This is only required when no claim address has been set and the swap does not have an associated wallet.
Request | Response |
---|---|
GetSwapInfo
Gets all available information about a swap from the database.
Request | Response |
---|---|
GetSwapInfoStream
Returns the entire history of the swap if is still pending and streams updates in real time. If the swap id is empty or "*" updates for all swaps will be streamed.
Request | Response |
---|---|
|
Deposit
This is a wrapper for channel creation swaps. The daemon only returns the ID, timeout block height and lockup address. The Boltz backend takes care of the rest. When an amount of onchain coins that is in the limits is sent to the address before the timeout block height, the daemon creates a new lightning invoice, sends it to the Boltz backend which will try to pay it and if that is not possible, create a new channel to make the swap succeed.
Request | Response |
---|---|
CreateSwap
Creates a new swap from onchain to lightning.
Request | Response |
---|---|
CreateChannel
Create a new swap from onchain to a new lightning channel. The daemon will only accept the invoice payment if the HTLCs is coming trough a new channel channel opened by Boltz.
Request | Response |
---|---|
CreateReverseSwap
Creates a new reverse swap from lightning to onchain. If accept_zero_conf
is set to true in the request, the daemon will not wait until the lockup transaction from Boltz is confirmed in a block, but will claim it instantly.
Request | Response |
---|---|
CreateChainSwap
Creates a new chain swap from one chain to another. If accept_zero_conf
is set to true in the request, the daemon will not wait until the lockup transaction from Boltz is confirmed in a block, but will claim it instantly.
Request | Response |
---|---|
CreateWallet
Creates a new liquid wallet and returns the mnemonic.
Request | Response |
---|---|
ImportWallet
Imports an existing wallet.
Request | Response |
---|---|
SetSubaccount
Sets the subaccount of a wallet. Not supported for readonly wallets.
Request | Response |
---|---|
GetSubaccounts
Returns all subaccounts for a given wallet. Not supported for readonly wallets.
Request | Response |
---|---|
GetWallets
Returns all available wallets.
Request | Response |
---|---|
GetWallet
Returns the current balance and subaccount of a wallet.
Request | Response |
---|---|
GetWalletSendFee
Calculates the fee for an equivalent WalletSend
request. If address
is left empty, a dummy swap address will be used, allowing for a fee estimation of a swap lockup transaction.
Request | Response |
---|---|
ListWalletTransactions
Returns recent transactions from a wallet.
Request | Response |
---|---|
GetWalletCredentials
Returns the credentials of a wallet. The password will be required if the wallet is encrypted.
Request | Response |
---|---|
RemoveWallet
Removes a wallet.
Request | Response |
---|---|
WalletSend
Send coins from a wallet. Only the confirmed balance can be spent.
Request | Response |
---|---|
WalletReceive
Get a new address of the wallet.
Request | Response |
---|---|
Stop
Gracefully stops the daemon.
Request | Response |
---|---|
Unlock
Unlocks the server. This will be required on startup if there are any encrypted wallets.
Request | Response |
---|---|
VerifyWalletPassword
Check if the password is correct.
Request | Response |
---|---|
ChangeWalletPassword
Changes the password for wallet encryption.
Request | Response |
---|---|
CreateTenant
Creates a new tenant which can be used to bake restricted macaroons.
Request | Response |
---|---|
ListTenants
Returns all tenants.
Request | Response |
---|---|
GetTenant
Get a specifiy tenant.
Request | Response |
---|---|
BakeMacaroon
Bakes a new macaroon with the specified permissions. The macaroon can also be restricted to a specific tenant. In this case, - any swap or wallet created with the returned macaroon will belong to this tenant and can not be accessed by other tenants. - the lightning node connected to the daemon can not be used to pay or create invoices for swaps.
Request | Response |
---|---|
Messages
AnySwapInfo
Field | Type | Label | Description |
---|---|---|---|
| |||
| |||
| |||
| |||
| optional | ||
| |||
| The expected amount to be sent to the lockup address for submarine and chain swaps and the invoice amount for reverse swaps. | ||
|
| ||
| |||
| optional | ||
| optional | inclues the routing fee for reverse swaps | |
| |||
|
BakeMacaroonRequest
Field | Type | Label | Description |
---|---|---|---|
| optional | ||
| repeated |
BakeMacaroonResponse
Field | Type | Label | Description |
---|---|---|---|
|
Balance
BlockHeights
Budget
ChainSwapData
Field | Type | Label | Description |
---|---|---|---|
| |||
| |||
| |||
| |||
| |||
| |||
| optional | ||
| optional | ||
| optional | ||
| optional | ||
| optional | ||
|
ChainSwapInfo
Field | Type | Label | Description |
---|---|---|---|
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| optional | ||
| |||
| optional | ||
| |||
| |||
| |||
|
ChangeWalletPasswordRequest
ChannelCreationInfo
Channel creations are an optional extension to a submarine swap in the data types of boltz-client.
Field | Type | Label | Description |
---|---|---|---|
| ID of the swap to which this channel channel belongs | ||
| |||
| |||
| |||
| |||
|
ChannelId
ClaimSwapsRequest
ClaimSwapsResponse
Field | Type | Label | Description |
---|---|---|---|
|
CombinedChannelSwapInfo
Field | Type | Label | Description |
---|---|---|---|
| |||
|
CreateChainSwapRequest
Field | Type | Label | Description |
---|---|---|---|
| optional | Amount of satoshis to swap. It is the amount expected to be sent to the lockup address. If left empty, any amount within the limits will be accepted. | |
| |||
| optional | Address where funds will be swept to if the swap succeeds | |
| optional | Address where the coins should be refunded to if the swap fails. | |
| optional | Wallet from which the swap should be paid from. Ignored if | |
| optional | Wallet where the the funds will go if the swap succeeds. | |
| optional | Whether the daemon should broadcast the claim transaction immediately after the lockup transaction is in the mempool. Should only be used for smaller amounts as it involves trust in Boltz. | |
| optional | If set, the daemon will not pay the swap from an internal wallet. | |
| optional | Boltz does not accept 0-conf for Liquid transactions with a fee of 0.01 sat/vByte; when | |
| optional | Fee rate to use when sending from internal wallet | |
| optional | Rates to accept for the swap. Queries latest from boltz otherwise The recommended way to use this is to pass a user approved value from a previous |
CreateChannelRequest
Field | Type | Label | Description |
---|---|---|---|
| |||
| Percentage of inbound liquidity the channel that is opened should have. 25 by default. | ||
|
CreateReverseSwapRequest
Field | Type | Label | Description |
---|---|---|---|
| amount of satoshis to swap | ||
| If no value is set, the daemon will query a new address from the lightning node | ||
| Whether the daemon should broadcast the claim transaction immediately after the lockup transaction is in the mempool. Should only be used for smaller amounts as it involves trust in boltz. | ||
| |||
| repeated | a list of channel ids which are allowed for paying the invoice. can be in either cln or lnd style. | |
| optional | wallet from which the onchain address should be generated - only considered if | |
| optional | Whether the daemon should return immediately after creating the swap or wait until the swap is successful or failed. It will always return immediately if | |
| optional | If set, the daemon will not pay the invoice of the swap and return the invoice to be paid. This implicitly sets | |
| optional | Description of the invoice which will be created for the swap | |
| optional | Description hash of the invoice which will be created for the swap. Takes precedence over | |
| optional | Expiry of the reverse swap invoice in seconds | |
| optional | Rates to accept for the swap. Queries latest from boltz otherwise The recommended way to use this is to pass a user approved value from a previous |
CreateReverseSwapResponse
Field | Type | Label | Description |
---|---|---|---|
| |||
| |||
| optional | Only populated when zero-conf is accepted and return_immediately is set to false | |
| optional | Only populated when zero-conf is accepted and return_immediately is set to false | |
| optional | Invoice to be paid. Only populated when |
CreateSwapRequest
Field | Type | Label | Description |
---|---|---|---|
| |||
| not yet supported repeated string chan_ids = 3; | ||
| the daemon will pay the swap using the onchain wallet specified in the | ||
| optional | address where the coins should go if the swap fails. Refunds will go to any of the daemons wallets otherwise. | |
| optional | wallet to pay swap from. only used if | |
| optional | bolt11 invoice, lnurl, or lnaddress to use for the swap. required in standalone mode. when connected to a lightning node, a new invoice for | |
| optional | Boltz does not accept 0-conf for Liquid transactions with a fee of 0.01 sat/vByte; when | |
| optional | Fee rate to use when sending from internal wallet | |
| optional | Rates to accept for the swap. Queries latest from boltz otherwise The recommended way to use this is to pass a user approved value from a previous |
CreateSwapResponse
Field | Type | Label | Description |
---|---|---|---|
| |||
| |||
| |||
| |||
| lockup transaction id. Only populated when | ||
| |||
|
CreateTenantRequest
Field | Type | Label | Description |
---|---|---|---|
|
CreateWalletRequest
Field | Type | Label | Description |
---|---|---|---|
|
CreateWalletResponse
DepositRequest
Field | Type | Label | Description |
---|---|---|---|
| Percentage of inbound liquidity the channel that is opened in case the invoice cannot be paid should have. 25 by default. |
DepositResponse
Fees
GetInfoRequest
GetInfoResponse
Field | Type | Label | Description |
---|---|---|---|
| |||
| |||
| |||
| |||
| one of: running, disabled, error | ||
| mapping of the currency to the latest block height. | ||
| repeated | swaps that need a manual interaction to refund | |
| optional | the currently authenticated tenant | |
| repeated | swaps that need a manual interaction to claim | |
| Deprecated. | ||
| Deprecated. | ||
| Deprecated. | ||
| repeated | Deprecated. | |
| repeated | Deprecated. |
GetPairInfoRequest
GetPairsResponse
GetServiceInfoRequest
GetServiceInfoResponse
GetStatsRequest
Field | Type | Label | Description |
---|---|---|---|
|
GetStatsResponse
Field | Type | Label | Description |
---|---|---|---|
|
GetSubaccountsRequest
Field | Type | Label | Description |
---|---|---|---|
|
GetSubaccountsResponse
Field | Type | Label | Description |
---|---|---|---|
| optional | ||
| repeated |
GetSwapInfoRequest
Field | Type | Label | Description |
---|---|---|---|
|
GetSwapInfoResponse
Field | Type | Label | Description |
---|---|---|---|
| |||
| |||
| |||
|
GetTenantRequest
Field | Type | Label | Description |
---|---|---|---|
|
GetWalletCredentialsRequest
GetWalletRequest
GetWalletsRequest
ImportWalletRequest
Field | Type | Label | Description |
---|---|---|---|
| |||
|
ImportWalletResponse
LightningChannel
Limits
ListSwapsRequest
Field | Type | Label | Description |
---|---|---|---|
| optional | ||
| optional | ||
| optional | ||
| |||
| optional | ||
| optional | ||
| optional | wether to return swaps in the shared |
ListSwapsResponse
Field | Type | Label | Description |
---|---|---|---|
| repeated | ||
| repeated | Deprecated. | |
| repeated | ||
| repeated | ||
| repeated | populated when |
ListTenantsRequest
ListTenantsResponse
Field | Type | Label | Description |
---|---|---|---|
| repeated |
ListWalletTransactionsRequest
Field | Type | Label | Description |
---|---|---|---|
| |||
| optional | ||
| optional | ||
| optional |
ListWalletTransactionsResponse
Field | Type | Label | Description |
---|---|---|---|
| repeated |
MacaroonPermissions
Field | Type | Label | Description |
---|---|---|---|
|
MinerFees
Pair
PairInfo
RefundSwapRequest
RemoveWalletRequest
Field | Type | Label | Description |
---|---|---|---|
|
RemoveWalletResponse
ReverseSwapInfo
Field | Type | Label | Description |
---|---|---|---|
| |||
| |||
| |||
| Latest status message of the Boltz backend | ||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| repeated | ||
| optional | ||
| |||
| optional | the time when the invoice was paid | |
| optional | ||
| optional | ||
| optional | ||
| |||
| |||
|
SetSubaccountRequest
Field | Type | Label | Description |
---|---|---|---|
| |||
| optional | The subaccount to use. If not set, a new one will be created. |
Subaccount
SwapFees
SwapInfo
Field | Type | Label | Description |
---|---|---|---|
| |||
| |||
| |||
| |||
| Latest status message of the Boltz backend | ||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| If the swap times out or fails for some other reason, the damon will automatically refund the coins sent to the | ||
| optional | ||
| repeated | ||
| optional | ||
| |||
| optional | ||
| optional | ||
| optional | internal wallet which was used to pay the swap | |
| |||
|
SwapStats
Field | Type | Label | Description |
---|---|---|---|
| |||
| |||
| |||
| |||
| |||
|
Tenant
TransactionInfo
Field | Type | Label | Description |
---|---|---|---|
| optional | will be populated for LOCKUP, REFUND and CLAIM | |
|
TransactionOutput
Field | Type | Label | Description |
---|---|---|---|
| |||
| |||
| wether the address is controlled by the wallet |
UnlockRequest
Field | Type | Label | Description |
---|---|---|---|
|
VerifyWalletPasswordRequest
Field | Type | Label | Description |
---|---|---|---|
|
VerifyWalletPasswordResponse
Field | Type | Label | Description |
---|---|---|---|
|
Wallet
Field | Type | Label | Description |
---|---|---|---|
| |||
| |||
| |||
| |||
| |||
|
WalletCredentials
Field | Type | Label | Description |
---|---|---|---|
| optional | only one of these is allowed to be present | |
| optional | ||
| optional | ||
| optional | only used in combination with mnemonic |
WalletParams
Field | Type | Label | Description |
---|---|---|---|
| |||
| |||
| optional | the password to encrypt the wallet with. If there are existing encrypted wallets, the same password has to be used. |
WalletReceiveRequest
Field | Type | Label | Description |
---|---|---|---|
|
WalletReceiveResponse
Field | Type | Label | Description |
---|---|---|---|
|
WalletSendFee
Field | Type | Label | Description |
---|---|---|---|
| amount of sats which would be sent | ||
| |||
| the fee rate used for the estimation in sat/vbyte |
WalletSendRequest
Field | Type | Label | Description |
---|---|---|---|
| |||
| |||
| Amount of satoshis to be sent to 'address` | ||
| optional | Fee rate to use for the transaction | |
| optional | Sends all available funds to the address. The | |
| optional | whether |
WalletSendResponse
Field | Type | Label | Description |
---|---|---|---|
|
WalletTransaction
Field | Type | Label | Description |
---|---|---|---|
| |||
| balance change of the wallet in satoshis. its the sum of all output values minus the sum of all input values which are controlled by the wallet. positive values indicate incoming transactions, negative values outgoing transactions | ||
| |||
| repeated | ||
| |||
| repeated | additional informations about the tx (type, related swaps etc.) |
Wallets
Field | Type | Label | Description |
---|---|---|---|
| repeated |
Enums
Currency
Name | Number | Description |
---|---|---|
BTC | 0 | |
LBTC | 1 |
IncludeSwaps
Name | Number | Description |
---|---|---|
ALL | 0 | |
MANUAL | 1 | |
AUTO | 2 |
MacaroonAction
Name | Number | Description |
---|---|---|
READ | 0 | |
WRITE | 1 |
SwapState
Name | Number | Description |
---|---|---|
PENDING | 0 | |
SUCCESSFUL | 1 | |
ERROR | 2 | Unknown client error. Check the error field of the message for more information |
SERVER_ERROR | 3 | Unknown server error. Check the status field of the message for more information |
REFUNDED | 4 | Client refunded locked coins after the HTLC timed out |
ABANDONED | 5 | Client noticed that the HTLC timed out but didn't find any outputs to refund |
SwapType
Name | Number | Description |
---|---|---|
SUBMARINE | 0 | |
REVERSE | 1 | |
CHAIN | 2 |
TransactionType
Name | Number | Description |
---|---|---|
UNKNOWN | 0 | |
LOCKUP | 1 | |
REFUND | 2 | |
CLAIM | 3 | |
CONSOLIDATION | 4 |
autoswaprpc.AutoSwap
Methods
GetRecommendations
Returns a list of swaps which are currently recommended by autoswap. Also works when autoswap is not running.
Request | Response |
---|---|
GetStatus
Returns the current budget of autoswap and some relevant stats.
Request | Response |
---|---|
UpdateLightningConfig
Updates the lightning configuration entirely or partially. Autoswap will reload the configuration after this call.
Request | Response |
---|---|
UpdateChainConfig
Updates the chain configuration entirely or partially. Autoswap will reload the configuration after this call.
Request | Response |
---|---|
GetConfig
Returns the currently used configuration.
Request | Response |
---|---|
ReloadConfig
Reloads the configuration from disk.
Request | Response |
---|---|
Messages
Budget
Field | Type | Label | Description |
---|---|---|---|
| |||
| |||
| |||
| |||
| optional |
ChainConfig
Field | Type | Label | Description |
---|---|---|---|
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| optional |
ChainRecommendation
Field | Type | Label | Description |
---|---|---|---|
| optional | Populated when a swap is recommended based on the current balance of the configured | |
|
ChainSwap
Field | Type | Label | Description |
---|---|---|---|
| |||
| |||
| repeated | Reasons for which the swap is not being executed |
Config
Field | Type | Label | Description |
---|---|---|---|
| repeated | ||
| repeated |
GetConfigRequest
GetRecommendationsRequest
GetRecommendationsResponse
Field | Type | Label | Description |
---|---|---|---|
| repeated | ||
| repeated |
GetStatusRequest
GetStatusResponse
LightningConfig
Field | Type | Label | Description |
---|---|---|---|
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| |||
| optional |
LightningRecommendation
Field | Type | Label | Description |
---|---|---|---|
| optional | Populated when a swap is recommended for the associated | |
| |||
| the thresholds for a swap to be recommended for the |
LightningSwap
Field | Type | Label | Description |
---|---|---|---|
| |||
| |||
| |||
| repeated | Reasons for which the swap is not being executed |
LightningThresholds
Status
UpdateChainConfigRequest
Field | Type | Label | Description |
---|---|---|---|
| |||
| optional | ||
| optional |
UpdateLightningConfigRequest
Field | Type | Label | Description |
---|---|---|---|
| optional | ||
| |||
| optional |
Enums
Scalar Value Types
.proto Type | Notes | C++ | Java | Python | Go | C# | PHP | Ruby |
---|---|---|---|---|---|---|---|---|
|
|
|
|
|
|
|
| |
|
|
|
|
|
|
|
| |
| Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead. |
|
|
|
|
|
|
|
| Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead. |
|
|
|
|
|
|
|
| Uses variable-length encoding. |
|
|
|
|
|
|
|
| Uses variable-length encoding. |
|
|
|
|
|
|
|
| Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s. |
|
|
|
|
|
|
|
| Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s. |
|
|
|
|
|
|
|
| Always four bytes. More efficient than uint32 if values are often greater than 2^28. |
|
|
|
|
|
|
|
| Always eight bytes. More efficient than uint64 if values are often greater than 2^56. |
|
|
|
|
|
|
|
| Always four bytes. |
|
|
|
|
|
|
|
| Always eight bytes. |
|
|
|
|
|
|
|
|
|
|
|
|
|
|
| |
| A string must always contain UTF-8 encoded or 7-bit ASCII text. |
|
|
|
|
|
|
|
| May contain any arbitrary sequence of bytes. |
|
|
|
|
|
|
|
Last updated