enum<string>
required
Enum options:
ACTIVITY_TYPE_SPARK_SIGN_FROSTstring
required
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
string
required
Unique identifier for a given Organization.
object
required
The parameters object containing the specific intent data for this activity.
Show details
Show details
array
required
Batched sign requests. Each produces a partial signature plus Turnkey’s public commitments.
object
required
The activity object containing type, intent, and result
Show activity details
Show activity details
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/spark_sign_frost \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: <string> (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_SPARK_SIGN_FROST",
"timestampMs": "<string> (e.g. 1746736509954)",
"organizationId": "<string> (Your Organization ID)",
"parameters": {
"signWith": "<string>",
"signatures": [
{
"derivation": {
"identity": "<object>",
"signingLeaf": {
"leafId": "<string>"
},
"deposit": "<object>",
"staticDeposit": {
"index": "<number>"
},
"htlcPreimage": "<object>"
},
"message": "<string>",
"verifyingKey": "<string>",
"operatorCommitments": [
{
"id": "<string>",
"hiding": "<string>",
"binding": "<string>"
}
],
"adaptorPublicKey": "<string>"
}
]
}
}'
import { Turnkey } from "@turnkey/sdk-server";
const turnkeyClient = new Turnkey({
apiBaseUrl: "https://api.turnkey.com",
apiPublicKey: process.env.API_PUBLIC_KEY!,
apiPrivateKey: process.env.API_PRIVATE_KEY!,
defaultOrganizationId: process.env.ORGANIZATION_ID!,
});
const response = await turnkeyClient.apiClient().sparkSignFrost({
signWith: "<string> (A Spark wallet account address identifying the wallet to sign with.)",
signatures: [{ // Batched sign requests. Each produces a partial signature plus Turnkey's public commitments.,
derivation: { // derivation field,
identity: { /* object */ } // identity field,
signingLeaf: { // signingLeaf field,
leafId: "<string> (Unique identifier for the Spark signing leaf.)",
},
deposit: { /* object */ } // deposit field,
staticDeposit: { // staticDeposit field,
index: 0 // Index used to derive the static deposit key.,
},
htlcPreimage: { /* object */ } // htlcPreimage field,
},
message: "<string> (Hex-encoded 32-byte sighash to sign.)",
verifyingKey: "<string> (Aggregate group verifying key (hex-encoded compressed secp256k1 point), computed as P_ops + P_user. Bound into the nonce HMAC.)",
operatorCommitments: [{ // Commitments for every non-Turnkey participant. MUST NOT include an entry under Turnkey's identifier. Bound into the nonce HMAC.,
id: "<string> (FROST participant identifier, hex-encoded (32-byte scalar).)",
hiding: "<string> (Hiding commitment D, hex-encoded compressed secp256k1 point.)",
binding: "<string> (Binding commitment E, hex-encoded compressed secp256k1 point.)",
}],
adaptorPublicKey: "<string> (Optional adaptor point T (hex-encoded 33-byte compressed secp256k1 pubkey). When set, Turnkey produces a Schnorr adaptor pre-signature with the FROST challenge bound to `R+T` (where `R` is the aggregate group nonce commitment from FROST). The party holding the discrete log `t` completes the pre-sig to a valid BIP-340 signature by adding `t` (or `-t`, for parity) to the signature scalar `s`. This is primarily used by Spark leaves-swap and other adaptor-bound flows; absent or empty leads to plain FROST signing (the typical case).)",
}]
});
{
"activity": {
"id": "<activity-id>",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_SPARK_SIGN_FROST",
"organizationId": "<organization-id>",
"timestampMs": "<timestamp> (e.g. 1746736509954)",
"result": {
"activity": {
"id": "<string>",
"organizationId": "<string>",
"status": "<string>",
"type": "<string>",
"intent": {
"sparkSignFrostIntent": {
"signWith": "<string>",
"signatures": [
{
"derivation": {
"identity": "<object>",
"signingLeaf": {
"leafId": "<string>"
},
"deposit": "<object>",
"staticDeposit": {
"index": "<number>"
},
"htlcPreimage": "<object>"
},
"message": "<string>",
"verifyingKey": "<string>",
"operatorCommitments": [
{
"id": "<string>",
"hiding": "<string>",
"binding": "<string>"
}
],
"adaptorPublicKey": "<string>"
}
]
}
},
"result": {
"sparkSignFrostResult": {
"signatures": [
{
"signatureShare": "<string>",
"hiding": "<string>",
"binding": "<string>"
}
]
}
},
"votes": "<array>",
"fingerprint": "<string>",
"canApprove": "<boolean>",
"canReject": "<boolean>",
"createdAt": "<string>",
"updatedAt": "<string>"
}
}
}
}