Skip to content

Commit 32d32b6

Browse files
committed
Upgraded NFTAPI to support CollectionPublicKey so nfts can be added to a parent collection. Also added WaitTillNFTVerified , WaitForNFTToVerifyInSeconds & AttemptToVerifyEveryXSeconds to the Web3NFTRequest.
1 parent ad69723 commit 32d32b6

18 files changed

Lines changed: 805 additions & 479 deletions

File tree

OASIS Architecture/NextGenSoftware.OASIS.API.Core/Interfaces/NFT/INFTBase.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ namespace NextGenSoftware.OASIS.API.Core.Interfaces.NFT
88
public interface INFTBase
99
{
1010
Guid Id { get; set; }
11+
public string CollectionPublicKey { get; set; }
1112
public string SendToAddressAfterMinting { get; set; }
1213
public Guid SendToAvatarAfterMintingId { get; set; } //If you want to send to an avatar at least one of these 3 fields needs to be specefied.
1314
public string SendToAvatarAfterMintingUsername { get; set; } //If you want to send to an avatar at least one of these 3 fields needs to be specefied.

OASIS Architecture/NextGenSoftware.OASIS.API.Core/Interfaces/NFT/IWeb3NFT.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,7 @@ public interface IWeb3NFT : INFTBase
77
{
88
Guid ParentWeb4NFTId { get; set; }
99
string MintTransactionHash { get; set; }
10+
string VerifyCollectionTransactionHash { get; set; }
1011
string SendNFTTransactionHash { get; set; }
1112
string NFTMintedUsingWalletAddress { get; set; }
1213
string NFTTokenAddress { get; set; }

OASIS Architecture/NextGenSoftware.OASIS.API.Core/Interfaces/NFT/Requests/IMintWeb3NFTRequest.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,6 +5,7 @@ namespace NextGenSoftware.OASIS.API.Core.Interfaces.NFT.Requests
55
//All properties are optional, if not provided the values defined in the parent WEB4 OASIS NFT will be used.
66
public interface IMintWeb3NFTRequest : IMintNFTRequestBase
77
{
8+
public string? CollectionPublicKey { get; set; }
89
NFTMetaDataMergeStrategy NFTMetaDataMergeStrategy { get; set; } //Defines how the Web3NFT meta data will be merged with the parent WEB4 OASIS NFT meta data.
910
NFTTagsMergeStrategy NFTTagsMergeStrategy { get; set; } //Defines how the Web3NFT tags will be merged with the parent WEB4 OASIS NFT tags.
1011
public int? NumberToMint { get; set; }
@@ -19,6 +20,9 @@ public interface IMintWeb3NFTRequest : IMintNFTRequestBase
1920
public bool? WaitTillNFTMinted { get; set; }
2021
public int? WaitForNFTToMintInSeconds { get; set; }
2122
public int ?AttemptToMintEveryXSeconds { get; set; }
23+
public bool? WaitTillNFTVerified { get; set; }
24+
public int? WaitForNFTToVerifyInSeconds { get; set; }
25+
public int? AttemptToVerifyEveryXSeconds { get; set; }
2226
public bool? WaitTillNFTSent { get; set; }
2327
public int? WaitForNFTToSendInSeconds { get; set; }
2428
public int? AttemptToSendEveryXSeconds { get; set; }

OASIS Architecture/NextGenSoftware.OASIS.API.Core/Interfaces/NFT/Requests/IMintWeb4NFTRequest.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ namespace NextGenSoftware.OASIS.API.Core.Interfaces.NFT.Requests
66
{
77
public interface IMintWeb4NFTRequest : IMintNFTRequestBase
88
{
9+
public string? CollectionPublicKey { get; set; }
910
IList<IMintWeb3NFTRequest> Web3NFTs { get; set; }
1011
public int NumberToMint { get; set; }
1112
public bool StoreNFTMetaDataOnChain { get; set; }

OASIS Architecture/NextGenSoftware.OASIS.API.Core/Interfaces/NFT/Responses/IWeb3NFTTransactionResponse.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,5 +5,6 @@ namespace NextGenSoftware.OASIS.API.Core.Interfaces.NFT.Responses
55
public interface IWeb3NFTTransactionResponse : ITransactionResponse
66
{
77
IWeb3NFT Web3NFT { get; set; }
8+
string VerifyCollectionTransactionHash { get; set; }
89
}
910
}

OASIS Architecture/NextGenSoftware.OASIS.API.Core/Objects/NFT/GeoSpatialNFT/Requests/MintAndPlaceWeb4GeoSpatialNFTRequest.cs

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ public class MintAndPlaceWeb4GeoSpatialNFTRequest : PlaceWeb4GeoSpatialNFTReques
1212
{
1313
//If c# supported multi-inheritence then we wouldnt need to include the mint props again here! ;-)
1414
//public string MintWalletAddress { get; set; } The address that will actually mint the NFT (i.e. pay the gas fees etc). This will use the built-in OASIS accounts defined in the Smart Contracts.
15-
15+
public string? CollectionPublicKey { get; set; }
1616
public IList<IMintWeb3NFTRequest> Web3NFTs { get; set; } = new List<IMintWeb3NFTRequest>();
1717

1818
public Guid MintedByAvatarId { get; set; }

OASIS Architecture/NextGenSoftware.OASIS.API.Core/Objects/NFT/NFTBase.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -9,6 +9,7 @@ namespace NextGenSoftware.OASIS.API.Core.Objects.NFT
99
public abstract class NFTBase : INFTBase
1010
{
1111
public Guid Id { get; set; }
12+
public string CollectionPublicKey { get; set; }
1213
public string SendToAddressAfterMinting { get; set; }
1314
public Guid SendToAvatarAfterMintingId { get; set; } //If you want to send to an avatar at least one of these 3 fields needs to be specefied.
1415
public string SendToAvatarAfterMintingUsername { get; set; } //If you want to send to an avatar at least one of these 3 fields needs to be specefied.

OASIS Architecture/NextGenSoftware.OASIS.API.Core/Objects/NFT/Requests/MintWeb3NFTRequest.cs

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,7 @@ namespace NextGenSoftware.OASIS.API.Core.Objects.NFT.Requests
66
//All properties are optional, if not provided the values defined in the parent WEB4 OASIS NFT will be used.
77
public class MintWeb3NFTRequest : MintNFTRequestBase, IMintWeb3NFTRequest
88
{
9+
public string? CollectionPublicKey { get; set; }
910
public decimal? Price { get; set; }
1011
public decimal? Discount { get; set; }
1112
public int? RoyaltyPercentage { get; set; }
@@ -23,6 +24,9 @@ public class MintWeb3NFTRequest : MintNFTRequestBase, IMintWeb3NFTRequest
2324
public bool? WaitTillNFTMinted { get; set; }
2425
public int? WaitForNFTToMintInSeconds { get; set; }
2526
public int? AttemptToMintEveryXSeconds { get; set; }
27+
public bool? WaitTillNFTVerified { get; set; }
28+
public int? WaitForNFTToVerifyInSeconds { get; set; }
29+
public int? AttemptToVerifyEveryXSeconds { get; set; }
2630
public bool? WaitTillNFTSent { get; set; }
2731
public int? WaitForNFTToSendInSeconds { get; set; }
2832
public int? AttemptToSendEveryXSeconds { get; set; }

OASIS Architecture/NextGenSoftware.OASIS.API.Core/Objects/NFT/Requests/MintWeb4NFTRequest.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,7 @@ namespace NextGenSoftware.OASIS.API.Core.Objects.NFT.Requests
88
//public class MintWeb4NFTRequest : NFTOptions, MintNFTRequestBase, IMintWeb4NFTRequest //TODO: If only c# supported multiple inheritance then we could do this way?
99
public class MintWeb4NFTRequest : MintNFTRequestBase, IMintWeb4NFTRequest
1010
{
11+
public string? CollectionPublicKey { get; set; }
1112
public IList<IMintWeb3NFTRequest> Web3NFTs { get; set; } = new List<IMintWeb3NFTRequest>();
1213
//Default Global NFT Properties (these will be applied to all Web3 NFTs being minted unless overridden in the individual Web3NFTs):
1314
public EnumValue<ProviderType> OffChainProvider { get; set; }

OASIS Architecture/NextGenSoftware.OASIS.API.Core/Objects/NFT/Responses/Web3NFTTransactionResponse.cs

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,5 +8,6 @@ public class Web3NFTTransactionResponse : TransactionResponse, IWeb3NFTTransacti
88
{
99
public IWeb3NFT Web3NFT { get; set; }
1010
public string SendNFTTransactionResult { get; set; }
11+
public string VerifyCollectionTransactionHash { get; set; }
1112
}
1213
}

0 commit comments

Comments
 (0)