Add node registration claim transport

This commit is contained in:
冰朔 2026-08-10 07:28:11 +08:00
commit 27cd1645da
8 changed files with 369 additions and 25 deletions

View file

@ -204,6 +204,15 @@ export function resolveNodeRegistrationEndpoint(
return endpoint;
}
export function assertRegisteredNodeRegistrationEndpoint(
endpoint: NodeRegistrationEndpoint,
): NodeRegistrationEndpoint {
if (!registeredEndpoints.has(endpoint)) {
throw new Error('node_registration_endpoint_unregistered');
}
return endpoint;
}
export function nodeRegistrationClaimSigningBytes(payload: NodeRegistrationClaimPayload): Buffer {
return Buffer.from(JSON.stringify({
accountId: payload.accountId,