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

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.
@@ -1,32 +1,44 @@
1
+ /**
2
+ * @param {string} tx_hex
3
+ * @returns {string}
4
+ */
5
+ declare function get_necessary_data_list_js(tx_hex: string): string;
6
+ /**
7
+ * @param {string} tx_hex
8
+ * @param {ValidationInputContext} validation_context
9
+ * @returns {string}
10
+ */
11
+ declare function validate_transaction_js(tx_hex: string, validation_context: ValidationInputContext): string;
12
+
1
13
  /**
2
14
  * @returns {(string)[]}
3
15
  */
4
- export function get_decodable_types(): (string)[];
16
+ declare function get_decodable_types(): (string)[];
5
17
  /**
6
18
  * @param {string} input
7
19
  * @param {string} type_name
8
20
  * @param {any} params_json
9
21
  * @returns {any}
10
22
  */
11
- export function decode_specific_type(input: string, type_name: string, params_json: DecodingParams): any;
23
+ declare function decode_specific_type(input: string, type_name: string, params_json: DecodingParams): any;
12
24
  /**
13
25
  * @param {string} input
14
26
  * @returns {(string)[]}
15
27
  */
16
- export function get_possible_types_for_input(input: string): (string)[];
28
+ declare function get_possible_types_for_input(input: string): (string)[];
17
29
  /**
18
30
  * @param {string} cbor_hex
19
31
  * @returns {any}
20
32
  */
21
- export function cbor_to_json(cbor_hex: string): CborValue;
33
+ declare function cbor_to_json(cbor_hex: string): CborValue;
22
34
 
23
- export function check_block_or_tx_signatures(hex_str: string): CheckSignaturesResult;
35
+ declare function check_block_or_tx_signatures(hex_str: string): CheckSignaturesResult;
24
36
 
25
37
  /**
26
38
  * @param {string} tx_hex
27
39
  * @returns {(string)[]}
28
40
  */
29
- export function get_utxo_list_from_tx(tx_hex: string): string[];
41
+ declare function get_utxo_list_from_tx(tx_hex: string): string[];
30
42
 
31
43
  /**
32
44
  * @param {string} tx_hex
@@ -34,24 +46,24 @@ export function get_utxo_list_from_tx(tx_hex: string): string[];
34
46
  * @param {CostModels} cost_models_json
35
47
  * @returns {ExecuteTxScriptsResult}
36
48
  */
37
- export function execute_tx_scripts(tx_hex: string, utxo_json: UTxO[], cost_models_json: CostModels): ExecuteTxScriptsResult;
49
+ declare function execute_tx_scripts(tx_hex: string, utxo_json: UTxO[], cost_models_json: CostModels): ExecuteTxScriptsResult;
38
50
  /**
39
51
  * @param {string} hex
40
52
  * @returns {ProgramJson}
41
53
  */
42
- export function decode_plutus_program_uplc_json(hex: string): ProgramJson;
54
+ declare function decode_plutus_program_uplc_json(hex: string): ProgramJson;
43
55
  /**
44
56
  * @param {string} hex
45
57
  * @returns {string}
46
58
  */
47
- export function decode_plutus_program_pretty_uplc(hex: string): string;
59
+ declare function decode_plutus_program_pretty_uplc(hex: string): string;
48
60
 
