All Projects → ontio → ontology-ts-sdk

ontio / ontology-ts-sdk

Licence: LGPL-3.0 license
Comprehensive TypeScript library for the Ontology blockchain.

Programming Languages

typescript
32286 projects
javascript
184084 projects - #8 most used programming language

Projects that are alternatives of or similar to ontology-ts-sdk

semantic-web
Storing ontologies/vocabularies from the web. Wish anybody can translate some of them.
Stars: ✭ 114 (+80.95%)
Mutual labels:  ontology
ontology
Repository for the Open Energy Ontology (OEO)
Stars: ✭ 71 (+12.7%)
Mutual labels:  ontology
amigo
AmiGO is the public interface for the Gene Ontology.
Stars: ✭ 26 (-58.73%)
Mutual labels:  ontology
owl2neo4j
Convert OWL to labeled property graph and import into Neo4J
Stars: ✭ 42 (-33.33%)
Mutual labels:  ontology
knowledge-graph-change-language
Tools for working with KGCL
Stars: ✭ 14 (-77.78%)
Mutual labels:  ontology
agreementmaker
AgreementMaker Ontology Matching System
Stars: ✭ 33 (-47.62%)
Mutual labels:  ontology
download audioset
📁 This repo makes it easy to download the raw audio files from AudioSet (32.45 GB, 632 classes).
Stars: ✭ 53 (-15.87%)
Mutual labels:  ontology
pronto
A Python frontend to (Open Biomedical) Ontologies.
Stars: ✭ 202 (+220.63%)
Mutual labels:  ontology
OLGA
an Ontology SDK
Stars: ✭ 36 (-42.86%)
Mutual labels:  ontology
ordered
Entropy-controlled contexts in Python
Stars: ✭ 36 (-42.86%)
Mutual labels:  ontology
mobivoc
A vocabulary for future-oriented mobility solutions and value-added services supporting them.
Stars: ✭ 27 (-57.14%)
Mutual labels:  ontology
dead simple owl design patterns
A simple system for specifying OWL class design patterns for OBO-ish ontologies.
Stars: ✭ 34 (-46.03%)
Mutual labels:  ontology
mondo
Mondo Disease Ontology
Stars: ✭ 156 (+147.62%)
Mutual labels:  ontology
obi
The Ontology for Biomedical Investigations
Stars: ✭ 49 (-22.22%)
Mutual labels:  ontology
envo
A community-driven ontology for the representation of environments
Stars: ✭ 106 (+68.25%)
Mutual labels:  ontology
Arthur
Semantic language-agnostic source code schema
Stars: ✭ 13 (-79.37%)
Mutual labels:  ontology
Materials-Design-Ontology
An Ontology for the Materials Design Domain
Stars: ✭ 21 (-66.67%)
Mutual labels:  ontology
ontology-oracle
The Oracle node and Oracle contract
Stars: ✭ 33 (-47.62%)
Mutual labels:  ontology
EMMO
Elementary Multiperspective Material Ontology (EMMO)
Stars: ✭ 44 (-30.16%)
Mutual labels:  ontology
deepgo
Function prediction using a deep ontology-aware classifier
Stars: ✭ 65 (+3.17%)
Mutual labels:  ontology

Ontology TypeScript SDK

Version V1.1.18

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:

yarn

Compiling

Compile the project with the:

yarn build:dev // or yarn build:prod

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

Testing

The tests can be found in the test directory. They are distinguished into three categories stored in separate subfolders:

  • unit: unit tests that can be run without external or network dependencies
  • integration: integration tests that require access to one or more Blockchain nodes and test the actual interaction with the Blockchain
  • example: pure sample code without test assertations that can be used for explorative testing or documentation purposes

To run the tests, use one of:

# unit tests
npm run test:unit
# integration tests
npm run test:integration
# examples
npm run test:example
# all
npm run test

or

yarn run test:unit
# integration tests
yarn run test:integration
# examples
yarn run test:example
# all
yarn test

The integration tests use several accounts on the testnet that require funding of ONG tokens in order to pay for the transactions. If there are any test failures with error messages like "insufficient funds" or similar, make sure the following accounts are properly funded:

  • APT4wZG9sFQfjhyfGALPXQj5UyrQ3ZCVkY
  • ANH5bHrrt111XwNEnuPZj6u95Dd6u7G4D6
  • AXK2KtCfcJnSMyRzSwTuwTKgNrtx5aXfFX
  • AVXf5w8WD2y6jV1Lzi36oSKYNif1C7Surc
  • AdLUBSSHUuFaak9j169hiamXUmPuCTnaRz
  • AJkkLbouowk6teTaxz1F2DYKfJh24PVk3r
  • ATk57i8rMXFSBpHAdX3UQ4TNe48BBrfCoc
  • AU9TioM24rXk5E3tUGrv8jwgBA1aZVVKDW
  • AHTdWzj4jYBzbU48YBCfovvouTMc45M6iP
  • AJym8dF7wZLjtoiY8C3mmYt8f2tZDxq5iz

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.

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].