Skip to content

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 ​

ParameterTypeDescription
sessionXmlRpcSessionThe current session (user ID, security key, CSID).
fetchtypeof globalThis.fetchThe fetch implementation the gateway was constructed with.

Returns ​

Promise<void>

Released under the MIT License.