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 pip install -r requirements.txt
to install dependencies.
Run maturin build
to build the project.
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
File details
Details for the file ccdexplorer_schema_parser-0.1.14.tar.gz
.
File metadata
- Download URL: ccdexplorer_schema_parser-0.1.14.tar.gz
- Upload date:
- Size: 22.8 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 23c1001050f97e3ed312c64fede16db20c4dc94745b049857ba01a6ab7f7063a |
|
MD5 | de68a2b7122d0ca0473987f5d84eeda2 |
|
BLAKE2b-256 | 95e226599dc458321e70b27b83cbee94a8fa2faafbe151d475de760ec030fd99 |
File details
Details for the file ccdexplorer_schema_parser-0.1.14-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: ccdexplorer_schema_parser-0.1.14-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 627.6 kB
- Tags: PyPy, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 69ed6a40b57dc74ebe992e897e334ccaf8598e9cb93c2648d823ca37791e8dcb |
|
MD5 | 7123d9b4b0f6aab150be0e7e095a18dc |
|
BLAKE2b-256 | e3afb53f90637bec16137798679eea0ed5c45a7898112b76074ebef91913a4f9 |
File details
Details for the file ccdexplorer_schema_parser-0.1.14-pp310-pypy310_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
.
File metadata
- Download URL: ccdexplorer_schema_parser-0.1.14-pp310-pypy310_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
- Upload date:
- Size: 612.2 kB
- Tags: PyPy, manylinux: glibc 2.17+ ARMv7l
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | e3b307d857630a745cb60ef517989d25523810c7d732905f37731c993e2afd8c |
|
MD5 | 23286dc44348c4b34a99c560a58ed166 |
|
BLAKE2b-256 | 019c47c06686735fec4930a4fdcab906d1d41d75176e4c82cdc6409b03e0fe4b |
File details
Details for the file ccdexplorer_schema_parser-0.1.14-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: ccdexplorer_schema_parser-0.1.14-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 627.6 kB
- Tags: PyPy, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 473da638b409ab182bb3a25dc60e1644d58778f1fb4ec424863c3d663837bd63 |
|
MD5 | 00a596abfba70d399e02d521b24bf7a3 |
|
BLAKE2b-256 | b7a5b885bbc6f1dbe04f4818efeb65f2521ef33cf19b6c166815de702112f683 |
File details
Details for the file ccdexplorer_schema_parser-0.1.14-pp39-pypy39_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
.
File metadata
- Download URL: ccdexplorer_schema_parser-0.1.14-pp39-pypy39_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
- Upload date:
- Size: 612.2 kB
- Tags: PyPy, manylinux: glibc 2.17+ ARMv7l
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | d9c3a900005bbe34468cf75eacd37ecbb8fa7c42c6d8ba73f79a2692d1a326f9 |
|
MD5 | dac8fa9c17cd61160b21852f9c067d9f |
|
BLAKE2b-256 | 8254b9edd98205f59fa80b2442be62fedd8a151e2abd827808c14e11d80235e9 |
File details
Details for the file ccdexplorer_schema_parser-0.1.14-pp38-pypy38_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
.
File metadata
- Download URL: ccdexplorer_schema_parser-0.1.14-pp38-pypy38_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
- Upload date:
- Size: 612.3 kB
- Tags: PyPy, manylinux: glibc 2.17+ ARMv7l
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | b40efa83ad0dadb65b1e9687eb302307ed40ed3b0f4597420a01b023230ff868 |
|
MD5 | b84eed835e10101db5a48f8f504f2310 |
|
BLAKE2b-256 | d1c79a2da067b7868738a66cb350bd5befc3df40d93260ff084b9bd405dd4ca2 |
File details
Details for the file ccdexplorer_schema_parser-0.1.14-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: ccdexplorer_schema_parser-0.1.14-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 627.1 kB
- Tags: CPython 3.12, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 125e955d5f0f068db5ce00d849c63662c873d4d1755a52e68c1ea9e88e88550b |
|
MD5 | 4424d4d3b2ebf559365a12f4d6718b3e |
|
BLAKE2b-256 | 8d7b55ef939bfb47ab84cc96a98a1679ae0861d9b5d04a670e02335528e1dd87 |
File details
Details for the file ccdexplorer_schema_parser-0.1.14-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
.
File metadata
- Download URL: ccdexplorer_schema_parser-0.1.14-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
- Upload date:
- Size: 611.6 kB
- Tags: CPython 3.12, manylinux: glibc 2.17+ ARMv7l
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 089d5293ede34af5f27d81b0d4072e63afe3191ae35de4de48fbda4e425afe87 |
|
MD5 | 1d7cf2e36b9e92ebc84e2abfb6d08177 |
|
BLAKE2b-256 | ae63e75455a5e33f8bc071907c223778fec331cce02a0b7849674c4164ea6570 |
File details
Details for the file ccdexplorer_schema_parser-0.1.14-cp312-cp312-macosx_11_0_arm64.whl
.
File metadata
- Download URL: ccdexplorer_schema_parser-0.1.14-cp312-cp312-macosx_11_0_arm64.whl
- Upload date:
- Size: 556.4 kB
- Tags: CPython 3.12, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7587ed99d91ff302f4e1ff97a611482716762e0e3b750246a2811bb3b6529661 |
|
MD5 | 66b7596e997d4c654f2e42f293912a61 |
|
BLAKE2b-256 | ee8ca77a43134f0685a325592c437788908890ddcdae6b00277c58f715b095c4 |
File details
Details for the file ccdexplorer_schema_parser-0.1.14-cp312-cp312-macosx_10_12_x86_64.whl
.
File metadata
- Download URL: ccdexplorer_schema_parser-0.1.14-cp312-cp312-macosx_10_12_x86_64.whl
- Upload date:
- Size: 578.1 kB
- Tags: CPython 3.12, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0f47fd876c3ac2a5abdcf8da7e5cb3fa511feb379a0725fc9016e58096384dd4 |
|
MD5 | 47c5fafc8baba9bd3c55040d10082340 |
|
BLAKE2b-256 | 9230218fe4e498d3877e73576d500a8855ab57573931c97100926c5151634b80 |
File details
Details for the file ccdexplorer_schema_parser-0.1.14-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: ccdexplorer_schema_parser-0.1.14-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 627.4 kB
- Tags: CPython 3.11, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c8e108bfe0fa5ca08f9dd211014b87056b2b951f8bf5fef75628efed024ca070 |
|
MD5 | 6a35398b351ba831a57ae93a91891a7d |
|
BLAKE2b-256 | d8d902d6bc89a7827efafd587a521542bb0de9fdfe8f0485eccc6ae8130e013c |
File details
Details for the file ccdexplorer_schema_parser-0.1.14-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
.
File metadata
- Download URL: ccdexplorer_schema_parser-0.1.14-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
- Upload date:
- Size: 612.1 kB
- Tags: CPython 3.11, manylinux: glibc 2.17+ ARMv7l
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | f924556f7fa8c4756840a2149976bffffeab2782603a3c81fb64e99ffbd6eef7 |
|
MD5 | 23208c2ba0f63e583e2dd82216d615ba |
|
BLAKE2b-256 | 72e83664d3aa2a6eb488fd3e1ba9bbda5fb444e468e28c372d6013bc69cbce74 |
File details
Details for the file ccdexplorer_schema_parser-0.1.14-cp311-cp311-macosx_11_0_arm64.whl
.
File metadata
- Download URL: ccdexplorer_schema_parser-0.1.14-cp311-cp311-macosx_11_0_arm64.whl
- Upload date:
- Size: 556.8 kB
- Tags: CPython 3.11, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6c7cf07eccd365f1bf3eaf355e4ba44aae5e27e83ac90c1a15d45908cefdf9dc |
|
MD5 | d6cc84fef0ca7cdc69a63d3ea7986f69 |
|
BLAKE2b-256 | db9203292775b82167aac1ae1627ce2d16404d4e84c5dfe336d773b38f62d7ae |
File details
Details for the file ccdexplorer_schema_parser-0.1.14-cp311-cp311-macosx_10_12_x86_64.whl
.
File metadata
- Download URL: ccdexplorer_schema_parser-0.1.14-cp311-cp311-macosx_10_12_x86_64.whl
- Upload date:
- Size: 578.6 kB
- Tags: CPython 3.11, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | c91c9aa68e1bd27403e3f1a32808a752c8e27c1d173a95edfe4eb4dac35897e2 |
|
MD5 | a006bb12a8500c236491a6398e6278bc |
|
BLAKE2b-256 | 081c68af9f6e2d2b7417c903a402eef5b304b5c430ef403659ad1f4a2c76254e |
File details
Details for the file ccdexplorer_schema_parser-0.1.14-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: ccdexplorer_schema_parser-0.1.14-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 627.5 kB
- Tags: CPython 3.10, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3cbea2b201f045e4dc01f2988a4335030025249c909d3c128d50f298b6c4610e |
|
MD5 | 32c359ee7bf34fca289a65dafead4535 |
|
BLAKE2b-256 | 97b94d017210dd7566d154a1d58830a89c410a3b10635dad9c357c3c963e8310 |
File details
Details for the file ccdexplorer_schema_parser-0.1.14-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
.
File metadata
- Download URL: ccdexplorer_schema_parser-0.1.14-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
- Upload date:
- Size: 612.1 kB
- Tags: CPython 3.10, manylinux: glibc 2.17+ ARMv7l
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4bb9a1e80553eb964620c32bb138040491fd619c735b4722aa4c299f04b50f25 |
|
MD5 | 485f0a0fae246a1f9df51bcb003c8a1e |
|
BLAKE2b-256 | 1cbcce9df28508f872e9b11e7a7fca8624d4a51f3ee329984e74b7111753a98f |
File details
Details for the file ccdexplorer_schema_parser-0.1.14-cp310-cp310-macosx_11_0_arm64.whl
.
File metadata
- Download URL: ccdexplorer_schema_parser-0.1.14-cp310-cp310-macosx_11_0_arm64.whl
- Upload date:
- Size: 556.8 kB
- Tags: CPython 3.10, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 39f2834a226cb542cc95d5b004ecab923d2629076843c6e7b63fd27cd34ebe07 |
|
MD5 | 4bc2ca7214e97287b714f93a57ab1b68 |
|
BLAKE2b-256 | c9f84b181a4b765756b1ee01065d531c756889c514c8054151339482369e9c7c |
File details
Details for the file ccdexplorer_schema_parser-0.1.14-cp310-cp310-macosx_10_12_x86_64.whl
.
File metadata
- Download URL: ccdexplorer_schema_parser-0.1.14-cp310-cp310-macosx_10_12_x86_64.whl
- Upload date:
- Size: 578.5 kB
- Tags: CPython 3.10, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 786502a68add6722994b5cccb8496cda8fd33d7f79cd16a80a88b4e16f51e90b |
|
MD5 | aa7affc143f5e287f27e94c7ec094852 |
|
BLAKE2b-256 | e6d9690d9f090ae5848f64a0bf36e92a29afa11b0539b3ced3a1c527fa7aa26e |
File details
Details for the file ccdexplorer_schema_parser-0.1.14-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: ccdexplorer_schema_parser-0.1.14-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 627.5 kB
- Tags: CPython 3.9, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | da527e4400d4aa72fdb0ad89c5e213130e6cc522c83c29c77e7e69ff5860191e |
|
MD5 | d0900b2bb46096cf3050a3918a4cf04a |
|
BLAKE2b-256 | deb3fdf706dd0b6854a9bc381f1387e4e102576f2e166b19721053875c424c5d |
File details
Details for the file ccdexplorer_schema_parser-0.1.14-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
.
File metadata
- Download URL: ccdexplorer_schema_parser-0.1.14-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
- Upload date:
- Size: 611.7 kB
- Tags: CPython 3.9, manylinux: glibc 2.17+ ARMv7l
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4153cecede58fa98b602c8fd917932735e89e0738860f4d0a29b49790066c1f5 |
|
MD5 | a6b182b2dfca43f29132d59f413733f4 |
|
BLAKE2b-256 | 0fc9f4062b8bd3d5b42f0a596633856f5b20edaf6980cd94bca3fdd9f81fc9d0 |
File details
Details for the file ccdexplorer_schema_parser-0.1.14-cp39-cp39-macosx_11_0_arm64.whl
.
File metadata
- Download URL: ccdexplorer_schema_parser-0.1.14-cp39-cp39-macosx_11_0_arm64.whl
- Upload date:
- Size: 556.6 kB
- Tags: CPython 3.9, macOS 11.0+ ARM64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 6824af98e5cbc549247f884b33e4da61b5057e469dd5a60c5d61314b451f6547 |
|
MD5 | 7b7280c93f54fe4ec6a6058796e33119 |
|
BLAKE2b-256 | dee4ee83358ee2eca510d03c351c184b2138f47e4b835b35a441e226d3114eab |
File details
Details for the file ccdexplorer_schema_parser-0.1.14-cp39-cp39-macosx_10_12_x86_64.whl
.
File metadata
- Download URL: ccdexplorer_schema_parser-0.1.14-cp39-cp39-macosx_10_12_x86_64.whl
- Upload date:
- Size: 578.5 kB
- Tags: CPython 3.9, macOS 10.12+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | fd79a4ddd2d03a8460f78343a72bf07b9c6edce6935547b55b4b48f3c3a6c9bc |
|
MD5 | 1aa003aa59973bfc7dce8fbe73b182a0 |
|
BLAKE2b-256 | 218603a6bcfddfe476bb28af764fd99c837df26f687eb849ff524ed9834892f4 |
File details
Details for the file ccdexplorer_schema_parser-0.1.14-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
.
File metadata
- Download URL: ccdexplorer_schema_parser-0.1.14-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
- Upload date:
- Size: 626.7 kB
- Tags: CPython 3.8, manylinux: glibc 2.17+ x86-64
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 7272d84cfb2fd16527755906b634fde25d7232e6601ca5a9812c8333ad4eb6ad |
|
MD5 | 71aaeaee8ad5affb85572b2ad40568ab |
|
BLAKE2b-256 | 93c302f8d75fd1b5b73caf9d22f9b1f687762332fae72aefaf63f0026dcd4103 |
File details
Details for the file ccdexplorer_schema_parser-0.1.14-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
.
File metadata
- Download URL: ccdexplorer_schema_parser-0.1.14-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
- Upload date:
- Size: 611.2 kB
- Tags: CPython 3.8, manylinux: glibc 2.17+ ARMv7l
- Uploaded using Trusted Publishing? Yes
- Uploaded via: maturin/1.6.0
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 913258252422126e57c1824c91de52d0ef70f3cc0b4d61b0f0be1d7e86d402de |
|
MD5 | d65b9a2bbcf471318a4cc04ccaf826f8 |
|
BLAKE2b-256 | 81fca7aeb35913bf54f10717a71ba9ac48c6b00c71894fa5004716b5283bf22b |