Class TransactionWrapper


  • public class TransactionWrapper
    extends java.lang.Object
    Represents a TransactionWrapper 1. This class contains all types of transaction wrapper classes as member variables 2. This class should be accessed via `caver.transaction`
    • Constructor Detail

      • TransactionWrapper

        public TransactionWrapper​(Klay klaytnCall)
        Creates a Transaction instance
        Parameters:
        klaytnCall - Klay RPC instance
    • Method Detail

      • decode

        public AbstractTransaction decode​(java.lang.String rlpEncoded)
        Decodes a RLP-encoded transaction and returns it with matching type of transaction
        Parameters:
        rlpEncoded - RLP-encoded transaction
        Returns:
        AbstractTransaction
      • getTransactionByHash

        public AbstractTransaction getTransactionByHash​(java.lang.String transactionHash)
        Query transaction from Klaytn and converts to a caver transaction instance.
        Example :
         
         AbstractTransaction tx = caver.transaction.getTransactionByHash("0x{txHash}");
         
         
        Parameters:
        transactionHash - The transaction hash string to query from Klaytn.
        Returns:
        AbstractTransaction
      • recoverPublicKeys

        public java.util.List<java.lang.String> recoverPublicKeys​(java.lang.String rawTx)
        Recovers the public keys from "signatures" filed in raw transaction string.

        If you want to derive an address from public key, please use Utils.publicKeyToAddress(String)

        Example :
         
         List<String> publicKeys = caver.transaction.recoverPublicKeys("0x{RLP-encoded transaction string}");
         
         
        Parameters:
        rawTx - The RLP-encoded transaction string to recover public keys from "signatures".
        Returns:
        List<String>
      • recoverFeePayerPublicKeys

        public java.util.List<java.lang.String> recoverFeePayerPublicKeys​(java.lang.String rawTx)
        Recovers the public keys from "feePayerSignatures" filed in raw transaction string.

        If you want to derive an address from public key, please use Utils.publicKeyToAddress(String)

        Example :
         
         List<String> publicKeys = caver.transaction.recoverFeePayerPublicKeys("0x{RLP-encoded transaction string}");
         
         
        Parameters:
        rawTx - The RLP-encoded transaction string to recover public keys from "signatures".
        Returns:
        List<String>