3.16.0 • Published 7 months ago

@slide-computer/signer-extension v3.16.0

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

@slide-computer/signer-extension

JavaScript and TypeScript library to communicate with browser extension signers on the Internet Computer.


Installation

Using signer extension:

npm i --save @slide-computer/signer-extension

In the browser:

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

To create an ICRC-94 browser extension transport, run

const transport = await BrowserExtensionTransport.findTransport({
    // Globally unique identifier of the browser extension wallet you want to connect with
    uuid: 'b5ec333c-8854-47bd-be77-74059e0c64d6'
});

Either use with @slide-computer/signer

const signer = new Signer({transport});

Or directly in your custom implementation

const channel = await transport.establishChannel();
const listener = channel.registerListener((response) => {
    // Process incoming responses
});
// Send outgoing requests
channel.send(JSON_RPC_REQUEST);

To discover all available installed browser extension signers for a user to choose from, run

const providerDetails = await BrowserExtensionTransport.discover();
const providerDetail = await askUserToChoose(providerDetails);
const transport = new BrowserExtensionTransport({providerDetail});
3.16.0

7 months ago

3.15.0

8 months ago

3.14.0

8 months ago

3.13.0

8 months ago

3.12.0

9 months ago

3.11.0

10 months ago

3.10.3

10 months ago

3.10.2

10 months ago

3.10.1

10 months ago

3.10.0

10 months ago

3.9.0

10 months ago

3.8.1

11 months ago

3.8.0

11 months ago

3.7.2

11 months ago

3.7.1

11 months ago

3.7.0

11 months ago