-
Notifications
You must be signed in to change notification settings - Fork 239
Commit
- Loading branch information
There are no files selected for viewing
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
using System.Threading.Tasks; | ||
using ChainSafe.Gaming.Evm.JsonRpc; | ||
using ChainSafe.Gaming.UnityPackage; | ||
using ChainSafe.Gaming.Web3.Build; | ||
using ChainSafe.Gaming.Web3.Unity; | ||
|
||
namespace ChainSafe.Gaming.HyperPlay | ||
{ | ||
/// <summary> | ||
/// Helper class to build preconfigured Web3 clients for HyperPlay. | ||
/// </summary> | ||
public static class HyperPlayWeb3 | ||
{ | ||
/// <summary> | ||
/// Builds a lightweight Web3 client with basic HyperPlay functionality. | ||
/// </summary> | ||
/// <param name="config">Your HyperPlay config.</param> | ||
/// <returns>A lightweight version of Web3 client with basic HyperPlay functionality.</returns> | ||
public static ValueTask<Web3.Web3> BuildLightweightWeb3(IHyperPlayConfig config) | ||
{ | ||
var projectConfig = ProjectConfigUtilities.Load(); | ||
|
||
return new Web3Builder(projectConfig).Configure(services => | ||
{ | ||
services.UseUnityEnvironment(); | ||
services.UseRpcProvider(); | ||
services.UseHyperPlay(config); | ||
}).LaunchAsync(); | ||
} | ||
} | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,16 @@ | ||
{ | ||
"name": "io.chainsafe.web3-unity.hyperplay.runtime", | ||
"rootNamespace": "ChainSafe.Gaming.HyperPlay", | ||
"references": [ | ||
"GUID:5426c6b788696eb4c88f4198b59839eb" | ||
], | ||
"includePlatforms": [], | ||
"excludePlatforms": [], | ||
"allowUnsafeCode": false, | ||
"overrideReferences": false, | ||
"precompiledReferences": [], | ||
"autoReferenced": true, | ||
"defineConstraints": [], | ||
"versionDefines": [], | ||
"noEngineReferences": false | ||
} |
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.