Package foundation.omni.json.pojo
Class OmniTransactionInfo
java.lang.Object
foundation.omni.json.pojo.OmniTransactionInfo
(Mostly) Immutable representation of OmniTransaction info JSON
It is not fully-immutable because of addOtherInfo(String, Object)
which should only be used by Jackson
when deserializing. In the future we might use subclasses and polymorphism to define the properties for each type
of Omni transaction.
This is returned by OmniClient.omniGetTransaction(Sha256Hash)
,
OmniClient.omniListTransactions()
, and OmniClient.omniListTransactions()
.
-
Constructor Summary
ConstructorsConstructorDescriptionOmniTransactionInfo
(org.bitcoinj.base.Sha256Hash txId, org.bitcoinj.base.Address sendingAddress, org.bitcoinj.base.Address referenceAddress, boolean isMine, int confirmations, String fee, long blockTime, boolean valid, int positionInBlock, int version, int typeInt, String type, OmniValue amount, OmniValue totalAmount, boolean divisible, CurrencyID propertyId, org.bitcoinj.base.Sha256Hash blockHash, int block, CurrencyID propertyIdForSale, CurrencyID propertyIdDesired) -
Method Summary
Modifier and TypeMethodDescriptionvoid
addOtherInfo
(String propertyKey, Object value) int
getBlock()
org.bitcoinj.base.Sha256Hash
int
org.bitcoinj.base.Coin
getFee()
int
org.bitcoinj.base.Address
org.bitcoinj.base.Address
org.bitcoinj.base.Sha256Hash
getTxId()
getType()
int
int
boolean
boolean
isMine()
boolean
isValid()
Get the transaction type as anOptional
Transactions.TransactionType
or as anOptional.empty()
if it's a transaction type not (yet) included inTransactions.TransactionType
.
-
Constructor Details
-
OmniTransactionInfo
public OmniTransactionInfo(org.bitcoinj.base.Sha256Hash txId, org.bitcoinj.base.Address sendingAddress, org.bitcoinj.base.Address referenceAddress, boolean isMine, int confirmations, String fee, long blockTime, boolean valid, int positionInBlock, int version, int typeInt, String type, OmniValue amount, OmniValue totalAmount, boolean divisible, CurrencyID propertyId, org.bitcoinj.base.Sha256Hash blockHash, int block, CurrencyID propertyIdForSale, CurrencyID propertyIdDesired)
-
-
Method Details
-
addOtherInfo
-
getOtherInfo
-
getTxId
public org.bitcoinj.base.Sha256Hash getTxId() -
getSendingAddress
public org.bitcoinj.base.Address getSendingAddress() -
getReferenceAddress
public org.bitcoinj.base.Address getReferenceAddress() -
isMine
public boolean isMine() -
getConfirmations
public int getConfirmations() -
getFee
public org.bitcoinj.base.Coin getFee() -
getBlockTime
-
isValid
public boolean isValid() -
getPositionInBlock
public int getPositionInBlock() -
getVersion
public int getVersion() -
getTypeInt
public int getTypeInt() -
getType
-
transactionType
Get the transaction type as anOptional
Transactions.TransactionType
or as anOptional.empty()
if it's a transaction type not (yet) included inTransactions.TransactionType
.- Returns:
- The type or
Optional.empty()
if it's an unknown type
-
getAmount
-
getTotalAmount
-
isDivisible
public boolean isDivisible() -
getPropertyId
-
getBlockHash
public org.bitcoinj.base.Sha256Hash getBlockHash() -
getBlock
public int getBlock() -
getPropertyIdForSale
-
getPropertyIdDesired
-