New:Socket for Asana Is Now Available.Learn more
Get Started

@redefined/name-resolver-react

Package Overview
Dependencies
Maintainers
4
Versions
67
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install
Package was removed
Sorry, it seems this package was removed from the registry

@redefined/name-resolver-react

React component to resolve crypto names

latest
Source
npmnpm
Version
1.8.6
Version published
Maintainers
4
Created
Source

Redefined-Name-Resolver-React

Simple input component that will help resolve domains on services such as Redefined, ENS and Unstoppable.

See redefined-name-resolver-react for live demos.

redefined-name-resolver-react is founded by E2xLabs. We will be glad to see the integration of our library in other services.

Features include:

  • The ability to find addresses in 3 services at once
  • Copy the address of the found domain
  • And if you are a developer, then just pass a function to the props and do whatever you want with the address

Installation and usage

The easiest way to use react-select is to install it from npm and build it into your app with Webpack.

npm i redefined-name-resolver-react

Then use it in your app:

import React from 'react';
import {RedefinedDomainResolver} from "@redefined/name-resolver-react";

export default function App() {
  return (
    <div className="App">
        <RedefinedDomainResolver onUpdate={(res) => console.log(res)} />
    </div>
  );
}

Props

Common props you may want to specify include:

  • autoFocus: boolean - focus the control when it mounts
  • theme: "dark" | "light" - apply a dark or light theme to the component
  • width: string - set component width
  • disabled: boolean - disable the control
  • onUpdate: (res: Account | null) => void - subscribe to select event
  • hiddenAddressGap: { leadingCharLimit: number; trailingCharLimit: number; } - specify the size of the address hidden. For example, for an address with the following parameters hiddenAddressGap={{leadingCharLimit: 4, trailingCharLimit: 6}} you can see following result: 0x6B ... D55d04
  • resolverOptions - change the resolver options for Resolver engine such as specify resolver services or set nodes

Events

As a result event, you get an object of the following type type Account = { address: string, network: string, from: string }

License

Apache License 2.0

FAQs

Package last updated on 28 Sep 2023

Related posts