diff --git a/packages/Cargo.lock b/packages/Cargo.lock index 0bad69d..f5bd70f 100644 --- a/packages/Cargo.lock +++ b/packages/Cargo.lock @@ -1118,7 +1118,7 @@ checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" [[package]] name = "maestro" version = "1.1.2" -source = "git+https://github.com/maestro-org/rust-sdk.git#831f54e8ead69951444d10597e50c0d882d11471" +source = "git+https://github.com/maestro-org/rust-sdk.git?rev=831f54e8ead69951444d10597e50c0d882d11471#831f54e8ead69951444d10597e50c0d882d11471" dependencies = [ "chrono", "reqwest 0.11.27", @@ -2270,7 +2270,7 @@ dependencies = [ [[package]] name = "sidan-csl-rs" -version = "0.6.12" +version = "0.6.13" dependencies = [ "cardano-serialization-lib", "cryptoxide", @@ -2872,7 +2872,7 @@ dependencies = [ [[package]] name = "whisky" -version = "0.6.12" +version = "0.6.13" dependencies = [ "async-trait", "cardano-serialization-lib", @@ -2898,7 +2898,7 @@ dependencies = [ [[package]] name = "whisky-examples" -version = "0.6.12" +version = "0.6.13" dependencies = [ "whisky", ] diff --git a/packages/Cargo.toml b/packages/Cargo.toml index f400a68..0b1d55b 100644 --- a/packages/Cargo.toml +++ b/packages/Cargo.toml @@ -1,5 +1,5 @@ [workspace] -version = "0.6.12" +version = "0.6.13" resolver = "2" members = [ "sidan-csl-rs", diff --git a/packages/sidan-csl-rs/Cargo.toml b/packages/sidan-csl-rs/Cargo.toml index 893962c..9d4c341 100644 --- a/packages/sidan-csl-rs/Cargo.toml +++ b/packages/sidan-csl-rs/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "sidan-csl-rs" -version = "0.6.12" +version = "0.6.13" edition = "2021" license = "Apache-2.0" description = "Wrapper around the cardano-serialization-lib for easier transaction building, heavily inspired by cardano-cli APIs" diff --git a/packages/sidan-csl-rs/src/builder/core.rs b/packages/sidan-csl-rs/src/builder/core.rs index 05b8599..8f1914b 100644 --- a/packages/sidan-csl-rs/src/builder/core.rs +++ b/packages/sidan-csl-rs/src/builder/core.rs @@ -50,8 +50,9 @@ pub fn js_serialize_tx_body(mesh_tx_builder_body_json: &str, params_json: &str) #[test] fn test_js_serialize_tx_body() { - let mesh_tx_builder_body_json = r#"{"inputs":[{"pubKeyTxIn":{"txIn":{"txHash":"5b0145fe7b0212a7807e7dba24997049374d965f587300a2039b73cd30806c78","txIndex":1,"amount":[{"unit":"lovelace","quantity":"1132923230"}],"address":"addr_test1qq0yavv5uve45rwvfaw96qynrqt8ckpmkwcg08vlwxxdncxk82f5wz75mzaesmqzl79xqsmedwgucwtuav5str6untqqmykcpn"}}}],"outputs":[{"address":"addr_test1wpnlxv2xv9a9ucvnvzqakwepzl9ltx7jzgm53av2e9ncv4sysemm8","amount":[{"unit":"lovelace","quantity":"1600000"}],"datum":{"hash":{"type":"Mesh","content":"supersecret"}},"referenceScript":null}],"collaterals":[{"txIn":{"txHash":"ec0c2e70b898cf531b03c9db937602e98c45378d9fa8e8a5b5a91ec5c1d7540d","txIndex":5,"amount":[{"unit":"lovelace","quantity":"5000000"}],"address":"addr_test1qq0yavv5uve45rwvfaw96qynrqt8ckpmkwcg08vlwxxdncxk82f5wz75mzaesmqzl79xqsmedwgucwtuav5str6untqqmykcpn"}}],"requiredSignatures":[],"referenceInputs":[],"mints":[],"changeAddress":"addr_test1qq0yavv5uve45rwvfaw96qynrqt8ckpmkwcg08vlwxxdncxk82f5wz75mzaesmqzl79xqsmedwgucwtuav5str6untqqmykcpn","metadata":[],"validityRange":{"invalidBefore":null,"invalidHereafter":null},"certificates":[],"signingKey":[],"withdrawals":[]}"#; - let params_json = r#"{"epoch":0,"coinsPerUTxOSize":"4310","priceMem":0.0577,"priceStep":0.0000721,"minFeeA":44,"minFeeB":155381,"keyDeposit":"2000000","maxTxSize":16384,"maxValSize":"5000","poolDeposit":"500000000","maxCollateralInputs":3,"decentralisation":0,"maxBlockSize":98304,"collateralPercent":150,"maxBlockHeaderSize":1100,"minPoolCost":"340000000","maxTxExMem":"16000000","maxTxExSteps":"10000000000","maxBlockExMem":"80000000","maxBlockExSteps":"40000000000"}"#; + let mesh_tx_builder_body_json = r#"{"inputs":[{"pubKeyTxIn":{"txIn":{"txHash":"989c9d1b383a79dbfc7ff197f0cbf2e38cb35ae2c982ba0b5b0d3bee92be7b19","txIndex":0,"amount":[{"unit":"lovelace","quantity":"1000000000"}],"address":"addr_test1qrjvlw7rzlr33audzdak2dwcjsrp3npa9tqy78e44nmcu5ap2gwze63uc7tk94t4tq0y06nqhr42qdpsw9k06c2qc7tqzjkxjr"}}}],"outputs":[{"address":"addr_test1qrjvlw7rzlr33audzdak2dwcjsrp3npa9tqy78e44nmcu5ap2gwze63uc7tk94t4tq0y06nqhr42qdpsw9k06c2qc7tqzjkxjr","amount":[{"unit":"67dd133868f14107b25772f3c5abaa1e0549f4b400b5e0e3a1136152000643b05465737431","quantity":"1"}],"datum":null,"referenceScript":null},{"address":"addr_test1wpna6yecdrc5zpaj2ae083dt4g0q2j05ksqttc8r5yfkz5sxwvzyq","amount":[{"unit":"67dd133868f14107b25772f3c5abaa1e0549f4b400b5e0e3a1136152000de1405465737431","quantity":"1"}],"datum":{"inline":"d8799fa4446e616d6545546573743145696d6167655835697066733a2f2f516d527a6963705265757477436b4d36616f74754b6a4572464355443231334470775071364279757a4d4a617561496d656469615479706549696d6167652f6a70674b6465736372697074696f6e5348656c6c6f20776f726c64202d20434950363802ff"},"referenceScript":null}],"collaterals":[],"requiredSignatures":["e4cfbbc317c718f78d137b6535d8940618cc3d2ac04f1f35acf78e53"],"referenceInputs":[],"mints":[{"scriptMint":{"mint":{"policyId":"67dd133868f14107b25772f3c5abaa1e0549f4b400b5e0e3a1136152","assetName":"000643b05465737431","amount":1},"redeemer":{"data":"d8799f446d657368ff","exUnits":{"mem":7000000,"steps":3000000000}},"scriptSource":{"providedScriptSource":{"scriptCbor":"5883588101000032323232323232322232533300632323232533300a3370e9000000899b8f375c601c601000e911046d6573680014a0601000260180026018002600800429309b2b19299980319b87480000044c8c94ccc02cc03400852616375c601600260080062c60080044600a6ea80048c00cdd5000ab9a5573aaae7955cfaba15745","languageVersion":"v2"}}}},{"scriptMint":{"mint":{"policyId":"67dd133868f14107b25772f3c5abaa1e0549f4b400b5e0e3a1136152","assetName":"000de1405465737431","amount":1},"redeemer":{"data":"d8799f446d657368ff","exUnits":{"mem":7000000,"steps":3000000000}},"scriptSource":{"providedScriptSource":{"scriptCbor":"5883588101000032323232323232322232533300632323232533300a3370e9000000899b8f375c601c601000e911046d6573680014a0601000260180026018002600800429309b2b19299980319b87480000044c8c94ccc02cc03400852616375c601600260080062c60080044600a6ea80048c00cdd5000ab9a5573aaae7955cfaba15745","languageVersion":"v2"}}}}],"changeAddress":"addr_test1qq7lutcvhg5dl0z4rurdpdy9c0khp7ymel83wf8jt6d9qgap2gwze63uc7tk94t4tq0y06nqhr42qdpsw9k06c2qc7tql6q7cf","metadata":[],"validityRange":{"invalidBefore":null,"invalidHereafter":null},"certificates":[],"signingKey":[],"withdrawals":[]}"#; + // let mesh_tx_builder_body_json = r#"{"inputs":[{"pubKeyTxIn":{"txIn":{"txHash":"5b0145fe7b0212a7807e7dba24997049374d965f587300a2039b73cd30806c78","txIndex":1,"amount":[{"unit":"lovelace","quantity":"1132923230"}],"address":"addr_test1qq0yavv5uve45rwvfaw96qynrqt8ckpmkwcg08vlwxxdncxk82f5wz75mzaesmqzl79xqsmedwgucwtuav5str6untqqmykcpn"}}}],"outputs":[{"address":"addr_test1wpnlxv2xv9a9ucvnvzqakwepzl9ltx7jzgm53av2e9ncv4sysemm8","amount":[{"unit":"lovelace","quantity":"1600000"}],"datum":{"hash":{"type":"Mesh","content":"supersecret"}},"referenceScript":null}],"collaterals":[{"txIn":{"txHash":"ec0c2e70b898cf531b03c9db937602e98c45378d9fa8e8a5b5a91ec5c1d7540d","txIndex":5,"amount":[{"unit":"lovelace","quantity":"5000000"}],"address":"addr_test1qq0yavv5uve45rwvfaw96qynrqt8ckpmkwcg08vlwxxdncxk82f5wz75mzaesmqzl79xqsmedwgucwtuav5str6untqqmykcpn"}}],"requiredSignatures":[],"referenceInputs":[],"mints":[],"changeAddress":"addr_test1qq0yavv5uve45rwvfaw96qynrqt8ckpmkwcg08vlwxxdncxk82f5wz75mzaesmqzl79xqsmedwgucwtuav5str6untqqmykcpn","metadata":[],"validityRange":{"invalidBefore":null,"invalidHereafter":null},"certificates":[],"signingKey":[],"withdrawals":[]}"#; + let params_json = r#"{"epoch":0,"coinsPerUtxoSize":4310,"priceMem":0.0577,"priceStep":0.0000721,"minFeeA":44,"minFeeB":155381,"keyDeposit":2000000,"maxTxSize":16384,"maxValSize":5000,"poolDeposit":500000000,"maxCollateralInputs":3,"decentralisation":0,"maxBlockSize":98304,"collateralPercent":150,"maxBlockHeaderSize":1100,"minPoolCost":"340000000","maxTxExMem":"16000000","maxTxExSteps":"10000000000","maxBlockExMem":"80000000","maxBlockExSteps":"40000000000"}"#; let tx_build_result = js_serialize_tx_body(mesh_tx_builder_body_json, params_json); println!("{:?}", tx_build_result); } diff --git a/packages/sidan-csl-rs/src/core/builder.rs b/packages/sidan-csl-rs/src/core/builder.rs index 0e6e1e4..a225dc6 100644 --- a/packages/sidan-csl-rs/src/core/builder.rs +++ b/packages/sidan-csl-rs/src/core/builder.rs @@ -610,7 +610,7 @@ impl IMeshCSL for MeshCSL { } fn build_tx(&mut self) -> Result { - let tx = self.tx_builder.build_tx().unwrap(); + let tx = self.tx_builder.build_tx()?; self.tx_hex = tx.to_hex(); Ok(self.tx_hex.to_string()) } diff --git a/packages/whisky-examples/Cargo.toml b/packages/whisky-examples/Cargo.toml index 3096cdd..78ca568 100644 --- a/packages/whisky-examples/Cargo.toml +++ b/packages/whisky-examples/Cargo.toml @@ -1,9 +1,9 @@ [package] name = "whisky-examples" -version = "0.6.12" +version = "0.6.13" edition = "2021" license = "Apache-2.0" description = "The Cardano Rust SDK, inspired by MeshJS" [dependencies] -whisky = { version = "=0.6.12", path = "../whisky" } +whisky = { version = "=0.6.13", path = "../whisky" } diff --git a/packages/whisky/Cargo.toml b/packages/whisky/Cargo.toml index 885fa01..8bd18b5 100644 --- a/packages/whisky/Cargo.toml +++ b/packages/whisky/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "whisky" -version = "0.6.12" +version = "0.6.13" edition = "2021" license = "Apache-2.0" description = "The Cardano Rust SDK, inspired by MeshJS" @@ -24,8 +24,8 @@ noop_proc_macro = "0.3.0" pallas-codec = "0.22.0" pallas-primitives = "0.22.0" pallas-traverse = "0.22.0" -maestro = { version = "1.1.2", git = "https://github.com/maestro-org/rust-sdk.git" } -sidan-csl-rs = { version = "=0.6.12", path = "../sidan-csl-rs" } +maestro = { git = "https://github.com/maestro-org/rust-sdk.git", rev = "831f54e8ead69951444d10597e50c0d882d11471" } +sidan-csl-rs = { version = "=0.6.13", path = "../sidan-csl-rs" } reqwest = "0.12.5" tokio = { version = "1.38.0", features = ["macros", "rt-multi-thread"] }