createHaggles(options: CreateHagglesOptions)
Returns { fetch, balance, wrap }:
haggles.fetch(input, init)— Performs the HTTP request; on402 Payment Requiredwith a valid Haggles challenge, verifies URL/method match andmaxPricePerCall, callsPOST /v1/payments, and retries once withHaggles-Payment: <token>.haggles.balance()— QueriesGET /v1/walletfor currentavailable,held, and remaining policy allowances.readReceipt(response)— Extracts and decodes the signedHaggles-Receiptheader.