Oak

Check-in [7668189ce1]
Login

Check-in [7668189ce1]

Many hyperlinks are disabled.
Use anonymous login to enable hyperlinks.

Overview
Comment:chore: Bump dependencies
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: 7668189ce15beb1acdc7e437338030c960ecfdcfec46e7205f696cdf58131578
User & Date: carlos 2023-11-12 11:23:16
Context
2024-01-18
08:00
chore: Bump dependencies Leaf check-in: 8241e2f1a0 user: carlos tags: trunk
2023-11-12
11:23
chore: Bump dependencies check-in: 7668189ce1 user: carlos tags: trunk
2023-10-27
14:56
ref(deps): Cache Nostr keys to avoid async calls check-in: 2be15f5044 user: carlos tags: trunk
Changes
Hide Diffs Unified Diffs Ignore Whitespace Patch

Changes to Cargo.lock.

872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
 "deltachat_derive",
 "email",
 "encoded-words",
 "escaper",
 "fast-socks5",
 "format-flowed",
 "futures",
 "futures-lite",
 "hex",
 "humansize",
 "image",
 "kamadak-exif",
 "lettre_email",
 "libc",
 "mailparse",







|







872
873
874
875
876
877
878
879
880
881
882
883
884
885
886
 "deltachat_derive",
 "email",
 "encoded-words",
 "escaper",
 "fast-socks5",
 "format-flowed",
 "futures",
 "futures-lite 1.13.0",
 "hex",
 "humansize",
 "image",
 "kamadak-exif",
 "lettre_email",
 "libc",
 "mailparse",
1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
 "futures-sink",
 "futures-task",
 "futures-util",
]

[[package]]
name = "futures-channel"
version = "0.3.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "955518d47e09b25bbebc7a18df10b81f0c766eaf4c4f1cccef2fca5f2a4fb5f2"
dependencies = [
 "futures-core",
 "futures-sink",
]

[[package]]
name = "futures-core"
version = "0.3.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4bca583b7e26f571124fe5b7561d49cb2868d79116cfa0eefce955557c6fee8c"

[[package]]
name = "futures-executor"
version = "0.3.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0"
dependencies = [







|

|







|

|







1502
1503
1504
1505
1506
1507
1508
1509
1510
1511
1512
1513
1514
1515
1516
1517
1518
1519
1520
1521
1522
1523
1524
1525
1526
1527
1528
 "futures-sink",
 "futures-task",
 "futures-util",
]

[[package]]
name = "futures-channel"
version = "0.3.29"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ff4dd66668b557604244583e3e1e1eada8c5c2e96a6d0d6653ede395b78bbacb"
dependencies = [
 "futures-core",
 "futures-sink",
]

[[package]]
name = "futures-core"
version = "0.3.29"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "eb1d22c66e66d9d72e1758f0bd7d4fd0bee04cad842ee34587d68c07e45d088c"

[[package]]
name = "futures-executor"
version = "0.3.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ccecee823288125bd88b4d7f565c9e58e41858e47ab72e8ea2d64e93624386e0"
dependencies = [
1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564















1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
 "futures-core",
 "lock_api",
 "parking_lot 0.11.2",
]

[[package]]
name = "futures-io"
version = "0.3.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4fff74096e71ed47f8e023204cfd0aa1289cd54ae5430a9523be060cdb849964"

[[package]]
name = "futures-lite"
version = "1.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce"
dependencies = [
 "fastrand 1.9.0",
 "futures-core",
 "futures-io",
 "memchr",
 "parking",
 "pin-project-lite",
 "waker-fn",
]
















[[package]]
name = "futures-macro"
version = "0.3.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "89ca545a94061b6365f2c7355b4b32bd20df3ff95f02da9329b34ccc3bd6ee72"
dependencies = [
 "proc-macro2",
 "quote",
 "syn 2.0.37",
]

[[package]]
name = "futures-sink"
version = "0.3.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f43be4fe21a13b9781a69afa4985b0f6ee0e1afab2c6f454a8cf30e2b2237b6e"

[[package]]
name = "futures-task"
version = "0.3.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "76d3d132be6c0e6aa1534069c705a74a5997a356c0dc2f86a47765e5617c5b65"

[[package]]
name = "futures-util"
version = "0.3.28"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "26b01e40b772d54cf6c6d721c1d1abd0647a0106a12ecaa1c186273392a69533"
dependencies = [
 "futures-channel",
 "futures-core",
 "futures-io",
 "futures-macro",
 "futures-sink",
 "futures-task",







|

|















>
>
>
>
>
>
>
>
>
>
>
>
>
>
>



|

|








|

|



|

|



|

|







1540
1541
1542
1543
1544
1545
1546
1547
1548
1549
1550
1551
1552
1553
1554
1555
1556
1557
1558
1559
1560
1561
1562
1563
1564
1565
1566
1567
1568
1569
1570
1571
1572
1573
1574
1575
1576
1577
1578
1579
1580
1581
1582
1583
1584
1585
1586
1587
1588
1589
1590
1591
1592
1593
1594
1595
1596
1597
1598
1599
1600
1601
1602
1603
1604
1605
1606
1607
1608
1609
1610
1611
1612
1613
1614
1615
 "futures-core",
 "lock_api",
 "parking_lot 0.11.2",
]

[[package]]
name = "futures-io"
version = "0.3.29"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "8bf34a163b5c4c52d0478a4d757da8fb65cabef42ba90515efee0f6f9fa45aaa"

