@cardananium/cquisitor-lib 0.1.0-beta.20 → 0.1.0-beta.22

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.
@@ -284,50 +284,6 @@ module.exports.get_possible_types_for_input = function(input) {
284
284
  }
285
285
  };
286
286
 
287
- /**
288
- * @param {string} cbor_hex
289
- * @returns {any}
290
- */
291
- module.exports.cbor_to_json = function(cbor_hex) {
292
- try {
293
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
294
- const ptr0 = passStringToWasm0(cbor_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
295
- const len0 = WASM_VECTOR_LEN;
296
- wasm.cbor_to_json(retptr, ptr0, len0);
297
- var r0 = getInt32Memory0()[retptr / 4 + 0];
298
- var r1 = getInt32Memory0()[retptr / 4 + 1];
299
- var r2 = getInt32Memory0()[retptr / 4 + 2];
300
- if (r2) {
301
- throw takeObject(r1);
302
- }
303
- return takeObject(r0);
304
- } finally {
305
- wasm.__wbindgen_add_to_stack_pointer(16);
306
- }
307
- };
308
-
309
- /**
310
- * @param {string} hex_str
311
- * @returns {any}
312
- */
313
- module.exports.check_block_or_tx_signatures = function(hex_str) {
314
- try {
315
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
316
- const ptr0 = passStringToWasm0(hex_str, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
317
- const len0 = WASM_VECTOR_LEN;
318
- wasm.check_block_or_tx_signatures(retptr, ptr0, len0);
319
- var r0 = getInt32Memory0()[retptr / 4 + 0];
320
- var r1 = getInt32Memory0()[retptr / 4 + 1];
321
- var r2 = getInt32Memory0()[retptr / 4 + 2];
322
- if (r2) {
323
- throw takeObject(r1);
324
- }
325
- return takeObject(r0);
326
- } finally {
327
- wasm.__wbindgen_add_to_stack_pointer(16);
328
- }
329
- };
330
-
331
287
  /**
332
288
  * @param {string} tx_hex
333
289
  * @returns {string}
@@ -495,6 +451,50 @@ module.exports.execute_tx_scripts = function(tx_hex, utxo_json, cost_models_json
495
451
  }
496
452
  };
497
453
 
454
+ /**
455
+ * @param {string} cbor_hex
456
+ * @returns {any}
457
+ */
458
+ module.exports.cbor_to_json = function(cbor_hex) {
459
+ try {
460
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
461
+ const ptr0 = passStringToWasm0(cbor_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
462
+ const len0 = WASM_VECTOR_LEN;
463
+ wasm.cbor_to_json(retptr, ptr0, len0);
464
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
465
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
466
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
467
+ if (r2) {
468
+ throw takeObject(r1);
469
+ }
470
+ return takeObject(r0);
471
+ } finally {
472
+ wasm.__wbindgen_add_to_stack_pointer(16);
473
+ }
474
+ };
475
+
476
+ /**
477
+ * @param {string} hex_str
478
+ * @returns {any}
479
+ */
480
+ module.exports.check_block_or_tx_signatures = function(hex_str) {
481
+ try {
482
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
483
+ const ptr0 = passStringToWasm0(hex_str, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
484
+ const len0 = WASM_VECTOR_LEN;
485
+ wasm.check_block_or_tx_signatures(retptr, ptr0, len0);
486
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
487
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
488
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
489
+ if (r2) {
490
+ throw takeObject(r1);
491
+ }
492
+ return takeObject(r0);
493
+ } finally {
494
+ wasm.__wbindgen_add_to_stack_pointer(16);
495
+ }
496
+ };
497
+
498
498
  function getArrayU8FromWasm0(ptr, len) {
499
499
  ptr = ptr >>> 0;
500
500
  return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
@@ -1081,18 +1081,9 @@ function handleError(f, args) {
1081
1081
  }
1082
1082
  /**
1083
1083
  */
1084
- module.exports.DRepKind = Object.freeze({ KeyHash:0,"0":"KeyHash",ScriptHash:1,"1":"ScriptHash",AlwaysAbstain:2,"2":"AlwaysAbstain",AlwaysNoConfidence:3,"3":"AlwaysNoConfidence", });
1085
- /**
1086
- */
1087
1084
  module.exports.VoteKind = Object.freeze({ No:0,"0":"No",Yes:1,"1":"Yes",Abstain:2,"2":"Abstain", });
1088
1085
  /**
1089
1086
  */
1090
- module.exports.LanguageKind = Object.freeze({ PlutusV1:0,"0":"PlutusV1",PlutusV2:1,"1":"PlutusV2",PlutusV3:2,"2":"PlutusV3", });
1091
- /**
1092
- */
1093
- 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", });
1094
- /**
1095
- */
1096
1087
  module.exports.CoinSelectionStrategyCIP2 = Object.freeze({
1097
1088
  /**
1098
1089
  * Performs CIP2's Largest First ada-only selection. Will error if outputs contain non-ADA assets.
@@ -1112,22 +1103,10 @@ LargestFirstMultiAsset:2,"2":"LargestFirstMultiAsset",
1112
1103
  RandomImproveMultiAsset:3,"3":"RandomImproveMultiAsset", });
1113
1104
  /**
1114
1105
  */
1115
- 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", });
1116
- /**
1117
- */
1118
- 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", });
1119
- /**
1120
- */
1121
- 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", });
1122
- /**
1123
- */
1124
- module.exports.ByronAddressType = Object.freeze({ ATPubKey:0,"0":"ATPubKey",ATScript:1,"1":"ATScript",ATRedeem:2,"2":"ATRedeem", });
1125
- /**
1126
- */
1127
- module.exports.MIRPot = Object.freeze({ Reserves:0,"0":"Reserves",Treasury:1,"1":"Treasury", });
1106
+ 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", });
1128
1107
  /**
1129
1108
  */
1130
- 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", });
1109
+ module.exports.MetadataJsonSchema = Object.freeze({ NoConversions:0,"0":"NoConversions",BasicConversions:1,"1":"BasicConversions",DetailedSchema:2,"2":"DetailedSchema", });
1131
1110
  /**
1132
1111
  * JSON <-> PlutusData conversion schemas.
1133
1112
  * Follows ScriptDataJsonSchema in cardano-cli defined at:
@@ -1181,51 +1160,72 @@ BasicConversions:0,"0":"BasicConversions",
1181
1160
  DetailedSchema:1,"1":"DetailedSchema", });
1182
1161
  /**
1183
1162
  */
1184
- 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", });
1163
+ module.exports.MIRKind = Object.freeze({ ToOtherPot:0,"0":"ToOtherPot",ToStakeCredentials:1,"1":"ToStakeCredentials", });
1185
1164
  /**
1186
1165
  */
1187
- module.exports.CborSetType = Object.freeze({ Tagged:0,"0":"Tagged",Untagged:1,"1":"Untagged", });
1166
+ module.exports.TransactionSetsState = Object.freeze({ AllSetsHaveTag:0,"0":"AllSetsHaveTag",AllSetsHaveNoTag:1,"1":"AllSetsHaveNoTag",MixedSets:2,"2":"MixedSets", });
1188
1167
  /**
1189
- * Each new language uses a different namespace for hashing its script
1190
- * This is because you could have a language where the same bytes have different semantics
1191
- * So this avoids scripts in different languages mapping to the same hash
1192
- * Note that the enum value here is different than the enum value for deciding the cost model of a script
1193
1168
  */
1194
- module.exports.ScriptHashNamespace = Object.freeze({ NativeScript:0,"0":"NativeScript",PlutusScript:1,"1":"PlutusScript",PlutusScriptV2:2,"2":"PlutusScriptV2",PlutusScriptV3:3,"3":"PlutusScriptV3", });
1169
+ 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", });
1195
1170
  /**
1196
1171
  */
1197
- module.exports.NetworkIdKind = Object.freeze({ Testnet:0,"0":"Testnet",Mainnet:1,"1":"Mainnet", });
1172
+ 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", });
1198
1173
  /**
1199
1174
  */
1200
- 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", });
1175
+ 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", });
1176
+ /**
1177
+ */
1178
+ 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", });
1179
+ /**
1180
+ */
1181
+ module.exports.CborSetType = Object.freeze({ Tagged:0,"0":"Tagged",Untagged:1,"1":"Untagged", });
1201
1182
  /**
1202
1183
  */
1203
1184
  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", });
1204
1185
  /**
1205
1186
  */
1187
+ module.exports.DRepKind = Object.freeze({ KeyHash:0,"0":"KeyHash",ScriptHash:1,"1":"ScriptHash",AlwaysAbstain:2,"2":"AlwaysAbstain",AlwaysNoConfidence:3,"3":"AlwaysNoConfidence", });
1188
+ /**
1189
+ */
1190
+ 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", });
1191
+ /**
1192
+ */
1206
1193
  module.exports.CredKind = Object.freeze({ Key:0,"0":"Key",Script:1,"1":"Script", });
1207
1194
  /**
1208
1195
  */
1209
- module.exports.MetadataJsonSchema = Object.freeze({ NoConversions:0,"0":"NoConversions",BasicConversions:1,"1":"BasicConversions",DetailedSchema:2,"2":"DetailedSchema", });
1196
+ module.exports.CborContainerType = Object.freeze({ Array:0,"0":"Array",Map:1,"1":"Map", });
1197
+ /**
1198
+ */
1199
+ 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", });
1210
1200
  /**
1211
1201
  */
1212
1202
  module.exports.RelayKind = Object.freeze({ SingleHostAddr:0,"0":"SingleHostAddr",SingleHostName:1,"1":"SingleHostName",MultiHostName:2,"2":"MultiHostName", });
1213
1203
  /**
1214
- * Used to choosed the schema for a script JSON string
1204
+ * Each new language uses a different namespace for hashing its script
1205
+ * This is because you could have a language where the same bytes have different semantics
1206
+ * So this avoids scripts in different languages mapping to the same hash
1207
+ * Note that the enum value here is different than the enum value for deciding the cost model of a script
1215
1208
  */
1216
- module.exports.ScriptSchema = Object.freeze({ Wallet:0,"0":"Wallet",Node:1,"1":"Node", });
1209
+ module.exports.ScriptHashNamespace = Object.freeze({ NativeScript:0,"0":"NativeScript",PlutusScript:1,"1":"PlutusScript",PlutusScriptV2:2,"2":"PlutusScriptV2",PlutusScriptV3:3,"3":"PlutusScriptV3", });
1217
1210
  /**
1218
1211
  */
1219
- module.exports.TransactionSetsState = Object.freeze({ AllSetsHaveTag:0,"0":"AllSetsHaveTag",AllSetsHaveNoTag:1,"1":"AllSetsHaveNoTag",MixedSets:2,"2":"MixedSets", });
1212
+ module.exports.NetworkIdKind = Object.freeze({ Testnet:0,"0":"Testnet",Mainnet:1,"1":"Mainnet", });
1220
1213
  /**
1221
1214
  */
1222
- module.exports.MIRKind = Object.freeze({ ToOtherPot:0,"0":"ToOtherPot",ToStakeCredentials:1,"1":"ToStakeCredentials", });
1215
+ module.exports.LanguageKind = Object.freeze({ PlutusV1:0,"0":"PlutusV1",PlutusV2:1,"1":"PlutusV2",PlutusV3:2,"2":"PlutusV3", });
1223
1216
  /**
1217
+ * Used to choosed the schema for a script JSON string
1224
1218
  */
1225
- module.exports.CborContainerType = Object.freeze({ Array:0,"0":"Array",Map:1,"1":"Map", });
1219
+ module.exports.ScriptSchema = Object.freeze({ Wallet:0,"0":"Wallet",Node:1,"1":"Node", });
1226
1220
  /**
1227
1221
  */
1228
- 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", });
1222
+ 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", });
1223
+ /**
1224
+ */
1225
+ module.exports.ByronAddressType = Object.freeze({ ATPubKey:0,"0":"ATPubKey",ATScript:1,"1":"ATScript",ATRedeem:2,"2":"ATRedeem", });
1226
+ /**
1227
+ */
1228
+ module.exports.MIRPot = Object.freeze({ Reserves:0,"0":"Reserves",Treasury:1,"1":"Treasury", });
1229
1229
 
1230
1230
  const AddressFinalization = (typeof FinalizationRegistry === 'undefined')
1231
1231
  ? { register: () => {}, unregister: () => {} }
@@ -39261,11 +39261,6 @@ module.exports.__wbindgen_string_new = function(arg0, arg1) {
39261
39261
  return addHeapObject(ret);
39262
39262
  };
39263
39263
 
39264
- module.exports.__wbindgen_error_new = function(arg0, arg1) {
39265
- const ret = new Error(getStringFromWasm0(arg0, arg1));
39266
- return addHeapObject(ret);
39267
- };
39268
-
39269
39264
  module.exports.__wbindgen_is_undefined = function(arg0) {
39270
39265
  const ret = getObject(arg0) === undefined;
39271
39266
  return ret;
@@ -39281,8 +39276,8 @@ module.exports.__wbindgen_is_bigint = function(arg0) {
39281
39276
  return ret;
39282
39277
  };
39283
39278
 
39284
- module.exports.__wbindgen_bigint_from_u64 = function(arg0) {
39285
- const ret = BigInt.asUintN(64, arg0);
39279
+ module.exports.__wbindgen_bigint_from_i64 = function(arg0) {
39280
+ const ret = arg0;
39286
39281
  return addHeapObject(ret);
39287
39282
  };
39288
39283
 
@@ -39311,6 +39306,11 @@ module.exports.__wbindgen_is_object = function(arg0) {
39311
39306
  return ret;
39312
39307
  };
39313
39308
 
39309
+ module.exports.__wbindgen_error_new = function(arg0, arg1) {
39310
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
39311
+ return addHeapObject(ret);
39312
+ };
39313
+
39314
39314
  module.exports.__wbindgen_object_clone_ref = function(arg0) {
39315
39315
  const ret = getObject(arg0);
39316
39316
  return addHeapObject(ret);
Binary file
@@ -4,14 +4,14 @@ export const memory: WebAssembly.Memory;
4
4
  export function get_decodable_types(a: number): void;
5
5
  export function decode_specific_type(a: number, b: number, c: number, d: number, e: number, f: number): void;
6
6
  export function get_possible_types_for_input(a: number, b: number, c: number): void;
7
- export function cbor_to_json(a: number, b: number, c: number): void;
8
- export function check_block_or_tx_signatures(a: number, b: number, c: number): void;
9
7
  export function get_necessary_data_list_js(a: number, b: number, c: number): void;
10
8
  export function validate_transaction_js(a: number, b: number, c: number, d: number, e: number): void;
11
9
  export function decode_plutus_program_uplc_json(a: number, b: number, c: number): void;
12
10
  export function decode_plutus_program_pretty_uplc(a: number, b: number, c: number): void;
13
11
  export function get_utxo_list_from_tx(a: number, b: number, c: number): void;
14
12
  export function execute_tx_scripts(a: number, b: number, c: number, d: number, e: number): void;
13
+ export function cbor_to_json(a: number, b: number, c: number): void;
14
+ export function check_block_or_tx_signatures(a: number, b: number, c: number): void;
15
15
  export function __wbg_noconfidenceaction_free(a: number): void;
16
16
  export function noconfidenceaction_to_bytes(a: number, b: number): void;
17
17
  export function noconfidenceaction_from_bytes(a: number, b: number, c: number): void;
package/package.json CHANGED
@@ -3,7 +3,7 @@
3
3
  "collaborators": [
4
4
  "Evgenii Lisitskii <evgeniilisitskii@gmail.com>"
5
5
  ],
6
- "version": "0.1.0-beta.20",
6
+ "version": "0.1.0-beta.22",
7
7
  "files": [
8
8
  "node/cquisitor_lib_bg.wasm",
9
9
  "node/cquisitor_lib.js",