diff --git a/Cargo.lock b/Cargo.lock index e8072aeefb0..5d4bdc8da8d 100644 --- a/Cargo.lock +++ b/Cargo.lock @@ -332,7 +332,7 @@ version = "1.1.5" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "40c48f72fd53cd289104fc64099abca73db4166ad86ea0b4341abe65af83dadc" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.60.2", ] [[package]] @@ -343,7 +343,7 @@ checksum = "291e6a250ff86cd4a820112fb8898808a366d8f9f58ce16d1f538353ad55747d" dependencies = [ "anstyle", "once_cell_polyfill", - "windows-sys 0.61.2", + "windows-sys 0.60.2", ] [[package]] @@ -383,7 +383,7 @@ dependencies = [ "objc2-foundation 0.3.2", "parking_lot", "percent-encoding", - "windows-sys 0.61.2", + "windows-sys 0.59.0", "x11rb", ] @@ -521,8 +521,7 @@ dependencies = [ [[package]] name = "async-imap" version = "0.12.0" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f97b87216c9f0ccc63c516263169085fa34bba25633f6d96c6a9b9ca1fd5f70a" +source = "git+https://github.com/async-email/async-imap?rev=d1f2606421c9211f992c1c565a32d8f770476aeb#d1f2606421c9211f992c1c565a32d8f770476aeb" dependencies = [ "async-channel 2.5.0", "async-compression", @@ -534,7 +533,6 @@ dependencies = [ "log", "nom 8.0.0", "pin-project", - "pin-utils", "self_cell", "stop-token", "thiserror 1.0.69", @@ -1232,7 +1230,7 @@ dependencies = [ "cap-primitives", "cap-std", "io-lifetimes 3.0.1", - "windows-sys 0.61.2", + "windows-sys 0.60.2", ] [[package]] @@ -1249,7 +1247,7 @@ dependencies = [ "maybe-owned", "rustix 1.1.5", "rustix-linux-procfs", - "windows-sys 0.61.2", + "windows-sys 0.60.2", "winx", ] @@ -2425,7 +2423,7 @@ dependencies = [ "libc", "option-ext", "redox_users 0.5.3", - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -2721,7 +2719,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "39cab71617ae0d63f51a36d69f866391735b51691dbda63cf6f96d042b63efeb" dependencies = [ "libc", - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -4525,9 +4523,9 @@ dependencies = [ [[package]] name = "libsqlite3-sys" -version = "0.38.2" +version = "0.39.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1d20bef17f513b9b3004532233187769cd072d790971f4e4da0e346eb6401e8" +checksum = "14a5f01b87b92705d07b433c06f96cbc764637d81a0bffb5734ce17cf0f9a2b3" dependencies = [ "cc", "pkg-config", @@ -5120,7 +5118,7 @@ version = "0.50.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "7957b9740744892f114936ab4a57b3f487491bbeafaf8083688b16841a4240e5" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -5720,7 +5718,7 @@ dependencies = [ "serde_path_to_error", "sha2 0.10.9", "starship-battery", - "sysinfo", + "sysinfo 0.33.1", "tar", "tempfile", "thiserror 2.0.21", @@ -6493,12 +6491,6 @@ version = "0.2.17" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "a89322df9ebe1c1578d689c92318e070967d1042b512afbe49518723f4e6d5cd" -[[package]] -name = "pin-utils" -version = "0.1.1" -source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "13bee6c73da26345c729282832b60b0363cf3dd9f4bfd81d8551b7a1c889a113" - [[package]] name = "piper" version = "0.2.5" @@ -6923,7 +6915,7 @@ dependencies = [ "once_cell", "socket2", "tracing", - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -7457,9 +7449,9 @@ dependencies = [ [[package]] name = "rusqlite" -version = "0.40.2" +version = "0.41.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23f2a97da3e3873c73cb2a2e71b35c40ff95e0b1eefa8d72d8499a6928c3b5b3" +checksum = "da9bba6f3506135e120a6586df05be18b48d18896600646a4bec8f993d91a594" dependencies = [ "bitflags 2.13.2", "fallible-iterator", @@ -7568,7 +7560,7 @@ dependencies = [ "errno", "libc", "linux-raw-sys 0.12.1", - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -7666,7 +7658,7 @@ dependencies = [ "security-framework 3.7.0", "security-framework-sys", "webpki-root-certs", - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -8364,7 +8356,7 @@ source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c3d1e2c7f27f8d4cb10542a02c49005dbd6e93095799d6f3be745fae9f8fedd4" dependencies = [ "libc", - "windows-sys 0.61.2", + "windows-sys 0.60.2", ] [[package]] @@ -8488,7 +8480,7 @@ dependencies = [ "cfg-if", "libc", "psm", - "windows-sys 0.61.2", + "windows-sys 0.60.2", ] [[package]] @@ -8766,6 +8758,20 @@ dependencies = [ "windows 0.57.0", ] +[[package]] +name = "sysinfo" +version = "0.38.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92ab6a2f8bfe508deb3c6406578252e491d299cbbf3bc0529ecc3313aee4a52f" +dependencies = [ + "libc", + "memchr", + "ntapi", + "objc2-core-foundation", + "objc2-io-kit", + "windows 0.62.2", +] + [[package]] name = "system-configuration" version = "0.7.0" @@ -8839,7 +8845,7 @@ dependencies = [ "getrandom 0.4.3", "once_cell", "rustix 1.1.5", - "windows-sys 0.61.2", + "windows-sys 0.59.0", ] [[package]] @@ -8852,7 +8858,7 @@ dependencies = [ "parking_lot", "rustix 1.1.5", "signal-hook", - "windows-sys 0.61.2", + "windows-sys 0.60.2", ] [[package]] @@ -9479,7 +9485,7 @@ dependencies = [ [[package]] name = "tinychannels" -version = "0.2.0" +version = "0.2.1" dependencies = [ "anyhow", "async-imap", @@ -9529,7 +9535,7 @@ dependencies = [ [[package]] name = "tinychannels-bus" -version = "0.2.0" +version = "0.2.1" dependencies = [ "base64 0.23.1", "schemars", @@ -9540,7 +9546,7 @@ dependencies = [ [[package]] name = "tinychannels-module" -version = "0.2.0" +version = "0.2.1" dependencies = [ "anyhow", "async-trait", @@ -9567,7 +9573,7 @@ dependencies = [ [[package]] name = "tinychannels-runtime" -version = "0.2.0" +version = "0.2.1" dependencies = [ "anyhow", "async-trait", @@ -9630,7 +9636,7 @@ dependencies = [ "log", "serde_json", "sha2 0.10.9", - "sysinfo", + "sysinfo 0.33.1", "thiserror 2.0.21", "tinycomputer-bus", "tinycomputer-core", @@ -10298,7 +10304,7 @@ dependencies = [ [[package]] name = "tinymemory-api" -version = "2.0.1" +version = "2.0.2" dependencies = [ "async-trait", "chrono", @@ -10312,7 +10318,7 @@ dependencies = [ [[package]] name = "tinymemory-integrations" -version = "2.0.1" +version = "2.0.2" dependencies = [ "async-trait", "chrono", @@ -10337,7 +10343,7 @@ dependencies = [ [[package]] name = "tinymemory-tools" -version = "2.0.1" +version = "2.0.2" dependencies = [ "async-lock", "async-trait", @@ -10357,7 +10363,7 @@ dependencies = [ [[package]] name = "tinyredact" -version = "2.0.1" +version = "2.0.2" dependencies = [ "log", "regex", @@ -10429,7 +10435,7 @@ dependencies = [ [[package]] name = "tinystoragedrivers" -version = "2.1.2" +version = "2.1.3" dependencies = [ "tinystoragedrivers-api", "tinystoragedrivers-blob", @@ -10443,7 +10449,7 @@ dependencies = [ [[package]] name = "tinystoragedrivers-api" -version = "2.1.2" +version = "2.1.3" dependencies = [ "async-trait", "bytes", @@ -10456,7 +10462,7 @@ dependencies = [ [[package]] name = "tinystoragedrivers-blob" -version = "2.1.2" +version = "2.1.3" dependencies = [ "async-trait", "bytes", @@ -10467,7 +10473,7 @@ dependencies = [ "object_store", "serde", "serde_json", - "sha2 0.10.9", + "sha2 0.11.1", "tinystoragedrivers-api", "tinystoragedrivers-connect", "tinystoragedrivers-types", @@ -10475,7 +10481,7 @@ dependencies = [ [[package]] name = "tinystoragedrivers-bus" -version = "2.1.2" +version = "2.1.3" dependencies = [ "serde", "serde_json", @@ -10485,7 +10491,7 @@ dependencies = [ [[package]] name = "tinystoragedrivers-busproxy" -version = "2.1.2" +version = "2.1.3" dependencies = [ "async-trait", "bytes", @@ -10502,7 +10508,7 @@ dependencies = [ [[package]] name = "tinystoragedrivers-connect" -version = "2.1.2" +version = "2.1.3" dependencies = [ "lapin", "mongodb", @@ -10517,7 +10523,7 @@ dependencies = [ [[package]] name = "tinystoragedrivers-document" -version = "2.1.2" +version = "2.1.3" dependencies = [ "async-trait", "data-encoding", @@ -10537,15 +10543,15 @@ dependencies = [ [[package]] name = "tinystoragedrivers-fence" -version = "2.1.2" +version = "2.1.3" dependencies = [ "libc", - "sysinfo", + "sysinfo 0.38.4", ] [[package]] name = "tinystoragedrivers-kv" -version = "2.1.2" +version = "2.1.3" dependencies = [ "async-trait", "futures-util", @@ -10561,7 +10567,7 @@ dependencies = [ [[package]] name = "tinystoragedrivers-queue" -version = "2.1.2" +version = "2.1.3" dependencies = [ "async-trait", "data-encoding", @@ -10578,7 +10584,7 @@ dependencies = [ [[package]] name = "tinystoragedrivers-secrets" -version = "2.1.2" +version = "2.1.3" dependencies = [ "async-trait", "atomicwrites", @@ -10603,7 +10609,7 @@ dependencies = [ [[package]] name = "tinystoragedrivers-testkit" -version = "2.1.2" +version = "2.1.3" dependencies = [ "async-trait", "bytes", @@ -10623,7 +10629,7 @@ dependencies = [ [[package]] name = "tinystoragedrivers-types" -version = "2.1.2" +version = "2.1.3" dependencies = [ "serde", "serde_json", @@ -10747,7 +10753,7 @@ dependencies = [ [[package]] name = "tinywallet" -version = "0.29.0" +version = "0.30.0" dependencies = [ "bitcoin", "bs58", @@ -10769,7 +10775,7 @@ dependencies = [ [[package]] name = "tinywallet-bus" -version = "0.29.0" +version = "0.30.0" dependencies = [ "serde", "serde_json", @@ -10778,7 +10784,7 @@ dependencies = [ [[package]] name = "tinywallet-crypto" -version = "0.29.0" +version = "0.30.0" dependencies = [ "async-trait", "bech32 0.12.0", @@ -10794,7 +10800,7 @@ dependencies = [ [[package]] name = "tinywallet-module" -version = "0.29.0" +version = "0.30.0" dependencies = [ "async-trait", "bitcoin", @@ -10823,7 +10829,7 @@ dependencies = [ [[package]] name = "tinywallet-web3" -version = "0.29.0" +version = "0.30.0" dependencies = [ "async-trait", "base64 0.23.1", @@ -10842,7 +10848,7 @@ dependencies = [ [[package]] name = "tinywallet-x402" -version = "0.29.0" +version = "0.30.0" dependencies = [ "async-trait", "base64 0.23.1", @@ -12222,7 +12228,7 @@ version = "0.1.11" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "c2a7b1c03c876122aa43f3020e6c3c3ee5c05081c9a00739faf7503aeba10d22" dependencies = [ - "windows-sys 0.61.2", + "windows-sys 0.48.0", ] [[package]] diff --git a/crates/openhuman-app/Cargo.lock b/crates/openhuman-app/Cargo.lock index cb04bce083a..aba0bdfc84f 100644 --- a/crates/openhuman-app/Cargo.lock +++ b/crates/openhuman-app/Cargo.lock @@ -3579,9 +3579,9 @@ dependencies = [ [[package]] name = "libsqlite3-sys" -version = "0.38.2" +version = "0.39.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "f1d20bef17f513b9b3004532233187769cd072d790971f4e4da0e346eb6401e8" +checksum = "14a5f01b87b92705d07b433c06f96cbc764637d81a0bffb5734ce17cf0f9a2b3" dependencies = [ "cc", "pkg-config", @@ -4579,7 +4579,7 @@ dependencies = [ "serde_path_to_error", "sha2 0.10.9", "starship-battery", - "sysinfo", + "sysinfo 0.33.1", "tar", "tempfile", "thiserror 2.0.21", @@ -5790,9 +5790,9 @@ dependencies = [ [[package]] name = "rusqlite" -version = "0.40.2" +version = "0.41.1" source = "registry+https://github.com/rust-lang/crates.io-index" -checksum = "23f2a97da3e3873c73cb2a2e71b35c40ff95e0b1eefa8d72d8499a6928c3b5b3" +checksum = "da9bba6f3506135e120a6586df05be18b48d18896600646a4bec8f993d91a594" dependencies = [ "bitflags 2.13.2", "fallible-iterator", @@ -6981,6 +6981,20 @@ dependencies = [ "windows 0.57.0", ] +[[package]] +name = "sysinfo" +version = "0.38.4" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "92ab6a2f8bfe508deb3c6406578252e491d299cbbf3bc0529ecc3313aee4a52f" +dependencies = [ + "libc", + "memchr", + "ntapi", + "objc2-core-foundation", + "objc2-io-kit", + "windows 0.62.2", +] + [[package]] name = "system-configuration" version = "0.7.0" @@ -7874,7 +7888,7 @@ dependencies = [ [[package]] name = "tinychannels-bus" -version = "0.2.0" +version = "0.2.1" dependencies = [ "base64 0.23.1", "schemars 1.2.3", @@ -8177,7 +8191,7 @@ dependencies = [ [[package]] name = "tinymemory-api" -version = "2.0.1" +version = "2.0.2" dependencies = [ "async-trait", "chrono", @@ -8191,7 +8205,7 @@ dependencies = [ [[package]] name = "tinymemory-integrations" -version = "2.0.1" +version = "2.0.2" dependencies = [ "async-trait", "chrono", @@ -8216,7 +8230,7 @@ dependencies = [ [[package]] name = "tinymemory-tools" -version = "2.0.1" +version = "2.0.2" dependencies = [ "async-lock", "async-trait", @@ -8236,7 +8250,7 @@ dependencies = [ [[package]] name = "tinyredact" -version = "2.0.1" +version = "2.0.2" dependencies = [ "log", "regex", @@ -8294,7 +8308,7 @@ dependencies = [ [[package]] name = "tinystoragedrivers" -version = "2.1.2" +version = "2.1.3" dependencies = [ "tinystoragedrivers-api", "tinystoragedrivers-blob", @@ -8308,7 +8322,7 @@ dependencies = [ [[package]] name = "tinystoragedrivers-api" -version = "2.1.2" +version = "2.1.3" dependencies = [ "async-trait", "bytes", @@ -8321,7 +8335,7 @@ dependencies = [ [[package]] name = "tinystoragedrivers-blob" -version = "2.1.2" +version = "2.1.3" dependencies = [ "async-trait", "bytes", @@ -8332,7 +8346,7 @@ dependencies = [ "object_store", "serde", "serde_json", - "sha2 0.10.9", + "sha2 0.11.1", "tinystoragedrivers-api", "tinystoragedrivers-connect", "tinystoragedrivers-types", @@ -8340,7 +8354,7 @@ dependencies = [ [[package]] name = "tinystoragedrivers-bus" -version = "2.1.2" +version = "2.1.3" dependencies = [ "serde", "serde_json", @@ -8350,7 +8364,7 @@ dependencies = [ [[package]] name = "tinystoragedrivers-busproxy" -version = "2.1.2" +version = "2.1.3" dependencies = [ "async-trait", "bytes", @@ -8367,7 +8381,7 @@ dependencies = [ [[package]] name = "tinystoragedrivers-connect" -version = "2.1.2" +version = "2.1.3" dependencies = [ "lapin", "mongodb", @@ -8382,7 +8396,7 @@ dependencies = [ [[package]] name = "tinystoragedrivers-document" -version = "2.1.2" +version = "2.1.3" dependencies = [ "async-trait", "data-encoding", @@ -8402,15 +8416,15 @@ dependencies = [ [[package]] name = "tinystoragedrivers-fence" -version = "2.1.2" +version = "2.1.3" dependencies = [ "libc", - "sysinfo", + "sysinfo 0.38.4", ] [[package]] name = "tinystoragedrivers-kv" -version = "2.1.2" +version = "2.1.3" dependencies = [ "async-trait", "futures-util", @@ -8426,7 +8440,7 @@ dependencies = [ [[package]] name = "tinystoragedrivers-queue" -version = "2.1.2" +version = "2.1.3" dependencies = [ "async-trait", "data-encoding", @@ -8443,7 +8457,7 @@ dependencies = [ [[package]] name = "tinystoragedrivers-secrets" -version = "2.1.2" +version = "2.1.3" dependencies = [ "async-trait", "atomicwrites", @@ -8468,7 +8482,7 @@ dependencies = [ [[package]] name = "tinystoragedrivers-types" -version = "2.1.2" +version = "2.1.3" dependencies = [ "serde", "serde_json", @@ -8531,7 +8545,7 @@ dependencies = [ [[package]] name = "tinywallet-bus" -version = "0.29.0" +version = "0.30.0" dependencies = [ "serde", "serde_json", @@ -9748,11 +9762,23 @@ version = "0.61.3" source = "registry+https://github.com/rust-lang/crates.io-index" checksum = "9babd3a767a4c1aef6900409f85f5d53ce2544ccdfaa86dad48c91782c6d6893" dependencies = [ - "windows-collections", + "windows-collections 0.2.0", "windows-core 0.61.2", - "windows-future", + "windows-future 0.2.1", "windows-link 0.1.3", - "windows-numerics", + "windows-numerics 0.2.0", +] + +[[package]] +name = "windows" +version = "0.62.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "527fadee13e0c05939a6a05d5bd6eec6cd2e3dbd648b9f8e447c6518133d8580" +dependencies = [ + "windows-collections 0.3.2", + "windows-core 0.62.2", + "windows-future 0.3.2", + "windows-numerics 0.3.1", ] [[package]] @@ -9764,6 +9790,15 @@ dependencies = [ "windows-core 0.61.2", ] +[[package]] +name = "windows-collections" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "23b2d95af1a8a14a3c7367e1ed4fc9c20e0a26e79551b1454d72583c97cc6610" +dependencies = [ + "windows-core 0.62.2", +] + [[package]] name = "windows-core" version = "0.57.0" @@ -9810,7 +9845,18 @@ checksum = "fc6a41e98427b19fe4b73c550f060b59fa592d7d686537eebf9385621bfbad8e" dependencies = [ "windows-core 0.61.2", "windows-link 0.1.3", - "windows-threading", + "windows-threading 0.1.0", +] + +[[package]] +name = "windows-future" +version = "0.3.2" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "e1d6f90251fe18a279739e78025bd6ddc52a7e22f921070ccdc67dde84c605cb" +dependencies = [ + "windows-core 0.62.2", + "windows-link 0.2.1", + "windows-threading 0.2.1", ] [[package]] @@ -9879,6 +9925,16 @@ dependencies = [ "windows-link 0.1.3", ] +[[package]] +name = "windows-numerics" +version = "0.3.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "6e2e40844ac143cdb44aead537bbf727de9b044e107a0f1220392177d15b0f26" +dependencies = [ + "windows-core 0.62.2", + "windows-link 0.2.1", +] + [[package]] name = "windows-permissions" version = "0.2.4" @@ -10082,6 +10138,15 @@ dependencies = [ "windows-link 0.1.3", ] +[[package]] +name = "windows-threading" +version = "0.2.1" +source = "registry+https://github.com/rust-lang/crates.io-index" +checksum = "3949bd5b99cafdf1c7ca86b43ca564028dfe27d66958f2470940f73d86d75b37" +dependencies = [ + "windows-link 0.2.1", +] + [[package]] name = "windows-version" version = "0.1.7" @@ -10721,8 +10786,8 @@ dependencies = [ [[patch.unused]] name = "tinystoragedrivers-testkit" -version = "2.1.2" +version = "2.1.3" [[patch.unused]] name = "tinystoragedrivers-testkit" -version = "2.1.2" +version = "2.1.3" diff --git a/crates/openhuman-app/Cargo.toml b/crates/openhuman-app/Cargo.toml index f38c1a456dd..637a1b64eb7 100644 --- a/crates/openhuman-app/Cargo.toml +++ b/crates/openhuman-app/Cargo.toml @@ -201,7 +201,7 @@ anyhow = "1.0" # read-only. Declared in the general table rather than under the macOS target so # `cargo check` on Linux/Windows resolves the same graph. Pinned to match the # core crate so a single bundled SQLite is linked. -rusqlite = { version = "=0.40.2", features = ["bundled"] } +rusqlite = { version = "=0.41.1", features = ["bundled"] } parking_lot = "0.12" chrono = "0.4" async-trait = "0.1" diff --git a/crates/openhuman-core/Cargo.toml b/crates/openhuman-core/Cargo.toml index 1e3f6b94f8e..ee5d2c03bb9 100644 --- a/crates/openhuman-core/Cargo.toml +++ b/crates/openhuman-core/Cargo.toml @@ -73,7 +73,7 @@ tinyflows-bus = { path = "../../vendor/tinyflows/crates/tinyflows-bus" } # `tinyagents-session` (durable session history + run ledger, previously gated # behind this crate's own `sqlite` feature — it is its own always-on crate now). # The `sqlite` feature is enabled on the harness now that openhuman's -# direct rusqlite pin is aligned to 0.40, avoiding duplicate `links = "sqlite3"` +# direct rusqlite pin is aligned to 0.41, avoiding duplicate `links = "sqlite3"` # native bindings. Durable graph checkpoints still use `SqlRunLedgerCheckpointer` # until the migration re-points those rows to the crate checkpointer. # The `repl` feature/`rhai` scripting engine no longer exists in the split crates diff --git a/crates/openhuman-core/src/modules/registry/records_docs_wallet.rs b/crates/openhuman-core/src/modules/registry/records_docs_wallet.rs index a2bbe364bcc..bde857bd77a 100644 --- a/crates/openhuman-core/src/modules/registry/records_docs_wallet.rs +++ b/crates/openhuman-core/src/modules/registry/records_docs_wallet.rs @@ -116,9 +116,11 @@ pub(crate) const TINYDOCS: ModuleRecord = ModuleRecord { /// The contract also exposes `ExportKey` for downstream hosts that must drive /// a signer locally; OpenHuman itself does not call it. /// -/// The pinned v0.29.0 release (contract 1.15) carries the native wallet, Web3, -/// and x402 bus operations, including mnemonic word-count validation and the -/// `NativeWalletTokenBalances` SPL token-balance read. Secret-bearing +/// The pinned v0.30.0 release (contract 1.16) carries the native wallet, Web3, +/// and x402 bus operations, including mnemonic word-count validation, the +/// `NativeWalletTokenBalances` SPL token-balance read, x402 `upto` (Permit2) +/// payments, the prepare-time `network` pin and the confidential +/// `X402SignIn` (Sign-In-With-X). Secret-bearing /// operations remain confidential and require both attestation and a matching /// pinned digest. pub(crate) const TINYWALLET: ModuleRecord = ModuleRecord { @@ -126,109 +128,109 @@ pub(crate) const TINYWALLET: ModuleRecord = ModuleRecord { description: "Transaction building and assembly for Bitcoin, EVM, Solana and Tron", bus_name: tinywallet_bus::names::BUS_NAME, object_path: tinywallet_bus::names::OBJECT_PATH, - version: "0.29.0", - release_url: "https://github.com/tinyhumansai/tinywallet/releases/tag/v0.29.0", + version: "0.30.0", + release_url: "https://github.com/tinyhumansai/tinywallet/releases/tag/v0.30.0", assets: &[ PlatformAsset { host_key: "archlinux-arm64", - archive: "tinywallet-module-0.29.0-archlinux-arm64.tar.gz", - sha256: "90d8cb352a9d6b6403549f053446139c0361d36354ca7c37e0bc0296eb544cae", + archive: "tinywallet-module-0.30.0-archlinux-arm64.tar.gz", + sha256: "50eb1628fe7ad96111fcdbd09aa893451f7d6e19b6d5a1b63233967c1daafb0b", library_sha256: None, }, PlatformAsset { host_key: "archlinux-x86_64", - archive: "tinywallet-module-0.29.0-archlinux-x86_64.tar.gz", - sha256: "8e9bc6e2d443807cbbb1759cb85896abbcc0d3294a0ec58007fe0c56aecb5a25", + archive: "tinywallet-module-0.30.0-archlinux-x86_64.tar.gz", + sha256: "ffa384b7fa01bb8c288353de0ad50039557d7d6d55a969f3af6fae2a65d926d9", library_sha256: None, }, PlatformAsset { host_key: "fedora-43-arm64", - archive: "tinywallet-module-0.29.0-fedora-43-arm64.tar.gz", - sha256: "71e8ec37af5be258c111169e441fed5f4a46d9b3934c477569ec1185ec7ceba5", + archive: "tinywallet-module-0.30.0-fedora-43-arm64.tar.gz", + sha256: "6da862f1055c90af4d1713ea4ecee1a4e1fe9d5172c97e7b04f07f3e6a01195b", library_sha256: None, }, PlatformAsset { host_key: "fedora-43-x86_64", - archive: "tinywallet-module-0.29.0-fedora-43-x86_64.tar.gz", - sha256: "3e7438212776adbe82a54a5c48ff744cd26ee73d0dee66bce7de42b968608a16", + archive: "tinywallet-module-0.30.0-fedora-43-x86_64.tar.gz", + sha256: "cf57707e2798a60ba6ff2174d734c9e5317fd4a5f627d5015529763f42e4f7c5", library_sha256: None, }, PlatformAsset { host_key: "fedora-44-arm64", - archive: "tinywallet-module-0.29.0-fedora-44-arm64.tar.gz", - sha256: "7612aeeca130c741b38673279268494e0cf49891dd95574e14310e64634a6840", + archive: "tinywallet-module-0.30.0-fedora-44-arm64.tar.gz", + sha256: "805d1f76005b0942255ee132a40c65417d77618e27f58f12f860485d67c3a838", library_sha256: None, }, PlatformAsset { host_key: "fedora-44-x86_64", - archive: "tinywallet-module-0.29.0-fedora-44-x86_64.tar.gz", - sha256: "9807227a79989d6c17be18212462751e244fb1b5f2bbe1224e0054b3f37cc188", + archive: "tinywallet-module-0.30.0-fedora-44-x86_64.tar.gz", + sha256: "cca69dd1c96f74a7176e7cf9ce63fa6e6871752b1c2bcbb72e1fa44b876f85c6", library_sha256: None, }, PlatformAsset { host_key: "macos-15-arm64", - archive: "tinywallet-module-0.29.0-macos-15-arm64.tar.gz", - sha256: "228b25d3ea7869436cf009bc228dc94f8f40fcf1d7ea81c622651c14b6bbc216", + archive: "tinywallet-module-0.30.0-macos-15-arm64.tar.gz", + sha256: "c11846bb1d59fc20037f93482c7f8a89ab597fcf77be8605fafd1792d2f634dd", library_sha256: None, }, PlatformAsset { host_key: "macos-15-x86_64", - archive: "tinywallet-module-0.29.0-macos-15-x86_64.tar.gz", - sha256: "0b173d7ebed6ce23c7224a55a32c9b9716471a054119b02869abc2add15dc391", + archive: "tinywallet-module-0.30.0-macos-15-x86_64.tar.gz", + sha256: "b08e40f1e3f2fa73ec8c5f3a0a7e22317723aee6663a6f4a49b5ab9260082c58", library_sha256: None, }, PlatformAsset { host_key: "macos-26-arm64", - archive: "tinywallet-module-0.29.0-macos-26-arm64.tar.gz", - sha256: "61ee2de3ca95cea7f8253de3e47f4da9ae42bd4ac406c65374aaf4cd22b742f3", + archive: "tinywallet-module-0.30.0-macos-26-arm64.tar.gz", + sha256: "8a6838b9921d44044bae77c2c711299f5ed2959d54f7417e1f88a96a7e916f9b", library_sha256: None, }, PlatformAsset { host_key: "macos-26-x86_64", - archive: "tinywallet-module-0.29.0-macos-26-x86_64.tar.gz", - sha256: "5c7593c4bb15f806a83c25dee97e26bf86a73571046d6523164885804d0c9c7d", + archive: "tinywallet-module-0.30.0-macos-26-x86_64.tar.gz", + sha256: "2368ccf882122bfce205960ea84a78ed89d2b274f8512c714f4c1ed23b5bd500", library_sha256: None, }, PlatformAsset { host_key: "ubuntu-22.04-arm64", - archive: "tinywallet-module-0.29.0-ubuntu-22.04-arm64.tar.gz", - sha256: "54085d6e1391f98fb44b86735df0f147318502153c4d3e96c5586421835cb5aa", + archive: "tinywallet-module-0.30.0-ubuntu-22.04-arm64.tar.gz", + sha256: "14dccd485fdf6679e3e5f0829cd87560aabeb230b8a340c2cd015719344c6c58", library_sha256: None, }, PlatformAsset { host_key: "ubuntu-22.04-x86_64", - archive: "tinywallet-module-0.29.0-ubuntu-22.04-x86_64.tar.gz", - sha256: "4d2016fac3c2001dae9ff152dad91057741aa6c031093b10fce4a4f3e1654045", + archive: "tinywallet-module-0.30.0-ubuntu-22.04-x86_64.tar.gz", + sha256: "06fe9666e4c839676f2ead3aa1a4b3527a2d8b499c946f632cd1cc5eda6c9dab", library_sha256: None, }, PlatformAsset { host_key: "ubuntu-24.04-arm64", - archive: "tinywallet-module-0.29.0-ubuntu-24.04-arm64.tar.gz", - sha256: "dedb29838c947d2da479c9998a38d772de875bd914eae0d0a8b81377bb7b894c", + archive: "tinywallet-module-0.30.0-ubuntu-24.04-arm64.tar.gz", + sha256: "8c4fe25c0d605c36c936f28286f2b91beeecccbf948746dffb422b59648479ad", library_sha256: None, }, PlatformAsset { host_key: "ubuntu-24.04-x86_64", - archive: "tinywallet-module-0.29.0-ubuntu-24.04-x86_64.tar.gz", - sha256: "74036ca124938a556687ff760d83fb3ad2eebb9e91a2a9cb93873a537f8e85a3", + archive: "tinywallet-module-0.30.0-ubuntu-24.04-x86_64.tar.gz", + sha256: "df654794d21da8cc3e6447e2e944fb39f127918609f7c81a49a3dddbea821e7c", library_sha256: None, }, PlatformAsset { host_key: "windows-11-arm64", - archive: "tinywallet-module-0.29.0-windows-11-arm64.zip", - sha256: "5fd451a1166e64af8f5936239f22ca88deadb6ff96058e7b9295887fa8315999", + archive: "tinywallet-module-0.30.0-windows-11-arm64.zip", + sha256: "7dacf69ed8f9b5ca02f0930f4c80d01c445661ac7a43a3440aef1714f9f670fe", library_sha256: None, }, PlatformAsset { host_key: "windows-2022-x86_64", - archive: "tinywallet-module-0.29.0-windows-2022-x86_64.zip", - sha256: "b272c66ade706b7cb3c443fbd05c549abc2ef024f044b1cdfeba19f61367db78", + archive: "tinywallet-module-0.30.0-windows-2022-x86_64.zip", + sha256: "46ebd65cb38650cc4eb697d1fc4c96e5cdea692a9e63f4be6fa7947b75f64535", library_sha256: None, }, PlatformAsset { host_key: "windows-2025-x86_64", - archive: "tinywallet-module-0.29.0-windows-2025-x86_64.zip", - sha256: "2a6b49b81af30bbe6975c7274a9c2f8cef2a3bde10a3cebae1f4c8b9c1bf5333", + archive: "tinywallet-module-0.30.0-windows-2025-x86_64.zip", + sha256: "57e32f30e61f5d0ed3f32a3b5bb072eaaf253c575cea719abe63bf7c529f506f", library_sha256: None, }, ], diff --git a/crates/openhuman-core/src/modules/registry/records_extra.rs b/crates/openhuman-core/src/modules/registry/records_extra.rs index e044b800b3b..5041760146b 100644 --- a/crates/openhuman-core/src/modules/registry/records_extra.rs +++ b/crates/openhuman-core/src/modules/registry/records_extra.rs @@ -131,109 +131,109 @@ pub(crate) const TINYCHANNELS: ModuleRecord = ModuleRecord { description: "Channel provider lifecycle and message transport", bus_name: tinychannels_bus::names::BUS_NAME, object_path: tinychannels_bus::names::OBJECT_PATH, - version: "0.2.0", - release_url: "https://github.com/tinyhumansai/tinychannels/releases/tag/v0.2.0", + version: "0.2.1", + release_url: "https://github.com/tinyhumansai/tinychannels/releases/tag/v0.2.1", assets: &[ PlatformAsset { host_key: "archlinux-arm64", - archive: "tinychannels-module-0.2.0-archlinux-arm64.tar.gz", - sha256: "07d2285c42dbeca2d70e0eb26890df533b7daab2139a8e71c71d9ec88ce819cf", + archive: "tinychannels-module-0.2.1-archlinux-arm64.tar.gz", + sha256: "2680ef5f51775adcf4d92c4cb228ed7518f8d0ec47fc93830c239569926cf98b", library_sha256: None, }, PlatformAsset { host_key: "archlinux-x86_64", - archive: "tinychannels-module-0.2.0-archlinux-x86_64.tar.gz", - sha256: "8d67e15a9c11f75cc53fab27c838308f5d622895df403f4d8ff5a37b4000411d", + archive: "tinychannels-module-0.2.1-archlinux-x86_64.tar.gz", + sha256: "e8c5d4b98f1177a589f52b88bb0087c77370db37eab8387a177a86a3dab7a577", library_sha256: None, }, PlatformAsset { host_key: "fedora-43-arm64", - archive: "tinychannels-module-0.2.0-fedora-43-arm64.tar.gz", - sha256: "82ea9f45978fa82a1ab10846b922f7a31dfd1e0d6d7e13436aec3624dce707d6", + archive: "tinychannels-module-0.2.1-fedora-43-arm64.tar.gz", + sha256: "31f1e49213391a5ef3c30d195dc18230305cd7d1096afc1a26d50b1cb1094655", library_sha256: None, }, PlatformAsset { host_key: "fedora-43-x86_64", - archive: "tinychannels-module-0.2.0-fedora-43-x86_64.tar.gz", - sha256: "a0ab5045055328e55e39568b77c1fd5dc63ea63a015fb86d0e0fbe905375b855", + archive: "tinychannels-module-0.2.1-fedora-43-x86_64.tar.gz", + sha256: "d5c8093c19347f80f371dd192b634d6d1c381098e269a8469a1fb429ef8ed112", library_sha256: None, }, PlatformAsset { host_key: "fedora-44-arm64", - archive: "tinychannels-module-0.2.0-fedora-44-arm64.tar.gz", - sha256: "0eb80bc0ba0c36694e92a2ea628f73c010b9409952d232eca4261fc9a20cd837", + archive: "tinychannels-module-0.2.1-fedora-44-arm64.tar.gz", + sha256: "c09fc5658b3db0d61a41592a0af985e01256ad1e57f4698956cd1aafbc50dbb8", library_sha256: None, }, PlatformAsset { host_key: "fedora-44-x86_64", - archive: "tinychannels-module-0.2.0-fedora-44-x86_64.tar.gz", - sha256: "a0ee9aa9d8f462ccbe60e6122fb32beb519f6e080d7ca7c19c150bff1a0e83a6", + archive: "tinychannels-module-0.2.1-fedora-44-x86_64.tar.gz", + sha256: "224047a34161dea3918918623a907214ba37243ecd86470a9edd89974f335481", library_sha256: None, }, PlatformAsset { host_key: "macos-15-arm64", - archive: "tinychannels-module-0.2.0-macos-15-arm64.tar.gz", - sha256: "846b9391cdb7e5488c6b62c5c25fbd495e1899e3db92517cb0b0be0e32de8567", + archive: "tinychannels-module-0.2.1-macos-15-arm64.tar.gz", + sha256: "a5978525dec30a0179bb25c03dbddb7b188bc383ec609879ef4be2327ce37bfa", library_sha256: None, }, PlatformAsset { host_key: "macos-15-x86_64", - archive: "tinychannels-module-0.2.0-macos-15-x86_64.tar.gz", - sha256: "88a249b5ea3d5e80eb5bc753ee8d503bf8a2b2293d2c1127ca6a5fd3015dd421", + archive: "tinychannels-module-0.2.1-macos-15-x86_64.tar.gz", + sha256: "76080dbcd6c0ff4a0c2eb591f23087bb238520658a19372ff1b5d328e15138e4", library_sha256: None, }, PlatformAsset { host_key: "macos-26-arm64", - archive: "tinychannels-module-0.2.0-macos-26-arm64.tar.gz", - sha256: "3a666957b9d4cce0ffc23e1ea2a21b6fce90d823276cca018cba04ce957bfd54", + archive: "tinychannels-module-0.2.1-macos-26-arm64.tar.gz", + sha256: "06722cfb0686534cbdbcc7a07f5613d8e4f692b7df6a4087fffd34669f8735c8", library_sha256: None, }, PlatformAsset { host_key: "macos-26-x86_64", - archive: "tinychannels-module-0.2.0-macos-26-x86_64.tar.gz", - sha256: "ef0edd5d7990398a4b97ef114e8858d53f7418dbc818c1fad949472a712a2b61", + archive: "tinychannels-module-0.2.1-macos-26-x86_64.tar.gz", + sha256: "450e65b3c2db1ad7a95bd2e9a97a90412d35808a55ca882ce2015e8683269704", library_sha256: None, }, PlatformAsset { host_key: "ubuntu-22.04-arm64", - archive: "tinychannels-module-0.2.0-ubuntu-22.04-arm64.tar.gz", - sha256: "8d947a1b283bcb538ac59f68e1fdcce07fe47d9bb59d8ea0406316c213c04b13", + archive: "tinychannels-module-0.2.1-ubuntu-22.04-arm64.tar.gz", + sha256: "aa6fccae1e6762363c205c66be620fee096afabef0adb8652e0efe50b07d40ce", library_sha256: None, }, PlatformAsset { host_key: "ubuntu-22.04-x86_64", - archive: "tinychannels-module-0.2.0-ubuntu-22.04-x86_64.tar.gz", - sha256: "92c90089eef81d7e90aeb8f2992dea706bcd91fd2cd9485004edea24eac18c0c", + archive: "tinychannels-module-0.2.1-ubuntu-22.04-x86_64.tar.gz", + sha256: "30ef63ef849ee8c7f959d1711a8f875629feb1643169ba4a1c5a6e75279ceebe", library_sha256: None, }, PlatformAsset { host_key: "ubuntu-24.04-arm64", - archive: "tinychannels-module-0.2.0-ubuntu-24.04-arm64.tar.gz", - sha256: "cd7c1522e32d0cb125fe643feea5f3602663c99a8ae96f201fc5077a2496d588", + archive: "tinychannels-module-0.2.1-ubuntu-24.04-arm64.tar.gz", + sha256: "d12dca9a9eee6bd487d45f845e9ee449f035049e8d47da1be26a2b2d5d282ad8", library_sha256: None, }, PlatformAsset { host_key: "ubuntu-24.04-x86_64", - archive: "tinychannels-module-0.2.0-ubuntu-24.04-x86_64.tar.gz", - sha256: "b4556e866c309b1792a73af48bf7297c4a2714bae25c9ef1adc22c403f25dc04", + archive: "tinychannels-module-0.2.1-ubuntu-24.04-x86_64.tar.gz", + sha256: "c22ab9d0342a7f24e37952665b8fd9ba7e51dbb11397c75f4e242bc228135a29", library_sha256: None, }, PlatformAsset { host_key: "windows-11-arm64", - archive: "tinychannels-module-0.2.0-windows-11-arm64.zip", - sha256: "3e29456cd6b161a605c9224ebaa51dbdaa3f0a4b944529cfc3a8e471bc0d5725", + archive: "tinychannels-module-0.2.1-windows-11-arm64.zip", + sha256: "ce07269fcda05f1ea4798fbf567cd26081d229c503a940981c48fbcd1d77771f", library_sha256: None, }, PlatformAsset { host_key: "windows-2022-x86_64", - archive: "tinychannels-module-0.2.0-windows-2022-x86_64.zip", - sha256: "456d7c6cd16494aff56adfa2b4b96db47abd284203e11de10fc0e9efb6f76eda", + archive: "tinychannels-module-0.2.1-windows-2022-x86_64.zip", + sha256: "03ce46d2e8e6728a531244d5e771ad26d082f490eab571079b051dc0aa323205", library_sha256: None, }, PlatformAsset { host_key: "windows-2025-x86_64", - archive: "tinychannels-module-0.2.0-windows-2025-x86_64.zip", - sha256: "427bf8719b9cd2ac874f6cc9f74a5dc49fb08c8758b62cf8a09616448cb25134", + archive: "tinychannels-module-0.2.1-windows-2025-x86_64.zip", + sha256: "fe8f9aaa89a3993df7c819a7fcdda4298c7f653116990a5355f0f726ba868d62", library_sha256: None, }, ], diff --git a/crates/openhuman-core/src/modules/registry_release_manifest_tests.rs b/crates/openhuman-core/src/modules/registry_release_manifest_tests.rs index ceb31bccaef..4c95e3f98b9 100644 --- a/crates/openhuman-core/src/modules/registry_release_manifest_tests.rs +++ b/crates/openhuman-core/src/modules/registry_release_manifest_tests.rs @@ -81,7 +81,7 @@ fn tinysecurity_registry_matches_the_published_release_manifest() { #[test] fn tinychannels_registry_matches_scoped_runtime_release() { let record = find("tinychannels").expect("compiled TinyChannels module"); - assert_eq!(record.version, "0.2.0"); + assert_eq!(record.version, "0.2.1"); assert_eq!(tinychannels_bus::CONTRACT_VERSION, 33); assert_eq!( tinychannels_bus::module_relay::MODULE_OPERATION_VERSION, @@ -90,88 +90,88 @@ fn tinychannels_registry_matches_scoped_runtime_release() { let expected = [ ( "archlinux-arm64", - "tinychannels-module-0.2.0-archlinux-arm64.tar.gz", - "07d2285c42dbeca2d70e0eb26890df533b7daab2139a8e71c71d9ec88ce819cf", + "tinychannels-module-0.2.1-archlinux-arm64.tar.gz", + "2680ef5f51775adcf4d92c4cb228ed7518f8d0ec47fc93830c239569926cf98b", ), ( "archlinux-x86_64", - "tinychannels-module-0.2.0-archlinux-x86_64.tar.gz", - "8d67e15a9c11f75cc53fab27c838308f5d622895df403f4d8ff5a37b4000411d", + "tinychannels-module-0.2.1-archlinux-x86_64.tar.gz", + "e8c5d4b98f1177a589f52b88bb0087c77370db37eab8387a177a86a3dab7a577", ), ( "fedora-43-arm64", - "tinychannels-module-0.2.0-fedora-43-arm64.tar.gz", - "82ea9f45978fa82a1ab10846b922f7a31dfd1e0d6d7e13436aec3624dce707d6", + "tinychannels-module-0.2.1-fedora-43-arm64.tar.gz", + "31f1e49213391a5ef3c30d195dc18230305cd7d1096afc1a26d50b1cb1094655", ), ( "fedora-43-x86_64", - "tinychannels-module-0.2.0-fedora-43-x86_64.tar.gz", - "a0ab5045055328e55e39568b77c1fd5dc63ea63a015fb86d0e0fbe905375b855", + "tinychannels-module-0.2.1-fedora-43-x86_64.tar.gz", + "d5c8093c19347f80f371dd192b634d6d1c381098e269a8469a1fb429ef8ed112", ), ( "fedora-44-arm64", - "tinychannels-module-0.2.0-fedora-44-arm64.tar.gz", - "0eb80bc0ba0c36694e92a2ea628f73c010b9409952d232eca4261fc9a20cd837", + "tinychannels-module-0.2.1-fedora-44-arm64.tar.gz", + "c09fc5658b3db0d61a41592a0af985e01256ad1e57f4698956cd1aafbc50dbb8", ), ( "fedora-44-x86_64", - "tinychannels-module-0.2.0-fedora-44-x86_64.tar.gz", - "a0ee9aa9d8f462ccbe60e6122fb32beb519f6e080d7ca7c19c150bff1a0e83a6", + "tinychannels-module-0.2.1-fedora-44-x86_64.tar.gz", + "224047a34161dea3918918623a907214ba37243ecd86470a9edd89974f335481", ), ( "macos-15-arm64", - "tinychannels-module-0.2.0-macos-15-arm64.tar.gz", - "846b9391cdb7e5488c6b62c5c25fbd495e1899e3db92517cb0b0be0e32de8567", + "tinychannels-module-0.2.1-macos-15-arm64.tar.gz", + "a5978525dec30a0179bb25c03dbddb7b188bc383ec609879ef4be2327ce37bfa", ), ( "macos-15-x86_64", - "tinychannels-module-0.2.0-macos-15-x86_64.tar.gz", - "88a249b5ea3d5e80eb5bc753ee8d503bf8a2b2293d2c1127ca6a5fd3015dd421", + "tinychannels-module-0.2.1-macos-15-x86_64.tar.gz", + "76080dbcd6c0ff4a0c2eb591f23087bb238520658a19372ff1b5d328e15138e4", ), ( "macos-26-arm64", - "tinychannels-module-0.2.0-macos-26-arm64.tar.gz", - "3a666957b9d4cce0ffc23e1ea2a21b6fce90d823276cca018cba04ce957bfd54", + "tinychannels-module-0.2.1-macos-26-arm64.tar.gz", + "06722cfb0686534cbdbcc7a07f5613d8e4f692b7df6a4087fffd34669f8735c8", ), ( "macos-26-x86_64", - "tinychannels-module-0.2.0-macos-26-x86_64.tar.gz", - "ef0edd5d7990398a4b97ef114e8858d53f7418dbc818c1fad949472a712a2b61", + "tinychannels-module-0.2.1-macos-26-x86_64.tar.gz", + "450e65b3c2db1ad7a95bd2e9a97a90412d35808a55ca882ce2015e8683269704", ), ( "ubuntu-22.04-arm64", - "tinychannels-module-0.2.0-ubuntu-22.04-arm64.tar.gz", - "8d947a1b283bcb538ac59f68e1fdcce07fe47d9bb59d8ea0406316c213c04b13", + "tinychannels-module-0.2.1-ubuntu-22.04-arm64.tar.gz", + "aa6fccae1e6762363c205c66be620fee096afabef0adb8652e0efe50b07d40ce", ), ( "ubuntu-22.04-x86_64", - "tinychannels-module-0.2.0-ubuntu-22.04-x86_64.tar.gz", - "92c90089eef81d7e90aeb8f2992dea706bcd91fd2cd9485004edea24eac18c0c", + "tinychannels-module-0.2.1-ubuntu-22.04-x86_64.tar.gz", + "30ef63ef849ee8c7f959d1711a8f875629feb1643169ba4a1c5a6e75279ceebe", ), ( "ubuntu-24.04-arm64", - "tinychannels-module-0.2.0-ubuntu-24.04-arm64.tar.gz", - "cd7c1522e32d0cb125fe643feea5f3602663c99a8ae96f201fc5077a2496d588", + "tinychannels-module-0.2.1-ubuntu-24.04-arm64.tar.gz", + "d12dca9a9eee6bd487d45f845e9ee449f035049e8d47da1be26a2b2d5d282ad8", ), ( "ubuntu-24.04-x86_64", - "tinychannels-module-0.2.0-ubuntu-24.04-x86_64.tar.gz", - "b4556e866c309b1792a73af48bf7297c4a2714bae25c9ef1adc22c403f25dc04", + "tinychannels-module-0.2.1-ubuntu-24.04-x86_64.tar.gz", + "c22ab9d0342a7f24e37952665b8fd9ba7e51dbb11397c75f4e242bc228135a29", ), ( "windows-11-arm64", - "tinychannels-module-0.2.0-windows-11-arm64.zip", - "3e29456cd6b161a605c9224ebaa51dbdaa3f0a4b944529cfc3a8e471bc0d5725", + "tinychannels-module-0.2.1-windows-11-arm64.zip", + "ce07269fcda05f1ea4798fbf567cd26081d229c503a940981c48fbcd1d77771f", ), ( "windows-2022-x86_64", - "tinychannels-module-0.2.0-windows-2022-x86_64.zip", - "456d7c6cd16494aff56adfa2b4b96db47abd284203e11de10fc0e9efb6f76eda", + "tinychannels-module-0.2.1-windows-2022-x86_64.zip", + "03ce46d2e8e6728a531244d5e771ad26d082f490eab571079b051dc0aa323205", ), ( "windows-2025-x86_64", - "tinychannels-module-0.2.0-windows-2025-x86_64.zip", - "427bf8719b9cd2ac874f6cc9f74a5dc49fb08c8758b62cf8a09616448cb25134", + "tinychannels-module-0.2.1-windows-2025-x86_64.zip", + "fe8f9aaa89a3993df7c819a7fcdda4298c7f653116990a5355f0f726ba868d62", ), ]; assert_eq!(record.assets.len(), expected.len()); diff --git a/crates/openhuman-core/src/modules/registry_tests.rs b/crates/openhuman-core/src/modules/registry_tests.rs index 6923c156c5e..f7ad1247441 100644 --- a/crates/openhuman-core/src/modules/registry_tests.rs +++ b/crates/openhuman-core/src/modules/registry_tests.rs @@ -9,14 +9,14 @@ mod release_manifest_tests; #[test] #[cfg(feature = "web3")] -fn tinywallet_registry_matches_the_verified_v0290_release_manifest() { +fn tinywallet_registry_matches_the_verified_v0300_release_manifest() { let wallet = find("tinywallet").expect("compiled TinyWallet module"); - assert_eq!(wallet.version, "0.29.0"); + assert_eq!(wallet.version, "0.30.0"); #[cfg(feature = "web3")] - assert_eq!(tinywallet_bus::CONTRACT_VERSION, (1, 15)); + assert_eq!(tinywallet_bus::CONTRACT_VERSION, (1, 16)); assert_eq!( wallet.release_url, - "https://github.com/tinyhumansai/tinywallet/releases/tag/v0.29.0" + "https://github.com/tinyhumansai/tinywallet/releases/tag/v0.30.0" ); let mut actual = wallet @@ -28,88 +28,88 @@ fn tinywallet_registry_matches_the_verified_v0290_release_manifest() { let mut published = [ ( "archlinux-arm64", - "tinywallet-module-0.29.0-archlinux-arm64.tar.gz", - "90d8cb352a9d6b6403549f053446139c0361d36354ca7c37e0bc0296eb544cae", + "tinywallet-module-0.30.0-archlinux-arm64.tar.gz", + "50eb1628fe7ad96111fcdbd09aa893451f7d6e19b6d5a1b63233967c1daafb0b", ), ( "archlinux-x86_64", - "tinywallet-module-0.29.0-archlinux-x86_64.tar.gz", - "8e9bc6e2d443807cbbb1759cb85896abbcc0d3294a0ec58007fe0c56aecb5a25", + "tinywallet-module-0.30.0-archlinux-x86_64.tar.gz", + "ffa384b7fa01bb8c288353de0ad50039557d7d6d55a969f3af6fae2a65d926d9", ), ( "fedora-43-arm64", - "tinywallet-module-0.29.0-fedora-43-arm64.tar.gz", - "71e8ec37af5be258c111169e441fed5f4a46d9b3934c477569ec1185ec7ceba5", + "tinywallet-module-0.30.0-fedora-43-arm64.tar.gz", + "6da862f1055c90af4d1713ea4ecee1a4e1fe9d5172c97e7b04f07f3e6a01195b", ), ( "fedora-43-x86_64", - "tinywallet-module-0.29.0-fedora-43-x86_64.tar.gz", - "3e7438212776adbe82a54a5c48ff744cd26ee73d0dee66bce7de42b968608a16", + "tinywallet-module-0.30.0-fedora-43-x86_64.tar.gz", + "cf57707e2798a60ba6ff2174d734c9e5317fd4a5f627d5015529763f42e4f7c5", ), ( "fedora-44-arm64", - "tinywallet-module-0.29.0-fedora-44-arm64.tar.gz", - "7612aeeca130c741b38673279268494e0cf49891dd95574e14310e64634a6840", + "tinywallet-module-0.30.0-fedora-44-arm64.tar.gz", + "805d1f76005b0942255ee132a40c65417d77618e27f58f12f860485d67c3a838", ), ( "fedora-44-x86_64", - "tinywallet-module-0.29.0-fedora-44-x86_64.tar.gz", - "9807227a79989d6c17be18212462751e244fb1b5f2bbe1224e0054b3f37cc188", + "tinywallet-module-0.30.0-fedora-44-x86_64.tar.gz", + "cca69dd1c96f74a7176e7cf9ce63fa6e6871752b1c2bcbb72e1fa44b876f85c6", ), ( "macos-15-arm64", - "tinywallet-module-0.29.0-macos-15-arm64.tar.gz", - "228b25d3ea7869436cf009bc228dc94f8f40fcf1d7ea81c622651c14b6bbc216", + "tinywallet-module-0.30.0-macos-15-arm64.tar.gz", + "c11846bb1d59fc20037f93482c7f8a89ab597fcf77be8605fafd1792d2f634dd", ), ( "macos-15-x86_64", - "tinywallet-module-0.29.0-macos-15-x86_64.tar.gz", - "0b173d7ebed6ce23c7224a55a32c9b9716471a054119b02869abc2add15dc391", + "tinywallet-module-0.30.0-macos-15-x86_64.tar.gz", + "b08e40f1e3f2fa73ec8c5f3a0a7e22317723aee6663a6f4a49b5ab9260082c58", ), ( "macos-26-arm64", - "tinywallet-module-0.29.0-macos-26-arm64.tar.gz", - "61ee2de3ca95cea7f8253de3e47f4da9ae42bd4ac406c65374aaf4cd22b742f3", + "tinywallet-module-0.30.0-macos-26-arm64.tar.gz", + "8a6838b9921d44044bae77c2c711299f5ed2959d54f7417e1f88a96a7e916f9b", ), ( "macos-26-x86_64", - "tinywallet-module-0.29.0-macos-26-x86_64.tar.gz", - "5c7593c4bb15f806a83c25dee97e26bf86a73571046d6523164885804d0c9c7d", + "tinywallet-module-0.30.0-macos-26-x86_64.tar.gz", + "2368ccf882122bfce205960ea84a78ed89d2b274f8512c714f4c1ed23b5bd500", ), ( "ubuntu-22.04-arm64", - "tinywallet-module-0.29.0-ubuntu-22.04-arm64.tar.gz", - "54085d6e1391f98fb44b86735df0f147318502153c4d3e96c5586421835cb5aa", + "tinywallet-module-0.30.0-ubuntu-22.04-arm64.tar.gz", + "14dccd485fdf6679e3e5f0829cd87560aabeb230b8a340c2cd015719344c6c58", ), ( "ubuntu-22.04-x86_64", - "tinywallet-module-0.29.0-ubuntu-22.04-x86_64.tar.gz", - "4d2016fac3c2001dae9ff152dad91057741aa6c031093b10fce4a4f3e1654045", + "tinywallet-module-0.30.0-ubuntu-22.04-x86_64.tar.gz", + "06fe9666e4c839676f2ead3aa1a4b3527a2d8b499c946f632cd1cc5eda6c9dab", ), ( "ubuntu-24.04-arm64", - "tinywallet-module-0.29.0-ubuntu-24.04-arm64.tar.gz", - "dedb29838c947d2da479c9998a38d772de875bd914eae0d0a8b81377bb7b894c", + "tinywallet-module-0.30.0-ubuntu-24.04-arm64.tar.gz", + "8c4fe25c0d605c36c936f28286f2b91beeecccbf948746dffb422b59648479ad", ), ( "ubuntu-24.04-x86_64", - "tinywallet-module-0.29.0-ubuntu-24.04-x86_64.tar.gz", - "74036ca124938a556687ff760d83fb3ad2eebb9e91a2a9cb93873a537f8e85a3", + "tinywallet-module-0.30.0-ubuntu-24.04-x86_64.tar.gz", + "df654794d21da8cc3e6447e2e944fb39f127918609f7c81a49a3dddbea821e7c", ), ( "windows-11-arm64", - "tinywallet-module-0.29.0-windows-11-arm64.zip", - "5fd451a1166e64af8f5936239f22ca88deadb6ff96058e7b9295887fa8315999", + "tinywallet-module-0.30.0-windows-11-arm64.zip", + "7dacf69ed8f9b5ca02f0930f4c80d01c445661ac7a43a3440aef1714f9f670fe", ), ( "windows-2022-x86_64", - "tinywallet-module-0.29.0-windows-2022-x86_64.zip", - "b272c66ade706b7cb3c443fbd05c549abc2ef024f044b1cdfeba19f61367db78", + "tinywallet-module-0.30.0-windows-2022-x86_64.zip", + "46ebd65cb38650cc4eb697d1fc4c96e5cdea692a9e63f4be6fa7947b75f64535", ), ( "windows-2025-x86_64", - "tinywallet-module-0.29.0-windows-2025-x86_64.zip", - "2a6b49b81af30bbe6975c7274a9c2f8cef2a3bde10a3cebae1f4c8b9c1bf5333", + "tinywallet-module-0.30.0-windows-2025-x86_64.zip", + "57e32f30e61f5d0ed3f32a3b5bb072eaaf253c575cea719abe63bf7c529f506f", ), ]; actual.sort_unstable(); diff --git a/crates/openhuman-core/src/modules/wallet.rs b/crates/openhuman-core/src/modules/wallet.rs index ad9da5490f7..719a4bc30b3 100644 --- a/crates/openhuman-core/src/modules/wallet.rs +++ b/crates/openhuman-core/src/modules/wallet.rs @@ -378,93 +378,93 @@ async fn attested_proxy(config: &Config) -> Result) -> AuthorizeX402P asset: "4zMMC9srt5Ri5X14GAgXhaHii3GnPAEERYPJgZJDncDU".into(), recipient: "HAgk14JpMQLgt6rVgv7cBQFJWFto5Dqxi472uT3DKpqk".into(), amount_atomic, + scheme: None, owner, } } diff --git a/crates/openhuman-core/src/modules/wallet_tests.rs b/crates/openhuman-core/src/modules/wallet_tests.rs index 73b0eab1f9b..79f52da6a0e 100644 --- a/crates/openhuman-core/src/modules/wallet_tests.rs +++ b/crates/openhuman-core/src/modules/wallet_tests.rs @@ -177,13 +177,15 @@ mod attestation_guard { fn the_current_attested_linux_release_library_is_accepted() { assert!(digest_is_pinned( record(), - "ca77309f2d5cdb6d13e56cb7fc44145507a333f55c6a31729979a2782a4ab3ae" + "52cf86da7e6b83e3ec79e77fcfea71a7f47628b3e534aa99e33f0c78bd50bb4a" )); } #[test] fn libraries_from_retired_releases_are_refused() { for digest in [ + // v0.29.0, retired by the v0.30.0 pin + "ca77309f2d5cdb6d13e56cb7fc44145507a333f55c6a31729979a2782a4ab3ae", "06ebfd294c3e815e4fca25df608e2b37f9bfb493b74687562f93b9bd34d52760", "d2e663e465c6c245cbf9b37c037ae655db7df0f93a0df9b7fa17a28027ebaa9d", "2bd70433707c44dbfe6b3cc3b4cc835299fe951fcb375b49c940d8d3fc1d4061", @@ -203,7 +205,7 @@ mod attestation_guard { assets: &[], ..*record() }; - let current_library = "ca77309f2d5cdb6d13e56cb7fc44145507a333f55c6a31729979a2782a4ab3ae"; + let current_library = "52cf86da7e6b83e3ec79e77fcfea71a7f47628b3e534aa99e33f0c78bd50bb4a"; assert!(digest_is_pinned(record(), current_library)); assert!(!digest_is_pinned(&unpinned_record, current_library)); } diff --git a/crates/openhuman-core/src/modules/x402_service.rs b/crates/openhuman-core/src/modules/x402_service.rs index f67d7756cf8..2c724184022 100644 --- a/crates/openhuman-core/src/modules/x402_service.rs +++ b/crates/openhuman-core/src/modules/x402_service.rs @@ -30,7 +30,7 @@ pub(crate) async fn prepare_payment( payment_required: String, owner: Option, ) -> Result<(X402ServiceHandle, X402PreparePaymentResponse), WalletCallError> { - prepare(ctx, config, url, payment_required, owner, None) + prepare(ctx, config, url, payment_required, owner, None, None) .await .0 } @@ -47,6 +47,7 @@ pub(crate) async fn prepare_capped_payment( url: String, payment_required: String, max_amount_atomic: u64, + network: Option, ) -> ( Result<(X402ServiceHandle, X402PreparePaymentResponse), WalletCallError>, X402RpcPermitOutcome, @@ -58,10 +59,32 @@ pub(crate) async fn prepare_capped_payment( payment_required, None, Some(max_amount_atomic), + network, ) .await } +/// Answer a Sign-In-With-X (CAIP-122) challenge with the wallet's EVM key. +/// TinyWallet builds and signs the message itself and refuses a challenge +/// whose domain or URI is not the requested URL's host, so this is never a +/// sign-anything primitive. Pays nothing and reserves no budget. +pub(crate) async fn sign_in( + ctx: &DispatchCtx, + config: &Config, + url: String, + payment_required: String, +) -> Result { + let secret = signing_secret(ctx, config, crate::web3::wallet::WalletChain::Evm).await?; + let mut request = tinywallet_bus::wire::X402SignInRequest { + url, + payment_required, + secret, + }; + let response = wallet::call_confidential(config, methods::X402_SIGN_IN, &request).await; + request.secret.mnemonic.zeroize(); + response +} + async fn prepare( ctx: &DispatchCtx, config: &Config, @@ -69,6 +92,7 @@ async fn prepare( payment_required: String, owner: Option, rpc_cap: Option, + network: Option, ) -> ( Result<(X402ServiceHandle, X402PreparePaymentResponse), WalletCallError>, X402RpcPermitOutcome, @@ -103,6 +127,7 @@ async fn prepare( owner, secret: evm, additional_secrets: vec![solana], + network, }; let call = wallet::call_confidential(config, methods::X402_PREPARE_PAYMENT, &request); let (response, outcome) = match rpc_cap { diff --git a/crates/openhuman-core/src/platform/about_app/catalog_workflows_automation.rs b/crates/openhuman-core/src/platform/about_app/catalog_workflows_automation.rs index 882b8d65718..58e621005ce 100644 --- a/crates/openhuman-core/src/platform/about_app/catalog_workflows_automation.rs +++ b/crates/openhuman-core/src/platform/about_app/catalog_workflows_automation.rs @@ -207,8 +207,8 @@ Capability { name: "x402 Machine Payments", domain: "x402", category: CapabilityCategory::Workflows, - description: "Automatic HTTP 402 payment handling for machine-payable APIs via the x402 protocol. When an API returns 402 Payment Required, the agent pays with USDC on Solana using the local wallet and retries. Budget enforcement with per-request, daily, and monthly caps; automated turns (background jobs, approval-free workflows) pay within the budget without a prompt.", - how_to: "Use x402.* RPC methods (get_summary, list_payments, update_budget) to manage spending. Payments happen automatically when the http_request tool encounters a 402 with a PAYMENT-REQUIRED header; a local caller can make one paid HTTPS request with x402.fetch and an explicit maxAmountAtomic cap.", + description: "Automatic HTTP 402 payment handling for machine-payable APIs via the x402 protocol. When an API returns 402 Payment Required, the agent pays with USDC (Solana, or EVM chains such as Base, including the upto scheme that settles only what was used) from the local wallet and retries. Budget enforcement with per-request, daily, and monthly caps; automated turns (background jobs, approval-free workflows) pay within the budget without a prompt.", + how_to: "Use x402.* RPC methods (get_summary, list_payments, update_budget) to manage spending. Payments happen automatically when the http_request tool encounters a 402 with a PAYMENT-REQUIRED header; a local caller can make one paid HTTPS request with x402.fetch and an explicit maxAmountAtomic cap, pin the payment to one network with network (e.g. eip155:8453), or set signIn to answer the 402 with a Sign-In-With-X wallet signature that pays nothing.", status: CapabilityStatus::Beta, privacy: LOCAL_CREDENTIALS, }, diff --git a/crates/openhuman-core/src/web3/x402/README.md b/crates/openhuman-core/src/web3/x402/README.md index 71e9a5394bf..3a656a2cbe3 100644 --- a/crates/openhuman-core/src/web3/x402/README.md +++ b/crates/openhuman-core/src/web3/x402/README.md @@ -52,8 +52,25 @@ that has no agent turn to approve a payment through. Params: `url` (required, `https://` only; local and private hosts are refused by the `http_request` URL guard, including names that resolve to them), `method` (`GET` default, or `POST`), `headers` (string map; `PAYMENT-SIGNATURE` -and `X-PAYMENT` are refused), `body` (string, `POST` only), and -`maxAmountAtomic` (required, greater than zero: the most this request may pay). +`X-PAYMENT` and `SIGN-IN-WITH-X` are refused), `body` (string, `POST` only), +`maxAmountAtomic` (required, greater than zero: the most this request may +pay), `network` (optional: a CAIP-2 id such as `eip155:8453`, or a namespace +such as `eip155` or `solana`; TinyWallet pays only an option on that network +and refuses a challenge with none), and `signIn` (optional, default false). + +With `signIn: true` a 402 is answered with a Sign-In-With-X (CAIP-122) +credential instead of a payment: TinyWallet's `X402SignIn` builds and signs +the message with the EVM key and refuses a challenge whose domain or URI is +not the requested host, so this never signs arbitrary text. The host retries +once with the `SIGN-IN-WITH-X` header. Nothing is paid: the response has +`payment: null` and `signedInAs` (the signing address). This is for a +service's free, wallet-identified endpoints (for example twitr.sh's account +linking), where the wallet is the account. + +An `upto` challenge (x402's metered scheme, Permit2 on EVM) is paid like an +`exact` one: `maxAmountAtomic` and the per-request budget are compared with +the signed maximum, and the module ledger records the amount the +settlement receipt reports, which may be lower or zero. The request runs with a 30 s timeout, no redirects, and connections pinned to the vetted addresses; the privacy mode's egress check applies. A response other diff --git a/crates/openhuman-core/src/web3/x402/fetch.rs b/crates/openhuman-core/src/web3/x402/fetch.rs index c5cdbacc8a9..6949393e9d5 100644 --- a/crates/openhuman-core/src/web3/x402/fetch.rs +++ b/crates/openhuman-core/src/web3/x402/fetch.rs @@ -33,8 +33,13 @@ const REQUEST_TIMEOUT: Duration = Duration::from_secs(30); const CONNECT_TIMEOUT: Duration = Duration::from_secs(10); const PROXY_SERVICE: &str = "rpc.x402_fetch"; const USER_AGENT: &str = concat!("OpenHuman/", env!("CARGO_PKG_VERSION")); -/// Headers that carry an x402 payment; only the module may produce them. -const PAYMENT_HEADERS: [&str; 2] = ["PAYMENT-SIGNATURE", "X-PAYMENT"]; +/// Headers that carry an x402 payment or sign-in; only the module may +/// produce them. +const PAYMENT_HEADERS: [&str; 3] = ["PAYMENT-SIGNATURE", "X-PAYMENT", SIGN_IN_HEADER]; +/// The Sign-In-With-X (CAIP-122) credential header of x402's sign-in extension. +const SIGN_IN_HEADER: &str = "SIGN-IN-WITH-X"; +/// Longest accepted `network` pin: a CAIP-2 id is at most 41 characters. +const MAX_NETWORK_LEN: usize = 64; #[derive(Debug)] pub(super) struct FetchParams { @@ -43,6 +48,12 @@ pub(super) struct FetchParams { pub(super) headers: Vec<(String, String)>, pub(super) body: Option, pub(super) max_amount_atomic: u64, + /// Restricts the payment to one CAIP-2 network (`eip155:8453`) or a + /// family (`eip155`, `solana`); TinyWallet refuses a challenge with no + /// matching option. + pub(super) network: Option, + /// Answer a 402 with a Sign-In-With-X credential instead of a payment. + pub(super) sign_in: bool, } #[derive(Deserialize)] @@ -56,6 +67,23 @@ struct RawFetchParams { #[serde(default)] body: Option, max_amount_atomic: u64, + #[serde(default)] + network: Option, + #[serde(default)] + sign_in: Option, +} + +/// A `network` pin is a CAIP-2 id or a bare namespace: ASCII letters, +/// digits, `-`, `_` and at most one `:`. +fn valid_network(network: &str) -> bool { + !network.is_empty() + && network.len() <= MAX_NETWORK_LEN + && network.matches(':').count() <= 1 + && !network.starts_with(':') + && !network.ends_with(':') + && network + .chars() + .all(|c| c.is_ascii_alphanumeric() || matches!(c, ':' | '-' | '_')) } /// Validate the caller's request before anything leaves the device. @@ -112,12 +140,25 @@ pub(super) fn parse_params(params: Map) -> Result None, + Some(network) if valid_network(network) => Some(network.to_owned()), + Some(_) => { + return Err( + "x402_fetch params: network must be a CAIP-2 id (eip155:8453) or a namespace (eip155, solana)" + .into(), + ) + } + }; + Ok(FetchParams { url: raw.url.trim().to_owned(), method, headers, body: raw.body, max_amount_atomic: raw.max_amount_atomic, + network, + sign_in: raw.sign_in.unwrap_or(false), }) } @@ -236,7 +277,7 @@ pub(super) fn response_value( async fn send( target: &ValidatedUrl, params: &FetchParams, - payment_header: Option<&str>, + credential: Option<(&str, &str)>, ) -> Result { let builder = reqwest::Client::builder() .timeout(REQUEST_TIMEOUT) @@ -252,8 +293,8 @@ async fn send( for (name, value) in ¶ms.headers { request = request.header(name, value); } - if let Some(payment_header) = payment_header { - request = request.header("PAYMENT-SIGNATURE", payment_header); + if let Some((name, value)) = credential { + request = request.header(name, value); } if let Some(body) = ¶ms.body { request = request.body(body.clone()); @@ -362,12 +403,17 @@ pub(super) async fn fetch(ctx: DispatchCtx, params: Map) -> Resul )); } + if params.sign_in { + return sign_in_and_retry(&ctx, &config, &target, ¶ms, challenge).await; + } + let (prepared, outcome) = x402_service::prepare_capped_payment( &ctx, &config, target.url.clone(), challenge, params.max_amount_atomic, + params.network.clone(), ) .await; let (service, payment) = prepared.map_err(|error| prepare_error(outcome, error))?; @@ -402,7 +448,13 @@ pub(super) async fn fetch(ctx: DispatchCtx, params: Map) -> Resul payment.amount_atomic, payment.asset ); - let retry = match send(&target, ¶ms, Some(&payment.payment_header)).await { + let retry = match send( + &target, + ¶ms, + Some(("PAYMENT-SIGNATURE", payment.payment_header.as_str())), + ) + .await + { Ok(retry) => retry, Err(error) => { // No response: the module cannot tell whether the proof settled. @@ -438,6 +490,45 @@ pub(super) async fn fetch(ctx: DispatchCtx, params: Map) -> Resul .await } +/// `signIn`: answer the 402 with a Sign-In-With-X credential and retry once. +/// Nothing is paid: a challenge that asks for payment rather than sign-in is +/// refused by TinyWallet, and the response is returned with `payment: null` +/// and `signedInAs` naming the account. +async fn sign_in_and_retry( + ctx: &DispatchCtx, + config: &crate::config::Config, + target: &ValidatedUrl, + params: &FetchParams, + challenge: String, +) -> Result { + let signed = x402_service::sign_in(ctx, config, target.url.clone(), challenge) + .await + .map_err(|error| format!("x402_fetch: sign-in failed: {error}"))?; + log::debug!( + "[x402_fetch] retrying with sign-in host={} chain={}", + target.host, + signed.chain_id + ); + let retry = send( + target, + params, + Some((SIGN_IN_HEADER, signed.header.as_str())), + ) + .await?; + Ok(with_signed_in_as( + into_value(retry, None).await?, + signed.address, + )) +} + +/// Adds the signed-in wallet address to a sign-in retry's response. +fn with_signed_in_as(mut value: Value, address: String) -> Value { + if let Some(object) = value.as_object_mut() { + object.insert("signedInAs".into(), Value::String(address)); + } + value +} + #[cfg(test)] #[path = "fetch_tests.rs"] mod tests; diff --git a/crates/openhuman-core/src/web3/x402/fetch_tests.rs b/crates/openhuman-core/src/web3/x402/fetch_tests.rs index 626a44ece60..423bade9ee0 100644 --- a/crates/openhuman-core/src/web3/x402/fetch_tests.rs +++ b/crates/openhuman-core/src/web3/x402/fetch_tests.rs @@ -17,6 +17,55 @@ fn params_default_to_get_with_no_headers_or_body() { assert!(parsed.headers.is_empty()); assert_eq!(parsed.body, None); assert_eq!(parsed.max_amount_atomic, 2500); + assert_eq!(parsed.network, None); + assert!(!parsed.sign_in); +} + +#[test] +fn params_accept_a_network_pin_and_sign_in() { + for network in [ + "eip155:8453", + "eip155", + "solana", + "solana:5eykt4UsFv8P8NJdTREpY1vzqKqZKvdp", + ] { + let parsed = parse_params(params(json!({ + "url": "https://api.example.test/resource", + "maxAmountAtomic": 1, + "network": network, + "signIn": true, + }))) + .expect("valid params"); + assert_eq!(parsed.network.as_deref(), Some(network)); + assert!(parsed.sign_in); + } + let blank = parse_params(params(json!({ + "url": "https://api.example.test/resource", + "maxAmountAtomic": 1, + "network": " ", + }))) + .expect("a blank pin is no pin"); + assert_eq!(blank.network, None); +} + +#[test] +fn params_reject_a_malformed_network_pin() { + for network in [ + "eip155:8453:1", + ":8453", + "eip155:", + "eip 155", + "eip155;drop", + &"a".repeat(65), + ] { + let error = parse_params(params(json!({ + "url": "https://api.example.test/resource", + "maxAmountAtomic": 1, + "network": network, + }))) + .expect_err("malformed network is refused"); + assert!(error.contains("network"), "{error}"); + } } #[test] @@ -79,6 +128,8 @@ fn params_reject_caller_supplied_payment_headers() { "payment-signature", "X-PAYMENT", "x-Payment", + "SIGN-IN-WITH-X", + "sign-in-with-x", ] { let error = parse_params(params(json!({ "url": "https://api.example.test/resource", @@ -242,3 +293,104 @@ fn the_payment_amount_must_not_exceed_the_caller_cap() { let error = ensure_within_cap(2501, 2500).expect_err("over cap"); assert!(error.starts_with(REFUSED_PREFIX), "{error}"); } + +fn loopback_target(server: &wiremock::MockServer, path: &str) -> ValidatedUrl { + ValidatedUrl { + url: format!("{}{path}", server.uri()), + host: "127.0.0.1".into(), + addrs: vec![*server.address()], + } +} + +#[tokio::test] +async fn the_sign_in_retry_adds_the_credential_and_keeps_the_post() { + use wiremock::matchers::{body_string, header, method, path}; + use wiremock::{Mock, MockServer, ResponseTemplate}; + + let server = MockServer::start().await; + Mock::given(method("POST")) + .and(path("/api/x-accounts/start")) + .and(header(SIGN_IN_HEADER, "siwx-credential")) + .and(header("Idempotency-Key", "k1")) + .and(body_string(r#"{"username":"teeny"}"#)) + .respond_with(ResponseTemplate::new(200).set_body_string("ok")) + .expect(1) + .mount(&server) + .await; + let params = FetchParams { + url: String::new(), + method: reqwest::Method::POST, + headers: vec![("Idempotency-Key".into(), "k1".into())], + body: Some(r#"{"username":"teeny"}"#.into()), + max_amount_atomic: 1, + network: None, + sign_in: true, + }; + let target = loopback_target(&server, "/api/x-accounts/start"); + + let response = send(&target, ¶ms, Some((SIGN_IN_HEADER, "siwx-credential"))) + .await + .expect("the retry reaches the server"); + assert_eq!(response.status(), 200); +} + +#[tokio::test] +async fn the_first_attempt_carries_no_sign_in_credential() { + use wiremock::{Mock, MockServer, ResponseTemplate}; + + let server = MockServer::start().await; + Mock::given(wiremock::matchers::any()) + .respond_with(ResponseTemplate::new(204)) + .mount(&server) + .await; + let params = parse_params(params(json!({ + "url": "https://twitr.test/x", "maxAmountAtomic": 1, "signIn": true + }))) + .expect("params"); + send(&loopback_target(&server, "/x"), ¶ms, None) + .await + .expect("sent"); + let requests = server.received_requests().await.unwrap(); + assert_eq!(requests.len(), 1); + assert!(!requests[0].headers.contains_key(SIGN_IN_HEADER)); +} + +#[test] +fn a_signed_in_response_matches_the_declared_fetch_outputs() { + let value = with_signed_in_as( + response_value( + 200, + Some("application/json".into()), + "{}".into(), + false, + None, + ), + "0x0000000000000000000000000000000000000001".into(), + ); + let declared = super::super::schemas::schemas("fetch").outputs; + let object = value.as_object().expect("object response"); + for key in object.keys() { + assert!( + declared.iter().any(|field| field.name == key), + "response key {key} is not declared in x402.fetch outputs" + ); + } + assert_eq!( + object["signedInAs"], + "0x0000000000000000000000000000000000000001" + ); + assert_eq!(object["payment"], Value::Null); +} + +#[test] +fn params_treat_a_null_sign_in_and_network_as_unset() { + let parsed = parse_params(params(json!({ + "url": "https://api.example.test/resource", + "maxAmountAtomic": 2500, + "signIn": null, + "network": null, + }))) + .expect("null optionals are accepted, as the schema advertises"); + assert!(!parsed.sign_in); + assert_eq!(parsed.network, None); +} diff --git a/crates/openhuman-core/src/web3/x402/schemas.rs b/crates/openhuman-core/src/web3/x402/schemas.rs index 4c8707ea767..453107a0476 100644 --- a/crates/openhuman-core/src/web3/x402/schemas.rs +++ b/crates/openhuman-core/src/web3/x402/schemas.rs @@ -152,6 +152,18 @@ pub fn schemas(function: &str) -> ControllerSchema { comment: "Most this request may pay, in token atomic units.", required: true, }, + FieldSchema { + name: "network", + ty: TypeSchema::Option(Box::new(TypeSchema::String)), + comment: "Pay only on this CAIP-2 network (eip155:8453) or family (eip155, solana).", + required: false, + }, + FieldSchema { + name: "signIn", + ty: TypeSchema::Option(Box::new(TypeSchema::Bool)), + comment: "Answer the 402 with a Sign-In-With-X credential instead of a payment.", + required: false, + }, ], outputs: vec![ FieldSchema { @@ -184,6 +196,12 @@ pub fn schemas(function: &str) -> ControllerSchema { comment: "Null when unpaid, else paymentId, amountAtomic, asset, recipient, network, settled and settlementResponse.", required: true, }, + FieldSchema { + name: "signedInAs", + ty: TypeSchema::Option(Box::new(TypeSchema::String)), + comment: "With signIn, the wallet address the Sign-In-With-X credential named.", + required: false, + }, ], }, other => panic!("unknown x402 schema function: {other}"), diff --git a/crates/openhuman-core/src/web3/x402/schemas_tests.rs b/crates/openhuman-core/src/web3/x402/schemas_tests.rs index ed0c8e70ec1..4228f7bf600 100644 --- a/crates/openhuman-core/src/web3/x402/schemas_tests.rs +++ b/crates/openhuman-core/src/web3/x402/schemas_tests.rs @@ -126,3 +126,22 @@ fn update_budget_reads_every_input_the_schema_declares() { assert_eq!(parsed.daily_max, Some(200)); assert_eq!(parsed.monthly_max, Some(300)); } + +#[test] +fn fetch_schema_admits_the_network_pin_and_sign_in() { + let params = json!({ + "url": "https://api.example.test/tools/x_read", + "method": "POST", + "maxAmountAtomic": 2_400, + "network": "eip155:8453", + "signIn": true, + }); + crate::core::all::validate_params(&schemas("fetch"), params.as_object().unwrap()) + .expect("x402.fetch declares network and signIn"); + + let wrong = json!({"url": "https://a.test", "maxAmountAtomic": 1, "signIn": "yes"}); + assert!( + crate::core::all::validate_params(&schemas("fetch"), wrong.as_object().unwrap()).is_err(), + "signIn is a bool" + ); +} diff --git a/vendor/tinychannels b/vendor/tinychannels index 6cbdcdba7b5..a1d0cfffc8c 160000 --- a/vendor/tinychannels +++ b/vendor/tinychannels @@ -1 +1 @@ -Subproject commit 6cbdcdba7b57452cdf6ce9bb4e9b6cc5a95b8740 +Subproject commit a1d0cfffc8c8cad263d66bce8e361f1da6d1752c diff --git a/vendor/tinymemory b/vendor/tinymemory index 4ee5d0ce3a1..54c08b4742d 160000 --- a/vendor/tinymemory +++ b/vendor/tinymemory @@ -1 +1 @@ -Subproject commit 4ee5d0ce3a197a5f552ebb5f3c7cce208be51080 +Subproject commit 54c08b4742d8c3181a046fcc1951fca7e226e692 diff --git a/vendor/tinystoragedrivers b/vendor/tinystoragedrivers index 5e8c8378983..f5a33025b9f 160000 --- a/vendor/tinystoragedrivers +++ b/vendor/tinystoragedrivers @@ -1 +1 @@ -Subproject commit 5e8c8378983a60c8de0a014a77cdba40c242b455 +Subproject commit f5a33025b9feaa36fea522cce764fe8c796e5139 diff --git a/vendor/tinywallet b/vendor/tinywallet index 522121a4512..b70e7950e5f 160000 --- a/vendor/tinywallet +++ b/vendor/tinywallet @@ -1 +1 @@ -Subproject commit 522121a451241691bc5f2c8f8d63928b2f0d949f +Subproject commit b70e7950e5f71e82af793eb3ecf212d25635914e