@timestope-official/bitcoinkrypton-browser
v0.0.1-0.0.2
Published
Bitcoin Krypton was developed to fully fulfill its original purpose of creating a peer-to-peer financial program that can operate without the intervention of a trusted third party, in accordance with the original Bitcoin whitepaper.
Readme
Bitcoin Krypton Blockchain
Bitcoin Krypton was developed to fully fulfill its original purpose of creating a peer-to-peer financial program that can operate without the intervention of a trusted third party, in accordance with the original Bitcoin whitepaper.
Resources
- Node.js Client Documentation: Usage and configuration documentation for the Krypton Node.js Client.
- JSON-RPC Client Documentation: Usage instructions for the Krypton JSON-RPC Client.
- Docker Documentation: Instuctions on setting up a Krypton Node using Docker.
Packages
NPM Packages
For developers looking to include Bitcoin Krypton support on their applications, there are two npm packages available:
@timestope-official/bitcoinkrypton-seed: Module for use in node.js applications.@timestope-official/bitcoinkrypton-browser: Module for use in client-side (browser) applications
Web Developers
Getting Started
Import Bitcoin Krypton as an ES6 module:
// With a package.json-aware module loader:
import Krypton from '@timestope-official/bitcoinkrypton-browser';
// Otherwise:
import Krypton from 'node_modules/@timestope-official/bitcoinkrypton-browser/web.esm.js';To use Krypton's cryptographic functions (for hashing, signing, derivation),
you have to make the following files from this package available to the browser
(for e.g. Vue, this means copying them into the public folder, or getting them
otherwise into the output directory):
worker.js
worker-js.js
worker-wasm.js
worker-wasm.wasmYou can then load the Krypton worker by calling Krypton.load() with the URL of the folder containing the files:
// Important: must be a full URL, a trailing slash is required.
const workerURL = location.origin + '/assets/krypton/';
Krypton.load(workerURL).then(async function() {
// All Krypton functionality is available here.
});Using a regular <script> tag
Include the krypton.js file from this package into your project:
<script src="node_modules/@timestope-official/bitcoinkrypton-browser/krypton.js"></script>If you do not need networking support, you can also use the smaller offline build:
Krypton.loadOffline().then(...);License
This project is under the Apache License 2.0.
