The Arcane Privacy SDK lets your application deposit funds, send private transfers, and withdraw funds on Privacy Layer. It is available for JavaScript and TypeScript and runs in a browser or on a Node.js server. Start with one of the two Stellar testnet examples. Both use the same SDK operations; they differ in where transactions are signed and how account state is stored.

Install the SDK

The SDK is published on npm:
When working with an example repository, install its dependencies instead of adding packages individually. Its package files specify the SDK and adapters used by that example.

Configure your application

Transactions require a registered application and its matching audit public key. Application registration identifies your integration. The examples already include test application settings in their .env.example files: Use the complete configuration from the example you choose, including its audit public key, contracts, network, KYT service, and Relayer URL. The SDK takes the decimal application ID shown above, not a Compliance Platform UUID. You do not need to register a new application to follow these examples. To register your own application and obtain its configuration, contact the Arcane team. Use the demo applications only for testing.

Choose your integration

Frontend integration

Build a private payment interface. Connect a wallet, deposit funds, transfer, and withdraw in the browser.

Backend integration

Run private payments from your server. Set up accounts, sign transactions, and preserve account state.
Both guides follow the example’s code and link to its implementation. Start with a small testnet deposit before moving on to transfers and withdrawals.

Understand SDK state

The SDK keeps private records, private-address data, and transaction state. It needs those records to calculate balances and prepare later payments. A state adapter connects this data to your application. The frontend example uses a Redux adapter to keep the interface in sync. The backend example uses an in-memory adapter with account snapshots saved by the application. Neither adapter alone provides durable storage. The integration guides cover the state setup for their runtime. Keep account data available across reloads or restarts, and isolate it by account and network.