Package ch.bitagent.bitcoin.lib.wallet
Class Address
- java.lang.Object
-
- ch.bitagent.bitcoin.lib.wallet.Address
-
public class Address extends Object
Address
-
-
Method Summary
All Methods Static Methods Instance Methods Concrete Methods Modifier and Type Method Description StringelectrumScripthash()https://electrumx-spesmilo.readthedocs.io/en/latest/protocol-basics.html#script-hashesintgetAddressIndex()StringgetAddressString()longgetBalance()intgetChange()intgetHistoryCount()byte[]hash160()booleanisBech32Address()Is it a bech32 address?booleanisInvoiceAddress()Is it an invoice address?booleanisP2pkhAddress()Is it a pay-to-pubkey-hash address?booleanisP2shAddress()Is it a pay-to-script-hash address?static Addressparse(String address)voidsetAddressIndex(int addressIndex)voidsetBalance(long balance)voidsetChange(int change)voidsetHistoryCount(int historyCount)StringtoString()
-
-
-
Field Detail
-
P2PKH
public static final String P2PKH
- See Also:
- Constant Field Values
-
P2SH
public static final String P2SH
- See Also:
- Constant Field Values
-
BECH32
public static final String BECH32
- See Also:
- Constant Field Values
-
-
Constructor Detail
-
Address
public Address(String address)
-
-
Method Detail
-
isInvoiceAddress
public boolean isInvoiceAddress()
Is it an invoice address?
Invoice address- Returns:
- .
-
isP2pkhAddress
public boolean isP2pkhAddress()
Is it a pay-to-pubkey-hash address?
Pay-to-PubkeyHash- Returns:
- .
-
isP2shAddress
public boolean isP2shAddress()
Is it a pay-to-script-hash address?
Pay to script hash- Returns:
- .
-
isBech32Address
public boolean isBech32Address()
Is it a bech32 address?
Bech32- Returns:
- .
-
hash160
public byte[] hash160()
-
electrumScripthash
public String electrumScripthash()
https://electrumx-spesmilo.readthedocs.io/en/latest/protocol-basics.html#script-hashes
-
getAddressString
public String getAddressString()
-
getChange
public int getChange()
-
setChange
public void setChange(int change)
-
getAddressIndex
public int getAddressIndex()
-
setAddressIndex
public void setAddressIndex(int addressIndex)
-
getHistoryCount
public int getHistoryCount()
-
setHistoryCount
public void setHistoryCount(int historyCount)
-
getBalance
public long getBalance()
-
setBalance
public void setBalance(long balance)
-
-