[[package]]
name = "futures-lite"
version = "1.13.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "49a9d51ce47660b1e808d3c990b4709f2f415d928835a17dfd16991515c46bce"
dependencies = [
 "fastrand 1.9.0",
 "futures-core",
 "futures-io",
 "memchr",
 "parking",
 "pin-project-lite",
 "waker-fn",
]

[[package]]
name = "futures-lite"
version = "2.0.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9c1155db57329dca6d018b61e76b1488ce9a2e5e44028cac420a5898f4fcef63"
dependencies = [
 "fastrand 2.0.0",
 "futures-core",
 "futures-io",
 "memchr",
 "parking",
 "pin-project-lite",
 "waker-fn",
]

[[package]]
name = "futures-macro"
version = "0.3.29"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "53b153fd91e4b0147f4aced87be237c98248656bb01050b96bf3ee89220a8ddb"
dependencies = [
 "proc-macro2",
 "quote",
 "syn 2.0.37",
]

[[package]]
name = "futures-sink"
version = "0.3.29"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "e36d3378ee38c2a36ad710c5d30c2911d752cb941c00c72dbabfb786a7970817"

[[package]]
name = "futures-task"
version = "0.3.29"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "efd193069b0ddadc69c46389b740bbccdd97203899b48d09c5f7969591d6bae2"

[[package]]
name = "futures-util"
version = "0.3.29"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a19526d624e703a3179b3d322efec918b6246ea0fa51d41124525f00f1cc8104"
dependencies = [
 "futures-channel",
 "futures-core",
 "futures-io",
 "futures-macro",
 "futures-sink",
 "futures-task",
2082
2083
2084
2085
2086
2087
2088
2089
2090
2091
2092
2093
2094
2095
2096

[[package]]
name = "ipconfig"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b58db92f96b720de98181bbbe63c831e87005ab460c1bf306eb2622b4707997f"
dependencies = [
 "socket2 0.5.4",
 "widestring",
 "windows-sys 0.48.0",
 "winreg",
]

[[package]]
name = "ipnet"







|







2097
2098
2099
2100
2101
2102
2103
2104
2105
2106
2107
2108
2109
2110
2111

[[package]]
name = "ipconfig"
version = "0.3.2"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "b58db92f96b720de98181bbbe63c831e87005ab460c1bf306eb2622b4707997f"
dependencies = [
 "socket2 0.5.5",
 "widestring",
 "windows-sys 0.48.0",
 "winreg",
]

[[package]]
name = "ipnet"
2217
2218
2219
2220
2221
2222
2223
2224
2225
2226
2227
2228
2229
2230
2231
2232
2233
 "regex",
 "time 0.1.45",
 "uuid",
]

[[package]]
name = "libc"
version = "0.2.148"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "9cdc71e17332e86d2e1d38c1f99edcb6288ee11b815fb1a4b049eaa2114d369b"

[[package]]
name = "libm"
version = "0.2.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4"








|

|







2232
2233
2234
2235
2236
2237
2238
2239
2240
2241
2242
2243
2244
2245
2246
2247
2248
 "regex",
 "time 0.1.45",
 "uuid",
]

[[package]]
name = "libc"
version = "0.2.150"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "89d92a4743f9a61002fae18374ed11e7973f530cb3a3255fb354818118b2203c"

[[package]]
name = "libm"
version = "0.2.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f7012b1bbb0719e1097c47611d3898568c546d597c2e74d66f6087edd5233ff4"

2300
2301
2302
2303
2304
2305
2306
2307
2308
2309
2310
2311
2312
2313
2314
version = "0.4.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1a9bad9f94746442c783ca431b22403b519cd7fbeed0533fdd6328b2f2212128"

