Powerful and user-friendly C# SDK for Starknet. Rapidly build your blockchain applications.
Connect to Starknet in just a few lines of code
Install-Package StarkSharp
var client = new StarknetClient();
var balance = await client.GetBalance(address);
Designed for a modern C# development experience
Asynchronous operations and optimized RPC calls
Strongly-typed API for compile-time error protection
Seamlessly integrate into your existing .NET projects
Full access to all Starknet functions
Detailed error messages and logging support
Completely free and open source under MIT license
Using StarkSharp in real-world scenarios
using StarkSharp;
var client = new StarknetClient("https://starknet-mainnet.public.blastapi.io");
var account = "0x1234567890abcdef...";
var balance = await client.GetBalance(account);
Console.WriteLine($"Balance: {balance} ETH");
var transaction = new InvokeTransaction
{
ContractAddress = "0x...",
EntryPointSelector = "transfer",
Calldata = new[] { recipient, amount }
};
var result = await client.SendTransaction(transaction);
Console.WriteLine($"Transaction Hash: {result.TransactionHash}");
var contract = new Contract(contractAddress, abi, client);
// Call contract function
var result = await contract.Call("get_balance", new[] { userAddress });
// Change contract state
await contract.Invoke("set_balance", new[] { userAddress, newBalance });
Comprehensive guides and API references
Connect with developers and get help