> For the complete documentation index, see [llms.txt](https://beatswap.gitbook.io/beatswap/llms.txt). Markdown versions of documentation pages are available by appending `.md` to page URLs; this page is available as [Markdown](https://beatswap.gitbook.io/beatswap/the-path-to-stardom/oracle.md).

# Oracle

## Overview

The BeatSwap Oracle permanently records structured **IPR (Intellectual Property Rights) metadata** on the blockchain. It serves as the **core foundation** of the BeatSwap ecosystem, providing the **trusted source of truth** for all services including **Space**, **RWA Launcher**, etc.

Beyond simple data storage, the Oracle offers **accurate and real-time verifiable IPR information** to BeatSwap internal services and approved external partners (such as streaming platforms, licensing agencies, or content distributors).

Additionally, through the Oracle, **rights holders can monitor the real-time usage and royalty generation of their IP assets transparently.**

***

## Key Features

### ✅ On-Chain Metadata Storage

* Permanently stores detailed information (title, composer, lyricist, arranger, genre, work type, publisher, unlock count) and rights holder addresses in the ICP Canister.
* Rights holder addresses are **updatable**, and **all changes are permanently recorded** to ensure full historical traceability.
* All metadata is managed based on a standardized schema.

### ✅ Real-Time Verification and Query

* Enables immediate metadata retrieval through HTTP or authenticated Canister interfaces.
* Designed to support compatibility across both Web2 and Web3 services.

### ✅ Multi-Blockchain Integration

* Stores token addresses, staking contract addresses, and contract versioning without dependency on specific blockchains.
* Supports seamless interoperability and rights tracking across networks.

### ✅ Real-Time Usage Recording

* IP-RIghts usage events (such as streaming activity) are recorded and linked to corresponding works in real time.
* Enables accurate, tamper-proof tracking of royalties and work performance metrics.

***

## Data Structure

The Oracle organizes metadata into five major categories:

1. **music\_work\_info**
   * Title, composer, lyricist, arranger, genre, work type, publisher, unlock count.
2. **production\_info**
   * Main artist, musician, record label, release date, playback duration.
3. **daily\_rights\_holders**
   * Daily recorded addresses for copyright and neighboring rights holders.
4. **tokenized\_right\_contracts**
   * Mapping of token contract addresses for copyright and neighboring rights.
5. **verification\_contracts**
   * Metadata of deployed staking contracts including address, version, and deployment date.

> All metadata fields are implemented using **Motoko type definitions**, ensuring native compatibility with Internet Computer smart contracts.

***

## Metadata Flow

* **Registration**: Creators register their IP metadata through the **RWA Launcher** platform.
* **Validation**: Submitted metadata undergoes schema-based validation to ensure structural integrity.
* **Storage**: Once validated, metadata is permanently recorded in the Core Canister.
* **Query**: BeatSwap services and approved external partners can access and retrieve metadata in real time.

Rights holders can continuously **track ownership changes, royalty-generating usage events, and real-time performance** of their assets.

***

## External Integrations

### 🎧 External Digital Platforms and Partner Services

* Verified metadata can be fetched and displayed inside external services.
* **Approved Partner IDs** can use the **Primary Key** of songs to smoothly identify rights holders and validate ownership.

### 💰 Royalty Settlement Support

* **BeatSwap internal services and approved Partner IDs** can query daily rights ownership and usage activity data.
* Enables transparent and accurate royalty distribution based on verifiable blockchain records.

***

## Summary

<table><thead><tr><th width="210">Item</th><th>Description</th></tr></thead><tbody><tr><td>Storage</td><td>Internet Computer Canister (Core Oracle)</td></tr><tr><td>Usage</td><td>BeatSwap internal services and external digital platforms and licensing partners</td></tr><tr><td>Real-Time Query</td><td>✅ via @dfinity/agent SDK or HTTP API</td></tr><tr><td>Blockchain Integration</td><td>✅ Token addresses and contracts stored without network dependency</td></tr><tr><td>Rights Tracking</td><td>✅ Daily ownership changes and real-time usage history</td></tr><tr><td>Royalty Transparency</td><td>✅ Rights holders can verify royalty generation in real time</td></tr><tr><td>Technology Stack</td><td>Motoko + HashMap + Principal Mapping + Canister APIs</td></tr></tbody></table>

***


---

# Agent Instructions
This documentation is published with GitBook. GitBook is the documentation platform designed so that both humans and AI agents can read, navigate, and reason over technical content effectively. Learn more at gitbook.com.

## Querying This Documentation
If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter, and the optional `goal` query parameter:

```
GET https://beatswap.gitbook.io/beatswap/the-path-to-stardom/oracle.md?ask=<question>&goal=<endgoal>
```

`ask` is the immediate question: it should be specific, self-contained, and written in natural language.
`goal` is optional and describes the broader end goal you are ultimately trying to accomplish on behalf of the user. GitBook uses it to tailor the answer towards what is most useful for that goal.

The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
