Constitution.ts
Constitution overview
Table of contents
encoding
toCBORBytes
Convert Constitution to CBOR bytes.
Signature
export declare const toCBORBytes: (constitution: Constitution, options?: CBOR.CodecOptions) => Uint8ArrayAdded in v2.0.0
toCBORHex
Convert Constitution to CBOR hex string.
Signature
export declare const toCBORHex: (constitution: Constitution, options?: CBOR.CodecOptions) => stringAdded in v2.0.0
parsing
fromCBORBytes
Parse Constitution from CBOR bytes.
Signature
export declare const fromCBORBytes: (bytes: Uint8Array, options?: CBOR.CodecOptions) => ConstitutionAdded in v2.0.0
fromCBORHex
Parse Constitution from CBOR hex string.
Signature
export declare const fromCBORHex: (hex: string, options?: CBOR.CodecOptions) => ConstitutionAdded in v2.0.0
schemas
Constitution (class)
Constitution per CDDL: constitution = [anchor, script_hash/ nil]
Signature
export declare class ConstitutionAdded 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](): numberutils
CDDLSchema
CDDL tuple schema for Constitution
Signature
export declare const CDDLSchema: Schema.Tuple2<
Schema.Tuple2<typeof Schema.String, typeof Schema.Uint8ArrayFromSelf>,
Schema.NullOr<typeof Schema.Uint8ArrayFromSelf>
>FromCBORBytes
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<
Schema.Tuple2<typeof Schema.String, typeof Schema.Uint8ArrayFromSelf>,
Schema.NullOr<typeof Schema.Uint8ArrayFromSelf>
>,
Schema.SchemaClass<Constitution, Constitution, never>,
never
>
>FromCBORHex
Signature
export declare const FromCBORHex: (
options?: CBOR.CodecOptions
) => Schema.transform<
Schema.transform<
Schema.Schema<Uint8Array, string, never>,
Schema.transformOrFail<
typeof Schema.Uint8ArrayFromSelf,
Schema.declare<CBOR.CBOR, CBOR.CBOR, readonly [], never>,
never
>
>,
Schema.transform<
Schema.transformOrFail<
typeof Schema.Uint8ArrayFromSelf,
Schema.declare<CBOR.CBOR, CBOR.CBOR, readonly [], never>,
never
>,
Schema.transformOrFail<
Schema.Tuple2<
Schema.Tuple2<typeof Schema.String, typeof Schema.Uint8ArrayFromSelf>,
Schema.NullOr<typeof Schema.Uint8ArrayFromSelf>
>,
Schema.SchemaClass<Constitution, Constitution, never>,
never
>
>
>FromCDDL
Transform between CDDL tuple and typed Constitution
Signature
export declare const FromCDDL: Schema.transformOrFail<
Schema.Tuple2<
Schema.Tuple2<typeof Schema.String, typeof Schema.Uint8ArrayFromSelf>,
Schema.NullOr<typeof Schema.Uint8ArrayFromSelf>
>,
Schema.SchemaClass<Constitution, Constitution, never>,
never
>arbitrary
Arbitrary for Constitution
Signature
export declare const arbitrary: FastCheck.Arbitrary<Constitution>