Verified audio as a composable on-chain primitive for Sui.
miso_audio defines a single value type — Audio — that carries an audio file's technical metadata together with the identity of the ingester that attested it. It is intentionally minimal and domain-agnostic: any protocol can embed an Audio (a recording's master, a podcast episode, a video's audio track), and any number of ingester implementations can mint one.
- Attested, not trusted.
Audiocan only be created by a package that can produce anIngesterwitness. EachAudiorecords which ingester attested it (ingester: TypeName), so consumers can decide which attestors to trust and multiple ingesters can coexist. - Always wrapped.
Audiohasstorebut notkey— it cannot exist as a standalone object. It is always a field of some larger object (e.g. a recording), never an asset in its own right. - A primitive, not a platform. No lifecycle, no ownership, no extension surface — just verified bytes plus metadata that other protocols compose with.
public struct Audio has drop, store {
ingester: TypeName, // who attested this audio
channels: u8,
bit_depth: u8,
sample_rate_hz: u32,
samples: u64,
data: WalrusData, // Walrus blob reference
}Add to your Move.toml:
[dependencies]
miso_audio = { git = "https://github.com/misonetwork/miso-audio.git", rev = "main" }An ingester mints Audio by passing a witness it alone can construct:
use miso_audio::audio;
// `Ingester` is a `drop` witness type your package defines and gates.
public fun ingest(/* … */ , witness: MyIngester): audio::Audio {
audio::new(
channels,
bit_depth,
sample_rate_hz,
samples,
walrus_blob,
witness,
)
}Consumers read the metadata and the attesting ingester:
let rate = master.sample_rate_hz();
let attestor = master.ingester_type(); // &TypeName — verify against trusted ingestersCreation emits AudioIngestedEvent<Ingester> for indexers.
sui move build
sui move test| Dependency | Purpose |
|---|---|
ori |
Walrus data references |
Issues and pull requests are welcome. By contributing you agree that your contributions are licensed under the project's Apache 2.0 license.
Apache 2.0 © Miso Labs, Inc.