Documentation / @imvu/xmlrpc / ProofOfWorkHandler
Type Alias: ProofOfWorkHandler
ts
type ProofOfWorkHandler = (session, fetch) => Promise<void>;Defined in: packages/xmlrpc/src/XmlRpcGateway.ts:41
Called when the server returns fault 110 (ProofOfWorkRequired). The handler should obtain and solve a challenge (typically by POSTing to the REST API's /pow/ collection) so the gateway can retry the original call.
Parameters
| Parameter | Type | Description |
|---|---|---|
session | XmlRpcSession | The current session (user ID, security key, CSID). |
fetch | typeof globalThis.fetch | The fetch implementation the gateway was constructed with. |
Returns
Promise<void>