[[package]]
name = "ln-sdk"
version = "0.2.0-SNAPSHOT"
source = "git+https://oak-node.net/cgit/ln-sdk.git?rev=8366a4dcaf4df53b4ecafde1af30b2fb865e8200#8366a4dcaf4df53b4ecafde1af30b2fb865e8200"
dependencies = [
 "anyhow",
 "async-trait",
 "base64 0.20.0",
 "bech32",
 "bitcoin_hashes 0.12.0",
 "cfg_aliases",







|







2315
2316
2317
2318
2319
2320
2321
2322
2323
2324
2325
2326
2327
2328
2329
version = "0.4.7"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1a9bad9f94746442c783ca431b22403b519cd7fbeed0533fdd6328b2f2212128"

[[package]]
name = "ln-sdk"
version = "0.2.0-SNAPSHOT"
source = "git+https://oak-node.net/cgit/ln-sdk.git?rev=7718222452be0299505c102f1e2596986738cef5#7718222452be0299505c102f1e2596986738cef5"
dependencies = [
 "anyhow",
 "async-trait",
 "base64 0.20.0",
 "bech32",
 "bitcoin_hashes 0.12.0",
 "cfg_aliases",
2484
2485
2486
2487
2488
2489
2490
2491
2492
2493
2494
2495
2496
2497
2498
2499
2500
dependencies = [
 "adler",
 "simd-adler32",
]

[[package]]
name = "mio"
version = "0.8.8"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "927a765cd3fc26206e66b296465fa9d3e5ab003e651c1b3c060e7956d96b19d2"
dependencies = [
 "libc",
 "log",
 "wasi 0.11.0+wasi-snapshot-preview1",
 "windows-sys 0.48.0",
]








|

|







2499
2500
2501
2502
2503
2504
2505
2506
2507
2508
2509
2510
2511
2512
2513
2514
2515
dependencies = [
 "adler",
 "simd-adler32",
]

[[package]]
name = "mio"
version = "0.8.9"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3dce281c5e46beae905d4de1870d8b1509a9142b62eedf18b443b011ca8343d0"
dependencies = [
 "libc",
 "log",
 "wasi 0.11.0+wasi-snapshot-preview1",
 "windows-sys 0.48.0",
]

2608
2609
2610
2611
2612
2613
2614
2615
2616
2617
2618
2619
2620
2621
2622
2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
checksum = "ec60c60a693226186f5d6edf073232bfb6464ed97eb22cf3b01c1e8198fd97f5"
dependencies = [
 "windows-sys 0.48.0",
]

[[package]]
name = "nostr"
version = "0.24.0"
source = "git+https://github.com/rust-nostr/nostr?rev=2799d037ecef0f14e993ef140920ed9c90d8374b#2799d037ecef0f14e993ef140920ed9c90d8374b"
dependencies = [
 "aes",
 "base64 0.21.4",
 "bip39",
 "bitcoin 0.30.1",
 "cbc",
 "chacha20",
 "getrandom 0.2.10",
 "instant",
 "negentropy",
 "once_cell",
 "reqwest",
 "serde",
 "serde_json",
 "tracing",
 "url-fork",
]

[[package]]
name = "nostr-sdk"
version = "0.24.0"
source = "git+https://github.com/rust-nostr/nostr?rev=2799d037ecef0f14e993ef140920ed9c90d8374b#2799d037ecef0f14e993ef140920ed9c90d8374b"
dependencies = [
 "async-utility",
 "nostr",
 "nostr-sdk-net",
 "once_cell",
 "thiserror",
 "tokio",
 "tracing",
]

[[package]]
name = "nostr-sdk-net"
version = "0.24.0"
source = "git+https://github.com/rust-nostr/nostr?rev=2799d037ecef0f14e993ef140920ed9c90d8374b#2799d037ecef0f14e993ef140920ed9c90d8374b"
dependencies = [
 "futures-util",
 "thiserror",
 "tokio",
 "tokio-rustls 0.24.1",
 "tokio-socks",
 "tokio-tungstenite",







|
|




















|
|












|
|







2623
2624
2625
2626
2627
2628
2629
2630
2631
2632
2633
2634
2635
2636
2637
2638
2639
2640
2641
2642
2643
2644
2645
2646
2647
2648
2649
2650
2651
2652
2653
2654
2655
2656
2657
2658
2659
2660
2661
2662
2663
2664
2665
2666
2667
2668
2669
2670
2671
2672
2673
2674
checksum = "ec60c60a693226186f5d6edf073232bfb6464ed97eb22cf3b01c1e8198fd97f5"
dependencies = [
 "windows-sys 0.48.0",
]

[[package]]
name = "nostr"
version = "0.25.0"
source = "git+https://github.com/rust-nostr/nostr?tag=v0.25.0#ef1c988d501684753ec4f8a61422b6fbba38fbeb"
dependencies = [
 "aes",
 "base64 0.21.4",
 "bip39",
 "bitcoin 0.30.1",
 "cbc",
 "chacha20",
 "getrandom 0.2.10",
 "instant",
 "negentropy",
 "once_cell",
 "reqwest",
 "serde",
 "serde_json",
 "tracing",
 "url-fork",
]

[[package]]
name = "nostr-sdk"
version = "0.25.0"
source = "git+https://github.com/rust-nostr/nostr?tag=v0.25.0#ef1c988d501684753ec4f8a61422b6fbba38fbeb"
dependencies = [
 "async-utility",
 "nostr",
 "nostr-sdk-net",
 "once_cell",
 "thiserror",
 "tokio",
 "tracing",
]

[[package]]
name = "nostr-sdk-net"
version = "0.25.0"
source = "git+https://github.com/rust-nostr/nostr?tag=v0.25.0#ef1c988d501684753ec4f8a61422b6fbba38fbeb"
dependencies = [
 "futures-util",
 "thiserror",
 "tokio",
 "tokio-rustls 0.24.1",
 "tokio-socks",
 "tokio-tungstenite",
2775
2776
2777
2778
2779
2780
2781
2782
2783
2784
2785
2786
2787
2788
2789
name = "oak"
version = "0.3.9-SNAPSHOT"
dependencies = [
 "anyhow",
 "base64 0.20.0",
 "chrono",
 "deltachat",
 "futures-lite",
 "futures-util",
 "hex",
 "itertools 0.11.0",
 "lightning-invoice 0.25.0",
 "ln-sdk",
 "log",
 "log4rs",







|







2790
2791
2792
2793
2794
2795
2796
2797
2798
2799
2800
2801
2802
2803
2804
name = "oak"
version = "0.3.9-SNAPSHOT"
dependencies = [
 "anyhow",
 "base64 0.20.0",
 "chrono",
 "deltachat",
 "futures-lite 2.0.0",
 "futures-util",
 "hex",
 "itertools 0.11.0",
 "lightning-invoice 0.25.0",
 "ln-sdk",
 "log",
 "log4rs",
3215
3216
3217
3218
3219
3220
3221
3222
3223
3224
3225
3226
3227
3228
3229
 "flate2",
 "miniz_oxide",
]

[[package]]
name = "powpub"
version = "0.1.4-SNAPSHOT"
source = "git+https://oak-node.net/cgit/powpub.git?rev=d8e050a51cf12622562efef34d2d6de8b58f363e#d8e050a51cf12622562efef34d2d6de8b58f363e"
dependencies = [
 "anyhow",
 "async-trait",
 "base64 0.20.0",
 "bech32",
 "cfg_aliases",
 "env_logger",







|







3230
3231
3232
3233
3234
3235
3236
3237
3238
3239
3240
3241
3242
3243
3244
 "flate2",
 "miniz_oxide",
]

[[package]]
name = "powpub"
version = "0.1.4-SNAPSHOT"
source = "git+https://oak-node.net/cgit/powpub.git?rev=90824739ad59083e417bd0a9fb7484e7a7745ed3#90824739ad59083e417bd0a9fb7484e7a7745ed3"
dependencies = [
 "anyhow",
 "async-trait",
 "base64 0.20.0",
 "bech32",
 "cfg_aliases",
 "env_logger",
3590
3591
3592
3593
3594
3595
3596
3597
3598
3599
3600
3601
3602
3603
3604
3605
3606
name = "regex-syntax"
version = "0.7.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da"

[[package]]
name = "reqwest"
version = "0.11.20"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3e9ad3fe7488d7e34558a2033d45a0c90b72d97b4f80705666fea71472e2e6a1"
dependencies = [
 "base64 0.21.4",
 "bytes",
 "encoding_rs",
 "futures-core",
 "futures-util",
 "h2",







|

|







3605
3606
3607
3608
3609
3610
3611
3612
3613
3614
3615
3616
3617
3618
3619
3620
3621
name = "regex-syntax"
version = "0.7.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "dbb5fb1acd8a1a18b3dd5be62d25485eb770e05afb408a9627d14d451bae12da"

[[package]]
name = "reqwest"
version = "0.11.22"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "046cd98826c46c2ac8ddecae268eb5c2e58628688a5fc7a2643704a73faba95b"
dependencies = [
 "base64 0.21.4",
 "bytes",
 "encoding_rs",
 "futures-core",
 "futures-util",
 "h2",
3618
3619
3620
3621
3622
3623
3624

3625
3626
3627
3628
3629
3630
3631
 "percent-encoding",
 "pin-project-lite",
 "rustls 0.21.7",
 "rustls-pemfile",
 "serde",
 "serde_json",
 "serde_urlencoded",

 "tokio",
 "tokio-native-tls",
 "tokio-rustls 0.24.1",
 "tokio-socks",
 "tower-service",
 "url",
 "wasm-bindgen",







>







3633
3634
3635
3636
3637
3638
3639
3640
3641
3642
3643
3644
3645
3646
3647
 "percent-encoding",
 "pin-project-lite",
 "rustls 0.21.7",
 "rustls-pemfile",
 "serde",
 "serde_json",
 "serde_urlencoded",
 "system-configuration",
 "tokio",
 "tokio-native-tls",
 "tokio-rustls 0.24.1",
 "tokio-socks",
 "tower-service",
 "url",
 "wasm-bindgen",
4090
4091
4092
4093
4094
4095
4096
4097
4098
4099
4100
4101
4102
4103
4104
4105
4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
name = "send_wrapper"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73"

[[package]]
name = "serde"
version = "1.0.188"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cf9e0fcba69a370eed61bcf2b728575f726b50b55cba78064753d708ddc7549e"
dependencies = [
 "serde_derive",
]

[[package]]
name = "serde-value"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f3a1a3341211875ef120e117ea7fd5228530ae7e7036a779fdc9117be6b3282c"
dependencies = [
 "ordered-float",
 "serde",
]

[[package]]
name = "serde_derive"
version = "1.0.188"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4eca7ac642d82aa35b60049a6eccb4be6be75e599bd2e9adb5f875a737654af2"
dependencies = [
 "proc-macro2",
 "quote",
 "syn 2.0.37",
]

[[package]]
name = "serde_json"
version = "1.0.107"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "6b420ce6e3d8bd882e9b243c6eed35dbc9a6110c9769e74b584e0d68d1f20c65"
dependencies = [
 "itoa",
 "ryu",
 "serde",
]

[[package]]







|

|
















|

|








|

|







4106
4107
4108
4109
4110
4111
4112
4113
4114
4115
4116
4117
4118
4119
4120
4121
4122
4123
4124
4125
4126
4127
4128
4129
4130
4131
4132
4133
4134
4135
4136
4137
4138
4139
4140
4141
4142
4143
4144
4145
4146
4147
4148
4149
4150
4151
4152
name = "send_wrapper"
version = "0.6.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "cd0b0ec5f1c1ca621c432a25813d8d60c88abe6d3e08a3eb9cf37d97a0fe3d73"

[[package]]
name = "serde"
version = "1.0.192"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "bca2a08484b285dcb282d0f67b26cadc0df8b19f8c12502c13d966bf9482f001"
dependencies = [
 "serde_derive",
]

[[package]]
name = "serde-value"
version = "0.7.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "f3a1a3341211875ef120e117ea7fd5228530ae7e7036a779fdc9117be6b3282c"
dependencies = [
 "ordered-float",
 "serde",
]

[[package]]
name = "serde_derive"
version = "1.0.192"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d6c7207fbec9faa48073f3e3074cbe553af6ea512d7c21ba46e434e70ea9fbc1"
dependencies = [
 "proc-macro2",
 "quote",
 "syn 2.0.37",
]

[[package]]
name = "serde_json"
version = "1.0.108"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "3d1c7e3eac408d115102c4c24ad393e0821bb3a5df4d506a80f85f7a742a526b"
dependencies = [
 "itoa",
 "ryu",
 "serde",
]

[[package]]
4152
4153
4154
4155
4156
4157
4158
4159
4160
4161
4162
4163
4164
4165
4166
4167
4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
 "itoa",
 "ryu",
 "serde",
]

[[package]]
name = "serde_with"
version = "3.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1ca3b16a3d82c4088f343b7480a93550b3eabe1a358569c2dfe38bbcead07237"
dependencies = [
 "base64 0.21.4",
 "chrono",
 "hex",
 "indexmap 1.9.3",
 "indexmap 2.0.0",
 "serde",
 "serde_json",
 "serde_with_macros",
 "time 0.3.29",
]

[[package]]
name = "serde_with_macros"
version = "3.3.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "2e6be15c453eb305019bfa438b1593c731f36a289a7853f7707ee29e870b3b3c"
dependencies = [
 "darling 0.20.3",
 "proc-macro2",
 "quote",
 "syn 2.0.37",
]








|

|














|

|







4168
4169
4170
4171
4172
4173
4174
4175
4176
4177
4178
4179
4180
4181
4182
4183
4184
4185
4186
4187
4188
4189
4190
4191
4192
4193
4194
4195
4196
4197
4198
4199
4200
4201
 "itoa",
 "ryu",
 "serde",
]

[[package]]
name = "serde_with"
version = "3.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "64cd236ccc1b7a29e7e2739f27c0b2dd199804abc4290e32f59f3b68d6405c23"
dependencies = [
 "base64 0.21.4",
 "chrono",
 "hex",
 "indexmap 1.9.3",
 "indexmap 2.0.0",
 "serde",
 "serde_json",
 "serde_with_macros",
 "time 0.3.29",
]

[[package]]
name = "serde_with_macros"
version = "3.4.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "93634eb5f75a2323b16de4748022ac4297f9e76b6dced2be287a099f41b5e788"
dependencies = [
 "darling 0.20.3",
 "proc-macro2",
 "quote",
 "syn 2.0.37",
]

4351
4352
4353
4354
4355
4356
4357
4358
4359
4360
4361
4362
4363
4364
4365
4366
4367
dependencies = [
 "libc",
 "winapi",
]

[[package]]
name = "socket2"
version = "0.5.4"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "4031e820eb552adee9295814c0ced9e5cf38ddf1e8b7d566d6de8e2538ea989e"
dependencies = [
 "libc",
 "windows-sys 0.48.0",
]

[[package]]
name = "spin"







|

|







4367
4368
4369
4370
4371
4372
4373
4374
4375
4376
4377
4378
4379
4380
4381
4382
4383
dependencies = [
 "libc",
 "winapi",
]

[[package]]
name = "socket2"
version = "0.5.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7b5fac59a5cb5dd637972e5fca70daf0523c9067fcdc4842f053dae04a18f8e9"
dependencies = [
 "libc",
 "windows-sys 0.48.0",
]

[[package]]
name = "spin"
4578
4579
4580
4581
4582
4583
4584





















4585
4586
4587
4588
4589
4590
4591
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7303ef2c05cd654186cb250d29049a24840ca25d2747c25c0381c8d9e2f582e8"
dependencies = [
 "proc-macro2",
 "quote",
 "unicode-ident",
]






















[[package]]
name = "tagger"
version = "4.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "094c9f64d6de9a8506b1e49b63a29333b37ed9e821ee04be694d431b3264c3c5"








>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>
>







4594
4595
4596
4597
4598
4599
4600
4601
4602
4603
4604
4605
4606
4607
4608
4609
4610
4611
4612
4613
4614
4615
4616
4617
4618
4619
4620
4621
4622
4623
4624
4625
4626
4627
4628
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "7303ef2c05cd654186cb250d29049a24840ca25d2747c25c0381c8d9e2f582e8"
dependencies = [
 "proc-macro2",
 "quote",
 "unicode-ident",
]

[[package]]
name = "system-configuration"
version = "0.5.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7"
dependencies = [
 "bitflags 1.3.2",
 "core-foundation",
 "system-configuration-sys",
]

[[package]]
name = "system-configuration-sys"
version = "0.5.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9"
dependencies = [
 "core-foundation-sys",
 "libc",
]

[[package]]
name = "tagger"
version = "4.3.5"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "094c9f64d6de9a8506b1e49b63a29333b37ed9e821ee04be694d431b3264c3c5"

4743
4744
4745
4746
4747
4748
4749
4750
4751
4752
4753
4754
4755
4756
4757
4758
4759
4760
4761
4762
4763
4764
4765
4766
4767
4768
4769
4770
4771
4772
4773
4774
4775
4776
4777
4778
4779
4780
4781
4782
4783
4784
4785
4786
4787
name = "tinyvec_macros"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"

[[package]]
name = "tokio"
version = "1.32.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "17ed6077ed6cd6c74735e21f37eb16dc3935f96878b1fe961074089cc80893f9"
dependencies = [
 "backtrace",
 "bytes",
 "libc",
 "mio",
 "num_cpus",
 "pin-project-lite",
 "signal-hook-registry",
 "socket2 0.5.4",
 "tokio-macros",
 "windows-sys 0.48.0",
]

[[package]]
name = "tokio-io-timeout"
version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf"
dependencies = [
 "pin-project-lite",
 "tokio",
]

[[package]]
name = "tokio-macros"
version = "2.1.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "630bdcf245f78637c13ec01ffae6187cca34625e8c63150d424b59e55af2675e"
dependencies = [
 "proc-macro2",
 "quote",
 "syn 2.0.37",
]

[[package]]







|

|








|
















|

|







4780
4781
4782
4783
4784
4785
4786
4787
4788
4789
4790
4791
4792
4793
4794
4795
4796
4797
4798
4799
4800
4801
4802
4803
4804
4805
4806
4807
4808
4809
4810
4811
4812
4813
4814
4815
4816
4817
4818
4819
4820
4821
4822
4823
4824
name = "tinyvec_macros"
version = "0.1.1"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20"

[[package]]
name = "tokio"
version = "1.34.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "d0c014766411e834f7af5b8f4cf46257aab4036ca95e9d2c144a10f59ad6f5b9"
dependencies = [
 "backtrace",
 "bytes",
 "libc",
 "mio",
 "num_cpus",
 "pin-project-lite",
 "signal-hook-registry",
 "socket2 0.5.5",
 "tokio-macros",
 "windows-sys 0.48.0",
]

[[package]]
name = "tokio-io-timeout"
version = "1.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "30b74022ada614a1b4834de765f9bb43877f910cc8ce4be40e89042c9223a8bf"
dependencies = [
 "pin-project-lite",
 "tokio",
]

[[package]]
name = "tokio-macros"
version = "2.2.0"
source = "registry+https://github.com/rust-lang/crates.io-index"
checksum = "5b8a1e28f2deaa14e508979454cb3a223b10b938b45af148bc0986de36f1923b"
dependencies = [
 "proc-macro2",
 "quote",
 "syn 2.0.37",
]

[[package]]

Changes to Cargo.toml.

10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
chrono = { version = "*", default-features = false }
deltachat = { git = "https://github.com/deltachat/deltachat-core-rust", tag="1.108.0"}
futures-lite = "*"
futures-util = "*"
hex = "*"
itertools = "*"
lightning-invoice = "*"
ln-sdk = { git = "https://oak-node.net/cgit/ln-sdk.git", rev = "8366a4dcaf4df53b4ecafde1af30b2fb865e8200", features = [ "client-lnd", "utoipa" ] }
log = "*"
log4rs = "*"
qrcode-generator = "*"
nostr = { git = "https://github.com/rust-nostr/nostr", default-features = false, features = ["nip04", "nip05", "nip47"], rev = "2799d037ecef0f14e993ef140920ed9c90d8374b" }
nostr-sdk = { git = "https://github.com/rust-nostr/nostr", default-features = false, rev = "2799d037ecef0f14e993ef140920ed9c90d8374b" }
powpub = { git = "https://oak-node.net/cgit/powpub.git", rev = "d8e050a51cf12622562efef34d2d6de8b58f363e", features = [ "client-lnd", "utoipa" ] }
reqwest = { version = "*", default-features = false, features = ["json", "native-tls", "socks"] }
rocket = { version = "0.5.0-rc.3", features = ["json"] }
rocket_db_pools = { version = "0.1.0-rc.3", features = ["sqlx_sqlite"] }
rocket_dyn_templates = { version = "0.1.0-rc.3", features = ["tera"] }
serde = "*"
serde_json = "*"
serde_with = "*"







|



|
|
|







10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
chrono = { version = "*", default-features = false }
deltachat = { git = "https://github.com/deltachat/deltachat-core-rust", tag="1.108.0"}
futures-lite = "*"
futures-util = "*"
hex = "*"
itertools = "*"
lightning-invoice = "*"
ln-sdk = { git = "https://oak-node.net/cgit/ln-sdk.git", rev = "7718222452be0299505c102f1e2596986738cef5", features = [ "client-lnd", "utoipa" ] }
log = "*"
log4rs = "*"
qrcode-generator = "*"
nostr = { git = "https://github.com/rust-nostr/nostr", default-features = false, features = ["nip04", "nip05", "nip47"], tag = "v0.25.0" }
nostr-sdk = { git = "https://github.com/rust-nostr/nostr", default-features = false, tag = "v0.25.0" }
powpub = { git = "https://oak-node.net/cgit/powpub.git", rev = "90824739ad59083e417bd0a9fb7484e7a7745ed3", features = [ "client-lnd", "utoipa" ] }
reqwest = { version = "*", default-features = false, features = ["json", "native-tls", "socks"] }
rocket = { version = "0.5.0-rc.3", features = ["json"] }
rocket_db_pools = { version = "0.1.0-rc.3", features = ["sqlx_sqlite"] }
rocket_dyn_templates = { version = "0.1.0-rc.3", features = ["tera"] }
serde = "*"
serde_json = "*"
serde_with = "*"

Changes to src/bot/nostr.rs.

321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
                        &event,
                        composite_params,
                        lnd_config,
                        http_config,
                    )
                    .await
                {
                    Ok(Some(_)) => info!("Processed event {} by module {}", event.id, ons.id()),
                    Ok(None) => {}
                    Err(e) => error!("Error when handling event {e} by module {}", ons.id()),
                }
            }
        }
    }
}







|

|





321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
                        &event,
                        composite_params,
                        lnd_config,
                        http_config,
                    )
                    .await
                {
                    Ok(Some(_)) => info!("Processed event '{}' by module '{}'", event.id, ons.id()),
                    Ok(None) => {}
                    Err(e) => error!("Error when handling event '{e}' by module '{}'", ons.id()),
                }
            }
        }
    }
}

