Extracts a MIP-04 v2 attachment from a NIP-94 kind 1063 file-metadata event.
Kind 1063 events use flat tags (url, m, x, filename, n, v, …)
rather than the space-separated imeta format. Standard NIP-94 fields are
parsed by applesauce's getFileMetadata; the MIP-04-specific fields
(filename, n, v) are read directly from the flat tag list.
Extracts a MIP-04 v2 attachment from a NIP-94 kind 1063 file-metadata event.
Kind 1063 events use flat tags (
url,m,x,filename,n,v, …) rather than the space-separatedimetaformat. Standard NIP-94 fields are parsed by applesauce's getFileMetadata; the MIP-04-specific fields (filename,n,v) are read directly from the flat tag list.Returns
nullif:vtag is absent or does not match MIP04_VERSIONn(nonce) tag is absent or is not exactly 24 characters (hex-encoded 12-byte nonce)filenametag is absent or emptyx(sha256) tag is absent or is not exactly 64 characters (hex-encoded 32-byte hash)m(MIME type) tag is absent or is not a validtype/subtypestring