UNPKG

@govtechsg/open-attestation

Version:
12 lines (11 loc) 716 B
import { Literal, String } from "runtypes"; import { isHexString } from "@ethersproject/bytes"; export var SchemaId; (function (SchemaId) { SchemaId["v2"] = "https://schema.openattestation.com/2.0/schema.json"; SchemaId["v3"] = "https://schema.openattestation.com/3.0/schema.json"; })(SchemaId || (SchemaId = {})); export var OpenAttestationHexString = String.withConstraint(function (value) { return isHexString("0x".concat(value), 32) || "".concat(value, " has not the expected length of 32 bytes"); }); export var SignatureAlgorithm = Literal("OpenAttestationMerkleProofSignature2018"); export var ProofType = Literal("OpenAttestationSignature2018"); export var ProofPurpose = Literal("assertionMethod");