Add node registration claim transport
This commit is contained in:
parent
b8680e82e1
commit
27cd1645da
8 changed files with 369 additions and 25 deletions
|
|
@ -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,
|
||||
|
|
|
|||
Loading…
Reference in a new issue