Evolution SDK

Certificate.ts

Certificate overview


Table of contents


encoding

toCBORBytes

Convert a Certificate to CBOR bytes.

Signature

export declare const toCBORBytes: (certificate: Certificate, options?: CBOR.CodecOptions) => Uint8Array

Added in v2.0.0

toCBORHex

Convert a Certificate to CBOR hex string.

Signature

export declare const toCBORHex: (certificate: Certificate, options?: CBOR.CodecOptions) => string

Added in v2.0.0

model

Certificate (type alias)

Type alias for Certificate.

Signature

export type Certificate = typeof Certificate.Type

Added in v2.0.0

parsing

fromCBORBytes

Parse a Certificate from CBOR bytes.

Signature

export declare const fromCBORBytes: (bytes: Uint8Array, options?: CBOR.CodecOptions) => Certificate

Added in v2.0.0

fromCBORHex

Parse a Certificate from CBOR hex string.

Signature

export declare const fromCBORHex: (hex: string, options?: CBOR.CodecOptions) => Certificate

Added in v2.0.0

predicates

is

Check if the given value is a valid Certificate.

Signature

export declare const is: (
  u: unknown,
  overrideOptions?: ParseOptions | number
) => u is
  | StakeRegistration
  | StakeDeregistration
  | StakeDelegation
  | PoolRegistration
  | PoolRetirement
  | RegCert
  | UnregCert
  | VoteDelegCert
  | StakeVoteDelegCert
  | StakeRegDelegCert
  | VoteRegDelegCert
  | StakeVoteRegDelegCert
  | AuthCommitteeHotCert
  | ResignCommitteeColdCert
  | RegDrepCert
  | UnregDrepCert
  | UpdateDrepCert

Added in v2.0.0

schemas

Certificate

Certificate union schema based on Conway CDDL specification

