{
"id": "ch.indiemusi.alpha.grant",
"defs": {
"main": {
"key": "tid",
"type": "record",
"record": {
"type": "object",
"required": [
"serviceDid",
"wrappedMasterKey",
"createdAt"
],
"properties": {
"createdAt": {
"type": "string",
"format": "datetime",
"description": "When the grant was created"
},
"expiresAt": {
"type": "string",
"format": "datetime",
"description": "Optional expiration date. After this, the grant should be considered revoked."
},
"serviceDid": {
"type": "string",
"format": "did",
"maxLength": 256,
"description": "The DID of the streaming service being authorized"
},
"wrappedMasterKey": {
"type": "string",
"maxLength": 512,
"description": "The Master Content Key (32 bytes) encrypted with the service's public key, base64-encoded. Only the service can decrypt this with their private key."
},
"wrappingAlgorithm": {
"type": "string",
"default": "RSA-OAEP",
"maxLength": 50,
"description": "The algorithm used to wrap the master key. Currently RSA-OAEP (asymmetric, using the service's public key)."
},
"wrappedMasterKeyIv": {
"type": "string",
"maxLength": 32,
"description": "Base64-encoded IV (12 bytes) used to encrypt the master key. Only present for AES-GCM wrapping; empty for RSA-OAEP."
}
}
},
"description": "A cryptographic grant allowing a streaming service to decrypt the artist's music catalog. This record contains the master content key encrypted with the service's public key."
}
},
"$type": "com.atproto.lexicon.schema",
"lexicon": 1
}