Skip to content

Latest commit

History

6 Commits

Folders and files

NameName
Last commit message
Last commit date

Repository files navigation

Sharpion

Sharpion is a C# library for integrating web3 games that use WebSocket into game engines. It lets users connect to games from websites without an in-game browser and interact with blockchain transactions and smart contracts.

Key Features

  • WebSocket communication: Fast, low-latency client–server protocol.
  • Platform abstraction: .NET implementation included; Unity and other platforms can be added via IIonPlatform.
  • Blockchain operations: Wallet connect, balance queries, and transaction sending.
  • Configurable: Connection endpoint and TLS via SharpionOptions.
  • Testable design: Interfaces (IIonPlatform, IClientSession) and dependency-friendly APIs.

Build

cd Sharpion
dotnet build

Target: .NET Standard 2.0. Dependencies: Newtonsoft.Json; WebSocket implementation is bundled under Library/websocket-sharp.

Usage

usingSharpion;usingSharpion.Configuration;usingSharpion.Operations.SendTransaction;usingSharpion.Platforms;varoptions=newSharpionOptions{WebSocketEndpoint="localhost:8080",UseSecureConnection=false};varmanager=SharpionManager.Create(PlatformName.Dotnet,options);manager.ConnectToServer();manager.ConnectWallet();manager.BalanceOf("0x...");manager.SendTransaction(newTransactionInteraction{ReceiptAddress="0x...",ContractAddress="0x...",Amount="0.1"});manager.DisconnectWallet();manager.DisconnectFromServer();

Architecture

  • Sharpion: Entry facade (SharpionManager) and configuration (SharpionOptions).
  • Sharpion.Platforms: Platform abstraction (IIonPlatform, IonPlatformBase) and PlatformName.
  • Sharpion.Platforms.Dotnet: .NET implementation using SharpionClient (WebSocket).
  • Sharpion.Platforms.Dotnet.Client.Handlers: Packet types (ClientPacketType), DTOs (Packs), and message handling (PacketHandler).
  • Sharpion.Operations.SendTransaction: DTO for transactions (TransactionInteraction).
  • Sharpion.Configuration: Options for connection (SharpionOptions).

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages