neo-json-rpc-client-java

JSON-RPC Client for NEO

Лицензия

Лицензия

MIT
Категории

Категории

CLI Взаимодействие с пользователем
Группа

Группа

com.github.swisscom-blockchain
Идентификатор

Идентификатор

neo-rpcclient
Последняя версия

Последняя версия

1.2
Дата

Дата

Тип

Тип

jar
Описание

Описание

neo-json-rpc-client-java
JSON-RPC Client for NEO
Ссылка на сайт

Ссылка на сайт

https://github.com/swisscom-blockchain/neo-json-rpc-client-java
Система контроля версий

Система контроля версий

https://github.com/swisscom-blockchain/neo-json-rpc-client-java

Скачать neo-rpcclient

Как подключить последнюю версию

<!-- https://jarcasting.com/artifacts/com.github.swisscom-blockchain/neo-rpcclient/ -->
<dependency>
    <groupId>com.github.swisscom-blockchain</groupId>
    <artifactId>neo-rpcclient</artifactId>
    <version>1.2</version>
</dependency>
// https://jarcasting.com/artifacts/com.github.swisscom-blockchain/neo-rpcclient/
implementation 'com.github.swisscom-blockchain:neo-rpcclient:1.2'
// https://jarcasting.com/artifacts/com.github.swisscom-blockchain/neo-rpcclient/
implementation ("com.github.swisscom-blockchain:neo-rpcclient:1.2")
'com.github.swisscom-blockchain:neo-rpcclient:jar:1.2'
<dependency org="com.github.swisscom-blockchain" name="neo-rpcclient" rev="1.2">
  <artifact name="neo-rpcclient" type="jar" />
</dependency>
@Grapes(
@Grab(group='com.github.swisscom-blockchain', module='neo-rpcclient', version='1.2')
)
libraryDependencies += "com.github.swisscom-blockchain" % "neo-rpcclient" % "1.2"
[com.github.swisscom-blockchain/neo-rpcclient "1.2"]

Зависимости

compile (1)

Идентификатор библиотеки Тип Версия
com.github.briandilley.jsonrpc4j : jsonrpc4j jar 1.5.3

test (3)

Идентификатор библиотеки Тип Версия
org.hamcrest : hamcrest-all jar 1.3
org.hamcrest : hamcrest-core jar 1.3
junit : junit jar 4.11

Модули Проекта

Данный проект не имеет модулей.

Neo Json RPC Client

Java Interface to communicate with a Neo Node over JSON-RPC interface

NEO API Reference: https://github.com/neo-project/neo/wiki/API-Reference

Features

Network:

  • Basic Authentication
  • SSL and trust all certification manager

Supported JSON-RPC methods. See the changelog

Build

Building without tests

mvn clean package -DskipTests

How to use

Gradle import

compile 'com.github.swisscom-blockchain:neo-rpcclient:1.2'

Maven import

<dependency>
    <groupId>com.github.swisscom-blockchain</groupId>
    <artifactId>neo-rpcclient</artifactId>
    <version>1.2</version>
    <scope>compile</scope>
</dependency>

Plain HTTP connection or HTTPS with trusted certificate

JsonRpcHttpClient client = NeoClientUtil.create("http://your-node:22332");

NeoBlock block = neoClient.getBestBlock();

With HTTPS disabled certifcate check and Basic Authentication

JsonRpcHttpClient client = NeoClientUtil.create("https://your-node:22332");
NeoClientUtil.addBasicAuth(client, "user", "password");
NeoClientUtil.enableTrustAllCerts(client);

NeoBlock block = neoClient.getBestBlock();

Testing

For testing you need access to a Neo Node respective the JSON-RPC interface. The current setup is a Node with SSL and Basic Authentication. If you have an other setup you may adjust the test classes.

  • The tests need these system environment variables:
endpoint=<https://hostname:10332>
basicUser=<basic auth username>
basicAuth=<basic auth password>
  • In IntelliJ you can set these environment variables under
    • Run -> Edit Configuration
    • Defaults -> JUnit -> Environment Variables

Similar Projects

https://github.com/neo-ngd/neoj More functions implemented.

com.github.swisscom-blockchain

Swisscom Blockchain AG

Swisscom Blockchain provides solutions to implement blockchain technology quickly and successfully for your company.

Версии библиотеки

Версия
1.2
1.1
1.0