Renew the device certificate from the browser, with the recovery phrase

Within the last 30 days the owner page offers it. The node signs a new certificate for the same device key (peer ID and listings stay), saves it, and signs again own listings that would outlive the old certificate. The phrase is used for one request and not kept; another identity's phrase and no-phrase identities are refused. Device.Current gives the certificate to sign with while a renewal happens.

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_01AeFqV96dVeBX94inzcgZKw
This commit is contained in:
2026-11-18 23:19:30 +01:00
co-authored by Claude Sonnet 5.5
parent 210ba1b3e9
commit dfe35b422d
23 changed files with 1011 additions and 29 deletions
+4
View File
@@ -14,6 +14,10 @@ export interface Status {
difficulty: number;
/** Proof-of-work bits a message needs; absent on nodes without messaging. */
message_difficulty?: number;
/** When this node's device certificate runs out, in unix seconds; absent on older nodes. */
cert_expires_at?: number;
/** Whether the owner can renew that certificate here (it needs the recovery phrase). */
can_renew?: boolean;
}
async function getJSON(url: string): Promise<unknown> {