-
Notifications
You must be signed in to change notification settings - Fork 327
/
version-1.cddl
122 lines (111 loc) · 3.96 KB
/
version-1.cddl
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
string = text .size (0..64)
policy_id = string / bytes ; hex string for CIP-25 version 1, bytes version 2
asset_name = string / bytes ; utf-8 for CIP-25 version 1, bytes for version 2
artist_details =
{
name : string, ; artist or band name
? image : string / [* string], ; optional image of the artist
}
files_details =
{
name : string,
mediaType : string,
src : string / [* string],
; For Single, these values are defined at the top level. For Multiple, define them for each track.
? artists : [* artist_details],
? album_title : string,
? track_number: uint,
? song_title: string / [* string],
? song_duration: string .regexp "^P(?!$)(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)$", ; iso8601 duration
? genres: [1*3 string],
? copyright: string,
; For Single, these values are defined at the top level. For Multiple, optionally define them for each track
? contributing_artists : [* artist_details],
? series: string,
? collection: string,
? set: string,
? mood: string,
? lyrics: string,
? lyricists: [* string],
? special_thanks: [* string],
? visual_artist: string,
? distributor: string,
? release_date: string,
? publication_date: string,
? catalog_number: uint,
? bitrate: string,
? mix_engineer: string,
? mastering_engineer: string,
? producer: string,
? co_producer: string,
? featured_artist: artist_details,
? recording_engineer: string,
? release_version: uint,
? parental_advisory: string,
? explicit: bool,
? isrc: string,
? iswc: string,
? ipi: [* string],
? ipn: [* string],
? isni: [* string],
? metadata_language: string,
? country_of_origin: string,
? language: string,
? derived_from: string,
? links: { * string => string / [* string] },
}
metadata_details =
{
name : string,
image : string / [* string],
music_metadata_version: 1,
release_type: "Single" / "Multiple",
; Fields that are required if this is a "Single". They are omitted for "Multiple" and should be defined under file_details instead.
? artists : [* artist_details],
? album_title : string,
? track_number: uint,
? song_title: string / [* string],
? song_duration: string .regexp "^P(?!$)(T(?=\d)(\d+H)?(\d+M)?(\d+S)?)$", ; iso8601 duration
? genres: [1*3 string],
? copyright: string,
; Fields that are optional for "Single". They are omitted for "Multiple" and may be defined under file_details instead.
? contributing_artists : [* artist_details],
? series: string,
? collection: string,
? set: string,
? mood: string,
? lyrics: string,
? lyricists: [* string],
? special_thanks: [* string],
? visual_artist: string,
? distributor: string,
? release_date: string,
? publication_date: string,
? catalog_number: uint,
? bitrate: string,
? mix_engineer: string,
? mastering_engineer: string,
? producer: string,
? co_producer: string,
? featured_artist: artist_details,
? recording_engineer: string,
? release_version: uint,
? parental_advisory: string,
? explicit: bool,
? isrc: string,
? iswc: string,
? ipi: [* string],
? ipn: [* string],
? isni: [* string],
? metadata_language: string,
? country_of_origin: string,
? language: string,
? derived_from: string,
? links: { * string => string / [* string] },
files : [* files_details], ; was optional in CIP-25, required by CIP-60
? version: 1 / 2, ; CIP-25 version
? mediaType : string, ; mediaType for the image. audio goes under files.
? description : string / [* string],
}
label_metadata = { * policy_id => { * asset_name => metadata_details } }
metadata = { 721 : uint => label_metadata }