@ducatus/ducatuscore-lib
v10.0.16
Published
A pure and powerful JavaScript Bitcoin library.
Downloads
799
Readme
Ducatuscore JavaScript Library for Ducatuscore
A pure and powerful JavaScript library for Ducatuscore.
Principles
Ducatuscore is a powerful new peer-to-peer platform for the next generation of financial technology. The decentralized nature of the Ducatuscore network allows for highly resilient ducatuscore infrastructure, and the developer community needs reliable, open-source tools to implement ducatuscore apps and services. Ducatuscore JavaScript Library provides a reliable API for JavaScript apps that need to interface with Ducatuscore.
Get Started
Clone the Ducatuscore monorepo and npm install
:
Building the Browser Bundle
To build a ducatuscore-lib full bundle for the browser:
gulp browser
This will generate files named ducatuscore-lib.js
and ducatuscore-lib.min.js
.
Running Tests
npm test
You can also run just the Node.js tests with gulp test:node
, just the browser tests with gulp test:browser
or create a test coverage report (you can open coverage/lcov-report/index.html
to visualize it) with gulp coverage
.
Documentation
Addresses and Key Management
- Addresses
- Using Different Networks
- Private Keys and Public Keys
- Hierarchically-derived Private and Public Keys
Payment Handling
- Using Different Units
- Acknowledging and Requesting Payments: Bitcoin URIs
- The Transaction Class
- Unspent Transaction Output Class
Bitcoin Internals
Extra
Module Development
Modules
Some functionality is implemented as a module that can be installed separately:
- Peer to Peer Networking
- Bitcoin Core JSON-RPC
- Payment Channels
- Mnemonics
- Elliptical Curve Integrated Encryption Scheme
- Blockchain Explorers
- Signed Messages
Examples
- Generate a random address
- Generate a address from a SHA256 hash
- Import an address via WIF
- Create a Transaction
- Sign a Bitcoin message
- Verify a Bitcoin message
- Create an OP RETURN transaction
- Create a 2-of-3 multisig P2SH address
- Spend from a 2-of-2 multisig P2SH address
Security
We're using the Ducatuscore JavaScript Library in production, as are many others, but please use common sense when doing anything related to finances! We take no responsibility for your implementation decisions.