49
- export interface CborPosition {
61
+ declare interface CborPosition {
50
62
  offset: number;
51
63
  length: number;
52
64
  }
53
65
 
54
- export type CborSimpleType =
66
+ declare type CborSimpleType =
55
67
  | "Null"
56
68
  | "Bool"
57
69
  | "U8"
@@ -72,13 +84,13 @@ export type CborSimpleType =
72
84
  | "Undefined"
73
85
  | "Break";
74
86
 
75
- export interface CborSimple {
87
+ declare interface CborSimple {
76
88
  position_info: CborPosition;
77
89
  struct_position_info?: CborPosition;
78
90
  value: any;
79
91
  }
80
92
 
81
- export interface CborArray {
93
+ declare interface CborArray {
82
94
  type: "Array";
83
95
  position_info: CborPosition;
84
96
  struct_position_info: CborPosition;
@@ -86,7 +98,7 @@ export interface CborArray {
86
98
  values: CborValue[]; // nested
87
99
  }
88
100
 
89
- export interface CborMap {
101
+ declare interface CborMap {
90
102
  type: "Map";
91
103
  position_info: CborPosition;
92
104
  struct_position_info: CborPosition;
@@ -97,7 +109,7 @@ export interface CborMap {
97
109
  }[];
98
110
  }
99
111
 
100
- export interface CborTag {
112
+ declare interface CborTag {
101
113
  type: "Tag";
102
114
  position_info: CborPosition;
103
115
  struct_position_info: CborPosition;
@@ -105,21 +117,21 @@ export interface CborTag {
105
117
  value: CborValue;
106
118
  }
107
119
 
108
- export interface CborIndefiniteString {
120
+ declare interface CborIndefiniteString {
109
121
  type: "IndefiniteLengthString";
110
122
  position_info: CborPosition;
111
123
  struct_position_info: CborPosition;
112
124
  chunks: CborValue[];
113
125
  }
114
126
 
115
- export interface CborIndefiniteBytes {
127
+ declare interface CborIndefiniteBytes {
116
128
  type: "IndefiniteLengthBytes";
117
129
  position_info: CborPosition;
118
130
  struct_position_info: CborPosition;
119
131
  chunks: CborValue[];
120
132
  }
121
133
 
122
- export type CborValue =
134
+ declare type CborValue =
123
135
  | CborSimple
124
136
  | CborArray
125
137
  | CborMap
@@ -127,14 +139,14 @@ export type CborValue =
127
139
  | CborIndefiniteString
128
140
  | CborIndefiniteBytes;
129
141
 
130
- export interface DecodingParams {
142
+ declare interface DecodingParams {
131
143
  plutus_script_version?: number;
132
144
  plutus_data_schema?: PlutusDataSchema;
133
145
  }
134
146
 
135
- export type PlutusDataSchema = "BasicConversions" | "DetailedSchema";
147
+ declare type PlutusDataSchema = "BasicConversions" | "DetailedSchema";
136
148
 
137
- export interface CheckSignaturesResult {
149
+ declare interface CheckSignaturesResult {
138
150
  /** Indicates whether the transaction or block is valid. */
139
151
  valid: boolean;
140
152
  /** The transaction hash as a hexadecimal string (if available). */
@@ -147,17 +159,17 @@ export interface CheckSignaturesResult {
147
159
 
148
160
 
149
161
  // The execution units object contains two numeric fields.
150
- export type ExUnits = {
162
+ declare type ExUnits = {
151
163
  steps: number;
152
164
  mem: number;
153
165
  };
154
166
 
155
167
  // The redeemer tag is one of the following literal strings.
156
- export type RedeemerTag = "Spend" | "Mint" | "Cert" | "Reward" | "Propose" | "Vote";
168
+ declare type RedeemerTag = "Spend" | "Mint" | "Cert" | "Reward" | "Propose" | "Vote";
157
169
 
158
170
  // A successful redeemer evaluation contains the original execution units,
159
171
  // the calculated execution units, and additional redeemer info.
160
- export interface RedeemerSuccess {
172
+ declare interface RedeemerSuccess {
161
173
  original_ex_units: ExUnits;
162
174
  calculated_ex_units: ExUnits;
163
175
  redeemer_index: number;
@@ -166,7 +178,7 @@ export interface RedeemerSuccess {
166
178
 
167
179
  // A failed redeemer evaluation contains the original execution units,
168
180
  // an error message, and additional redeemer info.
169
- export interface RedeemerError {
181
+ declare interface RedeemerError {
170
182
  original_ex_units: ExUnits;
171
183
  error: string;
172
184
  redeemer_index: number;
@@ -175,14 +187,14 @@ export interface RedeemerError {
175
187
 
176
188
  // The result from executing the transaction scripts is an array of redeemer results.
177
189
  // Each result can be either a success or an error.
178
- export type RedeemerResult = RedeemerSuccess | RedeemerError;
190
+ declare type RedeemerResult = RedeemerSuccess | RedeemerError;
179
191
 
180
192
  // Type for the `execute_tx_scripts` response after JSON-parsing.
181
- export type ExecuteTxScriptsResult = RedeemerResult[];
193
+ declare type ExecuteTxScriptsResult = RedeemerResult[];
182
194
 
183
195
 
184
196
  // The overall JSON produced by `to_json_program`:
185
- export interface ProgramJson {
197
+ declare interface ProgramJson {
186
198
  program: {
187
199
  version: string;
188
200
  term: Term;
@@ -190,7 +202,7 @@ export interface ProgramJson {
190
202
  }
191
203
 
192
204
  // A UPLC term can be one of several forms.
193
- export type Term =
205
+ declare type Term =
194
206
  | VarTerm
195
207
  | DelayTerm
196
208
  | LambdaTerm
@@ -202,52 +214,52 @@ export type Term =
202
214
  | ConstrTerm
203
215
  | CaseTerm;
204
216
 
205
- export interface VarTerm {
217
+ declare interface VarTerm {
206
218
  var: string;
207
219
  }
208
220
 
209
- export interface DelayTerm {
221
+ declare interface DelayTerm {
210
222
  delay: Term;
211
223
  }
212
224
 
213
- export interface LambdaTerm {
225
+ declare interface LambdaTerm {
214
226
  lambda: {
215
227
  parameter_name: string;
216
228
  body: Term;
217
229
  };
218
230
  }
219
231
 
220
- export interface ApplyTerm {
232
+ declare interface ApplyTerm {
221
233
  apply: {
222
234
  function: Term;
223
235
  argument: Term;
224
236
  };
225
237
  }
226
238
 
227
- export interface ConstantTerm {
239
+ declare interface ConstantTerm {
228
240
  constant: Constant;
229
241
  }
230
242
 
231
- export interface ForceTerm {
243
+ declare interface ForceTerm {
232
244
  force: Term;
233
245
  }
234
246
 
235
- export interface ErrorTerm {
247
+ declare interface ErrorTerm {
236
248
  error: "error";
237
249
  }
238
250
 
239
- export interface BuiltinTerm {
251
+ declare interface BuiltinTerm {
240
252
  builtin: string;
241
253
  }
242
254
 
243
- export interface ConstrTerm {
255
+ declare interface ConstrTerm {
244
256
  constr: {
245
257
  tag: number;
246
258
  fields: Term[];
247
259
  };
248
260
  }
249
261
 
250
- export interface CaseTerm {
262
+ declare interface CaseTerm {
251
263
  case: {
252
264
  constr: Term;
253
265
  branches: Term[];
@@ -255,7 +267,7 @@ export interface CaseTerm {
255
267
  }
256
268
 
257
269
  // The UPLC constant is one of several union types.
258
- export type Constant =
270
+ declare type Constant =
259
271
  | IntegerConstant
260
272
  | ByteStringConstant
261
273
  | StringConstant
@@ -267,34 +279,34 @@ export type Constant =
267
279
  | Bls12_381G1ElementConstant
268
280
  | Bls12_381G2ElementConstant;
269
281
 
270
- export interface IntegerConstant {
282
+ declare interface IntegerConstant {
271
283
  integer: string; // represented as a string
272
284
  }
273
285
 
274
- export interface ByteStringConstant {
286
+ declare interface ByteStringConstant {
275
287
  bytestring: string; // hex-encoded string
276
288
  }
277
289
 
278
- export interface StringConstant {
290
+ declare interface StringConstant {
279
291
  string: string;
280
292
  }
281
293
 
282
- export interface UnitConstant {
294
+ declare interface UnitConstant {
283
295
  unit: "()";
284
296
  }
285
297
 
286
- export interface BoolConstant {
298
+ declare interface BoolConstant {
287
299
  bool: boolean;
288
300
  }
289
301
 
290
- export interface ListConstant {
302
+ declare interface ListConstant {
291
303
  list: {
292
304
  type: Type;
293
305
  items: Constant[];
294
306
  };
295
307
  }
296
308
 
297
- export interface PairConstant {
309
+ declare interface PairConstant {
298
310
  pair: {
299
311
  type_left: Type;
300
312
  type_right: Type;
@@ -303,11 +315,11 @@ export interface PairConstant {
303
315
  };
304
316
  }
305
317
 
306
- export interface DataConstant {
318
+ declare interface DataConstant {
307
319
  data: PlutusData;
308
320
  }
309
321
 
310
- export interface Bls12_381G1ElementConstant {
322
+ declare interface Bls12_381G1ElementConstant {
311
323
  bls12_381_G1_element: {
312
324
  x: number;
313
325
  y: number;
@@ -315,12 +327,12 @@ export interface Bls12_381G1ElementConstant {
315
327
  };
316
328
  }
317
329
 
318
- export interface Bls12_381G2ElementConstant {
330
+ declare interface Bls12_381G2ElementConstant {
319
331
  bls12_381_G2_element: BlstP2;
320
332
  }
321
333
 
322
334
  // The UPLC type is represented either as a string literal or an object.
323
- export type Type =
335
+ declare type Type =
324
336
  | "bool"
325
337
  | "integer"
326
338
  | "string"
@@ -333,11 +345,11 @@ export type Type =
333
345
  | ListType
334
346
  | PairType;
335
347
 
336
- export interface ListType {
348
+ declare interface ListType {
337
349
  list: Type;
338
350
  }
339
351
 
340
- export interface PairType {
352
+ declare interface PairType {
341
353
  pair: {
342
354
  left: Type;
343
355
  right: Type;
@@ -345,21 +357,21 @@ export interface PairType {
345
357
  }
346
358
 
347
359
  // The JSON representation for a blst_p2 element: each coordinate is an array of numbers.
348
- export interface BlstP2 {
360
+ declare interface BlstP2 {
349
361
  x: number[];
350
362
  y: number[];
351
363
  z: number[];
352
364
  }
353
365
 
354
366
  // Plutus data is also a tagged union.
355
- export type PlutusData =
367
+ declare type PlutusData =
356
368
  | ConstrData
357
369
  | MapData
358
370
  | BigIntData
359
371
  | BoundedBytesData
360
372
  | ArrayData;
361
373
 
362
- export interface ConstrData {
374
+ declare interface ConstrData {
363
375
  constr: {
364
376
  tag: number;
365
377
  any_constructor: boolean;
@@ -367,36 +379,36 @@ export interface ConstrData {
367
379
  };
368
380
  }
369
381
 
370
- export interface MapData {
382
+ declare interface MapData {
371
383
  map: Array<{
372
384
  key: PlutusData;
373
385
  value: PlutusData;
374
386
  }>;
375
387
  }
376
388
 
377
- export interface BigIntData {
389
+ declare interface BigIntData {
378
390
  integer: string; // big integers are represented as strings
379
391
  }
380
392
 
381
- export interface BoundedBytesData {
393
+ declare interface BoundedBytesData {
382
394
  bytestring: string; // hex-encoded
383
395
  }
384
396
 
385
- export interface ArrayData {
397
+ declare interface ArrayData {
386
398
  list: PlutusData[];
387
399
  }
388
400
 
389
- export interface Asset {
401
+ declare interface Asset {
390
402
  unit: string;
391
403
  quantity: string;
392
404
  }
393
405
 
394
- export interface TxInput {
406
+ declare interface TxInput {
395
407
  outputIndex: number;
396
408
  txHash: string;
397
409
  }
398
410
 
399
- export interface TxOutput {
411
+ declare interface TxOutput {
400
412
  address: string;
401
413
  amount: Asset[];
402
414
  dataHash?: string;
@@ -405,13 +417,572 @@ export interface TxOutput {
405
417
  scriptHash?: string;
406
418
  }
407
419
 
408
- export interface UTxO {
420
+ declare interface UTxO {
409
421
  input: TxInput;
410
422
  output: TxOutput;
411
423
  }
412
424
 
413
- export interface CostModels {
425
+ declare interface CostModels {
414
426
  plutusV1?: number[];
415
427
  plutusV2?: number[];
416
428
  plutusV3?: number[];
417
- }
429
+ }
430
+
431
+
432
+ ///AUTOGENERATED
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
+