You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 
Go to file
Jamie Hewitt 9399c48d60
Merge pull request #42 from oceanprotocol/dependabot/npm_and_yarn/prettier-2.8.3
5 days ago
.github put back module 4 weeks ago
.husky Setting up next serverless function 6 months ago
.vscode Setting up next serverless function 6 months ago
api fix text route 4 weeks ago
test fix lint 4 weeks ago
.env.example Removing NEXT_PUBLIC_ prefix 6 months ago
.eslintrc Updating eslintrc 6 months ago
.gitignore Removing Next.js 6 months ago
.prettierrc Setting up dev tools 6 months ago
README.md Updating readme example responses 6 months ago
package-lock.json Bump prettier from 2.8.1 to 2.8.3 5 days ago
package.json Bump prettier from 2.8.1 to 2.8.3 5 days ago
tsconfig.json set tyoe commonJs 4 weeks ago
vercel.json update ts config 4 weeks ago

README.md

Proxy API for ENS requests

Running Locally

npm install
npm i -g vercel
vercel dev

Example Requests

Get Ens Name

GET http://localhost:3000/api/name?accountId=0x99840Df5Cb42faBE0Feb8811Aaa4BC99cA6C84e0

Example response:

{
    "name": "jellymcjellyfish.eth"
}

Get Ens Address

GET http://localhost:3000/api/address?name=jellymcjellyfish.eth

Example response:

{
    "address": "0x99840Df5Cb42faBE0Feb8811Aaa4BC99cA6C84e0"
}

Get Ens Text Records

GET http://localhost:3000/api/text?name=jellymcjellyfish.eth

Example response:

{
    "records": [
        {
            "key": "url",
            "value": "https://oceanprotocol.com"
        },
        {
            "key": "avatar",
            "value": "https://raw.githubusercontent.com/oceanprotocol/art/main/logo/favicon-white.png"
        },
        {
            "key": "com.twitter",
            "value": "oceanprotocol"
        },
        {
            "key": "com.github",
            "value": "oceanprotocol"
        }
    ]
}

Get ENS Profile

GET http://localhost:3000/api/profile?address=0x99840Df5Cb42faBE0Feb8811Aaa4BC99cA6C84e0

Example response:

{
    "profile": {
        "name": "jellymcjellyfish.eth",
        "avatar": "https://metadata.ens.domains/mainnet/avatar/jellymcjellyfish.eth",
        "links": [
            {
                "key": "url",
                "value": "https://oceanprotocol.com"
            },
            {
                "key": "com.twitter",
                "value": "oceanprotocol"
            },
            {
                "key": "com.github",
                "value": "oceanprotocol"
            }
        ]
    }
}