rlpx / org.apache.tuweni.rlpx / RLPxConnectionFactory / createConnection

createConnection

static fun createConnection(initiator: Boolean, initiatorMessage: Bytes, responderMessage: Bytes, ourEphemeralPrivateKey: SecretKey, peerEphemeralPublicKey: PublicKey, initiatorNonce: Bytes32, responderNonce: Bytes32, ourPublicKey: PublicKey, peerPublicKey: PublicKey): RLPxConnection (source)

Creates a RLPxConnection based off the complete handshake exchange.

Parameters

initiator - whether we initiated the handshake

initiatorMessage - the bytes of the initiation message

responderMessage - the bytes of the response message

ourEphemeralPrivateKey - our ephemeral private key

peerEphemeralPublicKey - the peer ephemeral public key

initiatorNonce - the initiation random nonce

responderNonce - the responder random nonce

ourPublicKey - our public key

peerPublicKey - the public key of the peer

Return
a valid RPLx connection to communicate between peers