CDDL: certificate = [ stake_registration // stake_deregistration // stake_delegation // pool_registration // pool_retirement // reg_cert // unreg_cert // vote_deleg_cert // stake_vote_deleg_cert // stake_reg_deleg_cert // vote_reg_deleg_cert // stake_vote_reg_deleg_cert // auth_committee_hot_cert // resign_committee_cold_cert // reg_drep_cert // unreg_drep_cert // update_drep_cert ]

stake_registration = (0, stake_credential) stake_deregistration = (1, stake_credential) stake_delegation = (2, stake_credential, pool_keyhash) pool_registration = (3, pool_params) pool_retirement = (4, pool_keyhash, epoch_no) reg_cert = (7, stake_credential, coin) unreg_cert = (8, stake_credential, coin) vote_deleg_cert = (9, stake_credential, drep) stake_vote_deleg_cert = (10, stake_credential, pool_keyhash, drep) stake_reg_deleg_cert = (11, stake_credential, pool_keyhash, coin) vote_reg_deleg_cert = (12, stake_credential, drep, coin) stake_vote_reg_deleg_cert = (13, stake_credential, pool_keyhash, drep, coin) auth_committee_hot_cert = (14, committee_cold_credential, committee_hot_credential) resign_committee_cold_cert = (15, committee_cold_credential, anchor/ nil) reg_drep_cert = (16, drep_credential, coin, anchor/ nil) unreg_drep_cert = (17, drep_credential, coin) update_drep_cert = (18, drep_credential, anchor/ nil)

Signature

export declare const Certificate: Schema.Union<
  [
    typeof StakeRegistration,
    typeof StakeDeregistration,
    typeof StakeDelegation,
    typeof PoolRegistration,
    typeof PoolRetirement,
    typeof RegCert,
    typeof UnregCert,
    typeof VoteDelegCert,
    typeof StakeVoteDelegCert,
    typeof StakeRegDelegCert,
    typeof VoteRegDelegCert,
    typeof StakeVoteRegDelegCert,
    typeof AuthCommitteeHotCert,
    typeof ResignCommitteeColdCert,
    typeof RegDrepCert,
    typeof UnregDrepCert,
    typeof UpdateDrepCert
  ]
>

Added in v2.0.0

FromCBORBytes

CBOR bytes transformation schema for Certificate.

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.Union<
      [
        Schema.Tuple2<Schema.Literal<[0n]>, Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>>,
        Schema.Tuple2<Schema.Literal<[1n]>, Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>>,
        Schema.Tuple<
          [
            Schema.Literal<[2n]>,
            Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>,
            typeof Schema.Uint8ArrayFromSelf
          ]
        >,
        Schema.Tuple<
          [
            Schema.Literal<[3n]>,
            typeof Schema.Uint8ArrayFromSelf,
            typeof Schema.Uint8ArrayFromSelf,
            typeof Schema.BigIntFromSelf,
            typeof Schema.BigIntFromSelf,
            Schema.TaggedStruct<
              "Tag",
              {
                tag: Schema.Literal<[30]>
                value: Schema.Tuple2<typeof Schema.BigIntFromSelf, typeof Schema.BigIntFromSelf>
              }
            >,
            typeof Schema.Uint8ArrayFromSelf,
            Schema.Array$<typeof Schema.Uint8ArrayFromSelf>,
            Schema.Array$<
              Schema.SchemaClass<
                readonly [0n, bigint | null, any, any] | readonly [1n, bigint | null, string] | readonly [2n, string],
                readonly [0n, bigint | null, any, any] | readonly [1n, bigint | null, string] | readonly [2n, string],
                never
              >
            >,
            Schema.NullOr<Schema.SchemaClass<readonly [string, any], readonly [string, any], never>>
          ]
        >,
        Schema.Tuple<[Schema.Literal<[4n]>, typeof Schema.Uint8ArrayFromSelf, typeof Schema.BigIntFromSelf]>,
        Schema.Tuple<
          [
            Schema.Literal<[7n]>,
            Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>,
            typeof Schema.BigIntFromSelf
          ]
        >,
        Schema.Tuple<
          [
            Schema.Literal<[8n]>,
            Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>,
            typeof Schema.BigIntFromSelf
          ]
        >,
        Schema.Tuple<
          [
            Schema.Literal<[9n]>,
            Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>,
            Schema.Union<
              [
                Schema.Tuple2<Schema.Literal<[0n]>, typeof Schema.Uint8ArrayFromSelf>,
                Schema.Tuple2<Schema.Literal<[1n]>, typeof Schema.Uint8ArrayFromSelf>,
                Schema.Tuple<[Schema.Literal<[2n]>]>,
                Schema.Tuple<[Schema.Literal<[3n]>]>
              ]
            >
          ]
        >,
        Schema.Tuple<
          [
            Schema.Literal<[10n]>,
            Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>,
            typeof Schema.Uint8ArrayFromSelf,
            Schema.Union<
              [
                Schema.Tuple2<Schema.Literal<[0n]>, typeof Schema.Uint8ArrayFromSelf>,
                Schema.Tuple2<Schema.Literal<[1n]>, typeof Schema.Uint8ArrayFromSelf>,
                Schema.Tuple<[Schema.Literal<[2n]>]>,
                Schema.Tuple<[Schema.Literal<[3n]>]>
              ]
            >
          ]
        >,
        Schema.Tuple<
          [
            Schema.Literal<[11n]>,
            Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>,
            typeof Schema.Uint8ArrayFromSelf,
            typeof Schema.BigIntFromSelf
          ]
        >,
        Schema.Tuple<
          [
            Schema.Literal<[12n]>,
            Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>,
            Schema.Union<
              [
                Schema.Tuple2<Schema.Literal<[0n]>, typeof Schema.Uint8ArrayFromSelf>,
                Schema.Tuple2<Schema.Literal<[1n]>, typeof Schema.Uint8ArrayFromSelf>,
                Schema.Tuple<[Schema.Literal<[2n]>]>,
                Schema.Tuple<[Schema.Literal<[3n]>]>
              ]
            >,
            typeof Schema.BigIntFromSelf
          ]
        >,
        Schema.Tuple<
          [
            Schema.Literal<[13n]>,
            Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>,
            typeof Schema.Uint8ArrayFromSelf,
            Schema.Union<
              [
                Schema.Tuple2<Schema.Literal<[0n]>, typeof Schema.Uint8ArrayFromSelf>,
                Schema.Tuple2<Schema.Literal<[1n]>, typeof Schema.Uint8ArrayFromSelf>,
                Schema.Tuple<[Schema.Literal<[2n]>]>,
                Schema.Tuple<[Schema.Literal<[3n]>]>
              ]
            >,
            typeof Schema.BigIntFromSelf
          ]
        >,
        Schema.Tuple<
          [
            Schema.Literal<[14n]>,
            Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>,
            Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>
          ]
        >,
        Schema.Tuple<
          [
            Schema.Literal<[15n]>,
            Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>,
            Schema.NullishOr<Schema.Tuple2<typeof Schema.String, typeof Schema.Uint8ArrayFromSelf>>
          ]
        >,
        Schema.Tuple<
          [
            Schema.Literal<[16n]>,
            Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>,
            typeof Schema.BigIntFromSelf,
            Schema.NullishOr<Schema.Tuple2<typeof Schema.String, typeof Schema.Uint8ArrayFromSelf>>
          ]
        >,
        Schema.Tuple<
          [
            Schema.Literal<[17n]>,
            Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>,
            typeof Schema.BigIntFromSelf
          ]
        >,
        Schema.Tuple<
          [
            Schema.Literal<[18n]>,
            Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>,
            Schema.NullishOr<Schema.Tuple2<typeof Schema.String, typeof Schema.Uint8ArrayFromSelf>>
          ]
        >
      ]
    >,
    Schema.SchemaClass<
      | StakeRegistration
      | StakeDeregistration
      | StakeDelegation
      | PoolRegistration
      | PoolRetirement
      | RegCert
      | UnregCert
      | VoteDelegCert
      | StakeVoteDelegCert
      | StakeRegDelegCert
      | VoteRegDelegCert
      | StakeVoteRegDelegCert
      | AuthCommitteeHotCert
      | ResignCommitteeColdCert
      | RegDrepCert
      | UnregDrepCert
      | UpdateDrepCert,
      | StakeRegistration
      | StakeDeregistration
      | StakeDelegation
      | PoolRegistration
      | PoolRetirement
      | RegCert
      | UnregCert
      | VoteDelegCert
      | StakeVoteDelegCert
      | StakeRegDelegCert
      | VoteRegDelegCert
      | StakeVoteRegDelegCert
      | AuthCommitteeHotCert
      | ResignCommitteeColdCert
      | RegDrepCert
      | UnregDrepCert
      | UpdateDrepCert,
      never
    >,
    never
  >
>

Added in v2.0.0

FromCBORHex

CBOR hex transformation schema for Certificate.

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.Union<
        [
          Schema.Tuple2<
            Schema.Literal<[0n]>,
            Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>
          >,
          Schema.Tuple2<
            Schema.Literal<[1n]>,
            Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>
          >,
          Schema.Tuple<
            [
              Schema.Literal<[2n]>,
              Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>,
              typeof Schema.Uint8ArrayFromSelf
            ]
          >,
          Schema.Tuple<
            [
              Schema.Literal<[3n]>,
              typeof Schema.Uint8ArrayFromSelf,
              typeof Schema.Uint8ArrayFromSelf,
              typeof Schema.BigIntFromSelf,
              typeof Schema.BigIntFromSelf,
              Schema.TaggedStruct<
                "Tag",
                {
                  tag: Schema.Literal<[30]>
                  value: Schema.Tuple2<typeof Schema.BigIntFromSelf, typeof Schema.BigIntFromSelf>
                }
              >,
              typeof Schema.Uint8ArrayFromSelf,
              Schema.Array$<typeof Schema.Uint8ArrayFromSelf>,
              Schema.Array$<
                Schema.SchemaClass<
                  readonly [0n, bigint | null, any, any] | readonly [1n, bigint | null, string] | readonly [2n, string],
                  readonly [0n, bigint | null, any, any] | readonly [1n, bigint | null, string] | readonly [2n, string],
                  never
                >
              >,
              Schema.NullOr<Schema.SchemaClass<readonly [string, any], readonly [string, any], never>>
            ]
          >,
          Schema.Tuple<[Schema.Literal<[4n]>, typeof Schema.Uint8ArrayFromSelf, typeof Schema.BigIntFromSelf]>,
          Schema.Tuple<
            [
              Schema.Literal<[7n]>,
              Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>,
              typeof Schema.BigIntFromSelf
            ]
          >,
          Schema.Tuple<
            [
              Schema.Literal<[8n]>,
              Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>,
              typeof Schema.BigIntFromSelf
            ]
          >,
          Schema.Tuple<
            [
              Schema.Literal<[9n]>,
              Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>,
              Schema.Union<
                [
                  Schema.Tuple2<Schema.Literal<[0n]>, typeof Schema.Uint8ArrayFromSelf>,
                  Schema.Tuple2<Schema.Literal<[1n]>, typeof Schema.Uint8ArrayFromSelf>,
                  Schema.Tuple<[Schema.Literal<[2n]>]>,
                  Schema.Tuple<[Schema.Literal<[3n]>]>
                ]
              >
            ]
          >,
          Schema.Tuple<
            [
              Schema.Literal<[10n]>,
              Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>,
              typeof Schema.Uint8ArrayFromSelf,
              Schema.Union<
                [
                  Schema.Tuple2<Schema.Literal<[0n]>, typeof Schema.Uint8ArrayFromSelf>,
                  Schema.Tuple2<Schema.Literal<[1n]>, typeof Schema.Uint8ArrayFromSelf>,
                  Schema.Tuple<[Schema.Literal<[2n]>]>,
                  Schema.Tuple<[Schema.Literal<[3n]>]>
                ]
              >
            ]
          >,
          Schema.Tuple<
            [
              Schema.Literal<[11n]>,
              Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>,
              typeof Schema.Uint8ArrayFromSelf,
              typeof Schema.BigIntFromSelf
            ]
          >,
          Schema.Tuple<
            [
              Schema.Literal<[12n]>,
              Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>,
              Schema.Union<
                [
                  Schema.Tuple2<Schema.Literal<[0n]>, typeof Schema.Uint8ArrayFromSelf>,
                  Schema.Tuple2<Schema.Literal<[1n]>, typeof Schema.Uint8ArrayFromSelf>,
                  Schema.Tuple<[Schema.Literal<[2n]>]>,
                  Schema.Tuple<[Schema.Literal<[3n]>]>
                ]
              >,
              typeof Schema.BigIntFromSelf
            ]
          >,
          Schema.Tuple<
            [
              Schema.Literal<[13n]>,
              Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>,
              typeof Schema.Uint8ArrayFromSelf,
              Schema.Union<
                [
                  Schema.Tuple2<Schema.Literal<[0n]>, typeof Schema.Uint8ArrayFromSelf>,
                  Schema.Tuple2<Schema.Literal<[1n]>, typeof Schema.Uint8ArrayFromSelf>,
                  Schema.Tuple<[Schema.Literal<[2n]>]>,
                  Schema.Tuple<[Schema.Literal<[3n]>]>
                ]
              >,
              typeof Schema.BigIntFromSelf
            ]
          >,
          Schema.Tuple<
            [
              Schema.Literal<[14n]>,
              Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>,
              Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>
            ]
          >,
          Schema.Tuple<
            [
              Schema.Literal<[15n]>,
              Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>,
              Schema.NullishOr<Schema.Tuple2<typeof Schema.String, typeof Schema.Uint8ArrayFromSelf>>
            ]
          >,
          Schema.Tuple<
            [
              Schema.Literal<[16n]>,
              Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>,
              typeof Schema.BigIntFromSelf,
              Schema.NullishOr<Schema.Tuple2<typeof Schema.String, typeof Schema.Uint8ArrayFromSelf>>
            ]
          >,
          Schema.Tuple<
            [
              Schema.Literal<[17n]>,
              Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>,
              typeof Schema.BigIntFromSelf
            ]
          >,
          Schema.Tuple<
            [
              Schema.Literal<[18n]>,
              Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>,
              Schema.NullishOr<Schema.Tuple2<typeof Schema.String, typeof Schema.Uint8ArrayFromSelf>>
            ]
          >
        ]
      >,
      Schema.SchemaClass<
        | StakeRegistration
        | StakeDeregistration
        | StakeDelegation
        | PoolRegistration
        | PoolRetirement
        | RegCert
        | UnregCert
        | VoteDelegCert
        | StakeVoteDelegCert
        | StakeRegDelegCert
        | VoteRegDelegCert
        | StakeVoteRegDelegCert
        | AuthCommitteeHotCert
        | ResignCommitteeColdCert
        | RegDrepCert
        | UnregDrepCert
        | UpdateDrepCert,
        | StakeRegistration
        | StakeDeregistration
        | StakeDelegation
        | PoolRegistration
        | PoolRetirement
        | RegCert
        | UnregCert
        | VoteDelegCert
        | StakeVoteDelegCert
        | StakeRegDelegCert
        | VoteRegDelegCert
        | StakeVoteRegDelegCert
        | AuthCommitteeHotCert
        | ResignCommitteeColdCert
        | RegDrepCert
        | UnregDrepCert
        | UpdateDrepCert,
        never
      >,
      never
    >
  >
>

Added in v2.0.0

FromCDDL

CDDL schema for Certificate based on Conway specification.

Transforms between CBOR tuple representation and Certificate union. Each certificate type is encoded as [type_id, ...fields]

Signature

export declare const FromCDDL: Schema.transformOrFail<
  Schema.Union<
    [
      Schema.Tuple2<Schema.Literal<[0n]>, Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>>,
      Schema.Tuple2<Schema.Literal<[1n]>, Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>>,
      Schema.Tuple<
        [
          Schema.Literal<[2n]>,
          Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>,
          typeof Schema.Uint8ArrayFromSelf
        ]
      >,
      Schema.Tuple<
        [
          Schema.Literal<[3n]>,
          typeof Schema.Uint8ArrayFromSelf,
          typeof Schema.Uint8ArrayFromSelf,
          typeof Schema.BigIntFromSelf,
          typeof Schema.BigIntFromSelf,
          Schema.TaggedStruct<
            "Tag",
            {
              tag: Schema.Literal<[30]>
              value: Schema.Tuple2<typeof Schema.BigIntFromSelf, typeof Schema.BigIntFromSelf>
            }
          >,
          typeof Schema.Uint8ArrayFromSelf,
          Schema.Array$<typeof Schema.Uint8ArrayFromSelf>,
          Schema.Array$<
            Schema.SchemaClass<
              readonly [0n, bigint | null, any, any] | readonly [1n, bigint | null, string] | readonly [2n, string],
              readonly [0n, bigint | null, any, any] | readonly [1n, bigint | null, string] | readonly [2n, string],
              never
            >
          >,
          Schema.NullOr<Schema.SchemaClass<readonly [string, any], readonly [string, any], never>>
        ]
      >,
      Schema.Tuple<[Schema.Literal<[4n]>, typeof Schema.Uint8ArrayFromSelf, typeof Schema.BigIntFromSelf]>,
      Schema.Tuple<
        [
          Schema.Literal<[7n]>,
          Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>,
          typeof Schema.BigIntFromSelf
        ]
      >,
      Schema.Tuple<
        [
          Schema.Literal<[8n]>,
          Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>,
          typeof Schema.BigIntFromSelf
        ]
      >,
      Schema.Tuple<
        [
          Schema.Literal<[9n]>,
          Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>,
          Schema.Union<
            [
              Schema.Tuple2<Schema.Literal<[0n]>, typeof Schema.Uint8ArrayFromSelf>,
              Schema.Tuple2<Schema.Literal<[1n]>, typeof Schema.Uint8ArrayFromSelf>,
              Schema.Tuple<[Schema.Literal<[2n]>]>,
              Schema.Tuple<[Schema.Literal<[3n]>]>
            ]
          >
        ]
      >,
      Schema.Tuple<
        [
          Schema.Literal<[10n]>,
          Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>,
          typeof Schema.Uint8ArrayFromSelf,
          Schema.Union<
            [
              Schema.Tuple2<Schema.Literal<[0n]>, typeof Schema.Uint8ArrayFromSelf>,
              Schema.Tuple2<Schema.Literal<[1n]>, typeof Schema.Uint8ArrayFromSelf>,
              Schema.Tuple<[Schema.Literal<[2n]>]>,
              Schema.Tuple<[Schema.Literal<[3n]>]>
            ]
          >
        ]
      >,
      Schema.Tuple<
        [
          Schema.Literal<[11n]>,
          Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>,
          typeof Schema.Uint8ArrayFromSelf,
          typeof Schema.BigIntFromSelf
        ]
      >,
      Schema.Tuple<
        [
          Schema.Literal<[12n]>,
          Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>,
          Schema.Union<
            [
              Schema.Tuple2<Schema.Literal<[0n]>, typeof Schema.Uint8ArrayFromSelf>,
              Schema.Tuple2<Schema.Literal<[1n]>, typeof Schema.Uint8ArrayFromSelf>,
              Schema.Tuple<[Schema.Literal<[2n]>]>,
              Schema.Tuple<[Schema.Literal<[3n]>]>
            ]
          >,
          typeof Schema.BigIntFromSelf
        ]
      >,
      Schema.Tuple<
        [
          Schema.Literal<[13n]>,
          Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>,
          typeof Schema.Uint8ArrayFromSelf,
          Schema.Union<
            [
              Schema.Tuple2<Schema.Literal<[0n]>, typeof Schema.Uint8ArrayFromSelf>,
              Schema.Tuple2<Schema.Literal<[1n]>, typeof Schema.Uint8ArrayFromSelf>,
              Schema.Tuple<[Schema.Literal<[2n]>]>,
              Schema.Tuple<[Schema.Literal<[3n]>]>
            ]
          >,
          typeof Schema.BigIntFromSelf
        ]
      >,
      Schema.Tuple<
        [
          Schema.Literal<[14n]>,
          Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>,
          Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>
        ]
      >,
      Schema.Tuple<
        [
          Schema.Literal<[15n]>,
          Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>,
          Schema.NullishOr<Schema.Tuple2<typeof Schema.String, typeof Schema.Uint8ArrayFromSelf>>
        ]
      >,
      Schema.Tuple<
        [
          Schema.Literal<[16n]>,
          Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>,
          typeof Schema.BigIntFromSelf,
          Schema.NullishOr<Schema.Tuple2<typeof Schema.String, typeof Schema.Uint8ArrayFromSelf>>
        ]
      >,
      Schema.Tuple<
        [
          Schema.Literal<[17n]>,
          Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>,
          typeof Schema.BigIntFromSelf
        ]
      >,
      Schema.Tuple<
        [
          Schema.Literal<[18n]>,
          Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>,
          Schema.NullishOr<Schema.Tuple2<typeof Schema.String, typeof Schema.Uint8ArrayFromSelf>>
        ]
      >
    ]
  >,
  Schema.SchemaClass<
    | StakeRegistration
    | StakeDeregistration
    | StakeDelegation
    | PoolRegistration
    | PoolRetirement
    | RegCert
    | UnregCert
    | VoteDelegCert
    | StakeVoteDelegCert
    | StakeRegDelegCert
    | VoteRegDelegCert
    | StakeVoteRegDelegCert
    | AuthCommitteeHotCert
    | ResignCommitteeColdCert
    | RegDrepCert
    | UnregDrepCert
    | UpdateDrepCert,
    | StakeRegistration
    | StakeDeregistration
    | StakeDelegation
    | PoolRegistration
    | PoolRetirement
    | RegCert
    | UnregCert
    | VoteDelegCert
    | StakeVoteDelegCert
    | StakeRegDelegCert
    | VoteRegDelegCert
    | StakeVoteRegDelegCert
    | AuthCommitteeHotCert
    | ResignCommitteeColdCert
    | RegDrepCert
    | UnregDrepCert
    | UpdateDrepCert,
    never
  >,
  never
>

Added in v2.0.0

testing

arbitrary

FastCheck arbitrary for Certificate instances.

Signature

export declare const arbitrary: FastCheck.Arbitrary<
  | StakeRegistration
  | StakeDeregistration
  | StakeDelegation
  | PoolRegistration
  | PoolRetirement
  | RegCert
  | UnregCert
  | VoteDelegCert
  | StakeVoteDelegCert
  | StakeRegDelegCert
  | VoteRegDelegCert
  | StakeVoteRegDelegCert
  | AuthCommitteeHotCert
  | ResignCommitteeColdCert
  | RegDrepCert
  | UnregDrepCert
  | UpdateDrepCert
>

Added in v2.0.0

utils

AuthCommitteeHotCert (class)

Signature

export declare class AuthCommitteeHotCert

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](): number

