docs.rs failed to build csv-adapter-aptos-0.1.0
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build:
csv-adapter-aptos-0.1.1
CSV Adapter Aptos
Aptos adapter for CSV (Client-Side Validation) with resource-based seals.
Overview
This crate implements the AnchorLayer trait for Aptos, using Move resources with key + delete as seals. Aptos provides L2 Type-Enforced single-use through the Move language's resource model — resources cannot be duplicated or dropped, only moved or destroyed.
Key Features
- Resource Seals: Move resource lifecycle management (L2 Type-Enforced)
- Event Proofs: Commitment publication via Aptos events
- HotStuff Finality: Deterministic finality via 2f+1 certification
- Ed25519 Signatures: Native Aptos signing scheme
- Testnet Support: Full testnet RPC compatibility
- Mock RPC: Built-in mock for offline testing
Installation
Or in your Cargo.toml:
[]
= "0.1"
Features
| Feature | Description | Default |
|---|---|---|
rpc |
Enable real Aptos RPC client with aptos-sdk |
❌ |
aptos-sdk |
Enable full Aptos SDK integration | ❌ |
Quick Start
Creating an Aptos Anchor Layer
use ;
// Create adapter with mock RPC for testing
let adapter = with_mock.unwrap;
// Or with configuration (requires `rpc` feature)
// let config = AptosConfig::new(AptosNetwork::Devnet);
// let rpc = ...;
// let adapter = AptosAnchorLayer::from_config(config, rpc).unwrap();
Working with Resource Seals
use AptosAnchorLayer;
use ;
let adapter = with_mock?;
// Create a seal from a Move resource
let seal = adapter.create_seal?;
// Publish a commitment
let commitment = new;
let anchor = adapter.publish?;
Checkpoint Proof Verification
use CheckpointVerifier;
// Verify HotStuff consensus certification
let verifier = new;
let is_final = verifier.verify_finality?;
Architecture
AptosAnchorLayer
├── Resource Seals ← L2 Type-Enforced single-use (Move)
├── Event Proofs ← Commitment publication via events
├── Ledger Info ← HotStuff consensus finality
├── Seal Registry ← Double-spend prevention
└── RPC Client ← Aptos fullnode interaction (optional)
Seal Lifecycle
- Create: Derive a seal from a Move resource address
- Consume: Destroy the resource via
move_from(seal is gone) - Anchor: Emit event with commitment hash
- Verify: Ledger info proof confirms consensus finality
License
This project is dual-licensed under either:
- Apache License, Version 2.0 (LICENSE-APACHE or https://www.apache.org/licenses/LICENSE-2.0)
- MIT license (LICENSE-MIT or https://opensource.org/licenses/MIT)
at your option.
Contributing
We welcome contributions! Please see our GitHub repository for more information.