GovernanceAction.ts
GovernanceAction overview
Table of contents
- arbitrary
- encoding
- model
- parsing
- pattern matching
- predicates
- schemas
- CDDLSchema
- FromCDDL
- GovActionId (class)
- GovActionIdCDDL
- GovActionIdFromCDDL
- GovernanceAction
- HardForkInitiationAction (class)
- HardForkInitiationActionCDDL
- HardForkInitiationActionFromCDDL
- InfoAction (class)
- InfoActionCDDL
- InfoActionFromCDDL
- NewConstitutionAction (class)
- NewConstitutionActionCDDL
- NewConstitutionActionFromCDDL
- NoConfidenceAction (class)
- NoConfidenceActionCDDL
- NoConfidenceActionFromCDDL
- ParameterChangeAction (class)
- ParameterChangeActionCDDL
- ParameterChangeActionFromCDDL
- TreasuryWithdrawalsAction (class)
- TreasuryWithdrawalsActionCDDL
- TreasuryWithdrawalsActionFromCDDL
- UpdateCommitteeAction (class)
- UpdateCommitteeActionCDDL
- UpdateCommitteeActionFromCDDL
- type guards
- utils
- arbitrary
- govActionIdArbitrary
- hardForkInitiationArbitrary
- isHardForkInitiationAction
- isInfoAction
- isNewConstitutionAction
- isNoConfidenceAction
- isTreasuryWithdrawalsAction
- isUpdateCommitteeAction
- newConstitutionArbitrary
- noConfidenceArbitrary
- parameterChangeArbitrary
- treasuryWithdrawalsArbitrary
- updateCommitteeArbitrary
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) => Uint8ArrayAdded in v2.0.0
toCBORHex
Encode GovernanceAction to CBOR hex string.
Signature
export declare const toCBORHex: (data: GovernanceAction, options?: CBOR.CodecOptions) => stringAdded 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) => GovernanceActionAdded in v2.0.0
fromCBORHex
Parse GovernanceAction from CBOR hex string.
Signature
export declare const fromCBORHex: (hex: string, options?: CBOR.CodecOptions) => GovernanceActionAdded 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
}
) => RAdded 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
| InfoActionAdded 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 GovActionIdAdded 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](): numberGovActionIdCDDL
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 HardForkInitiationActionAdded 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](): numberHardForkInitiationActionCDDL
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 InfoActionAdded 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](): numberInfoActionCDDL
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 NewConstitutionActionAdded 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](): numberNewConstitutionActionCDDL
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 NoConfidenceActionAdded 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](): numberNoConfidenceActionCDDL
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 ParameterChangeActionAdded 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](): numberParameterChangeActionCDDL
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 TreasuryWithdrawalsActionAdded 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](): numberTreasuryWithdrawalsActionCDDL
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 UpdateCommitteeActionAdded 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](): numberUpdateCommitteeActionCDDL
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 ParameterChangeActionAdded 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 HardForkInitiationActionisInfoAction
Signature
export declare const isInfoAction: (u: unknown, overrideOptions?: ParseOptions | number) => u is InfoActionisNewConstitutionAction
Signature
export declare const isNewConstitutionAction: (
u: unknown,
overrideOptions?: ParseOptions | number
) => u is NewConstitutionActionisNoConfidenceAction
Signature
export declare const isNoConfidenceAction: (
u: unknown,
overrideOptions?: ParseOptions | number
) => u is NoConfidenceActionisTreasuryWithdrawalsAction
Signature
export declare const isTreasuryWithdrawalsAction: (
u: unknown,
overrideOptions?: ParseOptions | number
) => u is TreasuryWithdrawalsActionisUpdateCommitteeAction
Signature
export declare const isUpdateCommitteeAction: (
u: unknown,
overrideOptions?: ParseOptions | number
) => u is UpdateCommitteeActionnewConstitutionArbitrary
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>