pub mod abi;
pub mod bytes;
pub mod capsule;
pub mod capsule_class;
pub mod codec;
pub mod config;
pub mod crypto;
pub mod datasection;
pub mod error;
pub mod hash;
pub mod keytable;
pub mod manifest;
pub mod merkle;
pub mod public_manifest;
pub mod tombstone;
pub mod wire;
pub use abi::{is_error, pack_ptr_len, unpack_ptr_len};
pub use bytes::{Bytes32, Bytes48, Bytes96};
pub use capsule::Capsule;
pub use capsule_class::{CapsuleClass, CapsuleSpec};
pub use codec::{Decode, DecodeError, Decoder, Encode, Encoder};
pub use crypto::{decrypt_chunk, derive_decryption_key, encrypt_chunk, CHIA_BLS_SCHEME};
pub use error::{CoreError, ErrorCode};
pub use hash::sha256;
pub mod types {
pub use crate::imp::core::bytes::{Bytes32, Bytes48, Bytes96};
}
pub mod serving {
use alloc::vec::Vec;
pub fn concat_output(chunks_in_order: &[&[u8]]) -> Vec<u8> {
let total: usize = chunks_in_order.iter().map(|c| c.len()).sum();
let mut out = Vec::with_capacity(total);
for chunk in chunks_in_order {
out.extend_from_slice(chunk);
}
out
}
}
#[cfg(feature = "std")]
pub use config::CompilationResult;
pub use config::{
ChunkerConfig, CompilationStats, CompilerError, Generation, GenerationId, GenerationState,
HostImportsConfig, SecretSalt, StoreConfig, TrustedHostKey, Visibility, MAX_STORE_BYTES,
};
pub use keytable::{KeyTableEntry, PathWalk};
pub use manifest::{Author, MetadataManifest};
pub use merkle::{resource_leaf, MerkleProof, MerkleTree, ProofStep};
pub use public_manifest::{PublicManifest, PublicManifestEntry, PUBLIC_MANIFEST_SCHEMA_VERSION};
pub use tombstone::{RevocationReason, Tombstone, TombstoneScope};
pub const CHAIN: &str = "chia";
pub const DEFAULT_RESOURCE_KEY: &str = "index.html";
pub use wire::{
AttestationChallenge, AttestationResponse, AuthenticationInfo, ChiaBlockRef, ContentResponse,
ExecutionProof, ProofPrelude, ProofResponse, ATTEST_DST,
};
#[cfg(all(test, not(target_arch = "wasm32")))]
mod tests;