42 lines
1.3 KiB
Markdown
42 lines
1.3 KiB
Markdown
## Indexation
|
||
|
||
### Stored content types
|
||
|
||
- `local/content_bin` – binary content stored only locally (or indexer no found it on chain)
|
||
- `onchain/content` - content stored onchain
|
||
- `onchain/content_unknown` - content stored onchain, but we don't have a private key to decrypt it
|
||
|
||
Content item may have multiple types, for example, `local/content_bin` and `onchain/content`.
|
||
|
||
But `content cover`, `content metadata` and `decrypted content` always stored locally.
|
||
|
||
### Content Ownership Proof NFT Values Cell Deserialization
|
||
|
||
```text
|
||
values:^[
|
||
content_hash:uint256
|
||
metadata:^[
|
||
offchain?:int1 = always 1
|
||
https://my-public-node-1.projscale.dev/*:bytes
|
||
]
|
||
content:^[
|
||
content_cid:^Cell = b58encoded CID
|
||
cover_cid:^Cell = b58encoded CID
|
||
metadata_cid:^Cell = b58encoded CID
|
||
]
|
||
]
|
||
```
|
||
|
||
### Available content statuses
|
||
|
||
- `UPLOAD_TO_BTFS` – content is stored locally, upload all content parts to BTFS. This status means that payment is received yet.
|
||
|
||
|
||
### Upload content flow
|
||
|
||
1. User uploads content to server (/api/v1/storage)
|
||
2. User uploads content cover to server (/api/v1/storage)
|
||
3. User send /api/v1/blockchain.sendNewContentMessage to server and accept the transaction in wallet
|
||
4. Indexer receives the transaction and indexes the content. And send telegram notification to user.
|
||
|