gRPC Documentation β
This page was automatically generated.
Authorization β
The gRPC API supports two authorization methods.
Macaroons β
Macaroons are cryptographic bearer tokens that offer fine-grained access control and serve as the default authorization method for the gRPC. The daemon automatically generates two macaroons at startup.
- Admin macaroon (
admin.macaroon
) - grants full access to all RPCs - Readonly macaroon (
readonly.macaroon
) - grants read-only access to all RPCs
The macaroons are stored in the macaroons
folder in the data directory by default. Their locations can be overridden using the configuration options:
rpc.adminmacaroonpath
rpc.readonlymacaroonpath
When using macaroon authentication, include the macaroon in your request metadata:
- For gRPC: Use the
macaroon
key in the request metadata - For REST proxy: Use the
Grpc-Metadata-Macaroon
header
Password β
The client supports simple password authentication as an alternative to macaroons.
To enable password authentication:
- Set a password using the
rpc.password
flag at startup - Or configure it in the config
Note: When password authentication is enabled, macaroon authentication is automatically disabled and vice-versa.
To use password authentication:
- For gRPC: Include the password in the
authorization
key of the request metadata - For REST proxy: Use the
Authorization
header
Note: It is recommended to use macaroon authentication when possible as it provides more granular access control.
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 |
---|---|
GetInfoRequest | GetInfoResponse |
GetServiceInfo β
Fetches the latest limits and fees from the Boltz backend API it is connected to.
Request | Response |
---|---|
GetServiceInfoRequest | GetServiceInfoResponse |
GetPairInfo β
Fetches information about a specific pair for a chain swap.
Request | Response |
---|---|
GetPairInfoRequest | PairInfo |
GetPairs β
Fetches all available pairs for submarine and reverse swaps.
Request | Response |
---|---|
.google.protobuf.Empty | GetPairsResponse |
ListSwaps β
Returns a list of all swaps, reverse swaps, and chain swaps in the database.
Request | Response |
---|---|
ListSwapsRequest | ListSwapsResponse |
GetStats β
Returns stats of all swaps, reverse swaps, and chain swaps in the database.
Request | Response |
---|---|
GetStatsRequest | GetStatsResponse |
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 |
---|---|
RefundSwapRequest | GetSwapInfoResponse |
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 |
---|---|
ClaimSwapsRequest | ClaimSwapsResponse |
GetSwapInfo β
Gets all available information about a swap from the database.
Request | Response |
---|---|
GetSwapInfoRequest | GetSwapInfoResponse |
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 |
---|---|
GetSwapInfoRequest | GetSwapInfoResponse stream |
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 |
---|---|
DepositRequest | DepositResponse |
CreateSwap β
Creates a new swap from onchain to lightning.
Request | Response |
---|---|
CreateSwapRequest | CreateSwapResponse |
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 |
---|---|
CreateChannelRequest | CreateSwapResponse |
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 |
---|---|
CreateReverseSwapRequest | CreateReverseSwapResponse |
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 |
---|---|
CreateChainSwapRequest | ChainSwapInfo |
CreateWallet β
Creates a new liquid wallet and returns the mnemonic.
Request | Response |
---|---|
CreateWalletRequest | CreateWalletResponse |
ImportWallet β
Imports an existing wallet.
Request | Response |
---|---|
ImportWalletRequest | Wallet |
SetSubaccount β
Sets the subaccount of a wallet. Not supported for readonly wallets.
Request | Response |
---|---|
SetSubaccountRequest | Subaccount |
GetSubaccounts β
Returns all subaccounts for a given wallet. Not supported for readonly wallets.
Request | Response |
---|---|
GetSubaccountsRequest | GetSubaccountsResponse |
GetWallets β
Returns all available wallets.
Request | Response |
---|---|
GetWalletsRequest | Wallets |
GetWallet β
Returns the current balance and subaccount of a wallet.
Request | Response |
---|---|
GetWalletRequest | 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.
Request | Response |
---|---|
WalletSendRequest | WalletSendFee |
ListWalletTransactions β
Returns recent transactions from a wallet.
Request | Response |
---|---|
ListWalletTransactionsRequest | ListWalletTransactionsResponse |
BumpTransaction β
Increase the fee of a transaction using RBF. The transaction has to belong to one of the clients wallets.
Request | Response |
---|---|
BumpTransactionRequest | BumpTransactionResponse |
GetWalletCredentials β
Returns the credentials of a wallet. The password will be required if the wallet is encrypted.
Request | Response |
---|---|
GetWalletCredentialsRequest | WalletCredentials |
RemoveWallet β
Removes a wallet.
Request | Response |
---|---|
RemoveWalletRequest | RemoveWalletResponse |
WalletSend β
Send coins from a wallet. Only the confirmed balance can be spent.
Request | Response |
---|---|
WalletSendRequest | WalletSendResponse |
WalletReceive β
Get a new address of the wallet.
Request | Response |
---|---|
WalletReceiveRequest | WalletReceiveResponse |
Stop β
Gracefully stops the daemon.
Request | Response |
---|---|
.google.protobuf.Empty | .google.protobuf.Empty |
Unlock β
Unlocks the server. This will be required on startup if there are any encrypted wallets.
Request | Response |
---|---|
UnlockRequest | .google.protobuf.Empty |
VerifyWalletPassword β
Check if the password is correct.
Request | Response |
---|---|
VerifyWalletPasswordRequest | VerifyWalletPasswordResponse |
ChangeWalletPassword β
Changes the password for wallet encryption.
Request | Response |
---|---|
ChangeWalletPasswordRequest | .google.protobuf.Empty |
CreateTenant β
Creates a new tenant which can be used to bake restricted macaroons.
Request | Response |
---|---|
CreateTenantRequest | Tenant |
ListTenants β
Returns all tenants.
Request | Response |
---|---|
ListTenantsRequest | ListTenantsResponse |
GetTenant β
Get a specifiy tenant.
Request | Response |
---|---|
GetTenantRequest | 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.
Request | Response |
---|---|
BakeMacaroonRequest | BakeMacaroonResponse |
GetSwapMnemonic β
Returns mnemonic used for the key derivation of swaps, which can be used to restore swap information in the case of data loss.
Request | Response |
---|---|
GetSwapMnemonicRequest | GetSwapMnemonicResponse |
SetSwapMnemonic β
Sets the mnemonic used for key derivation of swaps. An existing mnemonic can be used, or a new one can be generated.
Request | Response |
---|---|
SetSwapMnemonicRequest | SetSwapMnemonicResponse |
Messages β
AnySwapInfo β
Field | Type | Label | Description |
---|---|---|---|
id | string | ||
type | SwapType | ||
pair | Pair | ||
state | SwapState | ||
error | string | optional | |
status | string | ||
from_amount | uint64 | The expected amount to be sent to the lockup address for submarine and chain swaps and the invoice amount for reverse swaps. | |
to_amount | uint64 | from_amount minus the service and network fee. | |
created_at | int64 | ||
service_fee | int64 | optional | |
onchain_fee | uint64 | optional | inclues the routing fee for reverse swaps |
is_auto | bool | ||
tenant_id | uint64 |
BakeMacaroonRequest β
Field | Type | Label | Description |
---|---|---|---|
tenant_id | uint64 | optional | |
permissions | MacaroonPermissions | repeated |
BakeMacaroonResponse β
Field | Type | Label | Description |
---|---|---|---|
macaroon | string |
Balance β
Field | Type | Label | Description |
---|---|---|---|
total | uint64 | ||
confirmed | uint64 | ||
unconfirmed | uint64 |
BlockHeights β
Field | Type | Label | Description |
---|---|---|---|
btc | uint32 | ||
liquid | uint32 | optional |
Budget β
Field | Type | Label | Description |
---|---|---|---|
total | uint64 | ||
remaining | int64 | ||
start_date | int64 | ||
end_date | int64 |
BumpTransactionRequest β
Field | Type | Label | Description |
---|---|---|---|
tx_id | string | Id of the transaction to bump. The transaction has to belong to one of the clients wallets | |
swap_id | string | Depending on the state of the swap, the lockup, refund or claim transaction will be bumped | |
sat_per_vbyte | double | optional | Fee rate for the new transaction. if not specified, the daemon will query the fee rate from the configured provider and bump the fee by at least 1 sat/vbyte. |
BumpTransactionResponse β
Field | Type | Label | Description |
---|---|---|---|
tx_id | string |
ChainSwapData β
Field | Type | Label | Description |
---|---|---|---|
id | string | ||
currency | Currency | ||
private_key | string | ||
their_public_key | string | ||
amount | uint64 | ||
timeout_block_height | uint32 | ||
lockup_transaction_id | string | optional | |
transaction_id | string | optional | |
wallet_id | uint64 | optional | |
address | string | optional | |
blinding_key | string | optional | |
lockup_address | string |
ChainSwapInfo β
Field | Type | Label | Description |
---|---|---|---|
id | string | ||
pair | Pair | ||
state | SwapState | ||
error | string | ||
status | string | ||
preimage | string | ||
is_auto | bool | ||
service_fee | int64 | optional | |
service_fee_percent | double | ||
onchain_fee | uint64 | optional | |
created_at | int64 | ||
tenant_id | uint64 | ||
from_data | ChainSwapData | ||
to_data | ChainSwapData |
ChangeWalletPasswordRequest β
Field | Type | Label | Description |
---|---|---|---|
old | string | ||
new | string |
ChannelCreationInfo β
Channel creations are an optional extension to a submarine swap in the data types of boltz-client.
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 |
ChannelId β
Field | Type | Label | Description |
---|---|---|---|
cln | string | cln style: 832347x2473x1 | |
lnd | uint64 | lnd style: 915175205006540801 |
ClaimSwapsRequest β
Field | Type | Label | Description |
---|---|---|---|
swap_ids | string | repeated | |
address | string | ||
wallet_id | uint64 |
ClaimSwapsResponse β
Field | Type | Label | Description |
---|---|---|---|
transaction_id | string |
CombinedChannelSwapInfo β
Field | Type | Label | Description |
---|---|---|---|
swap | SwapInfo | ||
channel_creation | ChannelCreationInfo |
CreateChainSwapRequest β
Field | Type | Label | Description |
---|---|---|---|
amount | uint64 | 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. |
pair | Pair | ||
to_address | string | optional | Address where funds will be swept to if the swap succeeds |
refund_address | string | optional | Address where the coins should be refunded to if the swap fails. |
from_wallet_id | uint64 | 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. |
to_wallet_id | uint64 | optional | Wallet where the the funds will go if the swap succeeds. |
accept_zero_conf | bool | 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. |
external_pay | bool | optional | If set, the daemon will not pay the swap from an internal wallet. |
lockup_zero_conf | bool | optional | Deprecated. |
sat_per_vbyte | double | optional | Fee rate to use when sending from internal wallet |
accepted_pair | PairInfo | 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 β
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 | uint64 | amount of satoshis to swap | |
address | string | If no value is set, the daemon will query a new address from the lightning node | |
accept_zero_conf | bool | 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. | |
pair | Pair | ||
chan_ids | string | repeated | a list of channel ids which are allowed for paying the invoice. can be in either cln or lnd style. |
wallet_id | uint64 | optional | wallet from which the onchain address should be generated - only considered if address is not set |
return_immediately | bool | 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 | bool | 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 | string | optional | Description of the invoice which will be created for the swap |
description_hash | bytes | optional | Description hash of the invoice which will be created for the swap. Takes precedence over description |
invoice_expiry | uint64 | optional | Expiry of the reverse swap invoice in seconds |
accepted_pair | PairInfo | 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 |
routing_fee_limit_ppm | uint64 | optional | The routing fee limit for paying the lightning invoice in ppm (parts per million) |
add_magic_routing_hint | bool | optional | add a magic routing hint to the lightning invoice if external_pay is true and an internal wallet is used. |
CreateReverseSwapResponse β
Field | Type | Label | Description |
---|---|---|---|
id | string | ||
lockup_address | string | ||
routing_fee_milli_sat | uint64 | optional | Only populated when zero-conf is accepted and return_immediately is set to false |
claim_transaction_id | string | optional | Only populated when zero-conf is accepted and return_immediately is set to false |
invoice | string | optional | Invoice to be paid. Only populated when external_pay is set to true |
CreateSwapRequest β
Field | Type | Label | Description |
---|---|---|---|
amount | uint64 | amount of sats to be received on lightning. related: invoice field | |
pair | Pair | ||
send_from_internal | bool | the daemon will pay the swap using the onchain wallet specified in the wallet field or the first internal wallet with the correct currency otherwise. | |
refund_address | string | optional | address where the coins should go if the swap fails. Refunds will go to any of the daemons wallets otherwise. |
wallet_id | uint64 | optional | wallet to pay swap from. only used if send_from_internal is set to true |
invoice | string | 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 | bool | optional | Deprecated. |
sat_per_vbyte | double | optional | Fee rate to use when sending from internal wallet |
accepted_pair | PairInfo | 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 |
ignore_mrh | bool | optional | Ignore any magic routing hints found in the specified invoice . |
CreateSwapResponse β
Field | Type | Label | Description |
---|---|---|---|
id | string | ||
address | string | ||
expected_amount | uint64 | ||
bip21 | string | ||
tx_id | string | lockup transaction id. Only populated when send_from_internal was specified in the request | |
timeout_block_height | uint32 | ||
timeout_hours | float |
CreateTenantRequest β
Field | Type | Label | Description |
---|---|---|---|
name | string |
CreateWalletRequest β
Field | Type | Label | Description |
---|---|---|---|
params | WalletParams |
CreateWalletResponse β
Field | Type | Label | Description |
---|---|---|---|
mnemonic | string | ||
wallet | Wallet |
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 |
---|---|---|---|
version | string | ||
node | string | ||
network | string | ||
node_pubkey | string | ||
auto_swap_status | string | one of: running, disabled, error | |
block_heights | BlockHeights | mapping of the currency to the latest block height. | |
refundable_swaps | string | repeated | swaps that need a manual interaction to refund |
tenant | Tenant | optional | the currently authenticated tenant |
claimable_swaps | string | repeated | swaps that need a manual interaction to claim |
symbol | string | Deprecated. | |
lnd_pubkey | string | Deprecated. | |
block_height | uint32 | Deprecated. | |
pending_swaps | string | repeated | Deprecated. |
pending_reverse_swaps | string | repeated | Deprecated. |
GetPairInfoRequest β
Field | Type | Label | Description |
---|---|---|---|
type | SwapType | ||
pair | Pair |
GetPairsResponse β
Field | Type | Label | Description |
---|---|---|---|
submarine | PairInfo | repeated | |
reverse | PairInfo | repeated | |
chain | PairInfo | repeated |
GetServiceInfoRequest β
GetServiceInfoResponse β
Field | Type | Label | Description |
---|---|---|---|
fees | Fees | ||
limits | Limits |
GetStatsRequest β
Field | Type | Label | Description |
---|---|---|---|
include | IncludeSwaps |
GetStatsResponse β
Field | Type | Label | Description |
---|---|---|---|
stats | SwapStats |
GetSubaccountsRequest β
Field | Type | Label | Description |
---|---|---|---|
wallet_id | uint64 |
GetSubaccountsResponse β
Field | Type | Label | Description |
---|---|---|---|
current | uint64 | optional | |
subaccounts | Subaccount | repeated |
GetSwapInfoRequest β
Field | Type | Label | Description |
---|---|---|---|
id | string | Deprecated. | |
swap_id | string | ||
payment_hash | bytes | Only implemented for submarine swaps |
GetSwapInfoResponse β
Field | Type | Label | Description |
---|---|---|---|
swap | SwapInfo | ||
channel_creation | ChannelCreationInfo | ||
reverse_swap | ReverseSwapInfo | ||
chain_swap | ChainSwapInfo |
GetSwapMnemonicRequest β
GetSwapMnemonicResponse β
Field | Type | Label | Description |
---|---|---|---|
mnemonic | string |
GetTenantRequest β
Field | Type | Label | Description |
---|---|---|---|
name | string |
GetWalletCredentialsRequest β
Field | Type | Label | Description |
---|---|---|---|
id | uint64 | ||
password | string | optional |
GetWalletRequest β
Field | Type | Label | Description |
---|---|---|---|
name | string | optional | |
id | uint64 | optional |
GetWalletsRequest β
Field | Type | Label | Description |
---|---|---|---|
currency | Currency | optional | |
include_readonly | bool | optional |
ImportWalletRequest β
Field | Type | Label | Description |
---|---|---|---|
credentials | WalletCredentials | ||
params | WalletParams |
ImportWalletResponse β
LightningChannel β
Field | Type | Label | Description |
---|---|---|---|
id | ChannelId | ||
capacity | uint64 | ||
outbound_sat | uint64 | ||
inbound_sat | uint64 | ||
peer_id | string |
Limits β
Field | Type | Label | Description |
---|---|---|---|
minimal | uint64 | ||
maximal | uint64 | ||
maximal_zero_conf_amount | uint64 |
ListSwapsRequest β
Field | Type | Label | Description |
---|---|---|---|
from | Currency | optional | |
to | Currency | optional | |
state | SwapState | optional | |
include | IncludeSwaps | ||
limit | uint64 | optional | |
offset | uint64 | optional | |
unify | bool | optional | wether to return swaps in the shared all_swaps list or in the detailed lists. the limit and offset are only considered when unify is true. |
ListSwapsResponse β
Field | Type | Label | Description |
---|---|---|---|
swaps | SwapInfo | repeated | |
channel_creations | CombinedChannelSwapInfo | repeated | Deprecated. |
reverse_swaps | ReverseSwapInfo | repeated | |
chain_swaps | ChainSwapInfo | repeated | |
all_swaps | AnySwapInfo | repeated | populated when unify is set to true in the request |
ListTenantsRequest β
ListTenantsResponse β
Field | Type | Label | Description |
---|---|---|---|
tenants | Tenant | repeated |
ListWalletTransactionsRequest β
Field | Type | Label | Description |
---|---|---|---|
id | uint64 | ||
exclude_swap_related | bool | optional | |
limit | uint64 | optional | |
offset | uint64 | optional |
ListWalletTransactionsResponse β
Field | Type | Label | Description |
---|---|---|---|
transactions | WalletTransaction | repeated |
MacaroonPermissions β
Field | Type | Label | Description |
---|---|---|---|
action | MacaroonAction |
MinerFees β
Field | Type | Label | Description |
---|---|---|---|
normal | uint32 | ||
reverse | uint32 |
Pair β
Field | Type | Label | Description |
---|---|---|---|
from | Currency | ||
to | Currency |
PairInfo β
Field | Type | Label | Description |
---|---|---|---|
pair | Pair | ||
fees | SwapFees | ||
limits | Limits | ||
hash | string |
RefundSwapRequest β
Field | Type | Label | Description |
---|---|---|---|
id | string | ||
address | string | ||
wallet_id | uint64 |
RemoveWalletRequest β
Field | Type | Label | Description |
---|---|---|---|
id | uint64 |
RemoveWalletResponse β
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 | uint64 | ||
invoice_amount | uint64 | ||
timeout_block_height | uint32 | ||
lockup_transaction_id | string | ||
claim_transaction_id | string | ||
pair | Pair | ||
chan_ids | ChannelId | repeated | |
blinding_key | string | optional | |
created_at | int64 | ||
paid_at | int64 | optional | the time when the invoice was paid |
service_fee | int64 | optional | |
onchain_fee | uint64 | optional | |
routing_fee_msat | uint64 | optional | |
external_pay | bool | ||
tenant_id | uint64 | ||
is_auto | bool |
SetSubaccountRequest β
Field | Type | Label | Description |
---|---|---|---|
wallet_id | uint64 | ||
subaccount | uint64 | optional | The subaccount to use. If not set, a new one will be created. |
SetSwapMnemonicRequest β
Field | Type | Label | Description |
---|---|---|---|
existing | string | ||
generate | bool |
SetSwapMnemonicResponse β
Field | Type | Label | Description |
---|---|---|---|
mnemonic | string |
Subaccount β
Field | Type | Label | Description |
---|---|---|---|
balance | Balance | ||
pointer | uint64 | ||
type | string | ||
descriptors | string | repeated |
SwapFees β
Field | Type | Label | Description |
---|---|---|---|
percentage | double | ||
miner_fees | uint64 |
SwapInfo β
Field | Type | Label | Description |
---|---|---|---|
id | string | ||
pair | Pair | ||
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 | uint64 | ||
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 configured wallet or the address specified in the refund_address field. | |
refund_address | string | optional | |
chan_ids | ChannelId | repeated | |
blinding_key | string | optional | |
created_at | int64 | ||
service_fee | int64 | optional | |
onchain_fee | uint64 | optional | |
wallet_id | uint64 | optional | internal wallet which was used to pay the swap |
tenant_id | uint64 | ||
is_auto | bool |
SwapStats β
Field | Type | Label | Description |
---|---|---|---|
total_fees | int64 | ||
total_amount | uint64 | ||
avg_fees | int64 | ||
avg_amount | uint64 | ||
count | uint64 | ||
success_count | uint64 |
Tenant β
Field | Type | Label | Description |
---|---|---|---|
id | uint64 | ||
name | string |
TransactionInfo β
Field | Type | Label | Description |
---|---|---|---|
swap_id | string | optional | will be populated for LOCKUP, REFUND and CLAIM |
type | TransactionType |
TransactionOutput β
Field | Type | Label | Description |
---|---|---|---|
address | string | ||
amount | uint64 | ||
is_our_address | bool | wether the address is controlled by the wallet |
UnlockRequest β
Field | Type | Label | Description |
---|---|---|---|
password | string |
VerifyWalletPasswordRequest β
Field | Type | Label | Description |
---|---|---|---|
password | string |
VerifyWalletPasswordResponse β
Field | Type | Label | Description |
---|---|---|---|
correct | bool |
Wallet β
Field | Type | Label | Description |
---|---|---|---|
id | uint64 | ||
name | string | ||
currency | Currency | ||
readonly | bool | ||
balance | Balance | ||
tenant_id | uint64 |
WalletCredentials β
WalletCredentials describes a BIP32 deterministic wallet that can be either:
- hot (private keys present), derived from a BIP-39 mnemonic, or
- watch-only (public keys only), imported via a descriptor.
Hot wallet:
- Provide
mnemonic
. The master key is derived per BIP-39. - Optional: provide
core_descriptor
to override the default address scheme. If omitted, a chain-specific default will be derived.
Watch-only wallet:
- Provide only
core_descriptor
(nomnemonic
).
Mainchain (Bitcoin):
- Default descriptor: Bitcoin Core descriptor using a BIP-84 derivation path.
- Descriptor format: https://github.com/bitcoin/bitcoin/blob/master/doc/descriptors.md
Liquid (Elements):
- Default descriptor: CT Descriptor using a BIP-84 derivation path and SLIP77 for blinding key derivation.
- Descriptor format: https://github.com/ElementsProject/ELIPs/blob/main/elip-0150.mediawiki
Descriptor requirements:
- Must be valid according to the currency-specific format
- Should describe the walletβs external keychain.
- For hot wallets, the descriptor must be derived from the mnemonicβs master key.
Field | Type | Label | Description |
---|---|---|---|
mnemonic | string | optional | the mnemonic to derive the wallet master private key (BIP39). |
core_descriptor | string | optional | public key descriptor for the wallets external keychain. |
subaccount | uint64 | optional | Deprecated. only used in combination with mnemonic |
xpub | string | optional | Deprecated. |
WalletParams β
Field | Type | Label | Description |
---|---|---|---|
name | string | ||
currency | Currency | ||
password | string | 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 |
---|---|---|---|
id | uint64 |
WalletReceiveResponse β
Field | Type | Label | Description |
---|---|---|---|
address | string |
WalletSendFee β
Field | Type | Label | Description |
---|---|---|---|
amount | uint64 | amount of sats which would be sent | |
fee | uint64 | ||
fee_rate | double | the fee rate used for the estimation in sat/vbyte |
WalletSendRequest β
Field | Type | Label | Description |
---|---|---|---|
id | uint64 | ||
address | string | ||
amount | uint64 | Amount of satoshis to be sent to 'address` | |
sat_per_vbyte | double | optional | Fee rate to use for the transaction |
send_all | bool | optional | Sends all available funds to the address. The amount field is ignored. |
is_swap_address | bool | optional | whether address is the lockup of a swap. |
WalletSendResponse β
Field | Type | Label | Description |
---|---|---|---|
tx_id | string |
WalletTransaction β
Field | Type | Label | Description |
---|---|---|---|
id | string | ||
balance_change | int64 | 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 | |
timestamp | int64 | ||
outputs | TransactionOutput | repeated | |
block_height | uint32 | ||
infos | TransactionInfo | repeated | additional informations about the tx (type, related swaps etc.) |
Wallets β
Field | Type | Label | Description |
---|---|---|---|
wallets | Wallet | 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 |
---|---|
GetRecommendationsRequest | GetRecommendationsResponse |
ExecuteRecommendations β
Executes recommendations previously returned by GetRecommendations
. Intended to be used when autoswap is fully configured but not enabled to allow for manual approval.
Request | Response |
---|---|
ExecuteRecommendationsRequest | ExecuteRecommendationsResponse |
GetStatus β
Returns the current budget of autoswap and some relevant stats.
Request | Response |
---|---|
GetStatusRequest | GetStatusResponse |
UpdateLightningConfig β
Updates the lightning configuration entirely or partially. Autoswap will reload the configuration after this call.
Request | Response |
---|---|
UpdateLightningConfigRequest | Config |
UpdateChainConfig β
Updates the chain configuration entirely or partially. Autoswap will reload the configuration after this call.
Request | Response |
---|---|
UpdateChainConfigRequest | Config |
GetConfig β
Returns the currently used configuration.
Request | Response |
---|---|
GetConfigRequest | Config |
ReloadConfig β
Reloads the configuration from disk.
Request | Response |
---|---|
.google.protobuf.Empty | Config |
Messages β
Budget β
Field | Type | Label | Description |
---|---|---|---|
total | uint64 | ||
remaining | uint64 | ||
start_date | int64 | ||
end_date | int64 | ||
stats | boltzrpc.SwapStats | optional |
ChainConfig β
Field | Type | Label | Description |
---|---|---|---|
enabled | bool | ||
from_wallet | string | ||
to_wallet | string | ||
to_address | string | ||
max_balance | uint64 | ||
reserve_balance | uint64 | ||
max_fee_percent | float | ||
budget | uint64 | ||
budget_interval | uint64 | ||
tenant | string | optional |
ChainRecommendation β
Field | Type | Label | Description |
---|---|---|---|
swap | ChainSwap | optional | Populated when a swap is recommended based on the configured wallet_balance of the configured from_wallet exceeds the currently configured max_balance |
wallet_balance | boltzrpc.Balance | ||
max_balance | uint64 |
ChainSwap β
Field | Type | Label | Description |
---|---|---|---|
amount | uint64 | ||
fee_estimate | uint64 | ||
dismissed_reasons | string | repeated | Reasons for which the swap is not being executed |
Config β
Field | Type | Label | Description |
---|---|---|---|
chain | ChainConfig | repeated | |
lightning | LightningConfig | repeated |
ExecuteRecommendationsRequest β
Field | Type | Label | Description |
---|---|---|---|
lightning | LightningRecommendation | repeated | |
chain | ChainRecommendation | repeated | |
force | bool | optional | Forcefully execute all recommendations, even ones that have dismissal reasons. |
ExecuteRecommendationsResponse β
GetConfigRequest β
GetRecommendationsRequest β
GetRecommendationsResponse β
Field | Type | Label | Description |
---|---|---|---|
lightning | LightningRecommendation | repeated | |
chain | ChainRecommendation | repeated |
GetStatusRequest β
GetStatusResponse β
Field | Type | Label | Description |
---|---|---|---|
lightning | Status | optional | |
chain | Status | optional |
LightningConfig β
Field | Type | Label | Description |
---|---|---|---|
enabled | bool | ||
channel_poll_interval | uint64 | ||
static_address | string | ||
outbound_balance | uint64 | ||
inbound_balance | uint64 | ||
outbound_balance_percent | float | ||
inbound_balance_percent | float | ||
max_fee_percent | float | ||
accept_zero_conf | bool | ||
failure_backoff | uint64 | ||
budget | uint64 | ||
budget_interval | uint64 | ||
currency | boltzrpc.Currency | ||
swap_type | string | ||
per_channel | bool | ||
wallet | string | ||
max_swap_amount | uint64 | ||
tenant | string | optional |
LightningRecommendation β
Field | Type | Label | Description |
---|---|---|---|
swap | LightningSwap | optional | Populated when a swap is recommended for the associated channel , otherwise, the current balances are below the configured thresholds |
channel | boltzrpc.LightningChannel | ||
thresholds | LightningThresholds | the thresholds for a swap to be recommended for the channel |
LightningSwap β
Field | Type | Label | Description |
---|---|---|---|
amount | uint64 | ||
fee_estimate | uint64 | ||
type | boltzrpc.SwapType | ||
dismissed_reasons | string | repeated | Reasons for which the swap is not being executed |
LightningThresholds β
Field | Type | Label | Description |
---|---|---|---|
inbound | uint64 | optional | |
outbound | uint64 | optional |
Status β
Field | Type | Label | Description |
---|---|---|---|
running | bool | ||
error | string | optional | |
budget | Budget | optional | |
description | string |
UpdateChainConfigRequest β
Field | Type | Label | Description |
---|---|---|---|
config | ChainConfig | ||
field_mask | google.protobuf.FieldMask | optional | |
reset | bool | optional |
UpdateLightningConfigRequest β
Field | Type | Label | Description |
---|---|---|---|
config | LightningConfig | optional | |
field_mask | google.protobuf.FieldMask | ||
reset | bool | optional |
Enums β
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) |