diff --git a/types/src/json/block.rs b/types/src/json/block.rs index 96c7e7b..5d2ec96 100644 --- a/types/src/json/block.rs +++ b/types/src/json/block.rs @@ -204,8 +204,6 @@ mod test { use hex_literal::hex; use pretty_assertions::assert_eq; - use crate::json::tx::RctSignatures; - use super::*; #[expect(clippy::needless_pass_by_value)] diff --git a/types/src/json/tx.rs b/types/src/json/tx.rs index b016597..0e95ae0 100644 --- a/types/src/json/tx.rs +++ b/types/src/json/tx.rs @@ -122,7 +122,7 @@ impl From for Transaction { } } - #[expect(unreachable_code, unused_variables, reason = "TODO: finish impl")] + #[expect(unused_variables, reason = "TODO: finish impl")] match tx { transaction::Transaction::V1 { prefix, signatures } => Self::V1 { prefix: map_prefix(prefix, 1), @@ -194,21 +194,23 @@ impl From for Transaction { /// [`Transaction::V2::rct_signatures`]. #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] +#[cfg_attr(feature = "serde", serde(untagged))] pub enum RctSignatures { - Coinbase { - r#type: u8, - }, NonCoinbase { r#type: u8, txnFee: u64, ecdhInfo: Vec, outPk: Vec, }, + Coinbase { + r#type: u8, + }, } /// [`Transaction::V2::rctsig_prunable`]. #[derive(Clone, Debug, PartialEq, Eq, PartialOrd, Ord, Hash)] #[cfg_attr(feature = "serde", derive(Serialize, Deserialize))] +#[cfg_attr(feature = "serde", serde(untagged))] pub enum RctSigPrunable { MlsagBorromean { rangeSigs: Vec, @@ -218,19 +220,19 @@ pub enum RctSigPrunable { nbp: u64, bp: Vec, MGs: Vec, - pseudoOuts: Vec, + pseudoOuts: Vec, }, ClsagBulletproofs { nbp: u64, bp: Vec, CLSAGs: Vec, - pseudoOuts: Vec, + pseudoOuts: Vec, }, ClsagBulletproofsPlus { nbp: u64, bpp: Vec, CLSAGs: Vec, - pseudoOuts: Vec, + pseudoOuts: Vec, }, } @@ -339,8 +341,8 @@ pub struct Clsag { #[expect(variant_size_differences)] pub enum EcdhInfo { Original { - amount: HexBytes32, mask: HexBytes32, + amount: HexBytes32, }, Compact { amount: HexBytes8, @@ -379,412 +381,458 @@ pub struct Key { #[cfg(test)] mod test { + use hex_literal::hex; + use pretty_assertions::assert_eq; + use super::*; - const TX_V1: &str = r#"{ - "version": 1, - "unlock_time": 0, - "vin": [ - { - "key": { - "amount": 2865950000, - "key_offsets": [ - 0 - ], - "k_image": "f1b0eeff62493ea78b2b7e843c278d6d5a7b09adf0cbc83560380d1fe397d6f3" - } - }, - { - "key": { - "amount": 6000000000000, - "key_offsets": [ - 75146 - ], - "k_image": "3d289ab83c06e0948a460e836699a33fe9c300b2448c0f2de0e3b40c13d9bd78" - } - }, - { - "key": { - "amount": 3000000000000, - "key_offsets": [ - 49742 - ], - "k_image": "52a32e6ecadcce76c11262eda8f7265c098b3da1f6e27ae8c9656636faf51ae4" - } - } - ], - "vout": [ - { - "amount": 29220020000, - "target": { - "key": "f9da453f7cd5248e109de3216208eb9ec8617b0739450405de582f09b7e3fc47" - } - }, - { - "amount": 400000000000, - "target": { - "key": "c31ce6d52fae900ffab9f30b036bbdea0b9442b589cbe24c2e071ddb8291da14" - } - }, - { - "amount": 400000000000, - "target": { - "key": "bd570e3805c0198c92f9a24d8f12e9dbe88570196efd176b7f186ade904803f4" - } - }, - { - "amount": 1000000000000, - "target": { - "key": "84d1ba528dfc2e2ff29b3840fc3ae1c87ae5f750e582b78c4161a6bdb6a4717a" - } - }, - { - "amount": 7000000000000, - "target": { - "key": "993fd478527fd3e790fd3f5a0d9a3a39bebe72598cc81cb9936e08dea7e5fb0f" - } - } - ], - "extra": [ - 2, - 33, - 0, - 236, - 254, - 1, - 219, - 138, - 20, - 181, - 240, - 174, - 155, - 149, - 49, - 142, - 23, - 185, - 3, - 251, - 47, - 59, - 239, - 236, - 73, - 246, - 142, - 19, - 181, - 27, - 254, - 76, - 248, - 75, - 191, - 1, - 180, - 204, - 225, - 45, - 175, - 103, - 127, - 119, - 53, - 211, - 168, - 192, - 138, - 14, - 121, - 64, - 19, - 218, - 222, - 27, - 66, - 129, - 115, - 185, - 5, - 113, - 142, - 40, - 157, - 70, - 87, - 62 - ], - "signatures": [ - "318755c67c5d3379b0958a047f5439cf43dd251f64b6314c84b2edbf240d950abbeaad13233700e6b6c59bea178c6fbaa246b8fd84b5caf94d1affd520e6770b", - "a47e6a65e907e49442828db46475ecdf27f3c472f24688423ac97f0efbd8b90b164ed52c070f7a2a95b95398814b19c0befd14a4aab5520963daf3482604df01", - "fa6981c969c2a1b9d330a8901d2ef7def7f3ade8d9fba444e18e7e349e286a035ae1729a76e01bbbb3ccd010502af6c77049e3167cf108be69706a8674b0c508" - ] -}"#; - - const TX_V2: &str = r#"{ - "version": 2, - "unlock_time": 0, - "vin": [ - { - "key": { - "amount": 0, - "key_offsets": [ - 104873455, - 7761876, - 1191168, - 515412, - 443037, - 240409, - 417907, - 229271, - 42976, - 60086, - 36001, - 25181, - 8268, - 552, - 43, - 936 - ], - "k_image": "c8be63514785a7ba52ef83a3e9ef42dde17d254ba1bb17a931ebf64e3538db94" - } - }, - { - "key": { - "amount": 0, - "key_offsets": [ - 66962661, - 37107349, - 1971927, - 8462913, - 439617, - 194053, - 298194, - 91260, - 202657, - 9043, - 29583, - 38303, - 33141, - 366, - 297, - 3110 - ], - "k_image": "a61fbf0ddd5ba1f47b1b02954851a1870429f2f4f0e0034d09a565e110000d36" - } - } - ], - "vout": [ - { - "amount": 0, - "target": { - "tagged_key": { - "key": "5c27e37aceee3193785ae42c3f4ac3517aef57e298e04f18ce1f7fff189a6de8", - "view_tag": "37" - } - } - }, - { - "amount": 0, - "target": { - "tagged_key": { - "key": "ad431308c15cfe0c9160f47d173cd242e3bac77b5ffdc689cd6c5dfdc48a62b7", - "view_tag": "77" - } - } - }, - { - "amount": 0, - "target": { - "tagged_key": { - "key": "59668bf8df28e92139c3a1e4a6827ac343355d01c5d4d5e793d62a88e68834b3", - "view_tag": "1b" - } - } - }, - { - "amount": 0, - "target": { - "tagged_key": { - "key": "b4ab7f00d3019b5d95c1b58c1264095fdb9fdf5897a7dc71688077b37b4f9e3e", - "view_tag": "47" - } - } - }, - { - "amount": 0, - "target": { - "tagged_key": { - "key": "11000d47d01b1413005d63fdcd3d8a12292c120f3eb9090dd3ea242d88285f28", - "view_tag": "8b" - } - } - } - ], - "extra": [ - 1, - 156, - 116, - 120, - 105, - 226, - 90, - 59, - 60, - 96, - 67, - 23, - 159, - 24, - 92, - 50, - 203, - 212, - 51, - 36, - 95, - 185, - 2, - 153, - 129, - 0, - 209, - 64, - 153, - 211, - 117, - 50, - 145 - ], - "rct_signatures": { - "type": 6, - "txnFee": 80000000, - "ecdhInfo": [ - { - "amount": "3021a356ad9a2fbf" - }, - { - "amount": "9b8f973f7a87fa8f" - }, - { - "amount": "3e7cece72e8bfb94" - }, - { - "amount": "a85e3a67f8868bce" - }, - { - "amount": "2770d589d6a03b0d" - } - ], - "outPk": [ - "d086c6b35ed7372c700cbb12e2a2e1b78f202fc2a181c4cc1dc158a472746da7", - "ec9f8635bda0326937ff7b8ad757a65260b9ec8eda2f57a4d115281906863b35", - "4d190dca5d18867db8ee45627538669d0cf61f1337d09366d3a0cf5d0b2209d6", - "62e032a151d7bbc9f3430ef28afddaa3d8dd279cc9e13e2b9fbe32c48df79ee2", - "6adea4761b71115c712a230b67154a256f7375e5a1b75ccbf0212726932447b3" - ] - }, - "rctsig_prunable": { - "nbp": 1, - "bpp": [ - { - "A": "adb7b046ad4acea47a9e481c97b18833f91e7202e09a6eaf22af8d3cf00772f8", - "A1": "fc8d90de80c1160fe693e4e34bb52aa3aba673bb90cf47441f5aa619ec91df8b", - "B": "28f19abd4b40596b09f1f157c131cc7a80c4c2ad8beb0c4cf7eba1ce7109c83b", - "r1": "9e55a9119e231cd62d845e6869ade0945298c8e16cc773cddd9a0bb8eddfd60d", - "s1": "a992df2f44f1a30b5998b814fdccd38c4db3fe9ee2ca51f37b3d1a8098bd4004", - "d1": "61deab0c8d7532c683be8c7acd0ee7d80d5caf2715b51b3921fe21e8efa52000", - "L": [ - "7cc0dd838450265051bb108163c0aabb5fb5fc0ca4a76151ba19127077d2d732", - "434cc644088c52f3ccd7f10aacbf4f30212ddd13b2574dce2bf9409f7b34de47", - "0386b8bdae7b85fc040ced37bd0b4d3abac67d51f1b6367e5b77eafac70947c2", - "426ab7f906ae1ff89802e7c40c7320a381dcada3ba37e048bf020e779ac15ead", - "262f99fa8fd56506fde92530d063478e98fec4277f190878b5b918785f9ff352", - "64402683c59318685153ce72f35489a92be49aea3dfff8e6822db399a83f16ca", - "33561a93fce948dc55fdba2caf7db28d5dc435e3c673cc0cad315de35254a847", - "8f2676e0d873f980d08c7f495b2bf635177c6e4adc2e8e1ee06191ac2ec4b9df", - "74e2cc5bf28cabff4d02f024617a3e306399dd7e9b64c4d851a7501070b7f6da" - ], - "R": [ - "cde5e88c8e713caea7a24b43f48565b8da478830ecca0fe64a73480b958012e3", - "856812e06eca491cd70cc27e1b5cdd2c687f68a7d1e3898a370afbab401f27b2", - "d8ba4e8f39ddc60f57a3cfbff75d06b060d22c29247458684144898afe89ebaf", - "e24de13affe388ded61f03e31b5904316e357749c209b0240c9fb56f30beb73e", - "995a65fd649821ccb2cb7ffce2c18f42bca8f26aed818638eae42a55de93221b", - "9f872c21a7722a3dcbc086807f643ca5c845f9cc8a9872c45f9002e79d33750c", - "ca945036b842d34cfdcd0d83593fd51cc3afe957d18ac7d62f60f95316394925", - "2bf60a8710dd0c7248c721bde67c8de6faa3a3e52cbe311871d4129ce38db0d9", - "f32facb96c62423485961fdb3a1a46e75c4ef427aa5dad52d82f2180d7943ab2" - ] - } - ], - "CLSAGs": [ - { - "s": [ - "95f0a2b851b713a95a9de83506163575d0e70845abac0ce505975c5976d68a04", - "d0905df02715524276879c719f7589e8e04ca9141156420c31c66e3cd2969e02", - "3dd6edaa79da483b702692191e4fdc915931cd998dbe06ffd0a0799ec6c07108", - "9f07ea9f72bad8eb2e7c4f85b1d90c8bd9496f4cf0ff388f97f75b56a751ed0d", - "d9b9ba843a88eef547e4405eaf7e11b830d02524fbbdfb3b500f1dea057bf406", - "3799dbac4d9f252c5e4d83bcddb21ef238a94a3b4975eb9ea02414f29726630c", - "7ca20ca61af99f6e364c9ca976bbcf17cbd3edc388742b64766292c2c1288a04", - "f8841da616ad3244f4953490a3446106988c5817403d96ba35db6893dfa87802", - "2eaa6f8d6b6c4f57a187f4d43fc992dc2d782e589f617d150447f78007820509", - "00c472230404c5a84054d8503c6525cd5328b6569234db9e3a58b0a3aa306f01", - "53bd321e866bb4ed47b43cac58ec3b3e1c6673783b861abfac3a695cf4019a0f", - "619134575b20438bfeb161b68561b3071b7d7408180be80528846aa2241bb70f", - "f47a93fe330625119f2c50c4f719eef781a1433a9f589ce6389f3ff7f6c4c306", - "cc89c22cd2951b14a57a8e84e3ceb5d8663601be8938f426e51aa543d3e64504", - "85bb683cc3f7a581efa51b661833a39ac2a97298bff2401dd9e683fd6c07f307", - "1117b4db787168112be7537d0b066c5dcf7b2ec8802281e3bc6d38e5dd58050e" - ], - "c1": "ee19318f08b297e532f83fb26b510319752d389cdf75419d70dbe83b2f803704", - "D": "2c80798ca44b918b52ac55aaf2d4dd7f291dfa96caf1564c5a14c55ca3b247fe" - }, - { - "s": [ - "17be660e19be72df803bf9edddad0458e3d274db1dcfe6571b54f9b291477009", - "c76533fdab4b47af480d8051fab3ad0290dd9446bb50b27ff493e8401c63bc08", - "2e9bd6d0075461a6d2b252274374d8bfeb64c0e05c970a2c873deebd25dfc303", - "2cb33a3074fdb945a0fc645428031e63b50f6277f3044e21f82bf0b776234d0e", - "c3fbe42cf1f9459186a74460ea92f15396cf984bde69b9c7498948d015d09806", - "94de99c87421c181ea56a4bfb69bc8119dc95bc850addef77c920a6be1670d01", - "1c57a1e7acb3c8560d4ca32778ec1d9d7d27cd75aa8dc979b4c02e5413a32b03", - "7e78b90201b46317b136e274cb1a401f08f09d286c7dd5235ffa3bfe4159640d", - "de85c14dea6095844f33fe62d5f206c384c1c865be1ede42eb73223eb671cc0b", - "5606f93e9231a8acbb4d611a39ea7b2d5ca4077c5155dfd352b04b35c99b980d", - "78ea32e2c430e93542f5b90d4357664e8d69eeb323864db55037787dd301bb02", - "102122debdd6fd13e7b2b3b98f782c0c73bd375eed85babceb6b439c0b2a2d02", - "a0c1ca8b7b9225f3f7afa0d9f8e64d0f780df09d41952ff9b6e089327b98e102", - "0ffeee417cc3793c890b5c09ae887b91523b4e9f973694131b3f9f9b1affb808", - "9e39602c499e9635361434003dec05f72da457e006f9baa43c974ccd58919c06", - "476bbbdde6c0ea86c0df3eedebe6b5c26005d1eea08e25b85e42e763b1fe3303" - ], - "c1": "beee3edaa85848bd41d6241920a986a39a2a6d4da2b94871c017d4e7607de301", - "D": "9a09b5229935adc0be81442f7d630c1db147cc6cce1be0b7066dcc250845b64c" - } - ], - "pseudoOuts": [ - "dcba4eb02c6c0c1bebe48e056feac096e4888ba63c06a15c520b6da0b46f8d38", - "ab4c413de7e1e7fa9d0d5d96ae826f17648c201701ffc03e6fe69f5cd7bacd60" - ] - } -}"#; - - fn test(tx_json: &'static str) { + #[expect(clippy::needless_pass_by_value)] + fn test(tx: Transaction, tx_json: &'static str) { let json = serde_json::from_str::(tx_json).unwrap(); - let string = serde_json::to_string_pretty(&json).unwrap(); + assert_eq!(tx, json); + let string = serde_json::to_string(&json).unwrap(); assert_eq!(tx_json, &string); } #[test] fn tx_v1() { - test(TX_V1); + const JSON: &str = r#"{"version":1,"unlock_time":0,"vin":[{"key":{"amount":2865950000,"key_offsets":[0],"k_image":"f1b0eeff62493ea78b2b7e843c278d6d5a7b09adf0cbc83560380d1fe397d6f3"}},{"key":{"amount":6000000000000,"key_offsets":[75146],"k_image":"3d289ab83c06e0948a460e836699a33fe9c300b2448c0f2de0e3b40c13d9bd78"}},{"key":{"amount":3000000000000,"key_offsets":[49742],"k_image":"52a32e6ecadcce76c11262eda8f7265c098b3da1f6e27ae8c9656636faf51ae4"}}],"vout":[{"amount":29220020000,"target":{"key":"f9da453f7cd5248e109de3216208eb9ec8617b0739450405de582f09b7e3fc47"}},{"amount":400000000000,"target":{"key":"c31ce6d52fae900ffab9f30b036bbdea0b9442b589cbe24c2e071ddb8291da14"}},{"amount":400000000000,"target":{"key":"bd570e3805c0198c92f9a24d8f12e9dbe88570196efd176b7f186ade904803f4"}},{"amount":1000000000000,"target":{"key":"84d1ba528dfc2e2ff29b3840fc3ae1c87ae5f750e582b78c4161a6bdb6a4717a"}},{"amount":7000000000000,"target":{"key":"993fd478527fd3e790fd3f5a0d9a3a39bebe72598cc81cb9936e08dea7e5fb0f"}}],"extra":[2,33,0,236,254,1,219,138,20,181,240,174,155,149,49,142,23,185,3,251,47,59,239,236,73,246,142,19,181,27,254,76,248,75,191,1,180,204,225,45,175,103,127,119,53,211,168,192,138,14,121,64,19,218,222,27,66,129,115,185,5,113,142,40,157,70,87,62],"signatures":["318755c67c5d3379b0958a047f5439cf43dd251f64b6314c84b2edbf240d950abbeaad13233700e6b6c59bea178c6fbaa246b8fd84b5caf94d1affd520e6770b","a47e6a65e907e49442828db46475ecdf27f3c472f24688423ac97f0efbd8b90b164ed52c070f7a2a95b95398814b19c0befd14a4aab5520963daf3482604df01","fa6981c969c2a1b9d330a8901d2ef7def7f3ade8d9fba444e18e7e349e286a035ae1729a76e01bbbb3ccd010502af6c77049e3167cf108be69706a8674b0c508"]}"#; + + let tx = Transaction::V1 { + prefix: TransactionPrefix { + version: 1, + unlock_time: 0, + vin: vec![ + Input { + key: Key { + amount: 2865950000, + key_offsets: vec![0], + k_image: HexBytes32(hex!( + "f1b0eeff62493ea78b2b7e843c278d6d5a7b09adf0cbc83560380d1fe397d6f3" + )), + }, + }, + Input { + key: Key { + amount: 6000000000000, + key_offsets: vec![75146], + k_image: HexBytes32(hex!( + "3d289ab83c06e0948a460e836699a33fe9c300b2448c0f2de0e3b40c13d9bd78" + )), + }, + }, + Input { + key: Key { + amount: 3000000000000, + key_offsets: vec![49742], + k_image: HexBytes32(hex!( + "52a32e6ecadcce76c11262eda8f7265c098b3da1f6e27ae8c9656636faf51ae4" + )), + }, + }, + ], + vout: vec![ + Output { + amount: 29220020000, + target: Target::Key { + key: HexBytes32(hex!( + "f9da453f7cd5248e109de3216208eb9ec8617b0739450405de582f09b7e3fc47" + )), + }, + }, + Output { + amount: 400000000000, + target: Target::Key { + key: HexBytes32(hex!( + "c31ce6d52fae900ffab9f30b036bbdea0b9442b589cbe24c2e071ddb8291da14" + )), + }, + }, + Output { + amount: 400000000000, + target: Target::Key { + key: HexBytes32(hex!( + "bd570e3805c0198c92f9a24d8f12e9dbe88570196efd176b7f186ade904803f4" + )), + }, + }, + Output { + amount: 1000000000000, + target: Target::Key { + key: HexBytes32(hex!( + "84d1ba528dfc2e2ff29b3840fc3ae1c87ae5f750e582b78c4161a6bdb6a4717a" + )), + }, + }, + Output { + amount: 7000000000000, + target: Target::Key { + key: HexBytes32(hex!( + "993fd478527fd3e790fd3f5a0d9a3a39bebe72598cc81cb9936e08dea7e5fb0f" + )), + }, + }, + ], + extra: vec![ + 2, 33, 0, 236, 254, 1, 219, 138, 20, 181, 240, 174, 155, 149, 49, 142, 23, 185, + 3, 251, 47, 59, 239, 236, 73, 246, 142, 19, 181, 27, 254, 76, 248, 75, 191, 1, + 180, 204, 225, 45, 175, 103, 127, 119, 53, 211, 168, 192, 138, 14, 121, 64, 19, + 218, 222, 27, 66, 129, 115, 185, 5, 113, 142, 40, 157, 70, 87, 62, + ], + }, + signatures: vec![ + HexBytes64(hex!("318755c67c5d3379b0958a047f5439cf43dd251f64b6314c84b2edbf240d950abbeaad13233700e6b6c59bea178c6fbaa246b8fd84b5caf94d1affd520e6770b")), + HexBytes64(hex!("a47e6a65e907e49442828db46475ecdf27f3c472f24688423ac97f0efbd8b90b164ed52c070f7a2a95b95398814b19c0befd14a4aab5520963daf3482604df01")), + HexBytes64(hex!("fa6981c969c2a1b9d330a8901d2ef7def7f3ade8d9fba444e18e7e349e286a035ae1729a76e01bbbb3ccd010502af6c77049e3167cf108be69706a8674b0c508")) + ], + }; + + test(tx, JSON); } #[test] - fn tx_v2() { - test(TX_V2); + fn tx_rct_3() { + const JSON: &str = r#"{"version":2,"unlock_time":0,"vin":[{"key":{"amount":0,"key_offsets":[8608351,301575,15985,56460,28593,9238,1709,170,369,1874,681],"k_image":"86e1cc68d3970757c4a265a7c28c3a39fe230851f2d8a14c5916a6aa60dbc892"}}],"vout":[{"amount":0,"target":{"key":"f21fd68e011df2e544a3d33221172baf921a121c85d1a2190c42e81d5dd1830e"}},{"amount":0,"target":{"key":"64a3e54d80a729f69ae04f85db06dd26a96f3b05674f6927337a755a9cdaefeb"}},{"amount":0,"target":{"key":"ad2ccf74d2c99946af10cedc922a87c30a4b1c0d7a13143e71d31cd788b0c171"}},{"amount":0,"target":{"key":"e03d9b552a50734487ed0da40ba977f718c91a782fe85899debfd2c56ea3e551"}},{"amount":0,"target":{"key":"b312d502c1b71a10d9483fb816e17d27d0508b5b74c462e14dca52395a14a155"}}],"extra":[1,224,97,197,75,148,190,193,227,206,86,37,3,184,209,129,160,202,192,210,43,32,138,51,151,70,119,47,146,57,223,154,50,4,5,0,191,65,91,3,171,12,85,167,171,16,104,155,253,200,141,80,208,150,162,213,53,57,197,121,68,106,70,96,188,175,119,160,72,148,223,225,199,34,97,143,5,107,219,86,93,114,31,160,6,17,195,221,157,186,50,144,147,117,99,25,160,173,15,167,20,15,91,127,217,28,255,151,248,119,197,199,201,4,248,90,115,44,13,172,116,229,191,216,187,111,255,104,43,62,207,138,134,126,114,34,99,248,241,243,25,208,2,7,247,134,6,9,213,173,242,95,39,187,214,105,81,94,111,53,212,160,183,216,152,137,123,32,101,253,223,108,59,6,176,24,161,45,42,98,92,200,74,34,7,116,231,53,86,94,40,84,151,129,250],"rct_signatures":{"type":3,"txnFee":86000000,"ecdhInfo":[{"mask":"95f1dcd5076d92d9592f1ad5d2e60e8b353c0048da1833db3d11634a9deff50f","amount":"9386f5401e2577e66dea290aae981a85f75ab81d21cd8060b6a2070c0c3d4209"},{"mask":"9a3015d73ee53f40c4a194c725aa5cea4822b99442ddb94223a52e365e02f70b","amount":"40b471293514f4399782abfe2968f5bb297a77b16b58261df7cffc60b68a5b04"},{"mask":"64b2b70d2e61fd4ac5c6d92f61d85dda1daf948853cc303a3a39baeeece41e08","amount":"b388bdce5bd31493dae245af4dbfc8486d959ef28af4ad1c1338f43dd3bd5a01"},{"mask":"e8d8b9380c446cace527ea1864d69f524b2c6b8eaf08f0f6c36621e73de49d0a","amount":"c74b47b823b7e5f2744e9643e4490f236eb9de006acd7bb8a32cca2f56223b06"},{"mask":"1ec895cc03e6831311a3ab6f86745312feec53de5aef1e1f204a984f082bff0c","amount":"d16c02a92488cd7d5fdf3c461ff8f4f7e75a18644e810ddd55a153e79464af0a"}],"outPk":["ff1a463fcb285d747df43612cc3bc925d4d27bebb08537b177a0dba960f90131","6b62f6ed7338cbf9b2639620400690676fa9d43aca93da4a9dc56d665a72b506","9363af049e5b0530fd77f884e84838efcabebf5fff57e2f00b49148c6415eafc","2fc11a581752a6465d59217e6a5841170de3ba96e27d2744ad280b5242efa9e7","56b6c2ca082d95600584ca429e6723816d4496cbf6f586cf1cfe2e0319224451"]},"rctsig_prunable":{"nbp":1,"bp":[{"A":"4e3433b32bd6d349774eac4ad467e698125d9e0402d216609ff0f4cfc216c50c","S":"7f6d8c127e4138c6153954836b127694786b890a138bae684eb951fb0fbf9be4","T1":"40ee0b2925d7555c17dd38bb69b80e1cfc05aa8b9dc2bd088c1361321a09d4f4","T2":"1488d918c2acdd6ff9e8d5bf82a08599733b9084cdfb0f891c9254742f2ea258","taux":"9b26002cff6e74e3da8ce59cadea4c8a0d93b9d4d94e6764031c21ecbac5f600","mu":"a414b36b00a290c62a443282295f50f381a44197af5db74f518a1b77dd8c120a","L":["d4c3360932332dd3cc407d857c6e759d7c29d10deede96a0649bba89fbdb0e04","33d7311748c6ee1fa92311513a3f32acf0bbcbd1c507e4378db19f108914f6c1","aeedddc3feaa374880a388a992e38027d97c8e0e3728fd536fb2f0a560f5f481","662e94760e3d51cf89a39db06c8f95e08b923ed97e883e9144d15f21e1639011","c07d35cb78309eec01052227df1967c0e0d553f6ca5d592f34bbeebcecdc78a8","9954f3a6c818fd5aed6fd7c94fdaf4f49d2159c47e31b953c3e44e11aa4c9943","a22d2b47f1a051daece177803252b976c33ac5e2a8c487afd89d61f3a08180f0","3ce357034185a6f540d00b2ab8229e64d2d6cad27a2b141d6f6e202307d959ae","5906da535fbd816292692880fe4630e9ed1dd2dc94495a4f7db080e18fd4a8e0"],"R":["0b40204226678fee886140e7c20e809165a58e1355101a2c5bdf7c797811ac21","94a1da201d9e85ad6ac564fe2e6a1fa62873d78e33a5931fd143ed165b360eba","fc458a6c42264f6c8890a386b7a68543a952ecc2b6239138b548c25d6bfa6c68","052da59d062001df5d95d3117deecb9b3175ed59a44aba9b92f84add748c1698","5aa7cf7545d4859a62903b29500449813a231a0c25cdb133a4780a9b0a411cd0","5366ad21b6b33b8f43aecfda087f0aee9cfdc2836e59f7721856058685965b39","960c4764aea3c0dff74c88728514da160bd79712cd50a948bd8b52d9569e69b1","6db5c54be77c08460e4581ee7709c0179108b46a55c3858e0897bd4f12e3e913","ffb4d75cab91763dc3e556fce046413382c84abe24615ada0605a43f8de88309"],"a":"43bf84ef0f596d1d76990c5202261f0963dade1affc1eee92a0508f5ce8d2900","b":"747be0d98f642649d2925a459238ed13f65bd6f12019683d4ede505394341604","t":"8592adba69d884c48e52135909a9738eafae80e590ae245b1a9ca65eea3a8b0f"}],"MGs":[{"ss":[["8a8838d965aa1bb49448c12ea1aabb680b393f5bf02e3b73874aa545cde6dc04","e16bf1d0c4c2639af6bed0c0205181b2a03bc5cdc22207906aac710acdd5170e"],["208d25cad34bcc9c49a5516102990814c75e0bbe2335b601880d9c6ce4fb400a","279a89826548b8b15ea342d892ca6f8bf9e6a5a14077a57edaa4fd676b0b9f0f"],["9edbd1d2082bad9dd9ca98baf82b4d70014dee720c758ed0944a9fb82ae55206","3314001eeec40a2e0ca83f48af1ade8b4139418da49e2c6d95aa3a1d4427de07"],["1837f42c1a4bd0747ed86c1e99bfe058031858c47ff4f066cfcdaf107499bf0f","963bd0ed98a01be7c847b393ad0c2c25c3052148d67126c12b25ec2239373005"],["e41e7dd0430ccbc17f717db7fa1720241ab4de24249c607b9f882143d266ff0e","95c4a4ec2756ec57caacb64f17a7e5306103f030dfb12dd53b42c72e68b6e60b"],["8ecfab987a8697c58f4b183620b2fa0e11972fa666b71c138e067621ab5d1703","2e070ae83ab7f01f91766c2fd6de425dc0f18ae4e34fdcb3ac18db4dfec77a0c"],["187cd1a318666e9f7a9f2f9d4eaf7c662c6162c5bc2be94219992f261f46b90b","97ca174ff4bcf1e5d139bf0ad85577b9c6247f9e4782cd69100e683bf2e3f80b"],["28eb6f60cfa35b52cbf74b7e68ce795ebfa0d3db6f00e69677fc98aef963bf05","6662186aa949465b7b2174d6da077ab8ffdddb710bdab42386e7d8ae20f1890d"],["577c9cf99480b0633121737756bcc7f4887fc7fdf3a9344c84578886e60d1404","2d241b48e63acc39c8c899f7c009fcbc09025ea1211930a338e193d17aed890a"],["7a3f489532743f117999a1b375789cd0863541cae0b8633e8cd4c7dedc740305","500c1033ca2b4b47c39e70a1c563553571e0e25a2e1fa984cb5ba08546bc4907"],["82efb453a98454e07e8f4b367ee0db2f957e6222e720a69354fdf910fe5fe803","1c3204cf63c8ba3ebd817d603a4e5cadfa6a9af5999648eabff7605b5de8b306"]],"cc":"8b579f973b9395a175fb2fc1df7d66511166c606903a3c082b63fa831e833b00"}],"pseudoOuts":["bd6260cafa1afbe44d24cf7c42ac9e2b451424472eb1334b3c042e82196be0d7"]}}"#; + + let tx = Transaction::V2 { + prefix: TransactionPrefix { + version: 2, + unlock_time: 0, + vin: vec![Input { + key: Key { + amount: 0, + key_offsets: vec![ + 8608351, 301575, 15985, 56460, 28593, 9238, 1709, 170, 369, 1874, 681, + ], + k_image: HexBytes32(hex!( + "86e1cc68d3970757c4a265a7c28c3a39fe230851f2d8a14c5916a6aa60dbc892" + )), + }, + }], + vout: vec![ + Output { + amount: 0, + target: Target::Key { + key: HexBytes32(hex!( + "f21fd68e011df2e544a3d33221172baf921a121c85d1a2190c42e81d5dd1830e" + )), + }, + }, + Output { + amount: 0, + target: Target::Key { + key: HexBytes32(hex!( + "64a3e54d80a729f69ae04f85db06dd26a96f3b05674f6927337a755a9cdaefeb" + )), + }, + }, + Output { + amount: 0, + target: Target::Key { + key: HexBytes32(hex!( + "ad2ccf74d2c99946af10cedc922a87c30a4b1c0d7a13143e71d31cd788b0c171" + )), + }, + }, + Output { + amount: 0, + target: Target::Key { + key: HexBytes32(hex!( + "e03d9b552a50734487ed0da40ba977f718c91a782fe85899debfd2c56ea3e551" + )), + }, + }, + Output { + amount: 0, + target: Target::Key { + key: HexBytes32(hex!( + "b312d502c1b71a10d9483fb816e17d27d0508b5b74c462e14dca52395a14a155" + )), + }, + }, + ], + extra: vec![ + 1, 224, 97, 197, 75, 148, 190, 193, 227, 206, 86, 37, 3, 184, 209, 129, 160, + 202, 192, 210, 43, 32, 138, 51, 151, 70, 119, 47, 146, 57, 223, 154, 50, 4, 5, + 0, 191, 65, 91, 3, 171, 12, 85, 167, 171, 16, 104, 155, 253, 200, 141, 80, 208, + 150, 162, 213, 53, 57, 197, 121, 68, 106, 70, 96, 188, 175, 119, 160, 72, 148, + 223, 225, 199, 34, 97, 143, 5, 107, 219, 86, 93, 114, 31, 160, 6, 17, 195, 221, + 157, 186, 50, 144, 147, 117, 99, 25, 160, 173, 15, 167, 20, 15, 91, 127, 217, + 28, 255, 151, 248, 119, 197, 199, 201, 4, 248, 90, 115, 44, 13, 172, 116, 229, + 191, 216, 187, 111, 255, 104, 43, 62, 207, 138, 134, 126, 114, 34, 99, 248, + 241, 243, 25, 208, 2, 7, 247, 134, 6, 9, 213, 173, 242, 95, 39, 187, 214, 105, + 81, 94, 111, 53, 212, 160, 183, 216, 152, 137, 123, 32, 101, 253, 223, 108, 59, + 6, 176, 24, 161, 45, 42, 98, 92, 200, 74, 34, 7, 116, 231, 53, 86, 94, 40, 84, + 151, 129, 250, + ], + }, + rct_signatures: RctSignatures::NonCoinbase { + r#type: 3, + txnFee: 86000000, + ecdhInfo: vec![ + EcdhInfo::Original { + mask: HexBytes32(hex!( + "95f1dcd5076d92d9592f1ad5d2e60e8b353c0048da1833db3d11634a9deff50f" + )), + amount: HexBytes32(hex!( + "9386f5401e2577e66dea290aae981a85f75ab81d21cd8060b6a2070c0c3d4209" + )), + }, + EcdhInfo::Original { + mask: HexBytes32(hex!( + "9a3015d73ee53f40c4a194c725aa5cea4822b99442ddb94223a52e365e02f70b" + )), + amount: HexBytes32(hex!( + "40b471293514f4399782abfe2968f5bb297a77b16b58261df7cffc60b68a5b04" + )), + }, + EcdhInfo::Original { + mask: HexBytes32(hex!( + "64b2b70d2e61fd4ac5c6d92f61d85dda1daf948853cc303a3a39baeeece41e08" + )), + amount: HexBytes32(hex!( + "b388bdce5bd31493dae245af4dbfc8486d959ef28af4ad1c1338f43dd3bd5a01" + )), + }, + EcdhInfo::Original { + mask: HexBytes32(hex!( + "e8d8b9380c446cace527ea1864d69f524b2c6b8eaf08f0f6c36621e73de49d0a" + )), + amount: HexBytes32(hex!( + "c74b47b823b7e5f2744e9643e4490f236eb9de006acd7bb8a32cca2f56223b06" + )), + }, + EcdhInfo::Original { + mask: HexBytes32(hex!( + "1ec895cc03e6831311a3ab6f86745312feec53de5aef1e1f204a984f082bff0c" + )), + amount: HexBytes32(hex!( + "d16c02a92488cd7d5fdf3c461ff8f4f7e75a18644e810ddd55a153e79464af0a" + )), + }, + ], + outPk: vec![ + HexBytes32(hex!( + "ff1a463fcb285d747df43612cc3bc925d4d27bebb08537b177a0dba960f90131" + )), + HexBytes32(hex!( + "6b62f6ed7338cbf9b2639620400690676fa9d43aca93da4a9dc56d665a72b506" + )), + HexBytes32(hex!( + "9363af049e5b0530fd77f884e84838efcabebf5fff57e2f00b49148c6415eafc" + )), + HexBytes32(hex!( + "2fc11a581752a6465d59217e6a5841170de3ba96e27d2744ad280b5242efa9e7" + )), + HexBytes32(hex!( + "56b6c2ca082d95600584ca429e6723816d4496cbf6f586cf1cfe2e0319224451" + )), + ], + }, + rctsig_prunable: Some(RctSigPrunable::MlsagBulletproofs { + nbp: 1, + bp: vec![Bulletproof { + A: HexBytes32(hex!( + "4e3433b32bd6d349774eac4ad467e698125d9e0402d216609ff0f4cfc216c50c" + )), + S: HexBytes32(hex!( + "7f6d8c127e4138c6153954836b127694786b890a138bae684eb951fb0fbf9be4" + )), + T1: HexBytes32(hex!( + "40ee0b2925d7555c17dd38bb69b80e1cfc05aa8b9dc2bd088c1361321a09d4f4" + )), + T2: HexBytes32(hex!( + "1488d918c2acdd6ff9e8d5bf82a08599733b9084cdfb0f891c9254742f2ea258" + )), + taux: HexBytes32(hex!( + "9b26002cff6e74e3da8ce59cadea4c8a0d93b9d4d94e6764031c21ecbac5f600" + )), + mu: HexBytes32(hex!( + "a414b36b00a290c62a443282295f50f381a44197af5db74f518a1b77dd8c120a" + )), + L: vec![ + HexBytes32(hex!( + "d4c3360932332dd3cc407d857c6e759d7c29d10deede96a0649bba89fbdb0e04" + )), + HexBytes32(hex!( + "33d7311748c6ee1fa92311513a3f32acf0bbcbd1c507e4378db19f108914f6c1" + )), + HexBytes32(hex!( + "aeedddc3feaa374880a388a992e38027d97c8e0e3728fd536fb2f0a560f5f481" + )), + HexBytes32(hex!( + "662e94760e3d51cf89a39db06c8f95e08b923ed97e883e9144d15f21e1639011" + )), + HexBytes32(hex!( + "c07d35cb78309eec01052227df1967c0e0d553f6ca5d592f34bbeebcecdc78a8" + )), + HexBytes32(hex!( + "9954f3a6c818fd5aed6fd7c94fdaf4f49d2159c47e31b953c3e44e11aa4c9943" + )), + HexBytes32(hex!( + "a22d2b47f1a051daece177803252b976c33ac5e2a8c487afd89d61f3a08180f0" + )), + HexBytes32(hex!( + "3ce357034185a6f540d00b2ab8229e64d2d6cad27a2b141d6f6e202307d959ae" + )), + HexBytes32(hex!( + "5906da535fbd816292692880fe4630e9ed1dd2dc94495a4f7db080e18fd4a8e0" + )), + ], + R: vec![ + HexBytes32(hex!( + "0b40204226678fee886140e7c20e809165a58e1355101a2c5bdf7c797811ac21" + )), + HexBytes32(hex!( + "94a1da201d9e85ad6ac564fe2e6a1fa62873d78e33a5931fd143ed165b360eba" + )), + HexBytes32(hex!( + "fc458a6c42264f6c8890a386b7a68543a952ecc2b6239138b548c25d6bfa6c68" + )), + HexBytes32(hex!( + "052da59d062001df5d95d3117deecb9b3175ed59a44aba9b92f84add748c1698" + )), + HexBytes32(hex!( + "5aa7cf7545d4859a62903b29500449813a231a0c25cdb133a4780a9b0a411cd0" + )), + HexBytes32(hex!( + "5366ad21b6b33b8f43aecfda087f0aee9cfdc2836e59f7721856058685965b39" + )), + HexBytes32(hex!( + "960c4764aea3c0dff74c88728514da160bd79712cd50a948bd8b52d9569e69b1" + )), + HexBytes32(hex!( + "6db5c54be77c08460e4581ee7709c0179108b46a55c3858e0897bd4f12e3e913" + )), + HexBytes32(hex!( + "ffb4d75cab91763dc3e556fce046413382c84abe24615ada0605a43f8de88309" + )), + ], + a: HexBytes32(hex!( + "43bf84ef0f596d1d76990c5202261f0963dade1affc1eee92a0508f5ce8d2900" + )), + b: HexBytes32(hex!( + "747be0d98f642649d2925a459238ed13f65bd6f12019683d4ede505394341604" + )), + t: HexBytes32(hex!( + "8592adba69d884c48e52135909a9738eafae80e590ae245b1a9ca65eea3a8b0f" + )), + }], + MGs: vec![Mg { + ss: vec![ + [ + HexBytes32(hex!( + "8a8838d965aa1bb49448c12ea1aabb680b393f5bf02e3b73874aa545cde6dc04" + )), + HexBytes32(hex!( + "e16bf1d0c4c2639af6bed0c0205181b2a03bc5cdc22207906aac710acdd5170e" + )), + ], + [ + HexBytes32(hex!( + "208d25cad34bcc9c49a5516102990814c75e0bbe2335b601880d9c6ce4fb400a" + )), + HexBytes32(hex!( + "279a89826548b8b15ea342d892ca6f8bf9e6a5a14077a57edaa4fd676b0b9f0f" + )), + ], + [ + HexBytes32(hex!( + "9edbd1d2082bad9dd9ca98baf82b4d70014dee720c758ed0944a9fb82ae55206" + )), + HexBytes32(hex!( + "3314001eeec40a2e0ca83f48af1ade8b4139418da49e2c6d95aa3a1d4427de07" + )), + ], + [ + HexBytes32(hex!( + "1837f42c1a4bd0747ed86c1e99bfe058031858c47ff4f066cfcdaf107499bf0f" + )), + HexBytes32(hex!( + "963bd0ed98a01be7c847b393ad0c2c25c3052148d67126c12b25ec2239373005" + )), + ], + [ + HexBytes32(hex!( + "e41e7dd0430ccbc17f717db7fa1720241ab4de24249c607b9f882143d266ff0e" + )), + HexBytes32(hex!( + "95c4a4ec2756ec57caacb64f17a7e5306103f030dfb12dd53b42c72e68b6e60b" + )), + ], + [ + HexBytes32(hex!( + "8ecfab987a8697c58f4b183620b2fa0e11972fa666b71c138e067621ab5d1703" + )), + HexBytes32(hex!( + "2e070ae83ab7f01f91766c2fd6de425dc0f18ae4e34fdcb3ac18db4dfec77a0c" + )), + ], + [ + HexBytes32(hex!( + "187cd1a318666e9f7a9f2f9d4eaf7c662c6162c5bc2be94219992f261f46b90b" + )), + HexBytes32(hex!( + "97ca174ff4bcf1e5d139bf0ad85577b9c6247f9e4782cd69100e683bf2e3f80b" + )), + ], + [ + HexBytes32(hex!( + "28eb6f60cfa35b52cbf74b7e68ce795ebfa0d3db6f00e69677fc98aef963bf05" + )), + HexBytes32(hex!( + "6662186aa949465b7b2174d6da077ab8ffdddb710bdab42386e7d8ae20f1890d" + )), + ], + [ + HexBytes32(hex!( + "577c9cf99480b0633121737756bcc7f4887fc7fdf3a9344c84578886e60d1404" + )), + HexBytes32(hex!( + "2d241b48e63acc39c8c899f7c009fcbc09025ea1211930a338e193d17aed890a" + )), + ], + [ + HexBytes32(hex!( + "7a3f489532743f117999a1b375789cd0863541cae0b8633e8cd4c7dedc740305" + )), + HexBytes32(hex!( + "500c1033ca2b4b47c39e70a1c563553571e0e25a2e1fa984cb5ba08546bc4907" + )), + ], + [ + HexBytes32(hex!( + "82efb453a98454e07e8f4b367ee0db2f957e6222e720a69354fdf910fe5fe803" + )), + HexBytes32(hex!( + "1c3204cf63c8ba3ebd817d603a4e5cadfa6a9af5999648eabff7605b5de8b306" + )), + ], + ], + cc: HexBytes32(hex!( + "8b579f973b9395a175fb2fc1df7d66511166c606903a3c082b63fa831e833b00" + )), + }], + pseudoOuts: vec![HexBytes32(hex!( + "bd6260cafa1afbe44d24cf7c42ac9e2b451424472eb1334b3c042e82196be0d7" + ))], + }), + }; + + test(tx, JSON); } + + // #[test] + // fn tx_rct_5() { + // const JSON: &str = r#"{"version":2,"unlock_time":0,"vin":[{"key":{"amount":0,"key_offsets":[21656060,186727,69935,9151,6868,5611,37323,11548,1080,2867,1193],"k_image":"2969fedfe8eff9fe1aa29c73ea55e8a9080c25dc565d2703e4d2776991a158bd"}}],"vout":[{"amount":0,"target":{"key":"4a46669165c842dcc4529cb0ca7e34b47073a96d5b29862c9f052a6113ac4db6"}},{"amount":0,"target":{"key":"264b1dcf7eebde1f4eb9ec87eca25dd963d7281ab5efaa5cfa994a4265fd9b4c"}}],"extra":[1,137,144,107,99,61,229,55,205,33,49,82,78,22,98,81,68,252,30,53,33,0,208,38,36,247,66,155,149,65,35,254,12,2,9,1,151,243,81,31,198,0,170,41],"rct_signatures":{"type":5,"txnFee":13210000,"ecdhInfo":[{"amount":"5db75ce558a47531"},{"amount":"0499d909aafd0109"}],"outPk":["70cbcd5105fcb33f29c8f58b7515f98cfdfcbc425239f65eac3804fbee069995","0aba72c6895d733b7cf59d2cf9c4cd7c82dedf23f9424148d63f138291e6b142"]},"rctsig_prunable":{"nbp":1,"bp":[{"A":"86765eb65aac879a755822a69a54dbf69d2d3495439eff917dc01667b72d30f8","S":"1a1e62a9ca8142cafdd8a8b74517d17f2e883d3495b7722e27750fa3fed44d84","T1":"a6513e0191d0561c16f06dda675e9d21a6f7a074dbf1af498530711a4c0a3b8e","T2":"47a1197d264c8becf36fe2e45bebbe9ff86ab7c141dd99db218ba691a412190b","taux":"cc5aa963d74e48c673f5079b0968060db5c408d8ef50ca8cba9fc58f5e11ff06","mu":"869813119eb1c88103d3b396bb1ee604df3c2ecfd7fab9a70da41f9cb95b2309","L":["34d1b4db37ad7d522d273c134a80d08eb6a22c1e009d3ab7db950090d35accdf","e7b41adc55ec0887b1a982f25c11d50a6191aa0e3de7f92ba944b0967b7b0cd5","343b5ad8c7abe7753ddba2fadb3cef36de91a2757167c102c4bb95c3e6778028","c132bb4bab3e60b86637ce2a3a563ecf92635b4a972083adacf6ede475467eb6","3303f34042776e60631352f687a4508b6e0e96ba58e05da825649c0b342527a8","c927d1a85fab1d83e1d3312e4f136e58f13853e529e3d2738d69e7885713a402","8a440a513f9e71d1a1a6357954b9a90123da3cfde7ed50b9cb389f6963090e49"],"R":["60cec37d53635e0f7cfddf7ab7bd4fc092ac69444aa8ebe1029cdac3505e028d","4b4c26bae4ee65f66246f45a83d8f2b4aca580d3ec53bfb62ed0d33e3e80ea60","f1e6aa90b3ae9e72ce487c1728f73a550b5dc41d971a85a90785b922760b0dcd","66e773ab75baa86936bd6653102be3518470f98b1357abb3251da54f273b0e40","792e4c055a4483088698a828e6b35447a4f890ad590d9e37709e53b7a8d63d0e","f6a43739cc3895d297c42179c9cacc31715f675b332a269f7fdf7c3c645f47c3","483a9954d40d1a9ce9082a7e10b8c06fd6e5e925d87dea0d04c4b05c6e74eda7"],"a":"65b1099198e6b20e5d810147bb0f9b4de297da33fb8ffbde3721a600b91ab504","b":"40280b8a652159007d7e36d2a3d4872ae3b7e25617f486a8eeca993d1146c002","t":"aa7d0c7b795de8736e1881fe4b9457cca1e370352c9a2f791d8902292d67de0d"}],"CLSAGs":[{"s":["27c6ca7f8cbdb7d8e6a1e0d3cc0805e48a809b827ccb70a9b297b7e9fd506f04","25212da093e8a866fe693e31022f8f37547cb38643f0a8373ad20032c0d0970a","c41751c335a147960f4daf5d4f18544eab8661e4509e1def78e3c2a08800ab0e","7a82c4e2e693ad5cf288b369ed647847e2b3ada1faab0727331aebce7e026507","690685c5ecab57799fed9067c88c172c466f1ca2ce6768900af0d7d46d474f0a","1891173b4f269dbeb1e13eecd8deecf3ee9bb864476b85a5639257cf6e9f8402","737980e8606d2da628368934c5c05fd2b6c2d43a2b56c5c6c2163b70c0836b06","274a23f3b8baabb020c4e5315174d12049409cae36af0016a0993cdf97957809","de2f2b04ac951975fda136268e60126a6ca53e7cd6cbbff0c9515256d5a1c50f","d5747b07bc733144c8ef9574213731a30d1239596467e25b6aac4427647b1d0c","5fd4c201cfd87e8fb155c1975e02c06c8de1ab49c84c7948e429798a90d52101"],"c1":"0e118c43701bf377e13d9693f6783963d1e6e2a7bff9d75640eb9e1684c26205","D":"deb55a8e4de5b9c84b8d94d63988ce04048497f91bdd3e3878a3f9e7c313e01c"}],"pseudoOuts":["48604572eb550295c16f5fe4282131ed4fc5de297611f813b12e752b6b67865f"]}}"#; + + // test(todo!(), JSON); + // } + + // #[test] + // fn tx_rct_6() { + // const JSON: &str = r#"{"version":2,"unlock_time":0,"vin":[{"key":{"amount":0,"key_offsets":[56619444,517411,383964,1514827,38358,263974,91303,3018,14681,34540,7767,8131,20234,16575,18300,3587],"k_image":"ec1636db12f12cffa66e8e3286d8216ad7900128c996ffcc96196856daf10585"}},{"key":{"amount":0,"key_offsets":[49738606,2766321,6291275,92656,166783,91733,286477,1130,5724,9633,44284,24605,8133,20600,9906,2115],"k_image":"953c1d93684671eb658284061b6f7724f37c68c3bc24732fb81a09f7056426d0"}},{"key":{"amount":0,"key_offsets":[2971790,44215494,8487702,3226387,861,158991,281736,74021,24277,10705,51824,25824,4951,1235,7824,15715],"k_image":"41a34e8637c3974c9a0444f9c45b361775cc178e4d7d8e07e7d4afdc8e591675"}},{"key":{"amount":0,"key_offsets":[57701146,641169,170653,321459,625073,40514,6448,5687,13246,14743,7359,1788,1054,1061,4460,4059],"k_image":"2d57a890ff948dd7f0ba17940b6b76db2c87163322f0bd5aca29462f9224c777"}}],"vout":[{"amount":0,"target":{"tagged_key":{"key":"570482299e724f78b8441d700aa63388a842c7f5dbcbe5fa859c2c0abad96b30","view_tag":"9f"}}},{"amount":0,"target":{"tagged_key":{"key":"50c1a24ef57aeba07beecd8ddbf294e2501d6fa90ad9712829c00b7293eead96","view_tag":"06"}}}],"extra":[1,254,81,251,73,229,142,177,14,82,43,62,58,255,63,24,202,118,195,65,161,185,96,142,214,48,255,145,202,52,3,199,202,2,9,1,53,17,236,142,199,122,102,77],"rct_signatures":{"type":6,"txnFee":71860000,"ecdhInfo":[{"amount":"b0af37c16a8f08a0"},{"amount":"4cc0843dec9af6b4"}],"outPk":["3c51d83c816a0cb8585641a165e866e0215302af9b498db762db27141e673e15","96eba06bfd2781e65e9a1b1506abfd9ae29dc60fcd29007cd6ad94a8abbf1ecc"]},"rctsig_prunable":{"nbp":1,"bpp":[{"A":"28197d8ac07948082b50274fb8d5bea0f81561d02c88981e0d9b5ffd6e5ee169","A1":"efe6eda671d68a894e1b8aff4a1992f85c4269e17196916cfcdf8519cc94d35e","B":"7e374ac72276298148217d99568c3d4e09f2442864b5be228cd2d01328abe2d2","r1":"a2e06c25825774e5a130944c6c3eaa3c8afea2ca7d2c09e024615ff700be240a","s1":"6ee7e6624941d1e9ea18024f39a9a694ac798fb69084e10bf982d6a58d416c0a","d1":"d30bea1ffb8e79d0fe37d60c55f6e654d1ca388b102b29a6b28c48c2c617b70f","L":["cf6e067c87b9161c424620e83645f13284e64c803b9d7af729d0550d475d2199","159a03db0d038f6691816d9c31b52a325ad13941222ce1791a0285ca0cf0169d","f0276445ea2ec07957fa58675c89aec4dab57d163290e95845dccd484c3e1790","40c19df50385f55b4d53fc101c8eef7d411b76c8b94eadbf464d1401d171ea0a","6b9a8da4219da8f3e944351825eaf66e99ea954ed0e3b4eed0782379f8fd5509","567d12ccd952444055c9a595024f1229a8e0d3ad816f6fd28a448f021603bcc1","44616a4203c430653b12e5a2504e79ea390719a1d6a9557eeb55067ba7efc9d3"],"R":["a7dd6caebda761e8c2ca07e65f9f5b5868777bdc9a4af810d55c691ee62922aa","e8db14727596359e8b2e52bd55ceea81e102028d979f79d464d8afe3fd183de3","0f808f768cec8fe9f5e41d5925eb5c4955a2c16f650ba26e8cf7be2246b4e559","4931dd8eb664e60d86ff259b0e8af24329aefd550170683c324bf8e68ca97169","ce05c6ddb73f36dcd5d94cd6a92220c5c42df15f649d4029c9046fb8a8bf4003","ae2d51efb12a81062c7a6c9d2c4cdb4b6d7561f76e6f8aa554d98717716b8dda","ab4a29f9efa41472ae9dfb13d80c929d904a2fbc72a9d2bce063b19baf3bbdbe"]}],"CLSAGs":[{"s":["fa3c832924a4716bac410b9708ac11ed35d9cb01f3e0c1d3958e77791f9ce905","6b4dfe306de3f55c5507d802347f4c94ae55e0db4f3bf25e1af3ba1ecd993e0d","71c7c612a3dd9d123609df658aaff494787b5cabb5624d5c5d519120f29f5407","d72c30a667f22dbc5bbc8479a4e70094bff1980eb962f3f5ce43954da9a5b009","869470794715faa72ec2cbbb78743448f9dc5bb6383ac2030484adbb760e7a09","6247f181b491a4da82cadbca6272b58365e9160030ed92a1ac5641f9d4163b06","9269814384a16ff2bd297fbce5a614ed67529551ba0c21a26abdaff55c96870a","b10aeaac7f08f1782a2eb4094864f26fcb6c43559b7610ccd7809b90b1c4f003","f38ce2ac13fcdee7be79d0bd98bc17f3df4b1c266a45e1fede7582b12e3a3c0d","1b9f3aee12c9fd4e5aae9cf64bd65f0ad20dbc779f472db0bd338229638a6401","a04b7e6791b7ea10af2a8b0ff2dbfe63fb6036beed0bd09e9319d4728e33130b","a0cd570e0cb80e0fc111468add13b0fc0d8eb4df6942ce3caafedb6c9eee0f07","14b38cbfb7012d1c96a25ea5dcb9bfdfb1a92ffe727dd7a1cb332a9bd630d10f","5f9be3bc2f667e41baaad111e34ac14eefa493b565c4be4ab6eeab286903870b","549bc3275bafd26ab4b89ba14b43976dd317d8d344e37ccbd5a20351a084e005","a93847d26171a9194cfa5a94d7f40576b2e808b4bde927e3398bb0a6e9ad0f0e"],"c1":"794f4e50841235043b39fbcb5b50babf5c4b98339fec9538c2538644ac104f01","D":"6d50f7b691c0bc174aa11d9953b3452b0f249aa4e7edd560ff1e5772f592a618"},{"s":["e8140f6e69981917d78656f0b1572ff748771f3106f6134cca77ae83bc2ff201","7970c1856b630f213e52c825c507f331145c55104611a908c91998dcc76dd40f","8b6899f8eef5bb4c0c830fbb53e34b6089215e0c18b174648fe482675eb0740e","8ff4173d836bddc7fd430b0e2cd7d377f9a81025ebdee6030c19114b7964dc05","8f14171c429fbf9bd4aa5fe67d180e99a6092f8a7e27a97e6fd85c02613a0209","9208e8cc2fd66d6c154202c42bde24f14917b79ccc1b2f31d54880fa14c51202","11da8c69a612d2090b375efb61f9be10a16d6ac3d95e8777cb4d3b0cce028509","f0b097956d07aaf27a4d19463b63bed427b4945321f203be856a1c45e058ed0e","0ad2af34567c40ea4166cd49c368a9ac3bac132c2507f444657de8152465ff0c","ded4f3f699c692d01999b858cb752bb6691418393543fa0b1805115847be8f04","6ef1fa94a6448488fdc4fdc629813940f78706f9045f48b8d69ce717510b7b0e","fbc95294de167bb8a431ff2eacec66637a49927eb15bb443f0ec7c909e301a06","03eec8ccae4fd9942376e3df671ed3de9743b03331ee518a69e0f8fb09644e0e","861c4a794793dd3eaedd1770263124530035378121bde995b27cbf50bfeb0d08","043d02997ff017b110590482dba8a69d2a97092ef7640b8cba5d4271ffc67e04","23f12cabd4d7d69a1c6c6cb960b82a427a0ad2df276786312e2b1c60cb17de06"],"c1":"c0f8e42ef1b220d60fa76532b84dd5def896a25b62eec08691ca438c6abcc40d","D":"9d0844d4ac7c5988e336514ba17841a3bd1aefd5fa024b692ccd6ef6e9364e34"},{"s":["bf3a319fd83070d2c97049e1e2d4636f498a5c0547e5e0144f9eb58247f9a50d","70b626b51f5e934fad8f6df0db79c3d2af88b6a93e3fcf872d64e89d1909b10b","71b200df8b8c5132ba533f1f18924114d451d2b9cca454ea36b7e4b559962307","99cc6995a942ad4e9f993d980a077113d46da70f003539190c5bb9ffb4f6310f","4dac904bc896e0f8690353924bc98f0baf2d3a2e39da272fd34444664eede404","158c1087ae06422bd71a0b59ff7e8f2caa6bbc651b4d0e105551bf91a51f2002","e4d119f8c6d39a02b06aca1627078c37b962463d733a4b25d3b6410bdaad6f0f","16d5e70dc9bd9f8e9d8d74d75db0bf3a144952d7eaab3abc78ce7c66cb958d06","3a0ee94b516a8596bd718ffd87efb76e10b61904033fd0225543680064c5120e","354d44ea658710784c4b3389d4048399302e4d7bfa676ea3de53feba2012e30b","ce00bbc38aa3e018f1231972232a076f42d38e6d75dececee6561c6336c4be00","85094c21f620b87e976f42b742449a048eb303597b1ef362c1a44f76f8d9fa08","8e88e960c771bdd2b3df0e0fddbc0cd0a692807d8432c54d6b6ad2114007d10f","976274603af385a4079a970a5ddba77a01ac7411e9b2303e76207b288830a107","a7f760605b4dffb5b76943e8097b11fb4f2db2fea6354cffc2b96c21aef7a300","7e378e64b7a3ece77d88d966e386e939f56976109ad395b4712cf916f50b4c01"],"c1":"edecc915049e5ead7e5fe36dd70c558ace09f4d3a0c6216be148a51e3a72e302","D":"197665d3b405f42a2053f9e946483435e75d6c4e801427bfeb66cc58c72e2670"},{"s":["20c7f0d492ecf79f1d29305f4e8387238a5927fe676674fe479c129431841607","b9b98379560d7e22a09fcc72db5b1d05870ffdbded5cf560fcaf5303033f7d04","8fc79c2b767ea73f7f552f48d0603b5ee369cdd9535ca06f03fd11e16f08ea0b","7e2bdb348f8a719ffed9d995a35d83ae93a63abe1090fae68a3d23ae47c64402","aa0f6221cc1454b4dbf84b7f8c6e7b89a1c2a3d0f56a2d6302106e47b6b1b50d","08a9283d8b34426eb7b7547fa8fb1573430b99f1c119f2ff9612e82acee98e03","250d2ac44e26782f293eca3deb70fc5c52cb942166b1efb2f78ec32640e02d06","1bc1bcc3de357a4652c03815e59e14cb13668946366746dca3dad2f4c44c9000","9f8b446e373e3e19871f22b9bc95017d4411e555477afb34114b428c8296470a","e49d0313e969fb8c4e451388309280a96b8e3216fa1e28ab2efab49f38e86f07","0cee07c99293507ad558838f2fa07af1c4ddc86886658c6207c1f25f343afb06","39bd17be3aaaeda4fb8aa8dafcf5748581f7bb8b92b0dfe3add14a8481570003","0048e1ca905806551cd210c40356cc80935a98f63163a087ea89585915e8770d","3c46eea5308dbdff7376d89378998376cb722d08604d6ecb2b3cb795f91dc607","7d13be56b2e858d2fca81b3a6b0312943d33e501b4e09814818edb96fb28aa0c","313a2021350abd25bd79c22ea33fe071367da2e208913d788d50101c90f0e702"],"c1":"9d96220cd0d49340e06b915f7204cd1f68c4c2069389bf4c011b4fa6c24c0d02","D":"91d00727ba3655729ce88981e803967946403e970f0a6749625f59d4e6d7ebc9"}],"pseudoOuts":["a6785a3aca529db1da40944bb1826519d7caaa31f4549e6854cb97e5234d3e8e","f5cda4db5f83f1c1edea0b66461d1848daf01054c24a690e1438add59dc4f206","dff30968b66355b9c7890db508692e9620c999e0025ca9395fa53732e6432606","6b78d37b63714ebe1d09981766c61a07bf0bfbc9fc7f7a8998396aa99d43e0cc"]}}"#; + + // test(todo!(), JSON); + // } }