Arweave's ANS-104 Rust SDK
bundles-rs is a Rust SDK for creating, signing, managing and posting ANS-104 dataitems
About
A Rust SDK for creating, signing, managing and posting ANS-104 dataitems.
Warning: this repository is actively under development and could have breaking changes until reaching full API compatibility in v1.0.0.
Installation
Add to your Cargo.toml:
[dependencies]
# main library
bundles_rs = { git = "https://github.com/loadnetwork/bundles-rs", branch = "main" }
# use individual crates
# or use branch/tag/rev -- we recommend checking and using the last client version
ans104 = { git = "https://github.com/loadnetwork/bundles-rs", version = "0.1.0" }
crypto = { git = "https://github.com/loadnetwork/bundles-rs", version = "0.1.0" }Dev setup
git clone https://github.com/loadnetwork/bundles-rs.git
cd bundles-rs
cargo clippy --workspace --lib --examples --tests --benches --locked --all-features
cargo +nightly fmt
cargo check --allSupported Signers
Arweave
RSA-PSS
Ethereum
secp256k1
Solana
Ed25519 (with base58 solana flavoring)
-
Ed25519Core (raw Ed25519)
Regarding Tags
This ANS-104 dataitems client fully implements the ANS-104 specification as-is
Maximum tags per data item
<= 128 tags
<= 128 tags
<= 128 tags
No max tags
Tag name max size
1024 bytes
1024 bytes
all keys + vals <= 4096 bytes
Can have empty strings
Tag value max size
3072 bytes
3072 bytes
Can have empty strings
val <= 3072 bytes
Empty names/values
non empty strings
non empty strings
Can have empty strings
Can have empty strings
Usage Examples
Quick start
Or for basic signed dataitem
Working with signers
N.B: use random signer generation for testing purposes only
Arweave Signer
Ethereum Signer
Solana Signer
Ed25519Core Signer
Verification
Manual
With Signer
Deep hash
Upload to Bundling services over HTTP (e.g. Turbo)
bundler crate
bundler crate is Rust SDK to interact with Arweave (ANS-104) bundling services. This crate is designed to be backward compatible with existing bundling services and fine tuned for Turbo
Installation
Imports
Usage Example
Send Transaction (Solana)
Send Transaction (Turbo)
Get Default Client Info
Get Turbo Client Info
Get Price for Bytes (Turbo)
Get Rates (Turbo)
Check Transaction Status (Turbo)
Turbo API References:
upload api: https://upload.ardrive.io/api-docs
payment api: https://payment.ardrive.io/api-docs
SDK source code: https://github.com/loadnetwork/bundles-rs
Last updated