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.7.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | b3587038abc29f5812a3d351ea4a7bcd412a8ee2f441f73e54801e688b6017f9 |
|
MD5 | faee3eb76f47394594732567c86a692e |
|
BLAKE2b-256 | 6f0be1c66ec87aba95c5757253eb37a9ae7655f17ff1b5288d7df9a8911588b8 |
Hashes for ccdexplorer_schema_parser-0.1.7-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 094d0579d7cc9621b7ceaf324a06d4c98be92378dc229c6934dc7f42cc83e856 |
|
MD5 | 5e2a0f776b9cfa0b354e939e1c5cd379 |
|
BLAKE2b-256 | f46c71d1bdbb5790e8cabe768748694cdd00753e4a5c1a01a842278fad8b27b3 |
Hashes for ccdexplorer_schema_parser-0.1.7-pp310-pypy310_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5628838c12a8e71dd3e0d4c4a48e9792bb019e37549fc8516f161f3bf2a8bea8 |
|
MD5 | e40f9bc6468a9fa1dc8db2770a7272fd |
|
BLAKE2b-256 | 43255c47a8cf03e168a62ab02eba1715b12475e397b35111b082d5261cb36cc1 |
Hashes for ccdexplorer_schema_parser-0.1.7-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2de201c20de94a56ecf2263b1ea9764a90899e6e8abc0294f4b47b114c07722e |
|
MD5 | b5cf8041fc69c723cba3888bf2b72d42 |
|
BLAKE2b-256 | fea2c610dc299b9a6fedeb4e980186b12155728371c8907f49e2fcaef6c9a409 |
Hashes for ccdexplorer_schema_parser-0.1.7-pp39-pypy39_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 07cd7175a9df6a109fcbdada3fba21e1fe1b89ddd8cac6ae57640d059b082812 |
|
MD5 | f960a0d480393253c024e3adb002bbb0 |
|
BLAKE2b-256 | 0ae1c709fc8bb56d5212e0cadba697ddec84bfd263ed98ffb29542597394dcd3 |
Hashes for ccdexplorer_schema_parser-0.1.7-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 26a3c46a445925b2d0cec810d08d892d4225e28589dab6c2df74843e22ec28f5 |
|
MD5 | daab8eddb6e6f06e688c13a135828ec4 |
|
BLAKE2b-256 | 155620b0d38c5ab49fe1fc8fd5d62ae8f9f7e47d65396e22251dfeb74f004a85 |
Hashes for ccdexplorer_schema_parser-0.1.7-pp38-pypy38_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fc9aac11d6b11a62940ac38a4ef09cae40f398b1acb897de8d4862f856dcaf0c |
|
MD5 | cdcae5777c1a0ca000370ff7e19cf3d1 |
|
BLAKE2b-256 | 29e9be3f6b84834e490e4064b1da84ddf9e914a487c6bf8115236eb3b018778a |
Hashes for ccdexplorer_schema_parser-0.1.7-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 27302bdd4bbb03d82ff7428bbfa0b4ee0d3a6ede900bab81ff1f7a4a107f6e7b |
|
MD5 | 20e8318d9a5bed2b6d8634f490de523e |
|
BLAKE2b-256 | 90cac5be03f7320f6ceb80537915e2c254aca93792d6f6a61dfabeac3ee8acf5 |
Hashes for ccdexplorer_schema_parser-0.1.7-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 2e947adf2ee4c6dfa7d32cf2f7f446c99f877884db773b40c0aa2f3ba2c5eda2 |
|
MD5 | fa78e5b4ba82ffe4f6a15781d9a76d4b |
|
BLAKE2b-256 | 35edc5a4e73b262dfa7fc398141793ab283f26f2153ef08e24d82dbad4bad677 |
Hashes for ccdexplorer_schema_parser-0.1.7-cp312-cp312-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4f96dee31e2605ec25b3241851c028a444430e3b2c2fde8eca93a3ae9f244652 |
|
MD5 | b04fd044d9d7a92831597f432293ca3b |
|
BLAKE2b-256 | 5609285035107c9fbfa35e1581cf3f96a1aa98c4e5ba9546de1559f404b4e66e |
Hashes for ccdexplorer_schema_parser-0.1.7-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4fe7855af5a000f623a12573bdbae16a18f4decd73e4b26e0ddf238554bbd905 |
|
MD5 | 3086bbadece6970c77e097965696f627 |
|
BLAKE2b-256 | a6f5493314b6544ee620cec9ffe6ad0e92b3fabf838ffd2849782101b13b17bb |
Hashes for ccdexplorer_schema_parser-0.1.7-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c737d33cae2996d99419f469a03b1b63c6d182087355a6cc793f09615906f18 |
|
MD5 | 10d55ea9eafb4f86220e0937282033f4 |
|
BLAKE2b-256 | dd13dd9932504dcd53f35b1aea6bb7c06e3476771fdcc74dbf7092f220ae8086 |
Hashes for ccdexplorer_schema_parser-0.1.7-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 788b3f10658d74c6bd8cfdf3673d8b5b59a9f2262432c1071e35aae253a7ec95 |
|
MD5 | 9cee85158d3a226e6235ce55382aea15 |
|
BLAKE2b-256 | c50eae8cc274fc7604f9ead801c2d96bb71ec283e9c26480cc546953633480c0 |
Hashes for ccdexplorer_schema_parser-0.1.7-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 34a4e8048e7f8702abeb10b794a211800fddc30d67488b64bc283c30dd6900e9 |
|
MD5 | 150709247afc2361c1a9227e110d4621 |
|
BLAKE2b-256 | a835b2c261cdbb8b934b3b9bdb3cb15eed62133859d657aae4e18abe2f9857b8 |
Hashes for ccdexplorer_schema_parser-0.1.7-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a62be428695d2296cedd3ea2c5c954545248a80eeb2b19caaf4e41c9abaca52d |
|
MD5 | 1a60d3d08b07296ec535a2eb99cbfc8f |
|
BLAKE2b-256 | 624820c622af71230e588641de4707d38da3d825ba31b1e96b2148c143ef0439 |
Hashes for ccdexplorer_schema_parser-0.1.7-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7382a170b422b872725b187a543c6003d049b2eeeb161f54260605fc4182f828 |
|
MD5 | 9f3b158dc29bdae84f82fe405cb9dc8e |
|
BLAKE2b-256 | 2bf7df57f5f15e23d2ea41067707d8b37a4760a91e11cf580342d36bb071a4fd |
Hashes for ccdexplorer_schema_parser-0.1.7-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 81f7d12602a21e11e4c7d351f9321f5f91c31876eea9965ba9973f6d9174e543 |
|
MD5 | 733ffd9781fba171eb1118362dc7eb81 |
|
BLAKE2b-256 | f7d25146aa581743a55c4b80017dd07efdde101c52456f12ef3aec76cabb4ca7 |
Hashes for ccdexplorer_schema_parser-0.1.7-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ba6d847fbcc2490ce859dd66ddb5ba0ea6bb16bed5b042917989875256f5e1b0 |
|
MD5 | 1dc2a1d3aeb61fe3c1cc0bdfcf4c0a85 |
|
BLAKE2b-256 | bec0ac230c5e2319a66eb913a9645db29adf611928fa1ab65dab54d3b37c064e |
Hashes for ccdexplorer_schema_parser-0.1.7-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9ffabf50ebf3116dab394870d0c3646c32cefbb3bc284dc74769740051606c8a |
|
MD5 | f2341ce2c5945ea1ed6c503713fc7c67 |
|
BLAKE2b-256 | cfb7c02da31b93ad2f94a8e1f3c8d550c9dfef88f3c2654867bc6739be840314 |
Hashes for ccdexplorer_schema_parser-0.1.7-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9f5c826c2fca1bca5a4159e0902fa2b596b38150f05f1a766ebb74667f7762c5 |
|
MD5 | caa50a0e57aab95c3717cbacb3b7a4f3 |
|
BLAKE2b-256 | 52fe7fb4ec2173c09e4c1d13a6761ccaabf7e0a72776aff5bcdd1c1a85b23c54 |
Hashes for ccdexplorer_schema_parser-0.1.7-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5daaaa8246478179489d14b74d12012e6e2eee8934faaf5c4687519a09230993 |
|
MD5 | b2617114c954090e23df049810a8f58e |
|
BLAKE2b-256 | f7cf6dcd7dc646213938b7d2c24143bacdd0817bfdaffc6932e04c177ea4ba51 |
Hashes for ccdexplorer_schema_parser-0.1.7-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 58f289a1f739c420bd6174fb35d302047a27fa4fca57a6f69c14a14f180a1d81 |
|
MD5 | ba865dc04e09432b3877ed5cddec2e1d |
|
BLAKE2b-256 | 5e2152f35b4293c272fbd118215f6d298ed58879e2c7fc12ff140a68ad930299 |
Hashes for ccdexplorer_schema_parser-0.1.7-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f287ffdf377815e72f7e0562c46e3d4a9669a8a28ed9855cfeb87b779dafafa9 |
|
MD5 | 7506554cce41cd3bfb990ce1ffb39b99 |
|
BLAKE2b-256 | 59448972cbf5ef7ad31820e1a72c7fcc6a2f7474c52485ed025b6acf419e2d53 |