Skip to content

rotateCircuit()

SIP Protocol API Reference v0.7.4


SIP Protocol API Reference / 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 9051
HashedControlPassword <your-hashed-password>

number

Tor control port (default: 9051)

string

Control port password

Promise<boolean>

True if circuit rotation succeeded

// Enable in torrc and set password
const success = await rotateCircuit(9051, 'my-tor-password')
if (success) {
console.log('New Tor circuit established')
}