placeStreamBadgeDefs top-level constant
place.stream.badge.defs
Implementation
const placeStreamBadgeDefs = <String, dynamic>{
"lexicon": 1,
"id": "place.stream.badge.defs",
"defs": {
"bot": {
"type": "token",
"description":
"This user is a bot. Self-applied via place.stream.chat.profile selfLabels.",
},
"mod": {
"type": "token",
"description": "This user is a moderator. Displayed with a sword icon.",
},
"vip": {
"type": "token",
"description": "This user is a very important person.",
},
"event": {
"type": "token",
"description":
"This user has won or earned a special event or contest badge.",
},
"streamer": {
"type": "token",
"description": "This user is the streamer. Displayed with a star icon.",
},
"badgeSlot": {
"type": "object",
"description":
"A display slot containing available issuance-based badges and which one (if any) is currently selected.",
"required": ["available"],
"properties": {
"selected": {
"type": "ref",
"description": "The currently selected badge in this slot, if any.",
"ref": "#badgeIssuanceView",
},
"available": {
"type": "array",
"description": "All badges available for this slot.",
"items": {"type": "ref", "ref": "#badgeIssuanceView"},
},
},
},
"badgeView": {
"type": "object",
"description":
"View of a badge record, with fields resolved for display. If the DID in issuer is not the current streamplace node, the signature field shall be required.",
"required": ["badgeType", "issuer", "recipient"],
"properties": {
"name": {
"type": "string",
"description": "Display name from the badge definition.",
},
"issuer": {
"type": "string",
"format": "did",
"description": "DID of the badge issuer.",
},
"imageUrl": {
"type": "string",
"format": "uri",
"description": "Resolved image URL for the badge icon.",
},
"badgeType": {
"type": "string",
"knownValues": [
"place.stream.badge.defs#mod",
"place.stream.badge.defs#streamer",
"place.stream.badge.defs#vip",
"place.stream.badge.defs#event",
"place.stream.badge.defs#bot",
],
},
"recipient": {
"type": "string",
"format": "did",
"description": "DID of the badge recipient.",
},
"signature": {
"type": "string",
"description":
"TODO: Cryptographic signature of the badge (of a place.stream.key).",
},
"description": {
"type": "string",
"description": "Description from the badge definition.",
},
},
},
"badgeIssuanceView": {
"type": "object",
"description":
"A resolved view of a badge issuance, including def fields for display.",
"required": ["issuanceUri", "badgeType", "issuer"],
"properties": {
"name": {
"type": "string",
"description": "Display name from the badge definition.",
},
"issuer": {
"type": "string",
"format": "did",
"description": "DID of the badge issuer.",
},
"imageUrl": {
"type": "string",
"format": "uri",
"description": "Resolved image URL for the badge icon.",
},
"selected": {
"type": "boolean",
"description":
"Whether this badge is currently in the user's chat profile selection.",
},
"badgeType": {
"type": "string",
"knownValues": [
"place.stream.badge.defs#vip",
"place.stream.badge.defs#event",
],
},
"description": {
"type": "string",
"description": "Description from the badge definition.",
},
"issuanceCid": {
"type": "string",
"description": "CID of the place.stream.badge.issuance record.",
},
"issuanceUri": {
"type": "string",
"format": "at-uri",
"description": "AT URI of the place.stream.badge.issuance record.",
},
},
},
},
};