npm.io
3.20.0 • Published 1 year ago

@slide-computer/signer-client

Licence
MIT
Version
3.20.0
Deps
0
Size
142 kB
Vulns
0
Weekly
0
Stars
14

@slide-computer/signer-client

Authenticate with signers on the Internet Computer.


Installation

Using SignerClient:

npm i --save @slide-computer/signer

In the browser:

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

To get started with the signerClient, run

const signerClient = await SignerClient.create({signer});

The signerClient can log in with

signerClient.login({
  // 7 days in nanoseconds
  maxTimeToLive: BigInt(7 * 24 * 60 * 60 * 1000 * 1000 * 1000),
  onSuccess: async () => {
    handleAuthenticated(signerClient);
  },
});

Keywords