@cardananium/cquisitor-lib 0.1.0-beta.23 → 0.1.0-beta.26

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 ADDED
@@ -0,0 +1,432 @@
1
+ # Cquisitor-lib
2
+
3
+ A Cardano transaction validation and decoding library written in Rust and compiled to WebAssembly. Provides transaction validation according to ledger rules (Phase 1 and Phase 2), universal CBOR/Cardano type decoders, Plutus script decoders, and signature verification.
4
+
5
+ ## Features
6
+
7
+ ### Transaction Validation
8
+
9
+ Phase 1 validation covers balance, fees, witnesses, collateral, certificates, outputs, and transaction limits. Phase 2 executes Plutus V1/V2/V3 scripts with detailed redeemer results.
10
+
11
+ ### Universal Decoder
12
+
13
+ Decode 152+ Cardano types from hex/bech32/base58 encoding:
14
+ - Primitive types: `Address`, `PublicKey`, `PrivateKey`, `TransactionHash`, `ScriptHash`, etc.
15
+ - Complex structures: `Transaction`, `Block`, `TransactionBody`, `TransactionWitnessSet`
16
+ - Certificates: `StakeRegistration`, `PoolRegistration`, `DRepRegistration`, governance actions
17
+ - Plutus: `PlutusScript`, `PlutusData`, `Redeemer`, `ScriptRef`
18
+ - All credential types, native scripts, metadata structures
19
+
20
+ Functions:
21
+ - `get_decodable_types()` - Returns list of all supported type names
22
+ - `decode_specific_type(hex, type_name, params)` - Decode specific Cardano type
23
+ - `get_possible_types_for_input(hex)` - Suggests types that can decode given input
24
+
25
+ ### CBOR Decoder
26
+
27
+ `cbor_to_json(cbor_hex)` - Converts raw CBOR to JSON with positional information, supporting indefinite arrays/maps and all CBOR types.
28
+
29
+ ### Plutus Script Decoder
30
+
31
+ - `decode_plutus_program_uplc_json(hex)` - Decodes Plutus script to UPLC AST JSON
32
+ - `decode_plutus_program_pretty_uplc(hex)` - Decodes to human-readable UPLC format
33
+
34
+ Handles double CBOR wrapping and normalization automatically.
35
+
36
+ ### Signature Verification
37
+
38
+ `check_block_or_tx_signatures(hex)` - Verifies all VKey and Catalyst witness signatures in transactions or entire blocks. Returns validation results with invalid signature details.
39
+
40
+ ### Script Execution
41
+
42
+ `execute_tx_scripts(tx_hex, utxos, cost_models)` - Executes all Plutus scripts in a transaction independently, returning execution units, logs, and success/failure for each redeemer.
43
+
44
+ ### Validation Coverage
45
+
46
+ **Phase 1 Validation:**
47
+ - Balance validation (inputs, outputs, fees, deposits, refunds)
48
+ - Fee calculation and validation (including script reference fees)
49
+ - Cryptographic witness validation (signatures, native scripts)
50
+ - Collateral validation for script transactions
51
+ - Certificate validation (stake registration, pool operations, DReps, governance)
52
+ - Output validation (minimum ADA, size limits)
53
+ - Transaction limits (size, execution units, reference scripts)
54
+ - Auxiliary data validation
55
+
56
+ **Phase 2 Validation:**
57
+ - Plutus V1, V2, and V3 script execution
58
+ - Redeemer validation with execution units
59
+ - Script context generation
60
+
61
+ See [WHAT-IS-COVERED.md](./WHAT-IS-COVERED.md) for a complete list of validation errors and warnings.
62
+
63
+ ## Installation
64
+
65
+ ### NPM/Yarn/PNPM
66
+
67
+ ```bash
68
+ npm install @cardananium/cquisitor-lib
69
+ ```
70
+
71
+ ```bash
72
+ yarn add @cardananium/cquisitor-lib
73
+ ```
74
+
75
+ ```bash
76
+ pnpm add @cardananium/cquisitor-lib
77
+ ```
78
+
79
+ ### Browser
80
+
81
+ For browser usage, import from the browser-specific build:
82
+
83
+ ```javascript
84
+ import { get_necessary_data_list_js, validate_transaction_js } from '@cardananium/cquisitor-lib/browser';
85
+ ```
86
+
87
+ ### Node.js
88
+
89
+ For Node.js usage:
90
+
91
+ ```javascript
92
+ import { get_necessary_data_list_js, validate_transaction_js } from '@cardananium/cquisitor-lib';
93
+ ```
94
+
95
+ ## Quick Start
96
+
97
+ ### Basic Usage
98
+
99
+ ```typescript
100
+ import {
101
+ get_necessary_data_list_js,
102
+ validate_transaction_js
103
+ } from '@cardananium/cquisitor-lib';
104
+
105
+ // Step 1: Parse transaction and identify required data
106
+ const txHex = "84a400..."; // Your transaction in hex format
107
+ const necessaryDataJson = get_necessary_data_list_js(txHex);
108
+ const necessaryData = JSON.parse(necessaryDataJson);
109
+
110
+ console.log('Required UTXOs:', necessaryData.utxos);
111
+ console.log('Required accounts:', necessaryData.accounts);
112
+ console.log('Required pools:', necessaryData.pools);
113
+
114
+ // Step 2: Fetch the required data from your blockchain indexer
115
+ // (e.g., Blockfrost, Koios, or your own node)
116
+ const utxos = await fetchUtxos(necessaryData.utxos);
117
+ const accounts = await fetchAccounts(necessaryData.accounts);
118
+ const pools = await fetchPools(necessaryData.pools);
119
+ const protocolParams = await getProtocolParameters();
120
+ const currentSlot = await getCurrentSlot();
121
+
122
+ // Step 3: Build validation context
123
+ const validationContext = {
124
+ slot: currentSlot,
125
+ networkType: "mainnet", // or "preview" or "preprod"
126
+ protocolParameters: protocolParams,
127
+ utxoSet: utxos,
128
+ accountContexts: accounts,
129
+ poolContexts: pools,
130
+ drepContexts: [],
131
+ govActionContexts: [],
132
+ lastEnactedGovAction: [],
133
+ currentCommitteeMembers: [],
134
+ potentialCommitteeMembers: [],
135
+ treasuryValue: 0n
136
+ };
137
+
138
+ // Step 4: Validate the transaction
139
+ const resultJson = validate_transaction_js(
140
+ txHex,
141
+ JSON.stringify(validationContext)
142
+ );
143
+ const result = JSON.parse(resultJson);
144
+
145
+ // Step 5: Check validation results
146
+ if (result.errors.length > 0) {
147
+ console.error('❌ Transaction validation failed:');
148
+ result.errors.forEach(err => {
149
+ console.error(`- ${err.error_message}`);
150
+ if (err.hint) {
151
+ console.error(` Hint: ${err.hint}`);
152
+ }
153
+ });
154
+ } else if (result.phase2_errors.length > 0) {
155
+ console.error('❌ Script execution failed:');
156
+ result.phase2_errors.forEach(err => {
157
+ console.error(`- ${err.error_message}`);
158
+ });
159
+ } else {
160
+ console.log('✅ Transaction is valid!');
161
+ }
162
+
163
+ // Check for warnings
164
+ if (result.warnings.length > 0) {
165
+ console.warn('⚠️ Warnings:', result.warnings);
166
+ }
167
+ ```
168
+
169
+ ### Complete Example with Error Handling
170
+
171
+ ```typescript
172
+ import {
173
+ get_necessary_data_list_js,
174
+ validate_transaction_js
175
+ } from '@cardananium/cquisitor-lib';
176
+
177
+ async function validateTransaction(txHex: string): Promise<boolean> {
178
+ try {
179
+ // Parse transaction
180
+ const necessaryDataJson = get_necessary_data_list_js(txHex);
181
+ const necessaryData = JSON.parse(necessaryDataJson);
182
+
183
+ // Fetch required blockchain data
184
+ // (Implementation depends on your data source)
185
+ const context = await buildValidationContext(necessaryData);
186
+
187
+ // Validate
188
+ const resultJson = validate_transaction_js(
189
+ txHex,
190
+ JSON.stringify(context)
191
+ );
192
+ const result = JSON.parse(resultJson);
193
+
194
+ // Log detailed results
195
+ const hasErrors = result.errors.length > 0 || result.phase2_errors.length > 0;
196
+
197
+ if (!hasErrors) {
198
+ console.log('✅ Transaction is valid!');
199
+
200
+ // Log redeemer execution details
201
+ result.eval_redeemer_results.forEach(redeemer => {
202
+ console.log(`Redeemer ${redeemer.tag}[${redeemer.index}]:`);
203
+ console.log(` Success: ${redeemer.success}`);
204
+ console.log(` Ex units: ${JSON.stringify(redeemer.calculated_ex_units)}`);
205
+ if (redeemer.logs.length > 0) {
206
+ console.log(` Logs: ${redeemer.logs.join(', ')}`);
207
+ }
208
+ });
209
+ } else {
210
+ console.error('❌ Validation failed');
211
+ [...result.errors, ...result.phase2_errors].forEach(err => {
212
+ console.error(`- ${err.error_message}`);
213
+ });
214
+ }
215
+
216
+ return !hasErrors;
217
+
218
+ } catch (error) {
219
+ console.error('Validation error:', error);
220
+ return false;
221
+ }
222
+ }
223
+ ```
224
+
225
+ ## API Reference
226
+
227
+ ### Transaction Validation
228
+
229
+ #### `get_necessary_data_list_js(tx_hex: string): string`
230
+
231
+ Extracts required blockchain data for validation.
232
+
233
+ ```typescript
234
+ const necessaryData = JSON.parse(get_necessary_data_list_js(txHex));
235
+ // Returns: { utxos, accounts, pools, dReps, govActions, ... }
236
+ ```
237
+
238
+ #### `validate_transaction_js(tx_hex: string, validation_context: string): string`
239
+
240
+ Validates transaction with full ledger rules.
241
+
242
+ ```typescript
243
+ const result = JSON.parse(validate_transaction_js(txHex, JSON.stringify(context)));
244
+ // Returns: { errors, warnings, phase2_errors, phase2_warnings, eval_redeemer_results }
245
+ ```
246
+
247
+ #### `get_utxo_list_from_tx(tx_hex: string): string[]`
248
+
249
+ Extracts all UTxO references (inputs + collateral + reference inputs) from transaction.
250
+
251
+ ### Universal Decoder
252
+
253
+ #### `get_decodable_types(): string[]`
254
+
255
+ Returns array of all 152+ decodable type names.
256
+
257
+ ```typescript
258
+ const types = get_decodable_types();
259
+ // ['Address', 'Transaction', 'PlutusScript', 'PublicKey', ...]
260
+ ```
261
+
262
+ #### `decode_specific_type(input: string, type_name: string, params: DecodingParams): any`
263
+
264
+ Decodes specific Cardano type from hex/bech32/base58.
265
+
266
+ ```typescript
267
+ const address = decode_specific_type(
268
+ "addr1...",
269
+ "Address",
270
+ { plutusDataSchema: "DetailedSchema" }
271
+ );
272
+
273
+ const tx = decode_specific_type(
274
+ "84a400...",
275
+ "Transaction",
276
+ { plutusDataSchema: "DetailedSchema" }
277
+ );
278
+ ```
279
+
280
+ #### `get_possible_types_for_input(input: string): string[]`
281
+
282
+ Suggests which types can decode the given input.
283
+
284
+ ```typescript
285
+ const possibleTypes = get_possible_types_for_input("e1a...");
286
+ // ['Address', 'BaseAddress', 'EnterpriseAddress', ...]
287
+ ```
288
+
289
+ ### CBOR Decoder
290
+
291
+ #### `cbor_to_json(cbor_hex: string): CborValue`
292
+
293
+ Converts CBOR to JSON with positional metadata.
294
+
295
+ ```typescript
296
+ const cbor = cbor_to_json("a26461646472...");
297
+ // Returns structured JSON with position info for each element
298
+ ```
299
+
300
+ ### Plutus Script Decoder
301
+
302
+ #### `decode_plutus_program_uplc_json(hex: string): ProgramJson`
303
+
304
+ Decodes Plutus script to UPLC AST in JSON format.
305
+
306
+ ```typescript
307
+ const program = decode_plutus_program_uplc_json("59012a01000...");
308
+ // Returns: { version: [1,0,0], program: { ... } }
309
+ ```
310
+
311
+ #### `decode_plutus_program_pretty_uplc(hex: string): string`
312
+
313
+ Decodes Plutus script to human-readable UPLC.
314
+
315
+ ```typescript
316
+ const code = decode_plutus_program_pretty_uplc("59012a01000...");
317
+ // Returns: "(program 1.0.0 (lam x_0 ...))"
318
+ ```
319
+
320
+ ### Signature Verification
321
+
322
+ #### `check_block_or_tx_signatures(hex: string): CheckSignaturesResult`
323
+
324
+ Verifies all signatures in transaction or block.
325
+
326
+ ```typescript
327
+ const result = check_block_or_tx_signatures(txHex);
328
+ // Returns: { valid, results: [{ valid, tx_hash, invalidVkeyWitnesses, invalidCatalystWitnesses }] }
329
+ ```
330
+
331
+ ### Script Execution
332
+
333
+ #### `execute_tx_scripts(tx_hex: string, utxos: UTxO[], cost_models: CostModels): ExecuteTxScriptsResult`
334
+
335
+ Executes all Plutus scripts in transaction.
336
+
337
+ ```typescript
338
+ const result = execute_tx_scripts(txHex, utxos, costModels);
339
+ // Returns execution units, logs, and status for each redeemer
340
+ ```
341
+
342
+ ## Data Sources
343
+
344
+ To populate the validation context, you'll need to fetch blockchain data from a Cardano indexer or node. Recommended sources:
345
+
346
+ - **[Blockfrost](https://blockfrost.io/)** - Reliable API with generous free tier
347
+ - **[Koios](https://koios.rest/)** - Community-driven API with rich queries
348
+ - **Cardano Node** - Direct access via `cardano-cli` or `cardano-db-sync`
349
+ - **Custom Indexer** - Roll your own using Pallas or similar libraries
350
+
351
+ ## Building from Source
352
+
353
+ ### Prerequisites
354
+
355
+ - Rust 1.83 or newer
356
+ - `wasm-pack`
357
+ - Node.js and npm
358
+
359
+ ### Build Steps
360
+
361
+ ```bash
362
+ # Clone the repository
363
+ git clone https://github.com/your-org/cquisitor-lib.git
364
+ cd cquisitor-lib
365
+
366
+ # Build for Node.js
367
+ npm run rust:build-wasm:node
368
+
369
+ # Build for browser
370
+ npm run rust:build-wasm:browser
371
+
372
+ # Build both targets
373
+ npm run build-all
374
+
375
+ # Generate TypeScript definitions
376
+ npm run generate-dts
377
+ ```
378
+
379
+ ## Type Definitions
380
+
381
+ Full TypeScript type definitions are available in the package and cover all input and output types. The main types include:
382
+
383
+ - `NecessaryInputData` - Required blockchain data for validation
384
+ - `ValidationInputContext` - Complete validation context structure
385
+ - `ValidationResult` - Validation results with errors and warnings
386
+ - `ProtocolParameters` - Cardano protocol parameters
387
+ - And many more detailed types for UTXOs, certificates, governance, etc.
388
+
389
+ See [types/cquisitor_lib.d.ts](./types/cquisitor_lib.d.ts) for the complete type definitions.
390
+
391
+ ## Performance
392
+
393
+ Written in Rust and compiled to WebAssembly for near-native performance in browsers and Node.js.
394
+
395
+ ## Contributing
396
+
397
+ Contributions are welcome! Please feel free to submit pull requests or open issues for bugs and feature requests.
398
+
399
+ ### Development Workflow
400
+
401
+ 1. Fork the repository
402
+ 2. Create a feature branch (`git checkout -b feature/amazing-feature`)
403
+ 3. Make your changes
404
+ 4. Run tests (`cargo test`)
405
+ 5. Commit your changes (`git commit -m 'Add amazing feature'`)
406
+ 6. Push to the branch (`git push origin feature/amazing-feature`)
407
+ 7. Open a Pull Request
408
+
409
+ ## License
410
+
411
+ This project is licensed under the Apache License 2.0 - see the [LICENSE](./LICENSE) file for details.
412
+
413
+ ## Acknowledgments
414
+
415
+ This library builds upon the excellent work of the Cardano community, particularly:
416
+
417
+ - [cardano-serialization-lib](https://github.com/Emurgo/cardano-serialization-lib) - For cardano structures deserialization
418
+ - [Pallas](https://github.com/txpipe/pallas) - Cardano primitives
419
+ - [UPLC](https://github.com/aiken-lang/uplc) - Plutus script execution
420
+ - The Cardano Ledger specification team
421
+
422
+ ## Support
423
+
424
+ For questions and support:
425
+
426
+ - 📖 Check the [API Documentation](./API_DOCUMENTATION.md)
427
+ - 🐛 Report bugs via [GitHub Issues](https://github.com/your-org/cquisitor-lib/issues)
428
+
429
+ ---
430
+
431
+ Made with ❤️ for the Cardano ecosystem
432
+
@@ -85,6 +85,7 @@ export type CborSimpleType =
85
85
  | "Break";
86
86
 
87
87
  export interface CborSimple {
88
+ type: CborSimpleType;
88
89
  position_info: CborPosition;
89
90
  struct_position_info?: CborPosition;
90
91
  value: any;
@@ -1086,38 +1086,94 @@ function handleError(f, args) {
1086
1086
  }
1087
1087
  /**
1088
1088
  */
1089
- export const AddressKind = Object.freeze({ Base:0,"0":"Base",Pointer:1,"1":"Pointer",Enterprise:2,"2":"Enterprise",Reward:3,"3":"Reward",Byron:4,"4":"Byron",Malformed:5,"5":"Malformed", });
1089
+ export const GovernanceActionKind = Object.freeze({ ParameterChangeAction:0,"0":"ParameterChangeAction",HardForkInitiationAction:1,"1":"HardForkInitiationAction",TreasuryWithdrawalsAction:2,"2":"TreasuryWithdrawalsAction",NoConfidenceAction:3,"3":"NoConfidenceAction",UpdateCommitteeAction:4,"4":"UpdateCommitteeAction",NewConstitutionAction:5,"5":"NewConstitutionAction",InfoAction:6,"6":"InfoAction", });
1090
1090
  /**
1091
1091
  */
1092
- export const VoteKind = Object.freeze({ No:0,"0":"No",Yes:1,"1":"Yes",Abstain:2,"2":"Abstain", });
1092
+ export const CoinSelectionStrategyCIP2 = Object.freeze({
1093
1093
  /**
1094
+ * Performs CIP2's Largest First ada-only selection. Will error if outputs contain non-ADA assets.
1094
1095
  */
1095
- export const GovernanceActionKind = Object.freeze({ ParameterChangeAction:0,"0":"ParameterChangeAction",HardForkInitiationAction:1,"1":"HardForkInitiationAction",TreasuryWithdrawalsAction:2,"2":"TreasuryWithdrawalsAction",NoConfidenceAction:3,"3":"NoConfidenceAction",UpdateCommitteeAction:4,"4":"UpdateCommitteeAction",NewConstitutionAction:5,"5":"NewConstitutionAction",InfoAction:6,"6":"InfoAction", });
1096
+ LargestFirst:0,"0":"LargestFirst",
1096
1097
  /**
1098
+ * Performs CIP2's Random Improve ada-only selection. Will error if outputs contain non-ADA assets.
1097
1099
  */
1098
- export const MetadataJsonSchema = Object.freeze({ NoConversions:0,"0":"NoConversions",BasicConversions:1,"1":"BasicConversions",DetailedSchema:2,"2":"DetailedSchema", });
1100
+ RandomImprove:1,"1":"RandomImprove",
1099
1101
  /**
1102
+ * Same as LargestFirst, but before adding ADA, will insert by largest-first for each asset type.
1100
1103
  */
1101
- export const NativeScriptKind = Object.freeze({ ScriptPubkey:0,"0":"ScriptPubkey",ScriptAll:1,"1":"ScriptAll",ScriptAny:2,"2":"ScriptAny",ScriptNOfK:3,"3":"ScriptNOfK",TimelockStart:4,"4":"TimelockStart",TimelockExpiry:5,"5":"TimelockExpiry", });
1104
+ LargestFirstMultiAsset:2,"2":"LargestFirstMultiAsset",
1102
1105
  /**
1106
+ * Same as RandomImprove, but before adding ADA, will insert by random-improve for each asset type.
1103
1107
  */
1104
- export const LanguageKind = Object.freeze({ PlutusV1:0,"0":"PlutusV1",PlutusV2:1,"1":"PlutusV2",PlutusV3:2,"2":"PlutusV3", });
1108
+ RandomImproveMultiAsset:3,"3":"RandomImproveMultiAsset", });
1105
1109
  /**
1106
- * Used to choosed the schema for a script JSON string
1107
1110
  */
1108
- export const ScriptSchema = Object.freeze({ Wallet:0,"0":"Wallet",Node:1,"1":"Node", });
1111
+ export const CertificateKind = Object.freeze({ StakeRegistration:0,"0":"StakeRegistration",StakeDeregistration:1,"1":"StakeDeregistration",StakeDelegation:2,"2":"StakeDelegation",PoolRegistration:3,"3":"PoolRegistration",PoolRetirement:4,"4":"PoolRetirement",GenesisKeyDelegation:5,"5":"GenesisKeyDelegation",MoveInstantaneousRewardsCert:6,"6":"MoveInstantaneousRewardsCert",CommitteeHotAuth:7,"7":"CommitteeHotAuth",CommitteeColdResign:8,"8":"CommitteeColdResign",DRepDeregistration:9,"9":"DRepDeregistration",DRepRegistration:10,"10":"DRepRegistration",DRepUpdate:11,"11":"DRepUpdate",StakeAndVoteDelegation:12,"12":"StakeAndVoteDelegation",StakeRegistrationAndDelegation:13,"13":"StakeRegistrationAndDelegation",StakeVoteRegistrationAndDelegation:14,"14":"StakeVoteRegistrationAndDelegation",VoteDelegation:15,"15":"VoteDelegation",VoteRegistrationAndDelegation:16,"16":"VoteRegistrationAndDelegation", });
1112
+ /**
1113
+ */
1114
+ export const BlockEra = Object.freeze({ Byron:0,"0":"Byron",Shelley:1,"1":"Shelley",Allegra:2,"2":"Allegra",Mary:3,"3":"Mary",Alonzo:4,"4":"Alonzo",Babbage:5,"5":"Babbage",Conway:6,"6":"Conway",Unknown:7,"7":"Unknown", });
1115
+ /**
1116
+ */
1117
+ export const DRepKind = Object.freeze({ KeyHash:0,"0":"KeyHash",ScriptHash:1,"1":"ScriptHash",AlwaysAbstain:2,"2":"AlwaysAbstain",AlwaysNoConfidence:3,"3":"AlwaysNoConfidence", });
1118
+ /**
1119
+ */
1120
+ export const RedeemerTagKind = Object.freeze({ Spend:0,"0":"Spend",Mint:1,"1":"Mint",Cert:2,"2":"Cert",Reward:3,"3":"Reward",Vote:4,"4":"Vote",VotingProposal:5,"5":"VotingProposal", });
1121
+ /**
1122
+ */
1123
+ export const PlutusDataKind = Object.freeze({ ConstrPlutusData:0,"0":"ConstrPlutusData",Map:1,"1":"Map",List:2,"2":"List",Integer:3,"3":"Integer",Bytes:4,"4":"Bytes", });
1109
1124
  /**
1110
1125
  */
1111
1126
  export const CborContainerType = Object.freeze({ Array:0,"0":"Array",Map:1,"1":"Map", });
1112
1127
  /**
1113
1128
  */
1129
+ export const RelayKind = Object.freeze({ SingleHostAddr:0,"0":"SingleHostAddr",SingleHostName:1,"1":"SingleHostName",MultiHostName:2,"2":"MultiHostName", });
1130
+ /**
1131
+ */
1132
+ export const ByronAddressType = Object.freeze({ ATPubKey:0,"0":"ATPubKey",ATScript:1,"1":"ATScript",ATRedeem:2,"2":"ATRedeem", });
1133
+ /**
1134
+ */
1135
+ export const MIRPot = Object.freeze({ Reserves:0,"0":"Reserves",Treasury:1,"1":"Treasury", });
1136
+ /**
1137
+ * Each new language uses a different namespace for hashing its script
1138
+ * This is because you could have a language where the same bytes have different semantics
1139
+ * So this avoids scripts in different languages mapping to the same hash
1140
+ * Note that the enum value here is different than the enum value for deciding the cost model of a script
1141
+ */
1142
+ export const ScriptHashNamespace = Object.freeze({ NativeScript:0,"0":"NativeScript",PlutusScript:1,"1":"PlutusScript",PlutusScriptV2:2,"2":"PlutusScriptV2",PlutusScriptV3:3,"3":"PlutusScriptV3", });
1143
+ /**
1144
+ */
1145
+ export const MIRKind = Object.freeze({ ToOtherPot:0,"0":"ToOtherPot",ToStakeCredentials:1,"1":"ToStakeCredentials", });
1146
+ /**
1147
+ * Used to choosed the schema for a script JSON string
1148
+ */
1149
+ export const ScriptSchema = Object.freeze({ Wallet:0,"0":"Wallet",Node:1,"1":"Node", });
1150
+ /**
1151
+ */
1114
1152
  export const CredKind = Object.freeze({ Key:0,"0":"Key",Script:1,"1":"Script", });
1115
1153
  /**
1116
1154
  */
1155
+ export const TransactionSetsState = Object.freeze({ AllSetsHaveTag:0,"0":"AllSetsHaveTag",AllSetsHaveNoTag:1,"1":"AllSetsHaveNoTag",MixedSets:2,"2":"MixedSets", });
1156
+ /**
1157
+ */
1158
+ export const VoteKind = Object.freeze({ No:0,"0":"No",Yes:1,"1":"Yes",Abstain:2,"2":"Abstain", });
1159
+ /**
1160
+ */
1161
+ export const MetadataJsonSchema = Object.freeze({ NoConversions:0,"0":"NoConversions",BasicConversions:1,"1":"BasicConversions",DetailedSchema:2,"2":"DetailedSchema", });
1162
+ /**
1163
+ */
1164
+ export const CborSetType = Object.freeze({ Tagged:0,"0":"Tagged",Untagged:1,"1":"Untagged", });
1165
+ /**
1166
+ */
1167
+ export const NetworkIdKind = Object.freeze({ Testnet:0,"0":"Testnet",Mainnet:1,"1":"Mainnet", });
1168
+ /**
1169
+ */
1170
+ export const AddressKind = Object.freeze({ Base:0,"0":"Base",Pointer:1,"1":"Pointer",Enterprise:2,"2":"Enterprise",Reward:3,"3":"Reward",Byron:4,"4":"Byron",Malformed:5,"5":"Malformed", });
1171
+ /**
1172
+ */
1117
1173
  export const TransactionMetadatumKind = Object.freeze({ MetadataMap:0,"0":"MetadataMap",MetadataList:1,"1":"MetadataList",Int:2,"2":"Int",Bytes:3,"3":"Bytes",Text:4,"4":"Text", });
1118
1174
  /**
1119
1175
  */
1120
- export const RedeemerTagKind = Object.freeze({ Spend:0,"0":"Spend",Mint:1,"1":"Mint",Cert:2,"2":"Cert",Reward:3,"3":"Reward",Vote:4,"4":"Vote",VotingProposal:5,"5":"VotingProposal", });
1176
+ export const VoterKind = Object.freeze({ ConstitutionalCommitteeHotKeyHash:0,"0":"ConstitutionalCommitteeHotKeyHash",ConstitutionalCommitteeHotScriptHash:1,"1":"ConstitutionalCommitteeHotScriptHash",DRepKeyHash:2,"2":"DRepKeyHash",DRepScriptHash:3,"3":"DRepScriptHash",StakingPoolKeyHash:4,"4":"StakingPoolKeyHash", });
1121
1177
  /**
1122
1178
  * JSON <-> PlutusData conversion schemas.
1123
1179
  * Follows ScriptDataJsonSchema in cardano-cli defined at:
@@ -1171,66 +1227,10 @@ BasicConversions:0,"0":"BasicConversions",
1171
1227
  DetailedSchema:1,"1":"DetailedSchema", });
1172
1228
  /**
1173
1229
  */
1174
- export const MIRKind = Object.freeze({ ToOtherPot:0,"0":"ToOtherPot",ToStakeCredentials:1,"1":"ToStakeCredentials", });
1175
- /**
1176
- */
1177
- export const RelayKind = Object.freeze({ SingleHostAddr:0,"0":"SingleHostAddr",SingleHostName:1,"1":"SingleHostName",MultiHostName:2,"2":"MultiHostName", });
1178
- /**
1179
- */
1180
- export const PlutusDataKind = Object.freeze({ ConstrPlutusData:0,"0":"ConstrPlutusData",Map:1,"1":"Map",List:2,"2":"List",Integer:3,"3":"Integer",Bytes:4,"4":"Bytes", });
1181
- /**
1182
- */
1183
- export const MIRPot = Object.freeze({ Reserves:0,"0":"Reserves",Treasury:1,"1":"Treasury", });
1184
- /**
1185
- */
1186
- export const DRepKind = Object.freeze({ KeyHash:0,"0":"KeyHash",ScriptHash:1,"1":"ScriptHash",AlwaysAbstain:2,"2":"AlwaysAbstain",AlwaysNoConfidence:3,"3":"AlwaysNoConfidence", });
1187
- /**
1188
- */
1189
- export const TransactionSetsState = Object.freeze({ AllSetsHaveTag:0,"0":"AllSetsHaveTag",AllSetsHaveNoTag:1,"1":"AllSetsHaveNoTag",MixedSets:2,"2":"MixedSets", });
1190
- /**
1191
- * Each new language uses a different namespace for hashing its script
1192
- * This is because you could have a language where the same bytes have different semantics
1193
- * So this avoids scripts in different languages mapping to the same hash
1194
- * Note that the enum value here is different than the enum value for deciding the cost model of a script
1195
- */
1196
- export const ScriptHashNamespace = Object.freeze({ NativeScript:0,"0":"NativeScript",PlutusScript:1,"1":"PlutusScript",PlutusScriptV2:2,"2":"PlutusScriptV2",PlutusScriptV3:3,"3":"PlutusScriptV3", });
1197
- /**
1198
- */
1199
- export const CoinSelectionStrategyCIP2 = Object.freeze({
1200
- /**
1201
- * Performs CIP2's Largest First ada-only selection. Will error if outputs contain non-ADA assets.
1202
- */
1203
- LargestFirst:0,"0":"LargestFirst",
1204
- /**
1205
- * Performs CIP2's Random Improve ada-only selection. Will error if outputs contain non-ADA assets.
1206
- */
1207
- RandomImprove:1,"1":"RandomImprove",
1208
- /**
1209
- * Same as LargestFirst, but before adding ADA, will insert by largest-first for each asset type.
1210
- */
1211
- LargestFirstMultiAsset:2,"2":"LargestFirstMultiAsset",
1212
- /**
1213
- * Same as RandomImprove, but before adding ADA, will insert by random-improve for each asset type.
1214
- */
1215
- RandomImproveMultiAsset:3,"3":"RandomImproveMultiAsset", });
1216
- /**
1217
- */
1218
- export const BlockEra = Object.freeze({ Byron:0,"0":"Byron",Shelley:1,"1":"Shelley",Allegra:2,"2":"Allegra",Mary:3,"3":"Mary",Alonzo:4,"4":"Alonzo",Babbage:5,"5":"Babbage",Conway:6,"6":"Conway",Unknown:7,"7":"Unknown", });
1219
- /**
1220
- */
1221
- export const VoterKind = Object.freeze({ ConstitutionalCommitteeHotKeyHash:0,"0":"ConstitutionalCommitteeHotKeyHash",ConstitutionalCommitteeHotScriptHash:1,"1":"ConstitutionalCommitteeHotScriptHash",DRepKeyHash:2,"2":"DRepKeyHash",DRepScriptHash:3,"3":"DRepScriptHash",StakingPoolKeyHash:4,"4":"StakingPoolKeyHash", });
1222
- /**
1223
- */
1224
- export const NetworkIdKind = Object.freeze({ Testnet:0,"0":"Testnet",Mainnet:1,"1":"Mainnet", });
1225
- /**
1226
- */
1227
- export const CborSetType = Object.freeze({ Tagged:0,"0":"Tagged",Untagged:1,"1":"Untagged", });
1228
- /**
1229
- */
1230
- export const ByronAddressType = Object.freeze({ ATPubKey:0,"0":"ATPubKey",ATScript:1,"1":"ATScript",ATRedeem:2,"2":"ATRedeem", });
1230
+ export const NativeScriptKind = Object.freeze({ ScriptPubkey:0,"0":"ScriptPubkey",ScriptAll:1,"1":"ScriptAll",ScriptAny:2,"2":"ScriptAny",ScriptNOfK:3,"3":"ScriptNOfK",TimelockStart:4,"4":"TimelockStart",TimelockExpiry:5,"5":"TimelockExpiry", });
1231
1231
  /**
1232
1232
  */
1233
- export const CertificateKind = Object.freeze({ StakeRegistration:0,"0":"StakeRegistration",StakeDeregistration:1,"1":"StakeDeregistration",StakeDelegation:2,"2":"StakeDelegation",PoolRegistration:3,"3":"PoolRegistration",PoolRetirement:4,"4":"PoolRetirement",GenesisKeyDelegation:5,"5":"GenesisKeyDelegation",MoveInstantaneousRewardsCert:6,"6":"MoveInstantaneousRewardsCert",CommitteeHotAuth:7,"7":"CommitteeHotAuth",CommitteeColdResign:8,"8":"CommitteeColdResign",DRepDeregistration:9,"9":"DRepDeregistration",DRepRegistration:10,"10":"DRepRegistration",DRepUpdate:11,"11":"DRepUpdate",StakeAndVoteDelegation:12,"12":"StakeAndVoteDelegation",StakeRegistrationAndDelegation:13,"13":"StakeRegistrationAndDelegation",StakeVoteRegistrationAndDelegation:14,"14":"StakeVoteRegistrationAndDelegation",VoteDelegation:15,"15":"VoteDelegation",VoteRegistrationAndDelegation:16,"16":"VoteRegistrationAndDelegation", });
1233
+ export const LanguageKind = Object.freeze({ PlutusV1:0,"0":"PlutusV1",PlutusV2:1,"1":"PlutusV2",PlutusV3:2,"2":"PlutusV3", });
1234
1234
 
1235
1235
  const AddressFinalization = (typeof FinalizationRegistry === 'undefined')
1236
1236
  ? { register: () => {}, unregister: () => {} }
Binary file
@@ -85,6 +85,7 @@ export type CborSimpleType =
85
85
  | "Break";
86
86
 
87
87
  export interface CborSimple {
88
+ type: CborSimpleType;
88
89
  position_info: CborPosition;
89
90
  struct_position_info?: CborPosition;
90
91
  value: any;
@@ -1080,56 +1080,6 @@ function handleError(f, args) {
1080
1080
  }
1081
1081
  }
1082
1082
  /**
1083
- */
1084
- module.exports.CertificateKind = Object.freeze({ StakeRegistration:0,"0":"StakeRegistration",StakeDeregistration:1,"1":"StakeDeregistration",StakeDelegation:2,"2":"StakeDelegation",PoolRegistration:3,"3":"PoolRegistration",PoolRetirement:4,"4":"PoolRetirement",GenesisKeyDelegation:5,"5":"GenesisKeyDelegation",MoveInstantaneousRewardsCert:6,"6":"MoveInstantaneousRewardsCert",CommitteeHotAuth:7,"7":"CommitteeHotAuth",CommitteeColdResign:8,"8":"CommitteeColdResign",DRepDeregistration:9,"9":"DRepDeregistration",DRepRegistration:10,"10":"DRepRegistration",DRepUpdate:11,"11":"DRepUpdate",StakeAndVoteDelegation:12,"12":"StakeAndVoteDelegation",StakeRegistrationAndDelegation:13,"13":"StakeRegistrationAndDelegation",StakeVoteRegistrationAndDelegation:14,"14":"StakeVoteRegistrationAndDelegation",VoteDelegation:15,"15":"VoteDelegation",VoteRegistrationAndDelegation:16,"16":"VoteRegistrationAndDelegation", });
1085
- /**
1086
- * Each new language uses a different namespace for hashing its script
1087
- * This is because you could have a language where the same bytes have different semantics
1088
- * So this avoids scripts in different languages mapping to the same hash
1089
- * Note that the enum value here is different than the enum value for deciding the cost model of a script
1090
- */
1091
- module.exports.ScriptHashNamespace = Object.freeze({ NativeScript:0,"0":"NativeScript",PlutusScript:1,"1":"PlutusScript",PlutusScriptV2:2,"2":"PlutusScriptV2",PlutusScriptV3:3,"3":"PlutusScriptV3", });
1092
- /**
1093
- */
1094
- module.exports.GovernanceActionKind = Object.freeze({ ParameterChangeAction:0,"0":"ParameterChangeAction",HardForkInitiationAction:1,"1":"HardForkInitiationAction",TreasuryWithdrawalsAction:2,"2":"TreasuryWithdrawalsAction",NoConfidenceAction:3,"3":"NoConfidenceAction",UpdateCommitteeAction:4,"4":"UpdateCommitteeAction",NewConstitutionAction:5,"5":"NewConstitutionAction",InfoAction:6,"6":"InfoAction", });
1095
- /**
1096
- */
1097
- module.exports.LanguageKind = Object.freeze({ PlutusV1:0,"0":"PlutusV1",PlutusV2:1,"1":"PlutusV2",PlutusV3:2,"2":"PlutusV3", });
1098
- /**
1099
- */
1100
- module.exports.MIRKind = Object.freeze({ ToOtherPot:0,"0":"ToOtherPot",ToStakeCredentials:1,"1":"ToStakeCredentials", });
1101
- /**
1102
- */
1103
- module.exports.NetworkIdKind = Object.freeze({ Testnet:0,"0":"Testnet",Mainnet:1,"1":"Mainnet", });
1104
- /**
1105
- */
1106
- module.exports.CoinSelectionStrategyCIP2 = Object.freeze({
1107
- /**
1108
- * Performs CIP2's Largest First ada-only selection. Will error if outputs contain non-ADA assets.
1109
- */
1110
- LargestFirst:0,"0":"LargestFirst",
1111
- /**
1112
- * Performs CIP2's Random Improve ada-only selection. Will error if outputs contain non-ADA assets.
1113
- */
1114
- RandomImprove:1,"1":"RandomImprove",
1115
- /**
1116
- * Same as LargestFirst, but before adding ADA, will insert by largest-first for each asset type.
1117
- */
1118
- LargestFirstMultiAsset:2,"2":"LargestFirstMultiAsset",
1119
- /**
1120
- * Same as RandomImprove, but before adding ADA, will insert by random-improve for each asset type.
1121
- */
1122
- RandomImproveMultiAsset:3,"3":"RandomImproveMultiAsset", });
1123
- /**
1124
- */
1125
- module.exports.CborSetType = Object.freeze({ Tagged:0,"0":"Tagged",Untagged:1,"1":"Untagged", });
1126
- /**
1127
- */
1128
- module.exports.AddressKind = Object.freeze({ Base:0,"0":"Base",Pointer:1,"1":"Pointer",Enterprise:2,"2":"Enterprise",Reward:3,"3":"Reward",Byron:4,"4":"Byron",Malformed:5,"5":"Malformed", });
1129
- /**
1130
- */
1131
- module.exports.TransactionSetsState = Object.freeze({ AllSetsHaveTag:0,"0":"AllSetsHaveTag",AllSetsHaveNoTag:1,"1":"AllSetsHaveNoTag",MixedSets:2,"2":"MixedSets", });
1132
- /**
1133
1083
  * JSON <-> PlutusData conversion schemas.
1134
1084
  * Follows ScriptDataJsonSchema in cardano-cli defined at:
1135
1085
  * https://github.com/input-output-hk/cardano-node/blob/master/cardano-api/src/Cardano/Api/ScriptData.hs#L254
@@ -1182,50 +1132,100 @@ BasicConversions:0,"0":"BasicConversions",
1182
1132
  DetailedSchema:1,"1":"DetailedSchema", });
1183
1133
  /**
1184
1134
  */
1185
- module.exports.NativeScriptKind = Object.freeze({ ScriptPubkey:0,"0":"ScriptPubkey",ScriptAll:1,"1":"ScriptAll",ScriptAny:2,"2":"ScriptAny",ScriptNOfK:3,"3":"ScriptNOfK",TimelockStart:4,"4":"TimelockStart",TimelockExpiry:5,"5":"TimelockExpiry", });
1135
+ module.exports.MetadataJsonSchema = Object.freeze({ NoConversions:0,"0":"NoConversions",BasicConversions:1,"1":"BasicConversions",DetailedSchema:2,"2":"DetailedSchema", });
1186
1136
  /**
1187
1137
  */
1188
- module.exports.BlockEra = Object.freeze({ Byron:0,"0":"Byron",Shelley:1,"1":"Shelley",Allegra:2,"2":"Allegra",Mary:3,"3":"Mary",Alonzo:4,"4":"Alonzo",Babbage:5,"5":"Babbage",Conway:6,"6":"Conway",Unknown:7,"7":"Unknown", });
1138
+ module.exports.NativeScriptKind = Object.freeze({ ScriptPubkey:0,"0":"ScriptPubkey",ScriptAll:1,"1":"ScriptAll",ScriptAny:2,"2":"ScriptAny",ScriptNOfK:3,"3":"ScriptNOfK",TimelockStart:4,"4":"TimelockStart",TimelockExpiry:5,"5":"TimelockExpiry", });
1189
1139
  /**
1190
1140
  */
1191
- module.exports.TransactionMetadatumKind = Object.freeze({ MetadataMap:0,"0":"MetadataMap",MetadataList:1,"1":"MetadataList",Int:2,"2":"Int",Bytes:3,"3":"Bytes",Text:4,"4":"Text", });
1141
+ module.exports.RedeemerTagKind = Object.freeze({ Spend:0,"0":"Spend",Mint:1,"1":"Mint",Cert:2,"2":"Cert",Reward:3,"3":"Reward",Vote:4,"4":"Vote",VotingProposal:5,"5":"VotingProposal", });
1192
1142
  /**
1193
1143
  */
1194
- module.exports.DRepKind = Object.freeze({ KeyHash:0,"0":"KeyHash",ScriptHash:1,"1":"ScriptHash",AlwaysAbstain:2,"2":"AlwaysAbstain",AlwaysNoConfidence:3,"3":"AlwaysNoConfidence", });
1144
+ module.exports.CborContainerType = Object.freeze({ Array:0,"0":"Array",Map:1,"1":"Map", });
1195
1145
  /**
1196
1146
  */
1197
- module.exports.MetadataJsonSchema = Object.freeze({ NoConversions:0,"0":"NoConversions",BasicConversions:1,"1":"BasicConversions",DetailedSchema:2,"2":"DetailedSchema", });
1147
+ module.exports.RelayKind = Object.freeze({ SingleHostAddr:0,"0":"SingleHostAddr",SingleHostName:1,"1":"SingleHostName",MultiHostName:2,"2":"MultiHostName", });
1198
1148
  /**
1199
1149
  */
1200
- module.exports.CborContainerType = Object.freeze({ Array:0,"0":"Array",Map:1,"1":"Map", });
1150
+ module.exports.LanguageKind = Object.freeze({ PlutusV1:0,"0":"PlutusV1",PlutusV2:1,"1":"PlutusV2",PlutusV3:2,"2":"PlutusV3", });
1201
1151
  /**
1202
1152
  */
1203
1153
  module.exports.ByronAddressType = Object.freeze({ ATPubKey:0,"0":"ATPubKey",ATScript:1,"1":"ATScript",ATRedeem:2,"2":"ATRedeem", });
1204
1154
  /**
1205
1155
  */
1206
- module.exports.RedeemerTagKind = Object.freeze({ Spend:0,"0":"Spend",Mint:1,"1":"Mint",Cert:2,"2":"Cert",Reward:3,"3":"Reward",Vote:4,"4":"Vote",VotingProposal:5,"5":"VotingProposal", });
1156
+ module.exports.TransactionMetadatumKind = Object.freeze({ MetadataMap:0,"0":"MetadataMap",MetadataList:1,"1":"MetadataList",Int:2,"2":"Int",Bytes:3,"3":"Bytes",Text:4,"4":"Text", });
1207
1157
  /**
1208
- * Used to choosed the schema for a script JSON string
1158
+ * Each new language uses a different namespace for hashing its script
1159
+ * This is because you could have a language where the same bytes have different semantics
1160
+ * So this avoids scripts in different languages mapping to the same hash
1161
+ * Note that the enum value here is different than the enum value for deciding the cost model of a script
1209
1162
  */
1210
- module.exports.ScriptSchema = Object.freeze({ Wallet:0,"0":"Wallet",Node:1,"1":"Node", });
1163
+ module.exports.ScriptHashNamespace = Object.freeze({ NativeScript:0,"0":"NativeScript",PlutusScript:1,"1":"PlutusScript",PlutusScriptV2:2,"2":"PlutusScriptV2",PlutusScriptV3:3,"3":"PlutusScriptV3", });
1211
1164
  /**
1212
1165
  */
1213
- module.exports.MIRPot = Object.freeze({ Reserves:0,"0":"Reserves",Treasury:1,"1":"Treasury", });
1166
+ module.exports.AddressKind = Object.freeze({ Base:0,"0":"Base",Pointer:1,"1":"Pointer",Enterprise:2,"2":"Enterprise",Reward:3,"3":"Reward",Byron:4,"4":"Byron",Malformed:5,"5":"Malformed", });
1214
1167
  /**
1215
1168
  */
1216
- module.exports.VoteKind = Object.freeze({ No:0,"0":"No",Yes:1,"1":"Yes",Abstain:2,"2":"Abstain", });
1169
+ module.exports.VoterKind = Object.freeze({ ConstitutionalCommitteeHotKeyHash:0,"0":"ConstitutionalCommitteeHotKeyHash",ConstitutionalCommitteeHotScriptHash:1,"1":"ConstitutionalCommitteeHotScriptHash",DRepKeyHash:2,"2":"DRepKeyHash",DRepScriptHash:3,"3":"DRepScriptHash",StakingPoolKeyHash:4,"4":"StakingPoolKeyHash", });
1217
1170
  /**
1218
1171
  */
1219
- module.exports.CredKind = Object.freeze({ Key:0,"0":"Key",Script:1,"1":"Script", });
1172
+ module.exports.MIRPot = Object.freeze({ Reserves:0,"0":"Reserves",Treasury:1,"1":"Treasury", });
1220
1173
  /**
1221
1174
  */
1222
- module.exports.VoterKind = Object.freeze({ ConstitutionalCommitteeHotKeyHash:0,"0":"ConstitutionalCommitteeHotKeyHash",ConstitutionalCommitteeHotScriptHash:1,"1":"ConstitutionalCommitteeHotScriptHash",DRepKeyHash:2,"2":"DRepKeyHash",DRepScriptHash:3,"3":"DRepScriptHash",StakingPoolKeyHash:4,"4":"StakingPoolKeyHash", });
1175
+ module.exports.BlockEra = Object.freeze({ Byron:0,"0":"Byron",Shelley:1,"1":"Shelley",Allegra:2,"2":"Allegra",Mary:3,"3":"Mary",Alonzo:4,"4":"Alonzo",Babbage:5,"5":"Babbage",Conway:6,"6":"Conway",Unknown:7,"7":"Unknown", });
1176
+ /**
1177
+ */
1178
+ module.exports.CborSetType = Object.freeze({ Tagged:0,"0":"Tagged",Untagged:1,"1":"Untagged", });
1223
1179
  /**
1224
1180
  */
1225
1181
  module.exports.PlutusDataKind = Object.freeze({ ConstrPlutusData:0,"0":"ConstrPlutusData",Map:1,"1":"Map",List:2,"2":"List",Integer:3,"3":"Integer",Bytes:4,"4":"Bytes", });
1226
1182
  /**
1227
1183
  */
1228
- module.exports.RelayKind = Object.freeze({ SingleHostAddr:0,"0":"SingleHostAddr",SingleHostName:1,"1":"SingleHostName",MultiHostName:2,"2":"MultiHostName", });
1184
+ module.exports.CertificateKind = Object.freeze({ StakeRegistration:0,"0":"StakeRegistration",StakeDeregistration:1,"1":"StakeDeregistration",StakeDelegation:2,"2":"StakeDelegation",PoolRegistration:3,"3":"PoolRegistration",PoolRetirement:4,"4":"PoolRetirement",GenesisKeyDelegation:5,"5":"GenesisKeyDelegation",MoveInstantaneousRewardsCert:6,"6":"MoveInstantaneousRewardsCert",CommitteeHotAuth:7,"7":"CommitteeHotAuth",CommitteeColdResign:8,"8":"CommitteeColdResign",DRepDeregistration:9,"9":"DRepDeregistration",DRepRegistration:10,"10":"DRepRegistration",DRepUpdate:11,"11":"DRepUpdate",StakeAndVoteDelegation:12,"12":"StakeAndVoteDelegation",StakeRegistrationAndDelegation:13,"13":"StakeRegistrationAndDelegation",StakeVoteRegistrationAndDelegation:14,"14":"StakeVoteRegistrationAndDelegation",VoteDelegation:15,"15":"VoteDelegation",VoteRegistrationAndDelegation:16,"16":"VoteRegistrationAndDelegation", });
1185
+ /**
1186
+ */
1187
+ module.exports.NetworkIdKind = Object.freeze({ Testnet:0,"0":"Testnet",Mainnet:1,"1":"Mainnet", });
1188
+ /**
1189
+ */
1190
+ module.exports.TransactionSetsState = Object.freeze({ AllSetsHaveTag:0,"0":"AllSetsHaveTag",AllSetsHaveNoTag:1,"1":"AllSetsHaveNoTag",MixedSets:2,"2":"MixedSets", });
1191
+ /**
1192
+ */
1193
+ module.exports.GovernanceActionKind = Object.freeze({ ParameterChangeAction:0,"0":"ParameterChangeAction",HardForkInitiationAction:1,"1":"HardForkInitiationAction",TreasuryWithdrawalsAction:2,"2":"TreasuryWithdrawalsAction",NoConfidenceAction:3,"3":"NoConfidenceAction",UpdateCommitteeAction:4,"4":"UpdateCommitteeAction",NewConstitutionAction:5,"5":"NewConstitutionAction",InfoAction:6,"6":"InfoAction", });
1194
+ /**
1195
+ */
1196
+ module.exports.DRepKind = Object.freeze({ KeyHash:0,"0":"KeyHash",ScriptHash:1,"1":"ScriptHash",AlwaysAbstain:2,"2":"AlwaysAbstain",AlwaysNoConfidence:3,"3":"AlwaysNoConfidence", });
1197
+ /**
1198
+ */
1199
+ module.exports.CoinSelectionStrategyCIP2 = Object.freeze({
1200
+ /**
1201
+ * Performs CIP2's Largest First ada-only selection. Will error if outputs contain non-ADA assets.
1202
+ */
1203
+ LargestFirst:0,"0":"LargestFirst",
1204
+ /**
1205
+ * Performs CIP2's Random Improve ada-only selection. Will error if outputs contain non-ADA assets.
1206
+ */
1207
+ RandomImprove:1,"1":"RandomImprove",
1208
+ /**
1209
+ * Same as LargestFirst, but before adding ADA, will insert by largest-first for each asset type.
1210
+ */
1211
+ LargestFirstMultiAsset:2,"2":"LargestFirstMultiAsset",
1212
+ /**
1213
+ * Same as RandomImprove, but before adding ADA, will insert by random-improve for each asset type.
1214
+ */
1215
+ RandomImproveMultiAsset:3,"3":"RandomImproveMultiAsset", });
1216
+ /**
1217
+ */
1218
+ module.exports.MIRKind = Object.freeze({ ToOtherPot:0,"0":"ToOtherPot",ToStakeCredentials:1,"1":"ToStakeCredentials", });
1219
+ /**
1220
+ */
1221
+ module.exports.CredKind = Object.freeze({ Key:0,"0":"Key",Script:1,"1":"Script", });
1222
+ /**
1223
+ * Used to choosed the schema for a script JSON string
1224
+ */
1225
+ module.exports.ScriptSchema = Object.freeze({ Wallet:0,"0":"Wallet",Node:1,"1":"Node", });
1226
+ /**
1227
+ */
1228
+ module.exports.VoteKind = Object.freeze({ No:0,"0":"No",Yes:1,"1":"Yes",Abstain:2,"2":"Abstain", });
1229
1229
 
1230
1230
  const AddressFinalization = (typeof FinalizationRegistry === 'undefined')
1231
1231
  ? { register: () => {}, unregister: () => {} }
Binary file
package/package.json CHANGED
@@ -3,7 +3,9 @@
3
3
  "collaborators": [
4
4
  "Evgenii Lisitskii <evgeniilisitskii@gmail.com>"
5
5
  ],
6
- "version": "0.1.0-beta.23",
6
+ "description": "Cardano transaction validation library",
7
+ "version": "0.1.0-beta.26",
8
+ "license": "Apache-2.0",
7
9
  "files": [
8
10
  "node/cquisitor_lib_bg.wasm",
9
11
  "node/cquisitor_lib.js",