-
Notifications
You must be signed in to change notification settings - Fork 8
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
refactor: remove unused imports, nullables, update readmes
- Loading branch information
Showing
5 changed files
with
82 additions
and
138 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,65 +1,17 @@ | ||
# Immutable.Marketplace - C# library for Immutable X Marketplace | ||
<div align="center"> | ||
<p align="center"> | ||
<a href="https://docs.x.immutable.com/docs"> | ||
<img src="https://cdn.dribbble.com/users/1299339/screenshots/7133657/media/837237d447d36581ebd59ec36d30daea.gif" width="280"/> | ||
</a> | ||
</p> | ||
</div> | ||
|
||
This C# library provides functionality for interacting with the Immutable X Marketplace, including on-ramp services. | ||
--- | ||
|
||
## Version Support | ||
# Immutable Unity SDK - Marketplace | ||
|
||
This library supports: | ||
The Immutable SDK Commerce package for Unity simplifies integrating marketplace functionality, such as adding funds to a player's wallet. | ||
|
||
- Unity 2020.3 (LTS) and up | ||
- .NET Standard 2.1 / .NET Framework | ||
## Documentation | ||
|
||
## Dependencies | ||
|
||
- [UniTask](https://github.com/Cysharp/UniTask) - For asynchronous operations | ||
- Unity Engine | ||
|
||
## Installation | ||
|
||
Add the dependencies to your Unity project. You can do this through the Package Manager or by adding them to your `Packages/manifest.json`: | ||
|
||
```json | ||
{ | ||
"dependencies": { | ||
"com.cysharp.unitask": "https://github.com/Cysharp/UniTask.git?path=src/UniTask/Assets/Plugins/UniTask", | ||
"com.unity.nuget.newtonsoft-json": "3.0.2" | ||
} | ||
} | ||
``` | ||
|
||
## Usage | ||
|
||
Here's an example of how to use the OnRamp functionality with Immutable Passport: | ||
|
||
```csharp | ||
using Immutable.Marketplace.OnRamp; | ||
using Immutable.Passport; | ||
using Immutable.Passport.Model; | ||
using System.Collections.Generic; | ||
using UnityEngine; | ||
|
||
public class MarketplaceExample : MonoBehaviour | ||
{ | ||
async void Start() | ||
{ | ||
string environment = Environment.SANDBOX; | ||
string email = await Passport.Instance.GetEmail(); | ||
List<string> walletAddresses = await Passport.Instance.ZkEvmRequestAccounts(); | ||
|
||
OnRamp onRamp = new OnRamp(environment, email, walletAddresses.FirstOrDefault()); | ||
|
||
try | ||
{ | ||
string link = await onRamp.GetLink(); | ||
Debug.Log($"onRamp.GetOnRampLink: {link}"); | ||
|
||
// Open the generated link in the default browser | ||
Application.OpenURL(link); | ||
} | ||
catch (System.Exception e) | ||
{ | ||
Debug.LogError($"Error getting on-ramp link: {e.Message}"); | ||
} | ||
} | ||
} | ||
``` | ||
- [Immutable zkEVM Documentation](https://docs.immutable.com/docs/zkEVM/sdks/unity) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
1 change: 0 additions & 1 deletion
1
src/Packages/Passport/Runtime/Scripts/Private/Model/Request/InitRequest.cs
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,4 @@ | ||
using System; | ||
using Immutable.Passport.Model; | ||
|
||
namespace Immutable.Passport.Model | ||
{ | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters