open-index/open-npm huggingface dataset:
npm package: @hazae41/keccak256
Description: Keccak-256 adapter for WebAssembly and JS implementations
Author: hazae41
Latest version: 1.0.12

# Keccak256

Keccak-256 adapter for WebAssembly and JS implementations

```bash
npm i @hazae41/keccak256
```

[**Node Package 📦**](https://www.npmjs.com/package/@hazae41/keccak256)

## Features

### Current features
- 100% TypeScript and ESM
- No external dependencies

## Getting started

### WebAssembly

```bash
npm i @hazae41/sha3.wasm
```

```typescript
import { Keccak256 } from "@hazae41/keccak256"
import { Sha3Wasm } from "@hazae41/sha3.wasm"

await Sha3Wasm.initBundled()

Keccak256.set(Keccak256.fromWasm(Sha3Wasm))
```

### Noble (JavaScript)

```bash
npm i @noble/hashes
```

```typescript
import { Keccak256 } from "@hazae41/keccak256"
import Sha3Noble from "@noble/hashes/sha3"

Keccak256.set(Keccak256.fromNoble(Sha3Noble))
```

## Usage

### Direct

```tsx
using hashed: Copiable = Keccak256.get().getOrThrow().hashOrThrow(new Uint8Array([1,2,3,4,5]))
const hashed2: Uint8Array = hashed.bytes.slice()
```

### Incremental

```tsx
using hasher: Keccak256.Hasher = Keccak256.get().getOrThrow().Hasher.createOrThrow()
hasher.updateOrThrow(new Uint8Array([1,2,3,4,5]))
hasher.updateOrThrow(new Uint8Array([6,7,8,9,10]))

using hashed: Copiable = hasher.finalizeOrThrow()
const hashed2: Uint8Array = hashed.bytes.slice()
```
npm package: @hazae41/latrine
Description: Secure and private reimplementation of the WalletConnect protocol
Author: hazae41
Latest version: 1.1.4

# Latrine

Secure and private reimplementation of the WalletConnect protocol

```bash
npm i @hazae41/latrine
```

[**Node Package 📦**](https://www.npmjs.com/package/@hazae41/latrine)

## Features

### Current features
- 100% TypeScript and ESM
- No external dependencies
- Rust-like patterns
- Uses web standards
- Supply-chain hardened
- No trackable identifiers
- Auditable cryptography

## Usage

### Wallet-side

See `./test/wallet`

### Webapp-side

Unsupported yet

## Demo

### Wallet-side

https://github.com/user-attachments/assets/6f1df8ce-4fbe-4d45-9b4c-029f9fc18610
npm package: @hazae41/ledger
Description: Private and supply-chain hardened Ledger controller for TypeScript
Author: hazae41
Latest version: 0.1.4

# Ledger

Private and supply-chain hardened Ledger controller for TypeScript

```bash
npm i @hazae41/ledger
```

[**Node Package 📦**](https://www.npmjs.com/package/@hazae41/ledger)

## Features

### Current features
- 100% TypeScript and ESM
- No external dependencies
- Rust-like patterns
- No network code
- No tracking

## Usage

### Get USB connector

```tsx
/** Will open a popup using navigator.usb */
const device = Ledger.USB.getOrRequestDeviceOrThrow()
const connector = Ledger.USB.connectOrThrow(device)
```

### Get address and/or uncompressed public key at path

```tsx
import { Ledger } from "@hazae41/ledger"

const { address, uncompressedPublicKey } = await Ledger.Ethereum.getAddressOrThrow(connector, "44'/60'/0'/0/0")
```

### Verify and get address and/or uncompressed public key at path

Ask the user to verify the address and get it

```tsx
import { Ledger } from "@hazae41/ledger"

const { address, uncompressedPublicKey } = await Ledger.Ethereum.verifyAndGetAddressOrThrow(connector, "44'/60'/0'/0/0")
```

### Sign a personal message at path

```tsx
import { Ledger } from "@hazae41/ledger"
import { ZeroHexSignature } from "@hazae41/cubane"

const message = new TextEncoder().encode("Hello World")

const rsvSignature = await Ledger.Ethereum.signPersonalMessageOrThrow(connector, "44'/60'/0'/0/0", message)
const zeroHexSignature = ZeroHexSignature.fromOrThrow(rsvSignature)
```

### Sign a transaction at path

```tsx
import { Ledger } from "@hazae41/ledger"
import { ZeroHexSignature } from "@hazae41/cubane"

const transaction = ethers.utils.arrayify(ethers.Transaction.from({
  chainId,
  nonce,
  to,
  value,
  data
  gasLimit,
  gasPrice,
}).unsignedSerialized)

const rsvSignature = await Ledger.Ethereum.signTransactionOrThrow(connector, "44'/60'/0'/0/0", transaction)
const zeroHexSignature = ZeroHexSignature.fromOrThrow(rsvSignature)
```

### Sign EIP712 typed message at path

```tsx
import { Ledger } from "@hazae41/ledger"
import { ZeroHexSignature } from "@hazae41/cubane"

const rsvSignature = await Ledger.Ethereum.signEIP712HashedMessageOrThrow(connector, "44'/60'/0'/0/0", domain, message)
const zeroHexSignature = ZeroHexSignature.fromOrThrow(rsvSignature)
```
npm package: @hazae41/lengthed
Description: Typed length for TypeScript
Author: hazae41
Latest version: 1.0.1

# Lengthed

Typed length for TypeScript

```bash
npm i @hazae41/lengthed
```

[**Node Package 📦**](https://www.npmjs.com/package/@hazae41/lengthed)

## Features
- 100% TypeScript and ESM
- Rust-like patterns

## Usage

```tsx
import { Lengthed } from "@hazae41/lengthed"

function f(x: Uint8Array & Lengthed<32>) {
  const length: 32 = x.length
}
```
npm package: @hazae41/memory
Description: Disposable bytes for TypeScript & WebAssembly
Author: hazae41
Latest version: 1.0.10

# Memory

Disposable bytes for TypeScript & WebAssembly

```bash
npm i @hazae41/memory
```

[**Node Package 📦**](https://www.npmjs.com/package/@hazae41/memory)

## Features
- 100% TypeScript and ESM
- Rust-like patterns

## Usage
 
```tsx
import { Memory, Slice } from "@hazae41/memory"

function f(memory: Memory) {
  // Consume memory
  using _  = memory

  // Use raw bytes
  g(memory.bytes)
}

function g(bytes: Uint8Array) {
  console.log(bytes)
}

// Use with JavaScript bytes
f(new Slice(new Uint8Array([1,2,3])))

// Use with WebAssembly bytes
f(MyModule.somethingThatReturnsBytes())
```