1.0.0 • Published 4 months ago

mpc-crypto-wallet-v1 v1.0.0

Weekly downloads
-
License
ISC
Repository
github
Last release
4 months ago

mpc-crypto-wallet-v1

Overview

mpc-crypto-wallet-v1 enables secure key management using Shamir's Secret Sharing. It allows generating EVM-compatible key pairs, splitting private keys into shards, reconstructing them, and signing transactions.

Installation

npm install mpc-crypto-wallet-v1

Usage

Import the package

import { generate, sign } from 'mpc-crypto-wallet-v1';

Generate Key Shards

const { publicKey, shards } = await generate();
console.log('Public Key:', publicKey);
console.log('Shards:', shards);

Sign a Transaction

const transaction = {
  to: "0xRecipientAddress",
  value: "1000000000000000000", // 1 ETH in wei
  gasLimit: "21000",
  gasPrice: "20000000000"
};

const { signature } = await sign(transaction, shards);
console.log('Signature:', signature);

Dependencies

  • ethers - Ethereum wallet operations
  • buffer - Binary data handling
  • shamir-secret-sharing - Secret splitting & reconstruction

License

MIT