Evolution SDK

GovernanceAction.ts

GovernanceAction overview


Table of contents


arbitrary

infoArbitrary

FastCheck arbitrary for GovernanceAction.

Signature

export declare const infoArbitrary: FastCheck.Arbitrary<InfoAction>

Added in v2.0.0

encoding

toCBOR

Encode GovernanceAction to CBOR bytes.

Signature

export declare const toCBOR: (data: GovernanceAction, options?: CBOR.CodecOptions) => Uint8Array

Added in v2.0.0

toCBORHex

Encode GovernanceAction to CBOR hex string.

Signature

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

Added in v2.0.0

model

GovernanceAction (type alias)

Type alias for GovernanceAction.

Signature

export type GovernanceAction = Schema.Schema.Type<typeof GovernanceAction>

Added in v2.0.0

parsing

fromCBOR

Parse GovernanceAction from CBOR bytes.

Signature

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

Added in v2.0.0

fromCBORHex

Parse GovernanceAction from CBOR hex string.

Signature

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

Added in v2.0.0

pattern matching

match

Pattern matching utility for GovernanceAction.

Signature

export declare const match: <R>(
  action: GovernanceAction,
  patterns: {
    ParameterChangeAction: (
      govActionId: GovActionId | null,
      protocolParams: ProtocolParamUpdate.ProtocolParamUpdate,
      policyHash: ScriptHash.ScriptHash | null
    ) => R
    HardForkInitiationAction: (govActionId: GovActionId | null, protocolVersion: ProtocolVersion.ProtocolVersion) => R
    TreasuryWithdrawalsAction: (
      withdrawals: Map<RewardAccount.RewardAccount, Coin.Coin>,
      policyHash: ScriptHash.ScriptHash | null
    ) => R
    NoConfidenceAction: (govActionId: GovActionId | null) => R
    UpdateCommitteeAction: (
      govActionId: GovActionId | null,
      membersToRemove: ReadonlyArray<typeof CommiteeColdCredential.CommitteeColdCredential.Credential.Type>,
      membersToAdd: ReadonlyMap<typeof CommiteeColdCredential.CommitteeColdCredential.Credential.Type, EpochNo.EpochNo>,
      threshold: UnitInterval.UnitInterval
    ) => R
    NewConstitutionAction: (govActionId: GovActionId | null, constitution: Constituion.Constitution) => R
    InfoAction: () => R
  }
) => R

Added in v2.0.0

predicates

is

Check if a value is a valid GovernanceAction.

Signature

export declare const is: (
  u: unknown,
  overrideOptions?: ParseOptions | number
) => u is
  | ParameterChangeAction
  | HardForkInitiationAction
  | TreasuryWithdrawalsAction
  | NoConfidenceAction
  | UpdateCommitteeAction
  | NewConstitutionAction
  | InfoAction

Added in v2.0.0

schemas

CDDLSchema

CDDL schema for GovernanceAction tuple structure. Maps action types to their data according to Conway specification.

Signature

