GithubHelp home page GithubHelp logo

dev-eloperr / conseiljs Goto Github PK

View Code? Open in Web Editor NEW

This project forked from cryptonomic/conseiljs

0.0 1.0 0.0 7.42 MB

Client-side library for building decentralized applications.

License: Apache License 2.0

TypeScript 90.70% JavaScript 0.16% Nearley 9.14%

conseiljs's Introduction

ConseilJS-core

npm version npm Build Status Coverage Status Quality Gate Status dependencies

A library for building decentralized applications in Typescript and Javascript, currently focused on the Tezos platform.

ConseilJS connects to Tezos nodes for live chain data and operations and to Conseil servers for high-performance analytics on blockchain data. Internally, Cryptonomic uses Nautilus for infrastructure deployments of these services. This is the library at the core of our products, Arronax, Mininax and certainly Galleon. There are ReasonML bindings as well.

Cryptonomic offers an infrastructure service - Nautilus Cloud which enables quick access to the Tezos platform along with products that make it easier build on it.

Sub-modules

As of version 5.0.0, ConseilJS has been split into three parts: this library, which is considered to be the core, ConseilJS-softsigner and ConseilJS-ledgersigner. This was done in an effort to make the library more portable across different environments. If neither of these additional modules meet your needs, the Signer and KeyStore interfaces can be implemented separately. In addition to a Signer and a KeyStore, fetch and logger objects are required to be provided, see below.

For more details on how to use these libraries see their respective readme files: ConseilJS-core, ConseilJS-softsigner, ConseilJS-ledgersigner.

Use with Nodejs

Add our NPM package to your project and a signing library.

npm i conseiljs
npm i conseiljs-softsigner
import fetch from 'node-fetch';
import * as log from 'loglevel';

import { registerFetch, registerLogger, Signer, TezosMessageUtils } from 'conseiljs';
import { KeyStoreUtils, SoftSigner } from 'conseiljs-softsigner';

const logger = log.getLogger('conseiljs');
logger.setLevel('debug', false);
registerLogger(logger);
registerFetch(fetch);

let signer: Signer;
const keyStore = await KeyStoreUtils.restoreIdentityFromSecretKey('edskRgu8wHxjwayvnmpLDDijzD3VZDoAH7ZLqJWuG4zg7LbxmSWZWhtkSyM5Uby41rGfsBGk4iPKWHSDniFyCRv3j7YFCknyHH');
signer = await SoftSigner.createSigner(TezosMessageUtils.writeKeyWithHint(keyStore.secretKey, 'edsk'), -1);

Use with React

We have a complete React application tutorial for you to check out.

Use with React Native

TBD

Use with Web

<html>
<head>
    <script src="https://cdn.jsdelivr.net/gh/cryptonomic/conseiljs/dist-web/conseiljs.min.js"
        integrity="sha384-55ElSck0OR93XvRRLY9kqwLv1ueRL2O04duNhZwdPRAO1qFCqYwqASM7NFphWOhv"
        crossorigin="anonymous"></script>
    <script src="https://cdn.jsdelivr.net/gh/cryptonomic/conseiljs-softsigner/dist-web/conseiljs-softsigner.min.js"
        integrity="sha384-V1iaajn0x/SMFcZ9Y/xNQmqQSKyll6Dzt27U6OWiv8NdbHTVaHOGHdQ8g0G68HPd"
        crossorigin="anonymous"></script>
    <script>
        //conseiljssoftsigner.
    </script>
</head>
<body>
    ...
</body>
</html>

The web version sets fetch and logger internally to window.fetch and console respectively.

A fully functional sample html page is available too.

API Overview and Examples

We have ready-to-use examples to copy/paste.

Contribute

There are many ways to contribute to this project. You can develop applications or dApps with it. You can submit bug reports or feature requests. You can ask questions about it on r/Tezos or the Tezos StackExchange. We certainly welcome pull requests as well.

Other references

Developer Handbook

Smart Contract Development Syllabus

Wiki

Riot Dev Channel

Cryptonomic Reddit

The Cryptonomic Aperiodical

@CryptonomicTech

conseiljs's People

Contributors

anonymoussprocket avatar vishakh avatar ba205 avatar umurb avatar teckhuac avatar developer0623 avatar keefertaylor avatar coder0377 avatar yourcodesucks avatar neocybereth avatar modev0323 avatar dev-eloperr avatar prathamrawat avatar jurajselep avatar walterproof avatar

Watchers

James Cloos 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.