@cardananium/cquisitor-lib 0.1.0-beta.15 → 0.1.0-beta.17

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
@@ -2,43 +2,43 @@
2
2
  * @param {string} tx_hex
3
3
  * @returns {string}
4
4
  */
5
- declare function get_necessary_data_list_js(tx_hex: string): string;
5
+ export function get_necessary_data_list_js(tx_hex: string): string;
6
6
  /**
7
7
  * @param {string} tx_hex
8
8
  * @param {ValidationInputContext} validation_context
9
9
  * @returns {string}
10
10
  */
11
- declare function validate_transaction_js(tx_hex: string, validation_context: ValidationInputContext): string;
11
+ export function validate_transaction_js(tx_hex: string, validation_context: ValidationInputContext): string;
12
12
 
13
13
  /**
14
14
  * @returns {(string)[]}
15
15
  */
16
- declare function get_decodable_types(): (string)[];
16
+ export function get_decodable_types(): (string)[];
17
17
  /**
18
18
  * @param {string} input
19
19
  * @param {string} type_name
20
20
  * @param {any} params_json
21
21
  * @returns {any}
22
22
  */
23
- declare function decode_specific_type(input: string, type_name: string, params_json: DecodingParams): any;
23
+ export function decode_specific_type(input: string, type_name: string, params_json: DecodingParams): any;
24
24
  /**
25
25
  * @param {string} input
26
26
  * @returns {(string)[]}
27
27
  */
28
- declare function get_possible_types_for_input(input: string): (string)[];
28
+ export function get_possible_types_for_input(input: string): (string)[];
29
29
  /**
30
30
  * @param {string} cbor_hex
31
31
  * @returns {any}
32
32
  */
33
- declare function cbor_to_json(cbor_hex: string): CborValue;
33
+ export function cbor_to_json(cbor_hex: string): CborValue;
34
34
 
35
- declare function check_block_or_tx_signatures(hex_str: string): CheckSignaturesResult;
35
+ export function check_block_or_tx_signatures(hex_str: string): CheckSignaturesResult;
36
36
 
37
37
  /**
38
38
  * @param {string} tx_hex
39
39
  * @returns {(string)[]}
40
40
  */
41
- declare function get_utxo_list_from_tx(tx_hex: string): string[];
41
+ export function get_utxo_list_from_tx(tx_hex: string): string[];
42
42
 
43
43
  /**
44
44
  * @param {string} tx_hex
@@ -46,24 +46,24 @@ declare function get_utxo_list_from_tx(tx_hex: string): string[];
46
46
  * @param {CostModels} cost_models_json
47
47
  * @returns {ExecuteTxScriptsResult}
48
48
  */
49
- declare function execute_tx_scripts(tx_hex: string, utxo_json: UTxO[], cost_models_json: CostModels): ExecuteTxScriptsResult;
49
+ export function execute_tx_scripts(tx_hex: string, utxo_json: UTxO[], cost_models_json: CostModels): ExecuteTxScriptsResult;
50
50
  /**
51
51
  * @param {string} hex
52
52
  * @returns {ProgramJson}
53
53
  */
54
- declare function decode_plutus_program_uplc_json(hex: string): ProgramJson;
54
+ export function decode_plutus_program_uplc_json(hex: string): ProgramJson;
55
55
  /**
56
56
  * @param {string} hex
57
57
  * @returns {string}
58
58
  */
59
- declare function decode_plutus_program_pretty_uplc(hex: string): string;
59
+ export function decode_plutus_program_pretty_uplc(hex: string): string;
60
60
 
