Skip to main content

Solana Native SDK (Solana Wallet → Neon EVM Programs)

Overview of Solana Native SDK

The Solana Native SDK, also known as the Solana Signer SDK, enables Solana wallets (e.g., Phantom) to sign and interact with Neon EVM programs. It supports cross-program interactions, allowing Solana-native assets to be used in Ethereum-compatible smart contracts within Solana’s Layer 1 ecosystem.

Key Features:

  • Wallet Integration: Connects Solana wallets for transaction signing.
  • Scheduled Transactions: Supports creating and sending scheduled transactions.
  • Token Swaps: Facilitates token swaps via DEXs on Neon EVM.
  • SPL to ERC-20 Conversion: Automatically wraps SPL tokens as ERC-20 tokens and unwraps them back within a single Solana transaction.

The Neon Solana Signature Demo showcases these capabilities, with versions for basic token transfers (v1) and advanced DEX swaps (v2).

Setup and Configuration

Steps:

  1. Install Dependencies:
yarn install
  1. Build Project:
yarn build
  1. Run Tests:
cd packages/core
yarn test
  1. Setup Providers:
const connection = new Connection('https://api.devnet.solana.com', 'confirmed');
const proxyApi = new NeonProxyRpcApi('https://proxy.devnet.neonlabs.org');
  1. Connect Wallet:
const solanaPrivateKey = bs58.decode('<your_private_key_base58>');
const keypair = Keypair.fromSecretKey(solanaPrivateKey);
const {chainId, solanaUser, provider} = await proxyApi.init(keypair);
await solanaAirdrop(connection, solanaUser.publicKey, 1e9);
  1. UI Configuration:
    • Set .env variables:
REACT_APP_SOLANA_URL=https://api.devnet.solana.com
REACT_APP_NEON_CORE_API_RPC_URL=https://proxy.devnet.neonlabs.org
REACT_APP_NEON_CORE_API_URL=https://api.devnet.neonlabs.org
  • Run UI:
yarn install
yarn start
Was this page helpful?