|
5 | 5 | * @flow |
6 | 6 | */ |
7 | 7 |
|
8 | | -/** |
9 | | - * @param {Uint8Array} bytes |
10 | | - * @returns {TransactionMetadatum} |
11 | | - */ |
12 | | -declare export function encode_arbitrary_bytes_as_metadatum( |
13 | | - bytes: Uint8Array |
14 | | -): TransactionMetadatum; |
15 | | - |
16 | | -/** |
17 | | - * @param {TransactionMetadatum} metadata |
18 | | - * @returns {Uint8Array} |
19 | | - */ |
20 | | -declare export function decode_arbitrary_bytes_from_metadatum( |
21 | | - metadata: TransactionMetadatum |
22 | | -): Uint8Array; |
23 | | - |
24 | | -/** |
25 | | - * @param {string} json |
26 | | - * @param {number} schema |
27 | | - * @returns {TransactionMetadatum} |
28 | | - */ |
29 | | -declare export function encode_json_str_to_metadatum( |
30 | | - json: string, |
31 | | - schema: number |
32 | | -): TransactionMetadatum; |
33 | | - |
34 | | -/** |
35 | | - * @param {TransactionMetadatum} metadatum |
36 | | - * @param {number} schema |
37 | | - * @returns {string} |
38 | | - */ |
39 | | -declare export function decode_metadatum_to_json_str( |
40 | | - metadatum: TransactionMetadatum, |
41 | | - schema: number |
42 | | -): string; |
43 | | - |
44 | 8 | /** |
45 | 9 | * @param {TransactionHash} tx_body_hash |
46 | 10 | * @param {ByronAddress} addr |
@@ -165,6 +129,42 @@ declare export function encode_json_str_to_native_script( |
165 | 129 | schema: number |
166 | 130 | ): NativeScript; |
167 | 131 |
|
| 132 | +/** |
| 133 | + * @param {Uint8Array} bytes |
| 134 | + * @returns {TransactionMetadatum} |
| 135 | + */ |
| 136 | +declare export function encode_arbitrary_bytes_as_metadatum( |
| 137 | + bytes: Uint8Array |
| 138 | +): TransactionMetadatum; |
| 139 | + |
| 140 | +/** |
| 141 | + * @param {TransactionMetadatum} metadata |
| 142 | + * @returns {Uint8Array} |
| 143 | + */ |
| 144 | +declare export function decode_arbitrary_bytes_from_metadatum( |
| 145 | + metadata: TransactionMetadatum |
| 146 | +): Uint8Array; |
| 147 | + |
| 148 | +/** |
| 149 | + * @param {string} json |
| 150 | + * @param {number} schema |
| 151 | + * @returns {TransactionMetadatum} |
| 152 | + */ |
| 153 | +declare export function encode_json_str_to_metadatum( |
| 154 | + json: string, |
| 155 | + schema: number |
| 156 | +): TransactionMetadatum; |
| 157 | + |
| 158 | +/** |
| 159 | + * @param {TransactionMetadatum} metadatum |
| 160 | + * @param {number} schema |
| 161 | + * @returns {string} |
| 162 | + */ |
| 163 | +declare export function decode_metadatum_to_json_str( |
| 164 | + metadatum: TransactionMetadatum, |
| 165 | + schema: number |
| 166 | +): string; |
| 167 | + |
168 | 168 | /** |
169 | 169 | * @param {Transaction} tx |
170 | 170 | * @param {LinearFee} linear_fee |
@@ -266,78 +266,78 @@ declare export var NetworkIdKind: {| |
266 | 266 | |}; |
267 | 267 |
|
268 | 268 | /** |
| 269 | + * Used to choosed the schema for a script JSON string |
269 | 270 | */ |
270 | 271 |
|
271 | | -declare export var StakeCredKind: {| |
272 | | - +Key: 0, // 0 |
273 | | - +Script: 1, // 1 |
| 272 | +declare export var ScriptSchema: {| |
| 273 | + +Wallet: 0, // 0 |
| 274 | + +Node: 1, // 1 |
274 | 275 | |}; |
275 | 276 |
|
276 | 277 | /** |
277 | 278 | */ |
278 | 279 |
|
279 | | -declare export var LanguageKind: {| |
280 | | - +PlutusV1: 0, // 0 |
| 280 | +declare export var TransactionMetadatumKind: {| |
| 281 | + +MetadataMap: 0, // 0 |
| 282 | + +MetadataList: 1, // 1 |
| 283 | + +Int: 2, // 2 |
| 284 | + +Bytes: 3, // 3 |
| 285 | + +Text: 4, // 4 |
281 | 286 | |}; |
282 | 287 |
|
283 | 288 | /** |
284 | 289 | */ |
285 | 290 |
|
286 | | -declare export var PlutusDataKind: {| |
287 | | - +ConstrPlutusData: 0, // 0 |
288 | | - +Map: 1, // 1 |
289 | | - +List: 2, // 2 |
290 | | - +Integer: 3, // 3 |
291 | | - +Bytes: 4, // 4 |
| 291 | +declare export var MetadataJsonSchema: {| |
| 292 | + +NoConversions: 0, // 0 |
| 293 | + +BasicConversions: 1, // 1 |
| 294 | + +DetailedSchema: 2, // 2 |
292 | 295 | |}; |
293 | 296 |
|
294 | 297 | /** |
295 | 298 | */ |
296 | 299 |
|
297 | | -declare export var RedeemerTagKind: {| |
298 | | - +Spend: 0, // 0 |
299 | | - +Mint: 1, // 1 |
300 | | - +Cert: 2, // 2 |
301 | | - +Reward: 3, // 3 |
| 300 | +declare export var CoinSelectionStrategyCIP2: {| |
| 301 | + +LargestFirst: 0, // 0 |
| 302 | + +RandomImprove: 1, // 1 |
| 303 | + +LargestFirstMultiAsset: 2, // 2 |
| 304 | + +RandomImproveMultiAsset: 3, // 3 |
302 | 305 | |}; |
303 | 306 |
|
304 | 307 | /** |
305 | 308 | */ |
306 | 309 |
|
307 | | -declare export var TransactionMetadatumKind: {| |
308 | | - +MetadataMap: 0, // 0 |
309 | | - +MetadataList: 1, // 1 |
310 | | - +Int: 2, // 2 |
311 | | - +Bytes: 3, // 3 |
312 | | - +Text: 4, // 4 |
| 310 | +declare export var StakeCredKind: {| |
| 311 | + +Key: 0, // 0 |
| 312 | + +Script: 1, // 1 |
313 | 313 | |}; |
314 | 314 |
|
315 | 315 | /** |
316 | 316 | */ |
317 | 317 |
|
318 | | -declare export var MetadataJsonSchema: {| |
319 | | - +NoConversions: 0, // 0 |
320 | | - +BasicConversions: 1, // 1 |
321 | | - +DetailedSchema: 2, // 2 |
| 318 | +declare export var LanguageKind: {| |
| 319 | + +PlutusV1: 0, // 0 |
322 | 320 | |}; |
323 | 321 |
|
324 | 322 | /** |
325 | | - * Used to choosed the schema for a script JSON string |
326 | 323 | */ |
327 | 324 |
|
328 | | -declare export var ScriptSchema: {| |
329 | | - +Wallet: 0, // 0 |
330 | | - +Node: 1, // 1 |
| 325 | +declare export var PlutusDataKind: {| |
| 326 | + +ConstrPlutusData: 0, // 0 |
| 327 | + +Map: 1, // 1 |
| 328 | + +List: 2, // 2 |
| 329 | + +Integer: 3, // 3 |
| 330 | + +Bytes: 4, // 4 |
331 | 331 | |}; |
332 | 332 |
|
333 | 333 | /** |
334 | 334 | */ |
335 | 335 |
|
336 | | -declare export var CoinSelectionStrategyCIP2: {| |
337 | | - +LargestFirst: 0, // 0 |
338 | | - +RandomImprove: 1, // 1 |
339 | | - +LargestFirstMultiAsset: 2, // 2 |
340 | | - +RandomImproveMultiAsset: 3, // 3 |
| 336 | +declare export var RedeemerTagKind: {| |
| 337 | + +Spend: 0, // 0 |
| 338 | + +Mint: 1, // 1 |
| 339 | + +Cert: 2, // 2 |
| 340 | + +Reward: 3, // 3 |
341 | 341 | |}; |
342 | 342 |
|
343 | 343 | /** |
@@ -3146,17 +3146,17 @@ declare export class PlutusScript { |
3146 | 3146 | static from_bytes(bytes: Uint8Array): PlutusScript; |
3147 | 3147 |
|
3148 | 3148 | /** |
3149 | | - * Creates a new Plutus script from the RAW bytes of the compiled script. |
3150 | | - * This does NOT include any CBOR encoding around these bytes (e.g. from "cborBytes" in cardano-cli) |
3151 | | - * If you creating this from those you should use PlutusScript::from_bytes() instead. |
| 3149 | + * * Creates a new Plutus script from the RAW bytes of the compiled script. |
| 3150 | + * * This does NOT include any CBOR encoding around these bytes (e.g. from "cborBytes" in cardano-cli) |
| 3151 | + * * If you creating this from those you should use PlutusScript::from_bytes() instead. |
3152 | 3152 | * @param {Uint8Array} bytes |
3153 | 3153 | * @returns {PlutusScript} |
3154 | 3154 | */ |
3155 | 3155 | static new(bytes: Uint8Array): PlutusScript; |
3156 | 3156 |
|
3157 | 3157 | /** |
3158 | | - * The raw bytes of this compiled Plutus script. |
3159 | | - * If you need "cborBytes" for cardano-cli use PlutusScript::to_bytes() instead. |
| 3158 | + * * The raw bytes of this compiled Plutus script. |
| 3159 | + * * If you need "cborBytes" for cardano-cli use PlutusScript::to_bytes() instead. |
3160 | 3160 | * @returns {Uint8Array} |
3161 | 3161 | */ |
3162 | 3162 | bytes(): Uint8Array; |
|
0 commit comments