@harmoniclabs/plu-ts-onchain
Version:
An embedded DSL for Cardano smart contracts creation coupled with a library for Cardano transactions, all in Typescript
52 lines (51 loc) • 2.21 kB
JavaScript
;
Object.defineProperty(exports, "__esModule", { value: true });
exports.PGovernanceAction = exports.PConstitution = exports.PRational = void 0;
var lib_1 = require("../../../lib/index.js");
var pstruct_1 = require("../../../PTypes/PStruct/pstruct.js");
var types_1 = require("../../../type_system/types.js");
var PCredential_1 = require("../../V1/Address/PCredential.js");
var PValidatorHash_1 = require("../../V1/ScriptsHashes/PValidatorHash.js");
var PTxOutRef_1 = require("../Tx/PTxOutRef.js");
var PChangedParams_1 = require("./PChangedParams.js");
var PProtocolVersion_1 = require("./PProtocolVersion.js");
exports.PRational = (0, pstruct_1.pstruct)({
PRational: {
numerator: types_1.int,
denominator: types_1.int
}
});
exports.PConstitution = (0, pstruct_1.pstruct)({
PConstitution: {
constitutionScriptHash: (0, lib_1.PMaybe)(PValidatorHash_1.PValidatorHash.type).type
}
});
exports.PGovernanceAction = (0, pstruct_1.pstruct)({
ParameterChange: {
govActionId: (0, lib_1.PMaybe)(PTxOutRef_1.PTxOutRef.type).type,
changedParameters: PChangedParams_1.PChangedParams.type,
constitutionScriptHash: (0, lib_1.PMaybe)(PValidatorHash_1.PValidatorHash.type).type
},
HardForkInitiation: {
govActionId: (0, lib_1.PMaybe)(PTxOutRef_1.PTxOutRef.type).type,
nextProtocolVersion: PProtocolVersion_1.PProtocolVersion.type
},
TreasuryWithdrawals: {
withdrawals: (0, types_1.map)(PCredential_1.PCredential.type, types_1.int),
constitutionScriptHash: (0, lib_1.PMaybe)(PValidatorHash_1.PValidatorHash.type).type
},
NoConfidence: {
govActionId: (0, lib_1.PMaybe)(PTxOutRef_1.PTxOutRef.type).type
},
UpdateCommittee: {
govActionId: (0, lib_1.PMaybe)(PTxOutRef_1.PTxOutRef.type).type,
removedMembers: (0, types_1.list)(PCredential_1.PCredential.type),
newMembers: (0, types_1.map)(PCredential_1.PCredential.type, types_1.int),
newQuorum: exports.PRational.type
},
NewConstitution: {
govActionId: (0, lib_1.PMaybe)(PTxOutRef_1.PTxOutRef.type).type,
consitution: exports.PConstitution.type
},
InfoAction: {}
});