public interface TierionHashApiClient extends AutoCloseable
| Modifier and Type | Method and Description |
|---|---|
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.
|
closeHashResponse submitHash(String hash)
hash - A hex-encoded SHA-256 hash.HashResponse submitContent(byte[] text)
text - Content to be hashed.HashResponse submitFile(Path file) throws IOException
file - Path to the file which should be hashed and the hash submitted.IOExceptionBlockchainReceipt getReceipt(String receiptId)
receiptId - ID of the receipt to be retrieved.TierionException - If no receipt with the specified ID exists.List<BlockSubscription> getAllBlockSubscriptions()
BlockSubscription getBlockSubscription(String id)
id - The block subscription ID.TierionException - If no subscription with the requested ID is found.String createBlockSubscription(String callbackUrl, String label)
callbackUrl - The callback URL for this block subscription.label - The label of this block subscription.BlockSubscription updateBlockSubscription(String id, String callbackUrl, String label)
id - 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.TierionException - If no subscription with the requested ID is found.void deleteBlockSubscription(String id)
id - The ID of the block subscription to be deleted.TierionException - If no subscription with the requested ID is found.Copyright © 2017. All rights reserved.