CDDLSchema

Signature

export declare const CDDLSchema: Schema.Union<
  [
    Schema.Tuple2<Schema.Literal<[0n]>, Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>>,
    Schema.Tuple2<Schema.Literal<[1n]>, Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>>,
    Schema.Tuple<
      [
        Schema.Literal<[2n]>,
        Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>,
        typeof Schema.Uint8ArrayFromSelf
      ]
    >,
    Schema.Tuple<
      [
        Schema.Literal<[3n]>,
        typeof Schema.Uint8ArrayFromSelf,
        typeof Schema.Uint8ArrayFromSelf,
        typeof Schema.BigIntFromSelf,
        typeof Schema.BigIntFromSelf,
        Schema.TaggedStruct<
          "Tag",
          {
            tag: Schema.Literal<[30]>
            value: Schema.Tuple2<typeof Schema.BigIntFromSelf, typeof Schema.BigIntFromSelf>
          }
        >,
        typeof Schema.Uint8ArrayFromSelf,
        Schema.Array$<typeof Schema.Uint8ArrayFromSelf>,
        Schema.Array$<
          Schema.SchemaClass<
            readonly [0n, bigint | null, any, any] | readonly [1n, bigint | null, string] | readonly [2n, string],
            readonly [0n, bigint | null, any, any] | readonly [1n, bigint | null, string] | readonly [2n, string],
            never
          >
        >,
        Schema.NullOr<Schema.SchemaClass<readonly [string, any], readonly [string, any], never>>
      ]
    >,
    Schema.Tuple<[Schema.Literal<[4n]>, typeof Schema.Uint8ArrayFromSelf, typeof Schema.BigIntFromSelf]>,
    Schema.Tuple<
      [
        Schema.Literal<[7n]>,
        Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>,
        typeof Schema.BigIntFromSelf
      ]
    >,
    Schema.Tuple<
      [
        Schema.Literal<[8n]>,
        Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>,
        typeof Schema.BigIntFromSelf
      ]
    >,
    Schema.Tuple<
      [
        Schema.Literal<[9n]>,
        Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>,
        Schema.Union<
          [
            Schema.Tuple2<Schema.Literal<[0n]>, typeof Schema.Uint8ArrayFromSelf>,
            Schema.Tuple2<Schema.Literal<[1n]>, typeof Schema.Uint8ArrayFromSelf>,
            Schema.Tuple<[Schema.Literal<[2n]>]>,
            Schema.Tuple<[Schema.Literal<[3n]>]>
          ]
        >
      ]
    >,
    Schema.Tuple<
      [
        Schema.Literal<[10n]>,
        Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>,
        typeof Schema.Uint8ArrayFromSelf,
        Schema.Union<
          [
            Schema.Tuple2<Schema.Literal<[0n]>, typeof Schema.Uint8ArrayFromSelf>,
            Schema.Tuple2<Schema.Literal<[1n]>, typeof Schema.Uint8ArrayFromSelf>,
            Schema.Tuple<[Schema.Literal<[2n]>]>,
            Schema.Tuple<[Schema.Literal<[3n]>]>
          ]
        >
      ]
    >,
    Schema.Tuple<
      [
        Schema.Literal<[11n]>,
        Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>,
        typeof Schema.Uint8ArrayFromSelf,
        typeof Schema.BigIntFromSelf
      ]
    >,
    Schema.Tuple<
      [
        Schema.Literal<[12n]>,
        Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>,
        Schema.Union<
          [
            Schema.Tuple2<Schema.Literal<[0n]>, typeof Schema.Uint8ArrayFromSelf>,
            Schema.Tuple2<Schema.Literal<[1n]>, typeof Schema.Uint8ArrayFromSelf>,
            Schema.Tuple<[Schema.Literal<[2n]>]>,
            Schema.Tuple<[Schema.Literal<[3n]>]>
          ]
        >,
        typeof Schema.BigIntFromSelf
      ]
    >,
    Schema.Tuple<
      [
        Schema.Literal<[13n]>,
        Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>,
        typeof Schema.Uint8ArrayFromSelf,
        Schema.Union<
          [
            Schema.Tuple2<Schema.Literal<[0n]>, typeof Schema.Uint8ArrayFromSelf>,
            Schema.Tuple2<Schema.Literal<[1n]>, typeof Schema.Uint8ArrayFromSelf>,
            Schema.Tuple<[Schema.Literal<[2n]>]>,
            Schema.Tuple<[Schema.Literal<[3n]>]>
          ]
        >,
        typeof Schema.BigIntFromSelf
      ]
    >,
    Schema.Tuple<
      [
        Schema.Literal<[14n]>,
        Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>,
        Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>
      ]
    >,
    Schema.Tuple<
      [
        Schema.Literal<[15n]>,
        Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>,
        Schema.NullishOr<Schema.Tuple2<typeof Schema.String, typeof Schema.Uint8ArrayFromSelf>>
      ]
    >,
    Schema.Tuple<
      [
        Schema.Literal<[16n]>,
        Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>,
        typeof Schema.BigIntFromSelf,
        Schema.NullishOr<Schema.Tuple2<typeof Schema.String, typeof Schema.Uint8ArrayFromSelf>>
      ]
    >,
    Schema.Tuple<
      [
        Schema.Literal<[17n]>,
        Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>,
        typeof Schema.BigIntFromSelf
      ]
    >,
    Schema.Tuple<
      [
        Schema.Literal<[18n]>,
        Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>,
        Schema.NullishOr<Schema.Tuple2<typeof Schema.String, typeof Schema.Uint8ArrayFromSelf>>
      ]
    >
  ]
