Expand description
§Arkiv SDK for Rust
This is part of the Arkiv project, which is designed as a Layer2 Network deployed on Ethereum, acting as a gateway to various Layer 3 Database Chains (DB-Chains). For an overview of Arkiv, check out our Litepaper.
This SDK allows you to use Arkiv from Rust, it is available on crates.io, alng with its generated documentation. We provide an example application to showcase how you can use this SDK.
§Getting started
For getting up and running quickly, we recommend the following two steps:
- Start golembase-op-geth through its
docker-compose
; - Install the demo CLI and create a user, or build the actual CLI as it’s included in the
golembase-op-geth
repository.
When you create a user, it will generate a new wallet file called wallet.json
and store it in the standard folder as per the XDG specification:
~/.config/golembase/
on Linux~/Library/Application Support/golembase/
on macOS%LOCALAPPDATA%\golembase\
on Windows
You will also need to fund the account, you can do it with: golembase-demo-cli account fund 10
§Overview
This SDK provides multiple layers for sending transactions:
- Use
ArkivClient
for high-level operations such as creating, updating, or deleting entities. - Use
Account
for account-centric and lower-level transaction control. - Advanced users can construct and submit raw Ethereum transactions directly using the types and helpers re-exported from
Alloy
.
§Contributing
- Enter a reproducible Nix flakes devshell with
nix develop
or usedirenv
- Install pre-commit git hook with
pre-commit install
Thanks for helping improve the project!
Re-exports§
pub use client::ArkivClient;
pub use client::ArkivRoClient;
pub use entity::Annotation;
pub use entity::Hash;
pub use entity::NumericAnnotation;
pub use entity::StringAnnotation;
Modules§
- client
- Module for Arkiv client functionality. Exposes the main client interface for interacting with the Arkiv network.
- entity
- Module for Arkiv entities and data types. Defines core types such as annotations, hashes, and entity representations.
- eth
- Module for Ethereum transaction-related functionality. Provides helpers for constructing, signing, and sending Ethereum transactions.
- events
- Module for event handling. Contains types and utilities for working with Arkiv events.
- rpc
- Module for JSON-RPC-related functionality. Contains utilities for interacting with JSON-RPC endpoints, including request/response types.
- utils
- Module with utility functions. Includes helpers for encoding, decoding, and other common tasks.
Structs§
- Address
- Re-export commonly used types from
alloy
. An Ethereum address, 20 bytes in length. - Signature
- Re-export commonly used types from
alloy
. An Ethereum ECDSA signature. - Url
- Re-export commonly used types from
alloy
. A parsed URL record.
Functions§
- keccak256
- Re-export commonly used types from
alloy
. Simple interface to theKeccak-256
hash function.
Type Aliases§
- Private
KeySigner - Re-export commonly used types from
alloy
. A signer instantiated with a locally stored private key.