feat: Add gossip model (#232)

* feat: enable gossip

* chore: remove deprecated functions

* chore: use upstream rust nostr

* fix
This commit is contained in:
雨宮蓮
2024-09-11 11:10:11 +07:00
committed by GitHub
parent e5e290c0c3
commit ac7ce726c5
9 changed files with 144 additions and 177 deletions

176
src-tauri/Cargo.lock generated
View File

@@ -363,9 +363,9 @@ dependencies = [
[[package]]
name = "async-wsocket"
version = "0.7.1"
version = "0.8.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1eee6fcc818b89848df37050215603de0e2e072734e4730c03060feb2d0abebb"
checksum = "c917625d498803b60135e0b409c3635b4bafc659da5c55a362d93f68412d1ebe"
dependencies = [
"async-utility",
"futures",
@@ -1109,6 +1109,15 @@ dependencies = [
"crossbeam-utils",
]
[[package]]
name = "crossbeam-queue"
version = "0.3.11"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "df0346b5d5e76ac2fe4e327c5fd1118d6be7c51dfb18f9b7922923f287471e35"
dependencies = [
"crossbeam-utils",
]
[[package]]
name = "crossbeam-utils"
version = "0.8.20"
@@ -1354,6 +1363,15 @@ dependencies = [
"syn 2.0.76",
]
[[package]]
name = "doxygen-rs"
version = "0.4.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "415b6ec780d34dcf624666747194393603d0373b7141eef01d12ee58881507d9"
dependencies = [
"phf 0.11.2",
]
[[package]]
name = "dpi"
version = "0.1.1"
@@ -1534,18 +1552,6 @@ dependencies = [
"zune-inflate",
]
[[package]]
name = "fallible-iterator"
version = "0.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649"
[[package]]
name = "fallible-streaming-iterator"
version = "0.1.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a"
[[package]]
name = "fastrand"
version = "2.1.1"
@@ -2176,15 +2182,6 @@ dependencies = [
"allocator-api2",
]
[[package]]
name = "hashlink"
version = "0.9.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6ba4ff7128dee98c7dc9794b6a411377e1404dba1c97deb8d1a55297bd25d8af"
dependencies = [
"hashbrown 0.14.5",
]
[[package]]
name = "heck"
version = "0.4.1"
@@ -2197,6 +2194,40 @@ version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea"
[[package]]
name = "heed"
version = "0.20.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7d4f449bab7320c56003d37732a917e18798e2f1709d80263face2b4f9436ddb"
dependencies = [
"bitflags 2.6.0",
"byteorder",
"heed-traits",
"heed-types",
"libc",
"lmdb-master-sys",
"once_cell",
"page_size",
"synchronoise",
"url",
]
[[package]]
name = "heed-traits"
version = "0.20.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eb3130048d404c57ce5a1ac61a903696e8fcde7e8c2991e9fcfc1f27c3ef74ff"
[[package]]
name = "heed-types"
version = "0.20.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9d3f528b053a6d700b2734eabcd0fd49cb8230647aa72958467527b0b7917114"
dependencies = [
"byteorder",
"heed-traits",
]
[[package]]
name = "hermit-abi"
version = "0.3.9"
@@ -2770,17 +2801,6 @@ dependencies = [
"redox_syscall",
]
[[package]]
name = "libsqlite3-sys"
version = "0.28.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "0c10584274047cb335c23d3e61bcef8e323adae7c5c8c760540f73610177fc3f"
dependencies = [
"cc",
"pkg-config",
"vcpkg",
]
[[package]]
name = "linkify"
version = "0.10.0"
@@ -2806,6 +2826,17 @@ version = "0.4.14"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "78b3ae25bc7c8c38cec158d1f2757ee79e9b3740fbc7ccf0e59e4b08d793fa89"
[[package]]
name = "lmdb-master-sys"
version = "0.2.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "472c3760e2a8d0f61f322fb36788021bb36d573c502b50fa3e2bcaac3ec326c9"
dependencies = [
"cc",
"doxygen-rs",
"libc",
]
[[package]]
name = "lnurl-pay"
version = "0.6.0"
@@ -3086,7 +3117,7 @@ checksum = "72ef4a56884ca558e5ddb05a1d1e7e1bfd9a68d9ed024c21704cc98872dae1bb"
[[package]]
name = "nostr"
version = "0.34.0"
source = "git+https://github.com/rust-nostr/nostr#2a429da9131fec7d61b5518596b432b06e16facd"
source = "git+https://github.com/rust-nostr/nostr#d7038bc167d4aed57e9153f4224cfca349613a61"
dependencies = [
"aes",
"base64 0.22.1",
@@ -3105,7 +3136,6 @@ dependencies = [
"scrypt",
"serde",
"serde_json",
"tracing",
"unicode-normalization",
"url",
"wasm-bindgen",
@@ -3116,7 +3146,7 @@ dependencies = [
[[package]]
name = "nostr-database"
version = "0.34.0"
source = "git+https://github.com/rust-nostr/nostr#2a429da9131fec7d61b5518596b432b06e16facd"
source = "git+https://github.com/rust-nostr/nostr#d7038bc167d4aed57e9153f4224cfca349613a61"
dependencies = [
"async-trait",
"flatbuffers",
@@ -3127,10 +3157,23 @@ dependencies = [
"tracing",
]
[[package]]
name = "nostr-lmdb"
version = "0.34.0"
source = "git+https://github.com/rust-nostr/nostr#d7038bc167d4aed57e9153f4224cfca349613a61"
dependencies = [
"heed",
"nostr",
"nostr-database",
"thiserror",
"tokio",
"tracing",
]
[[package]]
name = "nostr-relay-pool"
version = "0.34.0"
source = "git+https://github.com/rust-nostr/nostr#2a429da9131fec7d61b5518596b432b06e16facd"
source = "git+https://github.com/rust-nostr/nostr#d7038bc167d4aed57e9153f4224cfca349613a61"
dependencies = [
"async-utility",
"async-wsocket",
@@ -3146,16 +3189,16 @@ dependencies = [
[[package]]
name = "nostr-sdk"
version = "0.34.0"
source = "git+https://github.com/rust-nostr/nostr#2a429da9131fec7d61b5518596b432b06e16facd"
source = "git+https://github.com/rust-nostr/nostr#d7038bc167d4aed57e9153f4224cfca349613a61"
dependencies = [
"async-utility",
"atomic-destructor",
"lnurl-pay",
"nostr",
"nostr-database",
"nostr-lmdb",
"nostr-relay-pool",
"nostr-signer",
"nostr-sqlite",
"nostr-zapper",
"nwc",
"thiserror",
@@ -3166,7 +3209,7 @@ dependencies = [
[[package]]
name = "nostr-signer"
version = "0.34.0"
source = "git+https://github.com/rust-nostr/nostr#2a429da9131fec7d61b5518596b432b06e16facd"
source = "git+https://github.com/rust-nostr/nostr#d7038bc167d4aed57e9153f4224cfca349613a61"
dependencies = [
"async-utility",
"nostr",
@@ -3176,24 +3219,10 @@ dependencies = [
"tracing",
]
[[package]]
name = "nostr-sqlite"
version = "0.34.0"
source = "git+https://github.com/rust-nostr/nostr#2a429da9131fec7d61b5518596b432b06e16facd"
dependencies = [
"async-trait",
"nostr",
"nostr-database",
"rusqlite",
"thiserror",
"tokio",
"tracing",
]
[[package]]
name = "nostr-zapper"
version = "0.34.0"
source = "git+https://github.com/rust-nostr/nostr#2a429da9131fec7d61b5518596b432b06e16facd"
source = "git+https://github.com/rust-nostr/nostr#d7038bc167d4aed57e9153f4224cfca349613a61"
dependencies = [
"async-trait",
"nostr",
@@ -3326,7 +3355,7 @@ dependencies = [
[[package]]
name = "nwc"
version = "0.34.1"
source = "git+https://github.com/rust-nostr/nostr#2a429da9131fec7d61b5518596b432b06e16facd"
source = "git+https://github.com/rust-nostr/nostr#d7038bc167d4aed57e9153f4224cfca349613a61"
dependencies = [
"async-utility",
"nostr",
@@ -3594,6 +3623,16 @@ version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39"
[[package]]
name = "page_size"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "30d5b2194ed13191c1999ae0704b7839fb18384fa22e49b57eeaa97d79ce40da"
dependencies = [
"libc",
"winapi",
]
[[package]]
name = "pango"
version = "0.18.3"
@@ -4376,20 +4415,6 @@ dependencies = [
"windows-sys 0.52.0",
]
[[package]]
name = "rusqlite"
version = "0.31.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b838eba278d213a8beaf485bd313fd580ca4505a00d5871caeb1457c55322cae"
dependencies = [
"bitflags 2.6.0",
"fallible-iterator",
"fallible-streaming-iterator",
"hashlink",
"libsqlite3-sys",
"smallvec",
]
[[package]]
name = "rustc-demangle"
version = "0.1.24"
@@ -5113,6 +5138,15 @@ dependencies = [
"futures-core",
]
[[package]]
name = "synchronoise"
version = "1.0.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3dbc01390fc626ce8d1cffe3376ded2b72a11bb70e1c75f404a210e4daa4def2"
dependencies = [
"crossbeam-queue",
]
[[package]]
name = "sys-locale"
version = "0.3.1"