@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.
@@ -289,50 +289,6 @@ export function get_possible_types_for_input(input) {
289
289
  }
290
290
  }
291
291
 
292
- /**
293
- * @param {string} cbor_hex
294
- * @returns {any}
295
- */
296
- export function cbor_to_json(cbor_hex) {
297
- try {
298
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
299
- const ptr0 = passStringToWasm0(cbor_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
300
- const len0 = WASM_VECTOR_LEN;
301
- wasm.cbor_to_json(retptr, ptr0, len0);
302
- var r0 = getInt32Memory0()[retptr / 4 + 0];
303
- var r1 = getInt32Memory0()[retptr / 4 + 1];
304
- var r2 = getInt32Memory0()[retptr / 4 + 2];
305
- if (r2) {
306
- throw takeObject(r1);
307
- }
308
- return takeObject(r0);
309
- } finally {
310
- wasm.__wbindgen_add_to_stack_pointer(16);
311
- }
312
- }
313
-
314
- /**
315
- * @param {string} hex_str
316
- * @returns {any}
317
- */
318
- export function check_block_or_tx_signatures(hex_str) {
319
- try {
320
- const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
321
- const ptr0 = passStringToWasm0(hex_str, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
322
- const len0 = WASM_VECTOR_LEN;
323
- wasm.check_block_or_tx_signatures(retptr, ptr0, len0);
324
- var r0 = getInt32Memory0()[retptr / 4 + 0];
325
- var r1 = getInt32Memory0()[retptr / 4 + 1];
326
- var r2 = getInt32Memory0()[retptr / 4 + 2];
327
- if (r2) {
328
- throw takeObject(r1);
329
- }
330
- return takeObject(r0);
331
- } finally {
332
- wasm.__wbindgen_add_to_stack_pointer(16);
333
- }
334
- }
335
-
336
292
  /**
337
293
  * @param {string} tx_hex
338
294
  * @returns {string}
@@ -500,6 +456,50 @@ export function execute_tx_scripts(tx_hex, utxo_json, cost_models_json) {
500
456
  }
501
457
  }
502
458
 
459
+ /**
460
+ * @param {string} cbor_hex
461
+ * @returns {any}
462
+ */
463
+ export function cbor_to_json(cbor_hex) {
464
+ try {
465
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
466
+ const ptr0 = passStringToWasm0(cbor_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
467
+ const len0 = WASM_VECTOR_LEN;
468
+ wasm.cbor_to_json(retptr, ptr0, len0);
469
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
470
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
471
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
472
+ if (r2) {
473
+ throw takeObject(r1);
474
+ }
475
+ return takeObject(r0);
476
+ } finally {
477
+ wasm.__wbindgen_add_to_stack_pointer(16);
478
+ }
479
+ }
480
+
481
+ /**
482
+ * @param {string} hex_str
483
+ * @returns {any}
484
+ */
485
+ export function check_block_or_tx_signatures(hex_str) {
486
+ try {
487
+ const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
488
+ const ptr0 = passStringToWasm0(hex_str, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
489
+ const len0 = WASM_VECTOR_LEN;
490
+ wasm.check_block_or_tx_signatures(retptr, ptr0, len0);
491
+ var r0 = getInt32Memory0()[retptr / 4 + 0];
492
+ var r1 = getInt32Memory0()[retptr / 4 + 1];
493
+ var r2 = getInt32Memory0()[retptr / 4 + 2];
494
+ if (r2) {
495
+ throw takeObject(r1);
496
+ }
497
+ return takeObject(r0);
498
+ } finally {
499
+ wasm.__wbindgen_add_to_stack_pointer(16);
500
+ }
501
+ }
502
+
503
503
  function getArrayU8FromWasm0(ptr, len) {
504
504
  ptr = ptr >>> 0;
505
505
  return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
@@ -1085,31 +1085,74 @@ function handleError(f, args) {
1085
1085
  }
1086
1086
  }
1087
1087
  /**
1088
+ */
1089
+ export const MIRPot = Object.freeze({ Reserves:0,"0":"Reserves",Treasury:1,"1":"Treasury", });
1090
+ /**
1091
+ */
1092
+ export const ByronAddressType = Object.freeze({ ATPubKey:0,"0":"ATPubKey",ATScript:1,"1":"ATScript",ATRedeem:2,"2":"ATRedeem", });
1093
+ /**
1094
+ */
1095
+ export const CborContainerType = Object.freeze({ Array:0,"0":"Array",Map:1,"1":"Map", });
1096
+ /**
1097
+ */
1098
+ export const NetworkIdKind = Object.freeze({ Testnet:0,"0":"Testnet",Mainnet:1,"1":"Mainnet", });
1099
+ /**
1088
1100
  * Used to choosed the schema for a script JSON string
1089
1101
  */
1090
1102
  export const ScriptSchema = Object.freeze({ Wallet:0,"0":"Wallet",Node:1,"1":"Node", });
1091
1103
  /**
1092
1104
  */
1093
- export const ByronAddressType = Object.freeze({ ATPubKey:0,"0":"ATPubKey",ATScript:1,"1":"ATScript",ATRedeem:2,"2":"ATRedeem", });
1105
+ export const VoteKind = Object.freeze({ No:0,"0":"No",Yes:1,"1":"Yes",Abstain:2,"2":"Abstain", });
1094
1106
  /**
1095
1107
  */
1096
- export const DRepKind = Object.freeze({ KeyHash:0,"0":"KeyHash",ScriptHash:1,"1":"ScriptHash",AlwaysAbstain:2,"2":"AlwaysAbstain",AlwaysNoConfidence:3,"3":"AlwaysNoConfidence", });
1108
+ export const CborSetType = Object.freeze({ Tagged:0,"0":"Tagged",Untagged:1,"1":"Untagged", });
1109
+ /**
1110
+ */
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 MIRKind = Object.freeze({ ToOtherPot:0,"0":"ToOtherPot",ToStakeCredentials:1,"1":"ToStakeCredentials", });
1115
+ /**
1116
+ */
1117
+ 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", });
1097
1118
  /**
1098
1119
  */
1099
1120
  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", });
1100
1121
  /**
1101
1122
  */
1102
- export const MetadataJsonSchema = Object.freeze({ NoConversions:0,"0":"NoConversions",BasicConversions:1,"1":"BasicConversions",DetailedSchema:2,"2":"DetailedSchema", });
1123
+ export const CoinSelectionStrategyCIP2 = Object.freeze({
1103
1124
  /**
1125
+ * Performs CIP2's Largest First ada-only selection. Will error if outputs contain non-ADA assets.
1104
1126
  */
1105
- 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", });
1127
+ LargestFirst:0,"0":"LargestFirst",
1106
1128
  /**
1129
+ * Performs CIP2's Random Improve ada-only selection. Will error if outputs contain non-ADA assets.
1107
1130
  */
1108
- export const CborContainerType = Object.freeze({ Array:0,"0":"Array",Map:1,"1":"Map", });
1131
+ RandomImprove:1,"1":"RandomImprove",
1132
+ /**
1133
+ * Same as LargestFirst, but before adding ADA, will insert by largest-first for each asset type.
1134
+ */
1135
+ LargestFirstMultiAsset:2,"2":"LargestFirstMultiAsset",
1136
+ /**
1137
+ * Same as RandomImprove, but before adding ADA, will insert by random-improve for each asset type.
1138
+ */
1139
+ RandomImproveMultiAsset:3,"3":"RandomImproveMultiAsset", });
1140
+ /**
1141
+ */
1142
+ export const LanguageKind = Object.freeze({ PlutusV1:0,"0":"PlutusV1",PlutusV2:1,"1":"PlutusV2",PlutusV3:2,"2":"PlutusV3", });
1143
+ /**
1144
+ */
1145
+ export const CredKind = Object.freeze({ Key:0,"0":"Key",Script:1,"1":"Script", });
1146
+ /**
1147
+ */
1148
+ 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", });
1109
1149
  /**
1110
1150
  */
1111
1151
  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", });
1112
1152
  /**
1153
+ */
1154
+ export const MetadataJsonSchema = Object.freeze({ NoConversions:0,"0":"NoConversions",BasicConversions:1,"1":"BasicConversions",DetailedSchema:2,"2":"DetailedSchema", });
1155
+ /**
1113
1156
  * Each new language uses a different namespace for hashing its script
1114
1157
  * This is because you could have a language where the same bytes have different semantics
1115
1158
  * So this avoids scripts in different languages mapping to the same hash
@@ -1118,13 +1161,19 @@ export const BlockEra = Object.freeze({ Byron:0,"0":"Byron",Shelley:1,"1":"Shell
1118
1161
  export const ScriptHashNamespace = Object.freeze({ NativeScript:0,"0":"NativeScript",PlutusScript:1,"1":"PlutusScript",PlutusScriptV2:2,"2":"PlutusScriptV2",PlutusScriptV3:3,"3":"PlutusScriptV3", });
1119
1162
  /**
1120
1163
  */
1121
- export const CredKind = Object.freeze({ Key:0,"0":"Key",Script:1,"1":"Script", });
1164
+ 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", });
1122
1165
  /**
1123
1166
  */
1124
- export const NetworkIdKind = Object.freeze({ Testnet:0,"0":"Testnet",Mainnet:1,"1":"Mainnet", });
1167
+ 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", });
1125
1168
  /**
1126
1169
  */
1127
- 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", });
1170
+ export const TransactionSetsState = Object.freeze({ AllSetsHaveTag:0,"0":"AllSetsHaveTag",AllSetsHaveNoTag:1,"1":"AllSetsHaveNoTag",MixedSets:2,"2":"MixedSets", });
1171
+ /**
1172
+ */
1173
+ 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", });
1174
+ /**
1175
+ */
1176
+ export const RelayKind = Object.freeze({ SingleHostAddr:0,"0":"SingleHostAddr",SingleHostName:1,"1":"SingleHostName",MultiHostName:2,"2":"MultiHostName", });
1128
1177
  /**
1129
1178
  * JSON <-> PlutusData conversion schemas.
1130
1179
  * Follows ScriptDataJsonSchema in cardano-cli defined at:
@@ -1178,59 +1227,10 @@ BasicConversions:0,"0":"BasicConversions",
1178
1227
  DetailedSchema:1,"1":"DetailedSchema", });
1179
1228
  /**
1180
1229
  */
1181
- 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", });
1182
- /**
1183
- */
1184
- 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", });
1185
- /**
1186
- */
1187
- export const RelayKind = Object.freeze({ SingleHostAddr:0,"0":"SingleHostAddr",SingleHostName:1,"1":"SingleHostName",MultiHostName:2,"2":"MultiHostName", });
1188
- /**
1189
- */
1190
1230
  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", });
1191
1231
  /**
1192
1232
  */
1193
- export const VoteKind = Object.freeze({ No:0,"0":"No",Yes:1,"1":"Yes",Abstain:2,"2":"Abstain", });
1194
- /**
1195
- */
1196
- export const TransactionSetsState = Object.freeze({ AllSetsHaveTag:0,"0":"AllSetsHaveTag",AllSetsHaveNoTag:1,"1":"AllSetsHaveNoTag",MixedSets:2,"2":"MixedSets", });
1197
- /**
1198
- */
1199
- 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", });
1200
- /**
1201
- */
1202
- export const LanguageKind = Object.freeze({ PlutusV1:0,"0":"PlutusV1",PlutusV2:1,"1":"PlutusV2",PlutusV3:2,"2":"PlutusV3", });
1203
- /**
1204
- */
1205
- export const MIRPot = Object.freeze({ Reserves:0,"0":"Reserves",Treasury:1,"1":"Treasury", });
1206
- /**
1207
- */
1208
- export const MIRKind = Object.freeze({ ToOtherPot:0,"0":"ToOtherPot",ToStakeCredentials:1,"1":"ToStakeCredentials", });
1209
- /**
1210
- */
1211
- 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", });
1212
- /**
1213
- */
1214
- export const CborSetType = Object.freeze({ Tagged:0,"0":"Tagged",Untagged:1,"1":"Untagged", });
1215
- /**
1216
- */
1217
- export const CoinSelectionStrategyCIP2 = Object.freeze({
1218
- /**
1219
- * Performs CIP2's Largest First ada-only selection. Will error if outputs contain non-ADA assets.
1220
- */
1221
- LargestFirst:0,"0":"LargestFirst",
1222
- /**
1223
- * Performs CIP2's Random Improve ada-only selection. Will error if outputs contain non-ADA assets.
1224
- */
1225
- RandomImprove:1,"1":"RandomImprove",
1226
- /**
1227
- * Same as LargestFirst, but before adding ADA, will insert by largest-first for each asset type.
1228
- */
1229
- LargestFirstMultiAsset:2,"2":"LargestFirstMultiAsset",
1230
- /**
1231
- * Same as RandomImprove, but before adding ADA, will insert by random-improve for each asset type.
1232
- */
1233
- RandomImproveMultiAsset:3,"3":"RandomImproveMultiAsset", });
1233
+ export const DRepKind = Object.freeze({ KeyHash:0,"0":"KeyHash",ScriptHash:1,"1":"ScriptHash",AlwaysAbstain:2,"2":"AlwaysAbstain",AlwaysNoConfidence:3,"3":"AlwaysNoConfidence", });
1234
1234
 
1235
1235
  const AddressFinalization = (typeof FinalizationRegistry === 'undefined')
1236
1236
  ? { register: () => {}, unregister: () => {} }
@@ -39069,11 +39069,6 @@ export function __wbindgen_string_new(arg0, arg1) {
39069
39069
  return addHeapObject(ret);
39070
39070
  };
39071
39071
 
39072
- export function __wbindgen_error_new(arg0, arg1) {
39073
- const ret = new Error(getStringFromWasm0(arg0, arg1));
39074
- return addHeapObject(ret);
39075
- };
39076
-
39077
39072
  export function __wbindgen_is_undefined(arg0) {
39078
39073
  const ret = getObject(arg0) === undefined;
39079
39074
  return ret;
@@ -39089,8 +39084,8 @@ export function __wbindgen_is_bigint(arg0) {
39089
39084
  return ret;
39090
39085
  };
39091
39086
 
39092
- export function __wbindgen_bigint_from_u64(arg0) {
39093
- const ret = BigInt.asUintN(64, arg0);
39087
+ export function __wbindgen_bigint_from_i64(arg0) {
39088
+ const ret = arg0;
39094
39089
  return addHeapObject(ret);
39095
39090
  };
39096
39091
 
@@ -39119,6 +39114,11 @@ export function __wbindgen_is_object(arg0) {
39119
39114
  return ret;
39120
39115
  };
39121
39116
 
39117
+ export function __wbindgen_error_new(arg0, arg1) {
39118
+ const ret = new Error(getStringFromWasm0(arg0, arg1));
39119
+ return addHeapObject(ret);
39120
+ };
39121
+
39122
39122
  export function __wbindgen_object_clone_ref(arg0) {
39123
39123
  const ret = getObject(arg0);
39124
39124
  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;