open-index/open-npm huggingface dataset:
npm package: @hanbitgaram/ts-hanbitgaram-unique-id
Description: Unique ID Generation Class for Hanbitgaram
Author: HanbitGaram
Latest version: 1.0.0

# HanbitGaram Unique Id

## Description

Generates a unique, non-overlapping 14+ character ID that is URL-safe.

## Installation

### npm

```bash
npm i @hanbitgaram/ts-hanbitgaram-unique-id
```

### pnpm

```bash
pnpm i @hanbitgaram/ts-hanbitgaram-unique-id
```

### yarn

```bash
yarn add @hanbitgaram/ts-hanbitgaram-unique-id
```

## Usage

### ESM

```js
import HanbitGaramUniqueId from "@hanbitgaram/ts-hanbitgaram-unique-id";
const uid = new HanbitGaramUniqueId();
console.log(uid.generate({ prefix: "SVC" }));
```

## CJS

```js
const UniqueId = require("@hanbitgaram/ts-hanbitgaram-unique-id").default;
const uid2 = new UniqueId();
console.log(uid2.generate());
```
npm package: @hanchon/ethermint-address-converter
Description: Converter between ETH and Ethermint addresses
Author: Hanchon
Latest version: 1.1.1

# Ethermint address converter

A simple converter between `ETH` address and `Ethermint` addresses.

## Installation

``` sh
npm install @hanchon/ethermint-address-converter
```

## Usage

### Converter

``` ts
import {ethToEthermint, ethermintToEth} from "@hanchon/ethermint-address-converter"

let address = ethToEthermint("0xe2D61e49ff8a9d724CC54d338D8076F878aC6b71")
// "ethm1uttpuj0l32whynx9f5ecmqrklpu2c6m3973048"

let address = ethermintToEth("ethm1uttpuj0l32whynx9f5ecmqrklpu2c6m3973048")
// "0xe2D61e49ff8a9d724CC54d338D8076F878aC6b71"
```

### Decoders

``` ts
import {ETH, ETHERMINT} from "@hanchon/ethermint-address-converter"
let hex = ETH.decoder("0xe2D61e49ff8a9d724CC54d338D8076F878aC6b71")
// hex.toString('hex') === "e2d61e49ff8a9d724cc54d338d8076f878ac6b71"

hex = ETHERMINT.decoder("ethm1uttpuj0l32whynx9f5ecmqrklpu2c6m3973048")
// hex.toString('hex') === "e2d61e49ff8a9d724cc54d338d8076f878ac6b71"
```

### Encoders

``` ts
import {ETH, ETHERMINT} from "@hanchon/ethermint-address-converter"
let address = ETH.encoder(Buffer.from("e2d61e49ff8a9d724cc54d338d8076f878ac6b71","hex"))
// address === "0xe2D61e49ff8a9d724CC54d338D8076F878aC6b71"

address = ETHERMINT.encoder(Buffer.from("e2d61e49ff8a9d724cc54d338d8076f878ac6b71","hex"))
// address === "ethm1uttpuj0l32whynx9f5ecmqrklpu2c6m3973048"
```

### EVMOS support
```ts
import {ethToEvmos, evmosToEth} from "@hanchon/ethermint-address-converter"

let address = ethToEvmos("0x14574a6DFF2Ddf9e07828b4345d3040919AF5652")
// "evmos1z3t55m0l9h0eupuz3dp5t5cypyv674jj7mz2jw"

let address = evmosToEth("evmos1z3t55m0l9h0eupuz3dp5t5cypyv674jj7mz2jw")
// "0x14574a6DFF2Ddf9e07828b4345d3040919AF5652"
```

### REBUS support
```ts
import {ethToRebus, rebusToEth} from "@hanchon/ethermint-address-converter"

let address = ethToRebus("0x14574a6DFF2Ddf9e07828b4345d3040919AF5652")
// "rebus1z3t55m0l9h0eupuz3dp5t5cypyv674jjdss3us"

let address = rebusToEth("rebus1z3t55m0l9h0eupuz3dp5t5cypyv674jjdss3us")
// "0x14574a6DFF2Ddf9e07828b4345d3040919AF5652"
```