61
- declare interface CborPosition {
61
+ export interface CborPosition {
62
62
  offset: number;
63
63
  length: number;
64
64
  }
65
65
 
66
- declare type CborSimpleType =
66
+ export type CborSimpleType =
67
67
  | "Null"
68
68
  | "Bool"
69
69
  | "U8"
@@ -84,13 +84,13 @@ declare type CborSimpleType =
84
84
  | "Undefined"
85
85
  | "Break";
86
86
 
87
- declare interface CborSimple {
87
+ export interface CborSimple {
88
88
  position_info: CborPosition;
89
89
  struct_position_info?: CborPosition;
90
90
  value: any;
91
91
  }
92
92
 
93
- declare interface CborArray {
93
+ export interface CborArray {
94
94
  type: "Array";
95
95
  position_info: CborPosition;
96
96
  struct_position_info: CborPosition;
@@ -98,7 +98,7 @@ declare interface CborArray {
98
98
  values: CborValue[]; // nested
99
99
  }
100
100
 
101
- declare interface CborMap {
101
+ export interface CborMap {
102
102
  type: "Map";
103
103
  position_info: CborPosition;
104
104
  struct_position_info: CborPosition;
@@ -109,7 +109,7 @@ declare interface CborMap {
109
109
  }[];
110
110
  }
111
111
 
112
- declare interface CborTag {
112
+ export interface CborTag {
113
113
  type: "Tag";
114
114
  position_info: CborPosition;
115
115
  struct_position_info: CborPosition;
@@ -117,21 +117,21 @@ declare interface CborTag {
117
117
  value: CborValue;
118
118
  }
119
119
 
120
- declare interface CborIndefiniteString {
120
+ export interface CborIndefiniteString {
121
121
  type: "IndefiniteLengthString";
122
122
  position_info: CborPosition;
123
123
  struct_position_info: CborPosition;
124
124
  chunks: CborValue[];
125
125
  }
126
126
 
127
- declare interface CborIndefiniteBytes {
127
+ export interface CborIndefiniteBytes {
128
128
  type: "IndefiniteLengthBytes";
129
129
  position_info: CborPosition;
130
130
  struct_position_info: CborPosition;
131
131
  chunks: CborValue[];
132
132
  }
133
133
 
134
- declare type CborValue =
134
+ export type CborValue =
135
135
  | CborSimple
136
136
  | CborArray
137
137
  | CborMap
@@ -139,14 +139,14 @@ declare type CborValue =
139
139
  | CborIndefiniteString
140
140
  | CborIndefiniteBytes;
141
141
 
142
- declare interface DecodingParams {
142
+ export interface DecodingParams {
143
143
  plutus_script_version?: number;
144
144
  plutus_data_schema?: PlutusDataSchema;
145
145
  }
146
146
 
147
- declare type PlutusDataSchema = "BasicConversions" | "DetailedSchema";
147
+ export type PlutusDataSchema = "BasicConversions" | "DetailedSchema";
148
148
 
149
- declare interface CheckSignaturesResult {
149
+ export interface CheckSignaturesResult {
150
150
  /** Indicates whether the transaction or block is valid. */
151
151
  valid: boolean;
152
152
  /** The transaction hash as a hexadecimal string (if available). */
@@ -159,17 +159,17 @@ declare interface CheckSignaturesResult {
159
159
 
160
160
 
161
161
  // The execution units object contains two numeric fields.
162
- declare type ExUnits = {
162
+ export type ExUnits = {
163
163
  steps: number;
164
164
  mem: number;
165
165
  };
166
166
 
167
167
  // The redeemer tag is one of the following literal strings.
168
- declare type RedeemerTag = "Spend" | "Mint" | "Cert" | "Reward" | "Propose" | "Vote";
168
+ export type RedeemerTag = "Spend" | "Mint" | "Cert" | "Reward" | "Propose" | "Vote";
169
169
 
170
170
  // A successful redeemer evaluation contains the original execution units,
171
171
  // the calculated execution units, and additional redeemer info.
172
- declare interface RedeemerSuccess {
172
+ export interface RedeemerSuccess {
173
173
  original_ex_units: ExUnits;
174
174
  calculated_ex_units: ExUnits;
175
175
  redeemer_index: number;
@@ -178,7 +178,7 @@ declare interface RedeemerSuccess {
178
178
 
179
179
  // A failed redeemer evaluation contains the original execution units,
180
180
  // an error message, and additional redeemer info.
181
- declare interface RedeemerError {
181
+ export interface RedeemerError {
182
182
  original_ex_units: ExUnits;
183
183
  error: string;
184
184
  redeemer_index: number;
@@ -187,14 +187,14 @@ declare interface RedeemerError {
187
187
 
188
188
  // The result from executing the transaction scripts is an array of redeemer results.
189
189
  // Each result can be either a success or an error.
190
- declare type RedeemerResult = RedeemerSuccess | RedeemerError;
190
+ export type RedeemerResult = RedeemerSuccess | RedeemerError;
191
191
 
192
192
  // Type for the `execute_tx_scripts` response after JSON-parsing.
193
- declare type ExecuteTxScriptsResult = RedeemerResult[];
193
+ export type ExecuteTxScriptsResult = RedeemerResult[];
194
194
 
195
195
 
196
196
  // The overall JSON produced by `to_json_program`:
197
- declare interface ProgramJson {
197
+ export interface ProgramJson {
198
198
  program: {
199
199
  version: string;
200
200
  term: Term;
@@ -202,7 +202,7 @@ declare interface ProgramJson {
202
202
  }
203
203
 
204
204
  // A UPLC term can be one of several forms.
205
- declare type Term =
205
+ export type Term =
206
206
  | VarTerm
207
207
  | DelayTerm
208
208
  | LambdaTerm
@@ -214,52 +214,52 @@ declare type Term =
214
214
  | ConstrTerm
215
215
  | CaseTerm;
216
216
 
217
- declare interface VarTerm {
217
+ export interface VarTerm {
218
218
  var: string;
219
219
  }
220
220
 
221
- declare interface DelayTerm {
221
+ export interface DelayTerm {
222
222
  delay: Term;
223
223
  }
224
224
 
225
- declare interface LambdaTerm {
225
+ export interface LambdaTerm {
226
226
  lambda: {
227
227
  parameter_name: string;
228
228
  body: Term;
229
229
  };
230
230
  }
231
231
 
232
- declare interface ApplyTerm {
232
+ export interface ApplyTerm {
233
233
  apply: {
234
234
  function: Term;
235
235
  argument: Term;
236
236
  };
237
237
  }
238
238
 
239
- declare interface ConstantTerm {
239
+ export interface ConstantTerm {
240
240
  constant: Constant;
241
241
  }
242
242
 
243
- declare interface ForceTerm {
243
+ export interface ForceTerm {
244
244
  force: Term;
245
245
  }
246
246
 
247
- declare interface ErrorTerm {
247
+ export interface ErrorTerm {
248
248
  error: "error";
249
249
  }
250
250
 
251
- declare interface BuiltinTerm {
251
+ export interface BuiltinTerm {
252
252
  builtin: string;
253
253
  }
254
254
 
255
- declare interface ConstrTerm {
255
+ export interface ConstrTerm {
256
256
  constr: {
257
257
  tag: number;
258
258
  fields: Term[];
259
259
  };
260
260
  }
261
261
 
262
- declare interface CaseTerm {
262
+ export interface CaseTerm {
263
263
  case: {
264
264
  constr: Term;
265
265
  branches: Term[];
@@ -267,7 +267,7 @@ declare interface CaseTerm {
267
267
  }
268
268
 
269
269
  // The UPLC constant is one of several union types.
270
- declare type Constant =
270
+ export type Constant =
271
271
  | IntegerConstant
272
272
  | ByteStringConstant
273
273
  | StringConstant
@@ -279,34 +279,34 @@ declare type Constant =
279
279
  | Bls12_381G1ElementConstant
280
280
  | Bls12_381G2ElementConstant;
281
281
 
282
- declare interface IntegerConstant {
282
+ export interface IntegerConstant {
283
283
  integer: string; // represented as a string
284
284
  }
285
285
 
286
- declare interface ByteStringConstant {
286
+ export interface ByteStringConstant {
287
287
  bytestring: string; // hex-encoded string
288
288
  }
289
289
 
290
- declare interface StringConstant {
290
+ export interface StringConstant {
291
291
  string: string;
292
292
  }
293
293
 
294
- declare interface UnitConstant {
294
+ export interface UnitConstant {
295
295
  unit: "()";
296
296
  }
297
297
 
298
- declare interface BoolConstant {
298
+ export interface BoolConstant {
299
299
  bool: boolean;
300
300
  }
301
301
 
302
- declare interface ListConstant {
302
+ export interface ListConstant {
303
303
  list: {
304
304
  type: Type;
305
305
  items: Constant[];
306
306
  };
307
307
  }
308
308
 
309
- declare interface PairConstant {
309
+ export interface PairConstant {
310
310
  pair: {
311
311
  type_left: Type;
312
312
  type_right: Type;
@@ -315,11 +315,11 @@ declare interface PairConstant {
315
315
  };
316
316
  }
317
317
 
318
- declare interface DataConstant {
318
+ export interface DataConstant {
319
319
  data: PlutusData;
320
320
  }
321
321
 
322
- declare interface Bls12_381G1ElementConstant {
322
+ export interface Bls12_381G1ElementConstant {
323
323
  bls12_381_G1_element: {
324
324
  x: number;
325
325
  y: number;
@@ -327,12 +327,12 @@ declare interface Bls12_381G1ElementConstant {
327
327
  };
328
328
  }
329
329
 
330
- declare interface Bls12_381G2ElementConstant {
330
+ export interface Bls12_381G2ElementConstant {
331
331
  bls12_381_G2_element: BlstP2;
332
332
  }
333
333
 
334
334
  // The UPLC type is represented either as a string literal or an object.
335
- declare type Type =
335
+ export type Type =
336
336
  | "bool"
337
337
  | "integer"
338
338
  | "string"
@@ -345,11 +345,11 @@ declare type Type =
345
345
  | ListType
346
346
  | PairType;
347
347
 
348
- declare interface ListType {
348
+ export interface ListType {
349
349
  list: Type;
350
350
  }
351
351
 
352
- declare interface PairType {
352
+ export interface PairType {
353
353
  pair: {
354
354
  left: Type;
355
355
  right: Type;
@@ -357,21 +357,21 @@ declare interface PairType {
357
357
  }
358
358
 
359
359
  // The JSON representation for a blst_p2 element: each coordinate is an array of numbers.
360
- declare interface BlstP2 {
360
+ export interface BlstP2 {
361
361
  x: number[];
362
362
  y: number[];
363
363
  z: number[];
364
364
  }
365
365
 
366
366
  // Plutus data is also a tagged union.
367
- declare type PlutusData =
367
+ export type PlutusData =
368
368
  | ConstrData
369
369
  | MapData
370
370
  | BigIntData
371
371
  | BoundedBytesData
372
372
  | ArrayData;
373
373
 
374
- declare interface ConstrData {
374
+ export interface ConstrData {
375
375
  constr: {
376
376
  tag: number;
377
377
  any_constructor: boolean;
@@ -379,36 +379,36 @@ declare interface ConstrData {
379
379
  };
380
380
  }
381
381
 
382
- declare interface MapData {
382
+ export interface MapData {
383
383
  map: Array<{
384
384
  key: PlutusData;
385
385
  value: PlutusData;
386
386
  }>;
387
387
  }
388
388
 
389
- declare interface BigIntData {
389
+ export interface BigIntData {
390
390
  integer: string; // big integers are represented as strings
391
391
  }
392
392
 
393
- declare interface BoundedBytesData {
393
+ export interface BoundedBytesData {
394
394
  bytestring: string; // hex-encoded
395
395
  }
396
396
 
397
- declare interface ArrayData {
397
+ export interface ArrayData {
398
398
  list: PlutusData[];
399
399
  }
400
400
 
401
- declare interface Asset {
401
+ export interface Asset {
402
402
  unit: string;
403
403
  quantity: string;
404
404
  }
405
405
 
406
- declare interface TxInput {
406
+ export interface TxInput {
407
407
  outputIndex: number;
408
408
  txHash: string;
409
409
  }
410
410
 
411
- declare interface TxOutput {
411
+ export interface TxOutput {
412
412
  address: string;
413
413
  amount: Asset[];
414
414
  dataHash?: string;
@@ -417,12 +417,12 @@ declare interface TxOutput {
417
417
  scriptHash?: string;
418
418
  }
419
419
 
420
- declare interface UTxO {
420
+ export interface UTxO {
421
421
  input: TxInput;
422
422
  output: TxOutput;
423
423
  }
424
424
 
425
- declare interface CostModels {
425
+ export interface CostModels {
426
426
  plutusV1?: number[];
427
427
  plutusV2?: number[];
428
428
  plutusV3?: number[];
@@ -431,558 +431,774 @@ declare interface CostModels {
431
431
 
432
432
  ///AUTOGENERATED
433
433
 
434
- declare interface GovernanceActionId {
435
- index: number;
436
- txHash: number[];
437
- }
438
-
439
- declare type GovernanceActionType = "parameterChangeAction" | "hardForkInitiationAction" | "treasuryWithdrawalsAction" | "noConfidenceAction" | "updateCommitteeAction" | "newConstitutionAction" | "infoAction";
440
-
441
- declare type LocalCredential = {
442
- keyHash: number[];
443
- } | {
444
- scriptHash: number[];
445
- };
446
-
447
- declare interface TxInput {
448
- outputIndex: number;
449
- txHash: string;
450
- }
451
-
452
- declare interface FeeDecomposition {
453
- executionUnitsFee: number;
454
- referenceScriptsFee: number;
455
- txSizeFee: number;
456
- }
457
-
458
- declare interface MultiAsset {
459
- assets: ValidatorAsset[];
460
- }
461
-
462
- declare type Phase1Error = "GenesisKeyDelegationCertificateIsNotSupported" | "MoveInstantaneousRewardsCertificateIsNotSupported" | {
463
- BadInputsUTxO: {
464
- invalid_input: TxInput;
465
- };
466
- } | {
467
- OutsideValidityIntervalUTxO: {
468
- current_slot: number;
469
- interval_end: number;
470
- interval_start: number;
471
- };
472
- } | {
473
- MaxTxSizeUTxO: {
474
- actual_size: number;
475
- max_size: number;
476
- };
477
- } | string | {
478
- FeeTooSmallUTxO: {
479
- actual_fee: number;
480
- fee_decomposition: FeeDecomposition;
481
- min_fee: number;
482
- };
483
- } | {
484
- ValueNotConservedUTxO: {
485
- difference: Value;
486
- input_sum: Value;
487
- output_sum: Value;
488
- };
489
- } | {
490
- WrongNetwork: {
491
- wrong_addresses: string[];
492
- };
493
- } | {
494
- WrongNetworkWithdrawal: {
495
- wrong_addresses: string[];
496
- };
497
- } | {
498
- WrongNetworkInTxBody: {
499
- actual_network: number;
500
- expected_network: number;
501
- };
502
- } | {
503
- OutputTooSmallUTxO: {
504
- min_amount: number;
505
- output_amount: number;
506
- };
507
- } | {
508
- CollateralReturnTooSmall: {
509
- min_amount: number;
510
- output_amount: number;
511
- };
512
- } | {
513
- OutputBootAddrAttrsTooBig: {
514
- actual_size: number;
515
- max_size: number;
516
- output: any;
517
- };
518
- } | {
519
- OutputTooBigUTxO: {
520
- max_size: number;
521
- oversized_outputs: string[];
522
- };
523
- } | {
524
- InsufficientCollateral: {
525
- required_collateral: number;
526
- total_collateral: number;
527
- };
528
- } | {
529
- ScriptsNotPaidUTxO: {
530
- missing_witness: string[];
531
- };
532
- } | {
533
- ExUnitsTooBigUTxO: {
534
- actual_units: number;
535
- max_units: number;
536
- };
537
- } | string | {
538
- CollateralInputContainsNonAdaAssets: {
539
- collateral_input: string;
540
- };
541
- } | {
542
- CollateralIsLockedByScript: {
543
- invalid_collateral: string;
544
- };
545
- } | {
546
- OutsideForecast: {
547
- current_slot: number;
548
- max_forecast_slot: number;
549
- };
550
- } | {
551
- TooManyCollateralInputs: {
552
- actual_count: number;
553
- max_count: number;
554
- };
555
- } | string | {
556
- IncorrectTotalCollateralField: {
557
- actual_sum: number;
558
- declared_total: number;
559
- };
560
- } | {
561
- InvalidSignature: {
562
- invalid_signature: string;
563
- };
564
- } | {
565
- ExtraneousSignature: {
566
- extraneous_signature: string;
567
- };
568
- } | {
569
- NativeScriptIsUnsuccessful: {
570
- native_script_hash: string;
571
- };
572
- } | {
573
- PlutusScriptIsUnsuccessful: {
574
- plutus_script_hash: string;
575
- };
576
- } | {
577
- MissingVKeyWitnesses: {
578
- missing_key_hash: string;
579
- };
580
- } | {
581
- MissingScriptWitnesses: {
582
- missing_script_hash: string;
583
- };
584
- } | {
585
- MissingRedeemer: {
586
- index: number;
587
- tag: string;
588
- };
589
- } | string | string | {
590
- ConflictingMetadataHash: {
591
- actual_hash: string;
592
- expected_hash: string;
593
- };
594
- } | {
595
- InvalidMetadata: {
596
- message: string;
597
- };
598
- } | {
599
- ExtraneousScriptWitnesses: {
600
- extraneous_scripts: string[];
601
- };
602
- } | {
603
- StakeAlreadyRegistered: {
604
- reward_address: string;
605
- };
606
- } | {
607
- StakeNotRegistered: {
608
- reward_address: string;
609
- };
610
- } | {
611
- StakeNonZeroAccountBalance: {
612
- remaining_balance: number;
613
- reward_address: string;
614
- };
615
- } | {
616
- RewardAccountNotExisting: {
617
- reward_address: string;
618
- };
619
- } | {
620
- WrongRequestedWithdrawalAmount: {
621
- expected_amount: number;
622
- requested_amount: number;
623
- reward_address: string;
624
- };
625
- } | {
626
- StakePoolNotRegistered: {
627
- pool_id: string;
628
- };
629
- } | {
630
- WrongRetirementEpoch: {
631
- current_epoch: number;
632
- max_epoch: number;
633
- min_epoch: number;
634
- specified_epoch: number;
635
- };
636
- } | {
637
- StakePoolCostTooLow: {
638
- min_cost: number;
639
- specified_cost: number;
640
- };
641
- } | {
642
- InsufficientFundsForMir: {
643
- available_amount: number;
644
- requested_amount: number;
645
- };
646
- } | {
647
- InvalidCommitteeVote: {
648
- message: string;
649
- voter: any;
650
- };
651
- } | {
652
- DRepIncorrectDeposit: {
653
- cert_index: number;
654
- required_deposit: number;
655
- supplied_deposit: number;
656
- };
657
- } | {
658
- DRepDeregistrationWrongRefund: {
659
- cert_index: number;
660
- required_refund: number;
661
- supplied_refund: number;
662
- };
663
- } | {
664
- StakeRegistrationWrongDeposit: {
665
- cert_index: number;
666
- required_deposit: number;
667
- supplied_deposit: number;
668
- };
669
- } | {
670
- StakeDeregistrationWrongRefund: {
671
- cert_index: number;
672
- required_refund: number;
673
- supplied_refund: number;
674
- };
675
- } | {
676
- PoolRegistrationWrongDeposit: {
677
- cert_index: number;
678
- required_deposit: number;
679
- supplied_deposit: number;
680
- };
681
- } | {
682
- CommitteeHasPreviouslyResigned: {
683
- committee_credential: LocalCredential;
684
- };
685
- } | {
686
- TreasuryValueMismatch: {
687
- actual_value: number;
688
- declared_value: number;
689
- };
690
- } | {
691
- RefScriptsSizeTooBig: {
692
- actual_size: number;
693
- max_size: number;
694
- };
695
- } | {
696
- WdrlNotDelegatedToDRep: {
697
- stake_credential: LocalCredential;
698
- };
699
- } | {
700
- CommitteeIsUnknown: {
701
- committee_key_hash: LocalCredential;
702
- };
703
- } | {
704
- GovActionsDoNotExist: {
705
- invalid_action_ids: GovernanceActionId[];
706
- };
707
- } | {
708
- MalformedProposal: {
709
- gov_action: GovernanceActionId;
710
- };
711
- } | {
712
- ProposalProcedureNetworkIdMismatch: {
713
- expected_network: number;
714
- reward_account: string;
715
- };
716
- } | {
717
- TreasuryWithdrawalsNetworkIdMismatch: {
718
- expected_network: number;
719
- mismatched_account: string;
720
- };
721
- } | {
722
- VotingProposalIncorrectDeposit: {
723
- proposal_index: number;
724
- required_deposit: number;
725
- supplied_deposit: number;
726
- };
727
- } | {
728
- DisallowedVoters: {
729
- disallowed_pairs: any[][];
730
- };
731
- } | {
732
- ConflictingCommitteeUpdate: {
733
- conflicting_credentials: LocalCredential;
734
- };
735
- } | {
736
- ExpirationEpochTooSmall: {
737
- invalid_expirations: Record<string, any>;
738
- };
739
- } | {
740
- InvalidPrevGovActionId: {
741
- proposal: any;
742
- };
743
- } | {
744
- VotingOnExpiredGovAction: {
745
- expired_gov_action: GovernanceActionId;
746
- };
747
- } | {
748
- ProposalCantFollow: {
749
- expected_versions: ProtocolVersion[];
750
- prev_gov_action_id?: GovernanceActionId | null;
751
- supplied_version: ProtocolVersion;
752
- };
753
- } | {
754
- InvalidConstitutionPolicyHash: {
755
- expected_hash?: any;
756
- supplied_hash?: any;
757
- };
758
- } | {
759
- VotersDoNotExist: {
760
- missing_voter: any;
761
- };
762
- } | {
763
- ZeroTreasuryWithdrawals: {
764
- gov_action: GovernanceActionId;
765
- };
766
- } | {
767
- ProposalReturnAccountDoesNotExist: {
768
- return_account: string;
769
- };
770
- } | {
771
- TreasuryWithdrawalReturnAccountsDoNotExist: {
772
- missing_account: string;
773
- };
774
- } | {
775
- AuxiliaryDataHashMismatch: {
776
- actual_hash?: any;
777
- expected_hash: string;
778
- };
779
- } | string | string;
780
-
781
- declare type Phase1Warning = "InputsAreNotSorted" | "CollateralIsUnnecessary" | "TotalCollateralIsNotDeclared" | {
782
- FeeIsBiggerThanMinFee: {
783
- actual_fee: number;
784
- fee_decomposition: FeeDecomposition;
785
- min_fee: number;
786
- };
787
- } | {
788
- InputUsesRewardAddress: {
789
- invalid_input: string;
790
- };
791
- } | {
792
- CollateralInputUsesRewardAddress: {
793
- invalid_collateral: string;
794
- };
795
- } | {
796
- CannotCheckStakeDeregistrationRefund: {
797
- cert_index: number;
798
- };
799
- } | {
800
- CannotCheckDRepDeregistrationRefund: {
801
- cert_index: number;
802
- };
803
- } | {
804
- PoolAlreadyRegistered: {
805
- pool_id: string;
806
- };
807
- } | {
808
- DRepAlreadyRegistered: {
809
- drep_id: string;
810
- };
811
- } | {
812
- CommitteeAlreadyAuthorized: {
813
- committee_key: string;
814
- };
815
- } | {
816
- DRepNotRegistered: {
817
- cert_index: number;
818
- };
819
- } | {
820
- DuplicateRegistrationInTx: {
821
- cert_index: number;
822
- entity_id: string;
823
- entity_type: string;
824
- };
825
- } | {
826
- DuplicateCommitteeColdResignationInTx: {
827
- cert_index: number;
828
- committee_credential: LocalCredential;
829
- };
830
- } | {
831
- DuplicateCommitteeHotRegistrationInTx: {
832
- cert_index: number;
833
- committee_credential: LocalCredential;
834
- };
835
- };
836
-
837
- declare interface ProtocolVersion {
838
- major: number;
839
- minor: number;
840
- }
841
-
842
- declare interface ValidationError {
843
- error: Phase1Error;
844
- error_message: string;
845
- hint?: any;
846
- locations: string[];
847
- }
848
-
849
- declare interface ValidationWarning {
850
- hint?: any;
851
- locations: string[];
852
- warning: Phase1Warning;
853
- }
854
-
855
- declare interface ValidatorAsset {
856
- asset_name: string;
857
- policy_id: string;
858
- quantity: number;
859
- }
860
-
861
- declare interface Value {
862
- assets: MultiAsset;
863
- coins: number;
864
- }
865
-
866
- declare type Voter = {
867
- constitutionalCommitteeHotScriptHash: number[];
868
- } | {
869
- constitutionalCommitteeHotKeyHash: number[];
870
- } | {
871
- dRepScriptHash: number[];
872
- } | {
873
- dRepKeyHash: number[];
874
- } | {
875
- stakingPoolKeyHash: number[];
876
- };
877
-
878
- declare interface AccountInputContext {
879
- balance?: any;
880
- bech32Address: string;
881
- isRegistered: boolean;
882
- payedDeposit?: any;
883
- }
884
-
885
- declare interface Asset {
886
- quantity: string;
887
- unit: string;
888
- }
889
-
890
- declare interface CommitteeInputContext {
891
- activeCommitteeMembers: LocalCredential[];
892
- potentialCommitteeMembers: LocalCredential[];
893
- resignedCommitteeMembers: LocalCredential[];
894
- }
895
-
896
- declare interface DrepInputContext {
897
- bech32Drep: string;
898
- isRegistered: boolean;
899
- payedDeposit?: any;
900
- }
901
-
902
- declare interface ExUnitPrices {
903
- memPrice: SubCoin;
904
- stepPrice: SubCoin;
905
- }
906
-
907
- declare interface GovActionInputContext {
908
- actionId: GovernanceActionId;
909
- actionType: GovernanceActionType;
910
- isActive: boolean;
911
- }
912
-
913
- declare type NetworkType = "mainnet" | "testnet";
914
-
915
- declare interface PoolInputContext {
916
- isRegistered: boolean;
917
- poolId: string;
918
- retirementEpoch?: any;
919
- }
920
-
921
- declare interface ProtocolParameters {
922
- adaPerUtxoByte: number;
923
- collateralPercentage: number;
924
- costModels: CostModels;
925
- drepDeposit: number;
926
- executionPrices: ExUnitPrices;
927
- governanceActionDeposit: number;
928
- maxBlockBodySize: number;
929
- maxBlockExecutionUnits: ExUnits;
930
- maxBlockHeaderSize: number;
931
- maxCollateralInputs: number;
932
- maxEpochForPoolRetirement: number;
933
- maxTransactionSize: number;
934
- maxTxExecutionUnits: ExUnits;
935
- maxValueSize: number;
936
- minFeeCoefficientA: number;
937
- minFeeConstantB: number;
938
- minPoolCost: number;
939
- protocolVersion: any[];
940
- referenceScriptCostPerByte: SubCoin;
941
- stakeKeyDeposit: number;
942
- stakePoolDeposit: number;
943
- }
944
-
945
- declare interface SubCoin {
946
- denominator: number;
947
- numerator: number;
948
- }
949
-
950
- declare interface UTxO {
951
- input: TxInput;
952
- output: TxOutput;
953
- }
954
-
955
- declare interface UtxoInputContext {
956
- isSpent: boolean;
957
- utxo: UTxO;
958
- }
959
-
960
- declare interface NecessaryInputData {
961
- accounts: string[];
962
- committeeMembers: LocalCredential[];
963
- dReps: string[];
964
- govActions: GovernanceActionId[];
965
- lastEnactedGovAction: GovernanceActionType[];
966
- pools: string[];
967
- utxos: TxInput[];
968
- }
969
-
970
- declare interface ValidationResult {
971
- errors: ValidationError[];
972
- warnings: ValidationWarning[];
973
- }
974
-
975
- declare interface ValidationInputContext {
976
- accountContexts: AccountInputContext[];
977
- committeeContext: CommitteeInputContext;
978
- drepContexts: DrepInputContext[];
979
- govActionContexts: GovActionInputContext[];
980
- lastEnactedGovAction: GovActionInputContext[];
981
- networkType: NetworkType;
982
- poolContexts: PoolInputContext[];
983
- protocolParameters: ProtocolParameters;
984
- slot: number;
985
- treasuryValue: number;
986
- utxoSet: UtxoInputContext[];
987
- }
988
-
434
+ export interface NecessaryInputData {
435
+ accounts: string[];
436
+ committeeMembers: LocalCredential[];
437
+ dReps: string[];
438
+ govActions: GovernanceActionId[];
439
+ lastEnactedGovAction: GovernanceActionType[];
440
+ pools: string[];
441
+ utxos: TxInput[];
442
+ }
443
+
444
+ /**
445
+ * Phase 1 validation errors
446
+ */
447
+ export type Phase1Error =
448
+ | (
449
+ | "GenesisKeyDelegationCertificateIsNotSupported"
450
+ | "MoveInstantaneousRewardsCertificateIsNotSupported"
451
+ )
452
+ | {
453
+ BadInputsUTxO: {
454
+ invalid_input: TxInput;
455
+ };
456
+ }
457
+ | {
458
+ OutsideValidityIntervalUTxO: {
459
+ current_slot: bigint;
460
+ interval_end: bigint;
461
+ interval_start: bigint;
462
+ };
463
+ }
464
+ | {
465
+ MaxTxSizeUTxO: {
466
+ actual_size: bigint;
467
+ max_size: bigint;
468
+ };
469
+ }
470
+ | "InputSetEmptyUTxO"
471
+ | {
472
+ FeeTooSmallUTxO: {
473
+ actual_fee: bigint;
474
+ fee_decomposition: FeeDecomposition;
475
+ min_fee: bigint;
476
+ };
477
+ }
478
+ | {
479
+ ValueNotConservedUTxO: {
480
+ difference: Value;
481
+ input_sum: Value;
482
+ output_sum: Value;
483
+ };
484
+ }
485
+ | {
486
+ WrongNetwork: {
487
+ wrong_addresses: string[];
488
+ };
489
+ }
490
+ | {
491
+ WrongNetworkWithdrawal: {
492
+ wrong_addresses: string[];
493
+ };
494
+ }
495
+ | {
496
+ WrongNetworkInTxBody: {
497
+ actual_network: number;
498
+ expected_network: number;
499
+ };
500
+ }
501
+ | {
502
+ OutputTooSmallUTxO: {
503
+ min_amount: number;
504
+ output_amount: number;
505
+ };
506
+ }
507
+ | {
508
+ CollateralReturnTooSmall: {
509
+ min_amount: number;
510
+ output_amount: number;
511
+ };
512
+ }
513
+ | {
514
+ OutputBootAddrAttrsTooBig: {
515
+ actual_size: bigint;
516
+ max_size: bigint;
517
+ output: unknown;
518
+ };
519
+ }
520
+ | {
521
+ OutputTooBigUTxO: {
522
+ actual_size: bigint;
523
+ max_size: bigint;
524
+ };
525
+ }
526
+ | {
527
+ InsufficientCollateral: {
528
+ required_collateral: number;
529
+ total_collateral: number;
530
+ };
531
+ }
532
+ | {
533
+ ExUnitsTooBigUTxO: {
534
+ actual_memory_units: bigint;
535
+ actual_steps_units: bigint;
536
+ max_memory_units: bigint;
537
+ max_steps_units: bigint;
538
+ };
539
+ }
540
+ | "CalculatedCollateralContainsNonAdaAssets"
541
+ | {
542
+ CollateralInputContainsNonAdaAssets: {
543
+ collateral_input: string;
544
+ };
545
+ }
546
+ | {
547
+ CollateralIsLockedByScript: {
548
+ invalid_collateral: string;
549
+ };
550
+ }
551
+ | {
552
+ TooManyCollateralInputs: {
553
+ actual_count: number;
554
+ max_count: number;
555
+ };
556
+ }
557
+ | "NoCollateralInputs"
558
+ | {
559
+ IncorrectTotalCollateralField: {
560
+ actual_sum: number;
561
+ declared_total: number;
562
+ };
563
+ }
564
+ | {
565
+ InvalidSignature: {
566
+ invalid_signature: string;
567
+ };
568
+ }
569
+ | {
570
+ ExtraneousSignature: {
571
+ extraneous_signature: string;
572
+ };
573
+ }
574
+ | {
575
+ NativeScriptIsUnsuccessful: {
576
+ native_script_hash: string;
577
+ };
578
+ }
579
+ | {
580
+ PlutusScriptIsUnsuccessful: {
581
+ plutus_script_hash: string;
582
+ };
583
+ }
584
+ | {
585
+ MissingVKeyWitnesses: {
586
+ missing_key_hash: string;
587
+ };
588
+ }
589
+ | {
590
+ MissingScriptWitnesses: {
591
+ missing_script_hash: string;
592
+ };
593
+ }
594
+ | {
595
+ MissingRedeemer: {
596
+ index: number;
597
+ tag: string;
598
+ };
599
+ }
600
+ | "MissingTxBodyMetadataHash"
601
+ | "MissingTxMetadata"
602
+ | {
603
+ ConflictingMetadataHash: {
604
+ actual_hash: string;
605
+ expected_hash: string;
606
+ };
607
+ }
608
+ | {
609
+ InvalidMetadata: {
610
+ message: string;
611
+ };
612
+ }
613
+ | {
614
+ ExtraneousScriptWitnesses: {
615
+ extraneous_script: string;
616
+ };
617
+ }
618
+ | {
619
+ StakeAlreadyRegistered: {
620
+ reward_address: string;
621
+ };
622
+ }
623
+ | {
624
+ StakeNotRegistered: {
625
+ reward_address: string;
626
+ };
627
+ }
628
+ | {
629
+ StakeNonZeroAccountBalance: {
630
+ remaining_balance: bigint;
631
+ reward_address: string;
632
+ };
633
+ }
634
+ | {
635
+ RewardAccountNotExisting: {
636
+ reward_address: string;
637
+ };
638
+ }
639
+ | {
640
+ WrongRequestedWithdrawalAmount: {
641
+ expected_amount: number;
642
+ requested_amount: bigint;
643
+ reward_address: string;
644
+ };
645
+ }
646
+ | {
647
+ StakePoolNotRegistered: {
648
+ pool_id: string;
649
+ };
650
+ }
651
+ | {
652
+ WrongRetirementEpoch: {
653
+ current_epoch: bigint;
654
+ max_epoch: bigint;
655
+ min_epoch: bigint;
656
+ specified_epoch: bigint;
657
+ };
658
+ }
659
+ | {
660
+ StakePoolCostTooLow: {
661
+ min_cost: bigint;
662
+ specified_cost: bigint;
663
+ };
664
+ }
665
+ | {
666
+ InsufficientFundsForMir: {
667
+ available_amount: bigint;
668
+ requested_amount: bigint;
669
+ };
670
+ }
671
+ | {
672
+ InvalidCommitteeVote: {
673
+ message: string;
674
+ voter: unknown;
675
+ };
676
+ }
677
+ | {
678
+ DRepIncorrectDeposit: {
679
+ cert_index: number;
680
+ required_deposit: number;
681
+ supplied_deposit: number;
682
+ };
683
+ }
684
+ | {
685
+ DRepDeregistrationWrongRefund: {
686
+ cert_index: number;
687
+ required_refund: number;
688
+ supplied_refund: number;
689
+ };
690
+ }
691
+ | {
692
+ StakeRegistrationWrongDeposit: {
693
+ cert_index: number;
694
+ required_deposit: number;
695
+ supplied_deposit: number;
696
+ };
697
+ }
698
+ | {
699
+ StakeDeregistrationWrongRefund: {
700
+ cert_index: number;
701
+ required_refund: number;
702
+ supplied_refund: number;
703
+ };
704
+ }
705
+ | {
706
+ PoolRegistrationWrongDeposit: {
707
+ cert_index: number;
708
+ required_deposit: number;
709
+ supplied_deposit: number;
710
+ };
711
+ }
712
+ | {
713
+ CommitteeHasPreviouslyResigned: {
714
+ committee_credential: LocalCredential;
715
+ };
716
+ }
717
+ | {
718
+ TreasuryValueMismatch: {
719
+ actual_value: bigint;
720
+ declared_value: bigint;
721
+ };
722
+ }
723
+ | {
724
+ RefScriptsSizeTooBig: {
725
+ actual_size: bigint;
726
+ max_size: bigint;
727
+ };
728
+ }
729
+ | {
730
+ WithdrawalNotAllowedBecauseNotDelegatedToDRep: {
731
+ reward_address: string;
732
+ };
733
+ }
734
+ | {
735
+ CommitteeIsUnknown: {
736
+ /**
737
+ * The committee key hash
738
+ */
739
+ committee_key_hash:
740
+ | {
741
+ keyHash: number[];
742
+ }
743
+ | {
744
+ scriptHash: number[];
745
+ };
746
+ };
747
+ }
748
+ | {
749
+ GovActionsDoNotExist: {
750
+ /**
751
+ * The list of invalid governance action IDs
752
+ */
753
+ invalid_action_ids: GovernanceActionId[];
754
+ };
755
+ }
756
+ | {
757
+ MalformedProposal: {
758
+ gov_action: GovernanceActionId;
759
+ };
760
+ }
761
+ | {
762
+ ProposalProcedureNetworkIdMismatch: {
763
+ /**
764
+ * The expected network ID
765
+ */
766
+ expected_network: number;
767
+ /**
768
+ * The reward account
769
+ */
770
+ reward_account: string;
771
+ };
772
+ }
773
+ | {
774
+ TreasuryWithdrawalsNetworkIdMismatch: {
775
+ /**
776
+ * The expected network ID
777
+ */
778
+ expected_network: number;
779
+ /**
780
+ * The set of mismatched reward accounts
781
+ */
782
+ mismatched_account: string;
783
+ };
784
+ }
785
+ | {
786
+ VotingProposalIncorrectDeposit: {
787
+ proposal_index: number;
788
+ /**
789
+ * The required deposit amount
790
+ */
791
+ required_deposit: number;
792
+ /**
793
+ * The supplied deposit amount
794
+ */
795
+ supplied_deposit: number;
796
+ };
797
+ }
798
+ | {
799
+ DisallowedVoters: {
800
+ /**
801
+ * List of disallowed voter and action ID pairs
802
+ */
803
+ disallowed_pairs: [unknown, unknown][];
804
+ };
805
+ }
806
+ | {
807
+ ConflictingCommitteeUpdate: {
808
+ /**
809
+ * The set of conflicting credentials
810
+ */
811
+ conflicting_credentials:
812
+ | {
813
+ keyHash: number[];
814
+ }
815
+ | {
816
+ scriptHash: number[];
817
+ };
818
+ };
819
+ }
820
+ | {
821
+ ExpirationEpochTooSmall: {
822
+ /**
823
+ * Map of credentials to their invalid expiration epochs
824
+ */
825
+ invalid_expirations: {
826
+ [k: string]: number;
827
+ };
828
+ };
829
+ }
830
+ | {
831
+ InvalidPrevGovActionId: {
832
+ /**
833
+ * The invalid proposal
834
+ */
835
+ proposal: {
836
+ [k: string]: unknown;
837
+ };
838
+ };
839
+ }
840
+ | {
841
+ VotingOnExpiredGovAction: {
842
+ expired_gov_action: GovernanceActionId;
843
+ };
844
+ }
845
+ | {
846
+ ProposalCantFollow: {
847
+ /**
848
+ * The expected protocol version
849
+ */
850
+ expected_versions: ProtocolVersion[];
851
+ /**
852
+ * Previous governance action ID
853
+ */
854
+ prev_gov_action_id?: GovernanceActionId | null;
855
+ supplied_version: ProtocolVersion;
856
+ };
857
+ }
858
+ | {
859
+ InvalidConstitutionPolicyHash: {
860
+ /**
861
+ * The expected policy hash
862
+ */
863
+ expected_hash?: string | null;
864
+ /**
865
+ * The supplied policy hash
866
+ */
867
+ supplied_hash?: string | null;
868
+ };
869
+ }
870
+ | {
871
+ VoterDoNotExist: {
872
+ /**
873
+ * List of non-existent voters
874
+ */
875
+ missing_voter: {
876
+ [k: string]: unknown;
877
+ };
878
+ };
879
+ }
880
+ | {
881
+ ZeroTreasuryWithdrawals: {
882
+ gov_action: GovernanceActionId;
883
+ };
884
+ }
885
+ | {
886
+ ProposalReturnAccountDoesNotExist: {
887
+ /**
888
+ * The invalid return account
889
+ */
890
+ return_account: string;
891
+ };
892
+ }
893
+ | {
894
+ TreasuryWithdrawalReturnAccountsDoNotExist: {
895
+ /**
896
+ * List of non-existent return accounts
897
+ */
898
+ missing_account: string;
899
+ };
900
+ }
901
+ | {
902
+ AuxiliaryDataHashMismatch: {
903
+ /**
904
+ * The actual auxiliary data hash
905
+ */
906
+ actual_hash?: string | null;
907
+ /**
908
+ * The expected auxiliary data hash
909
+ */
910
+ expected_hash: string;
911
+ };
912
+ }
913
+ | "AuxiliaryDataHashMissing"
914
+ | "AuxiliaryDataHashPresentButNotExpected"
915
+ | {
916
+ UnknownError: {
917
+ message: string;
918
+ };
919
+ }
920
+ | {
921
+ MissingDatum: {
922
+ datum_hash: string;
923
+ };
924
+ }
925
+ | {
926
+ ExtraneousDatumWitnesses: {
927
+ datum_hash: string;
928
+ };
929
+ }
930
+ | {
931
+ ScriptDataHashMismatch: {
932
+ /**
933
+ * The expected script data hash
934
+ */
935
+ expected_hash?: string | null;
936
+ /**
937
+ * The actual script data hash
938
+ */
939
+ provided_hash?: string | null;
940
+ };
941
+ };
942
+
943
+ export type Phase1Warning =
944
+ | ("InputsAreNotSorted" | "CollateralIsUnnecessary" | "TotalCollateralIsNotDeclared")
945
+ | {
946
+ FeeIsBiggerThanMinFee: {
947
+ actual_fee: bigint;
948
+ fee_decomposition: FeeDecomposition;
949
+ min_fee: bigint;
950
+ };
951
+ }
952
+ | {
953
+ InputUsesRewardAddress: {
954
+ invalid_input: string;
955
+ };
956
+ }
957
+ | {
958
+ CollateralInputUsesRewardAddress: {
959
+ invalid_collateral: string;
960
+ };
961
+ }
962
+ | {
963
+ CannotCheckStakeDeregistrationRefund: {
964
+ cert_index: number;
965
+ };
966
+ }
967
+ | {
968
+ CannotCheckDRepDeregistrationRefund: {
969
+ cert_index: number;
970
+ };
971
+ }
972
+ | {
973
+ PoolAlreadyRegistered: {
974
+ pool_id: string;
975
+ };
976
+ }
977
+ | {
978
+ DRepAlreadyRegistered: {
979
+ drep_id: string;
980
+ };
981
+ }
982
+ | {
983
+ CommitteeAlreadyAuthorized: {
984
+ committee_key: string;
985
+ };
986
+ }
987
+ | {
988
+ DRepNotRegistered: {
989
+ cert_index: number;
990
+ };
991
+ }
992
+ | {
993
+ DuplicateRegistrationInTx: {
994
+ cert_index: number;
995
+ entity_id: string;
996
+ entity_type: string;
997
+ };
998
+ }
999
+ | {
1000
+ DuplicateCommitteeColdResignationInTx: {
1001
+ cert_index: number;
1002
+ committee_credential: LocalCredential;
1003
+ };
1004
+ }
1005
+ | {
1006
+ DuplicateCommitteeHotRegistrationInTx: {
1007
+ cert_index: number;
1008
+ committee_credential: LocalCredential;
1009
+ };
1010
+ };
1011
+
1012
+ export interface ValidationResult {
1013
+ errors: ValidationError[];
1014
+ warnings: ValidationWarning[];
1015
+ }
1016
+ export interface ValidationError {
1017
+ error: Phase1Error;
1018
+ error_message: string;
1019
+ hint?: string | null;
1020
+ locations: string[];
1021
+ }
1022
+
1023
+ export interface FeeDecomposition {
1024
+ executionUnitsFee: bigint;
1025
+ referenceScriptsFee: bigint;
1026
+ txSizeFee: bigint;
1027
+ }
1028
+ export interface Value {
1029
+ assets: MultiAsset;
1030
+ coins: number;
1031
+ }
1032
+ export interface MultiAsset {
1033
+ assets: ValidatorAsset[];
1034
+ }
1035
+ export interface ValidatorAsset {
1036
+ asset_name: string;
1037
+ policy_id: string;
1038
+ quantity: number;
1039
+ }
1040
+
1041
+
1042
+ export interface ProtocolVersion {
1043
+ major: bigint;
1044
+ minor: bigint;
1045
+ }
1046
+
1047
+
1048
+ export interface ValidationWarning {
1049
+ hint?: string | null;
1050
+ locations: string[];
1051
+ warning: Phase1Warning;
1052
+ }
1053
+
1054
+ export type LocalCredential =
1055
+ | {
1056
+ keyHash: number[];
1057
+ }
1058
+ | {
1059
+ scriptHash: number[];
1060
+ };
1061
+ export type GovernanceActionType =
1062
+ | "parameterChangeAction"
1063
+ | "hardForkInitiationAction"
1064
+ | "treasuryWithdrawalsAction"
1065
+ | "noConfidenceAction"
1066
+ | "updateCommitteeAction"
1067
+ | "newConstitutionAction"
1068
+ | "infoAction";
1069
+ export type NetworkType = "mainnet" | "testnet";
1070
+
1071
+ export interface ValidationInputContext {
1072
+ accountContexts: AccountInputContext[];
1073
+ committeeContext: CommitteeInputContext;
1074
+ drepContexts: DrepInputContext[];
1075
+ govActionContexts: GovActionInputContext[];
1076
+ lastEnactedGovAction: GovActionInputContext[];
1077
+ networkType: NetworkType;
1078
+ poolContexts: PoolInputContext[];
1079
+ protocolParameters: ProtocolParameters;
1080
+ slot: bigint;
1081
+ treasuryValue: bigint;
1082
+ utxoSet: UtxoInputContext[];
1083
+ }
1084
+ export interface AccountInputContext {
1085
+ balance?: number | null;
1086
+ bech32Address: string;
1087
+ delegatedToDrep?: string | null;
1088
+ delegatedToPool?: string | null;
1089
+ isRegistered: boolean;
1090
+ payedDeposit?: number | null;
1091
+ }
1092
+ export interface CommitteeInputContext {
1093
+ activeCommitteeMembers: LocalCredential[];
1094
+ potentialCommitteeMembers: LocalCredential[];
1095
+ resignedCommitteeMembers: LocalCredential[];
1096
+ }
1097
+ export interface DrepInputContext {
1098
+ bech32Drep: string;
1099
+ isRegistered: boolean;
1100
+ payedDeposit?: number | null;
1101
+ }
1102
+ export interface GovActionInputContext {
1103
+ actionId: GovernanceActionId;
1104
+ actionType: GovernanceActionType;
1105
+ isActive: boolean;
1106
+ }
1107
+ export interface GovernanceActionId {
1108
+ index: number;
1109
+ txHash: number[];
1110
+ }
1111
+ export interface PoolInputContext {
1112
+ isRegistered: boolean;
1113
+ poolId: string;
1114
+ retirementEpoch?: number | null;
1115
+ }
1116
+ export interface ProtocolParameters {
1117
+ /**
1118
+ * Cost per UTxO byte in lovelace
1119
+ */
1120
+ adaPerUtxoByte: bigint;
1121
+ /**
1122
+ * Percentage of transaction fee required as collateral
1123
+ */
1124
+ collateralPercentage: number;
1125
+ costModels: CostModels;
1126
+ /**
1127
+ * Deposit amount required for registering as a DRep
1128
+ */
1129
+ drepDeposit: bigint;
1130
+ executionPrices: ExUnitPrices;
1131
+ /**
1132
+ * Deposit amount required for submitting a governance action
1133
+ */
1134
+ governanceActionDeposit: bigint;
1135
+ /**
1136
+ * Maximum block body size in bytes
1137
+ */
1138
+ maxBlockBodySize: number;
1139
+ maxBlockExecutionUnits: ExUnits;
1140
+ /**
1141
+ * Maximum block header size in bytes
1142
+ */
1143
+ maxBlockHeaderSize: number;
1144
+ /**
1145
+ * Maximum number of collateral inputs
1146
+ */
1147
+ maxCollateralInputs: number;
1148
+ /**
1149
+ * Maximum number of epochs that can be used for pool retirement ahead
1150
+ */
1151
+ maxEpochForPoolRetirement: number;
1152
+ /**
1153
+ * Maximum transaction size in bytes
1154
+ */
1155
+ maxTransactionSize: number;
1156
+ maxTxExecutionUnits: ExUnits;
1157
+ /**
1158
+ * Maximum size of a Value in bytes
1159
+ */
1160
+ maxValueSize: number;
1161
+ /**
1162
+ * Linear factor for the minimum fee calculation formula
1163
+ */
1164
+ minFeeCoefficientA: bigint;
1165
+ /**
1166
+ * Constant factor for the minimum fee calculation formula
1167
+ */
1168
+ minFeeConstantB: bigint;
1169
+ /**
1170
+ * Minimum pool cost in lovelace
1171
+ */
1172
+ minPoolCost: bigint;
1173
+ /**
1174
+ * Protocol version (major, minor)
1175
+ *
1176
+ * @minItems 2
1177
+ * @maxItems 2
1178
+ */
1179
+ protocolVersion: [unknown, unknown];
1180
+ referenceScriptCostPerByte: SubCoin;
1181
+ /**
1182
+ * Deposit amount required for registering a stake key
1183
+ */
1184
+ stakeKeyDeposit: bigint;
1185
+ /**
1186
+ * Deposit amount required for registering a stake pool
1187
+ */
1188
+ stakePoolDeposit: bigint;
1189
+ }
1190
+
1191
+ export interface ExUnitPrices {
1192
+ memPrice: SubCoin;
1193
+ stepPrice: SubCoin;
1194
+ }
1195
+ export interface SubCoin {
1196
+ denominator: bigint;
1197
+ numerator: bigint;
1198
+ }
1199
+
1200
+
1201
+ export interface UtxoInputContext {
1202
+ isSpent: boolean;
1203
+ utxo: UTxO;
1204
+ }