diff --git a/NftFaucet/ApiClients/ICrustApiClient.cs b/NftFaucet/ApiClients/ICrustPinApiClient.cs similarity index 88% rename from NftFaucet/ApiClients/ICrustApiClient.cs rename to NftFaucet/ApiClients/ICrustPinApiClient.cs index e8c5b73..7264566 100644 --- a/NftFaucet/ApiClients/ICrustApiClient.cs +++ b/NftFaucet/ApiClients/ICrustPinApiClient.cs @@ -4,7 +4,7 @@ using RestEase; namespace NftFaucet.ApiClients; [BaseAddress("https://pin.crustcode.com")] -public interface ICrustApiClient +public interface ICrustPinApiClient { [Header("Authorization")] public string Auth { get; set; } diff --git a/NftFaucet/ApiClients/ICrustUploadApiClient.cs b/NftFaucet/ApiClients/ICrustUploadApiClient.cs new file mode 100644 index 0000000..5347284 --- /dev/null +++ b/NftFaucet/ApiClients/ICrustUploadApiClient.cs @@ -0,0 +1,14 @@ +using NftFaucet.ApiClients.Models; +using RestEase; + +namespace NftFaucet.ApiClients; + +[BaseAddress("https://gw.crustapps.net")] +public interface ICrustUploadApiClient +{ + [Header("Authorization")] + public string Auth { get; set; } + + [Post("api/v0/add")] + Task UploadFile([Body] MultipartContent content, [Query("pin")] bool pin = true); +} diff --git a/NftFaucet/ApiClients/IInfuraIpfsApiClient.cs b/NftFaucet/ApiClients/IInfuraIpfsApiClient.cs deleted file mode 100644 index 4546c66..0000000 --- a/NftFaucet/ApiClients/IInfuraIpfsApiClient.cs +++ /dev/null @@ -1,11 +0,0 @@ -using NftFaucet.ApiClients.Models; -using RestEase; - -namespace NftFaucet.ApiClients; - -[BaseAddress("https://ipfs.infura.io:5001")] -public interface IInfuraIpfsApiClient -{ - [Post("api/v0/add")] - Task UploadFile([Body] MultipartContent content, [Query("stream-channels")] bool streamChannels = true); -} diff --git a/NftFaucet/Models/Enums/IpfsGatewayType.cs b/NftFaucet/Models/Enums/IpfsGatewayType.cs index ba5dff0..00da954 100644 --- a/NftFaucet/Models/Enums/IpfsGatewayType.cs +++ b/NftFaucet/Models/Enums/IpfsGatewayType.cs @@ -4,7 +4,6 @@ public enum IpfsGatewayType : byte { None = 0, IpfsOfficial = 1, - Infura = 2, NftStorage = 3, Crust = 4, } diff --git a/NftFaucet/Models/StateStorage.cs b/NftFaucet/Models/StateStorage.cs index 59b6c28..c574ba7 100644 --- a/NftFaucet/Models/StateStorage.cs +++ b/NftFaucet/Models/StateStorage.cs @@ -6,7 +6,7 @@ public class StateStorage { public string TokenName { get; set; } public string TokenDescription { get; set; } - public IpfsGatewayType IpfsGatewayType { get; set; } = IpfsGatewayType.Infura; + public IpfsGatewayType IpfsGatewayType { get; set; } = IpfsGatewayType.Crust; public TokenType TokenType { get; set; } = TokenType.ERC721; public double TokenAmount { get; set; } = 1; public Uri LocalImageUrl { get; set; } diff --git a/NftFaucet/Pages/Step2Page.razor b/NftFaucet/Pages/Step2Page.razor index 6fd2b36..4c2a887 100644 --- a/NftFaucet/Pages/Step2Page.razor +++ b/NftFaucet/Pages/Step2Page.razor @@ -86,7 +86,7 @@