Changes to src/bot/ons/nip47.rs.

1
2
3
4
5
6
7
8
9

10
11
12
13
14
15
16
use std::collections::HashSet;
use std::string::ToString;

use anyhow::{anyhow, Result};
use hex::ToHex;
use lightning_invoice::Bolt11Invoice;
use ln_sdk::client_v2::lnd::{LndClient, LndConfig};
use ln_sdk::client_v2::CanPayInvoices;
use ln_sdk::http::HttpConfig;

use nostr::nips::nip47::*;
use nostr::prelude::{decrypt, encrypt, FromSkStr};
use nostr::{Event, EventBuilder, Filter, JsonUtil, Keys, Kind, Tag, Timestamp};
use rocket_db_pools::Connection;
use serde::{Deserialize, Serialize};
use serde_json::{from_str, to_string};
use sqlx::pool::PoolConnection;




<




>







1
2
3
4

5
6
7
8
9
10
11
12
13
14
15
16
use std::collections::HashSet;
use std::string::ToString;

use anyhow::{anyhow, Result};

use lightning_invoice::Bolt11Invoice;
use ln_sdk::client_v2::lnd::{LndClient, LndConfig};
use ln_sdk::client_v2::CanPayInvoices;
use ln_sdk::http::HttpConfig;
use nostr::key::XOnlyPublicKey;
use nostr::nips::nip47::*;
use nostr::prelude::{decrypt, encrypt, FromSkStr};
use nostr::{Event, EventBuilder, Filter, JsonUtil, Keys, Kind, Tag, Timestamp};
use rocket_db_pools::Connection;
use serde::{Deserialize, Serialize};
use serde_json::{from_str, to_string};
use sqlx::pool::PoolConnection;
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
    }

    fn filter(&self, _ctx: &NostrContext, spo: &StartupParamsOptional) -> Result<Filter> {
        info!("Preparing subscription to NIP-47 Nostr Wallet Connect calls by anyone with a valid connection string");

        // Find pks associated with NWC secrets
        // They are the pks from which NWC requests will originate
        let pks: Vec<String> = available_nwc_secrets(spo)?
            .into_iter()
            .map(|keys| keys.public_key())
            .map(|pk| pk.serialize().encode_hex::<String>())
            .collect::<Vec<String>>();

        Ok(Filter::new()
            .kind(Kind::WalletConnectRequest)
            .since(Timestamp::now())
            .authors(pks))
    }








