public abstract class AbstractFeeDelegatedTransaction extends AbstractTransaction
Modifier and Type | Class and Description |
---|---|
static class |
AbstractFeeDelegatedTransaction.Builder<B extends AbstractFeeDelegatedTransaction.Builder>
Represent a AbstractFeeDelegatedTransaction builder
|
Constructor and Description |
---|
AbstractFeeDelegatedTransaction(AbstractFeeDelegatedTransaction.Builder builder)
Create an AbstractFeeDelegatedTransaction instance
|
AbstractFeeDelegatedTransaction(Klay klaytnCall,
java.lang.String type,
java.lang.String from,
java.lang.String nonce,
java.lang.String gas,
java.lang.String gasPrice,
java.lang.String chainId,
java.util.List<SignatureData> signatures,
java.lang.String feePayer,
java.util.List<SignatureData> feePayerSignatures)
Create an AbstractFeeDelegatedTransaction instance
|
Modifier and Type | Method and Description |
---|---|
void |
appendFeePayerSignatures(java.util.List<SignatureData> signatureData)
Appends fee payer's signatures to the transaction.
|
void |
appendFeePayerSignatures(SignatureData signatureData)
Appends fee payer's signatures to the transaction.
|
java.lang.String |
combineSignedRawTransactions(java.util.List<java.lang.String> rlpEncoded)
Combines signatures and feePayerSignatures to the transaction from RLP-encoded transaction strings and returns a single transaction with all signatures combined.
|
boolean |
compareTxField(AbstractFeeDelegatedTransaction txObj,
boolean checkSig)
Check equals txObj passed parameter and current instance.
|
java.lang.String |
getFeePayer()
Getter function for feePayer
|
java.util.List<SignatureData> |
getFeePayerSignatures()
Getter function for feePayerSignatures
|
java.lang.String |
getRLPEncodingForFeePayerSignature()
Returns a RLP-encoded transaction string for making fee payer's signature.
|
void |
setFeePayer(java.lang.String feePayer)
Setter function for feePayer
|
void |
setFeePayerSignatures(java.util.List<SignatureData> feePayerSignatures) |
AbstractFeeDelegatedTransaction |
signAsFeePayer(AbstractKeyring keyring)
Sign the transaction as a fee payer using all private keys used as roleFeePayerKey in the Keyring instance.
|
AbstractFeeDelegatedTransaction |
signAsFeePayer(AbstractKeyring keyring,
java.util.function.Function<AbstractFeeDelegatedTransaction,java.lang.String> hasher)
Sign the transaction as a fee payer using all private keys used as roleFeePayerKey in the Keyring instance.
|
AbstractFeeDelegatedTransaction |
signAsFeePayer(AbstractKeyring keyring,
int index)
Sign the the transaction as a fee payer using a private key at the index among the private keys used as roleFeePayerKey in the Keyring instance.
|
AbstractFeeDelegatedTransaction |
signAsFeePayer(AbstractKeyring keyring,
int index,
java.util.function.Function<AbstractFeeDelegatedTransaction,java.lang.String> hasher)
Sign the the transaction as a fee payer using a private key at the index among the private keys used as roleFeePayerKey in the Keyring instance.
|
AbstractFeeDelegatedTransaction |
signAsFeePayer(java.lang.String keyString)
Signs to the transaction with a single private key as a fee payer.
|
AbstractFeeDelegatedTransaction |
signAsFeePayer(java.lang.String keyString,
java.util.function.Function<AbstractFeeDelegatedTransaction,java.lang.String> hasher)
Signs to the transaction with a single private key as a fee payer.
|
appendSignatures, appendSignatures, compareTxField, fillTransaction, getChainId, getCommonRLPEncodingForSignature, getFrom, getGas, getGasPrice, getKeyType, getKlaytnCall, getNonce, getRawTransaction, getRLPEncoding, getRLPEncodingForSignature, getSenderTxHash, getSignatures, getTransactionHash, getType, refineSignature, setChainId, setChainId, setFrom, setGas, setGas, setGasPrice, setGasPrice, setKlaytnCall, setNonce, setNonce, setSignatures, setType, sign, sign, sign, sign, sign, sign, validateOptionalValues
public AbstractFeeDelegatedTransaction(AbstractFeeDelegatedTransaction.Builder builder)
builder
- AbstractFeeDelegatedTransaction.Builderpublic AbstractFeeDelegatedTransaction(Klay klaytnCall, java.lang.String type, java.lang.String from, java.lang.String nonce, java.lang.String gas, java.lang.String gasPrice, java.lang.String chainId, java.util.List<SignatureData> signatures, java.lang.String feePayer, java.util.List<SignatureData> feePayerSignatures)
klaytnCall
- Klay RPC instancetype
- Transaction's type stringfrom
- The address of the sender.nonce
- A value used to uniquely identify a sender’s transaction.gas
- The maximum amount of gas the transaction is allowed to use.gasPrice
- A unit price of gas in peb the sender will pay for a transaction fee.chainId
- Network IDsignatures
- A Signature listfeePayer
- The address of the fee payer.feePayerSignatures
- The fee payers's signatures.public AbstractFeeDelegatedTransaction signAsFeePayer(java.lang.String keyString) throws java.io.IOException
keyString
- The private key string.java.io.IOException
public AbstractFeeDelegatedTransaction signAsFeePayer(java.lang.String keyString, java.util.function.Function<AbstractFeeDelegatedTransaction,java.lang.String> hasher) throws java.io.IOException
keyString
- The private key string.hasher
- The function to get hash of transaction.java.io.IOException
public AbstractFeeDelegatedTransaction signAsFeePayer(AbstractKeyring keyring) throws java.io.IOException
keyring
- The Keyring instance.java.io.IOException
public AbstractFeeDelegatedTransaction signAsFeePayer(AbstractKeyring keyring, int index) throws java.io.IOException
keyring
- The Keyring instance.index
- The index of private key to use in Keyring instance.java.io.IOException
public AbstractFeeDelegatedTransaction signAsFeePayer(AbstractKeyring keyring, java.util.function.Function<AbstractFeeDelegatedTransaction,java.lang.String> hasher) throws java.io.IOException
keyring
- The Keyring instance.hasher
- The function to get hash of transaction.java.io.IOException
public AbstractFeeDelegatedTransaction signAsFeePayer(AbstractKeyring keyring, int index, java.util.function.Function<AbstractFeeDelegatedTransaction,java.lang.String> hasher) throws java.io.IOException
keyring
- The Keyring instance.index
- The index of private key to use in Keyring instance.hasher
- The function to get hash of transaction.java.io.IOException
public void appendFeePayerSignatures(SignatureData signatureData)
signatureData
- SignatureData instance contains ECDSA signature datapublic void appendFeePayerSignatures(java.util.List<SignatureData> signatureData)
signatureData
- List of SignatureData contains ECDSA signature datapublic java.lang.String combineSignedRawTransactions(java.util.List<java.lang.String> rlpEncoded)
combineSignedRawTransactions
in class AbstractTransaction
rlpEncoded
- A List of RLP-encoded transaction strings.public java.lang.String getRLPEncodingForFeePayerSignature()
public boolean compareTxField(AbstractFeeDelegatedTransaction txObj, boolean checkSig)
txObj
- The AbstractFeeDelegatedTransaction Object to comparecheckSig
- Check whether signatures field is equal.public java.lang.String getFeePayer()
public void setFeePayer(java.lang.String feePayer)
feePayer
- The address of fee payer.public java.util.List<SignatureData> getFeePayerSignatures()
public void setFeePayerSignatures(java.util.List<SignatureData> feePayerSignatures)