Boltz Docs
Client: Boltz LND
Search
K
Comment on page
🤖

gRPC API

This page was automatically generated based on the protobuf file boltzrpc.proto.
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 LND 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.

ListSwaps

Returns a list of all swaps, reverse swaps and channel creations in the database.
Request
Response

GetSwapInfo

Gets all available information about a swap from the database.
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.

Messages

ChannelCreationInfo

Channel creations are an optional extension to a submarine swap in the data types of boltz-lnd.
Field
Type
Label
Description
swap_id
string
ID of the swap to which this channel channel belongs
status
string
inbound_liquidity
uint32
private
bool
funding_transaction_id
string
funding_transaction_vout
uint32

CombinedChannelSwapInfo

Field
Type
Label
Description
swap
SwapInfo
channel_creation

CreateChannelRequest

Field
Type
Label
Description
amount
int64
inbound_liquidity
uint32
Percentage of inbound liquidity the channel that is opened should have. 25 by default.
private
bool

CreateReverseSwapRequest

Field
Type
Label
Description
amount
int64
address
string
If no value is set, the daemon will query a new P2WKH address from LND
accept_zero_conf
bool

CreateReverseSwapResponse

Field
Type
Label
Description
id
string
lockup_address
string
routing_fee_milli_sat
uint32
claim_transaction_id
string
Only populated when 0-conf is accepted

CreateSwapRequest

Field
Type
Label
Description
amount
int64

CreateSwapResponse

Field
Type
Label
Description
id
string
address
string
expected_amount
int64
bip21
string

DepositRequest

Field
Type
Label
Description
inbound_liquidity
uint32
Percentage of inbound liquidity the channel that is opened in case the invoice cannot be paid should have. 25 by default.

DepositResponse

Field
Type
Label
Description
id
string
address
string
timeout_block_height
uint32

Fees

Field
Type
Label
Description
percentage
float
miner
MinerFees

GetInfoRequest

GetInfoResponse

Field
Type
Label
Description
symbol
string
network
string
lnd_pubkey
string
block_height
uint32
pending_swaps
string
repeated
pending_reverse_swaps
string
repeated

GetServiceInfoRequest

GetServiceInfoResponse

Field
Type
Label
Description
fees
Fees
limits
Limits

GetSwapInfoRequest

Field
Type
Label
Description
id
string

GetSwapInfoResponse

Field
Type
Label
Description
swap
SwapInfo
channel_creation
reverse_swap

Limits

Field
Type
Label
Description
minimal
int64
maximal
int64

ListSwapsRequest

ListSwapsResponse

Field
Type
Label
Description
swaps
SwapInfo
repeated
channel_creations
repeated
reverse_swaps
repeated

MinerFees

Field
Type
Label
Description
normal
uint32
reverse
uint32

ReverseSwapInfo

Field
Type
Label
Description
id
string
state
SwapState
error
string
status
string
Latest status message of the Boltz backend
private_key
string
preimage
string
redeem_script
string
invoice
string
claim_address
string
onchain_amount
int64
timeout_block_height
uint32
lockup_transaction_id
string
claim_transaction_id
string

SwapInfo

Field
Type
Label
Description
id
string
state
SwapState
error
string
status
string
Latest status message of the Boltz backend
private_key
string
preimage
string
redeem_script
string
invoice
string
lockup_address
string
expected_amount
int64
timeout_block_height
uint32
lockup_transaction_id
string
refund_transaction_id
string
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 LND wallet and save the refund transaction id to the database.

Enums

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

Scalar Value Types

.proto Type
Notes
C++
Java
Python
Go
C#
PHP
Ruby
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 modified 2mo ago