Build a withdrawal calendar from Cosmos unbonding entries
An undelegation can contain several entries with different completion times. One date attached to the whole validator position hides later releases.
Inspect the entries for one validator
Set ADDR and VAL to the delegator and validator operator addresses. Query a TLS gRPC endpoint with reflection in GRPC. Read each entry’s completionTime, initialBalance and balance.
grpcurl -d "{\"delegatorAddr\":\"$ADDR\",\"validatorAddr\":\"$VAL\"}" "$GRPC" cosmos.staking.v1beta1.Query/UnbondingDelegation
If 40 units complete on Monday and 60 on Thursday, display two releases. Use the current entry balance for the estimate. The initial balance is valuable when tracing changes such as a slash.
Confirm release on chain
The completion timestamp indicates when processing becomes eligible. Chain halts and supported unbonding holds can delay the release. Refresh the entry and bank balance after a new block before marking the amount spendable. github.com Cosmos SDK Query API