ReqData

Internet Computer Request Data

This library provides functionality for the data structures encountered when interacting with the Internet Computer, in particular its HTTP API, certificates and canister signatures.

This contains the generic functionality: A data type R for such values, CBOR encoding (encodeCBOR) and the “[Representation-independent hash[” (hash).

type R = [(Text, V)]

A generic record or map of value

type V = {#blob : Blob; #string : Text; #nat : Nat; #array : [V]; #map : R}

A structured value

public func hash(r : R) : Blob

Calculate the representation-independent hash

public func encodeCBOR(r : R) : Blob

CBOR-encode the value (including the CBOR self-describing tag)