core

pweb3j core module

Лицензия

Лицензия

Группа

Группа

io.github.pchain-org
Идентификатор

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

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

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

1.0.2
Дата

Дата

Тип

Тип

jar
Описание

Описание

core
pweb3j core module
Ссылка на сайт

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

https://github.com/pchain-org/pweb3j
Система контроля версий

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

https://github.com/pchain-org/pweb3j

Скачать core

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

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

Зависимости

compile (10)

Идентификатор библиотеки Тип Версия
io.github.pchain-org : abi jar 1.0.1
io.github.pchain-org : crypto jar 1.0.1
io.github.pchain-org : tuples jar 1.0.1
com.github.jnr : jnr-unixsocket jar 0.21
com.squareup.okhttp3 : okhttp jar 3.8.1
com.squareup.okhttp3 : logging-interceptor jar 3.8.1
io.reactivex.rxjava2 : rxjava jar 2.2.2
org.java-websocket : Java-WebSocket jar 1.3.8
com.fasterxml.jackson.core : jackson-databind jar 2.8.5
org.slf4j : slf4j-api jar 1.7.25

test (4)

Идентификатор библиотеки Тип Версия
junit : junit jar 4.11
org.mockito : mockito-core jar 1.10.19
nl.jqno.equalsverifier : equalsverifier jar 2.1.7
ch.qos.logback : logback-classic jar 1.2.3

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

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

pweb3j

Pchain java API

This repository is evloved from web3j https://github.com/web3j/web3j, with changing package name from 'org.web3j' to 'org.pweb3j', and rewrite related classes/functions to adapt to pchain.

All pchain specific RPC APIs are listed in https://github.com/pchain-org/pchain/wiki/JSON-RPC

maven

java 8

<dependency>
  <groupId>io.github.pchain-org</groupId>
  <artifactId>core</artifactId>
  <version>1.0.2</version>
</dependency>

sending requests

For pchain is multi-chain structure, so the request should be sent to specific chain. And it just needs to add chain name after the http://host:port/. The following examples are using main chain - "pchain".

To send synchronous requests:

Web3j web3 = Web3j.build(new HttpService());  // defaults to http://localhost:6969/pchain
Web3ClientVersion web3ClientVersion = web3.web3ClientVersion().send();
String clientVersion = web3ClientVersion.getWeb3ClientVersion();

To send asynchronous requests using a CompletableFuture (Future on Android):

Web3j web3 = Web3j.build(new HttpService());  // defaults to http://localhost:6969/pchain
Web3ClientVersion web3ClientVersion = web3.web3ClientVersion().sendAsync().get();
String clientVersion = web3ClientVersion.getWeb3ClientVersion();

To use an RxJava Flowable:

Web3j web3 = Web3j.build(new HttpService());  // defaults to http://localhost:6969/pchain
web3.web3ClientVersion().flowable().subscribe(x -> {
    String clientVersion = x.getWeb3ClientVersion();
    ...
});

more

All tests/examples can be found in https://github.com/pchain-org/pweb3j/tree/master/integration-tests

More guides and instructions could refer to https://github.com/web3j/web3j

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

Версия
1.0.2
1.0.1