WalletServiceCLIwavecli send

PrepareSend

PrepareSend validates and previews an outbound payment without moving funds. The response carries a short-lived send_intent_id that must be consumed by Send.

Endpoints

gRPCrpc PrepareSend(PrepareSendRequest) returns (PrepareSendResponse)
RESTPOST/v1/wallet/prepare-send

Examples

wavecli send lnbcrt250u1p3xyz...truncated --note "coffee run" --force

RequestPrepareSendRequest

PrepareSendRequest describes the outbound payment to validate and preview via WalletService.PrepareSend, before any funds move.

FieldTypeDescription
invoiceoneof destinationstring

invoice is a BOLT-11 Lightning invoice. The daemon pays it via its owned swap subsystem; the swap server picks same-Ark p2p vs real Lightning transparently.

onchain_addressoneof destinationstring

onchain_address is a bech32 onchain destination. The daemon submits a LeaveVTXOs request covering amt_sat plus fees.

amt_satuint64

amt_sat is required for onchain sends. For onchain sends amt_sat must be strictly positive unless sweep_all is set, in which case it must be zero. For invoice sends amt_sat is ignored: v1 requires an amount-bearing BOLT-11 invoice; amountless invoices are rejected at the wallet layer until plumbing for caller-supplied amounts lands in the swap subserver.

notestring

note is an optional caller-supplied label persisted alongside the entry. It is never interpreted by the daemon.

max_fee_satuint64

max_fee_sat is the optional caller cap on routing or sweep fees. Zero means use daemon defaults.

sweep_allbool

sweep_all signals an explicit wallet-emptying onchain send: every live VTXO is swept to the destination, less fees. The caller must set amt_sat = 0 when this flag is true and a strictly positive amt_sat otherwise. This makes "drain the wallet" structurally distinct from "amt_sat defaulted to zero" so a typo cannot empty the wallet by accident. Ignored on the invoice path.

ResponsePrepareSendResponse

PrepareSendResponse is the preview of a prepared send: the single-use intent token plus the amount, fee, rail, and quote detail a caller should confirm before calling Send.

FieldTypeDescription
send_intent_idstring

send_intent_id is a short-lived, single-use token consumed by Send.

amount_satint64

amount_sat is the destination principal amount.

expected_fee_satint64

expected_fee_sat is meaningful only when fee_known is true.

fee_knownbool

fee_known is false when a required remote quote API is missing.

expected_total_outflow_satint64

expected_total_outflow_sat is meaningful only when total_outflow_known is true.

total_outflow_knownbool

total_outflow_known is false when the final outflow depends on a remote quote that is not available yet.

railSendRail

rail is the expected settlement rail for this prepared send. Onchain prepares always return SEND_RAIL_ONCHAIN. Invoice prepares map the swap quote settlement type when a remote quote is available; when no quote is available (LOCAL_ONLY) or the quote does not distinguish same-Ark from Lightning, the value is SEND_RAIL_OFFCHAIN_UNKNOWN until Send starts.

quote_statusSendQuoteStatus

quote_status describes how complete the prepare-time quote is. Invoice sends: COMPLETE when every amount and fee is backed by a swap remote quote; LOCAL_ONLY when the invoice parsed locally but the swap quote API was unavailable. Onchain sends: COMPLETE when waverpc.EstimateFee returned a binding operator quote; LOCAL_ONLY when only a local fee floor could be computed.

destination_summarystring

destination_summary is a short display string suitable for CLI and UI confirmation prompts.

invoice_descriptionstring

invoice_description is the BOLT-11 description when present.

payment_hashstring

payment_hash is the invoice payment hash when available.

expires_at_unixint64

expires_at_unix is the unix timestamp after which Send rejects the prepared intent.

selected_outpointsrepeated string

selected_outpoints is populated for onchain sends so Send can spend exactly the VTXO set previewed to the user.

warningstring

warning carries a concise human-facing caveat for local-only previews.

credit_previewCreditPreview

credit_preview is populated when the invoice send will or can use sat-native server credits.

SendRailenum

SendRail identifies the expected settlement rail for a prepared send.

NameNumberDescription
SEND_RAIL_UNSPECIFIED0

SEND_RAIL_UNSPECIFIED is the proto zero value used when no rail has been determined.

SEND_RAIL_OFFCHAIN_UNKNOWN1

SEND_RAIL_OFFCHAIN_UNKNOWN is used when the wallet can parse the invoice locally but the swapserver has not supplied a quote that distinguishes same-Ark settlement from Lightning settlement.

SEND_RAIL_IN_ARK2

SEND_RAIL_IN_ARK is same-Ark peer-to-peer settlement, where the payment never touches Lightning.

SEND_RAIL_LIGHTNING3

SEND_RAIL_LIGHTNING is settlement over the real Lightning network.

SEND_RAIL_ONCHAIN4

SEND_RAIL_ONCHAIN is an on-chain send via a cooperative leave to the destination address.

SEND_RAIL_CREDIT5

SEND_RAIL_CREDIT is settlement drawn from the wallet's server-side credit balance.

SEND_RAIL_MIXED6

SEND_RAIL_MIXED is settlement that combines credit with the normal vHTLC path.

SendQuoteStatusenum

SendQuoteStatus describes how complete the prepare-time quote is.

NameNumberDescription
SEND_QUOTE_STATUS_UNSPECIFIED0

SEND_QUOTE_STATUS_UNSPECIFIED is the proto zero value; quote completeness was not reported.

SEND_QUOTE_STATUS_COMPLETE1

SEND_QUOTE_STATUS_COMPLETE means every user-visible amount and fee field is backed by a remote quote.

SEND_QUOTE_STATUS_LOCAL_ONLY2

SEND_QUOTE_STATUS_LOCAL_ONLY means the wallet performed local validation and selection but one or more remote quote APIs are not available yet.

CreditPreviewmessage

CreditPreview describes how server-side sat-native credits factor into a prepared send. It is populated on PrepareSendResponse when the invoice send will or can draw on credits.

FieldTypeDescription
must_use_creditbool

must_use_credit is true when the invoice amount cannot be represented by the normal vHTLC path and the send must be settled from the credit balance.

credit_applied_satuint64

credit_applied_sat is the credit balance in satoshis the quote expects to reserve for this send.

credit_shortfall_satuint64

credit_shortfall_sat is the additional credit in satoshis needed before this payment can be admitted.

credit_topup_satuint64

credit_topup_sat is the Ark top-up amount in satoshis required to cover the shortfall. It is rounded up and dust-limited by the server.

ark_funding_satuint64

ark_funding_sat is the amount in satoshis the client must still fund through the normal vHTLC path.