Package com.h2tcoin.takamakachain.wallet
Class TkmWallet
- java.lang.Object
-
- com.h2tcoin.takamakachain.wallet.TkmWallet
-
public class TkmWallet extends Object
- Author:
- giovanni.antino@h2tcoin.com
-
-
Constructor Summary
Constructors Constructor Description TkmWallet()
-
Method Summary
All Methods Static Methods Concrete Methods Modifier and Type Method Description static TransactionBean
createGenericTransaction(InternalBlockBean ibb, InstanceWalletKeystoreInterface iwk, int signKey)
static TransactionBean
createGenericTransaction(InternalTransactionBean itb, InstanceWalletKeystoreInterface iwk, int signKey)
It returns the Chrypted envelope used later in TKM chainstatic TkmCypherBean
verifySign(TransactionBean tb)
It verifies the Transaction Bean content going through all the wrapped chain elements parsed use this function with caution, check for null values.static TransactionBox
verifyTransactionIntegrity(TransactionBean tb)
It creates a transaction box containing both Transaction bean and itb message Only when the verifySign method sets a valid transactionstatic TransactionBox
verifyTransactionIntegrity(TransactionBean tb, String transactionJson)
It creates a transaction box containing both Transaction bean and itb message Only when the verifySign method sets a valid transactionstatic TransactionBox
verifyTransactionIntegrity(String transactionJson)
-
-
-
Method Detail
-
createGenericTransaction
public static TransactionBean createGenericTransaction(InternalTransactionBean itb, InstanceWalletKeystoreInterface iwk, int signKey) throws TransactionCanNotBeCreatedException
It returns the Chrypted envelope used later in TKM chain- Parameters:
itb
- Java Bean Class - it contains all the transaction elements needediwk
- is an abstract layer that represents the involved walletsignKey
- is the chosen index needed for the creation of the wallet public address- Returns:
- TransactionBean - Java Bean Class - it contains the wrapped elements located inside the itb object
- Throws:
TransactionCanNotBeCreatedException
-
createGenericTransaction
public static TransactionBean createGenericTransaction(InternalBlockBean ibb, InstanceWalletKeystoreInterface iwk, int signKey) throws TransactionCanNotBeCreatedException
-
verifySign
public static TkmCypherBean verifySign(TransactionBean tb)
It verifies the Transaction Bean content going through all the wrapped chain elements parsed use this function with caution, check for null values. For transaction integrity check useverifyTransactionIntegrity
, for block integrity check useBlockUtils.decodeBlock(String blockJson)
- Parameters:
tb
- - Java Class Bean - Chrypted envelope- Returns:
- TkmCypherBean
-
verifyTransactionIntegrity
public static TransactionBox verifyTransactionIntegrity(String transactionJson)
-
verifyTransactionIntegrity
public static TransactionBox verifyTransactionIntegrity(TransactionBean tb, String transactionJson)
It creates a transaction box containing both Transaction bean and itb message Only when the verifySign method sets a valid transaction- Parameters:
tb
- Java Class Bean - Chrypted envelopetransactionJson
-- Returns:
-
verifyTransactionIntegrity
public static TransactionBox verifyTransactionIntegrity(TransactionBean tb)
It creates a transaction box containing both Transaction bean and itb message Only when the verifySign method sets a valid transaction- Parameters:
tb
- Java Class Bean - Chrypted envelope- Returns:
-
-