1.8.0 • Published 7 days ago

@slide-computer/signer v1.8.0

Weekly downloads
-
License
MIT
Repository
github
Last release
7 days ago

@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

let signerWindow;
const transport = new PostMessageTransport({
  origin: SIGNER_ORIGIN,
  getWindow: () => {
    if (!signerWindow || signerWindow.closed) {
      signerWindow = window.open(`${SIGNER_ORIGIN}/rpc`, SIGNER_WINDOW_NAME);
    } else {
      signerWindow.focus();
    }
    return signerWindow;
  }
});
const signer = new Signer({transport});

The signer can request permissions and use these permissions to get accounts with

const permissions = await signer.requestPermissions([createGetAccountsPermissionScope()]);
const accounts = await signer.getAccounts();
1.8.0

7 days ago

1.7.0

1 month ago

1.6.0

1 month ago

1.5.0

1 month ago

1.4.0

1 month ago

1.3.2

2 months ago

1.3.1

2 months ago

1.3.0

2 months ago

1.2.1

3 months ago

1.2.0

3 months ago

1.1.2

3 months ago

1.1.1

3 months ago

1.1.0

3 months ago

1.0.1

3 months ago

1.0.0

3 months ago