@cardananium/cquisitor-lib 0.1.0-beta.27 → 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 +102 -70
- 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 +100 -68
- package/node/cquisitor_lib_bg.wasm +0 -0
- package/node/cquisitor_lib_bg.wasm.d.ts +2 -1
- package/package.json +1 -1
|
@@ -289,28 +289,6 @@ export function get_possible_types_for_input(input) {
|
|
|
289
289
|
}
|
|
290
290
|
}
|
|
291
291
|
|
|
292
|
-
/**
|
|
293
|
-
* @param {string} hex_str
|
|
294
|
-
* @returns {any}
|
|
295
|
-
*/
|
|
296
|
-
export function check_block_or_tx_signatures(hex_str) {
|
|
297
|
-
try {
|
|
298
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
299
|
-
const ptr0 = passStringToWasm0(hex_str, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
300
|
-
const len0 = WASM_VECTOR_LEN;
|
|
301
|
-
wasm.check_block_or_tx_signatures(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
292
|
/**
|
|
315
293
|
* @param {string} tx_hex
|
|
316
294
|
* @returns {string}
|
|
@@ -500,6 +478,60 @@ export function cbor_to_json(cbor_hex) {
|
|
|
500
478
|
}
|
|
501
479
|
}
|
|
502
480
|
|
|
481
|
+
/**
|
|
482
|
+
* @param {string} tx_hex
|
|
483
|
+
* @param {number} output_index
|
|
484
|
+
* @returns {string}
|
|
485
|
+
*/
|
|
486
|
+
export function get_ref_script_bytes(tx_hex, output_index) {
|
|
487
|
+
let deferred3_0;
|
|
488
|
+
let deferred3_1;
|
|
489
|
+
try {
|
|
490
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
491
|
+
const ptr0 = passStringToWasm0(tx_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
492
|
+
const len0 = WASM_VECTOR_LEN;
|
|
493
|
+
wasm.get_ref_script_bytes(retptr, ptr0, len0, output_index);
|
|
494
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
495
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
496
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
497
|
+
var r3 = getInt32Memory0()[retptr / 4 + 3];
|
|
498
|
+
var ptr2 = r0;
|
|
499
|
+
var len2 = r1;
|
|
500
|
+
if (r3) {
|
|
501
|
+
ptr2 = 0; len2 = 0;
|
|
502
|
+
throw takeObject(r2);
|
|
503
|
+
}
|
|
504
|
+
deferred3_0 = ptr2;
|
|
505
|
+
deferred3_1 = len2;
|
|
506
|
+
return getStringFromWasm0(ptr2, len2);
|
|
507
|
+
} finally {
|
|
508
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
509
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
510
|
+
}
|
|
511
|
+
}
|
|
512
|
+
|
|
513
|
+
/**
|
|
514
|
+
* @param {string} hex_str
|
|
515
|
+
* @returns {any}
|
|
516
|
+
*/
|
|
517
|
+
export function check_block_or_tx_signatures(hex_str) {
|
|
518
|
+
try {
|
|
519
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
520
|
+
const ptr0 = passStringToWasm0(hex_str, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
521
|
+
const len0 = WASM_VECTOR_LEN;
|
|
522
|
+
wasm.check_block_or_tx_signatures(retptr, ptr0, len0);
|
|
523
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
524
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
525
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
526
|
+
if (r2) {
|
|
527
|
+
throw takeObject(r1);
|
|
528
|
+
}
|
|
529
|
+
return takeObject(r0);
|
|
530
|
+
} finally {
|
|
531
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
532
|
+
}
|
|
533
|
+
}
|
|
534
|
+
|
|
503
535
|
function getArrayU8FromWasm0(ptr, len) {
|
|
504
536
|
ptr = ptr >>> 0;
|
|
505
537
|
return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
|
|
@@ -1086,27 +1118,39 @@ function handleError(f, args) {
|
|
|
1086
1118
|
}
|
|
1087
1119
|
/**
|
|
1088
1120
|
*/
|
|
1089
|
-
export const
|
|
1121
|
+
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
1122
|
/**
|
|
1091
1123
|
*/
|
|
1092
|
-
export const
|
|
1124
|
+
export const CoinSelectionStrategyCIP2 = Object.freeze({
|
|
1093
1125
|
/**
|
|
1126
|
+
* Performs CIP2's Largest First ada-only selection. Will error if outputs contain non-ADA assets.
|
|
1094
1127
|
*/
|
|
1095
|
-
|
|
1128
|
+
LargestFirst:0,"0":"LargestFirst",
|
|
1096
1129
|
/**
|
|
1130
|
+
* Performs CIP2's Random Improve ada-only selection. Will error if outputs contain non-ADA assets.
|
|
1097
1131
|
*/
|
|
1098
|
-
|
|
1132
|
+
RandomImprove:1,"1":"RandomImprove",
|
|
1099
1133
|
/**
|
|
1100
|
-
*
|
|
1101
|
-
* This is because you could have a language where the same bytes have different semantics
|
|
1102
|
-
* So this avoids scripts in different languages mapping to the same hash
|
|
1103
|
-
* Note that the enum value here is different than the enum value for deciding the cost model of a script
|
|
1134
|
+
* Same as LargestFirst, but before adding ADA, will insert by largest-first for each asset type.
|
|
1104
1135
|
*/
|
|
1105
|
-
|
|
1136
|
+
LargestFirstMultiAsset:2,"2":"LargestFirstMultiAsset",
|
|
1137
|
+
/**
|
|
1138
|
+
* Same as RandomImprove, but before adding ADA, will insert by random-improve for each asset type.
|
|
1139
|
+
*/
|
|
1140
|
+
RandomImproveMultiAsset:3,"3":"RandomImproveMultiAsset", });
|
|
1141
|
+
/**
|
|
1142
|
+
*/
|
|
1143
|
+
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", });
|
|
1106
1144
|
/**
|
|
1107
1145
|
*/
|
|
1108
1146
|
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", });
|
|
1109
1147
|
/**
|
|
1148
|
+
*/
|
|
1149
|
+
export const NetworkIdKind = Object.freeze({ Testnet:0,"0":"Testnet",Mainnet:1,"1":"Mainnet", });
|
|
1150
|
+
/**
|
|
1151
|
+
*/
|
|
1152
|
+
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", });
|
|
1153
|
+
/**
|
|
1110
1154
|
* JSON <-> PlutusData conversion schemas.
|
|
1111
1155
|
* Follows ScriptDataJsonSchema in cardano-cli defined at:
|
|
1112
1156
|
* https://github.com/input-output-hk/cardano-node/blob/master/cardano-api/src/Cardano/Api/ScriptData.hs#L254
|
|
@@ -1159,78 +1203,66 @@ BasicConversions:0,"0":"BasicConversions",
|
|
|
1159
1203
|
DetailedSchema:1,"1":"DetailedSchema", });
|
|
1160
1204
|
/**
|
|
1161
1205
|
*/
|
|
1162
|
-
export const
|
|
1163
|
-
/**
|
|
1164
|
-
*/
|
|
1165
|
-
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", });
|
|
1166
|
-
/**
|
|
1167
|
-
*/
|
|
1168
|
-
export const ByronAddressType = Object.freeze({ ATPubKey:0,"0":"ATPubKey",ATScript:1,"1":"ATScript",ATRedeem:2,"2":"ATRedeem", });
|
|
1169
|
-
/**
|
|
1170
|
-
*/
|
|
1171
|
-
export const RelayKind = Object.freeze({ SingleHostAddr:0,"0":"SingleHostAddr",SingleHostName:1,"1":"SingleHostName",MultiHostName:2,"2":"MultiHostName", });
|
|
1206
|
+
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", });
|
|
1172
1207
|
/**
|
|
1173
1208
|
*/
|
|
1174
1209
|
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", });
|
|
1175
1210
|
/**
|
|
1176
1211
|
*/
|
|
1177
|
-
export const
|
|
1212
|
+
export const MIRKind = Object.freeze({ ToOtherPot:0,"0":"ToOtherPot",ToStakeCredentials:1,"1":"ToStakeCredentials", });
|
|
1178
1213
|
/**
|
|
1179
1214
|
*/
|
|
1180
|
-
export const
|
|
1215
|
+
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", });
|
|
1181
1216
|
/**
|
|
1182
1217
|
*/
|
|
1183
|
-
export const
|
|
1218
|
+
export const LanguageKind = Object.freeze({ PlutusV1:0,"0":"PlutusV1",PlutusV2:1,"1":"PlutusV2",PlutusV3:2,"2":"PlutusV3", });
|
|
1184
1219
|
/**
|
|
1220
|
+
* Used to choosed the schema for a script JSON string
|
|
1185
1221
|
*/
|
|
1186
|
-
export const
|
|
1222
|
+
export const ScriptSchema = Object.freeze({ Wallet:0,"0":"Wallet",Node:1,"1":"Node", });
|
|
1187
1223
|
/**
|
|
1188
1224
|
*/
|
|
1189
|
-
export const
|
|
1225
|
+
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", });
|
|
1190
1226
|
/**
|
|
1191
1227
|
*/
|
|
1192
1228
|
export const VoteKind = Object.freeze({ No:0,"0":"No",Yes:1,"1":"Yes",Abstain:2,"2":"Abstain", });
|
|
1193
1229
|
/**
|
|
1194
|
-
* Used to choosed the schema for a script JSON string
|
|
1195
|
-
*/
|
|
1196
|
-
export const ScriptSchema = Object.freeze({ Wallet:0,"0":"Wallet",Node:1,"1":"Node", });
|
|
1197
|
-
/**
|
|
1198
1230
|
*/
|
|
1199
|
-
export const
|
|
1231
|
+
export const ByronAddressType = Object.freeze({ ATPubKey:0,"0":"ATPubKey",ATScript:1,"1":"ATScript",ATRedeem:2,"2":"ATRedeem", });
|
|
1200
1232
|
/**
|
|
1201
1233
|
*/
|
|
1202
|
-
export const
|
|
1234
|
+
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", });
|
|
1203
1235
|
/**
|
|
1204
|
-
* Performs CIP2's Largest First ada-only selection. Will error if outputs contain non-ADA assets.
|
|
1205
1236
|
*/
|
|
1206
|
-
|
|
1237
|
+
export const CredKind = Object.freeze({ Key:0,"0":"Key",Script:1,"1":"Script", });
|
|
1207
1238
|
/**
|
|
1208
|
-
* Performs CIP2's Random Improve ada-only selection. Will error if outputs contain non-ADA assets.
|
|
1209
1239
|
*/
|
|
1210
|
-
|
|
1240
|
+
export const CborSetType = Object.freeze({ Tagged:0,"0":"Tagged",Untagged:1,"1":"Untagged", });
|
|
1211
1241
|
/**
|
|
1212
|
-
* Same as LargestFirst, but before adding ADA, will insert by largest-first for each asset type.
|
|
1213
1242
|
*/
|
|
1214
|
-
|
|
1243
|
+
export const CborContainerType = Object.freeze({ Array:0,"0":"Array",Map:1,"1":"Map", });
|
|
1215
1244
|
/**
|
|
1216
|
-
* Same as RandomImprove, but before adding ADA, will insert by random-improve for each asset type.
|
|
1217
1245
|
*/
|
|
1218
|
-
|
|
1246
|
+
export const RelayKind = Object.freeze({ SingleHostAddr:0,"0":"SingleHostAddr",SingleHostName:1,"1":"SingleHostName",MultiHostName:2,"2":"MultiHostName", });
|
|
1219
1247
|
/**
|
|
1220
1248
|
*/
|
|
1221
|
-
export const
|
|
1249
|
+
export const MIRPot = Object.freeze({ Reserves:0,"0":"Reserves",Treasury:1,"1":"Treasury", });
|
|
1222
1250
|
/**
|
|
1223
1251
|
*/
|
|
1224
|
-
export const
|
|
1252
|
+
export const DRepKind = Object.freeze({ KeyHash:0,"0":"KeyHash",ScriptHash:1,"1":"ScriptHash",AlwaysAbstain:2,"2":"AlwaysAbstain",AlwaysNoConfidence:3,"3":"AlwaysNoConfidence", });
|
|
1225
1253
|
/**
|
|
1254
|
+
* Each new language uses a different namespace for hashing its script
|
|
1255
|
+
* This is because you could have a language where the same bytes have different semantics
|
|
1256
|
+
* So this avoids scripts in different languages mapping to the same hash
|
|
1257
|
+
* Note that the enum value here is different than the enum value for deciding the cost model of a script
|
|
1226
1258
|
*/
|
|
1227
|
-
export const
|
|
1259
|
+
export const ScriptHashNamespace = Object.freeze({ NativeScript:0,"0":"NativeScript",PlutusScript:1,"1":"PlutusScript",PlutusScriptV2:2,"2":"PlutusScriptV2",PlutusScriptV3:3,"3":"PlutusScriptV3", });
|
|
1228
1260
|
/**
|
|
1229
1261
|
*/
|
|
1230
|
-
export const
|
|
1262
|
+
export const TransactionSetsState = Object.freeze({ AllSetsHaveTag:0,"0":"AllSetsHaveTag",AllSetsHaveNoTag:1,"1":"AllSetsHaveNoTag",MixedSets:2,"2":"MixedSets", });
|
|
1231
1263
|
/**
|
|
1232
1264
|
*/
|
|
1233
|
-
export const
|
|
1265
|
+
export const MetadataJsonSchema = Object.freeze({ NoConversions:0,"0":"NoConversions",BasicConversions:1,"1":"BasicConversions",DetailedSchema:2,"2":"DetailedSchema", });
|
|
1234
1266
|
|
|
1235
1267
|
const AddressFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1236
1268
|
? { register: () => {}, unregister: () => {} }
|
|
@@ -39069,6 +39101,11 @@ export function __wbindgen_string_new(arg0, arg1) {
|
|
|
39069
39101
|
return addHeapObject(ret);
|
|
39070
39102
|
};
|
|
39071
39103
|
|
|
39104
|
+
export function __wbindgen_error_new(arg0, arg1) {
|
|
39105
|
+
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
39106
|
+
return addHeapObject(ret);
|
|
39107
|
+
};
|
|
39108
|
+
|
|
39072
39109
|
export function __wbindgen_is_undefined(arg0) {
|
|
39073
39110
|
const ret = getObject(arg0) === undefined;
|
|
39074
39111
|
return ret;
|
|
@@ -39114,11 +39151,6 @@ export function __wbindgen_is_object(arg0) {
|
|
|
39114
39151
|
return ret;
|
|
39115
39152
|
};
|
|
39116
39153
|
|
|
39117
|
-
export function __wbindgen_error_new(arg0, arg1) {
|
|
39118
|
-
const ret = new Error(getStringFromWasm0(arg0, arg1));
|
|
39119
|
-
return addHeapObject(ret);
|
|
39120
|
-
};
|
|
39121
|
-
|
|
39122
39154
|
export function __wbindgen_object_clone_ref(arg0) {
|
|
39123
39155
|
const ret = getObject(arg0);
|
|
39124
39156
|
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;
|