0.0.71 • Published 2 months ago

@stakekit/signers v0.0.71

Weekly downloads
-
License
-
Repository
github
Last release
2 months ago

StakeKit Signers

Introduction

The StakeKit Signers is a package that allows you to create a signing wallet instance from a mnemonic phrase or ledger app and sign transactions.

In addition to that, you can provide a custom derivation path for your mnemonic phrase and get different wallets derived from it, from different types of wallet mechanisms, such as MetaMask, Omni, Phantom or Keplr.

Supported Networks

We currently support the following networks:

  • Avalanche-C
  • Avalanche-C Atomic
  • Avalanche-P
  • Arbitrum
  • Binance
  • BinanceBeacon
  • Celo
  • Ethereum
  • Ethereum Goerli
  • Fantom
  • Harmony
  • Optimism
  • Polygon
  • Akash
  • Cosmos
  • Juno
  • Kava
  • Osmosis
  • Stargaze
  • Near
  • Solana
  • Tezos

Supported Wallets

We currently support:

  • MetaMask
  • Omni
  • Phantom
  • Keplr
  • SteakWallet
  • Temple

Development

install proto toolchain manager.

Once you have installed proto, run:

proto use

Install packages:

pnpm i

Build package:

pnpm build

Installation

To install StakeKit Signers (in addition, we recomment installing the packages @stakekit/common):

npm install @stakekit/signers

or

yarn add @stakekit/signers

or

pnpm add @stakekit/signers

Usage

Examples

Ethereum

import { ImportableWallets, getSigningWallet } from '@stakekit/signers';
import { Networks } from '@stakekit/common';
import { TransactionRequest } from '@ethersproject/abstract-provider';

const walletoptions = {
  mnemonic: process.env.MNEMONIC,
  walletType: ImportableWallets.MetaMask,
  index: 0,
};

const signingWallet = await getSigningWallet(Networks.Ethereum, walletoptions);
const address = await signingWallet.getAddress();

console.log('My wallet address: ', address);

const someUnsignedTx: TransactionRequest = {}; // Your unsigned transaction.

const signedTx = await wallet.signTransaction(unsignedTransaction);

// submitTransaction(signedTx);

Solana

import { ImportableWallets, getSigningWallet } from '@stakekit/signers';
import { Networks } from '@stakekit/common';

const walletoptions = {
  mnemonic: process.env.MNEMONIC,
  walletType: ImportableWallets.MetaMask,
  index: 0,
};

const signingWallet = await getSigningWallet(Networks.Solana, walletoptions);
const address = await signingWallet.getAddress();

console.log('My wallet address: ', address);

const someUnsignedTx: string = ''; // Your unsigned transaction in hex.

const signedTx = await wallet.signTransaction(unsignedTransaction);

// submitTransaction(signedTx);
0.0.71

2 months ago

0.0.70

2 months ago

0.0.69

2 months ago

0.0.68

2 months ago

0.0.67

2 months ago

0.0.66

4 months ago

0.0.64

4 months ago

0.0.65

4 months ago

0.0.62

5 months ago

0.0.63

5 months ago

0.0.61

5 months ago

0.0.40

10 months ago

0.0.41

10 months ago

0.0.42

9 months ago

0.0.43

9 months ago

0.0.44

9 months ago

0.0.45

9 months ago

0.0.46

9 months ago

0.0.47

9 months ago

0.0.37

10 months ago

0.0.38

10 months ago

0.0.39

10 months ago

0.0.30

10 months ago

0.0.31

10 months ago

0.0.32

10 months ago

0.0.33

10 months ago

0.0.34

10 months ago

0.0.35

10 months ago

0.0.36

10 months ago

0.0.60

5 months ago

0.0.59

5 months ago

0.0.51

8 months ago

0.0.52

7 months ago

0.0.53

6 months ago

0.0.54

6 months ago

0.0.55

5 months ago

0.0.56

5 months ago

0.0.57

5 months ago

0.0.58

5 months ago

0.0.50

8 months ago

0.0.48

8 months ago

0.0.49

8 months ago

0.0.20

12 months ago

0.0.21

12 months ago

0.0.22

12 months ago

0.0.23

12 months ago

0.0.24

12 months ago

0.0.25

12 months ago

0.0.15

12 months ago

0.0.16

12 months ago

0.0.17

12 months ago

0.0.18

12 months ago

0.0.19

12 months ago

0.0.10

12 months ago

0.0.11

12 months ago

0.0.12

12 months ago

0.0.13

12 months ago

0.0.14

12 months ago

0.0.26

12 months ago

0.0.9

12 months ago

0.0.27

12 months ago

0.0.8

12 months ago

0.0.28

12 months ago

0.0.29

12 months ago

0.0.5

12 months ago

0.0.4

12 months ago

0.0.7

12 months ago

0.0.6

12 months ago

0.0.3

1 year ago

0.0.2

1 year ago

0.0.1

1 year ago