Documentation / @imvu/xmlrpc / solveRsw
Function: solveRsw()
ts
function solveRsw(nonce): string;Defined in: packages/xmlrpc/src/rsw.ts:72
Solve an RSW time-lock puzzle and return the solution as a decimal string.
The algorithm computes b = A^(2^T) mod N by performing T sequential squarings (b = b × b mod N repeated T times), then returns Cipher − b. The sequential squarings cannot be parallelised — that is the point of the time-lock.
This blocks for the whole solve; prefer solveRswAsync for large T.
Parameters
| Parameter | Type | Description |
|---|---|---|
nonce | string | The wire-format nonce: rsw,T,N,A,Cipher. |
Returns
string