# Feral File v1.0 & A2P ## Data ### Feral File 1.0 | Title | ID | Type| | -------- | -------- | -------- | | Transparent Grit | 2a727b17-7890-4464-913d-3fe5ad2af4ae | Artwork| | Kiki.object | adc4221c-4f00-4193-ac82-c4d9b1a0b681 | Artwork| | Mutant Bagua | 89c348c1-6e78-4e00-ac3f-f58c9e732731 | Artwork| | The One Who Lived Yesterday | 78850fcd-afca-4757-a9c6-9c847cb3c49d | Artwork| | What do you want me to say? | f2db8c40-a2fb-4a93-be03-75ce3b3133f3 | Artwork| | POST 2 | 18125d2a-d424-496f-9949-9c3e625f114e | Artwork| | Leaves of Manifold, of Red and Gold | 92a0c691-c281-4a93-ae1f-48d5eacd0ee3 | Artwork| | Simultan Dub | 21a5bd39-64d0-490b-b578-6c6ecd317b7a | Artwork| | Unsupervised — Machine Hallucinations — MoMA Generative Study 1 | 96f1663b-5216-4758-aa7f-3a70e6d9d45b | Artwork| | F(l)ight | 1b1ffd48-5fc2-4d19-a563-364e00ddfb01 | Artwork| | ماه طلعت، Moon-faced | ce3a3a9a-e894-40a1-b531-95027b1328eb | Artwork| | neural swarm | de81b4e2-0ece-4969-bb0f-2adb62cb2d4e | Artwork| | Embryogenesis (#31) | a36b65c33dc8b9c5f050c7d5590c00d57e7af2716d84f548ac232188d1142715 | Edition | | Infinite Entropy 2 | 4f69d4eb-5f33-4d3b-a0ac-cc4189bf1f83 | Artwork| | Time To Grow | 1e0b019f-60fa-4ae2-96ab-78796310ce0d | Artwork| | Sketches in Iron | 725023bf-1604-4f3b-8e57-100500682b29 | Artwork| | Sketches in Iron | abf1fd61-b911-402b-9e2e-d7dcf96c4d82 | Artwork| | Contested Zone | 434b4eab-f8ed-4e75-b80f-5377e08ca430 | Artwork| | 3 + 2 * 11 | bfe9d8ae-7d6b-45bd-860d-e4445f0bad04 | Artwork| | Aequitas | c59d8e07-ad6c-44b1-8f62-f69e1af87378 | Artwork| | Interplanetary | 429a6406-c083-48c5-af5f-ff37b6302fce | Artwork| | Lizard King at Spa Day on the Neon Isles | 7c391da2-0eb8-484f-9542-5c5733ef632d | Artwork| | Smoke Hands (Dark) 2022 | 0b95013a-599b-4af2-a0a4-fe13eff98e89 | Artwork| | Haristory | cc86cf63-6b79-4bba-9613-e362851cbbdc | Artwork| | CLUB ROTHKO - ORANGE AND YELLOW STARTER PACK | 867218d3-8421-4e45-b6b9-eca2fef44f5d | Artwork| | POWER PLANT | d247736f-14d8-4e9a-8408-3f2328ae4459 | Artwork| | Turandot 2070, Lovers I | 9798c1fd-ccf2-4e2e-be26-fe146a398c85 | Artwork| | Material World Knight: Flying Mode | c570b9bd-d434-4e95-8295-801cc9458b03 | Artwork| | Seed Protocol - Dynamical Lunar Indigenous Time (DLITE) 43:28:22.0004124 | fb935df6-9ee2-4f45-aa0c-c31367aa6962 | Artwork| | LMSP7.PCX | 7002170e-b4e3-4acc-b9c3-5a269d10c2bf | Artwork| | The Body Prepares | a7bac3de-58bd-41df-bab2-bccfa4a536ad | Artwork| | BLOOMCORE #14 | 8520038953287439433536834341059117372268365319568716555346026339118809853360 | Edition | | COLORS OF NOISE #23 | 37847030808823349563907102097979397284732682243657619279198386116874638698915 | Edition | | PERCEIVED | 49766925-db57-4be6-956d-af5aaa26cda5 | Artwork| ## Feral File API ### Server - Endpoint: `feralfile.com/api` - Authentication: No, use anonymous session. ### APIs #### Get exhibition detail ``` GET /exhibitions/:id ``` Parameters: | Param | Description | Example | | -------- | -------- | -------- | | id | exhibition id | `05f42322-d74c-4b03-8332-26f62236dd04` | #### Get the list of artworks from an exhibition ``` /series?exhibitionID=:id&includeArtist=true ``` Parameters: | Param | Description | Example | | -------- | -------- | -------- | | id | exhibition id | `05f42322-d74c-4b03-8332-26f62236dd04` | #### Get the artwork detail ``` /series/:id?includeFiles=true&includeBlockchainType=true ``` Parameters: | Param | Description | Example | | -------- | -------- | -------- | | id | series id | `7b70df63-d20f-44bb-9026-be9e824f0cf8` | #### Get the list of editions from an artwork ``` /artworks?seriesID=:id ``` Parameters: | Param | Description | Example | | -------- | -------- | -------- | | id | series id | `7b70df63-d20f-44bb-9026-be9e824f0cf8` | #### Get the account profile ``` /accounts/:id ``` Parameters: | Param | Description | Example | | -------- | -------- | -------- | | id | account id | `aoEqKB3ZwJ3zMkcAa9YvD2jUAZpwHjGnJc69odCahPi3S5XHpu` | #### Get minted series (on Feral File) from an artist ``` /series?artistID=:id ``` Parameters: | Param | Description | Example | | -------- | -------- | -------- | | id | account id | `aoEqKB3ZwJ3zMkcAa9YvD2jUAZpwHjGnJc69odCahPi3S5XHpu` | #### Get collected artworks (on Feral File) from an artist ``` /artworks?ownerID=:id ``` Parameters: | Param | Description | Example | | -------- | -------- | -------- | | id | account id | `aoEqKB3ZwJ3zMkcAa9YvD2jUAZpwHjGnJc69odCahPi3S5XHpu` | ### Displaying the thumbnails Each thumbnail has an id. To display the thumbnail, the client should construct the url with the following format: ``` https://imagedelivery.net/zDrO-YmKDy1tz0_bjCkDJg/{thumbnail_id}/{variant} ``` The variant determines the image size and crop behavior. We have these following ones: | Variant | Size | | -------- | -------- | | `thumbnailLarge` | 720x720 | | `thumbnailMedium` | 360x360 | | `thumbnailSmall` | 48x48 | Reference: https://developers.cloudflare.com/images/cloudflare-images/serve-images/ ## Wallet Connection A set of libraries that support connecting a crypto wallet to a frontend application depends on the blockchain. We will have a specific library to connect the frontend application to the blockchain's wallets. The libraries provide some general functionalities: 1. Connect a wallet and retrieve the wallet address. This function does not require a signature to verify the ownership of the address. 2. Obtain a wallet signature (not a transaction signature) for the connected address. 3. Send a transaction request to the wallet for execution. ### Autonomy Connect (for Ethereum and Tezos blockchains) A protocol based on WalletConnect 2.0 to support connecting the Autonomy app with a dapp. No library available, just code snippet. ### WalletConnect (for Ethereum blockchain) Reference: https://docs.walletconnect.com/2.0/ ### WalletBeacon (for Tezos blockchain) Reference: https://docs.walletbeacon.io ## Autonomy Chat Server ### Server - chat-ff.test.autonomy.io ### Websocket Endpoint - `GET` `/v1/chat/ws` ### Request The parameters are all in query string. - Required parameters - `address` - the identity to join the group - `signature` - use to validate the requester owns the given address (this is not enforced now. Will add soon) - Group parameters - `index_id` - join the chat in the specific token group - `source` - join the chat in the specific source group ### Example - Chat on source ```shell! $ wscat -c "wss://chat-ff.test.autonomy.io/v1/chat/ws?address=0xAa01D5570E932a13eF9a06677eaf97d56a33393f&source=feralfile&signature=<signature of the wallet address>" ``` ## Command and Response ### Command - SEND - Send a new message in the chat group. ```json { "id": "1", "command": "SEND", "payload": { "message": "Hi, test." } } ``` - `message` - this is message text we would like to send to the chat group - HISTORY - Get historical messages in the chat group. ```json { "id": "1", "command": "HISTORY", "payload": { "lastTimestamp": 1685590692591 } } ``` - `lastTimestamp` - this is the time the call starts to query the historical messages **BACK** to past - RESP - A response command from the server. The `id` will pair to the `id` in requested commands. ```json { "id": "1", "command": "RESP", "payload": { "ok": 1 } } ``` - `payload` of a `RESP` from server will be varied by different requested commands. Will introduce it below - NEW_MESSAGE ```json { "id": "1", "command": "NEW_MESSAGE", "payload": { "messages": [ { "id": "5dc9f252-5fcc-4459-831c-b2f95989c8e2", "timestamp": 1685590540267, "groupID": "feralfile", "sender": "0xAa01D5570E932a13eF9a06677eaf97d56a33393f", "message": "Hi, test." } ] } } ``` - `messages` are new messages coming from other users in the same chat group ### Response #### SEND The response would simply `ok` or `error` if there are some errors happened. ```json { "ok": 1, "error": "" } ``` #### HISTORY The response of `HISTORY` returns a list of messages start from the lastTimestamp to the past. The maximum messages returned every time is 100. ```json { "messages": [ { "id": "5dc9f252-5fcc-4459-831c-b2f95989c8e2", "timestamp": 1685590540267, "groupID": "feralfile", "sender": "0xAa01D5570E932a13eF9a06677eaf97d56a33393f", "message": "Hi, test." } ] } ``` ## Test the server We will use the [wscat](https://www.npmjs.com/package/wscat) command from node.js to test. ### Chat by source First, we connect to the chat server: ```shell! $ wscat -c "wss://chat-ff.test.autonomy.io/v1/chat/ws?address=0xAa01D5570E932a13eF9a06677eaf97d56a33393f&source=feralfile&signature=<signature of the wallet address>" ``` Then we can interactive with the server by command objects: Take `SEND` for example: ```json { "id": "1", "command": "SEND", "payload": { "message": "Hi, test." } } ``` When the client send a `SEND` command, ```json > {"id": "1", "command": "SEND", "payload": {"message": "Hi, test."} } < {"id":"1","command":"RESP","payload":{"ok":1}} ``` the client will get a response from the server immediately. --- All connected client related to the same group would receive a `NEW_MESSAGE`. ```json < {"id":"1","command":"NEW_MESSAGE","payload":{"messages":[{"id":"5dc9f252-5fcc-4459-831c-b2f95989c8e2","timestamp":1685590540267,"groupID":"feralfile","sender":"0xAa01D5570E932a13eF9a06677eaf97d56a33393f","message":"Hi, test."}]}} ``` --- For the new onboarding user, they can use `HISTORY` to get previous chatting messages. The command will return maximum 100 messages for each request. If the client want to get all messages, it needs to save the last timestamp of each query and continuously queries to the server until there is no messages return. ```json > {"id": "1", "command": "HISTORY", "payload": {"lastTimestamp": 1685590692591} } < {"id":"1","command":"RESP","payload":{"messages":[{"id":"5dc9f252-5fcc-4459-831c-b2f95989c8e2","timestamp":1685590540267,"groupID":"feralfile","sender":"0xAa01D5570E932a13eF9a06677eaf97d56a33393f","message":"Hi, test."}]}} ```