Today, we are announcing the release of the [Locker SDK](https://github.com/locker-labs/sdk), which enables cross-chain token splits with support for Solana and EVM. Locker is built using account abstraction (ERC-4337 + ERC-6900), so you get the utility of similar tools like Splits.org, combined with AA features like paymasters and social recovery.

Token splits follow are simple. Every time a token is deposited into a wallet, it will be divided into pieces and forwarded to other addresses based on a user's preferences. Some use cases for splits are:
- Platform fee collection
- Royalties
- Taxes
- Treasury management
- Personal finances
## Quickstart
Next month, we'll be releasing a standalone dapp so you can start splitting your tokens without any code. But if you are developper, you can use our [SDK](https://github.com/locker-labs/sdk) today.
With just two lines of code, you can create a split account and set it up with your desired recipients and amounts.
```ts=
import { LocalAccountSigner } from "@aa-sdk/core";
import {
USDC,
createLockerSplitClient,
EChain,
} from "@locker-labs/sdk";
// Create a split account
const splitClient = await createLockerSplitClient({
salt: BigInt(0),
alchemyApiKey: process.env.ALCHEMY_API_KEY,
chain: recipientChain,
signer: LocalAccountSigner.privateKeyToAccountSigner(
process.env.EVM_KEY
),
});
// Get split account address
console.log(`Recipient address: ${splitClient.getAddress()}`);
// Configure account to send 95% to DESTINATION1 and 5% to DESTINATION2
await splitClient.installSplitPlugin(
USDC[EChain.BASE_SEPOLIA],
[0.95, 0.05],
[
"0xDESTINATION1",
"0xDESTINATION2",
]
);
```
For a complete guid to all the features, check out our [sample app](https://github.com/locker-labs/sdk/tree/main/packages/examples/bridge-and-split).
## On-chain native
Last year, we launched a beta version of Locker that also offered token splits. That app is still being used to power the Telegram game [Efrogr](https://t.me/EfrogrBot).
The beta version relies on ZeroDev session keys to send tokens on behalf of users. Although session keys are very flexible, they add a lot of complexity. Session keys need to be stored somewhere, they need to be refreshed under certain conditions, and require additional signatures to create.
The new version of Locker is implemented as an ERC-6900 module. This makes interacting with Locker as simple as interacting with any other AA wallet and drastically cuts down on infrastructure requirements.
## Cross-chain with CCTP
We purpose built the first version of our SDK for a client that has three requirements:
1. Source of funds is Solana
2. Bridge funds to Base
3. Charge a service fee for each transfer
To achieve these goals, our SDK uses CCTP under the hood to bridge funds, which then triggers the SplitPlugin to charge the service fee and move the remaining funds to the destination address.

If you followed the steps in Quick Start above, you can initiate a bridge with a single line of code.
```ts=
const response = await bridgeAndReceiveTokenFromSolana({
solanaSigner: Keypair.fromSecretKey(bs58.decode(process.env.SOLANA_KEY!)),
solanaTokenAddress: USDC[EChain.SOLANA_DEVNET],
amount: 100000,
recipientChain: EChain.BASE_SEPOLIA,
recipientAddress: "0xRECIPIENT",
bridgeName: "cctp",
solanaChain: EChain.SOLANA_DEVNET,
solanaRpcUrl: process.env.SOLANA_RPC,
lockerClient: splitClient,
});
```
## Audited
Thanks to [Octane Security](https://www.octane.security/), the [SplitPlugin](https://github.com/locker-labs/sdk/tree/main/contracts/src/plugins/split) has been scanned for vulnerabilities and we have addressed all the issues that were flagged. There is one issue about unbounded loops that we don't plan to fix as the failure mode is well understood.
All Circle Alliance Program members can receive a free scan with Octane.
## Keep your existing wallet
If you followed all the steps, you now have a new smart account with token splitting enabled. But the end goal is for you to be able to use your existing wallet.
The Pecta upgrade of Ethereum contained [ERC-7702](https://github.com/ethereum/EIPs/blob/master/EIPS/eip-7702.md), which makes this possible. ERC-7702 allows users to delegate control of their existing wallet to any other smart contract.
The Locker team is currently focused on making our SDK compatible with ERC-7702 so that in the future you can get the advantages of using Locker without having to migrate to a new wallet.
To accomplish this, we will update from v0.7 to [v0.8](https://ethereum-magicians.org/t/erc-6900-modular-smart-contract-accounts-and-plugins/13885/55) of ERC-6900. We will also upgrade from v1 of Alchemy's modular account to [v2](https://accountkit.alchemy.com/smart-contracts/modular-account-v2/overview).