Skip to content

Withdrawals

Full Withdrawal

typescript
const result = await offshore.withdraw({
  note: 'offshore-eth-1.0-0x...',
  recipient: '0xNewAddress...',
  relayerUrl: 'https://app.offshore.ltd/relayer',
});

Partial Withdrawal

typescript
const result = await offshore.withdraw({
  note: 'offshore-eth-1.0-0x...',
  recipient: '0xNewAddress...',
  amount: '0.3', // withdraw only 0.3 ETH
  relayerUrl: 'https://app.offshore.ltd/relayer',
});

// Save the new note for the remaining 0.7 ETH
console.log('Change note:', result.changeNote);

Open source privacy technology