Comment on page
🤖
gRPC API
This page was automatically generated based on the protobuf file
boltzrpc.proto
.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 |
---|---|
Fetches the latest limits and fees from the Boltz backend API it is connected to.
Request | Response |
---|---|
Returns a list of all swaps, reverse swaps and channel creations in the database.
Request | Response |
---|---|
Gets all available information about a swap from the database.
Request | Response |
---|---|
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 |
---|---|
Creates a new swap from onchain to lightning.
Request | Response |
---|---|
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 |
---|---|
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 |
---|---|
Channel creations are an optional extension to a submarine swap in the data types of boltz-lnd.
Field | Type | Label | Description |
---|---|---|---|
swap | | | |
channel_creation | | |
Field | Type | Label | Description |
---|---|---|---|
amount | | |
Field | Type | Label | Description |
---|---|---|---|
inbound_liquidity | | Percentage of inbound liquidity the channel that is opened in case the invoice cannot be paid should have. 25 by default. |
Field | Type | Label | Description |
---|---|---|---|
id | | |
Field | Type | Label | Description |
---|---|---|---|
swap | | | |
channel_creation | | | |
reverse_swap | | |
Field | Type | Label | Description |
---|---|---|---|
swaps | repeated | | |
channel_creations | repeated | | |
reverse_swaps | repeated | |
Field | Type | Label | Description |
---|---|---|---|
id | | | |
state | | | |
error | | | |
status | | Latest status message of the Boltz backend | |
private_key | | | |
preimage | | | |
redeem_script | | | |
invoice | | | |
claim_address | | | |
onchain_amount | | | |
timeout_block_height | | | |
lockup_transaction_id | | | |
claim_transaction_id | | |
Field | Type | Label | Description |
---|---|---|---|
id | | | |
state | | | |
error | | | |
status | | Latest status message of the Boltz backend | |
private_key | | | |
preimage | | | |
redeem_script | | | |
invoice | | | |
lockup_address | | | |
expected_amount | | | |
timeout_block_height | | | |
lockup_transaction_id | | | |
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 LND wallet and save the refund transaction id to the database. |
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 |
.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