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.8.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | 577776992198119c6f3b5bca0d32885af8b889ade0544c6153cfb61af0545de2 |
|
MD5 | cab79a3db4c2f3ebdd129975fa79e7dd |
|
BLAKE2b-256 | 9613b86f0b1ed6748a27c7b387fab1b38e7ac90e4b230e6d413c25a937f84ae9 |
Hashes for ccdexplorer_schema_parser-0.1.8-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e4374e02ceb71637cfdd9d97405f4beb0b5aa0d293db4d56be7c8d3d2732eb11 |
|
MD5 | 5becdc6be8cb3e5e446be5acc98e4d75 |
|
BLAKE2b-256 | a5fb0a1de34f52539db12ed32925c1c6d423c9ea8533b788667c9702ed5c8ec4 |
Hashes for ccdexplorer_schema_parser-0.1.8-pp310-pypy310_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 02c471b9489ee2d0697167c99f94671d7fe85e7c9b4b989c146f02df99d96ad7 |
|
MD5 | 3cdbdb2d0b60270a0757916e42a0426f |
|
BLAKE2b-256 | 11e3d48387955bcbfcc5d57fea96ac15841d7c9d9a272393a0ea2ec09f3ab36c |
Hashes for ccdexplorer_schema_parser-0.1.8-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8843321d446a146f7a49f7272daa1b8251dd14639893f85065f69e0f4c79ea82 |
|
MD5 | 8836372a872e2c8b68d19da141a2036a |
|
BLAKE2b-256 | 2c939d3487d1a99d49e15644daddb5e2973b71579abfb78fb4fabab99049af46 |
Hashes for ccdexplorer_schema_parser-0.1.8-pp39-pypy39_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 55dd5a0513cc03cdce99ae15293bae2ee7be5ca21d02c40c3aa280ece890202d |
|
MD5 | 993178e8643f88bdd936d1ec62a16979 |
|
BLAKE2b-256 | 6770b724d0e8c0315f7e5fcf7d7686fc9f6d601f8c8efaf4257583744f607c71 |
Hashes for ccdexplorer_schema_parser-0.1.8-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4ab42be6aa69e38de00ef62dfe0f22e6d14efa1a91f4f5fdb1b0737a6f1520b4 |
|
MD5 | e201aa8c5820f3c32cc7852ed8ffa8df |
|
BLAKE2b-256 | 457e72911886308724f2367b096e57a4b385dabba01ffeb215e0c6648056cffb |
Hashes for ccdexplorer_schema_parser-0.1.8-pp38-pypy38_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 592459a7885b70eee24596cb0747c0b34485363317ee911813efe3790368247f |
|
MD5 | 6a70ef9a4b7351d23728b769fc869c35 |
|
BLAKE2b-256 | b0c53d7c474ff63a319342a357d7fc4c069bd407eadc44d392a4f861fc1040ab |
Hashes for ccdexplorer_schema_parser-0.1.8-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 1047f8046d882040caeeef38bc794cdcb9d523b6c5e8462f8002903d5d1dfcb6 |
|
MD5 | 1437a146f22990ebd87c57ef74ec6a8a |
|
BLAKE2b-256 | 111c7cf1d9c0789c613e930445a734db25b27d43274ba877bfb97241448b3b63 |
Hashes for ccdexplorer_schema_parser-0.1.8-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 04f3528c9939d6b6ebf51f48cf09bd3f8ed0b3f5761e7033c5c69ac657f61ec3 |
|
MD5 | 35ab55407c614fb9333dd79d6e996d3f |
|
BLAKE2b-256 | 658152e2842eb7921a490db9327a8155ed274d5a51cc1d66466badecbf259035 |
Hashes for ccdexplorer_schema_parser-0.1.8-cp312-cp312-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f7ff7de9b58a567f149a02bf3de691a04e9cfb5d98979547c487243dd0608e9 |
|
MD5 | e17d4891d0d4e0660924ac90c8e74a10 |
|
BLAKE2b-256 | 589c16c789b45b1839f06627ade552f770996cf893d14131f4bb1b9b0fae1155 |
Hashes for ccdexplorer_schema_parser-0.1.8-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7f4b7037ced2b588052c965faaee9b78c3385d0b7e258b7ec19be71d9f3eec5e |
|
MD5 | b756e3ba2e7ca8357dca92f988969fe6 |
|
BLAKE2b-256 | 03e960e16aff6e2c53cddd0c5472efb170899796b6a7c06ed1503a2da21b2008 |
Hashes for ccdexplorer_schema_parser-0.1.8-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ebd8307121d9e150a762c205a6e5155a6dcba38efab4c8e9c190319499fb79f9 |
|
MD5 | 6e464c2aa6c77dc306f3ddb9e77851ec |
|
BLAKE2b-256 | 8bbc884a2708c598d8710952611271666e76d5cde01c5cc8d70619918c616baa |
Hashes for ccdexplorer_schema_parser-0.1.8-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3b4e0ce3e56e6d8da5534ddd970c9b455a24342d4fc78c1443e1f774ee88923c |
|
MD5 | 37e8a159caa01519e006590f3f0662f5 |
|
BLAKE2b-256 | 605b2cfccdf3f1c20739d9ac1dc714a7c670fa057df529fb3bb9aa49ab22517e |
Hashes for ccdexplorer_schema_parser-0.1.8-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 71417abf2e71319582e1fc0fff20a7369771b3602cab3d4c7b15ed163e7104c3 |
|
MD5 | 09a1fcfc9e7ad821650c27a7b11447cb |
|
BLAKE2b-256 | 4697666dad7c01e55e0b07311418f56781e7cc6685603a5d71dd23b6bffd23f0 |
Hashes for ccdexplorer_schema_parser-0.1.8-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7ad1ffb0b892b235c9177b1972d05417725926737c647f600b66472226076b3b |
|
MD5 | cd1d058286c121b3ffdbd6936333b059 |
|
BLAKE2b-256 | f30fe841256c86ba828cffca89acba7c26d7a5ef3c2a08b5a992f6046203e5a7 |
Hashes for ccdexplorer_schema_parser-0.1.8-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6bfa9f0ebb937fba8bf273cd95600358839ed4062f0ec1c7794651420c38f0c7 |
|
MD5 | d24e47ad8c087c8a00618badb8329470 |
|
BLAKE2b-256 | f7580dfcd7b8642c40eb03c7c58a4db447bf765c9012ab025c2af2e555afad69 |
Hashes for ccdexplorer_schema_parser-0.1.8-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ce7015789acbecf3b64445355545e10ff1cfa1298727baacbeec9f46529e8c2e |
|
MD5 | 0c3d5f2f4f6bfd2e9fa68b92a11b7a94 |
|
BLAKE2b-256 | 59c8791758f731c824c9dfc5d42c18dae1eb934e011869d6af6239fc5df82e55 |
Hashes for ccdexplorer_schema_parser-0.1.8-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | cb0b63306ccd6de1c88d6d4b44c67c03f3782bd14bf36e474d3a453e75b9b03a |
|
MD5 | b68469fbf37c47c01ac203636273e6b4 |
|
BLAKE2b-256 | 3ed7165ac6c6b8e48241bdfd23ca72c05c42d39ce780cb2dd998cff0d4dd25c1 |
Hashes for ccdexplorer_schema_parser-0.1.8-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | a6014906c7fb988274c07441eb70eb26fd36364f18fd1802dec69b95c81f3b19 |
|
MD5 | 2658603cb482740be5dd8ba007982c8d |
|
BLAKE2b-256 | be2e7a112eec1fd7dc291898685d3f17ab402303a3a01fdf46cf2acda2eee6a9 |
Hashes for ccdexplorer_schema_parser-0.1.8-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8f7c544a703bfe8aef7c38949fd731fed89710163b15fc67dddf12b910071b3a |
|
MD5 | 1d6a3ab5d53c01d6bbd64daa76f4a6d6 |
|
BLAKE2b-256 | 6003c002e37a3586962a9afbbcf94d5ec444cdaa5e684be71b0af6cfbe4d7e72 |
Hashes for ccdexplorer_schema_parser-0.1.8-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 84f6e08198d2ca33cb568188e1e0595d787bb3bbe944ebd01b593da5bab6293f |
|
MD5 | b5090d212e57390427c8883ce4ebaf21 |
|
BLAKE2b-256 | d66974ff88dc59dc273486f806ac2fa0b85db009945df09298fd6ff3e4d3fbf4 |
Hashes for ccdexplorer_schema_parser-0.1.8-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e98ce2d7037cb84cc911494303066f4ac8794cc0e379fa369943716a4627f628 |
|
MD5 | 4e223e70436ad8fa24b1f36a3e230b05 |
|
BLAKE2b-256 | 2849432751127cf430143204f62cf2bbd8c266617d0dea08a5f68920b201f211 |
Hashes for ccdexplorer_schema_parser-0.1.8-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e5035c3cb5ff2a90df9dbdc05d8659abb4bfef76a89caee4746ac3488ac2aaa3 |
|
MD5 | ef2ed0b8d6ac32fcbe8e47dec1e93582 |
|
BLAKE2b-256 | 9f4b902add7f39f79c739f11117695b7e34ff23f0b0ae1e6c7115302cce23b29 |