export declare const CDDLSchema: Schema.Union<
  [
    Schema.Tuple<
      [
        Schema.Literal<[0n]>,
        Schema.NullOr<Schema.Tuple2<typeof Schema.Uint8ArrayFromSelf, typeof Schema.BigIntFromSelf>>,
        Schema.MapFromSelf<typeof Schema.BigIntFromSelf, Schema.Schema<CBOR.CBOR, CBOR.CBOR, never>>,
        Schema.NullOr<typeof Schema.Uint8ArrayFromSelf>
      ]
    >,
    Schema.Tuple<
      [
        Schema.Literal<[1n]>,
        Schema.NullOr<Schema.Tuple2<typeof Schema.Uint8ArrayFromSelf, typeof Schema.BigIntFromSelf>>,
        Schema.Tuple2<typeof Schema.BigIntFromSelf, typeof Schema.BigIntFromSelf>
      ]
    >,
    Schema.Tuple<
      [
        Schema.Literal<[2n]>,
        Schema.MapFromSelf<typeof Schema.Uint8ArrayFromSelf, typeof Schema.BigIntFromSelf>,
        Schema.NullOr<typeof Schema.Uint8ArrayFromSelf>
      ]
    >,
    Schema.Tuple2<
      Schema.Literal<[3n]>,
      Schema.NullOr<Schema.Tuple2<typeof Schema.Uint8ArrayFromSelf, typeof Schema.BigIntFromSelf>>
    >,
    Schema.Tuple<
      [
        Schema.Literal<[4n]>,
        Schema.NullOr<Schema.Tuple2<typeof Schema.Uint8ArrayFromSelf, typeof Schema.BigIntFromSelf>>,
        Schema.Union<
          [
            Schema.TaggedStruct<
              "Tag",
              {
                tag: Schema.Literal<[258]>
                value: Schema.Array$<Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>>
              }
            >,
            Schema.Array$<Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>>
          ]
        >,
        Schema.MapFromSelf<
          Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>,
          typeof Schema.BigIntFromSelf
        >,
        Schema.TaggedStruct<
          "Tag",
          {
            tag: Schema.Literal<[30]>
            value: Schema.Tuple2<typeof Schema.BigIntFromSelf, typeof Schema.BigIntFromSelf>
          }
        >
      ]
    >,
    Schema.Tuple<
      [
        Schema.Literal<[5n]>,
        Schema.NullOr<Schema.Tuple2<typeof Schema.Uint8ArrayFromSelf, typeof Schema.BigIntFromSelf>>,
        Schema.Tuple2<
          Schema.Tuple2<typeof Schema.String, typeof Schema.Uint8ArrayFromSelf>,
          Schema.NullOr<typeof Schema.Uint8ArrayFromSelf>
        >
      ]
    >,
    Schema.Tuple<[Schema.Literal<[6n]>]>
  ]
>

Added in v2.0.0

FromCDDL

CDDL transformation schema for GovernanceAction.

Signature

export declare const FromCDDL: Schema.Union<
  [
    Schema.transformOrFail<
      Schema.Tuple<
        [
          Schema.Literal<[0n]>,
          Schema.NullOr<Schema.Tuple2<typeof Schema.Uint8ArrayFromSelf, typeof Schema.BigIntFromSelf>>,
          Schema.MapFromSelf<typeof Schema.BigIntFromSelf, Schema.Schema<CBOR.CBOR, CBOR.CBOR, never>>,
          Schema.NullOr<typeof Schema.Uint8ArrayFromSelf>
        ]
      >,
      Schema.SchemaClass<ParameterChangeAction, ParameterChangeAction, never>,
      never
    >,
    Schema.transformOrFail<
      Schema.Tuple<
        [
          Schema.Literal<[1n]>,
          Schema.NullOr<Schema.Tuple2<typeof Schema.Uint8ArrayFromSelf, typeof Schema.BigIntFromSelf>>,
          Schema.Tuple2<typeof Schema.BigIntFromSelf, typeof Schema.BigIntFromSelf>
        ]
      >,
      Schema.SchemaClass<HardForkInitiationAction, HardForkInitiationAction, never>,
      never
    >,
    Schema.transformOrFail<
      Schema.Tuple<
        [
          Schema.Literal<[2n]>,
          Schema.MapFromSelf<typeof Schema.Uint8ArrayFromSelf, typeof Schema.BigIntFromSelf>,
          Schema.NullOr<typeof Schema.Uint8ArrayFromSelf>
        ]
      >,
      Schema.SchemaClass<TreasuryWithdrawalsAction, TreasuryWithdrawalsAction, never>,
      never
    >,
    Schema.transformOrFail<
      Schema.Tuple2<
        Schema.Literal<[3n]>,
        Schema.NullOr<Schema.Tuple2<typeof Schema.Uint8ArrayFromSelf, typeof Schema.BigIntFromSelf>>
      >,
      Schema.SchemaClass<NoConfidenceAction, NoConfidenceAction, never>,
      never
    >,
    Schema.transformOrFail<
      Schema.Tuple<
        [
          Schema.Literal<[4n]>,
          Schema.NullOr<Schema.Tuple2<typeof Schema.Uint8ArrayFromSelf, typeof Schema.BigIntFromSelf>>,
          Schema.Union<
            [
              Schema.TaggedStruct<
                "Tag",
                {
                  tag: Schema.Literal<[258]>
                  value: Schema.Array$<Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>>
                }
              >,
              Schema.Array$<Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>>
            ]
          >,
          Schema.MapFromSelf<
            Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>,
            typeof Schema.BigIntFromSelf
          >,
          Schema.TaggedStruct<
            "Tag",
            {
              tag: Schema.Literal<[30]>
              value: Schema.Tuple2<typeof Schema.BigIntFromSelf, typeof Schema.BigIntFromSelf>
            }
          >
        ]
      >,
      Schema.SchemaClass<UpdateCommitteeAction, UpdateCommitteeAction, never>,
      never
    >,
    Schema.transformOrFail<
      Schema.Tuple<
        [
          Schema.Literal<[5n]>,
          Schema.NullOr<Schema.Tuple2<typeof Schema.Uint8ArrayFromSelf, typeof Schema.BigIntFromSelf>>,
          Schema.Tuple2<
            Schema.Tuple2<typeof Schema.String, typeof Schema.Uint8ArrayFromSelf>,
            Schema.NullOr<typeof Schema.Uint8ArrayFromSelf>
          >
        ]
      >,
      Schema.SchemaClass<NewConstitutionAction, NewConstitutionAction, never>,
      never
    >,
    Schema.transformOrFail<
      Schema.Tuple<[Schema.Literal<[6n]>]>,
      Schema.SchemaClass<InfoAction, InfoAction, never>,
      never
    >
  ]
