@cardananium/cquisitor-lib 0.1.0-beta.3 → 0.1.0-beta.31
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.
- package/README.md +432 -0
- package/browser/cquisitor_lib.d.ts +943 -1
- package/browser/cquisitor_lib.js +4 -39367
- package/browser/cquisitor_lib_bg.js +39482 -0
- package/browser/cquisitor_lib_bg.wasm +0 -0
- package/browser/cquisitor_lib_bg.wasm.d.ts +2149 -2146
- package/node/cquisitor_lib.d.ts +943 -1
- package/node/cquisitor_lib.js +645 -521
- package/node/cquisitor_lib_bg.wasm +0 -0
- package/node/cquisitor_lib_bg.wasm.d.ts +2149 -2146
- package/package.json +5 -2
|
@@ -1,3 +1,15 @@
|
|
|
1
|
+
/**
|
|
2
|
+
* @param {string} tx_hex
|
|
3
|
+
* @returns {string}
|
|
4
|
+
*/
|
|
5
|
+
export 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
|
+
export function validate_transaction_js(tx_hex: string, validation_context: string): string;
|
|
12
|
+
|
|
1
13
|
/**
|
|
2
14
|
* @returns {(string)[]}
|
|
3
15
|
*/
|
|
@@ -45,6 +57,12 @@ export function decode_plutus_program_uplc_json(hex: string): ProgramJson;
|
|
|
45
57
|
* @returns {string}
|
|
46
58
|
*/
|
|
47
59
|
export function decode_plutus_program_pretty_uplc(hex: string): string;
|
|
60
|
+
/**
|
|
61
|
+
* @param {string} tx_hex
|
|
62
|
+
* @param {number} output_index
|
|
63
|
+
* @returns {string}
|
|
64
|
+
*/
|
|
65
|
+
export function get_ref_script_bytes(tx_hex: string, output_index: number): string;
|
|
48
66
|
|
|
49
67
|
export interface CborPosition {
|
|
50
68
|
offset: number;
|
|
@@ -73,6 +91,7 @@ export type CborSimpleType =
|
|
|
73
91
|
| "Break";
|
|
74
92
|
|
|
75
93
|
export interface CborSimple {
|
|
94
|
+
type: CborSimpleType;
|
|
76
95
|
position_info: CborPosition;
|
|
77
96
|
struct_position_info?: CborPosition;
|
|
78
97
|
value: any;
|
|
@@ -414,4 +433,927 @@ export interface CostModels {
|
|
|
414
433
|
plutusV1?: number[];
|
|
415
434
|
plutusV2?: number[];
|
|
416
435
|
plutusV3?: number[];
|
|
417
|
-
}
|
|
436
|
+
}
|
|
437
|
+
|
|
438
|
+
|
|
439
|
+
///AUTOGENERATED
|
|
440
|
+
|
|
441
|
+
// Auto-generated TypeScript types from JSON schemas
|
|
442
|
+
// Generated at: 2025-08-03T17:09:36.018Z
|
|
443
|
+
//
|
|
444
|
+
// This file contains exported TypeScript types that can be imported in other modules.
|
|
445
|
+
// Large integers (uint64, int64) are represented as bigint for safe handling.
|
|
446
|
+
|
|
447
|
+
export interface NecessaryInputData {
|
|
448
|
+
accounts: string[];
|
|
449
|
+
committeeMembersCold: LocalCredential[];
|
|
450
|
+
committeeMembersHot: LocalCredential[];
|
|
451
|
+
dReps: string[];
|
|
452
|
+
govActions: GovernanceActionId[];
|
|
453
|
+
lastEnactedGovAction: GovernanceActionType[];
|
|
454
|
+
pools: string[];
|
|
455
|
+
utxos: TxInput[];
|
|
456
|
+
}
|
|
457
|
+
|
|
458
|
+
/**
|
|
459
|
+
* Phase 1 validation errors
|
|
460
|
+
*/
|
|
461
|
+
export type Phase1Error =
|
|
462
|
+
| (
|
|
463
|
+
| "GenesisKeyDelegationCertificateIsNotSupported"
|
|
464
|
+
| "MoveInstantaneousRewardsCertificateIsNotSupported"
|
|
465
|
+
)
|
|
466
|
+
| {
|
|
467
|
+
BadInputsUTxO: {
|
|
468
|
+
invalid_input: TxInput;
|
|
469
|
+
};
|
|
470
|
+
}
|
|
471
|
+
| {
|
|
472
|
+
OutsideValidityIntervalUTxO: {
|
|
473
|
+
current_slot: bigint;
|
|
474
|
+
interval_end: bigint;
|
|
475
|
+
interval_start: bigint;
|
|
476
|
+
};
|
|
477
|
+
}
|
|
478
|
+
| {
|
|
479
|
+
MaxTxSizeUTxO: {
|
|
480
|
+
actual_size: bigint;
|
|
481
|
+
max_size: bigint;
|
|
482
|
+
};
|
|
483
|
+
}
|
|
484
|
+
| "InputSetEmptyUTxO"
|
|
485
|
+
| {
|
|
486
|
+
FeeTooSmallUTxO: {
|
|
487
|
+
actual_fee: bigint;
|
|
488
|
+
fee_decomposition: FeeDecomposition;
|
|
489
|
+
min_fee: bigint;
|
|
490
|
+
};
|
|
491
|
+
}
|
|
492
|
+
| {
|
|
493
|
+
ValueNotConservedUTxO: {
|
|
494
|
+
difference: Value;
|
|
495
|
+
input_sum: Value;
|
|
496
|
+
output_sum: Value;
|
|
497
|
+
};
|
|
498
|
+
}
|
|
499
|
+
| {
|
|
500
|
+
WrongNetwork: {
|
|
501
|
+
wrong_addresses: string[];
|
|
502
|
+
};
|
|
503
|
+
}
|
|
504
|
+
| {
|
|
505
|
+
WrongNetworkWithdrawal: {
|
|
506
|
+
wrong_addresses: string[];
|
|
507
|
+
};
|
|
508
|
+
}
|
|
509
|
+
| {
|
|
510
|
+
WrongNetworkInTxBody: {
|
|
511
|
+
actual_network: number;
|
|
512
|
+
expected_network: number;
|
|
513
|
+
};
|
|
514
|
+
}
|
|
515
|
+
| {
|
|
516
|
+
OutputTooSmallUTxO: {
|
|
517
|
+
min_amount: number;
|
|
518
|
+
output_amount: number;
|
|
519
|
+
};
|
|
520
|
+
}
|
|
521
|
+
| {
|
|
522
|
+
CollateralReturnTooSmall: {
|
|
523
|
+
min_amount: number;
|
|
524
|
+
output_amount: number;
|
|
525
|
+
};
|
|
526
|
+
}
|
|
527
|
+
| {
|
|
528
|
+
OutputBootAddrAttrsTooBig: {
|
|
529
|
+
actual_size: bigint;
|
|
530
|
+
max_size: bigint;
|
|
531
|
+
output: unknown;
|
|
532
|
+
};
|
|
533
|
+
}
|
|
534
|
+
| {
|
|
535
|
+
OutputsValueTooBig: {
|
|
536
|
+
actual_size: bigint;
|
|
537
|
+
max_size: bigint;
|
|
538
|
+
};
|
|
539
|
+
}
|
|
540
|
+
| {
|
|
541
|
+
InsufficientCollateral: {
|
|
542
|
+
required_collateral: number;
|
|
543
|
+
total_collateral: number;
|
|
544
|
+
};
|
|
545
|
+
}
|
|
546
|
+
| {
|
|
547
|
+
ExUnitsTooBigUTxO: {
|
|
548
|
+
actual_memory_units: bigint;
|
|
549
|
+
actual_steps_units: bigint;
|
|
550
|
+
max_memory_units: bigint;
|
|
551
|
+
max_steps_units: bigint;
|
|
552
|
+
};
|
|
553
|
+
}
|
|
554
|
+
| "CalculatedCollateralContainsNonAdaAssets"
|
|
555
|
+
| {
|
|
556
|
+
CollateralInputContainsNonAdaAssets: {
|
|
557
|
+
collateral_input: string;
|
|
558
|
+
};
|
|
559
|
+
}
|
|
560
|
+
| {
|
|
561
|
+
CollateralIsLockedByScript: {
|
|
562
|
+
invalid_collateral: string;
|
|
563
|
+
};
|
|
564
|
+
}
|
|
565
|
+
| {
|
|
566
|
+
TooManyCollateralInputs: {
|
|
567
|
+
actual_count: number;
|
|
568
|
+
max_count: number;
|
|
569
|
+
};
|
|
570
|
+
}
|
|
571
|
+
| "NoCollateralInputs"
|
|
572
|
+
| {
|
|
573
|
+
IncorrectTotalCollateralField: {
|
|
574
|
+
actual_sum: number;
|
|
575
|
+
declared_total: number;
|
|
576
|
+
};
|
|
577
|
+
}
|
|
578
|
+
| {
|
|
579
|
+
InvalidSignature: {
|
|
580
|
+
invalid_signature: string;
|
|
581
|
+
};
|
|
582
|
+
}
|
|
583
|
+
| {
|
|
584
|
+
ExtraneousSignature: {
|
|
585
|
+
extraneous_signature: string;
|
|
586
|
+
};
|
|
587
|
+
}
|
|
588
|
+
| {
|
|
589
|
+
NativeScriptIsUnsuccessful: {
|
|
590
|
+
native_script_hash: string;
|
|
591
|
+
};
|
|
592
|
+
}
|
|
593
|
+
| {
|
|
594
|
+
PlutusScriptIsUnsuccessful: {
|
|
595
|
+
plutus_script_hash: string;
|
|
596
|
+
};
|
|
597
|
+
}
|
|
598
|
+
| {
|
|
599
|
+
MissingVKeyWitnesses: {
|
|
600
|
+
missing_key_hash: string;
|
|
601
|
+
};
|
|
602
|
+
}
|
|
603
|
+
| {
|
|
604
|
+
MissingScriptWitnesses: {
|
|
605
|
+
missing_script_hash: string;
|
|
606
|
+
};
|
|
607
|
+
}
|
|
608
|
+
| {
|
|
609
|
+
MissingRedeemer: {
|
|
610
|
+
index: bigint;
|
|
611
|
+
tag: string;
|
|
612
|
+
};
|
|
613
|
+
}
|
|
614
|
+
| "MissingTxBodyMetadataHash"
|
|
615
|
+
| "MissingTxMetadata"
|
|
616
|
+
| {
|
|
617
|
+
ConflictingMetadataHash: {
|
|
618
|
+
actual_hash: string;
|
|
619
|
+
expected_hash: string;
|
|
620
|
+
};
|
|
621
|
+
}
|
|
622
|
+
| {
|
|
623
|
+
InvalidMetadata: {
|
|
624
|
+
message: string;
|
|
625
|
+
};
|
|
626
|
+
}
|
|
627
|
+
| {
|
|
628
|
+
ExtraneousScriptWitnesses: {
|
|
629
|
+
extraneous_script: string;
|
|
630
|
+
};
|
|
631
|
+
}
|
|
632
|
+
| {
|
|
633
|
+
StakeAlreadyRegistered: {
|
|
634
|
+
reward_address: string;
|
|
635
|
+
};
|
|
636
|
+
}
|
|
637
|
+
| {
|
|
638
|
+
StakeNotRegistered: {
|
|
639
|
+
reward_address: string;
|
|
640
|
+
};
|
|
641
|
+
}
|
|
642
|
+
| {
|
|
643
|
+
StakeNonZeroAccountBalance: {
|
|
644
|
+
remaining_balance: bigint;
|
|
645
|
+
reward_address: string;
|
|
646
|
+
};
|
|
647
|
+
}
|
|
648
|
+
| {
|
|
649
|
+
RewardAccountNotExisting: {
|
|
650
|
+
reward_address: string;
|
|
651
|
+
};
|
|
652
|
+
}
|
|
653
|
+
| {
|
|
654
|
+
WrongRequestedWithdrawalAmount: {
|
|
655
|
+
expected_amount: number;
|
|
656
|
+
requested_amount: bigint;
|
|
657
|
+
reward_address: string;
|
|
658
|
+
};
|
|
659
|
+
}
|
|
660
|
+
| {
|
|
661
|
+
StakePoolNotRegistered: {
|
|
662
|
+
pool_id: string;
|
|
663
|
+
};
|
|
664
|
+
}
|
|
665
|
+
| {
|
|
666
|
+
WrongRetirementEpoch: {
|
|
667
|
+
current_epoch: bigint;
|
|
668
|
+
max_epoch: bigint;
|
|
669
|
+
min_epoch: bigint;
|
|
670
|
+
specified_epoch: bigint;
|
|
671
|
+
};
|
|
672
|
+
}
|
|
673
|
+
| {
|
|
674
|
+
StakePoolCostTooLow: {
|
|
675
|
+
min_cost: bigint;
|
|
676
|
+
specified_cost: bigint;
|
|
677
|
+
};
|
|
678
|
+
}
|
|
679
|
+
| {
|
|
680
|
+
InsufficientFundsForMir: {
|
|
681
|
+
available_amount: bigint;
|
|
682
|
+
requested_amount: bigint;
|
|
683
|
+
};
|
|
684
|
+
}
|
|
685
|
+
| {
|
|
686
|
+
InvalidCommitteeVote: {
|
|
687
|
+
message: string;
|
|
688
|
+
voter: unknown;
|
|
689
|
+
};
|
|
690
|
+
}
|
|
691
|
+
| {
|
|
692
|
+
DRepIncorrectDeposit: {
|
|
693
|
+
required_deposit: number;
|
|
694
|
+
supplied_deposit: number;
|
|
695
|
+
};
|
|
696
|
+
}
|
|
697
|
+
| {
|
|
698
|
+
DRepDeregistrationWrongRefund: {
|
|
699
|
+
required_refund: number;
|
|
700
|
+
supplied_refund: number;
|
|
701
|
+
};
|
|
702
|
+
}
|
|
703
|
+
| {
|
|
704
|
+
StakeRegistrationWrongDeposit: {
|
|
705
|
+
required_deposit: number;
|
|
706
|
+
supplied_deposit: number;
|
|
707
|
+
};
|
|
708
|
+
}
|
|
709
|
+
| {
|
|
710
|
+
StakeDeregistrationWrongRefund: {
|
|
711
|
+
required_refund: number;
|
|
712
|
+
supplied_refund: number;
|
|
713
|
+
};
|
|
714
|
+
}
|
|
715
|
+
| {
|
|
716
|
+
PoolRegistrationWrongDeposit: {
|
|
717
|
+
required_deposit: number;
|
|
718
|
+
supplied_deposit: number;
|
|
719
|
+
};
|
|
720
|
+
}
|
|
721
|
+
| {
|
|
722
|
+
CommitteeHasPreviouslyResigned: {
|
|
723
|
+
committee_credential: LocalCredential;
|
|
724
|
+
};
|
|
725
|
+
}
|
|
726
|
+
| {
|
|
727
|
+
TreasuryValueMismatch: {
|
|
728
|
+
actual_value: bigint;
|
|
729
|
+
declared_value: bigint;
|
|
730
|
+
};
|
|
731
|
+
}
|
|
732
|
+
| {
|
|
733
|
+
RefScriptsSizeTooBig: {
|
|
734
|
+
actual_size: bigint;
|
|
735
|
+
max_size: bigint;
|
|
736
|
+
};
|
|
737
|
+
}
|
|
738
|
+
| {
|
|
739
|
+
WithdrawalNotAllowedBecauseNotDelegatedToDRep: {
|
|
740
|
+
reward_address: string;
|
|
741
|
+
};
|
|
742
|
+
}
|
|
743
|
+
| {
|
|
744
|
+
CommitteeIsUnknown: {
|
|
745
|
+
/**
|
|
746
|
+
* The committee key hash
|
|
747
|
+
*/
|
|
748
|
+
committee_key_hash:
|
|
749
|
+
| {
|
|
750
|
+
keyHash: number[];
|
|
751
|
+
}
|
|
752
|
+
| {
|
|
753
|
+
scriptHash: number[];
|
|
754
|
+
};
|
|
755
|
+
};
|
|
756
|
+
}
|
|
757
|
+
| {
|
|
758
|
+
GovActionsDoNotExist: {
|
|
759
|
+
/**
|
|
760
|
+
* The list of invalid governance action IDs
|
|
761
|
+
*/
|
|
762
|
+
invalid_action_ids: GovernanceActionId[];
|
|
763
|
+
};
|
|
764
|
+
}
|
|
765
|
+
| {
|
|
766
|
+
MalformedProposal: {
|
|
767
|
+
gov_action: GovernanceActionId;
|
|
768
|
+
};
|
|
769
|
+
}
|
|
770
|
+
| {
|
|
771
|
+
ProposalProcedureNetworkIdMismatch: {
|
|
772
|
+
/**
|
|
773
|
+
* The expected network ID
|
|
774
|
+
*/
|
|
775
|
+
expected_network: number;
|
|
776
|
+
/**
|
|
777
|
+
* The reward account
|
|
778
|
+
*/
|
|
779
|
+
reward_account: string;
|
|
780
|
+
};
|
|
781
|
+
}
|
|
782
|
+
| {
|
|
783
|
+
TreasuryWithdrawalsNetworkIdMismatch: {
|
|
784
|
+
/**
|
|
785
|
+
* The expected network ID
|
|
786
|
+
*/
|
|
787
|
+
expected_network: number;
|
|
788
|
+
/**
|
|
789
|
+
* The set of mismatched reward accounts
|
|
790
|
+
*/
|
|
791
|
+
mismatched_account: string;
|
|
792
|
+
};
|
|
793
|
+
}
|
|
794
|
+
| {
|
|
795
|
+
VotingProposalIncorrectDeposit: {
|
|
796
|
+
proposal_index: number;
|
|
797
|
+
/**
|
|
798
|
+
* The required deposit amount
|
|
799
|
+
*/
|
|
800
|
+
required_deposit: number;
|
|
801
|
+
/**
|
|
802
|
+
* The supplied deposit amount
|
|
803
|
+
*/
|
|
804
|
+
supplied_deposit: number;
|
|
805
|
+
};
|
|
806
|
+
}
|
|
807
|
+
| {
|
|
808
|
+
DisallowedVoters: {
|
|
809
|
+
/**
|
|
810
|
+
* List of disallowed voter and action ID pairs
|
|
811
|
+
*/
|
|
812
|
+
disallowed_pairs: [unknown, unknown][];
|
|
813
|
+
};
|
|
814
|
+
}
|
|
815
|
+
| {
|
|
816
|
+
ConflictingCommitteeUpdate: {
|
|
817
|
+
/**
|
|
818
|
+
* The set of conflicting credentials
|
|
819
|
+
*/
|
|
820
|
+
conflicting_credentials:
|
|
821
|
+
| {
|
|
822
|
+
keyHash: number[];
|
|
823
|
+
}
|
|
824
|
+
| {
|
|
825
|
+
scriptHash: number[];
|
|
826
|
+
};
|
|
827
|
+
};
|
|
828
|
+
}
|
|
829
|
+
| {
|
|
830
|
+
ExpirationEpochTooSmall: {
|
|
831
|
+
/**
|
|
832
|
+
* Map of credentials to their invalid expiration epochs
|
|
833
|
+
*/
|
|
834
|
+
invalid_expirations: {
|
|
835
|
+
[k: string]: number;
|
|
836
|
+
};
|
|
837
|
+
};
|
|
838
|
+
}
|
|
839
|
+
| {
|
|
840
|
+
InvalidPrevGovActionId: {
|
|
841
|
+
/**
|
|
842
|
+
* The invalid proposal
|
|
843
|
+
*/
|
|
844
|
+
proposal: {
|
|
845
|
+
[k: string]: unknown;
|
|
846
|
+
};
|
|
847
|
+
};
|
|
848
|
+
}
|
|
849
|
+
| {
|
|
850
|
+
VotingOnExpiredGovAction: {
|
|
851
|
+
expired_gov_action: GovernanceActionId;
|
|
852
|
+
};
|
|
853
|
+
}
|
|
854
|
+
| {
|
|
855
|
+
ProposalCantFollow: {
|
|
856
|
+
/**
|
|
857
|
+
* The expected protocol version
|
|
858
|
+
*/
|
|
859
|
+
expected_versions: ProtocolVersion[];
|
|
860
|
+
/**
|
|
861
|
+
* Previous governance action ID
|
|
862
|
+
*/
|
|
863
|
+
prev_gov_action_id?: GovernanceActionId | null;
|
|
864
|
+
supplied_version: ProtocolVersion;
|
|
865
|
+
};
|
|
866
|
+
}
|
|
867
|
+
| {
|
|
868
|
+
InvalidConstitutionPolicyHash: {
|
|
869
|
+
/**
|
|
870
|
+
* The expected policy hash
|
|
871
|
+
*/
|
|
872
|
+
expected_hash?: string | null;
|
|
873
|
+
/**
|
|
874
|
+
* The supplied policy hash
|
|
875
|
+
*/
|
|
876
|
+
supplied_hash?: string | null;
|
|
877
|
+
};
|
|
878
|
+
}
|
|
879
|
+
| {
|
|
880
|
+
VoterDoNotExist: {
|
|
881
|
+
/**
|
|
882
|
+
* List of non-existent voters
|
|
883
|
+
*/
|
|
884
|
+
missing_voter: {
|
|
885
|
+
[k: string]: unknown;
|
|
886
|
+
};
|
|
887
|
+
};
|
|
888
|
+
}
|
|
889
|
+
| {
|
|
890
|
+
ZeroTreasuryWithdrawals: {
|
|
891
|
+
gov_action: GovernanceActionId;
|
|
892
|
+
};
|
|
893
|
+
}
|
|
894
|
+
| {
|
|
895
|
+
ProposalReturnAccountDoesNotExist: {
|
|
896
|
+
/**
|
|
897
|
+
* The invalid return account
|
|
898
|
+
*/
|
|
899
|
+
return_account: string;
|
|
900
|
+
};
|
|
901
|
+
}
|
|
902
|
+
| {
|
|
903
|
+
TreasuryWithdrawalReturnAccountsDoNotExist: {
|
|
904
|
+
/**
|
|
905
|
+
* List of non-existent return accounts
|
|
906
|
+
*/
|
|
907
|
+
missing_account: string;
|
|
908
|
+
};
|
|
909
|
+
}
|
|
910
|
+
| {
|
|
911
|
+
AuxiliaryDataHashMismatch: {
|
|
912
|
+
/**
|
|
913
|
+
* The actual auxiliary data hash
|
|
914
|
+
*/
|
|
915
|
+
actual_hash?: string | null;
|
|
916
|
+
/**
|
|
917
|
+
* The expected auxiliary data hash
|
|
918
|
+
*/
|
|
919
|
+
expected_hash: string;
|
|
920
|
+
};
|
|
921
|
+
}
|
|
922
|
+
| "AuxiliaryDataHashMissing"
|
|
923
|
+
| "AuxiliaryDataHashPresentButNotExpected"
|
|
924
|
+
| {
|
|
925
|
+
UnknownError: {
|
|
926
|
+
message: string;
|
|
927
|
+
};
|
|
928
|
+
}
|
|
929
|
+
| {
|
|
930
|
+
MissingDatum: {
|
|
931
|
+
datum_hash: string;
|
|
932
|
+
};
|
|
933
|
+
}
|
|
934
|
+
| {
|
|
935
|
+
ExtraneousDatumWitnesses: {
|
|
936
|
+
datum_hash: string;
|
|
937
|
+
};
|
|
938
|
+
}
|
|
939
|
+
| {
|
|
940
|
+
ScriptDataHashMismatch: {
|
|
941
|
+
/**
|
|
942
|
+
* The expected script data hash
|
|
943
|
+
*/
|
|
944
|
+
expected_hash?: string | null;
|
|
945
|
+
/**
|
|
946
|
+
* The actual script data hash
|
|
947
|
+
*/
|
|
948
|
+
provided_hash?: string | null;
|
|
949
|
+
};
|
|
950
|
+
}
|
|
951
|
+
| {
|
|
952
|
+
ReferenceInputOverlapsWithInput: {
|
|
953
|
+
input: TxInput;
|
|
954
|
+
};
|
|
955
|
+
};
|
|
956
|
+
|
|
957
|
+
/**
|
|
958
|
+
* Phase 1 validation errors
|
|
959
|
+
*/
|
|
960
|
+
export type Phase2Error =
|
|
961
|
+
| "NativeScriptIsReferencedByRedeemer"
|
|
962
|
+
| {
|
|
963
|
+
NoEnoughBudget: {
|
|
964
|
+
actual_budget: ExUnits;
|
|
965
|
+
expected_budget: ExUnits;
|
|
966
|
+
};
|
|
967
|
+
}
|
|
968
|
+
| {
|
|
969
|
+
InvalidRedeemerIndex: {
|
|
970
|
+
index: bigint;
|
|
971
|
+
tag: string;
|
|
972
|
+
};
|
|
973
|
+
}
|
|
974
|
+
| {
|
|
975
|
+
MachineError: {
|
|
976
|
+
error: string;
|
|
977
|
+
};
|
|
978
|
+
}
|
|
979
|
+
| {
|
|
980
|
+
CostModelNotFound: {
|
|
981
|
+
language: string;
|
|
982
|
+
};
|
|
983
|
+
}
|
|
984
|
+
| {
|
|
985
|
+
ScriptDecodeError: {
|
|
986
|
+
error: string;
|
|
987
|
+
};
|
|
988
|
+
}
|
|
989
|
+
| {
|
|
990
|
+
ResolvedInputNotFound: {
|
|
991
|
+
tx_hash: string;
|
|
992
|
+
tx_index: bigint;
|
|
993
|
+
};
|
|
994
|
+
}
|
|
995
|
+
| "ByronAddressNotAllowed"
|
|
996
|
+
| "InlineDatumNotAllowedForPlutusV1"
|
|
997
|
+
| "ReferenceInputsNotAllowedForPlutusV1"
|
|
998
|
+
| {
|
|
999
|
+
SlotTooFarInThePast: {
|
|
1000
|
+
oldest_allowed: bigint;
|
|
1001
|
+
};
|
|
1002
|
+
}
|
|
1003
|
+
| "NoPaymentCredential"
|
|
1004
|
+
| {
|
|
1005
|
+
ExtraneousRedeemer: {
|
|
1006
|
+
index: bigint;
|
|
1007
|
+
tag: string;
|
|
1008
|
+
};
|
|
1009
|
+
}
|
|
1010
|
+
| {
|
|
1011
|
+
BuildTxContextError: {
|
|
1012
|
+
error: string;
|
|
1013
|
+
};
|
|
1014
|
+
}
|
|
1015
|
+
| {
|
|
1016
|
+
RedeemerIndexOutOfBounds: {
|
|
1017
|
+
index: bigint;
|
|
1018
|
+
max_index?: number | null;
|
|
1019
|
+
tag: string;
|
|
1020
|
+
};
|
|
1021
|
+
}
|
|
1022
|
+
| {
|
|
1023
|
+
MissingRequiredScript: {
|
|
1024
|
+
script_hash: string;
|
|
1025
|
+
};
|
|
1026
|
+
}
|
|
1027
|
+
| {
|
|
1028
|
+
MissingRequiredDatum: {
|
|
1029
|
+
datum_hash: string;
|
|
1030
|
+
};
|
|
1031
|
+
}
|
|
1032
|
+
| "NonScriptWithdrawal"
|
|
1033
|
+
| "NonScriptCredential"
|
|
1034
|
+
| "UnsupportedCertificateType"
|
|
1035
|
+
| "NoGuardrailScriptForProcedure"
|
|
1036
|
+
| "MissingRequiredInlineDatumOrHash"
|
|
1037
|
+
| {
|
|
1038
|
+
ScriptLookupError: {
|
|
1039
|
+
error: string;
|
|
1040
|
+
};
|
|
1041
|
+
};
|
|
1042
|
+
export type Phase2Warning = {
|
|
1043
|
+
BudgetIsBiggerThanExpected: {
|
|
1044
|
+
actual_budget: ExUnits;
|
|
1045
|
+
expected_budget: ExUnits;
|
|
1046
|
+
};
|
|
1047
|
+
};
|
|
1048
|
+
export type Phase1Warning =
|
|
1049
|
+
| ("InputsAreNotSorted" | "CollateralIsUnnecessary" | "TotalCollateralIsNotDeclared")
|
|
1050
|
+
| {
|
|
1051
|
+
FeeIsBiggerThanMinFee: {
|
|
1052
|
+
actual_fee: bigint;
|
|
1053
|
+
fee_decomposition: FeeDecomposition;
|
|
1054
|
+
min_fee: bigint;
|
|
1055
|
+
};
|
|
1056
|
+
}
|
|
1057
|
+
| {
|
|
1058
|
+
InputUsesRewardAddress: {
|
|
1059
|
+
invalid_input: string;
|
|
1060
|
+
};
|
|
1061
|
+
}
|
|
1062
|
+
| {
|
|
1063
|
+
CollateralInputUsesRewardAddress: {
|
|
1064
|
+
invalid_collateral: string;
|
|
1065
|
+
};
|
|
1066
|
+
}
|
|
1067
|
+
| "CannotCheckStakeDeregistrationRefund"
|
|
1068
|
+
| "CannotCheckDRepDeregistrationRefund"
|
|
1069
|
+
| {
|
|
1070
|
+
PoolAlreadyRegistered: {
|
|
1071
|
+
pool_id: string;
|
|
1072
|
+
};
|
|
1073
|
+
}
|
|
1074
|
+
| {
|
|
1075
|
+
DRepAlreadyRegistered: {
|
|
1076
|
+
drep_id: string;
|
|
1077
|
+
};
|
|
1078
|
+
}
|
|
1079
|
+
| {
|
|
1080
|
+
CommitteeAlreadyAuthorized: {
|
|
1081
|
+
committee_key: string;
|
|
1082
|
+
};
|
|
1083
|
+
}
|
|
1084
|
+
| {
|
|
1085
|
+
DRepNotRegistered: {
|
|
1086
|
+
cert_index: number;
|
|
1087
|
+
};
|
|
1088
|
+
}
|
|
1089
|
+
| {
|
|
1090
|
+
DuplicateRegistrationInTx: {
|
|
1091
|
+
cert_index: number;
|
|
1092
|
+
entity_id: string;
|
|
1093
|
+
entity_type: string;
|
|
1094
|
+
};
|
|
1095
|
+
}
|
|
1096
|
+
| {
|
|
1097
|
+
DuplicateCommitteeColdResignationInTx: {
|
|
1098
|
+
cert_index: number;
|
|
1099
|
+
committee_credential: LocalCredential;
|
|
1100
|
+
};
|
|
1101
|
+
}
|
|
1102
|
+
| {
|
|
1103
|
+
DuplicateCommitteeHotRegistrationInTx: {
|
|
1104
|
+
cert_index: number;
|
|
1105
|
+
committee_credential: LocalCredential;
|
|
1106
|
+
};
|
|
1107
|
+
};
|
|
1108
|
+
|
|
1109
|
+
export interface ValidationResult {
|
|
1110
|
+
errors: ValidationPhase1Error[];
|
|
1111
|
+
eval_redeemer_results: EvalRedeemerResult[];
|
|
1112
|
+
phase2_errors: ValidationPhase2Error[];
|
|
1113
|
+
phase2_warnings: ValidationPhase2Warning[];
|
|
1114
|
+
warnings: ValidationPhase1Warning[];
|
|
1115
|
+
}
|
|
1116
|
+
export interface ValidationPhase1Error {
|
|
1117
|
+
error: Phase1Error;
|
|
1118
|
+
error_message: string;
|
|
1119
|
+
hint?: string | null;
|
|
1120
|
+
locations: string[];
|
|
1121
|
+
}
|
|
1122
|
+
/**
|
|
1123
|
+
* The invalid input UTxO
|
|
1124
|
+
*/
|
|
1125
|
+
|
|
1126
|
+
export interface FeeDecomposition {
|
|
1127
|
+
executionUnitsFee: bigint;
|
|
1128
|
+
referenceScriptsFee: bigint;
|
|
1129
|
+
txSizeFee: bigint;
|
|
1130
|
+
}
|
|
1131
|
+
export interface Value {
|
|
1132
|
+
assets: MultiAsset;
|
|
1133
|
+
coins: number;
|
|
1134
|
+
}
|
|
1135
|
+
export interface MultiAsset {
|
|
1136
|
+
assets: ValidatorAsset[];
|
|
1137
|
+
}
|
|
1138
|
+
export interface ValidatorAsset {
|
|
1139
|
+
asset_name: string;
|
|
1140
|
+
policy_id: string;
|
|
1141
|
+
quantity: number;
|
|
1142
|
+
}
|
|
1143
|
+
|
|
1144
|
+
/**
|
|
1145
|
+
* The invalid governance action
|
|
1146
|
+
*/
|
|
1147
|
+
|
|
1148
|
+
/**
|
|
1149
|
+
* The expired governance action
|
|
1150
|
+
*/
|
|
1151
|
+
|
|
1152
|
+
export interface ProtocolVersion {
|
|
1153
|
+
major: bigint;
|
|
1154
|
+
minor: bigint;
|
|
1155
|
+
}
|
|
1156
|
+
/**
|
|
1157
|
+
* The supplied protocol version
|
|
1158
|
+
*/
|
|
1159
|
+
|
|
1160
|
+
/**
|
|
1161
|
+
* The governance action with zero withdrawals
|
|
1162
|
+
*/
|
|
1163
|
+
|
|
1164
|
+
export interface EvalRedeemerResult {
|
|
1165
|
+
calculated_ex_units: ExUnits;
|
|
1166
|
+
error?: string | null;
|
|
1167
|
+
index: bigint;
|
|
1168
|
+
logs: string[];
|
|
1169
|
+
provided_ex_units: ExUnits;
|
|
1170
|
+
success: boolean;
|
|
1171
|
+
tag: RedeemerTag;
|
|
1172
|
+
}
|
|
1173
|
+
|
|
1174
|
+
export interface ValidationPhase2Error {
|
|
1175
|
+
error: Phase2Error;
|
|
1176
|
+
error_message: string;
|
|
1177
|
+
hint?: string | null;
|
|
1178
|
+
locations: string[];
|
|
1179
|
+
}
|
|
1180
|
+
export interface ValidationPhase2Warning {
|
|
1181
|
+
hint?: string | null;
|
|
1182
|
+
locations: string[];
|
|
1183
|
+
warning: Phase2Warning;
|
|
1184
|
+
}
|
|
1185
|
+
export interface ValidationPhase1Warning {
|
|
1186
|
+
hint?: string | null;
|
|
1187
|
+
locations: string[];
|
|
1188
|
+
warning: Phase1Warning;
|
|
1189
|
+
}
|
|
1190
|
+
|
|
1191
|
+
export type LocalCredential =
|
|
1192
|
+
| {
|
|
1193
|
+
keyHash: number[];
|
|
1194
|
+
}
|
|
1195
|
+
| {
|
|
1196
|
+
scriptHash: number[];
|
|
1197
|
+
};
|
|
1198
|
+
export type GovernanceActionType =
|
|
1199
|
+
| "parameterChangeAction"
|
|
1200
|
+
| "hardForkInitiationAction"
|
|
1201
|
+
| "treasuryWithdrawalsAction"
|
|
1202
|
+
| "noConfidenceAction"
|
|
1203
|
+
| "updateCommitteeAction"
|
|
1204
|
+
| "newConstitutionAction"
|
|
1205
|
+
| "infoAction";
|
|
1206
|
+
export type NetworkType = "mainnet" | "preview" | "preprod";
|
|
1207
|
+
|
|
1208
|
+
export interface ValidationInputContext {
|
|
1209
|
+
accountContexts: AccountInputContext[];
|
|
1210
|
+
currentCommitteeMembers: CommitteeInputContext[];
|
|
1211
|
+
drepContexts: DrepInputContext[];
|
|
1212
|
+
govActionContexts: GovActionInputContext[];
|
|
1213
|
+
lastEnactedGovAction: GovActionInputContext[];
|
|
1214
|
+
networkType: NetworkType;
|
|
1215
|
+
poolContexts: PoolInputContext[];
|
|
1216
|
+
potentialCommitteeMembers: CommitteeInputContext[];
|
|
1217
|
+
protocolParameters: ProtocolParameters;
|
|
1218
|
+
slot: bigint;
|
|
1219
|
+
treasuryValue: bigint;
|
|
1220
|
+
utxoSet: UtxoInputContext[];
|
|
1221
|
+
}
|
|
1222
|
+
export interface AccountInputContext {
|
|
1223
|
+
balance?: number | null;
|
|
1224
|
+
bech32Address: string;
|
|
1225
|
+
delegatedToDrep?: string | null;
|
|
1226
|
+
delegatedToPool?: string | null;
|
|
1227
|
+
isRegistered: boolean;
|
|
1228
|
+
payedDeposit?: number | null;
|
|
1229
|
+
}
|
|
1230
|
+
export interface CommitteeInputContext {
|
|
1231
|
+
committeeMemberCold: LocalCredential;
|
|
1232
|
+
committeeMemberHot?: LocalCredential | null;
|
|
1233
|
+
isResigned: boolean;
|
|
1234
|
+
}
|
|
1235
|
+
export interface DrepInputContext {
|
|
1236
|
+
bech32Drep: string;
|
|
1237
|
+
isRegistered: boolean;
|
|
1238
|
+
payedDeposit?: number | null;
|
|
1239
|
+
}
|
|
1240
|
+
export interface GovActionInputContext {
|
|
1241
|
+
actionId: GovernanceActionId;
|
|
1242
|
+
actionType: GovernanceActionType;
|
|
1243
|
+
isActive: boolean;
|
|
1244
|
+
}
|
|
1245
|
+
export interface GovernanceActionId {
|
|
1246
|
+
index: bigint;
|
|
1247
|
+
txHash: number[];
|
|
1248
|
+
}
|
|
1249
|
+
export interface PoolInputContext {
|
|
1250
|
+
isRegistered: boolean;
|
|
1251
|
+
poolId: string;
|
|
1252
|
+
retirementEpoch?: number | null;
|
|
1253
|
+
}
|
|
1254
|
+
export interface ProtocolParameters {
|
|
1255
|
+
/**
|
|
1256
|
+
* Cost per UTxO byte in lovelace
|
|
1257
|
+
*/
|
|
1258
|
+
adaPerUtxoByte: bigint;
|
|
1259
|
+
/**
|
|
1260
|
+
* Percentage of transaction fee required as collateral
|
|
1261
|
+
*/
|
|
1262
|
+
collateralPercentage: number;
|
|
1263
|
+
costModels: CostModels;
|
|
1264
|
+
/**
|
|
1265
|
+
* Deposit amount required for registering as a DRep
|
|
1266
|
+
*/
|
|
1267
|
+
drepDeposit: bigint;
|
|
1268
|
+
executionPrices: ExUnitPrices;
|
|
1269
|
+
/**
|
|
1270
|
+
* Deposit amount required for submitting a governance action
|
|
1271
|
+
*/
|
|
1272
|
+
governanceActionDeposit: bigint;
|
|
1273
|
+
/**
|
|
1274
|
+
* Maximum block body size in bytes
|
|
1275
|
+
*/
|
|
1276
|
+
maxBlockBodySize: number;
|
|
1277
|
+
maxBlockExecutionUnits: ExUnits;
|
|
1278
|
+
/**
|
|
1279
|
+
* Maximum block header size in bytes
|
|
1280
|
+
*/
|
|
1281
|
+
maxBlockHeaderSize: number;
|
|
1282
|
+
/**
|
|
1283
|
+
* Maximum number of collateral inputs
|
|
1284
|
+
*/
|
|
1285
|
+
maxCollateralInputs: number;
|
|
1286
|
+
/**
|
|
1287
|
+
* Maximum number of epochs that can be used for pool retirement ahead
|
|
1288
|
+
*/
|
|
1289
|
+
maxEpochForPoolRetirement: number;
|
|
1290
|
+
/**
|
|
1291
|
+
* Maximum transaction size in bytes
|
|
1292
|
+
*/
|
|
1293
|
+
maxTransactionSize: number;
|
|
1294
|
+
maxTxExecutionUnits: ExUnits;
|
|
1295
|
+
/**
|
|
1296
|
+
* Maximum size of a Value in bytes
|
|
1297
|
+
*/
|
|
1298
|
+
maxValueSize: number;
|
|
1299
|
+
/**
|
|
1300
|
+
* Linear factor for the minimum fee calculation formula
|
|
1301
|
+
*/
|
|
1302
|
+
minFeeCoefficientA: bigint;
|
|
1303
|
+
/**
|
|
1304
|
+
* Constant factor for the minimum fee calculation formula
|
|
1305
|
+
*/
|
|
1306
|
+
minFeeConstantB: bigint;
|
|
1307
|
+
/**
|
|
1308
|
+
* Minimum pool cost in lovelace
|
|
1309
|
+
*/
|
|
1310
|
+
minPoolCost: bigint;
|
|
1311
|
+
/**
|
|
1312
|
+
* Protocol version (major, minor)
|
|
1313
|
+
*
|
|
1314
|
+
* @minItems 2
|
|
1315
|
+
* @maxItems 2
|
|
1316
|
+
*/
|
|
1317
|
+
protocolVersion: [unknown, unknown];
|
|
1318
|
+
referenceScriptCostPerByte: SubCoin;
|
|
1319
|
+
/**
|
|
1320
|
+
* Deposit amount required for registering a stake key
|
|
1321
|
+
*/
|
|
1322
|
+
stakeKeyDeposit: bigint;
|
|
1323
|
+
/**
|
|
1324
|
+
* Deposit amount required for registering a stake pool
|
|
1325
|
+
*/
|
|
1326
|
+
stakePoolDeposit: bigint;
|
|
1327
|
+
}
|
|
1328
|
+
|
|
1329
|
+
/**
|
|
1330
|
+
* Price of execution units for script execution
|
|
1331
|
+
*/
|
|
1332
|
+
export interface ExUnitPrices {
|
|
1333
|
+
memPrice: SubCoin;
|
|
1334
|
+
stepPrice: SubCoin;
|
|
1335
|
+
}
|
|
1336
|
+
export interface SubCoin {
|
|
1337
|
+
denominator: bigint;
|
|
1338
|
+
numerator: bigint;
|
|
1339
|
+
}
|
|
1340
|
+
|
|
1341
|
+
|
|
1342
|
+
export interface UtxoInputContext {
|
|
1343
|
+
isSpent: boolean;
|
|
1344
|
+
utxo: UTxO;
|
|
1345
|
+
}
|
|
1346
|
+
export interface UTxO {
|
|
1347
|
+
input: TxInput;
|
|
1348
|
+
output: TxOutput;
|
|
1349
|
+
}
|
|
1350
|
+
export interface TxInput {
|
|
1351
|
+
outputIndex: number;
|
|
1352
|
+
txHash: string;
|
|
1353
|
+
}
|
|
1354
|
+
|
|
1355
|
+
export interface Asset {
|
|
1356
|
+
quantity: string;
|
|
1357
|
+
unit: string;
|
|
1358
|
+
}
|
|
1359
|
+
|