@slide-computer/signer
TypeScript icon, indicating that this package has built-in type declarations

2.6.2 • Public • Published

@slide-computer/signer

JavaScript and TypeScript library to interact with signers on the Internet Computer.


Installation

Using Signer:

npm i --save @slide-computer/signer

In the browser:

import { Signer } from "@slide-computer/signer";

To get started with the signer, run

// Create transport with e.g. "@slide-computer/signer-web"
const signer = new Signer({transport});

Make sure to connect before using signer if the transport requires a connection

if (transport.connection && !transport.connection.connected) {
  await transport.connection.connect();
}

The signer can for example get accounts with

const accounts = await signer.accounts();

Optionally, the permission can be requested beforehand to get accounts

const permissions = await signer.requestPermissions([createAccountsPermissionScope()]);

Package Sidebar

Install

npm i @slide-computer/signer

Weekly Downloads

20

Version

2.6.2

License

MIT

Unpacked Size

276 kB

Total Files

220

Last publish

Collaborators

  • sea-snake