@cubist-labs/cubesigner-sdk-ethers-v5
TypeScript icon, indicating that this package has built-in type declarations

0.4.32-0 • Public • Published

ethers.js v5 Signer implementation for CubeSigner TypeScript SDK

This package exposes a single Signer class which implements the ethers.js v5 Signer abstract interface, offloading all signing tasks to a remote CubeSigner service.

Simple example usage

import * as cs from "@cubist-labs/cubesigner-sdk";
import { Signer } from "@cubist-labs/cubesigner-sdk-ethers-v5";
import { ethers } from "ethers";

...
// Create new Signer given a key/account address and CubeSigner session object
// (with permissions to sign with this key):
const signer = new Signer(keyAddress, cubeSignerSession);

// Sign transaction as usual:
await signer.signTransaction({
    to: "0xff50ed3d0ec03ac01d4c79aad74928bff48a7b2b",
    value: ethers.utils.parseEther("0.0000001"),
});
...

Check out the @cubist-labs/cubesigner-sdk NPM package for more details on how to create signer sessions.

Readme

Keywords

none

Package Sidebar

Install

npm i @cubist-labs/cubesigner-sdk-ethers-v5

Weekly Downloads

53

Version

0.4.32-0

License

MIT OR Apache-2.0

Unpacked Size

33.2 kB

Total Files

5

Last publish

Collaborators

  • noetzli
  • mlfbrown_cubist
  • amilicevic
  • d-cubist-dev