🚀 Big News: Socket Acquires Coana to Bring Reachability Analysis to Every Appsec Team.Learn more
Socket
Book a DemoInstallSign in
Socket

ans-api-wrapper

Package Overview
Dependencies
Maintainers
1
Versions
1
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

ans-api-wrapper

JS API wrapper for ANS

0.0.1
latest
Source
npm
Version published
Weekly downloads
3
Maintainers
1
Weekly downloads
 
Created
Source

@decentdotland/ans-api-wrapper

API wrapper for ANS node server

Synopsis

ES6 API wrapper for ANS protocol for reading the ANS Smartweave contract state.

Getting Started

Installation

npm install -g ans-api

Usage

Get a user profile

import { getProfile } from "ans-api-wrapper";

const label = "decentland.ar";
const address = "...43-char-string...";

async function loadProfile() {
  const profile = await getProfile(label || address);

  return profile;
}

Resolving a label/domain

import { getAddress } from "ans-api-wrapper";

const label = "decentland.ar";

async function addressOf(label) {
  const address = await getAddress(label);

  return address;
}

Contributing

If you have a suggestion that would make this protocol or the API better, please fork the repository and create a pull request. You can also simply open an issue with the tag "enhancement".

  • Fork the Project
  • Create your Feature Branch (git checkout -b feature/xyz)
  • Commit your Changes (git commit -m 'feat: abc-xyz')
  • Push to the Branch (git push origin feature/xyz)
  • Open a Pull Request

Contributions are greatly appreciated !

License

This protocol is licensed under the MIT license.

Keywords

ANS

FAQs

Package last updated on 08 Feb 2022

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts