Package nxt.peer
Class BundlerRate
java.lang.Object
nxt.peer.BundlerRate
-
Constructor Summary
ConstructorsConstructorDescriptionBundlerRate(ByteBuffer buffer) Create a signed bundler rateBundlerRate(ChildChain chain, long rate, long feeLimit, byte[] privateKey) Create a signed bundler rateBundlerRate(ChildChain chain, long accountId, long rate, long feeLimit) Create an unsigned bundler rate -
Method Summary
Modifier and TypeMethodDescriptionbooleanCheck if two bundler rates are equallongGet the account identifierlongGet the account balancevoidgetBytes(ByteBuffer buffer) Get our bytesgetChain()Get the child chainlongGet the fee limitintGet the encoded lengthbyte[]Get the account public keylonggetRate()Get the bundler ratebyte[]Get the signatureintGet the timestampbyte[]Get the unsigned bytesinthashCode()Get the hash codevoidsetBalance(long balance) Set the account balance
-
Constructor Details
-
BundlerRate
Create an unsigned bundler rate- Parameters:
chain- Child chainaccountId- Account identifierrate- Bundler ratefeeLimit- Current fee limit
-
BundlerRate
Create a signed bundler rate- Parameters:
chain- Child chainrate- Bundler ratefeeLimit- Current fee limitprivateKey- Private key
-
BundlerRate
Create a signed bundler rate- Parameters:
buffer- Encoded data- Throws:
BufferUnderflowException- Encoded data is too short
-
-
Method Details
-
getLength
public int getLength()Get the encoded length- Returns:
- Encoded length
-
getBytes
Get our bytes- Parameters:
buffer- Byte buffer- Throws:
BufferOverflowException- Allocated buffer is too small
-
getUnsignedBytes
public byte[] getUnsignedBytes()Get the unsigned bytes- Returns:
- Rate bytes
-
getChain
Get the child chain- Returns:
- Child chain
-
getAccountId
public long getAccountId()Get the account identifier- Returns:
- Account identifier
-
getPublicKey
public byte[] getPublicKey()Get the account public key- Returns:
- Account public key
-
getRate
public long getRate()Get the bundler rate- Returns:
- Rate
-
getFeeLimit
public long getFeeLimit()Get the fee limit- Returns:
- Fee limit
-
getTimestamp
public int getTimestamp()Get the timestamp- Returns:
- Timestamp
-
getSignature
public byte[] getSignature()Get the signature- Returns:
- Signature
-
getBalance
public long getBalance()Get the account balance- Returns:
- Account balance
-
setBalance
public void setBalance(long balance) Set the account balance- Parameters:
balance- Account balance
-
hashCode
public int hashCode()Get the hash code -
equals
Check if two bundler rates are equal
-