Skip to main content
Spark is a Bitcoin Layer 2 network that uses an identity key system for on-chain addressing. Turnkey supports Spark address derivation and signing via plain BIP-340 Schnorr signatures.

Address derivation

Spark addresses are derived from the secp256k1 curve and encoded as Bech32m strings. Internally, the address encodes a canonical protobuf payload containing a compressed 33-byte secp256k1 public key. The supported address formats are:
NetworkAddress FormatHRP
MainnetADDRESS_FORMAT_SPARK_MAINNETspark
RegtestADDRESS_FORMAT_SPARK_REGTESTsparkrt

BIP-32 derivation path

Spark uses a unique BIP-32 purpose number (8797555) rather than the standard BIP-44 coin type system. The default derivation path for the identity key is:
m/8797555'/{account}'/0'
When creating a wallet account via the Turnkey dashboard or API, select ADDRESS_FORMAT_SPARK_MAINNET or ADDRESS_FORMAT_SPARK_REGTEST and the path will be set automatically.
Only secp256k1 keys are supported for Spark. Attempting to use an Ed25519 key will result in an error.

Schnorr signing

Spark transactions are signed using plain BIP-340 Schnorr — specifically, without the Taproot key tweak that Bitcoin P2TR addresses require. This is an important distinction: passing a Spark address as the signWith parameter to SIGN_RAW_PAYLOAD triggers plain Schnorr signing, while passing a Bitcoin Taproot (P2TR) address triggers tweaked Schnorr signing per BIP-341. Use the SIGN_RAW_PAYLOAD or SIGN_RAW_PAYLOAD_V2 activity to sign Spark payloads. The hashFunction field should match how the payload was prepared (e.g. HASH_FUNCTION_NO_OP if you are passing a pre-hashed payload). The returned signature will always have V = "00" since Schnorr signatures do not use a recovery ID.

Signing scheme selection

Turnkey automatically selects the correct signing scheme based on the address format associated with your key:
Address typeSigning scheme
Bitcoin P2TRTweaked Schnorr (BIP-341)
Spark Mainnet/RegtestPlain Schnorr (BIP-340)
All othersECDSA

Networks supported

  • Spark MainnetADDRESS_FORMAT_SPARK_MAINNET
  • Spark RegtestADDRESS_FORMAT_SPARK_REGTEST

Key features

  • secp256k1 signing: Turnkey fully supports the secp256k1 curve used by Spark
  • Plain BIP-340 Schnorr: Distinct from the tweaked Schnorr used for Bitcoin Taproot — no key tweak is applied
  • Bech32m addressing: Spark identity key addresses are Bech32m-encoded canonical protobuf payloads
  • Spark-specific BIP-32 purpose: Derivation path uses purpose 8797555 per the Spark protocol spec

Additional resources

If you’re building on Spark and have questions about integrating with Turnkey, contact us at hello@turnkey.com, on X, or on Slack.