|


<
|







134
135
136
137
138
139
140
141
142
143

144
145
146
147
148
149
150
151
    }

    fn filter(&self, _ctx: &NostrContext, spo: &StartupParamsOptional) -> Result<Filter> {
        info!("Preparing subscription to NIP-47 Nostr Wallet Connect calls by anyone with a valid connection string");

        // Find pks associated with NWC secrets
        // They are the pks from which NWC requests will originate
        let pks: Vec<XOnlyPublicKey> = available_nwc_secrets(spo)?
            .into_iter()
            .map(|keys| keys.public_key())

            .collect::<Vec<XOnlyPublicKey>>();

        Ok(Filter::new()
            .kind(Kind::WalletConnectRequest)
            .since(Timestamp::now())
            .authors(pks))
    }

Changes to src/bot/ons/ons1.rs.

66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
        ctx: &NostrContext,
        _composite_params_opt: &StartupParamsOptional,
    ) -> Result<Filter> {
        info!("Preparing subscription to NIP-04 DMs to the bot");
        Ok(Filter::new()
            .kind(Kind::EncryptedDirectMessage)
            .since(Timestamp::now())
            .authors(vec![ctx
                .nostr_bot_owner_nprofile
                .public_key
                .serialize()
                .encode_hex::<String>()])
            .pubkey(ctx.client_keys_cached.public_key()))
    }

    async fn handle(
        &self,
        ctx: &mut NostrContext,
        lnd_client: &LndClient,







|
<
<
<
<







66
67
68
69
70
71
72
73




74
75
76
77
78
79
80
        ctx: &NostrContext,
        _composite_params_opt: &StartupParamsOptional,
    ) -> Result<Filter> {
        info!("Preparing subscription to NIP-04 DMs to the bot");
        Ok(Filter::new()
            .kind(Kind::EncryptedDirectMessage)
            .since(Timestamp::now())
            .authors(vec![ctx.nostr_bot_owner_nprofile.public_key])




            .pubkey(ctx.client_keys_cached.public_key()))
    }

    async fn handle(
        &self,
        ctx: &mut NostrContext,
        lnd_client: &LndClient,

Changes to src/bot/ons/ons3.rs.

1
2
3
4
5
6
7
8
9
10
use std::time::Duration;

use ::hex::ToHex;
use anyhow::Result;
use ln_sdk::client_v2::lnd::{LndClient, LndConfig};
use ln_sdk::http::HttpConfig;
use nostr::prelude::*;
use serde::{Deserialize, Serialize};

use crate::bot::nostr::NostrContext;


<







1
2

3
4
5
6
7
8
9
use std::time::Duration;


use anyhow::Result;
use ln_sdk::client_v2::lnd::{LndClient, LndConfig};
use ln_sdk::http::HttpConfig;
use nostr::prelude::*;
use serde::{Deserialize, Serialize};

use crate::bot::nostr::NostrContext;
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
        ctx: &NostrContext,
        _composite_params_opt: &StartupParamsOptional,
    ) -> Result<Filter> {
        info!("Preparing subscription to NIP-25 Reactions by the bot owner");
        Ok(Filter::new()
            .kind(Kind::Reaction)
            .since(Timestamp::now())
            .authors(vec![ctx
                .nostr_bot_owner_nprofile
                .public_key
                .serialize()
                .encode_hex::<String>()]))
    }

    async fn handle(
        &self,
        ctx: &mut NostrContext,
        lnd_client: &LndClient,
        event: &Event,







|
<
<
<
<







49
50
51
52
53
54
55
56




57
58
59
60
61
62
63
        ctx: &NostrContext,
        _composite_params_opt: &StartupParamsOptional,
    ) -> Result<Filter> {
        info!("Preparing subscription to NIP-25 Reactions by the bot owner");
        Ok(Filter::new()
            .kind(Kind::Reaction)
            .since(Timestamp::now())
            .authors(vec![ctx.nostr_bot_owner_nprofile.public_key]))




    }

    async fn handle(
        &self,
        ctx: &mut NostrContext,
        lnd_client: &LndClient,
        event: &Event,
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
        let res = ctx.client.connect_relay(rec_relay.to_string()).await;
        info!("Attempted to connect to recommended relay, result: {res:?}");
    }

    let mut metadata_events = ctx
        .client
        .get_events_of(
            vec![Filter::new()
                .kind(Kind::Metadata)
                .author(p.serialize().encode_hex::<String>())],
            Some(Duration::from_secs(5)),
        )
        .await?;

    if let Some(rec_relay) = recommended_relay {
        let res = ctx.client.disconnect_relay(rec_relay.to_string()).await;
        info!("Attempted to disconnect from recommended relay, result: {res:?}");







|
<
<







131
132
133
134
135
136
137
138


139
140
141
142
143
144
145
        let res = ctx.client.connect_relay(rec_relay.to_string()).await;
        info!("Attempted to connect to recommended relay, result: {res:?}");
    }

    let mut metadata_events = ctx
        .client
        .get_events_of(
            vec![Filter::new().kind(Kind::Metadata).author(p)],


            Some(Duration::from_secs(5)),
        )
        .await?;

    if let Some(rec_relay) = recommended_relay {
        let res = ctx.client.disconnect_relay(rec_relay.to_string()).await;
        info!("Attempted to disconnect from recommended relay, result: {res:?}");

Changes to src/bot/ons/ons4.rs.

1
2
3
4
5
6
7
8
9
10
use std::time::SystemTime;

use ::hex::ToHex;
use anyhow::{anyhow, Result};
use ln_sdk::client_v2::lnd::model::InvoiceState;
use ln_sdk::client_v2::lnd::model::LookupInvoiceResult;
use ln_sdk::client_v2::lnd::{LndClient, LndClientOps, LndConfig};
use ln_sdk::http::HttpConfig;
use nostr::nips::nip04;
use nostr::prelude::*;


<







1
2

3
4
5
6
7
8
9
use std::time::SystemTime;


use anyhow::{anyhow, Result};
use ln_sdk::client_v2::lnd::model::InvoiceState;
use ln_sdk::client_v2::lnd::model::LookupInvoiceResult;
use ln_sdk::client_v2::lnd::{LndClient, LndClientOps, LndConfig};
use ln_sdk::http::HttpConfig;
use nostr::nips::nip04;
use nostr::prelude::*;
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
        let deck_profile = composite_params_opt
            .ons4
            .get_deck_profile(&ctx.nostr_bot_owner_nprofile)?;

        Ok(Filter::new()
            .kind(Kind::Custom(API_CALL_MESSAGE_KIND))
            .since(Timestamp::now()) // ephemeral ones don't need since
            .authors(vec![deck_profile
                .public_key
                .serialize()
                .encode_hex::<String>()])
            .pubkey(ctx.client_keys_cached.public_key()))
    }

    async fn handle(
        &self,
        ctx: &mut NostrContext,
        lnd_client: &LndClient,







|
<
<
<







68
69
70
71
72
73
74
75



76
77
78
79
80
81
82
        let deck_profile = composite_params_opt
            .ons4
            .get_deck_profile(&ctx.nostr_bot_owner_nprofile)?;

        Ok(Filter::new()
            .kind(Kind::Custom(API_CALL_MESSAGE_KIND))
            .since(Timestamp::now()) // ephemeral ones don't need since
            .authors(vec![deck_profile.public_key])



            .pubkey(ctx.client_keys_cached.public_key()))
    }

    async fn handle(
        &self,
        ctx: &mut NostrContext,
        lnd_client: &LndClient,

Changes to src/params.rs.

1
2
3
4
5
6
7
8
9
10
11
use std::str::FromStr;
use std::time::Duration;

use ::hex::ToHex;
use anyhow::{anyhow, Result};
use nostr::nips;
use nostr::prelude::*;
use serde::{Deserialize, Serialize};

use crate::bot::ons::ons1::Ons1Config;
// use crate::bot::ons::ons2::Ons2Config;



<







1
2
3

4
5
6
7
8
9
10
use std::str::FromStr;
use std::time::Duration;


use anyhow::{anyhow, Result};
use nostr::nips;
use nostr::prelude::*;
use serde::{Deserialize, Serialize};

use crate::bot::ons::ons1::Ons1Config;
// use crate::bot::ons::ons2::Ons2Config;
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
    match client.add_relays(seed_relays).await {
        Ok(_) => {
            client.connect().await;

            match client
                .get_events_of(
                    vec![Filter::new()
                        .authors(vec![profile.public_key.serialize().encode_hex::<String>()])
                        .kind(Kind::RelayList)],
                    Some(Duration::from_secs(5)),
                )
                .await
            {
                Ok(events) => {
                    for event in events {







|







146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
    match client.add_relays(seed_relays).await {
        Ok(_) => {
            client.connect().await;

            match client
                .get_events_of(
                    vec![Filter::new()
                        .authors(vec![profile.public_key])
                        .kind(Kind::RelayList)],
                    Some(Duration::from_secs(5)),
                )
                .await
            {
                Ok(events) => {
                    for event in events {