VrfCert.ts
VrfCert overview
Table of contents
- FastCheck
- decoding
- encoding
- model
- predicates
- schemas
- utils
FastCheck
arbitrary
Signature
export declare const arbitrary: FastCheck.Arbitrary<VrfCert>Added in v2.0.0
decoding
fromCBORHex
Convert CBOR hex to VrfCert (unsafe).
Signature
export declare const fromCBORHex: (hex: string, options?: CBOR.CodecOptions) => VrfCertAdded in v2.0.0
encoding
fromCBORBytes
Convert CBOR bytes to VrfCert (unsafe).
Signature
export declare const fromCBORBytes: (bytes: Uint8Array, options?: CBOR.CodecOptions) => VrfCertAdded in v2.0.0
toCBORBytes
Convert VrfCert to CBOR bytes (unsafe).
Signature
export declare const toCBORBytes: (vrfCert: VrfCert, options?: CBOR.CodecOptions) => anyAdded in v2.0.0
toCBORHex
Convert VrfCert to CBOR hex (unsafe).
Signature
export declare const toCBORHex: (vrfCert: VrfCert, options?: CBOR.CodecOptions) => stringAdded in v2.0.0
model
VrfCert (class)
Schema for VrfCert representing a VRF certificate. vrf_cert = [vrf_output, vrf_proof]
Signature
export declare class VrfCertAdded in v2.0.0
toJSON (method)
Signature
toJSON()toString (method)
Signature
toString(): string[Inspectable.NodeInspectSymbol] (method)
Signature
[Inspectable.NodeInspectSymbol](): unknown[Equal.symbol] (method)
Signature
[Equal.symbol](that: unknown): boolean[Hash.symbol] (method)
Signature
[Hash.symbol](): numberpredicates
isVrfCert
Check if the given value is a valid VrfCert.
Signature
export declare const isVrfCert: (u: unknown, overrideOptions?: ParseOptions | number) => u is VrfCertAdded in v2.0.0
schemas
FromCBORBytes
CBOR bytes transformation schema for VrfCert.
Signature
export declare const FromCBORBytes: (
options?: CBOR.CodecOptions
) => Schema.transform<
Schema.transformOrFail<
typeof Schema.Uint8ArrayFromSelf,
Schema.declare<CBOR.CBOR, CBOR.CBOR, readonly [], never>,
never
>,
Schema.transformOrFail<
Schema.Tuple2<typeof Schema.Uint8ArrayFromSelf, typeof Schema.Uint8ArrayFromSelf>,
Schema.SchemaClass<VrfCert, VrfCert, never>,
never
>
>Added in v2.0.0
FromCBORHex
CBOR hex transformation schema for VrfCert.
Signature
export declare const FromCBORHex: (
options?: CBOR.CodecOptions
) => Schema.transform<
Schema.Schema<Uint8Array, string, never>,
Schema.transform<
Schema.transformOrFail<
typeof Schema.Uint8ArrayFromSelf,
Schema.declare<CBOR.CBOR, CBOR.CBOR, readonly [], never>,
never
>,
Schema.transformOrFail<
Schema.Tuple2<typeof Schema.Uint8ArrayFromSelf, typeof Schema.Uint8ArrayFromSelf>,
Schema.SchemaClass<VrfCert, VrfCert, never>,
never
>
>
>Added in v2.0.0
FromCDDL
CDDL schema for VrfCert as tuple structure. vrf_cert = [vrf_output, vrf_proof] vrf_output = bytes .size 32 vrf_proof = bytes .size 80
Signature
export declare const FromCDDL: Schema.transformOrFail<
Schema.Tuple2<typeof Schema.Uint8ArrayFromSelf, typeof Schema.Uint8ArrayFromSelf>,
Schema.SchemaClass<VrfCert, VrfCert, never>,
never
>Added in v2.0.0
VRFOutput (class)
Schema for VRF output (32 bytes). vrf_output = bytes .size 32
Signature
export declare class VRFOutputAdded in v2.0.0
toJSON (method)
Signature
toJSON()toString (method)
Signature
toString(): string[Inspectable.NodeInspectSymbol] (method)
Signature
[Inspectable.NodeInspectSymbol](): unknown[Equal.symbol] (method)
Signature
[Equal.symbol](that: unknown): boolean[Hash.symbol] (method)
Signature
[Hash.symbol](): numberVRFOutputFromBytes
Schema for VRF output as a byte array. vrf_output = bytes .size 32
Signature
export declare const VRFOutputFromBytes: Schema.transform<
Schema.SchemaClass<Uint8Array, Uint8Array, never>,
Schema.SchemaClass<VRFOutput, VRFOutput, never>
>Added in v2.0.0
VRFOutputHexSchema
Schema for VRF output as a hex string. vrf_output = bytes .size 32
Signature
export declare const VRFOutputHexSchema: Schema.transform<
Schema.filter<Schema.Schema<Uint8Array, string, never>>,
Schema.SchemaClass<VRFOutput, VRFOutput, never>
>Added in v2.0.0
VRFProof (class)
Schema for VRF proof (80 bytes). vrf_proof = bytes .size 80
Signature
export declare class VRFProofAdded in v2.0.0
toJSON (method)
Signature
toJSON()toString (method)
Signature
toString(): string[Inspectable.NodeInspectSymbol] (method)
Signature
[Inspectable.NodeInspectSymbol](): unknown[Equal.symbol] (method)
Signature
[Equal.symbol](that: unknown): boolean[Hash.symbol] (method)
Signature
[Hash.symbol](): numberVRFProofFromBytes
Schema for VRF proof as a byte array. vrf_proof = bytes .size 80
Signature
export declare const VRFProofFromBytes: Schema.transform<
Schema.SchemaClass<Uint8Array, Uint8Array, never>,
Schema.SchemaClass<VRFProof, VRFProof, never>
>Added in v2.0.0
VRFProofHexSchema
Schema for VRF proof as a hex string. vrf_proof = bytes .size 80
Signature
export declare const VRFProofHexSchema: Schema.transform<
Schema.filter<Schema.Schema<Uint8Array, string, never>>,
Schema.SchemaClass<VRFProof, VRFProof, never>
>Added in v2.0.0
utils
CDDLSchema
Signature
export declare const CDDLSchema: Schema.Tuple2<typeof Schema.Uint8ArrayFromSelf, typeof Schema.Uint8ArrayFromSelf>