├── .github └── workflows │ └── publish.yml ├── .gitignore ├── Cargo.lock ├── Cargo.toml ├── LICENSE ├── README.md ├── examples ├── asset-id.py ├── predicate-root.py ├── received-asset.py └── simple-logs.py ├── hyperfuel └── __init__.py ├── pyproject.toml ├── src ├── config.rs ├── lib.rs ├── query.rs ├── response.rs └── types.rs └── test.py /.github/workflows/publish.yml: -------------------------------------------------------------------------------- 1 | # This file is autogenerated by maturin v1.3.2 2 | # To update, run 3 | # 4 | # maturin generate-ci github 5 | # 6 | name: Publish to PyPi 7 | 8 | concurrency: 9 | group: ${{ github.workflow }}-${{ github.ref }} 10 | cancel-in-progress: true 11 | 12 | on: 13 | workflow_dispatch: null 14 | 15 | permissions: 16 | contents: read 17 | 18 | jobs: 19 | linux-x86_64: 20 | runs-on: ubuntu-latest 21 | steps: 22 | - uses: actions/checkout@v3 23 | - uses: actions/setup-python@v4 24 | with: 25 | python-version: '3.10' 26 | - name: Build wheels 27 | uses: PyO3/maturin-action@v1 28 | with: 29 | target: x86_64 30 | args: --skip-auditwheel --release --out dist --find-interpreter 31 | sccache: 'true' 32 | container: 'off' 33 | manylinux: 'manylinux2014' 34 | before-script-linux: sudo apt-get install -y capnproto libcapnp-dev 35 | - name: Upload wheels 36 | uses: actions/upload-artifact@v3 37 | with: 38 | name: wheels 39 | path: dist 40 | 41 | windows: 42 | runs-on: windows-latest 43 | strategy: 44 | matrix: 45 | target: [x64, x86] 46 | steps: 47 | - uses: actions/checkout@v3 48 | - uses: actions/setup-python@v4 49 | with: 50 | python-version: '3.10' 51 | architecture: ${{ matrix.target }} 52 | - name: capnproto 53 | run: choco install capnproto 54 | - name: Build wheels 55 | uses: PyO3/maturin-action@v1 56 | with: 57 | target: ${{ matrix.target }} 58 | args: --release --out dist --find-interpreter 59 | sccache: 'true' 60 | - name: Upload wheels 61 | uses: actions/upload-artifact@v3 62 | with: 63 | name: wheels 64 | path: dist 65 | 66 | macos: 67 | runs-on: macos-latest 68 | strategy: 69 | matrix: 70 | target: [x86_64, aarch64] 71 | steps: 72 | - uses: actions/checkout@v3 73 | - uses: actions/setup-python@v4 74 | with: 75 | python-version: '3.10' 76 | - name: capnproto 77 | run: brew install capnp 78 | - name: Build wheels 79 | uses: PyO3/maturin-action@v1 80 | with: 81 | target: ${{ matrix.target }} 82 | args: --release --out dist --find-interpreter 83 | sccache: 'true' 84 | - name: Upload wheels 85 | uses: actions/upload-artifact@v3 86 | with: 87 | name: wheels 88 | path: dist 89 | 90 | sdist: 91 | runs-on: ubuntu-latest 92 | steps: 93 | - uses: actions/checkout@v3 94 | - name: Build sdist 95 | uses: PyO3/maturin-action@v1 96 | with: 97 | command: sdist 98 | args: --out dist 99 | - name: Upload sdist 100 | uses: actions/upload-artifact@v3 101 | with: 102 | name: wheels 103 | path: dist 104 | 105 | release: 106 | name: Release 107 | runs-on: ubuntu-latest 108 | needs: [linux-x86_64, windows, macos, sdist] 109 | steps: 110 | - uses: actions/download-artifact@v3 111 | with: 112 | name: wheels 113 | - name: Publish to PyPI 114 | uses: PyO3/maturin-action@v1 115 | env: 116 | MATURIN_USERNAME: __token__ 117 | MATURIN_PASSWORD: ${{ secrets.PYPI_API_TOKEN }} 118 | with: 119 | command: upload 120 | args: --non-interactive --skip-existing * 121 | -------------------------------------------------------------------------------- /.gitignore: -------------------------------------------------------------------------------- 1 | .env/ 2 | 3 | /target 4 | data/ 5 | 6 | # Byte-compiled / optimized / DLL files 7 | __pycache__/ 8 | .pytest_cache/ 9 | *.py[cod] 10 | 11 | # C extensions 12 | *.so 13 | 14 | # Distribution / packaging 15 | .Python 16 | .venv/ 17 | env/ 18 | bin/ 19 | build/ 20 | develop-eggs/ 21 | dist/ 22 | eggs/ 23 | lib/ 24 | lib64/ 25 | parts/ 26 | sdist/ 27 | var/ 28 | include/ 29 | man/ 30 | venv/ 31 | *.egg-info/ 32 | .installed.cfg 33 | *.egg 34 | 35 | # Installer logs 36 | pip-log.txt 37 | pip-delete-this-directory.txt 38 | pip-selfcheck.json 39 | 40 | # Unit test / coverage reports 41 | htmlcov/ 42 | .tox/ 43 | .coverage 44 | .cache 45 | nosetests.xml 46 | coverage.xml 47 | 48 | # Translations 49 | *.mo 50 | 51 | # Mr Developer 52 | .mr.developer.cfg 53 | .project 54 | .pydevproject 55 | 56 | # Rope 57 | .ropeproject 58 | 59 | # Django stuff: 60 | *.log 61 | *.pot 62 | 63 | .DS_Store 64 | 65 | # Sphinx documentation 66 | docs/_build/ 67 | 68 | # PyCharm 69 | .idea/ 70 | 71 | # VSCode 72 | .vscode/ 73 | 74 | # Pyenv 75 | .python-version 76 | -------------------------------------------------------------------------------- /Cargo.lock: -------------------------------------------------------------------------------- 1 | # This file is automatically @generated by Cargo. 2 | # It is not intended for manual editing. 3 | version = 3 4 | 5 | [[package]] 6 | name = "addr2line" 7 | version = "0.21.0" 8 | source = "registry+https://github.com/rust-lang/crates.io-index" 9 | checksum = "8a30b2e23b9e17a9f90641c7ab1549cd9b44f296d3ccbf309d2863cfe398a0cb" 10 | dependencies = [ 11 | "gimli", 12 | ] 13 | 14 | [[package]] 15 | name = "adler" 16 | version = "1.0.2" 17 | source = "registry+https://github.com/rust-lang/crates.io-index" 18 | checksum = "f26201604c87b1e01bd3d98f8d5d9a8fcbb815e8cedb41ffccbeb4bf593a35fe" 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 | "getrandom", 28 | "once_cell", 29 | "version_check", 30 | "zerocopy", 31 | ] 32 | 33 | [[package]] 34 | name = "aho-corasick" 35 | version = "1.1.3" 36 | source = "registry+https://github.com/rust-lang/crates.io-index" 37 | checksum = "8e60d3430d3a69478ad0993f19238d2df97c507009a52b3c10addcd7f6bcb916" 38 | dependencies = [ 39 | "memchr", 40 | ] 41 | 42 | [[package]] 43 | name = "alloy-dyn-abi" 44 | version = "0.5.4" 45 | source = "registry+https://github.com/rust-lang/crates.io-index" 46 | checksum = "7cb9c4b008d0004a0518ba69f3cd9e94795f3c23b71a80e1ef3bf499f67fba23" 47 | dependencies = [ 48 | "alloy-json-abi", 49 | "alloy-primitives", 50 | "alloy-sol-type-parser", 51 | "alloy-sol-types", 52 | "const-hex", 53 | "itoa", 54 | "serde", 55 | "serde_json", 56 | "winnow", 57 | ] 58 | 59 | [[package]] 60 | name = "alloy-json-abi" 61 | version = "0.5.4" 62 | source = "registry+https://github.com/rust-lang/crates.io-index" 63 | checksum = "838228983f74f30e4efbd8d42d25bfe1b5bf6450ca71ee9d7628f134fbe8ae8e" 64 | dependencies = [ 65 | "alloy-primitives", 66 | "alloy-sol-type-parser", 67 | "serde", 68 | "serde_json", 69 | ] 70 | 71 | [[package]] 72 | name = "alloy-primitives" 73 | version = "0.5.4" 74 | source = "registry+https://github.com/rust-lang/crates.io-index" 75 | checksum = "9c234f92024707f224510ff82419b2be0e1d8e1fd911defcac5a085cd7f83898" 76 | dependencies = [ 77 | "alloy-rlp", 78 | "bytes", 79 | "cfg-if", 80 | "const-hex", 81 | "derive_more", 82 | "hex-literal", 83 | "itoa", 84 | "keccak-asm", 85 | "proptest", 86 | "rand", 87 | "ruint", 88 | "serde", 89 | "tiny-keccak", 90 | ] 91 | 92 | [[package]] 93 | name = "alloy-rlp" 94 | version = "0.3.4" 95 | source = "registry+https://github.com/rust-lang/crates.io-index" 96 | checksum = "8d58d9f5da7b40e9bfff0b7e7816700be4019db97d4b6359fe7f94a9e22e42ac" 97 | dependencies = [ 98 | "arrayvec", 99 | "bytes", 100 | ] 101 | 102 | [[package]] 103 | name = "alloy-sol-macro" 104 | version = "0.5.4" 105 | source = "registry+https://github.com/rust-lang/crates.io-index" 106 | checksum = "970e5cf1ca089e964d4f7f7afc7c9ad642bfb1bdc695a20b0cba3b3c28954774" 107 | dependencies = [ 108 | "const-hex", 109 | "dunce", 110 | "heck", 111 | "indexmap 2.2.6", 112 | "proc-macro-error", 113 | "proc-macro2", 114 | "quote", 115 | "syn 2.0.60", 116 | "syn-solidity", 117 | "tiny-keccak", 118 | ] 119 | 120 | [[package]] 121 | name = "alloy-sol-type-parser" 122 | version = "0.5.4" 123 | source = "registry+https://github.com/rust-lang/crates.io-index" 124 | checksum = "c82c1ed2d61e982cef4c4d709f4aeef5f39a6a6a7c59b6e54c9ed4f3f7e3741b" 125 | dependencies = [ 126 | "winnow", 127 | ] 128 | 129 | [[package]] 130 | name = "alloy-sol-types" 131 | version = "0.5.4" 132 | source = "registry+https://github.com/rust-lang/crates.io-index" 133 | checksum = "2a059d4d2c78f8f21e470772c75f9abd9ac6d48c2aaf6b278d1ead06ed9ac664" 134 | dependencies = [ 135 | "alloy-primitives", 136 | "alloy-sol-macro", 137 | "const-hex", 138 | "serde", 139 | ] 140 | 141 | [[package]] 142 | name = "anstream" 143 | version = "0.6.13" 144 | source = "registry+https://github.com/rust-lang/crates.io-index" 145 | checksum = "d96bd03f33fe50a863e394ee9718a706f988b9079b20c3784fb726e7678b62fb" 146 | dependencies = [ 147 | "anstyle", 148 | "anstyle-parse", 149 | "anstyle-query", 150 | "anstyle-wincon", 151 | "colorchoice", 152 | "utf8parse", 153 | ] 154 | 155 | [[package]] 156 | name = "anstyle" 157 | version = "1.0.6" 158 | source = "registry+https://github.com/rust-lang/crates.io-index" 159 | checksum = "8901269c6307e8d93993578286ac0edf7f195079ffff5ebdeea6a59ffb7e36bc" 160 | 161 | [[package]] 162 | name = "anstyle-parse" 163 | version = "0.2.3" 164 | source = "registry+https://github.com/rust-lang/crates.io-index" 165 | checksum = "c75ac65da39e5fe5ab759307499ddad880d724eed2f6ce5b5e8a26f4f387928c" 166 | dependencies = [ 167 | "utf8parse", 168 | ] 169 | 170 | [[package]] 171 | name = "anstyle-query" 172 | version = "1.0.2" 173 | source = "registry+https://github.com/rust-lang/crates.io-index" 174 | checksum = "e28923312444cdd728e4738b3f9c9cac739500909bb3d3c94b43551b16517648" 175 | dependencies = [ 176 | "windows-sys 0.52.0", 177 | ] 178 | 179 | [[package]] 180 | name = "anstyle-wincon" 181 | version = "3.0.2" 182 | source = "registry+https://github.com/rust-lang/crates.io-index" 183 | checksum = "1cd54b81ec8d6180e24654d0b371ad22fc3dd083b6ff8ba325b72e00c87660a7" 184 | dependencies = [ 185 | "anstyle", 186 | "windows-sys 0.52.0", 187 | ] 188 | 189 | [[package]] 190 | name = "anyhow" 191 | version = "1.0.82" 192 | source = "registry+https://github.com/rust-lang/crates.io-index" 193 | checksum = "f538837af36e6f6a9be0faa67f9a314f8119e4e4b5867c6ab40ed60360142519" 194 | 195 | [[package]] 196 | name = "ark-ff" 197 | version = "0.3.0" 198 | source = "registry+https://github.com/rust-lang/crates.io-index" 199 | checksum = "6b3235cc41ee7a12aaaf2c575a2ad7b46713a8a50bda2fc3b003a04845c05dd6" 200 | dependencies = [ 201 | "ark-ff-asm 0.3.0", 202 | "ark-ff-macros 0.3.0", 203 | "ark-serialize 0.3.0", 204 | "ark-std 0.3.0", 205 | "derivative", 206 | "num-bigint", 207 | "num-traits", 208 | "paste", 209 | "rustc_version 0.3.3", 210 | "zeroize", 211 | ] 212 | 213 | [[package]] 214 | name = "ark-ff" 215 | version = "0.4.2" 216 | source = "registry+https://github.com/rust-lang/crates.io-index" 217 | checksum = "ec847af850f44ad29048935519032c33da8aa03340876d351dfab5660d2966ba" 218 | dependencies = [ 219 | "ark-ff-asm 0.4.2", 220 | "ark-ff-macros 0.4.2", 221 | "ark-serialize 0.4.2", 222 | "ark-std 0.4.0", 223 | "derivative", 224 | "digest 0.10.7", 225 | "itertools 0.10.5", 226 | "num-bigint", 227 | "num-traits", 228 | "paste", 229 | "rustc_version 0.4.0", 230 | "zeroize", 231 | ] 232 | 233 | [[package]] 234 | name = "ark-ff-asm" 235 | version = "0.3.0" 236 | source = "registry+https://github.com/rust-lang/crates.io-index" 237 | checksum = "db02d390bf6643fb404d3d22d31aee1c4bc4459600aef9113833d17e786c6e44" 238 | dependencies = [ 239 | "quote", 240 | "syn 1.0.109", 241 | ] 242 | 243 | [[package]] 244 | name = "ark-ff-asm" 245 | version = "0.4.2" 246 | source = "registry+https://github.com/rust-lang/crates.io-index" 247 | checksum = "3ed4aa4fe255d0bc6d79373f7e31d2ea147bcf486cba1be5ba7ea85abdb92348" 248 | dependencies = [ 249 | "quote", 250 | "syn 1.0.109", 251 | ] 252 | 253 | [[package]] 254 | name = "ark-ff-macros" 255 | version = "0.3.0" 256 | source = "registry+https://github.com/rust-lang/crates.io-index" 257 | checksum = "db2fd794a08ccb318058009eefdf15bcaaaaf6f8161eb3345f907222bac38b20" 258 | dependencies = [ 259 | "num-bigint", 260 | "num-traits", 261 | "quote", 262 | "syn 1.0.109", 263 | ] 264 | 265 | [[package]] 266 | name = "ark-ff-macros" 267 | version = "0.4.2" 268 | source = "registry+https://github.com/rust-lang/crates.io-index" 269 | checksum = "7abe79b0e4288889c4574159ab790824d0033b9fdcb2a112a3182fac2e514565" 270 | dependencies = [ 271 | "num-bigint", 272 | "num-traits", 273 | "proc-macro2", 274 | "quote", 275 | "syn 1.0.109", 276 | ] 277 | 278 | [[package]] 279 | name = "ark-serialize" 280 | version = "0.3.0" 281 | source = "registry+https://github.com/rust-lang/crates.io-index" 282 | checksum = "1d6c2b318ee6e10f8c2853e73a83adc0ccb88995aa978d8a3408d492ab2ee671" 283 | dependencies = [ 284 | "ark-std 0.3.0", 285 | "digest 0.9.0", 286 | ] 287 | 288 | [[package]] 289 | name = "ark-serialize" 290 | version = "0.4.2" 291 | source = "registry+https://github.com/rust-lang/crates.io-index" 292 | checksum = "adb7b85a02b83d2f22f89bd5cac66c9c89474240cb6207cb1efc16d098e822a5" 293 | dependencies = [ 294 | "ark-std 0.4.0", 295 | "digest 0.10.7", 296 | "num-bigint", 297 | ] 298 | 299 | [[package]] 300 | name = "ark-std" 301 | version = "0.3.0" 302 | source = "registry+https://github.com/rust-lang/crates.io-index" 303 | checksum = "1df2c09229cbc5a028b1d70e00fdb2acee28b1055dfb5ca73eea49c5a25c4e7c" 304 | dependencies = [ 305 | "num-traits", 306 | "rand", 307 | ] 308 | 309 | [[package]] 310 | name = "ark-std" 311 | version = "0.4.0" 312 | source = "registry+https://github.com/rust-lang/crates.io-index" 313 | checksum = "94893f1e0c6eeab764ade8dc4c0db24caf4fe7cbbaafc0eba0a9030f447b5185" 314 | dependencies = [ 315 | "num-traits", 316 | "rand", 317 | ] 318 | 319 | [[package]] 320 | name = "array-init-cursor" 321 | version = "0.2.0" 322 | source = "registry+https://github.com/rust-lang/crates.io-index" 323 | checksum = "bf7d0a018de4f6aa429b9d33d69edf69072b1c5b1cb8d3e4a5f7ef898fc3eb76" 324 | 325 | [[package]] 326 | name = "arrayvec" 327 | version = "0.7.4" 328 | source = "registry+https://github.com/rust-lang/crates.io-index" 329 | checksum = "96d30a06541fbafbc7f82ed10c06164cfbd2c401138f6addd8404629c4b16711" 330 | dependencies = [ 331 | "serde", 332 | ] 333 | 334 | [[package]] 335 | name = "arrow-format" 336 | version = "0.8.1" 337 | source = "registry+https://github.com/rust-lang/crates.io-index" 338 | checksum = "07884ea216994cdc32a2d5f8274a8bee979cfe90274b83f86f440866ee3132c7" 339 | dependencies = [ 340 | "planus", 341 | "serde", 342 | ] 343 | 344 | [[package]] 345 | name = "arrow2" 346 | version = "0.18.0" 347 | source = "registry+https://github.com/rust-lang/crates.io-index" 348 | checksum = "963fef509b757bcbbf9e5ffa23bcb345614d99f4f6f531f97417b27b8604d389" 349 | dependencies = [ 350 | "ahash", 351 | "arrow-format", 352 | "base64", 353 | "bytemuck", 354 | "chrono", 355 | "dyn-clone", 356 | "either", 357 | "ethnum", 358 | "fallible-streaming-iterator", 359 | "foreign_vec", 360 | "futures", 361 | "getrandom", 362 | "hash_hasher", 363 | "hashbrown 0.14.3", 364 | "indexmap 1.9.3", 365 | "json-deserializer", 366 | "lexical-core", 367 | "lz4", 368 | "num-traits", 369 | "parquet2", 370 | "rustc_version 0.4.0", 371 | "simdutf8", 372 | "streaming-iterator", 373 | "zstd", 374 | ] 375 | 376 | [[package]] 377 | name = "async-compression" 378 | version = "0.4.9" 379 | source = "registry+https://github.com/rust-lang/crates.io-index" 380 | checksum = "4e9eabd7a98fe442131a17c316bd9349c43695e49e730c3c8e12cfb5f4da2693" 381 | dependencies = [ 382 | "flate2", 383 | "futures-core", 384 | "memchr", 385 | "pin-project-lite", 386 | "tokio", 387 | ] 388 | 389 | [[package]] 390 | name = "async-stream" 391 | version = "0.3.5" 392 | source = "registry+https://github.com/rust-lang/crates.io-index" 393 | checksum = "cd56dd203fef61ac097dd65721a419ddccb106b2d2b70ba60a6b529f03961a51" 394 | dependencies = [ 395 | "async-stream-impl", 396 | "futures-core", 397 | "pin-project-lite", 398 | ] 399 | 400 | [[package]] 401 | name = "async-stream-impl" 402 | version = "0.3.5" 403 | source = "registry+https://github.com/rust-lang/crates.io-index" 404 | checksum = "16e62a023e7c117e27523144c5d2459f4397fcc3cab0085af8e2224f643a0193" 405 | dependencies = [ 406 | "proc-macro2", 407 | "quote", 408 | "syn 2.0.60", 409 | ] 410 | 411 | [[package]] 412 | name = "async-trait" 413 | version = "0.1.80" 414 | source = "registry+https://github.com/rust-lang/crates.io-index" 415 | checksum = "c6fa2087f2753a7da8cc1c0dbfcf89579dd57458e36769de5ac750b4671737ca" 416 | dependencies = [ 417 | "proc-macro2", 418 | "quote", 419 | "syn 2.0.60", 420 | ] 421 | 422 | [[package]] 423 | name = "auto_impl" 424 | version = "1.2.0" 425 | source = "registry+https://github.com/rust-lang/crates.io-index" 426 | checksum = "3c87f3f15e7794432337fc718554eaa4dc8f04c9677a950ffe366f20a162ae42" 427 | dependencies = [ 428 | "proc-macro2", 429 | "quote", 430 | "syn 2.0.60", 431 | ] 432 | 433 | [[package]] 434 | name = "autocfg" 435 | version = "1.2.0" 436 | source = "registry+https://github.com/rust-lang/crates.io-index" 437 | checksum = "f1fdabc7756949593fe60f30ec81974b613357de856987752631dea1e3394c80" 438 | 439 | [[package]] 440 | name = "backtrace" 441 | version = "0.3.71" 442 | source = "registry+https://github.com/rust-lang/crates.io-index" 443 | checksum = "26b05800d2e817c8b3b4b54abd461726265fa9789ae34330622f2db9ee696f9d" 444 | dependencies = [ 445 | "addr2line", 446 | "cc", 447 | "cfg-if", 448 | "libc", 449 | "miniz_oxide", 450 | "object", 451 | "rustc-demangle", 452 | ] 453 | 454 | [[package]] 455 | name = "base64" 456 | version = "0.21.7" 457 | source = "registry+https://github.com/rust-lang/crates.io-index" 458 | checksum = "9d297deb1925b89f2ccc13d7635fa0714f12c87adce1c75356b39ca9b7178567" 459 | 460 | [[package]] 461 | name = "bit-set" 462 | version = "0.5.3" 463 | source = "registry+https://github.com/rust-lang/crates.io-index" 464 | checksum = "0700ddab506f33b20a03b13996eccd309a48e5ff77d0d95926aa0210fb4e95f1" 465 | dependencies = [ 466 | "bit-vec", 467 | ] 468 | 469 | [[package]] 470 | name = "bit-vec" 471 | version = "0.6.3" 472 | source = "registry+https://github.com/rust-lang/crates.io-index" 473 | checksum = "349f9b6a179ed607305526ca489b34ad0a41aed5f7980fa90eb03160b69598fb" 474 | 475 | [[package]] 476 | name = "bitflags" 477 | version = "1.3.2" 478 | source = "registry+https://github.com/rust-lang/crates.io-index" 479 | checksum = "bef38d45163c2f1dde094a7dfd33ccf595c92905c8f8f4fdc18d06fb1037718a" 480 | 481 | [[package]] 482 | name = "bitflags" 483 | version = "2.5.0" 484 | source = "registry+https://github.com/rust-lang/crates.io-index" 485 | checksum = "cf4b9d6a944f767f8e5e0db018570623c85f3d925ac718db4e06d0187adb21c1" 486 | 487 | [[package]] 488 | name = "bitvec" 489 | version = "1.0.1" 490 | source = "registry+https://github.com/rust-lang/crates.io-index" 491 | checksum = "1bc2832c24239b0141d5674bb9174f9d68a8b5b3f2753311927c172ca46f7e9c" 492 | dependencies = [ 493 | "funty", 494 | "radium", 495 | "tap", 496 | "wyz", 497 | ] 498 | 499 | [[package]] 500 | name = "block-buffer" 501 | version = "0.10.4" 502 | source = "registry+https://github.com/rust-lang/crates.io-index" 503 | checksum = "3078c7629b62d3f0439517fa394996acacc5cbc91c5a20d8c658e77abd503a71" 504 | dependencies = [ 505 | "generic-array", 506 | ] 507 | 508 | [[package]] 509 | name = "bumpalo" 510 | version = "3.16.0" 511 | source = "registry+https://github.com/rust-lang/crates.io-index" 512 | checksum = "79296716171880943b8470b5f8d03aa55eb2e645a4874bdbb28adb49162e012c" 513 | 514 | [[package]] 515 | name = "byte-slice-cast" 516 | version = "1.2.2" 517 | source = "registry+https://github.com/rust-lang/crates.io-index" 518 | checksum = "c3ac9f8b63eca6fd385229b3675f6cc0dc5c8a5c8a54a59d4f52ffd670d87b0c" 519 | 520 | [[package]] 521 | name = "bytemuck" 522 | version = "1.15.0" 523 | source = "registry+https://github.com/rust-lang/crates.io-index" 524 | checksum = "5d6d68c57235a3a081186990eca2867354726650f42f7516ca50c28d6281fd15" 525 | dependencies = [ 526 | "bytemuck_derive", 527 | ] 528 | 529 | [[package]] 530 | name = "bytemuck_derive" 531 | version = "1.6.0" 532 | source = "registry+https://github.com/rust-lang/crates.io-index" 533 | checksum = "4da9a32f3fed317401fa3c862968128267c3106685286e15d5aaa3d7389c2f60" 534 | dependencies = [ 535 | "proc-macro2", 536 | "quote", 537 | "syn 2.0.60", 538 | ] 539 | 540 | [[package]] 541 | name = "byteorder" 542 | version = "1.5.0" 543 | source = "registry+https://github.com/rust-lang/crates.io-index" 544 | checksum = "1fd0f2584146f6f2ef48085050886acf353beff7305ebd1ae69500e27c67f64b" 545 | 546 | [[package]] 547 | name = "bytes" 548 | version = "1.6.0" 549 | source = "registry+https://github.com/rust-lang/crates.io-index" 550 | checksum = "514de17de45fdb8dc022b1a7975556c53c86f9f0aa5f534b98977b171857c2c9" 551 | dependencies = [ 552 | "serde", 553 | ] 554 | 555 | [[package]] 556 | name = "capnp" 557 | version = "0.18.13" 558 | source = "registry+https://github.com/rust-lang/crates.io-index" 559 | checksum = "384b671a5b39eadb909b0c2b81d22a400d446526e651e64be9eb6674b33644a4" 560 | dependencies = [ 561 | "embedded-io", 562 | ] 563 | 564 | [[package]] 565 | name = "capnpc" 566 | version = "0.18.1" 567 | source = "registry+https://github.com/rust-lang/crates.io-index" 568 | checksum = "a642faaaa78187e70bdcc0014c593c213553cfeda3b15054426d0d596048b131" 569 | dependencies = [ 570 | "capnp", 571 | ] 572 | 573 | [[package]] 574 | name = "cc" 575 | version = "1.0.95" 576 | source = "registry+https://github.com/rust-lang/crates.io-index" 577 | checksum = "d32a725bc159af97c3e629873bb9f88fb8cf8a4867175f76dc987815ea07c83b" 578 | dependencies = [ 579 | "jobserver", 580 | "libc", 581 | "once_cell", 582 | ] 583 | 584 | [[package]] 585 | name = "cfg-if" 586 | version = "1.0.0" 587 | source = "registry+https://github.com/rust-lang/crates.io-index" 588 | checksum = "baf1de4339761588bc0619e3cbc0120ee582ebb74b53b4efbf79117bd2da40fd" 589 | 590 | [[package]] 591 | name = "chrono" 592 | version = "0.4.38" 593 | source = "registry+https://github.com/rust-lang/crates.io-index" 594 | checksum = "a21f936df1771bf62b77f047b726c4625ff2e8aa607c01ec06e5a05bd8463401" 595 | dependencies = [ 596 | "num-traits", 597 | ] 598 | 599 | [[package]] 600 | name = "colorchoice" 601 | version = "1.0.0" 602 | source = "registry+https://github.com/rust-lang/crates.io-index" 603 | checksum = "acbf1af155f9b9ef647e42cdc158db4b64a1b61f743629225fde6f3e0be2a7c7" 604 | 605 | [[package]] 606 | name = "const-hex" 607 | version = "1.11.3" 608 | source = "registry+https://github.com/rust-lang/crates.io-index" 609 | checksum = "5ba00838774b4ab0233e355d26710fbfc8327a05c017f6dc4873f876d1f79f78" 610 | dependencies = [ 611 | "cfg-if", 612 | "cpufeatures", 613 | "hex", 614 | "proptest", 615 | "serde", 616 | ] 617 | 618 | [[package]] 619 | name = "convert_case" 620 | version = "0.4.0" 621 | source = "registry+https://github.com/rust-lang/crates.io-index" 622 | checksum = "6245d59a3e82a7fc217c5828a6692dbc6dfb63a0c8c90495621f7b9d79704a0e" 623 | 624 | [[package]] 625 | name = "core-foundation" 626 | version = "0.9.4" 627 | source = "registry+https://github.com/rust-lang/crates.io-index" 628 | checksum = "91e195e091a93c46f7102ec7818a2aa394e1e1771c3ab4825963fa03e45afb8f" 629 | dependencies = [ 630 | "core-foundation-sys", 631 | "libc", 632 | ] 633 | 634 | [[package]] 635 | name = "core-foundation-sys" 636 | version = "0.8.6" 637 | source = "registry+https://github.com/rust-lang/crates.io-index" 638 | checksum = "06ea2b9bc92be3c2baa9334a323ebca2d6f074ff852cd1d7b11064035cd3868f" 639 | 640 | [[package]] 641 | name = "cpufeatures" 642 | version = "0.2.12" 643 | source = "registry+https://github.com/rust-lang/crates.io-index" 644 | checksum = "53fe5e26ff1b7aef8bca9c6080520cfb8d9333c7568e1829cef191a9723e5504" 645 | dependencies = [ 646 | "libc", 647 | ] 648 | 649 | [[package]] 650 | name = "crc32fast" 651 | version = "1.4.0" 652 | source = "registry+https://github.com/rust-lang/crates.io-index" 653 | checksum = "b3855a8a784b474f333699ef2bbca9db2c4a1f6d9088a90a2d25b1eb53111eaa" 654 | dependencies = [ 655 | "cfg-if", 656 | ] 657 | 658 | [[package]] 659 | name = "crunchy" 660 | version = "0.2.2" 661 | source = "registry+https://github.com/rust-lang/crates.io-index" 662 | checksum = "7a81dae078cea95a014a339291cec439d2f232ebe854a9d672b796c6afafa9b7" 663 | 664 | [[package]] 665 | name = "crypto-common" 666 | version = "0.1.6" 667 | source = "registry+https://github.com/rust-lang/crates.io-index" 668 | checksum = "1bfb12502f3fc46cca1bb51ac28df9d618d813cdc3d2f25b9fe775a34af26bb3" 669 | dependencies = [ 670 | "generic-array", 671 | "typenum", 672 | ] 673 | 674 | [[package]] 675 | name = "derivative" 676 | version = "2.2.0" 677 | source = "registry+https://github.com/rust-lang/crates.io-index" 678 | checksum = "fcc3dd5e9e9c0b295d6e1e4d811fb6f157d5ffd784b8d202fc62eac8035a770b" 679 | dependencies = [ 680 | "proc-macro2", 681 | "quote", 682 | "syn 1.0.109", 683 | ] 684 | 685 | [[package]] 686 | name = "derive_more" 687 | version = "0.99.17" 688 | source = "registry+https://github.com/rust-lang/crates.io-index" 689 | checksum = "4fb810d30a7c1953f91334de7244731fc3f3c10d7fe163338a35b9f640960321" 690 | dependencies = [ 691 | "convert_case", 692 | "proc-macro2", 693 | "quote", 694 | "rustc_version 0.4.0", 695 | "syn 1.0.109", 696 | ] 697 | 698 | [[package]] 699 | name = "dict_derive" 700 | version = "0.5.0" 701 | source = "registry+https://github.com/rust-lang/crates.io-index" 702 | checksum = "b46bc7c421493b2f684e78cee446c4537ad816ee452e7b0f2edb36ef4f29d5d6" 703 | dependencies = [ 704 | "proc-macro2", 705 | "quote", 706 | "syn 1.0.109", 707 | ] 708 | 709 | [[package]] 710 | name = "digest" 711 | version = "0.9.0" 712 | source = "registry+https://github.com/rust-lang/crates.io-index" 713 | checksum = "d3dd60d1080a57a05ab032377049e0591415d2b31afd7028356dbf3cc6dcb066" 714 | dependencies = [ 715 | "generic-array", 716 | ] 717 | 718 | [[package]] 719 | name = "digest" 720 | version = "0.10.7" 721 | source = "registry+https://github.com/rust-lang/crates.io-index" 722 | checksum = "9ed9a281f7bc9b7576e61468ba615a66a5c8cfdff42420a70aa82701a3b1e292" 723 | dependencies = [ 724 | "block-buffer", 725 | "crypto-common", 726 | ] 727 | 728 | [[package]] 729 | name = "dunce" 730 | version = "1.0.4" 731 | source = "registry+https://github.com/rust-lang/crates.io-index" 732 | checksum = "56ce8c6da7551ec6c462cbaf3bfbc75131ebbfa1c944aeaa9dab51ca1c5f0c3b" 733 | 734 | [[package]] 735 | name = "dyn-clone" 736 | version = "1.0.17" 737 | source = "registry+https://github.com/rust-lang/crates.io-index" 738 | checksum = "0d6ef0072f8a535281e4876be788938b528e9a1d43900b82c2569af7da799125" 739 | 740 | [[package]] 741 | name = "either" 742 | version = "1.11.0" 743 | source = "registry+https://github.com/rust-lang/crates.io-index" 744 | checksum = "a47c1c47d2f5964e29c61246e81db715514cd532db6b5116a25ea3c03d6780a2" 745 | 746 | [[package]] 747 | name = "embedded-io" 748 | version = "0.5.0" 749 | source = "registry+https://github.com/rust-lang/crates.io-index" 750 | checksum = "658bbadc628dc286b9ae02f0cb0f5411c056eb7487b72f0083203f115de94060" 751 | 752 | [[package]] 753 | name = "encoding_rs" 754 | version = "0.8.34" 755 | source = "registry+https://github.com/rust-lang/crates.io-index" 756 | checksum = "b45de904aa0b010bce2ab45264d0631681847fa7b6f2eaa7dab7619943bc4f59" 757 | dependencies = [ 758 | "cfg-if", 759 | ] 760 | 761 | [[package]] 762 | name = "env_filter" 763 | version = "0.1.0" 764 | source = "registry+https://github.com/rust-lang/crates.io-index" 765 | checksum = "a009aa4810eb158359dda09d0c87378e4bbb89b5a801f016885a4707ba24f7ea" 766 | dependencies = [ 767 | "log", 768 | "regex", 769 | ] 770 | 771 | [[package]] 772 | name = "env_logger" 773 | version = "0.11.3" 774 | source = "registry+https://github.com/rust-lang/crates.io-index" 775 | checksum = "38b35839ba51819680ba087cd351788c9a3c476841207e0b8cee0b04722343b9" 776 | dependencies = [ 777 | "anstream", 778 | "anstyle", 779 | "env_filter", 780 | "humantime", 781 | "log", 782 | ] 783 | 784 | [[package]] 785 | name = "equivalent" 786 | version = "1.0.1" 787 | source = "registry+https://github.com/rust-lang/crates.io-index" 788 | checksum = "5443807d6dff69373d433ab9ef5378ad8df50ca6298caf15de6e52e24aaf54d5" 789 | 790 | [[package]] 791 | name = "errno" 792 | version = "0.3.8" 793 | source = "registry+https://github.com/rust-lang/crates.io-index" 794 | checksum = "a258e46cdc063eb8519c00b9fc845fc47bcfca4130e2f08e88665ceda8474245" 795 | dependencies = [ 796 | "libc", 797 | "windows-sys 0.52.0", 798 | ] 799 | 800 | [[package]] 801 | name = "ethnum" 802 | version = "1.5.0" 803 | source = "registry+https://github.com/rust-lang/crates.io-index" 804 | checksum = "b90ca2580b73ab6a1f724b76ca11ab632df820fd6040c336200d2c1df7b3c82c" 805 | 806 | [[package]] 807 | name = "fallible-streaming-iterator" 808 | version = "0.1.9" 809 | source = "registry+https://github.com/rust-lang/crates.io-index" 810 | checksum = "7360491ce676a36bf9bb3c56c1aa791658183a54d2744120f27285738d90465a" 811 | 812 | [[package]] 813 | name = "faster-hex" 814 | version = "0.9.0" 815 | source = "registry+https://github.com/rust-lang/crates.io-index" 816 | checksum = "a2a2b11eda1d40935b26cf18f6833c526845ae8c41e58d09af6adeb6f0269183" 817 | dependencies = [ 818 | "serde", 819 | ] 820 | 821 | [[package]] 822 | name = "fastrand" 823 | version = "2.0.2" 824 | source = "registry+https://github.com/rust-lang/crates.io-index" 825 | checksum = "658bd65b1cf4c852a3cc96f18a8ce7b5640f6b703f905c7d74532294c2a63984" 826 | 827 | [[package]] 828 | name = "fastrange-rs" 829 | version = "0.1.0" 830 | source = "registry+https://github.com/rust-lang/crates.io-index" 831 | checksum = "e90a1392cd6ec5ebe42ccaf251f2b7ba6be654c377f05c913f3898bfb2172512" 832 | 833 | [[package]] 834 | name = "fastrlp" 835 | version = "0.3.1" 836 | source = "registry+https://github.com/rust-lang/crates.io-index" 837 | checksum = "139834ddba373bbdd213dffe02c8d110508dcf1726c2be27e8d1f7d7e1856418" 838 | dependencies = [ 839 | "arrayvec", 840 | "auto_impl", 841 | "bytes", 842 | ] 843 | 844 | [[package]] 845 | name = "fixed-hash" 846 | version = "0.8.0" 847 | source = "registry+https://github.com/rust-lang/crates.io-index" 848 | checksum = "835c052cb0c08c1acf6ffd71c022172e18723949c8282f2b9f27efbc51e64534" 849 | dependencies = [ 850 | "byteorder", 851 | "rand", 852 | "rustc-hex", 853 | "static_assertions", 854 | ] 855 | 856 | [[package]] 857 | name = "flate2" 858 | version = "1.0.28" 859 | source = "registry+https://github.com/rust-lang/crates.io-index" 860 | checksum = "46303f565772937ffe1d394a4fac6f411c6013172fadde9dcdb1e147a086940e" 861 | dependencies = [ 862 | "crc32fast", 863 | "miniz_oxide", 864 | ] 865 | 866 | [[package]] 867 | name = "fnv" 868 | version = "1.0.7" 869 | source = "registry+https://github.com/rust-lang/crates.io-index" 870 | checksum = "3f9eec918d3f24069decb9af1554cad7c880e2da24a9afd88aca000531ab82c1" 871 | 872 | [[package]] 873 | name = "foreign_vec" 874 | version = "0.1.0" 875 | source = "registry+https://github.com/rust-lang/crates.io-index" 876 | checksum = "ee1b05cbd864bcaecbd3455d6d967862d446e4ebfc3c2e5e5b9841e53cba6673" 877 | 878 | [[package]] 879 | name = "form_urlencoded" 880 | version = "1.2.1" 881 | source = "registry+https://github.com/rust-lang/crates.io-index" 882 | checksum = "e13624c2627564efccf4934284bdd98cbaa14e79b0b5a141218e507b3a823456" 883 | dependencies = [ 884 | "percent-encoding", 885 | ] 886 | 887 | [[package]] 888 | name = "funty" 889 | version = "2.0.0" 890 | source = "registry+https://github.com/rust-lang/crates.io-index" 891 | checksum = "e6d5a32815ae3f33302d95fdcb2ce17862f8c65363dcfd29360480ba1001fc9c" 892 | 893 | [[package]] 894 | name = "futures" 895 | version = "0.3.30" 896 | source = "registry+https://github.com/rust-lang/crates.io-index" 897 | checksum = "645c6916888f6cb6350d2550b80fb63e734897a8498abe35cfb732b6487804b0" 898 | dependencies = [ 899 | "futures-channel", 900 | "futures-core", 901 | "futures-executor", 902 | "futures-io", 903 | "futures-sink", 904 | "futures-task", 905 | "futures-util", 906 | ] 907 | 908 | [[package]] 909 | name = "futures-channel" 910 | version = "0.3.30" 911 | source = "registry+https://github.com/rust-lang/crates.io-index" 912 | checksum = "eac8f7d7865dcb88bd4373ab671c8cf4508703796caa2b1985a9ca867b3fcb78" 913 | dependencies = [ 914 | "futures-core", 915 | "futures-sink", 916 | ] 917 | 918 | [[package]] 919 | name = "futures-core" 920 | version = "0.3.30" 921 | source = "registry+https://github.com/rust-lang/crates.io-index" 922 | checksum = "dfc6580bb841c5a68e9ef15c77ccc837b40a7504914d52e47b8b0e9bbda25a1d" 923 | 924 | [[package]] 925 | name = "futures-executor" 926 | version = "0.3.30" 927 | source = "registry+https://github.com/rust-lang/crates.io-index" 928 | checksum = "a576fc72ae164fca6b9db127eaa9a9dda0d61316034f33a0a0d4eda41f02b01d" 929 | dependencies = [ 930 | "futures-core", 931 | "futures-task", 932 | "futures-util", 933 | ] 934 | 935 | [[package]] 936 | name = "futures-io" 937 | version = "0.3.30" 938 | source = "registry+https://github.com/rust-lang/crates.io-index" 939 | checksum = "a44623e20b9681a318efdd71c299b6b222ed6f231972bfe2f224ebad6311f0c1" 940 | 941 | [[package]] 942 | name = "futures-macro" 943 | version = "0.3.30" 944 | source = "registry+https://github.com/rust-lang/crates.io-index" 945 | checksum = "87750cf4b7a4c0625b1529e4c543c2182106e4dedc60a2a6455e00d212c489ac" 946 | dependencies = [ 947 | "proc-macro2", 948 | "quote", 949 | "syn 2.0.60", 950 | ] 951 | 952 | [[package]] 953 | name = "futures-sink" 954 | version = "0.3.30" 955 | source = "registry+https://github.com/rust-lang/crates.io-index" 956 | checksum = "9fb8e00e87438d937621c1c6269e53f536c14d3fbd6a042bb24879e57d474fb5" 957 | 958 | [[package]] 959 | name = "futures-task" 960 | version = "0.3.30" 961 | source = "registry+https://github.com/rust-lang/crates.io-index" 962 | checksum = "38d84fa142264698cdce1a9f9172cf383a0c82de1bddcf3092901442c4097004" 963 | 964 | [[package]] 965 | name = "futures-util" 966 | version = "0.3.30" 967 | source = "registry+https://github.com/rust-lang/crates.io-index" 968 | checksum = "3d6401deb83407ab3da39eba7e33987a73c3df0c82b4bb5813ee871c19c41d48" 969 | dependencies = [ 970 | "futures-channel", 971 | "futures-core", 972 | "futures-io", 973 | "futures-macro", 974 | "futures-sink", 975 | "futures-task", 976 | "memchr", 977 | "pin-project-lite", 978 | "pin-utils", 979 | "slab", 980 | ] 981 | 982 | [[package]] 983 | name = "generic-array" 984 | version = "0.14.7" 985 | source = "registry+https://github.com/rust-lang/crates.io-index" 986 | checksum = "85649ca51fd72272d7821adaf274ad91c288277713d9c18820d8499a7ff69e9a" 987 | dependencies = [ 988 | "typenum", 989 | "version_check", 990 | ] 991 | 992 | [[package]] 993 | name = "getrandom" 994 | version = "0.2.14" 995 | source = "registry+https://github.com/rust-lang/crates.io-index" 996 | checksum = "94b22e06ecb0110981051723910cbf0b5f5e09a2062dd7663334ee79a9d1286c" 997 | dependencies = [ 998 | "cfg-if", 999 | "js-sys", 1000 | "libc", 1001 | "wasi", 1002 | "wasm-bindgen", 1003 | ] 1004 | 1005 | [[package]] 1006 | name = "gimli" 1007 | version = "0.28.1" 1008 | source = "registry+https://github.com/rust-lang/crates.io-index" 1009 | checksum = "4271d37baee1b8c7e4b708028c57d816cf9d2434acb33a549475f78c181f6253" 1010 | 1011 | [[package]] 1012 | name = "h2" 1013 | version = "0.3.26" 1014 | source = "registry+https://github.com/rust-lang/crates.io-index" 1015 | checksum = "81fe527a889e1532da5c525686d96d4c2e74cdd345badf8dfef9f6b39dd5f5e8" 1016 | dependencies = [ 1017 | "bytes", 1018 | "fnv", 1019 | "futures-core", 1020 | "futures-sink", 1021 | "futures-util", 1022 | "http", 1023 | "indexmap 2.2.6", 1024 | "slab", 1025 | "tokio", 1026 | "tokio-util", 1027 | "tracing", 1028 | ] 1029 | 1030 | [[package]] 1031 | name = "hash_hasher" 1032 | version = "2.0.3" 1033 | source = "registry+https://github.com/rust-lang/crates.io-index" 1034 | checksum = "74721d007512d0cb3338cd20f0654ac913920061a4c4d0d8708edb3f2a698c0c" 1035 | 1036 | [[package]] 1037 | name = "hashbrown" 1038 | version = "0.12.3" 1039 | source = "registry+https://github.com/rust-lang/crates.io-index" 1040 | checksum = "8a9ee70c43aaf417c914396645a0fa852624801b24ebb7ae78fe8272889ac888" 1041 | 1042 | [[package]] 1043 | name = "hashbrown" 1044 | version = "0.14.3" 1045 | source = "registry+https://github.com/rust-lang/crates.io-index" 1046 | checksum = "290f1a1d9242c78d09ce40a5e87e7554ee637af1351968159f4952f028f75604" 1047 | dependencies = [ 1048 | "ahash", 1049 | ] 1050 | 1051 | [[package]] 1052 | name = "heck" 1053 | version = "0.4.1" 1054 | source = "registry+https://github.com/rust-lang/crates.io-index" 1055 | checksum = "95505c38b4572b2d910cecb0281560f54b440a19336cbbcb27bf6ce6adc6f5a8" 1056 | 1057 | [[package]] 1058 | name = "hermit-abi" 1059 | version = "0.3.9" 1060 | source = "registry+https://github.com/rust-lang/crates.io-index" 1061 | checksum = "d231dfb89cfffdbc30e7fc41579ed6066ad03abda9e567ccafae602b97ec5024" 1062 | 1063 | [[package]] 1064 | name = "hex" 1065 | version = "0.4.3" 1066 | source = "registry+https://github.com/rust-lang/crates.io-index" 1067 | checksum = "7f24254aa9a54b5c858eaee2f5bccdb46aaf0e486a595ed5fd8f86ba55232a70" 1068 | dependencies = [ 1069 | "serde", 1070 | ] 1071 | 1072 | [[package]] 1073 | name = "hex-literal" 1074 | version = "0.4.1" 1075 | source = "registry+https://github.com/rust-lang/crates.io-index" 1076 | checksum = "6fe2267d4ed49bc07b63801559be28c718ea06c4738b7a03c94df7386d2cde46" 1077 | 1078 | [[package]] 1079 | name = "http" 1080 | version = "0.2.12" 1081 | source = "registry+https://github.com/rust-lang/crates.io-index" 1082 | checksum = "601cbb57e577e2f5ef5be8e7b83f0f63994f25aa94d673e54a92d5c516d101f1" 1083 | dependencies = [ 1084 | "bytes", 1085 | "fnv", 1086 | "itoa", 1087 | ] 1088 | 1089 | [[package]] 1090 | name = "http-body" 1091 | version = "0.4.6" 1092 | source = "registry+https://github.com/rust-lang/crates.io-index" 1093 | checksum = "7ceab25649e9960c0311ea418d17bee82c0dcec1bd053b5f9a66e265a693bed2" 1094 | dependencies = [ 1095 | "bytes", 1096 | "http", 1097 | "pin-project-lite", 1098 | ] 1099 | 1100 | [[package]] 1101 | name = "httparse" 1102 | version = "1.8.0" 1103 | source = "registry+https://github.com/rust-lang/crates.io-index" 1104 | checksum = "d897f394bad6a705d5f4104762e116a75639e470d80901eed05a860a95cb1904" 1105 | 1106 | [[package]] 1107 | name = "httpdate" 1108 | version = "1.0.3" 1109 | source = "registry+https://github.com/rust-lang/crates.io-index" 1110 | checksum = "df3b46402a9d5adb4c86a0cf463f42e19994e3ee891101b1841f30a545cb49a9" 1111 | 1112 | [[package]] 1113 | name = "humantime" 1114 | version = "2.1.0" 1115 | source = "registry+https://github.com/rust-lang/crates.io-index" 1116 | checksum = "9a3a5bfb195931eeb336b2a7b4d761daec841b97f947d34394601737a7bba5e4" 1117 | 1118 | [[package]] 1119 | name = "hyper" 1120 | version = "0.14.28" 1121 | source = "registry+https://github.com/rust-lang/crates.io-index" 1122 | checksum = "bf96e135eb83a2a8ddf766e426a841d8ddd7449d5f00d34ea02b41d2f19eef80" 1123 | dependencies = [ 1124 | "bytes", 1125 | "futures-channel", 1126 | "futures-core", 1127 | "futures-util", 1128 | "h2", 1129 | "http", 1130 | "http-body", 1131 | "httparse", 1132 | "httpdate", 1133 | "itoa", 1134 | "pin-project-lite", 1135 | "socket2", 1136 | "tokio", 1137 | "tower-service", 1138 | "tracing", 1139 | "want", 1140 | ] 1141 | 1142 | [[package]] 1143 | name = "hyper-rustls" 1144 | version = "0.24.2" 1145 | source = "registry+https://github.com/rust-lang/crates.io-index" 1146 | checksum = "ec3efd23720e2049821a693cbc7e65ea87c72f1c58ff2f9522ff332b1491e590" 1147 | dependencies = [ 1148 | "futures-util", 1149 | "http", 1150 | "hyper", 1151 | "rustls", 1152 | "tokio", 1153 | "tokio-rustls", 1154 | ] 1155 | 1156 | [[package]] 1157 | name = "hyperfuel" 1158 | version = "1.1.2" 1159 | dependencies = [ 1160 | "anyhow", 1161 | "arrow2", 1162 | "dict_derive", 1163 | "env_logger", 1164 | "faster-hex", 1165 | "hyperfuel-client", 1166 | "hyperfuel-format", 1167 | "hyperfuel-net-types", 1168 | "itertools 0.12.1", 1169 | "prefix-hex", 1170 | "pyo3", 1171 | "pyo3-asyncio", 1172 | "serde", 1173 | "serde_json", 1174 | "tokio", 1175 | ] 1176 | 1177 | [[package]] 1178 | name = "hyperfuel-client" 1179 | version = "2.1.1" 1180 | source = "registry+https://github.com/rust-lang/crates.io-index" 1181 | checksum = "65d0f100e9be491b05b4bcd98351f8da9e1864aad3ec2c1971230b0a49d189e2" 1182 | dependencies = [ 1183 | "alloy-dyn-abi", 1184 | "alloy-json-abi", 1185 | "anyhow", 1186 | "arrayvec", 1187 | "arrow2", 1188 | "capnp", 1189 | "fastrange-rs", 1190 | "futures", 1191 | "hyperfuel-format", 1192 | "hyperfuel-net-types", 1193 | "hyperfuel-schema", 1194 | "log", 1195 | "rand", 1196 | "reqwest", 1197 | "serde", 1198 | "serde_json", 1199 | "tokio", 1200 | "tokio-util", 1201 | "url", 1202 | "xxhash-rust", 1203 | ] 1204 | 1205 | [[package]] 1206 | name = "hyperfuel-format" 1207 | version = "3.0.0" 1208 | source = "registry+https://github.com/rust-lang/crates.io-index" 1209 | checksum = "a026f3aa17f455ee6948ff01ef5ed4f61e73a5ae2ed8294a3cfaaae77f957269" 1210 | dependencies = [ 1211 | "arrayvec", 1212 | "derive_more", 1213 | "faster-hex", 1214 | "serde", 1215 | "thiserror", 1216 | ] 1217 | 1218 | [[package]] 1219 | name = "hyperfuel-net-types" 1220 | version = "3.0.0" 1221 | source = "registry+https://github.com/rust-lang/crates.io-index" 1222 | checksum = "8b95c3070278155de965701fd60a287c7477496bdb503898b225e11f0cbe85a5" 1223 | dependencies = [ 1224 | "arrayvec", 1225 | "capnp", 1226 | "capnpc", 1227 | "hyperfuel-format", 1228 | "serde", 1229 | ] 1230 | 1231 | [[package]] 1232 | name = "hyperfuel-schema" 1233 | version = "3.0.0" 1234 | source = "registry+https://github.com/rust-lang/crates.io-index" 1235 | checksum = "b92376891e9a5589b2d766b287c339f630562dec54112fbfab596fd8d3b48f7d" 1236 | dependencies = [ 1237 | "anyhow", 1238 | "arrow2", 1239 | ] 1240 | 1241 | [[package]] 1242 | name = "idna" 1243 | version = "0.5.0" 1244 | source = "registry+https://github.com/rust-lang/crates.io-index" 1245 | checksum = "634d9b1461af396cad843f47fdba5597a4f9e6ddd4bfb6ff5d85028c25cb12f6" 1246 | dependencies = [ 1247 | "unicode-bidi", 1248 | "unicode-normalization", 1249 | ] 1250 | 1251 | [[package]] 1252 | name = "impl-codec" 1253 | version = "0.6.0" 1254 | source = "registry+https://github.com/rust-lang/crates.io-index" 1255 | checksum = "ba6a270039626615617f3f36d15fc827041df3b78c439da2cadfa47455a77f2f" 1256 | dependencies = [ 1257 | "parity-scale-codec", 1258 | ] 1259 | 1260 | [[package]] 1261 | name = "impl-trait-for-tuples" 1262 | version = "0.2.2" 1263 | source = "registry+https://github.com/rust-lang/crates.io-index" 1264 | checksum = "11d7a9f6330b71fea57921c9b61c47ee6e84f72d394754eff6163ae67e7395eb" 1265 | dependencies = [ 1266 | "proc-macro2", 1267 | "quote", 1268 | "syn 1.0.109", 1269 | ] 1270 | 1271 | [[package]] 1272 | name = "indexmap" 1273 | version = "1.9.3" 1274 | source = "registry+https://github.com/rust-lang/crates.io-index" 1275 | checksum = "bd070e393353796e801d209ad339e89596eb4c8d430d18ede6a1cced8fafbd99" 1276 | dependencies = [ 1277 | "autocfg", 1278 | "hashbrown 0.12.3", 1279 | ] 1280 | 1281 | [[package]] 1282 | name = "indexmap" 1283 | version = "2.2.6" 1284 | source = "registry+https://github.com/rust-lang/crates.io-index" 1285 | checksum = "168fb715dda47215e360912c096649d23d58bf392ac62f73919e831745e40f26" 1286 | dependencies = [ 1287 | "equivalent", 1288 | "hashbrown 0.14.3", 1289 | ] 1290 | 1291 | [[package]] 1292 | name = "indoc" 1293 | version = "2.0.5" 1294 | source = "registry+https://github.com/rust-lang/crates.io-index" 1295 | checksum = "b248f5224d1d606005e02c97f5aa4e88eeb230488bcc03bc9ca4d7991399f2b5" 1296 | 1297 | [[package]] 1298 | name = "ipnet" 1299 | version = "2.9.0" 1300 | source = "registry+https://github.com/rust-lang/crates.io-index" 1301 | checksum = "8f518f335dce6725a761382244631d86cf0ccb2863413590b31338feb467f9c3" 1302 | 1303 | [[package]] 1304 | name = "itertools" 1305 | version = "0.10.5" 1306 | source = "registry+https://github.com/rust-lang/crates.io-index" 1307 | checksum = "b0fd2260e829bddf4cb6ea802289de2f86d6a7a690192fbe91b3f46e0f2c8473" 1308 | dependencies = [ 1309 | "either", 1310 | ] 1311 | 1312 | [[package]] 1313 | name = "itertools" 1314 | version = "0.12.1" 1315 | source = "registry+https://github.com/rust-lang/crates.io-index" 1316 | checksum = "ba291022dbbd398a455acf126c1e341954079855bc60dfdda641363bd6922569" 1317 | dependencies = [ 1318 | "either", 1319 | ] 1320 | 1321 | [[package]] 1322 | name = "itoa" 1323 | version = "1.0.11" 1324 | source = "registry+https://github.com/rust-lang/crates.io-index" 1325 | checksum = "49f1f14873335454500d59611f1cf4a4b0f786f9ac11f4312a78e4cf2566695b" 1326 | 1327 | [[package]] 1328 | name = "jobserver" 1329 | version = "0.1.30" 1330 | source = "registry+https://github.com/rust-lang/crates.io-index" 1331 | checksum = "685a7d121ee3f65ae4fddd72b25a04bb36b6af81bc0828f7d5434c0fe60fa3a2" 1332 | dependencies = [ 1333 | "libc", 1334 | ] 1335 | 1336 | [[package]] 1337 | name = "js-sys" 1338 | version = "0.3.69" 1339 | source = "registry+https://github.com/rust-lang/crates.io-index" 1340 | checksum = "29c15563dc2726973df627357ce0c9ddddbea194836909d655df6a75d2cf296d" 1341 | dependencies = [ 1342 | "wasm-bindgen", 1343 | ] 1344 | 1345 | [[package]] 1346 | name = "json-deserializer" 1347 | version = "0.4.4" 1348 | source = "registry+https://github.com/rust-lang/crates.io-index" 1349 | checksum = "5f63b421e16eb4100beb677af56f0b4f3a4f08bab74ef2af079ce5bb92c2683f" 1350 | dependencies = [ 1351 | "indexmap 1.9.3", 1352 | ] 1353 | 1354 | [[package]] 1355 | name = "keccak-asm" 1356 | version = "0.1.0" 1357 | source = "registry+https://github.com/rust-lang/crates.io-index" 1358 | checksum = "bb8515fff80ed850aea4a1595f2e519c003e2a00a82fe168ebf5269196caf444" 1359 | dependencies = [ 1360 | "digest 0.10.7", 1361 | "sha3-asm", 1362 | ] 1363 | 1364 | [[package]] 1365 | name = "lazy_static" 1366 | version = "1.4.0" 1367 | source = "registry+https://github.com/rust-lang/crates.io-index" 1368 | checksum = "e2abad23fbc42b3700f2f279844dc832adb2b2eb069b2df918f455c4e18cc646" 1369 | 1370 | [[package]] 1371 | name = "lexical-core" 1372 | version = "0.8.5" 1373 | source = "registry+https://github.com/rust-lang/crates.io-index" 1374 | checksum = "2cde5de06e8d4c2faabc400238f9ae1c74d5412d03a7bd067645ccbc47070e46" 1375 | dependencies = [ 1376 | "lexical-parse-float", 1377 | "lexical-parse-integer", 1378 | "lexical-util", 1379 | "lexical-write-float", 1380 | "lexical-write-integer", 1381 | ] 1382 | 1383 | [[package]] 1384 | name = "lexical-parse-float" 1385 | version = "0.8.5" 1386 | source = "registry+https://github.com/rust-lang/crates.io-index" 1387 | checksum = "683b3a5ebd0130b8fb52ba0bdc718cc56815b6a097e28ae5a6997d0ad17dc05f" 1388 | dependencies = [ 1389 | "lexical-parse-integer", 1390 | "lexical-util", 1391 | "static_assertions", 1392 | ] 1393 | 1394 | [[package]] 1395 | name = "lexical-parse-integer" 1396 | version = "0.8.6" 1397 | source = "registry+https://github.com/rust-lang/crates.io-index" 1398 | checksum = "6d0994485ed0c312f6d965766754ea177d07f9c00c9b82a5ee62ed5b47945ee9" 1399 | dependencies = [ 1400 | "lexical-util", 1401 | "static_assertions", 1402 | ] 1403 | 1404 | [[package]] 1405 | name = "lexical-util" 1406 | version = "0.8.5" 1407 | source = "registry+https://github.com/rust-lang/crates.io-index" 1408 | checksum = "5255b9ff16ff898710eb9eb63cb39248ea8a5bb036bea8085b1a767ff6c4e3fc" 1409 | dependencies = [ 1410 | "static_assertions", 1411 | ] 1412 | 1413 | [[package]] 1414 | name = "lexical-write-float" 1415 | version = "0.8.5" 1416 | source = "registry+https://github.com/rust-lang/crates.io-index" 1417 | checksum = "accabaa1c4581f05a3923d1b4cfd124c329352288b7b9da09e766b0668116862" 1418 | dependencies = [ 1419 | "lexical-util", 1420 | "lexical-write-integer", 1421 | "static_assertions", 1422 | ] 1423 | 1424 | [[package]] 1425 | name = "lexical-write-integer" 1426 | version = "0.8.5" 1427 | source = "registry+https://github.com/rust-lang/crates.io-index" 1428 | checksum = "e1b6f3d1f4422866b68192d62f77bc5c700bee84f3069f2469d7bc8c77852446" 1429 | dependencies = [ 1430 | "lexical-util", 1431 | "static_assertions", 1432 | ] 1433 | 1434 | [[package]] 1435 | name = "libc" 1436 | version = "0.2.153" 1437 | source = "registry+https://github.com/rust-lang/crates.io-index" 1438 | checksum = "9c198f91728a82281a64e1f4f9eeb25d82cb32a5de251c6bd1b5154d63a8e7bd" 1439 | 1440 | [[package]] 1441 | name = "libm" 1442 | version = "0.2.8" 1443 | source = "registry+https://github.com/rust-lang/crates.io-index" 1444 | checksum = "4ec2a862134d2a7d32d7983ddcdd1c4923530833c9f2ea1a44fc5fa473989058" 1445 | 1446 | [[package]] 1447 | name = "linux-raw-sys" 1448 | version = "0.4.13" 1449 | source = "registry+https://github.com/rust-lang/crates.io-index" 1450 | checksum = "01cda141df6706de531b6c46c3a33ecca755538219bd484262fa09410c13539c" 1451 | 1452 | [[package]] 1453 | name = "lock_api" 1454 | version = "0.4.11" 1455 | source = "registry+https://github.com/rust-lang/crates.io-index" 1456 | checksum = "3c168f8615b12bc01f9c17e2eb0cc07dcae1940121185446edc3744920e8ef45" 1457 | dependencies = [ 1458 | "autocfg", 1459 | "scopeguard", 1460 | ] 1461 | 1462 | [[package]] 1463 | name = "log" 1464 | version = "0.4.21" 1465 | source = "registry+https://github.com/rust-lang/crates.io-index" 1466 | checksum = "90ed8c1e510134f979dbc4f070f87d4313098b704861a105fe34231c70a3901c" 1467 | 1468 | [[package]] 1469 | name = "lz4" 1470 | version = "1.24.0" 1471 | source = "registry+https://github.com/rust-lang/crates.io-index" 1472 | checksum = "7e9e2dd86df36ce760a60f6ff6ad526f7ba1f14ba0356f8254fb6905e6494df1" 1473 | dependencies = [ 1474 | "libc", 1475 | "lz4-sys", 1476 | ] 1477 | 1478 | [[package]] 1479 | name = "lz4-sys" 1480 | version = "1.9.4" 1481 | source = "registry+https://github.com/rust-lang/crates.io-index" 1482 | checksum = "57d27b317e207b10f69f5e75494119e391a96f48861ae870d1da6edac98ca900" 1483 | dependencies = [ 1484 | "cc", 1485 | "libc", 1486 | ] 1487 | 1488 | [[package]] 1489 | name = "memchr" 1490 | version = "2.7.2" 1491 | source = "registry+https://github.com/rust-lang/crates.io-index" 1492 | checksum = "6c8640c5d730cb13ebd907d8d04b52f55ac9a2eec55b440c8892f40d56c76c1d" 1493 | 1494 | [[package]] 1495 | name = "memoffset" 1496 | version = "0.9.1" 1497 | source = "registry+https://github.com/rust-lang/crates.io-index" 1498 | checksum = "488016bfae457b036d996092f6cb448677611ce4449e970ceaf42695203f218a" 1499 | dependencies = [ 1500 | "autocfg", 1501 | ] 1502 | 1503 | [[package]] 1504 | name = "mime" 1505 | version = "0.3.17" 1506 | source = "registry+https://github.com/rust-lang/crates.io-index" 1507 | checksum = "6877bb514081ee2a7ff5ef9de3281f14a4dd4bceac4c09388074a6b5df8a139a" 1508 | 1509 | [[package]] 1510 | name = "miniz_oxide" 1511 | version = "0.7.2" 1512 | source = "registry+https://github.com/rust-lang/crates.io-index" 1513 | checksum = "9d811f3e15f28568be3407c8e7fdb6514c1cda3cb30683f15b6a1a1dc4ea14a7" 1514 | dependencies = [ 1515 | "adler", 1516 | ] 1517 | 1518 | [[package]] 1519 | name = "mio" 1520 | version = "0.8.11" 1521 | source = "registry+https://github.com/rust-lang/crates.io-index" 1522 | checksum = "a4a650543ca06a924e8b371db273b2756685faae30f8487da1b56505a8f78b0c" 1523 | dependencies = [ 1524 | "libc", 1525 | "wasi", 1526 | "windows-sys 0.48.0", 1527 | ] 1528 | 1529 | [[package]] 1530 | name = "num-bigint" 1531 | version = "0.4.4" 1532 | source = "registry+https://github.com/rust-lang/crates.io-index" 1533 | checksum = "608e7659b5c3d7cba262d894801b9ec9d00de989e8a82bd4bef91d08da45cdc0" 1534 | dependencies = [ 1535 | "autocfg", 1536 | "num-integer", 1537 | "num-traits", 1538 | ] 1539 | 1540 | [[package]] 1541 | name = "num-integer" 1542 | version = "0.1.46" 1543 | source = "registry+https://github.com/rust-lang/crates.io-index" 1544 | checksum = "7969661fd2958a5cb096e56c8e1ad0444ac2bbcd0061bd28660485a44879858f" 1545 | dependencies = [ 1546 | "num-traits", 1547 | ] 1548 | 1549 | [[package]] 1550 | name = "num-traits" 1551 | version = "0.2.18" 1552 | source = "registry+https://github.com/rust-lang/crates.io-index" 1553 | checksum = "da0df0e5185db44f69b44f26786fe401b6c293d1907744beaa7fa62b2e5a517a" 1554 | dependencies = [ 1555 | "autocfg", 1556 | "libm", 1557 | ] 1558 | 1559 | [[package]] 1560 | name = "num_cpus" 1561 | version = "1.16.0" 1562 | source = "registry+https://github.com/rust-lang/crates.io-index" 1563 | checksum = "4161fcb6d602d4d2081af7c3a45852d875a03dd337a6bfdd6e06407b61342a43" 1564 | dependencies = [ 1565 | "hermit-abi", 1566 | "libc", 1567 | ] 1568 | 1569 | [[package]] 1570 | name = "object" 1571 | version = "0.32.2" 1572 | source = "registry+https://github.com/rust-lang/crates.io-index" 1573 | checksum = "a6a622008b6e321afc04970976f62ee297fdbaa6f95318ca343e3eebb9648441" 1574 | dependencies = [ 1575 | "memchr", 1576 | ] 1577 | 1578 | [[package]] 1579 | name = "once_cell" 1580 | version = "1.19.0" 1581 | source = "registry+https://github.com/rust-lang/crates.io-index" 1582 | checksum = "3fdb12b2476b595f9358c5161aa467c2438859caa136dec86c26fdd2efe17b92" 1583 | 1584 | [[package]] 1585 | name = "parity-scale-codec" 1586 | version = "3.6.9" 1587 | source = "registry+https://github.com/rust-lang/crates.io-index" 1588 | checksum = "881331e34fa842a2fb61cc2db9643a8fedc615e47cfcc52597d1af0db9a7e8fe" 1589 | dependencies = [ 1590 | "arrayvec", 1591 | "bitvec", 1592 | "byte-slice-cast", 1593 | "impl-trait-for-tuples", 1594 | "parity-scale-codec-derive", 1595 | "serde", 1596 | ] 1597 | 1598 | [[package]] 1599 | name = "parity-scale-codec-derive" 1600 | version = "3.6.9" 1601 | source = "registry+https://github.com/rust-lang/crates.io-index" 1602 | checksum = "be30eaf4b0a9fba5336683b38de57bb86d179a35862ba6bfcf57625d006bde5b" 1603 | dependencies = [ 1604 | "proc-macro-crate", 1605 | "proc-macro2", 1606 | "quote", 1607 | "syn 1.0.109", 1608 | ] 1609 | 1610 | [[package]] 1611 | name = "parking_lot" 1612 | version = "0.12.1" 1613 | source = "registry+https://github.com/rust-lang/crates.io-index" 1614 | checksum = "3742b2c103b9f06bc9fff0a37ff4912935851bee6d36f3c02bcc755bcfec228f" 1615 | dependencies = [ 1616 | "lock_api", 1617 | "parking_lot_core", 1618 | ] 1619 | 1620 | [[package]] 1621 | name = "parking_lot_core" 1622 | version = "0.9.9" 1623 | source = "registry+https://github.com/rust-lang/crates.io-index" 1624 | checksum = "4c42a9226546d68acdd9c0a280d17ce19bfe27a46bf68784e4066115788d008e" 1625 | dependencies = [ 1626 | "cfg-if", 1627 | "libc", 1628 | "redox_syscall", 1629 | "smallvec", 1630 | "windows-targets 0.48.5", 1631 | ] 1632 | 1633 | [[package]] 1634 | name = "parquet-format-safe" 1635 | version = "0.2.4" 1636 | source = "registry+https://github.com/rust-lang/crates.io-index" 1637 | checksum = "1131c54b167dd4e4799ce762e1ab01549ebb94d5bdd13e6ec1b467491c378e1f" 1638 | dependencies = [ 1639 | "async-trait", 1640 | "futures", 1641 | ] 1642 | 1643 | [[package]] 1644 | name = "parquet2" 1645 | version = "0.17.2" 1646 | source = "registry+https://github.com/rust-lang/crates.io-index" 1647 | checksum = "579fe5745f02cef3d5f236bfed216fd4693e49e4e920a13475c6132233283bce" 1648 | dependencies = [ 1649 | "async-stream", 1650 | "futures", 1651 | "lz4", 1652 | "parquet-format-safe", 1653 | "seq-macro", 1654 | "streaming-decompression", 1655 | "zstd", 1656 | ] 1657 | 1658 | [[package]] 1659 | name = "paste" 1660 | version = "1.0.14" 1661 | source = "registry+https://github.com/rust-lang/crates.io-index" 1662 | checksum = "de3145af08024dea9fa9914f381a17b8fc6034dfb00f3a84013f7ff43f29ed4c" 1663 | 1664 | [[package]] 1665 | name = "percent-encoding" 1666 | version = "2.3.1" 1667 | source = "registry+https://github.com/rust-lang/crates.io-index" 1668 | checksum = "e3148f5046208a5d56bcfc03053e3ca6334e51da8dfb19b6cdc8b306fae3283e" 1669 | 1670 | [[package]] 1671 | name = "pest" 1672 | version = "2.7.9" 1673 | source = "registry+https://github.com/rust-lang/crates.io-index" 1674 | checksum = "311fb059dee1a7b802f036316d790138c613a4e8b180c822e3925a662e9f0c95" 1675 | dependencies = [ 1676 | "memchr", 1677 | "thiserror", 1678 | "ucd-trie", 1679 | ] 1680 | 1681 | [[package]] 1682 | name = "pin-project-lite" 1683 | version = "0.2.14" 1684 | source = "registry+https://github.com/rust-lang/crates.io-index" 1685 | checksum = "bda66fc9667c18cb2758a2ac84d1167245054bcf85d5d1aaa6923f45801bdd02" 1686 | 1687 | [[package]] 1688 | name = "pin-utils" 1689 | version = "0.1.0" 1690 | source = "registry+https://github.com/rust-lang/crates.io-index" 1691 | checksum = "8b870d8c151b6f2fb93e84a13146138f05d02ed11c7e7c54f8826aaaf7c9f184" 1692 | 1693 | [[package]] 1694 | name = "pkg-config" 1695 | version = "0.3.30" 1696 | source = "registry+https://github.com/rust-lang/crates.io-index" 1697 | checksum = "d231b230927b5e4ad203db57bbcbee2802f6bce620b1e4a9024a07d94e2907ec" 1698 | 1699 | [[package]] 1700 | name = "planus" 1701 | version = "0.3.1" 1702 | source = "registry+https://github.com/rust-lang/crates.io-index" 1703 | checksum = "fc1691dd09e82f428ce8d6310bd6d5da2557c82ff17694d2a32cad7242aea89f" 1704 | dependencies = [ 1705 | "array-init-cursor", 1706 | ] 1707 | 1708 | [[package]] 1709 | name = "portable-atomic" 1710 | version = "1.6.0" 1711 | source = "registry+https://github.com/rust-lang/crates.io-index" 1712 | checksum = "7170ef9988bc169ba16dd36a7fa041e5c4cbeb6a35b76d4c03daded371eae7c0" 1713 | 1714 | [[package]] 1715 | name = "ppv-lite86" 1716 | version = "0.2.17" 1717 | source = "registry+https://github.com/rust-lang/crates.io-index" 1718 | checksum = "5b40af805b3121feab8a3c29f04d8ad262fa8e0561883e7653e024ae4479e6de" 1719 | 1720 | [[package]] 1721 | name = "prefix-hex" 1722 | version = "0.7.1" 1723 | source = "registry+https://github.com/rust-lang/crates.io-index" 1724 | checksum = "1f1799f398371ad6957951ec446d3ff322d35c46d9db2e217b67e828b311c249" 1725 | dependencies = [ 1726 | "hex", 1727 | ] 1728 | 1729 | [[package]] 1730 | name = "primitive-types" 1731 | version = "0.12.2" 1732 | source = "registry+https://github.com/rust-lang/crates.io-index" 1733 | checksum = "0b34d9fd68ae0b74a41b21c03c2f62847aa0ffea044eee893b4c140b37e244e2" 1734 | dependencies = [ 1735 | "fixed-hash", 1736 | "impl-codec", 1737 | "uint", 1738 | ] 1739 | 1740 | [[package]] 1741 | name = "proc-macro-crate" 1742 | version = "2.0.2" 1743 | source = "registry+https://github.com/rust-lang/crates.io-index" 1744 | checksum = "b00f26d3400549137f92511a46ac1cd8ce37cb5598a96d382381458b992a5d24" 1745 | dependencies = [ 1746 | "toml_datetime", 1747 | "toml_edit", 1748 | ] 1749 | 1750 | [[package]] 1751 | name = "proc-macro-error" 1752 | version = "1.0.4" 1753 | source = "registry+https://github.com/rust-lang/crates.io-index" 1754 | checksum = "da25490ff9892aab3fcf7c36f08cfb902dd3e71ca0f9f9517bea02a73a5ce38c" 1755 | dependencies = [ 1756 | "proc-macro-error-attr", 1757 | "proc-macro2", 1758 | "quote", 1759 | "syn 1.0.109", 1760 | "version_check", 1761 | ] 1762 | 1763 | [[package]] 1764 | name = "proc-macro-error-attr" 1765 | version = "1.0.4" 1766 | source = "registry+https://github.com/rust-lang/crates.io-index" 1767 | checksum = "a1be40180e52ecc98ad80b184934baf3d0d29f979574e439af5a55274b35f869" 1768 | dependencies = [ 1769 | "proc-macro2", 1770 | "quote", 1771 | "version_check", 1772 | ] 1773 | 1774 | [[package]] 1775 | name = "proc-macro2" 1776 | version = "1.0.81" 1777 | source = "registry+https://github.com/rust-lang/crates.io-index" 1778 | checksum = "3d1597b0c024618f09a9c3b8655b7e430397a36d23fdafec26d6965e9eec3eba" 1779 | dependencies = [ 1780 | "unicode-ident", 1781 | ] 1782 | 1783 | [[package]] 1784 | name = "proptest" 1785 | version = "1.4.0" 1786 | source = "registry+https://github.com/rust-lang/crates.io-index" 1787 | checksum = "31b476131c3c86cb68032fdc5cb6d5a1045e3e42d96b69fa599fd77701e1f5bf" 1788 | dependencies = [ 1789 | "bit-set", 1790 | "bit-vec", 1791 | "bitflags 2.5.0", 1792 | "lazy_static", 1793 | "num-traits", 1794 | "rand", 1795 | "rand_chacha", 1796 | "rand_xorshift", 1797 | "regex-syntax", 1798 | "rusty-fork", 1799 | "tempfile", 1800 | "unarray", 1801 | ] 1802 | 1803 | [[package]] 1804 | name = "pyo3" 1805 | version = "0.20.3" 1806 | source = "registry+https://github.com/rust-lang/crates.io-index" 1807 | checksum = "53bdbb96d49157e65d45cc287af5f32ffadd5f4761438b527b055fb0d4bb8233" 1808 | dependencies = [ 1809 | "cfg-if", 1810 | "indoc", 1811 | "libc", 1812 | "memoffset", 1813 | "parking_lot", 1814 | "portable-atomic", 1815 | "pyo3-build-config", 1816 | "pyo3-ffi", 1817 | "pyo3-macros", 1818 | "serde", 1819 | "unindent", 1820 | ] 1821 | 1822 | [[package]] 1823 | name = "pyo3-asyncio" 1824 | version = "0.20.0" 1825 | source = "registry+https://github.com/rust-lang/crates.io-index" 1826 | checksum = "6ea6b68e93db3622f3bb3bf363246cf948ed5375afe7abff98ccbdd50b184995" 1827 | dependencies = [ 1828 | "futures", 1829 | "once_cell", 1830 | "pin-project-lite", 1831 | "pyo3", 1832 | "tokio", 1833 | ] 1834 | 1835 | [[package]] 1836 | name = "pyo3-build-config" 1837 | version = "0.20.3" 1838 | source = "registry+https://github.com/rust-lang/crates.io-index" 1839 | checksum = "deaa5745de3f5231ce10517a1f5dd97d53e5a2fd77aa6b5842292085831d48d7" 1840 | dependencies = [ 1841 | "once_cell", 1842 | "target-lexicon", 1843 | ] 1844 | 1845 | [[package]] 1846 | name = "pyo3-ffi" 1847 | version = "0.20.3" 1848 | source = "registry+https://github.com/rust-lang/crates.io-index" 1849 | checksum = "62b42531d03e08d4ef1f6e85a2ed422eb678b8cd62b762e53891c05faf0d4afa" 1850 | dependencies = [ 1851 | "libc", 1852 | "pyo3-build-config", 1853 | ] 1854 | 1855 | [[package]] 1856 | name = "pyo3-macros" 1857 | version = "0.20.3" 1858 | source = "registry+https://github.com/rust-lang/crates.io-index" 1859 | checksum = "7305c720fa01b8055ec95e484a6eca7a83c841267f0dd5280f0c8b8551d2c158" 1860 | dependencies = [ 1861 | "proc-macro2", 1862 | "pyo3-macros-backend", 1863 | "quote", 1864 | "syn 2.0.60", 1865 | ] 1866 | 1867 | [[package]] 1868 | name = "pyo3-macros-backend" 1869 | version = "0.20.3" 1870 | source = "registry+https://github.com/rust-lang/crates.io-index" 1871 | checksum = "7c7e9b68bb9c3149c5b0cade5d07f953d6d125eb4337723c4ccdb665f1f96185" 1872 | dependencies = [ 1873 | "heck", 1874 | "proc-macro2", 1875 | "pyo3-build-config", 1876 | "quote", 1877 | "syn 2.0.60", 1878 | ] 1879 | 1880 | [[package]] 1881 | name = "quick-error" 1882 | version = "1.2.3" 1883 | source = "registry+https://github.com/rust-lang/crates.io-index" 1884 | checksum = "a1d01941d82fa2ab50be1e79e6714289dd7cde78eba4c074bc5a4374f650dfe0" 1885 | 1886 | [[package]] 1887 | name = "quote" 1888 | version = "1.0.36" 1889 | source = "registry+https://github.com/rust-lang/crates.io-index" 1890 | checksum = "0fa76aaf39101c457836aec0ce2316dbdc3ab723cdda1c6bd4e6ad4208acaca7" 1891 | dependencies = [ 1892 | "proc-macro2", 1893 | ] 1894 | 1895 | [[package]] 1896 | name = "radium" 1897 | version = "0.7.0" 1898 | source = "registry+https://github.com/rust-lang/crates.io-index" 1899 | checksum = "dc33ff2d4973d518d823d61aa239014831e521c75da58e3df4840d3f47749d09" 1900 | 1901 | [[package]] 1902 | name = "rand" 1903 | version = "0.8.5" 1904 | source = "registry+https://github.com/rust-lang/crates.io-index" 1905 | checksum = "34af8d1a0e25924bc5b7c43c079c942339d8f0a8b57c39049bef581b46327404" 1906 | dependencies = [ 1907 | "libc", 1908 | "rand_chacha", 1909 | "rand_core", 1910 | ] 1911 | 1912 | [[package]] 1913 | name = "rand_chacha" 1914 | version = "0.3.1" 1915 | source = "registry+https://github.com/rust-lang/crates.io-index" 1916 | checksum = "e6c10a63a0fa32252be49d21e7709d4d4baf8d231c2dbce1eaa8141b9b127d88" 1917 | dependencies = [ 1918 | "ppv-lite86", 1919 | "rand_core", 1920 | ] 1921 | 1922 | [[package]] 1923 | name = "rand_core" 1924 | version = "0.6.4" 1925 | source = "registry+https://github.com/rust-lang/crates.io-index" 1926 | checksum = "ec0be4795e2f6a28069bec0b5ff3e2ac9bafc99e6a9a7dc3547996c5c816922c" 1927 | dependencies = [ 1928 | "getrandom", 1929 | ] 1930 | 1931 | [[package]] 1932 | name = "rand_xorshift" 1933 | version = "0.3.0" 1934 | source = "registry+https://github.com/rust-lang/crates.io-index" 1935 | checksum = "d25bf25ec5ae4a3f1b92f929810509a2f53d7dca2f50b794ff57e3face536c8f" 1936 | dependencies = [ 1937 | "rand_core", 1938 | ] 1939 | 1940 | [[package]] 1941 | name = "redox_syscall" 1942 | version = "0.4.1" 1943 | source = "registry+https://github.com/rust-lang/crates.io-index" 1944 | checksum = "4722d768eff46b75989dd134e5c353f0d6296e5aaa3132e776cbdb56be7731aa" 1945 | dependencies = [ 1946 | "bitflags 1.3.2", 1947 | ] 1948 | 1949 | [[package]] 1950 | name = "regex" 1951 | version = "1.10.4" 1952 | source = "registry+https://github.com/rust-lang/crates.io-index" 1953 | checksum = "c117dbdfde9c8308975b6a18d71f3f385c89461f7b3fb054288ecf2a2058ba4c" 1954 | dependencies = [ 1955 | "aho-corasick", 1956 | "memchr", 1957 | "regex-automata", 1958 | "regex-syntax", 1959 | ] 1960 | 1961 | [[package]] 1962 | name = "regex-automata" 1963 | version = "0.4.6" 1964 | source = "registry+https://github.com/rust-lang/crates.io-index" 1965 | checksum = "86b83b8b9847f9bf95ef68afb0b8e6cdb80f498442f5179a29fad448fcc1eaea" 1966 | dependencies = [ 1967 | "aho-corasick", 1968 | "memchr", 1969 | "regex-syntax", 1970 | ] 1971 | 1972 | [[package]] 1973 | name = "regex-syntax" 1974 | version = "0.8.3" 1975 | source = "registry+https://github.com/rust-lang/crates.io-index" 1976 | checksum = "adad44e29e4c806119491a7f06f03de4d1af22c3a680dd47f1e6e179439d1f56" 1977 | 1978 | [[package]] 1979 | name = "reqwest" 1980 | version = "0.11.27" 1981 | source = "registry+https://github.com/rust-lang/crates.io-index" 1982 | checksum = "dd67538700a17451e7cba03ac727fb961abb7607553461627b97de0b89cf4a62" 1983 | dependencies = [ 1984 | "async-compression", 1985 | "base64", 1986 | "bytes", 1987 | "encoding_rs", 1988 | "futures-core", 1989 | "futures-util", 1990 | "h2", 1991 | "http", 1992 | "http-body", 1993 | "hyper", 1994 | "hyper-rustls", 1995 | "ipnet", 1996 | "js-sys", 1997 | "log", 1998 | "mime", 1999 | "once_cell", 2000 | "percent-encoding", 2001 | "pin-project-lite", 2002 | "rustls", 2003 | "rustls-pemfile", 2004 | "serde", 2005 | "serde_json", 2006 | "serde_urlencoded", 2007 | "sync_wrapper", 2008 | "system-configuration", 2009 | "tokio", 2010 | "tokio-rustls", 2011 | "tokio-util", 2012 | "tower-service", 2013 | "url", 2014 | "wasm-bindgen", 2015 | "wasm-bindgen-futures", 2016 | "web-sys", 2017 | "webpki-roots", 2018 | "winreg", 2019 | ] 2020 | 2021 | [[package]] 2022 | name = "ring" 2023 | version = "0.17.8" 2024 | source = "registry+https://github.com/rust-lang/crates.io-index" 2025 | checksum = "c17fa4cb658e3583423e915b9f3acc01cceaee1860e33d59ebae66adc3a2dc0d" 2026 | dependencies = [ 2027 | "cc", 2028 | "cfg-if", 2029 | "getrandom", 2030 | "libc", 2031 | "spin", 2032 | "untrusted", 2033 | "windows-sys 0.52.0", 2034 | ] 2035 | 2036 | [[package]] 2037 | name = "rlp" 2038 | version = "0.5.2" 2039 | source = "registry+https://github.com/rust-lang/crates.io-index" 2040 | checksum = "bb919243f34364b6bd2fc10ef797edbfa75f33c252e7998527479c6d6b47e1ec" 2041 | dependencies = [ 2042 | "bytes", 2043 | "rustc-hex", 2044 | ] 2045 | 2046 | [[package]] 2047 | name = "ruint" 2048 | version = "1.12.1" 2049 | source = "registry+https://github.com/rust-lang/crates.io-index" 2050 | checksum = "8f308135fef9fc398342da5472ce7c484529df23743fb7c734e0f3d472971e62" 2051 | dependencies = [ 2052 | "alloy-rlp", 2053 | "ark-ff 0.3.0", 2054 | "ark-ff 0.4.2", 2055 | "bytes", 2056 | "fastrlp", 2057 | "num-bigint", 2058 | "num-traits", 2059 | "parity-scale-codec", 2060 | "primitive-types", 2061 | "proptest", 2062 | "rand", 2063 | "rlp", 2064 | "ruint-macro", 2065 | "serde", 2066 | "valuable", 2067 | "zeroize", 2068 | ] 2069 | 2070 | [[package]] 2071 | name = "ruint-macro" 2072 | version = "1.2.0" 2073 | source = "registry+https://github.com/rust-lang/crates.io-index" 2074 | checksum = "f86854cf50259291520509879a5c294c3c9a4c334e9ff65071c51e42ef1e2343" 2075 | 2076 | [[package]] 2077 | name = "rustc-demangle" 2078 | version = "0.1.23" 2079 | source = "registry+https://github.com/rust-lang/crates.io-index" 2080 | checksum = "d626bb9dae77e28219937af045c257c28bfd3f69333c512553507f5f9798cb76" 2081 | 2082 | [[package]] 2083 | name = "rustc-hex" 2084 | version = "2.1.0" 2085 | source = "registry+https://github.com/rust-lang/crates.io-index" 2086 | checksum = "3e75f6a532d0fd9f7f13144f392b6ad56a32696bfcd9c78f797f16bbb6f072d6" 2087 | 2088 | [[package]] 2089 | name = "rustc_version" 2090 | version = "0.3.3" 2091 | source = "registry+https://github.com/rust-lang/crates.io-index" 2092 | checksum = "f0dfe2087c51c460008730de8b57e6a320782fbfb312e1f4d520e6c6fae155ee" 2093 | dependencies = [ 2094 | "semver 0.11.0", 2095 | ] 2096 | 2097 | [[package]] 2098 | name = "rustc_version" 2099 | version = "0.4.0" 2100 | source = "registry+https://github.com/rust-lang/crates.io-index" 2101 | checksum = "bfa0f585226d2e68097d4f95d113b15b83a82e819ab25717ec0590d9584ef366" 2102 | dependencies = [ 2103 | "semver 1.0.22", 2104 | ] 2105 | 2106 | [[package]] 2107 | name = "rustix" 2108 | version = "0.38.33" 2109 | source = "registry+https://github.com/rust-lang/crates.io-index" 2110 | checksum = "e3cc72858054fcff6d7dea32df2aeaee6a7c24227366d7ea429aada2f26b16ad" 2111 | dependencies = [ 2112 | "bitflags 2.5.0", 2113 | "errno", 2114 | "libc", 2115 | "linux-raw-sys", 2116 | "windows-sys 0.52.0", 2117 | ] 2118 | 2119 | [[package]] 2120 | name = "rustls" 2121 | version = "0.21.11" 2122 | source = "registry+https://github.com/rust-lang/crates.io-index" 2123 | checksum = "7fecbfb7b1444f477b345853b1fce097a2c6fb637b2bfb87e6bc5db0f043fae4" 2124 | dependencies = [ 2125 | "log", 2126 | "ring", 2127 | "rustls-webpki", 2128 | "sct", 2129 | ] 2130 | 2131 | [[package]] 2132 | name = "rustls-pemfile" 2133 | version = "1.0.4" 2134 | source = "registry+https://github.com/rust-lang/crates.io-index" 2135 | checksum = "1c74cae0a4cf6ccbbf5f359f08efdf8ee7e1dc532573bf0db71968cb56b1448c" 2136 | dependencies = [ 2137 | "base64", 2138 | ] 2139 | 2140 | [[package]] 2141 | name = "rustls-webpki" 2142 | version = "0.101.7" 2143 | source = "registry+https://github.com/rust-lang/crates.io-index" 2144 | checksum = "8b6275d1ee7a1cd780b64aca7726599a1dbc893b1e64144529e55c3c2f745765" 2145 | dependencies = [ 2146 | "ring", 2147 | "untrusted", 2148 | ] 2149 | 2150 | [[package]] 2151 | name = "rusty-fork" 2152 | version = "0.3.0" 2153 | source = "registry+https://github.com/rust-lang/crates.io-index" 2154 | checksum = "cb3dcc6e454c328bb824492db107ab7c0ae8fcffe4ad210136ef014458c1bc4f" 2155 | dependencies = [ 2156 | "fnv", 2157 | "quick-error", 2158 | "tempfile", 2159 | "wait-timeout", 2160 | ] 2161 | 2162 | [[package]] 2163 | name = "ryu" 2164 | version = "1.0.17" 2165 | source = "registry+https://github.com/rust-lang/crates.io-index" 2166 | checksum = "e86697c916019a8588c99b5fac3cead74ec0b4b819707a682fd4d23fa0ce1ba1" 2167 | 2168 | [[package]] 2169 | name = "scopeguard" 2170 | version = "1.2.0" 2171 | source = "registry+https://github.com/rust-lang/crates.io-index" 2172 | checksum = "94143f37725109f92c262ed2cf5e59bce7498c01bcc1502d7b9afe439a4e9f49" 2173 | 2174 | [[package]] 2175 | name = "sct" 2176 | version = "0.7.1" 2177 | source = "registry+https://github.com/rust-lang/crates.io-index" 2178 | checksum = "da046153aa2352493d6cb7da4b6e5c0c057d8a1d0a9aa8560baffdd945acd414" 2179 | dependencies = [ 2180 | "ring", 2181 | "untrusted", 2182 | ] 2183 | 2184 | [[package]] 2185 | name = "semver" 2186 | version = "0.11.0" 2187 | source = "registry+https://github.com/rust-lang/crates.io-index" 2188 | checksum = "f301af10236f6df4160f7c3f04eec6dbc70ace82d23326abad5edee88801c6b6" 2189 | dependencies = [ 2190 | "semver-parser", 2191 | ] 2192 | 2193 | [[package]] 2194 | name = "semver" 2195 | version = "1.0.22" 2196 | source = "registry+https://github.com/rust-lang/crates.io-index" 2197 | checksum = "92d43fe69e652f3df9bdc2b85b2854a0825b86e4fb76bc44d945137d053639ca" 2198 | 2199 | [[package]] 2200 | name = "semver-parser" 2201 | version = "0.10.2" 2202 | source = "registry+https://github.com/rust-lang/crates.io-index" 2203 | checksum = "00b0bef5b7f9e0df16536d3961cfb6e84331c065b4066afb39768d0e319411f7" 2204 | dependencies = [ 2205 | "pest", 2206 | ] 2207 | 2208 | [[package]] 2209 | name = "seq-macro" 2210 | version = "0.3.5" 2211 | source = "registry+https://github.com/rust-lang/crates.io-index" 2212 | checksum = "a3f0bf26fd526d2a95683cd0f87bf103b8539e2ca1ef48ce002d67aad59aa0b4" 2213 | 2214 | [[package]] 2215 | name = "serde" 2216 | version = "1.0.198" 2217 | source = "registry+https://github.com/rust-lang/crates.io-index" 2218 | checksum = "9846a40c979031340571da2545a4e5b7c4163bdae79b301d5f86d03979451fcc" 2219 | dependencies = [ 2220 | "serde_derive", 2221 | ] 2222 | 2223 | [[package]] 2224 | name = "serde_derive" 2225 | version = "1.0.198" 2226 | source = "registry+https://github.com/rust-lang/crates.io-index" 2227 | checksum = "e88edab869b01783ba905e7d0153f9fc1a6505a96e4ad3018011eedb838566d9" 2228 | dependencies = [ 2229 | "proc-macro2", 2230 | "quote", 2231 | "syn 2.0.60", 2232 | ] 2233 | 2234 | [[package]] 2235 | name = "serde_json" 2236 | version = "1.0.116" 2237 | source = "registry+https://github.com/rust-lang/crates.io-index" 2238 | checksum = "3e17db7126d17feb94eb3fad46bf1a96b034e8aacbc2e775fe81505f8b0b2813" 2239 | dependencies = [ 2240 | "itoa", 2241 | "ryu", 2242 | "serde", 2243 | ] 2244 | 2245 | [[package]] 2246 | name = "serde_urlencoded" 2247 | version = "0.7.1" 2248 | source = "registry+https://github.com/rust-lang/crates.io-index" 2249 | checksum = "d3491c14715ca2294c4d6a88f15e84739788c1d030eed8c110436aafdaa2f3fd" 2250 | dependencies = [ 2251 | "form_urlencoded", 2252 | "itoa", 2253 | "ryu", 2254 | "serde", 2255 | ] 2256 | 2257 | [[package]] 2258 | name = "sha3-asm" 2259 | version = "0.1.0" 2260 | source = "registry+https://github.com/rust-lang/crates.io-index" 2261 | checksum = "bac61da6b35ad76b195eb4771210f947734321a8d81d7738e1580d953bc7a15e" 2262 | dependencies = [ 2263 | "cc", 2264 | "cfg-if", 2265 | ] 2266 | 2267 | [[package]] 2268 | name = "simdutf8" 2269 | version = "0.1.4" 2270 | source = "registry+https://github.com/rust-lang/crates.io-index" 2271 | checksum = "f27f6278552951f1f2b8cf9da965d10969b2efdea95a6ec47987ab46edfe263a" 2272 | 2273 | [[package]] 2274 | name = "slab" 2275 | version = "0.4.9" 2276 | source = "registry+https://github.com/rust-lang/crates.io-index" 2277 | checksum = "8f92a496fb766b417c996b9c5e57daf2f7ad3b0bebe1ccfca4856390e3d3bb67" 2278 | dependencies = [ 2279 | "autocfg", 2280 | ] 2281 | 2282 | [[package]] 2283 | name = "smallvec" 2284 | version = "1.13.2" 2285 | source = "registry+https://github.com/rust-lang/crates.io-index" 2286 | checksum = "3c5e1a9a646d36c3599cd173a41282daf47c44583ad367b8e6837255952e5c67" 2287 | 2288 | [[package]] 2289 | name = "socket2" 2290 | version = "0.5.6" 2291 | source = "registry+https://github.com/rust-lang/crates.io-index" 2292 | checksum = "05ffd9c0a93b7543e062e759284fcf5f5e3b098501104bfbdde4d404db792871" 2293 | dependencies = [ 2294 | "libc", 2295 | "windows-sys 0.52.0", 2296 | ] 2297 | 2298 | [[package]] 2299 | name = "spin" 2300 | version = "0.9.8" 2301 | source = "registry+https://github.com/rust-lang/crates.io-index" 2302 | checksum = "6980e8d7511241f8acf4aebddbb1ff938df5eebe98691418c4468d0b72a96a67" 2303 | 2304 | [[package]] 2305 | name = "static_assertions" 2306 | version = "1.1.0" 2307 | source = "registry+https://github.com/rust-lang/crates.io-index" 2308 | checksum = "a2eb9349b6444b326872e140eb1cf5e7c522154d69e7a0ffb0fb81c06b37543f" 2309 | 2310 | [[package]] 2311 | name = "streaming-decompression" 2312 | version = "0.1.2" 2313 | source = "registry+https://github.com/rust-lang/crates.io-index" 2314 | checksum = "bf6cc3b19bfb128a8ad11026086e31d3ce9ad23f8ea37354b31383a187c44cf3" 2315 | dependencies = [ 2316 | "fallible-streaming-iterator", 2317 | ] 2318 | 2319 | [[package]] 2320 | name = "streaming-iterator" 2321 | version = "0.1.9" 2322 | source = "registry+https://github.com/rust-lang/crates.io-index" 2323 | checksum = "2b2231b7c3057d5e4ad0156fb3dc807d900806020c5ffa3ee6ff2c8c76fb8520" 2324 | 2325 | [[package]] 2326 | name = "syn" 2327 | version = "1.0.109" 2328 | source = "registry+https://github.com/rust-lang/crates.io-index" 2329 | checksum = "72b64191b275b66ffe2469e8af2c1cfe3bafa67b529ead792a6d0160888b4237" 2330 | dependencies = [ 2331 | "proc-macro2", 2332 | "quote", 2333 | "unicode-ident", 2334 | ] 2335 | 2336 | [[package]] 2337 | name = "syn" 2338 | version = "2.0.60" 2339 | source = "registry+https://github.com/rust-lang/crates.io-index" 2340 | checksum = "909518bc7b1c9b779f1bbf07f2929d35af9f0f37e47c6e9ef7f9dddc1e1821f3" 2341 | dependencies = [ 2342 | "proc-macro2", 2343 | "quote", 2344 | "unicode-ident", 2345 | ] 2346 | 2347 | [[package]] 2348 | name = "syn-solidity" 2349 | version = "0.5.4" 2350 | source = "registry+https://github.com/rust-lang/crates.io-index" 2351 | checksum = "91ede2e5b2c6bfac4bc0ff4499957a11725dc12a7ddb86270e827ef575892553" 2352 | dependencies = [ 2353 | "paste", 2354 | "proc-macro2", 2355 | "quote", 2356 | "syn 2.0.60", 2357 | ] 2358 | 2359 | [[package]] 2360 | name = "sync_wrapper" 2361 | version = "0.1.2" 2362 | source = "registry+https://github.com/rust-lang/crates.io-index" 2363 | checksum = "2047c6ded9c721764247e62cd3b03c09ffc529b2ba5b10ec482ae507a4a70160" 2364 | 2365 | [[package]] 2366 | name = "system-configuration" 2367 | version = "0.5.1" 2368 | source = "registry+https://github.com/rust-lang/crates.io-index" 2369 | checksum = "ba3a3adc5c275d719af8cb4272ea1c4a6d668a777f37e115f6d11ddbc1c8e0e7" 2370 | dependencies = [ 2371 | "bitflags 1.3.2", 2372 | "core-foundation", 2373 | "system-configuration-sys", 2374 | ] 2375 | 2376 | [[package]] 2377 | name = "system-configuration-sys" 2378 | version = "0.5.0" 2379 | source = "registry+https://github.com/rust-lang/crates.io-index" 2380 | checksum = "a75fb188eb626b924683e3b95e3a48e63551fcfb51949de2f06a9d91dbee93c9" 2381 | dependencies = [ 2382 | "core-foundation-sys", 2383 | "libc", 2384 | ] 2385 | 2386 | [[package]] 2387 | name = "tap" 2388 | version = "1.0.1" 2389 | source = "registry+https://github.com/rust-lang/crates.io-index" 2390 | checksum = "55937e1799185b12863d447f42597ed69d9928686b8d88a1df17376a097d8369" 2391 | 2392 | [[package]] 2393 | name = "target-lexicon" 2394 | version = "0.12.14" 2395 | source = "registry+https://github.com/rust-lang/crates.io-index" 2396 | checksum = "e1fc403891a21bcfb7c37834ba66a547a8f402146eba7265b5a6d88059c9ff2f" 2397 | 2398 | [[package]] 2399 | name = "tempfile" 2400 | version = "3.10.1" 2401 | source = "registry+https://github.com/rust-lang/crates.io-index" 2402 | checksum = "85b77fafb263dd9d05cbeac119526425676db3784113aa9295c88498cbf8bff1" 2403 | dependencies = [ 2404 | "cfg-if", 2405 | "fastrand", 2406 | "rustix", 2407 | "windows-sys 0.52.0", 2408 | ] 2409 | 2410 | [[package]] 2411 | name = "thiserror" 2412 | version = "1.0.59" 2413 | source = "registry+https://github.com/rust-lang/crates.io-index" 2414 | checksum = "f0126ad08bff79f29fc3ae6a55cc72352056dfff61e3ff8bb7129476d44b23aa" 2415 | dependencies = [ 2416 | "thiserror-impl", 2417 | ] 2418 | 2419 | [[package]] 2420 | name = "thiserror-impl" 2421 | version = "1.0.59" 2422 | source = "registry+https://github.com/rust-lang/crates.io-index" 2423 | checksum = "d1cd413b5d558b4c5bf3680e324a6fa5014e7b7c067a51e69dbdf47eb7148b66" 2424 | dependencies = [ 2425 | "proc-macro2", 2426 | "quote", 2427 | "syn 2.0.60", 2428 | ] 2429 | 2430 | [[package]] 2431 | name = "tiny-keccak" 2432 | version = "2.0.2" 2433 | source = "registry+https://github.com/rust-lang/crates.io-index" 2434 | checksum = "2c9d3793400a45f954c52e73d068316d76b6f4e36977e3fcebb13a2721e80237" 2435 | dependencies = [ 2436 | "crunchy", 2437 | ] 2438 | 2439 | [[package]] 2440 | name = "tinyvec" 2441 | version = "1.6.0" 2442 | source = "registry+https://github.com/rust-lang/crates.io-index" 2443 | checksum = "87cc5ceb3875bb20c2890005a4e226a4651264a5c75edb2421b52861a0a0cb50" 2444 | dependencies = [ 2445 | "tinyvec_macros", 2446 | ] 2447 | 2448 | [[package]] 2449 | name = "tinyvec_macros" 2450 | version = "0.1.1" 2451 | source = "registry+https://github.com/rust-lang/crates.io-index" 2452 | checksum = "1f3ccbac311fea05f86f61904b462b55fb3df8837a366dfc601a0161d0532f20" 2453 | 2454 | [[package]] 2455 | name = "tokio" 2456 | version = "1.37.0" 2457 | source = "registry+https://github.com/rust-lang/crates.io-index" 2458 | checksum = "1adbebffeca75fcfd058afa480fb6c0b81e165a0323f9c9d39c9697e37c46787" 2459 | dependencies = [ 2460 | "backtrace", 2461 | "bytes", 2462 | "libc", 2463 | "mio", 2464 | "num_cpus", 2465 | "pin-project-lite", 2466 | "socket2", 2467 | "windows-sys 0.48.0", 2468 | ] 2469 | 2470 | [[package]] 2471 | name = "tokio-rustls" 2472 | version = "0.24.1" 2473 | source = "registry+https://github.com/rust-lang/crates.io-index" 2474 | checksum = "c28327cf380ac148141087fbfb9de9d7bd4e84ab5d2c28fbc911d753de8a7081" 2475 | dependencies = [ 2476 | "rustls", 2477 | "tokio", 2478 | ] 2479 | 2480 | [[package]] 2481 | name = "tokio-util" 2482 | version = "0.7.10" 2483 | source = "registry+https://github.com/rust-lang/crates.io-index" 2484 | checksum = "5419f34732d9eb6ee4c3578b7989078579b7f039cbbb9ca2c4da015749371e15" 2485 | dependencies = [ 2486 | "bytes", 2487 | "futures-core", 2488 | "futures-io", 2489 | "futures-sink", 2490 | "pin-project-lite", 2491 | "tokio", 2492 | "tracing", 2493 | ] 2494 | 2495 | [[package]] 2496 | name = "toml_datetime" 2497 | version = "0.6.3" 2498 | source = "registry+https://github.com/rust-lang/crates.io-index" 2499 | checksum = "7cda73e2f1397b1262d6dfdcef8aafae14d1de7748d66822d3bfeeb6d03e5e4b" 2500 | 2501 | [[package]] 2502 | name = "toml_edit" 2503 | version = "0.20.2" 2504 | source = "registry+https://github.com/rust-lang/crates.io-index" 2505 | checksum = "396e4d48bbb2b7554c944bde63101b5ae446cff6ec4a24227428f15eb72ef338" 2506 | dependencies = [ 2507 | "indexmap 2.2.6", 2508 | "toml_datetime", 2509 | "winnow", 2510 | ] 2511 | 2512 | [[package]] 2513 | name = "tower-service" 2514 | version = "0.3.2" 2515 | source = "registry+https://github.com/rust-lang/crates.io-index" 2516 | checksum = "b6bc1c9ce2b5135ac7f93c72918fc37feb872bdc6a5533a8b85eb4b86bfdae52" 2517 | 2518 | [[package]] 2519 | name = "tracing" 2520 | version = "0.1.40" 2521 | source = "registry+https://github.com/rust-lang/crates.io-index" 2522 | checksum = "c3523ab5a71916ccf420eebdf5521fcef02141234bbc0b8a49f2fdc4544364ef" 2523 | dependencies = [ 2524 | "pin-project-lite", 2525 | "tracing-core", 2526 | ] 2527 | 2528 | [[package]] 2529 | name = "tracing-core" 2530 | version = "0.1.32" 2531 | source = "registry+https://github.com/rust-lang/crates.io-index" 2532 | checksum = "c06d3da6113f116aaee68e4d601191614c9053067f9ab7f6edbcb161237daa54" 2533 | dependencies = [ 2534 | "once_cell", 2535 | ] 2536 | 2537 | [[package]] 2538 | name = "try-lock" 2539 | version = "0.2.5" 2540 | source = "registry+https://github.com/rust-lang/crates.io-index" 2541 | checksum = "e421abadd41a4225275504ea4d6566923418b7f05506fbc9c0fe86ba7396114b" 2542 | 2543 | [[package]] 2544 | name = "typenum" 2545 | version = "1.17.0" 2546 | source = "registry+https://github.com/rust-lang/crates.io-index" 2547 | checksum = "42ff0bf0c66b8238c6f3b578df37d0b7848e55df8577b3f74f92a69acceeb825" 2548 | 2549 | [[package]] 2550 | name = "ucd-trie" 2551 | version = "0.1.6" 2552 | source = "registry+https://github.com/rust-lang/crates.io-index" 2553 | checksum = "ed646292ffc8188ef8ea4d1e0e0150fb15a5c2e12ad9b8fc191ae7a8a7f3c4b9" 2554 | 2555 | [[package]] 2556 | name = "uint" 2557 | version = "0.9.5" 2558 | source = "registry+https://github.com/rust-lang/crates.io-index" 2559 | checksum = "76f64bba2c53b04fcab63c01a7d7427eadc821e3bc48c34dc9ba29c501164b52" 2560 | dependencies = [ 2561 | "byteorder", 2562 | "crunchy", 2563 | "hex", 2564 | "static_assertions", 2565 | ] 2566 | 2567 | [[package]] 2568 | name = "unarray" 2569 | version = "0.1.4" 2570 | source = "registry+https://github.com/rust-lang/crates.io-index" 2571 | checksum = "eaea85b334db583fe3274d12b4cd1880032beab409c0d774be044d4480ab9a94" 2572 | 2573 | [[package]] 2574 | name = "unicode-bidi" 2575 | version = "0.3.15" 2576 | source = "registry+https://github.com/rust-lang/crates.io-index" 2577 | checksum = "08f95100a766bf4f8f28f90d77e0a5461bbdb219042e7679bebe79004fed8d75" 2578 | 2579 | [[package]] 2580 | name = "unicode-ident" 2581 | version = "1.0.12" 2582 | source = "registry+https://github.com/rust-lang/crates.io-index" 2583 | checksum = "3354b9ac3fae1ff6755cb6db53683adb661634f67557942dea4facebec0fee4b" 2584 | 2585 | [[package]] 2586 | name = "unicode-normalization" 2587 | version = "0.1.23" 2588 | source = "registry+https://github.com/rust-lang/crates.io-index" 2589 | checksum = "a56d1686db2308d901306f92a263857ef59ea39678a5458e7cb17f01415101f5" 2590 | dependencies = [ 2591 | "tinyvec", 2592 | ] 2593 | 2594 | [[package]] 2595 | name = "unindent" 2596 | version = "0.2.3" 2597 | source = "registry+https://github.com/rust-lang/crates.io-index" 2598 | checksum = "c7de7d73e1754487cb58364ee906a499937a0dfabd86bcb980fa99ec8c8fa2ce" 2599 | 2600 | [[package]] 2601 | name = "untrusted" 2602 | version = "0.9.0" 2603 | source = "registry+https://github.com/rust-lang/crates.io-index" 2604 | checksum = "8ecb6da28b8a351d773b68d5825ac39017e680750f980f3a1a85cd8dd28a47c1" 2605 | 2606 | [[package]] 2607 | name = "url" 2608 | version = "2.5.0" 2609 | source = "registry+https://github.com/rust-lang/crates.io-index" 2610 | checksum = "31e6302e3bb753d46e83516cae55ae196fc0c309407cf11ab35cc51a4c2a4633" 2611 | dependencies = [ 2612 | "form_urlencoded", 2613 | "idna", 2614 | "percent-encoding", 2615 | "serde", 2616 | ] 2617 | 2618 | [[package]] 2619 | name = "utf8parse" 2620 | version = "0.2.1" 2621 | source = "registry+https://github.com/rust-lang/crates.io-index" 2622 | checksum = "711b9620af191e0cdc7468a8d14e709c3dcdb115b36f838e601583af800a370a" 2623 | 2624 | [[package]] 2625 | name = "valuable" 2626 | version = "0.1.0" 2627 | source = "registry+https://github.com/rust-lang/crates.io-index" 2628 | checksum = "830b7e5d4d90034032940e4ace0d9a9a057e7a45cd94e6c007832e39edb82f6d" 2629 | 2630 | [[package]] 2631 | name = "version_check" 2632 | version = "0.9.4" 2633 | source = "registry+https://github.com/rust-lang/crates.io-index" 2634 | checksum = "49874b5167b65d7193b8aba1567f5c7d93d001cafc34600cee003eda787e483f" 2635 | 2636 | [[package]] 2637 | name = "wait-timeout" 2638 | version = "0.2.0" 2639 | source = "registry+https://github.com/rust-lang/crates.io-index" 2640 | checksum = "9f200f5b12eb75f8c1ed65abd4b2db8a6e1b138a20de009dacee265a2498f3f6" 2641 | dependencies = [ 2642 | "libc", 2643 | ] 2644 | 2645 | [[package]] 2646 | name = "want" 2647 | version = "0.3.1" 2648 | source = "registry+https://github.com/rust-lang/crates.io-index" 2649 | checksum = "bfa7760aed19e106de2c7c0b581b509f2f25d3dacaf737cb82ac61bc6d760b0e" 2650 | dependencies = [ 2651 | "try-lock", 2652 | ] 2653 | 2654 | [[package]] 2655 | name = "wasi" 2656 | version = "0.11.0+wasi-snapshot-preview1" 2657 | source = "registry+https://github.com/rust-lang/crates.io-index" 2658 | checksum = "9c8d87e72b64a3b4db28d11ce29237c246188f4f51057d65a7eab63b7987e423" 2659 | 2660 | [[package]] 2661 | name = "wasm-bindgen" 2662 | version = "0.2.92" 2663 | source = "registry+https://github.com/rust-lang/crates.io-index" 2664 | checksum = "4be2531df63900aeb2bca0daaaddec08491ee64ceecbee5076636a3b026795a8" 2665 | dependencies = [ 2666 | "cfg-if", 2667 | "wasm-bindgen-macro", 2668 | ] 2669 | 2670 | [[package]] 2671 | name = "wasm-bindgen-backend" 2672 | version = "0.2.92" 2673 | source = "registry+https://github.com/rust-lang/crates.io-index" 2674 | checksum = "614d787b966d3989fa7bb98a654e369c762374fd3213d212cfc0251257e747da" 2675 | dependencies = [ 2676 | "bumpalo", 2677 | "log", 2678 | "once_cell", 2679 | "proc-macro2", 2680 | "quote", 2681 | "syn 2.0.60", 2682 | "wasm-bindgen-shared", 2683 | ] 2684 | 2685 | [[package]] 2686 | name = "wasm-bindgen-futures" 2687 | version = "0.4.42" 2688 | source = "registry+https://github.com/rust-lang/crates.io-index" 2689 | checksum = "76bc14366121efc8dbb487ab05bcc9d346b3b5ec0eaa76e46594cabbe51762c0" 2690 | dependencies = [ 2691 | "cfg-if", 2692 | "js-sys", 2693 | "wasm-bindgen", 2694 | "web-sys", 2695 | ] 2696 | 2697 | [[package]] 2698 | name = "wasm-bindgen-macro" 2699 | version = "0.2.92" 2700 | source = "registry+https://github.com/rust-lang/crates.io-index" 2701 | checksum = "a1f8823de937b71b9460c0c34e25f3da88250760bec0ebac694b49997550d726" 2702 | dependencies = [ 2703 | "quote", 2704 | "wasm-bindgen-macro-support", 2705 | ] 2706 | 2707 | [[package]] 2708 | name = "wasm-bindgen-macro-support" 2709 | version = "0.2.92" 2710 | source = "registry+https://github.com/rust-lang/crates.io-index" 2711 | checksum = "e94f17b526d0a461a191c78ea52bbce64071ed5c04c9ffe424dcb38f74171bb7" 2712 | dependencies = [ 2713 | "proc-macro2", 2714 | "quote", 2715 | "syn 2.0.60", 2716 | "wasm-bindgen-backend", 2717 | "wasm-bindgen-shared", 2718 | ] 2719 | 2720 | [[package]] 2721 | name = "wasm-bindgen-shared" 2722 | version = "0.2.92" 2723 | source = "registry+https://github.com/rust-lang/crates.io-index" 2724 | checksum = "af190c94f2773fdb3729c55b007a722abb5384da03bc0986df4c289bf5567e96" 2725 | 2726 | [[package]] 2727 | name = "web-sys" 2728 | version = "0.3.69" 2729 | source = "registry+https://github.com/rust-lang/crates.io-index" 2730 | checksum = "77afa9a11836342370f4817622a2f0f418b134426d91a82dfb48f532d2ec13ef" 2731 | dependencies = [ 2732 | "js-sys", 2733 | "wasm-bindgen", 2734 | ] 2735 | 2736 | [[package]] 2737 | name = "webpki-roots" 2738 | version = "0.25.4" 2739 | source = "registry+https://github.com/rust-lang/crates.io-index" 2740 | checksum = "5f20c57d8d7db6d3b86154206ae5d8fba62dd39573114de97c2cb0578251f8e1" 2741 | 2742 | [[package]] 2743 | name = "windows-sys" 2744 | version = "0.48.0" 2745 | source = "registry+https://github.com/rust-lang/crates.io-index" 2746 | checksum = "677d2418bec65e3338edb076e806bc1ec15693c5d0104683f2efe857f61056a9" 2747 | dependencies = [ 2748 | "windows-targets 0.48.5", 2749 | ] 2750 | 2751 | [[package]] 2752 | name = "windows-sys" 2753 | version = "0.52.0" 2754 | source = "registry+https://github.com/rust-lang/crates.io-index" 2755 | checksum = "282be5f36a8ce781fad8c8ae18fa3f9beff57ec1b52cb3de0789201425d9a33d" 2756 | dependencies = [ 2757 | "windows-targets 0.52.5", 2758 | ] 2759 | 2760 | [[package]] 2761 | name = "windows-targets" 2762 | version = "0.48.5" 2763 | source = "registry+https://github.com/rust-lang/crates.io-index" 2764 | checksum = "9a2fa6e2155d7247be68c096456083145c183cbbbc2764150dda45a87197940c" 2765 | dependencies = [ 2766 | "windows_aarch64_gnullvm 0.48.5", 2767 | "windows_aarch64_msvc 0.48.5", 2768 | "windows_i686_gnu 0.48.5", 2769 | "windows_i686_msvc 0.48.5", 2770 | "windows_x86_64_gnu 0.48.5", 2771 | "windows_x86_64_gnullvm 0.48.5", 2772 | "windows_x86_64_msvc 0.48.5", 2773 | ] 2774 | 2775 | [[package]] 2776 | name = "windows-targets" 2777 | version = "0.52.5" 2778 | source = "registry+https://github.com/rust-lang/crates.io-index" 2779 | checksum = "6f0713a46559409d202e70e28227288446bf7841d3211583a4b53e3f6d96e7eb" 2780 | dependencies = [ 2781 | "windows_aarch64_gnullvm 0.52.5", 2782 | "windows_aarch64_msvc 0.52.5", 2783 | "windows_i686_gnu 0.52.5", 2784 | "windows_i686_gnullvm", 2785 | "windows_i686_msvc 0.52.5", 2786 | "windows_x86_64_gnu 0.52.5", 2787 | "windows_x86_64_gnullvm 0.52.5", 2788 | "windows_x86_64_msvc 0.52.5", 2789 | ] 2790 | 2791 | [[package]] 2792 | name = "windows_aarch64_gnullvm" 2793 | version = "0.48.5" 2794 | source = "registry+https://github.com/rust-lang/crates.io-index" 2795 | checksum = "2b38e32f0abccf9987a4e3079dfb67dcd799fb61361e53e2882c3cbaf0d905d8" 2796 | 2797 | [[package]] 2798 | name = "windows_aarch64_gnullvm" 2799 | version = "0.52.5" 2800 | source = "registry+https://github.com/rust-lang/crates.io-index" 2801 | checksum = "7088eed71e8b8dda258ecc8bac5fb1153c5cffaf2578fc8ff5d61e23578d3263" 2802 | 2803 | [[package]] 2804 | name = "windows_aarch64_msvc" 2805 | version = "0.48.5" 2806 | source = "registry+https://github.com/rust-lang/crates.io-index" 2807 | checksum = "dc35310971f3b2dbbf3f0690a219f40e2d9afcf64f9ab7cc1be722937c26b4bc" 2808 | 2809 | [[package]] 2810 | name = "windows_aarch64_msvc" 2811 | version = "0.52.5" 2812 | source = "registry+https://github.com/rust-lang/crates.io-index" 2813 | checksum = "9985fd1504e250c615ca5f281c3f7a6da76213ebd5ccc9561496568a2752afb6" 2814 | 2815 | [[package]] 2816 | name = "windows_i686_gnu" 2817 | version = "0.48.5" 2818 | source = "registry+https://github.com/rust-lang/crates.io-index" 2819 | checksum = "a75915e7def60c94dcef72200b9a8e58e5091744960da64ec734a6c6e9b3743e" 2820 | 2821 | [[package]] 2822 | name = "windows_i686_gnu" 2823 | version = "0.52.5" 2824 | source = "registry+https://github.com/rust-lang/crates.io-index" 2825 | checksum = "88ba073cf16d5372720ec942a8ccbf61626074c6d4dd2e745299726ce8b89670" 2826 | 2827 | [[package]] 2828 | name = "windows_i686_gnullvm" 2829 | version = "0.52.5" 2830 | source = "registry+https://github.com/rust-lang/crates.io-index" 2831 | checksum = "87f4261229030a858f36b459e748ae97545d6f1ec60e5e0d6a3d32e0dc232ee9" 2832 | 2833 | [[package]] 2834 | name = "windows_i686_msvc" 2835 | version = "0.48.5" 2836 | source = "registry+https://github.com/rust-lang/crates.io-index" 2837 | checksum = "8f55c233f70c4b27f66c523580f78f1004e8b5a8b659e05a4eb49d4166cca406" 2838 | 2839 | [[package]] 2840 | name = "windows_i686_msvc" 2841 | version = "0.52.5" 2842 | source = "registry+https://github.com/rust-lang/crates.io-index" 2843 | checksum = "db3c2bf3d13d5b658be73463284eaf12830ac9a26a90c717b7f771dfe97487bf" 2844 | 2845 | [[package]] 2846 | name = "windows_x86_64_gnu" 2847 | version = "0.48.5" 2848 | source = "registry+https://github.com/rust-lang/crates.io-index" 2849 | checksum = "53d40abd2583d23e4718fddf1ebec84dbff8381c07cae67ff7768bbf19c6718e" 2850 | 2851 | [[package]] 2852 | name = "windows_x86_64_gnu" 2853 | version = "0.52.5" 2854 | source = "registry+https://github.com/rust-lang/crates.io-index" 2855 | checksum = "4e4246f76bdeff09eb48875a0fd3e2af6aada79d409d33011886d3e1581517d9" 2856 | 2857 | [[package]] 2858 | name = "windows_x86_64_gnullvm" 2859 | version = "0.48.5" 2860 | source = "registry+https://github.com/rust-lang/crates.io-index" 2861 | checksum = "0b7b52767868a23d5bab768e390dc5f5c55825b6d30b86c844ff2dc7414044cc" 2862 | 2863 | [[package]] 2864 | name = "windows_x86_64_gnullvm" 2865 | version = "0.52.5" 2866 | source = "registry+https://github.com/rust-lang/crates.io-index" 2867 | checksum = "852298e482cd67c356ddd9570386e2862b5673c85bd5f88df9ab6802b334c596" 2868 | 2869 | [[package]] 2870 | name = "windows_x86_64_msvc" 2871 | version = "0.48.5" 2872 | source = "registry+https://github.com/rust-lang/crates.io-index" 2873 | checksum = "ed94fce61571a4006852b7389a063ab983c02eb1bb37b47f8272ce92d06d9538" 2874 | 2875 | [[package]] 2876 | name = "windows_x86_64_msvc" 2877 | version = "0.52.5" 2878 | source = "registry+https://github.com/rust-lang/crates.io-index" 2879 | checksum = "bec47e5bfd1bff0eeaf6d8b485cc1074891a197ab4225d504cb7a1ab88b02bf0" 2880 | 2881 | [[package]] 2882 | name = "winnow" 2883 | version = "0.5.40" 2884 | source = "registry+https://github.com/rust-lang/crates.io-index" 2885 | checksum = "f593a95398737aeed53e489c785df13f3618e41dbcd6718c6addbf1395aa6876" 2886 | dependencies = [ 2887 | "memchr", 2888 | ] 2889 | 2890 | [[package]] 2891 | name = "winreg" 2892 | version = "0.50.0" 2893 | source = "registry+https://github.com/rust-lang/crates.io-index" 2894 | checksum = "524e57b2c537c0f9b1e69f1965311ec12182b4122e45035b1508cd24d2adadb1" 2895 | dependencies = [ 2896 | "cfg-if", 2897 | "windows-sys 0.48.0", 2898 | ] 2899 | 2900 | [[package]] 2901 | name = "wyz" 2902 | version = "0.5.1" 2903 | source = "registry+https://github.com/rust-lang/crates.io-index" 2904 | checksum = "05f360fc0b24296329c78fda852a1e9ae82de9cf7b27dae4b7f62f118f77b9ed" 2905 | dependencies = [ 2906 | "tap", 2907 | ] 2908 | 2909 | [[package]] 2910 | name = "xxhash-rust" 2911 | version = "0.8.10" 2912 | source = "registry+https://github.com/rust-lang/crates.io-index" 2913 | checksum = "927da81e25be1e1a2901d59b81b37dd2efd1fc9c9345a55007f09bf5a2d3ee03" 2914 | 2915 | [[package]] 2916 | name = "zerocopy" 2917 | version = "0.7.32" 2918 | source = "registry+https://github.com/rust-lang/crates.io-index" 2919 | checksum = "74d4d3961e53fa4c9a25a8637fc2bfaf2595b3d3ae34875568a5cf64787716be" 2920 | dependencies = [ 2921 | "zerocopy-derive", 2922 | ] 2923 | 2924 | [[package]] 2925 | name = "zerocopy-derive" 2926 | version = "0.7.32" 2927 | source = "registry+https://github.com/rust-lang/crates.io-index" 2928 | checksum = "9ce1b18ccd8e73a9321186f97e46f9f04b778851177567b1975109d26a08d2a6" 2929 | dependencies = [ 2930 | "proc-macro2", 2931 | "quote", 2932 | "syn 2.0.60", 2933 | ] 2934 | 2935 | [[package]] 2936 | name = "zeroize" 2937 | version = "1.7.0" 2938 | source = "registry+https://github.com/rust-lang/crates.io-index" 2939 | checksum = "525b4ec142c6b68a2d10f01f7bbf6755599ca3f81ea53b8431b7dd348f5fdb2d" 2940 | dependencies = [ 2941 | "zeroize_derive", 2942 | ] 2943 | 2944 | [[package]] 2945 | name = "zeroize_derive" 2946 | version = "1.4.2" 2947 | source = "registry+https://github.com/rust-lang/crates.io-index" 2948 | checksum = "ce36e65b0d2999d2aafac989fb249189a141aee1f53c612c1f37d72631959f69" 2949 | dependencies = [ 2950 | "proc-macro2", 2951 | "quote", 2952 | "syn 2.0.60", 2953 | ] 2954 | 2955 | [[package]] 2956 | name = "zstd" 2957 | version = "0.12.4" 2958 | source = "registry+https://github.com/rust-lang/crates.io-index" 2959 | checksum = "1a27595e173641171fc74a1232b7b1c7a7cb6e18222c11e9dfb9888fa424c53c" 2960 | dependencies = [ 2961 | "zstd-safe", 2962 | ] 2963 | 2964 | [[package]] 2965 | name = "zstd-safe" 2966 | version = "6.0.6" 2967 | source = "registry+https://github.com/rust-lang/crates.io-index" 2968 | checksum = "ee98ffd0b48ee95e6c5168188e44a54550b1564d9d530ee21d5f0eaed1069581" 2969 | dependencies = [ 2970 | "libc", 2971 | "zstd-sys", 2972 | ] 2973 | 2974 | [[package]] 2975 | name = "zstd-sys" 2976 | version = "2.0.10+zstd.1.5.6" 2977 | source = "registry+https://github.com/rust-lang/crates.io-index" 2978 | checksum = "c253a4914af5bafc8fa8c86ee400827e83cf6ec01195ec1f1ed8441bf00d65aa" 2979 | dependencies = [ 2980 | "cc", 2981 | "pkg-config", 2982 | ] 2983 | -------------------------------------------------------------------------------- /Cargo.toml: -------------------------------------------------------------------------------- 1 | [package] 2 | name = "hyperfuel" 3 | version = "1.1.2" 4 | edition = "2021" 5 | 6 | # See more keys and their definitions at https://doc.rust-lang.org/cargo/reference/manifest.html 7 | [lib] 8 | name = "hyperfuel" 9 | crate-type = ["cdylib"] 10 | 11 | [dependencies] 12 | pyo3 = { version = "0.20", features = ["extension-module", "serde"] } 13 | pyo3-asyncio = { version = "0.20", features = ["tokio-runtime"] } 14 | tokio = "1.9" 15 | 16 | dict_derive = "0.5.0" 17 | 18 | serde_json = "1" 19 | serde = { version = "1", features = ["derive"] } 20 | 21 | hyperfuel-client = "2.1.1" 22 | hyperfuel-net-types = "3.0.0" 23 | hyperfuel-format = "3.0.0" 24 | 25 | anyhow = "1" 26 | prefix-hex = "0.7.1" 27 | env_logger = "0.11" 28 | itertools = "0.12.1" 29 | faster-hex = "0.9.0" 30 | arrow2 = "0.18.0" 31 | 32 | [profile.no_lto] 33 | inherits = "release" 34 | lto = "off" 35 | -------------------------------------------------------------------------------- /LICENSE: -------------------------------------------------------------------------------- 1 | Mozilla Public License Version 2.0 2 | ================================== 3 | 4 | 1. Definitions 5 | -------------- 6 | 7 | 1.1. "Contributor" 8 | means each individual or legal entity that creates, contributes to 9 | the creation of, or owns Covered Software. 10 | 11 | 1.2. "Contributor Version" 12 | means the combination of the Contributions of others (if any) used 13 | by a Contributor and that particular Contributor's Contribution. 14 | 15 | 1.3. "Contribution" 16 | means Covered Software of a particular Contributor. 17 | 18 | 1.4. "Covered Software" 19 | means Source Code Form to which the initial Contributor has attached 20 | the notice in Exhibit A, the Executable Form of such Source Code 21 | Form, and Modifications of such Source Code Form, in each case 22 | including portions thereof. 23 | 24 | 1.5. "Incompatible With Secondary Licenses" 25 | means 26 | 27 | (a) that the initial Contributor has attached the notice described 28 | in Exhibit B to the Covered Software; or 29 | 30 | (b) that the Covered Software was made available under the terms of 31 | version 1.1 or earlier of the License, but not also under the 32 | terms of a Secondary License. 33 | 34 | 1.6. "Executable Form" 35 | means any form of the work other than Source Code Form. 36 | 37 | 1.7. "Larger Work" 38 | means a work that combines Covered Software with other material, in 39 | a separate file or files, that is not Covered Software. 40 | 41 | 1.8. "License" 42 | means this document. 43 | 44 | 1.9. "Licensable" 45 | means having the right to grant, to the maximum extent possible, 46 | whether at the time of the initial grant or subsequently, any and 47 | all of the rights conveyed by this License. 48 | 49 | 1.10. "Modifications" 50 | means any of the following: 51 | 52 | (a) any file in Source Code Form that results from an addition to, 53 | deletion from, or modification of the contents of Covered 54 | Software; or 55 | 56 | (b) any new file in Source Code Form that contains any Covered 57 | Software. 58 | 59 | 1.11. "Patent Claims" of a Contributor 60 | means any patent claim(s), including without limitation, method, 61 | process, and apparatus claims, in any patent Licensable by such 62 | Contributor that would be infringed, but for the grant of the 63 | License, by the making, using, selling, offering for sale, having 64 | made, import, or transfer of either its Contributions or its 65 | Contributor Version. 66 | 67 | 1.12. "Secondary License" 68 | means either the GNU General Public License, Version 2.0, the GNU 69 | Lesser General Public License, Version 2.1, the GNU Affero General 70 | Public License, Version 3.0, or any later versions of those 71 | licenses. 72 | 73 | 1.13. "Source Code Form" 74 | means the form of the work preferred for making modifications. 75 | 76 | 1.14. "You" (or "Your") 77 | means an individual or a legal entity exercising rights under this 78 | License. For legal entities, "You" includes any entity that 79 | controls, is controlled by, or is under common control with You. For 80 | purposes of this definition, "control" means (a) the power, direct 81 | or indirect, to cause the direction or management of such entity, 82 | whether by contract or otherwise, or (b) ownership of more than 83 | fifty percent (50%) of the outstanding shares or beneficial 84 | ownership of such entity. 85 | 86 | 2. License Grants and Conditions 87 | -------------------------------- 88 | 89 | 2.1. Grants 90 | 91 | Each Contributor hereby grants You a world-wide, royalty-free, 92 | non-exclusive license: 93 | 94 | (a) under intellectual property rights (other than patent or trademark) 95 | Licensable by such Contributor to use, reproduce, make available, 96 | modify, display, perform, distribute, and otherwise exploit its 97 | Contributions, either on an unmodified basis, with Modifications, or 98 | as part of a Larger Work; and 99 | 100 | (b) under Patent Claims of such Contributor to make, use, sell, offer 101 | for sale, have made, import, and otherwise transfer either its 102 | Contributions or its Contributor Version. 103 | 104 | 2.2. Effective Date 105 | 106 | The licenses granted in Section 2.1 with respect to any Contribution 107 | become effective for each Contribution on the date the Contributor first 108 | distributes such Contribution. 109 | 110 | 2.3. Limitations on Grant Scope 111 | 112 | The licenses granted in this Section 2 are the only rights granted under 113 | this License. No additional rights or licenses will be implied from the 114 | distribution or licensing of Covered Software under this License. 115 | Notwithstanding Section 2.1(b) above, no patent license is granted by a 116 | Contributor: 117 | 118 | (a) for any code that a Contributor has removed from Covered Software; 119 | or 120 | 121 | (b) for infringements caused by: (i) Your and any other third party's 122 | modifications of Covered Software, or (ii) the combination of its 123 | Contributions with other software (except as part of its Contributor 124 | Version); or 125 | 126 | (c) under Patent Claims infringed by Covered Software in the absence of 127 | its Contributions. 128 | 129 | This License does not grant any rights in the trademarks, service marks, 130 | or logos of any Contributor (except as may be necessary to comply with 131 | the notice requirements in Section 3.4). 132 | 133 | 2.4. Subsequent Licenses 134 | 135 | No Contributor makes additional grants as a result of Your choice to 136 | distribute the Covered Software under a subsequent version of this 137 | License (see Section 10.2) or under the terms of a Secondary License (if 138 | permitted under the terms of Section 3.3). 139 | 140 | 2.5. Representation 141 | 142 | Each Contributor represents that the Contributor believes its 143 | Contributions are its original creation(s) or it has sufficient rights 144 | to grant the rights to its Contributions conveyed by this License. 145 | 146 | 2.6. Fair Use 147 | 148 | This License is not intended to limit any rights You have under 149 | applicable copyright doctrines of fair use, fair dealing, or other 150 | equivalents. 151 | 152 | 2.7. Conditions 153 | 154 | Sections 3.1, 3.2, 3.3, and 3.4 are conditions of the licenses granted 155 | in Section 2.1. 156 | 157 | 3. Responsibilities 158 | ------------------- 159 | 160 | 3.1. Distribution of Source Form 161 | 162 | All distribution of Covered Software in Source Code Form, including any 163 | Modifications that You create or to which You contribute, must be under 164 | the terms of this License. You must inform recipients that the Source 165 | Code Form of the Covered Software is governed by the terms of this 166 | License, and how they can obtain a copy of this License. You may not 167 | attempt to alter or restrict the recipients' rights in the Source Code 168 | Form. 169 | 170 | 3.2. Distribution of Executable Form 171 | 172 | If You distribute Covered Software in Executable Form then: 173 | 174 | (a) such Covered Software must also be made available in Source Code 175 | Form, as described in Section 3.1, and You must inform recipients of 176 | the Executable Form how they can obtain a copy of such Source Code 177 | Form by reasonable means in a timely manner, at a charge no more 178 | than the cost of distribution to the recipient; and 179 | 180 | (b) You may distribute such Executable Form under the terms of this 181 | License, or sublicense it under different terms, provided that the 182 | license for the Executable Form does not attempt to limit or alter 183 | the recipients' rights in the Source Code Form under this License. 184 | 185 | 3.3. Distribution of a Larger Work 186 | 187 | You may create and distribute a Larger Work under terms of Your choice, 188 | provided that You also comply with the requirements of this License for 189 | the Covered Software. If the Larger Work is a combination of Covered 190 | Software with a work governed by one or more Secondary Licenses, and the 191 | Covered Software is not Incompatible With Secondary Licenses, this 192 | License permits You to additionally distribute such Covered Software 193 | under the terms of such Secondary License(s), so that the recipient of 194 | the Larger Work may, at their option, further distribute the Covered 195 | Software under the terms of either this License or such Secondary 196 | License(s). 197 | 198 | 3.4. Notices 199 | 200 | You may not remove or alter the substance of any license notices 201 | (including copyright notices, patent notices, disclaimers of warranty, 202 | or limitations of liability) contained within the Source Code Form of 203 | the Covered Software, except that You may alter any license notices to 204 | the extent required to remedy known factual inaccuracies. 205 | 206 | 3.5. Application of Additional Terms 207 | 208 | You may choose to offer, and to charge a fee for, warranty, support, 209 | indemnity or liability obligations to one or more recipients of Covered 210 | Software. However, You may do so only on Your own behalf, and not on 211 | behalf of any Contributor. You must make it absolutely clear that any 212 | such warranty, support, indemnity, or liability obligation is offered by 213 | You alone, and You hereby agree to indemnify every Contributor for any 214 | liability incurred by such Contributor as a result of warranty, support, 215 | indemnity or liability terms You offer. You may include additional 216 | disclaimers of warranty and limitations of liability specific to any 217 | jurisdiction. 218 | 219 | 4. Inability to Comply Due to Statute or Regulation 220 | --------------------------------------------------- 221 | 222 | If it is impossible for You to comply with any of the terms of this 223 | License with respect to some or all of the Covered Software due to 224 | statute, judicial order, or regulation then You must: (a) comply with 225 | the terms of this License to the maximum extent possible; and (b) 226 | describe the limitations and the code they affect. Such description must 227 | be placed in a text file included with all distributions of the Covered 228 | Software under this License. Except to the extent prohibited by statute 229 | or regulation, such description must be sufficiently detailed for a 230 | recipient of ordinary skill to be able to understand it. 231 | 232 | 5. Termination 233 | -------------- 234 | 235 | 5.1. The rights granted under this License will terminate automatically 236 | if You fail to comply with any of its terms. However, if You become 237 | compliant, then the rights granted under this License from a particular 238 | Contributor are reinstated (a) provisionally, unless and until such 239 | Contributor explicitly and finally terminates Your grants, and (b) on an 240 | ongoing basis, if such Contributor fails to notify You of the 241 | non-compliance by some reasonable means prior to 60 days after You have 242 | come back into compliance. Moreover, Your grants from a particular 243 | Contributor are reinstated on an ongoing basis if such Contributor 244 | notifies You of the non-compliance by some reasonable means, this is the 245 | first time You have received notice of non-compliance with this License 246 | from such Contributor, and You become compliant prior to 30 days after 247 | Your receipt of the notice. 248 | 249 | 5.2. If You initiate litigation against any entity by asserting a patent 250 | infringement claim (excluding declaratory judgment actions, 251 | counter-claims, and cross-claims) alleging that a Contributor Version 252 | directly or indirectly infringes any patent, then the rights granted to 253 | You by any and all Contributors for the Covered Software under Section 254 | 2.1 of this License shall terminate. 255 | 256 | 5.3. In the event of termination under Sections 5.1 or 5.2 above, all 257 | end user license agreements (excluding distributors and resellers) which 258 | have been validly granted by You or Your distributors under this License 259 | prior to termination shall survive termination. 260 | 261 | ************************************************************************ 262 | * * 263 | * 6. Disclaimer of Warranty * 264 | * ------------------------- * 265 | * * 266 | * Covered Software is provided under this License on an "as is" * 267 | * basis, without warranty of any kind, either expressed, implied, or * 268 | * statutory, including, without limitation, warranties that the * 269 | * Covered Software is free of defects, merchantable, fit for a * 270 | * particular purpose or non-infringing. The entire risk as to the * 271 | * quality and performance of the Covered Software is with You. * 272 | * Should any Covered Software prove defective in any respect, You * 273 | * (not any Contributor) assume the cost of any necessary servicing, * 274 | * repair, or correction. This disclaimer of warranty constitutes an * 275 | * essential part of this License. No use of any Covered Software is * 276 | * authorized under this License except under this disclaimer. * 277 | * * 278 | ************************************************************************ 279 | 280 | ************************************************************************ 281 | * * 282 | * 7. Limitation of Liability * 283 | * -------------------------- * 284 | * * 285 | * Under no circumstances and under no legal theory, whether tort * 286 | * (including negligence), contract, or otherwise, shall any * 287 | * Contributor, or anyone who distributes Covered Software as * 288 | * permitted above, be liable to You for any direct, indirect, * 289 | * special, incidental, or consequential damages of any character * 290 | * including, without limitation, damages for lost profits, loss of * 291 | * goodwill, work stoppage, computer failure or malfunction, or any * 292 | * and all other commercial damages or losses, even if such party * 293 | * shall have been informed of the possibility of such damages. This * 294 | * limitation of liability shall not apply to liability for death or * 295 | * personal injury resulting from such party's negligence to the * 296 | * extent applicable law prohibits such limitation. Some * 297 | * jurisdictions do not allow the exclusion or limitation of * 298 | * incidental or consequential damages, so this exclusion and * 299 | * limitation may not apply to You. * 300 | * * 301 | ************************************************************************ 302 | 303 | 8. Litigation 304 | ------------- 305 | 306 | Any litigation relating to this License may be brought only in the 307 | courts of a jurisdiction where the defendant maintains its principal 308 | place of business and such litigation shall be governed by laws of that 309 | jurisdiction, without reference to its conflict-of-law provisions. 310 | Nothing in this Section shall prevent a party's ability to bring 311 | cross-claims or counter-claims. 312 | 313 | 9. Miscellaneous 314 | ---------------- 315 | 316 | This License represents the complete agreement concerning the subject 317 | matter hereof. If any provision of this License is held to be 318 | unenforceable, such provision shall be reformed only to the extent 319 | necessary to make it enforceable. Any law or regulation which provides 320 | that the language of a contract shall be construed against the drafter 321 | shall not be used to construe this License against a Contributor. 322 | 323 | 10. Versions of the License 324 | --------------------------- 325 | 326 | 10.1. New Versions 327 | 328 | Mozilla Foundation is the license steward. Except as provided in Section 329 | 10.3, no one other than the license steward has the right to modify or 330 | publish new versions of this License. Each version will be given a 331 | distinguishing version number. 332 | 333 | 10.2. Effect of New Versions 334 | 335 | You may distribute the Covered Software under the terms of the version 336 | of the License under which You originally received the Covered Software, 337 | or under the terms of any subsequent version published by the license 338 | steward. 339 | 340 | 10.3. Modified Versions 341 | 342 | If you create software not governed by this License, and you want to 343 | create a new license for such software, you may create and use a 344 | modified version of this License if you rename the license and remove 345 | any references to the name of the license steward (except to note that 346 | such modified license differs from this License). 347 | 348 | 10.4. Distributing Source Code Form that is Incompatible With Secondary 349 | Licenses 350 | 351 | If You choose to distribute Source Code Form that is Incompatible With 352 | Secondary Licenses under the terms of this version of the License, the 353 | notice described in Exhibit B of this License must be attached. 354 | 355 | Exhibit A - Source Code Form License Notice 356 | ------------------------------------------- 357 | 358 | This Source Code Form is subject to the terms of the Mozilla Public 359 | License, v. 2.0. If a copy of the MPL was not distributed with this 360 | file, You can obtain one at http://mozilla.org/MPL/2.0/. 361 | 362 | If it is not possible or desirable to put the notice in a particular 363 | file, then You may include the notice in a location (such as a LICENSE 364 | file in a relevant directory) where a recipient would be likely to look 365 | for such a notice. 366 | 367 | You may add additional accurate notices of copyright ownership. 368 | 369 | Exhibit B - "Incompatible With Secondary Licenses" Notice 370 | --------------------------------------------------------- 371 | 372 | This Source Code Form is "Incompatible With Secondary Licenses", as 373 | defined by the Mozilla Public License, v. 2.0. 374 | -------------------------------------------------------------------------------- /README.md: -------------------------------------------------------------------------------- 1 | # hyperfuel-client-python 2 | Python package for [Envio's](https://envio.dev/) Hyperfuel client written in Rust. 3 | 4 | More information about Envio's support of Fuel at [docs.envio.dev/docs/hyperfuel](https://docs.envio.dev/docs/hyperfuel). 5 | 6 | ## quickstart example 7 | ```bash 8 | $ pip install hyperfuel 9 | ``` 10 | 11 | ```python 12 | # This example will simply fetch the logs from a vector of contracts over a specified block range 13 | import hyperfuel 14 | import asyncio 15 | 16 | async def main(): 17 | client = hyperfuel.HyperfuelClient() 18 | 19 | contracts = ["0x4a2ce054e3e94155f7092f7365b212f7f45105b74819c623744ebcc5d065c6ac"] 20 | 21 | logs = await client.preset_query_get_logs(contracts, 0, to_block=None) 22 | 23 | print("number of logs: " + str(len(logs.data))) 24 | print("logs: " + str(logs.data)) 25 | 26 | asyncio.run(main()) 27 | 28 | ``` 29 | 30 | ### More examples in `examples/` 31 | -------------------------------------------------------------------------------- /examples/asset-id.py: -------------------------------------------------------------------------------- 1 | # We query from blocks 0 (inclusive) to 1299067 (exclusive) for all 2 | # `Inputs` where the address `0x2a0d0ed9d2217ec7f32dcd9a1902ce2a66d68437aeff84e3a3cc8bebee0d2eea` 3 | # matches on the `asset_id` field. 4 | 5 | import hyperfuel 6 | from hyperfuel import InputField 7 | import asyncio 8 | 9 | async def main(): 10 | client = hyperfuel.HyperfuelClient() 11 | 12 | query = hyperfuel.Query( 13 | # start query from block 0 14 | from_block=0, 15 | # if to_block is not set, query runs to the end of the chain 16 | to_block = 1300000, 17 | # load inputs that have `asset_id` = 0x2a0d0ed9d2217ec7f32dcd9a1902ce2a66d68437aeff84e3a3cc8bebee0d2eea 18 | inputs=[ 19 | hyperfuel.InputSelection( 20 | asset_id=["0x2a0d0ed9d2217ec7f32dcd9a1902ce2a66d68437aeff84e3a3cc8bebee0d2eea"] 21 | ) 22 | ], 23 | # what data we want returned from the inputs we loaded 24 | field_selection=hyperfuel.FieldSelection( 25 | input=[ 26 | InputField.TX_ID, 27 | InputField.BLOCK_HEIGHT, 28 | InputField.INPUT_TYPE, 29 | InputField.UTXO_ID, 30 | InputField.OWNER, 31 | InputField.AMOUNT, 32 | InputField.ASSET_ID, 33 | ] 34 | ) 35 | ) 36 | 37 | res = await client.get_selected_data(query) 38 | 39 | print("inputs: " + str(res.data.inputs)) 40 | 41 | asyncio.run(main()) 42 | -------------------------------------------------------------------------------- /examples/predicate-root.py: -------------------------------------------------------------------------------- 1 | # This example returns `input` field data from an input 2 | # where the `owner` field matches the predicate root 0x94a8e322ff02baeb1d625e83dadf5ec88870ac801da370d4b15bbd5f0af01169 3 | # `owner` is ["The owning address or predicate root."](https://docs.fuel.network/docs/graphql/reference/objects/#inputcoin) of an InputCoin Input type 4 | 5 | import hyperfuel 6 | from hyperfuel import InputField 7 | import asyncio 8 | 9 | async def main(): 10 | client = hyperfuel.HyperfuelClient() 11 | 12 | query = hyperfuel.Query( 13 | # start query from block 0 14 | from_block = 0, 15 | # if to_block is not set, query runs to the end of the chain 16 | to_block=1427625, 17 | # load inputs that have `owner` = 0x94a8e322ff02baeb1d625e83dadf5ec88870ac801da370d4b15bbd5f0af01169 18 | inputs=[ 19 | hyperfuel.InputSelection( 20 | owner=["0x94a8e322ff02baeb1d625e83dadf5ec88870ac801da370d4b15bbd5f0af01169"] 21 | ) 22 | ], 23 | # fields we want returned from loaded inputs 24 | field_selection=hyperfuel.FieldSelection( 25 | input=[ 26 | InputField.TX_ID, 27 | InputField.BLOCK_HEIGHT, 28 | InputField.INPUT_TYPE, 29 | InputField.UTXO_ID, 30 | InputField.OWNER, 31 | InputField.AMOUNT, 32 | InputField.ASSET_ID, 33 | InputField.PREDICATE_GAS_USED, 34 | InputField.PREDICATE, 35 | InputField.PREDICATE_DATA 36 | ] 37 | ) 38 | ) 39 | 40 | res = await client.get_selected_data(query) 41 | 42 | print("inputs: " + str(res.data.inputs)) 43 | 44 | asyncio.run(main()) 45 | -------------------------------------------------------------------------------- /examples/received-asset.py: -------------------------------------------------------------------------------- 1 | # Get all addresses that received a specific asset_id 2 | # This returns fields of all receipts that are type "TransferOut" and 3 | # have a specific asset_id 4 | 5 | import hyperfuel 6 | from hyperfuel import ReceiptField 7 | import asyncio 8 | 9 | async def main(): 10 | client = hyperfuel.HyperfuelClient() 11 | 12 | # asset_id we want to get all transfersOut receipts for 13 | asset_id="0x2a0d0ed9d2217ec7f32dcd9a1902ce2a66d68437aeff84e3a3cc8bebee0d2eea" 14 | 15 | query = hyperfuel.Query( 16 | # start query from block 0 17 | from_block=0, 18 | # if to_block is not set, query runs to the end of the chain 19 | to_block = 1299067, 20 | # which receipts to return data from 21 | receipts=[ 22 | hyperfuel.ReceiptSelection( 23 | # only return receipts that have `asset_id` field = this asset_id... 24 | asset_id=[asset_id], 25 | # ...AND that are type 8 (TransferOut) 26 | receipt_type=[8] 27 | ), 28 | ], 29 | # what data we want returned from the receipts we queried for 30 | field_selection=hyperfuel.FieldSelection( 31 | receipt=[ 32 | ReceiptField.TX_ID, 33 | ReceiptField.BLOCK_HEIGHT, 34 | ReceiptField.RECEIPT_INDEX, 35 | ReceiptField.TO, 36 | ] 37 | ) 38 | ) 39 | 40 | res = await client.get_selected_data(query) 41 | 42 | # fields that aren't selected will be None by default 43 | print("receipts: " + str(res.data.receipts)) 44 | 45 | asyncio.run(main()) 46 | -------------------------------------------------------------------------------- /examples/simple-logs.py: -------------------------------------------------------------------------------- 1 | # This example will simply fetch the logs from a vector of contracts over a specified block range. 2 | # returns all log data necessary for fuel's decoder. 3 | import hyperfuel 4 | import asyncio 5 | 6 | async def main(): 7 | client = hyperfuel.HyperfuelClient() 8 | 9 | # contract(s) we want logs from 10 | contracts = ["0x4a2ce054e3e94155f7092f7365b212f7f45105b74819c623744ebcc5d065c6ac"] 11 | 12 | # get logs from blocks 0 (inclusive) to 1627509 (exclusive) 13 | logs = await client.preset_query_get_logs(contracts, 0, 1627509) 14 | 15 | print("number of logs: " + str(len(logs.data))) 16 | print("logs: " + str(logs.data)) 17 | 18 | asyncio.run(main()) 19 | -------------------------------------------------------------------------------- /hyperfuel/__init__.py: -------------------------------------------------------------------------------- 1 | from .hyperfuel import HyperfuelClient as _HyperfuelClient 2 | from typing import Optional 3 | from dataclasses import dataclass, asdict 4 | from strenum import StrEnum 5 | 6 | 7 | class DataType(StrEnum): 8 | UINT64 = 'uint64' 9 | UINT32 = 'uint32' 10 | INT64 = 'int64' 11 | INT32 = 'int32' 12 | FLOAT32 = 'float32' 13 | FLOAT64 = 'float64' 14 | 15 | class BlockField(StrEnum): 16 | ID = 'id' 17 | DA_HEIGHT = 'da_height' 18 | TRANSACTIONS_COUNT = 'transactions_count' 19 | MESSAGE_RECEIPT_COUNT = 'message_receipt_count' 20 | TRANSACTIONS_ROOT = 'transactions_root' 21 | MESSAGE_OUTBOX_ROOT = 'message_outbox_root' 22 | HEIGHT = 'height' 23 | PREV_ROOT = 'prev_root' 24 | TIME = 'time' 25 | APPLICATION_HASH = 'application_hash' 26 | 27 | class TransactionField(StrEnum): 28 | BLOCK_HEIGHT = 'block_height' 29 | ID = 'id' 30 | INPUT_ASSET_IDS = 'input_asset_ids' 31 | INPUT_CONTRACTS = 'input_contracts' 32 | INPUT_CONTRACT_UTXO_ID = 'input_contract_utxo_id' 33 | INPUT_CONTRACT_BALANCE_ROOT = 'input_contract_balance_root' 34 | INPUT_CONTRACT_STATE_ROOT = 'input_contract_state_root' 35 | INPUT_CONTRACT_TX_POINTER_BLOCK_HEIGHT = 'input_contract_tx_pointer_block_height' 36 | INPUT_CONTRACT_TX_POINTER_TX_INDEX = 'input_contract_tx_pointer_tx_index' 37 | INPUT_CONTRACT = 'input_contract' 38 | GAS_PRICE = 'gas_price' 39 | GAS_LIMIT = 'gas_limit' 40 | MATURITY = 'maturity' 41 | MINT_AMOUNT = 'mint_amount' 42 | MINT_ASSET_ID = 'mint_asset_id' 43 | TX_POINTER_BLOCK_HEIGHT = 'tx_pointer_block_height' 44 | TX_POINTER_TX_INDEX = 'tx_pointer_tx_index' 45 | TX_TYPE = 'tx_type' 46 | OUTPUT_CONTRACT_INPUT_INDEX = 'output_contract_input_index' 47 | OUTPUT_CONTRACT_BALANCE_ROOT = 'output_contract_balance_root' 48 | OUTPUT_CONTRACT_STATE_ROOT = 'output_contract_state_root' 49 | WITNESSES = 'witnesses' 50 | RECEIPTS_ROOT = 'receipts_root' 51 | STATUS = 'status' 52 | TIME = 'time' 53 | REASON = 'reason' 54 | SCRIPT = 'script' 55 | SCRIPT_DATA = 'script_data' 56 | BYTECODE_WITNESS_INDEX = 'bytecode_witness_index' 57 | BYTECODE_LENGTH = 'bytecode_length' 58 | SALT = 'salt' 59 | POLICIES_TIP = 'policies_tip' 60 | POLICIES_WITNESS_LIMIT = 'policies_witness_limit' 61 | POLICIES_MATURITY = 'policies_maturity' 62 | POLICIES_MAX_FEE = 'policies_max_fee' 63 | SCRIPT_GAS_LIMIT = 'script_gas_limit' 64 | MINT_GAS_PRICE = 'mint_gas_price' 65 | BYTECODE_ROOT = 'bytecode_root' 66 | SUBSECTION_INDEX = 'subsection_index' 67 | SUBSECTIONS_NUMBER = 'subsections_number' 68 | PROOF_SET = 'proof_set' 69 | CONSENSUS_PARAMETERS_UPGRADE_PURPOSE_WITNESS_INDEX = 'consensus_parameters_upgrade_purpose_witness_index' 70 | CONSENSUS_PARAMETERS_UPGRADE_PURPOSE_CHECKSUM = 'consensus_parameters_upgrade_purpose_checksum' 71 | STATE_TRANSITION_UPGRADE_PURPOSE_ROOT = 'state_transition_upgrade_purpose_root' 72 | 73 | class ReceiptField(StrEnum): 74 | RECEIPT_INDEX = 'receipt_index' 75 | ROOT_CONTRACT_ID = 'root_contract_id' 76 | TX_ID = 'tx_id' 77 | TX_STATUS = 'tx_status' 78 | TX_TYPE = 'tx_type' 79 | BLOCK_HEIGHT = 'block_height' 80 | PC = 'pc' 81 | IS = 'is' 82 | TO = 'to' 83 | TO_ADDRESS = 'to_address' 84 | AMOUNT = 'amount' 85 | ASSET_ID = 'asset_id' 86 | GAS = 'gas' 87 | PARAM1 = 'param1' 88 | PARAM2 = 'param2' 89 | VAL = 'val' 90 | PTR = 'ptr' 91 | DIGEST = 'digest' 92 | REASON = 'reason' 93 | RA = 'ra' 94 | RB = 'rb' 95 | RC = 'rc' 96 | RD = 'rd' 97 | LEN = 'len' 98 | RECEIPT_TYPE = 'receipt_type' 99 | RESULT = 'result' 100 | GAS_USED = 'gas_used' 101 | DATA = 'data' 102 | SENDER = 'sender' 103 | RECIPIENT = 'recipient' 104 | NONCE = 'nonce' 105 | CONTRACT_ID = 'contract_id' 106 | SUB_ID = 'sub_id' 107 | 108 | class InputField(StrEnum): 109 | TX_ID = 'tx_id' 110 | TX_STATUS = 'tx_status' 111 | TX_TYPE = 'tx_type' 112 | BLOCK_HEIGHT = 'block_height' 113 | INPUT_TYPE = 'input_type' 114 | UTXO_ID = 'utxo_id' 115 | OWNER = 'owner' 116 | AMOUNT = 'amount' 117 | ASSET_ID = 'asset_id' 118 | TX_POINTER_BLOCK_HEIGHT = 'tx_pointer_block_height' 119 | TX_POINTER_TX_INDEX = 'tx_pointer_tx_index' 120 | WITNESS_INDEX = 'witness_index' 121 | PREDICATE_GAS_USED = 'predicate_gas_used' 122 | PREDICATE = 'predicate' 123 | PREDICATE_DATA = 'predicate_data' 124 | BALANCE_ROOT = 'balance_root' 125 | STATE_ROOT = 'state_root' 126 | CONTRACT = 'contract' 127 | SENDER = 'sender' 128 | RECIPIENT = 'recipient' 129 | NONCE = 'nonce' 130 | DATA = 'data' 131 | 132 | class OutputField(StrEnum): 133 | TX_ID = 'tx_id' 134 | TX_STATUS = 'tx_status' 135 | TX_TYPE = 'tx_type' 136 | BLOCK_HEIGHT = 'block_height' 137 | OUTPUT_TYPE = 'output_type' 138 | TO = 'to' 139 | AMOUNT = 'amount' 140 | ASSET_ID = 'asset_id' 141 | INPUT_INDEX = 'input_index' 142 | BALANCE_ROOT = 'balance_root' 143 | STATE_ROOT = 'state_root' 144 | CONTRACT = 'contract' 145 | 146 | 147 | @dataclass 148 | class ReceiptSelection: 149 | root_contract_id: Optional[list[str]] = None 150 | to_address: Optional[list[str]] = None 151 | asset_id: Optional[list[str]] = None 152 | receipt_type: Optional[list[str]] = None 153 | sender: Optional[list[str]] = None 154 | recipient: Optional[list[str]] = None 155 | contract_id: Optional[list[str]] = None 156 | ra: Optional[list[str]] = None 157 | rb: Optional[list[str]] = None 158 | rc: Optional[list[str]] = None 159 | rd: Optional[list[str]] = None 160 | tx_status: Optional[list[int]] = None 161 | tx_type: Optional[list[int]] = None 162 | 163 | 164 | @dataclass 165 | class InputSelection: 166 | owner: Optional[list[str]] = None 167 | asset_id: Optional[list[str]] = None 168 | contract: Optional[list[str]] = None 169 | sender: Optional[list[str]] = None 170 | recipient: Optional[list[str]] = None 171 | input_type: Optional[list[str]] = None 172 | tx_status: Optional[list[int]] = None 173 | tx_type: Optional[list[int]] = None 174 | 175 | 176 | @dataclass 177 | class OutputSelection: 178 | to: Optional[list[str]] = None 179 | asset_id: Optional[list[str]] = None 180 | contract: Optional[list[str]] = None 181 | output_type: Optional[list[str]] = None 182 | tx_status: Optional[list[int]] = None 183 | tx_type: Optional[list[int]] = None 184 | 185 | 186 | @dataclass 187 | class FieldSelection: 188 | block: Optional[list[BlockField]] = None 189 | transaction: Optional[list[TransactionField]] = None 190 | receipt: Optional[list[ReceiptField]] = None 191 | input: Optional[list[InputField]] = None 192 | output: Optional[list[OutputField]] = None 193 | 194 | @dataclass 195 | class Query: 196 | from_block: int 197 | field_selection: FieldSelection 198 | to_block: Optional[int] = None 199 | include_all_blocks: Optional[bool] = None 200 | receipts: Optional[list[ReceiptSelection]] = None 201 | inputs: Optional[list[InputSelection]] = None 202 | outputs: Optional[list[OutputSelection]] = None 203 | max_num_blocks: Optional[int] = None 204 | max_num_transactions: Optional[int] = None 205 | 206 | class HyperfuelClient: 207 | # Create a new client with given config 208 | def __init__(self, url="https://fuel-testnet.hypersync.xyz", bearer_token=None, http_req_timeout_millis=None): 209 | self.inner = _HyperfuelClient({ 210 | "url": url, 211 | "bearer_token": bearer_token, 212 | "http_req_timeout_millis": http_req_timeout_millis 213 | }) 214 | 215 | # Create a parquet file by executing a query. 216 | # 217 | # If the query can't be finished in a single request, this function will 218 | # keep on making requests using the pagination mechanism (next_block) until 219 | # it reaches the end. It will stream data into the parquet file as it comes from 220 | # the server. 221 | # 222 | # Path should point to a folder that will contain the parquet files in the end. 223 | async def create_parquet_folder(self, query: Query, path: str) -> None: 224 | return await self.inner.create_parquet_folder(asdict(query), path) 225 | 226 | # Get the height of the source hypersync instance 227 | async def get_height(self) -> int: 228 | return await self.inner.get_height() 229 | 230 | # Get the height of the source hypersync instance 231 | # Internally calls get_height. 232 | # On an error from the source hypersync instance, sleeps for 233 | # 1 second (increasing by 1 each failure up to max of 5 seconds) 234 | # and retries query until success. 235 | async def get_height_with_retry(self) -> int: 236 | return await self.inner.get_height_with_retry() 237 | 238 | # Send a query request to the source hypersync instance. 239 | # 240 | # Returns a query response which contains pyarrow data. 241 | # 242 | # NOTE: this query returns loads all transactions that your match your receipt, input, or output selections 243 | # and applies the field selection to all these loaded transactions. So your query will return the data you 244 | # want plus additional data from the loaded transactions. This functionality is in case you want to associate 245 | # receipts, inputs, or outputs with eachother. 246 | async def get_arrow_data(self, query: Query) -> any: 247 | return await self.inner.get_arrow_data(asdict(query)) 248 | 249 | # Send a query request to the source hypersync instance. 250 | # On an error from the source hypersync instance, sleeps for 251 | # 1 second (increasing by 1 each failure up to max of 5 seconds) 252 | # and retries query until success. 253 | # 254 | # Returns a query response which contains pyarrow data. 255 | # 256 | # NOTE: this query returns loads all transactions that your match your receipt, input, or output selections 257 | # and applies the field selection to all these loaded transactions. So your query will return the data you 258 | # want plus additional data from the loaded transactions. This functionality is in case you want to associate 259 | # receipts, inputs, or outputs with eachother. 260 | # Format can be ArrowIpc. 261 | async def get_arrow_data_with_retry(self, query: Query) -> any: 262 | return await self.inner.get_arrow_data_with_retry(asdict(query)) 263 | 264 | # Send a query request to the source hypersync instance. 265 | # 266 | # Returns a query response which contains typed data. 267 | # 268 | # NOTE: this query returns loads all transactions that your match your receipt, input, or output selections 269 | # and applies the field selection to all these loaded transactions. So your query will return the data you 270 | # want plus additional data from the loaded transactions. This functionality is in case you want to associate 271 | # receipts, inputs, or outputs with eachother. 272 | async def get_data(self, query: Query) -> any: 273 | return await self.inner.get_data(asdict(query)) 274 | 275 | # Send a query request to the source hypersync instance. 276 | # 277 | # Returns a query response that which contains structured data that doesn't include any inputs, outputs, 278 | # and receipts that don't exactly match the query's input, outout, or receipt selection. 279 | async def get_selected_data(self, query: Query) -> any: 280 | return await self.inner.get_selected_data(asdict(query)) 281 | 282 | # Send a query request to the source hypersync instance. 283 | # 284 | # Returns all log and logdata receipts of logs emitted by any of the specified contracts 285 | # within the block range. 286 | # If no 'to_block' is specified, query will run to the head of the chain. 287 | # Returned data contains all the data needed to decode Fuel Log or LogData 288 | # receipts as well as some extra data for context. This query doesn't return any logs that 289 | # were a part of a failed transaction. 290 | # 291 | # NOTE: this function is experimental and might be removed in future versions. 292 | async def preset_query_get_logs(self, emitting_contracts: list[str], from_block: int, to_block: Optional[int]) -> any: 293 | return await self.inner.preset_query_get_logs(emitting_contracts, from_block, to_block) 294 | 295 | 296 | 297 | 298 | # helper function for converting a Query object from the rust side interpreted as a dict into a 299 | # dataclass Query 300 | def dict_to_query(data: dict) -> Query: 301 | receipts = [ReceiptSelection(**receipt) for receipt in data.get('receipts', [])] if 'receipts' in data else None 302 | inputs = [InputSelection(**inpt) for inpt in data.get('inputs', [])] if 'inputs' in data else None 303 | outputs = [OutputSelection(**output) for output in data.get('outputs', [])] if 'outputs' in data else None 304 | 305 | field_selection = FieldSelection( 306 | block=[BlockField(block) for block in data['field_selection'].get('block', [])] if 'block' in data['field_selection'] else None, 307 | transaction=[TransactionField(txn) for txn in data['field_selection'].get('transaction', [])] if 'transaction' in data['field_selection'] else None, 308 | receipt=[ReceiptField(receipt) for receipt in data['field_selection'].get('receipt', [])] if 'receipt' in data['field_selection'] else None, 309 | input=[InputField(inpt) for inpt in data['field_selection'].get('input', [])] if 'input' in data['field_selection'] else None, 310 | output=[OutputField(output) for output in data['field_selection'].get('output', [])] if 'output' in data['field_selection'] else None, 311 | ) 312 | 313 | return Query( 314 | from_block=data['from_block'], 315 | to_block=data.get('to_block'), 316 | receipts=receipts, 317 | inputs=inputs, 318 | outputs=outputs, 319 | include_all_blocks=data.get('include_all_blocks'), 320 | max_num_blocks=data.get('max_num_blocks'), 321 | max_num_transactions=data.get('max_num_transactions'), 322 | field_selection=field_selection, 323 | ) 324 | -------------------------------------------------------------------------------- /pyproject.toml: -------------------------------------------------------------------------------- 1 | [build-system] 2 | requires = ["maturin>=1.3,<2.0"] 3 | build-backend = "maturin" 4 | 5 | [project] 6 | name = "hyperfuel" 7 | requires-python = ">=3.9" 8 | dependencies = ["strenum>=0.4.15,<0.4.16"] 9 | classifiers = [ 10 | "Programming Language :: Rust", 11 | "Programming Language :: Python :: Implementation :: CPython", 12 | "Programming Language :: Python :: Implementation :: PyPy", 13 | "Development Status :: 3 - Alpha", 14 | "Topic :: Database :: Front-Ends", 15 | "Topic :: Software Development :: Libraries", 16 | ] 17 | dynamic = ["version"] 18 | 19 | [tool.maturin] 20 | features = ["pyo3/extension-module"] 21 | profile = "no_lto" 22 | skip-auditwheel = false 23 | -------------------------------------------------------------------------------- /src/config.rs: -------------------------------------------------------------------------------- 1 | use anyhow::{Context, Result}; 2 | use serde::Serialize; 3 | 4 | #[derive(Default, Clone, Serialize, dict_derive::FromPyObject)] 5 | pub struct Config { 6 | /// Url of the source hypersync instance 7 | pub url: String, 8 | /// Optional bearer_token to put into http requests made to source hypersync instance 9 | #[serde(skip_serializing_if = "Option::is_none")] 10 | pub bearer_token: Option, 11 | /// Timout treshold for a single http request in milliseconds, default is 30 seconds (30_000ms) 12 | #[serde(skip_serializing_if = "Option::is_none")] 13 | pub http_req_timeout_millis: Option, 14 | } 15 | 16 | impl Config { 17 | pub fn try_convert(&self) -> Result { 18 | let json = serde_json::to_vec(self).context("serialize to json")?; 19 | serde_json::from_slice(&json).context("parse json") 20 | } 21 | } 22 | -------------------------------------------------------------------------------- /src/lib.rs: -------------------------------------------------------------------------------- 1 | use anyhow::{Context, Result}; 2 | use arrow2::datatypes::Field; 3 | use arrow2::ffi; 4 | use arrow2::{array::StructArray, datatypes::DataType}; 5 | use hyperfuel_client::ArrowBatch; 6 | use pyo3::ffi::Py_uintptr_t; 7 | use pyo3_asyncio::tokio::future_into_py; 8 | use response::{LogResponse, QueryResponseArrow, QueryResponseArrowData, QueryResponseTyped}; 9 | use std::sync::Arc; 10 | 11 | mod config; 12 | mod query; 13 | mod response; 14 | mod types; 15 | 16 | use pyo3::{ 17 | exceptions::{PyIOError, PyValueError}, 18 | prelude::*, 19 | }; 20 | 21 | pub use config::Config; 22 | 23 | #[pymodule] 24 | fn hyperfuel(_py: Python, m: &PyModule) -> PyResult<()> { 25 | m.add_class::() 26 | } 27 | #[pyclass] 28 | pub struct HyperfuelClient { 29 | inner: Arc, 30 | } 31 | 32 | impl HyperfuelClient { 33 | fn new_impl(config: Config) -> Result { 34 | env_logger::try_init().ok(); 35 | 36 | let config = config.try_convert().context("parse config")?; 37 | 38 | Ok(HyperfuelClient { 39 | inner: Arc::new(hyperfuel_client::Client::new(config).context("create client")?), 40 | }) 41 | } 42 | } 43 | 44 | #[pymethods] 45 | impl HyperfuelClient { 46 | /// Create a new client with given config 47 | #[new] 48 | fn new(config: Config) -> PyResult { 49 | Self::new_impl(config).map_err(|e| PyIOError::new_err(format!("{:?}", e))) 50 | } 51 | 52 | /// Get the height of the source hypersync instance 53 | pub fn get_height<'py>(&'py self, py: Python<'py>) -> PyResult<&'py PyAny> { 54 | let inner = Arc::clone(&self.inner); 55 | future_into_py::<_, u64>(py, async move { 56 | let height: u64 = inner 57 | .get_height() 58 | .await 59 | .map_err(|e| PyIOError::new_err(format!("{:?}", e)))?; 60 | 61 | Ok(height) 62 | }) 63 | } 64 | 65 | /// Get the height of the source hypersync instance 66 | /// Internally calls get_height. 67 | /// On an error from the source hypersync instance, sleeps for 68 | /// 1 second (increasing by 1 each failure up to max of 5 seconds) 69 | /// and retries query until success. 70 | pub fn get_height_with_retry<'py>(&'py self, py: Python<'py>) -> PyResult<&'py PyAny> { 71 | let inner = Arc::clone(&self.inner); 72 | future_into_py::<_, u64>(py, async move { 73 | let height: u64 = inner 74 | .get_height_with_retry() 75 | .await 76 | .map_err(|e| PyIOError::new_err(format!("{:?}", e)))?; 77 | 78 | Ok(height) 79 | }) 80 | } 81 | 82 | /// Create a parquet file by executing a query. 83 | /// 84 | /// If the query can't be finished in a single request, this function will 85 | /// keep on making requests using the pagination mechanism (next_block) until 86 | /// it reaches the end. It will stream data into the parquet file as it comes from 87 | /// the server. 88 | /// 89 | /// Path should point to a folder that will contain the parquet files in the end. 90 | pub fn create_parquet_folder<'py>( 91 | &'py self, 92 | query: query::Query, 93 | path: String, 94 | py: Python<'py>, 95 | ) -> PyResult<&'py PyAny> { 96 | let inner = Arc::clone(&self.inner); 97 | 98 | future_into_py(py, async move { 99 | let query = query 100 | .try_convert() 101 | .map_err(|_e| PyValueError::new_err("parsing query"))?; 102 | 103 | inner 104 | .create_parquet_folder(query, path) 105 | .await 106 | .map_err(|e| PyIOError::new_err(format!("{:?}", e)))?; 107 | 108 | Ok(()) 109 | }) 110 | } 111 | 112 | /// Send a query request to the source hypersync instance. 113 | /// 114 | /// Returns a query response which contains typed data. 115 | /// 116 | /// NOTE: this query returns loads all transactions that your match your receipt, input, or output selections 117 | /// and applies the field selection to all these loaded transactions. So your query will return the data you 118 | /// want plus additional data from the loaded transactions. This functionality is in case you want to associate 119 | /// receipts, inputs, or outputs with eachother. 120 | pub fn get_data<'py>(&'py self, query: query::Query, py: Python<'py>) -> PyResult<&'py PyAny> { 121 | let inner = Arc::clone(&self.inner); 122 | 123 | future_into_py::<_, QueryResponseTyped>(py, async move { 124 | let query = query 125 | .try_convert() 126 | .map_err(|e| PyValueError::new_err(format!("{:?}", e)))?; 127 | 128 | let res = inner 129 | .get_data(&query) 130 | .await 131 | .map_err(|e| PyIOError::new_err(format!("{:?}", e)))?; 132 | 133 | Ok(res.into()) 134 | }) 135 | } 136 | 137 | /// Send a query request to the source hypersync instance. 138 | /// 139 | /// Returns a query response that which contains structured data that doesn't include any inputs, outputs, 140 | /// and receipts that don't exactly match the query's input, outout, or receipt selection. 141 | pub fn get_selected_data<'py>( 142 | &'py self, 143 | query: query::Query, 144 | py: Python<'py>, 145 | ) -> PyResult<&'py PyAny> { 146 | let inner = Arc::clone(&self.inner); 147 | 148 | future_into_py::<_, QueryResponseTyped>(py, async move { 149 | let query = query 150 | .try_convert() 151 | .map_err(|e| PyValueError::new_err(format!("{:?}", e)))?; 152 | 153 | let res = inner 154 | .get_selected_data(&query) 155 | .await 156 | .map_err(|e| PyIOError::new_err(format!("{:?}", e)))?; 157 | 158 | Ok(res.into()) 159 | }) 160 | } 161 | 162 | /// Send a query request to the source hypersync instance. 163 | /// 164 | /// Returns all log and logdata receipts of logs emitted by any of the specified contracts 165 | /// within the block range. 166 | /// If no 'to_block' is specified, query will run to the head of the chain. 167 | /// Returned data contains all the data needed to decode Fuel Log or LogData 168 | /// receipts as well as some extra data for context. This query doesn't return any logs that 169 | /// were a part of a failed transaction. 170 | /// 171 | /// NOTE: this function is experimental and might be removed in future versions. 172 | pub fn preset_query_get_logs<'py>( 173 | &'py self, 174 | emitting_contracts: Vec, 175 | from_block: u64, 176 | to_block: Option, 177 | py: Python<'py>, 178 | ) -> PyResult<&'py PyAny> { 179 | let inner = Arc::clone(&self.inner); 180 | 181 | // cut the "0x" off the address 182 | let mut emitting_contracts_args = vec![]; 183 | for contract_address in emitting_contracts { 184 | let address: &str = if &contract_address[..2] == "0x" { 185 | &contract_address[2..] 186 | } else { 187 | &contract_address 188 | }; 189 | let address = hex_str_address_to_byte_array(address) 190 | .map_err(|e| PyValueError::new_err(format!("{:?}", e)))?; 191 | emitting_contracts_args.push(address) 192 | } 193 | 194 | future_into_py::<_, LogResponse>(py, async move { 195 | let res = inner 196 | .preset_query_get_logs(emitting_contracts_args, from_block, to_block) 197 | .await 198 | .map_err(|e| PyIOError::new_err(format!("{:?}", e)))?; 199 | 200 | Ok(res.into()) 201 | }) 202 | } 203 | 204 | /// Send a query request to the source hypersync instance. 205 | /// 206 | /// Returns a query response which contains pyarrow data. 207 | /// 208 | /// NOTE: this query returns loads all transactions that your match your receipt, input, or output selections 209 | /// and applies the field selection to all these loaded transactions. So your query will return the data you 210 | /// want plus additional data from the loaded transactions. This functionality is in case you want to associate 211 | /// receipts, inputs, or outputs with eachother. 212 | pub fn get_arrow_data<'py>( 213 | &'py self, 214 | query: query::Query, 215 | py: Python<'py>, 216 | ) -> PyResult<&'py PyAny> { 217 | // initialize an array 218 | let inner = Arc::clone(&self.inner); 219 | 220 | future_into_py::<_, QueryResponseArrow>(py, async move { 221 | let query = query 222 | .try_convert() 223 | .map_err(|e| PyValueError::new_err(format!("{:?}", e)))?; 224 | 225 | let res = inner 226 | .get_arrow_data(&query) 227 | .await 228 | .map_err(|e| PyIOError::new_err(format!("{:?}", e)))?; 229 | 230 | let blocks = res.data.blocks; 231 | let transactions = res.data.transactions; 232 | let receipts = res.data.receipts; 233 | let inputs = res.data.inputs; 234 | let outputs = res.data.outputs; 235 | 236 | let (blocks, transactions, receipts, inputs, outputs) = Python::with_gil(|py| { 237 | let pyarrow = py.import("pyarrow")?; 238 | let blocks = convert_batch_to_pyarrow_table(py, pyarrow, blocks)?; 239 | let transactions = convert_batch_to_pyarrow_table(py, pyarrow, transactions)?; 240 | let receipts = convert_batch_to_pyarrow_table(py, pyarrow, receipts)?; 241 | let inputs = convert_batch_to_pyarrow_table(py, pyarrow, inputs)?; 242 | let outputs = convert_batch_to_pyarrow_table(py, pyarrow, outputs)?; 243 | 244 | Ok::<(PyObject, PyObject, PyObject, PyObject, PyObject), PyErr>(( 245 | blocks, 246 | transactions, 247 | receipts, 248 | inputs, 249 | outputs, 250 | )) 251 | })?; 252 | 253 | let query_response = compose_pyarrow_response( 254 | res.archive_height, 255 | res.next_block, 256 | res.total_execution_time, 257 | blocks, 258 | transactions, 259 | receipts, 260 | inputs, 261 | outputs, 262 | ) 263 | .map_err(|e| PyValueError::new_err(format!("{:?}", e)))?; 264 | 265 | Ok(query_response) 266 | }) 267 | } 268 | 269 | /// Send a query request to the source hypersync instance. 270 | /// On an error from the source hypersync instance, sleeps for 271 | /// 1 second (increasing by 1 each failure up to max of 5 seconds) 272 | /// and retries query until success. 273 | /// 274 | /// Returns a query response which contains pyarrow data. 275 | /// 276 | /// NOTE: this query returns loads all transactions that your match your receipt, input, or output selections 277 | /// and applies the field selection to all these loaded transactions. So your query will return the data you 278 | /// want plus additional data from the loaded transactions. This functionality is in case you want to associate 279 | /// receipts, inputs, or outputs with eachother. 280 | /// Format can be ArrowIpc. 281 | pub fn get_arrow_data_with_retry<'py>( 282 | &'py self, 283 | query: query::Query, 284 | py: Python<'py>, 285 | ) -> PyResult<&'py PyAny> { 286 | // initialize an array 287 | let inner = Arc::clone(&self.inner); 288 | 289 | future_into_py::<_, QueryResponseArrow>(py, async move { 290 | let query = query 291 | .try_convert() 292 | .map_err(|e| PyValueError::new_err(format!("{:?}", e)))?; 293 | 294 | let res = inner 295 | .get_arrow_data_with_retry(&query) 296 | .await 297 | .map_err(|e| PyIOError::new_err(format!("{:?}", e)))?; 298 | 299 | let blocks = res.data.blocks; 300 | let transactions = res.data.transactions; 301 | let receipts = res.data.receipts; 302 | let inputs = res.data.inputs; 303 | let outputs = res.data.outputs; 304 | 305 | let (blocks, transactions, receipts, inputs, outputs) = Python::with_gil(|py| { 306 | let pyarrow = py.import("pyarrow")?; 307 | let blocks = convert_batch_to_pyarrow_table(py, pyarrow, blocks)?; 308 | let transactions = convert_batch_to_pyarrow_table(py, pyarrow, transactions)?; 309 | let receipts = convert_batch_to_pyarrow_table(py, pyarrow, receipts)?; 310 | let inputs = convert_batch_to_pyarrow_table(py, pyarrow, inputs)?; 311 | let outputs = convert_batch_to_pyarrow_table(py, pyarrow, outputs)?; 312 | 313 | Ok::<(PyObject, PyObject, PyObject, PyObject, PyObject), PyErr>(( 314 | blocks, 315 | transactions, 316 | receipts, 317 | inputs, 318 | outputs, 319 | )) 320 | })?; 321 | 322 | let query_response = compose_pyarrow_response( 323 | res.archive_height, 324 | res.next_block, 325 | res.total_execution_time, 326 | blocks, 327 | transactions, 328 | receipts, 329 | inputs, 330 | outputs, 331 | ) 332 | .map_err(|e| PyValueError::new_err(format!("{:?}", e)))?; 333 | 334 | Ok(query_response) 335 | }) 336 | } 337 | } 338 | 339 | // helper function to decode hex string as address 340 | fn hex_str_address_to_byte_array(hex_str: &str) -> Result<[u8; 32], String> { 341 | if hex_str.len() != 64 { 342 | return Err("address must be 64 hex characters".to_owned()); 343 | } 344 | 345 | let mut dst = [0u8; 32]; 346 | match faster_hex::hex_decode(hex_str.as_bytes(), &mut dst) { 347 | Ok(()) => Ok(dst), 348 | Err(e) => Err(format!("Failed to decode hex string: {}", e)), 349 | } 350 | } 351 | 352 | #[allow(clippy::too_many_arguments)] 353 | /// Construct response and centralize error mapping for calling function. 354 | fn compose_pyarrow_response( 355 | archive_height: Option, 356 | next_block: u64, 357 | total_execution_time: u64, 358 | blocks: PyObject, 359 | transactions: PyObject, 360 | receipts: PyObject, 361 | inputs: PyObject, 362 | outputs: PyObject, 363 | ) -> Result { 364 | Ok(QueryResponseArrow { 365 | archive_height, 366 | next_block, 367 | total_execution_time, 368 | data: QueryResponseArrowData { 369 | blocks, 370 | transactions, 371 | receipts, 372 | inputs, 373 | outputs, 374 | }, 375 | }) 376 | } 377 | 378 | /// Uses RecordBatchReader to convert vector of ArrayBatch to reader by c-interface 379 | /// and then crates table from this reader with method from_batches 380 | fn convert_batch_to_pyarrow_table<'py>( 381 | py: Python<'py>, 382 | pyarrow: &'py PyModule, 383 | batches: Vec, 384 | ) -> PyResult { 385 | if batches.is_empty() { 386 | return Ok(py.None()); 387 | } 388 | 389 | let schema = batches.first().unwrap().schema.fields.clone(); 390 | let field = Field::new("a", DataType::Struct(schema), true); 391 | 392 | let mut data = vec![]; 393 | for batch in batches { 394 | data.push( 395 | StructArray::new(field.data_type.clone(), batch.chunk.arrays().to_vec(), None).boxed(), 396 | ); 397 | } 398 | 399 | let iter = Box::new(data.into_iter().map(Ok)) as _; 400 | let stream = Box::new(ffi::export_iterator(iter, field)); 401 | let py_stream = pyarrow.getattr("RecordBatchReader")?.call_method1( 402 | "_import_from_c", 403 | ((&*stream as *const ffi::ArrowArrayStream) as Py_uintptr_t,), 404 | )?; 405 | let table = pyarrow 406 | .getattr("Table")? 407 | .call_method1("from_batches", (py_stream,))?; 408 | 409 | Ok(table.to_object(py)) 410 | } 411 | -------------------------------------------------------------------------------- /src/query.rs: -------------------------------------------------------------------------------- 1 | use anyhow::{Context, Result}; 2 | use serde::{Deserialize, Serialize}; 3 | 4 | #[derive( 5 | Default, 6 | Serialize, 7 | Deserialize, 8 | Clone, 9 | Debug, 10 | dict_derive::FromPyObject, 11 | dict_derive::IntoPyObject, 12 | )] 13 | pub struct ReceiptSelection { 14 | #[serde(skip_serializing_if = "Option::is_none")] 15 | pub root_contract_id: Option>, 16 | #[serde(skip_serializing_if = "Option::is_none")] 17 | pub to_address: Option>, 18 | #[serde(skip_serializing_if = "Option::is_none")] 19 | pub asset_id: Option>, 20 | #[serde(skip_serializing_if = "Option::is_none")] 21 | pub receipt_type: Option>, 22 | #[serde(skip_serializing_if = "Option::is_none")] 23 | pub sender: Option>, 24 | #[serde(skip_serializing_if = "Option::is_none")] 25 | pub recipient: Option>, 26 | #[serde(skip_serializing_if = "Option::is_none")] 27 | pub contract_id: Option>, 28 | #[serde(skip_serializing_if = "Option::is_none")] 29 | pub ra: Option>, 30 | #[serde(skip_serializing_if = "Option::is_none")] 31 | pub rb: Option>, 32 | #[serde(skip_serializing_if = "Option::is_none")] 33 | pub rc: Option>, 34 | #[serde(skip_serializing_if = "Option::is_none")] 35 | pub rd: Option>, 36 | #[serde(skip_serializing_if = "Option::is_none")] 37 | pub tx_status: Option>, 38 | #[serde(skip_serializing_if = "Option::is_none")] 39 | pub tx_type: Option>, 40 | } 41 | 42 | #[derive( 43 | Default, 44 | Serialize, 45 | Deserialize, 46 | Clone, 47 | Debug, 48 | dict_derive::FromPyObject, 49 | dict_derive::IntoPyObject, 50 | )] 51 | pub struct InputSelection { 52 | #[serde(skip_serializing_if = "Option::is_none")] 53 | pub owner: Option>, 54 | #[serde(skip_serializing_if = "Option::is_none")] 55 | pub asset_id: Option>, 56 | #[serde(skip_serializing_if = "Option::is_none")] 57 | pub contract: Option>, 58 | #[serde(skip_serializing_if = "Option::is_none")] 59 | pub sender: Option>, 60 | #[serde(skip_serializing_if = "Option::is_none")] 61 | pub recipient: Option>, 62 | #[serde(skip_serializing_if = "Option::is_none")] 63 | pub input_type: Option>, 64 | #[serde(skip_serializing_if = "Option::is_none")] 65 | pub tx_status: Option>, 66 | #[serde(skip_serializing_if = "Option::is_none")] 67 | pub tx_type: Option>, 68 | } 69 | 70 | #[derive( 71 | Default, 72 | Serialize, 73 | Deserialize, 74 | Clone, 75 | Debug, 76 | dict_derive::FromPyObject, 77 | dict_derive::IntoPyObject, 78 | )] 79 | pub struct OutputSelection { 80 | #[serde(skip_serializing_if = "Option::is_none")] 81 | pub to: Option>, 82 | #[serde(skip_serializing_if = "Option::is_none")] 83 | pub asset_id: Option>, 84 | #[serde(skip_serializing_if = "Option::is_none")] 85 | pub contract: Option>, 86 | #[serde(skip_serializing_if = "Option::is_none")] 87 | pub output_type: Option>, 88 | #[serde(skip_serializing_if = "Option::is_none")] 89 | pub tx_status: Option>, 90 | #[serde(skip_serializing_if = "Option::is_none")] 91 | pub tx_type: Option>, 92 | } 93 | 94 | #[derive( 95 | Default, 96 | Debug, 97 | Clone, 98 | Serialize, 99 | Deserialize, 100 | dict_derive::FromPyObject, 101 | dict_derive::IntoPyObject, 102 | )] 103 | pub struct FieldSelection { 104 | #[serde(skip_serializing_if = "Option::is_none")] 105 | pub block: Option>, 106 | #[serde(skip_serializing_if = "Option::is_none")] 107 | pub transaction: Option>, 108 | #[serde(skip_serializing_if = "Option::is_none")] 109 | pub receipt: Option>, 110 | #[serde(skip_serializing_if = "Option::is_none")] 111 | pub input: Option>, 112 | #[serde(skip_serializing_if = "Option::is_none")] 113 | pub output: Option>, 114 | } 115 | 116 | #[derive( 117 | Default, 118 | Serialize, 119 | Deserialize, 120 | Clone, 121 | Debug, 122 | dict_derive::FromPyObject, 123 | dict_derive::IntoPyObject, 124 | )] 125 | pub struct Query { 126 | /// The block to start the query from 127 | pub from_block: u64, 128 | /// The block to end the query at. If not specified, the query will go until the 129 | /// end of data. Exclusive, the returned range will be [from_block..to_block). 130 | /// 131 | /// The query will return before it reaches this target block if it hits the time limit 132 | /// configured on the server. The user should continue their query by putting the 133 | /// next_block field in the response into from_block field of their next query. This implements 134 | /// pagination. 135 | #[serde(skip_serializing_if = "Option::is_none")] 136 | pub to_block: Option, 137 | /// List of receipt selections, the query will return receipts that match any of these selections and 138 | /// it will return receipts that are related to the returned objects. 139 | #[serde(skip_serializing_if = "Option::is_none")] 140 | pub receipts: Option>, 141 | /// List of input selections, the query will return inputs that match any of these selections and 142 | /// it will return inputs that are related to the returned objects. 143 | #[serde(skip_serializing_if = "Option::is_none")] 144 | pub inputs: Option>, 145 | /// List of output selections, the query will return outputs that match any of these selections and 146 | /// it will return outputs that are related to the returned objects. 147 | #[serde(skip_serializing_if = "Option::is_none")] 148 | pub outputs: Option>, 149 | /// Whether to include all blocks regardless of if they are related to a returned transaction or log. Normally 150 | /// the server will return only the blocks that are related to the transaction or logs in the response. But if this 151 | /// is set to true, the server will return data for all blocks in the requested range [from_block, to_block). 152 | #[serde(skip_serializing_if = "Option::is_none")] 153 | pub include_all_blocks: Option, 154 | /// Field selection. The user can select which fields they are interested in, requesting less fields will improve 155 | /// query execution time and reduce the payload size so the user should always use a minimal number of fields. 156 | pub field_selection: FieldSelection, 157 | /// Maximum number of blocks that should be returned, the server might return more blocks than this number but 158 | /// it won't overshoot by too much. 159 | #[serde(skip_serializing_if = "Option::is_none")] 160 | pub max_num_blocks: Option, 161 | /// Maximum number of transactions that should be returned, the server might return more transactions than this number but 162 | /// it won't overshoot by too much. 163 | #[serde(skip_serializing_if = "Option::is_none")] 164 | pub max_num_transactions: Option, 165 | } 166 | 167 | impl Query { 168 | pub fn try_convert(&self) -> Result { 169 | let json = serde_json::to_vec(self).context("serialize to json")?; 170 | serde_json::from_slice(&json).context("parse json") 171 | } 172 | } 173 | 174 | impl TryFrom for Query { 175 | type Error = anyhow::Error; 176 | 177 | fn try_from(hyperfuel_query: hyperfuel_net_types::Query) -> Result { 178 | let json = serde_json::to_vec(&hyperfuel_query).context("serialize query to json")?; 179 | serde_json::from_slice(&json).context("parse json") 180 | } 181 | } 182 | -------------------------------------------------------------------------------- /src/response.rs: -------------------------------------------------------------------------------- 1 | use hyperfuel_format::Hex; 2 | use pyo3::{pyclass, pymethods, PyObject, PyResult}; 3 | 4 | use crate::types::{Block, Input, Output, Receipt, Transaction}; 5 | 6 | #[pyclass] 7 | #[pyo3(get_all)] 8 | #[derive(Clone, Debug)] 9 | pub struct QueryResponseArrowData { 10 | pub blocks: PyObject, 11 | pub transactions: PyObject, 12 | pub receipts: PyObject, 13 | pub inputs: PyObject, 14 | pub outputs: PyObject, 15 | } 16 | 17 | #[pymethods] 18 | impl QueryResponseArrowData { 19 | /// TODO: if we want to implement this method we could call _is_initialized method, 20 | /// but we will need py reference 21 | fn __bool__(&self) -> bool { 22 | true 23 | } 24 | 25 | fn __repr__(&self) -> PyResult { 26 | Ok(format!("{:?}", self)) 27 | } 28 | 29 | fn __str__(&self) -> PyResult { 30 | Ok(format!("{:?}", self)) 31 | } 32 | } 33 | 34 | #[pyclass] 35 | #[pyo3(get_all)] 36 | #[derive(Clone, Debug)] 37 | pub struct QueryResponseArrow { 38 | /// Current height of the source hypersync instance 39 | pub archive_height: Option, 40 | /// Next block to query for, the responses are paginated so, 41 | /// the caller should continue the query from this block if they 42 | /// didn't get responses up to the to_block they specified in the Query. 43 | pub next_block: u64, 44 | /// Total time it took the hypersync instance to execute the query. 45 | pub total_execution_time: u64, 46 | /// Response data in pyarrow format 47 | pub data: QueryResponseArrowData, 48 | } 49 | 50 | #[pymethods] 51 | impl QueryResponseArrow { 52 | fn __bool__(&self) -> bool { 53 | self.archive_height.is_some() 54 | || self.next_block != u64::default() 55 | || self.total_execution_time != u64::default() 56 | || self.data.__bool__() 57 | } 58 | 59 | fn __repr__(&self) -> PyResult { 60 | Ok(format!("{:?}", self)) 61 | } 62 | 63 | fn __str__(&self) -> PyResult { 64 | Ok(format!("{:?}", self)) 65 | } 66 | } 67 | 68 | #[pyclass] 69 | #[pyo3(get_all)] 70 | #[derive(Debug, Clone)] 71 | pub struct QueryResponseTyped { 72 | /// Current height of the source hypersync instance 73 | pub archive_height: Option, 74 | /// Next block to query for, the responses are paginated so 75 | /// the caller should continue the query from this block if they 76 | /// didn't get responses up to the to_block they specified in the Query. 77 | pub next_block: u64, 78 | /// Total time it took the hypersync instance to execute the query. 79 | pub total_execution_time: u64, 80 | /// Response data 81 | pub data: QueryResponseDataTyped, 82 | } 83 | 84 | #[pymethods] 85 | impl QueryResponseTyped { 86 | fn __bool__(&self) -> bool { 87 | self.archive_height.is_some() 88 | || self.next_block != u64::default() 89 | || self.total_execution_time != u64::default() 90 | || self.data.__bool__() 91 | } 92 | 93 | fn __repr__(&self) -> PyResult { 94 | Ok(format!("{:?}", self)) 95 | } 96 | 97 | fn __str__(&self) -> PyResult { 98 | Ok(format!("{:?}", self)) 99 | } 100 | } 101 | 102 | #[pyclass] 103 | #[pyo3(get_all)] 104 | #[derive(Debug, Clone)] 105 | pub struct QueryResponseDataTyped { 106 | pub blocks: Vec, 107 | pub transactions: Vec, 108 | pub receipts: Vec, 109 | pub inputs: Vec, 110 | pub outputs: Vec, 111 | } 112 | 113 | #[pymethods] 114 | impl QueryResponseDataTyped { 115 | fn __bool__(&self) -> bool { 116 | !self.blocks.is_empty() 117 | || !self.transactions.is_empty() 118 | || !self.receipts.is_empty() 119 | || !self.inputs.is_empty() 120 | || !self.outputs.is_empty() 121 | } 122 | 123 | fn __repr__(&self) -> PyResult { 124 | Ok(format!("{:?}", self)) 125 | } 126 | 127 | fn __str__(&self) -> PyResult { 128 | Ok(format!("{:?}", self)) 129 | } 130 | } 131 | 132 | impl From for QueryResponseTyped { 133 | fn from(r: hyperfuel_client::QueryResponseTyped) -> Self { 134 | let archive_height = r.archive_height; 135 | let next_block = r.next_block; 136 | let total_execution_time = r.total_execution_time; 137 | let data = QueryResponseDataTyped { 138 | blocks: r.data.blocks.into_iter().map(|b| b.into()).collect(), 139 | transactions: r.data.transactions.into_iter().map(|b| b.into()).collect(), 140 | receipts: r.data.receipts.into_iter().map(|b| b.into()).collect(), 141 | inputs: r.data.inputs.into_iter().map(|b| b.into()).collect(), 142 | outputs: r.data.outputs.into_iter().map(|b| b.into()).collect(), 143 | }; 144 | 145 | Self { 146 | archive_height, 147 | next_block, 148 | total_execution_time, 149 | data, 150 | } 151 | } 152 | } 153 | 154 | #[pyclass] 155 | #[pyo3(get_all)] 156 | #[derive(Debug, Clone)] 157 | pub struct LogResponse { 158 | /// Current height of the source hypersync instance 159 | pub archive_height: Option, 160 | /// Next block to query for, the responses are paginated so 161 | /// the caller should continue the query from this block if they 162 | /// didn't get responses up to the to_block they specified in the Query. 163 | pub next_block: u64, 164 | /// Total time it took the hypersync instance to execute the query. 165 | pub total_execution_time: u64, 166 | /// Response data 167 | pub data: Vec, 168 | } 169 | 170 | #[pymethods] 171 | impl LogResponse { 172 | fn __bool__(&self) -> bool { 173 | self.archive_height.is_some() 174 | || self.next_block != u64::default() 175 | || self.total_execution_time != u64::default() 176 | || !self.data.is_empty() 177 | } 178 | 179 | fn __repr__(&self) -> PyResult { 180 | Ok(format!("{:?}", self)) 181 | } 182 | 183 | fn __str__(&self) -> PyResult { 184 | Ok(format!("{:?}", self)) 185 | } 186 | } 187 | 188 | /// Contains all the fields needed for decoding plus some additional fields 189 | /// for context. 190 | #[pyclass] 191 | #[pyo3(get_all)] 192 | #[derive(Debug, Clone)] 193 | pub struct LogContext { 194 | pub block_height: u64, 195 | pub tx_id: String, 196 | pub receipt_index: u64, 197 | pub receipt_type: u8, 198 | pub contract_id: Option, 199 | pub root_contract_id: Option, 200 | pub ra: Option, 201 | pub rb: Option, 202 | pub rc: Option, 203 | pub rd: Option, 204 | pub pc: Option, 205 | pub is: Option, 206 | pub ptr: Option, 207 | pub len: Option, 208 | pub digest: Option, 209 | pub data: Option, 210 | } 211 | 212 | #[pymethods] 213 | impl LogContext { 214 | fn __bool__(&self) -> bool { 215 | self.block_height == u64::default() 216 | || self.receipt_index == u64::default() 217 | || self.receipt_type == u8::default() 218 | } 219 | 220 | fn __repr__(&self) -> PyResult { 221 | Ok(format!("{:?}", self)) 222 | } 223 | 224 | fn __str__(&self) -> PyResult { 225 | Ok(format!("{:?}", self)) 226 | } 227 | } 228 | 229 | impl From for LogResponse { 230 | fn from(r: hyperfuel_client::LogResponse) -> Self { 231 | let archive_height = r.archive_height; 232 | let next_block = r.next_block; 233 | let total_execution_time = r.total_execution_time; 234 | let data = r 235 | .data 236 | .into_iter() 237 | .map(|c| LogContext { 238 | block_height: c.block_height.into(), 239 | tx_id: c.tx_id.encode_hex(), 240 | receipt_index: c.receipt_index.into(), 241 | receipt_type: c.receipt_type.to_u8(), 242 | contract_id: c.contract_id.map(|i| i.encode_hex()), 243 | root_contract_id: c.root_contract_id.map(|i| i.encode_hex()), 244 | ra: c.ra.map(|i| i.into()), 245 | rb: c.rb.map(|i| i.into()), 246 | rc: c.rc.map(|i| i.into()), 247 | rd: c.rd.map(|i| i.into()), 248 | pc: c.pc.map(|i| i.into()), 249 | is: c.is.map(|i| i.into()), 250 | ptr: c.ptr.map(|i| i.into()), 251 | len: c.len.map(|i| i.into()), 252 | digest: c.digest.map(|i| i.encode_hex()), 253 | data: c.data.map(|i| i.encode_hex()), 254 | }) 255 | .collect(); 256 | Self { 257 | archive_height, 258 | next_block, 259 | total_execution_time, 260 | data, 261 | } 262 | } 263 | } 264 | -------------------------------------------------------------------------------- /src/types.rs: -------------------------------------------------------------------------------- 1 | use hyperfuel_format::Hex; 2 | use pyo3::{pyclass, pymethods, PyResult}; 3 | 4 | /// The block header contains metadata about a certain block. 5 | #[pyclass] 6 | #[pyo3(get_all)] 7 | #[derive(Debug, Default, Clone, PartialEq, Eq)] 8 | pub struct Block { 9 | /// String of the header 10 | pub id: String, 11 | /// The block height for the data availability layer up to which (inclusive) input messages are processed. 12 | pub da_height: u64, 13 | /// version of consensus 14 | pub consensus_parameters_version: u64, 15 | /// version of the state transition 16 | pub state_transition_bytecode_version: u64, 17 | /// The number of transactions in the block. 18 | pub transactions_count: String, 19 | /// The number of receipt messages in the block. 20 | pub message_receipt_count: String, 21 | /// The merkle root of the transactions in the block. 22 | pub transactions_root: String, 23 | /// The merkle root of the receipt messages in the block. 24 | pub message_outbox_root: String, 25 | pub event_inbox_root: String, 26 | /// The block height. 27 | pub height: u64, 28 | /// The merkle root of all previous consensus header Stringes (not including this block). 29 | pub prev_root: String, 30 | /// The timestamp for the block. 31 | pub time: u64, 32 | /// The String of the serialized application header for this block. 33 | pub application_hash: String, 34 | } 35 | 36 | #[pymethods] 37 | impl Block { 38 | fn __repr__(&self) -> PyResult { 39 | Ok(format!("{:?}", self)) 40 | } 41 | 42 | fn __str__(&self) -> PyResult { 43 | Ok(format!("{:?}", self)) 44 | } 45 | } 46 | 47 | /// An object containing information about a transaction. 48 | #[pyclass] 49 | #[pyo3(get_all)] 50 | #[derive(Debug, Default, Clone, PartialEq, Eq)] 51 | pub struct Transaction { 52 | /// block the transaction is in. 53 | pub block_height: u64, 54 | /// A unique transaction id. 55 | pub id: String, 56 | /// An array of asset ids used for the transaction inputs. 57 | pub input_asset_ids: Option>, 58 | // Contract object -> bincode into schema 59 | /// An array of contracts used for the transaction inputs. 60 | pub input_contracts: Option>, 61 | /// A contract used for the transaction input. 62 | /// A unique 32 byte identifier for the UTXO for a contract used for the transaction input. 63 | pub input_contract_utxo_id: Option, 64 | /// The root of amount of coins owned by contract before transaction execution for a contract used for the transaction input. 65 | pub input_contract_balance_root: Option, 66 | /// The state root of contract before transaction execution for a contract used for the transaction input. 67 | pub input_contract_state_root: Option, 68 | /// A pointer to the TX whose output is being spent for a contract used for the transaction input. 69 | pub input_contract_tx_pointer_block_height: Option, 70 | /// A pointer to the TX whose output is being spent for a contract used for the transaction input. 71 | pub input_contract_tx_pointer_tx_index: Option, 72 | /// The contract id for a contract used for the transaction input. 73 | pub input_contract: Option, 74 | pub policies_tip: Option, 75 | pub policies_witness_limit: Option, 76 | pub policies_maturity: Option, 77 | pub policies_max_fee: Option, 78 | /// The gas limit for the script. 79 | pub script_gas_limit: Option, 80 | /// The minimum block height that the transaction can be included at. 81 | pub maturity: Option, 82 | /// The amount minted in the transaction. 83 | pub mint_amount: Option, 84 | /// The asset ID for coins minted in the transaction. 85 | pub mint_asset_id: Option, 86 | pub mint_gas_price: Option, 87 | /// The location of the transaction in the block. 88 | pub tx_pointer_block_height: Option, 89 | pub tx_pointer_tx_index: Option, 90 | /// Script, creating a new contract, or minting new coins 91 | pub tx_type: u8, 92 | /// The index of the input from a transaction that changed the state of a contract. 93 | pub output_contract_input_index: Option, 94 | /// The root of amount of coins owned by contract after transaction execution from a transaction that changed the state of a contract. 95 | pub output_contract_balance_root: Option, 96 | /// The state root of contract after transaction execution from a transaction that changed the state of a contract. 97 | pub output_contract_state_root: Option, 98 | /// An array of witnesses. 99 | pub witnesses: Option, 100 | /// The root of the receipts. 101 | pub receipts_root: Option, 102 | /// The status type of the transaction. 103 | pub status: u8, 104 | /// for SubmittedStatus, SuccessStatus, and FailureStatus, the time a transaction was submitted, successful, or failed 105 | pub time: u64, 106 | /// for SuccessStatus, the state of the program execution 107 | // pub program_state: Option 108 | /// for SqueezedOutStatus & FailureStatus, the reason the transaction was squeezed out or failed 109 | pub reason: Option, 110 | /// The script to execute. 111 | pub script: Option, 112 | /// The script input parameters. 113 | pub script_data: Option, 114 | /// The witness index of contract bytecode. 115 | pub bytecode_witness_index: Option, 116 | pub bytecode_root: Option, 117 | pub subsection_index: Option, 118 | pub subsections_number: Option, 119 | pub proof_set: Option, 120 | pub consensus_parameters_upgrade_purpose_witness_index: Option, 121 | pub consensus_parameters_upgrade_purpose_checksum: Option, 122 | pub state_transition_upgrade_purpose_root: Option, 123 | /// The salt value for the transaction. 124 | pub salt: Option, 125 | } 126 | 127 | #[pymethods] 128 | impl Transaction { 129 | fn __repr__(&self) -> PyResult { 130 | Ok(format!("{:?}", self)) 131 | } 132 | 133 | fn __str__(&self) -> PyResult { 134 | Ok(format!("{:?}", self)) 135 | } 136 | } 137 | 138 | /// An object representing all possible types of receipts. 139 | #[pyclass] 140 | #[pyo3(get_all)] 141 | #[derive(Debug, Default, Clone, PartialEq, Eq)] 142 | pub struct Receipt { 143 | /// Index of the receipt in the block 144 | pub receipt_index: u64, 145 | /// Contract that produced the receipt 146 | pub root_contract_id: Option, 147 | /// transaction that this receipt originated from 148 | pub tx_id: String, 149 | /// The status type of the transaction this receipt originated from 150 | pub tx_status: u8, 151 | /// The type of the transaction this receipt originated from 152 | pub tx_type: u8, 153 | /// block that the receipt originated in 154 | pub block_height: u64, 155 | /// The value of the program counter register $pc, which is the memory address of the current instruction. 156 | pub pc: Option, 157 | /// The value of register $is, which is the pointer to the start of the currently-executing code. 158 | pub is: Option, 159 | /// The recipient contract 160 | pub to: Option, 161 | /// The recipient address 162 | pub to_address: Option, 163 | /// The amount of coins transferred. 164 | pub amount: Option, 165 | /// The asset id of the coins transferred. 166 | pub asset_id: Option, 167 | /// The gas used for the transaction. 168 | pub gas: Option, 169 | /// The first parameter for a CALL receipt type, holds the function selector. 170 | pub param1: Option, 171 | /// The second parameter for a CALL receipt type, typically used for the user-specified input to the ABI function being selected. 172 | pub param2: Option, 173 | /// The value of registers at the end of execution, used for debugging. 174 | pub val: Option, 175 | /// The value of the pointer register, used for debugging. 176 | pub ptr: Option, 177 | /// A 32-byte String of MEM[$rC, $rD]. The syntax MEM[x, y] means the memory range starting at byte x, of length y bytes. 178 | pub digest: Option, 179 | /// The decimal string representation of an 8-bit unsigned integer for the panic reason. Only returned if the receipt type is PANIC. 180 | pub reason: Option, 181 | /// The value of register $rA. 182 | pub ra: Option, 183 | /// The value of register $rB. 184 | pub rb: Option, 185 | /// The value of register $rC. 186 | pub rc: Option, 187 | /// The value of register $rD. 188 | pub rd: Option, 189 | /// The length of the receipt. 190 | pub len: Option, 191 | /// The type of receipt. 192 | pub receipt_type: u8, 193 | /// 0 if script exited successfully, any otherwise. 194 | pub result: Option, 195 | /// The amount of gas consumed by the script. 196 | pub gas_used: Option, 197 | /// The receipt data. 198 | pub data: Option, 199 | /// The address of the message sender. 200 | pub sender: Option, 201 | /// The address of the message recipient. 202 | pub recipient: Option, 203 | /// The nonce value for a message. 204 | pub nonce: Option, 205 | /// Current context if in an internal context. null otherwise 206 | pub contract_id: Option, 207 | /// The sub id. 208 | pub sub_id: Option, 209 | } 210 | 211 | #[pymethods] 212 | impl Receipt { 213 | fn __repr__(&self) -> PyResult { 214 | Ok(format!("{:?}", self)) 215 | } 216 | 217 | fn __str__(&self) -> PyResult { 218 | Ok(format!("{:?}", self)) 219 | } 220 | } 221 | 222 | /// An object representing all possible types of inputs. InputCoin, InputContract, InputMessage 223 | #[pyclass] 224 | #[pyo3(get_all)] 225 | #[derive(Debug, Default, Clone, PartialEq, Eq)] 226 | pub struct Input { 227 | /// transaction that this input originated from 228 | pub tx_id: String, 229 | /// The status type of the transaction this input originated from 230 | pub tx_status: u8, 231 | /// The type of the transaction this input originated from 232 | pub tx_type: u8, 233 | /// block that the input originated in 234 | pub block_height: u64, 235 | /// InputCoin, InputContract, or InputMessage 236 | pub input_type: u8, 237 | /// A unique 32 byte identifier for the UTXO. 238 | pub utxo_id: Option, 239 | /// The owning address or predicate root. 240 | pub owner: Option, 241 | /// for InputCoin type: The amount of coins. 242 | /// for InputMessage type: The amount sent in the message. 243 | pub amount: Option, 244 | /// The asset ID of the coins. 245 | pub asset_id: Option, 246 | /// A pointer to the transaction whose output is being spent. 247 | pub tx_pointer_block_height: Option, 248 | pub tx_pointer_tx_index: Option, 249 | /// The index of the witness that authorizes spending the coin. 250 | pub witness_index: Option, 251 | /// The amount of gas used in the predicate transaction. 252 | pub predicate_gas_used: Option, 253 | /// The predicate bytecode. 254 | pub predicate: Option, 255 | /// The predicate input parameters. 256 | pub predicate_data: Option, 257 | /// The root of amount of coins owned by contract before transaction execution. 258 | pub balance_root: Option, 259 | /// The state root of contract before transaction execution. 260 | pub state_root: Option, 261 | /// The input contract. 262 | pub contract: Option, 263 | /// The sender address of the message. 264 | pub sender: Option, 265 | /// The recipient address of the message. 266 | pub recipient: Option, 267 | /// A nonce value for the message input, which is determined by the sending system and is published at the time the message is sent. 268 | pub nonce: Option, 269 | /// The message data. 270 | pub data: Option, 271 | } 272 | 273 | #[pymethods] 274 | impl Input { 275 | fn __repr__(&self) -> PyResult { 276 | Ok(format!("{:?}", self)) 277 | } 278 | 279 | fn __str__(&self) -> PyResult { 280 | Ok(format!("{:?}", self)) 281 | } 282 | } 283 | 284 | /// An object representing all possible types of Outputs. CoinOutput, ContractOutput, ChangeOutput, VariableOutput, ContractCreated 285 | #[pyclass] 286 | #[pyo3(get_all)] 287 | #[derive(Debug, Default, Clone, PartialEq, Eq)] 288 | pub struct Output { 289 | /// transaction that this out originated from 290 | pub tx_id: String, 291 | /// The status type of the transaction this receipt originated from 292 | pub tx_status: u8, 293 | /// The type of the transaction this output originated from 294 | pub tx_type: u8, 295 | /// block that the output originated in 296 | pub block_height: u64, 297 | /// CoinOutput, ContractOutput, ChangeOutput, VariableOutput, or ContractCreated 298 | pub output_type: u8, 299 | /// The address the coins were sent to. 300 | pub to: Option, 301 | /// The amount of coins in the output. 302 | pub amount: Option, 303 | /// The asset id for the coins sent. 304 | pub asset_id: Option, 305 | /// The index of the input. 306 | pub input_index: Option, 307 | /// The root of amount of coins owned by contract after transaction execution. 308 | pub balance_root: Option, 309 | /// for ContractedCreated type: The initial state root of contract. 310 | /// for ContractOutput type: The state root of contract after transaction execution. 311 | pub state_root: Option, 312 | /// for ContractCreated type: The contract that was created. 313 | pub contract: Option, 314 | } 315 | 316 | #[pymethods] 317 | impl Output { 318 | fn __repr__(&self) -> PyResult { 319 | Ok(format!("{:?}", self)) 320 | } 321 | 322 | fn __str__(&self) -> PyResult { 323 | Ok(format!("{:?}", self)) 324 | } 325 | } 326 | 327 | impl From for Block { 328 | fn from(b: hyperfuel_format::BlockHeader) -> Self { 329 | Self { 330 | id: b.id.encode_hex(), 331 | da_height: b.da_height.into(), 332 | transactions_count: b.transactions_count.encode_hex(), 333 | message_receipt_count: b.message_receipt_count.encode_hex(), 334 | transactions_root: b.transactions_root.encode_hex(), 335 | height: b.height.into(), 336 | prev_root: b.prev_root.encode_hex(), 337 | time: b.time.into(), 338 | application_hash: b.application_hash.encode_hex(), 339 | consensus_parameters_version: b.consensus_parameters_version.into(), 340 | state_transition_bytecode_version: b.state_transition_bytecode_version.into(), 341 | message_outbox_root: b.message_outbox_root.encode_hex(), 342 | event_inbox_root: b.event_inbox_root.encode_hex(), 343 | } 344 | } 345 | } 346 | 347 | impl From for Transaction { 348 | fn from(t: hyperfuel_format::Transaction) -> Self { 349 | Self { 350 | block_height: t.block_height.into(), 351 | id: t.id.encode_hex(), 352 | input_asset_ids: t 353 | .input_asset_ids 354 | .map(|d| d.into_iter().map(|i| i.encode_hex()).collect()), 355 | input_contracts: t 356 | .input_contracts 357 | .map(|d| d.into_iter().map(|i| i.encode_hex()).collect()), 358 | input_contract_utxo_id: t.input_contract_utxo_id.map(|d| d.encode_hex()), 359 | input_contract_balance_root: t.input_contract_balance_root.map(|d| d.encode_hex()), 360 | input_contract_state_root: t.input_contract_state_root.map(|d| d.encode_hex()), 361 | input_contract_tx_pointer_block_height: t 362 | .input_contract_tx_pointer_block_height 363 | .map(|t| t.into()), 364 | input_contract_tx_pointer_tx_index: t 365 | .input_contract_tx_pointer_tx_index 366 | .map(|t| t.into()), 367 | input_contract: t.input_contract.map(|d| d.encode_hex()), 368 | maturity: t.maturity.map(|t| t.into()), 369 | mint_amount: t.mint_amount.map(|t| t.into()), 370 | mint_asset_id: t.mint_asset_id.map(|d| d.encode_hex()), 371 | tx_pointer_block_height: t.tx_pointer_block_height.map(|t| t.into()), 372 | tx_pointer_tx_index: t.tx_pointer_tx_index.map(|t| t.into()), 373 | tx_type: t.tx_type.to_u8(), 374 | output_contract_input_index: t.output_contract_input_index.map(|t| t.into()), 375 | output_contract_balance_root: t.output_contract_balance_root.map(|d| d.encode_hex()), 376 | output_contract_state_root: t.output_contract_state_root.map(|d| d.encode_hex()), 377 | witnesses: t.witnesses.map(|d| d.encode_hex()), 378 | receipts_root: t.receipts_root.map(|d| d.encode_hex()), 379 | status: t.status.as_u8(), 380 | time: t.time.into(), 381 | reason: t.reason, 382 | script: t.script.map(|d| d.encode_hex()), 383 | script_data: t.script_data.map(|d| d.encode_hex()), 384 | bytecode_witness_index: t.bytecode_witness_index.map(|t| t.into()), 385 | salt: t.salt.map(|d| d.encode_hex()), 386 | policies_tip: t.policies_tip.map(|t| t.into()), 387 | policies_witness_limit: t.policies_witness_limit.map(|t| t.into()), 388 | policies_maturity: t.policies_maturity.map(|t| t.into()), 389 | policies_max_fee: t.policies_max_fee.map(|t| t.into()), 390 | script_gas_limit: t.script_gas_limit.map(|t| t.into()), 391 | mint_gas_price: t.mint_amount.map(|t| t.into()), 392 | bytecode_root: t.bytecode_root.map(|r| r.encode_hex()), 393 | subsection_index: t.subsection_index.map(|t| t.into()), 394 | subsections_number: t.subsections_number.map(|t| t.into()), 395 | proof_set: t.proof_set.map(|p| p.encode_hex()), 396 | consensus_parameters_upgrade_purpose_witness_index: t 397 | .consensus_parameters_upgrade_purpose_witness_index 398 | .map(|t| t.into()), 399 | consensus_parameters_upgrade_purpose_checksum: t 400 | .consensus_parameters_upgrade_purpose_checksum 401 | .map(|a| a.encode_hex()), 402 | state_transition_upgrade_purpose_root: t 403 | .state_transition_upgrade_purpose_root 404 | .map(|a| a.encode_hex()), 405 | } 406 | } 407 | } 408 | 409 | impl From for Receipt { 410 | fn from(r: hyperfuel_format::Receipt) -> Self { 411 | Self { 412 | receipt_index: r.receipt_index.into(), 413 | root_contract_id: r.root_contract_id.map(|d| d.encode_hex()), 414 | tx_id: r.tx_id.encode_hex(), 415 | tx_status: r.tx_status.as_u8(), 416 | tx_type: r.tx_type.to_u8(), 417 | block_height: r.block_height.into(), 418 | pc: r.pc.map(|d| d.into()), 419 | is: r.is.map(|d| d.into()), 420 | to: r.to.map(|d| d.encode_hex()), 421 | to_address: r.to_address.map(|d| d.encode_hex()), 422 | amount: r.amount.map(|d| d.into()), 423 | asset_id: r.asset_id.map(|d| d.encode_hex()), 424 | gas: r.gas.map(|d| d.into()), 425 | param1: r.param1.map(|d| d.into()), 426 | param2: r.param2.map(|d| d.into()), 427 | val: r.val.map(|d| d.into()), 428 | ptr: r.ptr.map(|d| d.into()), 429 | digest: r.digest.map(|d| d.encode_hex()), 430 | reason: r.reason.map(|d| d.into()), 431 | ra: r.ra.map(|d| d.into()), 432 | rb: r.rb.map(|d| d.into()), 433 | rc: r.rc.map(|d| d.into()), 434 | rd: r.rd.map(|d| d.into()), 435 | len: r.len.map(|d| d.into()), 436 | receipt_type: r.receipt_type.to_u8(), 437 | result: r.result.map(|d| d.into()), 438 | gas_used: r.gas_used.map(|d| d.into()), 439 | data: r.data.map(|d| d.encode_hex()), 440 | sender: r.sender.map(|d| d.encode_hex()), 441 | recipient: r.recipient.map(|d| d.encode_hex()), 442 | nonce: r.nonce.map(|d| d.encode_hex()), 443 | contract_id: r.contract_id.map(|d| d.encode_hex()), 444 | sub_id: r.sub_id.map(|d| d.encode_hex()), 445 | } 446 | } 447 | } 448 | 449 | impl From for Input { 450 | fn from(i: hyperfuel_format::Input) -> Self { 451 | Self { 452 | tx_id: i.tx_id.encode_hex(), 453 | tx_status: i.tx_status.as_u8(), 454 | tx_type: i.tx_type.to_u8(), 455 | block_height: i.block_height.into(), 456 | input_type: i.input_type.as_u8(), 457 | utxo_id: i.utxo_id.map(|d| d.encode_hex()), 458 | owner: i.owner.map(|d| d.encode_hex()), 459 | amount: i.amount.map(|d| d.into()), 460 | asset_id: i.asset_id.map(|d| d.encode_hex()), 461 | tx_pointer_block_height: i.tx_pointer_block_height.map(|d| d.into()), 462 | tx_pointer_tx_index: i.tx_pointer_tx_index.map(|d| d.into()), 463 | witness_index: i.witness_index.map(|d| d.into()), 464 | predicate_gas_used: i.predicate_gas_used.map(|d| d.into()), 465 | predicate: i.predicate.map(|d| d.encode_hex()), 466 | predicate_data: i.predicate_data.map(|d| d.encode_hex()), 467 | balance_root: i.balance_root.map(|d| d.encode_hex()), 468 | state_root: i.state_root.map(|d| d.encode_hex()), 469 | contract: i.contract.map(|d| d.encode_hex()), 470 | sender: i.sender.map(|d| d.encode_hex()), 471 | recipient: i.recipient.map(|d| d.encode_hex()), 472 | nonce: i.nonce.map(|d| d.encode_hex()), 473 | data: i.data.map(|d| d.encode_hex()), 474 | } 475 | } 476 | } 477 | 478 | impl From for Output { 479 | fn from(o: hyperfuel_format::Output) -> Self { 480 | Self { 481 | tx_id: o.tx_id.encode_hex(), 482 | tx_status: o.tx_status.as_u8(), 483 | tx_type: o.tx_type.to_u8(), 484 | block_height: o.block_height.into(), 485 | output_type: o.output_type.as_u8(), 486 | to: o.to.map(|d| d.encode_hex()), 487 | amount: o.amount.map(|d| d.into()), 488 | asset_id: o.asset_id.map(|d| d.encode_hex()), 489 | input_index: o.input_index.map(|d| d.into()), 490 | balance_root: o.balance_root.map(|d| d.encode_hex()), 491 | state_root: o.state_root.map(|d| d.encode_hex()), 492 | contract: o.contract.map(|d| d.encode_hex()), 493 | } 494 | } 495 | } 496 | -------------------------------------------------------------------------------- /test.py: -------------------------------------------------------------------------------- 1 | import hyperfuel 2 | import asyncio 3 | from hyperfuel import BlockField, TransactionField, ReceiptField, InputField, OutputField 4 | 5 | 6 | QUERY = hyperfuel.Query( 7 | from_block=0, 8 | to_block=1554360, 9 | receipts=[ 10 | hyperfuel.ReceiptSelection( 11 | root_contract_id=["0x4a2ce054e3e94155f7092f7365b212f7f45105b74819c623744ebcc5d065c6ac"], 12 | receipt_type=[5, 6] 13 | ) 14 | ], 15 | field_selection=hyperfuel.FieldSelection( 16 | block=[ 17 | BlockField.HEIGHT, 18 | BlockField.TRANSACTIONS_ROOT 19 | ], 20 | transaction=[ 21 | TransactionField.ID, 22 | TransactionField.STATUS 23 | ], 24 | receipt=[ 25 | ReceiptField.TX_ID, 26 | ReceiptField.RECEIPT_INDEX, 27 | ReceiptField.BLOCK_HEIGHT, 28 | ReceiptField.ROOT_CONTRACT_ID, 29 | ReceiptField.RA, 30 | ReceiptField.RB, 31 | ReceiptField.RC, 32 | ReceiptField.RD, 33 | ReceiptField.DATA, 34 | ReceiptField.RECEIPT_TYPE, 35 | ], 36 | input=[ 37 | InputField.TX_ID, 38 | InputField.OWNER, 39 | ], 40 | output=[ 41 | OutputField.ASSET_ID 42 | ] 43 | ) 44 | ) 45 | 46 | async def test_create_parquet_folder(): 47 | client = hyperfuel.HyperfuelClient() 48 | await client.create_parquet_folder(QUERY, "data") 49 | 50 | async def test_get_height(): 51 | client = hyperfuel.HyperfuelClient() 52 | height = await client.get_height() 53 | print("current height: " + str(height)) 54 | 55 | async def test_get_arrow_data(): 56 | import pyarrow 57 | client = hyperfuel.HyperfuelClient() 58 | res = await client.get_arrow_data(QUERY) 59 | assert(res.data.blocks._is_initialized()) 60 | assert(type(res.data.blocks) == pyarrow.lib.Table) 61 | assert(res.data.transactions._is_initialized()) 62 | assert(type(res.data.transactions) == pyarrow.lib.Table) 63 | assert(res.data.receipts._is_initialized()) 64 | assert(type(res.data.receipts) == pyarrow.lib.Table) 65 | assert(res.data.inputs._is_initialized()) 66 | assert(type(res.data.inputs) == pyarrow.lib.Table) 67 | assert(res.data.outputs._is_initialized()) 68 | assert(type(res.data.outputs) == pyarrow.lib.Table) 69 | 70 | async def test_get_data(): 71 | client = hyperfuel.HyperfuelClient() 72 | res = await client.get_data(QUERY) 73 | 74 | async def test_get_selected_data(): 75 | client = hyperfuel.HyperfuelClient() 76 | res = await client.get_selected_data(QUERY) 77 | 78 | async def test_preset_query_get_logs(): 79 | client = hyperfuel.HyperfuelClient() 80 | contracts = ["0xff63ad3cdb5fde197dfa2d248330d458bffe631bda65938aa7ab7e37efa561d0"] 81 | res = await client.preset_query_get_logs(emitting_contracts=contracts,from_block=8076516,to_block=8076517,) 82 | 83 | async def main(): 84 | print("smoke test hyperfuel-client-python") 85 | await test_create_parquet_folder() 86 | await test_get_height() 87 | await test_get_arrow_data() 88 | await test_get_data() 89 | await test_get_selected_data() 90 | await test_preset_query_get_logs() 91 | 92 | asyncio.run(main()) 93 | --------------------------------------------------------------------------------