Certificate.ts
Certificate overview
Certificate types and schemas for Cardano Conway-era transactions.
Added in v2.0.0
Table of contents
- certificate
- AuthCommitteeHotCert (class)
- PoolRegistration (class)
- PoolRetirement (class)
- RegCert (class)
- RegDrepCert (class)
- ResignCommitteeColdCert (class)
- StakeDelegation (class)
- StakeDeregistration (class)
- StakeRegDelegCert (class)
- StakeRegistration (class)
- StakeVoteDelegCert (class)
- StakeVoteRegDelegCert (class)
- UnregCert (class)
- UnregDrepCert (class)
- UpdateDrepCert (class)
- VoteDelegCert (class)
- VoteRegDelegCert (class)
- encoding
- model
- parsing
- predicates
- schemas
- testing
- utils
certificate
AuthCommitteeHotCert (class)
Authorize a committee hot credential (CDDL: auth_committee_hot_cert = 14).
Signature
export declare class AuthCommitteeHotCertAdded 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](): numberPoolRegistration (class)
Register a stake pool (CDDL: pool_registration = 3).
Signature
export declare class PoolRegistrationAdded 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](): numberPoolRetirement (class)
Retire a stake pool at a given epoch (CDDL: pool_retirement = 4).
Signature
export declare class PoolRetirementAdded 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](): numberRegCert (class)
Conway-era stake registration with deposit (CDDL: reg_cert = 7).
Signature
export declare class RegCertAdded 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](): numberRegDrepCert (class)
Register as a DRep (CDDL: reg_drep_cert = 16).
Signature
export declare class RegDrepCertAdded 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](): numberResignCommitteeColdCert (class)
Resign a committee cold credential (CDDL: resign_committee_cold_cert = 15).
Signature
export declare class ResignCommitteeColdCertAdded 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](): numberStakeDelegation (class)
Delegate stake to a pool (CDDL: stake_delegation = 2).
Signature
export declare class StakeDelegationAdded 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](): numberStakeDeregistration (class)
Deregister a stake credential (CDDL: stake_deregistration = 1).
Signature
export declare class StakeDeregistrationAdded 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](): numberStakeRegDelegCert (class)
Register stake and delegate to a pool in one certificate (CDDL: stake_reg_deleg_cert = 11).
Signature
export declare class StakeRegDelegCertAdded 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](): numberStakeRegistration (class)
Register a stake credential (CDDL: stake_registration = 0).
Signature
export declare class StakeRegistrationAdded 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](): numberStakeVoteDelegCert (class)
Delegate stake to a pool and voting rights to a DRep (CDDL: stake_vote_deleg_cert = 10).
Signature
export declare class StakeVoteDelegCertAdded 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](): numberStakeVoteRegDelegCert (class)
Register stake, delegate to a pool, and delegate voting rights to a DRep (CDDL: stake_vote_reg_deleg_cert = 13).
Signature
export declare class StakeVoteRegDelegCertAdded 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](): numberUnregCert (class)
Conway-era stake deregistration with deposit refund (CDDL: unreg_cert = 8).
Signature
export declare class UnregCertAdded 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](): numberUnregDrepCert (class)
Unregister as a DRep (CDDL: unreg_drep_cert = 17).
Signature
export declare class UnregDrepCertAdded 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](): numberUpdateDrepCert (class)
Update DRep metadata anchor (CDDL: update_drep_cert = 18).
Signature
export declare class UpdateDrepCertAdded 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](): numberVoteDelegCert (class)
Delegate voting rights to a DRep (CDDL: vote_deleg_cert = 9).
Signature
export declare class VoteDelegCertAdded 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](): numberVoteRegDelegCert (class)
Register stake and delegate voting rights to a DRep (CDDL: vote_reg_deleg_cert = 12).
Signature
export declare class VoteRegDelegCertAdded 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](): numberencoding
toCBORBytes
Convert a Certificate to CBOR bytes.
Signature
export declare const toCBORBytes: (certificate: Certificate, options?: CBOR.CodecOptions) => Uint8ArrayAdded in v2.0.0
toCBORHex
Convert a Certificate to CBOR hex string.
Signature
export declare const toCBORHex: (certificate: Certificate, options?: CBOR.CodecOptions) => stringAdded in v2.0.0
model
Certificate (type alias)
Type alias for Certificate.
Signature
export type Certificate = typeof Certificate.TypeAdded in v2.0.0
parsing
fromCBORBytes
Parse a Certificate from CBOR bytes.
Signature
export declare const fromCBORBytes: (bytes: Uint8Array, options?: CBOR.CodecOptions) => CertificateAdded in v2.0.0
fromCBORHex
Parse a Certificate from CBOR hex string.
Signature
export declare const fromCBORHex: (hex: string, options?: CBOR.CodecOptions) => CertificateAdded 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
| UpdateDrepCertAdded 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
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>>
]
>
]
>