pub fn create_gateway_registration_message(
federation_public_key: PublicKey,
nonce: u64,
info: &LightningGateway,
) -> MessageExpand description
Creates a message to be signed by the gateway’s private key to prove that a
registration was authorized by the holder of info.gateway_id. Message is
defined as:
msg = sha256(tag + federation_public_key + nonce + info)
Tag is always register-gateway. Binding the federation public key stops a
registration being replayed at a different federation, and the nonce stops
an old registration being replayed at the same one.
Note this deliberately covers info but not the announcement’s ttl or
vetted flag. ttl is recomputed from valid_until every time a
registration is read back (LightningGatewayRegistration::unanchor), so a
signature over it would not survive being served to clients; it is bounded
by MAX_GATEWAY_REGISTRATION_TTL instead. vetted is not the gateway’s
to assert, and guardians clear it on registration.