How to use bech32-buffer - 1 common examples

To help you get started, we’ve selected a few bech32-buffer examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github RiseVision / rise-node / packages / rise / src / idsHandler.ts View on Github external
public addressFromBytes(bytes: Buffer): Address {
    if (bytes.length === 8) {
      return `${toBigIntBE(bytes)}R` as Address;
    } else {
      return bech32.encode(
        bytes.slice(0, 4).toString('ascii'),
        bytes.slice(4)
      ) as Address;
    }
  }

bech32-buffer

Bech32(m) encoding for byte buffers

Apache-2.0
Latest version published 2 years ago

Package Health Score

54 / 100
Full package analysis

Popular bech32-buffer functions