Function add_service_node_attestation

pub fn add_service_node_attestation(
    token: Vec<u8>,
    public_key: PublicKey,
    service: &str,
    node_key: &KeyPair,
) -> Result<Vec<u8>, TokenError>
Expand description

Add a service node attestation to a token

This function adds a third-party block to a token that attests that the token has passed through the specified service node.

§Arguments

  • token - The binary token data
  • public_key - The public key to verify the token
  • service - The service identifier
  • node_name - The name of the node attesting
  • node_key - The public key of the node attesting
  • node_private_key - Optional private key for signing, if not provided a test key will be generated

§Returns

The attested token binary data