Expand description
Shared types used across the Ave workspace.
ave-common keeps request, governance, bridge and utility types in one
crate with a small dependency surface. It is intended for code that needs
Ave domain models without depending on heavier runtime crates.
Main areas:
- request types for ledger events
- governance payloads and policy models
- bridge types for API-facing serialization
- utility wrappers such as
SchemaType,NamespaceandValueWrapper
Feature flags:
common: enables the domain and bridge modelsvalue-wrapper: enablesValueWrapperopenapi: derivesutoipaschemastypescript: derives TypeScript exports
use ave_common::{Namespace, SchemaType};
use ave_common::identity::DigestIdentifier;
use ave_common::request::{CreateRequest, EventRequest};
let request = EventRequest::Create(CreateRequest {
name: Some("subject".to_string()),
description: None,
governance_id: DigestIdentifier::default(),
schema_id: SchemaType::Governance,
namespace: Namespace::from("demo.root"),
});
assert!(request.is_create_event());Re-exports§
pub use error::ConversionError;pub use error::Error;pub use error::SignatureError;pub use schematype::SchemaType;pub use namespace::Namespace;pub use wrapper::ValueWrapper;pub use ave_identity as identity;pub use bridge::*;pub use sink::*;
Modules§
- bridge
- API-facing bridge models.
- error
- Error types used by
ave-common. - governance
- Governance update payloads.
- namespace
- Hierarchical namespace type used by subjects and governance roles.
- request
- Ledger event request types.
- schematype
- Schema identifiers used by Ave subjects and governance rules.
- sink
- Sink payloads exported from ledger events.
- wrapper
- JSON value wrapper with bounded Borsh serialization.