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.
| Field | Type | Description |
|---|---|---|
outpoint | string | outpoint is the VTXO outpoint to query, formatted as "txid:index". |
detailed | bool | detailed 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.
| Field | Type | Description |
|---|---|---|
found | bool | found is true if an exit job exists for the requested outpoint. |
status | ExitJobStatus | status is the current high-level phase of the exit job. |
sweep_txid | string | sweep_txid is the txid of the sweep transaction, set once the sweep has been broadcast. |
last_error | string | last_error contains the failure reason if the job is in FAILED status. |
phase_detail | string | phase_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. |
progress | ExitProgress | progress is the tree materialization progress. Set only on a detailed query against a live job. |
csv | ExitCSV | csv is the CSV maturity countdown. Set only on a detailed query, once the target has confirmed. |
fees | ExitFees | fees is the on-chain cost breakdown for the exit. Set only on a detailed query. |
best_case_blocks_remaining | int32 | best_case_blocks_remaining is the optimistic block count until a confirmed sweep. Set only on a detailed query. |
current_height | int32 | current_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.
| Field | Type | Description |
|---|---|---|
confirmed_txs | uint32 | confirmed_txs is the number of proof transactions confirmed on-chain. |
in_flight_txs | uint32 | in_flight_txs is the number of proof transactions broadcast but not yet observed confirmed. |
ready_txs | uint32 | ready_txs is the number of proof transactions ready to broadcast now. |
blocked_txs | uint32 | blocked_txs is the number of proof transactions still waiting on an unconfirmed in-proof parent. |
total_txs | uint32 | total_txs is the total number of transactions in the exit proof tree. |
current_layer | uint32 | current_layer is the frontier layer index: the shallowest topological layer (roots first) that still holds an unconfirmed transaction. |
total_layers | uint32 | total_layers is the depth of the exit proof tree. |
target_confirmed | bool | target_confirmed is true once the target VTXO transaction has confirmed. |
all_proof_confirmed | bool | all_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.
| Field | Type | Description |
|---|---|---|
target_confirm_height | int32 | target_confirm_height is the block height at which the target confirmed. |
maturity_height | int32 | maturity_height is the block height at which the target becomes timeout-spendable. |
blocks_remaining | int32 | blocks_remaining is how many blocks remain until CSV maturity. |
mature | bool | mature 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.
| Field | Type | Description |
|---|---|---|
cpfp_fee_sat | int64 | cpfp_fee_sat is the wallet-funded CPFP fee across every recovery transaction (estimated). |
sweep_fee_sat | int64 | sweep_fee_sat is the fee the final sweep pays out of the VTXO value. |
total_cost_sat | int64 | total_cost_sat is cpfp_fee_sat + sweep_fee_sat. |
vtxo_amount_sat | int64 | vtxo_amount_sat is the value of the VTXO being exited. |
net_recovered_sat | int64 | net_recovered_sat is vtxo_amount_sat - sweep_fee_sat. |
fee_rate_sat_vbyte | int64 | fee_rate_sat_vbyte is the fee rate used for the estimate. |
sweep_fee_actual | bool | sweep_fee_actual is true when sweep_fee_sat is the real built-sweep fee rather than an estimate. |
spent_so_far_sat | int64 | spent_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. |