>

PoolRegistration (class)

Signature

export declare class PoolRegistration

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](): number

PoolRetirement (class)

Signature

export declare class PoolRetirement

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](): number

RegCert (class)

Signature

export declare class RegCert

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](): number

RegDrepCert (class)

Signature

export declare class RegDrepCert

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](): number

ResignCommitteeColdCert (class)

Signature

export declare class ResignCommitteeColdCert

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](): number

StakeDelegation (class)

Signature

export declare class StakeDelegation

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](): number

StakeDeregistration (class)

Signature

export declare class StakeDeregistration

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](): number

StakeRegDelegCert (class)

Signature

export declare class StakeRegDelegCert

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](): number

StakeRegistration (class)

Signature

export declare class StakeRegistration

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](): number

StakeVoteDelegCert (class)

Signature

export declare class StakeVoteDelegCert

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](): number

StakeVoteRegDelegCert (class)

Signature

export declare class StakeVoteRegDelegCert

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](): number

UnregCert (class)

Signature

export declare class UnregCert

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](): number

UnregDrepCert (class)

Signature

export declare class UnregDrepCert

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](): number

UpdateDrepCert (class)

Signature

export declare class UpdateDrepCert

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](): number

VoteDelegCert (class)

Signature

export declare class VoteDelegCert

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](): number

