public class PlainTransactionBuilder extends java.lang.Object implements PlainTransaction.WithNothing, PlainTransaction.WithChainIdHash, PlainTransaction.WithChainIdHashAndSender, PlainTransaction.WithChainIdHashAndSenderAndRecipient, PlainTransaction.WithChainIdHashAndSenderAndRecipientAndAmount, PlainTransaction.WithReady
Constructor and Description |
---|
PlainTransactionBuilder() |
Modifier and Type | Method and Description |
---|---|
PlainTransaction.WithChainIdHashAndSenderAndRecipientAndAmount |
amount(Aer amount)
Accept
amount in Aer . |
PlainTransaction.WithChainIdHashAndSenderAndRecipientAndAmount |
amount(java.lang.String amount,
Aer.Unit unit)
Accept
amount . |
RawTransaction |
build()
Build raw transaction with provided values.
|
PlainTransaction.WithChainIdHash |
chainIdHash(ChainIdHash chainIdHash)
Accept
chainIdHash to be used in transaction. |
protected AccountAddress |
deriveAddress(Identity identity) |
protected AccountAddress |
deriveAddress(java.lang.String encodedAddressOrName) |
PlainTransaction.WithReady |
fee(Fee fee)
Accept
fee to be used in transaction. |
PlainTransaction.WithChainIdHashAndSender |
from(Identity sender)
Accept transaction sender.
|
PlainTransaction.WithChainIdHashAndSender |
from(java.lang.String sender)
Accept transaction sender as an account address or an name.
|
PlainTransaction.WithReady |
nonce(long nonce)
Accept
nonce to be used in transaction. |
PlainTransaction.WithReady |
payload(BytesValue payload)
Accept
payload . |
PlainTransaction.WithChainIdHashAndSenderAndRecipient |
to(Identity recipient)
Accept transaction recipient.
|
PlainTransaction.WithChainIdHashAndSenderAndRecipient |
to(java.lang.String recipient)
Accept transaction recipient as an account address or an name.
|
PlainTransaction.WithReady |
type(Transaction.TxType txType)
Accept transaction type.
|
public PlainTransaction.WithChainIdHash chainIdHash(ChainIdHash chainIdHash)
NeedChainIdHash
chainIdHash
to be used in transaction.chainIdHash
in interface NeedChainIdHash<PlainTransaction.WithChainIdHash>
chainIdHash
- a chain id hashpublic PlainTransaction.WithChainIdHashAndSender from(Identity sender)
NeedSender
from
in interface NeedSender<PlainTransaction.WithChainIdHashAndSender>
sender
- a senderpublic PlainTransaction.WithChainIdHashAndSender from(java.lang.String sender)
NeedSender
from
in interface NeedSender<PlainTransaction.WithChainIdHashAndSender>
sender
- a senderpublic PlainTransaction.WithChainIdHashAndSenderAndRecipient to(java.lang.String recipient)
NeedRecipient
to
in interface NeedRecipient<PlainTransaction.WithChainIdHashAndSenderAndRecipient>
recipient
- a recipientpublic PlainTransaction.WithChainIdHashAndSenderAndRecipient to(Identity recipient)
NeedRecipient
to
in interface NeedRecipient<PlainTransaction.WithChainIdHashAndSenderAndRecipient>
recipient
- a recipientpublic PlainTransaction.WithChainIdHashAndSenderAndRecipientAndAmount amount(java.lang.String amount, Aer.Unit unit)
NeedAmount
amount
.amount
in interface NeedAmount<PlainTransaction.WithChainIdHashAndSenderAndRecipientAndAmount>
amount
- an amountunit
- an amount unitpublic PlainTransaction.WithChainIdHashAndSenderAndRecipientAndAmount amount(Aer amount)
NeedAmount
amount
in Aer
.amount
in interface NeedAmount<PlainTransaction.WithChainIdHashAndSenderAndRecipientAndAmount>
amount
- an amount in aerpublic PlainTransaction.WithReady nonce(long nonce)
NeedNonce
nonce
to be used in transaction.nonce
in interface NeedNonce<PlainTransaction.WithReady>
nonce
- a noncepublic PlainTransaction.WithReady fee(Fee fee)
NeedFee
fee
to be used in transaction.fee
in interface NeedFee<PlainTransaction.WithReady>
fee
- a feepublic PlainTransaction.WithReady payload(BytesValue payload)
NeedPayload
payload
.payload
in interface NeedPayload<PlainTransaction.WithReady>
payload
- a payloadpublic PlainTransaction.WithReady type(Transaction.TxType txType)
NeedTxType
type
in interface NeedTxType<PlainTransaction.WithReady>
txType
- a transaction typepublic RawTransaction build()
BuildReady
build
in interface BuildReady
protected AccountAddress deriveAddress(Identity identity)
protected AccountAddress deriveAddress(java.lang.String encodedAddressOrName)