>

Added in v2.0.0

GovActionId (class)

GovActionId schema representing a governance action identifier.

According to Conway CDDL: gov_action_id = [transaction_id : transaction_id, gov_action_index : uint .size 2]

Signature

export declare class GovActionId

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

GovActionIdCDDL

CDDL schema for GovActionId tuple structure.

For CBOR encoding: [transaction_id: bytes, gov_action_index: uint]

Signature

export declare const GovActionIdCDDL: Schema.Tuple2<typeof Schema.Uint8ArrayFromSelf, typeof Schema.BigIntFromSelf>

Added in v2.0.0

GovActionIdFromCDDL

CDDL transformation schema for GovActionId.

Signature

export declare const GovActionIdFromCDDL: Schema.transformOrFail<
  Schema.Tuple2<typeof Schema.Uint8ArrayFromSelf, typeof Schema.BigIntFromSelf>,
  Schema.SchemaClass<GovActionId, GovActionId, never>,
  never
>

Added in v2.0.0

GovernanceAction

GovernanceAction union schema based on Conway CDDL specification.

governance_action =
  [ 0, parameter_change_action ]
/ [ 1, hard_fork_initiation_action ]
/ [ 2, treasury_withdrawals_action ]
/ [ 3, no_confidence ]
/ [ 4, update_committee ]
/ [ 5, new_constitution ]
/ [ 6, info_action ]

Signature

export declare const GovernanceAction: Schema.Union<
  [
    typeof ParameterChangeAction,
    typeof HardForkInitiationAction,
    typeof TreasuryWithdrawalsAction,
    typeof NoConfidenceAction,
    typeof UpdateCommitteeAction,
    typeof NewConstitutionAction,
    typeof InfoAction
  ]
>

Added in v2.0.0

HardForkInitiationAction (class)

Hard fork initiation governance action schema.

According to Conway CDDL: hard_fork_initiation_action =
  (1, gov_action_id/ nil, protocol_version, policy_hash/ nil)

Signature

export declare class HardForkInitiationAction

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

HardForkInitiationActionCDDL

CDDL schema for HardForkInitiationAction tuple structure.

Maps to: (1, gov_action_id/ nil, protocol_version, policy_hash/ nil)

Signature

