enum<string>
required
Enum options:
ACTIVITY_TYPE_SPARK_CLAIM_TRANSFERstring
required
Timestamp (in milliseconds) of the request, used to verify liveness of user requests.
string
required
Unique identifier for a given Organization.
object
required
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_claim_transfer \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: <string> (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_SPARK_CLAIM_TRANSFER",
"timestampMs": "<string> (e.g. 1746736509954)",
"organizationId": "<string> (Your Organization ID)",
"parameters": {
"signWith": "<string>",
"claim": {
"leaves": [
{
"leafId": "<string>",
"ciphertext": "<string>",
"senderSignature": "<string>"
}
],
"threshold": "<number>",
"operatorRecipients": [
{
"operatorId": "<string>",
"encryptionPublicKey": "<string>"
}
],
"transferId": "<string>",
"senderIdentityPublicKey": "<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().sparkClaimTransfer({
signWith: "<string> (A Spark wallet account address identifying the wallet.)",
claim: { // claim field,
leaves: [{ // Leaves being claimed.,
leafId: "<string> (Leaf identifier (UUID).)",
ciphertext: "<string> (ECIES ciphertext (hex-encoded) containing the inbound transfer secret. Decrypted inside the enclave using the wallet's Identity key.)",
senderSignature: "<string> (Hex-encoded 64-byte compact ECDSA signature binding (leaf_id, transfer_id, ciphertext) to the sender's identity key. Verified inside the enclave before decryption.)",
}],
threshold: 0 // Shamir threshold for reconstructing the per-leaf claim secret.,
operatorRecipients: [{ // Operators that will receive Shamir shares.,
operatorId: "<string> (Spark operator identifier (UUID).)",
encryptionPublicKey: "<string> (Operator's ECIES encryption pubkey (hex-encoded compressed secp256k1 point).)",
}],
transferId: "<string> (Spark transfer identifier (UUID). Used together with each leaf's sender_signature to verify the sender bound this ciphertext to this transfer.)",
senderIdentityPublicKey: "<string> (Sender's compressed secp256k1 identity public key (hex-encoded, 33 bytes). Used to verify the per-leaf sender_signature fields.)",
}
});
{
"activity": {
"id": "<activity-id>",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_SPARK_CLAIM_TRANSFER",
"organizationId": "<organization-id>",
"timestampMs": "<timestamp> (e.g. 1746736509954)",
"result": {
"activity": {
"id": "<string>",
"organizationId": "<string>",
"status": "<string>",
"type": "<string>",
"intent": {
"sparkClaimTransferIntent": {
"signWith": "<string>",
"claim": {
"leaves": [
{
"leafId": "<string>",
"ciphertext": "<string>",
"senderSignature": "<string>"
}
],
"threshold": "<number>",
"operatorRecipients": [
{
"operatorId": "<string>",
"encryptionPublicKey": "<string>"
}
],
"transferId": "<string>",
"senderIdentityPublicKey": "<string>"
}
}
},
"result": {
"sparkClaimTransferResult": {
"operatorPackages": [
{
"operatorId": "<string>",
"encryptedPackage": "<string>"
}
],
"newLeafPublicKeys": [
{
"leafId": "<string>",
"publicKey": "<string>"
}
]
}
},
"votes": "<array>",
"fingerprint": "<string>",
"canApprove": "<boolean>",
"canReject": "<boolean>",
"createdAt": "<string>",
"updatedAt": "<string>"
}
}
}
}