3.16.0 • Published 4 months ago

@slide-computer/signer-extension v3.16.0

Weekly downloads
-
License
MIT
Repository
github
Last release
4 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

4 months ago

3.15.0

4 months ago

3.14.0

5 months ago

3.13.0

5 months ago

3.12.0

5 months ago

3.11.0

7 months ago

3.10.3

7 months ago

3.10.2

7 months ago

3.10.1

7 months ago

3.10.0

7 months ago

3.9.0

7 months ago

3.8.1

7 months ago

3.8.0

7 months ago

3.7.2

7 months ago

3.7.1

7 months ago

3.7.0

8 months ago