Open
Description
Description
Use enum to reference difference Blob types and provide a TinyBlob implementation.
public enum BlobSource {
WalrusBlob { // The walrus blob id containing the bytes for this resource.
blob_id: u256,
// Contains the hash of the contents of the blob
// to verify its integrity.
blob_hash: u256
// Defines the byte range of the resource contents
// in the case where multiple resources are stored
// in the same blob. This way, each resource will
// be parsed using its' byte range in the blob.
range: Option<Range>,
},
TinyBlob {
content: vector<u8>
},
}
public struct Resource has drop, store {
path: String,
// Response, Representation and Payload headers
// regarding the contents of the resource.
headers: vec_map::VecMap<String, String>,
// The walrus blob id containing the bytes for this resource.
source: BlobSource,
}
I would like to have git hosting on SUI in which blobs are stored on walrus. With walrus-site, a http compatible interface is mostly possible. Some files, like branch names, would better be generated via SUI. For this, the TinyBlob could be used.
This structure is also more future proof.
Component
portal
Code of Conduct
- I agree to follow this project's Code of Conduct.