Contents

checkPeerPullCredit#

Check fees for an outgoing peer pull payment, i.e. a payment request that this wallet creates for another wallet to pay.

Request:

The request body must be a CheckPeerPullCreditRequest object. Either exchangeBaseUrl or restrictScope must be specified.

Response:

On success, the result is a CheckPeerPullCreditResponse object.

Side effects:

May refresh the exchange’s key material over the network and writes denomination verification results.

Expected errors:

The caller can handle the following errors inline: WALLET_NO_SUITABLE_EXCHANGE, WALLET_CORE_API_BAD_REQUEST.

interface CheckPeerPullCreditRequest {
  // Require using this particular exchange for this operation.
  exchangeBaseUrl?: string;

  restrictScope?: ScopeInfo;

  amount: AmountString;

  progressToken?: string;
}
interface CheckPeerPullCreditResponse {
  exchangeBaseUrl: string;
  amountRaw: AmountString;
  amountEffective: AmountString;

  // Wallet-selected default expiration for the request.
  defaultExpiration: TalerProtocolDuration;

  // Number of coins that will be used; can be used by the UI to
  // warn if excessively large.
  numCoins: number;
}