New Case Study:See how Anthropic automated 95% of dependency reviews with Socket.Learn More
Socket
Sign inDemoInstall
Socket

get-ens

Package Overview
Dependencies
Maintainers
1
Versions
19
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

get-ens - npm Package Compare versions

Comparing version 2.1.0 to 2.1.1

6

dist/index.d.ts

@@ -42,2 +42,6 @@ import { BaseProvider } from '@ethersproject/providers';

*/
export declare const getENS: (provider?: BaseProvider, contractAddress?: string, endpointUrl?: string) => (_domain: string, fetchOptions?: RequestInit) => Promise<ResolvedENS>;
export declare const getENS: (opts?: Partial<{
provider: BaseProvider;
contractAddress: string;
endpointUrl: string;
}>) => (_domain: string, fetchOptions?: RequestInit) => Promise<ResolvedENS>;

5

dist/index.js

@@ -158,3 +158,6 @@ import { namehash } from '@ethersproject/hash';

*/
const getENS = (provider = getDefaultProvider(), contractAddress = '0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41', endpointUrl = ENDPOINT) => {
const getENS = (opts) => {
const provider = opts?.provider || getDefaultProvider();
const contractAddress = opts?.contractAddress || '0x4976fb03C32e5B8cfe2b6cCB31c09Ba78EBaBa41';
const endpointUrl = opts?.endpointUrl || ENDPOINT;
const contract = new Contract(contractAddress, ABI, provider);

@@ -161,0 +164,0 @@ const getRecord = async (node, record) => await contract.functions.text(node, record);

{
"name": "get-ens",
"version": "2.1.0",
"version": "2.1.1",
"description": "Get text records of an ENS address with ease.",

@@ -50,3 +50,3 @@ "exports": "./dist/index.js",

"scripts": {
"test": "tsm node_modules/uvu/bin.js tests",
"test": "uvu -r tsm tests",
"build": "rollup -c",

@@ -53,0 +53,0 @@ "test:coverage": "c8 --include=src pnpm test",

<div align="center">
<img src="https://www.pngkit.com/png/full/152-1526200_ens-logo-ethereum-name-service.png" height="150px" /><br />

@@ -41,3 +40,3 @@

const { address, records, owner } = await getENS(provider)('foda.eth')
const { address, records, owner } = await getENS({ provider })('foda.eth')

@@ -72,3 +71,3 @@ /*

const { address, records, owner } = await getENS(provider)('foda.eth')
const { address, records, owner } = await getENS({ provider })('foda.eth')
```

@@ -82,4 +81,4 @@

[github-actions]: https://github.com/talentlessguy/get-ens/actions
[gh-actions-img]: https://img.shields.io/github/workflow/status/talentlessguy/get-ens/CI?style=for-the-badge&color=4D48F7&label=&logo=github
[gh-actions-img]: https://img.shields.io/github/actions/workflow/status/talentlessguy/get-ens/main.yml?branch=master&style=for-the-badge&color=4D48F7
[docs-badge]: https://img.shields.io/badge/Docs-4D48F7?style=for-the-badge&logo=deno
[docs]: https://doc.deno.land/https/esm.sh/get-ens
SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc