GithubHelp home page GithubHelp logo

ton-crypto's Introduction

๐Ÿ’Ž ton-core

๐Ÿšจ Repository Deprecated and Moved! ๐Ÿšจ

This repository has been deprecated and is no longer actively maintained. We have moved our project to a new repository, which you can find here: ton-org/ton-core. The new NPM package is available here: @ton/core

Please make sure to update your bookmarks and star the new repository to stay up-to-date with the latest developments and updates. This repository will be archived and eventually removed.

Thank you for your continued support!


Core library that implements low level primitives of TON blockchain.

How to install

yarn add ton-core

Reference Documentation

Documentation

Acknowledgements

This library is developed by the Whales Corp. and maintained by Dan Volkov.

License

MIT

ton-crypto's People

Contributors

dvlkv avatar ex3ndr avatar

Stargazers

 avatar  avatar  avatar

Watchers

 avatar  avatar  avatar

ton-crypto's Issues

mnemonicToWalletKey() does not report mnemonics with typos

Consider these two snippets:

const mnemonic = "priority road check curious obvious ...";
const key = await mnemonicToWalletKey(mnemonic.split(" "));
const wallet = WalletContractV4.create({ publicKey: key.publicKey, workchain: 0 });
const mnemonic = "priority road check curious abvious ..."; // obvious has a typo = abvious
const key = await mnemonicToWalletKey(mnemonic.split(" "));
const wallet = WalletContractV4.create({ publicKey: key.publicKey, workchain: 0 });

They both pass smoothly and return different wallet addresses.

This is very dangerous. Consider that somebody has a mnemonic and the code that creates a wallet in software has a typo. He would end up reaching a different address by mistake. Send it funds. If this code is ever deleted and they try to recover the wallet from the written mnemonic, they will not make the same typo again, and the money will be lost.

Wanted behavior - Throw an error from mnemonicToWalletKey on any problem with the mnemonic (not enough words, too many words, words not in the dictionary, checksum of mnemonic doesn't add up).

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.