Go to file
2022-08-22 14:27:27 +03:00
.husky Setting up next serverless function 2022-08-16 18:30:40 +03:00
.vscode Setting up next serverless function 2022-08-16 18:30:40 +03:00
pages/api Simplifying getWeb3 config 2022-08-22 14:27:27 +03:00
.env.example Removing NEXT_PUBLIC_ prefix 2022-08-22 11:28:08 +03:00
.eslintrc Setting up dev tools 2022-08-15 15:57:57 +03:00
.gitignore Updating gitignore 2022-08-19 13:43:27 +03:00
.prettierrc Setting up dev tools 2022-08-15 15:57:57 +03:00
next-env.d.ts creating getEnsName function & endpoint 2022-08-18 14:26:10 +03:00
package-lock.json Removing refocusExchange 2022-08-22 13:48:33 +03:00
package.json Removing refocusExchange 2022-08-22 13:48:33 +03:00
README.md Updating readme examples 2022-08-22 14:19:02 +03:00
tsconfig.json SImplifying tsconfig 2022-08-22 13:53:38 +03:00

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:

0x99840Df5Cb42faBE0Feb8811Aaa4BC99cA6C84e0

Get Ens Text Records

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

Example response:

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

Get ENS Profile

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

Example response:

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