Giter Club home page Giter Club logo

tixl-sdk-js's Introduction

Tixl JavaScript SDK

The SDK provides builds for different environments:

  1. Node.js
  2. Web Worker (Browser)

Repository structure

web-worker/ folder contains a webpack based build to run in a browser environment. It can be built with yarn build:worker.

src/ folder contains shared and node-js code.

lib/ folder contains the NTRU and pedersen builds.

Modules

  • @tixl/tixl-sdk-js/redux
  • @tixl/tixl-sdk-js/web-worker
  • @tixl/tixl-sdk-js/node-js

How to use the SDK

Include the SDK in your TypeScript project as usual: npm install @tixl/tixl-types @tixl/tixl-sdk-js

Setup an env variable for the gateway. Only the test gateway can currently be used: REACT_APP_GATEWAY=https://gateway.tixl.dev

Crypto Interface

โš ๏ธ The interface is much shorter for the optional-privacy version. But we keep it for now.

All crypto-related functions are platform dependent and need a suiting implementation. The interface for our crypto requirements are defined in the tixl-types repository.

We created a basic node.js implementation that you can use. Have a look at the src/node-js/crypto module for a factory-function. Many of the workflow functions have crypto as a required parameter.

The web-worker implementation exists for browser environments.

Workflows

Everything you can do to interact with the Tixl network is located in the workfows folder (src/workflows). The first thing you would probably want to generate is a keyset and the account chain.

Most of the workflows generate BlockTx or BlockchainTx objects, that hold the Transactions that must be sent to the gateway.

From there it is exploring the workflows and lower-level API functions. All functions are written in TypeScript and self-explaining.

Redux

If you want to use redux, we created redux-modules, reducers and actions to help with that.

Registry package

yarn build creates a dist/ folder which contains the package to publish to a registry. The package has its own package.json, that is copied over at build time.

To publish a new version, cd into dist and run yarn publish from there.

tixl-sdk-js's People

Contributors

tammo avatar onchainguy-eth avatar dependabot[bot] avatar

Stargazers

Jedsada Tiwongvorakul avatar STYLIANOS IORDANIS avatar Julian Yaman avatar Paul Verest avatar Matthew Steer avatar Jos Deldime avatar Ryan Glover avatar Holger Schauf avatar  avatar Finn avatar

Watchers

Christian Eichinger avatar James Cloos avatar  avatar Potikorn avatar  avatar  avatar

tixl-sdk-js's Issues

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.