rotateCircuit()
SIP Protocol API Reference v0.7.4
SIP Protocol API Reference / rotateCircuit
Function: rotateCircuit()
Section titled “Function: rotateCircuit()”rotateCircuit(
controlPort?,password?):Promise<boolean>
Defined in: @sip-protocol/sdk/dist/index-DXh2IGkz.d.ts:16987
Request a new Tor circuit (NEWNYM)
Requires Tor control port to be enabled with authentication. Configure in torrc:
ControlPort 9051HashedControlPassword <your-hashed-password>Parameters
Section titled “Parameters”controlPort?
Section titled “controlPort?”number
Tor control port (default: 9051)
password?
Section titled “password?”string
Control port password
Returns
Section titled “Returns”Promise<boolean>
True if circuit rotation succeeded
Example
Section titled “Example”// Enable in torrc and set passwordconst success = await rotateCircuit(9051, 'my-tor-password')if (success) { console.log('New Tor circuit established')}