public class V1TierionHashApiClient extends Object implements TierionHashApiClient
| Constructor and Description |
|---|
V1TierionHashApiClient() |
V1TierionHashApiClient(int connectionPoolSize) |
V1TierionHashApiClient(String username,
String password) |
V1TierionHashApiClient(String username,
String password,
int connectionPoolSize) |
| Modifier and Type | Method and Description |
|---|---|
void |
close() |
String |
createBlockSubscription(String callbackUrl,
String label)
Creates a new block subscription using the specified callbackUrl and label.
|
void |
deleteBlockSubscription(String id)
Deletes an existing block subscription with the specified id.
|
List<BlockSubscription> |
getAllBlockSubscriptions()
Retrieves a list of all block subscriptions bound to the user's account.
|
BlockSubscription |
getBlockSubscription(String id)
Retrieves data about a block subscription specified by id.
|
BlockchainReceipt |
getReceipt(String receiptId)
Retrieves a receipt of a hash item.
|
HashResponse |
submitContent(byte[] text)
Submits an item for hashing, as a byte array.
|
HashResponse |
submitFile(Path file)
Submits a File from the filesystem for hashing.
|
HashResponse |
submitHash(String hash)
Submits a hash to the blockchain.
|
BlockSubscription |
updateBlockSubscription(String id,
String callbackUrl,
String label)
Updates an existing block subscription.
|
public V1TierionHashApiClient(String username, String password, int connectionPoolSize)
public V1TierionHashApiClient(int connectionPoolSize)
public V1TierionHashApiClient()
public HashResponse submitHash(String hash)
TierionHashApiClientsubmitHash in interface TierionHashApiClienthash - A hex-encoded SHA-256 hash.public HashResponse submitContent(byte[] text)
TierionHashApiClientsubmitContent in interface TierionHashApiClienttext - Content to be hashed.public HashResponse submitFile(Path file) throws IOException
TierionHashApiClientsubmitFile in interface TierionHashApiClientfile - Path to the file which should be hashed and the hash submitted.IOExceptionpublic BlockchainReceipt getReceipt(String receiptId)
TierionHashApiClientgetReceipt in interface TierionHashApiClientreceiptId - ID of the receipt to be retrieved.public List<BlockSubscription> getAllBlockSubscriptions()
TierionHashApiClientgetAllBlockSubscriptions in interface TierionHashApiClientpublic BlockSubscription getBlockSubscription(String id)
TierionHashApiClientgetBlockSubscription in interface TierionHashApiClientid - The block subscription ID.public String createBlockSubscription(String callbackUrl, String label)
TierionHashApiClientcreateBlockSubscription in interface TierionHashApiClientcallbackUrl - The callback URL for this block subscription.label - The label of this block subscription.public BlockSubscription updateBlockSubscription(String id, String callbackUrl, String label)
TierionHashApiClientupdateBlockSubscription in interface TierionHashApiClientid - The ID of the block subscription to be updated.callbackUrl - The new callback URL. If null, then the current callback URL will remain unchanged.label - The new label. If null, then the current label will remain unchanged.public void deleteBlockSubscription(String id)
TierionHashApiClientdeleteBlockSubscription in interface TierionHashApiClientid - The ID of the block subscription to be deleted.public void close()
close in interface AutoCloseableCopyright © 2017. All rights reserved.