diff --git a/Source/Immutable/Immutable.Build.cs b/Source/Immutable/Immutable.Build.cs index 27b42bc..ff9ec68 100644 --- a/Source/Immutable/Immutable.Build.cs +++ b/Source/Immutable/Immutable.Build.cs @@ -34,6 +34,7 @@ public Immutable(ReadOnlyTargetRules Target) : base(Target) new string[] { "Core", + "JsonUtilities", // ... add other public dependencies that you statically link with here ... } ); @@ -47,7 +48,6 @@ public Immutable(ReadOnlyTargetRules Target) : base(Target) "Slate", "SlateCore", "Json", - "JsonUtilities", "UMG", "Projects", // ... add private dependencies that you statically link with here ... diff --git a/Source/Immutable/Private/Immutable/ImmutablePassport.cpp b/Source/Immutable/Private/Immutable/ImmutablePassport.cpp index cf9a410..260dbba 100644 --- a/Source/Immutable/Private/Immutable/ImmutablePassport.cpp +++ b/Source/Immutable/Private/Immutable/ImmutablePassport.cpp @@ -4,7 +4,7 @@ #include "Immutable/Misc/ImtblLogging.h" #include "Immutable/ImmutableResponses.h" -#include "ImtblJSConnector.h" +#include "Immutable/ImtblJSConnector.h" #include "JsonObjectConverter.h" #include "Immutable/ImmutableSaveGame.h" #include "Kismet/GameplayStatics.h" diff --git a/Source/Immutable/Private/Immutable/ImmutableRequests.cpp b/Source/Immutable/Private/Immutable/ImmutableRequests.cpp index d39d095..d932393 100644 --- a/Source/Immutable/Private/Immutable/ImmutableRequests.cpp +++ b/Source/Immutable/Private/Immutable/ImmutableRequests.cpp @@ -8,6 +8,24 @@ #include "Policies/CondensedJsonPrintPolicy.h" +FString FImxTransferRequest::ToJsonString() const +{ + FString OutString; + FJsonObjectWrapper Wrapper; + Wrapper.JsonObject = MakeShared(); + FJsonObjectConverter::UStructToJsonObject(StaticStruct(), this, Wrapper.JsonObject.ToSharedRef(), 0, 0); + + if (!Wrapper.JsonObject.IsValid()) + { + IMTBL_ERR("Could not convert FImxTransferRequest to JSON") + return ""; + } + + Wrapper.JsonObjectToString(OutString); + + return OutString; +} + FString FImxBatchNftTransferRequest::ToJsonString() const { FString OutString; diff --git a/Source/Immutable/Private/Immutable/ImmutableSubsystem.cpp b/Source/Immutable/Private/Immutable/ImmutableSubsystem.cpp index 2bcb0c7..8e17b74 100644 --- a/Source/Immutable/Private/Immutable/ImmutableSubsystem.cpp +++ b/Source/Immutable/Private/Immutable/ImmutableSubsystem.cpp @@ -7,7 +7,7 @@ #include "Immutable/Misc/ImtblLogging.h" #include "ImtblBlui.h" #include "ImtblBrowserUserWidget.h" -#include "ImtblJSConnector.h" +#include "Immutable/ImtblJSConnector.h" UImmutableSubsystem::UImmutableSubsystem() { IMTBL_LOG_FUNCSIG } diff --git a/Source/Immutable/Private/Immutable/ImtblBlui.cpp b/Source/Immutable/Private/Immutable/ImtblBlui.cpp index 4228747..f3d903e 100644 --- a/Source/Immutable/Private/Immutable/ImtblBlui.cpp +++ b/Source/Immutable/Private/Immutable/ImtblBlui.cpp @@ -3,7 +3,7 @@ #include "ImtblBlui.h" #include "Immutable/Assets/ImtblSDKResource.h" #include "Immutable/Misc/ImtblLogging.h" -#include "ImtblJSConnector.h" +#include "Immutable/ImtblJSConnector.h" #include #if USING_BLUI_CEF diff --git a/Source/Immutable/Private/Immutable/ImtblBrowserUserWidget.cpp b/Source/Immutable/Private/Immutable/ImtblBrowserUserWidget.cpp index 16cc8ef..a5f979a 100644 --- a/Source/Immutable/Private/Immutable/ImtblBrowserUserWidget.cpp +++ b/Source/Immutable/Private/Immutable/ImtblBrowserUserWidget.cpp @@ -10,7 +10,7 @@ #include "Components/ScaleBoxSlot.h" #include "Immutable/Misc/ImtblLogging.h" #include "ImtblBrowserWidget.h" -#include "ImtblJSConnector.h" +#include "Immutable/ImtblJSConnector.h" TSharedRef UImtblBrowserUserWidget::RebuildWidget() { diff --git a/Source/Immutable/Private/Immutable/ImtblBrowserWidget.cpp b/Source/Immutable/Private/Immutable/ImtblBrowserWidget.cpp index 64dfddd..3e77e27 100644 --- a/Source/Immutable/Private/Immutable/ImtblBrowserWidget.cpp +++ b/Source/Immutable/Private/Immutable/ImtblBrowserWidget.cpp @@ -3,7 +3,7 @@ #include "ImtblBrowserWidget.h" #include "Immutable/Misc/ImtblLogging.h" -#include "ImtblJSConnector.h" +#include "Immutable/ImtblJSConnector.h" #if USING_BUNDLED_CEF #include "SWebBrowser.h" #endif diff --git a/Source/Immutable/Private/Immutable/ImtblJSConnector.cpp b/Source/Immutable/Private/Immutable/ImtblJSConnector.cpp index 434f3db..b5747c8 100644 --- a/Source/Immutable/Private/Immutable/ImtblJSConnector.cpp +++ b/Source/Immutable/Private/Immutable/ImtblJSConnector.cpp @@ -1,10 +1,10 @@ // Fill out your copyright notice in the Description page of Project Settings. -#include "ImtblJSConnector.h" +#include "Immutable/ImtblJSConnector.h" #include "Immutable/Misc/ImtblLogging.h" #include "ImtblBrowserWidget.h" -#include "ImtblJSMessages.h" +#include "Immutable/ImtblJSMessages.h" UImtblJSConnector::UImtblJSConnector() { IMTBL_LOG_FUNCSIG } diff --git a/Source/Immutable/Public/Immutable/ImmutableDataTypes.h b/Source/Immutable/Public/Immutable/ImmutableDataTypes.h index 2f20e8b..6fbcff4 100644 --- a/Source/Immutable/Public/Immutable/ImmutableDataTypes.h +++ b/Source/Immutable/Public/Immutable/ImmutableDataTypes.h @@ -33,7 +33,7 @@ struct FImmutableEngineVersionData }; USTRUCT() -struct FImmutablePassportInitData +struct IMMUTABLE_API FImmutablePassportInitData { GENERATED_BODY() @@ -104,7 +104,7 @@ struct FImmutablePassportZkEvmRequestAccountsData }; USTRUCT() -struct FImmutablePassportZkEvmGetBalanceData +struct IMMUTABLE_API FImmutablePassportZkEvmGetBalanceData { GENERATED_BODY() @@ -145,7 +145,7 @@ struct FImmutablePassportConnectPKCEData }; USTRUCT() -struct FImmutablePassportResult +struct IMMUTABLE_API FImmutablePassportResult { GENERATED_BODY() diff --git a/Source/Immutable/Public/Immutable/ImmutableRequests.h b/Source/Immutable/Public/Immutable/ImmutableRequests.h index 9ee27b3..42d0a95 100644 --- a/Source/Immutable/Public/Immutable/ImmutableRequests.h +++ b/Source/Immutable/Public/Immutable/ImmutableRequests.h @@ -5,7 +5,7 @@ USTRUCT(BlueprintType) -struct FImtblTransactionRequest +struct IMMUTABLE_API FImtblTransactionRequest { GENERATED_BODY() @@ -20,7 +20,7 @@ struct FImtblTransactionRequest }; USTRUCT() -struct FImxTransferRequest +struct IMMUTABLE_API FImxTransferRequest { GENERATED_BODY() @@ -43,7 +43,7 @@ struct FImxTransferRequest }; USTRUCT() -struct FImxBatchNftTransferRequest +struct IMMUTABLE_API FImxBatchNftTransferRequest { GENERATED_BODY() diff --git a/Source/Immutable/Private/Immutable/ImtblJSConnector.h b/Source/Immutable/Public/Immutable/ImtblJSConnector.h similarity index 100% rename from Source/Immutable/Private/Immutable/ImtblJSConnector.h rename to Source/Immutable/Public/Immutable/ImtblJSConnector.h diff --git a/Source/Immutable/Private/Immutable/ImtblJSMessages.h b/Source/Immutable/Public/Immutable/ImtblJSMessages.h similarity index 97% rename from Source/Immutable/Private/Immutable/ImtblJSMessages.h rename to Source/Immutable/Public/Immutable/ImtblJSMessages.h index bd5cc0f..93aad8b 100644 --- a/Source/Immutable/Private/Immutable/ImtblJSMessages.h +++ b/Source/Immutable/Public/Immutable/ImtblJSMessages.h @@ -25,7 +25,7 @@ enum class EImtblPassportError : int8 }; USTRUCT() -struct FImtblResponseError +struct IMMUTABLE_API FImtblResponseError { GENERATED_BODY() @@ -43,7 +43,7 @@ struct FImtblResponseError }; USTRUCT() -struct FImtblJSRequest +struct IMMUTABLE_API FImtblJSRequest { GENERATED_BODY()