PaymentChannelClientState(StoredClientChannel storedClientChannel, Wallet wallet) throws VerificationException { this.stateMachine = new StateMachine<>(State.UNINITIALISED, getStateTransitions()); this.wallet = checkNotNull(wallet); this.myKey = checkNotNull(storedClientChannel.myKey); this.serverKey = checkNotNull(storedClientChannel.serverKey); this.storedChannel = storedClientChannel; this.valueToMe = checkNotNull(storedClientChannel.valueToMe); }
PaymentChannelClientState(StoredClientChannel storedClientChannel, Wallet wallet) throws VerificationException { this.stateMachine = new StateMachine<State>(State.UNINITIALISED, getStateTransitions()); this.wallet = checkNotNull(wallet); this.myKey = checkNotNull(storedClientChannel.myKey); this.serverKey = checkNotNull(storedClientChannel.serverKey); this.storedChannel = storedClientChannel; this.valueToMe = checkNotNull(storedClientChannel.valueToMe); }
PaymentChannelClientState(StoredClientChannel storedClientChannel, Wallet wallet) throws VerificationException { this.stateMachine = new StateMachine<>(State.UNINITIALISED, getStateTransitions()); this.wallet = checkNotNull(wallet); this.myKey = checkNotNull(storedClientChannel.myKey); this.serverKey = checkNotNull(storedClientChannel.serverKey); this.storedChannel = storedClientChannel; this.valueToMe = checkNotNull(storedClientChannel.valueToMe); }
PaymentChannelClientState(StoredClientChannel storedClientChannel, Wallet wallet) throws VerificationException { this.stateMachine = new StateMachine<State>(State.UNINITIALISED, getStateTransitions()); this.wallet = checkNotNull(wallet); this.myKey = checkNotNull(storedClientChannel.myKey); this.serverKey = checkNotNull(storedClientChannel.serverKey); this.storedChannel = storedClientChannel; this.valueToMe = checkNotNull(storedClientChannel.valueToMe); }
/** * Creates a state object for a payment channel client. It is expected that you be ready to * {@link PaymentChannelV1ClientState#initiate()} after construction (to avoid creating objects for channels which are * not going to finish opening) and thus some parameters provided here are only used in * {@link PaymentChannelV1ClientState#initiate()} to create the Multisig contract and refund transaction. * * @param wallet a wallet that contains at least the specified amount of value. * @param myKey a freshly generated private key for this channel. * @param serverKey a public key retrieved from the server used for the initial multisig contract * @param value how many satoshis to put into this contract. If the channel reaches this limit, it must be closed. * @param expiryTimeInSeconds At what point (UNIX timestamp +/- a few hours) the channel will expire * * @throws VerificationException If either myKey's pubkey or serverKey's pubkey are non-canonical (ie invalid) */ public PaymentChannelClientState(Wallet wallet, ECKey myKey, ECKey serverKey, Coin value, long expiryTimeInSeconds) throws VerificationException { this.stateMachine = new StateMachine<State>(State.UNINITIALISED, getStateTransitions()); this.wallet = checkNotNull(wallet); this.serverKey = checkNotNull(serverKey); this.myKey = checkNotNull(myKey); this.valueToMe = checkNotNull(value); }
/** * Creates a state object for a payment channel client. It is expected that you be ready to * {@link PaymentChannelClientState#initiate(KeyParameter, org.bitcoinj.protocols.channels.IPaymentChannelClient.ClientChannelProperties)} after construction (to avoid creating objects for channels which are * not going to finish opening) and thus some parameters provided here are only used in * {@link PaymentChannelClientState#initiate(KeyParameter, org.bitcoinj.protocols.channels.IPaymentChannelClient.ClientChannelProperties)} to create the Multisig contract and refund transaction. * * @param wallet a wallet that contains at least the specified amount of value. * @param myKey a freshly generated private key for this channel. * @param serverKey a public key retrieved from the server used for the initial multisig contract * @param value how many satoshis to put into this contract. If the channel reaches this limit, it must be closed. * @param expiryTimeInSeconds At what point (UNIX timestamp +/- a few hours) the channel will expire * * @throws VerificationException If either myKey's pubkey or serverKey's pubkey are non-canonical (ie invalid) */ public PaymentChannelClientState(Wallet wallet, ECKey myKey, ECKey serverKey, Coin value, long expiryTimeInSeconds) throws VerificationException { this.stateMachine = new StateMachine<>(State.UNINITIALISED, getStateTransitions()); this.wallet = checkNotNull(wallet); this.serverKey = checkNotNull(serverKey); this.myKey = checkNotNull(myKey); this.valueToMe = checkNotNull(value); }
/** * Creates a state object for a payment channel client. It is expected that you be ready to * {@link PaymentChannelV1ClientState#initiate()} after construction (to avoid creating objects for channels which are * not going to finish opening) and thus some parameters provided here are only used in * {@link PaymentChannelV1ClientState#initiate()} to create the Multisig contract and refund transaction. * * @param wallet a wallet that contains at least the specified amount of value. * @param myKey a freshly generated private key for this channel. * @param serverKey a public key retrieved from the server used for the initial multisig contract * @param value how many satoshis to put into this contract. If the channel reaches this limit, it must be closed. * @param expiryTimeInSeconds At what point (UNIX timestamp +/- a few hours) the channel will expire * * @throws VerificationException If either myKey's pubkey or serverKey's pubkey are non-canonical (ie invalid) */ public PaymentChannelClientState(Wallet wallet, ECKey myKey, ECKey serverKey, Coin value, long expiryTimeInSeconds) throws VerificationException { this.stateMachine = new StateMachine<State>(State.UNINITIALISED, getStateTransitions()); this.wallet = checkNotNull(wallet); this.serverKey = checkNotNull(serverKey); this.myKey = checkNotNull(myKey); this.valueToMe = checkNotNull(value); }
/** * Creates a state object for a payment channel client. It is expected that you be ready to * {@link PaymentChannelClientState#initiate(KeyParameter, ClientChannelProperties)} after construction (to avoid creating objects for channels which are * not going to finish opening) and thus some parameters provided here are only used in * {@link PaymentChannelClientState#initiate(KeyParameter, ClientChannelProperties)} to create the Multisig contract and refund transaction. * * @param wallet a wallet that contains at least the specified amount of value. * @param myKey a freshly generated private key for this channel. * @param serverKey a public key retrieved from the server used for the initial multisig contract * @param value how many satoshis to put into this contract. If the channel reaches this limit, it must be closed. * @param expiryTimeInSeconds At what point (UNIX timestamp +/- a few hours) the channel will expire * * @throws VerificationException If either myKey's pubkey or serverKey's pubkey are non-canonical (ie invalid) */ public PaymentChannelClientState(Wallet wallet, ECKey myKey, ECKey serverKey, Coin value, long expiryTimeInSeconds) throws VerificationException { this.stateMachine = new StateMachine<>(State.UNINITIALISED, getStateTransitions()); this.wallet = checkNotNull(wallet); this.serverKey = checkNotNull(serverKey); this.myKey = checkNotNull(myKey); this.valueToMe = checkNotNull(value); }