Package foundation.omni.json.pojo
Class OmniPropertyInfo
java.lang.Object
foundation.omni.json.pojo.SmartPropertyListInfo
foundation.omni.json.pojo.OmniPropertyInfo
JSON bean representing the set of information on an Omni Property as returned by the
 
omni_getproperty RPC method. It is a subclass of SmartPropertyListInfo
 because it is a superset of that information.- 
Constructor SummaryConstructorsConstructorDescriptionOmniPropertyInfo(CurrencyID propertyid, String name, String category, String subCategory, String data, String url, Boolean divisible, org.bitcoinj.base.Address issuer, org.bitcoinj.base.Sha256Hash creationTxId, boolean fixedIssuance, boolean managedIssuance, boolean freezingEnabled, OmniValue totalTokens) OmniPropertyInfo(CurrencyID propertyid, String name, String category, String subCategory, String data, String url, Boolean divisible, org.bitcoinj.base.Address issuer, org.bitcoinj.base.Sha256Hash creationTxId, boolean fixedIssuance, boolean managedIssuance, boolean freezingEnabled, String totaltokensString) OmniPropertyInfo(SmartPropertyListInfo sptListInfo) Deprecated.OmniPropertyInfo(org.bitcoinj.base.BitcoinNetwork bitcoinNetwork, SmartPropertyListInfo sptListInfo) Construct OmniPropertyInfo from SmartPropertyListInfo Since there is no way to fetch OmniPropertyInfo for all properties with a single request, this converter can be used to create a OmniPropertyInfo from a SmartPropertyListInfo with default values for the extra fields.
- 
Method SummaryModifier and TypeMethodDescriptionstatic OmniPropertyInfobitcoinPropertyInfo(org.bitcoinj.base.BitcoinNetwork network, org.bitcoinj.base.Coin bitcoinSupply) ReturnOmniPropertyInfofor Bitcoin.org.bitcoinj.base.Sha256Hashorg.bitcoinj.base.Addressbooleanbooleanbooleanstatic OmniPropertyInfomockBitcoinPropertyInfo(org.bitcoinj.base.BitcoinNetwork network) Return a mockOmniPropertyInfofor Bitcoin.Methods inherited from class foundation.omni.json.pojo.SmartPropertyListInfogetCategory, getData, getDivisible, getName, getPropertyid, getSubcategory, getUrl
- 
Constructor Details- 
OmniPropertyInfopublic OmniPropertyInfo(CurrencyID propertyid, String name, String category, String subCategory, String data, String url, Boolean divisible, org.bitcoinj.base.Address issuer, org.bitcoinj.base.Sha256Hash creationTxId, boolean fixedIssuance, boolean managedIssuance, boolean freezingEnabled, String totaltokensString) 
- 
OmniPropertyInfopublic OmniPropertyInfo(CurrencyID propertyid, String name, String category, String subCategory, String data, String url, Boolean divisible, org.bitcoinj.base.Address issuer, org.bitcoinj.base.Sha256Hash creationTxId, boolean fixedIssuance, boolean managedIssuance, boolean freezingEnabled, OmniValue totalTokens) 
- 
OmniPropertyInfopublic OmniPropertyInfo(org.bitcoinj.base.BitcoinNetwork bitcoinNetwork, SmartPropertyListInfo sptListInfo) Construct OmniPropertyInfo from SmartPropertyListInfo Since there is no way to fetch OmniPropertyInfo for all properties with a single request, this converter can be used to create a OmniPropertyInfo from a SmartPropertyListInfo with default values for the extra fields. TODO: Address the fact that (in this case) we really don't have all the info and the default values we are using are potentially incorrect TODO: Figure out a way of efficiently getting OmniPropertyInfo for all properties.- Parameters:
- sptListInfo- record to adapt
 
- 
OmniPropertyInfoDeprecated.Produces OmniPropertyInfo with a MainNet default issuer Address. This can result in invalid Address exceptions when used on TestNet or RegTest. This constructor will be removed in the next release.- Parameters:
- sptListInfo- record to adapt
 
 
- 
- 
Method Details- 
getIssuerpublic org.bitcoinj.base.Address getIssuer()
- 
getCreationtxidpublic org.bitcoinj.base.Sha256Hash getCreationtxid()
- 
isFixedissuancepublic boolean isFixedissuance()
- 
isManagedissuancepublic boolean isManagedissuance()
- 
isFreezingenabledpublic boolean isFreezingenabled()
- 
getTotaltokens
- 
mockBitcoinPropertyInfoReturn a mockOmniPropertyInfofor Bitcoin. Many of the fields are "n/a" and we give the final, total number of tokens, not the current, dynamic value. This is useful in cases where we need Bitcoin in the list of tokens, but don't have access to current Bitcoin data. OmniProxy is able to provide accurate, dynamic information so does not use this mock value.- Returns:
- static (mock) info for Bitcoin
 
- 
bitcoinPropertyInfopublic static OmniPropertyInfo bitcoinPropertyInfo(org.bitcoinj.base.BitcoinNetwork network, org.bitcoinj.base.Coin bitcoinSupply) ReturnOmniPropertyInfofor Bitcoin. Many of the fields are "n/a" but we give current, dynamic count of bitcoins. This method is used by OmniProxy with the current count of coins fromTxOutSetInfo.- Returns:
- info for Bitcoin with current number of coins
 
 
- 
OmniPropertyInfo(BitcoinNetwork, SmartPropertyListInfo)