Skip to content

ADAO-Summon/use-ada-handle-resolver

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

7 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

ADA Handle resolver

This is useful hook for react based apps to resolve ADA handles as Cardano addresses

Debounced, with custom delay

Works on mainnnet and the old testnet

Install

npm install @summonlabs/use-ada-handle-resolver

Example

Use it on input, and show the resolved address to an user. Address is returned as an empty string when no handle is resolved.

const BLOCKFROST_PROJECT_ID = `<project_id>`
const App = () => {

  const { address, handleInputChangeDebounced } = useAdaHandleResolver({ blockfrostProjectId: BLOCKFROST_PROJECT_ID, delay: 500 })

  return (
    <form>
      <input type={'text'} onChange={handleInputChangeDebounced} />
      {address ? `Resolved as ${address}` : ``}
    </form>
  );
};

About

No description, website, or topics provided.

Resources

License

Stars

Watchers

Forks

Releases

No releases published

Packages

No packages published