🤖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.
GetServiceInfo
Fetches the latest limits and fees from the Boltz backend API it is connected to.
GetPairInfo
Fetches information about a specific pair for a chain swap.
GetPairs
Fetches all available pairs for submarine and reverse swaps.
ListSwaps
Returns a list of all swaps, reverse swaps, and chain swaps in the database.
GetStats
Returns stats of all swaps, reverse swaps, and chain swaps in the database.
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.
ClaimSwaps
Claim swaps manually. This is only required when no claim address has been set and the swap does not have an associated wallet.
GetSwapInfo
Gets all available information about a swap from the database.
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.
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.
CreateSwap
Creates a new swap from onchain to lightning.
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.
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.
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.
CreateWallet
Creates a new liquid wallet and returns the mnemonic.
ImportWallet
Imports an existing wallet.
SetSubaccount
Sets the subaccount of a wallet. Not supported for readonly wallets.
GetSubaccounts
Returns all subaccounts for a given wallet. Not supported for readonly wallets.
GetWallets
Returns all available wallets.
GetWallet
Returns the current balance and subaccount of a wallet.
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.
ListWalletTransactions
Returns recent transactions from a wallet.
GetWalletCredentials
Returns the credentials of a wallet. The password will be required if the wallet is encrypted.
RemoveWallet
Removes a wallet.
WalletSend
Send coins from a wallet. Only the confirmed balance can be spent.
WalletReceive
Get a new address of the wallet.
Stop
Gracefully stops the daemon.
Unlock
Unlocks the server. This will be required on startup if there are any encrypted wallets.
VerifyWalletPassword
Check if the password is correct.
ChangeWalletPassword
Changes the password for wallet encryption.
CreateTenant
Creates a new tenant which can be used to bake restricted macaroons.
ListTenants
Returns all tenants.
GetTenant
Get a specifiy tenant.
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.
Messages
AnySwapInfo
from_amount
The expected amount to be sent to the lockup address for submarine and chain swaps and the invoice amount for reverse swaps.
BakeMacaroonRequest
BakeMacaroonResponse
Balance
BlockHeights
Budget
ChainSwapData
ChainSwapInfo
ChangeWalletPasswordRequest
ChannelCreationInfo
Channel creations are an optional extension to a submarine swap in the data types of boltz-client.
ChannelId
ClaimSwapsRequest
ClaimSwapsResponse
CombinedChannelSwapInfo
CreateChainSwapRequest
amount
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.
from_wallet_id
optional
Wallet from which the swap should be paid from. Ignored if external_pay
is set to true. If the swap fails, funds will be refunded to this wallet as well.
accept_zero_conf
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.
lockup_zero_conf
optional
Boltz does not accept 0-conf for Liquid transactions with a fee of 0.01 sat/vByte; when lockup_zero_conf
is enabled, a fee of 0.1 sat/vByte will be used for Liquid lockup transactions
accepted_pair
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 GetPairInfo
call
CreateChannelRequest
CreateReverseSwapRequest
accept_zero_conf
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.
chan_ids
repeated
a list of channel ids which are allowed for paying the invoice. can be in either cln or lnd style.
wallet_id
optional
wallet from which the onchain address should be generated - only considered if address
is not set
return_immediately
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 accept_zero_conf
is not set.
external_pay
optional
If set, the daemon will not pay the invoice of the swap and return the invoice to be paid. This implicitly sets return_immediately
to true.
description_hash
optional
Description hash of the invoice which will be created for the swap. Takes precedence over description
accepted_pair
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 GetPairInfo
call
CreateReverseSwapResponse
routing_fee_milli_sat
optional
Only populated when zero-conf is accepted and return_immediately is set to false
claim_transaction_id
optional
Only populated when zero-conf is accepted and return_immediately is set to false
CreateSwapRequest
send_from_internal
the daemon will pay the swap using the onchain wallet specified in the wallet
field or any wallet otherwise.
refund_address
optional
address where the coins should go if the swap fails. Refunds will go to any of the daemons wallets otherwise.
invoice
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 amount
sats will be fetched the amount
field has to be populated in case of a lnurl and lnaddress
zero_conf
optional
Boltz does not accept 0-conf for Liquid transactions with a fee of 0.01 sat/vByte; when zero_conf
is enabled, a fee of 0.1 sat/vByte will be used for Liquid lockup transactions
accepted_pair
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 GetPairInfo
call
CreateSwapResponse
CreateTenantRequest
CreateWalletRequest
CreateWalletResponse
DepositRequest
inbound_liquidity
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
GetPairInfoRequest
GetPairsResponse
GetServiceInfoRequest
GetServiceInfoResponse
GetStatsRequest
GetStatsResponse
GetSubaccountsRequest
GetSubaccountsResponse
GetSwapInfoRequest
GetSwapInfoResponse
GetTenantRequest
GetWalletCredentialsRequest
GetWalletRequest
GetWalletsRequest
ImportWalletRequest
ImportWalletResponse
LightningChannel
Limits
ListSwapsRequest
ListSwapsResponse
ListTenantsRequest
ListTenantsResponse
ListWalletTransactionsRequest
ListWalletTransactionsResponse
MacaroonPermissions
MinerFees
Pair
PairInfo
RefundSwapRequest
RemoveWalletRequest
RemoveWalletResponse
ReverseSwapInfo
SetSubaccountRequest
Subaccount
SwapFees
SwapInfo
refund_transaction_id
If the swap times out or fails for some other reason, the damon will automatically refund the coins sent to the lockup_address
back to the configured wallet or the address specified in the refund_address
field.
SwapStats
Tenant
TransactionInfo
TransactionOutput
UnlockRequest
VerifyWalletPasswordRequest
VerifyWalletPasswordResponse
Wallet
WalletCredentials
WalletParams
WalletReceiveRequest
WalletReceiveResponse
WalletSendFee
WalletSendRequest
WalletSendResponse
WalletTransaction
balance_change
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
Wallets
Enums
Currency
BTC
0
LBTC
1
IncludeSwaps
ALL
0
MANUAL
1
AUTO
2
MacaroonAction
READ
0
WRITE
1
SwapState
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
SUBMARINE
0
REVERSE
1
CHAIN
2
TransactionType
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.
ExecuteRecommendations
Executes recommendations previously returned by GetRecommendations
. Intended to be used when autoswap is fully configured but not enabled to allow for manual approval.
GetStatus
Returns the current budget of autoswap and some relevant stats.
UpdateLightningConfig
Updates the lightning configuration entirely or partially. Autoswap will reload the configuration after this call.
UpdateChainConfig
Updates the chain configuration entirely or partially. Autoswap will reload the configuration after this call.
GetConfig
Returns the currently used configuration.
ReloadConfig
Reloads the configuration from disk.
Messages
Budget
ChainConfig
ChainRecommendation
swap
optional
Populated when a swap is recommended based on the current balance of the configured from_wallet
ChainSwap
Config
ExecuteRecommendationsRequest
ExecuteRecommendationsResponse
GetConfigRequest
GetRecommendationsRequest
GetRecommendationsResponse
GetStatusRequest
GetStatusResponse
LightningConfig
LightningRecommendation
swap
optional
Populated when a swap is recommended for the associated channel
, otherwise, the current balances are below the configured thresholds
LightningSwap
LightningThresholds
Status
UpdateChainConfigRequest
UpdateLightningConfigRequest
Enums
Scalar Value Types
double
double
double
float
float64
double
float
Float
float
float
float
float
float32
float
float
Float
int32
Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint32 instead.
int32
int
int
int32
int
integer
Bignum or Fixnum (as required)
int64
Uses variable-length encoding. Inefficient for encoding negative numbers – if your field is likely to have negative values, use sint64 instead.
int64
long
int/long
int64
long
integer/string
Bignum
uint32
Uses variable-length encoding.
uint32
int
int/long
uint32
uint
integer
Bignum or Fixnum (as required)
uint64
Uses variable-length encoding.
uint64
long
int/long
uint64
ulong
integer/string
Bignum or Fixnum (as required)
sint32
Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int32s.
int32
int
int
int32
int
integer
Bignum or Fixnum (as required)
sint64
Uses variable-length encoding. Signed int value. These more efficiently encode negative numbers than regular int64s.
int64
long
int/long
int64
long
integer/string
Bignum
fixed32
Always four bytes. More efficient than uint32 if values are often greater than 2^28.
uint32
int
int
uint32
uint
integer
Bignum or Fixnum (as required)
fixed64
Always eight bytes. More efficient than uint64 if values are often greater than 2^56.
uint64
long
int/long
uint64
ulong
integer/string
Bignum
sfixed32
Always four bytes.
int32
int
int
int32
int
integer
Bignum or Fixnum (as required)
sfixed64
Always eight bytes.
int64
long
int/long
int64
long
integer/string
Bignum
bool
bool
boolean
boolean
bool
bool
boolean
TrueClass/FalseClass
string
A string must always contain UTF-8 encoded or 7-bit ASCII text.
string
String
str/unicode
string
string
string
String (UTF-8)
bytes
May contain any arbitrary sequence of bytes.
string
ByteString
str
[]byte
ByteString
string
String (ASCII-8BIT)
Last updated