@cardananium/cquisitor-lib 0.0.1-beta.1

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.
@@ -0,0 +1,109 @@
1
+ /**
2
+ * @returns {(string)[]}
3
+ */
4
+ export function get_decodable_types(): (string)[];
5
+ /**
6
+ * @param {string} input
7
+ * @param {string} type_name
8
+ * @param {any} params_json
9
+ * @returns {any}
10
+ */
11
+ export function decode_specific_type(input: string, type_name: string, params_json: DecodingParams): CborValue;
12
+ /**
13
+ * @param {string} input
14
+ * @returns {(string)[]}
15
+ */
16
+ export function get_possible_types_for_input(input: string): (string)[];
17
+ /**
18
+ * @param {string} cbor_hex
19
+ * @returns {any}
20
+ */
21
+ export function cbor_to_json(cbor_hex: string): any;
22
+
23
+ export interface CborPosition {
24
+ offset: number;
25
+ length: number;
26
+ }
27
+
28
+ export type CborSimpleType =
29
+ | "Null"
30
+ | "Bool"
31
+ | "U8"
32
+ | "U16"
33
+ | "U32"
34
+ | "U64"
35
+ | "I8"
36
+ | "I16"
37
+ | "I32"
38
+ | "I64"
39
+ | "Int"
40
+ | "F16"
41
+ | "F32"
42
+ | "F64"
43
+ | "Bytes"
44
+ | "String"
45
+ | "Simple"
46
+ | "Undefined"
47
+ | "Break";
48
+
49
+ export interface CborSimple {
50
+ position_info: CborPosition;
51
+ struct_position_info?: CborPosition;
52
+ value: any;
53
+ }
54
+
55
+ export interface CborArray {
56
+ type: "Array";
57
+ position_info: CborPosition;
58
+ struct_position_info: CborPosition;
59
+ items: number | "Indefinite";
60
+ values: CborValue[]; // nested
61
+ }
62
+
63
+ export interface CborMap {
64
+ type: "Map";
65
+ position_info: CborPosition;
66
+ struct_position_info: CborPosition;
67
+ items: number | "Indefinite";
68
+ values: {
69
+ key: CborValue;
70
+ value: CborValue;
71
+ }[];
72
+ }
73
+
74
+ export interface CborTag {
75
+ type: "Tag";
76
+ position_info: CborPosition;
77
+ struct_position_info: CborPosition;
78
+ tag: string;
79
+ value: CborValue;
80
+ }
81
+
82
+ export interface CborIndefiniteString {
83
+ type: "IndefiniteLengthString";
84
+ position_info: CborPosition;
85
+ struct_position_info: CborPosition;
86
+ chunks: CborValue[];
87
+ }
88
+
89
+ export interface CborIndefiniteBytes {
90
+ type: "IndefiniteLengthBytes";
91
+ position_info: CborPosition;
92
+ struct_position_info: CborPosition;
93
+ chunks: CborValue[];
94
+ }
95
+
96
+ export type CborValue =
97
+ | CborSimple
98
+ | CborArray
99
+ | CborMap
100
+ | CborTag
101
+ | CborIndefiniteString
102
+ | CborIndefiniteBytes;
103
+
104
+ export interface DecodingParams {
105
+ plutus_script_version?: number;
106
+ plutus_data_schema?: PlutusDataSchema;
107
+ }
108
+
109
+ export type PlutusDataSchema = "BasicConversions" | "DetailedSchema";