wavecli exitExitStatus
ExitStatus reports the current phase of an unroll job for the specified VTXO outpoint, including recovery chain progress and sweep state. Proxies waverpc.GetUnrollStatus.
Endpoints
rpc ExitStatus(ExitStatusRequest) returns (ExitStatusResponse)POST/v1/wallet/exit-statusExamples
wavecli exit status --outpoint 4b2e9f1a7c3d5e6f8091a2b3c4d5e6f70819a2b3c4d5e6f708192a3b4c5d6e7f:0wavecli exit status --outpoint 4b2e9f1a7c3d5e6f8091a2b3c4d5e6f70819a2b3c4d5e6f708192a3b4c5d6e7f:0conn, err := grpc.NewClient("localhost:10029",
grpc.WithTransportCredentials(insecure.NewCredentials()))
if err != nil {
log.Fatal(err)
}
defer conn.Close()
client := wavewalletrpc.NewWalletServiceClient(conn)
ctx := context.Background()
req := &wavewalletrpc.ExitStatusRequest{
Outpoint: "4b2e9f1a7c3d5e6f8091a2b3c4d5e6f70819a2b3c4d5e6f708192a3b4c5d6e7f:0",
Detailed: true,
}
resp, err := client.ExitStatus(ctx, req)
if err != nil {
log.Fatal(err)
}
fmt.Println(resp)import grpc
import wallet_pb2
import wallet_pb2_grpc
channel = grpc.insecure_channel('localhost:10029')
stub = wallet_pb2_grpc.WalletServiceStub(channel)
request = wallet_pb2.ExitStatusRequest(
outpoint="4b2e9f1a7c3d5e6f8091a2b3c4d5e6f70819a2b3c4d5e6f708192a3b4c5d6e7f:0",
detailed=True,
)
response = stub.ExitStatus(request)
print(response)const grpc = require('@grpc/grpc-js');
const protoLoader = require('@grpc/proto-loader');
const packageDefinition = protoLoader.loadSync('wallet.proto');
const { wavewalletrpc } = grpc.loadPackageDefinition(packageDefinition);
const client = new wavewalletrpc.WalletService(
'localhost:10029',
grpc.credentials.createInsecure(),
);
const request = {
"outpoint": "4b2e9f1a7c3d5e6f8091a2b3c4d5e6f70819a2b3c4d5e6f708192a3b4c5d6e7f:0",
"detailed": true
};
// Calls wavewalletrpc.WalletService.ExitStatus.
client.exitStatus(request, (err, response) => {
if (err) throw err;
console.log(response);
});curl -X POST http://localhost:10031/v1/wallet/exit-status \
-H 'Content-Type: application/json' \
-d '{"outpoint":"4b2e9f1a7c3d5e6f8091a2b3c4d5e6f70819a2b3c4d5e6f708192a3b4c5d6e7f:0","detailed":true}'const res = await fetch('http://localhost:10031/v1/wallet/exit-status', {
method: 'POST',
headers: { 'Content-Type': 'application/json' },
body: JSON.stringify({
"outpoint": "4b2e9f1a7c3d5e6f8091a2b3c4d5e6f70819a2b3c4d5e6f708192a3b4c5d6e7f:0",
"detailed": true
}),
});
const exitStatusResponse = await res.json();RequestExitStatusRequest
ExitStatusRequest identifies the VTXO whose exit job to query via WalletService.ExitStatus.
outpointstringoutpoint is the VTXO outpoint to query, formatted as "txid:index".
detailedbooldetailed enriches the response with tree/CSV progress and a fee breakdown. It costs one extra child actor round-trip plus a fee estimate, so it should be set only for interactive status commands, not automated polling.
ResponseExitStatusResponse
ExitStatusResponse reports the current phase of an unroll job for WalletService.ExitStatus.
foundboolfound is true if an exit job exists for the requested outpoint.
statusExitJobStatusstatus is the current high-level phase of the exit job.
sweep_txidstringsweep_txid is the txid of the sweep transaction, set once the sweep has been broadcast.
last_errorstringlast_error contains the failure reason if the job is in FAILED status.
phase_detailstringphase_detail is a human-readable one-line description of the current phase, e.g. "materializing layer 2 of 4 (3/7 txs confirmed)". Set only on a detailed query.
progressExitProgressprogress is the tree materialization progress. Set only on a detailed query against a live job.
csvExitCSVcsv is the CSV maturity countdown. Set only on a detailed query, once the target has confirmed.
feesExitFeesfees is the on-chain cost breakdown for the exit. Set only on a detailed query.
best_case_blocks_remainingint32best_case_blocks_remaining is the optimistic block count until a confirmed sweep. Set only on a detailed query.
current_heightint32current_height is the best block height the exit job has observed. Set only on a detailed query against a live job.
ExitJobStatusenum
ExitJobStatus collapses the underlying unroll job phases to a short wallet-facing string set.
| Name | Number | Description |
|---|---|---|
EXIT_JOB_STATUS_UNSPECIFIED | 0 | EXIT_JOB_STATUS_UNSPECIFIED - the proto zero value; no job phase has been reported. |
EXIT_JOB_STATUS_PENDING | 1 | EXIT_JOB_STATUS_PENDING - job created but recovery transactions not yet materialized. |
EXIT_JOB_STATUS_MATERIALIZING | 2 | EXIT_JOB_STATUS_MATERIALIZING - recovery transactions are being broadcast and confirmed on-chain. |
EXIT_JOB_STATUS_CSV_PENDING | 3 | EXIT_JOB_STATUS_CSV_PENDING - recovery transactions confirmed, waiting for the CSV delay to expire. |
EXIT_JOB_STATUS_SWEEPING | 4 | EXIT_JOB_STATUS_SWEEPING - CSV delay expired, sweep transaction is being broadcast/confirmed. |
EXIT_JOB_STATUS_COMPLETED | 5 | EXIT_JOB_STATUS_COMPLETED - terminal: the sweep confirmed and the funds are in the on-chain wallet. |
EXIT_JOB_STATUS_FAILED | 6 | EXIT_JOB_STATUS_FAILED - terminal: an unrecoverable error occurred. |
ExitProgressmessage
ExitProgress describes materialization progress through the exit proof tree. It is populated only for a detailed query against a live exit job.
confirmed_txsuint32confirmed_txs is the number of proof transactions confirmed on-chain.
in_flight_txsuint32in_flight_txs is the number of proof transactions broadcast but not yet observed confirmed.
ready_txsuint32ready_txs is the number of proof transactions ready to broadcast now.
blocked_txsuint32blocked_txs is the number of proof transactions still waiting on an unconfirmed in-proof parent.
total_txsuint32total_txs is the total number of transactions in the exit proof tree.
current_layeruint32current_layer is the frontier layer index: the shallowest topological layer (roots first) that still holds an unconfirmed transaction.
total_layersuint32total_layers is the depth of the exit proof tree.
target_confirmedbooltarget_confirmed is true once the target VTXO transaction has confirmed.
all_proof_confirmedboolall_proof_confirmed is true once every proof-tree transaction has confirmed, so only the CSV wait and final sweep remain.
ExitCSVmessage
ExitCSV describes the target's CSV maturity countdown. It is populated only once the target transaction has confirmed.
target_confirm_heightint32target_confirm_height is the block height at which the target confirmed.
maturity_heightint32maturity_height is the block height at which the target becomes timeout-spendable.
blocks_remainingint32blocks_remaining is how many blocks remain until CSV maturity.
matureboolmature is true once the current height is at or past maturity.
ExitFeesmessage
ExitFees breaks down the on-chain cost of the exit. The CPFP total is estimated from the current fee rate; the sweep fee is the actual built-sweep fee once known, otherwise estimated.
cpfp_fee_satint64cpfp_fee_sat is the wallet-funded CPFP fee across every recovery transaction (estimated).
sweep_fee_satint64sweep_fee_sat is the fee the final sweep pays out of the VTXO value.
total_cost_satint64total_cost_sat is cpfp_fee_sat + sweep_fee_sat.
vtxo_amount_satint64vtxo_amount_sat is the value of the VTXO being exited.
net_recovered_satint64net_recovered_sat is vtxo_amount_sat - sweep_fee_sat.
fee_rate_sat_vbyteint64fee_rate_sat_vbyte is the fee rate used for the estimate.
sweep_fee_actualboolsweep_fee_actual is true when sweep_fee_sat is the real built-sweep fee rather than an estimate.
spent_so_far_satint64spent_so_far_sat is the estimated on-chain fee already committed at this point in the exit: CPFP for the confirmed and in-flight recovery transactions, plus the sweep fee once the sweep is broadcast. It is an estimate, not a realized total; total_cost_sat remains the projected cost of the whole exit.