# @hanchon/signature-to-pubkey

> Generate a public key from a signature

Latest version **1.0.1** (published 2022-10-06) · MIT license · 0 weekly downloads

## Install

```sh
npm install @hanchon/signature-to-pubkey
pnpm add @hanchon/signature-to-pubkey
yarn add @hanchon/signature-to-pubkey
bun add @hanchon/signature-to-pubkey
```

## Health

**Score 30/100 (F)** — status: abandoned.

Positive: has types; esm support; no vulnerabilities; high quality score.

Warnings: low downloads.

Negative: abandoned; low maintenance score.

## Facts

| | |
|---|---|
| Version | 1.0.1 |
| Published | 2022-10-06 |
| First published | 2021-11-11 |
| Weekly downloads | 0 |
| License | MIT |
| TypeScript types | bundled |
| Module format | ESM + CommonJS |
| Dependencies | 1 |
| Unpacked size | 547 KB |
| Known vulnerabilities | 0 |
| Install scripts | no |
| GitHub stars | 1 |
| Author | Hanchon |
| Maintainers | hanchon |
| Keywords | ethermint, evmos, bech32, eth, blockchain, pubkey, converter, signature |

## Links

- npm: https://www.npmjs.com/package/@hanchon/signature-to-pubkey
- Repository: https://github.com/hanchon-live/signature-to-pubkey
- npm.io page: https://npm.io/package/@hanchon/signature-to-pubkey

## Dependencies (1)

- [@ethereumjs/util](https://npm.io/package/@ethereumjs/util.md) ^8.0.0

## Recent versions

- 1.0.1 (latest) — 2022-10-06
- 1.0.0 — 2021-11-11

## README

# Signature to pubkey

JsLib to get the public key from a signature + the signed message

## Installation

``` sh
npm install @hanchon/signature-to-pubkey
```

## Usage

### Converter

``` ts
import { signatureToPubkey, fromHexString } from '@hanchon/signature-to-pubkey';

const signature = "0xf527c2b44d01982c7418c8ca7a8406d4d796f8deb0ef059c9aedb5c2535d7f8333e9eda7623db267886d4c6c3cec2e26ca5d81e3dcb7d506c1c676352a522ade1b"
const message = Buffer.from(fromHexString("0000000000000000000000000000000000000000000000000000000000000000"))
let pubkey = signatureToPubkey(signature, message)
//pubkey = "Al/qkTwDiNGVYkF4Q5x4P+NbxS3GFLs32kNgvuBbjRjR"
```

## Build locally

``` sh
yarn install
yarn test
yarn build
```

---
_Source: https://npm.io/package/@hanchon/signature-to-pubkey · Machine-readable twin of the npm.io package page. Health data is recomputed on every publish._
