Socket
Socket
Sign inDemoInstall

@dfinity/identity

Package Overview
Dependencies
Maintainers
10
Versions
76
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

@dfinity/identity

JavaScript and TypeScript library to manage identity with the Internet Computer


Version published
Weekly downloads
12K
decreased by-7.89%
Maintainers
10
Weekly downloads
 
Created
Source

@dfinity/identity

JavaScript and TypeScript library to manage Identities and enable simple Web Authentication flows for applications on the Internet Computer

Visit the Dfinity Forum and SDK Documentation for more information and support building on the Internet Computer.

Additional API Documentation can be found here.


Installation

Using authentication:

npm i --save @dfinity/identity

In the browser:

import * as identity from "@dfinity/identity";

or using individual exports:

import { WebAuthnIdentity } from "@dfinity/identity";

ECDSAKeyIdentity

Using an ECDSAKeyIdentity, you can now use the native Web Crypto API to manage your keys in agent-js. ECDSAKeyIdentity uses the crypto.subtle interface under the hood, and wraps the conventions for managing identities in the same way as other identities in this package.

Importantly, there is no importing from a private key or from JSON for this library. This should be used only in secure contexts, and you should only in rare circumstances interact directly with the KeyPair or CryptoKeys involved. Importantly, your CryptoKeys can be used in IndexedDb and can be created as extractable or non-extractable for enhanced security properties.

In Node.js

Depending on your version, you may need to use a polyfill and set global.crypto in a setup file. If you prefer, you can also pass in a subtleCrypto implementation in methods that call for it, either as a direct argument, or in a cryptoOptions object.

Note: depends on @dfinity/agent

Keywords

FAQs

Package last updated on 11 Aug 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

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