![Maven Central Adds Sigstore Signature Validation](https://cdn.sanity.io/images/cgdhsj6q/production/7da3bc8a946cfb5df15d7fcf49767faedc72b483-1024x1024.webp?w=400&fit=max&auto=format)
Security News
Maven Central Adds Sigstore Signature Validation
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
This package contains a compiled python version of all cosmos protobuf files with their dependencies
This repository compains the whole cosmos protobuf files compiled for python and ready to use with grpc. Please use the according .proto file as documentation for each python file.
You can install this package directly from the repository by using:
python -m pip install cosmospy-protobuf
The following code snippet will query the balances for the address osmo15hzhcvgs2ljfng6unghvr5l32prwqdyq4aguxn
. The according query.proto file in the bank subdirectory contains the Request and the Response for this request. The details for the response are defined in QueryAllBalancesResponse
. It contains the balances and pagination attribute which can be accessed as shown in the example below.
import grpc # using grpcio
import cosmospy_protobuf.cosmos.bank.v1beta1.query_pb2_grpc as query_pb2_grpc # for gprcio
#import cosmospy_protobuf.cosmos.bank.v1beta1.query_grpc as query_grpc # for gprclib
import cosmospy_protobuf.cosmos.bank.v1beta1.query_pb2 as query_pb2
host = "osmosis.strange.love"
port = "9090"
c = grpc.insecure_channel(f'{host}:{port}')
stub = query_pb2_grpc.QueryStub(c)
r = stub.AllBalances(query_pb2.QueryAllBalancesRequest(address="osmo15hzhcvgs2ljfng6unghvr5l32prwqdyq4aguxn"))
print(r.balances)
There are two scripts helping you to fork this repository to work with any cosmos based coin.
Addititional Requirements:
grpcio-tools
grpclib
GitPython
protoletariat
Steps:
configs
and take a existing one as exampleaggregate.py
file with your filename without .json
(Example python aggregate.py cosmos
)compile.py
to compile all your files to protobufThe files are compiled using the grpc_tools.protoc
command from the grpcio-tools library.
To compile a .proto file manually use following command:
python -m grpc_tools.protoc -I <absolute path to project root> --python_out=. --grpc_python_out=. --grpclib_python_out=. <absolute path to .proto file>
After compiling all the files with protoc you need to fix the imports by using protoletariat
Note:
*.proto
instead of each individual file. You can also match the whole folders to compile multiple folders at the same time. Not that the folders might contain sub-folders.Currently following coins are maintained by me:
chain/evmos
, package name: evmos-protobuf
)chain/osmosis
, package name: osmosis-protobuf
)chain/stargaze
, package name: stargaze-protobuf
)Maintained by external contributors:
chain/sentinel
, package name: sentinel-protobuf
)FAQs
This package contains a compiled python version of all cosmos protobuf files with their dependencies
We found that cosmospy-protobuf demonstrated a healthy version release cadence and project activity because the last version was released less than a year ago. It has 1 open source maintainer collaborating on the project.
Did you know?
Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.
Security News
Maven Central now validates Sigstore signatures, making it easier for developers to verify the provenance of Java packages.
Security News
CISOs are racing to adopt AI for cybersecurity, but hurdles in budgets and governance may leave some falling behind in the fight against cyber threats.
Research
Security News
Socket researchers uncovered a backdoored typosquat of BoltDB in the Go ecosystem, exploiting Go Module Proxy caching to persist undetected for years.