@cardananium/cquisitor-lib 0.1.0-beta.31 → 0.1.0-beta.33
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.
|
@@ -311,6 +311,71 @@ export function check_block_or_tx_signatures(hex_str) {
|
|
|
311
311
|
}
|
|
312
312
|
}
|
|
313
313
|
|
|
314
|
+
/**
|
|
315
|
+
* @param {string} tx_hex
|
|
316
|
+
* @returns {string}
|
|
317
|
+
*/
|
|
318
|
+
export function get_necessary_data_list_js(tx_hex) {
|
|
319
|
+
let deferred3_0;
|
|
320
|
+
let deferred3_1;
|
|
321
|
+
try {
|
|
322
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
323
|
+
const ptr0 = passStringToWasm0(tx_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
324
|
+
const len0 = WASM_VECTOR_LEN;
|
|
325
|
+
wasm.get_necessary_data_list_js(retptr, ptr0, len0);
|
|
326
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
327
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
328
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
329
|
+
var r3 = getInt32Memory0()[retptr / 4 + 3];
|
|
330
|
+
var ptr2 = r0;
|
|
331
|
+
var len2 = r1;
|
|
332
|
+
if (r3) {
|
|
333
|
+
ptr2 = 0; len2 = 0;
|
|
334
|
+
throw takeObject(r2);
|
|
335
|
+
}
|
|
336
|
+
deferred3_0 = ptr2;
|
|
337
|
+
deferred3_1 = len2;
|
|
338
|
+
return getStringFromWasm0(ptr2, len2);
|
|
339
|
+
} finally {
|
|
340
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
341
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
342
|
+
}
|
|
343
|
+
}
|
|
344
|
+
|
|
345
|
+
/**
|
|
346
|
+
* @param {string} tx_hex
|
|
347
|
+
* @param {string} validation_context
|
|
348
|
+
* @returns {string}
|
|
349
|
+
*/
|
|
350
|
+
export function validate_transaction_js(tx_hex, validation_context) {
|
|
351
|
+
let deferred4_0;
|
|
352
|
+
let deferred4_1;
|
|
353
|
+
try {
|
|
354
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
355
|
+
const ptr0 = passStringToWasm0(tx_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
356
|
+
const len0 = WASM_VECTOR_LEN;
|
|
357
|
+
const ptr1 = passStringToWasm0(validation_context, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
358
|
+
const len1 = WASM_VECTOR_LEN;
|
|
359
|
+
wasm.validate_transaction_js(retptr, ptr0, len0, ptr1, len1);
|
|
360
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
361
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
362
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
363
|
+
var r3 = getInt32Memory0()[retptr / 4 + 3];
|
|
364
|
+
var ptr3 = r0;
|
|
365
|
+
var len3 = r1;
|
|
366
|
+
if (r3) {
|
|
367
|
+
ptr3 = 0; len3 = 0;
|
|
368
|
+
throw takeObject(r2);
|
|
369
|
+
}
|
|
370
|
+
deferred4_0 = ptr3;
|
|
371
|
+
deferred4_1 = len3;
|
|
372
|
+
return getStringFromWasm0(ptr3, len3);
|
|
373
|
+
} finally {
|
|
374
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
375
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
376
|
+
}
|
|
377
|
+
}
|
|
378
|
+
|
|
314
379
|
/**
|
|
315
380
|
* @param {string} hex
|
|
316
381
|
* @returns {any}
|
|
@@ -467,71 +532,6 @@ export function get_ref_script_bytes(tx_hex, output_index) {
|
|
|
467
532
|
}
|
|
468
533
|
}
|
|
469
534
|
|
|
470
|
-
/**
|
|
471
|
-
* @param {string} tx_hex
|
|
472
|
-
* @returns {string}
|
|
473
|
-
*/
|
|
474
|
-
export function get_necessary_data_list_js(tx_hex) {
|
|
475
|
-
let deferred3_0;
|
|
476
|
-
let deferred3_1;
|
|
477
|
-
try {
|
|
478
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
479
|
-
const ptr0 = passStringToWasm0(tx_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
480
|
-
const len0 = WASM_VECTOR_LEN;
|
|
481
|
-
wasm.get_necessary_data_list_js(retptr, ptr0, len0);
|
|
482
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
483
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
484
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
485
|
-
var r3 = getInt32Memory0()[retptr / 4 + 3];
|
|
486
|
-
var ptr2 = r0;
|
|
487
|
-
var len2 = r1;
|
|
488
|
-
if (r3) {
|
|
489
|
-
ptr2 = 0; len2 = 0;
|
|
490
|
-
throw takeObject(r2);
|
|
491
|
-
}
|
|
492
|
-
deferred3_0 = ptr2;
|
|
493
|
-
deferred3_1 = len2;
|
|
494
|
-
return getStringFromWasm0(ptr2, len2);
|
|
495
|
-
} finally {
|
|
496
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
497
|
-
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
498
|
-
}
|
|
499
|
-
}
|
|
500
|
-
|
|
501
|
-
/**
|
|
502
|
-
* @param {string} tx_hex
|
|
503
|
-
* @param {string} validation_context
|
|
504
|
-
* @returns {string}
|
|
505
|
-
*/
|
|
506
|
-
export function validate_transaction_js(tx_hex, validation_context) {
|
|
507
|
-
let deferred4_0;
|
|
508
|
-
let deferred4_1;
|
|
509
|
-
try {
|
|
510
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
511
|
-
const ptr0 = passStringToWasm0(tx_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
512
|
-
const len0 = WASM_VECTOR_LEN;
|
|
513
|
-
const ptr1 = passStringToWasm0(validation_context, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
514
|
-
const len1 = WASM_VECTOR_LEN;
|
|
515
|
-
wasm.validate_transaction_js(retptr, ptr0, len0, ptr1, len1);
|
|
516
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
517
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
518
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
519
|
-
var r3 = getInt32Memory0()[retptr / 4 + 3];
|
|
520
|
-
var ptr3 = r0;
|
|
521
|
-
var len3 = r1;
|
|
522
|
-
if (r3) {
|
|
523
|
-
ptr3 = 0; len3 = 0;
|
|
524
|
-
throw takeObject(r2);
|
|
525
|
-
}
|
|
526
|
-
deferred4_0 = ptr3;
|
|
527
|
-
deferred4_1 = len3;
|
|
528
|
-
return getStringFromWasm0(ptr3, len3);
|
|
529
|
-
} finally {
|
|
530
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
531
|
-
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
532
|
-
}
|
|
533
|
-
}
|
|
534
|
-
|
|
535
535
|
function getArrayU8FromWasm0(ptr, len) {
|
|
536
536
|
ptr = ptr >>> 0;
|
|
537
537
|
return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
|
|
@@ -1118,151 +1118,151 @@ function handleError(f, args) {
|
|
|
1118
1118
|
}
|
|
1119
1119
|
/**
|
|
1120
1120
|
*/
|
|
1121
|
-
export const
|
|
1121
|
+
export const CoinSelectionStrategyCIP2 = Object.freeze({
|
|
1122
1122
|
/**
|
|
1123
|
+
* Performs CIP2's Largest First ada-only selection. Will error if outputs contain non-ADA assets.
|
|
1123
1124
|
*/
|
|
1124
|
-
|
|
1125
|
+
LargestFirst:0,"0":"LargestFirst",
|
|
1125
1126
|
/**
|
|
1127
|
+
* Performs CIP2's Random Improve ada-only selection. Will error if outputs contain non-ADA assets.
|
|
1126
1128
|
*/
|
|
1127
|
-
|
|
1129
|
+
RandomImprove:1,"1":"RandomImprove",
|
|
1128
1130
|
/**
|
|
1129
|
-
*
|
|
1130
|
-
* Follows ScriptDataJsonSchema in cardano-cli defined at:
|
|
1131
|
-
* https://github.com/input-output-hk/cardano-node/blob/master/cardano-api/src/Cardano/Api/ScriptData.hs#L254
|
|
1132
|
-
*
|
|
1133
|
-
* All methods here have the following restrictions due to limitations on dependencies:
|
|
1134
|
-
* * JSON numbers above u64::MAX (positive) or below i64::MIN (negative) will throw errors
|
|
1135
|
-
* * Hex strings for bytes don't accept odd-length (half-byte) strings.
|
|
1136
|
-
* cardano-cli seems to support these however but it seems to be different than just 0-padding
|
|
1137
|
-
* on either side when tested so proceed with caution
|
|
1131
|
+
* Same as LargestFirst, but before adding ADA, will insert by largest-first for each asset type.
|
|
1138
1132
|
*/
|
|
1139
|
-
|
|
1133
|
+
LargestFirstMultiAsset:2,"2":"LargestFirstMultiAsset",
|
|
1140
1134
|
/**
|
|
1141
|
-
*
|
|
1142
|
-
*
|
|
1143
|
-
* This is the format used by --script-data-value in cardano-cli
|
|
1144
|
-
* This tries to accept most JSON but does not support the full spectrum of Plutus datums.
|
|
1145
|
-
* From JSON:
|
|
1146
|
-
* * null/true/false/floats NOT supported
|
|
1147
|
-
* * strings starting with 0x are treated as hex bytes. All other strings are encoded as their utf8 bytes.
|
|
1148
|
-
* To JSON:
|
|
1149
|
-
* * ConstrPlutusData not supported in ANY FORM (neither keys nor values)
|
|
1150
|
-
* * Lists not supported in keys
|
|
1151
|
-
* * Maps not supported in keys
|
|
1135
|
+
* Same as RandomImprove, but before adding ADA, will insert by random-improve for each asset type.
|
|
1152
1136
|
*/
|
|
1153
|
-
|
|
1137
|
+
RandomImproveMultiAsset:3,"3":"RandomImproveMultiAsset", });
|
|
1154
1138
|
/**
|
|
1155
|
-
* ScriptDataJsonDetailedSchema in cardano-node.
|
|
1156
|
-
*
|
|
1157
|
-
* This is the format used by --script-data-file in cardano-cli
|
|
1158
|
-
* This covers almost all (only minor exceptions) Plutus datums, but the JSON must conform to a strict schema.
|
|
1159
|
-
* The schema specifies that ALL keys and ALL values must be contained in a JSON map with 2 cases:
|
|
1160
|
-
* 1. For ConstrPlutusData there must be two fields "constructor" contianing a number and "fields" containing its fields
|
|
1161
|
-
* e.g. { "constructor": 2, "fields": [{"int": 2}, {"list": [{"bytes": "CAFEF00D"}]}]}
|
|
1162
|
-
* 2. For all other cases there must be only one field named "int", "bytes", "list" or "map"
|
|
1163
|
-
* Integer's value is a JSON number e.g. {"int": 100}
|
|
1164
|
-
* Bytes' value is a hex string representing the bytes WITHOUT any prefix e.g. {"bytes": "CAFEF00D"}
|
|
1165
|
-
* Lists' value is a JSON list of its elements encoded via the same schema e.g. {"list": [{"bytes": "CAFEF00D"}]}
|
|
1166
|
-
* Maps' value is a JSON list of objects, one for each key-value pair in the map, with keys "k" and "v"
|
|
1167
|
-
* respectively with their values being the plutus datum encoded via this same schema
|
|
1168
|
-
* e.g. {"map": [
|
|
1169
|
-
* {"k": {"int": 2}, "v": {"int": 5}},
|
|
1170
|
-
* {"k": {"map": [{"k": {"list": [{"int": 1}]}, "v": {"bytes": "FF03"}}]}, "v": {"list": []}}
|
|
1171
|
-
* ]}
|
|
1172
|
-
* From JSON:
|
|
1173
|
-
* * null/true/false/floats NOT supported
|
|
1174
|
-
* * the JSON must conform to a very specific schema
|
|
1175
|
-
* To JSON:
|
|
1176
|
-
* * all Plutus datums should be fully supported outside of the integer range limitations outlined above.
|
|
1177
1139
|
*/
|
|
1178
|
-
|
|
1140
|
+
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", });
|
|
1179
1141
|
/**
|
|
1180
1142
|
*/
|
|
1181
1143
|
export const RelayKind = Object.freeze({ SingleHostAddr:0,"0":"SingleHostAddr",SingleHostName:1,"1":"SingleHostName",MultiHostName:2,"2":"MultiHostName", });
|
|
1182
1144
|
/**
|
|
1183
1145
|
*/
|
|
1184
|
-
export const
|
|
1146
|
+
export const CredKind = Object.freeze({ Key:0,"0":"Key",Script:1,"1":"Script", });
|
|
1185
1147
|
/**
|
|
1186
1148
|
*/
|
|
1187
|
-
export const
|
|
1149
|
+
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", });
|
|
1188
1150
|
/**
|
|
1151
|
+
* Each new language uses a different namespace for hashing its script
|
|
1152
|
+
* This is because you could have a language where the same bytes have different semantics
|
|
1153
|
+
* So this avoids scripts in different languages mapping to the same hash
|
|
1154
|
+
* Note that the enum value here is different than the enum value for deciding the cost model of a script
|
|
1189
1155
|
*/
|
|
1190
|
-
export const
|
|
1156
|
+
export const ScriptHashNamespace = Object.freeze({ NativeScript:0,"0":"NativeScript",PlutusScript:1,"1":"PlutusScript",PlutusScriptV2:2,"2":"PlutusScriptV2",PlutusScriptV3:3,"3":"PlutusScriptV3", });
|
|
1191
1157
|
/**
|
|
1192
1158
|
*/
|
|
1193
|
-
export const
|
|
1159
|
+
export const MIRKind = Object.freeze({ ToOtherPot:0,"0":"ToOtherPot",ToStakeCredentials:1,"1":"ToStakeCredentials", });
|
|
1194
1160
|
/**
|
|
1195
1161
|
*/
|
|
1196
|
-
export const
|
|
1162
|
+
export const DRepKind = Object.freeze({ KeyHash:0,"0":"KeyHash",ScriptHash:1,"1":"ScriptHash",AlwaysAbstain:2,"2":"AlwaysAbstain",AlwaysNoConfidence:3,"3":"AlwaysNoConfidence", });
|
|
1197
1163
|
/**
|
|
1198
1164
|
*/
|
|
1199
|
-
export const
|
|
1165
|
+
export const NetworkIdKind = Object.freeze({ Testnet:0,"0":"Testnet",Mainnet:1,"1":"Mainnet", });
|
|
1200
1166
|
/**
|
|
1201
1167
|
*/
|
|
1202
|
-
export const
|
|
1168
|
+
export const LanguageKind = Object.freeze({ PlutusV1:0,"0":"PlutusV1",PlutusV2:1,"1":"PlutusV2",PlutusV3:2,"2":"PlutusV3", });
|
|
1203
1169
|
/**
|
|
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
|
|
1208
1170
|
*/
|
|
1209
|
-
export const
|
|
1171
|
+
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", });
|
|
1210
1172
|
/**
|
|
1211
1173
|
*/
|
|
1212
|
-
export const
|
|
1174
|
+
export const CborContainerType = Object.freeze({ Array:0,"0":"Array",Map:1,"1":"Map", });
|
|
1213
1175
|
/**
|
|
1214
1176
|
*/
|
|
1215
|
-
export const
|
|
1177
|
+
export const CborSetType = Object.freeze({ Tagged:0,"0":"Tagged",Untagged:1,"1":"Untagged", });
|
|
1216
1178
|
/**
|
|
1217
|
-
* Used to choosed the schema for a script JSON string
|
|
1218
1179
|
*/
|
|
1219
|
-
export const
|
|
1180
|
+
export const MetadataJsonSchema = Object.freeze({ NoConversions:0,"0":"NoConversions",BasicConversions:1,"1":"BasicConversions",DetailedSchema:2,"2":"DetailedSchema", });
|
|
1220
1181
|
/**
|
|
1221
1182
|
*/
|
|
1222
|
-
export const
|
|
1183
|
+
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", });
|
|
1223
1184
|
/**
|
|
1224
1185
|
*/
|
|
1225
|
-
export const
|
|
1186
|
+
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", });
|
|
1226
1187
|
/**
|
|
1227
1188
|
*/
|
|
1228
|
-
export const
|
|
1189
|
+
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", });
|
|
1229
1190
|
/**
|
|
1230
1191
|
*/
|
|
1231
|
-
export const
|
|
1192
|
+
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", });
|
|
1232
1193
|
/**
|
|
1233
1194
|
*/
|
|
1234
|
-
export const
|
|
1195
|
+
export const ByronAddressType = Object.freeze({ ATPubKey:0,"0":"ATPubKey",ATScript:1,"1":"ATScript",ATRedeem:2,"2":"ATRedeem", });
|
|
1235
1196
|
/**
|
|
1236
1197
|
*/
|
|
1237
|
-
export const
|
|
1198
|
+
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", });
|
|
1238
1199
|
/**
|
|
1239
1200
|
*/
|
|
1240
|
-
export const
|
|
1201
|
+
export const MIRPot = Object.freeze({ Reserves:0,"0":"Reserves",Treasury:1,"1":"Treasury", });
|
|
1241
1202
|
/**
|
|
1242
1203
|
*/
|
|
1243
|
-
export const
|
|
1204
|
+
export const VoteKind = Object.freeze({ No:0,"0":"No",Yes:1,"1":"Yes",Abstain:2,"2":"Abstain", });
|
|
1244
1205
|
/**
|
|
1206
|
+
* Used to choosed the schema for a script JSON string
|
|
1245
1207
|
*/
|
|
1246
|
-
export const
|
|
1208
|
+
export const ScriptSchema = Object.freeze({ Wallet:0,"0":"Wallet",Node:1,"1":"Node", });
|
|
1247
1209
|
/**
|
|
1248
1210
|
*/
|
|
1249
|
-
export const
|
|
1211
|
+
export const TransactionSetsState = Object.freeze({ AllSetsHaveTag:0,"0":"AllSetsHaveTag",AllSetsHaveNoTag:1,"1":"AllSetsHaveNoTag",MixedSets:2,"2":"MixedSets", });
|
|
1250
1212
|
/**
|
|
1251
|
-
* Performs CIP2's Largest First ada-only selection. Will error if outputs contain non-ADA assets.
|
|
1252
1213
|
*/
|
|
1253
|
-
|
|
1214
|
+
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", });
|
|
1254
1215
|
/**
|
|
1255
|
-
*
|
|
1216
|
+
* JSON <-> PlutusData conversion schemas.
|
|
1217
|
+
* Follows ScriptDataJsonSchema in cardano-cli defined at:
|
|
1218
|
+
* https://github.com/input-output-hk/cardano-node/blob/master/cardano-api/src/Cardano/Api/ScriptData.hs#L254
|
|
1219
|
+
*
|
|
1220
|
+
* All methods here have the following restrictions due to limitations on dependencies:
|
|
1221
|
+
* * JSON numbers above u64::MAX (positive) or below i64::MIN (negative) will throw errors
|
|
1222
|
+
* * Hex strings for bytes don't accept odd-length (half-byte) strings.
|
|
1223
|
+
* cardano-cli seems to support these however but it seems to be different than just 0-padding
|
|
1224
|
+
* on either side when tested so proceed with caution
|
|
1256
1225
|
*/
|
|
1257
|
-
|
|
1226
|
+
export const PlutusDatumSchema = Object.freeze({
|
|
1258
1227
|
/**
|
|
1259
|
-
*
|
|
1228
|
+
* ScriptDataJsonNoSchema in cardano-node.
|
|
1229
|
+
*
|
|
1230
|
+
* This is the format used by --script-data-value in cardano-cli
|
|
1231
|
+
* This tries to accept most JSON but does not support the full spectrum of Plutus datums.
|
|
1232
|
+
* From JSON:
|
|
1233
|
+
* * null/true/false/floats NOT supported
|
|
1234
|
+
* * strings starting with 0x are treated as hex bytes. All other strings are encoded as their utf8 bytes.
|
|
1235
|
+
* To JSON:
|
|
1236
|
+
* * ConstrPlutusData not supported in ANY FORM (neither keys nor values)
|
|
1237
|
+
* * Lists not supported in keys
|
|
1238
|
+
* * Maps not supported in keys
|
|
1260
1239
|
*/
|
|
1261
|
-
|
|
1240
|
+
BasicConversions:0,"0":"BasicConversions",
|
|
1262
1241
|
/**
|
|
1263
|
-
*
|
|
1242
|
+
* ScriptDataJsonDetailedSchema in cardano-node.
|
|
1243
|
+
*
|
|
1244
|
+
* This is the format used by --script-data-file in cardano-cli
|
|
1245
|
+
* This covers almost all (only minor exceptions) Plutus datums, but the JSON must conform to a strict schema.
|
|
1246
|
+
* The schema specifies that ALL keys and ALL values must be contained in a JSON map with 2 cases:
|
|
1247
|
+
* 1. For ConstrPlutusData there must be two fields "constructor" contianing a number and "fields" containing its fields
|
|
1248
|
+
* e.g. { "constructor": 2, "fields": [{"int": 2}, {"list": [{"bytes": "CAFEF00D"}]}]}
|
|
1249
|
+
* 2. For all other cases there must be only one field named "int", "bytes", "list" or "map"
|
|
1250
|
+
* Integer's value is a JSON number e.g. {"int": 100}
|
|
1251
|
+
* Bytes' value is a hex string representing the bytes WITHOUT any prefix e.g. {"bytes": "CAFEF00D"}
|
|
1252
|
+
* Lists' value is a JSON list of its elements encoded via the same schema e.g. {"list": [{"bytes": "CAFEF00D"}]}
|
|
1253
|
+
* Maps' value is a JSON list of objects, one for each key-value pair in the map, with keys "k" and "v"
|
|
1254
|
+
* respectively with their values being the plutus datum encoded via this same schema
|
|
1255
|
+
* e.g. {"map": [
|
|
1256
|
+
* {"k": {"int": 2}, "v": {"int": 5}},
|
|
1257
|
+
* {"k": {"map": [{"k": {"list": [{"int": 1}]}, "v": {"bytes": "FF03"}}]}, "v": {"list": []}}
|
|
1258
|
+
* ]}
|
|
1259
|
+
* From JSON:
|
|
1260
|
+
* * null/true/false/floats NOT supported
|
|
1261
|
+
* * the JSON must conform to a very specific schema
|
|
1262
|
+
* To JSON:
|
|
1263
|
+
* * all Plutus datums should be fully supported outside of the integer range limitations outlined above.
|
|
1264
1264
|
*/
|
|
1265
|
-
|
|
1265
|
+
DetailedSchema:1,"1":"DetailedSchema", });
|
|
1266
1266
|
|
|
1267
1267
|
const AddressFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1268
1268
|
? { register: () => {}, unregister: () => {} }
|
|
Binary file
|
|
@@ -5,14 +5,14 @@ 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
7
|
export function check_block_or_tx_signatures(a: number, b: number, c: number): void;
|
|
8
|
+
export function get_necessary_data_list_js(a: number, b: number, c: number): void;
|
|
9
|
+
export function validate_transaction_js(a: number, b: number, c: number, d: number, e: number): void;
|
|
8
10
|
export function decode_plutus_program_uplc_json(a: number, b: number, c: number): void;
|
|
9
11
|
export function decode_plutus_program_pretty_uplc(a: number, b: number, c: number): void;
|
|
10
12
|
export function get_utxo_list_from_tx(a: number, b: number, c: number): void;
|
|
11
13
|
export function execute_tx_scripts(a: number, b: number, c: number, d: number, e: number): void;
|
|
12
14
|
export function cbor_to_json(a: number, b: number, c: number): void;
|
|
13
15
|
export function get_ref_script_bytes(a: number, b: number, c: number, d: number): void;
|
|
14
|
-
export function get_necessary_data_list_js(a: number, b: number, c: number): void;
|
|
15
|
-
export function validate_transaction_js(a: number, b: number, c: number, d: number, e: number): void;
|
|
16
16
|
export function __wbg_noconfidenceaction_free(a: number): void;
|
|
17
17
|
export function noconfidenceaction_to_bytes(a: number, b: number): void;
|
|
18
18
|
export function noconfidenceaction_from_bytes(a: number, b: number, c: number): void;
|
package/node/cquisitor_lib.js
CHANGED
|
@@ -306,6 +306,71 @@ module.exports.check_block_or_tx_signatures = function(hex_str) {
|
|
|
306
306
|
}
|
|
307
307
|
};
|
|
308
308
|
|
|
309
|
+
/**
|
|
310
|
+
* @param {string} tx_hex
|
|
311
|
+
* @returns {string}
|
|
312
|
+
*/
|
|
313
|
+
module.exports.get_necessary_data_list_js = function(tx_hex) {
|
|
314
|
+
let deferred3_0;
|
|
315
|
+
let deferred3_1;
|
|
316
|
+
try {
|
|
317
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
318
|
+
const ptr0 = passStringToWasm0(tx_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
319
|
+
const len0 = WASM_VECTOR_LEN;
|
|
320
|
+
wasm.get_necessary_data_list_js(retptr, ptr0, len0);
|
|
321
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
322
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
323
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
324
|
+
var r3 = getInt32Memory0()[retptr / 4 + 3];
|
|
325
|
+
var ptr2 = r0;
|
|
326
|
+
var len2 = r1;
|
|
327
|
+
if (r3) {
|
|
328
|
+
ptr2 = 0; len2 = 0;
|
|
329
|
+
throw takeObject(r2);
|
|
330
|
+
}
|
|
331
|
+
deferred3_0 = ptr2;
|
|
332
|
+
deferred3_1 = len2;
|
|
333
|
+
return getStringFromWasm0(ptr2, len2);
|
|
334
|
+
} finally {
|
|
335
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
336
|
+
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
337
|
+
}
|
|
338
|
+
};
|
|
339
|
+
|
|
340
|
+
/**
|
|
341
|
+
* @param {string} tx_hex
|
|
342
|
+
* @param {string} validation_context
|
|
343
|
+
* @returns {string}
|
|
344
|
+
*/
|
|
345
|
+
module.exports.validate_transaction_js = function(tx_hex, validation_context) {
|
|
346
|
+
let deferred4_0;
|
|
347
|
+
let deferred4_1;
|
|
348
|
+
try {
|
|
349
|
+
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
350
|
+
const ptr0 = passStringToWasm0(tx_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
351
|
+
const len0 = WASM_VECTOR_LEN;
|
|
352
|
+
const ptr1 = passStringToWasm0(validation_context, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
353
|
+
const len1 = WASM_VECTOR_LEN;
|
|
354
|
+
wasm.validate_transaction_js(retptr, ptr0, len0, ptr1, len1);
|
|
355
|
+
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
356
|
+
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
357
|
+
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
358
|
+
var r3 = getInt32Memory0()[retptr / 4 + 3];
|
|
359
|
+
var ptr3 = r0;
|
|
360
|
+
var len3 = r1;
|
|
361
|
+
if (r3) {
|
|
362
|
+
ptr3 = 0; len3 = 0;
|
|
363
|
+
throw takeObject(r2);
|
|
364
|
+
}
|
|
365
|
+
deferred4_0 = ptr3;
|
|
366
|
+
deferred4_1 = len3;
|
|
367
|
+
return getStringFromWasm0(ptr3, len3);
|
|
368
|
+
} finally {
|
|
369
|
+
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
370
|
+
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
371
|
+
}
|
|
372
|
+
};
|
|
373
|
+
|
|
309
374
|
/**
|
|
310
375
|
* @param {string} hex
|
|
311
376
|
* @returns {any}
|
|
@@ -462,71 +527,6 @@ module.exports.get_ref_script_bytes = function(tx_hex, output_index) {
|
|
|
462
527
|
}
|
|
463
528
|
};
|
|
464
529
|
|
|
465
|
-
/**
|
|
466
|
-
* @param {string} tx_hex
|
|
467
|
-
* @returns {string}
|
|
468
|
-
*/
|
|
469
|
-
module.exports.get_necessary_data_list_js = function(tx_hex) {
|
|
470
|
-
let deferred3_0;
|
|
471
|
-
let deferred3_1;
|
|
472
|
-
try {
|
|
473
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
474
|
-
const ptr0 = passStringToWasm0(tx_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
475
|
-
const len0 = WASM_VECTOR_LEN;
|
|
476
|
-
wasm.get_necessary_data_list_js(retptr, ptr0, len0);
|
|
477
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
478
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
479
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
480
|
-
var r3 = getInt32Memory0()[retptr / 4 + 3];
|
|
481
|
-
var ptr2 = r0;
|
|
482
|
-
var len2 = r1;
|
|
483
|
-
if (r3) {
|
|
484
|
-
ptr2 = 0; len2 = 0;
|
|
485
|
-
throw takeObject(r2);
|
|
486
|
-
}
|
|
487
|
-
deferred3_0 = ptr2;
|
|
488
|
-
deferred3_1 = len2;
|
|
489
|
-
return getStringFromWasm0(ptr2, len2);
|
|
490
|
-
} finally {
|
|
491
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
492
|
-
wasm.__wbindgen_free(deferred3_0, deferred3_1, 1);
|
|
493
|
-
}
|
|
494
|
-
};
|
|
495
|
-
|
|
496
|
-
/**
|
|
497
|
-
* @param {string} tx_hex
|
|
498
|
-
* @param {string} validation_context
|
|
499
|
-
* @returns {string}
|
|
500
|
-
*/
|
|
501
|
-
module.exports.validate_transaction_js = function(tx_hex, validation_context) {
|
|
502
|
-
let deferred4_0;
|
|
503
|
-
let deferred4_1;
|
|
504
|
-
try {
|
|
505
|
-
const retptr = wasm.__wbindgen_add_to_stack_pointer(-16);
|
|
506
|
-
const ptr0 = passStringToWasm0(tx_hex, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
507
|
-
const len0 = WASM_VECTOR_LEN;
|
|
508
|
-
const ptr1 = passStringToWasm0(validation_context, wasm.__wbindgen_malloc, wasm.__wbindgen_realloc);
|
|
509
|
-
const len1 = WASM_VECTOR_LEN;
|
|
510
|
-
wasm.validate_transaction_js(retptr, ptr0, len0, ptr1, len1);
|
|
511
|
-
var r0 = getInt32Memory0()[retptr / 4 + 0];
|
|
512
|
-
var r1 = getInt32Memory0()[retptr / 4 + 1];
|
|
513
|
-
var r2 = getInt32Memory0()[retptr / 4 + 2];
|
|
514
|
-
var r3 = getInt32Memory0()[retptr / 4 + 3];
|
|
515
|
-
var ptr3 = r0;
|
|
516
|
-
var len3 = r1;
|
|
517
|
-
if (r3) {
|
|
518
|
-
ptr3 = 0; len3 = 0;
|
|
519
|
-
throw takeObject(r2);
|
|
520
|
-
}
|
|
521
|
-
deferred4_0 = ptr3;
|
|
522
|
-
deferred4_1 = len3;
|
|
523
|
-
return getStringFromWasm0(ptr3, len3);
|
|
524
|
-
} finally {
|
|
525
|
-
wasm.__wbindgen_add_to_stack_pointer(16);
|
|
526
|
-
wasm.__wbindgen_free(deferred4_0, deferred4_1, 1);
|
|
527
|
-
}
|
|
528
|
-
};
|
|
529
|
-
|
|
530
530
|
function getArrayU8FromWasm0(ptr, len) {
|
|
531
531
|
ptr = ptr >>> 0;
|
|
532
532
|
return getUint8Memory0().subarray(ptr / 1, ptr / 1 + len);
|
|
@@ -1116,51 +1116,34 @@ function handleError(f, args) {
|
|
|
1116
1116
|
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", });
|
|
1117
1117
|
/**
|
|
1118
1118
|
*/
|
|
1119
|
-
module.exports.MetadataJsonSchema = Object.freeze({ NoConversions:0,"0":"NoConversions",BasicConversions:1,"1":"BasicConversions",DetailedSchema:2,"2":"DetailedSchema", });
|
|
1120
|
-
/**
|
|
1121
|
-
*/
|
|
1122
|
-
module.exports.DRepKind = Object.freeze({ KeyHash:0,"0":"KeyHash",ScriptHash:1,"1":"ScriptHash",AlwaysAbstain:2,"2":"AlwaysAbstain",AlwaysNoConfidence:3,"3":"AlwaysNoConfidence", });
|
|
1123
|
-
/**
|
|
1124
|
-
*/
|
|
1125
1119
|
module.exports.CborContainerType = Object.freeze({ Array:0,"0":"Array",Map:1,"1":"Map", });
|
|
1126
1120
|
/**
|
|
1121
|
+
* Each new language uses a different namespace for hashing its script
|
|
1122
|
+
* This is because you could have a language where the same bytes have different semantics
|
|
1123
|
+
* So this avoids scripts in different languages mapping to the same hash
|
|
1124
|
+
* Note that the enum value here is different than the enum value for deciding the cost model of a script
|
|
1127
1125
|
*/
|
|
1128
|
-
module.exports.
|
|
1129
|
-
/**
|
|
1130
|
-
*/
|
|
1131
|
-
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", });
|
|
1126
|
+
module.exports.ScriptHashNamespace = Object.freeze({ NativeScript:0,"0":"NativeScript",PlutusScript:1,"1":"PlutusScript",PlutusScriptV2:2,"2":"PlutusScriptV2",PlutusScriptV3:3,"3":"PlutusScriptV3", });
|
|
1132
1127
|
/**
|
|
1133
1128
|
*/
|
|
1134
|
-
module.exports.
|
|
1129
|
+
module.exports.CborSetType = Object.freeze({ Tagged:0,"0":"Tagged",Untagged:1,"1":"Untagged", });
|
|
1135
1130
|
/**
|
|
1136
1131
|
*/
|
|
1137
|
-
module.exports.
|
|
1132
|
+
module.exports.NetworkIdKind = Object.freeze({ Testnet:0,"0":"Testnet",Mainnet:1,"1":"Mainnet", });
|
|
1138
1133
|
/**
|
|
1139
1134
|
*/
|
|
1140
|
-
module.exports.
|
|
1135
|
+
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
1136
|
/**
|
|
1142
1137
|
*/
|
|
1143
|
-
module.exports.
|
|
1138
|
+
module.exports.RelayKind = Object.freeze({ SingleHostAddr:0,"0":"SingleHostAddr",SingleHostName:1,"1":"SingleHostName",MultiHostName:2,"2":"MultiHostName", });
|
|
1144
1139
|
/**
|
|
1145
1140
|
*/
|
|
1146
1141
|
module.exports.VoteKind = Object.freeze({ No:0,"0":"No",Yes:1,"1":"Yes",Abstain:2,"2":"Abstain", });
|
|
1147
1142
|
/**
|
|
1148
1143
|
*/
|
|
1149
|
-
module.exports.MIRPot = Object.freeze({ Reserves:0,"0":"Reserves",Treasury:1,"1":"Treasury", });
|
|
1150
|
-
/**
|
|
1151
|
-
*/
|
|
1152
|
-
module.exports.ByronAddressType = Object.freeze({ ATPubKey:0,"0":"ATPubKey",ATScript:1,"1":"ATScript",ATRedeem:2,"2":"ATRedeem", });
|
|
1153
|
-
/**
|
|
1154
|
-
*/
|
|
1155
|
-
module.exports.CborSetType = Object.freeze({ Tagged:0,"0":"Tagged",Untagged:1,"1":"Untagged", });
|
|
1156
|
-
/**
|
|
1157
|
-
*/
|
|
1158
1144
|
module.exports.TransactionSetsState = Object.freeze({ AllSetsHaveTag:0,"0":"AllSetsHaveTag",AllSetsHaveNoTag:1,"1":"AllSetsHaveNoTag",MixedSets:2,"2":"MixedSets", });
|
|
1159
1145
|
/**
|
|
1160
1146
|
*/
|
|
1161
|
-
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", });
|
|
1162
|
-
/**
|
|
1163
|
-
*/
|
|
1164
1147
|
module.exports.CoinSelectionStrategyCIP2 = Object.freeze({
|
|
1165
1148
|
/**
|
|
1166
1149
|
* Performs CIP2's Largest First ada-only selection. Will error if outputs contain non-ADA assets.
|
|
@@ -1182,6 +1165,22 @@ RandomImproveMultiAsset:3,"3":"RandomImproveMultiAsset", });
|
|
|
1182
1165
|
*/
|
|
1183
1166
|
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", });
|
|
1184
1167
|
/**
|
|
1168
|
+
* Used to choosed the schema for a script JSON string
|
|
1169
|
+
*/
|
|
1170
|
+
module.exports.ScriptSchema = Object.freeze({ Wallet:0,"0":"Wallet",Node:1,"1":"Node", });
|
|
1171
|
+
/**
|
|
1172
|
+
*/
|
|
1173
|
+
module.exports.LanguageKind = Object.freeze({ PlutusV1:0,"0":"PlutusV1",PlutusV2:1,"1":"PlutusV2",PlutusV3:2,"2":"PlutusV3", });
|
|
1174
|
+
/**
|
|
1175
|
+
*/
|
|
1176
|
+
module.exports.MetadataJsonSchema = Object.freeze({ NoConversions:0,"0":"NoConversions",BasicConversions:1,"1":"BasicConversions",DetailedSchema:2,"2":"DetailedSchema", });
|
|
1177
|
+
/**
|
|
1178
|
+
*/
|
|
1179
|
+
module.exports.MIRPot = Object.freeze({ Reserves:0,"0":"Reserves",Treasury:1,"1":"Treasury", });
|
|
1180
|
+
/**
|
|
1181
|
+
*/
|
|
1182
|
+
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", });
|
|
1183
|
+
/**
|
|
1185
1184
|
* JSON <-> PlutusData conversion schemas.
|
|
1186
1185
|
* Follows ScriptDataJsonSchema in cardano-cli defined at:
|
|
1187
1186
|
* https://github.com/input-output-hk/cardano-node/blob/master/cardano-api/src/Cardano/Api/ScriptData.hs#L254
|
|
@@ -1234,30 +1233,31 @@ BasicConversions:0,"0":"BasicConversions",
|
|
|
1234
1233
|
DetailedSchema:1,"1":"DetailedSchema", });
|
|
1235
1234
|
/**
|
|
1236
1235
|
*/
|
|
1237
|
-
module.exports.
|
|
1236
|
+
module.exports.MIRKind = Object.freeze({ ToOtherPot:0,"0":"ToOtherPot",ToStakeCredentials:1,"1":"ToStakeCredentials", });
|
|
1238
1237
|
/**
|
|
1239
|
-
* Each new language uses a different namespace for hashing its script
|
|
1240
|
-
* This is because you could have a language where the same bytes have different semantics
|
|
1241
|
-
* So this avoids scripts in different languages mapping to the same hash
|
|
1242
|
-
* Note that the enum value here is different than the enum value for deciding the cost model of a script
|
|
1243
1238
|
*/
|
|
1244
|
-
module.exports.
|
|
1239
|
+
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", });
|
|
1245
1240
|
/**
|
|
1246
1241
|
*/
|
|
1247
|
-
module.exports.
|
|
1242
|
+
module.exports.CredKind = Object.freeze({ Key:0,"0":"Key",Script:1,"1":"Script", });
|
|
1248
1243
|
/**
|
|
1249
|
-
* Used to choosed the schema for a script JSON string
|
|
1250
1244
|
*/
|
|
1251
|
-
module.exports.
|
|
1245
|
+
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", });
|
|
1252
1246
|
/**
|
|
1253
1247
|
*/
|
|
1254
|
-
module.exports.
|
|
1248
|
+
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", });
|
|
1255
1249
|
/**
|
|
1256
1250
|
*/
|
|
1257
|
-
module.exports.
|
|
1251
|
+
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", });
|
|
1258
1252
|
/**
|
|
1259
1253
|
*/
|
|
1260
|
-
module.exports.
|
|
1254
|
+
module.exports.ByronAddressType = Object.freeze({ ATPubKey:0,"0":"ATPubKey",ATScript:1,"1":"ATScript",ATRedeem:2,"2":"ATRedeem", });
|
|
1255
|
+
/**
|
|
1256
|
+
*/
|
|
1257
|
+
module.exports.DRepKind = Object.freeze({ KeyHash:0,"0":"KeyHash",ScriptHash:1,"1":"ScriptHash",AlwaysAbstain:2,"2":"AlwaysAbstain",AlwaysNoConfidence:3,"3":"AlwaysNoConfidence", });
|
|
1258
|
+
/**
|
|
1259
|
+
*/
|
|
1260
|
+
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", });
|
|
1261
1261
|
|
|
1262
1262
|
const AddressFinalization = (typeof FinalizationRegistry === 'undefined')
|
|
1263
1263
|
? { register: () => {}, unregister: () => {} }
|
|
Binary file
|
|
@@ -5,14 +5,14 @@ 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
7
|
export function check_block_or_tx_signatures(a: number, b: number, c: number): void;
|
|
8
|
+
export function get_necessary_data_list_js(a: number, b: number, c: number): void;
|
|
9
|
+
export function validate_transaction_js(a: number, b: number, c: number, d: number, e: number): void;
|
|
8
10
|
export function decode_plutus_program_uplc_json(a: number, b: number, c: number): void;
|
|
9
11
|
export function decode_plutus_program_pretty_uplc(a: number, b: number, c: number): void;
|
|
10
12
|
export function get_utxo_list_from_tx(a: number, b: number, c: number): void;
|
|
11
13
|
export function execute_tx_scripts(a: number, b: number, c: number, d: number, e: number): void;
|
|
12
14
|
export function cbor_to_json(a: number, b: number, c: number): void;
|
|
13
15
|
export function get_ref_script_bytes(a: number, b: number, c: number, d: number): void;
|
|
14
|
-
export function get_necessary_data_list_js(a: number, b: number, c: number): void;
|
|
15
|
-
export function validate_transaction_js(a: number, b: number, c: number, d: number, e: number): void;
|
|
16
16
|
export function __wbg_noconfidenceaction_free(a: number): void;
|
|
17
17
|
export function noconfidenceaction_to_bytes(a: number, b: number): void;
|
|
18
18
|
export function noconfidenceaction_from_bytes(a: number, b: number, c: number): void;
|
package/package.json
CHANGED