{"id":37034695,"url":"https://github.com/getscatter/scatter-sharp","last_synced_at":"2026-01-14T04:03:50.416Z","repository":{"id":33304413,"uuid":"149134382","full_name":"GetScatter/scatter-sharp","owner":"GetScatter","description":"Scatter C# library to interact with ScatterDesktop/ScatterMobile","archived":false,"fork":false,"pushed_at":"2022-12-08T03:45:10.000Z","size":10453,"stargazers_count":27,"open_issues_count":3,"forks_count":13,"subscribers_count":7,"default_branch":"master","last_synced_at":"2025-08-20T04:45:40.942Z","etag":null,"topics":[],"latest_commit_sha":null,"homepage":null,"language":"C#","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"mit","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/GetScatter.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"LICENSE","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null}},"created_at":"2018-09-17T14:03:27.000Z","updated_at":"2024-03-31T03:45:48.000Z","dependencies_parsed_at":"2022-09-20T17:01:47.441Z","dependency_job_id":null,"html_url":"https://github.com/GetScatter/scatter-sharp","commit_stats":null,"previous_names":[],"tags_count":12,"template":false,"template_full_name":null,"purl":"pkg:github/GetScatter/scatter-sharp","repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GetScatter%2Fscatter-sharp","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GetScatter%2Fscatter-sharp/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GetScatter%2Fscatter-sharp/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GetScatter%2Fscatter-sharp/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/GetScatter","download_url":"https://codeload.github.com/GetScatter/scatter-sharp/tar.gz/refs/heads/master","sbom_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/GetScatter%2Fscatter-sharp/sbom","scorecard":null,"host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":286080680,"owners_count":28409000,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2026-01-14T01:52:23.358Z","status":"online","status_checked_at":"2026-01-14T02:00:06.678Z","response_time":107,"last_error":null,"robots_txt_status":"success","robots_txt_updated_at":"2025-07-24T06:49:26.215Z","robots_txt_url":"https://github.com/robots.txt","online":true,"can_crawl_api":true,"host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":[],"created_at":"2026-01-14T04:03:49.802Z","updated_at":"2026-01-14T04:03:50.403Z","avatar_url":"https://github.com/GetScatter.png","language":"C#","funding_links":[],"categories":[],"sub_categories":[],"readme":"# This library is not actively maintained\n\n# scatter-sharp\nScatter C# library to interact with ScatterDesktop / ScatterMobile\n\n## Clone repo\n\n```\ngit clone https://github.com/GetScatter/scatter-sharp --recursive\n```\n\n### Prerequisite to build\n\nVisual Studio 2017+ \n\n### Instalation\nscatter-sharp is now available throught nuget https://www.nuget.org/packages/scatter-sharp\n```\nInstall-Package scatter-sharp\n```\n\n### Usage\n\n#### Configuration\n\nIn order to use scatter you need to create a instance with **AppName** and a **Network** configuration, connect to scatter application, request a **Identity** and then fetch a new **Eos** instance.\n\nExample:\n\n```csharp\nvar network = new Api.Network()\n{\n    blockchain = Scatter.Blockchains.EOSIO,\n    host = \"api.eossweden.se\",\n    port = 443,\n    protocol = \"https\",\n    chainId = \"aca376f206b8fc25a6ed44dbdc66547c36c6c33e3a119ffbeaef943642f0e906\"\n};\n\nvar scatter = new Scatter(new ScatterConfigurator()\n{\n   AppName = \"SCATTER-SHARP\",\n   Network = network,\n   StorageProvider = storageProvider\n});\n\nawait scatter.Connect();\n\nvar identity = await scatter.GetIdentity(new Api.IdentityRequiredFields()\n{\n    accounts = new List\u003cApi.Network\u003e()\n    {\n        network\n    },\n    location = new List\u003cApi.LocationFields\u003e(),\n    personal = new List\u003cApi.PersonalFields\u003e()\n});\n\nvar eos = new Eos(new EosSharp.Core.EosConfigurator() {\n    ChainId = network.chainId,\n    HttpEndpoint = network.GetHttpEndpoint(),\n    SignProvider = new ScatterSignatureProvider(scatter)\n});\n\nvar account = scatter.Identity.accounts.First();\n\nvar result = await eos.CreateTransaction(new EosSharp.Core.Api.v1.Transaction()\n{\n    actions = new List\u003cEosSharp.Core.Api.v1.Action\u003e()\n    {\n        new EosSharp.Core.Api.v1.Action()\n        {\n            account = \"eosio.token\",\n            authorization =  new List\u003cPermissionLevel\u003e()\n            {\n                new PermissionLevel() {actor = account.name, permission = account.authority }\n            },\n            name = \"transfer\",\n\t\t\t//Using a dictionary with key, object works on WEBGL\n            data = new Dictionary\u003cstring, object\u003e()\n            {\n                { \"from\", account.name },\n                { \"to\", \"eosio\" },\n                { \"quantity\", \"0.0001 EOS\" },\n                { \"memo\", \"Unity3D hello crypto world!\" }\n            }\n        }\n    }\n});\n\n... **Use all eos api methods as usual from eos-sharp** ...\n\nscatter.Dispose();\n```\n\n#### App Storage Provider\n\nScatter uses a appKey and Nonce to help pair your application with the users permissions. By default this information is stored on memory but you may want to save on disk to be reused later.\n\nCreate a new Scatter instance and configure a FileStorageProvider with the target filePath.\n```csharp\nvar fileStorage = new FileStorageProvider(filePath);\n\nusing (var scatter = new Scatter(new ScatterConfigurator()\n{\n   AppName = \"SCATTER-SHARP\",\n   Network = network,\n   StorageProvider = fileStorage\n})\n{\n    await scatter.Connect();\n    ....    \n}\n```\n\n#### Generic / Fiddler proxy\n\nIs useful to configure a proxy to investigate and debug all the information that goes through scatter-sharp \u003c-\u003e ScatterDesktop. Fiddler is a popular http/websocket proxy solution but you can configure any other.\n\n##### Enabling proxy\n\nAdd a proxy object to scatter configurator that accepts Url and optionaly User and Password. **Note that this is used in websocket-sharp and not the implementation for WebGL (not needed).**\n\n```csharp\nvar scatter = new Scatter(new ScatterConfigurator()\n{\n   AppName = \"SCATTER-SHARP\",\n   Network = network,\n   StorageProvider = storageProvider,\n   Proxy = new Proxy()\n   {\n       Url = \"http://127.0.0.1:8888\"\n   }\n});\n```\n\n##### Fiddler unmask websocket traffic\n\nOn tab \"FiddlerScript\" add this code in the end of function \"OnBeforeRequest\"\n\n```\nstatic function OnBeforeRequest(oSession: Session) {\n...\n\tif (oSession.RequestHeaders.ExistsAndContains (\"Sec-WebSocket-Extensions\", \"permessage-deflate\")) {\n\t    oSession.RequestHeaders.Remove ( \"Sec-WebSocket-Extensions\");\n\t}\n}\n```\n\n##### Fiddler check websocket traffic\n\nDouble click \"ws\" icon to open websocket tab\n\n![alt text](data/ws.png)\n\nIn websocket tab you can view in real-time all the communication between scatter-sharp \u003c-\u003e ScatterDesktop\n\n![alt text](data/ws-detail.png)\n\n##### Enable proxy on Unity Editor\n\nTo enable the proxy in unity editor go to the file:\n\n```\nC:\\Program Files\\Unity\\Editor\\Data\\Mono\\etc\\mono\\2.0\\machine.config\n```\n\nAdd this to the \u003csystem.net\u003e node:\n```\n\u003cdefaultProxy\u003e\n\u003cproxy proxyaddress=\"http://localhost:8888\"/\u003e\n\u003c/defaultProxy\u003e\n```\n\n#### Scatter Api methods\n- **Connect**\nConnect to scatter\n```csharp\nawait scatter.Connect();\n```\n\n- **GetVersion**\nGets the Scatter version\n```csharp\nstring version = await scatter.GetVersion();\n```\n\n- **GetIdentity**\nPrompts the users for an Identity if there is no permission, otherwise returns the permission without a prompt based on origin.\n```csharp\nIdentity identity = await scatter.GetIdentity(new Api.IdentityRequiredFields() {\n    accounts = new List\u003cApi.Network\u003e()\n    {\n        network\n    },\n    location = new List\u003cApi.LocationFields\u003e(),\n    personal = new List\u003cApi.PersonalFields\u003e()\n});\n```\nReturns:\n```csharp\npublic class Identity\n{\n    public string hash;\n    public string publicKey;\n    public string name;\n    public bool kyc;\n    public List\u003cIdentityAccount\u003e accounts;\n}\n```\n\n- **GetIdentityFromPermissions**\nChecks if an Identity has permissions and return the identity based on origin.\n```csharp\nIdentity identity = await scatter.GetIdentityFromPermissions();\n```\nReturns:\n```csharp\npublic class Identity\n{\n    public string hash;\n    public string publicKey;\n    public string name;\n    public bool kyc;\n    public List\u003cIdentityAccount\u003e accounts;\n}\n```\n\n- **ForgetIdentity**\nRemoves the identity permission for an origin from the user's Scatter, effectively logging them out.\n```csharp\nbool result = await scatter.ForgetIdentity();\n```\n\n- **Authenticate**\nSign origin (appName) with the Identity's private key. Or custom data with custom publicKey\n```csharp\nstring signature = await scatter.Authenticate();\n```\n\n- **GetArbitrarySignature**\nRequest arbitrary data with the constraint of max 12 words\n```csharp\nstring signature = await scatter.GetArbitrarySignature(string publicKey, string data, string whatfor = \"\", bool isHash = false);\n```\n\n- **GetPublicKey**\nAllows apps to request that the user provide a user-selected Public Key to the app. ( ONBOARDING HELPER )\n```csharp\nstring pubKey = await scatter.GetPublicKey(string blockchain);\n```\n\n- **LinkAccount**\nAllows the app to suggest that the user link new accounts on top of public keys ( ONBOARDING HELPER )\n```csharp\nbool result = await scatter.LinkAccount(string publicKey);\n```\n\n- **HasAccountFor**\nAllows dapps to see if a user has an account for a specific blockchain. DOES NOT PROMPT and does not return an actual account, just a boolean.\n```csharp\nbool result = await scatter.HasAccountFor();\n```\n\n- **SuggestNetwork**\nPrompts the user to add a new network to their Scatter.\n```csharp\nbool result = await scatter.SuggestNetwork();\n```\n\n- **AddToken**\nAdd token to wallet\n```csharp\nbool result = await scatter.AddToken(Token token);\n```\n\n- **On**\nRegister listener for scatter event type\n```csharp\nscatter.On(string type, Action\u003cobject\u003e callback);\n```\n\n- **Off**\nRemove listeners\n```csharp\nscatter.Off(string type);\nscatter.Off(string type, int index);\nscatter.Off(Action\u003cobject\u003e callback);\nscatter.Off(string type, Action\u003cobject\u003e callback);\n```\n","project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetscatter%2Fscatter-sharp","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgetscatter%2Fscatter-sharp","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgetscatter%2Fscatter-sharp/lists"}