> ## Documentation Index
> Fetch the complete documentation index at: https://turnkey-0e7c1f5b-onramp-quick-fix.mintlify.site/llms.txt
> Use this file to discover all available pages before exploring further.

# How to Integrate Gasless Transactions On Solana With Turnkey

Turnkey offers flexible infrastructure to create and manage private keys. By combining the secure private key infrastructure and with gas abstracted transactions, developers can easily integrate account abstraction features for any Turnkey-powered wallets.

## **Setting up Gasless Transactions on Solana (SVM)**

Turnkey offers deep and robust support for the [<u>Solana (SVM) ecosystem</u>](https://docs.turnkey.com/networks/solana). We utilize the Ed25519 cryptographic curve as the primitive for signing transactions, provide address derivation support, and make it easy to integrate for SVM through various SDKs. Beyond this, Solana developers can also leverage SVM transaction parsing and policies, managed by the Turnkey Policy Engine. 

Here’s how to take advantage of Turnkey’s composable primitives for gas abstraction:

### **Option 1: Using Solana Address Fee Payer**

For this approach, we will leverage [examples/with-solana](https://github.com/tkhq/sdk/tree/main/examples/with-solana), a full example of Solana transaction construction, and broadcasting using [@turnkey/with-solana](https://www.npmjs.com/package/@turnkey/solana). For a more comprehensive, full-stack example that leverages passkeys, check out [<u>examples/with-solana-passkeys</u>](https://github.com/tkhq/sdk/tree/main/examples/with-solana-passkeys).

\
First, you’ll need to use one of the two optional environmental variables: `SOLANA_ADDRESS_FEE_PAYER`. While optional, the variable is necessary to create a separate fee payer address. The setup is as simple as passing in the fee payer address into the [<u>withFeePayer.ts</u>](https://github.com/tkhq/sdk/blob/main/examples/with-solana/src/withFeePayer.ts)

```javascript
// Assumes `turnkeyClient` is initialized and `createNewSolanaWallet` is available.

let feePayerAddress = process.env.SOLANA_ADDRESS_FEE_PAYER;
if (!feePayerAddress) {
  feePayerAddress = await createNewSolanaWallet(turnkeyClient.apiClient());
  console.log(`\nYour new Solana address: "${feePayerAddress}"`);
} else {
  console.log(
    `\nUsing existing Solana address from ENV: "${feePayerAddress}"`,
  );
}
```

### **Option 2: Build a Paymaster on Solana using Turnkey**

This method showcases the flexibility of Turnkey infrastructure and was written and open sourced by another developer building on top of Turnkey. Please note that the repo referenced below is not maintained by Turnkey itself.

[<u>Build a Paymaster on Solana using Turnkey</u>](https://github.com/tkhq/turnkey-solana-paymaster) is easy to follow and will guide you from start to finish:

1. Admin: Setting up Turnkey account, API keys, and Solana public/private key pairs
2. Installing Dependencies
3. Frontend Implementation
4. Backend Implementation
5. Receiving and Broadcasting the Completed Transactions

## **Setting up Gasless Transactions on Ethereum (EVM)**

At the moment, Turnkey does not offer out-of-the-box gas sponsorships for the EVM ecosystem. This may change soon, and any updates will be announced via our official channels. 

For now, you can leverage Turnkey’s partnerships with ZeroDev and Alchemy to provide gasless experiences to the end-users. Refer to the [<u>Account Abstraction article</u>](https://docs.turnkey.com/reference/aa-wallets#:~:text=Account%20Abstraction%20wallet) for more information.

## **Thinking about gasless transactions for other chains?**

If you have questions, feedback, or find yourself in need of a gas abstraction or integration that doesn’t exist yet, please get in touch with us!

* Join our slack community [<u>here</u>](https://join.slack.com/t/clubturnkey/shared_invite/zt-31v4yhgw6-PwBzyNsWCCBTk2xft3EoHQ)
* Contact us at [<u>hello@turnkey.com</u>](mailto:hello@turnkey.com)
