You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

27 lines
625 B

/// Response model for Blossom blob upload (blob descriptor per BUD-02).
class BlossomUploadResponse {
/// The SHA256 hash of the blob.
final String hash;
/// The URL to access the blob.
final String url;
/// Optional size in bytes.
final int? size;
BlossomUploadResponse({
required this.hash,
required this.url,
this.size,
});
factory BlossomUploadResponse.fromJson(Map<String, dynamic> json) {
return BlossomUploadResponse(
hash: json['hash'] as String? ?? json['sha256'] as String? ?? '',
url: json['url'] as String? ?? '',
size: json['size'] as int?,
);
}
}

Powered by TurnKey Linux.