mirror of
https://github.com/oceanprotocol/ens-proxy.git
synced 2024-12-02 05:57:34 +01:00
c306071027
Bumps [ws](https://github.com/websockets/ws) to 8.17.1 and updates ancestor dependency [ethers](https://github.com/ethers-io/ethers.js). These dependencies need to be updated together. Updates `ws` from 7.4.6 to 8.17.1 - [Release notes](https://github.com/websockets/ws/releases) - [Commits](https://github.com/websockets/ws/compare/7.4.6...8.17.1) Updates `ethers` from 5.7.2 to 6.13.2 - [Release notes](https://github.com/ethers-io/ethers.js/releases) - [Changelog](https://github.com/ethers-io/ethers.js/blob/main/CHANGELOG.md) - [Commits](https://github.com/ethers-io/ethers.js/compare/v5.7.2...v6.13.2) --- updated-dependencies: - dependency-name: ws dependency-type: indirect - dependency-name: ethers dependency-type: direct:production ... Signed-off-by: dependabot[bot] <support@github.com> |
||
---|---|---|
.github | ||
.husky | ||
.vscode | ||
api | ||
test | ||
.env.example | ||
.eslintrc | ||
.gitignore | ||
.prettierrc | ||
index.html | ||
package-lock.json | ||
package.json | ||
README.md | ||
tsconfig.json | ||
vercel.json |
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"
}
]
}
}