Skip to content
Launch App >

Endpoint for obtaining OFAC compliance signatures.

Get a cryptographic signature proving OFAC compliance for your wallet.

POST /get_ofac_signature/{network}/{id}

Path Parameters:

ParameterDescription
networkNetwork: “mainnet” or “devnet”
idAuth token

Success (compliant):

"SignatureData..."

Failure (not compliant):

403 Forbidden
"OFAC check failed"
async function getOfacSignature(
authToken: string,
network: string = 'mainnet'
): Promise<string> {
const response = await fetch(
`https://worker.turbine.cash/get_ofac_signature/${network}/${authToken}`,
{ method: 'POST' }
);
if (!response.ok) {
if (response.status === 403) {
throw new Error('OFAC compliance check failed');
}
throw new Error(`OFAC check error: ${response.status}`);
}
return response.json();
}

The OFAC signature should be obtained before each withdrawal. It’s typically used in the on-chain instruction to prove compliance.

async function withdrawWithOfac(
deposit: DepositSecrets,
recipient: string,
authToken: string
) {
// 1. Check OFAC compliance
try {
const ofacSig = await getOfacSignature(authToken);
} catch (e) {
throw new Error('Your address failed OFAC compliance check');
}
// 2. Proceed with withdrawal
const result = await relay({
// ... withdrawal params
});
return result;
}

The compliance check verifies the authenticated wallet against:

  • OFAC SDN (Specially Designated Nationals) list
  • Known sanctioned addresses
  • Addresses linked to illicit activity

[PLACEHOLDER: OFAC_SIGNATURE_EXPLANATION]

StatusErrorCause
401UnauthorizedInvalid or expired auth token
403OFAC check failedAddress is on sanctions list
500Compliance check errorService unavailable

OFAC signatures should NOT be cached long-term:

  • Sanctions lists update frequently
  • Fresh signatures ensure current compliance
  • Get a new signature before each withdrawal