2 unstable releases
new 0.3.0 | Dec 3, 2024 |
---|---|
0.2.6 | Nov 28, 2024 |
#3 in #uniswap
141 downloads per month
140KB
4K
SLoC
Pangea Client
pangea-client
is a set of libraries for different languages to interface with Pangea for access to cross chain data, fast.
When using rust
the data is delivered in Arrow or JSON, developers are required to provide their own types.
Getting started
Access to the API via pangea-client
requires credentials, please apply for access here
Once you have credentials set your environment variables:
You will be given a username and password to use to access the Pangea API.
The easiest way to use these credentials is to create a .env
file in the same folder as this README.md
file, and populate it like so:
PANGEA_USERNAME=xxxxx
PANGEA_PASSWORD=xxxxx
PANGEA_URL=app.pangea.foundation
Examples
Checkout the github repository separately for example code.
Setup
Before proceeding, make sure to have cargo
installed globally.
After node is installed, cd
to the directory where you cloned the repo (rust
sub-folder for megarepo).
Running the Examples
To run any file in the examples
folder, use the template
cargo run --example ${EXAMPLE_FILE_NAME}
Like so:
cargo run --example arrow-blocks
cargo run --example jsonstream-blocks
cargo run --example jsonstream-status
...
When adding a new example, it is sufficient to place it in the examples
folder, and use the same template as above to run it.
Dependencies
~28–44MB
~719K SLoC