### Start IPFS Daemon for IPNS Source: https://eth-limo.gitbook.io/documentation/ipns-publishing/how-to-publish-to-ipns Starts the IPFS daemon, which is required to publish and manage IPNS records. The daemon must be running for IPNS operations to work. ```bash ipfs daemon ``` -------------------------------- ### Configure IPFS DNS Resolver for eth.limo Source: https://eth-limo.gitbook.io/documentation/intermediate/using-eth This command configures the IPFS Kubo client to use eth.limo as a DNS resolver for domains starting with 'eth.'. Ensure the 'jq' tool is installed for verifying the configuration. ```shell ipfs config --json DNS.Resolvers '{"eth.": "https://dns.eth.limo/dns-query"}' ``` ```shell cat ~/.ipfs/config | jq .DNS ``` -------------------------------- ### eth.limo DoH API DNS Wireformat Response Example Source: https://eth-limo.gitbook.io/documentation/introduction/what-is-eth.limo/gateway-basics/dns-over-https This example shows the output format when querying the eth.limo DoH API for a DNSLink TXT record using a DNS Wireformat response. It includes the domain, TTL, and the TXT record data, which contains the DNSLink pointer. ```text [vitalik.eth] TTL: 600 seconds TXT: dnslink=/ipfs/QmQhCuJqSk9fF58wU58oiaJ1qbZwQ1eQ8mVzNWe7tgLNiD/ ``` -------------------------------- ### Upload File to IPFS via S3 API (AWS CLI) Source: https://eth-limo.gitbook.io/documentation/ipfs-pinning-providers/undefined/filebase-ipfs-pinning Uploads a file to an IPFS bucket using an S3-compatible API endpoint with the AWS CLI. The CID is returned in the PutObject response header. Requires AWS CLI to be installed and configured. ```bash aws --endpoint https://s3.filebase.com s3 cp test-images/7FIMFhlMf6A.jpg s3://ipfs-test --debug ``` -------------------------------- ### eth.limo DoH API .ART Domain JSON Response Example Source: https://eth-limo.gitbook.io/documentation/introduction/what-is-eth.limo/gateway-basics/dns-over-https This is an example of a JSON response from the eth.limo DoH API when querying a .ART domain for its DNSLink TXT record. The structure is consistent with ENS domain responses, containing question and answer details. ```json {"Status":"0","RD":false,"RA":false,"AD":false,"CD":false,"TC":false,"Question":[{"type":16,"name":"limo.art"}],"Answer":[{"type":16,"name":"limo.art","data":"dnslink=/ipfs/bafybeico3uuyj3vphxpvbowchdwjlrlrh62awxscrnii7w7flu5z6fk77y/","ttl":600}]} ``` -------------------------------- ### Verify .ART Domain Resolution with dig Source: https://eth-limo.gitbook.io/documentation/.art-resolution Use the 'dig' command with the '+short' option to check if your .art domain is correctly resolving to the configured IP addresses. This command helps verify DNS propagation and ensure your setup is successful. ```sh $ dig yourdomain.art +short ``` ```sh # Example output: 3.140.119.203 18.219.255.217 3.135.72.151 ``` -------------------------------- ### GET /dns-query (JSON Response) Source: https://eth-limo.gitbook.io/documentation/introduction/what-is-eth.limo/gateway-basics/dns-over-https Use the GET method for JSON responses. The URL requires 'name' and 'type=TXT' query parameters. ```APIDOC ## GET /dns-query (JSON Response) ### Description This endpoint retrieves DNSLink TXT records in JSON format. It is designed for clients that prefer or require JSON structured data. ### Method GET ### Endpoint `https://dns.eth.limo/dns-query` ### Parameters #### Query Parameters - **name** (string) - Required - The ENS domain name to resolve (e.g., `vitalik.eth`). - **type** (string) - Required - Must be `TXT` as it's the only supported record type. - **dns** (string) - Optional - A base64 encoded DNS message to send instead of relying on the `name` parameter. ### Request Example ```shell curl 'https://dns.eth.eth.limo/dns-query?name=vitalik.eth&type=TXT' ``` ### Response #### Success Response (200) - **Status** (string) - The DNS query status. - **RD** (boolean) - Recursion Desired flag. - **RA** (boolean) - Recursion Available flag. - **AD** (boolean) - Authenticated Data flag. - **CD** (boolean) - Checking Disabled flag. - **TC** (boolean) - TrunCation flag. - **Question** (array) - An array containing the DNS query details. - **type** (number) - The DNS record type requested. - **name** (string) - The DNS name queried. - **Answer** (array) - An array containing the DNS query answers. - **type** (number) - The DNS record type of the answer. - **name** (string) - The DNS name the answer pertains to. - **data** (string) - The DNS record data, containing the DNSLink path (e.g., `dnslink=/ipfs/Qm...`). - **ttl** (number) - Time To Live for the record in seconds. #### Response Example ```json { "Status": "0", "RD": false, "RA": false, "AD": false, "CD": false, "TC": false, "Question": [ { "type": 16, "name": "vitalik.eth" } ], "Answer": [ { "type": 16, "name": "vitalik.eth", "data": "dnslink=/ipfs/QmQhCuJqSk9fF58wU58oiaJ1qbZwQ1eQ8mVzNWe7tgLNiD/", "ttl": 600 } ] } ``` ### Supported Domains Supports standard ENS domains (e.g., `vitalik.eth`) and `.art` domains (e.g., `limo.art`). ``` -------------------------------- ### eth.limo DoH API JSON Response Example Source: https://eth-limo.gitbook.io/documentation/introduction/what-is-eth.limo/gateway-basics/dns-over-https This is an example of the JSON response received from the eth.limo DoH API when querying an ENS domain for a TXT record. It includes status, question, and answer sections, with the DNSLink data present in the 'data' field of the 'Answer' object. ```json { "Status": "0", "RD": false, "RA": false, "AD": false, "CD": false, "TC": false, "Question": [ { "type": 16, "name": "vitalik.eth" } ], "Answer": [ { "type": 16, "name": "vitalik.eth", "data": "dnslink=/ipfs/QmQhCuJqSk9fF58wU58oiaJ1qbZwQ1eQ8mVzNWe7tgLNiD/", "ttl": 600 } ] } ``` -------------------------------- ### Query .ART Domain via DoH (JSON Response) Source: https://eth-limo.gitbook.io/documentation/introduction/what-is-eth.limo/gateway-basics/dns-over-https This example shows how to query a .ART domain for its DNSLink TXT record using the eth.limo DoH API and receive a JSON response. Similar to ENS domains, it uses the 'name' and 'type' query parameters. ```shell curl 'https://dns.eth.eth.limo/dns-query?name=limo.art&type=TXT' ``` -------------------------------- ### Uploading a File to IPFS via S3-Compatible API (PutObject) Source: https://eth-limo.gitbook.io/documentation/ipfs-pinning-providers/undefined/filebase-ipfs-pinning Demonstrates how to upload a file to IPFS using the S3-compatible API. The CID of the uploaded file is returned in the response headers of the PutObject call. ```APIDOC ## PUT // ### Description Uploads an object to an IPFS bucket. The Content-CID header in the response will contain the IPFS CID of the uploaded file. ### Method PUT ### Endpoint `https://s3.filebase.com//` ### Parameters #### Path Parameters - **bucket-name** (string) - Required - The name of the bucket where the object will be stored. - **object-key** (string) - Required - The name of the object to be uploaded. #### Query Parameters None #### Request Body - **file** (binary) - Required - The file content to upload. ### Request Example ```bash aws --endpoint https://s3.filebase.com s3 cp test-images/7FIMFhlMf6A.jpg s3://ipfs-test ``` ### Response #### Success Response (200) - **Content-CID** (string) - The IPFS CID of the uploaded file. #### Response Example ```json { "Response": { "AcceptRanges": "bytes", "LastModified": "Tue, 01 Nov 2023 10:00:00 GMT", "ContentLength": 1024, "ETag": "\"abcdef1234567890\"", "ContentType": "image/jpeg", "Bucket": "ipfs-test", "Key": "test-images/7FIMFhlMf6A.jpg" } } ``` *Note: The actual CID is typically found in the response headers, not the JSON body. The example above is illustrative.* ``` -------------------------------- ### Initialize IPFS Node for IPNS Source: https://eth-limo.gitbook.io/documentation/ipns-publishing/how-to-publish-to-ipns Initializes a new IPFS node with the 'server' profile, which is recommended for publishing IPNS records. This command sets up the necessary configurations for running an IPFS daemon. ```bash ipfs init --profile server ``` -------------------------------- ### Retrieving Object Information via HeadObject API Source: https://eth-limo.gitbook.io/documentation/ipfs-pinning-providers/undefined/filebase-ipfs-pinning Demonstrates how to retrieve metadata about an object, including its IPFS CID, using the HeadObject API. This is useful if you only need the CID without downloading the entire object. ```APIDOC ## HEAD // ### Description Retrieves metadata about an object, including its IPFS CID, without returning the object itself. The CID is available in the response headers. ### Method HEAD ### Endpoint `https://s3.filebase.com//` ### Parameters #### Path Parameters - **bucket-name** (string) - Required - The name of the bucket containing the object. - **object-key** (string) - Required - The key (name) of the object. #### Query Parameters None #### Request Body None ### Request Example ```bash aws --endpoint https://s3.filebase.com s3api head-object --bucket ipfs-test --key 7FIMFhlMf6A.jpg ``` ### Response #### Success Response (200) - **Content-CID** (string) - The IPFS CID of the object. #### Response Example *Note: The response to a HEAD request typically contains metadata in the headers. The specific header containing the CID might vary, but it's often named similar to 'x-amz-meta-cid' or 'Content-CID'. The structure below is illustrative of metadata returned.* ```json { "Response": { "AcceptRanges": "bytes", "LastModified": "Tue, 01 Nov 2023 10:00:00 GMT", "ContentLength": 1024, "ETag": "\"abcdef1234567890\"", "ContentType": "image/jpeg", "Bucket": "ipfs-test", "Key": "test-images/7FIMFhlMf6A.jpg" } } ``` ``` -------------------------------- ### Configure DNS A Records for .ART Domains Source: https://eth-limo.gitbook.io/documentation/.art-resolution Add these IP addresses as A records in your domain's DNS configuration to enable LIMO resolution. This step is crucial for pointing your domain to the eth.limo gateway. Ensure your registrar supports multiple IP addresses per A record. ```plaintext 3.140.119.203 18.219.255.217 3.135.72.151 ``` -------------------------------- ### POST /dns-query (DNS Wireformat Response) Source: https://eth-limo.gitbook.io/documentation/introduction/what-is-eth.limo/gateway-basics/dns-over-https Use the POST method with `Content-Type: application/dns-message` for binary DNS wireformat responses. This is suitable for applications needing to handle raw DNS data. ```APIDOC ## POST /dns-query (DNS Wireformat Response) ### Description This endpoint allows for binary DNS message exchange. It is recommended for applications that need to process raw DNS data directly or have specific binary encoding requirements. ### Method POST ### Endpoint `https://dns.eth.limo/dns-query` ### Headers - **Content-Type**: `application/dns-message` ### Request Body Binary encoded DNS message. ### Request Example ```shell $ doh -tTXT vitalik.eth https://dns.eth.limo/dns-query ``` ### Response #### Success Response (200) Binary DNS wireformat response. #### Response Example (Output from `doh` client) ``` [vitalik.eth] TTL: 600 seconds TXT: dnslink=/ipfs/QmQhCuJqSk9fF58wU58oiaJ1qbZwQ1eQ8mVzNWe7tgLNiD/ ``` ### Supported Domains Supports standard ENS domains (e.g., `vitalik.eth`) and `.art` domains (e.g., `limo.art`). ``` -------------------------------- ### Pin CID to IPFS Source: https://eth-limo.gitbook.io/documentation/ipns-publishing/how-to-publish-to-ipns Pins the generated CID to your local IPFS node. Pinning ensures that the content associated with the CID is stored and available on your node. ```bash ipfs pin add ``` -------------------------------- ### Resolve ENS Names with IPFS Source: https://eth-limo.gitbook.io/documentation/intermediate/using-eth This command resolves an ENS name using IPFS. The ENS name must be prefixed with '/ipns/'. This operation requires the IPFS daemon to be running. ```shell ipfs resolve -r /ipns/vitalik.eth ``` -------------------------------- ### Publish CID to IPNS Source: https://eth-limo.gitbook.io/documentation/ipns-publishing/how-to-publish-to-ipns Publishes the specified CID to IPNS, creating a mutable link to your content. This command associates the CID with an IPNS public key, which can then be used as a stable reference. ```bash ipfs name publish ``` -------------------------------- ### HTTP Response Codes Source: https://eth-limo.gitbook.io/documentation/introduction/what-is-eth.limo/gateway-basics/dns-over-https Overview of standard HTTP response codes returned by the DoH API. ```APIDOC ## HTTP Response Codes ### Description This section details the HTTP status codes returned by the eth.limo DoH API to indicate the outcome of a request. ### Codes - **200 OK**: The request was processed successfully. - **422 Unprocessable Entity**: The contenthash type is not supported, or the request could not be processed for other reasons. - **451 Unavailable For Legal Reasons**: The requested content is unavailable due to legal restrictions. - **5xx Server Error**: An unexpected internal server error occurred. Please report such issues. ``` -------------------------------- ### Retrieve IPFS CID using HeadObject API (AWS CLI) Source: https://eth-limo.gitbook.io/documentation/ipfs-pinning-providers/undefined/filebase-ipfs-pinning Fetches the Content Identifier (CID) of an object stored on IPFS via an S3-compatible API using the HeadObject command. This is useful for retrieving the CID if it was not captured during the upload. Requires AWS CLI. ```bash aws --endpoint https://s3.filebase.com s3api head-object --bucket ipfs-test --key 7FIMFhlMf6A.jpg ``` -------------------------------- ### Query ENS Domain via DoH (JSON Response) Source: https://eth-limo.gitbook.io/documentation/introduction/what-is-eth.limo/gateway-basics/dns-over-https This snippet demonstrates how to query an ENS domain for its DNSLink TXT record using the eth.limo DoH API and receive a JSON response. It requires the domain name and specifies the record type as TXT. The content path is extracted from the 'data' field within the 'Answer' array. ```shell curl 'https://dns.eth.limo/dns-query?name=vitalik.eth&type=TXT' ``` -------------------------------- ### Generate CID for Content Source: https://eth-limo.gitbook.io/documentation/ipns-publishing/how-to-publish-to-ipns Generates a Content Identifier (CID) for a given file or directory using CID version 1. This CID will be used to reference the content on IPFS. ```bash ipfs add --cid-version 1 ``` -------------------------------- ### Query ENS Domain via DoH (DNS Wireformat Response) Source: https://eth-limo.gitbook.io/documentation/introduction/what-is-eth.limo/gateway-basics/dns-over-https This snippet illustrates how to use the 'doh' client to query an ENS domain for its DNSLink TXT record via the eth.limo DoH API, requesting a DNS Wireformat response. It specifies the record type and domain name. ```shell doh -tTXT vitalik.eth https://dns.eth.limo/dns-query ``` -------------------------------- ### HTML Clock Website Code Source: https://eth-limo.gitbook.io/documentation/beginner/how-to-use-ipfs-ipns/uploading-to-ipfs/self-hosting-instructions-for-ipfs-and-ipns This HTML code creates a simple webpage that displays a clock. It includes basic CSS for styling and JavaScript to update the clock every second. The script relies on the browser's Date object and the setInterval function. ```html Simple Clock
``` === COMPLETE CONTENT === This response contains all available snippets from this library. No additional content exists. Do not make further requests.