Skip to main content

Overview

Zama confidential tokens (ERC-7984) hide transfer amounts on-chain. The zama.decrypted_transfers dataset lets Goldsky pipelines decrypt these transfers, as long as the delegate wallet key is stored in Turbo secrets and, on mainnet, a Zama relayer API key is provided.
Wallets must grant decryption rights to your delegate address on-chain, through Zama’s access control list, before the pipeline reads their transfers. Delegations are per token: a wallet must delegate on each token you want decrypted.

Delegate key

The delegate key only signs EIP-712 decryption permits. It does not send transactions on your behalf or take any other on-chain action. For automated on-chain activity, see Compose.
Goldsky strongly recommends a delegate wallet created only for Goldsky. Your secrets are stored securely; this is a preventive measure.

Goldsky Turbo vs self-hosted

Both modes use the same open-source plugin from streamling-community-plugins. On Turbo, Goldsky manages the decryption setup for you; self-hosted, you run it yourself.

Goldsky Turbo

Store the delegate key as a turbo secret:
On mainnet, the Zama-hosted relayer also needs a relayer API key. Apply to Zama for a key; Zama bills relayer usage to you directly. Store it as a turbo secret too:
The Sepolia relayer is open and needs no API key, so you can test the full flow on Sepolia first. Any Turbo pipeline can read decrypted transfers from the zama.decrypted_transfers dataset:
Goldsky stores both secrets and can read them. Treat the delegate key as readable by the platform, which is why it must be a dedicated, unfunded key. Goldsky holds no Zama credential of its own: the relayer API key is yours, and relayer usage is billed to you by Zama. A pipeline holds one delegate key and one relayer API key, so every zama.decrypted_transfers source in it must map each option to the same secret. A delegate_private_key or relayer_api_key written directly in the YAML fails the deploy.

Output columns

All input columns are kept, and three nullable string columns are added. In zama.decrypted_transfers, the input columns are:
  • Block and transaction context, as in the EVM logs schema.
  • The decoded transfer: token_address, from_address, to_address, and amount_handle (the encrypted amount).

Failure behavior

  • A permanent refusal for one handle or one delegator is written to zama_error. The batch is still emitted and is not retried. To retry these rows, reprocess them from the raw logs by deploying a new pipeline with a new name.
  • No active delegation is also a permanent answer: the row gets no active delegation from either party, and the transform re-checks that wallet only after 60 seconds. Confirm that a new delegation is visible on-chain before the pipeline reads its transfers, or reprocess the affected rows.
Test before you deploy a long-running pipeline. Run a job over a known block range that holds transfers your delegate key can decrypt, and check zama_amount and zama_error in the output:
When the output looks right, deploy the permanent pipeline without job and end_at. Use start_at: latest for new transfers only, or set start_at to the first block you want decrypted, such as the token’s deployment block, to backfill history. See Controlling the block range for start_at and end_at.

Self-hosted

Run the plugin from streamling-community-plugins and set the credentials in the environment. The plugin refuses to start if a credential is in the YAML, because Streamling logs plugin options at startup.
The self-hosted plugin also needs a running Zama SDK daemon on a Unix socket (daemon_socket), owned by the same user as Streamling. See the plugin README for daemon setup. The self-hosted transforms read logs that you decode with erc7984_decode, for example:

Transform configuration

These are the zama_decrypt transform options (self-hosted). Any option can also be set as STREAMLING__PLUGIN__ZAMA_DECRYPT__<KEY> (uppercase key). The environment value wins.