-
Notifications
You must be signed in to change notification settings - Fork 26
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Continued work on upgrading the OASIS API NFT API.
- Created IMintAndPlaceGeoSpatialNFTRequest, IOASISGeoSpatialNFT, IPlaceGeoSpatialNFTRequest, IPlaceGeoSpatialNFTRequestBase & IMintNFTTransaction interfaces in OASIS.API.Core. - Updated IOASISNFT interface in OASIS.API.Core by adding ThumbnailUrl, Token, Hash and MetaData properties. - Updated IOASISNFTProvider interface in OASIS.API.Core by adding MintNFT, MintNFTAsync, LoadNFT, LoadNFTAsync, LoadAllNFTsForAvatar, LoadAllNFTsForAvatarAsync, LoadAllNFTsForMintAddress, LoadAllNFTsForMintAddressAsync, PlaceGeoNFT, PlaceGeoNFTAsync, MintAndPlaceGeoNFT & MintAndPlaceGeoNFTAsync functions. - Removed Date from IWalletTransaction and WalletTransaction in OASIS.API.Core (this should be set by the relevant managers (NFTManger, WalletManager etc) so the date is always set to Now and so the date cannot be forged then.) - Added Hash, ThumbnailUrl, Token & MetaData to OASISNFT in OASIS.API.Core. - Created NFTProviderType enum in OASIS.API.ONode.Core. - Updated INFTManager interface in OASIS.API.ONode.Core by adding CreateNftTransactionAsync, CreateNftTransaction, MintNftAsync, MintNft, LoadNftAsync, LoadNft, GetNFTProvider, GetNFTProviderTypeFromProviderType & GetProviderTypeFromNFTProviderType functions. - Created ICreateNftTransactionRequest, IPurchaseOlandRequest & IPurchaseOlandResponse interfaces in OASIS.API.ONode.Core. - Updated NFTManager in OASIS.API.ONode.Core by adding CreateNftTransactionAsync, CreateNftTransaction, MintNftAsync, MintNft, LoadNftAsync, LoadNft, GetNFTProvider, GetNFTProviderTypeFromProviderType & GetProviderTypeFromNFTProviderType functions. - Added CreateNftTransactionRequest object to OASIS.API.ONode.Core. - Removed CargoSaleId property from PurchaseOlandRequest object in OASIS.API.ONode.Core. - PurchaseOlandResponse object now implements new IPurchaseOlandResponse interface in OASIS.API.ONode.Core. - Updated NFTController in OASIS.API.ONode.WebAPI by removing all references to the new obsolete NFTService and pointing methods CreateNftTransaction to the new NFTManger in OASIS.API.ONode.Core instead. Also added new MintNFT function. - Removed the rest of the now retired NFTService in OASIS.API.ONode.WebAPI.
- Loading branch information
Showing
24 changed files
with
456 additions
and
365 deletions.
There are no files selected for viewing
8 changes: 8 additions & 0 deletions
8
...Software.OASIS.API.Core/Interfaces/NFT/GeoSpatialNFT/IMintAndPlaceGeoSpatialNFTRequest.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 |
---|---|---|
@@ -0,0 +1,8 @@ | ||
| ||
namespace NextGenSoftware.OASIS.API.Core.Interfaces.NFT.GeoSpatialNFT | ||
{ | ||
public interface IMintAndPlaceGeoSpatialNFTRequest : IMintNFTTransaction, IPlaceGeoSpatialNFTRequestBase | ||
{ | ||
|
||
} | ||
} |
2 changes: 1 addition & 1 deletion
2
...ore/Interfaces/NFT/IOASISGeoSpatialNFT.cs → .../NFT/GeoSpatialNFT/IOASISGeoSpatialNFT.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
12 changes: 12 additions & 0 deletions
12
NextGenSoftware.OASIS.API.Core/Interfaces/NFT/GeoSpatialNFT/IPlaceGeoSpatialNFTRequest.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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using System; | ||
|
||
namespace NextGenSoftware.OASIS.API.Core.Interfaces.NFT.GeoSpatialNFT | ||
{ | ||
public interface IPlaceGeoSpatialNFTRequest : IPlaceGeoSpatialNFTRequestBase | ||
{ | ||
public Guid OASISNFTId { get; set; } | ||
public string NFTHash { get; set; } | ||
public string NFTURL { get; set; } | ||
public Guid AvatarId { get; set; } | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
...GenSoftware.OASIS.API.Core/Interfaces/NFT/GeoSpatialNFT/IPlaceGeoSpatialNFTRequestBase.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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
namespace NextGenSoftware.OASIS.API.Core.Interfaces.NFT.GeoSpatialNFT | ||
{ | ||
public interface IPlaceGeoSpatialNFTRequestBase | ||
{ | ||
public long Lat { get; set; } | ||
public long Long { get; set; } | ||
public bool AllowOtherPlayersToAlsoCollect { get; set; } | ||
public bool PermSpawn { get; set; } | ||
public int GlobalSpawnQuantity { get; set; } | ||
public int PlayerSpawnQuantity { get; set; } | ||
} | ||
} |
23 changes: 23 additions & 0 deletions
23
NextGenSoftware.OASIS.API.Core/Interfaces/NFT/IMintNFTTransaction.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 |
---|---|---|
@@ -0,0 +1,23 @@ | ||
using NextGenSoftware.OASIS.API.Core.Enums; | ||
using System; | ||
using System.Collections.Generic; | ||
|
||
namespace NextGenSoftware.OASIS.API.Core.Interfaces.NFT | ||
{ | ||
public interface IMintNFTTransaction | ||
{ | ||
public string MintWalletAddress { get; set; } | ||
public Guid MintedByAvatarId { get; set; } | ||
public string Name { get; set; } | ||
public string Description { get; set; } | ||
public byte[] Thumbnail { get; set; } | ||
public string ThumbnailUrl { get; set; } | ||
public decimal Price { get; set; } | ||
public decimal Discount { get; set; } | ||
public string Token { get; set; } //TODO: Should be dervied from the OnChainProvider so may not need this? | ||
public int NumberToMint { get; set; } | ||
public Dictionary<string, object> MetaData { get; set; } | ||
public ProviderType OffChainProvider { get; set; } | ||
public ProviderType OnChainProvider { get; set; } | ||
} | ||
} |
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
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
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
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
11 changes: 11 additions & 0 deletions
11
NextGenSoftware.OASIS.API.ONODE.Core/Enums/NFTProviderType.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 |
---|---|---|
@@ -0,0 +1,11 @@ | ||
| ||
namespace NextGenSoftware.OASIS.API.ONode.Core.Objects | ||
{ | ||
public enum NFTProviderType | ||
{ | ||
None, | ||
Solana, | ||
Ethereum, | ||
EOS | ||
} | ||
} |
19 changes: 17 additions & 2 deletions
19
NextGenSoftware.OASIS.API.ONODE.Core/Interfaces/Managers/INFTManager.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,12 +1,27 @@ | ||
using NextGenSoftware.OASIS.API.Core.Helpers; | ||
using System; | ||
using System.Threading.Tasks; | ||
using NextGenSoftware.OASIS.API.Core.Enums; | ||
using NextGenSoftware.OASIS.API.Core.Helpers; | ||
using NextGenSoftware.OASIS.API.Core.Interfaces; | ||
using NextGenSoftware.OASIS.API.Core.Interfaces.NFT; | ||
using NextGenSoftware.OASIS.API.Core.Objects.Wallets; | ||
using System.Threading.Tasks; | ||
using NextGenSoftware.OASIS.API.ONode.Core.Objects; | ||
|
||
namespace NextGenSoftware.OASIS.API.ONode.Core.Interfaces.Managers | ||
{ | ||
public interface INFTManager | ||
{ | ||
Task<OASISResult<TransactionRespone>> CreateNftTransactionAsync(CreateNftTransactionRequest request); | ||
OASISResult<TransactionRespone> CreateNftTransaction(CreateNftTransactionRequest request); | ||
Task<OASISResult<TransactionRespone>> CreateNftTransactionAsync(INFTWalletTransaction request); | ||
OASISResult<TransactionRespone> CreateNftTransaction(INFTWalletTransaction request); | ||
Task<OASISResult<TransactionRespone>> MintNftAsync(IMintNFTTransaction request); | ||
OASISResult<TransactionRespone> MintNft(IMintNFTTransaction request); | ||
Task<OASISResult<IOASISNFT>> LoadNftAsync(Guid id, NFTProviderType NFTProviderType); | ||
OASISResult<IOASISNFT> LoadNft(Guid id, NFTProviderType NFTProviderType); | ||
IOASISNFTProvider GetNFTProvider<T>(NFTProviderType NFTProviderType, ref OASISResult<T> result, string errorMessage); | ||
IOASISNFTProvider GetNFTProvider<T>(ProviderType providerType, ref OASISResult<T> result, string errorMessage); | ||
NFTProviderType GetNFTProviderTypeFromProviderType(ProviderType providerType); | ||
ProviderType GetProviderTypeFromNFTProviderType(NFTProviderType nftProviderType); | ||
} | ||
} |
15 changes: 15 additions & 0 deletions
15
NextGenSoftware.OASIS.API.ONODE.Core/Interfaces/Objects/ICreateNftTransactionRequest.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 |
---|---|---|
@@ -0,0 +1,15 @@ | ||
using NextGenSoftware.OASIS.API.ONode.Core.Objects; | ||
|
||
namespace NextGenSoftware.OASIS.API.ONode.Core.Interfaces.Objects | ||
{ | ||
public interface ICreateNftTransactionRequest | ||
{ | ||
public NFTProviderType NFTProviderType { get; set; } | ||
public string MintWalletAddress { get; set; } | ||
public string FromWalletAddress { get; set; } | ||
public string ToWalletAddress { get; set; } | ||
public int Amount { get; set; } | ||
public string Token { get; set; } | ||
public string MemoText { get; set; } | ||
} | ||
} |
16 changes: 16 additions & 0 deletions
16
NextGenSoftware.OASIS.API.ONODE.Core/Interfaces/Objects/IPurchaseOlandRequest.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 |
---|---|---|
@@ -0,0 +1,16 @@ | ||
using NextGenSoftware.OASIS.API.Core.Enums; | ||
using System; | ||
using System.Collections.Generic; | ||
|
||
namespace NextGenSoftware.OASIS.API.ONode.Core.Interfaces.Objects | ||
{ | ||
public interface IPurchaseOlandRequest | ||
{ | ||
Guid AvatarId { get; set; } | ||
string AvatarUsername { get; set; } | ||
List<Guid> OlandIds { get; set; } | ||
ProviderType ProviderType { get; set; } | ||
string Tiles { get; set; } | ||
string WalletAddress { get; set; } | ||
} | ||
} |
12 changes: 12 additions & 0 deletions
12
NextGenSoftware.OASIS.API.ONODE.Core/Interfaces/Objects/IPurchaseOlandResponse.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 |
---|---|---|
@@ -0,0 +1,12 @@ | ||
using System; | ||
using System.Collections.Generic; | ||
|
||
namespace NextGenSoftware.OASIS.API.ONode.Core.Interfaces.Objects | ||
{ | ||
public interface IPurchaseOlandResponse | ||
{ | ||
List<Guid> OlandIds { get; set; } | ||
Guid OLandPurchaseId { get; set; } | ||
string TransactionHash { get; set; } | ||
} | ||
} |
Oops, something went wrong.