export declare const HardForkInitiationActionCDDL: Schema.Tuple<
  [
    Schema.Literal<[1n]>,
    Schema.NullOr<Schema.Tuple2<typeof Schema.Uint8ArrayFromSelf, typeof Schema.BigIntFromSelf>>,
    Schema.Tuple2<typeof Schema.BigIntFromSelf, typeof Schema.BigIntFromSelf>
  ]
>

Added in v2.0.0

HardForkInitiationActionFromCDDL

CDDL transformation schema for HardForkInitiationAction.

Signature

export declare const HardForkInitiationActionFromCDDL: Schema.transformOrFail<
  Schema.Tuple<
    [
      Schema.Literal<[1n]>,
      Schema.NullOr<Schema.Tuple2<typeof Schema.Uint8ArrayFromSelf, typeof Schema.BigIntFromSelf>>,
      Schema.Tuple2<typeof Schema.BigIntFromSelf, typeof Schema.BigIntFromSelf>
    ]
  >,
  Schema.SchemaClass<HardForkInitiationAction, HardForkInitiationAction, never>,
  never
>

Added in v2.0.0

InfoAction (class)

Info governance action schema.

According to Conway CDDL: info_action = (6)

Signature

export declare class InfoAction

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

InfoActionCDDL

CDDL schema for InfoAction tuple structure. Maps to: (6)

Signature

export declare const InfoActionCDDL: Schema.Tuple<[Schema.Literal<[6n]>]>

Added in v2.0.0

InfoActionFromCDDL

CDDL transformation schema for InfoAction.

Signature

export declare const InfoActionFromCDDL: Schema.transformOrFail<
  Schema.Tuple<[Schema.Literal<[6n]>]>,
  Schema.SchemaClass<InfoAction, InfoAction, never>,
  never
>

Added in v2.0.0

NewConstitutionAction (class)

New constitution governance action schema. According to Conway CDDL: new_constitution = (5, gov_action_id/ nil, constitution)

Signature

export declare class NewConstitutionAction

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

NewConstitutionActionCDDL

CDDL schema for NewConstitutionAction tuple structure.

Maps to: (5, gov_action_id/ nil, constitution)

Signature

export declare const NewConstitutionActionCDDL: Schema.Tuple<
  [
    Schema.Literal<[5n]>,
    Schema.NullOr<Schema.Tuple2<typeof Schema.Uint8ArrayFromSelf, typeof Schema.BigIntFromSelf>>,
    Schema.Tuple2<
      Schema.Tuple2<typeof Schema.String, typeof Schema.Uint8ArrayFromSelf>,
      Schema.NullOr<typeof Schema.Uint8ArrayFromSelf>
    >
  ]
>

Added in v2.0.0

NewConstitutionActionFromCDDL

CDDL transformation schema for NewConstitutionAction.

Signature

export declare const NewConstitutionActionFromCDDL: Schema.transformOrFail<
  Schema.Tuple<
    [
      Schema.Literal<[5n]>,
      Schema.NullOr<Schema.Tuple2<typeof Schema.Uint8ArrayFromSelf, typeof Schema.BigIntFromSelf>>,
      Schema.Tuple2<
        Schema.Tuple2<typeof Schema.String, typeof Schema.Uint8ArrayFromSelf>,
        Schema.NullOr<typeof Schema.Uint8ArrayFromSelf>
      >
    ]
  >,
  Schema.SchemaClass<NewConstitutionAction, NewConstitutionAction, never>,
  never
>

Added in v2.0.0

NoConfidenceAction (class)

No confidence governance action schema.

According to Conway CDDL: no_confidence =
  (3, gov_action_id/ nil)

Signature

export declare class NoConfidenceAction

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

NoConfidenceActionCDDL

CDDL schema for NoConfidenceAction tuple structure. Maps to: (3, gov_action_id/ nil)

Signature

export declare const NoConfidenceActionCDDL: Schema.Tuple2<
  Schema.Literal<[3n]>,
  Schema.NullOr<Schema.Tuple2<typeof Schema.Uint8ArrayFromSelf, typeof Schema.BigIntFromSelf>>
