import { payRequest } from "@requestnetwork/payment-processor";
Name | Type | Required? | Description |
---|---|---|---|
request | IRequestData | true | The request object |
signerOrProvider | ethers.providers.Web3Provider | ethers.Signer = getProvider() | true | An ethers v5 Provider. See #pay-a-request for explanation how to wrap a viem WalletClient to look like an ethers v5 Provider. |
amount | ethers.BigNumberish | false | The amount to pay. Defaults to the expected amount of the request. |
overrides | Omit<ethers.providers.TransactionRequest, 'to' | 'data' | 'value'> | false | Override transaction settings like baseFee and maxPriorityFee |
paymentSettings | ConversionPaymentSettings | false | Settings for conversion payments |
Promise<ethers.ContractTransaction>
This is what ethers returns after submitting a transaction.
Name | Type | Required? | Description |
---|---|---|---|
currency | ICurrency | true | The currency in which the payment is made, not the currency in which the request is denominated. |
maxToSpend | ethers.BigNumberish | true | The maximum input currency to spend on conversion payments. Protects the user from rapidly changing exchange rates. |
currencyManager | ICurrencyManager | true | A Currency manager handles a list of currencies and provides utility to retrieve and change format |