No project description provided
Project description
Schema parsing via Rust bindings
This repository holds the Rust bindings in src/lib.rs
. They are simple exports of functionality
from concordium-contracts-common
. To build them locally, you require maturin and Rust installed.
We've tested with Rust 1.74 and 1.77.
Project structure
The entrypoint for Python consumers is the ccdexplorer_schema_parser
package which has a
single class Schema
. The constructor will instantiate the schema from a
deployed Wasm module.
After that the constructed object can be used to parse events or return values using the schema in the module.
from ccdexplorer_schema_parser.Schema import Schema
from ccdexplorer_fundamentals.enums import NET
from ccdexplorer_fundamentals.GRPCClient import GRPCClient
from ccdexplorer_fundamentals.GRPCClient.types_pb2 import VersionedModuleSource
versioned_module: VersionedModuleSource = (
self.grpcclient.get_module_source_original_classes(
module_ref, "last_final", net=NET(net)
)
)
schema = Schema(versioned_module.v1.value, 1) if versioned_module.v1
else Schema(versioned_module.v0.value, 0)
To parse a logged event from an account_transaction
, use the following call:
event_json = schema.event_to_json(
source_module_name, bytes.fromhex(event)
)
Where source_module_name
is the name of the module (corresponding to the module_ref
you have used to parse the schema and event
is the hex
representation of the logged event).
If this can be parsed, the result will be a dictionary.
Building
Run maturin build
.
This will produce a python wheel in target/wheels
that will contain both the
compiled Rust binaries and python wrappers. The compiled package is platform
specific, so a package built on, e.g., Linux will not work on Windows.
Deploy
This repository has a CI.yml
that builds this package for various configurations and publishes this to Pypi.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distributions
Hashes for ccdexplorer_schema_parser-0.1.6.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 119988b68d54d2f90c3ca820a3192e3465a26a95c59dd1b6b407af01d400e53e |
|
MD5 | bfe842abdd71955c826ab1b059fc25e1 |
|
BLAKE2b-256 | 1a79c33d272b3410f03520900bf3f7bd032ad5c57d14cfa9451724c1cd432d36 |
Hashes for ccdexplorer_schema_parser-0.1.6-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f350016e06e8e81aa5e8fe70ffe3e42165f248e8fdbf52099e590895b881b3fc |
|
MD5 | c5a193ffce08ab16307f86a454a93955 |
|
BLAKE2b-256 | 966bbb4bc88512b49fed35b3c43a3a9c2fb37cfffd2faf57d616b3178d3f73b4 |
Hashes for ccdexplorer_schema_parser-0.1.6-pp310-pypy310_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd0e1265aa486bb57e491fdc15f64b5d20169b4f29fc3600d49587824f09a8e7 |
|
MD5 | a321cd504adc958f8599ef6db7f180ff |
|
BLAKE2b-256 | 016f015c46e60bc2c0d14961eeea99339ef4967a8229cac08ef7041d3810a6ae |
Hashes for ccdexplorer_schema_parser-0.1.6-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 813eb2503b57a125f1b13b645c62027dcde4effb49110acbe928296c8ef054f6 |
|
MD5 | aa6befb5485ef3da1a4f2bcd3252405a |
|
BLAKE2b-256 | 9934b45199032f39699a239eff116a7dc01c84aa423eb7e6573672a61e1b036e |
Hashes for ccdexplorer_schema_parser-0.1.6-pp39-pypy39_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4048604b787e6ad308fb5aa3019faa2f6b0b7658f0462ca4c4ab1d84492922dd |
|
MD5 | efb164ae46f6d8330efec42048a86dc4 |
|
BLAKE2b-256 | 1baad60d264ddb1eaf5ad2ff0af4d7a2ddccd99e00977f35e37203171b76be03 |
Hashes for ccdexplorer_schema_parser-0.1.6-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f62263d4639992919efd4e0e7d8028e85b8a8faaed3b421adcfdd39e941d75f |
|
MD5 | 29091e2e4bda36feb51b6d897297a7c0 |
|
BLAKE2b-256 | 6718de4dd7a408476e7cdecfc275ad834c5dd0ba58e38cf3563ed3eec5f49d2a |
Hashes for ccdexplorer_schema_parser-0.1.6-pp38-pypy38_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 121db4f75ada2bdb623b19125adb3eb55b4c05434be0f6ff80a5b5bcd03e0cae |
|
MD5 | 8147bd69799f7ca2e79fc8fd9929831c |
|
BLAKE2b-256 | c3dde944e0486c09461bb91ea7b2aaa690031581a6910aafca33c51656c76c08 |
Hashes for ccdexplorer_schema_parser-0.1.6-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 543a0bc99a57e3be71b8936b4a2db264e2046e54d31ed5ce62db4f5ddfd0d4c5 |
|
MD5 | c72f4f60fcdbaa8e9668288e7bb4d32d |
|
BLAKE2b-256 | c93dfeb61e95a6cf48de9b2bb95f6501395843fb1a16425bc05c6497c8b7c1a0 |
Hashes for ccdexplorer_schema_parser-0.1.6-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ff4efa536b4aa323d3b7e47e1d1647c91191b6d3a51ac1f0ce576004f5a563d1 |
|
MD5 | 24a3ad4533faafc44ac69dfcaf480c04 |
|
BLAKE2b-256 | 9b88b447f771116c0a342e7d7813d5a78913cffc0c860a6c12cea5e885670bb0 |
Hashes for ccdexplorer_schema_parser-0.1.6-cp312-cp312-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c629461796e4d7f0ad88085d0072a306b1bb4d5ba4e5ae70490b9ba5c787f6a4 |
|
MD5 | e1f6582b04353f57bb90b0b7c71c29da |
|
BLAKE2b-256 | e88689a688a6a377f7b539e5c943e37a232ef8556e659df40ee39f16468f4a0c |
Hashes for ccdexplorer_schema_parser-0.1.6-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 01ca7cbb47a15c1445e7277ac0a4999a29afd58171294117debbf915d39a83bb |
|
MD5 | 0a5246a57ba1155d2086ae27b3b7755d |
|
BLAKE2b-256 | 9492a72f738d62a98ac80d7a7dc6f3122837f19bf7e38de3714f7df73ee266aa |
Hashes for ccdexplorer_schema_parser-0.1.6-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e3d79813ec7e577622899139c55c811ef4b24a59b98729f000769dd9fd711fc4 |
|
MD5 | a129f899fcf2897d1759728670be36f9 |
|
BLAKE2b-256 | 25daa239e6b6a019fdda2d1fd3312c6e3e5e021f60a44ffd932d6caf6f12869e |
Hashes for ccdexplorer_schema_parser-0.1.6-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4d772d524d0962d9fd1910524f124247d8b535d6127dfabf4bea6934fb6cdd60 |
|
MD5 | 6f331702fb2e80377522bf97e085237e |
|
BLAKE2b-256 | 0ae52764e970d915bfe020c1a99bf85475c951b1e9f3d1e63a7c4aca62718016 |
Hashes for ccdexplorer_schema_parser-0.1.6-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 03a095d0ad56e369bb16f3c43bf72097c527b9794774d74f39d99ec63bca5a15 |
|
MD5 | 96f66c83b8de3e1fae4e31c4ac5a8f44 |
|
BLAKE2b-256 | 4f3f04aaf62e0138fd5e708e1145f99b1ab1843daef0b28f77c78ab0bb0def7e |
Hashes for ccdexplorer_schema_parser-0.1.6-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 91d5c16590c6e062cd3f57dd95ea21f47d1d0d47009490e97212b5d03bb86ede |
|
MD5 | d928470be25ba716240616b0c71e62d8 |
|
BLAKE2b-256 | d1fb382bca9ab6a862a9dc49315fbab1763f55da5ed739a1ce6af4808c0b6ca5 |
Hashes for ccdexplorer_schema_parser-0.1.6-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 386096a900ab78034ae2707885035eaa6b815698d05d64a49e03d0d0fa9772a5 |
|
MD5 | 4b13bea50573e42be30efdee5de45953 |
|
BLAKE2b-256 | 90035ceffee248a5ba1a6691bff6d083d2d54b5b3641d9a78855647f4d49c692 |
Hashes for ccdexplorer_schema_parser-0.1.6-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c69f3f60c64e59084d234903ac66ba3daabfb101cd65c88d52a2db90ea12a474 |
|
MD5 | 16e02f1abbc8cd1abbc2c10998e88c85 |
|
BLAKE2b-256 | e0b2feff604eee9f80c6f26e9a7d1fc11f7b8b6835c64579fb238d40e4731217 |
Hashes for ccdexplorer_schema_parser-0.1.6-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c40d63d2e7cef415b3b1a0c7035eca872dab49399d6830c05af30a12f043bed6 |
|
MD5 | d0f714c85fbc3ef67ab0dc5ce38a95cb |
|
BLAKE2b-256 | dd457487d3a53c6ae56be1fb8ad887aa9dbe83a5b0b488b76abf93bb26b117e3 |
Hashes for ccdexplorer_schema_parser-0.1.6-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 37cdca03cd66fda9d8db4e7b5c59615ad592f0b73e39af918a4fb51022b9f731 |
|
MD5 | 0e10e9b3ea86d92ec9049ff2c4585b37 |
|
BLAKE2b-256 | a0f16c831e5e41af48709da8f9f453489d42ea19fe0940e4d91b1e93b34ec6d1 |
Hashes for ccdexplorer_schema_parser-0.1.6-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d1af23924db2edb04df28b9393abeb8dd87e8ecc1503cb3ccfb4a540afda0125 |
|
MD5 | 680b28a6fdd1f3a291ef4cce03cf7484 |
|
BLAKE2b-256 | df81584552141e3d57049a07c62705fb8019a00ea679e8ad0462b029f9eafb6f |
Hashes for ccdexplorer_schema_parser-0.1.6-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 374fab5a2aa91547b34bd04221db5c09e8f1766b8f57d855ed2feb17448e96f2 |
|
MD5 | e2a9981f95dda836a2ecb6c7018c0ee1 |
|
BLAKE2b-256 | afc0cb413a228026c0a5f307b0a733297a18e87f8135f7d55b75d476ca68836b |
Hashes for ccdexplorer_schema_parser-0.1.6-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f77cf49170df5a9a5ca12a68cd6e26b8650cbddedea2c6b2e9e3a5ad4d556392 |
|
MD5 | 22c5d8ce295cfa2d3b6978354fa3444d |
|
BLAKE2b-256 | f376e258345e7d21463ba313310c82a8d846f5c111b615752a46ea9d26f02f7f |
Hashes for ccdexplorer_schema_parser-0.1.6-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 959871b9ca9d2e1ac4feb7b9e6fcac9bc18fb221b43a1b8d0baa315fa58d9166 |
|
MD5 | 585eb78267f55fc67e5853b61d9c626f |
|
BLAKE2b-256 | 44780e840cb8d5ff6a573639ecfa0368aabcb5d130bd3c8eafe60b15b8b62597 |