>

Added in v2.0.0

NoConfidenceActionFromCDDL

CDDL transformation schema for NoConfidenceAction.

Signature

export declare const NoConfidenceActionFromCDDL: Schema.transformOrFail<
  Schema.Tuple2<
    Schema.Literal<[3n]>,
    Schema.NullOr<Schema.Tuple2<typeof Schema.Uint8ArrayFromSelf, typeof Schema.BigIntFromSelf>>
  >,
  Schema.SchemaClass<NoConfidenceAction, NoConfidenceAction, never>,
  never
>

Added in v2.0.0

ParameterChangeAction (class)

Parameter change governance action schema.

According to Conway CDDL: parameter_change_action =
  (0, gov_action_id/ nil, protocol_param_update, policy_hash/ nil)

Signature

export declare class ParameterChangeAction

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

ParameterChangeActionCDDL

CDDL schema for ParameterChangeAction tuple structure. Maps to: (0, gov_action_id/ nil, protocol_param_update, policy_hash/ nil)

Signature

export declare const ParameterChangeActionCDDL: Schema.Tuple<
  [
    Schema.Literal<[0n]>,
    Schema.NullOr<Schema.Tuple2<typeof Schema.Uint8ArrayFromSelf, typeof Schema.BigIntFromSelf>>,
    Schema.MapFromSelf<typeof Schema.BigIntFromSelf, Schema.Schema<CBOR.CBOR, CBOR.CBOR, never>>,
    Schema.NullOr<typeof Schema.Uint8ArrayFromSelf>
  ]
>

Added in v2.0.0

ParameterChangeActionFromCDDL

CDDL transformation schema for ParameterChangeAction.

Signature

export declare const ParameterChangeActionFromCDDL: Schema.transformOrFail<
  Schema.Tuple<
    [
      Schema.Literal<[0n]>,
      Schema.NullOr<Schema.Tuple2<typeof Schema.Uint8ArrayFromSelf, typeof Schema.BigIntFromSelf>>,
      Schema.MapFromSelf<typeof Schema.BigIntFromSelf, Schema.Schema<CBOR.CBOR, CBOR.CBOR, never>>,
      Schema.NullOr<typeof Schema.Uint8ArrayFromSelf>
    ]
  >,
  Schema.SchemaClass<ParameterChangeAction, ParameterChangeAction, never>,
  never
>

Added in v2.0.0

TreasuryWithdrawalsAction (class)

Treasury withdrawals governance action schema.

According to Conway CDDL: treasury_withdrawals_action =
  (2, { * reward_account => coin }, policy_hash/ nil)

Signature

export declare class TreasuryWithdrawalsAction

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

TreasuryWithdrawalsActionCDDL

CDDL schema for TreasuryWithdrawalsAction tuple structure.

Maps to: (2, { * reward_account => coin }, policy_hash/ nil)

Signature

export declare const TreasuryWithdrawalsActionCDDL: Schema.Tuple<
  [
    Schema.Literal<[2n]>,
    Schema.MapFromSelf<typeof Schema.Uint8ArrayFromSelf, typeof Schema.BigIntFromSelf>,
    Schema.NullOr<typeof Schema.Uint8ArrayFromSelf>
  ]
>

Added in v2.0.0

TreasuryWithdrawalsActionFromCDDL

CDDL transformation schema for TreasuryWithdrawalsAction.

Signature

export declare const TreasuryWithdrawalsActionFromCDDL: Schema.transformOrFail<
  Schema.Tuple<
    [
      Schema.Literal<[2n]>,
      Schema.MapFromSelf<typeof Schema.Uint8ArrayFromSelf, typeof Schema.BigIntFromSelf>,
      Schema.NullOr<typeof Schema.Uint8ArrayFromSelf>
    ]
  >,
  Schema.SchemaClass<TreasuryWithdrawalsAction, TreasuryWithdrawalsAction, never>,
  never
>

Added in v2.0.0

UpdateCommitteeAction (class)

Update committee governance action schema.

