Socket
Socket
Sign inDemoInstall

@ic-naming/client

Package Overview
Dependencies
20
Maintainers
2
Versions
14
Alerts
File Explorer

Advanced tools

Install Socket

Detect and block malicious and high-risk dependencies

Install

    @ic-naming/client

## Installing


Version published
Maintainers
2
Created

Changelog

Source

0.2.5 (2022-03-13)

Bug Fixes

  • remove browser entry (ef80fdf)

Readme

Source

IC-Naming JS SDK

Installing

Using npm:

npm install @dfinity/{agent,candid,principal} # dfinity needs
npm install @ic-naming/client

Using yarn:

yarn add @dfinity/{agent,candid,principal} # dfinity needs
yarn add @ic-naming/client

Example

Normal:

import { IcNamingClient } from '@ic-naming/client';

const client = new IcNamingClient({
  net: "MAINNET", // MAINNET | TICP
  mode: "local", // local | production
});

client.isAvailableNaming("hello.world").then((isAvailable) => {
  console.log(isAvailable ? "Available!" : "Not Available!");
});

Special host and identity:

import { IcNamingClient } from '@ic-naming/client';

const client = new IcNamingClient({
  net: "MAINNET",
  mode: "local",
  httpAgent: {
    host: "https://ic0.app", // default by mode
    identity: {
      identity: {
        transformRequest: () => {
          /* ... */
        },
        getPrincipal: () => {
          /* ... */
        },
      },
    },
  },
});

Repo example TODO

Client API

client.ts

Document TODO

Contribute

Local commands:

yarn dev # rollup library watch mode
yarn type # typescript type check
yarn test # jest unit test
yarn build # rollup build to dist/
yarn release # generate new version

FAQs

Last updated on 13 Mar 2022

Did you know?

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

SocketSocket SOC 2 Logo

Product

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

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc