mirror of
https://github.com/serai-dex/serai.git
synced 2025-12-12 14:09:25 +00:00
Compare commits
17 Commits
a1ef18a039
...
d74b00b9e4
| Author | SHA1 | Date | |
|---|---|---|---|
|
|
d74b00b9e4 | ||
|
|
3955f92cc2 | ||
|
|
a9b1e5293c | ||
|
|
80009ab67f | ||
|
|
df9fda2971 | ||
|
|
ca8afb83a1 | ||
|
|
18a9cf2535 | ||
|
|
10c126ad92 | ||
|
|
19305aebc9 | ||
|
|
be68e27551 | ||
|
|
d6d96fe8ff | ||
|
|
95909d83a4 | ||
|
|
3bd48974f3 | ||
|
|
29093715e3 | ||
|
|
87b4dfc8f3 | ||
|
|
4db78b1787 | ||
|
|
02a5f15535 |
138
Cargo.lock
generated
138
Cargo.lock
generated
@@ -1379,7 +1379,7 @@ dependencies = [
|
|||||||
"serde",
|
"serde",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"simple-request",
|
"simple-request",
|
||||||
"std-shims",
|
"std-shims 0.1.5",
|
||||||
"subtle",
|
"subtle",
|
||||||
"thiserror 2.0.16",
|
"thiserror 2.0.16",
|
||||||
"tokio",
|
"tokio",
|
||||||
@@ -1795,7 +1795,7 @@ dependencies = [
|
|||||||
"ff-group-tests",
|
"ff-group-tests",
|
||||||
"group",
|
"group",
|
||||||
"hex",
|
"hex",
|
||||||
"std-shims",
|
"std-shims 0.1.5",
|
||||||
"subtle",
|
"subtle",
|
||||||
"zeroize",
|
"zeroize",
|
||||||
]
|
]
|
||||||
@@ -1806,7 +1806,7 @@ version = "0.4.99"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"ciphersuite 0.4.2",
|
"ciphersuite 0.4.2",
|
||||||
"dalek-ff-group",
|
"dalek-ff-group",
|
||||||
"std-shims",
|
"std-shims 0.1.5",
|
||||||
"zeroize",
|
"zeroize",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -2676,7 +2676,7 @@ version = "0.6.1"
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"borsh",
|
"borsh",
|
||||||
"ciphersuite 0.4.2",
|
"ciphersuite 0.4.2",
|
||||||
"std-shims",
|
"std-shims 0.1.5",
|
||||||
"thiserror 2.0.16",
|
"thiserror 2.0.16",
|
||||||
"zeroize",
|
"zeroize",
|
||||||
]
|
]
|
||||||
@@ -2688,7 +2688,7 @@ dependencies = [
|
|||||||
"ciphersuite 0.4.2",
|
"ciphersuite 0.4.2",
|
||||||
"dkg",
|
"dkg",
|
||||||
"rand_core 0.6.4",
|
"rand_core 0.6.4",
|
||||||
"std-shims",
|
"std-shims 0.1.5",
|
||||||
"zeroize",
|
"zeroize",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -2714,7 +2714,7 @@ dependencies = [
|
|||||||
"rand_chacha 0.3.1",
|
"rand_chacha 0.3.1",
|
||||||
"rand_core 0.6.4",
|
"rand_core 0.6.4",
|
||||||
"secq256k1",
|
"secq256k1",
|
||||||
"std-shims",
|
"std-shims 0.1.5",
|
||||||
"thiserror 2.0.16",
|
"thiserror 2.0.16",
|
||||||
"zeroize",
|
"zeroize",
|
||||||
]
|
]
|
||||||
@@ -2729,7 +2729,7 @@ dependencies = [
|
|||||||
"dkg-recovery",
|
"dkg-recovery",
|
||||||
"multiexp",
|
"multiexp",
|
||||||
"rand_core 0.6.4",
|
"rand_core 0.6.4",
|
||||||
"std-shims",
|
"std-shims 0.1.5",
|
||||||
"thiserror 2.0.16",
|
"thiserror 2.0.16",
|
||||||
"zeroize",
|
"zeroize",
|
||||||
]
|
]
|
||||||
@@ -2800,7 +2800,7 @@ dependencies = [
|
|||||||
"ff",
|
"ff",
|
||||||
"group",
|
"group",
|
||||||
"rand_core 0.6.4",
|
"rand_core 0.6.4",
|
||||||
"std-shims",
|
"std-shims 0.1.99",
|
||||||
"subtle",
|
"subtle",
|
||||||
"zeroize",
|
"zeroize",
|
||||||
]
|
]
|
||||||
@@ -2913,7 +2913,7 @@ dependencies = [
|
|||||||
"prime-field",
|
"prime-field",
|
||||||
"rand_core 0.6.4",
|
"rand_core 0.6.4",
|
||||||
"short-weierstrass",
|
"short-weierstrass",
|
||||||
"std-shims",
|
"std-shims 0.1.5",
|
||||||
"typenum",
|
"typenum",
|
||||||
"zeroize",
|
"zeroize",
|
||||||
]
|
]
|
||||||
@@ -3371,7 +3371,7 @@ dependencies = [
|
|||||||
"rand_core 0.6.4",
|
"rand_core 0.6.4",
|
||||||
"schnorr-signatures",
|
"schnorr-signatures",
|
||||||
"schnorrkel",
|
"schnorrkel",
|
||||||
"std-shims",
|
"std-shims 0.1.5",
|
||||||
"zeroize",
|
"zeroize",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -3547,7 +3547,7 @@ dependencies = [
|
|||||||
"flexible-transcript",
|
"flexible-transcript",
|
||||||
"multiexp",
|
"multiexp",
|
||||||
"rand_core 0.6.4",
|
"rand_core 0.6.4",
|
||||||
"std-shims",
|
"std-shims 0.1.99",
|
||||||
"zeroize",
|
"zeroize",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -3558,7 +3558,7 @@ source = "git+https://github.com/monero-oxide/monero-oxide?rev=dc1b3dbe436aae61e
|
|||||||
dependencies = [
|
dependencies = [
|
||||||
"ciphersuite 0.4.99",
|
"ciphersuite 0.4.99",
|
||||||
"generalized-bulletproofs",
|
"generalized-bulletproofs",
|
||||||
"std-shims",
|
"std-shims 0.1.99",
|
||||||
"zeroize",
|
"zeroize",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -3570,7 +3570,7 @@ dependencies = [
|
|||||||
"ciphersuite 0.4.99",
|
"ciphersuite 0.4.99",
|
||||||
"generalized-bulletproofs-circuit-abstraction",
|
"generalized-bulletproofs-circuit-abstraction",
|
||||||
"generic-array 1.2.0",
|
"generic-array 1.2.0",
|
||||||
"std-shims",
|
"std-shims 0.1.99",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -4051,6 +4051,7 @@ dependencies = [
|
|||||||
"tokio",
|
"tokio",
|
||||||
"tokio-rustls",
|
"tokio-rustls",
|
||||||
"tower-service",
|
"tower-service",
|
||||||
|
"webpki-roots 1.0.2",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -4271,7 +4272,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index"
|
|||||||
checksum = "4b0f83760fb341a774ed326568e19f5a863af4a952def8c39f9ab92fd95b88e5"
|
checksum = "4b0f83760fb341a774ed326568e19f5a863af4a952def8c39f9ab92fd95b88e5"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"equivalent",
|
"equivalent",
|
||||||
"hashbrown 0.15.5",
|
"hashbrown 0.16.0",
|
||||||
"serde",
|
"serde",
|
||||||
"serde_core",
|
"serde_core",
|
||||||
]
|
]
|
||||||
@@ -5431,7 +5432,7 @@ dependencies = [
|
|||||||
"schnorr-signatures",
|
"schnorr-signatures",
|
||||||
"serde_json",
|
"serde_json",
|
||||||
"sha2 0.10.9",
|
"sha2 0.10.9",
|
||||||
"std-shims",
|
"std-shims 0.1.5",
|
||||||
"subtle",
|
"subtle",
|
||||||
"thiserror 2.0.16",
|
"thiserror 2.0.16",
|
||||||
"zeroize",
|
"zeroize",
|
||||||
@@ -5459,7 +5460,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "monero-address"
|
name = "monero-address"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/monero-oxide/monero-oxide?rev=2c847f71079a105456376f9957cee86c4b6a9eb8#2c847f71079a105456376f9957cee86c4b6a9eb8"
|
source = "git+https://github.com/monero-oxide/monero-oxide?rev=f6f4dd7dc5b7c6e057b2eac2ec4980bb7a1c707c#f6f4dd7dc5b7c6e057b2eac2ec4980bb7a1c707c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"curve25519-dalek",
|
"curve25519-dalek",
|
||||||
"monero-base58",
|
"monero-base58",
|
||||||
@@ -5471,36 +5472,36 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "monero-base58"
|
name = "monero-base58"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/monero-oxide/monero-oxide?rev=2c847f71079a105456376f9957cee86c4b6a9eb8#2c847f71079a105456376f9957cee86c4b6a9eb8"
|
source = "git+https://github.com/monero-oxide/monero-oxide?rev=f6f4dd7dc5b7c6e057b2eac2ec4980bb7a1c707c#f6f4dd7dc5b7c6e057b2eac2ec4980bb7a1c707c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"monero-primitives",
|
"monero-primitives",
|
||||||
"std-shims",
|
"std-shims 0.1.99",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "monero-borromean"
|
name = "monero-borromean"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/monero-oxide/monero-oxide?rev=2c847f71079a105456376f9957cee86c4b6a9eb8#2c847f71079a105456376f9957cee86c4b6a9eb8"
|
source = "git+https://github.com/monero-oxide/monero-oxide?rev=f6f4dd7dc5b7c6e057b2eac2ec4980bb7a1c707c#f6f4dd7dc5b7c6e057b2eac2ec4980bb7a1c707c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"curve25519-dalek",
|
"curve25519-dalek",
|
||||||
"monero-generators",
|
"monero-generators",
|
||||||
"monero-io",
|
"monero-io",
|
||||||
"monero-primitives",
|
"monero-primitives",
|
||||||
"std-shims",
|
"std-shims 0.1.99",
|
||||||
"zeroize",
|
"zeroize",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "monero-bulletproofs"
|
name = "monero-bulletproofs"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/monero-oxide/monero-oxide?rev=2c847f71079a105456376f9957cee86c4b6a9eb8#2c847f71079a105456376f9957cee86c4b6a9eb8"
|
source = "git+https://github.com/monero-oxide/monero-oxide?rev=f6f4dd7dc5b7c6e057b2eac2ec4980bb7a1c707c#f6f4dd7dc5b7c6e057b2eac2ec4980bb7a1c707c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"curve25519-dalek",
|
"curve25519-dalek",
|
||||||
"monero-generators",
|
"monero-generators",
|
||||||
"monero-io",
|
"monero-io",
|
||||||
"monero-primitives",
|
"monero-primitives",
|
||||||
"rand_core 0.6.4",
|
"rand_core 0.6.4",
|
||||||
"std-shims",
|
"std-shims 0.1.99",
|
||||||
"thiserror 2.0.16",
|
"thiserror 2.0.16",
|
||||||
"zeroize",
|
"zeroize",
|
||||||
]
|
]
|
||||||
@@ -5508,7 +5509,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "monero-clsag"
|
name = "monero-clsag"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/monero-oxide/monero-oxide?rev=2c847f71079a105456376f9957cee86c4b6a9eb8#2c847f71079a105456376f9957cee86c4b6a9eb8"
|
source = "git+https://github.com/monero-oxide/monero-oxide?rev=f6f4dd7dc5b7c6e057b2eac2ec4980bb7a1c707c#f6f4dd7dc5b7c6e057b2eac2ec4980bb7a1c707c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"curve25519-dalek",
|
"curve25519-dalek",
|
||||||
"dalek-ff-group",
|
"dalek-ff-group",
|
||||||
@@ -5520,16 +5521,31 @@ dependencies = [
|
|||||||
"monero-primitives",
|
"monero-primitives",
|
||||||
"rand_chacha 0.3.1",
|
"rand_chacha 0.3.1",
|
||||||
"rand_core 0.6.4",
|
"rand_core 0.6.4",
|
||||||
"std-shims",
|
"std-shims 0.1.99",
|
||||||
"subtle",
|
"subtle",
|
||||||
"thiserror 2.0.16",
|
"thiserror 2.0.16",
|
||||||
"zeroize",
|
"zeroize",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "monero-daemon-rpc"
|
||||||
|
version = "0.1.0"
|
||||||
|
source = "git+https://github.com/monero-oxide/monero-oxide?rev=f6f4dd7dc5b7c6e057b2eac2ec4980bb7a1c707c#f6f4dd7dc5b7c6e057b2eac2ec4980bb7a1c707c"
|
||||||
|
dependencies = [
|
||||||
|
"curve25519-dalek",
|
||||||
|
"hex",
|
||||||
|
"monero-address",
|
||||||
|
"monero-interface",
|
||||||
|
"monero-oxide",
|
||||||
|
"serde",
|
||||||
|
"serde_json",
|
||||||
|
"std-shims 0.1.99",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "monero-generators"
|
name = "monero-generators"
|
||||||
version = "0.4.0"
|
version = "0.4.0"
|
||||||
source = "git+https://github.com/monero-oxide/monero-oxide?rev=2c847f71079a105456376f9957cee86c4b6a9eb8#2c847f71079a105456376f9957cee86c4b6a9eb8"
|
source = "git+https://github.com/monero-oxide/monero-oxide?rev=f6f4dd7dc5b7c6e057b2eac2ec4980bb7a1c707c#f6f4dd7dc5b7c6e057b2eac2ec4980bb7a1c707c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"crypto-bigint 0.5.5",
|
"crypto-bigint 0.5.5",
|
||||||
"curve25519-dalek",
|
"curve25519-dalek",
|
||||||
@@ -5537,30 +5553,43 @@ dependencies = [
|
|||||||
"group",
|
"group",
|
||||||
"monero-io",
|
"monero-io",
|
||||||
"sha3 0.10.8",
|
"sha3 0.10.8",
|
||||||
"std-shims",
|
"std-shims 0.1.99",
|
||||||
"subtle",
|
"subtle",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "monero-interface"
|
||||||
|
version = "0.1.0"
|
||||||
|
source = "git+https://github.com/monero-oxide/monero-oxide?rev=f6f4dd7dc5b7c6e057b2eac2ec4980bb7a1c707c#f6f4dd7dc5b7c6e057b2eac2ec4980bb7a1c707c"
|
||||||
|
dependencies = [
|
||||||
|
"curve25519-dalek",
|
||||||
|
"hex",
|
||||||
|
"monero-oxide",
|
||||||
|
"std-shims 0.1.99",
|
||||||
|
"thiserror 2.0.16",
|
||||||
|
"zeroize",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "monero-io"
|
name = "monero-io"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/monero-oxide/monero-oxide?rev=2c847f71079a105456376f9957cee86c4b6a9eb8#2c847f71079a105456376f9957cee86c4b6a9eb8"
|
source = "git+https://github.com/monero-oxide/monero-oxide?rev=f6f4dd7dc5b7c6e057b2eac2ec4980bb7a1c707c#f6f4dd7dc5b7c6e057b2eac2ec4980bb7a1c707c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"curve25519-dalek",
|
"curve25519-dalek",
|
||||||
"std-shims",
|
"std-shims 0.1.99",
|
||||||
"zeroize",
|
"zeroize",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "monero-mlsag"
|
name = "monero-mlsag"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/monero-oxide/monero-oxide?rev=2c847f71079a105456376f9957cee86c4b6a9eb8#2c847f71079a105456376f9957cee86c4b6a9eb8"
|
source = "git+https://github.com/monero-oxide/monero-oxide?rev=f6f4dd7dc5b7c6e057b2eac2ec4980bb7a1c707c#f6f4dd7dc5b7c6e057b2eac2ec4980bb7a1c707c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"curve25519-dalek",
|
"curve25519-dalek",
|
||||||
"monero-generators",
|
"monero-generators",
|
||||||
"monero-io",
|
"monero-io",
|
||||||
"monero-primitives",
|
"monero-primitives",
|
||||||
"std-shims",
|
"std-shims 0.1.99",
|
||||||
"thiserror 2.0.16",
|
"thiserror 2.0.16",
|
||||||
"zeroize",
|
"zeroize",
|
||||||
]
|
]
|
||||||
@@ -5568,7 +5597,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "monero-oxide"
|
name = "monero-oxide"
|
||||||
version = "0.1.4-alpha"
|
version = "0.1.4-alpha"
|
||||||
source = "git+https://github.com/monero-oxide/monero-oxide?rev=2c847f71079a105456376f9957cee86c4b6a9eb8#2c847f71079a105456376f9957cee86c4b6a9eb8"
|
source = "git+https://github.com/monero-oxide/monero-oxide?rev=f6f4dd7dc5b7c6e057b2eac2ec4980bb7a1c707c#f6f4dd7dc5b7c6e057b2eac2ec4980bb7a1c707c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"curve25519-dalek",
|
"curve25519-dalek",
|
||||||
"hex-literal",
|
"hex-literal",
|
||||||
@@ -5579,47 +5608,31 @@ dependencies = [
|
|||||||
"monero-io",
|
"monero-io",
|
||||||
"monero-mlsag",
|
"monero-mlsag",
|
||||||
"monero-primitives",
|
"monero-primitives",
|
||||||
"std-shims",
|
"std-shims 0.1.99",
|
||||||
"zeroize",
|
"zeroize",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "monero-primitives"
|
name = "monero-primitives"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/monero-oxide/monero-oxide?rev=2c847f71079a105456376f9957cee86c4b6a9eb8#2c847f71079a105456376f9957cee86c4b6a9eb8"
|
source = "git+https://github.com/monero-oxide/monero-oxide?rev=f6f4dd7dc5b7c6e057b2eac2ec4980bb7a1c707c#f6f4dd7dc5b7c6e057b2eac2ec4980bb7a1c707c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"curve25519-dalek",
|
"curve25519-dalek",
|
||||||
"monero-generators",
|
"monero-generators",
|
||||||
"monero-io",
|
"monero-io",
|
||||||
"sha3 0.10.8",
|
"sha3 0.10.8",
|
||||||
"std-shims",
|
"std-shims 0.1.99",
|
||||||
"zeroize",
|
|
||||||
]
|
|
||||||
|
|
||||||
[[package]]
|
|
||||||
name = "monero-rpc"
|
|
||||||
version = "0.1.0"
|
|
||||||
source = "git+https://github.com/monero-oxide/monero-oxide?rev=2c847f71079a105456376f9957cee86c4b6a9eb8#2c847f71079a105456376f9957cee86c4b6a9eb8"
|
|
||||||
dependencies = [
|
|
||||||
"curve25519-dalek",
|
|
||||||
"hex",
|
|
||||||
"monero-address",
|
|
||||||
"monero-oxide",
|
|
||||||
"serde",
|
|
||||||
"serde_json",
|
|
||||||
"std-shims",
|
|
||||||
"thiserror 2.0.16",
|
|
||||||
"zeroize",
|
"zeroize",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "monero-simple-request-rpc"
|
name = "monero-simple-request-rpc"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/monero-oxide/monero-oxide?rev=2c847f71079a105456376f9957cee86c4b6a9eb8#2c847f71079a105456376f9957cee86c4b6a9eb8"
|
source = "git+https://github.com/monero-oxide/monero-oxide?rev=f6f4dd7dc5b7c6e057b2eac2ec4980bb7a1c707c#f6f4dd7dc5b7c6e057b2eac2ec4980bb7a1c707c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"digest_auth",
|
"digest_auth",
|
||||||
"hex",
|
"hex",
|
||||||
"monero-rpc",
|
"monero-daemon-rpc",
|
||||||
"simple-request",
|
"simple-request",
|
||||||
"tokio",
|
"tokio",
|
||||||
"zeroize",
|
"zeroize",
|
||||||
@@ -5628,7 +5641,7 @@ dependencies = [
|
|||||||
[[package]]
|
[[package]]
|
||||||
name = "monero-wallet"
|
name = "monero-wallet"
|
||||||
version = "0.1.0"
|
version = "0.1.0"
|
||||||
source = "git+https://github.com/monero-oxide/monero-oxide?rev=2c847f71079a105456376f9957cee86c4b6a9eb8#2c847f71079a105456376f9957cee86c4b6a9eb8"
|
source = "git+https://github.com/monero-oxide/monero-oxide?rev=f6f4dd7dc5b7c6e057b2eac2ec4980bb7a1c707c#f6f4dd7dc5b7c6e057b2eac2ec4980bb7a1c707c"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"curve25519-dalek",
|
"curve25519-dalek",
|
||||||
"flexible-transcript",
|
"flexible-transcript",
|
||||||
@@ -5636,13 +5649,13 @@ dependencies = [
|
|||||||
"modular-frost",
|
"modular-frost",
|
||||||
"monero-address",
|
"monero-address",
|
||||||
"monero-clsag",
|
"monero-clsag",
|
||||||
|
"monero-interface",
|
||||||
"monero-oxide",
|
"monero-oxide",
|
||||||
"monero-rpc",
|
|
||||||
"rand 0.8.5",
|
"rand 0.8.5",
|
||||||
"rand_chacha 0.3.1",
|
"rand_chacha 0.3.1",
|
||||||
"rand_core 0.6.4",
|
"rand_core 0.6.4",
|
||||||
"rand_distr",
|
"rand_distr",
|
||||||
"std-shims",
|
"std-shims 0.1.99",
|
||||||
"thiserror 2.0.16",
|
"thiserror 2.0.16",
|
||||||
"zeroize",
|
"zeroize",
|
||||||
]
|
]
|
||||||
@@ -8620,7 +8633,7 @@ dependencies = [
|
|||||||
"multiexp",
|
"multiexp",
|
||||||
"rand_core 0.6.4",
|
"rand_core 0.6.4",
|
||||||
"sha2 0.10.9",
|
"sha2 0.10.9",
|
||||||
"std-shims",
|
"std-shims 0.1.5",
|
||||||
"zeroize",
|
"zeroize",
|
||||||
]
|
]
|
||||||
|
|
||||||
@@ -8743,7 +8756,7 @@ dependencies = [
|
|||||||
"rand_core 0.6.4",
|
"rand_core 0.6.4",
|
||||||
"sha2 0.11.0-rc.2",
|
"sha2 0.11.0-rc.2",
|
||||||
"short-weierstrass",
|
"short-weierstrass",
|
||||||
"std-shims",
|
"std-shims 0.1.5",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -9297,7 +9310,7 @@ dependencies = [
|
|||||||
"schnorr-signatures",
|
"schnorr-signatures",
|
||||||
"secq256k1",
|
"secq256k1",
|
||||||
"short-weierstrass",
|
"short-weierstrass",
|
||||||
"std-shims",
|
"std-shims 0.1.5",
|
||||||
]
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
@@ -10000,7 +10013,7 @@ dependencies = [
|
|||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "simple-request"
|
name = "simple-request"
|
||||||
version = "0.1.1"
|
version = "0.2.0"
|
||||||
dependencies = [
|
dependencies = [
|
||||||
"base64ct",
|
"base64ct",
|
||||||
"futures-util",
|
"futures-util",
|
||||||
@@ -10719,6 +10732,13 @@ dependencies = [
|
|||||||
"spin",
|
"spin",
|
||||||
]
|
]
|
||||||
|
|
||||||
|
[[package]]
|
||||||
|
name = "std-shims"
|
||||||
|
version = "0.1.99"
|
||||||
|
dependencies = [
|
||||||
|
"std-shims 0.1.5",
|
||||||
|
]
|
||||||
|
|
||||||
[[package]]
|
[[package]]
|
||||||
name = "strsim"
|
name = "strsim"
|
||||||
version = "0.11.1"
|
version = "0.11.1"
|
||||||
|
|||||||
@@ -5,11 +5,6 @@ members = [
|
|||||||
"patches/option-ext",
|
"patches/option-ext",
|
||||||
"patches/directories-next",
|
"patches/directories-next",
|
||||||
|
|
||||||
# monero-oxide expects `ciphersuite`, yet the `ciphersuite` in-tree here has breaking changes
|
|
||||||
# This re-exports the in-tree `ciphersuite` _without_ changes breaking to monero-oxide
|
|
||||||
# Not included in workspace to prevent having two crates with the same name (an error)
|
|
||||||
# "patches/ciphersuite",
|
|
||||||
|
|
||||||
"common/std-shims",
|
"common/std-shims",
|
||||||
"common/zalloc",
|
"common/zalloc",
|
||||||
"common/patchable-async-sleep",
|
"common/patchable-async-sleep",
|
||||||
@@ -169,7 +164,7 @@ overflow-checks = true
|
|||||||
|
|
||||||
[patch.crates-io]
|
[patch.crates-io]
|
||||||
# Dependencies from monero-oxide which originate from within our own tree
|
# Dependencies from monero-oxide which originate from within our own tree
|
||||||
std-shims = { path = "common/std-shims" }
|
std-shims = { path = "patches/std-shims" }
|
||||||
simple-request = { path = "common/request" }
|
simple-request = { path = "common/request" }
|
||||||
multiexp = { path = "crypto/multiexp" }
|
multiexp = { path = "crypto/multiexp" }
|
||||||
flexible-transcript = { path = "crypto/transcript" }
|
flexible-transcript = { path = "crypto/transcript" }
|
||||||
|
|||||||
@@ -1,9 +1,9 @@
|
|||||||
[package]
|
[package]
|
||||||
name = "simple-request"
|
name = "simple-request"
|
||||||
version = "0.1.1"
|
version = "0.2.0"
|
||||||
description = "A simple HTTP(S) request library"
|
description = "A simple HTTP(S) request library"
|
||||||
license = "MIT"
|
license = "MIT"
|
||||||
repository = "https://github.com/serai-dex/serai/tree/develop/common/simple-request"
|
repository = "https://github.com/serai-dex/serai/tree/develop/common/request"
|
||||||
authors = ["Luke Parker <lukeparker5132@gmail.com>"]
|
authors = ["Luke Parker <lukeparker5132@gmail.com>"]
|
||||||
keywords = ["http", "https", "async", "request", "ssl"]
|
keywords = ["http", "https", "async", "request", "ssl"]
|
||||||
edition = "2021"
|
edition = "2021"
|
||||||
@@ -31,5 +31,6 @@ base64ct = { version = "1", features = ["alloc"], optional = true }
|
|||||||
|
|
||||||
[features]
|
[features]
|
||||||
tls = ["hyper-rustls"]
|
tls = ["hyper-rustls"]
|
||||||
|
webpki-roots = ["tls", "hyper-rustls/webpki-roots"]
|
||||||
basic-auth = ["zeroize", "base64ct"]
|
basic-auth = ["zeroize", "base64ct"]
|
||||||
default = ["tls"]
|
default = ["tls"]
|
||||||
|
|||||||
@@ -52,24 +52,30 @@ pub struct Client {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl Client {
|
impl Client {
|
||||||
|
#[allow(clippy::unnecessary_wraps)]
|
||||||
fn connector() -> Result<Connector, Error> {
|
fn connector() -> Result<Connector, Error> {
|
||||||
let mut res = HttpConnector::new();
|
let mut res = HttpConnector::new();
|
||||||
res.set_keepalive(Some(core::time::Duration::from_secs(60)));
|
res.set_keepalive(Some(core::time::Duration::from_secs(60)));
|
||||||
res.set_nodelay(true);
|
res.set_nodelay(true);
|
||||||
res.set_reuse_address(true);
|
res.set_reuse_address(true);
|
||||||
|
|
||||||
#[cfg(feature = "tls")]
|
#[cfg(feature = "tls")]
|
||||||
res.enforce_http(false);
|
res.enforce_http(false);
|
||||||
#[cfg(feature = "tls")]
|
#[cfg(feature = "tls")]
|
||||||
let res = HttpsConnectorBuilder::new()
|
let https = HttpsConnectorBuilder::new().with_native_roots();
|
||||||
.with_native_roots()
|
#[cfg(all(feature = "tls", not(feature = "webpki-roots")))]
|
||||||
.map_err(|e| {
|
let https = https.map_err(|e| {
|
||||||
Error::ConnectionError(
|
Error::ConnectionError(
|
||||||
format!("couldn't load system's SSL root certificates: {e:?}").into(),
|
format!("couldn't load system's SSL root certificates and webpki-roots unavilable: {e:?}")
|
||||||
|
.into(),
|
||||||
)
|
)
|
||||||
})?
|
})?;
|
||||||
.https_or_http()
|
// Fallback to `webpki-roots` if present
|
||||||
.enable_http1()
|
#[cfg(all(feature = "tls", feature = "webpki-roots"))]
|
||||||
.wrap_connector(res);
|
let https = https.unwrap_or(HttpsConnectorBuilder::new().with_webpki_roots());
|
||||||
|
#[cfg(feature = "tls")]
|
||||||
|
let res = https.https_or_http().enable_http1().wrap_connector(res);
|
||||||
|
|
||||||
Ok(res)
|
Ok(res)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|||||||
@@ -17,8 +17,8 @@ pub mod error {
|
|||||||
#[rustversion::since(1.81)]
|
#[rustversion::since(1.81)]
|
||||||
pub use core::error;
|
pub use core::error;
|
||||||
|
|
||||||
#[cfg(all(feature = "alloc", not(feature = "std")))]
|
#[cfg(feature = "alloc")]
|
||||||
pub extern crate alloc as extern_alloc;
|
extern crate alloc as extern_alloc;
|
||||||
#[cfg(all(feature = "alloc", not(feature = "std")))]
|
#[cfg(all(feature = "alloc", not(feature = "std")))]
|
||||||
pub use extern_alloc::{alloc, borrow, boxed, ffi, fmt, rc, slice, str, string, task, vec, format};
|
pub use extern_alloc::{alloc, borrow, boxed, ffi, fmt, rc, slice, str, string, task, vec, format};
|
||||||
#[cfg(feature = "std")]
|
#[cfg(feature = "std")]
|
||||||
@@ -30,7 +30,7 @@ pub mod sync;
|
|||||||
|
|
||||||
pub mod prelude {
|
pub mod prelude {
|
||||||
// Shim the `std` prelude
|
// Shim the `std` prelude
|
||||||
#[cfg(all(feature = "alloc", not(feature = "std")))]
|
#[cfg(feature = "alloc")]
|
||||||
pub use extern_alloc::{
|
pub use extern_alloc::{
|
||||||
format, vec,
|
format, vec,
|
||||||
borrow::ToOwned,
|
borrow::ToOwned,
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ use rand::{RngCore, CryptoRng, rngs::OsRng};
|
|||||||
use blake2::{Digest, Blake2s256};
|
use blake2::{Digest, Blake2s256};
|
||||||
|
|
||||||
use dalek_ff_group::Ristretto;
|
use dalek_ff_group::Ristretto;
|
||||||
use ciphersuite::{group::Group, *};
|
use ciphersuite::*;
|
||||||
use schnorr::SchnorrSignature;
|
use schnorr::SchnorrSignature;
|
||||||
|
|
||||||
use ::tendermint::{
|
use ::tendermint::{
|
||||||
|
|||||||
@@ -17,7 +17,7 @@ rustdoc-args = ["--cfg", "docsrs"]
|
|||||||
workspace = true
|
workspace = true
|
||||||
|
|
||||||
[dependencies]
|
[dependencies]
|
||||||
std-shims = { version = "0.1", default-features = false, features = ["alloc"] }
|
std-shims = { version = "0.1", path = "../../common/std-shims", default-features = false, features = ["alloc"] }
|
||||||
|
|
||||||
rand_core = { version = "0.6", default-features = false }
|
rand_core = { version = "0.6", default-features = false }
|
||||||
zeroize = { version = "1.5", default-features = false, features = ["zeroize_derive", "alloc"] }
|
zeroize = { version = "1.5", default-features = false, features = ["zeroize_derive", "alloc"] }
|
||||||
|
|||||||
@@ -32,7 +32,7 @@ frost = { package = "modular-frost", path = "../../crypto/frost", version = "0.1
|
|||||||
hex = { version = "0.4", default-features = false, optional = true }
|
hex = { version = "0.4", default-features = false, optional = true }
|
||||||
serde = { version = "1", default-features = false, features = ["derive"], optional = true }
|
serde = { version = "1", default-features = false, features = ["derive"], optional = true }
|
||||||
serde_json = { version = "1", default-features = false, optional = true }
|
serde_json = { version = "1", default-features = false, optional = true }
|
||||||
simple-request = { path = "../../common/request", version = "0.1", default-features = false, features = ["tls", "basic-auth"], optional = true }
|
simple-request = { path = "../../common/request", version = "0.2", default-features = false, features = ["tls", "basic-auth"], optional = true }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
secp256k1 = { version = "0.29", default-features = false, features = ["std"] }
|
secp256k1 = { version = "0.29", default-features = false, features = ["std"] }
|
||||||
|
|||||||
@@ -19,7 +19,7 @@ workspace = true
|
|||||||
tower = "0.5"
|
tower = "0.5"
|
||||||
|
|
||||||
serde_json = { version = "1", default-features = false }
|
serde_json = { version = "1", default-features = false }
|
||||||
simple-request = { path = "../../../common/request", version = "0.1", default-features = false }
|
simple-request = { path = "../../../common/request", version = "0.2", default-features = false }
|
||||||
|
|
||||||
alloy-json-rpc = { version = "1", default-features = false }
|
alloy-json-rpc = { version = "1", default-features = false }
|
||||||
alloy-transport = { version = "1", default-features = false }
|
alloy-transport = { version = "1", default-features = false }
|
||||||
|
|||||||
23
patches/simple-request/Cargo.toml
Normal file
23
patches/simple-request/Cargo.toml
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
[package]
|
||||||
|
name = "simple-request"
|
||||||
|
version = "0.1.99"
|
||||||
|
description = "simple-request which patches to the latest update"
|
||||||
|
license = "MIT"
|
||||||
|
repository = "https://github.com/serai-dex/serai/tree/develop/patches/simple-request"
|
||||||
|
authors = ["Luke Parker <lukeparker5132@gmail.com>"]
|
||||||
|
keywords = ["nostd", "no_std", "alloc", "io"]
|
||||||
|
edition = "2021"
|
||||||
|
rust-version = "1.65"
|
||||||
|
|
||||||
|
[package.metadata.docs.rs]
|
||||||
|
all-features = true
|
||||||
|
rustdoc-args = ["--cfg", "docsrs"]
|
||||||
|
|
||||||
|
[lints]
|
||||||
|
workspace = true
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
simple-request = { path = "../../common/request" }
|
||||||
|
|
||||||
|
[features]
|
||||||
|
tls = ["simple-request/tls"]
|
||||||
18
patches/simple-request/src/lib.rs
Normal file
18
patches/simple-request/src/lib.rs
Normal file
@@ -0,0 +1,18 @@
|
|||||||
|
pub use simple_request::{hyper, Error, Request, Response};
|
||||||
|
|
||||||
|
#[derive(Clone, Debug)]
|
||||||
|
pub struct Client(simple_request::Client);
|
||||||
|
|
||||||
|
impl Client {
|
||||||
|
pub fn with_connection_pool() -> Client {
|
||||||
|
Self(simple_request::Client::with_connection_pool().unwrap())
|
||||||
|
}
|
||||||
|
|
||||||
|
pub fn without_connection_pool(host: &str) -> Result<Client, Error> {
|
||||||
|
simple_request::Client::without_connection_pool(host).map(Self)
|
||||||
|
}
|
||||||
|
|
||||||
|
pub async fn request<R: Into<Request>>(&self, request: R) -> Result<Response<'_>, Error> {
|
||||||
|
self.0.request(request).await
|
||||||
|
}
|
||||||
|
}
|
||||||
23
patches/std-shims/Cargo.toml
Normal file
23
patches/std-shims/Cargo.toml
Normal file
@@ -0,0 +1,23 @@
|
|||||||
|
[package]
|
||||||
|
name = "std-shims"
|
||||||
|
version = "0.1.99"
|
||||||
|
description = "std-shims which patches to the latest update"
|
||||||
|
license = "MIT"
|
||||||
|
repository = "https://github.com/serai-dex/serai/tree/develop/patches/std-shims"
|
||||||
|
authors = ["Luke Parker <lukeparker5132@gmail.com>"]
|
||||||
|
keywords = ["nostd", "no_std", "alloc", "io"]
|
||||||
|
edition = "2021"
|
||||||
|
rust-version = "1.65"
|
||||||
|
|
||||||
|
[package.metadata.docs.rs]
|
||||||
|
all-features = true
|
||||||
|
rustdoc-args = ["--cfg", "docsrs"]
|
||||||
|
|
||||||
|
[lints]
|
||||||
|
workspace = true
|
||||||
|
|
||||||
|
[dependencies]
|
||||||
|
std-shims = { path = "../../common/std-shims", default-features = false, features = ["alloc"] }
|
||||||
|
|
||||||
|
[features]
|
||||||
|
std = ["std-shims/std"]
|
||||||
5
patches/std-shims/src/lib.rs
Normal file
5
patches/std-shims/src/lib.rs
Normal file
@@ -0,0 +1,5 @@
|
|||||||
|
#![cfg_attr(docsrs, feature(doc_auto_cfg))]
|
||||||
|
#![cfg_attr(not(feature = "std"), no_std)]
|
||||||
|
|
||||||
|
pub extern crate alloc;
|
||||||
|
pub use std_shims::{str, vec, string, collections, io, sync, prelude};
|
||||||
@@ -28,8 +28,8 @@ dalek-ff-group = { path = "../../crypto/dalek-ff-group", default-features = fals
|
|||||||
dkg = { package = "dkg-evrf", path = "../../crypto/dkg/evrf", default-features = false, features = ["std", "ed25519"] }
|
dkg = { package = "dkg-evrf", path = "../../crypto/dkg/evrf", default-features = false, features = ["std", "ed25519"] }
|
||||||
frost = { package = "modular-frost", path = "../../crypto/frost", default-features = false }
|
frost = { package = "modular-frost", path = "../../crypto/frost", default-features = false }
|
||||||
|
|
||||||
monero-wallet = { git = "https://github.com/monero-oxide/monero-oxide", rev = "2c847f71079a105456376f9957cee86c4b6a9eb8", default-features = false, features = ["std", "multisig"] }
|
monero-wallet = { git = "https://github.com/monero-oxide/monero-oxide", rev = "f6f4dd7dc5b7c6e057b2eac2ec4980bb7a1c707c", default-features = false, features = ["std", "multisig"] }
|
||||||
monero-simple-request-rpc = { git = "https://github.com/monero-oxide/monero-oxide", rev = "2c847f71079a105456376f9957cee86c4b6a9eb8", default-features = false }
|
monero-simple-request-rpc = { git = "https://github.com/monero-oxide/monero-oxide", rev = "f6f4dd7dc5b7c6e057b2eac2ec4980bb7a1c707c", default-features = false }
|
||||||
|
|
||||||
serai-client = { path = "../../substrate/client", default-features = false, features = ["monero"] }
|
serai-client = { path = "../../substrate/client", default-features = false, features = ["monero"] }
|
||||||
|
|
||||||
|
|||||||
@@ -6,7 +6,7 @@
|
|||||||
static ALLOCATOR: zalloc::ZeroizingAlloc<std::alloc::System> =
|
static ALLOCATOR: zalloc::ZeroizingAlloc<std::alloc::System> =
|
||||||
zalloc::ZeroizingAlloc(std::alloc::System);
|
zalloc::ZeroizingAlloc(std::alloc::System);
|
||||||
|
|
||||||
use monero_simple_request_rpc::SimpleRequestRpc;
|
use monero_simple_request_rpc::SimpleRequestTransport;
|
||||||
|
|
||||||
mod primitives;
|
mod primitives;
|
||||||
pub(crate) use crate::primitives::*;
|
pub(crate) use crate::primitives::*;
|
||||||
@@ -23,7 +23,7 @@ async fn main() {
|
|||||||
let db = bin::init();
|
let db = bin::init();
|
||||||
let feed = Rpc {
|
let feed = Rpc {
|
||||||
rpc: loop {
|
rpc: loop {
|
||||||
match SimpleRequestRpc::new(bin::url()).await {
|
match SimpleRequestTransport::new(bin::url()).await {
|
||||||
Ok(rpc) => break rpc,
|
Ok(rpc) => break rpc,
|
||||||
Err(e) => {
|
Err(e) => {
|
||||||
log::error!("couldn't connect to the Monero node: {e:?}");
|
log::error!("couldn't connect to the Monero node: {e:?}");
|
||||||
|
|||||||
@@ -4,7 +4,8 @@ use ciphersuite::*;
|
|||||||
use dalek_ff_group::Ed25519;
|
use dalek_ff_group::Ed25519;
|
||||||
|
|
||||||
use monero_wallet::{
|
use monero_wallet::{
|
||||||
block::Block as MBlock, rpc::ScannableBlock as MScannableBlock, ScanError, GuaranteedScanner,
|
block::Block as MBlock, interface::ScannableBlock as MScannableBlock, ScanError,
|
||||||
|
GuaranteedScanner,
|
||||||
};
|
};
|
||||||
|
|
||||||
use serai_client::networks::monero::Address;
|
use serai_client::networks::monero::Address;
|
||||||
|
|||||||
@@ -1,7 +1,6 @@
|
|||||||
use core::future::Future;
|
use core::future::Future;
|
||||||
|
|
||||||
use monero_wallet::rpc::{RpcError, Rpc as RpcTrait};
|
use monero_simple_request_rpc::{prelude::*, SimpleRequestTransport};
|
||||||
use monero_simple_request_rpc::SimpleRequestRpc;
|
|
||||||
|
|
||||||
use serai_client::primitives::{network_id::ExternalNetworkId, coin::ExternalCoin, balance::Amount};
|
use serai_client::primitives::{network_id::ExternalNetworkId, coin::ExternalCoin, balance::Amount};
|
||||||
|
|
||||||
@@ -15,7 +14,7 @@ use crate::{
|
|||||||
|
|
||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
pub(crate) struct Rpc {
|
pub(crate) struct Rpc {
|
||||||
pub(crate) rpc: SimpleRequestRpc,
|
pub(crate) rpc: MoneroDaemon<SimpleRequestTransport>,
|
||||||
}
|
}
|
||||||
|
|
||||||
impl ScannerFeed for Rpc {
|
impl ScannerFeed for Rpc {
|
||||||
@@ -31,21 +30,16 @@ impl ScannerFeed for Rpc {
|
|||||||
|
|
||||||
type Block = Block;
|
type Block = Block;
|
||||||
|
|
||||||
type EphemeralError = RpcError;
|
type EphemeralError = InterfaceError;
|
||||||
|
|
||||||
fn latest_finalized_block_number(
|
fn latest_finalized_block_number(
|
||||||
&self,
|
&self,
|
||||||
) -> impl Send + Future<Output = Result<u64, Self::EphemeralError>> {
|
) -> impl Send + Future<Output = Result<u64, Self::EphemeralError>> {
|
||||||
async move {
|
async move {
|
||||||
Ok(
|
Ok(
|
||||||
self
|
u64::try_from(self.rpc.latest_block_number().await?)
|
||||||
.rpc
|
.unwrap()
|
||||||
.get_height()
|
.saturating_sub(Self::CONFIRMATIONS - 1),
|
||||||
.await?
|
|
||||||
.checked_sub(1)
|
|
||||||
.expect("connected to an invalid Monero RPC")
|
|
||||||
.try_into()
|
|
||||||
.unwrap(),
|
|
||||||
)
|
)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -64,11 +58,11 @@ impl ScannerFeed for Rpc {
|
|||||||
}
|
}
|
||||||
|
|
||||||
// Fetch all the timestamps within the window
|
// Fetch all the timestamps within the window
|
||||||
let block_for_time_of = self.rpc.get_block_by_number(number.try_into().unwrap()).await?;
|
let block_for_time_of = self.rpc.block_by_number(number.try_into().unwrap()).await?;
|
||||||
let mut timestamps = vec![block_for_time_of.header.timestamp];
|
let mut timestamps = vec![block_for_time_of.header.timestamp];
|
||||||
let mut parent = block_for_time_of.header.previous;
|
let mut parent = block_for_time_of.header.previous;
|
||||||
for _ in 1 .. BLOCKCHAIN_TIMESTAMP_CHECK_WINDOW {
|
for _ in 1 .. BLOCKCHAIN_TIMESTAMP_CHECK_WINDOW {
|
||||||
let parent_block = self.rpc.get_block(parent).await?;
|
let parent_block = self.rpc.block(parent).await?;
|
||||||
timestamps.push(parent_block.header.timestamp);
|
timestamps.push(parent_block.header.timestamp);
|
||||||
parent = parent_block.header.previous;
|
parent = parent_block.header.previous;
|
||||||
}
|
}
|
||||||
@@ -94,7 +88,7 @@ impl ScannerFeed for Rpc {
|
|||||||
) -> impl Send
|
) -> impl Send
|
||||||
+ Future<Output = Result<<Self::Block as primitives::Block>::Header, Self::EphemeralError>>
|
+ Future<Output = Result<<Self::Block as primitives::Block>::Header, Self::EphemeralError>>
|
||||||
{
|
{
|
||||||
async move { Ok(BlockHeader(self.rpc.get_block_by_number(number.try_into().unwrap()).await?)) }
|
async move { Ok(BlockHeader(self.rpc.block_by_number(number.try_into().unwrap()).await?)) }
|
||||||
}
|
}
|
||||||
|
|
||||||
#[rustfmt::skip] // It wants to improperly format the `async move` to a single line
|
#[rustfmt::skip] // It wants to improperly format the `async move` to a single line
|
||||||
@@ -103,7 +97,7 @@ impl ScannerFeed for Rpc {
|
|||||||
number: u64,
|
number: u64,
|
||||||
) -> impl Send + Future<Output = Result<Self::Block, Self::EphemeralError>> {
|
) -> impl Send + Future<Output = Result<Self::Block, Self::EphemeralError>> {
|
||||||
async move {
|
async move {
|
||||||
Ok(Block(self.rpc.get_scannable_block_by_number(number.try_into().unwrap()).await?))
|
Ok(Block(self.rpc.scannable_block_by_number(number.try_into().unwrap()).await?))
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
@@ -128,7 +122,7 @@ impl ScannerFeed for Rpc {
|
|||||||
}
|
}
|
||||||
|
|
||||||
impl TransactionPublisher<Transaction> for Rpc {
|
impl TransactionPublisher<Transaction> for Rpc {
|
||||||
type EphemeralError = RpcError;
|
type EphemeralError = PublishTransactionError;
|
||||||
|
|
||||||
fn publish(
|
fn publish(
|
||||||
&self,
|
&self,
|
||||||
|
|||||||
@@ -7,7 +7,7 @@ use rand_chacha::ChaCha20Rng;
|
|||||||
use ciphersuite::*;
|
use ciphersuite::*;
|
||||||
use dalek_ff_group::Ed25519;
|
use dalek_ff_group::Ed25519;
|
||||||
|
|
||||||
use monero_wallet::rpc::{FeeRate, RpcError};
|
use monero_wallet::interface::prelude::*;
|
||||||
|
|
||||||
use serai_client::{
|
use serai_client::{
|
||||||
primitives::{coin::ExternalCoin, balance::Amount},
|
primitives::{coin::ExternalCoin, balance::Amount},
|
||||||
@@ -55,7 +55,7 @@ async fn signable_transaction(
|
|||||||
inputs: Vec<OutputFor<Rpc>>,
|
inputs: Vec<OutputFor<Rpc>>,
|
||||||
payments: Vec<Payment<AddressFor<Rpc>>>,
|
payments: Vec<Payment<AddressFor<Rpc>>>,
|
||||||
change: Option<KeyFor<Rpc>>,
|
change: Option<KeyFor<Rpc>>,
|
||||||
) -> Result<Result<(SignableTransaction, MSignableTransaction), SendError>, RpcError> {
|
) -> Result<Result<(SignableTransaction, MSignableTransaction), SendError>, TransactionsError> {
|
||||||
assert!(inputs.len() < <Planner as TransactionPlanner<Rpc, ()>>::MAX_INPUTS);
|
assert!(inputs.len() < <Planner as TransactionPlanner<Rpc, ()>>::MAX_INPUTS);
|
||||||
assert!(
|
assert!(
|
||||||
(payments.len() + usize::from(u8::from(change.is_some()))) <
|
(payments.len() + usize::from(u8::from(change.is_some()))) <
|
||||||
@@ -148,7 +148,7 @@ async fn signable_transaction(
|
|||||||
#[derive(Clone)]
|
#[derive(Clone)]
|
||||||
pub(crate) struct Planner(pub(crate) Rpc);
|
pub(crate) struct Planner(pub(crate) Rpc);
|
||||||
impl TransactionPlanner<Rpc, ()> for Planner {
|
impl TransactionPlanner<Rpc, ()> for Planner {
|
||||||
type EphemeralError = RpcError;
|
type EphemeralError = TransactionsError;
|
||||||
|
|
||||||
type SignableTransaction = SignableTransaction;
|
type SignableTransaction = SignableTransaction;
|
||||||
|
|
||||||
@@ -221,8 +221,9 @@ impl TransactionPlanner<Rpc, ()> for Planner {
|
|||||||
payments: Vec<Payment<AddressFor<Rpc>>>,
|
payments: Vec<Payment<AddressFor<Rpc>>>,
|
||||||
change: Option<KeyFor<Rpc>>,
|
change: Option<KeyFor<Rpc>>,
|
||||||
) -> impl Send
|
) -> impl Send
|
||||||
+ Future<Output = Result<PlannedTransaction<Rpc, Self::SignableTransaction, ()>, RpcError>>
|
+ Future<
|
||||||
{
|
Output = Result<PlannedTransaction<Rpc, Self::SignableTransaction, ()>, TransactionsError>,
|
||||||
|
> {
|
||||||
let singular_spent_output = (inputs.len() == 1).then(|| inputs[0].id());
|
let singular_spent_output = (inputs.len() == 1).then(|| inputs[0].id());
|
||||||
|
|
||||||
async move {
|
async move {
|
||||||
|
|||||||
@@ -37,13 +37,13 @@ frame-system = { git = "https://github.com/serai-dex/patch-polkadot-sdk", rev =
|
|||||||
|
|
||||||
async-lock = "3"
|
async-lock = "3"
|
||||||
|
|
||||||
simple-request = { path = "../../common/request", version = "0.1", optional = true }
|
simple-request = { path = "../../common/request", version = "0.2", optional = true }
|
||||||
|
|
||||||
bitcoin = { version = "0.32", optional = true }
|
bitcoin = { version = "0.32", optional = true }
|
||||||
|
|
||||||
ciphersuite = { path = "../../crypto/ciphersuite", optional = true }
|
ciphersuite = { path = "../../crypto/ciphersuite", optional = true }
|
||||||
dalek-ff-group = { path = "../../crypto/dalek-ff-group", optional = true }
|
dalek-ff-group = { path = "../../crypto/dalek-ff-group", optional = true }
|
||||||
monero-address = { git = "https://github.com/monero-oxide/monero-oxide", rev = "2c847f71079a105456376f9957cee86c4b6a9eb8", version = "0.1.0", default-features = false, features = ["std"], optional = true }
|
monero-address = { git = "https://github.com/monero-oxide/monero-oxide", rev = "f6f4dd7dc5b7c6e057b2eac2ec4980bb7a1c707c", version = "0.1.0", default-features = false, features = ["std"], optional = true }
|
||||||
|
|
||||||
[dev-dependencies]
|
[dev-dependencies]
|
||||||
rand_core = "0.6"
|
rand_core = "0.6"
|
||||||
|
|||||||
@@ -78,7 +78,7 @@ serai-env = { path = "../../common/env" }
|
|||||||
|
|
||||||
curve25519-dalek = { version = "4", default-features = false, features = ["alloc", "zeroize"] }
|
curve25519-dalek = { version = "4", default-features = false, features = ["alloc", "zeroize"] }
|
||||||
bitcoin-serai = { path = "../../networks/bitcoin", default-features = false, features = ["std", "hazmat"] }
|
bitcoin-serai = { path = "../../networks/bitcoin", default-features = false, features = ["std", "hazmat"] }
|
||||||
monero-address = { git = "https://github.com/monero-oxide/monero-oxide", rev = "2c847f71079a105456376f9957cee86c4b6a9eb8", default-features = false, features = ["std"] }
|
monero-address = { git = "https://github.com/monero-oxide/monero-oxide", rev = "f6f4dd7dc5b7c6e057b2eac2ec4980bb7a1c707c", default-features = false, features = ["std"] }
|
||||||
|
|
||||||
[features]
|
[features]
|
||||||
default = []
|
default = []
|
||||||
|
|||||||
Reference in New Issue
Block a user