Skip to content

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

13 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

miso-audio

License: Apache 2.0 Move

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.

Design

  • Attested, not trusted. Audio can only be created by a package that can produce an Ingester witness. Each Audio records which ingester attested it (ingester: TypeName), so consumers can decide which attestors to trust and multiple ingesters can coexist.
  • Always wrapped. Audio has store but not key — 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
}

Install

Add to your Move.toml:

[dependencies]
miso_audio = { git = "https://github.com/misonetwork/miso-audio.git", rev = "main" }

Usage

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 ingesters

Creation emits AudioIngestedEvent<Ingester> for indexers.

Build & test

sui move build
sui move test

Dependencies

Dependency Purpose
ori Walrus data references

Contributing

Issues and pull requests are welcome. By contributing you agree that your contributions are licensed under the project's Apache 2.0 license.

License

Apache 2.0 © Miso Labs, Inc.

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

0 watching

Forks

Releases

Packages

Contributors

Languages