diff --git a/Cargo.lock b/Cargo.lock index edacd01d..a7513ca4 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -4,18 +4,18 @@ version = 3 [[package]] name = "addr2line" -version = "0.24.1" +version = "0.22.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f5fb1d8e4442bd405fdfd1dacb42792696b0cf9cb15882e5d097b742a676d375" +checksum = "6e4503c46a5c0c7844e948c9a4d6acd9f50cccb4de1c48eb9e291ea17470c678" dependencies = [ "gimli", ] [[package]] -name = "adler2" -version = "2.0.0" +name = "adler" +version = "1.0.2" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" +checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" [[package]] name = "aes" @@ -48,9 +48,9 @@ dependencies = [ [[package]] name = "arrayref" -version = "0.3.9" +version = "0.3.8" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" +checksum = "9d151e35f61089500b617991b791fc8bfd237ae50cd5950803758a179b41e67a" [[package]] name = "arrayvec" @@ -77,23 +77,23 @@ dependencies = [ [[package]] name = "autocfg" -version = "1.4.0" +version = "1.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" +checksum = "0c4b4d0bd25bd0b74681c0ad21497610ce1b7c91b1022cd21c80c6fbdd9476b0" [[package]] name = "backtrace" -version = "0.3.74" +version = "0.3.73" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" +checksum = "5cc23269a4f8976d0a4d2e7109211a419fe30e8d88d677cd60b6bc79c5732e0a" dependencies = [ "addr2line", + "cc", "cfg-if 1.0.0", "libc", "miniz_oxide", "object", "rustc-demangle", - "windows-targets 0.52.6", ] [[package]] @@ -108,6 +108,25 @@ version = "1.6.0" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "8c3c1a368f70d6cf7302d78f8f7093da241fb8e8807c05cc9e51a125895a6d5b" +[[package]] +name = "bincode" +version = "2.0.0-rc.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "f11ea1a0346b94ef188834a65c068a03aec181c94896d481d7a0a40d85b0ce95" +dependencies = [ + "bincode_derive", + "serde", +] + +[[package]] +name = "bincode_derive" +version = "2.0.0-rc.3" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "7e30759b3b99a1b802a7a3aa21c85c3ded5c28e1c83170d82d70f08bbf7f3e4c" +dependencies = [ + "virtue", +] + [[package]] name = "bindgen" version = "0.65.1" @@ -127,7 +146,7 @@ dependencies = [ "regex", "rustc-hash", "shlex", - "syn 2.0.79", + "syn 2.0.75", "which", ] @@ -200,7 +219,7 @@ dependencies = [ "arrayvec 0.7.6", "cc", "cfg-if 1.0.0", - "constant_time_eq 0.3.1", + "constant_time_eq 0.3.0", ] [[package]] @@ -215,6 +234,7 @@ dependencies = [ [[package]] name = "bls-dash-sys" version = "1.2.5" +source = "git+https://github.com/dashpay/bls-signatures?rev=3ffa7fa2b62aecf3943c142508de4b7ec6005bb5#3ffa7fa2b62aecf3943c142508de4b7ec6005bb5" dependencies = [ "bindgen", "cc", @@ -224,6 +244,7 @@ dependencies = [ [[package]] name = "bls-signatures" version = "1.2.5" +source = "git+https://github.com/dashpay/bls-signatures?rev=3ffa7fa2b62aecf3943c142508de4b7ec6005bb5#3ffa7fa2b62aecf3943c142508de4b7ec6005bb5" dependencies = [ "bls-dash-sys", "hex", @@ -257,9 +278,9 @@ checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" [[package]] name = "bytes" -version = "1.7.2" +version = "1.7.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "428d9aa8fbc0670b7b8d6030a7fadd0f86151cae55e4dbbece15f3780a3dfaf3" +checksum = "8318a53db07bb3f8dca91a600466bdb3f2eaadeedfdbcf02e1accbad9271ba50" [[package]] name = "cbindgen" @@ -301,9 +322,9 @@ dependencies = [ [[package]] name = "cc" -version = "1.1.22" +version = "1.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "9540e661f81799159abee814118cc139a2004b3a3aa3ea37724a1b66530b90e0" +checksum = "72db2f7947ecee9b03b510377e8bb9077afa27176fdbff55c51027e976fdcc48" dependencies = [ "shlex", ] @@ -403,9 +424,9 @@ checksum = "245097e9a4535ee1e3e3931fcfcd55a796a44c643e8596ff6566d68f09b87bbc" [[package]] name = "constant_time_eq" -version = "0.3.1" +version = "0.3.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" +checksum = "f7144d30dcf0fafbce74250a3963025d8d52177934239851c917d29f1df280c2" [[package]] name = "core-foundation" @@ -434,9 +455,9 @@ dependencies = [ [[package]] name = "cpufeatures" -version = "0.2.14" +version = "0.2.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "608697df725056feaccfa42cffdaeeec3fccc4ffc38358ecd19b243e716a78e0" +checksum = "51e852e6dc9a5bed1fae92dd2375037bf2b768725bf3be87811edee3249d09ad" dependencies = [ "libc", ] @@ -485,7 +506,7 @@ checksum = "f46882e17999c6cc590af592290432be3bce0428cb0d5f8b6715e4dc7b383eb3" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.75", ] [[package]] @@ -511,6 +532,7 @@ name = "dash-spv-masternode-processor" version = "0.4.16" dependencies = [ "base64", + "bincode", "bip38", "bitcoin_hashes", "bitcoinconsensus", @@ -534,7 +556,7 @@ dependencies = [ [[package]] name = "dash_spv_apple_bindings" -version = "0.4.16" +version = "0.4.17" dependencies = [ "cbindgen 0.24.5", "dash-spv-coinjoin", @@ -715,9 +737,9 @@ dependencies = [ [[package]] name = "fastrand" -version = "2.1.1" +version = "2.1.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e8c02a5121d4ea3eb16a80748c74f5549a5665e4c21333c6098f283870fbdea6" +checksum = "9fc0510504f03c51ada170672ac806f1f105a88aa97a5281117e1ddc3368e51a" [[package]] name = "ferment" @@ -846,9 +868,9 @@ dependencies = [ [[package]] name = "gimli" -version = "0.31.0" +version = "0.29.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "32085ea23f3234fc7846555e85283ba4de91e21016dc0455a16286d87a292d64" +checksum = "40ecd4077b5ae9fd2e9e169b102c6c330d0605168eb0e8bf79952b256dbefffd" [[package]] name = "glob" @@ -868,7 +890,7 @@ dependencies = [ "futures-sink", "futures-util", "http", - "indexmap 2.5.0", + "indexmap 2.4.0", "slab", "tokio", "tokio-util", @@ -1034,9 +1056,9 @@ dependencies = [ [[package]] name = "indexmap" -version = "2.5.0" +version = "2.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "68b900aa2f7301e21c36462b170ee99994de34dff39a4a6a528e80e7376d07e5" +checksum = "93ead53efc7ea8ed3cfb0c79fc8023fbb782a5432b52830b6518941cebe6505c" dependencies = [ "equivalent", "hashbrown 0.14.5", @@ -1053,9 +1075,9 @@ dependencies = [ [[package]] name = "ipnet" -version = "2.10.0" +version = "2.9.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "187674a687eed5fe42285b40c6291f9a01517d415fad1c3cbc6a9f778af7fcd4" +checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" [[package]] name = "itoa" @@ -1086,9 +1108,9 @@ checksum = "830d08ce1d1d941e6b30645f1a0eb5643013d835ce3779a5fc208261dbe10f55" [[package]] name = "libc" -version = "0.2.159" +version = "0.2.158" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "561d97a539a36e26a9a5fad1ea11a3039a67714694aaa379433e580854bc3dc5" +checksum = "d8adc4bb1803a324070e64a98ae98f38934d91957a99cfb3a43dcbc01bc56439" [[package]] name = "libloading" @@ -1181,11 +1203,11 @@ checksum = "68354c5c6bd36d73ff3feceb05efa59b6acb7626617f4962be322a825e61f79a" [[package]] name = "miniz_oxide" -version = "0.8.0" +version = "0.7.4" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2d80299ef12ff69b16a84bb182e3b9df68b5a91574d3d4fa6e41b65deec4df1" +checksum = "b8a240ddb74feaf34a79a7add65a741f3167852fba007066dcac1ca548d89c08" dependencies = [ - "adler2", + "adler", ] [[package]] @@ -1239,9 +1261,9 @@ dependencies = [ [[package]] name = "object" -version = "0.36.4" +version = "0.36.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "084f1a5821ac4c651660a94a7153d27ac9d8a53736203f58b31945ded098070a" +checksum = "27b64972346851a39438c60b341ebc01bba47464ae329e55cf343eb93964efd9" dependencies = [ "memchr", ] @@ -1275,7 +1297,7 @@ checksum = "a948666b637a0f465e8564c73e89d4dde00d72d4d473cc972f390fc3dcee7d9c" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.75", ] [[package]] @@ -1377,9 +1399,9 @@ dependencies = [ [[package]] name = "pkg-config" -version = "0.3.31" +version = "0.3.30" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "953ec861398dccce10c670dfeaf3ec4911ca479e9c02154b3a215178c5f566f2" +checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" [[package]] name = "ppv-lite86" @@ -1392,12 +1414,12 @@ dependencies = [ [[package]] name = "prettyplease" -version = "0.2.22" +version = "0.2.20" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "479cf940fbbb3426c32c5d5176f62ad57549a0bb84773423ba8be9d089f5faba" +checksum = "5f12335488a2f3b0a83b14edad48dca9879ce89b2edd10e80237e4e852dd645e" dependencies = [ "proc-macro2", - "syn 2.0.79", + "syn 2.0.75", ] [[package]] @@ -1411,9 +1433,9 @@ dependencies = [ [[package]] name = "quote" -version = "1.0.37" +version = "1.0.36" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "b5b9d34b8991d19d98081b46eacdd8eb58c6f2b201139f7c5f643cc155a633af" +checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" dependencies = [ "proc-macro2", ] @@ -1461,9 +1483,9 @@ dependencies = [ [[package]] name = "redox_syscall" -version = "0.5.6" +version = "0.5.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "355ae415ccd3a04315d3f8246e86d67689ea74d88d915576e1589a351062a13b" +checksum = "2a908a6e00f1fdd0dfd9c0eb08ce85126f6d8bbda50017e74bc4a4b7d4a926a4" dependencies = [ "bitflags 2.6.0", ] @@ -1612,18 +1634,18 @@ checksum = "08d43f7aa6b08d49f382cde6a7982047c3426db949b1424bc4b7ec9ae12c6ce2" [[package]] name = "rustc_version" -version = "0.4.1" +version = "0.4.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" +checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" dependencies = [ "semver", ] [[package]] name = "rustix" -version = "0.38.37" +version = "0.38.34" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "8acb788b847c24f28525660c4d7758620a7210875711f79e7f663cc152726811" +checksum = "70dc5ec042f7a43c4a73241207cecc9873a06d45debb38b329f8541d85c2730f" dependencies = [ "bitflags 2.6.0", "errno", @@ -1658,11 +1680,11 @@ dependencies = [ [[package]] name = "schannel" -version = "0.1.24" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e9aaafd5a2b6e3d657ff009d82fbd630b6bd54dd4eb06f21693925cdf80f9b8b" +checksum = "fbc91545643bcf3a0bbb6569265615222618bdf33ce4ffbbd13c4bbd4c093534" dependencies = [ - "windows-sys 0.59.0", + "windows-sys 0.52.0", ] [[package]] @@ -1717,9 +1739,9 @@ dependencies = [ [[package]] name = "security-framework-sys" -version = "2.12.0" +version = "2.11.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ea4a292869320c0272d7bc55a5a6aafaff59b4f63404a003887b679a2e05b4b6" +checksum = "75da29fe9b9b08fe9d6b22b5b4bcbc75d8db3aa31e639aa56bb62e9d46bfceaf" dependencies = [ "core-foundation-sys", "libc", @@ -1733,29 +1755,29 @@ checksum = "61697e0a1c7e512e84a621326239844a24d8207b4669b41bc18b32ea5cbf988b" [[package]] name = "serde" -version = "1.0.210" +version = "1.0.209" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "c8e3592472072e6e22e0a54d5904d9febf8508f65fb8552499a1abc7d1078c3a" +checksum = "99fce0ffe7310761ca6bf9faf5115afbc19688edd00171d81b1bb1b116c63e09" dependencies = [ "serde_derive", ] [[package]] name = "serde_derive" -version = "1.0.210" +version = "1.0.209" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "243902eda00fad750862fc144cea25caca5e20d615af0a81bee94ca738f1df1f" +checksum = "a5831b979fd7b5439637af1752d535ff49f4860c0f341d1baeb6faf0f4242170" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.75", ] [[package]] name = "serde_json" -version = "1.0.128" +version = "1.0.125" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "6ff5456707a1de34e7e37f2a6fd3d3f808c318259cbd01ab6377795054b483d8" +checksum = "83c8e735a073ccf5be70aa8066aa984eaf2fa000db6c8d0100ae605b366d31ed" dependencies = [ "itoa", "memchr", @@ -1885,9 +1907,9 @@ dependencies = [ [[package]] name = "syn" -version = "2.0.79" +version = "2.0.75" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "89132cd0bf050864e1d38dc3bbc07a0eb8e7530af26344d3d2bbbef83499f590" +checksum = "f6af063034fc1935ede7be0122941bafa9bacb949334d090b77ca98b5817c7d9" dependencies = [ "proc-macro2", "quote", @@ -1972,22 +1994,22 @@ checksum = "23d434d3f8967a09480fb04132ebe0a3e088c173e6d0ee7897abbdf4eab0f8b9" [[package]] name = "thiserror" -version = "1.0.64" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "d50af8abc119fb8bb6dbabcfa89656f46f84aa0ac7688088608076ad2b459a84" +checksum = "c0342370b38b6a11b6cc11d6a805569958d54cfa061a29969c3b5ce2ea405724" dependencies = [ "thiserror-impl", ] [[package]] name = "thiserror-impl" -version = "1.0.64" +version = "1.0.63" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "08904e7672f5eb876eaaf87e0ce17857500934f4981c4a0ab2b4aa98baac7fc3" +checksum = "a4558b58466b9ad7ca0f102865eccc95938dca1a74a856f2b57b6629050da261" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.75", ] [[package]] @@ -2017,9 +2039,9 @@ checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" [[package]] name = "tokio" -version = "1.40.0" +version = "1.39.3" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e2b070231665d27ad9ec9b8df639893f46727666c6767db40317fbe920a5d998" +checksum = "9babc99b9923bfa4804bd74722ff02c0381021eafa4db9949217e3be8e84fff5" dependencies = [ "backtrace", "bytes", @@ -2041,7 +2063,7 @@ checksum = "693d596312e88961bc67d7f1f97af8a70227d9f90c31bba5806eec004978d752" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.75", ] [[package]] @@ -2056,9 +2078,9 @@ dependencies = [ [[package]] name = "tokio-util" -version = "0.7.12" +version = "0.7.11" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "61e7c3654c13bcd040d4a03abee2c75b1d14a37b423cf5a813ceae1cc903ec6a" +checksum = "9cf6b47b3771c49ac75ad09a6162f53ad4b8088b76ac60e8ec1455b31a189fe1" dependencies = [ "bytes", "futures-core", @@ -2101,7 +2123,7 @@ checksum = "34704c8d6ebcbc939824180af020566b01a7c01f80641264eba0999f6c2b6be7" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.75", ] [[package]] @@ -2163,36 +2185,36 @@ checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" [[package]] name = "unicode-ident" -version = "1.0.13" +version = "1.0.12" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "e91b56cd4cadaeb79bbf1a5645f6b4f8dc5bde8834ad5894a8db35fda9efa1fe" +checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" [[package]] name = "unicode-normalization" -version = "0.1.24" +version = "0.1.23" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "5033c97c4262335cded6d6fc3e5c18ab755e1a3dc96376350f3d8e9f009ad956" +checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" dependencies = [ "tinyvec", ] [[package]] name = "unicode-segmentation" -version = "1.12.0" +version = "1.11.0" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f6ccf251212114b54433ec949fd6a7841275f9ada20dddd2f29e9ceea4501493" +checksum = "d4c87d22b6e3f4a18d4d40ef354e97c90fcb14dd91d7dc0aa9d8a1172ebf7202" [[package]] name = "unicode-width" -version = "0.1.14" +version = "0.1.13" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" +checksum = "0336d538f7abc86d282a4189614dfaa90810dfc2c6f6427eaf88e16311dd225d" [[package]] name = "unicode-xid" -version = "0.2.6" +version = "0.2.5" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" +checksum = "229730647fbc343e3a80e463c1db7f78f3855d3f3739bee0dda773c9a037c90a" [[package]] name = "url" @@ -2229,6 +2251,12 @@ version = "0.9.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" +[[package]] +name = "virtue" +version = "0.0.13" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "9dcc60c0624df774c82a0ef104151231d37da4962957d691c011c852b2473314" + [[package]] name = "want" version = "0.3.1" @@ -2266,7 +2294,7 @@ dependencies = [ "once_cell", "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.75", "wasm-bindgen-shared", ] @@ -2300,7 +2328,7 @@ checksum = "afc340c74d9005395cf9dd098506f7f44e38f2b4a21c6aaacf9a105ea5e1e836" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.75", "wasm-bindgen-backend", "wasm-bindgen-shared", ] @@ -2540,7 +2568,7 @@ checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" dependencies = [ "proc-macro2", "quote", - "syn 2.0.79", + "syn 2.0.75", ] [[package]] diff --git a/DashSharedCore.podspec b/DashSharedCore.podspec index 059077b1..78b8f5e6 100644 --- a/DashSharedCore.podspec +++ b/DashSharedCore.podspec @@ -1,6 +1,6 @@ Pod::Spec.new do |s| s.name = 'DashSharedCore' - s.version = '0.4.16' + s.version = '0.4.17' s.summary = 'Dash Core SPV written in Rust' s.author = 'Dash' s.description = "C-bindings for Dash Core SPV that can be used in projects for Apple platform" diff --git a/dash-spv-apple-bindings/Cargo.toml b/dash-spv-apple-bindings/Cargo.toml index 7c6622b7..605b9afe 100644 --- a/dash-spv-apple-bindings/Cargo.toml +++ b/dash-spv-apple-bindings/Cargo.toml @@ -1,6 +1,6 @@ [package] name = "dash_spv_apple_bindings" -version = "0.4.16" +version = "0.4.17" description = "C-bindings for using and interoperating with Dash SPV" readme = "README.md" edition = "2021" @@ -13,7 +13,7 @@ tracing = "0.1.40" [dependencies.dash-spv-masternode-processor] path = "../dash-spv-masternode-processor" -features = ["default", "generate-dashj-tests"] +features = ["default", "generate-dashj-tests", "use_serde"] [dependencies.dash-spv-coinjoin] path = "../dash-spv-coinjoin" diff --git a/dash-spv-apple-bindings/build.sh b/dash-spv-apple-bindings/build.sh index e74f4133..27caa057 100755 --- a/dash-spv-apple-bindings/build.sh +++ b/dash-spv-apple-bindings/build.sh @@ -1,5 +1,7 @@ #!/bin/bash +set -ex + echo "Building Dash Shared Core..." pwd @@ -24,7 +26,8 @@ compare_version() { fi return 1 } -REQUIRED_VERSION=1.66.0 +#REQUIRED_VERSION=1.66.0 +REQUIRED_VERSION=1.80.1 CURRENT_VERSION=$(rustc -V | awk '{sub(/-.*/,"");print $2}') echo "rustc -V: current ${CURRENT_VERSION} vs. required ${REQUIRED_VERSION}" if compare_version "${REQUIRED_VERSION}" "${CURRENT_VERSION}"; then @@ -34,11 +37,11 @@ fi cargo install cargo-lipo -rm -r DashSharedCore/include -rm -r DashSharedCore/lib/macos -rm -r DashSharedCore/framework -rm -r DashSharedCore/lib/ios -rm -r DashSharedCore/lib/ios-simulator +rm -rf DashSharedCore/include +rm -rf DashSharedCore/lib/macos +rm -rf DashSharedCore/framework +rm -rf DashSharedCore/lib/ios +rm -rf DashSharedCore/lib/ios-simulator rustup target add x86_64-apple-darwin rustup target add aarch64-apple-darwin diff --git a/dash-spv-coinjoin/src/fermented.rs b/dash-spv-coinjoin/src/fermented.rs index c499430c..ce614f62 100644 --- a/dash-spv-coinjoin/src/fermented.rs +++ b/dash-spv-coinjoin/src/fermented.rs @@ -1 +1 @@ -# [allow (clippy :: let_and_return , clippy :: suspicious_else_formatting , clippy :: redundant_field_names , dead_code , redundant_semicolons , unused_braces , unused_imports , unused_unsafe , unused_variables , unused_qualifications)] pub mod types { pub mod ffi { pub mod input_value { # [doc = "FFI-representation of the # [doc = \"FFI-representation of the crate :: ffi :: input_value :: InputValue\"]"] # [repr (C)] # [derive (Clone)] # [allow (non_camel_case_types)] pub struct InputValue { pub is_valid : bool , pub value : u64 , } impl ferment_interfaces :: FFIConversion < crate :: ffi :: input_value :: InputValue > for InputValue { unsafe fn ffi_from_const (ffi : * const InputValue) -> crate :: ffi :: input_value :: InputValue { let ffi_ref = & * ffi ; crate :: ffi :: input_value :: InputValue { is_valid : ffi_ref . is_valid , value : ffi_ref . value , } } unsafe fn ffi_to_const (obj : crate :: ffi :: input_value :: InputValue) -> * const InputValue { ferment_interfaces :: boxed (InputValue { is_valid : obj . is_valid , value : obj . value , }) } unsafe fn destroy (ffi : * mut InputValue) { ferment_interfaces :: unbox_any (ffi) ; } } impl Drop for InputValue { fn drop (& mut self) { unsafe { let ffi_ref = self ; ; ; } } } # [doc = r" # Safety"] # [allow (non_snake_case)] # [no_mangle] pub unsafe extern "C" fn InputValue_ctor (is_valid : bool , value : u64) -> * mut InputValue { ferment_interfaces :: boxed (InputValue { is_valid , value , }) } # [doc = r" # Safety"] # [allow (non_snake_case)] # [no_mangle] pub unsafe extern "C" fn InputValue_destroy (ffi : * mut InputValue) { ferment_interfaces :: unbox_any (ffi) ; } } } pub mod messages { pub mod coinjoin_complete_message { # [doc = "FFI-representation of the # [doc = \"FFI-representation of the crate :: messages :: coinjoin_complete_message :: CoinJoinCompleteMessage\"]"] # [repr (C)] # [derive (Clone)] # [allow (non_camel_case_types)] pub struct CoinJoinCompleteMessage { pub msg_session_id : i32 , pub msg_message_id : * mut crate :: fermented :: types :: messages :: pool_message :: PoolMessage , } impl ferment_interfaces :: FFIConversion < crate :: messages :: coinjoin_complete_message :: CoinJoinCompleteMessage > for CoinJoinCompleteMessage { unsafe fn ffi_from_const (ffi : * const CoinJoinCompleteMessage) -> crate :: messages :: coinjoin_complete_message :: CoinJoinCompleteMessage { let ffi_ref = & * ffi ; crate :: messages :: coinjoin_complete_message :: CoinJoinCompleteMessage { msg_session_id : ffi_ref . msg_session_id , msg_message_id : ferment_interfaces :: FFIConversion :: ffi_from (ffi_ref . msg_message_id) , } } unsafe fn ffi_to_const (obj : crate :: messages :: coinjoin_complete_message :: CoinJoinCompleteMessage) -> * const CoinJoinCompleteMessage { ferment_interfaces :: boxed (CoinJoinCompleteMessage { msg_session_id : obj . msg_session_id , msg_message_id : ferment_interfaces :: FFIConversion :: ffi_to (obj . msg_message_id) , }) } unsafe fn destroy (ffi : * mut CoinJoinCompleteMessage) { ferment_interfaces :: unbox_any (ffi) ; } } impl Drop for CoinJoinCompleteMessage { fn drop (& mut self) { unsafe { let ffi_ref = self ; ; ferment_interfaces :: unbox_any (ffi_ref . msg_message_id) ; ; } } } # [doc = r" # Safety"] # [allow (non_snake_case)] # [no_mangle] pub unsafe extern "C" fn CoinJoinCompleteMessage_ctor (msg_session_id : i32 , msg_message_id : * mut crate :: fermented :: types :: messages :: pool_message :: PoolMessage) -> * mut CoinJoinCompleteMessage { ferment_interfaces :: boxed (CoinJoinCompleteMessage { msg_session_id , msg_message_id , }) } # [doc = r" # Safety"] # [allow (non_snake_case)] # [no_mangle] pub unsafe extern "C" fn CoinJoinCompleteMessage_destroy (ffi : * mut CoinJoinCompleteMessage) { ferment_interfaces :: unbox_any (ffi) ; } } pub mod coinjoin_accept_message { # [doc = "FFI-representation of the # [doc = \"FFI-representation of the crate :: messages :: coinjoin_accept_message :: CoinJoinAcceptMessage\"]"] # [repr (C)] # [derive (Clone)] # [allow (non_camel_case_types)] pub struct CoinJoinAcceptMessage { pub denomination : u32 , pub tx_collateral : * mut dash_spv_masternode_processor :: tx :: transaction :: Transaction , } impl ferment_interfaces :: FFIConversion < crate :: messages :: coinjoin_accept_message :: CoinJoinAcceptMessage > for CoinJoinAcceptMessage { unsafe fn ffi_from_const (ffi : * const CoinJoinAcceptMessage) -> crate :: messages :: coinjoin_accept_message :: CoinJoinAcceptMessage { let ffi_ref = & * ffi ; crate :: messages :: coinjoin_accept_message :: CoinJoinAcceptMessage { denomination : ffi_ref . denomination , tx_collateral : ferment_interfaces :: FFIConversion :: ffi_from (ffi_ref . tx_collateral) , } } unsafe fn ffi_to_const (obj : crate :: messages :: coinjoin_accept_message :: CoinJoinAcceptMessage) -> * const CoinJoinAcceptMessage { ferment_interfaces :: boxed (CoinJoinAcceptMessage { denomination : obj . denomination , tx_collateral : ferment_interfaces :: FFIConversion :: ffi_to (obj . tx_collateral) , }) } unsafe fn destroy (ffi : * mut CoinJoinAcceptMessage) { ferment_interfaces :: unbox_any (ffi) ; } } impl Drop for CoinJoinAcceptMessage { fn drop (& mut self) { unsafe { let ffi_ref = self ; ; ferment_interfaces :: unbox_any (ffi_ref . tx_collateral) ; ; } } } # [doc = r" # Safety"] # [allow (non_snake_case)] # [no_mangle] pub unsafe extern "C" fn CoinJoinAcceptMessage_ctor (denomination : u32 , tx_collateral : * mut dash_spv_masternode_processor :: tx :: transaction :: Transaction) -> * mut CoinJoinAcceptMessage { ferment_interfaces :: boxed (CoinJoinAcceptMessage { denomination , tx_collateral , }) } # [doc = r" # Safety"] # [allow (non_snake_case)] # [no_mangle] pub unsafe extern "C" fn CoinJoinAcceptMessage_destroy (ffi : * mut CoinJoinAcceptMessage) { ferment_interfaces :: unbox_any (ffi) ; } } pub mod coinjoin_status_update { # [doc = "FFI-representation of the # [doc = \"FFI-representation of the crate :: messages :: coinjoin_status_update :: CoinJoinStatusUpdate\"]"] # [repr (C)] # [derive (Clone)] # [allow (non_camel_case_types)] pub struct CoinJoinStatusUpdate { pub session_id : i32 , pub pool_state : * mut crate :: fermented :: types :: messages :: pool_state :: PoolState , pub status_update : * mut crate :: fermented :: types :: messages :: pool_status_update :: PoolStatusUpdate , pub message_id : * mut crate :: fermented :: types :: messages :: pool_message :: PoolMessage , } impl ferment_interfaces :: FFIConversion < crate :: messages :: coinjoin_status_update :: CoinJoinStatusUpdate > for CoinJoinStatusUpdate { unsafe fn ffi_from_const (ffi : * const CoinJoinStatusUpdate) -> crate :: messages :: coinjoin_status_update :: CoinJoinStatusUpdate { let ffi_ref = & * ffi ; crate :: messages :: coinjoin_status_update :: CoinJoinStatusUpdate { session_id : ffi_ref . session_id , pool_state : ferment_interfaces :: FFIConversion :: ffi_from (ffi_ref . pool_state) , status_update : ferment_interfaces :: FFIConversion :: ffi_from (ffi_ref . status_update) , message_id : ferment_interfaces :: FFIConversion :: ffi_from (ffi_ref . message_id) , } } unsafe fn ffi_to_const (obj : crate :: messages :: coinjoin_status_update :: CoinJoinStatusUpdate) -> * const CoinJoinStatusUpdate { ferment_interfaces :: boxed (CoinJoinStatusUpdate { session_id : obj . session_id , pool_state : ferment_interfaces :: FFIConversion :: ffi_to (obj . pool_state) , status_update : ferment_interfaces :: FFIConversion :: ffi_to (obj . status_update) , message_id : ferment_interfaces :: FFIConversion :: ffi_to (obj . message_id) , }) } unsafe fn destroy (ffi : * mut CoinJoinStatusUpdate) { ferment_interfaces :: unbox_any (ffi) ; } } impl Drop for CoinJoinStatusUpdate { fn drop (& mut self) { unsafe { let ffi_ref = self ; ; ferment_interfaces :: unbox_any (ffi_ref . pool_state) ; ; ferment_interfaces :: unbox_any (ffi_ref . status_update) ; ; ferment_interfaces :: unbox_any (ffi_ref . message_id) ; ; } } } # [doc = r" # Safety"] # [allow (non_snake_case)] # [no_mangle] pub unsafe extern "C" fn CoinJoinStatusUpdate_ctor (session_id : i32 , pool_state : * mut crate :: fermented :: types :: messages :: pool_state :: PoolState , status_update : * mut crate :: fermented :: types :: messages :: pool_status_update :: PoolStatusUpdate , message_id : * mut crate :: fermented :: types :: messages :: pool_message :: PoolMessage) -> * mut CoinJoinStatusUpdate { ferment_interfaces :: boxed (CoinJoinStatusUpdate { session_id , pool_state , status_update , message_id , }) } # [doc = r" # Safety"] # [allow (non_snake_case)] # [no_mangle] pub unsafe extern "C" fn CoinJoinStatusUpdate_destroy (ffi : * mut CoinJoinStatusUpdate) { ferment_interfaces :: unbox_any (ffi) ; } } pub mod send_coinjoin_queue { # [doc = "FFI-representation of the # [doc = \"FFI-representation of the crate :: messages :: send_coinjoin_queue :: SendCoinJoinQueue\"]"] # [repr (C)] # [derive (Clone)] # [allow (non_camel_case_types)] pub struct SendCoinJoinQueue { pub send : bool , } impl ferment_interfaces :: FFIConversion < crate :: messages :: send_coinjoin_queue :: SendCoinJoinQueue > for SendCoinJoinQueue { unsafe fn ffi_from_const (ffi : * const SendCoinJoinQueue) -> crate :: messages :: send_coinjoin_queue :: SendCoinJoinQueue { let ffi_ref = & * ffi ; crate :: messages :: send_coinjoin_queue :: SendCoinJoinQueue { send : ffi_ref . send , } } unsafe fn ffi_to_const (obj : crate :: messages :: send_coinjoin_queue :: SendCoinJoinQueue) -> * const SendCoinJoinQueue { ferment_interfaces :: boxed (SendCoinJoinQueue { send : obj . send , }) } unsafe fn destroy (ffi : * mut SendCoinJoinQueue) { ferment_interfaces :: unbox_any (ffi) ; } } impl Drop for SendCoinJoinQueue { fn drop (& mut self) { unsafe { let ffi_ref = self ; ; } } } # [doc = r" # Safety"] # [allow (non_snake_case)] # [no_mangle] pub unsafe extern "C" fn SendCoinJoinQueue_ctor (send : bool) -> * mut SendCoinJoinQueue { ferment_interfaces :: boxed (SendCoinJoinQueue { send , }) } # [doc = r" # Safety"] # [allow (non_snake_case)] # [no_mangle] pub unsafe extern "C" fn SendCoinJoinQueue_destroy (ffi : * mut SendCoinJoinQueue) { ferment_interfaces :: unbox_any (ffi) ; } } pub mod coinjoin_final_transaction { # [doc = "FFI-representation of the # [doc = \"FFI-representation of the crate :: messages :: coinjoin_final_transaction :: CoinJoinFinalTransaction\"]"] # [repr (C)] # [derive (Clone)] # [allow (non_camel_case_types)] pub struct CoinJoinFinalTransaction { pub msg_session_id : i32 , pub tx : * mut dash_spv_masternode_processor :: tx :: transaction :: Transaction , } impl ferment_interfaces :: FFIConversion < crate :: messages :: coinjoin_final_transaction :: CoinJoinFinalTransaction > for CoinJoinFinalTransaction { unsafe fn ffi_from_const (ffi : * const CoinJoinFinalTransaction) -> crate :: messages :: coinjoin_final_transaction :: CoinJoinFinalTransaction { let ffi_ref = & * ffi ; crate :: messages :: coinjoin_final_transaction :: CoinJoinFinalTransaction { msg_session_id : ffi_ref . msg_session_id , tx : ferment_interfaces :: FFIConversion :: ffi_from (ffi_ref . tx) , } } unsafe fn ffi_to_const (obj : crate :: messages :: coinjoin_final_transaction :: CoinJoinFinalTransaction) -> * const CoinJoinFinalTransaction { ferment_interfaces :: boxed (CoinJoinFinalTransaction { msg_session_id : obj . msg_session_id , tx : ferment_interfaces :: FFIConversion :: ffi_to (obj . tx) , }) } unsafe fn destroy (ffi : * mut CoinJoinFinalTransaction) { ferment_interfaces :: unbox_any (ffi) ; } } impl Drop for CoinJoinFinalTransaction { fn drop (& mut self) { unsafe { let ffi_ref = self ; ; ferment_interfaces :: unbox_any (ffi_ref . tx) ; ; } } } # [doc = r" # Safety"] # [allow (non_snake_case)] # [no_mangle] pub unsafe extern "C" fn CoinJoinFinalTransaction_ctor (msg_session_id : i32 , tx : * mut dash_spv_masternode_processor :: tx :: transaction :: Transaction) -> * mut CoinJoinFinalTransaction { ferment_interfaces :: boxed (CoinJoinFinalTransaction { msg_session_id , tx , }) } # [doc = r" # Safety"] # [allow (non_snake_case)] # [no_mangle] pub unsafe extern "C" fn CoinJoinFinalTransaction_destroy (ffi : * mut CoinJoinFinalTransaction) { ferment_interfaces :: unbox_any (ffi) ; } } } } # [allow (clippy :: let_and_return , clippy :: suspicious_else_formatting , clippy :: redundant_field_names , dead_code , redundant_semicolons , unused_braces , unused_imports , unused_unsafe , unused_variables , unused_qualifications)] pub mod generics { } \ No newline at end of file +# [allow (clippy :: let_and_return , clippy :: suspicious_else_formatting , clippy :: redundant_field_names , dead_code , redundant_semicolons , unused_braces , unused_imports , unused_unsafe , unused_variables , unused_qualifications)] pub mod types { pub mod ffi { pub mod input_value { # [doc = "FFI-representation of the # [doc = \"FFI-representation of the crate :: ffi :: input_value :: InputValue\"]"] # [repr (C)] # [derive (Clone)] # [allow (non_camel_case_types)] pub struct InputValue { pub is_valid : bool , pub value : u64 , } impl ferment_interfaces :: FFIConversion < crate :: ffi :: input_value :: InputValue > for InputValue { unsafe fn ffi_from_const (ffi : * const InputValue) -> crate :: ffi :: input_value :: InputValue { let ffi_ref = & * ffi ; crate :: ffi :: input_value :: InputValue { is_valid : ffi_ref . is_valid , value : ffi_ref . value , } } unsafe fn ffi_to_const (obj : crate :: ffi :: input_value :: InputValue) -> * const InputValue { ferment_interfaces :: boxed (InputValue { is_valid : obj . is_valid , value : obj . value , }) } unsafe fn destroy (ffi : * mut InputValue) { ferment_interfaces :: unbox_any (ffi) ; } } impl Drop for InputValue { fn drop (& mut self) { unsafe { let ffi_ref = self ; ; ; } } } # [doc = r" # Safety"] # [allow (non_snake_case)] # [no_mangle] pub unsafe extern "C" fn InputValue_ctor (is_valid : bool , value : u64) -> * mut InputValue { ferment_interfaces :: boxed (InputValue { is_valid , value , }) } # [doc = r" # Safety"] # [allow (non_snake_case)] # [no_mangle] pub unsafe extern "C" fn InputValue_destroy (ffi : * mut InputValue) { ferment_interfaces :: unbox_any (ffi) ; } } } pub mod messages { pub mod coinjoin_accept_message { # [doc = "FFI-representation of the # [doc = \"FFI-representation of the crate :: messages :: coinjoin_accept_message :: CoinJoinAcceptMessage\"]"] # [repr (C)] # [derive (Clone)] # [allow (non_camel_case_types)] pub struct CoinJoinAcceptMessage { pub denomination : u32 , pub tx_collateral : * mut dash_spv_masternode_processor :: tx :: transaction :: Transaction , } impl ferment_interfaces :: FFIConversion < crate :: messages :: coinjoin_accept_message :: CoinJoinAcceptMessage > for CoinJoinAcceptMessage { unsafe fn ffi_from_const (ffi : * const CoinJoinAcceptMessage) -> crate :: messages :: coinjoin_accept_message :: CoinJoinAcceptMessage { let ffi_ref = & * ffi ; crate :: messages :: coinjoin_accept_message :: CoinJoinAcceptMessage { denomination : ffi_ref . denomination , tx_collateral : ferment_interfaces :: FFIConversion :: ffi_from (ffi_ref . tx_collateral) , } } unsafe fn ffi_to_const (obj : crate :: messages :: coinjoin_accept_message :: CoinJoinAcceptMessage) -> * const CoinJoinAcceptMessage { ferment_interfaces :: boxed (CoinJoinAcceptMessage { denomination : obj . denomination , tx_collateral : ferment_interfaces :: FFIConversion :: ffi_to (obj . tx_collateral) , }) } unsafe fn destroy (ffi : * mut CoinJoinAcceptMessage) { ferment_interfaces :: unbox_any (ffi) ; } } impl Drop for CoinJoinAcceptMessage { fn drop (& mut self) { unsafe { let ffi_ref = self ; ; ferment_interfaces :: unbox_any (ffi_ref . tx_collateral) ; ; } } } # [doc = r" # Safety"] # [allow (non_snake_case)] # [no_mangle] pub unsafe extern "C" fn CoinJoinAcceptMessage_ctor (denomination : u32 , tx_collateral : * mut dash_spv_masternode_processor :: tx :: transaction :: Transaction) -> * mut CoinJoinAcceptMessage { ferment_interfaces :: boxed (CoinJoinAcceptMessage { denomination , tx_collateral , }) } # [doc = r" # Safety"] # [allow (non_snake_case)] # [no_mangle] pub unsafe extern "C" fn CoinJoinAcceptMessage_destroy (ffi : * mut CoinJoinAcceptMessage) { ferment_interfaces :: unbox_any (ffi) ; } } pub mod coinjoin_complete_message { # [doc = "FFI-representation of the # [doc = \"FFI-representation of the crate :: messages :: coinjoin_complete_message :: CoinJoinCompleteMessage\"]"] # [repr (C)] # [derive (Clone)] # [allow (non_camel_case_types)] pub struct CoinJoinCompleteMessage { pub msg_session_id : i32 , pub msg_message_id : * mut crate :: fermented :: types :: messages :: pool_message :: PoolMessage , } impl ferment_interfaces :: FFIConversion < crate :: messages :: coinjoin_complete_message :: CoinJoinCompleteMessage > for CoinJoinCompleteMessage { unsafe fn ffi_from_const (ffi : * const CoinJoinCompleteMessage) -> crate :: messages :: coinjoin_complete_message :: CoinJoinCompleteMessage { let ffi_ref = & * ffi ; crate :: messages :: coinjoin_complete_message :: CoinJoinCompleteMessage { msg_session_id : ffi_ref . msg_session_id , msg_message_id : ferment_interfaces :: FFIConversion :: ffi_from (ffi_ref . msg_message_id) , } } unsafe fn ffi_to_const (obj : crate :: messages :: coinjoin_complete_message :: CoinJoinCompleteMessage) -> * const CoinJoinCompleteMessage { ferment_interfaces :: boxed (CoinJoinCompleteMessage { msg_session_id : obj . msg_session_id , msg_message_id : ferment_interfaces :: FFIConversion :: ffi_to (obj . msg_message_id) , }) } unsafe fn destroy (ffi : * mut CoinJoinCompleteMessage) { ferment_interfaces :: unbox_any (ffi) ; } } impl Drop for CoinJoinCompleteMessage { fn drop (& mut self) { unsafe { let ffi_ref = self ; ; ferment_interfaces :: unbox_any (ffi_ref . msg_message_id) ; ; } } } # [doc = r" # Safety"] # [allow (non_snake_case)] # [no_mangle] pub unsafe extern "C" fn CoinJoinCompleteMessage_ctor (msg_session_id : i32 , msg_message_id : * mut crate :: fermented :: types :: messages :: pool_message :: PoolMessage) -> * mut CoinJoinCompleteMessage { ferment_interfaces :: boxed (CoinJoinCompleteMessage { msg_session_id , msg_message_id , }) } # [doc = r" # Safety"] # [allow (non_snake_case)] # [no_mangle] pub unsafe extern "C" fn CoinJoinCompleteMessage_destroy (ffi : * mut CoinJoinCompleteMessage) { ferment_interfaces :: unbox_any (ffi) ; } } pub mod coinjoin_final_transaction { # [doc = "FFI-representation of the # [doc = \"FFI-representation of the crate :: messages :: coinjoin_final_transaction :: CoinJoinFinalTransaction\"]"] # [repr (C)] # [derive (Clone)] # [allow (non_camel_case_types)] pub struct CoinJoinFinalTransaction { pub msg_session_id : i32 , pub tx : * mut dash_spv_masternode_processor :: tx :: transaction :: Transaction , } impl ferment_interfaces :: FFIConversion < crate :: messages :: coinjoin_final_transaction :: CoinJoinFinalTransaction > for CoinJoinFinalTransaction { unsafe fn ffi_from_const (ffi : * const CoinJoinFinalTransaction) -> crate :: messages :: coinjoin_final_transaction :: CoinJoinFinalTransaction { let ffi_ref = & * ffi ; crate :: messages :: coinjoin_final_transaction :: CoinJoinFinalTransaction { msg_session_id : ffi_ref . msg_session_id , tx : ferment_interfaces :: FFIConversion :: ffi_from (ffi_ref . tx) , } } unsafe fn ffi_to_const (obj : crate :: messages :: coinjoin_final_transaction :: CoinJoinFinalTransaction) -> * const CoinJoinFinalTransaction { ferment_interfaces :: boxed (CoinJoinFinalTransaction { msg_session_id : obj . msg_session_id , tx : ferment_interfaces :: FFIConversion :: ffi_to (obj . tx) , }) } unsafe fn destroy (ffi : * mut CoinJoinFinalTransaction) { ferment_interfaces :: unbox_any (ffi) ; } } impl Drop for CoinJoinFinalTransaction { fn drop (& mut self) { unsafe { let ffi_ref = self ; ; ferment_interfaces :: unbox_any (ffi_ref . tx) ; ; } } } # [doc = r" # Safety"] # [allow (non_snake_case)] # [no_mangle] pub unsafe extern "C" fn CoinJoinFinalTransaction_ctor (msg_session_id : i32 , tx : * mut dash_spv_masternode_processor :: tx :: transaction :: Transaction) -> * mut CoinJoinFinalTransaction { ferment_interfaces :: boxed (CoinJoinFinalTransaction { msg_session_id , tx , }) } # [doc = r" # Safety"] # [allow (non_snake_case)] # [no_mangle] pub unsafe extern "C" fn CoinJoinFinalTransaction_destroy (ffi : * mut CoinJoinFinalTransaction) { ferment_interfaces :: unbox_any (ffi) ; } } pub mod send_coinjoin_queue { # [doc = "FFI-representation of the # [doc = \"FFI-representation of the crate :: messages :: send_coinjoin_queue :: SendCoinJoinQueue\"]"] # [repr (C)] # [derive (Clone)] # [allow (non_camel_case_types)] pub struct SendCoinJoinQueue { pub send : bool , } impl ferment_interfaces :: FFIConversion < crate :: messages :: send_coinjoin_queue :: SendCoinJoinQueue > for SendCoinJoinQueue { unsafe fn ffi_from_const (ffi : * const SendCoinJoinQueue) -> crate :: messages :: send_coinjoin_queue :: SendCoinJoinQueue { let ffi_ref = & * ffi ; crate :: messages :: send_coinjoin_queue :: SendCoinJoinQueue { send : ffi_ref . send , } } unsafe fn ffi_to_const (obj : crate :: messages :: send_coinjoin_queue :: SendCoinJoinQueue) -> * const SendCoinJoinQueue { ferment_interfaces :: boxed (SendCoinJoinQueue { send : obj . send , }) } unsafe fn destroy (ffi : * mut SendCoinJoinQueue) { ferment_interfaces :: unbox_any (ffi) ; } } impl Drop for SendCoinJoinQueue { fn drop (& mut self) { unsafe { let ffi_ref = self ; ; } } } # [doc = r" # Safety"] # [allow (non_snake_case)] # [no_mangle] pub unsafe extern "C" fn SendCoinJoinQueue_ctor (send : bool) -> * mut SendCoinJoinQueue { ferment_interfaces :: boxed (SendCoinJoinQueue { send , }) } # [doc = r" # Safety"] # [allow (non_snake_case)] # [no_mangle] pub unsafe extern "C" fn SendCoinJoinQueue_destroy (ffi : * mut SendCoinJoinQueue) { ferment_interfaces :: unbox_any (ffi) ; } } pub mod coinjoin_status_update { # [doc = "FFI-representation of the # [doc = \"FFI-representation of the crate :: messages :: coinjoin_status_update :: CoinJoinStatusUpdate\"]"] # [repr (C)] # [derive (Clone)] # [allow (non_camel_case_types)] pub struct CoinJoinStatusUpdate { pub session_id : i32 , pub pool_state : * mut crate :: fermented :: types :: messages :: pool_state :: PoolState , pub status_update : * mut crate :: fermented :: types :: messages :: pool_status_update :: PoolStatusUpdate , pub message_id : * mut crate :: fermented :: types :: messages :: pool_message :: PoolMessage , } impl ferment_interfaces :: FFIConversion < crate :: messages :: coinjoin_status_update :: CoinJoinStatusUpdate > for CoinJoinStatusUpdate { unsafe fn ffi_from_const (ffi : * const CoinJoinStatusUpdate) -> crate :: messages :: coinjoin_status_update :: CoinJoinStatusUpdate { let ffi_ref = & * ffi ; crate :: messages :: coinjoin_status_update :: CoinJoinStatusUpdate { session_id : ffi_ref . session_id , pool_state : ferment_interfaces :: FFIConversion :: ffi_from (ffi_ref . pool_state) , status_update : ferment_interfaces :: FFIConversion :: ffi_from (ffi_ref . status_update) , message_id : ferment_interfaces :: FFIConversion :: ffi_from (ffi_ref . message_id) , } } unsafe fn ffi_to_const (obj : crate :: messages :: coinjoin_status_update :: CoinJoinStatusUpdate) -> * const CoinJoinStatusUpdate { ferment_interfaces :: boxed (CoinJoinStatusUpdate { session_id : obj . session_id , pool_state : ferment_interfaces :: FFIConversion :: ffi_to (obj . pool_state) , status_update : ferment_interfaces :: FFIConversion :: ffi_to (obj . status_update) , message_id : ferment_interfaces :: FFIConversion :: ffi_to (obj . message_id) , }) } unsafe fn destroy (ffi : * mut CoinJoinStatusUpdate) { ferment_interfaces :: unbox_any (ffi) ; } } impl Drop for CoinJoinStatusUpdate { fn drop (& mut self) { unsafe { let ffi_ref = self ; ; ferment_interfaces :: unbox_any (ffi_ref . pool_state) ; ; ferment_interfaces :: unbox_any (ffi_ref . status_update) ; ; ferment_interfaces :: unbox_any (ffi_ref . message_id) ; ; } } } # [doc = r" # Safety"] # [allow (non_snake_case)] # [no_mangle] pub unsafe extern "C" fn CoinJoinStatusUpdate_ctor (session_id : i32 , pool_state : * mut crate :: fermented :: types :: messages :: pool_state :: PoolState , status_update : * mut crate :: fermented :: types :: messages :: pool_status_update :: PoolStatusUpdate , message_id : * mut crate :: fermented :: types :: messages :: pool_message :: PoolMessage) -> * mut CoinJoinStatusUpdate { ferment_interfaces :: boxed (CoinJoinStatusUpdate { session_id , pool_state , status_update , message_id , }) } # [doc = r" # Safety"] # [allow (non_snake_case)] # [no_mangle] pub unsafe extern "C" fn CoinJoinStatusUpdate_destroy (ffi : * mut CoinJoinStatusUpdate) { ferment_interfaces :: unbox_any (ffi) ; } } } } # [allow (clippy :: let_and_return , clippy :: suspicious_else_formatting , clippy :: redundant_field_names , dead_code , redundant_semicolons , unused_braces , unused_imports , unused_unsafe , unused_variables , unused_qualifications)] pub mod generics { } \ No newline at end of file diff --git a/dash-spv-masternode-processor/Cargo.toml b/dash-spv-masternode-processor/Cargo.toml index ba41af0a..af33c681 100644 --- a/dash-spv-masternode-processor/Cargo.toml +++ b/dash-spv-masternode-processor/Cargo.toml @@ -14,6 +14,7 @@ rand = ["secp256k1/rand-std"] secp-lowmemory = ["secp256k1/lowmemory"] secp-recovery = ["secp256k1/recovery"] generate-dashj-tests = [] +use_serde = ["serde"] # At least one of std, no-std must be enabled. # # The no-std feature doesn't disable std - you need to turn off the std feature for that by disabling default. @@ -28,19 +29,20 @@ bip38 = { git = "https://github.com/pankcuf/bip38", rev = "87abd21" } bitcoin_hashes = { version = "0.11.0", default-features = false } bitcoinconsensus = { version = "0.19.0-3", optional = true } blake3 = "1.3.2" -bls-signatures = { git = "https://github.com/dashevo/bls-signatures", rev = "a5589e6", features = ["legacy", "bip32", "apple"] } +bls-signatures = { git = "https://github.com/dashpay/bls-signatures", rev = "3ffa7fa2b62aecf3943c142508de4b7ec6005bb5", features = ["legacy", "bip32", "apple", "use_serde" ] } byte = "0.2" core2 = { version = "0.4.0", optional = true, default-features = false } dirs-next = "2.0.0" ed25519-dalek = "2.0.0-rc.3" -libc = "0.2.132" +libc = "0.2.158" logging = { path = "../logging" } rs-x11-hash = "0.1.8" secp256k1 = { version = "0.26.0", features = [ "recovery", "rand-std", "bitcoin_hashes" ] } -serde = { version = "1.0.144", features = ["derive"] } +serde = { version = "1.0.209", features = ["derive"], optional = true } serde_json = "1.0.85" tracing = "0.1.40" zeroize = "1.5.7" +bincode = "2.0.0-rc.3" [dev-dependencies] base64 = "0.21.0" diff --git a/dash-spv-masternode-processor/src/bindings/keys.rs b/dash-spv-masternode-processor/src/bindings/keys.rs index da00dc79..713bc01b 100644 --- a/dash-spv-masternode-processor/src/bindings/keys.rs +++ b/dash-spv-masternode-processor/src/bindings/keys.rs @@ -23,6 +23,8 @@ use crate::processing::keys_cache::KeysCache; use crate::types::opaque_key::{AsCStringPtr, AsOpaqueKey, OpaqueKey, KeyWithUniqueId, OpaqueKeys, OpaqueSerializedKeys}; use crate::util::address::address; use crate::util::sec_vec::SecVec; +#[cfg(feature = "use_serde")] +use serde::{Deserialize, Deserializer, Serialize, Serializer}; /// Destroys /// # Safety diff --git a/dash-spv-masternode-processor/src/blockdata/opcodes.rs b/dash-spv-masternode-processor/src/blockdata/opcodes.rs index 4682bd87..a987ff5e 100644 --- a/dash-spv-masternode-processor/src/blockdata/opcodes.rs +++ b/dash-spv-masternode-processor/src/blockdata/opcodes.rs @@ -22,8 +22,6 @@ #[cfg(feature = "serde")] use serde; -#[cfg(feature = "serde")] use prelude::*; - use core::{fmt, convert::From}; // Note: I am deliberately not implementing PartialOrd or Ord on the diff --git a/dash-spv-masternode-processor/src/internal_macros.rs b/dash-spv-masternode-processor/src/internal_macros.rs index 21d9af40..3bbf56c5 100644 --- a/dash-spv-masternode-processor/src/internal_macros.rs +++ b/dash-spv-masternode-processor/src/internal_macros.rs @@ -586,16 +586,16 @@ macro_rules! user_enum { #[cfg(feature = "serde")] #[cfg_attr(docsrs, doc(cfg(feature = "serde")))] - impl<'de> $crate::serde::Deserialize<'de> for $name { + impl<'de> ::serde::Deserialize<'de> for $name { #[inline] fn deserialize(deserializer: D) -> Result where - D: $crate::serde::Deserializer<'de>, + D: ::serde::Deserializer<'de>, { use ::core::fmt::{self, Formatter}; struct Visitor; - impl<'de> $crate::serde::de::Visitor<'de> for Visitor { + impl<'de> ::serde::de::Visitor<'de> for Visitor { type Value = $name; fn expecting(&self, formatter: &mut Formatter) -> fmt::Result { @@ -604,7 +604,7 @@ macro_rules! user_enum { fn visit_str(self, v: &str) -> Result where - E: $crate::serde::de::Error, + E: ::serde::de::Error, { static FIELDS: &'static [&'static str] = &[$(stringify!($txt)),*]; @@ -616,14 +616,14 @@ macro_rules! user_enum { fn visit_borrowed_str(self, v: &'de str) -> Result where - E: $crate::serde::de::Error, + E: ::serde::de::Error, { self.visit_str(v) } - fn visit_string(self, v: $crate::prelude::String) -> Result + fn visit_string(self, v: String) -> Result where - E: $crate::serde::de::Error, + E: ::serde::de::Error, { self.visit_str(&v) } @@ -636,10 +636,10 @@ macro_rules! user_enum { #[cfg(feature = "serde")] #[cfg_attr(docsrs, doc(cfg(feature = "serde")))] - impl $crate::serde::Serialize for $name { + impl ::serde::Serialize for $name { fn serialize(&self, serializer: S) -> Result where - S: $crate::serde::Serializer, + S: ::serde::Serializer, { serializer.collect_str(&self) } diff --git a/dash-spv-masternode-processor/src/keys/bls_key.rs b/dash-spv-masternode-processor/src/keys/bls_key.rs index 30efccc8..8b63171a 100644 --- a/dash-spv-masternode-processor/src/keys/bls_key.rs +++ b/dash-spv-masternode-processor/src/keys/bls_key.rs @@ -1,7 +1,7 @@ use bls_signatures::bip32::{ChainCode, ExtendedPrivateKey, ExtendedPublicKey}; use bls_signatures::{BasicSchemeMPL, BlsError, G1Element, G2Element, LegacySchemeMPL, PrivateKey, Scheme}; +use hashes::{Hash, hex::FromHex, sha256, sha256d, hex}; use hashes::hex::ToHex; -use hashes::{Hash, hex::FromHex, sha256, sha256d}; use crate::chain::{derivation::IIndexPath, ScriptMap}; use crate::consensus::Encodable; use crate::crypto::{UInt256, UInt384, UInt768, byte_util::{AsBytes, BytesDecodable, Zeroable}, UInt160}; @@ -9,6 +9,8 @@ use crate::keys::{IKey, KeyKind, dip14::{IChildKeyDerivation, SignKey}}; use crate::keys::crypto_data::{CryptoData, DHKey}; use crate::models::OperatorPublicKey; use crate::util::{base58, data_ops::hex_with_data, sec_vec::SecVec}; +#[cfg(feature = "use_serde")] +use serde::{Deserialize, Deserializer, Serialize, Serializer}; #[derive(Clone, Debug, Default)] pub struct BLSKey { @@ -178,7 +180,7 @@ impl BLSKey { pub fn key_with_seed_data(seed: &[u8], use_legacy: bool) -> Self { let bls_private_key = PrivateKey::from_bip32_seed(seed); let bls_public_key = bls_private_key.g1_element().unwrap(); - let seckey = UInt256::from(&*bls_private_key.serialize()); + let seckey = UInt256::from(&*bls_private_key.to_bytes()); let pubkey = UInt384(g1_element_serialized(&bls_public_key, use_legacy)); Self { seckey, pubkey, use_legacy, ..Default::default() } } @@ -572,7 +574,7 @@ fn g1_element_from_bytes(use_legacy: bool, bytes: &[u8]) -> Result [u8; 48] { +pub(crate) fn g1_element_serialized(public_key: &G1Element, use_legacy: bool) -> [u8; 48] { *if use_legacy { public_key.serialize_legacy() } else { @@ -619,7 +621,7 @@ impl From for UInt256 { impl From for UInt256 { fn from(value: PrivateKey) -> Self { - UInt256::from(value.serialize().as_slice()) + UInt256::from(value.to_bytes().as_slice()) } } @@ -633,4 +635,4 @@ impl From<&ExtendedPrivateKey> for SecVec { fn from(value: &ExtendedPrivateKey) -> Self { SecVec::with_vec(value.serialize().to_vec()) } -} \ No newline at end of file +} diff --git a/dash-spv-masternode-processor/src/keys/key.rs b/dash-spv-masternode-processor/src/keys/key.rs index a115f7ec..a8e100cf 100644 --- a/dash-spv-masternode-processor/src/keys/key.rs +++ b/dash-spv-masternode-processor/src/keys/key.rs @@ -5,6 +5,8 @@ use crate::crypto::{UInt256, UInt384, UInt768}; use crate::keys::{BLSKey, ECDSAKey, ED25519Key, IKey}; use crate::types::opaque_key::{AsOpaqueKey, OpaqueKey}; use crate::util::sec_vec::SecVec; +#[cfg(feature = "use_serde")] +use serde::{Deserialize, Deserializer, Serialize, Serializer}; #[repr(C)] #[derive(Clone, Copy, Debug, PartialEq)] diff --git a/dash-spv-masternode-processor/src/tests/bindings/keys.rs b/dash-spv-masternode-processor/src/tests/bindings/keys.rs index 2710eeb6..7c0fb1da 100644 --- a/dash-spv-masternode-processor/src/tests/bindings/keys.rs +++ b/dash-spv-masternode-processor/src/tests/bindings/keys.rs @@ -8,6 +8,8 @@ use crate::crypto::{UInt256, UInt384}; use crate::ffi::IndexPathData; use crate::keys::KeyKind; use crate::types::opaque_key::OpaqueKey; +#[cfg(feature = "use_serde")] +use serde::{Deserialize, Deserializer, Serialize, Serializer}; #[test] fn test_keys() { diff --git a/dash-spv-masternode-processor/src/tests/keys/bls.rs b/dash-spv-masternode-processor/src/tests/keys/bls.rs index 72aaa80d..d7793e2a 100644 --- a/dash-spv-masternode-processor/src/tests/keys/bls.rs +++ b/dash-spv-masternode-processor/src/tests/keys/bls.rs @@ -60,10 +60,9 @@ fn test_bls_multiplication() { #[test] fn test_bls_from_bip32_short_seed() { let private_key = PrivateKey::from_bip32_seed(&[1, 2, 3, 4, 5, 6, 7, 8, 9, 10]); - println!("{:?}", &*private_key.serialize()); - println!("{:?}", &*private_key.serialize().as_slice()); + println!("{:?}", &*private_key.to_bytes().as_slice()); assert_eq!( - private_key.serialize().as_slice(), + private_key.to_bytes().as_slice(), Vec::from_hex("46891c2cec49593c81921e473db7480029e0fc1eb933c6b93d81f5370eb19fbd").unwrap().as_slice(), "----"); } @@ -77,10 +76,9 @@ fn test_bls_from_bip32_long_seed() { // let seed = [50, 67, 148, 112, 207, 6, 210, 118, 137, 125, 27, 144, 105, 189, 214, 228, 68, 83, 144, 205, 80, 105, 133, 222, 14, 26, 28, 136, 167, 111, 241, 118]; // let secret = let private_key = PrivateKey::from_bip32_seed(&seed); - println!("{:?}", &*private_key.serialize()); - println!("{:?}", &*private_key.serialize().as_slice()); + println!("{:?}", &*private_key.to_bytes().as_slice()); assert_eq!( - private_key.serialize().as_slice(), + private_key.to_bytes().as_slice(), private_key_test_data.as_slice(), "----"); } diff --git a/reachability/Cargo.toml b/reachability/Cargo.toml index 33639db5..050c59ef 100644 --- a/reachability/Cargo.toml +++ b/reachability/Cargo.toml @@ -6,7 +6,7 @@ edition = "2021" # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html [dependencies] -libc = "0.2.139" +libc = "0.2.158" logging = { path = "../logging" } tracing = "0.1.40" system-configuration = "0.5.0"