Skip to main content
Spark-specific activities expose their request data through activity.params. See the activity parameter reference for the complete field inventory and Spark support for how each activity fits into a Spark flow. The examples below use .all() when an activity contains multiple leaves, signatures, or operator recipients. Checking only one list index can leave other items in the same request unconstrained.

Transfer preparation

Allow a delegated user to prepare transfers only to approved receivers

This pattern restricts transfer preparation to known Spark Service Provider (SSP) receiver public keys. It does not distinguish a leaf swap from another transfer to an allowlisted receiver.

Allow transfer preparation only for known signing leaves

Use a non-empty check with .all() so that every leaf in the transfer is constrained. The leaf ID allowlist limits the leaves that may move, while the derivation checks require both the old and new leaf keys to use the signing_leaf variant.

FROST signing

Allow signing-leaf FROST signatures with adaptor keys

This policy requires every signature in the batch to use a signing-leaf derivation and include an adaptor public key. An omitted adaptor public key evaluates to an empty string and fails the condition. A non-empty adaptor public key confirms that adaptor signing is requested, but does not bind the signature to a particular swap, transfer, counterparty, or amount.

Restrict signing-leaf FROST signatures to known leaves

Restrict static-deposit FROST signing to one index

Always pair static_deposit.index with derivation.type == 'static_deposit'. An inactive static_deposit variant evaluates its index as 0, and 0 is also a valid static-deposit index.

Receive-only flows

Allow claims from approved sender identity keys

Because claim and transfer preparation are separate activity types, this policy can authorize the claim step without granting SPARK_PREPARE_TRANSFER. A complete Spark transfer claim also uses SPARK_SIGN_FROST; authorize that activity separately with the narrowest applicable FROST policy from the section above.

Allow Lightning receive preparation for approved operators

Bind every approved operator ID to its expected encryption public key. The enclave encrypts each share to the key supplied in the request; an operator ID by itself does not authenticate that key. This example also pins the threshold and recipient count so the request contains exactly the approved operator set.