public class Node extends Object
Constructor and Description |
---|
Node() |
Node(String uri,
char chainId) |
Node(String uri,
char chainId,
org.apache.http.client.HttpClient httpClient) |
Modifier and Type | Method and Description |
---|---|
String |
alias(PrivateKeyAccount account,
byte chainId,
String alias,
long fee) |
String |
burnAsset(PrivateKeyAccount account,
byte chainId,
String assetId,
long amount,
long fee) |
String |
cancelLease(PrivateKeyAccount account,
byte chainId,
String txId,
long fee) |
String |
cancelOrder(PrivateKeyAccount account,
AssetPair assetPair,
String orderId) |
String |
compileScript(String script)
Compiles a script.
|
Order |
createOrder(PrivateKeyAccount account,
String matcherKey,
AssetPair assetPair,
Order.Type orderType,
long price,
long amount,
long expiration,
long matcherFee) |
String |
data(PrivateKeyAccount from,
Collection<DataEntry<?>> data,
long fee) |
String |
deleteOrder(PrivateKeyAccount account,
AssetPair assetPair,
String orderId) |
String |
getAddrByAlias(String alias) |
long |
getBalance(String address) |
long |
getBalance(String address,
int confirmations) |
long |
getBalance(String address,
String assetId) |
Block |
getBlock(int height)
Returns block at given height.
|
Block |
getBlock(String signature)
Returns block by its signature.
|
int |
getHeight() |
String |
getMatcherKey() |
OrderBook |
getOrderBook(AssetPair assetPair) |
List<Order> |
getOrders(PrivateKeyAccount account) |
List<Order> |
getOrders(PrivateKeyAccount account,
AssetPair market) |
OrderStatusInfo |
getOrderStatus(String orderId,
AssetPair assetPair) |
Transaction |
getTransaction(String txId)
Returns object by its ID.
|
Map<String,Object> |
getTransactionData(String txId) |
String |
getVersion() |
String |
issueAsset(PrivateKeyAccount account,
byte chainId,
String name,
String description,
long quantity,
byte decimals,
boolean reissuable,
String script,
long fee) |
String |
lease(PrivateKeyAccount from,
String recipient,
long amount,
long fee) |
String |
massTransfer(PrivateKeyAccount from,
String assetId,
Collection<Transfer> transfers,
long fee,
String message) |
String |
reissueAsset(PrivateKeyAccount account,
byte chainId,
String assetId,
long quantity,
boolean reissuable,
long fee) |
String |
send(Transaction tx)
Sends a signed object and returns its ID.
|
String |
setScript(PrivateKeyAccount from,
String script,
byte chainId,
long fee)
Sets a validating script for an account.
|
String |
sponsorAsset(PrivateKeyAccount account,
String assetId,
long minAssetFee,
long fee) |
String |
transfer(PrivateKeyAccount from,
String recipient,
long amount,
long fee,
String message) |
String |
transfer(PrivateKeyAccount from,
String assetId,
String recipient,
long amount,
long fee,
String feeAssetId,
String message) |
boolean |
validateAddresses(String address) |
public Node()
public Node(String uri, char chainId) throws URISyntaxException
URISyntaxException
public Node(String uri, char chainId, org.apache.http.client.HttpClient httpClient) throws URISyntaxException
URISyntaxException
public String getVersion() throws IOException
IOException
public int getHeight() throws IOException
IOException
public long getBalance(String address) throws IOException
IOException
public long getBalance(String address, int confirmations) throws IOException
IOException
public long getBalance(String address, String assetId) throws IOException
IOException
public Transaction getTransaction(String txId) throws IOException
txId
- object IDIOException
- if no object with the given ID existspublic Map<String,Object> getTransactionData(String txId) throws IOException
IOException
public Block getBlock(int height) throws IOException
height
- blockchain heightIOException
- if no block exists at the given heightpublic Block getBlock(String signature) throws IOException
signature
- block signatureIOException
- if no block with the given signature existspublic boolean validateAddresses(String address) throws IOException
IOException
public String getAddrByAlias(String alias) throws IOException
IOException
public String send(Transaction tx) throws IOException
tx
- signed object (as created by static methods in Transaction class)IOException
public String transfer(PrivateKeyAccount from, String recipient, long amount, long fee, String message) throws IOException
IOException
public String transfer(PrivateKeyAccount from, String assetId, String recipient, long amount, long fee, String feeAssetId, String message) throws IOException
IOException
public String lease(PrivateKeyAccount from, String recipient, long amount, long fee) throws IOException
IOException
public String cancelLease(PrivateKeyAccount account, byte chainId, String txId, long fee) throws IOException
IOException
public String issueAsset(PrivateKeyAccount account, byte chainId, String name, String description, long quantity, byte decimals, boolean reissuable, String script, long fee) throws IOException
IOException
public String reissueAsset(PrivateKeyAccount account, byte chainId, String assetId, long quantity, boolean reissuable, long fee) throws IOException
IOException
public String burnAsset(PrivateKeyAccount account, byte chainId, String assetId, long amount, long fee) throws IOException
IOException
public String sponsorAsset(PrivateKeyAccount account, String assetId, long minAssetFee, long fee) throws IOException
IOException
public String alias(PrivateKeyAccount account, byte chainId, String alias, long fee) throws IOException
IOException
public String massTransfer(PrivateKeyAccount from, String assetId, Collection<Transfer> transfers, long fee, String message) throws IOException
IOException
public String data(PrivateKeyAccount from, Collection<DataEntry<?>> data, long fee) throws IOException
IOException
public String setScript(PrivateKeyAccount from, String script, byte chainId, long fee) throws IOException
from
- the accountscript
- script textchainId
- chain IDfee
- object feeIOException
- if an error occursAccount.MAINNET
,
Account.TESTNET
public String compileScript(String script) throws IOException
script
- the script to compileIOException
- if the script is not well formed or some other error occurspublic String getMatcherKey() throws IOException
IOException
public Order createOrder(PrivateKeyAccount account, String matcherKey, AssetPair assetPair, Order.Type orderType, long price, long amount, long expiration, long matcherFee) throws IOException
IOException
public String cancelOrder(PrivateKeyAccount account, AssetPair assetPair, String orderId) throws IOException
IOException
public String deleteOrder(PrivateKeyAccount account, AssetPair assetPair, String orderId) throws IOException
IOException
public OrderBook getOrderBook(AssetPair assetPair) throws IOException
IOException
public OrderStatusInfo getOrderStatus(String orderId, AssetPair assetPair) throws IOException
IOException
public List<Order> getOrders(PrivateKeyAccount account) throws IOException
IOException
public List<Order> getOrders(PrivateKeyAccount account, AssetPair market) throws IOException
IOException
Copyright © 2019. All rights reserved.