Giter VIP home page Giter VIP logo

ontology-ts-sdk's Introduction

Ontology TypeScript SDK

Version V1.1.0

Overview

This is the official Ontology TypeScript SDK - a comprehensive library for developing with the Ontology blockchain in both TypeScript and JavaScript. It currently supports management of wallets, digital identities and digital assets - as well as the deployment and invocation of smart contracts.

Getting Started

Installation

Download Through npm/Yarn

npm install 'ontology-ts-sdk' --save

or

yarn add 'ontology-ts-sdk'

Build from Source Code

Downloading

git clone 'https://github.com/ontio/ontology-ts-sdk.git'

Then install the dependencies with:

npm install

or

yarn

Compiling

Compile the project with the:

npm run build:dev // or npm run build:prod

or

yarn run build:dev // or yarn run build:prod

This will create a compiled version of the SDK in the lib directory.

Testing

To run the tests in the test directory, use:

npm run test

or

yarn run test

Use in Project

Import

Using import to include the modules from 'ontology-ts-sdk':

import {Wallet} from 'ontology-ts-sdk';
var wallet = Wallet.create('test');

Require

Using require to include the modules from 'ontology-ts-sdk':

var Ont = require('ontology-ts-sdk');
var wallet = Ont.Wallet.create('test');

In the Browser

To use in the browser you must use the compiled version (as listed above). The browser.js file is located in the lib directory. Include it into the project with a <script> tag:

<script src="./lib/browser.js"></script>

Everything will be available under the Ont variable, just like in the require example above.

var wallet = Ont.Wallet.create('test');

Contributing

Contributors are welcome to the ontology-ts-sdk. Before beginning, please take a look at our contributing guidelines. You can open an issue by clicking here.

If you have any issues getting setup, open an issue or reach out in the Ontology Discord.

License

The Ontology TypeScript SDK is availabl under the LGPL-3.0 License.

ontology-ts-sdk's People

Contributors

backslash47 avatar dependabot[bot] avatar doresimon avatar dyassab avatar jerryli617 avatar liuqiang1357 avatar mickwang avatar nashmiao avatar onto-app avatar ontology-opendoc avatar qiluge avatar roccomuso avatar voodoo12345 avatar xiaobin83 avatar xiaomin49 avatar zhengq1 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.