@cardananium/cquisitor-lib 0.1.0-beta.28 → 0.1.0-beta.29
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/browser/cquisitor_lib.d.ts +647 -582
- package/browser/cquisitor_lib_bg.js +99 -67
- package/browser/cquisitor_lib_bg.wasm +0 -0
- package/browser/cquisitor_lib_bg.wasm.d.ts +2 -1
- package/node/cquisitor_lib.d.ts +647 -582
- package/node/cquisitor_lib.js +111 -79
- package/node/cquisitor_lib_bg.wasm +0 -0
- package/node/cquisitor_lib_bg.wasm.d.ts +2 -1
- package/package.json +1 -1
package/node/cquisitor_lib.js
CHANGED
|
@@ -284,28 +284,6 @@ module.exports.get_possible_types_for_input = function(input) {
|
|
|
284
284
|
}
|
|
285
285
|
};
|
|
286
286
|
|
|
287
|
-
/**
|
|
288
|
-
* @param {string} hex_str
|
|
289
|
-
* @returns {any}
|
|
290
|
-
*/
|
|
291
|
-
module.exports.check_block_or_tx_signatures = function(hex_str) {
|
|
292
|
-
try {
|
|
293
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
294
|
-
const ptr0 = passStringToWasm0(hex_str, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
295
|
-
const len0 = WASM_VECTOR_LEN;
|
|
296
|
-
wasm.check_block_or_tx_signatures(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
287
|
/**
|
|
310
288
|
* @param {string} tx_hex
|
|
311
289
|
* @returns {string}
|
|
@@ -495,6 +473,60 @@ module.exports.cbor_to_json = function(cbor_hex) {
|
|
|
495
473
|
}
|
|
496
474
|
};
|
|
497
475
|
|
|
476
|
+
/**
|
|
477
|
+
* @param {string} tx_hex
|
|
478
|
+
* @param {number} output_index
|
|
479
|
+
* @returns {string}
|
|
480
|
+
*/
|
|
481
|
+
module.exports.get_ref_script_bytes = function(tx_hex, output_index) {
|
|
482
|
+
let deferred3_0;
|
|
483
|
+
let deferred3_1;
|
|
484
|
+
try {
|
|
485
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
486
|
+
const ptr0 = passStringToWasm0(tx_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
487
|
+
const len0 = WASM_VECTOR_LEN;
|
|
488
|
+
wasm.get_ref_script_bytes(retptr, ptr0, len0, output_index);
|
|
489
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
490
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
491
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
492
|
+
var r3 = getInt32Memory0()[retptr / 4 + 3];
|
|
493
|
+
var ptr2 = r0;
|
|
494
|
+
var len2 = r1;
|
|
495
|
+
if (r3) {
|
|
496
|
+
ptr2 = 0; len2 = 0;
|
|
497
|
+
throw takeObject(r2);
|
|
498
|
+
}
|
|
499
|
+
deferred3_0 = ptr2;
|
|
500
|
+
deferred3_1 = len2;
|
|
501
|
+
return getStringFromWasm0(ptr2, len2);
|
|
502
|
+
} finally {
|
|
503
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
504
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
505
|
+
}
|
|
506
|
+
};
|
|
507
|
+
|
|
508
|
+
/**
|
|
509
|
+
* @param {string} hex_str
|
|
510
|
+
* @returns {any}
|
|
511
|
+
*/
|
|
512
|
+
module.exports.check_block_or_tx_signatures = function(hex_str) {
|
|
513
|
+
try {
|
|
514
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
515
|
+
const ptr0 = passStringToWasm0(hex_str, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
516
|
+
const len0 = WASM_VECTOR_LEN;
|
|
517
|
+
wasm.check_block_or_tx_signatures(retptr, ptr0, len0);
|
|
518
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
519
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
520
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
521
|
+
if (r2) {
|
|
522
|
+
throw takeObject(r1);
|
|
523
|
+
}
|
|
524
|
+
return takeObject(r0);
|
|
525
|
+
} finally {
|
|
526
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
527
|
+
}
|
|
528
|
+
};
|
|
529
|
+
|
|
498
530
|
function getArrayU8FromWasm0(ptr, len) {
|
|
499
531
|
ptr = ptr >>> 0;
|
|
500
532
|
return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
|
|
@@ -1081,67 +1113,31 @@ function handleError(f, args) {
|
|
|
1081
1113
|
}
|
|
1082
1114
|
/**
|
|
1083
1115
|
*/
|
|
1084
|
-
module.exports.ByronAddressType = Object.freeze({ ATPubKey:0,"0":"ATPubKey",ATScript:1,"1":"ATScript",ATRedeem:2,"2":"ATRedeem", });
|
|
1085
|
-
/**
|
|
1086
|
-
*/
|
|
1087
|
-
module.exports.CoinSelectionStrategyCIP2 = Object.freeze({
|
|
1088
|
-
/**
|
|
1089
|
-
* Performs CIP2's Largest First ada-only selection. Will error if outputs contain non-ADA assets.
|
|
1090
|
-
*/
|
|
1091
|
-
LargestFirst:0,"0":"LargestFirst",
|
|
1092
|
-
/**
|
|
1093
|
-
* Performs CIP2's Random Improve ada-only selection. Will error if outputs contain non-ADA assets.
|
|
1094
|
-
*/
|
|
1095
|
-
RandomImprove:1,"1":"RandomImprove",
|
|
1096
|
-
/**
|
|
1097
|
-
* Same as LargestFirst, but before adding ADA, will insert by largest-first for each asset type.
|
|
1098
|
-
*/
|
|
1099
|
-
LargestFirstMultiAsset:2,"2":"LargestFirstMultiAsset",
|
|
1100
|
-
/**
|
|
1101
|
-
* Same as RandomImprove, but before adding ADA, will insert by random-improve for each asset type.
|
|
1102
|
-
*/
|
|
1103
|
-
RandomImproveMultiAsset:3,"3":"RandomImproveMultiAsset", });
|
|
1104
|
-
/**
|
|
1105
|
-
*/
|
|
1106
|
-
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", });
|
|
1107
|
-
/**
|
|
1108
|
-
*/
|
|
1109
1116
|
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", });
|
|
1110
1117
|
/**
|
|
1111
1118
|
*/
|
|
1112
|
-
module.exports.
|
|
1113
|
-
/**
|
|
1114
|
-
*/
|
|
1115
|
-
module.exports.CborContainerType = Object.freeze({ Array:0,"0":"Array",Map:1,"1":"Map", });
|
|
1119
|
+
module.exports.ByronAddressType = Object.freeze({ ATPubKey:0,"0":"ATPubKey",ATScript:1,"1":"ATScript",ATRedeem:2,"2":"ATRedeem", });
|
|
1116
1120
|
/**
|
|
1117
1121
|
*/
|
|
1118
|
-
module.exports.
|
|
1122
|
+
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", });
|
|
1119
1123
|
/**
|
|
1120
1124
|
*/
|
|
1121
|
-
module.exports.
|
|
1125
|
+
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", });
|
|
1122
1126
|
/**
|
|
1123
1127
|
*/
|
|
1124
|
-
module.exports.
|
|
1128
|
+
module.exports.CborContainerType = Object.freeze({ Array:0,"0":"Array",Map:1,"1":"Map", });
|
|
1125
1129
|
/**
|
|
1126
1130
|
*/
|
|
1127
|
-
module.exports.
|
|
1131
|
+
module.exports.MIRPot = Object.freeze({ Reserves:0,"0":"Reserves",Treasury:1,"1":"Treasury", });
|
|
1128
1132
|
/**
|
|
1129
|
-
* Used to choosed the schema for a script JSON string
|
|
1130
1133
|
*/
|
|
1131
|
-
module.exports.
|
|
1134
|
+
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", });
|
|
1132
1135
|
/**
|
|
1133
1136
|
*/
|
|
1134
|
-
module.exports.
|
|
1135
|
-
/**
|
|
1136
|
-
* Each new language uses a different namespace for hashing its script
|
|
1137
|
-
* This is because you could have a language where the same bytes have different semantics
|
|
1138
|
-
* So this avoids scripts in different languages mapping to the same hash
|
|
1139
|
-
* Note that the enum value here is different than the enum value for deciding the cost model of a script
|
|
1140
|
-
*/
|
|
1141
|
-
module.exports.ScriptHashNamespace = Object.freeze({ NativeScript:0,"0":"NativeScript",PlutusScript:1,"1":"PlutusScript",PlutusScriptV2:2,"2":"PlutusScriptV2",PlutusScriptV3:3,"3":"PlutusScriptV3", });
|
|
1137
|
+
module.exports.VoteKind = Object.freeze({ No:0,"0":"No",Yes:1,"1":"Yes",Abstain:2,"2":"Abstain", });
|
|
1142
1138
|
/**
|
|
1143
1139
|
*/
|
|
1144
|
-
module.exports.
|
|
1140
|
+
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", });
|
|
1145
1141
|
/**
|
|
1146
1142
|
* JSON <-> PlutusData conversion schemas.
|
|
1147
1143
|
* Follows ScriptDataJsonSchema in cardano-cli defined at:
|
|
@@ -1195,37 +1191,73 @@ BasicConversions:0,"0":"BasicConversions",
|
|
|
1195
1191
|
DetailedSchema:1,"1":"DetailedSchema", });
|
|
1196
1192
|
/**
|
|
1197
1193
|
*/
|
|
1198
|
-
module.exports.
|
|
1194
|
+
module.exports.MIRKind = Object.freeze({ ToOtherPot:0,"0":"ToOtherPot",ToStakeCredentials:1,"1":"ToStakeCredentials", });
|
|
1195
|
+
/**
|
|
1196
|
+
*/
|
|
1197
|
+
module.exports.RelayKind = Object.freeze({ SingleHostAddr:0,"0":"SingleHostAddr",SingleHostName:1,"1":"SingleHostName",MultiHostName:2,"2":"MultiHostName", });
|
|
1198
|
+
/**
|
|
1199
|
+
*/
|
|
1200
|
+
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", });
|
|
1199
1201
|
/**
|
|
1200
1202
|
*/
|
|
1201
1203
|
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", });
|
|
1202
1204
|
/**
|
|
1203
1205
|
*/
|
|
1206
|
+
module.exports.CborSetType = Object.freeze({ Tagged:0,"0":"Tagged",Untagged:1,"1":"Untagged", });
|
|
1207
|
+
/**
|
|
1208
|
+
*/
|
|
1204
1209
|
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", });
|
|
1205
1210
|
/**
|
|
1206
1211
|
*/
|
|
1207
|
-
module.exports.
|
|
1212
|
+
module.exports.MetadataJsonSchema = Object.freeze({ NoConversions:0,"0":"NoConversions",BasicConversions:1,"1":"BasicConversions",DetailedSchema:2,"2":"DetailedSchema", });
|
|
1208
1213
|
/**
|
|
1209
1214
|
*/
|
|
1210
|
-
module.exports.
|
|
1215
|
+
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", });
|
|
1211
1216
|
/**
|
|
1212
1217
|
*/
|
|
1213
|
-
module.exports.
|
|
1218
|
+
module.exports.CredKind = Object.freeze({ Key:0,"0":"Key",Script:1,"1":"Script", });
|
|
1214
1219
|
/**
|
|
1220
|
+
* Each new language uses a different namespace for hashing its script
|
|
1221
|
+
* This is because you could have a language where the same bytes have different semantics
|
|
1222
|
+
* So this avoids scripts in different languages mapping to the same hash
|
|
1223
|
+
* Note that the enum value here is different than the enum value for deciding the cost model of a script
|
|
1215
1224
|
*/
|
|
1216
|
-
module.exports.
|
|
1225
|
+
module.exports.ScriptHashNamespace = Object.freeze({ NativeScript:0,"0":"NativeScript",PlutusScript:1,"1":"PlutusScript",PlutusScriptV2:2,"2":"PlutusScriptV2",PlutusScriptV3:3,"3":"PlutusScriptV3", });
|
|
1217
1226
|
/**
|
|
1218
1227
|
*/
|
|
1219
|
-
module.exports.
|
|
1228
|
+
module.exports.NetworkIdKind = Object.freeze({ Testnet:0,"0":"Testnet",Mainnet:1,"1":"Mainnet", });
|
|
1220
1229
|
/**
|
|
1221
1230
|
*/
|
|
1222
1231
|
module.exports.DRepKind = Object.freeze({ KeyHash:0,"0":"KeyHash",ScriptHash:1,"1":"ScriptHash",AlwaysAbstain:2,"2":"AlwaysAbstain",AlwaysNoConfidence:3,"3":"AlwaysNoConfidence", });
|
|
1223
1232
|
/**
|
|
1224
1233
|
*/
|
|
1225
|
-
module.exports.
|
|
1234
|
+
module.exports.LanguageKind = Object.freeze({ PlutusV1:0,"0":"PlutusV1",PlutusV2:1,"1":"PlutusV2",PlutusV3:2,"2":"PlutusV3", });
|
|
1226
1235
|
/**
|
|
1236
|
+
* Used to choosed the schema for a script JSON string
|
|
1227
1237
|
*/
|
|
1228
|
-
module.exports.
|
|
1238
|
+
module.exports.ScriptSchema = Object.freeze({ Wallet:0,"0":"Wallet",Node:1,"1":"Node", });
|
|
1239
|
+
/**
|
|
1240
|
+
*/
|
|
1241
|
+
module.exports.TransactionSetsState = Object.freeze({ AllSetsHaveTag:0,"0":"AllSetsHaveTag",AllSetsHaveNoTag:1,"1":"AllSetsHaveNoTag",MixedSets:2,"2":"MixedSets", });
|
|
1242
|
+
/**
|
|
1243
|
+
*/
|
|
1244
|
+
module.exports.CoinSelectionStrategyCIP2 = Object.freeze({
|
|
1245
|
+
/**
|
|
1246
|
+
* Performs CIP2's Largest First ada-only selection. Will error if outputs contain non-ADA assets.
|
|
1247
|
+
*/
|
|
1248
|
+
LargestFirst:0,"0":"LargestFirst",
|
|
1249
|
+
/**
|
|
1250
|
+
* Performs CIP2's Random Improve ada-only selection. Will error if outputs contain non-ADA assets.
|
|
1251
|
+
*/
|
|
1252
|
+
RandomImprove:1,"1":"RandomImprove",
|
|
1253
|
+
/**
|
|
1254
|
+
* Same as LargestFirst, but before adding ADA, will insert by largest-first for each asset type.
|
|
1255
|
+
*/
|
|
1256
|
+
LargestFirstMultiAsset:2,"2":"LargestFirstMultiAsset",
|
|
1257
|
+
/**
|
|
1258
|
+
* Same as RandomImprove, but before adding ADA, will insert by random-improve for each asset type.
|
|
1259
|
+
*/
|
|
1260
|
+
RandomImproveMultiAsset:3,"3":"RandomImproveMultiAsset", });
|
|
1229
1261
|
|
|
1230
1262
|
const AddressFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1231
1263
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -39261,6 +39293,11 @@ module.exports.__wbindgen_string_new = function(arg0, arg1) {
|
|
|
39261
39293
|
return addHeapObject(ret);
|
|
39262
39294
|
};
|
|
39263
39295
|
|
|
39296
|
+
module.exports.__wbindgen_error_new = function(arg0, arg1) {
|
|
39297
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
39298
|
+
return addHeapObject(ret);
|
|
39299
|
+
};
|
|
39300
|
+
|
|
39264
39301
|
module.exports.__wbindgen_is_undefined = function(arg0) {
|
|
39265
39302
|
const ret = getObject(arg0) === undefined;
|
|
39266
39303
|
return ret;
|
|
@@ -39306,11 +39343,6 @@ module.exports.__wbindgen_is_object = function(arg0) {
|
|
|
39306
39343
|
return ret;
|
|
39307
39344
|
};
|
|
39308
39345
|
|
|
39309
|
-
module.exports.__wbindgen_error_new = function(arg0, arg1) {
|
|
39310
|
-
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
39311
|
-
return addHeapObject(ret);
|
|
39312
|
-
};
|
|
39313
|
-
|
|
39314
39346
|
module.exports.__wbindgen_object_clone_ref = function(arg0) {
|
|
39315
39347
|
const ret = getObject(arg0);
|
|
39316
39348
|
return addHeapObject(ret);
|
|
Binary file
|
|
@@ -4,7 +4,6 @@ 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 check_block_or_tx_signatures(a: number, b: number, c: number): void;
|
|
8
7
|
export function get_necessary_data_list_js(a: number, b: number, c: number): void;
|
|
9
8
|
export function validate_transaction_js(a: number, b: number, c: number, d: number, e: number): void;
|
|
10
9
|
export function decode_plutus_program_uplc_json(a: number, b: number, c: number): void;
|
|
@@ -12,6 +11,8 @@ export function decode_plutus_program_pretty_uplc(a: number, b: number, c: numbe
|
|
|
12
11
|
export function get_utxo_list_from_tx(a: number, b: number, c: number): void;
|
|
13
12
|
export function execute_tx_scripts(a: number, b: number, c: number, d: number, e: number): void;
|
|
14
13
|
export function cbor_to_json(a: number, b: number, c: number): void;
|
|
14
|
+
export function get_ref_script_bytes(a: number, b: number, c: number, d: number): void;
|
|
15
|
+
export function check_block_or_tx_signatures(a: number, b: number, c: number): void;
|
|
15
16
|
export function __wbg_noconfidenceaction_free(a: number): void;
|
|
16
17
|
export function noconfidenceaction_to_bytes(a: number, b: number): void;
|
|
17
18
|
export function noconfidenceaction_from_bytes(a: number, b: number, c: number): void;
|
package/package.json
CHANGED