feat: add wallet-signed proof of life pings - #1052
Open
Agbeleshe wants to merge 1 commit into
Open
Conversation
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
frontend: Implement Interactive Proof-of-Life Ping Widget and Dynamic Inactivity Countdown
Summary
This PR implements the missing Proof-of-Life Ping workflow for asset owners and improves the inactivity timer so that it updates dynamically after a successful ping.
Previously,
InactivityTimerCard.tsxonly displayed inactivity countdown information without giving the asset owner a way to actively confirm that they are still present. This meant the frontend lacked the required interaction for resetting the inactivity period and preventing an inheritance plan from progressing toward a triggered or claimable state.With this update, asset owners can now submit a wallet-authorized proof-of-life ping directly from the dashboard. Once the ping succeeds, the latest activity timestamp is refreshed and the inactivity countdown is recalculated immediately.
What Was Implemented
Interactive Proof-of-Life Ping
Added a Send Proof-of-Life Ping action to the inactivity timer interface.
The asset owner can now initiate a proof-of-life confirmation directly from the dashboard instead of relying on a static inactivity timer.
The flow now:
WalletContext.pingflow where applicable.Wallet-Signed Authorization
The proof-of-life action is tied to the asset owner's connected wallet.
For Ed25519-based wallets, the frontend can sign the generated proof-of-life challenge before submitting it to:
POST /api/plans/pingWhere the Soroban-based implementation is being used, the flow can instead authorize or invoke the corresponding smart contract
pingoperation.This ensures that simply clicking the button is not enough to reset the inactivity timer. The proof-of-life action must first be authorized by the wallet associated with the inheritance plan.
Dynamic Inactivity Countdown
The inactivity timer has been updated so that it no longer behaves as static dashboard data.
After a successful proof-of-life ping:
The countdown continues to display the remaining inactivity period based on the latest valid proof-of-life timestamp.
Loading and Submission States
Added appropriate interaction states around the ping workflow.
The interface now handles:
The Send Ping action is disabled while an existing ping request is being processed to avoid duplicate requests.
Error Handling
Failure states are handled without incorrectly resetting the inactivity timer.
If any part of the flow fails, including:
the existing inactivity state remains unchanged.
The inactivity deadline is only refreshed after a confirmed successful proof-of-life submission.
Asset Owner Dashboard Integration
The proof-of-life workflow has also been integrated into the main Asset Owner Dashboard.
The dashboard now:
WalletContext.API Integration
Updated the inheritance API layer to support proof-of-life submission through:
POST /api/plans/pingThe request can include the relevant information required by the backend, such as:
The API helper also normalizes successful and failed responses so that the UI can provide appropriate feedback.
Affected Files
frontend/components/plans/InactivityTimerCard.tsxfrontend/app/asset-owner/page.tsxfrontend/app/lib/api/inheritance.tsPOST /api/plans/ping.User Flow
The completed user flow is now:
Asset Owner Dashboard
→ View current inactivity countdown
→ Click Send Proof-of-Life Ping
→ Wallet authorization/signature requested
→ Challenge signed by the asset owner's wallet
→ Proof submitted to the inheritance API / Soroban contract
→ Proof validated successfully
→ Latest activity timestamp updated
→ Inactivity deadline recalculated
→ Countdown refreshes automatically
→ Plan remains active and is prevented from progressing toward the inactivity trigger
Validation
The implementation was validated against the expected successful flow:
Result
The inheritance frontend now provides a complete interactive proof-of-life experience.
Asset owners are no longer limited to viewing a static inactivity countdown. They can actively prove that they are still present through their connected wallet, and a successful proof immediately resets and updates the inactivity countdown shown throughout the dashboard.
This provides the frontend interaction necessary to support the inheritance protocol's proof-of-life mechanism and helps prevent valid asset-owner plans from unintentionally entering the triggered or claimable state.
Closes #1033