curl --request POST \
--url https://api.turnkey.com/public/v1/submit/earn_deploy_wrapper \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: <string> (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_EARN_DEPLOY_WRAPPER",
"timestampMs": "<string> (e.g. 1746736509954)",
"organizationId": "<string> (Your Organization ID)",
"parameters": {
"vaultAddress": "<string>",
"caip2": "<eip155:1>",
"clientFeeBps": "<string>",
"clientFeeWallet": "<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().earnDeployWrapper({
vaultAddress: "<string> (Address of the underlying yield vault to wrap (from the ListEarnVaults catalog).)",
caip2: "<eip155:1>" // CAIP-2 chain ID the vault lives on (e.g., 'eip155:8453' for Base).,
clientFeeBps: "<string> (Your fee on gross yield, in basis points (e.g., '2000' for 20%). Maximum is 4000 (40%).)",
clientFeeWallet: "<string> (The wallet address that receives the client's fee payouts on-chain. Must be a Turnkey-managed wallet address.)"
});
{
"activity": {
"id": "<activity-id>",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_EARN_DEPLOY_WRAPPER",
"organizationId": "<organization-id>",
"timestampMs": "<timestamp> (e.g. 1746736509954)",
"result": {
"activity": {
"id": "<string>",
"organizationId": "<string>",
"status": "<string>",
"type": "<string>",
"intent": {
"earnDeployWrapperIntent": {
"vaultAddress": "<string>",
"caip2": "<eip155:1>",
"clientFeeBps": "<string>",
"clientFeeWallet": "<string>"
}
},
"result": {
"earnDeployWrapperResult": {
"wrapperAddress": "<string>",
"splitterAddress": "<string>",
"deployRequestId": "<string>"
}
},
"votes": "<array>",
"fingerprint": "<string>",
"canApprove": "<boolean>",
"canReject": "<boolean>",
"createdAt": "<string>",
"updatedAt": "<string>"
}
}
}
}
Activities
Deploy Earn wrapper
Enable a yield vault for an organization by deploying its fee wrapper. Must be called before any deposits into the vault.
curl --request POST \
--url https://api.turnkey.com/public/v1/submit/earn_deploy_wrapper \
--header 'Accept: application/json' \
--header 'Content-Type: application/json' \
--header "X-Stamp: <string> (see Authorizations)" \
--data '{
"type": "ACTIVITY_TYPE_EARN_DEPLOY_WRAPPER",
"timestampMs": "<string> (e.g. 1746736509954)",
"organizationId": "<string> (Your Organization ID)",
"parameters": {
"vaultAddress": "<string>",
"caip2": "<eip155:1>",
"clientFeeBps": "<string>",
"clientFeeWallet": "<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().earnDeployWrapper({
vaultAddress: "<string> (Address of the underlying yield vault to wrap (from the ListEarnVaults catalog).)",
caip2: "<eip155:1>" // CAIP-2 chain ID the vault lives on (e.g., 'eip155:8453' for Base).,
clientFeeBps: "<string> (Your fee on gross yield, in basis points (e.g., '2000' for 20%). Maximum is 4000 (40%).)",
clientFeeWallet: "<string> (The wallet address that receives the client's fee payouts on-chain. Must be a Turnkey-managed wallet address.)"
});
{
"activity": {
"id": "<activity-id>",
"status": "ACTIVITY_STATUS_COMPLETED",
"type": "ACTIVITY_TYPE_EARN_DEPLOY_WRAPPER",
"organizationId": "<organization-id>",
"timestampMs": "<timestamp> (e.g. 1746736509954)",
"result": {
"activity": {
"id": "<string>",
"organizationId": "<string>",
"status": "<string>",
"type": "<string>",
"intent": {
"earnDeployWrapperIntent": {
"vaultAddress": "<string>",
"caip2": "<eip155:1>",
"clientFeeBps": "<string>",
"clientFeeWallet": "<string>"
}
},
"result": {
"earnDeployWrapperResult": {
"wrapperAddress": "<string>",
"splitterAddress": "<string>",
"deployRequestId": "<string>"
}
},
"votes": "<array>",
"fingerprint": "<string>",
"canApprove": "<boolean>",
"canReject": "<boolean>",
"createdAt": "<string>",
"updatedAt": "<string>"
}
}
}
}
A successful response returns the following fields:
Was this page helpful?