All Projects → hyperchain → Javasdk

hyperchain / Javasdk

Licence: lgpl-3.0
the Java SDK for hyperchain (developing)

Programming Languages

java
68154 projects - #9 most used programming language

Projects that are alternatives of or similar to Javasdk

Flow Go Sdk
Tools for building Go applications on Flow 🌊
Stars: ✭ 109 (+211.43%)
Mutual labels:  blockchain, sdk
Evt4j
Official Java SDK for everiToken public chain. https://www.everitoken.io
Stars: ✭ 248 (+608.57%)
Mutual labels:  blockchain, sdk
Hydro Scaffold Dex
A Decentralized Exchange Scaffold - launch a DEX in minutes
Stars: ✭ 112 (+220%)
Mutual labels:  blockchain, sdk
Web Sdk
Portis Web SDK
Stars: ✭ 65 (+85.71%)
Mutual labels:  blockchain, sdk
Js Stellar Sdk
Main Stellar client library for the Javascript language
Stars: ✭ 488 (+1294.29%)
Mutual labels:  blockchain, sdk
Stellar Ios Mac Sdk
Stellar SDK for iOS & macOS - Swift, Stellar, Horizon, Soneso
Stars: ✭ 92 (+162.86%)
Mutual labels:  blockchain, sdk
Java Stellar Sdk
Stars: ✭ 146 (+317.14%)
Mutual labels:  blockchain, sdk
Solana Web3.js
Solana JavaScript SDK
Stars: ✭ 85 (+142.86%)
Mutual labels:  blockchain, sdk
Decentralized Internet
A SDK/library for decentralized web and distributing computing projects
Stars: ✭ 406 (+1060%)
Mutual labels:  blockchain, sdk
Py Stellar Base
Stellar client library for the Python language
Stars: ✭ 273 (+680%)
Mutual labels:  blockchain, sdk
Hanzo.js
🚀 Hanzo JavaScript SDK. Develop cutting-edge decentralized applications.
Stars: ✭ 128 (+265.71%)
Mutual labels:  blockchain, sdk
Evtjs
API Binding (SDK) for the everiToken blockchain.
Stars: ✭ 697 (+1891.43%)
Mutual labels:  blockchain, sdk
Lisk Sdk
🔩 Lisk software development kit
Stars: ✭ 2,767 (+7805.71%)
Mutual labels:  blockchain, sdk
Cakeshop
An integrated development environment and SDK for Ethereum-like ledgers
Stars: ✭ 491 (+1302.86%)
Mutual labels:  blockchain, sdk
Bitgosdk Php
BitGo SDK written in PHP
Stars: ✭ 22 (-37.14%)
Mutual labels:  blockchain, sdk
Facebook
A Facebook Graph API SDK For Go.
Stars: ✭ 948 (+2608.57%)
Mutual labels:  sdk
Blockchain Anchor
A Node.js library for anchoring data onto the Bitcoin blockchain and confirming anchored data on Bitcoin and Ethereum.
Stars: ✭ 32 (-8.57%)
Mutual labels:  blockchain
Lethean Vpn
Lethean Virtual Private Network (VPN)
Stars: ✭ 29 (-17.14%)
Mutual labels:  blockchain
Web3studio Sojourn
A React Native DevKit with code for a Web3 Decentralized Data Storage Pattern.
Stars: ✭ 29 (-17.14%)
Mutual labels:  blockchain
Caver Js
Official caver-js repository
Stars: ✭ 34 (-2.86%)
Mutual labels:  blockchain

LITESDK

License: LGPL v3 Build Status Coverage Status

This is a light JavaSDK for Hyperchain.

To get more information you can view docs, use hvmd and liteSDK to start a enjoyable journey.

Get started

Install

Maven

<dependency>
    <groupId>cn.hyperchain</groupId>
    <artifactId>litesdk</artifactId>
    <version>x.x.x</version>
</dependency>

Gradle

compile group: 'cn.hyperchain', name: 'litesdk', version: 'x.x.x'

It's better to use latest sdk to send transaction, now it will be compatible with hyperchain 1.0 and 2.0

Usage

1. build provider manager

Provider can be expanded by user, we support default http provider.

Then create provider manager.

String DEFAULT_URL = "localhost:8081";
DefaultHttpProvider defaultHttpProvider = new DefaultHttpProvider.Builder().setUrl(DEFAULT_URL).build();
ProviderManager providerManager = ProviderManager.createManager(defaultHttpProvider);

2. Build service

Create different services by specific provider manager, service will provide some function.

ContractService contractService = ServiceManager.getContractService(providerManager);
AccountService accountService = ServiceManager.getAccountService(providerManager);

3. Create account

Account can be used to sign transaction.

Account account = accountService.genAccount(Algo.SMRAW);

4. Build transaction

Transaction builder can create different transaction by different style of initialization.

// deploy
Transaction transaction = new Transaction.HVMBuilder(account.getAddress()).deploy("hvm-jar/hvmbasic-1.0.0-student.jar").build();
transaction.sign(account);

// invoke
Transaction transaction1 = new Transaction.HVMBuilder(account.getAddress()).invoke(receiptResponse.getContractAddress(), new StudentInvoke()).build();

5. Get response

Service will return a Request, user can use Request to get specific Response by interface.

ReceiptResponse receiptResponse = contractService.deploy(transaction).send().polling();

6. Decode result

Decode result to specific type.

Decoder.decodeHVM(receiptResponse1.getRet(), String.class);

Issue

If you have any suggestions or idea, please submit issue in this project!

Doc

If you want to know more about LiteSDK, you can read manual at here.

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].