From 0e89deadf9183a129b9a25c0568eed177d6c6d7c Mon Sep 17 00:00:00 2001 From: Sebastien Guillemot Date: Sat, 12 Jun 2021 06:58:52 +0900 Subject: [PATCH] 7.1.0 --- package-lock.json | 2 +- package.json | 2 +- rust/Cargo.lock | 2 +- rust/Cargo.toml | 2 +- rust/pkg/cardano_serialization_lib.js.flow | 95 ++++++++++++++++------ 5 files changed, 75 insertions(+), 28 deletions(-) diff --git a/package-lock.json b/package-lock.json index 6e75ecb0..e64bab3d 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,6 +1,6 @@ { "name": "cardano-serialization-lib", - "version": "7.0.0", + "version": "7.1.0", "lockfileVersion": 1, "requires": true, "dependencies": { diff --git a/package.json b/package.json index b5f2a349..4ef289ee 100644 --- a/package.json +++ b/package.json @@ -1,6 +1,6 @@ { "name": "cardano-serialization-lib", - "version": "7.0.0", + "version": "7.1.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; wasm-pack pack; cd .. && npm run js:flowgen", diff --git a/rust/Cargo.lock b/rust/Cargo.lock index 0e4806cf..4411c256 100644 --- a/rust/Cargo.lock +++ b/rust/Cargo.lock @@ -50,7 +50,7 @@ checksum = "08c48aae112d48ed9f069b33538ea9e3e90aa263cfa3d1c24309612b1f7472de" [[package]] name = "cardano-serialization-lib" -version = "7.0.0" +version = "7.1.0" dependencies = [ "bech32", "cbor_event", diff --git a/rust/Cargo.toml b/rust/Cargo.toml index df0854f8..a56b62d4 100644 --- a/rust/Cargo.toml +++ b/rust/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "cardano-serialization-lib" -version = "7.0.0" +version = "7.1.0" edition = "2018" authors = ["EMURGO"] license = "MIT" diff --git a/rust/pkg/cardano_serialization_lib.js.flow b/rust/pkg/cardano_serialization_lib.js.flow index b29c6fab..cb6bc114 100644 --- a/rust/pkg/cardano_serialization_lib.js.flow +++ b/rust/pkg/cardano_serialization_lib.js.flow @@ -89,6 +89,30 @@ declare export function min_ada_required( minimum_utxo_val: BigNum ): BigNum; +/** + * @param {string} password + * @param {string} salt + * @param {string} nonce + * @param {string} data + * @returns {string} + */ +declare export function encrypt_with_password( + password: string, + salt: string, + nonce: string, + data: string +): string; + +/** + * @param {string} password + * @param {string} data + * @returns {string} + */ +declare export function decrypt_with_password( + password: string, + data: string +): string; + /** * @param {Uint8Array} bytes * @returns {TransactionMetadatum} @@ -132,30 +156,6 @@ declare export function decode_metadatum_to_json_str( */ declare export function min_fee(tx: Transaction, linear_fee: LinearFee): BigNum; -/** - * @param {string} password - * @param {string} salt - * @param {string} nonce - * @param {string} data - * @returns {string} - */ -declare export function encrypt_with_password( - password: string, - salt: string, - nonce: string, - data: string -): string; - -/** - * @param {string} password - * @param {string} data - * @returns {string} - */ -declare export function decrypt_with_password( - password: string, - data: string -): string; - /** */ @@ -4279,6 +4279,42 @@ declare export class TransactionOutputs { */ add(elem: TransactionOutput): void; } +/** + */ +declare export class TransactionUnspentOutput { + free(): void; + + /** + * @returns {Uint8Array} + */ + to_bytes(): Uint8Array; + + /** + * @param {Uint8Array} bytes + * @returns {TransactionUnspentOutput} + */ + static from_bytes(bytes: Uint8Array): TransactionUnspentOutput; + + /** + * @param {TransactionInput} input + * @param {TransactionOutput} output + * @returns {TransactionUnspentOutput} + */ + static new( + input: TransactionInput, + output: TransactionOutput + ): TransactionUnspentOutput; + + /** + * @returns {TransactionInput} + */ + input(): TransactionInput; + + /** + * @returns {TransactionOutput} + */ + output(): TransactionOutput; +} /** */ declare export class TransactionWitnessSet { @@ -4557,6 +4593,17 @@ declare export class VRFVKey { declare export class Value { free(): void; + /** + * @returns {Uint8Array} + */ + to_bytes(): Uint8Array; + + /** + * @param {Uint8Array} bytes + * @returns {Value} + */ + static from_bytes(bytes: Uint8Array): Value; + /** * @param {BigNum} coin * @returns {Value}