Skip to content

Commit

Permalink
Merge pull request #560 from Emurgo/release/11.2
Browse files Browse the repository at this point in the history
Release 11.2.0 "Mint 'em all"
  • Loading branch information
lisicky committed Dec 8, 2022
2 parents fa2a9c9 + 582ef71 commit f90602b
Show file tree
Hide file tree
Showing 7 changed files with 264 additions and 46 deletions.
2 changes: 1 addition & 1 deletion package-lock.json

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion package.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"name": "cardano-serialization-lib",
"version": "11.1.1",
"version": "11.2.0",
"description": "(De)serialization functions for the Cardano blockchain along with related utility functions",
"scripts": {
"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",
Expand Down
2 changes: 1 addition & 1 deletion rust/Cargo.toml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
[package]
name = "cardano-serialization-lib"
version = "11.1.1"
version = "11.2.0"
edition = "2018"
authors = ["EMURGO"]
license = "MIT"
Expand Down
2 changes: 1 addition & 1 deletion rust/json-gen/Cargo.lock

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

92 changes: 52 additions & 40 deletions rust/pkg/cardano_serialization_lib.js.flow
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,26 @@
* @flow
*/

/**
* @param {string} json
* @param {number} schema
* @returns {PlutusData}
*/
declare export function encode_json_str_to_plutus_datum(
json: string,
schema: number
): PlutusData;

/**
* @param {PlutusData} datum
* @param {number} schema
* @returns {string}
*/
declare export function decode_plutus_datum_to_json_str(
datum: PlutusData,
schema: number
): string;

/**
* @param {Uint8Array} bytes
* @returns {TransactionMetadatum}
Expand Down Expand Up @@ -41,26 +61,6 @@ declare export function decode_metadatum_to_json_str(
schema: number
): string;

/**
* @param {string} json
* @param {number} schema
* @returns {PlutusData}
*/
declare export function encode_json_str_to_plutus_datum(
json: string,
schema: number
): PlutusData;

/**
* @param {PlutusData} datum
* @param {number} schema
* @returns {string}
*/
declare export function decode_plutus_datum_to_json_str(
datum: PlutusData,
schema: number
): string;

/**
* @param {Transaction} tx
* @param {LinearFee} linear_fee
Expand Down Expand Up @@ -333,26 +333,6 @@ declare export var NetworkIdKind: {|
+Mainnet: 1, // 1
|};

/**
*/

declare export var TransactionMetadatumKind: {|
+MetadataMap: 0, // 0
+MetadataList: 1, // 1
+Int: 2, // 2
+Bytes: 3, // 3
+Text: 4, // 4
|};

/**
*/

declare export var MetadataJsonSchema: {|
+NoConversions: 0, // 0
+BasicConversions: 1, // 1
+DetailedSchema: 2, // 2
|};

/**
*/

Expand Down Expand Up @@ -399,6 +379,26 @@ declare export var PlutusDatumSchema: {|
+DetailedSchema: 1, // 1
|};

/**
*/

declare export var TransactionMetadatumKind: {|
+MetadataMap: 0, // 0
+MetadataList: 1, // 1
+Int: 2, // 2
+Bytes: 3, // 3
+Text: 4, // 4
|};

/**
*/

declare export var MetadataJsonSchema: {|
+NoConversions: 0, // 0
+BasicConversions: 1, // 1
+DetailedSchema: 2, // 2
|};

/**
*/

Expand Down Expand Up @@ -4419,6 +4419,18 @@ declare export class NetworkInfo {
/**
* @returns {NetworkInfo}
*/
static testnet_preview(): NetworkInfo;

/**
* @returns {NetworkInfo}
*/
static testnet_preprod(): NetworkInfo;

/**
* !!! DEPRECATED !!!
* This network does not exist anymore. Use `.testnet_preview()` or `.testnet_preprod()`
* @returns {NetworkInfo}
*/
static testnet(): NetworkInfo;

/**
Expand Down
15 changes: 15 additions & 0 deletions rust/src/address.rs
Original file line number Diff line number Diff line change
Expand Up @@ -53,6 +53,21 @@ impl NetworkInfo {
self.protocol_magic
}

pub fn testnet_preview() -> NetworkInfo {
NetworkInfo {
network_id: 0b0000,
protocol_magic: 2,
}
}
pub fn testnet_preprod() -> NetworkInfo {
NetworkInfo {
network_id: 0b0000,
protocol_magic: 1,
}
}
/// !!! DEPRECATED !!!
/// This network does not exist anymore. Use `.testnet_preview()` or `.testnet_preprod()`
#[deprecated(since = "11.2.0", note = "Use `.testnet_preview` or `.testnet_preprod`")]
pub fn testnet() -> NetworkInfo {
NetworkInfo {
network_id: 0b0000,
Expand Down
Loading

0 comments on commit f90602b

Please sign in to comment.