Package at.qubic.api.network
Class Node
java.lang.Object
at.qubic.api.network.Node
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionvoidaddPeerListener(PeerListener peerListener) reactor.core.publisher.Mono<SignedTransaction> broadcastTransaction(reactor.core.publisher.Mono<SignedTransaction> transaction) Sends a signed transaction by broadcasting it to the node.reactor.core.publisher.Mono<TickInfo> Get the current tick info.reactor.core.publisher.Mono<Entity> getEntity(reactor.core.publisher.Mono<byte[]> publicKey) Get the entity information (balance) for the specified public key.reactor.core.publisher.Flux<RespondOwnedAssets> getOwnedAssets(reactor.core.publisher.Mono<byte[]> publicKey) Get all owned assets of an entity.reactor.core.publisher.Flux<RespondPossessedAssets> getPossessedAssets(reactor.core.publisher.Mono<byte[]> publicKey) Get all possessed assets of an entity.reactor.core.publisher.Mono<List<AssetOrder>> getQxAssetOrders(reactor.core.publisher.Mono<QxGetAssetOrders> request) reactor.core.publisher.Mono<List<EntityOrder>> getQxEntityOrders(reactor.core.publisher.Mono<QxGetEntityOrders> request) reactor.core.publisher.Mono<QxFees> Get all QX fees.reactor.core.publisher.Mono<TickData> getTickData(int tick) reactor.core.publisher.Flux<SignedTransaction> getTickTransactions(int tick) Get all transactions of a tick.
-
Field Details
-
REQUEST_TIMEOUT
public static final int REQUEST_TIMEOUT- See Also:
-
-
Constructor Details
-
Node
public Node(reactor.netty.tcp.TcpClient tcpClient) -
Node
-
-
Method Details
-
getCurrentTickInfo
Get the current tick info.- Returns:
- Information about the node's current tick.
-
getTickData
-
getEntity
Get the entity information (balance) for the specified public key. An entity is identified by its 'ID' (textual representation of the public key).- Parameters:
publicKey- The public key of the entity to get the information of.- Returns:
- The entity information. See
Entity.
-
broadcastTransaction
public reactor.core.publisher.Mono<SignedTransaction> broadcastTransaction(reactor.core.publisher.Mono<SignedTransaction> transaction) Sends a signed transaction by broadcasting it to the node.- Parameters:
transaction- The transaction to be sent. Make sure that the correct future tick is set.- Returns:
- The submitted transaction for further processing (submitting is fire and forget).
-
getTickTransactions
Get all transactions of a tick.- Parameters:
tick- The tick to get the transactions from.- Returns:
- A flux of signed transactions. Attention: the transaction hash is not set but needs to be calculated.
-
getOwnedAssets
public reactor.core.publisher.Flux<RespondOwnedAssets> getOwnedAssets(reactor.core.publisher.Mono<byte[]> publicKey) Get all owned assets of an entity.- Parameters:
publicKey- The public key of the entity to get the owned assets of.- Returns:
- The assets the entity owns.
-
getPossessedAssets
public reactor.core.publisher.Flux<RespondPossessedAssets> getPossessedAssets(reactor.core.publisher.Mono<byte[]> publicKey) Get all possessed assets of an entity.- Parameters:
publicKey- The public key of the entity to get the possessed assets of.- Returns:
- The assets the entity possesses.
-
getQxFees
Get all QX fees.- Returns:
- Fees for QX contract operations.
-
getQxAssetOrders
public reactor.core.publisher.Mono<List<AssetOrder>> getQxAssetOrders(reactor.core.publisher.Mono<QxGetAssetOrders> request) -
getQxEntityOrders
public reactor.core.publisher.Mono<List<EntityOrder>> getQxEntityOrders(reactor.core.publisher.Mono<QxGetEntityOrders> request) -
addPeerListener
-