├── .gitignore ├── Cargo.lock ├── Cargo.toml ├── README.md ├── notes ├── P2ID.masm ├── PRIVATE_SWAPp.masm └── SWAPp.masm ├── src ├── cli │ ├── cancel_order.rs │ ├── consume_swapped.rs │ ├── mod.rs │ └── open_order.rs ├── lib.rs ├── matcher.rs ├── user.rs └── utils │ ├── common.rs │ └── mod.rs └── tests ├── user_flow.rs └── utils ├── mod.rs └── test_utils.rs /.gitignore: -------------------------------------------------------------------------------- 1 | /target 2 | /keystore 3 | store.sqlite3 -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 4 4 | 5 | [[package]] 6 | name = "addr2line" 7 | version = "0.24.2" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "dfbe277e56a376000877090da837660b4427aad530e3028d44e0bffe4f89a1c1" 10 | dependencies = [ 11 | "gimli", 12 | ] 13 | 14 | [[package]] 15 | name = "adler2" 16 | version = "2.0.0" 17 | source = "registry+https://github.com/rust-lang/crates.io-index" 18 | checksum = "512761e0bb2578dd7380c6baaa0f4ce03e84f95e960231d1dec8bf4d7d6e2627" 19 | 20 | [[package]] 21 | name = "ahash" 22 | version = "0.8.11" 23 | source = "registry+https://github.com/rust-lang/crates.io-index" 24 | checksum = "e89da841a80418a9b391ebaea17f5c112ffaaa96f621d2c285b5174da76b9011" 25 | dependencies = [ 26 | "cfg-if", 27 | "once_cell", 28 | "version_check", 29 | "zerocopy 0.7.35", 30 | ] 31 | 32 | [[package]] 33 | name = "aho-corasick" 34 | version = "1.1.3" 35 | source = "registry+https://github.com/rust-lang/crates.io-index" 36 | checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" 37 | dependencies = [ 38 | "memchr", 39 | ] 40 | 41 | [[package]] 42 | name = "android-tzdata" 43 | version = "0.1.1" 44 | source = "registry+https://github.com/rust-lang/crates.io-index" 45 | checksum = "e999941b234f3131b00bc13c22d06e8c5ff726d1b6318ac7eb276997bbb4fef0" 46 | 47 | [[package]] 48 | name = "android_system_properties" 49 | version = "0.1.5" 50 | source = "registry+https://github.com/rust-lang/crates.io-index" 51 | checksum = "819e7219dbd41043ac279b19830f2efc897156490d7fd6ea916720117ee66311" 52 | dependencies = [ 53 | "libc", 54 | ] 55 | 56 | [[package]] 57 | name = "anstream" 58 | version = "0.6.18" 59 | source = "registry+https://github.com/rust-lang/crates.io-index" 60 | checksum = "8acc5369981196006228e28809f761875c0327210a891e941f4c683b3a99529b" 61 | dependencies = [ 62 | "anstyle", 63 | "anstyle-parse", 64 | "anstyle-query", 65 | "anstyle-wincon", 66 | "colorchoice", 67 | "is_terminal_polyfill", 68 | "utf8parse", 69 | ] 70 | 71 | [[package]] 72 | name = "anstyle" 73 | version = "1.0.10" 74 | source = "registry+https://github.com/rust-lang/crates.io-index" 75 | checksum = "55cc3b69f167a1ef2e161439aa98aed94e6028e5f9a59be9a6ffb47aef1651f9" 76 | 77 | [[package]] 78 | name = "anstyle-parse" 79 | version = "0.2.6" 80 | source = "registry+https://github.com/rust-lang/crates.io-index" 81 | checksum = "3b2d16507662817a6a20a9ea92df6652ee4f94f914589377d69f3b21bc5798a9" 82 | dependencies = [ 83 | "utf8parse", 84 | ] 85 | 86 | [[package]] 87 | name = "anstyle-query" 88 | version = "1.1.2" 89 | source = "registry+https://github.com/rust-lang/crates.io-index" 90 | checksum = "79947af37f4177cfead1110013d678905c37501914fba0efea834c3fe9a8d60c" 91 | dependencies = [ 92 | "windows-sys 0.59.0", 93 | ] 94 | 95 | [[package]] 96 | name = "anstyle-wincon" 97 | version = "3.0.7" 98 | source = "registry+https://github.com/rust-lang/crates.io-index" 99 | checksum = "ca3534e77181a9cc07539ad51f2141fe32f6c3ffd4df76db8ad92346b003ae4e" 100 | dependencies = [ 101 | "anstyle", 102 | "once_cell", 103 | "windows-sys 0.59.0", 104 | ] 105 | 106 | [[package]] 107 | name = "anyhow" 108 | version = "1.0.98" 109 | source = "registry+https://github.com/rust-lang/crates.io-index" 110 | checksum = "e16d2d3311acee920a9eb8d33b8cbc1787ce4a264e85f964c2404b969bdcd487" 111 | 112 | [[package]] 113 | name = "arrayref" 114 | version = "0.3.9" 115 | source = "registry+https://github.com/rust-lang/crates.io-index" 116 | checksum = "76a2e8124351fda1ef8aaaa3bbd7ebbcb486bbcd4225aca0aa0d84bb2db8fecb" 117 | 118 | [[package]] 119 | name = "arrayvec" 120 | version = "0.7.6" 121 | source = "registry+https://github.com/rust-lang/crates.io-index" 122 | checksum = "7c02d123df017efcdfbd739ef81735b36c5ba83ec3c59c80a9d7ecc718f92e50" 123 | 124 | [[package]] 125 | name = "ascii-canvas" 126 | version = "3.0.0" 127 | source = "registry+https://github.com/rust-lang/crates.io-index" 128 | checksum = "8824ecca2e851cec16968d54a01dd372ef8f95b244fb84b84e70128be347c3c6" 129 | dependencies = [ 130 | "term", 131 | ] 132 | 133 | [[package]] 134 | name = "async-stream" 135 | version = "0.3.6" 136 | source = "registry+https://github.com/rust-lang/crates.io-index" 137 | checksum = "0b5a71a6f37880a80d1d7f19efd781e4b5de42c88f0722cc13bcb6cc2cfe8476" 138 | dependencies = [ 139 | "async-stream-impl", 140 | "futures-core", 141 | "pin-project-lite", 142 | ] 143 | 144 | [[package]] 145 | name = "async-stream-impl" 146 | version = "0.3.6" 147 | source = "registry+https://github.com/rust-lang/crates.io-index" 148 | checksum = "c7c24de15d275a1ecfd47a380fb4d5ec9bfe0933f309ed5e705b775596a3574d" 149 | dependencies = [ 150 | "proc-macro2", 151 | "quote", 152 | "syn", 153 | ] 154 | 155 | [[package]] 156 | name = "async-trait" 157 | version = "0.1.88" 158 | source = "registry+https://github.com/rust-lang/crates.io-index" 159 | checksum = "e539d3fca749fcee5236ab05e93a52867dd549cc157c8cb7f99595f3cedffdb5" 160 | dependencies = [ 161 | "proc-macro2", 162 | "quote", 163 | "syn", 164 | ] 165 | 166 | [[package]] 167 | name = "atomic-waker" 168 | version = "1.1.2" 169 | source = "registry+https://github.com/rust-lang/crates.io-index" 170 | checksum = "1505bd5d3d116872e7271a6d4e16d81d0c8570876c8de68093a09ac269d8aac0" 171 | 172 | [[package]] 173 | name = "autocfg" 174 | version = "1.4.0" 175 | source = "registry+https://github.com/rust-lang/crates.io-index" 176 | checksum = "ace50bade8e6234aa140d9a2f552bbee1db4d353f69b8217bc503490fc1a9f26" 177 | 178 | [[package]] 179 | name = "axum" 180 | version = "0.7.9" 181 | source = "registry+https://github.com/rust-lang/crates.io-index" 182 | checksum = "edca88bc138befd0323b20752846e6587272d3b03b0343c8ea28a6f819e6e71f" 183 | dependencies = [ 184 | "async-trait", 185 | "axum-core", 186 | "bytes", 187 | "futures-util", 188 | "http", 189 | "http-body", 190 | "http-body-util", 191 | "itoa", 192 | "matchit", 193 | "memchr", 194 | "mime", 195 | "percent-encoding", 196 | "pin-project-lite", 197 | "rustversion", 198 | "serde", 199 | "sync_wrapper", 200 | "tower 0.5.2", 201 | "tower-layer", 202 | "tower-service", 203 | ] 204 | 205 | [[package]] 206 | name = "axum-core" 207 | version = "0.4.5" 208 | source = "registry+https://github.com/rust-lang/crates.io-index" 209 | checksum = "09f2bd6146b97ae3359fa0cc6d6b376d9539582c7b4220f041a33ec24c226199" 210 | dependencies = [ 211 | "async-trait", 212 | "bytes", 213 | "futures-util", 214 | "http", 215 | "http-body", 216 | "http-body-util", 217 | "mime", 218 | "pin-project-lite", 219 | "rustversion", 220 | "sync_wrapper", 221 | "tower-layer", 222 | "tower-service", 223 | ] 224 | 225 | [[package]] 226 | name = "backtrace" 227 | version = "0.3.74" 228 | source = "registry+https://github.com/rust-lang/crates.io-index" 229 | checksum = "8d82cb332cdfaed17ae235a638438ac4d4839913cc2af585c3c6746e8f8bee1a" 230 | dependencies = [ 231 | "addr2line", 232 | "cfg-if", 233 | "libc", 234 | "miniz_oxide", 235 | "object", 236 | "rustc-demangle", 237 | "windows-targets 0.52.6", 238 | ] 239 | 240 | [[package]] 241 | name = "backtrace-ext" 242 | version = "0.2.1" 243 | source = "registry+https://github.com/rust-lang/crates.io-index" 244 | checksum = "537beee3be4a18fb023b570f80e3ae28003db9167a751266b259926e25539d50" 245 | dependencies = [ 246 | "backtrace", 247 | ] 248 | 249 | [[package]] 250 | name = "base64" 251 | version = "0.22.1" 252 | source = "registry+https://github.com/rust-lang/crates.io-index" 253 | checksum = "72b3254f16251a8381aa12e40e3c4d2f0199f8c6508fbecb9d91f575e0fbb8c6" 254 | 255 | [[package]] 256 | name = "bech32" 257 | version = "0.11.0" 258 | source = "registry+https://github.com/rust-lang/crates.io-index" 259 | checksum = "d965446196e3b7decd44aa7ee49e31d630118f90ef12f97900f262eb915c951d" 260 | 261 | [[package]] 262 | name = "beef" 263 | version = "0.5.2" 264 | source = "registry+https://github.com/rust-lang/crates.io-index" 265 | checksum = "3a8241f3ebb85c056b509d4327ad0358fbbba6ffb340bf388f26350aeda225b1" 266 | 267 | [[package]] 268 | name = "bincode" 269 | version = "1.3.3" 270 | source = "registry+https://github.com/rust-lang/crates.io-index" 271 | checksum = "b1f45e9417d87227c7a56d22e471c6206462cba514c7590c09aff4cf6d1ddcad" 272 | dependencies = [ 273 | "serde", 274 | ] 275 | 276 | [[package]] 277 | name = "bit-set" 278 | version = "0.5.3" 279 | source = "registry+https://github.com/rust-lang/crates.io-index" 280 | checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" 281 | dependencies = [ 282 | "bit-vec", 283 | ] 284 | 285 | [[package]] 286 | name = "bit-vec" 287 | version = "0.6.3" 288 | source = "registry+https://github.com/rust-lang/crates.io-index" 289 | checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" 290 | 291 | [[package]] 292 | name = "bitflags" 293 | version = "2.9.0" 294 | source = "registry+https://github.com/rust-lang/crates.io-index" 295 | checksum = "5c8214115b7bf84099f1309324e63141d4c5d7cc26862f97a0a857dbefe165bd" 296 | 297 | [[package]] 298 | name = "blake3" 299 | version = "1.8.2" 300 | source = "registry+https://github.com/rust-lang/crates.io-index" 301 | checksum = "3888aaa89e4b2a40fca9848e400f6a658a5a3978de7be858e209cafa8be9a4a0" 302 | dependencies = [ 303 | "arrayref", 304 | "arrayvec", 305 | "cc", 306 | "cfg-if", 307 | "constant_time_eq", 308 | ] 309 | 310 | [[package]] 311 | name = "block-buffer" 312 | version = "0.10.4" 313 | source = "registry+https://github.com/rust-lang/crates.io-index" 314 | checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" 315 | dependencies = [ 316 | "generic-array", 317 | ] 318 | 319 | [[package]] 320 | name = "bumpalo" 321 | version = "3.17.0" 322 | source = "registry+https://github.com/rust-lang/crates.io-index" 323 | checksum = "1628fb46dfa0b37568d12e5edd512553eccf6a22a78e8bde00bb4aed84d5bdbf" 324 | 325 | [[package]] 326 | name = "byteorder" 327 | version = "1.5.0" 328 | source = "registry+https://github.com/rust-lang/crates.io-index" 329 | checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" 330 | 331 | [[package]] 332 | name = "bytes" 333 | version = "1.10.1" 334 | source = "registry+https://github.com/rust-lang/crates.io-index" 335 | checksum = "d71b6127be86fdcfddb610f7182ac57211d4b18a3e9c82eb2d17662f2227ad6a" 336 | 337 | [[package]] 338 | name = "cc" 339 | version = "1.2.19" 340 | source = "registry+https://github.com/rust-lang/crates.io-index" 341 | checksum = "8e3a13707ac958681c13b39b458c073d0d9bc8a22cb1b2f4c8e55eb72c13f362" 342 | dependencies = [ 343 | "jobserver", 344 | "libc", 345 | "shlex", 346 | ] 347 | 348 | [[package]] 349 | name = "cfg-if" 350 | version = "1.0.0" 351 | source = "registry+https://github.com/rust-lang/crates.io-index" 352 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 353 | 354 | [[package]] 355 | name = "chrono" 356 | version = "0.4.40" 357 | source = "registry+https://github.com/rust-lang/crates.io-index" 358 | checksum = "1a7964611d71df112cb1730f2ee67324fcf4d0fc6606acbbe9bfe06df124637c" 359 | dependencies = [ 360 | "android-tzdata", 361 | "iana-time-zone", 362 | "js-sys", 363 | "num-traits", 364 | "wasm-bindgen", 365 | "windows-link", 366 | ] 367 | 368 | [[package]] 369 | name = "clap" 370 | version = "4.5.37" 371 | source = "registry+https://github.com/rust-lang/crates.io-index" 372 | checksum = "eccb054f56cbd38340b380d4a8e69ef1f02f1af43db2f0cc817a4774d80ae071" 373 | dependencies = [ 374 | "clap_builder", 375 | "clap_derive", 376 | ] 377 | 378 | [[package]] 379 | name = "clap_builder" 380 | version = "4.5.37" 381 | source = "registry+https://github.com/rust-lang/crates.io-index" 382 | checksum = "efd9466fac8543255d3b1fcad4762c5e116ffe808c8a3043d4263cd4fd4862a2" 383 | dependencies = [ 384 | "anstream", 385 | "anstyle", 386 | "clap_lex", 387 | "strsim", 388 | ] 389 | 390 | [[package]] 391 | name = "clap_derive" 392 | version = "4.5.32" 393 | source = "registry+https://github.com/rust-lang/crates.io-index" 394 | checksum = "09176aae279615badda0765c0c0b3f6ed53f4709118af73cf4655d85d1530cd7" 395 | dependencies = [ 396 | "heck", 397 | "proc-macro2", 398 | "quote", 399 | "syn", 400 | ] 401 | 402 | [[package]] 403 | name = "clap_lex" 404 | version = "0.7.4" 405 | source = "registry+https://github.com/rust-lang/crates.io-index" 406 | checksum = "f46ad14479a25103f283c0f10005961cf086d8dc42205bb44c46ac563475dca6" 407 | 408 | [[package]] 409 | name = "colorchoice" 410 | version = "1.0.3" 411 | source = "registry+https://github.com/rust-lang/crates.io-index" 412 | checksum = "5b63caa9aa9397e2d9480a9b13673856c78d8ac123288526c37d7839f2a86990" 413 | 414 | [[package]] 415 | name = "constant_time_eq" 416 | version = "0.3.1" 417 | source = "registry+https://github.com/rust-lang/crates.io-index" 418 | checksum = "7c74b8349d32d297c9134b8c88677813a227df8f779daa29bfc29c183fe3dca6" 419 | 420 | [[package]] 421 | name = "convert_case" 422 | version = "0.4.0" 423 | source = "registry+https://github.com/rust-lang/crates.io-index" 424 | checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" 425 | 426 | [[package]] 427 | name = "core-foundation" 428 | version = "0.10.0" 429 | source = "registry+https://github.com/rust-lang/crates.io-index" 430 | checksum = "b55271e5c8c478ad3f38ad24ef34923091e0548492a266d19b3c0b4d82574c63" 431 | dependencies = [ 432 | "core-foundation-sys", 433 | "libc", 434 | ] 435 | 436 | [[package]] 437 | name = "core-foundation-sys" 438 | version = "0.8.7" 439 | source = "registry+https://github.com/rust-lang/crates.io-index" 440 | checksum = "773648b94d0e5d620f64f280777445740e61fe701025087ec8b57f45c791888b" 441 | 442 | [[package]] 443 | name = "cpufeatures" 444 | version = "0.2.17" 445 | source = "registry+https://github.com/rust-lang/crates.io-index" 446 | checksum = "59ed5838eebb26a2bb2e58f6d5b5316989ae9d08bab10e0e6d103e656d1b0280" 447 | dependencies = [ 448 | "libc", 449 | ] 450 | 451 | [[package]] 452 | name = "crossbeam-deque" 453 | version = "0.8.6" 454 | source = "registry+https://github.com/rust-lang/crates.io-index" 455 | checksum = "9dd111b7b7f7d55b72c0a6ae361660ee5853c9af73f70c3c2ef6858b950e2e51" 456 | dependencies = [ 457 | "crossbeam-epoch", 458 | "crossbeam-utils", 459 | ] 460 | 461 | [[package]] 462 | name = "crossbeam-epoch" 463 | version = "0.9.18" 464 | source = "registry+https://github.com/rust-lang/crates.io-index" 465 | checksum = "5b82ac4a3c2ca9c3460964f020e1402edd5753411d7737aa39c3714ad1b5420e" 466 | dependencies = [ 467 | "crossbeam-utils", 468 | ] 469 | 470 | [[package]] 471 | name = "crossbeam-utils" 472 | version = "0.8.21" 473 | source = "registry+https://github.com/rust-lang/crates.io-index" 474 | checksum = "d0a5c400df2834b80a4c3327b3aad3a4c4cd4de0629063962b03235697506a28" 475 | 476 | [[package]] 477 | name = "crunchy" 478 | version = "0.2.3" 479 | source = "registry+https://github.com/rust-lang/crates.io-index" 480 | checksum = "43da5946c66ffcc7745f48db692ffbb10a83bfe0afd96235c5c2a4fb23994929" 481 | 482 | [[package]] 483 | name = "crypto-common" 484 | version = "0.1.6" 485 | source = "registry+https://github.com/rust-lang/crates.io-index" 486 | checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" 487 | dependencies = [ 488 | "generic-array", 489 | "typenum", 490 | ] 491 | 492 | [[package]] 493 | name = "deadpool" 494 | version = "0.12.2" 495 | source = "registry+https://github.com/rust-lang/crates.io-index" 496 | checksum = "5ed5957ff93768adf7a65ab167a17835c3d2c3c50d084fe305174c112f468e2f" 497 | dependencies = [ 498 | "deadpool-runtime", 499 | "num_cpus", 500 | "tokio", 501 | ] 502 | 503 | [[package]] 504 | name = "deadpool-runtime" 505 | version = "0.1.4" 506 | source = "registry+https://github.com/rust-lang/crates.io-index" 507 | checksum = "092966b41edc516079bdf31ec78a2e0588d1d0c08f78b91d8307215928642b2b" 508 | dependencies = [ 509 | "tokio", 510 | ] 511 | 512 | [[package]] 513 | name = "deadpool-sqlite" 514 | version = "0.9.0" 515 | source = "registry+https://github.com/rust-lang/crates.io-index" 516 | checksum = "656f14fc1ab819c65f332045ea7cb38841bbe551f3b2bc7e3abefb559af4155c" 517 | dependencies = [ 518 | "deadpool", 519 | "deadpool-sync", 520 | "rusqlite", 521 | ] 522 | 523 | [[package]] 524 | name = "deadpool-sync" 525 | version = "0.1.4" 526 | source = "registry+https://github.com/rust-lang/crates.io-index" 527 | checksum = "524bc3df0d57e98ecd022e21ba31166c2625e7d3e5bcc4510efaeeab4abcab04" 528 | dependencies = [ 529 | "deadpool-runtime", 530 | ] 531 | 532 | [[package]] 533 | name = "derive_more" 534 | version = "0.99.20" 535 | source = "registry+https://github.com/rust-lang/crates.io-index" 536 | checksum = "6edb4b64a43d977b8e99788fe3a04d483834fba1215a7e02caa415b626497f7f" 537 | dependencies = [ 538 | "convert_case", 539 | "proc-macro2", 540 | "quote", 541 | "rustc_version 0.4.1", 542 | "syn", 543 | ] 544 | 545 | [[package]] 546 | name = "digest" 547 | version = "0.10.7" 548 | source = "registry+https://github.com/rust-lang/crates.io-index" 549 | checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" 550 | dependencies = [ 551 | "block-buffer", 552 | "crypto-common", 553 | ] 554 | 555 | [[package]] 556 | name = "dirs-next" 557 | version = "2.0.0" 558 | source = "registry+https://github.com/rust-lang/crates.io-index" 559 | checksum = "b98cf8ebf19c3d1b223e151f99a4f9f0690dca41414773390fc824184ac833e1" 560 | dependencies = [ 561 | "cfg-if", 562 | "dirs-sys-next", 563 | ] 564 | 565 | [[package]] 566 | name = "dirs-sys-next" 567 | version = "0.1.2" 568 | source = "registry+https://github.com/rust-lang/crates.io-index" 569 | checksum = "4ebda144c4fe02d1f7ea1a7d9641b6fc6b580adcfa024ae48797ecdeb6825b4d" 570 | dependencies = [ 571 | "libc", 572 | "redox_users", 573 | "winapi", 574 | ] 575 | 576 | [[package]] 577 | name = "dissimilar" 578 | version = "1.0.10" 579 | source = "registry+https://github.com/rust-lang/crates.io-index" 580 | checksum = "8975ffdaa0ef3661bfe02dbdcc06c9f829dfafe6a3c474de366a8d5e44276921" 581 | 582 | [[package]] 583 | name = "either" 584 | version = "1.15.0" 585 | source = "registry+https://github.com/rust-lang/crates.io-index" 586 | checksum = "48c757948c5ede0e46177b7add2e67155f70e33c07fea8284df6576da70b3719" 587 | 588 | [[package]] 589 | name = "ena" 590 | version = "0.14.3" 591 | source = "registry+https://github.com/rust-lang/crates.io-index" 592 | checksum = "3d248bdd43ce613d87415282f69b9bb99d947d290b10962dd6c56233312c2ad5" 593 | dependencies = [ 594 | "log", 595 | ] 596 | 597 | [[package]] 598 | name = "equivalent" 599 | version = "1.0.2" 600 | source = "registry+https://github.com/rust-lang/crates.io-index" 601 | checksum = "877a4ace8713b0bcf2a4e7eec82529c029f1d0619886d18145fea96c3ffe5c0f" 602 | 603 | [[package]] 604 | name = "errno" 605 | version = "0.3.11" 606 | source = "registry+https://github.com/rust-lang/crates.io-index" 607 | checksum = "976dd42dc7e85965fe702eb8164f21f450704bdde31faefd6471dba214cb594e" 608 | dependencies = [ 609 | "libc", 610 | "windows-sys 0.59.0", 611 | ] 612 | 613 | [[package]] 614 | name = "fallible-iterator" 615 | version = "0.3.0" 616 | source = "registry+https://github.com/rust-lang/crates.io-index" 617 | checksum = "2acce4a10f12dc2fb14a218589d4f1f62ef011b2d0cc4b3cb1bba8e94da14649" 618 | 619 | [[package]] 620 | name = "fallible-streaming-iterator" 621 | version = "0.1.9" 622 | source = "registry+https://github.com/rust-lang/crates.io-index" 623 | checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a" 624 | 625 | [[package]] 626 | name = "fastrand" 627 | version = "2.3.0" 628 | source = "registry+https://github.com/rust-lang/crates.io-index" 629 | checksum = "37909eebbb50d72f9059c3b6d82c0463f2ff062c9e95845c43a6c9c0355411be" 630 | 631 | [[package]] 632 | name = "fixedbitset" 633 | version = "0.4.2" 634 | source = "registry+https://github.com/rust-lang/crates.io-index" 635 | checksum = "0ce7134b9999ecaf8bcd65542e436736ef32ddca1b3e06094cb6ec5755203b80" 636 | 637 | [[package]] 638 | name = "fnv" 639 | version = "1.0.7" 640 | source = "registry+https://github.com/rust-lang/crates.io-index" 641 | checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" 642 | 643 | [[package]] 644 | name = "futures" 645 | version = "0.3.31" 646 | source = "registry+https://github.com/rust-lang/crates.io-index" 647 | checksum = "65bc07b1a8bc7c85c5f2e110c476c7389b4554ba72af57d8445ea63a576b0876" 648 | dependencies = [ 649 | "futures-channel", 650 | "futures-core", 651 | "futures-io", 652 | "futures-sink", 653 | "futures-task", 654 | "futures-util", 655 | ] 656 | 657 | [[package]] 658 | name = "futures-channel" 659 | version = "0.3.31" 660 | source = "registry+https://github.com/rust-lang/crates.io-index" 661 | checksum = "2dff15bf788c671c1934e366d07e30c1814a8ef514e1af724a602e8a2fbe1b10" 662 | dependencies = [ 663 | "futures-core", 664 | "futures-sink", 665 | ] 666 | 667 | [[package]] 668 | name = "futures-core" 669 | version = "0.3.31" 670 | source = "registry+https://github.com/rust-lang/crates.io-index" 671 | checksum = "05f29059c0c2090612e8d742178b0580d2dc940c837851ad723096f87af6663e" 672 | 673 | [[package]] 674 | name = "futures-io" 675 | version = "0.3.31" 676 | source = "registry+https://github.com/rust-lang/crates.io-index" 677 | checksum = "9e5c1b78ca4aae1ac06c48a526a655760685149f0d465d21f37abfe57ce075c6" 678 | 679 | [[package]] 680 | name = "futures-macro" 681 | version = "0.3.31" 682 | source = "registry+https://github.com/rust-lang/crates.io-index" 683 | checksum = "162ee34ebcb7c64a8abebc059ce0fee27c2262618d7b60ed8faf72fef13c3650" 684 | dependencies = [ 685 | "proc-macro2", 686 | "quote", 687 | "syn", 688 | ] 689 | 690 | [[package]] 691 | name = "futures-sink" 692 | version = "0.3.31" 693 | source = "registry+https://github.com/rust-lang/crates.io-index" 694 | checksum = "e575fab7d1e0dcb8d0c7bcf9a63ee213816ab51902e6d244a95819acacf1d4f7" 695 | 696 | [[package]] 697 | name = "futures-task" 698 | version = "0.3.31" 699 | source = "registry+https://github.com/rust-lang/crates.io-index" 700 | checksum = "f90f7dce0722e95104fcb095585910c0977252f286e354b5e3bd38902cd99988" 701 | 702 | [[package]] 703 | name = "futures-util" 704 | version = "0.3.31" 705 | source = "registry+https://github.com/rust-lang/crates.io-index" 706 | checksum = "9fa08315bb612088cc391249efdc3bc77536f16c91f6cf495e6fbe85b20a4a81" 707 | dependencies = [ 708 | "futures-core", 709 | "futures-io", 710 | "futures-macro", 711 | "futures-sink", 712 | "futures-task", 713 | "memchr", 714 | "pin-project-lite", 715 | "pin-utils", 716 | "slab", 717 | ] 718 | 719 | [[package]] 720 | name = "generator" 721 | version = "0.8.4" 722 | source = "registry+https://github.com/rust-lang/crates.io-index" 723 | checksum = "cc6bd114ceda131d3b1d665eba35788690ad37f5916457286b32ab6fd3c438dd" 724 | dependencies = [ 725 | "cfg-if", 726 | "libc", 727 | "log", 728 | "rustversion", 729 | "windows", 730 | ] 731 | 732 | [[package]] 733 | name = "generic-array" 734 | version = "0.14.7" 735 | source = "registry+https://github.com/rust-lang/crates.io-index" 736 | checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" 737 | dependencies = [ 738 | "typenum", 739 | "version_check", 740 | ] 741 | 742 | [[package]] 743 | name = "getrandom" 744 | version = "0.2.16" 745 | source = "registry+https://github.com/rust-lang/crates.io-index" 746 | checksum = "335ff9f135e4384c8150d6f27c6daed433577f86b4750418338c01a1a2528592" 747 | dependencies = [ 748 | "cfg-if", 749 | "libc", 750 | "wasi 0.11.0+wasi-snapshot-preview1", 751 | ] 752 | 753 | [[package]] 754 | name = "getrandom" 755 | version = "0.3.2" 756 | source = "registry+https://github.com/rust-lang/crates.io-index" 757 | checksum = "73fea8450eea4bac3940448fb7ae50d91f034f941199fcd9d909a5a07aa455f0" 758 | dependencies = [ 759 | "cfg-if", 760 | "js-sys", 761 | "libc", 762 | "r-efi", 763 | "wasi 0.14.2+wasi-0.2.4", 764 | "wasm-bindgen", 765 | ] 766 | 767 | [[package]] 768 | name = "gimli" 769 | version = "0.31.1" 770 | source = "registry+https://github.com/rust-lang/crates.io-index" 771 | checksum = "07e28edb80900c19c28f1072f2e8aeca7fa06b23cd4169cefe1af5aa3260783f" 772 | 773 | [[package]] 774 | name = "glob" 775 | version = "0.3.2" 776 | source = "registry+https://github.com/rust-lang/crates.io-index" 777 | checksum = "a8d1add55171497b4705a648c6b583acafb01d58050a51727785f0b2c8e0a2b2" 778 | 779 | [[package]] 780 | name = "h2" 781 | version = "0.4.9" 782 | source = "registry+https://github.com/rust-lang/crates.io-index" 783 | checksum = "75249d144030531f8dee69fe9cea04d3edf809a017ae445e2abdff6629e86633" 784 | dependencies = [ 785 | "atomic-waker", 786 | "bytes", 787 | "fnv", 788 | "futures-core", 789 | "futures-sink", 790 | "http", 791 | "indexmap 2.9.0", 792 | "slab", 793 | "tokio", 794 | "tokio-util", 795 | "tracing", 796 | ] 797 | 798 | [[package]] 799 | name = "hashbrown" 800 | version = "0.12.3" 801 | source = "registry+https://github.com/rust-lang/crates.io-index" 802 | checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" 803 | 804 | [[package]] 805 | name = "hashbrown" 806 | version = "0.14.5" 807 | source = "registry+https://github.com/rust-lang/crates.io-index" 808 | checksum = "e5274423e17b7c9fc20b6e7e208532f9b19825d82dfd615708b70edd83df41f1" 809 | dependencies = [ 810 | "ahash", 811 | ] 812 | 813 | [[package]] 814 | name = "hashbrown" 815 | version = "0.15.2" 816 | source = "registry+https://github.com/rust-lang/crates.io-index" 817 | checksum = "bf151400ff0baff5465007dd2f3e717f3fe502074ca563069ce3a6629d07b289" 818 | 819 | [[package]] 820 | name = "hashlink" 821 | version = "0.9.1" 822 | source = "registry+https://github.com/rust-lang/crates.io-index" 823 | checksum = "6ba4ff7128dee98c7dc9794b6a411377e1404dba1c97deb8d1a55297bd25d8af" 824 | dependencies = [ 825 | "hashbrown 0.14.5", 826 | ] 827 | 828 | [[package]] 829 | name = "heck" 830 | version = "0.5.0" 831 | source = "registry+https://github.com/rust-lang/crates.io-index" 832 | checksum = "2304e00983f87ffb38b55b444b5e3b60a884b5d30c0fca7d82fe33449bbe55ea" 833 | 834 | [[package]] 835 | name = "hermit-abi" 836 | version = "0.3.9" 837 | source = "registry+https://github.com/rust-lang/crates.io-index" 838 | checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" 839 | 840 | [[package]] 841 | name = "hex" 842 | version = "0.4.3" 843 | source = "registry+https://github.com/rust-lang/crates.io-index" 844 | checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" 845 | 846 | [[package]] 847 | name = "http" 848 | version = "1.3.1" 849 | source = "registry+https://github.com/rust-lang/crates.io-index" 850 | checksum = "f4a85d31aea989eead29a3aaf9e1115a180df8282431156e533de47660892565" 851 | dependencies = [ 852 | "bytes", 853 | "fnv", 854 | "itoa", 855 | ] 856 | 857 | [[package]] 858 | name = "http-body" 859 | version = "1.0.1" 860 | source = "registry+https://github.com/rust-lang/crates.io-index" 861 | checksum = "1efedce1fb8e6913f23e0c92de8e62cd5b772a67e7b3946df930a62566c93184" 862 | dependencies = [ 863 | "bytes", 864 | "http", 865 | ] 866 | 867 | [[package]] 868 | name = "http-body-util" 869 | version = "0.1.3" 870 | source = "registry+https://github.com/rust-lang/crates.io-index" 871 | checksum = "b021d93e26becf5dc7e1b75b1bed1fd93124b374ceb73f43d4d4eafec896a64a" 872 | dependencies = [ 873 | "bytes", 874 | "futures-core", 875 | "http", 876 | "http-body", 877 | "pin-project-lite", 878 | ] 879 | 880 | [[package]] 881 | name = "httparse" 882 | version = "1.10.1" 883 | source = "registry+https://github.com/rust-lang/crates.io-index" 884 | checksum = "6dbf3de79e51f3d586ab4cb9d5c3e2c14aa28ed23d180cf89b4df0454a69cc87" 885 | 886 | [[package]] 887 | name = "httpdate" 888 | version = "1.0.3" 889 | source = "registry+https://github.com/rust-lang/crates.io-index" 890 | checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" 891 | 892 | [[package]] 893 | name = "hyper" 894 | version = "1.6.0" 895 | source = "registry+https://github.com/rust-lang/crates.io-index" 896 | checksum = "cc2b571658e38e0c01b1fdca3bbbe93c00d3d71693ff2770043f8c29bc7d6f80" 897 | dependencies = [ 898 | "bytes", 899 | "futures-channel", 900 | "futures-util", 901 | "h2", 902 | "http", 903 | "http-body", 904 | "httparse", 905 | "httpdate", 906 | "itoa", 907 | "pin-project-lite", 908 | "smallvec", 909 | "tokio", 910 | "want", 911 | ] 912 | 913 | [[package]] 914 | name = "hyper-timeout" 915 | version = "0.5.2" 916 | source = "registry+https://github.com/rust-lang/crates.io-index" 917 | checksum = "2b90d566bffbce6a75bd8b09a05aa8c2cb1fabb6cb348f8840c9e4c90a0d83b0" 918 | dependencies = [ 919 | "hyper", 920 | "hyper-util", 921 | "pin-project-lite", 922 | "tokio", 923 | "tower-service", 924 | ] 925 | 926 | [[package]] 927 | name = "hyper-util" 928 | version = "0.1.11" 929 | source = "registry+https://github.com/rust-lang/crates.io-index" 930 | checksum = "497bbc33a26fdd4af9ed9c70d63f61cf56a938375fbb32df34db9b1cd6d643f2" 931 | dependencies = [ 932 | "bytes", 933 | "futures-channel", 934 | "futures-util", 935 | "http", 936 | "http-body", 937 | "hyper", 938 | "libc", 939 | "pin-project-lite", 940 | "socket2", 941 | "tokio", 942 | "tower-service", 943 | "tracing", 944 | ] 945 | 946 | [[package]] 947 | name = "iana-time-zone" 948 | version = "0.1.63" 949 | source = "registry+https://github.com/rust-lang/crates.io-index" 950 | checksum = "b0c919e5debc312ad217002b8048a17b7d83f80703865bbfcfebb0458b0b27d8" 951 | dependencies = [ 952 | "android_system_properties", 953 | "core-foundation-sys", 954 | "iana-time-zone-haiku", 955 | "js-sys", 956 | "log", 957 | "wasm-bindgen", 958 | "windows-core", 959 | ] 960 | 961 | [[package]] 962 | name = "iana-time-zone-haiku" 963 | version = "0.1.2" 964 | source = "registry+https://github.com/rust-lang/crates.io-index" 965 | checksum = "f31827a206f56af32e590ba56d5d2d085f558508192593743f16b2306495269f" 966 | dependencies = [ 967 | "cc", 968 | ] 969 | 970 | [[package]] 971 | name = "indenter" 972 | version = "0.3.3" 973 | source = "registry+https://github.com/rust-lang/crates.io-index" 974 | checksum = "ce23b50ad8242c51a442f3ff322d56b02f08852c77e4c0b4d3fd684abc89c683" 975 | 976 | [[package]] 977 | name = "indexmap" 978 | version = "1.9.3" 979 | source = "registry+https://github.com/rust-lang/crates.io-index" 980 | checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" 981 | dependencies = [ 982 | "autocfg", 983 | "hashbrown 0.12.3", 984 | ] 985 | 986 | [[package]] 987 | name = "indexmap" 988 | version = "2.9.0" 989 | source = "registry+https://github.com/rust-lang/crates.io-index" 990 | checksum = "cea70ddb795996207ad57735b50c5982d8844f38ba9ee5f1aedcfb708a2aa11e" 991 | dependencies = [ 992 | "equivalent", 993 | "hashbrown 0.15.2", 994 | ] 995 | 996 | [[package]] 997 | name = "is_ci" 998 | version = "1.2.0" 999 | source = "registry+https://github.com/rust-lang/crates.io-index" 1000 | checksum = "7655c9839580ee829dfacba1d1278c2b7883e50a277ff7541299489d6bdfdc45" 1001 | 1002 | [[package]] 1003 | name = "is_terminal_polyfill" 1004 | version = "1.70.1" 1005 | source = "registry+https://github.com/rust-lang/crates.io-index" 1006 | checksum = "7943c866cc5cd64cbc25b2e01621d07fa8eb2a1a23160ee81ce38704e97b8ecf" 1007 | 1008 | [[package]] 1009 | name = "itertools" 1010 | version = "0.11.0" 1011 | source = "registry+https://github.com/rust-lang/crates.io-index" 1012 | checksum = "b1c173a5686ce8bfa551b3563d0c2170bf24ca44da99c7ca4bfdab5418c3fe57" 1013 | dependencies = [ 1014 | "either", 1015 | ] 1016 | 1017 | [[package]] 1018 | name = "itoa" 1019 | version = "1.0.15" 1020 | source = "registry+https://github.com/rust-lang/crates.io-index" 1021 | checksum = "4a5f13b858c8d314ee3e8f639011f7ccefe71f97f96e50151fb991f267928e2c" 1022 | 1023 | [[package]] 1024 | name = "jobserver" 1025 | version = "0.1.33" 1026 | source = "registry+https://github.com/rust-lang/crates.io-index" 1027 | checksum = "38f262f097c174adebe41eb73d66ae9c06b2844fb0da69969647bbddd9b0538a" 1028 | dependencies = [ 1029 | "getrandom 0.3.2", 1030 | "libc", 1031 | ] 1032 | 1033 | [[package]] 1034 | name = "js-sys" 1035 | version = "0.3.77" 1036 | source = "registry+https://github.com/rust-lang/crates.io-index" 1037 | checksum = "1cfaf33c695fc6e08064efbc1f72ec937429614f25eef83af942d0e227c3a28f" 1038 | dependencies = [ 1039 | "once_cell", 1040 | "wasm-bindgen", 1041 | ] 1042 | 1043 | [[package]] 1044 | name = "keccak" 1045 | version = "0.1.5" 1046 | source = "registry+https://github.com/rust-lang/crates.io-index" 1047 | checksum = "ecc2af9a1119c51f12a14607e783cb977bde58bc069ff0c3da1095e635d70654" 1048 | dependencies = [ 1049 | "cpufeatures", 1050 | ] 1051 | 1052 | [[package]] 1053 | name = "lalrpop" 1054 | version = "0.20.2" 1055 | source = "registry+https://github.com/rust-lang/crates.io-index" 1056 | checksum = "55cb077ad656299f160924eb2912aa147d7339ea7d69e1b5517326fdcec3c1ca" 1057 | dependencies = [ 1058 | "ascii-canvas", 1059 | "bit-set", 1060 | "ena", 1061 | "itertools", 1062 | "lalrpop-util", 1063 | "petgraph", 1064 | "regex", 1065 | "regex-syntax 0.8.5", 1066 | "string_cache", 1067 | "term", 1068 | "tiny-keccak", 1069 | "unicode-xid", 1070 | "walkdir", 1071 | ] 1072 | 1073 | [[package]] 1074 | name = "lalrpop-util" 1075 | version = "0.20.2" 1076 | source = "registry+https://github.com/rust-lang/crates.io-index" 1077 | checksum = "507460a910eb7b32ee961886ff48539633b788a36b65692b95f225b844c82553" 1078 | 1079 | [[package]] 1080 | name = "lazy_static" 1081 | version = "1.5.0" 1082 | source = "registry+https://github.com/rust-lang/crates.io-index" 1083 | checksum = "bbd2bcb4c963f2ddae06a2efc7e9f3591312473c50c6685e1f298068316e66fe" 1084 | 1085 | [[package]] 1086 | name = "libc" 1087 | version = "0.2.172" 1088 | source = "registry+https://github.com/rust-lang/crates.io-index" 1089 | checksum = "d750af042f7ef4f724306de029d18836c26c1765a54a6a3f094cbd23a7267ffa" 1090 | 1091 | [[package]] 1092 | name = "libm" 1093 | version = "0.2.13" 1094 | source = "registry+https://github.com/rust-lang/crates.io-index" 1095 | checksum = "c9627da5196e5d8ed0b0495e61e518847578da83483c37288316d9b2e03a7f72" 1096 | 1097 | [[package]] 1098 | name = "libredox" 1099 | version = "0.1.3" 1100 | source = "registry+https://github.com/rust-lang/crates.io-index" 1101 | checksum = "c0ff37bd590ca25063e35af745c343cb7a0271906fb7b37e4813e8f79f00268d" 1102 | dependencies = [ 1103 | "bitflags", 1104 | "libc", 1105 | ] 1106 | 1107 | [[package]] 1108 | name = "libsqlite3-sys" 1109 | version = "0.30.1" 1110 | source = "registry+https://github.com/rust-lang/crates.io-index" 1111 | checksum = "2e99fb7a497b1e3339bc746195567ed8d3e24945ecd636e3619d20b9de9e9149" 1112 | dependencies = [ 1113 | "cc", 1114 | "pkg-config", 1115 | "vcpkg", 1116 | ] 1117 | 1118 | [[package]] 1119 | name = "linux-raw-sys" 1120 | version = "0.4.15" 1121 | source = "registry+https://github.com/rust-lang/crates.io-index" 1122 | checksum = "d26c52dbd32dccf2d10cac7725f8eae5296885fb5703b261f7d0a0739ec807ab" 1123 | 1124 | [[package]] 1125 | name = "linux-raw-sys" 1126 | version = "0.9.4" 1127 | source = "registry+https://github.com/rust-lang/crates.io-index" 1128 | checksum = "cd945864f07fe9f5371a27ad7b52a172b4b499999f1d97574c9fa68373937e12" 1129 | 1130 | [[package]] 1131 | name = "lock_api" 1132 | version = "0.4.12" 1133 | source = "registry+https://github.com/rust-lang/crates.io-index" 1134 | checksum = "07af8b9cdd281b7915f413fa73f29ebd5d55d0d3f0155584dade1ff18cea1b17" 1135 | dependencies = [ 1136 | "autocfg", 1137 | "scopeguard", 1138 | ] 1139 | 1140 | [[package]] 1141 | name = "log" 1142 | version = "0.4.27" 1143 | source = "registry+https://github.com/rust-lang/crates.io-index" 1144 | checksum = "13dc2df351e3202783a1fe0d44375f7295ffb4049267b0f3018346dc122a1d94" 1145 | 1146 | [[package]] 1147 | name = "logos" 1148 | version = "0.14.4" 1149 | source = "registry+https://github.com/rust-lang/crates.io-index" 1150 | checksum = "7251356ef8cb7aec833ddf598c6cb24d17b689d20b993f9d11a3d764e34e6458" 1151 | dependencies = [ 1152 | "logos-derive", 1153 | ] 1154 | 1155 | [[package]] 1156 | name = "logos-codegen" 1157 | version = "0.14.4" 1158 | source = "registry+https://github.com/rust-lang/crates.io-index" 1159 | checksum = "59f80069600c0d66734f5ff52cc42f2dabd6b29d205f333d61fd7832e9e9963f" 1160 | dependencies = [ 1161 | "beef", 1162 | "fnv", 1163 | "lazy_static", 1164 | "proc-macro2", 1165 | "quote", 1166 | "regex-syntax 0.8.5", 1167 | "syn", 1168 | ] 1169 | 1170 | [[package]] 1171 | name = "logos-derive" 1172 | version = "0.14.4" 1173 | source = "registry+https://github.com/rust-lang/crates.io-index" 1174 | checksum = "24fb722b06a9dc12adb0963ed585f19fc61dc5413e6a9be9422ef92c091e731d" 1175 | dependencies = [ 1176 | "logos-codegen", 1177 | ] 1178 | 1179 | [[package]] 1180 | name = "loom" 1181 | version = "0.7.2" 1182 | source = "registry+https://github.com/rust-lang/crates.io-index" 1183 | checksum = "419e0dc8046cb947daa77eb95ae174acfbddb7673b4151f56d1eed8e93fbfaca" 1184 | dependencies = [ 1185 | "cfg-if", 1186 | "generator", 1187 | "scoped-tls", 1188 | "tracing", 1189 | "tracing-subscriber", 1190 | ] 1191 | 1192 | [[package]] 1193 | name = "matchers" 1194 | version = "0.1.0" 1195 | source = "registry+https://github.com/rust-lang/crates.io-index" 1196 | checksum = "8263075bb86c5a1b1427b5ae862e8889656f126e9f77c484496e8b47cf5c5558" 1197 | dependencies = [ 1198 | "regex-automata 0.1.10", 1199 | ] 1200 | 1201 | [[package]] 1202 | name = "matchit" 1203 | version = "0.7.3" 1204 | source = "registry+https://github.com/rust-lang/crates.io-index" 1205 | checksum = "0e7465ac9959cc2b1404e8e2367b43684a6d13790fe23056cc8c6c5a6b7bcb94" 1206 | 1207 | [[package]] 1208 | name = "memchr" 1209 | version = "2.7.4" 1210 | source = "registry+https://github.com/rust-lang/crates.io-index" 1211 | checksum = "78ca9ab1a0babb1e7d5695e3530886289c18cf2f87ec19a575a0abdce112e3a3" 1212 | 1213 | [[package]] 1214 | name = "miden-air" 1215 | version = "0.13.2" 1216 | source = "registry+https://github.com/rust-lang/crates.io-index" 1217 | checksum = "00e2e77c57ae798e02553af158c04d467f6479ab798a8c84459d343a89ff9c50" 1218 | dependencies = [ 1219 | "miden-core", 1220 | "thiserror 2.0.12", 1221 | "winter-air", 1222 | "winter-prover", 1223 | ] 1224 | 1225 | [[package]] 1226 | name = "miden-assembly" 1227 | version = "0.13.2" 1228 | source = "registry+https://github.com/rust-lang/crates.io-index" 1229 | checksum = "75d1cb02d807c2481f365feca966bedb74c66c765923d04c3c23ea678afaf148" 1230 | dependencies = [ 1231 | "aho-corasick", 1232 | "lalrpop", 1233 | "lalrpop-util", 1234 | "miden-core", 1235 | "miden-miette", 1236 | "rustc_version 0.4.1", 1237 | "smallvec", 1238 | "thiserror 2.0.12", 1239 | "tracing", 1240 | "unicode-width 0.2.0", 1241 | ] 1242 | 1243 | [[package]] 1244 | name = "miden-client" 1245 | version = "0.8.1" 1246 | source = "registry+https://github.com/rust-lang/crates.io-index" 1247 | checksum = "6c5d095c961b0a18aa1f59f719a7425994821492782ef3b323589fea0d65acba" 1248 | dependencies = [ 1249 | "async-trait", 1250 | "chrono", 1251 | "deadpool-sqlite", 1252 | "hex", 1253 | "miden-lib", 1254 | "miden-node-proto-build", 1255 | "miden-objects", 1256 | "miden-proving-service-client", 1257 | "miden-tx", 1258 | "miette", 1259 | "prost", 1260 | "prost-build", 1261 | "protox", 1262 | "rand 0.9.1", 1263 | "rusqlite", 1264 | "thiserror 2.0.12", 1265 | "tonic", 1266 | "tonic-build", 1267 | "tracing", 1268 | "web-sys", 1269 | ] 1270 | 1271 | [[package]] 1272 | name = "miden-core" 1273 | version = "0.13.2" 1274 | source = "registry+https://github.com/rust-lang/crates.io-index" 1275 | checksum = "d7d408e01421b5df2e4cfaf1a91efefe3fb5b729f1c99b668d3a69eec0044a6b" 1276 | dependencies = [ 1277 | "lock_api", 1278 | "loom", 1279 | "memchr", 1280 | "miden-crypto 0.14.0", 1281 | "miden-formatting", 1282 | "miden-miette", 1283 | "num-derive", 1284 | "num-traits", 1285 | "parking_lot", 1286 | "thiserror 2.0.12", 1287 | "winter-math 0.12.0", 1288 | "winter-utils 0.12.0", 1289 | ] 1290 | 1291 | [[package]] 1292 | name = "miden-crypto" 1293 | version = "0.7.1" 1294 | source = "registry+https://github.com/rust-lang/crates.io-index" 1295 | checksum = "32dd571edafdd5e8947e4006a905a1c5373f2f8b08b270fea3c998db5be131cf" 1296 | dependencies = [ 1297 | "blake3", 1298 | "cc", 1299 | "glob", 1300 | "libc", 1301 | "winter-crypto 0.6.4", 1302 | "winter-math 0.6.5", 1303 | "winter-utils 0.6.4", 1304 | ] 1305 | 1306 | [[package]] 1307 | name = "miden-crypto" 1308 | version = "0.14.0" 1309 | source = "registry+https://github.com/rust-lang/crates.io-index" 1310 | checksum = "d521a9d5fa949d60e4029e55ff1da892561b298ed636afb5f71d0dde0925bf57" 1311 | dependencies = [ 1312 | "blake3", 1313 | "cc", 1314 | "glob", 1315 | "num", 1316 | "num-complex", 1317 | "rand 0.9.1", 1318 | "rand_core 0.9.3", 1319 | "sha3", 1320 | "thiserror 2.0.12", 1321 | "winter-crypto 0.12.0", 1322 | "winter-math 0.12.0", 1323 | "winter-utils 0.12.0", 1324 | ] 1325 | 1326 | [[package]] 1327 | name = "miden-dark-pool" 1328 | version = "0.1.0" 1329 | dependencies = [ 1330 | "anyhow", 1331 | "bincode", 1332 | "clap", 1333 | "miden-client", 1334 | "miden-crypto 0.7.1", 1335 | "miden-lib", 1336 | "miden-objects", 1337 | "miden-tx", 1338 | "miden-vm", 1339 | "rand 0.9.1", 1340 | "serde", 1341 | "sha2", 1342 | "thiserror 2.0.12", 1343 | "tokio", 1344 | "winter-utils 0.12.0", 1345 | ] 1346 | 1347 | [[package]] 1348 | name = "miden-formatting" 1349 | version = "0.1.1" 1350 | source = "registry+https://github.com/rust-lang/crates.io-index" 1351 | checksum = "7e392e0a8c34b32671012b439de35fa8987bf14f0f8aac279b97f8b8cc6e263b" 1352 | dependencies = [ 1353 | "unicode-width 0.1.14", 1354 | ] 1355 | 1356 | [[package]] 1357 | name = "miden-lib" 1358 | version = "0.8.0" 1359 | source = "registry+https://github.com/rust-lang/crates.io-index" 1360 | checksum = "1ea3fdad9ad0e50f71f4be0e27479d2de800a9b9262810d0cbedaea30e3f450b" 1361 | dependencies = [ 1362 | "miden-assembly", 1363 | "miden-objects", 1364 | "miden-stdlib", 1365 | "regex", 1366 | "thiserror 2.0.12", 1367 | "walkdir", 1368 | ] 1369 | 1370 | [[package]] 1371 | name = "miden-mast-package" 1372 | version = "0.13.2" 1373 | source = "registry+https://github.com/rust-lang/crates.io-index" 1374 | checksum = "55ea780c817aff71d763d5941120808f40f914f99ee71b24498e445c572c81ca" 1375 | dependencies = [ 1376 | "derive_more", 1377 | "miden-assembly", 1378 | "miden-core", 1379 | ] 1380 | 1381 | [[package]] 1382 | name = "miden-miette" 1383 | version = "8.0.0" 1384 | source = "registry+https://github.com/rust-lang/crates.io-index" 1385 | checksum = "eef536978f24a179d94fa2a41e4f92b28e7d8aab14b8d23df28ad2a3d7098b20" 1386 | dependencies = [ 1387 | "backtrace", 1388 | "backtrace-ext", 1389 | "cfg-if", 1390 | "futures", 1391 | "indenter", 1392 | "lazy_static", 1393 | "miden-miette-derive", 1394 | "owo-colors", 1395 | "regex", 1396 | "rustc_version 0.2.3", 1397 | "rustversion", 1398 | "serde_json", 1399 | "spin", 1400 | "strip-ansi-escapes", 1401 | "supports-color", 1402 | "supports-hyperlinks", 1403 | "supports-unicode", 1404 | "syn", 1405 | "terminal_size 0.3.0", 1406 | "textwrap", 1407 | "thiserror 2.0.12", 1408 | "trybuild", 1409 | "unicode-width 0.1.14", 1410 | ] 1411 | 1412 | [[package]] 1413 | name = "miden-miette-derive" 1414 | version = "8.0.0" 1415 | source = "registry+https://github.com/rust-lang/crates.io-index" 1416 | checksum = "86a905f3ea65634dd4d1041a4f0fd0a3e77aa4118341d265af1a94339182222f" 1417 | dependencies = [ 1418 | "proc-macro2", 1419 | "quote", 1420 | "syn", 1421 | ] 1422 | 1423 | [[package]] 1424 | name = "miden-node-proto-build" 1425 | version = "0.8.0" 1426 | source = "registry+https://github.com/rust-lang/crates.io-index" 1427 | checksum = "1cb1d9b312ec25b732b4d3f6f75d37dd6ff1b69dd483e89ec8001be482dcc5fb" 1428 | dependencies = [ 1429 | "anyhow", 1430 | "prost", 1431 | "protox", 1432 | "tonic-build", 1433 | ] 1434 | 1435 | [[package]] 1436 | name = "miden-objects" 1437 | version = "0.8.1" 1438 | source = "registry+https://github.com/rust-lang/crates.io-index" 1439 | checksum = "1ea350fdd6d025d2e4791ac0769bfbc04afca404fbb20f918354dcc758debd4c" 1440 | dependencies = [ 1441 | "bech32", 1442 | "getrandom 0.3.2", 1443 | "miden-assembly", 1444 | "miden-core", 1445 | "miden-crypto 0.14.0", 1446 | "miden-processor", 1447 | "miden-verifier", 1448 | "rand 0.9.1", 1449 | "rand_xoshiro", 1450 | "semver 1.0.26", 1451 | "serde", 1452 | "thiserror 2.0.12", 1453 | "toml", 1454 | "winter-rand-utils", 1455 | ] 1456 | 1457 | [[package]] 1458 | name = "miden-processor" 1459 | version = "0.13.2" 1460 | source = "registry+https://github.com/rust-lang/crates.io-index" 1461 | checksum = "d4e70b053c587014396d06be3502e3952777923bee11729b7514c060fdc0d2c8" 1462 | dependencies = [ 1463 | "miden-air", 1464 | "miden-core", 1465 | "thiserror 2.0.12", 1466 | "tracing", 1467 | "winter-prover", 1468 | ] 1469 | 1470 | [[package]] 1471 | name = "miden-prover" 1472 | version = "0.13.2" 1473 | source = "registry+https://github.com/rust-lang/crates.io-index" 1474 | checksum = "2baa571449e7811e934dae919285dfea4854fb867f6d20d757d60b0601ef0140" 1475 | dependencies = [ 1476 | "miden-air", 1477 | "miden-processor", 1478 | "tracing", 1479 | "winter-maybe-async", 1480 | "winter-prover", 1481 | ] 1482 | 1483 | [[package]] 1484 | name = "miden-proving-service-client" 1485 | version = "0.8.0" 1486 | source = "registry+https://github.com/rust-lang/crates.io-index" 1487 | checksum = "ba272e6749ad8a146ff62dc621f396021d347257d948eac26e4493c0b9d3d341" 1488 | dependencies = [ 1489 | "async-trait", 1490 | "getrandom 0.3.2", 1491 | "miden-objects", 1492 | "miden-tx", 1493 | "miette", 1494 | "prost", 1495 | "prost-build", 1496 | "protox", 1497 | "thiserror 2.0.12", 1498 | "tokio", 1499 | "tonic", 1500 | "tonic-build", 1501 | "tonic-web-wasm-client", 1502 | ] 1503 | 1504 | [[package]] 1505 | name = "miden-stdlib" 1506 | version = "0.13.2" 1507 | source = "registry+https://github.com/rust-lang/crates.io-index" 1508 | checksum = "77e59c4dd1079bffe8407694b386ae781feaf1f7acb9d1cefa858578bc99cad4" 1509 | dependencies = [ 1510 | "miden-assembly", 1511 | "miden-core", 1512 | ] 1513 | 1514 | [[package]] 1515 | name = "miden-tx" 1516 | version = "0.8.1" 1517 | source = "registry+https://github.com/rust-lang/crates.io-index" 1518 | checksum = "a9f253174345a55a08229cc7eb0094f290d515c0a39f46eb807881da4ce40c9e" 1519 | dependencies = [ 1520 | "async-trait", 1521 | "miden-lib", 1522 | "miden-objects", 1523 | "miden-processor", 1524 | "miden-prover", 1525 | "miden-verifier", 1526 | "rand 0.9.1", 1527 | "rand_chacha 0.9.0", 1528 | "thiserror 2.0.12", 1529 | "winter-maybe-async", 1530 | ] 1531 | 1532 | [[package]] 1533 | name = "miden-verifier" 1534 | version = "0.13.2" 1535 | source = "registry+https://github.com/rust-lang/crates.io-index" 1536 | checksum = "20ae024b022569d7117891a83cf51ccd5bceeda248f30690b394a6dfc4607061" 1537 | dependencies = [ 1538 | "miden-air", 1539 | "miden-core", 1540 | "thiserror 2.0.12", 1541 | "tracing", 1542 | "winter-verifier", 1543 | ] 1544 | 1545 | [[package]] 1546 | name = "miden-vm" 1547 | version = "0.13.2" 1548 | source = "registry+https://github.com/rust-lang/crates.io-index" 1549 | checksum = "0361b893a6591ff1c16de24bddd464b2b667eaebceff6f3195b195bb8a041b7b" 1550 | dependencies = [ 1551 | "blake3", 1552 | "miden-assembly", 1553 | "miden-core", 1554 | "miden-mast-package", 1555 | "miden-processor", 1556 | "miden-prover", 1557 | "miden-stdlib", 1558 | "miden-verifier", 1559 | "tracing", 1560 | ] 1561 | 1562 | [[package]] 1563 | name = "miette" 1564 | version = "7.5.0" 1565 | source = "registry+https://github.com/rust-lang/crates.io-index" 1566 | checksum = "1a955165f87b37fd1862df2a59547ac542c77ef6d17c666f619d1ad22dd89484" 1567 | dependencies = [ 1568 | "backtrace", 1569 | "backtrace-ext", 1570 | "cfg-if", 1571 | "miette-derive", 1572 | "owo-colors", 1573 | "supports-color", 1574 | "supports-hyperlinks", 1575 | "supports-unicode", 1576 | "terminal_size 0.4.2", 1577 | "textwrap", 1578 | "thiserror 1.0.69", 1579 | "unicode-width 0.1.14", 1580 | ] 1581 | 1582 | [[package]] 1583 | name = "miette-derive" 1584 | version = "7.5.0" 1585 | source = "registry+https://github.com/rust-lang/crates.io-index" 1586 | checksum = "bf45bf44ab49be92fd1227a3be6fc6f617f1a337c06af54981048574d8783147" 1587 | dependencies = [ 1588 | "proc-macro2", 1589 | "quote", 1590 | "syn", 1591 | ] 1592 | 1593 | [[package]] 1594 | name = "mime" 1595 | version = "0.3.17" 1596 | source = "registry+https://github.com/rust-lang/crates.io-index" 1597 | checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" 1598 | 1599 | [[package]] 1600 | name = "miniz_oxide" 1601 | version = "0.8.8" 1602 | source = "registry+https://github.com/rust-lang/crates.io-index" 1603 | checksum = "3be647b768db090acb35d5ec5db2b0e1f1de11133ca123b9eacf5137868f892a" 1604 | dependencies = [ 1605 | "adler2", 1606 | ] 1607 | 1608 | [[package]] 1609 | name = "mio" 1610 | version = "1.0.3" 1611 | source = "registry+https://github.com/rust-lang/crates.io-index" 1612 | checksum = "2886843bf800fba2e3377cff24abf6379b4c4d5c6681eaf9ea5b0d15090450bd" 1613 | dependencies = [ 1614 | "libc", 1615 | "wasi 0.11.0+wasi-snapshot-preview1", 1616 | "windows-sys 0.52.0", 1617 | ] 1618 | 1619 | [[package]] 1620 | name = "multimap" 1621 | version = "0.10.0" 1622 | source = "registry+https://github.com/rust-lang/crates.io-index" 1623 | checksum = "defc4c55412d89136f966bbb339008b474350e5e6e78d2714439c386b3137a03" 1624 | 1625 | [[package]] 1626 | name = "new_debug_unreachable" 1627 | version = "1.0.6" 1628 | source = "registry+https://github.com/rust-lang/crates.io-index" 1629 | checksum = "650eef8c711430f1a879fdd01d4745a7deea475becfb90269c06775983bbf086" 1630 | 1631 | [[package]] 1632 | name = "nu-ansi-term" 1633 | version = "0.46.0" 1634 | source = "registry+https://github.com/rust-lang/crates.io-index" 1635 | checksum = "77a8165726e8236064dbb45459242600304b42a5ea24ee2948e18e023bf7ba84" 1636 | dependencies = [ 1637 | "overload", 1638 | "winapi", 1639 | ] 1640 | 1641 | [[package]] 1642 | name = "num" 1643 | version = "0.4.3" 1644 | source = "registry+https://github.com/rust-lang/crates.io-index" 1645 | checksum = "35bd024e8b2ff75562e5f34e7f4905839deb4b22955ef5e73d2fea1b9813cb23" 1646 | dependencies = [ 1647 | "num-bigint", 1648 | "num-complex", 1649 | "num-integer", 1650 | "num-iter", 1651 | "num-rational", 1652 | "num-traits", 1653 | ] 1654 | 1655 | [[package]] 1656 | name = "num-bigint" 1657 | version = "0.4.6" 1658 | source = "registry+https://github.com/rust-lang/crates.io-index" 1659 | checksum = "a5e44f723f1133c9deac646763579fdb3ac745e418f2a7af9cd0c431da1f20b9" 1660 | dependencies = [ 1661 | "num-integer", 1662 | "num-traits", 1663 | ] 1664 | 1665 | [[package]] 1666 | name = "num-complex" 1667 | version = "0.4.6" 1668 | source = "registry+https://github.com/rust-lang/crates.io-index" 1669 | checksum = "73f88a1307638156682bada9d7604135552957b7818057dcef22705b4d509495" 1670 | dependencies = [ 1671 | "num-traits", 1672 | ] 1673 | 1674 | [[package]] 1675 | name = "num-derive" 1676 | version = "0.4.2" 1677 | source = "registry+https://github.com/rust-lang/crates.io-index" 1678 | checksum = "ed3955f1a9c7c0c15e092f9c887db08b1fc683305fdf6eb6684f22555355e202" 1679 | dependencies = [ 1680 | "proc-macro2", 1681 | "quote", 1682 | "syn", 1683 | ] 1684 | 1685 | [[package]] 1686 | name = "num-integer" 1687 | version = "0.1.46" 1688 | source = "registry+https://github.com/rust-lang/crates.io-index" 1689 | checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" 1690 | dependencies = [ 1691 | "num-traits", 1692 | ] 1693 | 1694 | [[package]] 1695 | name = "num-iter" 1696 | version = "0.1.45" 1697 | source = "registry+https://github.com/rust-lang/crates.io-index" 1698 | checksum = "1429034a0490724d0075ebb2bc9e875d6503c3cf69e235a8941aa757d83ef5bf" 1699 | dependencies = [ 1700 | "autocfg", 1701 | "num-integer", 1702 | "num-traits", 1703 | ] 1704 | 1705 | [[package]] 1706 | name = "num-rational" 1707 | version = "0.4.2" 1708 | source = "registry+https://github.com/rust-lang/crates.io-index" 1709 | checksum = "f83d14da390562dca69fc84082e73e548e1ad308d24accdedd2720017cb37824" 1710 | dependencies = [ 1711 | "num-bigint", 1712 | "num-integer", 1713 | "num-traits", 1714 | ] 1715 | 1716 | [[package]] 1717 | name = "num-traits" 1718 | version = "0.2.19" 1719 | source = "registry+https://github.com/rust-lang/crates.io-index" 1720 | checksum = "071dfc062690e90b734c0b2273ce72ad0ffa95f0c74596bc250dcfd960262841" 1721 | dependencies = [ 1722 | "autocfg", 1723 | "libm", 1724 | ] 1725 | 1726 | [[package]] 1727 | name = "num_cpus" 1728 | version = "1.16.0" 1729 | source = "registry+https://github.com/rust-lang/crates.io-index" 1730 | checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" 1731 | dependencies = [ 1732 | "hermit-abi", 1733 | "libc", 1734 | ] 1735 | 1736 | [[package]] 1737 | name = "object" 1738 | version = "0.36.7" 1739 | source = "registry+https://github.com/rust-lang/crates.io-index" 1740 | checksum = "62948e14d923ea95ea2c7c86c71013138b66525b86bdc08d2dcc262bdb497b87" 1741 | dependencies = [ 1742 | "memchr", 1743 | ] 1744 | 1745 | [[package]] 1746 | name = "once_cell" 1747 | version = "1.21.3" 1748 | source = "registry+https://github.com/rust-lang/crates.io-index" 1749 | checksum = "42f5e15c9953c5e4ccceeb2e7382a716482c34515315f7b03532b8b4e8393d2d" 1750 | 1751 | [[package]] 1752 | name = "openssl-probe" 1753 | version = "0.1.6" 1754 | source = "registry+https://github.com/rust-lang/crates.io-index" 1755 | checksum = "d05e27ee213611ffe7d6348b942e8f942b37114c00cc03cec254295a4a17852e" 1756 | 1757 | [[package]] 1758 | name = "overload" 1759 | version = "0.1.1" 1760 | source = "registry+https://github.com/rust-lang/crates.io-index" 1761 | checksum = "b15813163c1d831bf4a13c3610c05c0d03b39feb07f7e09fa234dac9b15aaf39" 1762 | 1763 | [[package]] 1764 | name = "owo-colors" 1765 | version = "4.2.0" 1766 | source = "registry+https://github.com/rust-lang/crates.io-index" 1767 | checksum = "1036865bb9422d3300cf723f657c2851d0e9ab12567854b1f4eba3d77decf564" 1768 | 1769 | [[package]] 1770 | name = "parking_lot" 1771 | version = "0.12.3" 1772 | source = "registry+https://github.com/rust-lang/crates.io-index" 1773 | checksum = "f1bf18183cf54e8d6059647fc3063646a1801cf30896933ec2311622cc4b9a27" 1774 | dependencies = [ 1775 | "lock_api", 1776 | "parking_lot_core", 1777 | ] 1778 | 1779 | [[package]] 1780 | name = "parking_lot_core" 1781 | version = "0.9.10" 1782 | source = "registry+https://github.com/rust-lang/crates.io-index" 1783 | checksum = "1e401f977ab385c9e4e3ab30627d6f26d00e2c73eef317493c4ec6d468726cf8" 1784 | dependencies = [ 1785 | "cfg-if", 1786 | "libc", 1787 | "redox_syscall", 1788 | "smallvec", 1789 | "windows-targets 0.52.6", 1790 | ] 1791 | 1792 | [[package]] 1793 | name = "percent-encoding" 1794 | version = "2.3.1" 1795 | source = "registry+https://github.com/rust-lang/crates.io-index" 1796 | checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" 1797 | 1798 | [[package]] 1799 | name = "petgraph" 1800 | version = "0.6.5" 1801 | source = "registry+https://github.com/rust-lang/crates.io-index" 1802 | checksum = "b4c5cc86750666a3ed20bdaf5ca2a0344f9c67674cae0515bec2da16fbaa47db" 1803 | dependencies = [ 1804 | "fixedbitset", 1805 | "indexmap 2.9.0", 1806 | ] 1807 | 1808 | [[package]] 1809 | name = "phf_shared" 1810 | version = "0.11.3" 1811 | source = "registry+https://github.com/rust-lang/crates.io-index" 1812 | checksum = "67eabc2ef2a60eb7faa00097bd1ffdb5bd28e62bf39990626a582201b7a754e5" 1813 | dependencies = [ 1814 | "siphasher", 1815 | ] 1816 | 1817 | [[package]] 1818 | name = "pin-project" 1819 | version = "1.1.10" 1820 | source = "registry+https://github.com/rust-lang/crates.io-index" 1821 | checksum = "677f1add503faace112b9f1373e43e9e054bfdd22ff1a63c1bc485eaec6a6a8a" 1822 | dependencies = [ 1823 | "pin-project-internal", 1824 | ] 1825 | 1826 | [[package]] 1827 | name = "pin-project-internal" 1828 | version = "1.1.10" 1829 | source = "registry+https://github.com/rust-lang/crates.io-index" 1830 | checksum = "6e918e4ff8c4549eb882f14b3a4bc8c8bc93de829416eacf579f1207a8fbf861" 1831 | dependencies = [ 1832 | "proc-macro2", 1833 | "quote", 1834 | "syn", 1835 | ] 1836 | 1837 | [[package]] 1838 | name = "pin-project-lite" 1839 | version = "0.2.16" 1840 | source = "registry+https://github.com/rust-lang/crates.io-index" 1841 | checksum = "3b3cff922bd51709b605d9ead9aa71031d81447142d828eb4a6eba76fe619f9b" 1842 | 1843 | [[package]] 1844 | name = "pin-utils" 1845 | version = "0.1.0" 1846 | source = "registry+https://github.com/rust-lang/crates.io-index" 1847 | checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" 1848 | 1849 | [[package]] 1850 | name = "pkg-config" 1851 | version = "0.3.32" 1852 | source = "registry+https://github.com/rust-lang/crates.io-index" 1853 | checksum = "7edddbd0b52d732b21ad9a5fab5c704c14cd949e5e9a1ec5929a24fded1b904c" 1854 | 1855 | [[package]] 1856 | name = "ppv-lite86" 1857 | version = "0.2.21" 1858 | source = "registry+https://github.com/rust-lang/crates.io-index" 1859 | checksum = "85eae3c4ed2f50dcfe72643da4befc30deadb458a9b590d720cde2f2b1e97da9" 1860 | dependencies = [ 1861 | "zerocopy 0.8.24", 1862 | ] 1863 | 1864 | [[package]] 1865 | name = "precomputed-hash" 1866 | version = "0.1.1" 1867 | source = "registry+https://github.com/rust-lang/crates.io-index" 1868 | checksum = "925383efa346730478fb4838dbe9137d2a47675ad789c546d150a6e1dd4ab31c" 1869 | 1870 | [[package]] 1871 | name = "prettyplease" 1872 | version = "0.2.32" 1873 | source = "registry+https://github.com/rust-lang/crates.io-index" 1874 | checksum = "664ec5419c51e34154eec046ebcba56312d5a2fc3b09a06da188e1ad21afadf6" 1875 | dependencies = [ 1876 | "proc-macro2", 1877 | "syn", 1878 | ] 1879 | 1880 | [[package]] 1881 | name = "proc-macro2" 1882 | version = "1.0.95" 1883 | source = "registry+https://github.com/rust-lang/crates.io-index" 1884 | checksum = "02b3e5e68a3a1a02aad3ec490a98007cbc13c37cbe84a3cd7b8e406d76e7f778" 1885 | dependencies = [ 1886 | "unicode-ident", 1887 | ] 1888 | 1889 | [[package]] 1890 | name = "prost" 1891 | version = "0.13.5" 1892 | source = "registry+https://github.com/rust-lang/crates.io-index" 1893 | checksum = "2796faa41db3ec313a31f7624d9286acf277b52de526150b7e69f3debf891ee5" 1894 | dependencies = [ 1895 | "bytes", 1896 | "prost-derive", 1897 | ] 1898 | 1899 | [[package]] 1900 | name = "prost-build" 1901 | version = "0.13.5" 1902 | source = "registry+https://github.com/rust-lang/crates.io-index" 1903 | checksum = "be769465445e8c1474e9c5dac2018218498557af32d9ed057325ec9a41ae81bf" 1904 | dependencies = [ 1905 | "heck", 1906 | "itertools", 1907 | "log", 1908 | "multimap", 1909 | "once_cell", 1910 | "petgraph", 1911 | "prettyplease", 1912 | "prost", 1913 | "prost-types", 1914 | "regex", 1915 | "syn", 1916 | "tempfile", 1917 | ] 1918 | 1919 | [[package]] 1920 | name = "prost-derive" 1921 | version = "0.13.5" 1922 | source = "registry+https://github.com/rust-lang/crates.io-index" 1923 | checksum = "8a56d757972c98b346a9b766e3f02746cde6dd1cd1d1d563472929fdd74bec4d" 1924 | dependencies = [ 1925 | "anyhow", 1926 | "itertools", 1927 | "proc-macro2", 1928 | "quote", 1929 | "syn", 1930 | ] 1931 | 1932 | [[package]] 1933 | name = "prost-reflect" 1934 | version = "0.14.7" 1935 | source = "registry+https://github.com/rust-lang/crates.io-index" 1936 | checksum = "7b5edd582b62f5cde844716e66d92565d7faf7ab1445c8cebce6e00fba83ddb2" 1937 | dependencies = [ 1938 | "logos", 1939 | "miette", 1940 | "once_cell", 1941 | "prost", 1942 | "prost-types", 1943 | ] 1944 | 1945 | [[package]] 1946 | name = "prost-types" 1947 | version = "0.13.5" 1948 | source = "registry+https://github.com/rust-lang/crates.io-index" 1949 | checksum = "52c2c1bf36ddb1a1c396b3601a3cec27c2462e45f07c386894ec3ccf5332bd16" 1950 | dependencies = [ 1951 | "prost", 1952 | ] 1953 | 1954 | [[package]] 1955 | name = "protox" 1956 | version = "0.7.2" 1957 | source = "registry+https://github.com/rust-lang/crates.io-index" 1958 | checksum = "6f352af331bf637b8ecc720f7c87bf903d2571fa2e14a66e9b2558846864b54a" 1959 | dependencies = [ 1960 | "bytes", 1961 | "miette", 1962 | "prost", 1963 | "prost-reflect", 1964 | "prost-types", 1965 | "protox-parse", 1966 | "thiserror 1.0.69", 1967 | ] 1968 | 1969 | [[package]] 1970 | name = "protox-parse" 1971 | version = "0.7.0" 1972 | source = "registry+https://github.com/rust-lang/crates.io-index" 1973 | checksum = "a3a462d115462c080ae000c29a47f0b3985737e5d3a995fcdbcaa5c782068dde" 1974 | dependencies = [ 1975 | "logos", 1976 | "miette", 1977 | "prost-types", 1978 | "thiserror 1.0.69", 1979 | ] 1980 | 1981 | [[package]] 1982 | name = "quote" 1983 | version = "1.0.40" 1984 | source = "registry+https://github.com/rust-lang/crates.io-index" 1985 | checksum = "1885c039570dc00dcb4ff087a89e185fd56bae234ddc7f056a945bf36467248d" 1986 | dependencies = [ 1987 | "proc-macro2", 1988 | ] 1989 | 1990 | [[package]] 1991 | name = "r-efi" 1992 | version = "5.2.0" 1993 | source = "registry+https://github.com/rust-lang/crates.io-index" 1994 | checksum = "74765f6d916ee2faa39bc8e68e4f3ed8949b48cccdac59983d287a7cb71ce9c5" 1995 | 1996 | [[package]] 1997 | name = "rand" 1998 | version = "0.8.5" 1999 | source = "registry+https://github.com/rust-lang/crates.io-index" 2000 | checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" 2001 | dependencies = [ 2002 | "libc", 2003 | "rand_chacha 0.3.1", 2004 | "rand_core 0.6.4", 2005 | ] 2006 | 2007 | [[package]] 2008 | name = "rand" 2009 | version = "0.9.1" 2010 | source = "registry+https://github.com/rust-lang/crates.io-index" 2011 | checksum = "9fbfd9d094a40bf3ae768db9361049ace4c0e04a4fd6b359518bd7b73a73dd97" 2012 | dependencies = [ 2013 | "rand_chacha 0.9.0", 2014 | "rand_core 0.9.3", 2015 | ] 2016 | 2017 | [[package]] 2018 | name = "rand_chacha" 2019 | version = "0.3.1" 2020 | source = "registry+https://github.com/rust-lang/crates.io-index" 2021 | checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" 2022 | dependencies = [ 2023 | "ppv-lite86", 2024 | "rand_core 0.6.4", 2025 | ] 2026 | 2027 | [[package]] 2028 | name = "rand_chacha" 2029 | version = "0.9.0" 2030 | source = "registry+https://github.com/rust-lang/crates.io-index" 2031 | checksum = "d3022b5f1df60f26e1ffddd6c66e8aa15de382ae63b3a0c1bfc0e4d3e3f325cb" 2032 | dependencies = [ 2033 | "ppv-lite86", 2034 | "rand_core 0.9.3", 2035 | ] 2036 | 2037 | [[package]] 2038 | name = "rand_core" 2039 | version = "0.6.4" 2040 | source = "registry+https://github.com/rust-lang/crates.io-index" 2041 | checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" 2042 | dependencies = [ 2043 | "getrandom 0.2.16", 2044 | ] 2045 | 2046 | [[package]] 2047 | name = "rand_core" 2048 | version = "0.9.3" 2049 | source = "registry+https://github.com/rust-lang/crates.io-index" 2050 | checksum = "99d9a13982dcf210057a8a78572b2217b667c3beacbf3a0d8b454f6f82837d38" 2051 | dependencies = [ 2052 | "getrandom 0.3.2", 2053 | ] 2054 | 2055 | [[package]] 2056 | name = "rand_xoshiro" 2057 | version = "0.7.0" 2058 | source = "registry+https://github.com/rust-lang/crates.io-index" 2059 | checksum = "f703f4665700daf5512dcca5f43afa6af89f09db47fb56be587f80636bda2d41" 2060 | dependencies = [ 2061 | "rand_core 0.9.3", 2062 | ] 2063 | 2064 | [[package]] 2065 | name = "rayon" 2066 | version = "1.10.0" 2067 | source = "registry+https://github.com/rust-lang/crates.io-index" 2068 | checksum = "b418a60154510ca1a002a752ca9714984e21e4241e804d32555251faf8b78ffa" 2069 | dependencies = [ 2070 | "either", 2071 | "rayon-core", 2072 | ] 2073 | 2074 | [[package]] 2075 | name = "rayon-core" 2076 | version = "1.12.1" 2077 | source = "registry+https://github.com/rust-lang/crates.io-index" 2078 | checksum = "1465873a3dfdaa8ae7cb14b4383657caab0b3e8a0aa9ae8e04b044854c8dfce2" 2079 | dependencies = [ 2080 | "crossbeam-deque", 2081 | "crossbeam-utils", 2082 | ] 2083 | 2084 | [[package]] 2085 | name = "redox_syscall" 2086 | version = "0.5.11" 2087 | source = "registry+https://github.com/rust-lang/crates.io-index" 2088 | checksum = "d2f103c6d277498fbceb16e84d317e2a400f160f46904d5f5410848c829511a3" 2089 | dependencies = [ 2090 | "bitflags", 2091 | ] 2092 | 2093 | [[package]] 2094 | name = "redox_users" 2095 | version = "0.4.6" 2096 | source = "registry+https://github.com/rust-lang/crates.io-index" 2097 | checksum = "ba009ff324d1fc1b900bd1fdb31564febe58a8ccc8a6fdbb93b543d33b13ca43" 2098 | dependencies = [ 2099 | "getrandom 0.2.16", 2100 | "libredox", 2101 | "thiserror 1.0.69", 2102 | ] 2103 | 2104 | [[package]] 2105 | name = "regex" 2106 | version = "1.11.1" 2107 | source = "registry+https://github.com/rust-lang/crates.io-index" 2108 | checksum = "b544ef1b4eac5dc2db33ea63606ae9ffcfac26c1416a2806ae0bf5f56b201191" 2109 | dependencies = [ 2110 | "aho-corasick", 2111 | "memchr", 2112 | "regex-automata 0.4.9", 2113 | "regex-syntax 0.8.5", 2114 | ] 2115 | 2116 | [[package]] 2117 | name = "regex-automata" 2118 | version = "0.1.10" 2119 | source = "registry+https://github.com/rust-lang/crates.io-index" 2120 | checksum = "6c230d73fb8d8c1b9c0b3135c5142a8acee3a0558fb8db5cf1cb65f8d7862132" 2121 | dependencies = [ 2122 | "regex-syntax 0.6.29", 2123 | ] 2124 | 2125 | [[package]] 2126 | name = "regex-automata" 2127 | version = "0.4.9" 2128 | source = "registry+https://github.com/rust-lang/crates.io-index" 2129 | checksum = "809e8dc61f6de73b46c85f4c96486310fe304c434cfa43669d7b40f711150908" 2130 | dependencies = [ 2131 | "aho-corasick", 2132 | "memchr", 2133 | "regex-syntax 0.8.5", 2134 | ] 2135 | 2136 | [[package]] 2137 | name = "regex-syntax" 2138 | version = "0.6.29" 2139 | source = "registry+https://github.com/rust-lang/crates.io-index" 2140 | checksum = "f162c6dd7b008981e4d40210aca20b4bd0f9b60ca9271061b07f78537722f2e1" 2141 | 2142 | [[package]] 2143 | name = "regex-syntax" 2144 | version = "0.8.5" 2145 | source = "registry+https://github.com/rust-lang/crates.io-index" 2146 | checksum = "2b15c43186be67a4fd63bee50d0303afffcef381492ebe2c5d87f324e1b8815c" 2147 | 2148 | [[package]] 2149 | name = "ring" 2150 | version = "0.17.14" 2151 | source = "registry+https://github.com/rust-lang/crates.io-index" 2152 | checksum = "a4689e6c2294d81e88dc6261c768b63bc4fcdb852be6d1352498b114f61383b7" 2153 | dependencies = [ 2154 | "cc", 2155 | "cfg-if", 2156 | "getrandom 0.2.16", 2157 | "libc", 2158 | "untrusted", 2159 | "windows-sys 0.52.0", 2160 | ] 2161 | 2162 | [[package]] 2163 | name = "rusqlite" 2164 | version = "0.32.1" 2165 | source = "registry+https://github.com/rust-lang/crates.io-index" 2166 | checksum = "7753b721174eb8ff87a9a0e799e2d7bc3749323e773db92e0984debb00019d6e" 2167 | dependencies = [ 2168 | "bitflags", 2169 | "fallible-iterator", 2170 | "fallible-streaming-iterator", 2171 | "hashlink", 2172 | "libsqlite3-sys", 2173 | "smallvec", 2174 | ] 2175 | 2176 | [[package]] 2177 | name = "rustc-demangle" 2178 | version = "0.1.24" 2179 | source = "registry+https://github.com/rust-lang/crates.io-index" 2180 | checksum = "719b953e2095829ee67db738b3bfa9fa368c94900df327b3f07fe6e794d2fe1f" 2181 | 2182 | [[package]] 2183 | name = "rustc_version" 2184 | version = "0.2.3" 2185 | source = "registry+https://github.com/rust-lang/crates.io-index" 2186 | checksum = "138e3e0acb6c9fb258b19b67cb8abd63c00679d2851805ea151465464fe9030a" 2187 | dependencies = [ 2188 | "semver 0.9.0", 2189 | ] 2190 | 2191 | [[package]] 2192 | name = "rustc_version" 2193 | version = "0.4.1" 2194 | source = "registry+https://github.com/rust-lang/crates.io-index" 2195 | checksum = "cfcb3a22ef46e85b45de6ee7e79d063319ebb6594faafcf1c225ea92ab6e9b92" 2196 | dependencies = [ 2197 | "semver 1.0.26", 2198 | ] 2199 | 2200 | [[package]] 2201 | name = "rustix" 2202 | version = "0.38.44" 2203 | source = "registry+https://github.com/rust-lang/crates.io-index" 2204 | checksum = "fdb5bc1ae2baa591800df16c9ca78619bf65c0488b41b96ccec5d11220d8c154" 2205 | dependencies = [ 2206 | "bitflags", 2207 | "errno", 2208 | "libc", 2209 | "linux-raw-sys 0.4.15", 2210 | "windows-sys 0.59.0", 2211 | ] 2212 | 2213 | [[package]] 2214 | name = "rustix" 2215 | version = "1.0.5" 2216 | source = "registry+https://github.com/rust-lang/crates.io-index" 2217 | checksum = "d97817398dd4bb2e6da002002db259209759911da105da92bec29ccb12cf58bf" 2218 | dependencies = [ 2219 | "bitflags", 2220 | "errno", 2221 | "libc", 2222 | "linux-raw-sys 0.9.4", 2223 | "windows-sys 0.59.0", 2224 | ] 2225 | 2226 | [[package]] 2227 | name = "rustls" 2228 | version = "0.23.26" 2229 | source = "registry+https://github.com/rust-lang/crates.io-index" 2230 | checksum = "df51b5869f3a441595eac5e8ff14d486ff285f7b8c0df8770e49c3b56351f0f0" 2231 | dependencies = [ 2232 | "log", 2233 | "once_cell", 2234 | "ring", 2235 | "rustls-pki-types", 2236 | "rustls-webpki", 2237 | "subtle", 2238 | "zeroize", 2239 | ] 2240 | 2241 | [[package]] 2242 | name = "rustls-native-certs" 2243 | version = "0.8.1" 2244 | source = "registry+https://github.com/rust-lang/crates.io-index" 2245 | checksum = "7fcff2dd52b58a8d98a70243663a0d234c4e2b79235637849d15913394a247d3" 2246 | dependencies = [ 2247 | "openssl-probe", 2248 | "rustls-pki-types", 2249 | "schannel", 2250 | "security-framework", 2251 | ] 2252 | 2253 | [[package]] 2254 | name = "rustls-pemfile" 2255 | version = "2.2.0" 2256 | source = "registry+https://github.com/rust-lang/crates.io-index" 2257 | checksum = "dce314e5fee3f39953d46bb63bb8a46d40c2f8fb7cc5a3b6cab2bde9721d6e50" 2258 | dependencies = [ 2259 | "rustls-pki-types", 2260 | ] 2261 | 2262 | [[package]] 2263 | name = "rustls-pki-types" 2264 | version = "1.11.0" 2265 | source = "registry+https://github.com/rust-lang/crates.io-index" 2266 | checksum = "917ce264624a4b4db1c364dcc35bfca9ded014d0a958cd47ad3e960e988ea51c" 2267 | 2268 | [[package]] 2269 | name = "rustls-webpki" 2270 | version = "0.103.1" 2271 | source = "registry+https://github.com/rust-lang/crates.io-index" 2272 | checksum = "fef8b8769aaccf73098557a87cd1816b4f9c7c16811c9c77142aa695c16f2c03" 2273 | dependencies = [ 2274 | "ring", 2275 | "rustls-pki-types", 2276 | "untrusted", 2277 | ] 2278 | 2279 | [[package]] 2280 | name = "rustversion" 2281 | version = "1.0.20" 2282 | source = "registry+https://github.com/rust-lang/crates.io-index" 2283 | checksum = "eded382c5f5f786b989652c49544c4877d9f015cc22e145a5ea8ea66c2921cd2" 2284 | 2285 | [[package]] 2286 | name = "ryu" 2287 | version = "1.0.20" 2288 | source = "registry+https://github.com/rust-lang/crates.io-index" 2289 | checksum = "28d3b2b1366ec20994f1fd18c3c594f05c5dd4bc44d8bb0c1c632c8d6829481f" 2290 | 2291 | [[package]] 2292 | name = "same-file" 2293 | version = "1.0.6" 2294 | source = "registry+https://github.com/rust-lang/crates.io-index" 2295 | checksum = "93fc1dc3aaa9bfed95e02e6eadabb4baf7e3078b0bd1b4d7b6b0b68378900502" 2296 | dependencies = [ 2297 | "winapi-util", 2298 | ] 2299 | 2300 | [[package]] 2301 | name = "schannel" 2302 | version = "0.1.27" 2303 | source = "registry+https://github.com/rust-lang/crates.io-index" 2304 | checksum = "1f29ebaa345f945cec9fbbc532eb307f0fdad8161f281b6369539c8d84876b3d" 2305 | dependencies = [ 2306 | "windows-sys 0.59.0", 2307 | ] 2308 | 2309 | [[package]] 2310 | name = "scoped-tls" 2311 | version = "1.0.1" 2312 | source = "registry+https://github.com/rust-lang/crates.io-index" 2313 | checksum = "e1cf6437eb19a8f4a6cc0f7dca544973b0b78843adbfeb3683d1a94a0024a294" 2314 | 2315 | [[package]] 2316 | name = "scopeguard" 2317 | version = "1.2.0" 2318 | source = "registry+https://github.com/rust-lang/crates.io-index" 2319 | checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" 2320 | 2321 | [[package]] 2322 | name = "security-framework" 2323 | version = "3.2.0" 2324 | source = "registry+https://github.com/rust-lang/crates.io-index" 2325 | checksum = "271720403f46ca04f7ba6f55d438f8bd878d6b8ca0a1046e8228c4145bcbb316" 2326 | dependencies = [ 2327 | "bitflags", 2328 | "core-foundation", 2329 | "core-foundation-sys", 2330 | "libc", 2331 | "security-framework-sys", 2332 | ] 2333 | 2334 | [[package]] 2335 | name = "security-framework-sys" 2336 | version = "2.14.0" 2337 | source = "registry+https://github.com/rust-lang/crates.io-index" 2338 | checksum = "49db231d56a190491cb4aeda9527f1ad45345af50b0851622a7adb8c03b01c32" 2339 | dependencies = [ 2340 | "core-foundation-sys", 2341 | "libc", 2342 | ] 2343 | 2344 | [[package]] 2345 | name = "semver" 2346 | version = "0.9.0" 2347 | source = "registry+https://github.com/rust-lang/crates.io-index" 2348 | checksum = "1d7eb9ef2c18661902cc47e535f9bc51b78acd254da71d375c2f6720d9a40403" 2349 | dependencies = [ 2350 | "semver-parser", 2351 | ] 2352 | 2353 | [[package]] 2354 | name = "semver" 2355 | version = "1.0.26" 2356 | source = "registry+https://github.com/rust-lang/crates.io-index" 2357 | checksum = "56e6fa9c48d24d85fb3de5ad847117517440f6beceb7798af16b4a87d616b8d0" 2358 | dependencies = [ 2359 | "serde", 2360 | ] 2361 | 2362 | [[package]] 2363 | name = "semver-parser" 2364 | version = "0.7.0" 2365 | source = "registry+https://github.com/rust-lang/crates.io-index" 2366 | checksum = "388a1df253eca08550bef6c72392cfe7c30914bf41df5269b68cbd6ff8f570a3" 2367 | 2368 | [[package]] 2369 | name = "serde" 2370 | version = "1.0.219" 2371 | source = "registry+https://github.com/rust-lang/crates.io-index" 2372 | checksum = "5f0e2c6ed6606019b4e29e69dbaba95b11854410e5347d525002456dbbb786b6" 2373 | dependencies = [ 2374 | "serde_derive", 2375 | ] 2376 | 2377 | [[package]] 2378 | name = "serde_derive" 2379 | version = "1.0.219" 2380 | source = "registry+https://github.com/rust-lang/crates.io-index" 2381 | checksum = "5b0276cf7f2c73365f7157c8123c21cd9a50fbbd844757af28ca1f5925fc2a00" 2382 | dependencies = [ 2383 | "proc-macro2", 2384 | "quote", 2385 | "syn", 2386 | ] 2387 | 2388 | [[package]] 2389 | name = "serde_json" 2390 | version = "1.0.140" 2391 | source = "registry+https://github.com/rust-lang/crates.io-index" 2392 | checksum = "20068b6e96dc6c9bd23e01df8827e6c7e1f2fddd43c21810382803c136b99373" 2393 | dependencies = [ 2394 | "itoa", 2395 | "memchr", 2396 | "ryu", 2397 | "serde", 2398 | ] 2399 | 2400 | [[package]] 2401 | name = "serde_spanned" 2402 | version = "0.6.8" 2403 | source = "registry+https://github.com/rust-lang/crates.io-index" 2404 | checksum = "87607cb1398ed59d48732e575a4c28a7a8ebf2454b964fe3f224f2afc07909e1" 2405 | dependencies = [ 2406 | "serde", 2407 | ] 2408 | 2409 | [[package]] 2410 | name = "sha2" 2411 | version = "0.10.8" 2412 | source = "registry+https://github.com/rust-lang/crates.io-index" 2413 | checksum = "793db75ad2bcafc3ffa7c68b215fee268f537982cd901d132f89c6343f3a3dc8" 2414 | dependencies = [ 2415 | "cfg-if", 2416 | "cpufeatures", 2417 | "digest", 2418 | ] 2419 | 2420 | [[package]] 2421 | name = "sha3" 2422 | version = "0.10.8" 2423 | source = "registry+https://github.com/rust-lang/crates.io-index" 2424 | checksum = "75872d278a8f37ef87fa0ddbda7802605cb18344497949862c0d4dcb291eba60" 2425 | dependencies = [ 2426 | "digest", 2427 | "keccak", 2428 | ] 2429 | 2430 | [[package]] 2431 | name = "sharded-slab" 2432 | version = "0.1.7" 2433 | source = "registry+https://github.com/rust-lang/crates.io-index" 2434 | checksum = "f40ca3c46823713e0d4209592e8d6e826aa57e928f09752619fc696c499637f6" 2435 | dependencies = [ 2436 | "lazy_static", 2437 | ] 2438 | 2439 | [[package]] 2440 | name = "shlex" 2441 | version = "1.3.0" 2442 | source = "registry+https://github.com/rust-lang/crates.io-index" 2443 | checksum = "0fda2ff0d084019ba4d7c6f371c95d8fd75ce3524c3cb8fb653a3023f6323e64" 2444 | 2445 | [[package]] 2446 | name = "signal-hook-registry" 2447 | version = "1.4.5" 2448 | source = "registry+https://github.com/rust-lang/crates.io-index" 2449 | checksum = "9203b8055f63a2a00e2f593bb0510367fe707d7ff1e5c872de2f537b339e5410" 2450 | dependencies = [ 2451 | "libc", 2452 | ] 2453 | 2454 | [[package]] 2455 | name = "siphasher" 2456 | version = "1.0.1" 2457 | source = "registry+https://github.com/rust-lang/crates.io-index" 2458 | checksum = "56199f7ddabf13fe5074ce809e7d3f42b42ae711800501b5b16ea82ad029c39d" 2459 | 2460 | [[package]] 2461 | name = "slab" 2462 | version = "0.4.9" 2463 | source = "registry+https://github.com/rust-lang/crates.io-index" 2464 | checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" 2465 | dependencies = [ 2466 | "autocfg", 2467 | ] 2468 | 2469 | [[package]] 2470 | name = "smallvec" 2471 | version = "1.15.0" 2472 | source = "registry+https://github.com/rust-lang/crates.io-index" 2473 | checksum = "8917285742e9f3e1683f0a9c4e6b57960b7314d0b08d30d1ecd426713ee2eee9" 2474 | 2475 | [[package]] 2476 | name = "smawk" 2477 | version = "0.3.2" 2478 | source = "registry+https://github.com/rust-lang/crates.io-index" 2479 | checksum = "b7c388c1b5e93756d0c740965c41e8822f866621d41acbdf6336a6a168f8840c" 2480 | 2481 | [[package]] 2482 | name = "socket2" 2483 | version = "0.5.9" 2484 | source = "registry+https://github.com/rust-lang/crates.io-index" 2485 | checksum = "4f5fd57c80058a56cf5c777ab8a126398ece8e442983605d280a44ce79d0edef" 2486 | dependencies = [ 2487 | "libc", 2488 | "windows-sys 0.52.0", 2489 | ] 2490 | 2491 | [[package]] 2492 | name = "spin" 2493 | version = "0.9.8" 2494 | source = "registry+https://github.com/rust-lang/crates.io-index" 2495 | checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" 2496 | 2497 | [[package]] 2498 | name = "string_cache" 2499 | version = "0.8.9" 2500 | source = "registry+https://github.com/rust-lang/crates.io-index" 2501 | checksum = "bf776ba3fa74f83bf4b63c3dcbbf82173db2632ed8452cb2d891d33f459de70f" 2502 | dependencies = [ 2503 | "new_debug_unreachable", 2504 | "parking_lot", 2505 | "phf_shared", 2506 | "precomputed-hash", 2507 | ] 2508 | 2509 | [[package]] 2510 | name = "strip-ansi-escapes" 2511 | version = "0.2.1" 2512 | source = "registry+https://github.com/rust-lang/crates.io-index" 2513 | checksum = "2a8f8038e7e7969abb3f1b7c2a811225e9296da208539e0f79c5251d6cac0025" 2514 | dependencies = [ 2515 | "vte", 2516 | ] 2517 | 2518 | [[package]] 2519 | name = "strsim" 2520 | version = "0.11.1" 2521 | source = "registry+https://github.com/rust-lang/crates.io-index" 2522 | checksum = "7da8b5736845d9f2fcb837ea5d9e2628564b3b043a70948a3f0b778838c5fb4f" 2523 | 2524 | [[package]] 2525 | name = "subtle" 2526 | version = "2.6.1" 2527 | source = "registry+https://github.com/rust-lang/crates.io-index" 2528 | checksum = "13c2bddecc57b384dee18652358fb23172facb8a2c51ccc10d74c157bdea3292" 2529 | 2530 | [[package]] 2531 | name = "supports-color" 2532 | version = "3.0.2" 2533 | source = "registry+https://github.com/rust-lang/crates.io-index" 2534 | checksum = "c64fc7232dd8d2e4ac5ce4ef302b1d81e0b80d055b9d77c7c4f51f6aa4c867d6" 2535 | dependencies = [ 2536 | "is_ci", 2537 | ] 2538 | 2539 | [[package]] 2540 | name = "supports-hyperlinks" 2541 | version = "3.1.0" 2542 | source = "registry+https://github.com/rust-lang/crates.io-index" 2543 | checksum = "804f44ed3c63152de6a9f90acbea1a110441de43006ea51bcce8f436196a288b" 2544 | 2545 | [[package]] 2546 | name = "supports-unicode" 2547 | version = "3.0.0" 2548 | source = "registry+https://github.com/rust-lang/crates.io-index" 2549 | checksum = "b7401a30af6cb5818bb64852270bb722533397edcfc7344954a38f420819ece2" 2550 | 2551 | [[package]] 2552 | name = "syn" 2553 | version = "2.0.100" 2554 | source = "registry+https://github.com/rust-lang/crates.io-index" 2555 | checksum = "b09a44accad81e1ba1cd74a32461ba89dee89095ba17b32f5d03683b1b1fc2a0" 2556 | dependencies = [ 2557 | "proc-macro2", 2558 | "quote", 2559 | "unicode-ident", 2560 | ] 2561 | 2562 | [[package]] 2563 | name = "sync_wrapper" 2564 | version = "1.0.2" 2565 | source = "registry+https://github.com/rust-lang/crates.io-index" 2566 | checksum = "0bf256ce5efdfa370213c1dabab5935a12e49f2c58d15e9eac2870d3b4f27263" 2567 | 2568 | [[package]] 2569 | name = "target-triple" 2570 | version = "0.1.4" 2571 | source = "registry+https://github.com/rust-lang/crates.io-index" 2572 | checksum = "1ac9aa371f599d22256307c24a9d748c041e548cbf599f35d890f9d365361790" 2573 | 2574 | [[package]] 2575 | name = "tempfile" 2576 | version = "3.19.1" 2577 | source = "registry+https://github.com/rust-lang/crates.io-index" 2578 | checksum = "7437ac7763b9b123ccf33c338a5cc1bac6f69b45a136c19bdd8a65e3916435bf" 2579 | dependencies = [ 2580 | "fastrand", 2581 | "getrandom 0.3.2", 2582 | "once_cell", 2583 | "rustix 1.0.5", 2584 | "windows-sys 0.59.0", 2585 | ] 2586 | 2587 | [[package]] 2588 | name = "term" 2589 | version = "0.7.0" 2590 | source = "registry+https://github.com/rust-lang/crates.io-index" 2591 | checksum = "c59df8ac95d96ff9bede18eb7300b0fda5e5d8d90960e76f8e14ae765eedbf1f" 2592 | dependencies = [ 2593 | "dirs-next", 2594 | "rustversion", 2595 | "winapi", 2596 | ] 2597 | 2598 | [[package]] 2599 | name = "termcolor" 2600 | version = "1.4.1" 2601 | source = "registry+https://github.com/rust-lang/crates.io-index" 2602 | checksum = "06794f8f6c5c898b3275aebefa6b8a1cb24cd2c6c79397ab15774837a0bc5755" 2603 | dependencies = [ 2604 | "winapi-util", 2605 | ] 2606 | 2607 | [[package]] 2608 | name = "terminal_size" 2609 | version = "0.3.0" 2610 | source = "registry+https://github.com/rust-lang/crates.io-index" 2611 | checksum = "21bebf2b7c9e0a515f6e0f8c51dc0f8e4696391e6f1ff30379559f8365fb0df7" 2612 | dependencies = [ 2613 | "rustix 0.38.44", 2614 | "windows-sys 0.48.0", 2615 | ] 2616 | 2617 | [[package]] 2618 | name = "terminal_size" 2619 | version = "0.4.2" 2620 | source = "registry+https://github.com/rust-lang/crates.io-index" 2621 | checksum = "45c6481c4829e4cc63825e62c49186a34538b7b2750b73b266581ffb612fb5ed" 2622 | dependencies = [ 2623 | "rustix 1.0.5", 2624 | "windows-sys 0.59.0", 2625 | ] 2626 | 2627 | [[package]] 2628 | name = "textwrap" 2629 | version = "0.16.2" 2630 | source = "registry+https://github.com/rust-lang/crates.io-index" 2631 | checksum = "c13547615a44dc9c452a8a534638acdf07120d4b6847c8178705da06306a3057" 2632 | dependencies = [ 2633 | "smawk", 2634 | "unicode-linebreak", 2635 | "unicode-width 0.2.0", 2636 | ] 2637 | 2638 | [[package]] 2639 | name = "thiserror" 2640 | version = "1.0.69" 2641 | source = "registry+https://github.com/rust-lang/crates.io-index" 2642 | checksum = "b6aaf5339b578ea85b50e080feb250a3e8ae8cfcdff9a461c9ec2904bc923f52" 2643 | dependencies = [ 2644 | "thiserror-impl 1.0.69", 2645 | ] 2646 | 2647 | [[package]] 2648 | name = "thiserror" 2649 | version = "2.0.12" 2650 | source = "registry+https://github.com/rust-lang/crates.io-index" 2651 | checksum = "567b8a2dae586314f7be2a752ec7474332959c6460e02bde30d702a66d488708" 2652 | dependencies = [ 2653 | "thiserror-impl 2.0.12", 2654 | ] 2655 | 2656 | [[package]] 2657 | name = "thiserror-impl" 2658 | version = "1.0.69" 2659 | source = "registry+https://github.com/rust-lang/crates.io-index" 2660 | checksum = "4fee6c4efc90059e10f81e6d42c60a18f76588c3d74cb83a0b242a2b6c7504c1" 2661 | dependencies = [ 2662 | "proc-macro2", 2663 | "quote", 2664 | "syn", 2665 | ] 2666 | 2667 | [[package]] 2668 | name = "thiserror-impl" 2669 | version = "2.0.12" 2670 | source = "registry+https://github.com/rust-lang/crates.io-index" 2671 | checksum = "7f7cf42b4507d8ea322120659672cf1b9dbb93f8f2d4ecfd6e51350ff5b17a1d" 2672 | dependencies = [ 2673 | "proc-macro2", 2674 | "quote", 2675 | "syn", 2676 | ] 2677 | 2678 | [[package]] 2679 | name = "thread_local" 2680 | version = "1.1.8" 2681 | source = "registry+https://github.com/rust-lang/crates.io-index" 2682 | checksum = "8b9ef9bad013ada3808854ceac7b46812a6465ba368859a37e2100283d2d719c" 2683 | dependencies = [ 2684 | "cfg-if", 2685 | "once_cell", 2686 | ] 2687 | 2688 | [[package]] 2689 | name = "tiny-keccak" 2690 | version = "2.0.2" 2691 | source = "registry+https://github.com/rust-lang/crates.io-index" 2692 | checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" 2693 | dependencies = [ 2694 | "crunchy", 2695 | ] 2696 | 2697 | [[package]] 2698 | name = "tokio" 2699 | version = "1.44.2" 2700 | source = "registry+https://github.com/rust-lang/crates.io-index" 2701 | checksum = "e6b88822cbe49de4185e3a4cbf8321dd487cf5fe0c5c65695fef6346371e9c48" 2702 | dependencies = [ 2703 | "backtrace", 2704 | "bytes", 2705 | "libc", 2706 | "mio", 2707 | "parking_lot", 2708 | "pin-project-lite", 2709 | "signal-hook-registry", 2710 | "socket2", 2711 | "tokio-macros", 2712 | "windows-sys 0.52.0", 2713 | ] 2714 | 2715 | [[package]] 2716 | name = "tokio-macros" 2717 | version = "2.5.0" 2718 | source = "registry+https://github.com/rust-lang/crates.io-index" 2719 | checksum = "6e06d43f1345a3bcd39f6a56dbb7dcab2ba47e68e8ac134855e7e2bdbaf8cab8" 2720 | dependencies = [ 2721 | "proc-macro2", 2722 | "quote", 2723 | "syn", 2724 | ] 2725 | 2726 | [[package]] 2727 | name = "tokio-rustls" 2728 | version = "0.26.2" 2729 | source = "registry+https://github.com/rust-lang/crates.io-index" 2730 | checksum = "8e727b36a1a0e8b74c376ac2211e40c2c8af09fb4013c60d910495810f008e9b" 2731 | dependencies = [ 2732 | "rustls", 2733 | "tokio", 2734 | ] 2735 | 2736 | [[package]] 2737 | name = "tokio-stream" 2738 | version = "0.1.17" 2739 | source = "registry+https://github.com/rust-lang/crates.io-index" 2740 | checksum = "eca58d7bba4a75707817a2c44174253f9236b2d5fbd055602e9d5c07c139a047" 2741 | dependencies = [ 2742 | "futures-core", 2743 | "pin-project-lite", 2744 | "tokio", 2745 | ] 2746 | 2747 | [[package]] 2748 | name = "tokio-util" 2749 | version = "0.7.15" 2750 | source = "registry+https://github.com/rust-lang/crates.io-index" 2751 | checksum = "66a539a9ad6d5d281510d5bd368c973d636c02dbf8a67300bfb6b950696ad7df" 2752 | dependencies = [ 2753 | "bytes", 2754 | "futures-core", 2755 | "futures-sink", 2756 | "pin-project-lite", 2757 | "tokio", 2758 | ] 2759 | 2760 | [[package]] 2761 | name = "toml" 2762 | version = "0.8.20" 2763 | source = "registry+https://github.com/rust-lang/crates.io-index" 2764 | checksum = "cd87a5cdd6ffab733b2f74bc4fd7ee5fff6634124999ac278c35fc78c6120148" 2765 | dependencies = [ 2766 | "serde", 2767 | "serde_spanned", 2768 | "toml_datetime", 2769 | "toml_edit", 2770 | ] 2771 | 2772 | [[package]] 2773 | name = "toml_datetime" 2774 | version = "0.6.8" 2775 | source = "registry+https://github.com/rust-lang/crates.io-index" 2776 | checksum = "0dd7358ecb8fc2f8d014bf86f6f638ce72ba252a2c3a2572f2a795f1d23efb41" 2777 | dependencies = [ 2778 | "serde", 2779 | ] 2780 | 2781 | [[package]] 2782 | name = "toml_edit" 2783 | version = "0.22.24" 2784 | source = "registry+https://github.com/rust-lang/crates.io-index" 2785 | checksum = "17b4795ff5edd201c7cd6dca065ae59972ce77d1b80fa0a84d94950ece7d1474" 2786 | dependencies = [ 2787 | "indexmap 2.9.0", 2788 | "serde", 2789 | "serde_spanned", 2790 | "toml_datetime", 2791 | "winnow", 2792 | ] 2793 | 2794 | [[package]] 2795 | name = "tonic" 2796 | version = "0.12.3" 2797 | source = "registry+https://github.com/rust-lang/crates.io-index" 2798 | checksum = "877c5b330756d856ffcc4553ab34a5684481ade925ecc54bcd1bf02b1d0d4d52" 2799 | dependencies = [ 2800 | "async-stream", 2801 | "async-trait", 2802 | "axum", 2803 | "base64", 2804 | "bytes", 2805 | "h2", 2806 | "http", 2807 | "http-body", 2808 | "http-body-util", 2809 | "hyper", 2810 | "hyper-timeout", 2811 | "hyper-util", 2812 | "percent-encoding", 2813 | "pin-project", 2814 | "prost", 2815 | "rustls-native-certs", 2816 | "rustls-pemfile", 2817 | "socket2", 2818 | "tokio", 2819 | "tokio-rustls", 2820 | "tokio-stream", 2821 | "tower 0.4.13", 2822 | "tower-layer", 2823 | "tower-service", 2824 | "tracing", 2825 | ] 2826 | 2827 | [[package]] 2828 | name = "tonic-build" 2829 | version = "0.12.3" 2830 | source = "registry+https://github.com/rust-lang/crates.io-index" 2831 | checksum = "9557ce109ea773b399c9b9e5dca39294110b74f1f342cb347a80d1fce8c26a11" 2832 | dependencies = [ 2833 | "prettyplease", 2834 | "proc-macro2", 2835 | "prost-build", 2836 | "prost-types", 2837 | "quote", 2838 | "syn", 2839 | ] 2840 | 2841 | [[package]] 2842 | name = "tonic-web-wasm-client" 2843 | version = "0.6.2" 2844 | source = "registry+https://github.com/rust-lang/crates.io-index" 2845 | checksum = "8957be1a1c7aa12d4c9d67882060dd57aed816bbc553fa60949312e839f4a8ea" 2846 | dependencies = [ 2847 | "base64", 2848 | "byteorder", 2849 | "bytes", 2850 | "futures-util", 2851 | "http", 2852 | "http-body", 2853 | "http-body-util", 2854 | "httparse", 2855 | "js-sys", 2856 | "pin-project", 2857 | "thiserror 1.0.69", 2858 | "tonic", 2859 | "tower-service", 2860 | "wasm-bindgen", 2861 | "wasm-bindgen-futures", 2862 | "wasm-streams", 2863 | "web-sys", 2864 | ] 2865 | 2866 | [[package]] 2867 | name = "tower" 2868 | version = "0.4.13" 2869 | source = "registry+https://github.com/rust-lang/crates.io-index" 2870 | checksum = "b8fa9be0de6cf49e536ce1851f987bd21a43b771b09473c3549a6c853db37c1c" 2871 | dependencies = [ 2872 | "futures-core", 2873 | "futures-util", 2874 | "indexmap 1.9.3", 2875 | "pin-project", 2876 | "pin-project-lite", 2877 | "rand 0.8.5", 2878 | "slab", 2879 | "tokio", 2880 | "tokio-util", 2881 | "tower-layer", 2882 | "tower-service", 2883 | "tracing", 2884 | ] 2885 | 2886 | [[package]] 2887 | name = "tower" 2888 | version = "0.5.2" 2889 | source = "registry+https://github.com/rust-lang/crates.io-index" 2890 | checksum = "d039ad9159c98b70ecfd540b2573b97f7f52c3e8d9f8ad57a24b916a536975f9" 2891 | dependencies = [ 2892 | "futures-core", 2893 | "futures-util", 2894 | "pin-project-lite", 2895 | "sync_wrapper", 2896 | "tower-layer", 2897 | "tower-service", 2898 | ] 2899 | 2900 | [[package]] 2901 | name = "tower-layer" 2902 | version = "0.3.3" 2903 | source = "registry+https://github.com/rust-lang/crates.io-index" 2904 | checksum = "121c2a6cda46980bb0fcd1647ffaf6cd3fc79a013de288782836f6df9c48780e" 2905 | 2906 | [[package]] 2907 | name = "tower-service" 2908 | version = "0.3.3" 2909 | source = "registry+https://github.com/rust-lang/crates.io-index" 2910 | checksum = "8df9b6e13f2d32c91b9bd719c00d1958837bc7dec474d94952798cc8e69eeec3" 2911 | 2912 | [[package]] 2913 | name = "tracing" 2914 | version = "0.1.41" 2915 | source = "registry+https://github.com/rust-lang/crates.io-index" 2916 | checksum = "784e0ac535deb450455cbfa28a6f0df145ea1bb7ae51b821cf5e7927fdcfbdd0" 2917 | dependencies = [ 2918 | "pin-project-lite", 2919 | "tracing-attributes", 2920 | "tracing-core", 2921 | ] 2922 | 2923 | [[package]] 2924 | name = "tracing-attributes" 2925 | version = "0.1.28" 2926 | source = "registry+https://github.com/rust-lang/crates.io-index" 2927 | checksum = "395ae124c09f9e6918a2310af6038fba074bcf474ac352496d5910dd59a2226d" 2928 | dependencies = [ 2929 | "proc-macro2", 2930 | "quote", 2931 | "syn", 2932 | ] 2933 | 2934 | [[package]] 2935 | name = "tracing-core" 2936 | version = "0.1.33" 2937 | source = "registry+https://github.com/rust-lang/crates.io-index" 2938 | checksum = "e672c95779cf947c5311f83787af4fa8fffd12fb27e4993211a84bdfd9610f9c" 2939 | dependencies = [ 2940 | "once_cell", 2941 | "valuable", 2942 | ] 2943 | 2944 | [[package]] 2945 | name = "tracing-log" 2946 | version = "0.2.0" 2947 | source = "registry+https://github.com/rust-lang/crates.io-index" 2948 | checksum = "ee855f1f400bd0e5c02d150ae5de3840039a3f54b025156404e34c23c03f47c3" 2949 | dependencies = [ 2950 | "log", 2951 | "once_cell", 2952 | "tracing-core", 2953 | ] 2954 | 2955 | [[package]] 2956 | name = "tracing-subscriber" 2957 | version = "0.3.19" 2958 | source = "registry+https://github.com/rust-lang/crates.io-index" 2959 | checksum = "e8189decb5ac0fa7bc8b96b7cb9b2701d60d48805aca84a238004d665fcc4008" 2960 | dependencies = [ 2961 | "matchers", 2962 | "nu-ansi-term", 2963 | "once_cell", 2964 | "regex", 2965 | "sharded-slab", 2966 | "smallvec", 2967 | "thread_local", 2968 | "tracing", 2969 | "tracing-core", 2970 | "tracing-log", 2971 | ] 2972 | 2973 | [[package]] 2974 | name = "try-lock" 2975 | version = "0.2.5" 2976 | source = "registry+https://github.com/rust-lang/crates.io-index" 2977 | checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" 2978 | 2979 | [[package]] 2980 | name = "trybuild" 2981 | version = "1.0.104" 2982 | source = "registry+https://github.com/rust-lang/crates.io-index" 2983 | checksum = "6ae08be68c056db96f0e6c6dd820727cca756ced9e1f4cc7fdd20e2a55e23898" 2984 | dependencies = [ 2985 | "dissimilar", 2986 | "glob", 2987 | "serde", 2988 | "serde_derive", 2989 | "serde_json", 2990 | "target-triple", 2991 | "termcolor", 2992 | "toml", 2993 | ] 2994 | 2995 | [[package]] 2996 | name = "typenum" 2997 | version = "1.18.0" 2998 | source = "registry+https://github.com/rust-lang/crates.io-index" 2999 | checksum = "1dccffe3ce07af9386bfd29e80c0ab1a8205a2fc34e4bcd40364df902cfa8f3f" 3000 | 3001 | [[package]] 3002 | name = "unicode-ident" 3003 | version = "1.0.18" 3004 | source = "registry+https://github.com/rust-lang/crates.io-index" 3005 | checksum = "5a5f39404a5da50712a4c1eecf25e90dd62b613502b7e925fd4e4d19b5c96512" 3006 | 3007 | [[package]] 3008 | name = "unicode-linebreak" 3009 | version = "0.1.5" 3010 | source = "registry+https://github.com/rust-lang/crates.io-index" 3011 | checksum = "3b09c83c3c29d37506a3e260c08c03743a6bb66a9cd432c6934ab501a190571f" 3012 | 3013 | [[package]] 3014 | name = "unicode-width" 3015 | version = "0.1.14" 3016 | source = "registry+https://github.com/rust-lang/crates.io-index" 3017 | checksum = "7dd6e30e90baa6f72411720665d41d89b9a3d039dc45b8faea1ddd07f617f6af" 3018 | 3019 | [[package]] 3020 | name = "unicode-width" 3021 | version = "0.2.0" 3022 | source = "registry+https://github.com/rust-lang/crates.io-index" 3023 | checksum = "1fc81956842c57dac11422a97c3b8195a1ff727f06e85c84ed2e8aa277c9a0fd" 3024 | 3025 | [[package]] 3026 | name = "unicode-xid" 3027 | version = "0.2.6" 3028 | source = "registry+https://github.com/rust-lang/crates.io-index" 3029 | checksum = "ebc1c04c71510c7f702b52b7c350734c9ff1295c464a03335b00bb84fc54f853" 3030 | 3031 | [[package]] 3032 | name = "untrusted" 3033 | version = "0.9.0" 3034 | source = "registry+https://github.com/rust-lang/crates.io-index" 3035 | checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" 3036 | 3037 | [[package]] 3038 | name = "utf8parse" 3039 | version = "0.2.2" 3040 | source = "registry+https://github.com/rust-lang/crates.io-index" 3041 | checksum = "06abde3611657adf66d383f00b093d7faecc7fa57071cce2578660c9f1010821" 3042 | 3043 | [[package]] 3044 | name = "valuable" 3045 | version = "0.1.1" 3046 | source = "registry+https://github.com/rust-lang/crates.io-index" 3047 | checksum = "ba73ea9cf16a25df0c8caa16c51acb937d5712a8429db78a3ee29d5dcacd3a65" 3048 | 3049 | [[package]] 3050 | name = "vcpkg" 3051 | version = "0.2.15" 3052 | source = "registry+https://github.com/rust-lang/crates.io-index" 3053 | checksum = "accd4ea62f7bb7a82fe23066fb0957d48ef677f6eeb8215f372f52e48bb32426" 3054 | 3055 | [[package]] 3056 | name = "version_check" 3057 | version = "0.9.5" 3058 | source = "registry+https://github.com/rust-lang/crates.io-index" 3059 | checksum = "0b928f33d975fc6ad9f86c8f283853ad26bdd5b10b7f1542aa2fa15e2289105a" 3060 | 3061 | [[package]] 3062 | name = "vte" 3063 | version = "0.14.1" 3064 | source = "registry+https://github.com/rust-lang/crates.io-index" 3065 | checksum = "231fdcd7ef3037e8330d8e17e61011a2c244126acc0a982f4040ac3f9f0bc077" 3066 | dependencies = [ 3067 | "memchr", 3068 | ] 3069 | 3070 | [[package]] 3071 | name = "walkdir" 3072 | version = "2.5.0" 3073 | source = "registry+https://github.com/rust-lang/crates.io-index" 3074 | checksum = "29790946404f91d9c5d06f9874efddea1dc06c5efe94541a7d6863108e3a5e4b" 3075 | dependencies = [ 3076 | "same-file", 3077 | "winapi-util", 3078 | ] 3079 | 3080 | [[package]] 3081 | name = "want" 3082 | version = "0.3.1" 3083 | source = "registry+https://github.com/rust-lang/crates.io-index" 3084 | checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" 3085 | dependencies = [ 3086 | "try-lock", 3087 | ] 3088 | 3089 | [[package]] 3090 | name = "wasi" 3091 | version = "0.11.0+wasi-snapshot-preview1" 3092 | source = "registry+https://github.com/rust-lang/crates.io-index" 3093 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 3094 | 3095 | [[package]] 3096 | name = "wasi" 3097 | version = "0.14.2+wasi-0.2.4" 3098 | source = "registry+https://github.com/rust-lang/crates.io-index" 3099 | checksum = "9683f9a5a998d873c0d21fcbe3c083009670149a8fab228644b8bd36b2c48cb3" 3100 | dependencies = [ 3101 | "wit-bindgen-rt", 3102 | ] 3103 | 3104 | [[package]] 3105 | name = "wasm-bindgen" 3106 | version = "0.2.100" 3107 | source = "registry+https://github.com/rust-lang/crates.io-index" 3108 | checksum = "1edc8929d7499fc4e8f0be2262a241556cfc54a0bea223790e71446f2aab1ef5" 3109 | dependencies = [ 3110 | "cfg-if", 3111 | "once_cell", 3112 | "rustversion", 3113 | "wasm-bindgen-macro", 3114 | ] 3115 | 3116 | [[package]] 3117 | name = "wasm-bindgen-backend" 3118 | version = "0.2.100" 3119 | source = "registry+https://github.com/rust-lang/crates.io-index" 3120 | checksum = "2f0a0651a5c2bc21487bde11ee802ccaf4c51935d0d3d42a6101f98161700bc6" 3121 | dependencies = [ 3122 | "bumpalo", 3123 | "log", 3124 | "proc-macro2", 3125 | "quote", 3126 | "syn", 3127 | "wasm-bindgen-shared", 3128 | ] 3129 | 3130 | [[package]] 3131 | name = "wasm-bindgen-futures" 3132 | version = "0.4.50" 3133 | source = "registry+https://github.com/rust-lang/crates.io-index" 3134 | checksum = "555d470ec0bc3bb57890405e5d4322cc9ea83cebb085523ced7be4144dac1e61" 3135 | dependencies = [ 3136 | "cfg-if", 3137 | "js-sys", 3138 | "once_cell", 3139 | "wasm-bindgen", 3140 | "web-sys", 3141 | ] 3142 | 3143 | [[package]] 3144 | name = "wasm-bindgen-macro" 3145 | version = "0.2.100" 3146 | source = "registry+https://github.com/rust-lang/crates.io-index" 3147 | checksum = "7fe63fc6d09ed3792bd0897b314f53de8e16568c2b3f7982f468c0bf9bd0b407" 3148 | dependencies = [ 3149 | "quote", 3150 | "wasm-bindgen-macro-support", 3151 | ] 3152 | 3153 | [[package]] 3154 | name = "wasm-bindgen-macro-support" 3155 | version = "0.2.100" 3156 | source = "registry+https://github.com/rust-lang/crates.io-index" 3157 | checksum = "8ae87ea40c9f689fc23f209965b6fb8a99ad69aeeb0231408be24920604395de" 3158 | dependencies = [ 3159 | "proc-macro2", 3160 | "quote", 3161 | "syn", 3162 | "wasm-bindgen-backend", 3163 | "wasm-bindgen-shared", 3164 | ] 3165 | 3166 | [[package]] 3167 | name = "wasm-bindgen-shared" 3168 | version = "0.2.100" 3169 | source = "registry+https://github.com/rust-lang/crates.io-index" 3170 | checksum = "1a05d73b933a847d6cccdda8f838a22ff101ad9bf93e33684f39c1f5f0eece3d" 3171 | dependencies = [ 3172 | "unicode-ident", 3173 | ] 3174 | 3175 | [[package]] 3176 | name = "wasm-streams" 3177 | version = "0.4.2" 3178 | source = "registry+https://github.com/rust-lang/crates.io-index" 3179 | checksum = "15053d8d85c7eccdbefef60f06769760a563c7f0a9d6902a13d35c7800b0ad65" 3180 | dependencies = [ 3181 | "futures-util", 3182 | "js-sys", 3183 | "wasm-bindgen", 3184 | "wasm-bindgen-futures", 3185 | "web-sys", 3186 | ] 3187 | 3188 | [[package]] 3189 | name = "web-sys" 3190 | version = "0.3.77" 3191 | source = "registry+https://github.com/rust-lang/crates.io-index" 3192 | checksum = "33b6dd2ef9186f1f2072e409e99cd22a975331a6b3591b12c764e0e55c60d5d2" 3193 | dependencies = [ 3194 | "js-sys", 3195 | "wasm-bindgen", 3196 | ] 3197 | 3198 | [[package]] 3199 | name = "winapi" 3200 | version = "0.3.9" 3201 | source = "registry+https://github.com/rust-lang/crates.io-index" 3202 | checksum = "5c839a674fcd7a98952e593242ea400abe93992746761e38641405d28b00f419" 3203 | dependencies = [ 3204 | "winapi-i686-pc-windows-gnu", 3205 | "winapi-x86_64-pc-windows-gnu", 3206 | ] 3207 | 3208 | [[package]] 3209 | name = "winapi-i686-pc-windows-gnu" 3210 | version = "0.4.0" 3211 | source = "registry+https://github.com/rust-lang/crates.io-index" 3212 | checksum = "ac3b87c63620426dd9b991e5ce0329eff545bccbbb34f3be09ff6fb6ab51b7b6" 3213 | 3214 | [[package]] 3215 | name = "winapi-util" 3216 | version = "0.1.9" 3217 | source = "registry+https://github.com/rust-lang/crates.io-index" 3218 | checksum = "cf221c93e13a30d793f7645a0e7762c55d169dbb0a49671918a2319d289b10bb" 3219 | dependencies = [ 3220 | "windows-sys 0.59.0", 3221 | ] 3222 | 3223 | [[package]] 3224 | name = "winapi-x86_64-pc-windows-gnu" 3225 | version = "0.4.0" 3226 | source = "registry+https://github.com/rust-lang/crates.io-index" 3227 | checksum = "712e227841d057c1ee1cd2fb22fa7e5a5461ae8e48fa2ca79ec42cfc1931183f" 3228 | 3229 | [[package]] 3230 | name = "windows" 3231 | version = "0.58.0" 3232 | source = "registry+https://github.com/rust-lang/crates.io-index" 3233 | checksum = "dd04d41d93c4992d421894c18c8b43496aa748dd4c081bac0dc93eb0489272b6" 3234 | dependencies = [ 3235 | "windows-core", 3236 | "windows-targets 0.52.6", 3237 | ] 3238 | 3239 | [[package]] 3240 | name = "windows-core" 3241 | version = "0.58.0" 3242 | source = "registry+https://github.com/rust-lang/crates.io-index" 3243 | checksum = "6ba6d44ec8c2591c134257ce647b7ea6b20335bf6379a27dac5f1641fcf59f99" 3244 | dependencies = [ 3245 | "windows-implement", 3246 | "windows-interface", 3247 | "windows-result", 3248 | "windows-strings", 3249 | "windows-targets 0.52.6", 3250 | ] 3251 | 3252 | [[package]] 3253 | name = "windows-implement" 3254 | version = "0.58.0" 3255 | source = "registry+https://github.com/rust-lang/crates.io-index" 3256 | checksum = "2bbd5b46c938e506ecbce286b6628a02171d56153ba733b6c741fc627ec9579b" 3257 | dependencies = [ 3258 | "proc-macro2", 3259 | "quote", 3260 | "syn", 3261 | ] 3262 | 3263 | [[package]] 3264 | name = "windows-interface" 3265 | version = "0.58.0" 3266 | source = "registry+https://github.com/rust-lang/crates.io-index" 3267 | checksum = "053c4c462dc91d3b1504c6fe5a726dd15e216ba718e84a0e46a88fbe5ded3515" 3268 | dependencies = [ 3269 | "proc-macro2", 3270 | "quote", 3271 | "syn", 3272 | ] 3273 | 3274 | [[package]] 3275 | name = "windows-link" 3276 | version = "0.1.1" 3277 | source = "registry+https://github.com/rust-lang/crates.io-index" 3278 | checksum = "76840935b766e1b0a05c0066835fb9ec80071d4c09a16f6bd5f7e655e3c14c38" 3279 | 3280 | [[package]] 3281 | name = "windows-result" 3282 | version = "0.2.0" 3283 | source = "registry+https://github.com/rust-lang/crates.io-index" 3284 | checksum = "1d1043d8214f791817bab27572aaa8af63732e11bf84aa21a45a78d6c317ae0e" 3285 | dependencies = [ 3286 | "windows-targets 0.52.6", 3287 | ] 3288 | 3289 | [[package]] 3290 | name = "windows-strings" 3291 | version = "0.1.0" 3292 | source = "registry+https://github.com/rust-lang/crates.io-index" 3293 | checksum = "4cd9b125c486025df0eabcb585e62173c6c9eddcec5d117d3b6e8c30e2ee4d10" 3294 | dependencies = [ 3295 | "windows-result", 3296 | "windows-targets 0.52.6", 3297 | ] 3298 | 3299 | [[package]] 3300 | name = "windows-sys" 3301 | version = "0.48.0" 3302 | source = "registry+https://github.com/rust-lang/crates.io-index" 3303 | checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" 3304 | dependencies = [ 3305 | "windows-targets 0.48.5", 3306 | ] 3307 | 3308 | [[package]] 3309 | name = "windows-sys" 3310 | version = "0.52.0" 3311 | source = "registry+https://github.com/rust-lang/crates.io-index" 3312 | checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" 3313 | dependencies = [ 3314 | "windows-targets 0.52.6", 3315 | ] 3316 | 3317 | [[package]] 3318 | name = "windows-sys" 3319 | version = "0.59.0" 3320 | source = "registry+https://github.com/rust-lang/crates.io-index" 3321 | checksum = "1e38bc4d79ed67fd075bcc251a1c39b32a1776bbe92e5bef1f0bf1f8c531853b" 3322 | dependencies = [ 3323 | "windows-targets 0.52.6", 3324 | ] 3325 | 3326 | [[package]] 3327 | name = "windows-targets" 3328 | version = "0.48.5" 3329 | source = "registry+https://github.com/rust-lang/crates.io-index" 3330 | checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" 3331 | dependencies = [ 3332 | "windows_aarch64_gnullvm 0.48.5", 3333 | "windows_aarch64_msvc 0.48.5", 3334 | "windows_i686_gnu 0.48.5", 3335 | "windows_i686_msvc 0.48.5", 3336 | "windows_x86_64_gnu 0.48.5", 3337 | "windows_x86_64_gnullvm 0.48.5", 3338 | "windows_x86_64_msvc 0.48.5", 3339 | ] 3340 | 3341 | [[package]] 3342 | name = "windows-targets" 3343 | version = "0.52.6" 3344 | source = "registry+https://github.com/rust-lang/crates.io-index" 3345 | checksum = "9b724f72796e036ab90c1021d4780d4d3d648aca59e491e6b98e725b84e99973" 3346 | dependencies = [ 3347 | "windows_aarch64_gnullvm 0.52.6", 3348 | "windows_aarch64_msvc 0.52.6", 3349 | "windows_i686_gnu 0.52.6", 3350 | "windows_i686_gnullvm", 3351 | "windows_i686_msvc 0.52.6", 3352 | "windows_x86_64_gnu 0.52.6", 3353 | "windows_x86_64_gnullvm 0.52.6", 3354 | "windows_x86_64_msvc 0.52.6", 3355 | ] 3356 | 3357 | [[package]] 3358 | name = "windows_aarch64_gnullvm" 3359 | version = "0.48.5" 3360 | source = "registry+https://github.com/rust-lang/crates.io-index" 3361 | checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" 3362 | 3363 | [[package]] 3364 | name = "windows_aarch64_gnullvm" 3365 | version = "0.52.6" 3366 | source = "registry+https://github.com/rust-lang/crates.io-index" 3367 | checksum = "32a4622180e7a0ec044bb555404c800bc9fd9ec262ec147edd5989ccd0c02cd3" 3368 | 3369 | [[package]] 3370 | name = "windows_aarch64_msvc" 3371 | version = "0.48.5" 3372 | source = "registry+https://github.com/rust-lang/crates.io-index" 3373 | checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" 3374 | 3375 | [[package]] 3376 | name = "windows_aarch64_msvc" 3377 | version = "0.52.6" 3378 | source = "registry+https://github.com/rust-lang/crates.io-index" 3379 | checksum = "09ec2a7bb152e2252b53fa7803150007879548bc709c039df7627cabbd05d469" 3380 | 3381 | [[package]] 3382 | name = "windows_i686_gnu" 3383 | version = "0.48.5" 3384 | source = "registry+https://github.com/rust-lang/crates.io-index" 3385 | checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" 3386 | 3387 | [[package]] 3388 | name = "windows_i686_gnu" 3389 | version = "0.52.6" 3390 | source = "registry+https://github.com/rust-lang/crates.io-index" 3391 | checksum = "8e9b5ad5ab802e97eb8e295ac6720e509ee4c243f69d781394014ebfe8bbfa0b" 3392 | 3393 | [[package]] 3394 | name = "windows_i686_gnullvm" 3395 | version = "0.52.6" 3396 | source = "registry+https://github.com/rust-lang/crates.io-index" 3397 | checksum = "0eee52d38c090b3caa76c563b86c3a4bd71ef1a819287c19d586d7334ae8ed66" 3398 | 3399 | [[package]] 3400 | name = "windows_i686_msvc" 3401 | version = "0.48.5" 3402 | source = "registry+https://github.com/rust-lang/crates.io-index" 3403 | checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" 3404 | 3405 | [[package]] 3406 | name = "windows_i686_msvc" 3407 | version = "0.52.6" 3408 | source = "registry+https://github.com/rust-lang/crates.io-index" 3409 | checksum = "240948bc05c5e7c6dabba28bf89d89ffce3e303022809e73deaefe4f6ec56c66" 3410 | 3411 | [[package]] 3412 | name = "windows_x86_64_gnu" 3413 | version = "0.48.5" 3414 | source = "registry+https://github.com/rust-lang/crates.io-index" 3415 | checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" 3416 | 3417 | [[package]] 3418 | name = "windows_x86_64_gnu" 3419 | version = "0.52.6" 3420 | source = "registry+https://github.com/rust-lang/crates.io-index" 3421 | checksum = "147a5c80aabfbf0c7d901cb5895d1de30ef2907eb21fbbab29ca94c5b08b1a78" 3422 | 3423 | [[package]] 3424 | name = "windows_x86_64_gnullvm" 3425 | version = "0.48.5" 3426 | source = "registry+https://github.com/rust-lang/crates.io-index" 3427 | checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" 3428 | 3429 | [[package]] 3430 | name = "windows_x86_64_gnullvm" 3431 | version = "0.52.6" 3432 | source = "registry+https://github.com/rust-lang/crates.io-index" 3433 | checksum = "24d5b23dc417412679681396f2b49f3de8c1473deb516bd34410872eff51ed0d" 3434 | 3435 | [[package]] 3436 | name = "windows_x86_64_msvc" 3437 | version = "0.48.5" 3438 | source = "registry+https://github.com/rust-lang/crates.io-index" 3439 | checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" 3440 | 3441 | [[package]] 3442 | name = "windows_x86_64_msvc" 3443 | version = "0.52.6" 3444 | source = "registry+https://github.com/rust-lang/crates.io-index" 3445 | checksum = "589f6da84c646204747d1270a2a5661ea66ed1cced2631d546fdfb155959f9ec" 3446 | 3447 | [[package]] 3448 | name = "winnow" 3449 | version = "0.7.6" 3450 | source = "registry+https://github.com/rust-lang/crates.io-index" 3451 | checksum = "63d3fcd9bba44b03821e7d699eeee959f3126dcc4aa8e4ae18ec617c2a5cea10" 3452 | dependencies = [ 3453 | "memchr", 3454 | ] 3455 | 3456 | [[package]] 3457 | name = "winter-air" 3458 | version = "0.12.1" 3459 | source = "registry+https://github.com/rust-lang/crates.io-index" 3460 | checksum = "8d7fbdcaa53d220b84811199790c1dda77c025533cdd27715cf1625af2b4027a" 3461 | dependencies = [ 3462 | "libm", 3463 | "winter-crypto 0.12.0", 3464 | "winter-fri", 3465 | "winter-math 0.12.0", 3466 | "winter-utils 0.12.0", 3467 | ] 3468 | 3469 | [[package]] 3470 | name = "winter-crypto" 3471 | version = "0.6.4" 3472 | source = "registry+https://github.com/rust-lang/crates.io-index" 3473 | checksum = "54a20b2a4499797cbaeb38c980f9f34e6e60d993e8e170a6deb354345f50cbfb" 3474 | dependencies = [ 3475 | "blake3", 3476 | "sha3", 3477 | "winter-math 0.6.5", 3478 | "winter-utils 0.6.4", 3479 | ] 3480 | 3481 | [[package]] 3482 | name = "winter-crypto" 3483 | version = "0.12.0" 3484 | source = "registry+https://github.com/rust-lang/crates.io-index" 3485 | checksum = "32247cde9f43e5bbd05362caa7274608790ea69b14f7c81cd509aae7127c5ff2" 3486 | dependencies = [ 3487 | "blake3", 3488 | "sha3", 3489 | "winter-math 0.12.0", 3490 | "winter-utils 0.12.0", 3491 | ] 3492 | 3493 | [[package]] 3494 | name = "winter-fri" 3495 | version = "0.12.2" 3496 | source = "registry+https://github.com/rust-lang/crates.io-index" 3497 | checksum = "32b346b0eea2292986a1193bfc70dd2dbcdbb6adb3e5110b71d18c6f1077df10" 3498 | dependencies = [ 3499 | "winter-crypto 0.12.0", 3500 | "winter-math 0.12.0", 3501 | "winter-utils 0.12.0", 3502 | ] 3503 | 3504 | [[package]] 3505 | name = "winter-math" 3506 | version = "0.6.5" 3507 | source = "registry+https://github.com/rust-lang/crates.io-index" 3508 | checksum = "1795f5323f03c987a6aada6e8229f2c7f9353956cfa1b648b9c6cf5440958caa" 3509 | dependencies = [ 3510 | "winter-utils 0.6.4", 3511 | ] 3512 | 3513 | [[package]] 3514 | name = "winter-math" 3515 | version = "0.12.0" 3516 | source = "registry+https://github.com/rust-lang/crates.io-index" 3517 | checksum = "326dfe4bfa4072b7c909133a88f8807820d3e49e5dfd246f67981771f74a0ed3" 3518 | dependencies = [ 3519 | "winter-utils 0.12.0", 3520 | ] 3521 | 3522 | [[package]] 3523 | name = "winter-maybe-async" 3524 | version = "0.12.0" 3525 | source = "registry+https://github.com/rust-lang/crates.io-index" 3526 | checksum = "eaa132be74e602b707f1dab5a69c38496445e54ee940e7c281c02b15007241bd" 3527 | dependencies = [ 3528 | "quote", 3529 | "syn", 3530 | ] 3531 | 3532 | [[package]] 3533 | name = "winter-prover" 3534 | version = "0.12.2" 3535 | source = "registry+https://github.com/rust-lang/crates.io-index" 3536 | checksum = "426be0767a25150af20a241a6ae46bad1bf2f7da86393d897e5ec9967124f760" 3537 | dependencies = [ 3538 | "tracing", 3539 | "winter-air", 3540 | "winter-crypto 0.12.0", 3541 | "winter-fri", 3542 | "winter-math 0.12.0", 3543 | "winter-maybe-async", 3544 | "winter-utils 0.12.0", 3545 | ] 3546 | 3547 | [[package]] 3548 | name = "winter-rand-utils" 3549 | version = "0.12.0" 3550 | source = "registry+https://github.com/rust-lang/crates.io-index" 3551 | checksum = "fc6321741f063344258c80f0c0255a559ded99bc17fe99fab9577f2460065ddf" 3552 | dependencies = [ 3553 | "rand 0.8.5", 3554 | "winter-utils 0.12.0", 3555 | ] 3556 | 3557 | [[package]] 3558 | name = "winter-utils" 3559 | version = "0.6.4" 3560 | source = "registry+https://github.com/rust-lang/crates.io-index" 3561 | checksum = "b903fda6a50cce2aa5a172a9269aca0f09b25df20afb1faa427db76d40779671" 3562 | 3563 | [[package]] 3564 | name = "winter-utils" 3565 | version = "0.12.0" 3566 | source = "registry+https://github.com/rust-lang/crates.io-index" 3567 | checksum = "2d47518e6931955dcac73a584cacb04550b82ab2f45c72880cbbbdbe13adb63c" 3568 | dependencies = [ 3569 | "rayon", 3570 | ] 3571 | 3572 | [[package]] 3573 | name = "winter-verifier" 3574 | version = "0.12.2" 3575 | source = "registry+https://github.com/rust-lang/crates.io-index" 3576 | checksum = "9e340716f24960b7ff3713029149fe5e52f9c0dae152101528ec5847d92d73e4" 3577 | dependencies = [ 3578 | "winter-air", 3579 | "winter-crypto 0.12.0", 3580 | "winter-fri", 3581 | "winter-math 0.12.0", 3582 | "winter-utils 0.12.0", 3583 | ] 3584 | 3585 | [[package]] 3586 | name = "wit-bindgen-rt" 3587 | version = "0.39.0" 3588 | source = "registry+https://github.com/rust-lang/crates.io-index" 3589 | checksum = "6f42320e61fe2cfd34354ecb597f86f413484a798ba44a8ca1165c58d42da6c1" 3590 | dependencies = [ 3591 | "bitflags", 3592 | ] 3593 | 3594 | [[package]] 3595 | name = "zerocopy" 3596 | version = "0.7.35" 3597 | source = "registry+https://github.com/rust-lang/crates.io-index" 3598 | checksum = "1b9b4fd18abc82b8136838da5d50bae7bdea537c574d8dc1a34ed098d6c166f0" 3599 | dependencies = [ 3600 | "zerocopy-derive 0.7.35", 3601 | ] 3602 | 3603 | [[package]] 3604 | name = "zerocopy" 3605 | version = "0.8.24" 3606 | source = "registry+https://github.com/rust-lang/crates.io-index" 3607 | checksum = "2586fea28e186957ef732a5f8b3be2da217d65c5969d4b1e17f973ebbe876879" 3608 | dependencies = [ 3609 | "zerocopy-derive 0.8.24", 3610 | ] 3611 | 3612 | [[package]] 3613 | name = "zerocopy-derive" 3614 | version = "0.7.35" 3615 | source = "registry+https://github.com/rust-lang/crates.io-index" 3616 | checksum = "fa4f8080344d4671fb4e831a13ad1e68092748387dfc4f55e356242fae12ce3e" 3617 | dependencies = [ 3618 | "proc-macro2", 3619 | "quote", 3620 | "syn", 3621 | ] 3622 | 3623 | [[package]] 3624 | name = "zerocopy-derive" 3625 | version = "0.8.24" 3626 | source = "registry+https://github.com/rust-lang/crates.io-index" 3627 | checksum = "a996a8f63c5c4448cd959ac1bab0aaa3306ccfd060472f85943ee0750f0169be" 3628 | dependencies = [ 3629 | "proc-macro2", 3630 | "quote", 3631 | "syn", 3632 | ] 3633 | 3634 | [[package]] 3635 | name = "zeroize" 3636 | version = "1.8.1" 3637 | source = "registry+https://github.com/rust-lang/crates.io-index" 3638 | checksum = "ced3678a2879b30306d323f4542626697a464a97c0a07c9aebf7ebca65cd4dde" 3639 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "miden-dark-pool" 3 | version = "0.1.0" 4 | edition = "2024" 5 | 6 | [[bin]] 7 | name = "matcher" 8 | path = "src/matcher.rs" 9 | 10 | [[bin]] 11 | name = "user" 12 | path = "src/user.rs" 13 | 14 | [lib] 15 | name = "miden_dark_pool" 16 | path = "src/lib.rs" 17 | 18 | [dependencies] 19 | tokio = { version = "1", features = ["full"] } 20 | serde = { version = "1", features = ["derive"] } 21 | bincode = "1.3" 22 | anyhow = "1.0" 23 | winter-utils = "0.12.0" 24 | miden-vm = "0.13.2" 25 | miden-objects = { version = "0.8.1"} 26 | miden-lib = { version = "0.8.0"} 27 | miden-tx = { version = "0.8.1", features = ["testing"] } 28 | miden-crypto = "=0.7.1" 29 | miden-client = { version = "0.8.1", features = ["testing", "concurrent", "tonic", "sqlite"] } 30 | sha2 = "0.10.8" 31 | rand = { version = "0.9" } 32 | clap = { version = "4", features = ["derive"] } 33 | thiserror = "2.0.12" -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # miden-dark-pool 2 | Dark pool on Miden: A privacy-preserving dark pool trading system built on Miden, designed to allow private order submission, secure off-chain matching 3 | 4 | ⚠️ Work in Progress — This project is under development and is not production-ready. Expect breaking changes, incomplete features, and missing documentation. 5 | 6 | ## Overview 7 | This prototype is experimenting with: 8 | 9 | • Private orders via MidenNotes. 10 | • Off-chain matching using a TCP-based matcher(TEE to be added). 11 | • scripts for partially fillable swaps (SWAPp). The swap note script is not in its final version and some changes needs to be made. 12 | • Basic CLI for submitting/cancelling orders. 13 | 14 | ## Current Status 15 | 16 | ✅ Accepts Miden notes via TCP 17 | 18 | ✅ Basic order CLI with serialization 19 | 20 | ✅ Script hash validation for SWAPp 21 | 22 | ❌ Matching engine (WIP) 23 | 24 | ❌ TEE support (planned) 25 | 26 | ❌ Secure transport (planned) 27 | 28 | 29 | ## Building, Testing and Running 30 | 31 | - To Build: `cargo build --release` 32 | 33 | - To Test: 34 | - `cargo test --release --test user_flow -- test_open_order --exact` 35 | - `cargo test --release --test user_flow -- test_cancel_order --exact` 36 | 37 | - To Run: 38 | - matcher: `cargo run --release --bin matcher` 39 | - user: 40 | - open-order: 41 | ```sh 42 | cargo run --release \ 43 | --bin user \ 44 | -- open-order \ 45 | --user-id \ 46 | --offered-asset \ 47 | --offered-amout \ 48 | --requested-asset \ 49 | --price 50 | ``` 51 | - cancel-order: 52 | ```sh 53 | cargo run --release \ 54 | --bin user \ 55 | -- cancel-order \ 56 | --user-id \ 57 | --order-id \ 58 | --tag 59 | ``` 60 | - consume-swapped: 61 | ```sh 62 | cargo run --release \ 63 | --bin user \ 64 | -- consume-swapped \ 65 | --user-id 66 | ``` 67 | Note(Only in case of testing): in case of failure of test, delete the keystore and store -------------------------------------------------------------------------------- /notes/P2ID.masm: -------------------------------------------------------------------------------- 1 | use.miden::account 2 | use.miden::note 3 | use.miden::contracts::wallets::basic->wallet 4 | 5 | # ERRORS 6 | # ================================================================================================= 7 | 8 | # P2ID script expects exactly 2 note inputs 9 | const.ERR_P2ID_WRONG_NUMBER_OF_INPUTS=0x0002c000 10 | 11 | # P2ID's target account address and transaction address do not match 12 | const.ERR_P2ID_TARGET_ACCT_MISMATCH=0x0002c001 13 | 14 | #! Helper procedure to add all assets of a note to an account. 15 | #! 16 | #! Inputs: [] 17 | #! Outputs: [] 18 | proc.add_note_assets_to_account 19 | push.0 exec.note::get_assets 20 | # => [num_of_assets, 0 = ptr, ...] 21 | 22 | # compute the pointer at which we should stop iterating 23 | mul.4 dup.1 add 24 | # => [end_ptr, ptr, ...] 25 | 26 | # pad the stack and move the pointer to the top 27 | padw movup.5 28 | # => [ptr, 0, 0, 0, 0, end_ptr, ...] 29 | 30 | # compute the loop latch 31 | dup dup.6 neq 32 | # => [latch, ptr, 0, 0, 0, 0, end_ptr, ...] 33 | 34 | while.true 35 | # => [ptr, 0, 0, 0, 0, end_ptr, ...] 36 | 37 | # save the pointer so that we can use it later 38 | dup movdn.5 39 | # => [ptr, 0, 0, 0, 0, ptr, end_ptr, ...] 40 | 41 | # load the asset 42 | mem_loadw 43 | # => [ASSET, ptr, end_ptr, ...] 44 | 45 | # pad the stack before call 46 | padw swapw padw padw swapdw 47 | # => [ASSET, pad(12), ptr, end_ptr, ...] 48 | 49 | # add asset to the account 50 | call.wallet::receive_asset 51 | # => [pad(16), ptr, end_ptr, ...] 52 | 53 | # clean the stack after call 54 | dropw dropw dropw 55 | # => [0, 0, 0, 0, ptr, end_ptr, ...] 56 | 57 | # increment the pointer and compare it to the end_ptr 58 | movup.4 add.4 dup dup.6 neq 59 | # => [latch, ptr+4, ASSET, end_ptr, ...] 60 | end 61 | 62 | # clear the stack 63 | drop dropw drop 64 | end 65 | 66 | #! Pay-to-ID script: adds all assets from the note to the account, assuming ID of the account 67 | #! matches target account ID specified by the note inputs. 68 | #! 69 | #! Requires that the account exposes: 70 | #! - miden::contracts::wallets::basic::receive_asset procedure. 71 | #! 72 | #! Inputs: [] 73 | #! Outputs: [] 74 | #! 75 | #! Note inputs are assumed to be as follows: 76 | #! - target_account_id is the ID of the account for which the note is intended. 77 | #! 78 | #! Panics if: 79 | #! - Account does not expose miden::contracts::wallets::basic::receive_asset procedure. 80 | #! - Account ID of executing account is not equal to the Account ID specified via note inputs. 81 | #! - The same non-fungible asset already exists in the account. 82 | #! - Adding a fungible asset would result in amount overflow, i.e., the total amount would be 83 | #! greater than 2^63. 84 | begin 85 | # store the note inputs to memory starting at address 0 86 | push.0 exec.note::get_inputs 87 | # => [num_inputs, inputs_ptr] 88 | 89 | # make sure the number of inputs is 2 90 | eq.2 assert.err=ERR_P2ID_WRONG_NUMBER_OF_INPUTS 91 | # => [inputs_ptr] 92 | 93 | # read the target account ID from the note inputs 94 | padw movup.4 mem_loadw drop drop 95 | # => [target_account_id_prefix, target_account_id_suffix] 96 | 97 | exec.account::get_id 98 | # => [account_id_prefix, account_id_suffix, target_account_id_prefix, target_account_id_suffix, ...] 99 | 100 | # ensure account_id = target_account_id, fails otherwise 101 | exec.account::is_id_equal assert.err=ERR_P2ID_TARGET_ACCT_MISMATCH 102 | # => [] 103 | 104 | exec.add_note_assets_to_account 105 | # => [] 106 | end -------------------------------------------------------------------------------- /notes/PRIVATE_SWAPp.masm: -------------------------------------------------------------------------------- 1 | use.miden::note 2 | use.miden::contracts::wallets::basic->wallet 3 | use.std::sys 4 | use.miden::account 5 | use.std::math::u64 6 | use.miden::tx 7 | use.std::crypto::hashes::rpo 8 | 9 | # CONSTANTS 10 | # ================================================================================================= 11 | 12 | const.PUBLIC_NOTE=1 13 | const.PRIVATE_NOTE=2 14 | const.EXECUTION_HINT_ALWAYS=1 15 | const.FACTOR=0x000186A0 # 1e5 16 | const.MAX_U32=0x0000000100000000 17 | 18 | # Memory Addresses 19 | # ================================================================================================= 20 | 21 | # Memory Address Layout: 22 | # - SWAPP Note Inputs: General input addresses (0 - 0xD) 23 | # - Reserved Input Memory Addresses: 0 to 40 (not explicitly listed) 24 | # - Price Calculation Procedure: Addresses 41 to 60 (0x29 to 0x2D) 25 | # - TokenId Addresses: Addresses 60 to 70 (0x2D to 0x30) 26 | # - Boolean Addresses: Addresses 70 to 80 (0x35) 27 | # - Full Word Addresses: Addresses 80 to 120, must be divisible by 4 (0x50 to 0x64) 28 | 29 | # SWAPP Note Inputs (0 to 40) 30 | const.REQUESTED_ASSET_WORD_INPUT = 0x0000 31 | const.REQUESTED_ASSET_INPUT_1 = 0x0001 32 | const.REQUESTED_ASSET_INPUT_2 = 0x0002 33 | const.REQUESTED_ASSET_INPUT_3 = 0x0003 34 | const.SWAPP_TAG_INPUT = 0x0004 35 | const.P2ID_TAG_INPUT = 0x0005 36 | const.EMPTY_INPUT_6 = 0x0006 37 | const.EMPTY_INPUT_7 = 0x0007 38 | const.SWAPP_COUNT_INPUT = 0x0008 39 | const.EMPTY_INPUT_9 = 0x0009 40 | const.EMPTY_INPUT_10 = 0x000A 41 | const.EMPTY_INPUT_11 = 0x000B 42 | const.SWAPP_CREATOR_PREFIX_INPUT = 0x000C 43 | const.SWAPP_CREATOR_SUFFIX_INPUT = 0x000D 44 | 45 | # RESERVED INPUT MEMORY ADDRESSES 0 to 40 46 | 47 | # Memory Addresses for Price Calculation Procedure (41 to 60) 48 | const.AMT_TOKENS_A = 0x0029 49 | const.AMT_TOKENS_B = 0x0016 50 | const.AMT_TOKENS_B_IN = 0x002B 51 | const.AMT_TOKENS_A_OUT = 0x002C 52 | const.RATIO = 0x002D 53 | 54 | # TokenId Memory Addresses (60 to 70) 55 | const.TOKEN_A_ID_PREFIX = 0x002D 56 | const.TOKEN_A_ID_SUFFIX = 0x002E 57 | const.TOKEN_B_ID_PREFIX = 0x002F 58 | const.TOKEN_B_ID_SUFFIX = 0x0030 59 | 60 | # Boolean Memory Addresses (70 to 80) 61 | const.IS_PARTIAL_FILL = 0x0035 62 | 63 | # Full Word Memory Addresses (80 to 120, must be divisible by 4) 64 | const.SWAPP_SCRIPT_HASH_WORD = 0x0050 65 | const.P2ID_SCRIPT_HASH_WORD = 0x0054 66 | const.SWAP_SERIAL_NUM_WORD = 0x0058 67 | const.P2ID_SERIAL_NUM_WORD = 0x005C 68 | const.P2ID_OUTPUT_RECIPIENT_WORD = 0x0060 69 | const.OFFERED_ASSET_WORD = 0x0064 70 | 71 | # Temporary Memory Addresses 72 | 73 | const.NEW_ASSET_A = 0x0078 74 | 75 | # ERRORS 76 | # ================================================================================================= 77 | 78 | # SWAP script expects exactly 9 note inputs 79 | const.ERR_SWAP_WRONG_NUMBER_OF_INPUTS=0x00020007 80 | 81 | # SWAP script requires exactly one note asset 82 | const.ERR_SWAP_WRONG_NUMBER_OF_ASSETS=0x00020008 83 | 84 | # SWAP amount must not exceed 184467440694145 85 | const.ERR_INVALID_SWAP_AMOUNT=0x00020009 86 | 87 | # SWAPp amount must not be 0 88 | const.ERR_INVALID_SWAP_AMOUT_ZERO=0x0002000A 89 | 90 | # PRICE CALCULATION 91 | # ================================================================================================= 92 | 93 | #! Returns the amount of tokens_a out given an amount of tokens_b 94 | #! 95 | #! Inputs: [tokens_a, tokens_b, tokens_b_in] 96 | #! Outputs: [tokens_a_out] 97 | #! 98 | proc.calculate_tokens_a_for_b 99 | mem_store.AMT_TOKENS_A 100 | mem_store.AMT_TOKENS_B 101 | mem_store.AMT_TOKENS_B_IN 102 | 103 | mem_load.AMT_TOKENS_B mem_load.AMT_TOKENS_A 104 | 105 | gt 106 | if.true 107 | mem_load.AMT_TOKENS_B 108 | u32split 109 | 110 | push.FACTOR 111 | u32split 112 | 113 | exec.u64::wrapping_mul 114 | 115 | mem_load.AMT_TOKENS_A 116 | u32split 117 | 118 | exec.u64::div 119 | push.MAX_U32 mul add 120 | 121 | mem_store.RATIO 122 | 123 | mem_load.AMT_TOKENS_B_IN 124 | u32split 125 | 126 | push.FACTOR 127 | u32split 128 | 129 | exec.u64::wrapping_mul 130 | 131 | mem_load.RATIO 132 | u32split 133 | 134 | exec.u64::div 135 | push.MAX_U32 mul add 136 | 137 | else 138 | mem_load.AMT_TOKENS_A 139 | u32split 140 | 141 | push.FACTOR 142 | u32split 143 | 144 | exec.u64::wrapping_mul 145 | 146 | mem_load.AMT_TOKENS_B 147 | u32split 148 | 149 | exec.u64::div 150 | 151 | mem_load.AMT_TOKENS_B_IN 152 | u32split 153 | 154 | exec.u64::wrapping_mul 155 | 156 | push.FACTOR 157 | u32split 158 | 159 | exec.u64::div 160 | push.MAX_U32 mul add 161 | 162 | end 163 | end 164 | 165 | # HASHING PROCEDURES 166 | # ================================================================================================= 167 | 168 | #! Returns the P2ID RECIPIENT for a specified SERIAL_NUM, SCRIPT_HASH, and account_id 169 | #! 170 | #! Inputs: [SERIAL_NUM, SCRIPT_HASH] 171 | #! Outputs: [P2ID_RECIPIENT] 172 | #! 173 | proc.build_p2id_recipient_hash 174 | padw hmerge 175 | # => [SERIAL_NUM_HASH, SCRIPT_HASH] 176 | 177 | swapw hmerge 178 | # => [SERIAL_SCRIPT_HASH] 179 | 180 | # push.2 push.SWAPP_CREATOR_PREFIX_INPUT 181 | # => [inputs_ptr, num_inputs, SERIAL_SCRIPT_HASH] 182 | 183 | padw 184 | mem_load.SWAPP_CREATOR_SUFFIX_INPUT mem_load.SWAPP_CREATOR_PREFIX_INPUT 185 | push.0.0 186 | 187 | push.4000 mem_storew dropw 188 | push.4004 mem_storew dropw 189 | 190 | push.8.4000 191 | # => [ptr, elements] 192 | 193 | exec.rpo::hash_memory 194 | # => [INPUTS_HASH, SERIAL_SCRIPT_HASH] 195 | 196 | hmerge 197 | # => [P2ID_RECIPIENT] 198 | end 199 | 200 | #! Returns the NOTE RECIPIENT for a specified SERIAL_NUM, SCRIPT_HASH, and INPUT_HASH 201 | #! 202 | #! Inputs: [SERIAL_NUM, SCRIPT_HASH, INPUT_HASH] 203 | #! Outputs: [P2ID_RECIPIENT] 204 | #! 205 | proc.build_recipient_hash 206 | padw hmerge 207 | # => [SERIAL_NUM_HASH, SCRIPT_HASH, INPUT_HASH] 208 | 209 | swapw hmerge 210 | # => [SERIAL_SCRIPT_HASH, INPUT_HASH] 211 | 212 | swapw hmerge 213 | # => [P2ID_RECIPIENT] 214 | end 215 | 216 | # SWAP COUNT INCREMENT PROCEDURE 217 | # ================================================================================================= 218 | 219 | #! Returns the incremented SWAP count value 220 | #! 221 | #! Inputs: [] 222 | #! Outputs: [] 223 | #! 224 | proc.increment_swap_count 225 | mem_load.SWAPP_COUNT_INPUT 226 | push.1 227 | add 228 | mem_store.SWAPP_COUNT_INPUT 229 | end 230 | 231 | # input: [SERIAL_NUM, swap_count, ...] 232 | # ouput: [P2ID_SERIAL_NUM, ...] 233 | proc.get_p2id_serial_num 234 | swapw 235 | hmerge 236 | end 237 | 238 | # input: [] 239 | # output: [get_serial_number + 1] 240 | proc.get_new_swap_serial_num 241 | exec.note::get_serial_number 242 | push.1 243 | add 244 | end 245 | 246 | #! Returns if the currently consuming account is the creator of the note 247 | #! 248 | #! Inputs: [] 249 | #! Outputs: [is_creator] 250 | #! 251 | proc.is_consumer_is_creator 252 | 253 | push.0 exec.note::get_inputs drop drop 254 | # => [] 255 | 256 | exec.account::get_id 257 | # => [acct_id_prefix, acct_id_suffix] 258 | 259 | mem_load.SWAPP_CREATOR_SUFFIX_INPUT mem_load.SWAPP_CREATOR_PREFIX_INPUT 260 | # => [acct_id_prefix_input, acct_id_suffix_input, acct_id_prefix, acct_id_suffix] 261 | 262 | movup.2 263 | # => [acct_id_prefix, acct_id_prefix_input, acct_id_suffix_input, acct_id_suffix] 264 | 265 | eq 266 | # => [is_eq, acct_id_suffix_input, acct_id_suffix] 267 | 268 | if.true 269 | # => [acct_id_suffix_input, acct_id_suffix] 270 | eq 271 | else 272 | # => [acct_id_suffix_input, acct_id_suffix] 273 | drop drop push.0 274 | end 275 | # => [is_creator] 276 | end 277 | 278 | #! Sends Assets in Note to Consuming Account 279 | #! 280 | #! Inputs: [] 281 | #! Outputs: [] 282 | #! 283 | proc.handle_reclaim 284 | 285 | push.0 exec.note::get_assets 286 | 287 | mem_loadw.0 288 | 289 | call.wallet::receive_asset 290 | 291 | dropw 292 | end 293 | 294 | # Partially Fillable Swap Script (SWAPp) 295 | # ================================================================================================= 296 | # 297 | # Partially Fillable Swap Script (SWAPp): adds an asset from the note into consumers account and 298 | # creates a note consumable by note issuer containing requested ASSET. 299 | # 300 | # If the consuming account does not have sufficient liquidity to completely 301 | # fill the amount of the SWAPp creator's requested asset, then the SWAPp note: 302 | # 1) Computes the ratio of token_a to token_b, where token_a is the offered asset, 303 | # and where token_b is the requested asset 304 | # 2) Calculates the amount of token_a to send to the consumer based on the the 305 | # amount of token_b sent via P2ID to the creator 306 | # 3) Outputs a new SWAPp note with the remaining liquidity of token_a, and the updated 307 | # amount of token_b 308 | # 309 | # If the consuming account completely fills the amount requested by the SWAPp creator, 310 | # only a single P2ID note is outputted. 311 | # 312 | # Definitions: 313 | # 1) the offered asset is referred to as token_a, 314 | # 2) the requested asset is referred to as token_b, 315 | # 3) token_b_in is the amount of token_b sent to the SWAPp creator via P2ID from the consuming account 316 | # 4) token_a_out is the amount of token_a sent to the consuming account 317 | # 318 | 319 | # => [] 320 | proc.execute_SWAPp 321 | 322 | # if user does not supply amount token B in via note args 323 | # then we use the amount of tokens B in their wallet 324 | # mem_store.AMT_TOKENS_B_IN 325 | # => [] 326 | 327 | exec.note::get_assets assert.err=ERR_SWAP_WRONG_NUMBER_OF_ASSETS 328 | # => [ptr] 329 | 330 | mem_loadw 331 | # => [OFFERED_ASSET] 332 | 333 | mem_storew.OFFERED_ASSET_WORD 334 | # => [OFFERED_ASSET] 335 | 336 | mem_store.TOKEN_A_ID_PREFIX 337 | # => [offered_asset_id_suffix, 0, token_a_AMT] 338 | 339 | mem_store.TOKEN_A_ID_SUFFIX 340 | # => [0, token_a_AMT] 341 | 342 | drop 343 | # => [token_a_AMT] 344 | 345 | # store token_a_AMT to mem 346 | mem_store.AMT_TOKENS_A 347 | # => [] 348 | 349 | # store note inputs into memory starting at address 0 350 | push.0 exec.note::get_inputs 351 | # => [num_inputs, inputs_ptr] 352 | 353 | # make sure the number of inputs is N 354 | eq.14 assert.err=ERR_SWAP_WRONG_NUMBER_OF_INPUTS 355 | # => [inputs_ptr] 356 | 357 | mem_loadw.REQUESTED_ASSET_WORD_INPUT 358 | # => [REQUESTED_ASSET] 359 | 360 | mem_store.TOKEN_B_ID_PREFIX 361 | # => [token_b_suffix, 0, AMT_TOKENS_B] 362 | 363 | mem_store.TOKEN_B_ID_SUFFIX drop 364 | # => [AMT_TOKENS_B] 365 | 366 | # store token_b_AMT to mem 367 | mem_store.AMT_TOKENS_B 368 | # => [] 369 | 370 | # Users can supply the amount of token B they would like to sell 371 | # via note args. If they don't supply AMT_TOKENS_B_IN via note args 372 | # by default we read the balance of token B in the consuming account 373 | 374 | # get token_b_AMT_IN, if supplied via note args 375 | mem_load.AMT_TOKENS_B_IN push.0 376 | eq 377 | # => [is_AMT_TOKENS_B_IN_USER_BAL] 378 | 379 | # if amount to swap is user wallet balance 380 | if.true 381 | mem_load.TOKEN_B_ID_SUFFIX mem_load.TOKEN_B_ID_PREFIX 382 | # => [token_b_id_prefix, token_b_id_suffix] 383 | 384 | call.account::get_balance 385 | # => [token_b_AMT_IN] 386 | 387 | # token_b_AMT_IN must not be 0 388 | dup push.0 neq assert.err=ERR_INVALID_SWAP_AMOUT_ZERO 389 | # => [token_b_AMT_IN] 390 | 391 | mem_store.AMT_TOKENS_B_IN 392 | # => [] 393 | else 394 | # no need to verify that amount tokens b via note args is 395 | # valid bc if it isn't call.wallet::send_asset will fail 396 | end 397 | # = [] 398 | 399 | mem_load.AMT_TOKENS_B_IN 400 | # => [token_b_AMT_IN] 401 | 402 | mem_load.AMT_TOKENS_B mem_load.AMT_TOKENS_A 403 | # => [token_a_AMT, token_b_AMT, token_b_AMT_IN] 404 | 405 | exec.calculate_tokens_a_for_b 406 | # => [token_a_AMT_out] 407 | 408 | # store token_a_AMT_out in mem 409 | dup mem_store.AMT_TOKENS_A_OUT 410 | # => [token_a_AMT_out] 411 | 412 | mem_load.AMT_TOKENS_A 413 | # => [token_a_AMT, token_a_AMT_out] 414 | 415 | lt 416 | # => [is_lt] 417 | 418 | # if amount_out < amount_a 419 | if.true 420 | # partial order fill 421 | # mem_load.AMT_TOKENS_A_OUT 422 | push.1 mem_store.IS_PARTIAL_FILL 423 | else 424 | # complete order fill 425 | # mem_load.AMT_TOKENS_A 426 | push.0 mem_store.IS_PARTIAL_FILL 427 | end 428 | # => [] 429 | 430 | # 1) send token_b_in amt in to creator 431 | # 2) send token_a_out amt to consumer 432 | 433 | # If Partial Fill: 434 | # 3) create SWAPp' and calculate token_a' & token_b' 435 | # 4) add token_a' and token_b' to SWAPp' 436 | 437 | padw mem_loadw.P2ID_SCRIPT_HASH_WORD 438 | # => [P2ID_SCRIPT_HASH] 439 | 440 | exec.increment_swap_count 441 | # => [P2ID_SCRIPT_HASH] 442 | 443 | padw mem_loadw.SWAPP_COUNT_INPUT 444 | # => [SWAP_COUNT, P2ID_SCRIPT_HASH] 445 | 446 | exec.note::get_serial_number 447 | # => [SWAP_SERIAL_NUM, SWAP_COUNT, P2ID_SCRIPT_HASH] 448 | 449 | exec.get_p2id_serial_num 450 | # => [P2ID_SERIAL_NUM, P2ID_SCRIPT_HASH] 451 | 452 | exec.build_p2id_recipient_hash 453 | # => [P2ID_RECIPIENT] 454 | 455 | push.EXECUTION_HINT_ALWAYS 456 | # => [execution_hint_always, P2ID_RECIPIENT] 457 | 458 | push.PRIVATE_NOTE 459 | # => [public_note, execution_hint_always, P2ID_RECIPIENT] 460 | 461 | push.0 # @dev aux for p2id output note 462 | # => [aux, public_note, execution_hint_always, P2ID_RECIPIENT] 463 | 464 | mem_load.P2ID_TAG_INPUT 465 | # => [tag, aux, public_note, execution_hint_always, P2ID_RECIPIENT] 466 | # => [tag, aux, note_type, execution_hint, RECIPIENT] 467 | 468 | push.111 debug.stack drop 469 | 470 | call.wallet::create_note drop 471 | # => [note_idx, pad(15) ...] 472 | 473 | mem_load.AMT_TOKENS_B_IN 474 | push.0 475 | mem_load.TOKEN_B_ID_SUFFIX 476 | mem_load.TOKEN_B_ID_PREFIX 477 | # => [ASSET, note_idx] 478 | 479 | call.wallet::move_asset_to_note 480 | # => [ASSET, note_idx, pad(11)] 481 | 482 | dropw drop 483 | # => [] 484 | 485 | mem_load.AMT_TOKENS_A_OUT 486 | push.0 487 | mem_load.TOKEN_A_ID_SUFFIX 488 | mem_load.TOKEN_A_ID_PREFIX 489 | # => [ASSET] 490 | 491 | call.wallet::receive_asset 492 | # => [] 493 | 494 | # check if partial fill 495 | mem_load.IS_PARTIAL_FILL 496 | # => [is_partial_fill] 497 | 498 | if.true 499 | mem_load.AMT_TOKENS_B mem_load.AMT_TOKENS_B_IN sub 500 | # => [token_b_AMT'] 501 | 502 | push.0 503 | mem_load.TOKEN_B_ID_SUFFIX 504 | mem_load.TOKEN_B_ID_PREFIX 505 | # => [REQUESTED_ASSET_REMAINING] 506 | 507 | # overwrite memory! 508 | mem_storew.REQUESTED_ASSET_WORD_INPUT dropw 509 | # => [] 510 | 511 | push.16.0 512 | # => [inputs, ptr] 513 | 514 | exec.rpo::hash_memory 515 | # => [INPUTS_HASH] 516 | 517 | exec.note::get_script_root 518 | # => [SCRIPT_HASH, INPUTS_HASH] 519 | 520 | exec.get_new_swap_serial_num 521 | # => [SERIAL_NUM, SCRIPT_HASH, INPUTS_HASH] 522 | 523 | exec.tx::build_recipient_hash 524 | # => [RECIPIENT_SWAPP] 525 | 526 | push.EXECUTION_HINT_ALWAYS 527 | # => [execution_hint_always, SWAPp_RECIPIENT] 528 | 529 | push.PRIVATE_NOTE 530 | # => [public_note, execution_hint_always, SWAPp_RECIPIENT] 531 | 532 | push.0 # @dev empty aux 533 | # => [aux, public_note, execution_hint_always, SWAPp_RECIPIENT] 534 | 535 | mem_load.SWAPP_TAG_INPUT 536 | # => [aux, public_note, execution_hint_always, SWAPp_RECIPIENT] 537 | 538 | mem_load.AMT_TOKENS_A mem_load.AMT_TOKENS_A_OUT sub 539 | # => [token_a_amt', aux, public_note, execution_hint_always, SWAPp_RECIPIENT] 540 | 541 | push.0 542 | mem_load.TOKEN_A_ID_SUFFIX 543 | mem_load.TOKEN_A_ID_PREFIX 544 | # => [ASSET, payback_tag, aux, note_type, SWAPp_RECIPIENT] 545 | 546 | dupw call.wallet::receive_asset 547 | # => [ASSET, payback_tag, aux, note_type, SWAPp_RECIPIENT] 548 | 549 | mem_storew.NEW_ASSET_A dropw 550 | # => [payback_tag, aux, note_type, SWAPp_RECIPIENT] 551 | # => [tag, aux, note_type, execution_hint, RECIPIENT] 552 | 553 | push.222 debug.stack drop 554 | 555 | # SWAPp' creation 556 | call.wallet::create_note 557 | # => [note_idx, pad(15) ...] 558 | 559 | padw 560 | # => [EMPTY_WORD, note_idx, pad(15) ...] 561 | 562 | mem_loadw.NEW_ASSET_A 563 | # => [ASSET, note_idx, pad(15) ...] 564 | 565 | call.wallet::move_asset_to_note 566 | # => [ASSET, note_idx, pad(11)] 567 | 568 | dropw drop 569 | # => [] 570 | else 571 | # do not output SWAPp' 572 | # P2ID already created 573 | nop 574 | end 575 | 576 | # clean stack 577 | exec.sys::truncate_stack 578 | end 579 | 580 | begin 581 | # => [NOTE_ARGS] 582 | 583 | # can provide amount B in as note args 584 | mem_store.AMT_TOKENS_B_IN drop drop drop 585 | # => [] 586 | 587 | push.5114721150025532103.1324187411136457873.11900545512113364072.1928473465238172547 588 | mem_storew.P2ID_SCRIPT_HASH_WORD dropw 589 | # => [] 590 | 591 | exec.is_consumer_is_creator 592 | # => [is_creator] 593 | 594 | if.true 595 | exec.handle_reclaim 596 | else 597 | exec.execute_SWAPp 598 | end 599 | 600 | end -------------------------------------------------------------------------------- /notes/SWAPp.masm: -------------------------------------------------------------------------------- 1 | use.miden::note 2 | use.miden::contracts::wallets::basic->wallet 3 | use.std::sys 4 | use.miden::account 5 | use.std::math::u64 6 | use.miden::tx 7 | use.std::crypto::hashes::rpo 8 | 9 | # CONSTANTS 10 | # ================================================================================================= 11 | 12 | const.PUBLIC_NOTE=1 13 | const.EXECUTION_HINT_ALWAYS=1 14 | const.FACTOR=0x000186A0 # 1e5 15 | const.MAX_U32=0x0000000100000000 16 | 17 | # Memory Addresses 18 | # ================================================================================================= 19 | 20 | # Memory Address Layout: 21 | # - SWAPP Note Inputs: General input addresses (0 - 0xD) 22 | # - Reserved Input Memory Addresses: 0 to 40 (not explicitly listed) 23 | # - Price Calculation Procedure: Addresses 41 to 60 (0x29 to 0x2D) 24 | # - TokenId Addresses: Addresses 60 to 70 (0x2D to 0x30) 25 | # - Boolean Addresses: Addresses 70 to 80 (0x35) 26 | # - Full Word Addresses: Addresses 80 to 120, must be divisible by 4 (0x50 to 0x64) 27 | 28 | # SWAPP Note Inputs (0 to 40) 29 | const.REQUESTED_ASSET_WORD_INPUT = 0x0000 30 | const.REQUESTED_ASSET_INPUT_1 = 0x0001 31 | const.REQUESTED_ASSET_INPUT_2 = 0x0002 32 | const.REQUESTED_ASSET_INPUT_3 = 0x0003 33 | const.SWAPP_TAG_INPUT = 0x0004 34 | const.P2ID_TAG_INPUT = 0x0005 35 | const.EMPTY_INPUT_6 = 0x0006 36 | const.EMPTY_INPUT_7 = 0x0007 37 | const.SWAPP_COUNT_INPUT = 0x0008 38 | const.EMPTY_INPUT_9 = 0x0009 39 | const.EMPTY_INPUT_10 = 0x000A 40 | const.EMPTY_INPUT_11 = 0x000B 41 | const.SWAPP_CREATOR_PREFIX_INPUT = 0x000C 42 | const.SWAPP_CREATOR_SUFFIX_INPUT = 0x000D 43 | 44 | # RESERVED INPUT MEMORY ADDRESSES 0 to 40 45 | 46 | # Memory Addresses for Price Calculation Procedure (41 to 60) 47 | const.AMT_TOKENS_A = 0x0028 48 | const.AMT_TOKENS_B = 0x0029 49 | const.AMT_TOKENS_B_IN = 0x002A 50 | const.AMT_TOKENS_A_OUT= 0x002B 51 | const.RATIO = 0x002C 52 | 53 | # TokenId Memory Addresses (60 to 70) 54 | const.TOKEN_A_ID_PREFIX = 0x002D 55 | const.TOKEN_A_ID_SUFFIX = 0x002E 56 | const.TOKEN_B_ID_PREFIX = 0x002F 57 | const.TOKEN_B_ID_SUFFIX = 0x0030 58 | 59 | # Boolean Memory Addresses (70 to 80) 60 | const.IS_PARTIAL_FILL = 0x0035 61 | 62 | # Full Word Memory Addresses (80 to 120, must be divisible by 4) 63 | const.SWAPP_SCRIPT_HASH_WORD = 0x0050 64 | const.P2ID_SCRIPT_HASH_WORD = 0x0054 65 | const.SWAP_SERIAL_NUM_WORD = 0x0058 66 | const.P2ID_SERIAL_NUM_WORD = 0x005C 67 | const.P2ID_OUTPUT_RECIPIENT_WORD = 0x0060 68 | const.OFFERED_ASSET_WORD = 0x0064 69 | 70 | # Temporary Memory Addresses 71 | 72 | const.NEW_ASSET_A = 0x0078 73 | 74 | # ERRORS 75 | # ================================================================================================= 76 | 77 | # SWAP script expects exactly 9 note inputs 78 | const.ERR_SWAP_WRONG_NUMBER_OF_INPUTS=0x00020007 79 | 80 | # SWAP script requires exactly one note asset 81 | const.ERR_SWAP_WRONG_NUMBER_OF_ASSETS=0x00020008 82 | 83 | # SWAP amount must not exceed 184467440694145 84 | const.ERR_INVALID_SWAP_AMOUNT=0x00020009 85 | 86 | # SWAPp amount must not be 0 87 | const.ERR_INVALID_SWAP_AMOUT_ZERO=0x0002000A 88 | 89 | # PRICE CALCULATION 90 | # ================================================================================================= 91 | 92 | #! Returns the amount of tokens_a out given an amount of tokens_b 93 | #! 94 | #! Inputs: [tokens_a, tokens_b, tokens_b_in] 95 | #! Outputs: [tokens_a_out] 96 | #! 97 | proc.calculate_tokens_a_for_b 98 | mem_store.AMT_TOKENS_A 99 | mem_store.AMT_TOKENS_B 100 | mem_store.AMT_TOKENS_B_IN 101 | 102 | mem_load.AMT_TOKENS_B mem_load.AMT_TOKENS_A 103 | 104 | gt 105 | if.true 106 | mem_load.AMT_TOKENS_B 107 | u32split 108 | 109 | push.FACTOR 110 | u32split 111 | 112 | exec.u64::wrapping_mul 113 | 114 | mem_load.AMT_TOKENS_A 115 | u32split 116 | 117 | exec.u64::div 118 | push.MAX_U32 mul add 119 | 120 | mem_store.RATIO 121 | 122 | mem_load.AMT_TOKENS_B_IN 123 | u32split 124 | 125 | push.FACTOR 126 | u32split 127 | 128 | exec.u64::wrapping_mul 129 | 130 | mem_load.RATIO 131 | u32split 132 | 133 | exec.u64::div 134 | push.MAX_U32 mul add 135 | 136 | else 137 | mem_load.AMT_TOKENS_A 138 | u32split 139 | 140 | push.FACTOR 141 | u32split 142 | 143 | exec.u64::wrapping_mul 144 | 145 | mem_load.AMT_TOKENS_B 146 | u32split 147 | 148 | exec.u64::div 149 | 150 | mem_load.AMT_TOKENS_B_IN 151 | u32split 152 | 153 | exec.u64::wrapping_mul 154 | 155 | push.FACTOR 156 | u32split 157 | 158 | exec.u64::div 159 | push.MAX_U32 mul add 160 | 161 | end 162 | end 163 | 164 | # HASHING PROCEDURES 165 | # ================================================================================================= 166 | 167 | #! Returns the P2ID RECIPIENT for a specified SERIAL_NUM, SCRIPT_HASH, and account_id 168 | #! 169 | #! Inputs: [SERIAL_NUM, SCRIPT_HASH] 170 | #! Outputs: [P2ID_RECIPIENT] 171 | #! 172 | proc.build_p2id_recipient_hash 173 | padw hmerge 174 | # => [SERIAL_NUM_HASH, SCRIPT_HASH] 175 | 176 | swapw hmerge 177 | # => [SERIAL_SCRIPT_HASH] 178 | 179 | # push.2 push.SWAPP_CREATOR_PREFIX_INPUT 180 | # => [inputs_ptr, num_inputs, SERIAL_SCRIPT_HASH] 181 | 182 | padw 183 | mem_load.SWAPP_CREATOR_SUFFIX_INPUT mem_load.SWAPP_CREATOR_PREFIX_INPUT 184 | push.0.0 185 | 186 | push.4000 mem_storew dropw 187 | push.4004 mem_storew dropw 188 | 189 | push.8.4000 190 | # => [ptr, elements] 191 | 192 | exec.rpo::hash_memory 193 | # => [INPUTS_HASH, SERIAL_SCRIPT_HASH] 194 | 195 | hmerge 196 | # => [P2ID_RECIPIENT] 197 | end 198 | 199 | #! Returns the NOTE RECIPIENT for a specified SERIAL_NUM, SCRIPT_HASH, and INPUT_HASH 200 | #! 201 | #! Inputs: [SERIAL_NUM, SCRIPT_HASH, INPUT_HASH] 202 | #! Outputs: [P2ID_RECIPIENT] 203 | #! 204 | proc.build_recipient_hash 205 | padw hmerge 206 | # => [SERIAL_NUM_HASH, SCRIPT_HASH, INPUT_HASH] 207 | 208 | swapw hmerge 209 | # => [SERIAL_SCRIPT_HASH, INPUT_HASH] 210 | 211 | swapw hmerge 212 | # => [P2ID_RECIPIENT] 213 | end 214 | 215 | # SWAP COUNT INCREMENT PROCEDURE 216 | # ================================================================================================= 217 | 218 | #! Returns the incremented SWAP count value 219 | #! 220 | #! Inputs: [] 221 | #! Outputs: [] 222 | #! 223 | proc.increment_swap_count 224 | mem_load.SWAPP_COUNT_INPUT 225 | push.1 226 | add 227 | mem_store.SWAPP_COUNT_INPUT 228 | end 229 | 230 | # input: [SERIAL_NUM, swap_count, ...] 231 | # ouput: [P2ID_SERIAL_NUM, ...] 232 | proc.get_p2id_serial_num 233 | swapw 234 | hmerge 235 | end 236 | 237 | # input: [] 238 | # output: [get_serial_number + 1] 239 | proc.get_new_swap_serial_num 240 | exec.note::get_serial_number 241 | push.1 242 | add 243 | end 244 | 245 | #! Returns if the currently consuming account is the creator of the note 246 | #! 247 | #! Inputs: [] 248 | #! Outputs: [is_creator] 249 | #! 250 | proc.is_consumer_is_creator 251 | 252 | push.0 exec.note::get_inputs drop drop 253 | # => [] 254 | 255 | exec.account::get_id 256 | # => [acct_id_prefix, acct_id_suffix] 257 | 258 | mem_load.SWAPP_CREATOR_PREFIX_INPUT mem_load.SWAPP_CREATOR_SUFFIX_INPUT 259 | # => [acct_id_prefix_input, acct_id_suffix_input, acct_id_prefix, acct_id_suffix] 260 | 261 | movup.2 262 | # => [acct_id_prefix, acct_id_prefix_input, acct_id_suffix_input, acct_id_suffix] 263 | 264 | eq 265 | # => [is_eq, acct_id_suffix_input, acct_id_suffix] 266 | 267 | if.true 268 | # => [acct_id_suffix_input, acct_id_suffix] 269 | eq 270 | else 271 | # => [acct_id_suffix_input, acct_id_suffix] 272 | drop drop push.0 273 | end 274 | # => [is_creator] 275 | end 276 | 277 | #! Sends Assets in Note to Consuming Account 278 | #! 279 | #! Inputs: [] 280 | #! Outputs: [] 281 | #! 282 | proc.handle_reclaim 283 | 284 | push.0 exec.note::get_assets 285 | 286 | mem_loadw.0 287 | 288 | call.wallet::receive_asset 289 | 290 | dropw 291 | end 292 | 293 | # Partially Fillable Swap Script (SWAPp) 294 | # ================================================================================================= 295 | # 296 | # Partially Fillable Swap Script (SWAPp): adds an asset from the note into consumers account and 297 | # creates a note consumable by note issuer containing requested ASSET. 298 | # 299 | # If the consuming account does not have sufficient liquidity to completely 300 | # fill the amount of the SWAPp creator's requested asset, then the SWAPp note: 301 | # 1) Computes the ratio of token_a to token_b, where token_a is the offered asset, 302 | # and where token_b is the requested asset 303 | # 2) Calculates the amount of token_a to send to the consumer based on the the 304 | # amount of token_b sent via P2ID to the creator 305 | # 3) Outputs a new SWAPp note with the remaining liquidity of token_a, and the updated 306 | # amount of token_b 307 | # 308 | # If the consuming account completely fills the amount requested by the SWAPp creator, 309 | # only a single P2ID note is outputted. 310 | # 311 | # Definitions: 312 | # 1) the offered asset is referred to as token_a, 313 | # 2) the requested asset is referred to as token_b, 314 | # 3) token_b_in is the amount of token_b sent to the SWAPp creator via P2ID from the consuming account 315 | # 4) token_a_out is the amount of token_a sent to the consuming account 316 | # 317 | 318 | # => [] 319 | proc.execute_SWAPp 320 | 321 | # if user does not supply amount token B in via note args 322 | # then we use the amount of tokens B in their wallet 323 | # mem_store.AMT_TOKENS_B_IN 324 | # => [] 325 | 326 | exec.note::get_assets assert.err=ERR_SWAP_WRONG_NUMBER_OF_ASSETS 327 | # => [ptr] 328 | 329 | mem_loadw 330 | # => [OFFERED_ASSET] 331 | 332 | mem_storew.OFFERED_ASSET_WORD 333 | # => [OFFERED_ASSET] 334 | 335 | mem_store.TOKEN_A_ID_PREFIX 336 | # => [offered_asset_id_suffix, 0, token_a_AMT] 337 | 338 | mem_store.TOKEN_A_ID_SUFFIX 339 | # => [0, token_a_AMT] 340 | 341 | drop 342 | # => [token_a_AMT] 343 | 344 | # store token_a_AMT to mem 345 | mem_store.AMT_TOKENS_A 346 | # => [] 347 | 348 | # store note inputs into memory starting at address 0 349 | push.0 exec.note::get_inputs 350 | # => [num_inputs, inputs_ptr] 351 | 352 | # make sure the number of inputs is N 353 | eq.14 assert.err=ERR_SWAP_WRONG_NUMBER_OF_INPUTS 354 | # => [inputs_ptr] 355 | 356 | mem_loadw.REQUESTED_ASSET_WORD_INPUT 357 | # => [REQUESTED_ASSET] 358 | 359 | mem_store.TOKEN_B_ID_PREFIX 360 | # => [token_b_suffix, 0, AMT_TOKENS_B] 361 | 362 | mem_store.TOKEN_B_ID_SUFFIX drop 363 | # => [AMT_TOKENS_B] 364 | 365 | # store token_b_AMT to mem 366 | mem_store.AMT_TOKENS_B 367 | # => [] 368 | 369 | # Users can supply the amount of token B they would like to sell 370 | # via note args. If they don't supply AMT_TOKENS_B_IN via note args 371 | # by default we read the balance of token B in the consuming account 372 | 373 | # get token_b_AMT_IN, if supplied via note args 374 | mem_load.AMT_TOKENS_B_IN push.0 375 | eq 376 | # => [is_AMT_TOKENS_B_IN_USER_BAL] 377 | 378 | # if amount to swap is user wallet balance 379 | if.true 380 | mem_load.TOKEN_B_ID_SUFFIX mem_load.TOKEN_B_ID_PREFIX 381 | # => [token_b_id_prefix, token_b_id_suffix] 382 | 383 | call.account::get_balance 384 | # => [token_b_AMT_IN] 385 | 386 | # token_b_AMT_IN must not be 0 387 | dup push.0 neq assert.err=ERR_INVALID_SWAP_AMOUT_ZERO 388 | # => [token_b_AMT_IN] 389 | 390 | mem_store.AMT_TOKENS_B_IN 391 | # => [] 392 | else 393 | # no need to verify that amount tokens b via note args is 394 | # valid bc if it isn't call.wallet::send_asset will fail 395 | end 396 | # = [] 397 | 398 | mem_load.AMT_TOKENS_B_IN 399 | # => [token_b_AMT_IN] 400 | 401 | mem_load.AMT_TOKENS_B mem_load.AMT_TOKENS_A 402 | # => [token_a_AMT, token_b_AMT, token_b_AMT_IN] 403 | 404 | exec.calculate_tokens_a_for_b 405 | # => [token_a_AMT_out] 406 | 407 | # store token_a_AMT_out in mem 408 | dup mem_store.AMT_TOKENS_A_OUT 409 | # => [token_a_AMT_out] 410 | 411 | mem_load.AMT_TOKENS_A 412 | # => [token_a_AMT, token_a_AMT_out] 413 | 414 | lt 415 | # => [is_lt] 416 | 417 | # if amount_out < amount_a 418 | if.true 419 | # partial order fill 420 | # mem_load.AMT_TOKENS_A_OUT 421 | push.1 mem_store.IS_PARTIAL_FILL 422 | else 423 | # complete order fill 424 | # mem_load.AMT_TOKENS_A 425 | push.0 mem_store.IS_PARTIAL_FILL 426 | end 427 | # => [] 428 | 429 | # 1) send token_b_in amt in to creator 430 | # 2) send token_a_out amt to consumer 431 | 432 | # If Partial Fill: 433 | # 3) create SWAPp' and calculate token_a' & token_b' 434 | # 4) add token_a' and token_b' to SWAPp' 435 | 436 | padw mem_loadw.P2ID_SCRIPT_HASH_WORD 437 | # => [P2ID_SCRIPT_HASH] 438 | 439 | exec.increment_swap_count 440 | # => [P2ID_SCRIPT_HASH] 441 | 442 | padw mem_loadw.SWAPP_COUNT_INPUT 443 | # => [SWAP_COUNT, P2ID_SCRIPT_HASH] 444 | 445 | exec.note::get_serial_number 446 | # => [SWAP_SERIAL_NUM, SWAP_COUNT, P2ID_SCRIPT_HASH] 447 | 448 | exec.get_p2id_serial_num 449 | # => [P2ID_SERIAL_NUM, P2ID_SCRIPT_HASH] 450 | 451 | exec.build_p2id_recipient_hash 452 | # => [P2ID_RECIPIENT] 453 | 454 | push.EXECUTION_HINT_ALWAYS 455 | # => [execution_hint_always, P2ID_RECIPIENT] 456 | 457 | push.PUBLIC_NOTE 458 | # => [public_note, execution_hint_always, P2ID_RECIPIENT] 459 | 460 | push.0 # @dev aux for p2id output note 461 | # => [aux, public_note, execution_hint_always, P2ID_RECIPIENT] 462 | 463 | mem_load.P2ID_TAG_INPUT 464 | # => [tag, aux, public_note, execution_hint_always, P2ID_RECIPIENT] 465 | # => [tag, aux, note_type, execution_hint, RECIPIENT] 466 | 467 | call.wallet::create_note drop 468 | # => [note_idx, pad(15) ...] 469 | 470 | mem_load.AMT_TOKENS_B_IN 471 | push.0 472 | mem_load.TOKEN_B_ID_SUFFIX 473 | mem_load.TOKEN_B_ID_PREFIX 474 | # => [ASSET, note_idx] 475 | 476 | call.wallet::move_asset_to_note 477 | # => [ASSET, note_idx, pad(11)] 478 | 479 | dropw drop 480 | # => [] 481 | 482 | mem_load.AMT_TOKENS_A_OUT 483 | push.0 484 | mem_load.TOKEN_A_ID_SUFFIX 485 | mem_load.TOKEN_A_ID_PREFIX 486 | # => [ASSET] 487 | 488 | call.wallet::receive_asset 489 | # => [] 490 | 491 | # check if partial fill 492 | mem_load.IS_PARTIAL_FILL 493 | # => [is_partial_fill] 494 | 495 | if.true 496 | mem_load.AMT_TOKENS_B mem_load.AMT_TOKENS_B_IN sub 497 | # => [token_b_AMT'] 498 | 499 | push.0 500 | mem_load.TOKEN_B_ID_SUFFIX 501 | mem_load.TOKEN_B_ID_PREFIX 502 | # => [REQUESTED_ASSET_REMAINING] 503 | 504 | # overwrite memory! 505 | mem_storew.REQUESTED_ASSET_WORD_INPUT dropw 506 | # => [] 507 | 508 | push.16.0 509 | # => [inputs, ptr] 510 | 511 | exec.rpo::hash_memory 512 | # => [INPUTS_HASH] 513 | 514 | exec.note::get_script_root 515 | # => [SCRIPT_HASH, INPUTS_HASH] 516 | 517 | exec.get_new_swap_serial_num 518 | # => [SERIAL_NUM, SCRIPT_HASH, INPUTS_HASH] 519 | 520 | exec.tx::build_recipient_hash 521 | # => [RECIPIENT_SWAPP] 522 | 523 | push.EXECUTION_HINT_ALWAYS 524 | # => [execution_hint_always, SWAPp_RECIPIENT] 525 | 526 | push.PUBLIC_NOTE 527 | # => [public_note, execution_hint_always, SWAPp_RECIPIENT] 528 | 529 | push.0 # @dev empty aux 530 | # => [aux, public_note, execution_hint_always, SWAPp_RECIPIENT] 531 | 532 | mem_load.SWAPP_TAG_INPUT 533 | # => [aux, public_note, execution_hint_always, SWAPp_RECIPIENT] 534 | 535 | mem_load.AMT_TOKENS_A mem_load.AMT_TOKENS_A_OUT sub 536 | # => [token_a_amt', aux, public_note, execution_hint_always, SWAPp_RECIPIENT] 537 | 538 | push.0 539 | mem_load.TOKEN_A_ID_SUFFIX 540 | mem_load.TOKEN_A_ID_PREFIX 541 | # => [ASSET, payback_tag, aux, note_type, SWAPp_RECIPIENT] 542 | 543 | dupw call.wallet::receive_asset 544 | # => [ASSET, payback_tag, aux, note_type, SWAPp_RECIPIENT] 545 | 546 | mem_storew.NEW_ASSET_A dropw 547 | # => [payback_tag, aux, note_type, SWAPp_RECIPIENT] 548 | # => [tag, aux, note_type, execution_hint, RECIPIENT] 549 | 550 | # SWAPp' creation 551 | call.wallet::create_note 552 | # => [note_idx, pad(15) ...] 553 | 554 | padw 555 | # => [EMPTY_WORD, note_idx, pad(15) ...] 556 | 557 | mem_loadw.NEW_ASSET_A 558 | # => [ASSET, note_idx, pad(15) ...] 559 | 560 | call.wallet::move_asset_to_note 561 | # => [ASSET, note_idx, pad(11)] 562 | 563 | dropw drop 564 | # => [] 565 | 566 | else 567 | # do not output SWAPp' 568 | # P2ID already created 569 | nop 570 | end 571 | 572 | # clean stack 573 | exec.sys::truncate_stack 574 | end 575 | 576 | begin 577 | # => [NOTE_ARGS] 578 | 579 | # can provide amount B in as note args 580 | mem_store.AMT_TOKENS_B_IN drop drop drop 581 | # => [] 582 | 583 | push.5114721150025532103.1324187411136457873.11900545512113364072.1928473465238172547 584 | mem_storew.P2ID_SCRIPT_HASH_WORD dropw 585 | # => [] 586 | 587 | exec.is_consumer_is_creator 588 | # => [is_creator] 589 | 590 | if.true 591 | exec.handle_reclaim 592 | else 593 | exec.execute_SWAPp 594 | end 595 | 596 | end -------------------------------------------------------------------------------- /src/cli/cancel_order.rs: -------------------------------------------------------------------------------- 1 | use crate::cli::open_order::OrderError; 2 | use crate::utils::common::{client_setup, get_account}; 3 | 4 | use clap::Parser; 5 | use miden_client::account::AccountId; 6 | use miden_client::note::{NoteId, NoteTag}; 7 | use miden_client::transaction::TransactionRequestBuilder; 8 | 9 | #[derive(Parser, Debug)] 10 | #[command(about = "Cancel an existing order")] 11 | pub struct CancelOrder { 12 | /// Unique user identifier 13 | #[arg(long)] 14 | user_id: String, 15 | 16 | /// OrderId 17 | #[arg(long)] 18 | order_id: String, 19 | 20 | /// Order tag 21 | #[arg(long)] 22 | tag: u32, 23 | } 24 | 25 | impl CancelOrder { 26 | pub(crate) async fn run(&self) -> Result { 27 | let mut client = client_setup().await?; 28 | 29 | let account_id = AccountId::from_hex(&self.user_id)?; 30 | let user = get_account(&mut client, account_id).await?; 31 | 32 | let order_id = NoteId::try_from_hex(self.order_id.as_str())?; 33 | 34 | let _note_tag = NoteTag::from(self.tag); 35 | 36 | let consumable_notes = client.get_input_note(order_id).await?.unwrap(); 37 | let id = consumable_notes.id(); 38 | if consumable_notes.is_consumed() { 39 | return Err(OrderError::OrderAlreadyConsumed); 40 | } 41 | 42 | let transaction_request = TransactionRequestBuilder::consume_notes(vec![id]) 43 | .build() 44 | .unwrap(); 45 | let tx_execution_result = client 46 | .new_transaction(user.id(), transaction_request) 47 | .await?; 48 | 49 | client.submit_transaction(tx_execution_result).await?; 50 | let _ = client.sync_state().await?; 51 | 52 | println!("note consumed successfully."); 53 | println!("Order cancelled"); 54 | Ok(true) 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /src/cli/consume_swapped.rs: -------------------------------------------------------------------------------- 1 | use crate::utils::common::client_setup; 2 | use crate::utils::common::get_account; 3 | 4 | use crate::cli::open_order::OrderError; 5 | use clap::Parser; 6 | use miden_client::account::AccountId; 7 | use miden_client::transaction::TransactionRequestBuilder; 8 | use std::time::Duration; 9 | 10 | #[derive(Parser, Debug)] 11 | #[command(about = "Consumes the p2id note once the swap note is fulfilled")] 12 | pub struct ConsumeSwapped { 13 | /// Unique user identifier 14 | #[arg(long)] 15 | user_id: String, 16 | } 17 | 18 | impl ConsumeSwapped { 19 | pub(crate) async fn run(&self) -> Result { 20 | let mut client = client_setup().await?; 21 | 22 | let user_id = AccountId::from_hex(&self.user_id)?; 23 | let user = get_account(&mut client, user_id).await.unwrap(); 24 | let start = std::time::Instant::now(); 25 | loop { 26 | // Resync to get the latest data 27 | client.sync_state().await?; 28 | 29 | let consumable_notes = client.get_consumable_notes(Some(user.id())).await?; 30 | let list_of_note_ids: Vec<_> = 31 | consumable_notes.iter().map(|(note, _)| note.id()).collect(); 32 | 33 | if list_of_note_ids.len() > 0 { 34 | let transaction_request = 35 | TransactionRequestBuilder::consume_notes(list_of_note_ids) 36 | .build() 37 | .unwrap(); 38 | let tx_execution_result = client 39 | .new_transaction(user.id(), transaction_request) 40 | .await?; 41 | 42 | client.submit_transaction(tx_execution_result).await?; 43 | break; 44 | } 45 | 46 | if start.elapsed().as_secs() > 15 { 47 | println!("Timed out"); 48 | break; 49 | } else { 50 | tokio::time::sleep(Duration::from_secs(3)).await; 51 | } 52 | } 53 | 54 | Ok(true) 55 | } 56 | } 57 | -------------------------------------------------------------------------------- /src/cli/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod cancel_order; 2 | pub mod consume_swapped; 3 | pub mod open_order; 4 | -------------------------------------------------------------------------------- /src/cli/open_order.rs: -------------------------------------------------------------------------------- 1 | use crate::utils::common::client_setup; 2 | use crate::utils::common::create_partial_swap_note; 3 | use crate::utils::common::get_account; 4 | 5 | use clap::Parser; 6 | use miden_client::ClientError; 7 | use miden_client::account::AccountId; 8 | use miden_client::note::Note; 9 | use miden_client::transaction::TransactionRequestBuilder; 10 | use miden_objects::AccountIdError; 11 | use miden_objects::Felt; 12 | use miden_objects::asset::FungibleAsset; 13 | use miden_objects::transaction::OutputNote; 14 | use rand::Rng; 15 | use sha2::Digest; 16 | use thiserror::Error; 17 | 18 | #[derive(Parser, Debug)] 19 | #[command(about = "Opens a new order")] 20 | pub struct OpenOrder { 21 | /// Unique user identifier 22 | #[arg(long)] 23 | user_id: String, 24 | 25 | /// Token user is offering (e.g. ETH) 26 | #[arg(long)] 27 | offered_asset: String, 28 | 29 | /// Amount of token_a 30 | #[arg(long)] 31 | offered_amount: u64, 32 | 33 | /// Token user wants in return (e.g. USDC) 34 | #[arg(long)] 35 | requested_asset: String, 36 | 37 | /// Price 38 | #[arg(long)] 39 | price: u64, 40 | } 41 | 42 | #[derive(Error, Debug)] 43 | pub enum OrderError { 44 | #[error("Client error:")] 45 | Client(#[from] ClientError), 46 | 47 | #[error("Account error:")] 48 | InvalidAccountID(#[from] AccountIdError), 49 | 50 | #[error("hex error:")] 51 | InvalidFelt(#[from] miden_objects::utils::HexParseError), 52 | 53 | #[error("order already consumed")] 54 | OrderAlreadyConsumed, 55 | } 56 | 57 | impl OpenOrder { 58 | pub(crate) async fn run(&self) -> Result { 59 | let mut client = client_setup().await?; 60 | 61 | let user_id = AccountId::from_hex(&self.user_id)?; 62 | let user = get_account(&mut client, user_id).await.unwrap(); 63 | 64 | let offered_asset_id = AccountId::from_hex(&self.offered_asset)?; 65 | let offered_asset = get_account(&mut client, offered_asset_id).await?; 66 | 67 | let requested_asset_id = AccountId::from_hex(&self.requested_asset)?; 68 | let requested_asset = get_account(&mut client, requested_asset_id).await?; 69 | 70 | // offered asset amount 71 | let asset_a = FungibleAsset::new(offered_asset.id(), self.offered_amount).unwrap(); 72 | 73 | //TODO: requested asset amount should be based on the price 74 | // requested asset amount 75 | let asset_b = FungibleAsset::new(requested_asset.id(), self.offered_amount).unwrap(); 76 | 77 | // Set up the swap transaction 78 | let serial_num = get_serial_num(user_id); 79 | let fill_number = 0; 80 | 81 | // Create the partial swap note 82 | let swap_note = create_partial_swap_note( 83 | user.id(), 84 | user.id(), 85 | asset_a.into(), 86 | asset_b.into(), 87 | serial_num, 88 | fill_number, 89 | ) 90 | .unwrap(); 91 | 92 | let note_req = TransactionRequestBuilder::new() 93 | .with_own_output_notes(vec![OutputNote::Full(swap_note.clone())]) 94 | .build() 95 | .unwrap(); 96 | 97 | let tx_result = client.new_transaction(user.id(), note_req).await.unwrap(); 98 | 99 | let _ = client.submit_transaction(tx_result).await; 100 | client.sync_state().await?; 101 | 102 | Ok(swap_note) 103 | } 104 | } 105 | 106 | /// Generates a random serial number 107 | /// hash(AccountId||random u64) 108 | /// AccountId is treated as domain separation tag 109 | pub fn get_serial_num(acc_id: AccountId) -> [Felt; 4] { 110 | let mut rng = rand::rng(); 111 | let num = rng.r#random::(); 112 | let data = format!("{}{}", acc_id.to_hex(), num); 113 | let hash: [u8; 32] = sha2::Sha256::digest(&data.as_bytes()).into(); 114 | 115 | let serial_num: [Felt; 4] = [ 116 | Felt::new(u64::from_be_bytes(hash[0..8].try_into().unwrap())), 117 | Felt::new(u64::from_be_bytes(hash[8..16].try_into().unwrap())), 118 | Felt::new(u64::from_be_bytes(hash[16..24].try_into().unwrap())), 119 | Felt::new(u64::from_be_bytes(hash[24..32].try_into().unwrap())), 120 | ]; 121 | serial_num 122 | } 123 | -------------------------------------------------------------------------------- /src/lib.rs: -------------------------------------------------------------------------------- 1 | pub mod cli; 2 | pub mod utils; 3 | -------------------------------------------------------------------------------- /src/matcher.rs: -------------------------------------------------------------------------------- 1 | use bincode; 2 | use miden_client::note::Note; 3 | use miden_lib::utils::Deserializable; 4 | use miden_tx::utils::ToHex; 5 | use sha2::{Digest, Sha256}; 6 | use tokio::io::AsyncReadExt; 7 | use tokio::net::TcpListener; 8 | use winter_utils::Serializable; 9 | 10 | mod utils; 11 | use utils::common::MidenNote; 12 | 13 | #[tokio::main] 14 | async fn main() -> anyhow::Result<()> { 15 | let listener = TcpListener::bind("127.0.0.1:8080").await?; 16 | println!("Matcher listening on 127.0.0.1:8080"); 17 | 18 | loop { 19 | let (mut socket, _) = listener.accept().await?; 20 | 21 | tokio::spawn(async move { 22 | let mut len_buf = [0u8; 4]; 23 | if socket.read_exact(&mut len_buf).await.is_err() { 24 | eprintln!("Failed to read length"); 25 | return; 26 | } 27 | 28 | let len = u32::from_be_bytes(len_buf) as usize; 29 | let mut buffer = vec![0u8; len]; 30 | 31 | if socket.read_exact(&mut buffer).await.is_err() { 32 | eprintln!("Failed to read payload"); 33 | return; 34 | } 35 | 36 | match bincode::deserialize::(&buffer) { 37 | Ok(note) => { 38 | let note_bytes = note.payload; 39 | 40 | //check for valid notes 41 | // 1. check that note can be correctly deserialized 42 | // 2. check that note script hash is correct 43 | let received_note = Note::read_from_bytes(¬e_bytes); 44 | if received_note.is_err() { 45 | eprintln!("Failed to deserialize note"); 46 | }; 47 | let received_note = received_note.unwrap(); 48 | let note_script = received_note.script().to_bytes(); 49 | 50 | let mut hasher = Sha256::new(); 51 | hasher.update(note_script); 52 | let hash = hasher.finalize().to_hex(); 53 | println!("script hash: {:?}", hash); 54 | 55 | // note script hash of PRIVATE_SWAPp note 56 | if hash != "e39a29af05b233279c0009701242ff54b1d8c0d848ad2f2001eb7e0ac6ef745e" { 57 | eprintln!("Not a valid note"); 58 | } 59 | 60 | println!("Received note:"); 61 | println!(" ID: {:?}", note.id); 62 | // println!(" Payload: {:#?}", received_note); 63 | } 64 | Err(e) => eprintln!("Failed to deserialize note: {}", e), 65 | } 66 | }); 67 | } 68 | } 69 | -------------------------------------------------------------------------------- /src/user.rs: -------------------------------------------------------------------------------- 1 | use bincode; 2 | use tokio::io::AsyncWriteExt; 3 | use tokio::net::TcpStream; 4 | 5 | use miden_lib::utils::Serializable; 6 | 7 | mod cli; 8 | mod utils; 9 | use clap::Parser; 10 | use utils::common::MidenNote; 11 | 12 | #[derive(Parser, Debug)] 13 | #[command(name = "miden-cli", about = "Dark pool CLI")] 14 | pub enum Cli { 15 | #[command(name = "open-order")] 16 | OpenOrder(cli::open_order::OpenOrder), 17 | 18 | #[command(name = "cancel-order")] 19 | CancelOrder(cli::cancel_order::CancelOrder), 20 | 21 | #[command(name = "consume-swapped")] 22 | ConsumeSwapped(cli::consume_swapped::ConsumeSwapped), 23 | } 24 | 25 | #[tokio::main] 26 | async fn main() -> anyhow::Result<()> { 27 | let cli = Cli::parse(); 28 | 29 | match cli { 30 | Cli::OpenOrder(cmd) => { 31 | let swap_note = cmd.run().await?; 32 | let buffer = swap_note.to_bytes(); 33 | 34 | let note = MidenNote { 35 | id: swap_note.id().to_hex(), 36 | payload: buffer, 37 | }; 38 | 39 | let encoded = bincode::serialize(¬e)?; 40 | let length = (encoded.len() as u32).to_be_bytes(); 41 | 42 | //TODO: right now simple tcp but encryption needs to added. 43 | // we can also consider some other communication protocol such as QUIC 44 | let mut stream = TcpStream::connect("127.0.0.1:8080").await?; 45 | stream.write_all(&length).await?; 46 | stream.write_all(&encoded).await?; 47 | 48 | println!("Note sent"); 49 | println!("Note id: {}", swap_note.id().to_hex()); 50 | } 51 | 52 | Cli::CancelOrder(cmd) => { 53 | let result = cmd.run().await?; 54 | println!("{}", result); 55 | } 56 | 57 | Cli::ConsumeSwapped(cmd) => { 58 | let result = cmd.run().await?; 59 | println!("{}", result); 60 | } 61 | } 62 | 63 | Ok(()) 64 | } 65 | -------------------------------------------------------------------------------- /src/utils/common.rs: -------------------------------------------------------------------------------- 1 | use miden_client::{ 2 | Client, ClientError, account::Account, account::AccountId, builder::ClientBuilder, 3 | rpc::Endpoint, rpc::TonicRpcClient, 4 | }; 5 | 6 | use serde::{Deserialize, Serialize}; 7 | use std::sync::Arc; 8 | 9 | use miden_lib::{note::utils::build_swap_tag, transaction::TransactionKernel}; 10 | use miden_objects::asset::FungibleAsset; 11 | use miden_objects::note::{ 12 | Note, NoteAssets, NoteExecutionHint, NoteExecutionMode, NoteInputs, NoteMetadata, 13 | NoteRecipient, NoteScript, NoteTag, NoteType, 14 | }; 15 | use miden_objects::{Felt, NoteError, Word, asset::Asset}; 16 | use miden_vm::Assembler; 17 | 18 | // the payload vector is the serialized note 19 | // id is the noteId 20 | #[derive(Serialize, Deserialize, Debug)] 21 | pub struct MidenNote { 22 | pub id: String, 23 | pub payload: Vec, 24 | } 25 | 26 | pub async fn client_setup() -> Result { 27 | // Initialize client & keystore 28 | let endpoint = Endpoint::new( 29 | "https".to_string(), 30 | "rpc.testnet.miden.io".to_string(), 31 | Some(443), 32 | ); 33 | let timeout_ms = 10_000; 34 | let rpc_api = Arc::new(TonicRpcClient::new(&endpoint, timeout_ms)); 35 | 36 | let mut client = ClientBuilder::new() 37 | .with_rpc(rpc_api) 38 | .with_filesystem_keystore("./keystore") 39 | .with_sqlite_store("./store.sqlite3") 40 | .in_debug_mode(true) 41 | .build() 42 | .await?; 43 | 44 | let _ = client.sync_state().await?; 45 | 46 | Ok(client) 47 | } 48 | 49 | pub(crate) async fn get_account( 50 | client: &mut Client, 51 | acc_id: AccountId, 52 | ) -> Result { 53 | client.import_account_by_id(acc_id).await?; 54 | 55 | let binding = client.get_account(acc_id).await.unwrap().unwrap(); 56 | 57 | let account = binding.account(); 58 | 59 | return Ok(account.clone()); 60 | } 61 | 62 | /// Generates a SWAP note - swap of assets between two accounts 63 | pub fn create_partial_swap_note( 64 | creator: AccountId, 65 | last_consumer: AccountId, 66 | offered_asset: Asset, 67 | requested_asset: Asset, 68 | swap_serial_num: [Felt; 4], 69 | fill_number: u64, 70 | ) -> Result { 71 | let assembler: Assembler = TransactionKernel::assembler().with_debug_mode(true); 72 | 73 | let note_code = include_str!("../../notes/PRIVATE_SWAPp.masm"); 74 | let note_script = NoteScript::compile(note_code, assembler).unwrap(); 75 | let note_type = NoteType::Private; 76 | 77 | let requested_asset_word: Word = requested_asset.into(); 78 | 79 | let swapp_tag = get_tag(note_type, &offered_asset, &requested_asset)?; 80 | let p2id_tag = NoteTag::from_account_id(creator, NoteExecutionMode::Local)?; 81 | 82 | let inputs = NoteInputs::new(vec![ 83 | requested_asset_word[0], 84 | requested_asset_word[1], 85 | requested_asset_word[2], 86 | requested_asset_word[3], 87 | swapp_tag.inner().into(), 88 | p2id_tag.into(), 89 | Felt::new(0), 90 | Felt::new(0), 91 | Felt::new(fill_number), 92 | Felt::new(0), 93 | Felt::new(0), 94 | Felt::new(0), 95 | creator.prefix().into(), 96 | creator.suffix().into(), 97 | ])?; 98 | 99 | let aux = Felt::new(0); 100 | 101 | // build the outgoing note 102 | let metadata = NoteMetadata::new( 103 | last_consumer, 104 | note_type, 105 | swapp_tag, 106 | NoteExecutionHint::always(), 107 | aux, 108 | )?; 109 | 110 | let assets = NoteAssets::new(vec![offered_asset])?; 111 | let recipient = NoteRecipient::new(swap_serial_num, note_script.clone(), inputs.clone()); 112 | let note = Note::new(assets.clone(), metadata, recipient.clone()); 113 | 114 | Ok(note) 115 | } 116 | 117 | /// Generates a SWAP note tag 118 | /// build_swap_tag(note_type, asset1, asset2) 119 | /// where asset_{i} is an Asset created with AssetId of the asset pairs and 0 amount so that the tag is deterministic for a given asset pair 120 | fn get_tag(note_type: NoteType, asset1: &Asset, asset2: &Asset) -> Result { 121 | let id1 = asset1.unwrap_fungible().faucet_id(); 122 | let id2 = asset2.unwrap_fungible().faucet_id(); 123 | let asset1 = FungibleAsset::new(id1, 0).unwrap(); 124 | let asset2 = FungibleAsset::new(id2, 0).unwrap(); 125 | let tag = build_swap_tag(note_type, &asset1.into(), &asset2.into())?; 126 | Ok(tag) 127 | } 128 | -------------------------------------------------------------------------------- /src/utils/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod common; 2 | -------------------------------------------------------------------------------- /tests/user_flow.rs: -------------------------------------------------------------------------------- 1 | use miden_client::keystore::FilesystemKeyStore; 2 | use std::process::Command; 3 | use std::time::Duration; 4 | use tokio::net::TcpListener; 5 | use tokio::time::sleep; 6 | 7 | use miden_client::transaction::TransactionRequestBuilder; 8 | use miden_dark_pool::cli::open_order::get_serial_num; 9 | use miden_dark_pool::utils::common::client_setup; 10 | use miden_dark_pool::utils::common::create_partial_swap_note; 11 | use miden_objects::asset::FungibleAsset; 12 | use miden_objects::transaction::OutputNote; 13 | 14 | pub mod utils; 15 | use utils::test_utils::{TestUser, create_faucet, delete_keystore_and_store, setup_test_user}; 16 | 17 | #[tokio::test] 18 | async fn test_open_order() { 19 | // Launch test matcher server in background 20 | tokio::spawn(async { 21 | let listener = TcpListener::bind("127.0.0.1:8080").await.unwrap(); 22 | let (_, _) = listener.accept().await.unwrap(); 23 | }); 24 | 25 | // Wait to ensure matcher is ready 26 | sleep(Duration::from_secs(5)).await; 27 | 28 | let mut client = client_setup().await.unwrap(); 29 | 30 | let keystore = FilesystemKeyStore::new("./keystore".into()).unwrap(); 31 | 32 | let symbol = "ETH"; 33 | let faucet_a = create_faucet(&mut client, keystore.clone(), symbol) 34 | .await 35 | .unwrap(); 36 | 37 | let symbol = "BTC"; 38 | let faucet_b = create_faucet(&mut client, keystore.clone(), symbol) 39 | .await 40 | .unwrap(); 41 | 42 | let mut users: Vec = Vec::new(); 43 | 44 | let user = setup_test_user( 45 | &mut client, 46 | keystore, 47 | &format!("testuser"), 48 | faucet_a.clone(), 49 | faucet_b.clone(), 50 | 100, 51 | ) 52 | .await; 53 | users.push(user); 54 | 55 | // Call the user binary 56 | let output = Command::new("cargo") 57 | .args([ 58 | "run", 59 | "--release", 60 | "--bin", 61 | "user", 62 | "--", 63 | "open-order", 64 | "--user-id", 65 | users[0].account_id.id().to_hex().as_str(), 66 | "--offered-asset", 67 | faucet_a.id().to_hex().as_str(), 68 | "--offered-amount", 69 | "50", 70 | "--requested-asset", 71 | faucet_b.id().to_hex().as_str(), 72 | "--price", 73 | "100", 74 | ]) 75 | .output() 76 | .expect("Failed to execute user binary"); 77 | 78 | let stdout = String::from_utf8_lossy(&output.stdout); 79 | let stderr = String::from_utf8_lossy(&output.stderr); 80 | 81 | println!("stdout:\n{}", stdout); 82 | println!("stderr:\n{}", stderr); 83 | 84 | assert!(output.status.success(), "User binary failed"); 85 | assert!(stdout.contains("Note sent")); 86 | delete_keystore_and_store().await; 87 | } 88 | 89 | #[tokio::test] 90 | async fn test_cancel_order() { 91 | let mut client = client_setup().await.unwrap(); 92 | 93 | let keystore = FilesystemKeyStore::new("./keystore".into()).unwrap(); 94 | 95 | let symbol = "ETH"; 96 | let faucet_a = create_faucet(&mut client, keystore.clone(), symbol) 97 | .await 98 | .unwrap(); 99 | 100 | let symbol = "BTC"; 101 | let faucet_b = create_faucet(&mut client, keystore.clone(), symbol) 102 | .await 103 | .unwrap(); 104 | 105 | // creates a user account and mints and consumes tokens(faucet_a: 100 and faucet_b: 20) 106 | let user = setup_test_user( 107 | &mut client, 108 | keystore, 109 | &format!("testuser"), 110 | faucet_a.clone(), 111 | faucet_b.clone(), 112 | 100, 113 | ) 114 | .await; 115 | 116 | let asset_a = FungibleAsset::new(faucet_a.id(), 50).unwrap(); 117 | let asset_b = FungibleAsset::new(faucet_b.id(), 50).unwrap(); 118 | 119 | let acc = client 120 | .get_account(user.account_id.id()) 121 | .await 122 | .unwrap() 123 | .unwrap(); 124 | let balance1 = acc.account().vault().get_balance(faucet_a.id()).unwrap(); 125 | let balance2 = acc.account().vault().get_balance(faucet_b.id()).unwrap(); 126 | assert!(balance1 == 100); 127 | assert!(balance2 == 20); 128 | 129 | // Set up the swap transaction 130 | let serial_num = get_serial_num(user.account_id.id()); 131 | let fill_number = 0; 132 | 133 | // Create the partial swap note 134 | let swap_note = create_partial_swap_note( 135 | user.account_id.id(), 136 | user.account_id.id(), 137 | asset_a.into(), 138 | asset_b.into(), 139 | serial_num, 140 | fill_number, 141 | ) 142 | .unwrap(); 143 | 144 | let note_req = TransactionRequestBuilder::new() 145 | .with_own_output_notes(vec![OutputNote::Full(swap_note.clone())]) 146 | .build() 147 | .unwrap(); 148 | 149 | let tx_result = client 150 | .new_transaction(user.account_id.id(), note_req) 151 | .await 152 | .unwrap(); 153 | 154 | let _ = client.submit_transaction(tx_result).await; 155 | client.sync_state().await.unwrap(); 156 | 157 | let acc = client 158 | .get_account(user.account_id.id()) 159 | .await 160 | .unwrap() 161 | .unwrap(); 162 | let balance1 = acc.account().vault().get_balance(faucet_a.id()).unwrap(); 163 | let balance2 = acc.account().vault().get_balance(faucet_b.id()).unwrap(); 164 | assert!(balance1 == 50); 165 | assert!(balance2 == 20); 166 | 167 | // Call the user binary 168 | let output = Command::new("cargo") 169 | .args([ 170 | "run", 171 | "--release", 172 | "--bin", 173 | "user", 174 | "--", 175 | "cancel-order", 176 | "--user-id", 177 | user.account_id.id().to_hex().as_str(), 178 | "--order-id", 179 | swap_note.id().to_hex().as_str(), 180 | "--tag", 181 | swap_note.metadata().tag().to_string().as_str(), 182 | ]) 183 | .output() 184 | .expect("Failed to execute user binary"); 185 | 186 | let stdout = String::from_utf8_lossy(&output.stdout); 187 | let stderr = String::from_utf8_lossy(&output.stderr); 188 | 189 | println!("stdout:\n{}", stdout); 190 | println!("stderr:\n{}", stderr); 191 | 192 | assert!(output.status.success(), "User binary failed"); 193 | assert!(stdout.contains("true")); 194 | 195 | let acc = client 196 | .get_account(user.account_id.id()) 197 | .await 198 | .unwrap() 199 | .unwrap(); 200 | let balance1 = acc.account().vault().get_balance(faucet_a.id()).unwrap(); 201 | println!("Balance1: {}", balance1); 202 | let balance2 = acc.account().vault().get_balance(faucet_b.id()).unwrap(); 203 | println!("Balance2: {}", balance2); 204 | 205 | assert!(balance1 == 100); 206 | assert!(balance2 == 20); 207 | 208 | delete_keystore_and_store().await; 209 | } 210 | -------------------------------------------------------------------------------- /tests/utils/mod.rs: -------------------------------------------------------------------------------- 1 | pub mod test_utils; 2 | -------------------------------------------------------------------------------- /tests/utils/test_utils.rs: -------------------------------------------------------------------------------- 1 | use miden_client::Client; 2 | use miden_client::account::Account; 3 | use miden_client::keystore::FilesystemKeyStore; 4 | use rand::rngs::StdRng; 5 | 6 | use miden_client::ClientError; 7 | use miden_client::account::{ 8 | AccountBuilder, AccountStorageMode, AccountType, component::BasicFungibleFaucet, 9 | component::BasicWallet, component::RpoFalcon512, 10 | }; 11 | 12 | use miden_objects::note::NoteType; 13 | use miden_objects::{Felt, asset::FungibleAsset}; 14 | 15 | use miden_client::{ 16 | asset::TokenSymbol, auth::AuthSecretKey, crypto::SecretKey, 17 | transaction::TransactionRequestBuilder, 18 | }; 19 | 20 | use rand::RngCore; 21 | use std::time::Duration; 22 | 23 | #[derive(Debug, Clone)] 24 | pub struct TestUser { 25 | pub user_id: String, 26 | pub account_id: Account, 27 | } 28 | 29 | pub async fn create_account( 30 | client: &mut Client, 31 | keystore: FilesystemKeyStore, 32 | ) -> Result { 33 | let mut init_seed = [0_u8; 32]; 34 | client.rng().fill_bytes(&mut init_seed); 35 | 36 | let key_pair = SecretKey::with_rng(client.rng()); 37 | 38 | // Anchor block 39 | let anchor_block = client.get_latest_epoch_block().await.unwrap(); 40 | 41 | // Build the account 42 | let builder = AccountBuilder::new(init_seed) 43 | .anchor((&anchor_block).try_into().unwrap()) 44 | .account_type(AccountType::RegularAccountUpdatableCode) 45 | .storage_mode(AccountStorageMode::Public) 46 | .with_component(RpoFalcon512::new(key_pair.public_key())) 47 | .with_component(BasicWallet); 48 | 49 | let (alice_account, seed) = builder.build().unwrap(); 50 | 51 | // Add the account to the client 52 | client 53 | .add_account(&alice_account, Some(seed), false) 54 | .await?; 55 | 56 | // Add the key pair to the keystore 57 | keystore 58 | .add_key(&AuthSecretKey::RpoFalcon512(key_pair)) 59 | .unwrap(); 60 | Ok(alice_account) 61 | } 62 | 63 | // TODO: Not a dead code 64 | #[allow(dead_code)] 65 | pub async fn create_faucet( 66 | client: &mut Client, 67 | keystore: FilesystemKeyStore, 68 | symbol: &str, 69 | ) -> Result { 70 | // Faucet seed 71 | let mut init_seed = [0u8; 32]; 72 | client.rng().fill_bytes(&mut init_seed); 73 | 74 | // Faucet parameters 75 | let symbol = TokenSymbol::new(symbol).unwrap(); 76 | let decimals = 8; 77 | let max_supply = Felt::new(1_000_000); 78 | 79 | // Generate key pair 80 | let key_pair = SecretKey::with_rng(client.rng()); 81 | 82 | let anchor_block = client.get_latest_epoch_block().await.unwrap(); 83 | 84 | // Build the account 85 | let builder = AccountBuilder::new(init_seed) 86 | .anchor((&anchor_block).try_into().unwrap()) 87 | .account_type(AccountType::FungibleFaucet) 88 | .storage_mode(AccountStorageMode::Public) 89 | .with_component(RpoFalcon512::new(key_pair.public_key())) 90 | .with_component(BasicFungibleFaucet::new(symbol, decimals, max_supply).unwrap()); 91 | 92 | let (faucet_account, seed) = builder.build().unwrap(); 93 | 94 | // Add the faucet to the client 95 | client 96 | .add_account(&faucet_account, Some(seed), false) 97 | .await?; 98 | 99 | // Add the key pair to the keystore 100 | keystore 101 | .add_key(&AuthSecretKey::RpoFalcon512(key_pair)) 102 | .unwrap(); 103 | 104 | println!("Faucet account ID: {:?}", faucet_account.id().to_hex()); 105 | 106 | // Resync to show newly deployed faucet 107 | client.sync_state().await?; 108 | Ok(faucet_account) 109 | } 110 | 111 | pub async fn mint_and_consume( 112 | client: &mut Client, 113 | faucet_account: Account, 114 | token_account: Account, 115 | amount: u64, 116 | ) -> Result<(), ClientError> { 117 | let fungible_asset = FungibleAsset::new(faucet_account.id(), amount).unwrap(); 118 | 119 | let transaction_request = TransactionRequestBuilder::mint_fungible_asset( 120 | fungible_asset, 121 | token_account.id(), 122 | NoteType::Public, 123 | client.rng(), 124 | ) 125 | .unwrap() 126 | .build() 127 | .unwrap(); 128 | 129 | let tx_execution_result = client 130 | .new_transaction(faucet_account.id(), transaction_request) 131 | .await?; 132 | client.submit_transaction(tx_execution_result).await?; 133 | 134 | loop { 135 | // Resync to get the latest data 136 | client.sync_state().await?; 137 | 138 | let consumable_notes = client 139 | .get_consumable_notes(Some(token_account.id())) 140 | .await?; 141 | let list_of_note_ids: Vec<_> = consumable_notes.iter().map(|(note, _)| note.id()).collect(); 142 | 143 | if list_of_note_ids.len() == 1 { 144 | let transaction_request = TransactionRequestBuilder::consume_notes(list_of_note_ids) 145 | .build() 146 | .unwrap(); 147 | let tx_execution_result = client 148 | .new_transaction(token_account.id(), transaction_request) 149 | .await?; 150 | 151 | client.submit_transaction(tx_execution_result).await?; 152 | break; 153 | } else { 154 | tokio::time::sleep(Duration::from_secs(3)).await; 155 | } 156 | } 157 | 158 | client.sync_state().await?; 159 | Ok(()) 160 | } 161 | 162 | pub async fn setup_test_user( 163 | mut client: &mut Client, 164 | keystore: FilesystemKeyStore, 165 | user_id: &str, 166 | faucet_a: Account, 167 | faucet_b: Account, 168 | amount: u64, 169 | ) -> TestUser { 170 | let sync_summary = client.sync_state().await.unwrap(); 171 | println!("Latest block: {}", sync_summary.block_num); 172 | 173 | let account = create_account(&mut client, keystore.clone()).await.unwrap(); 174 | 175 | client.sync_state().await.unwrap(); 176 | // Mint token A to the user 177 | mint_and_consume(&mut client, faucet_a, account.clone(), amount) 178 | .await 179 | .unwrap(); 180 | 181 | mint_and_consume(&mut client, faucet_b, account.clone(), 20) 182 | .await 183 | .unwrap(); 184 | 185 | let _ = client.sync_state().await.unwrap(); 186 | 187 | TestUser { 188 | user_id: user_id.to_string(), 189 | account_id: account, 190 | } 191 | } 192 | 193 | #[cfg(test)] 194 | mod tests { 195 | use miden_client::builder::ClientBuilder; 196 | use miden_client::rpc::Endpoint; 197 | use miden_client::rpc::TonicRpcClient; 198 | use std::sync::Arc; 199 | 200 | use super::*; 201 | #[tokio::test] 202 | async fn test_setup() { 203 | let endpoint = Endpoint::new( 204 | "https".to_string(), 205 | "rpc.testnet.miden.io".to_string(), 206 | Some(443), 207 | ); 208 | let timeout_ms = 10_000; 209 | let rpc_api = Arc::new(TonicRpcClient::new(&endpoint, timeout_ms)); 210 | 211 | let mut client = ClientBuilder::new() 212 | .with_rpc(rpc_api) 213 | .with_filesystem_keystore("./keystore") 214 | .in_debug_mode(true) 215 | .build() 216 | .await 217 | .unwrap(); 218 | 219 | let sync_summary = client.sync_state().await.unwrap(); 220 | println!("Latest block: {}", sync_summary.block_num); 221 | 222 | let keystore = FilesystemKeyStore::new("./keystore".into()).unwrap(); 223 | let symbol = "ETH"; 224 | 225 | let faucet_a = create_faucet(&mut client, keystore.clone(), symbol) 226 | .await 227 | .unwrap(); 228 | 229 | let faucet_b = create_faucet(&mut client, keystore.clone(), symbol) 230 | .await 231 | .unwrap(); 232 | 233 | let mut users: Vec = Vec::new(); 234 | 235 | let user = setup_test_user( 236 | &mut client, 237 | keystore.clone(), 238 | &format!("testuser"), 239 | faucet_a.clone(), 240 | faucet_b.clone(), 241 | 100, 242 | ) 243 | .await; 244 | users.push(user); 245 | } 246 | } 247 | 248 | pub async fn delete_keystore_and_store() { 249 | // Remove the SQLite store file 250 | 251 | let keystore_dir: &str = &format!("./keystore"); 252 | let store_path: &str = &format!("./store.sqlite3"); 253 | 254 | if tokio::fs::metadata(store_path).await.is_ok() { 255 | if let Err(e) = tokio::fs::remove_file(store_path).await { 256 | eprintln!("failed to remove {}: {}", store_path, e); 257 | } 258 | } else { 259 | println!("store not found: {}", store_path); 260 | } 261 | 262 | // Remove all files in the ./keystore directory 263 | match tokio::fs::read_dir(keystore_dir).await { 264 | Ok(mut dir) => { 265 | while let Ok(Some(entry)) = dir.next_entry().await { 266 | let file_path = entry.path(); 267 | if let Err(e) = tokio::fs::remove_file(&file_path).await { 268 | eprintln!("failed to remove {}: {}", file_path.display(), e); 269 | } 270 | } 271 | } 272 | Err(e) => eprintln!("failed to read directory {}: {}", keystore_dir, e), 273 | } 274 | } 275 | --------------------------------------------------------------------------------