According to Conway CDDL: update_committee =
  (4, gov_action_id/ nil, set<committee_cold_credential>, { * committee_cold_credential => committee_hot_credential }, unit_interval)

Signature

export declare class UpdateCommitteeAction

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

UpdateCommitteeActionCDDL

CDDL schema for UpdateCommitteeAction tuple structure.

Maps to: (4, gov_action_id/ nil, set<committee_cold_credential>, { * committee_cold_credential => committee_hot_credential }, unit_interval)

Signature

export declare const UpdateCommitteeActionCDDL: Schema.Tuple<
  [
    Schema.Literal<[4n]>,
    Schema.NullOr<Schema.Tuple2<typeof Schema.Uint8ArrayFromSelf, typeof Schema.BigIntFromSelf>>,
    Schema.Union<
      [
        Schema.TaggedStruct<
          "Tag",
          {
            tag: Schema.Literal<[258]>
            value: Schema.Array$<Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>>
          }
        >,
        Schema.Array$<Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>>
      ]
    >,
    Schema.MapFromSelf<
      Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>,
      typeof Schema.BigIntFromSelf
    >,
    Schema.TaggedStruct<
      "Tag",
      { tag: Schema.Literal<[30]>; value: Schema.Tuple2<typeof Schema.BigIntFromSelf, typeof Schema.BigIntFromSelf> }
    >
  ]
>

Added in v2.0.0

UpdateCommitteeActionFromCDDL

CDDL transformation schema for UpdateCommitteeAction.

Signature

export declare const UpdateCommitteeActionFromCDDL: Schema.transformOrFail<
  Schema.Tuple<
    [
      Schema.Literal<[4n]>,
      Schema.NullOr<Schema.Tuple2<typeof Schema.Uint8ArrayFromSelf, typeof Schema.BigIntFromSelf>>,
      Schema.Union<
        [
          Schema.TaggedStruct<
            "Tag",
            {
              tag: Schema.Literal<[258]>
              value: Schema.Array$<Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>>
            }
          >,
          Schema.Array$<Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>>
        ]
      >,
      Schema.MapFromSelf<
        Schema.Tuple2<Schema.Literal<[0n, 1n]>, typeof Schema.Uint8ArrayFromSelf>,
        typeof Schema.BigIntFromSelf
      >,
      Schema.TaggedStruct<
        "Tag",
        { tag: Schema.Literal<[30]>; value: Schema.Tuple2<typeof Schema.BigIntFromSelf, typeof Schema.BigIntFromSelf> }
      >
    ]
  >,
  Schema.SchemaClass<UpdateCommitteeAction, UpdateCommitteeAction, never>,
  never
>

Added in v2.0.0

type guards

isParameterChangeAction

Type guards for each governance action variant.

Signature

export declare const isParameterChangeAction: (
  u: unknown,
  overrideOptions?: ParseOptions | number
) => u is ParameterChangeAction

Added in v2.0.0

utils

arbitrary

Signature

export declare const arbitrary: FastCheck.Arbitrary<
  | ParameterChangeAction
  | HardForkInitiationAction
  | TreasuryWithdrawalsAction
  | NoConfidenceAction
  | UpdateCommitteeAction
  | NewConstitutionAction
  | InfoAction
>

govActionIdArbitrary

Signature

export declare const govActionIdArbitrary: FastCheck.Arbitrary<GovActionId>

hardForkInitiationArbitrary

Signature

export declare const hardForkInitiationArbitrary: FastCheck.Arbitrary<HardForkInitiationAction>

isHardForkInitiationAction

Signature

export declare const isHardForkInitiationAction: (
  u: unknown,
  overrideOptions?: ParseOptions | number
) => u is HardForkInitiationAction

isInfoAction

Signature

export declare const isInfoAction: (u: unknown, overrideOptions?: ParseOptions | number) => u is InfoAction

isNewConstitutionAction

Signature

export declare const isNewConstitutionAction: (
  u: unknown,
  overrideOptions?: ParseOptions | number
) => u is NewConstitutionAction

