Code Monkey home page Code Monkey logo

dartsv's Introduction

THIS IS A ALPHA RELEASE. PROCEED WITH MAXIMUM CAUTION.

Overview

DartSV is a Bitcoin library for the Dart Language ( dartlang.org ), loosely based on the Moneybutton/BSV Javascript library. This library has been built in line with the ideals espoused by BitcoinSV, i.e. massive on-chain scaling, protocol stability and original-bitcoin-protocol implementation.

This library therefore lacks , and will not implement :

  • Segregated Witness (Segwit) Transaction support
  • Schnorr Signature support
  • Check Datasig (OP_CHECKDATASIG)

Current Supported features are :

  • P2PKH Transactions (building and spending from)
  • Data-only Transactions (untested)
  • HD Key Derivation (BIP32)
  • Original Bitcoin Address format
  • Bitcoin Signed Messages
  • Bip39 Mnemonic Support (currently lacks test coverages)
  • Script Interpreter (high priority)

Pending Features :

  • P2SH support (low priority since it will be deprecated in BitcoinSV)
  • Broader support for original OP_CODES as they become available on BitcoinSV mainnet

Note to Developers

This is an Alpha-Release aimed at interested individuals and experienced developers for the purpose of getting feedback on library improvements as I build towards a stable 0.1.0 release. I am especially interested in hearing from Flutter developers.

Documentation is lacking. Your best source for seeing how the library works is the cli-example application on GitHub: DartSV CLI Example

Here is a small sample of the Transaction API (method taken from cli-example):

String createWalletTxn(Address address, List<TransactionInput> utxosToSpendFrom, BigInt amount ){

    var transaction = new Transaction()
        .spendFromInputs(utxosToSpendFrom)
        .spendTo(address, amount)
        .sendChangeTo(_receivingAddress) // spend change to myself
        .withFeePerKb(100000)
        .signWith(this._walletPrivKey, sighashType: SighashType.SIGHASH_ALL | SighashType.SIGHASH_FORKID);

    return transaction.serialize();
}

Installation

This library was built using version (2.3.1) of the Dart SDK https://dart.dev/tools/sdk, but should work with Dart SDK 2.1.x onwards.
Therefore, as a pre-requisite ensure that you have at least that version of the Dart SDK installed before proceeding.

Navigate to the root folder of this project, and pull the required supported Dart libraries using the pub package manager.

> pub get 

Running the Tests

In the root folder of this project, run the shell script :

> ./runtests.sh

Acknowledgement

A debt of gratitude is owed to the developers acknowledged in the LICENSE file. Without the hard work of individuals working on earlier library and node implementations like Bitcoin Core, Bitcoin Cash, MoneyButton/BSV, BitcoinJ and many more, this library would likely not have come to fruition. Thank you.

Contact

You can reach the author at :

dartsv's People

Contributors

saiwin123 avatar stephanfeb avatar

Watchers

 avatar

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.