aviary 1.1.1
aviary: ^1.1.1 copied to clipboard
Embeddable ledger for Flutter sharing the cipherbird engine: signed app records with proofs, instant BFT finality, transfers, light clients, P2P consensus and key custody.
aviary #
Aviary is a ledger you embed in your own app or service. A chain runs
in process, finalizes every block with BFT consensus, and lets anyone who
holds only its 32 byte state root verify what it contains. Money is one use;
the same engine keeps tamper evident application data. This package is
Aviary for Flutter sharing the CipherBird crypto engine with the
cipherbird package, which it depends on and re-exports, so an app that
uses both carries one engine.
What you get #
- Application records. A signed key value store with owners, versions and values up to 64 KiB, each provable on its own. Use it for audit logs, asset and device registries, document notarization or shared app state.
- Transfers with instant finality. Accounts with balances and nonces, or UTXOs with multisig, finalized by Tendermint style rounds with BLS commit certificates. A finalized block never reverts.
- Proofs and light clients. Prove a balance or a record against a state root. A light client follows a chain from its genesis validators, across validator rotations, without running a full node.
- Networking you control. A consensus node with no sockets and no clock, so it runs over whatever transport the app picks, with Noise and SecureSession encrypted links, signed peer records and credential gated admission.
- Composable chains. Choose the consensus engine (BFT, PoS, VRF PoS, PoW), the state model and the proposer policy at genesis, plug in an engine written in Dart, anchor subchains to a parent and drive whole chain trees.
- Key custody. A passphrase sealed key store that signs inside the engine, portable encrypted accounts, threshold accounts and hybrid post quantum signatures (Ed25519 plus ML-DSA-65).
- Privacy. Sealed mempools that hide transactions until a block includes them, and BBS membership credentials that admit a member without revealing who it is.
- Interop. The same keys derive Ethereum, Bitcoin and Solana addresses, and the engine builds and signs real transactions for each.
- Operations. Typed event streams, metrics, and snapshots that resume a chain at once or replay it for an audit.
The same engine backs the Go, Node.js, JVM and Swift bindings, and every binding computes byte identical state.
Prefer aviary_lite when the app does not use CipherBird directly: it
bundles the engine and has no extra dependency.
Install #
dependencies:
aviary: ^1.1.1
Android, iOS and macOS are supported. Linux desktop is not, because the
cipherbird package this one shares its engine with has no Linux build; use
aviary_lite there. The native library is bundled per platform and loaded
automatically; call Aviary.ensureInitialized()
once at start to warm it off the UI isolate.
Use #
import 'package:aviary/aviary.dart';
Future<void> main() async {
WidgetsFlutterBinding.ensureInitialized();
await AviaryShared.ensureInitialized();
runApp(const MyApp());
}
Then anywhere in the app:
final node = AviaryShared.instance.createNode(7);
final alice = node.fundAccount(1000);
final bob = node.fundAccount(0);
node.sendTo(alice, bob, 250);
node.commit();
final ok = node.verifyAccountProof(node.proveAccount(bob.address));
AviaryShared is a thin front for Aviary; the whole aviary_dart
API is re-exported, including its shortcut extensions (fundAccount,
sendTo, commit, hex, assembleSingleValidator, signWithShares,
produceRound). See that package for the full surface.
Example #
The example app has four tabs: a ledger round trip with a balance proof, a
live event stream with metrics, an equipment record that is registered,
serviced, handed over and proven, and four validators reaching consensus
over a PeerMesh. Run it with flutter run from example/.
How the engine is shared #
On iOS and macOS the app embeds both AviaryC.framework and
CipherBird.framework; Aviary's cipherbird_* symbols resolve at load time
against CipherBird. On Android the plugin loads libcipherbird.so before
libaviary_c.so, because the CipherBird library's SONAME is still
libcipherbird_c.so and the dynamic linker would not find it by its file
name otherwise. Both loads happen in the plugin's startup provider and in
the Dart loader, so an app does not have to do anything.