VoteRegDelegCert (class)

Signature

export declare class VoteRegDelegCert

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](): number

On this page

Certificate overviewencodingtoCBORBytestoCBORHexmodelCertificate (type alias)parsingfromCBORBytesfromCBORHexpredicatesisschemasCertificateFromCBORBytesFromCBORHexFromCDDLtestingarbitraryutilsAuthCommitteeHotCert (class)toJSON (method)toString (method)[Inspectable.NodeInspectSymbol] (method)[Equal.symbol] (method)[Hash.symbol] (method)CDDLSchemaPoolRegistration (class)toJSON (method)toString (method)[Inspectable.NodeInspectSymbol] (method)[Equal.symbol] (method)[Hash.symbol] (method)PoolRetirement (class)toJSON (method)toString (method)[Inspectable.NodeInspectSymbol] (method)[Equal.symbol] (method)[Hash.symbol] (method)RegCert (class)toJSON (method)toString (method)[Inspectable.NodeInspectSymbol] (method)[Equal.symbol] (method)[Hash.symbol] (method)RegDrepCert (class)toJSON (method)toString (method)[Inspectable.NodeInspectSymbol] (method)[Equal.symbol] (method)[Hash.symbol] (method)ResignCommitteeColdCert (class)toJSON (method)toString (method)[Inspectable.NodeInspectSymbol] (method)[Equal.symbol] (method)[Hash.symbol] (method)StakeDelegation (class)toJSON (method)toString (method)[Inspectable.NodeInspectSymbol] (method)[Equal.symbol] (method)[Hash.symbol] (method)StakeDeregistration (class)toJSON (method)toString (method)[Inspectable.NodeInspectSymbol] (method)[Equal.symbol] (method)[Hash.symbol] (method)StakeRegDelegCert (class)toJSON (method)toString (method)[Inspectable.NodeInspectSymbol] (method)[Equal.symbol] (method)[Hash.symbol] (method)StakeRegistration (class)toJSON (method)toString (method)[Inspectable.NodeInspectSymbol] (method)[Equal.symbol] (method)[Hash.symbol] (method)StakeVoteDelegCert (class)toJSON (method)toString (method)[Inspectable.NodeInspectSymbol] (method)[Equal.symbol] (method)[Hash.symbol] (method)StakeVoteRegDelegCert (class)toJSON (method)toString (method)[Inspectable.NodeInspectSymbol] (method)[Equal.symbol] (method)[Hash.symbol] (method)UnregCert (class)toJSON (method)toString (method)[Inspectable.NodeInspectSymbol] (method)[Equal.symbol] (method)[Hash.symbol] (method)UnregDrepCert (class)toJSON (method)toString (method)[Inspectable.NodeInspectSymbol] (method)[Equal.symbol] (method)[Hash.symbol] (method)UpdateDrepCert (class)toJSON (method)toString (method)[Inspectable.NodeInspectSymbol] (method)[Equal.symbol] (method)[Hash.symbol] (method)VoteDelegCert (class)toJSON (method)toString (method)[Inspectable.NodeInspectSymbol] (method)[Equal.symbol] (method)[Hash.symbol] (method)VoteRegDelegCert (class)toJSON (method)toString (method)[Inspectable.NodeInspectSymbol] (method)[Equal.symbol] (method)[Hash.symbol] (method)