To create a request we need to declare the identities of the parties involved.
Identities are the unique identifier of a request user. They are generally different from payment addresses but can be the same. They identify an entity like a person or business.
// Here we declare the payee identity, with the payee identity ethereum address
The Ethereum private key signature provider allows a user to pass in their private Ethereum key to sign a request. The signer is either the payee or the payer.
The signature is proof of who created the request and of its integrity (that no data changed after it was signed).
This process is similar to the signature of an Ethereum transaction.
// The signature info requires the request creator private key.
// For this demo purposes, we hard-coded the private key. Please be careful with how you store and handle your private key since it's a very sensitive piece of data.
To create a request using Bitcoin payment network, we need to provide the payment network parameters to the request creation parameters.
For the Bitcoin payment network, it's simply the payment address (and eventually the refund address).
// If you want to create a request with testnet bitcoin you must use the payment network: