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 |
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) |
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 |
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 |
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. |
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
Field | Type | Label | Description |
---|---|---|---|
mnemonic | string | optional | only one of these is allowed to be present |
xpub | string | optional | |
core_descriptor | string | optional | |
subaccount | uint64 | optional | only used in combination with mnemonic |
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) |