@slide-computer/signer-agent
TypeScript icon, indicating that this package has built-in type declarations

1.8.0 • Public • Published

@slide-computer/signer-agent

Initiate transactions with signers on the Internet Computer.


Installation

Using SignerAgent:

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

In the browser:

import { SignerAgent } from "@slide-computer/signer-agent";

To get started with the signerAgent, run

const signerAgent = new SignerAgent({
  signer,
  getPrincipal: () => {
    return accounts[0].principal; // For example, make calls as first principal
  }
});

The signerAgent can initiate a transaction with

const {transfer} = IcrcLedgerCanister.create({
  agent: signerAgent,
  canisterId: MY_LEDGER_CANISTER_ID,
});
const blockIndex = await transfer({
  to: account,
  amount: 100_000_000
});

/@slide-computer/signer-agent/

    Package Sidebar

    Install

    npm i @slide-computer/signer-agent

    Weekly Downloads

    3

    Version

    1.8.0

    License

    MIT

    Unpacked Size

    126 kB

    Total Files

    29

    Last publish

    Collaborators

    • sea-snake