# ch.indiemusi.alpha.track

> Published by [indiemusi.ch](https://lexicon.garden/identity/did:plc:lcmrbur2pydmpelfcs7fjbdx)

✓ This is the authoritative definition for this NSID.

## Links

- [View on Lexicon Garden](https://lexicon.garden/lexicon/did:plc:lcmrbur2pydmpelfcs7fjbdx/ch.indiemusi.alpha.track)
- [Documentation](https://lexicon.garden/lexicon/did:plc:lcmrbur2pydmpelfcs7fjbdx/ch.indiemusi.alpha.track/docs)
- [Examples](https://lexicon.garden/lexicon/did:plc:lcmrbur2pydmpelfcs7fjbdx/ch.indiemusi.alpha.track/examples)

## Definitions

### `ch.indiemusi.alpha.track`

**Type**: `record`

An encrypted audio track. The audio blob is encrypted with AES-GCM-256, and the decryption key is wrapped and stored in grant records.

**Key**: `tid`

| Property | Type | Required | Description |
|----------|------|----------|-------------|
| `title` | `string` | Yes | Track title |
| `audioBlob` | `blob` | Yes | The encrypted audio file |
| `createdAt` | `string` (datetime) | Yes | Timestamp when the track was uploaded |
| `encryptedContentIv` | `string` | Yes | Base64-encoded IV (12 bytes) used to encrypt the audio with the content key |
| `encryptionAlgorithm` | `string` | No | The symmetric algorithm used to encrypt the audio blob |

## Raw Schema

```json
{
  "id": "ch.indiemusi.alpha.track",
  "defs": {
    "main": {
      "key": "tid",
      "type": "record",
      "record": {
        "type": "object",
        "required": [
          "title",
          "audioBlob",
          "encryptedContentIv",
          "createdAt"
        ],
        "properties": {
          "title": {
            "type": "string",
            "maxLength": 255,
            "description": "Track title"
          },
          "audioBlob": {
            "type": "blob",
            "accept": [
              "audio/wav",
              "audio/mpeg",
              "audio/flac"
            ],
            "description": "The encrypted audio file"
          },
          "createdAt": {
            "type": "string",
            "format": "datetime",
            "description": "Timestamp when the track was uploaded"
          },
          "encryptedContentIv": {
            "type": "string",
            "maxLength": 32,
            "description": "Base64-encoded IV (12 bytes) used to encrypt the audio with the content key"
          },
          "encryptionAlgorithm": {
            "type": "string",
            "default": "AES-GCM-256",
            "maxLength": 50,
            "description": "The symmetric algorithm used to encrypt the audio blob"
          }
        }
      },
      "description": "An encrypted audio track. The audio blob is encrypted with AES-GCM-256, and the decryption key is wrapped and stored in grant records."
    }
  },
  "$type": "com.atproto.lexicon.schema",
  "lexicon": 1
}
```
