Skip to content

Commit f90602b

Browse files
authored
Merge pull request #560 from Emurgo/release/11.2
Release 11.2.0 "Mint 'em all"
2 parents fa2a9c9 + 582ef71 commit f90602b

File tree

7 files changed

+264
-46
lines changed

7 files changed

+264
-46
lines changed

package-lock.json

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

package.json

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
{
22
"name": "cardano-serialization-lib",
3-
"version": "11.1.1",
3+
"version": "11.2.0",
44
"description": "(De)serialization functions for the Cardano blockchain along with related utility functions",
55
"scripts": {
66
"rust:build-nodejs": "(rimraf ./rust/pkg && cd rust; wasm-pack build --target=nodejs; cd ..; npm run js:ts-json-gen; cd rust; wasm-pack pack) && npm run js:flowgen",

rust/Cargo.toml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
[package]
22
name = "cardano-serialization-lib"
3-
version = "11.1.1"
3+
version = "11.2.0"
44
edition = "2018"
55
authors = ["EMURGO"]
66
license = "MIT"

rust/json-gen/Cargo.lock

Lines changed: 1 addition & 1 deletion
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.

rust/pkg/cardano_serialization_lib.js.flow

Lines changed: 52 additions & 40 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,26 @@
55
* @flow
66
*/
77

8+
/**
9+
* @param {string} json
10+
* @param {number} schema
11+
* @returns {PlutusData}
12+
*/
13+
declare export function encode_json_str_to_plutus_datum(
14+
json: string,
15+
schema: number
16+
): PlutusData;
17+
18+
/**
19+
* @param {PlutusData} datum
20+
* @param {number} schema
21+
* @returns {string}
22+
*/
23+
declare export function decode_plutus_datum_to_json_str(
24+
datum: PlutusData,
25+
schema: number
26+
): string;
27+
828
/**
929
* @param {Uint8Array} bytes
1030
* @returns {TransactionMetadatum}
@@ -41,26 +61,6 @@ declare export function decode_metadatum_to_json_str(
4161
schema: number
4262
): string;
4363

44-
/**
45-
* @param {string} json
46-
* @param {number} schema
47-
* @returns {PlutusData}
48-
*/
49-
declare export function encode_json_str_to_plutus_datum(
50-
json: string,
51-
schema: number
52-
): PlutusData;
53-
54-
/**
55-
* @param {PlutusData} datum
56-
* @param {number} schema
57-
* @returns {string}
58-
*/
59-
declare export function decode_plutus_datum_to_json_str(
60-
datum: PlutusData,
61-
schema: number
62-
): string;
63-
6464
/**
6565
* @param {Transaction} tx
6666
* @param {LinearFee} linear_fee
@@ -333,26 +333,6 @@ declare export var NetworkIdKind: {|
333333
+Mainnet: 1, // 1
334334
|};
335335

336-
/**
337-
*/
338-
339-
declare export var TransactionMetadatumKind: {|
340-
+MetadataMap: 0, // 0
341-
+MetadataList: 1, // 1
342-
+Int: 2, // 2
343-
+Bytes: 3, // 3
344-
+Text: 4, // 4
345-
|};
346-
347-
/**
348-
*/
349-
350-
declare export var MetadataJsonSchema: {|
351-
+NoConversions: 0, // 0
352-
+BasicConversions: 1, // 1
353-
+DetailedSchema: 2, // 2
354-
|};
355-
356336
/**
357337
*/
358338

@@ -399,6 +379,26 @@ declare export var PlutusDatumSchema: {|
399379
+DetailedSchema: 1, // 1
400380
|};
401381

382+
/**
383+
*/
384+
385+
declare export var TransactionMetadatumKind: {|
386+
+MetadataMap: 0, // 0
387+
+MetadataList: 1, // 1
388+
+Int: 2, // 2
389+
+Bytes: 3, // 3
390+
+Text: 4, // 4
391+
|};
392+
393+
/**
394+
*/
395+
396+
declare export var MetadataJsonSchema: {|
397+
+NoConversions: 0, // 0
398+
+BasicConversions: 1, // 1
399+
+DetailedSchema: 2, // 2
400+
|};
401+
402402
/**
403403
*/
404404

@@ -4419,6 +4419,18 @@ declare export class NetworkInfo {
44194419
/**
44204420
* @returns {NetworkInfo}
44214421
*/
4422+
static testnet_preview(): NetworkInfo;
4423+
4424+
/**
4425+
* @returns {NetworkInfo}
4426+
*/
4427+
static testnet_preprod(): NetworkInfo;
4428+
4429+
/**
4430+
* !!! DEPRECATED !!!
4431+
* This network does not exist anymore. Use `.testnet_preview()` or `.testnet_preprod()`
4432+
* @returns {NetworkInfo}
4433+
*/
44224434
static testnet(): NetworkInfo;
44234435

44244436
/**

rust/src/address.rs

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -53,6 +53,21 @@ impl NetworkInfo {
5353
self.protocol_magic
5454
}
5555

56+
pub fn testnet_preview() -> NetworkInfo {
57+
NetworkInfo {
58+
network_id: 0b0000,
59+
protocol_magic: 2,
60+
}
61+
}
62+
pub fn testnet_preprod() -> NetworkInfo {
63+
NetworkInfo {
64+
network_id: 0b0000,
65+
protocol_magic: 1,
66+
}
67+
}
68+
/// !!! DEPRECATED !!!
69+
/// This network does not exist anymore. Use `.testnet_preview()` or `.testnet_preprod()`
70+
#[deprecated(since = "11.2.0", note = "Use `.testnet_preview` or `.testnet_preprod`")]
5671
pub fn testnet() -> NetworkInfo {
5772
NetworkInfo {
5873
network_id: 0b0000,

0 commit comments

Comments
 (0)