isNoConfidenceAction

Signature

export declare const isNoConfidenceAction: (
  u: unknown,
  overrideOptions?: ParseOptions | number
) => u is NoConfidenceAction

isTreasuryWithdrawalsAction

Signature

export declare const isTreasuryWithdrawalsAction: (
  u: unknown,
  overrideOptions?: ParseOptions | number
) => u is TreasuryWithdrawalsAction

isUpdateCommitteeAction

Signature

export declare const isUpdateCommitteeAction: (
  u: unknown,
  overrideOptions?: ParseOptions | number
) => u is UpdateCommitteeAction

newConstitutionArbitrary

Signature

export declare const newConstitutionArbitrary: FastCheck.Arbitrary<NewConstitutionAction>

noConfidenceArbitrary

Signature

export declare const noConfidenceArbitrary: FastCheck.Arbitrary<NoConfidenceAction>

parameterChangeArbitrary

Signature

export declare const parameterChangeArbitrary: FastCheck.Arbitrary<ParameterChangeAction>

treasuryWithdrawalsArbitrary

Signature

export declare const treasuryWithdrawalsArbitrary: FastCheck.Arbitrary<TreasuryWithdrawalsAction>

updateCommitteeArbitrary

Signature

export declare const updateCommitteeArbitrary: FastCheck.Arbitrary<UpdateCommitteeAction>

On this page

GovernanceAction overviewarbitraryinfoArbitraryencodingtoCBORtoCBORHexmodelGovernanceAction (type alias)parsingfromCBORfromCBORHexpattern matchingmatchpredicatesisschemasCDDLSchemaFromCDDLGovActionId (class)toJSON (method)toString (method)[Inspectable.NodeInspectSymbol] (method)[Equal.symbol] (method)[Hash.symbol] (method)GovActionIdCDDLGovActionIdFromCDDLGovernanceActionHardForkInitiationAction (class)toJSON (method)toString (method)[Inspectable.NodeInspectSymbol] (method)[Equal.symbol] (method)[Hash.symbol] (method)HardForkInitiationActionCDDLHardForkInitiationActionFromCDDLInfoAction (class)toJSON (method)toString (method)[Inspectable.NodeInspectSymbol] (method)[Equal.symbol] (method)[Hash.symbol] (method)InfoActionCDDLInfoActionFromCDDLNewConstitutionAction (class)toJSON (method)toString (method)[Inspectable.NodeInspectSymbol] (method)[Equal.symbol] (method)[Hash.symbol] (method)NewConstitutionActionCDDLNewConstitutionActionFromCDDLNoConfidenceAction (class)toJSON (method)toString (method)[Inspectable.NodeInspectSymbol] (method)[Equal.symbol] (method)[Hash.symbol] (method)NoConfidenceActionCDDLNoConfidenceActionFromCDDLParameterChangeAction (class)toJSON (method)toString (method)[Inspectable.NodeInspectSymbol] (method)[Equal.symbol] (method)[Hash.symbol] (method)ParameterChangeActionCDDLParameterChangeActionFromCDDLTreasuryWithdrawalsAction (class)toJSON (method)toString (method)[Inspectable.NodeInspectSymbol] (method)[Equal.symbol] (method)[Hash.symbol] (method)TreasuryWithdrawalsActionCDDLTreasuryWithdrawalsActionFromCDDLUpdateCommitteeAction (class)toJSON (method)toString (method)[Inspectable.NodeInspectSymbol] (method)[Equal.symbol] (method)[Hash.symbol] (method)UpdateCommitteeActionCDDLUpdateCommitteeActionFromCDDLtype guardsisParameterChangeActionutilsarbitrarygovActionIdArbitraryhardForkInitiationArbitraryisHardForkInitiationActionisInfoActionisNewConstitutionActionisNoConfidenceActionisTreasuryWithdrawalsActionisUpdateCommitteeActionnewConstitutionArbitrarynoConfidenceArbitraryparameterChangeArbitrarytreasuryWithdrawalsArbitraryupdateCommitteeArbitrary