JavaScript and TypeScript library to communicate with Stoic Wallet on the Internet Computer.
Using Stoic transport:
npm i --save @slide-computer/signer-transport-stoic
import { StoicTransport } from "@slide-computer/signer-transport-stoic";
To create a Stoic transport, run
const transport = await StoicTransport.create();
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);