## Build locally

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

## Reference

- [ENSDOMAINS-AddressEnconder](https://github.com/ensdomains/address-encoder)
npm package: @hanchon/evmos-keplr-message-verifier
Description: Verify messages signed with signArbitrary using evmos addresses
Author: Hanchon
Latest version: 1.0.0

# Evmos keplr message verifier

Verify messages signed with signArbitrary using evmos addresses

## Installation

```sh
yarn add @hanchon/evmos-keplr-message-verifier
```

## Usage

### Sign a message using keplr

```ts
const chainId = 'evmos_9001-2'
const message = 'something'
const address = 'evmos13f4uur7qw3yd87v3ujdle0xtzcjnskywdrnjhp'
const signature = await window.keplr.signArbitrary(
    chainId,
    address,
    message,
)
```

### Verify the message

```ts
// Address, message and signature are the same as the previous step
const pubKey = 'A/o4Mu4lzmuWORZPfLfDJIhuFJu2Dwq/ytZBAM1mXNGs'
const validSignature = verifyKeplrSignature(address, pubKey, message, signature)
// if validSignature === true, the message was signed by that address
```

Note: the pubKey of the current connected address can be obtained using:

```ts
await window.keplr.enable(chainId)
const offlineSigner = window.getOfflineSigner(chainId)
const wallets = await offlineSigner.getAccounts()
const pubKey = Buffer.from(wallets[0].pubkey).toString('base64')
```

## Why?

Using keplr to sign with `signArbitraty` using `Evmos` it will sign the message using the `keccak_256` hashing algorithm, but when validating the message it's using the cosmos' default so it'll return always invalid signer.
npm package: @hanchon/evmos-signer
Description: Evmos signer for secp256k1 and eth_secp256k1 private keys
Author: Hanchon
Latest version: 1.0.0

# Evmos signer

A typescript signer for the evmos networks, it supports `secp256k1` and `eth_secp256k1` signing.

## Requirements

- Node v15.8.0

## Installation

```sh
yarn add @hanchon/evmos-signer
```

## Usage

### Signer

```ts
import {
  signEthSecp256k1,
} from "@hanchon/evmos-signer";

const privKey = Buffer.from([
    186, 11, 156, 234, 90, 241, 218, 188, 13, 58, 202, 98, 87, 101, 244,
    128, 253, 23, 0, 180, 96, 155, 216, 190, 230, 170, 65, 163, 85, 86, 11,
    163,
])
const message = Buffer.from([
    177, 240, 144, 132, 71, 52, 192, 86, 100, 12, 4, 148, 127, 217, 62, 166,
    254, 121, 39, 134, 16, 193, 151, 209, 7, 181, 85, 226, 30, 52, 62, 7,
])

const sig = signEthSecp256k1(privKey, message)
```

## Build locally

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

## TODOs

- Add `secp256k1` support.
npm package: @hanchon/evmosjs
Description: Evmosjs javascript lib for the evmos blockchain
Author: Hanchon
Latest version: 0.3.0

# EvmosJS

A javascript library to interact with the evmos blockchain.

## Requirements

- Node v15.8.0

## Installation

```sh
yarn add @hanchon/evmosjs
```

## Usage

Examples at [ExamplesFolder](https://github.com/hanchon-live/evmosjs/tree/master/examples)

```sh
tsc examples/rest/account.ts && node examples/rest/account.js
```

## Grpc usage

This lib is going to be migrated to [EvmosProtoJs](https://github.com/hanchon-live/evmosprotojs), because http2 is not compatible with browsers.

## Build locally

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

## TODOs

- Create mock to test the rest api
- Create tests for the rest code
- Add more rest calls
- Figure it out how to send a transactions using the rest api
npm package: @hanchon/signature-to-pubkey
Description: Generate a public key from a signature
Author: Hanchon
Latest version: 1.0.1

# 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
```