Giter Club home page Giter Club logo

bitcoin-address-validation's People

Contributors

ayusuf95 avatar darthmaim avatar doweig avatar ejose19 avatar gin avatar ruigomeseu avatar samsamskies avatar tantecky avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

bitcoin-address-validation's Issues

bash: syntax error near unexpected token

validate('bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4');
bash: syntax error near unexpected token `'bc1qw508d6qejxtdg4y5r3zarvary0c5xw7kv8f3t4''
The same with double quotes

Remove package `browser` field and bundle

The browser field currently points to a UMD bundle:

https://unpkg.com/[email protected]/lib/index.umd.js

Webpack (typically) resolves browser, module, or main, in that order:

https://webpack.js.org/configuration/resolve/#resolve-mainfields

This means most Webpack users are consuming this package as a bundle, instead of a module with dependencies/imports. Notice how BundlePhobia thinks 100% of the package is "Self", instead of showing a breakdown of dependencies:

https://bundlephobia.com/[email protected]

screen shot 2019-01-10 at 5 20 20 pm

This is undesirable, because if a consumer of this package has any of the same dependencies (base-x, bech32, bops, hash.js, etc.) required elsewhere in their app, their Webpack build will include them again in the resulting bundle instead of deduping.

Compare that to graphql-react for example, that does not distribute a browser bundle:

https://bundlephobia.com/[email protected]

screen shot 2019-01-10 at 5 20 04 pm

As a general rule, it is an antipattern to distribute a bundle in an npm package; bundling is much better performed by consumers.

Add a lock file

It's recommended to add a lock file (package-lock.json or yarn.lock for npm or yarn respectively) so that you can have more deterministic builds, and prevent supply chain attacks for dependencies or avoid sudden malicious updates to dependencies.

Not sure what your preferred CLI tool is, so I'll let you choose, but I recommend adding one!

DOGE

I am unable to access my address

Joinmarket bech32 addresses are failing validation

Hi,

valid joinmarket bech32 addresses failing validation

example addresses:
bc1qv4rpqxxukmk6rmy5qmmc3cqk2nut3zmw77jzvwzrvk2y28jw0tjs53zt96

bc1qj693pjncwyjznxdwma6sj0vm0puz4xe4jj9fq2

Please check
Thank you

Valid bech32 addresses fail validation

I tried to use your bitcoin address validator, and I noticed that some valid bech32 addresses fail validation. I have included a few samples, the entire list of bech32 test vectors can be found here: https://github.com/bitcoin/bips/blob/master/bip-0173.mediawiki

const bitcoinAddressValidation = require("bitcoin-address-validation");

// bech32 test vectors
const addresses = [];
addresses.push('A12UEL5L');
addresses.push('a12uel5l');
addresses.push('an83characterlonghumanreadablepartthatcontainsthenumber1andtheexcludedcharactersbio1tt5tgs');
addresses.push('abcdef1qpzry9x8gf2tvdw0s3jn54khce6mua7lmqqqxw');
('11qqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqqc8247j');
addresses.push('split1checkupstagehandshakeupstreamerranterredcaperred2y9e3w');

for(const address of addresses) {
  const result = bitcoinAddressValidation(address);
  console.log(`${address} => ${result}`);
}

TypeScript types

It'd be great if this package had type definitions for typescript users.

Support for Signet

Signet is using the same address as testnet, but recognised as a different network. So downstream apps will have to catch signet and cast it as testnet when passing the Network params.

Can Signet network be supported natively?

New release

Great work on the Typescript typings. Would like to publish a new release to npm?

Thank you

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.