public class PaymentChannelV2ServerState extends PaymentChannelServerState
PaymentChannelServerState.State| Modifier and Type | Field and Description |
|---|---|
protected ECKey |
clientKey |
bestValueSignature, bestValueToMe, broadcaster, contract, minExpireTime, serverKey, stateMachine, storedServerChannel| Constructor and Description |
|---|
PaymentChannelV2ServerState(TransactionBroadcaster broadcaster,
Wallet wallet,
ECKey serverKey,
long minExpireTime) |
| Modifier and Type | Method and Description |
|---|---|
com.google.common.util.concurrent.ListenableFuture<Transaction> |
close()
Closes this channel and broadcasts the highest value payment transaction on the network.
|
protected Script |
createOutputScript()
Creates a P2SH script outputting to the client and server pubkeys
|
protected ECKey |
getClientKey() |
TransactionOutput |
getClientOutput() |
Coin |
getFeePaid()
Gets the fee paid in the final payment transaction (only available if settle() did not throw an exception)
|
int |
getMajorVersion() |
protected Script |
getSignedScript()
Gets the script that signatures should sign against.
|
com.google.common.collect.Multimap<PaymentChannelServerState.State,PaymentChannelServerState.State> |
getStateTransitions() |
void |
provideClientKey(byte[] clientKey) |
protected void |
verifyContract(Transaction contract)
Verifies that the given contract meets a set of extra requirements
|
getBestValueToMe, getContract, getContractScript, getExpiryTime, getState, getTotalValue, incrementPayment, makeUnsignedChannelContract, provideContract, storeChannelInWallet, updateChannelInWalletprotected ECKey clientKey
public PaymentChannelV2ServerState(TransactionBroadcaster broadcaster, Wallet wallet, ECKey serverKey, long minExpireTime)
public com.google.common.collect.Multimap<PaymentChannelServerState.State,PaymentChannelServerState.State> getStateTransitions()
getStateTransitions in class PaymentChannelServerStatepublic int getMajorVersion()
getMajorVersion in class PaymentChannelServerStatepublic TransactionOutput getClientOutput()
getClientOutput in class PaymentChannelServerStatepublic void provideClientKey(byte[] clientKey)
public Coin getFeePaid()
PaymentChannelServerStategetFeePaid in class PaymentChannelServerStateprotected Script getSignedScript()
PaymentChannelServerStategetSignedScript in class PaymentChannelServerStateprotected void verifyContract(Transaction contract)
PaymentChannelServerStateverifyContract in class PaymentChannelServerStateprotected Script createOutputScript()
createOutputScript in class PaymentChannelServerStateprotected ECKey getClientKey()
getClientKey in class PaymentChannelServerStatepublic com.google.common.util.concurrent.ListenableFuture<Transaction> close() throws InsufficientMoneyException
PaymentChannelServerStateCloses this channel and broadcasts the highest value payment transaction on the network.
close in class PaymentChannelServerStateInsufficientMoneyException - If the payment tx would have cost more in fees to spend than it is worth.Copyright © 2018. All rights reserved.