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
Hashes for ccdexplorer_schema_parser-0.1.11.tar.gz
Algorithm | Hash digest | |
---|---|---|
SHA256 | d81060fbcfc006a25edf9f9748dbed1f98e7eb02e53c781f868bc0873dc9fd5e |
|
MD5 | 8da736c672e4ef8b1029f3da55e24b74 |
|
BLAKE2b-256 | 6b2fc5bef2c815e61d51323a53a075de7a0191e952204f07d84cab9ce2ecfcf1 |
Hashes for ccdexplorer_schema_parser-0.1.11-pp310-pypy310_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 0fd7302600e2effa5725015bf5beb9a968bb54d0ab574b9234d6526863f7cf77 |
|
MD5 | 419d708af5e8cb8e2968e246365f554e |
|
BLAKE2b-256 | dc6ec293c3fc41674ed61e422d3265912ecf1aa5020a26ef743ee42742f8380f |
Hashes for ccdexplorer_schema_parser-0.1.11-pp310-pypy310_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | e50fd97fbfa3cdc54dc589ad8730e97feb566408b4ed50ad1dda7882abe42d7a |
|
MD5 | 904887a9f746378db6445055c0143f50 |
|
BLAKE2b-256 | 6a6ed5a1a642feca8b94e0793a49259aaa0a1f3d66784f45670424687b034e3e |
Hashes for ccdexplorer_schema_parser-0.1.11-pp39-pypy39_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | fe3f84c58a299e6aa7f7200af50c57bfc845113701b0900f96e940068fc29244 |
|
MD5 | 8714282c9ee451f70044ef747b36ebb3 |
|
BLAKE2b-256 | 79de6b8aaf414f3f629894b2909a280f22c879268288f13b449fa1c6e2c524f6 |
Hashes for ccdexplorer_schema_parser-0.1.11-pp39-pypy39_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | c9a827c60edda3cbd395e281969c8ccb2e2e421b03e6922fcb277f85fd24c9cc |
|
MD5 | b56731e6b8055c8822c12084e4cfbb41 |
|
BLAKE2b-256 | db7933bfcd0cac54a87cf4f3b1c0495599a6c977ba232df7d66cfc12af141203 |
Hashes for ccdexplorer_schema_parser-0.1.11-pp38-pypy38_pp73-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 341fc3f3c01b2b22e856786b92924d8d25eb09a448b68ed7466e3c69034ec775 |
|
MD5 | 31c5c3f868307b6a72b72d25a9ddbefd |
|
BLAKE2b-256 | 251a3bb434a11aa7fa753574e5aa0c453eca50dee25a81ef813b48b18f8d98fd |
Hashes for ccdexplorer_schema_parser-0.1.11-pp38-pypy38_pp73-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d5290d8d3037ddf1a25029c4e3d1a83bcf045a2be6286cd7bee73ab824637bd6 |
|
MD5 | a70748c8001cd8a635ef509ead3d3218 |
|
BLAKE2b-256 | 07e1e20b312234f0bd9f03e933fefe3a46f19f68c8f7bda2e85deb023bd1685e |
Hashes for ccdexplorer_schema_parser-0.1.11-cp312-cp312-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | aeeba13d6f31549b972417b08c5442f16168c65bd6164a9f454e3f63924b9ad1 |
|
MD5 | f70574835e4a64e59b0e944d68c0338c |
|
BLAKE2b-256 | 2c313ac0a8338cd4ed632e3d7edda9209ee84f7d9c292977d5b42f7859b408f9 |
Hashes for ccdexplorer_schema_parser-0.1.11-cp312-cp312-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | dd5418d56954410aca915494378655e088a9107c7b50413aff961fff7eb6ef3c |
|
MD5 | b22c1f888cc0fa337f81724a7dc9a6cd |
|
BLAKE2b-256 | bdbb56876c8aa55fc64f7709793be74f70baa570216e034a2b7d58649d9803e9 |
Hashes for ccdexplorer_schema_parser-0.1.11-cp312-cp312-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 3959d0290cfbe0948a02c033e3724524d599bfd6d4829099d9a59835e9027d44 |
|
MD5 | 6ea7e6f8ad0891e4d26ad8fe645ee8d4 |
|
BLAKE2b-256 | 62d1146ea05c344aeaee24dddf5c150528f74bc1e17acdf0b95e6a9b621fd55b |
Hashes for ccdexplorer_schema_parser-0.1.11-cp312-cp312-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bfb90f661ecbd9d861812dc26b6af9af8b590460836a65a9328672d57f24925d |
|
MD5 | 9b35184338a04df952bb5b148eadc7bc |
|
BLAKE2b-256 | 1b1bcf5eaaba8eff27bf8c55898d2dc47bfb8116f90e28fce693b1b6aa42f9fc |
Hashes for ccdexplorer_schema_parser-0.1.11-cp311-cp311-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 83932af2254b7434b95d648301a630906a2ac10da869196c51906624ff686937 |
|
MD5 | 1a76575708875a2b0895a835671d95dd |
|
BLAKE2b-256 | aaf18cd18e15ca2d3eb5a6b4b14dd8b4b6af488ebe2c0fb56192c46ca31c9a9b |
Hashes for ccdexplorer_schema_parser-0.1.11-cp311-cp311-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | d268b606249c5d37d95043c41e046e559b2cd144ac0acac0cde39ab2524a14a9 |
|
MD5 | 7e59b974673e7119a15f4ea2702bc709 |
|
BLAKE2b-256 | b4f5d99f80841b42954f7733bc0ca8fdaaa25dcb0965c167d907ffbe6edfd938 |
Hashes for ccdexplorer_schema_parser-0.1.11-cp311-cp311-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 4b349142ca2b7210ffa16df9d116b901c29e9cfc5320471f42d67ad3c7a4d2e4 |
|
MD5 | 010a0c32ce16a7454a332e3ff6109f38 |
|
BLAKE2b-256 | 8e96b3890841f3da5a638b34254f39c874a3b3fde899440cd1f9c51350c62783 |
Hashes for ccdexplorer_schema_parser-0.1.11-cp311-cp311-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 50f470c9feaae91b8d11a51f2a7458914814e1e6906495569407759589657546 |
|
MD5 | 979b6f5c9f8a8df846ec0c4da3a10d8e |
|
BLAKE2b-256 | ef7c52b64be0d0c093adb5c072ff3e6c4ca8497f975e6df30e64038125dc4309 |
Hashes for ccdexplorer_schema_parser-0.1.11-cp310-cp310-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f2d21523c4b63d8cdb1dabe6645e5abbdb8ca39e340bca32a45020b0928aa246 |
|
MD5 | 62640e3ef031afcf483db3c27a07d8d8 |
|
BLAKE2b-256 | c2dd4418a09819f10d4e79a782d01566fb4150ea12fc5cde0bace2ccb1b8ccfd |
Hashes for ccdexplorer_schema_parser-0.1.11-cp310-cp310-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | ebffad0e933f8012f6b10d0d70e6e03eeb6b0821074c30b7c346ae0252f2089e |
|
MD5 | ff501c11c89f93531a5dea7edf5d417b |
|
BLAKE2b-256 | 428d7d0c7a32765152df64afe6194b82553400b17d7480ee7229eec4153dab9a |
Hashes for ccdexplorer_schema_parser-0.1.11-cp310-cp310-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f6a357499bf88d0c79dbe85f8f749f99fa1f350cf192a40c9dec6b9612c975b5 |
|
MD5 | 5e55ca896ba0763b894b27292766c883 |
|
BLAKE2b-256 | dc46a332f575219471a86da37a630b98fab60166d52950cc84d1d24119b64044 |
Hashes for ccdexplorer_schema_parser-0.1.11-cp310-cp310-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | bbaaa9ce07639e239d05051a3038750d9e90e0ecfd9f41484694af67fb6f2cdb |
|
MD5 | fc21c3b4da7f2facc000d7277a9a098c |
|
BLAKE2b-256 | 05c9075defb00ffd21863185b8642c27506b513f4c66462f54ef8d2d0d861beb |
Hashes for ccdexplorer_schema_parser-0.1.11-cp39-cp39-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 8912012fedfb92c5b2f187601b8e4b39a1bf23f64581f5746cfece9eb8eaa63f |
|
MD5 | f9139ea49d381bacef7e72d70cbd86e0 |
|
BLAKE2b-256 | aed689bf1f33920b2c0a32ff9a929dc9d8ab1edd65b5374547d10b827080dab4 |
Hashes for ccdexplorer_schema_parser-0.1.11-cp39-cp39-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 13901b768c1038d3aa9ba8c3df4914ca24445981388576e900921423b3031532 |
|
MD5 | 72dabe792d4ae88d14cd039b390d29bd |
|
BLAKE2b-256 | 7564edaa03eabdabb63f7f93d36a0a0764a44a141d7a1035c9b9e3c07bb5ebee |
Hashes for ccdexplorer_schema_parser-0.1.11-cp39-cp39-macosx_11_0_arm64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5e457f92ca5b63f06a91ddd6249f03bb1f97fadb2981f1c1d84f2c2649164f45 |
|
MD5 | 4e65feed15db8b49ce95c34eeda194af |
|
BLAKE2b-256 | 3756735e9719199f69a24ac3fcfc0ad0bd54c7e3e1b6667a455240e30b1dd888 |
Hashes for ccdexplorer_schema_parser-0.1.11-cp39-cp39-macosx_10_12_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | f36225260761cf3af5dcc6a2a8e398b69d10142454fafe1f30a5489328b213bc |
|
MD5 | 9365ed5551ee5f22aa622b11b223eaff |
|
BLAKE2b-256 | 8cc4d5939b2b42c78d1ae775d1d13453fec1e1f75ffda497b612220d58470860 |
Hashes for ccdexplorer_schema_parser-0.1.11-cp38-cp38-manylinux_2_17_x86_64.manylinux2014_x86_64.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 31745b11dde615bc859b09014404ed50ed713a71b2fb60d34fe74ba7eea69efc |
|
MD5 | 9bbfe9c70f4306aad778ed5be23fb004 |
|
BLAKE2b-256 | db488fd7d39506e0fc40b981406f68395c821d7872b9c16c734213aacc0fa45f |
Hashes for ccdexplorer_schema_parser-0.1.11-cp38-cp38-manylinux_2_17_armv7l.manylinux2014_armv7l.whl
Algorithm | Hash digest | |
---|---|---|
SHA256 | 9b0713e268ad6ff0939948609eaf67ae548167fc3f275c84e14b9da1586dc516 |
|
MD5 | 3d8f87ddb2a24e999f51fb585ecd1323 |
|
BLAKE2b-256 | a590b85125abdda751b47bdf94e334f28badd66b0cedb0540e1257e42c026d66 |