diff --git a/.github/ISSUE_TEMPLATE/1-bug-report.yml b/.github/ISSUE_TEMPLATE/1-bug-report.yml deleted file mode 100644 index e72c6c7..0000000 --- a/.github/ISSUE_TEMPLATE/1-bug-report.yml +++ /dev/null @@ -1,124 +0,0 @@ -name: Bug Report -description: File a bug report. -title: "[BUG]: " -labels: ["bug", "triage"] -projects: [] -assignees: - - dirtycajunrice -body: - - type: markdown - attributes: - value: | - Thanks for taking the time to fill out this bug report! - - type: input - id: contact - attributes: - label: Contact Details - description: How can we get in touch with you if we need more info? - placeholder: ex. email@example.com - validations: - required: false - - type: textarea - id: what-happened - attributes: - label: What happened? - description: There is no such thing as too much detail! - placeholder: Tell us what you see! - validations: - required: true - - type: textarea - id: reproduction-steps - attributes: - label: Reproduction Steps - description: Steps to reproduce the behavior - placeholder: > - 1. Go to '...' - 2. Click on '....' - 3. Scroll down to '....' - 4. See error - validations: - required: true - - type: textarea - id: what-should-have-happened - attributes: - label: What did you expect to happen? - description: A clear and concise description of what you expected to happen. - placeholder: When i used , i expected to get after checking ... - validations: - required: true - - type: dropdown - id: plugin-version - attributes: - label: Plugin Version - description: What version of the plugin are you running? - options: - - v1.8.0-dev - - v1.7.0 - - v1.6.0 - - v1.5.0 - - v1.4.0 - validations: - required: true - - type: dropdown - id: plugin-source - attributes: - label: Plugin Source - description: Where get you get the plugin from? - options: - - Fab Marketplace - - Github - validations: - required: true - - type: dropdown - id: unreal-engine-version - attributes: - label: Unreal Engine Version - description: What version of Unreal Engine are you running? - options: - - 5.5 - - 5.4 - - 5.3 - - 5.2 - - 5.1 - - 5.0 - validations: - required: true - - type: dropdown - id: unreal-engine-source - attributes: - label: Unreal Engine Source - description: What source did you install unreal engine from? - options: - - Epic Games Launcher - - GitHub - validations: - required: true - - type: dropdown - id: project-type - attributes: - label: Project Type - description: What type of project are you developing with? - options: - - Blueprint-Only - - C++ - validations: - required: true - - type: textarea - id: logs - attributes: - label: Relevant log output - description: Please copy and paste any relevant log output. This will be automatically formatted into code, so no need for backticks. - render: shell - - type: textarea - id: screenshots - attributes: - label: Screenshots - description: If applicable, add screenshots to help explain your problem. - - type: checkboxes - id: terms - attributes: - label: Code of Conduct - description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/thirdweb-dev/unreal-sdk/.github/CODE_OF_CONDUCT.md). - options: - - label: I agree to follow this project's Code of Conduct - required: true \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/2-feature-request.yml b/.github/ISSUE_TEMPLATE/2-feature-request.yml deleted file mode 100644 index 95a08fe..0000000 --- a/.github/ISSUE_TEMPLATE/2-feature-request.yml +++ /dev/null @@ -1,114 +0,0 @@ -name: Feature Request -description: Suggest an idea or enhancement -title: "[FEAT]: " -labels: ["enhancement", "triage"] -projects: [] -assignees: - - dirtycajunrice -body: - - type: markdown - attributes: - value: | - Thanks for taking the time to fill out this feature request! - - type: input - id: contact - attributes: - label: Contact Details - description: How can we get in touch with you if we need more info? - placeholder: ex. email@example.com - validations: - required: false - - type: textarea - id: related - attributes: - label: Is your feature request related to a problem? - description: A clear and concise description of what the problem is - placeholder: I'm always frustrated when [...] - validations: - required: true - - type: textarea - id: solution - attributes: - label: Describe the solution you'd like - description: A clear and concise description of what you want to happen - placeholder: I would love to be able to [...] - validations: - required: true - - type: textarea - id: alternatives - attributes: - label: Describe alternatives you've considered - description: A clear and concise description of any alternative solutions or features you've considered. - placeholder: I tried to do [...] but it doesn't accomplish [...] - validations: - required: true - - type: dropdown - id: plugin-version - attributes: - label: Plugin Version - description: What version of the plugin are you running? - options: - - v1.8.0-dev - - v1.7.0 - - v1.6.0 - - v1.5.0 - - v1.4.0 - validations: - required: true - - type: dropdown - id: plugin-source - attributes: - label: Plugin Source - description: Where get you get the plugin from? - options: - - Fab Marketplace - - Github - validations: - required: true - - type: dropdown - id: unreal-engine-version - attributes: - label: Unreal Engine Version - description: What version of Unreal Engine are you running? - options: - - 5.5 - - 5.4 - - 5.3 - - 5.2 - - 5.1 - - 5.0 - validations: - required: true - - type: dropdown - id: unreal-engine-source - attributes: - label: Unreal Engine Source - description: What source did you install unreal engine from? - options: - - Epic Games Launcher - - GitHub - validations: - required: true - - type: dropdown - id: project-type - attributes: - label: Project Type - description: What type of project are you developing with? - options: - - Blueprint-Only - - C++ - validations: - required: true - - type: textarea - id: additional-context - attributes: - label: Additional context - description: Add any other context or screenshots about the feature request here. - - type: checkboxes - id: terms - attributes: - label: Code of Conduct - description: By submitting this issue, you agree to follow our [Code of Conduct](https://github.com/thirdweb-dev/unreal-sdk/.github/CODE_OF_CONDUCT.md). - options: - - label: I agree to follow this project's Code of Conduct - required: true \ No newline at end of file diff --git a/.github/ISSUE_TEMPLATE/config.yml b/.github/ISSUE_TEMPLATE/config.yml deleted file mode 100644 index b9fe905..0000000 --- a/.github/ISSUE_TEMPLATE/config.yml +++ /dev/null @@ -1,11 +0,0 @@ -lank_issues_enabled: false -contact_links: - - name: Thirdweb Official Support - url: https://thirdweb.com/support - about: You can alternatively get support through our traditional support system - - name: Discord Server - url: https://portal.thirdweb.com/unreal-engine - about: A great place for community support - - name: Plugin Documentation - url: https://portal.thirdweb.com/unreal-engine - about: Your go-to for plugin docs \ No newline at end of file diff --git a/Content/Defaults/WBP_Thirdweb_OAuthOverlay.uasset b/Content/Defaults/WBP_Thirdweb_OAuthOverlay.uasset index b0efd51..ebdb57f 100644 Binary files a/Content/Defaults/WBP_Thirdweb_OAuthOverlay.uasset and b/Content/Defaults/WBP_Thirdweb_OAuthOverlay.uasset differ diff --git a/Content/Examples/NodeDocs/Thirdweb_AllNodes.uasset b/Content/Examples/NodeDocs/Thirdweb_AllNodes.uasset index 661f474..773e7df 100644 Binary files a/Content/Examples/NodeDocs/Thirdweb_AllNodes.uasset and b/Content/Examples/NodeDocs/Thirdweb_AllNodes.uasset differ diff --git a/Content/Examples/Widgets/BP_Thirdweb_OTPVerifyModal.uasset b/Content/Examples/Widgets/BP_Thirdweb_OTPVerifyModal.uasset index 3854142..08c5005 100644 Binary files a/Content/Examples/Widgets/BP_Thirdweb_OTPVerifyModal.uasset and b/Content/Examples/Widgets/BP_Thirdweb_OTPVerifyModal.uasset differ diff --git a/Content/Examples/Widgets/Components/WBP_CountryCodeComboBox.uasset b/Content/Examples/Widgets/Components/WBP_CountryCodeComboBox.uasset index ffcb169..0286c60 100644 Binary files a/Content/Examples/Widgets/Components/WBP_CountryCodeComboBox.uasset and b/Content/Examples/Widgets/Components/WBP_CountryCodeComboBox.uasset differ diff --git a/Content/Examples/Widgets/Components/WBP_WalletSourceTab.uasset b/Content/Examples/Widgets/Components/WBP_WalletSourceTab.uasset index d2e2d66..eca95cb 100644 Binary files a/Content/Examples/Widgets/Components/WBP_WalletSourceTab.uasset and b/Content/Examples/Widgets/Components/WBP_WalletSourceTab.uasset differ diff --git a/Content/Examples/Widgets/Components/WBP_WalletSourceTabs.uasset b/Content/Examples/Widgets/Components/WBP_WalletSourceTabs.uasset index 4b355ff..211fe9e 100644 Binary files a/Content/Examples/Widgets/Components/WBP_WalletSourceTabs.uasset and b/Content/Examples/Widgets/Components/WBP_WalletSourceTabs.uasset differ diff --git a/Content/Examples/Widgets/WBP_Thirdweb_Guest.uasset b/Content/Examples/Widgets/WBP_Thirdweb_Guest.uasset index 8201119..ad21874 100644 Binary files a/Content/Examples/Widgets/WBP_Thirdweb_Guest.uasset and b/Content/Examples/Widgets/WBP_Thirdweb_Guest.uasset differ diff --git a/Content/Examples/Widgets/WBP_Thirdweb_InApp.uasset b/Content/Examples/Widgets/WBP_Thirdweb_InApp.uasset index 78cc2ce..7500518 100644 Binary files a/Content/Examples/Widgets/WBP_Thirdweb_InApp.uasset and b/Content/Examples/Widgets/WBP_Thirdweb_InApp.uasset differ diff --git a/Content/Examples/Widgets/WBP_Thirdweb_Smart.uasset b/Content/Examples/Widgets/WBP_Thirdweb_Smart.uasset index 1358ea2..00c24b4 100644 Binary files a/Content/Examples/Widgets/WBP_Thirdweb_Smart.uasset and b/Content/Examples/Widgets/WBP_Thirdweb_Smart.uasset differ diff --git a/Content/Examples/Widgets/WBP_Thirdweb_UI.uasset b/Content/Examples/Widgets/WBP_Thirdweb_UI.uasset index ebd497c..f29d53d 100644 Binary files a/Content/Examples/Widgets/WBP_Thirdweb_UI.uasset and b/Content/Examples/Widgets/WBP_Thirdweb_UI.uasset differ diff --git a/README.md b/README.md index 83e8545..e395cda 100644 --- a/README.md +++ b/README.md @@ -27,19 +27,7 @@ The plugin's core logic is built from Rust, making it lightning-fast and minimiz ## Packaging -Windows, Linux, and Android all package natively and can be used in blueprint-only projects - -### Mac - -The plugin currently makes use of the [Web Browser][web-browser-doc] runtime module which bundles [CEF3][cef-forum]. -Changes to the engine are currently required for modern xcode targets as Unreal Engine does not properly link -the framework during packaging. This requires either an engine patch or moving the framework post-build and -then codesigning your build again. - -In the [CEF3.build.cs][cef3-build-cs] you need to bypass the `if` check for modern xcode. This can be accomplished by -adding `|| true` to the end of the if check on line 102. - -Additionally, you need to add `bCompileCEF3 = true;` to your build target +Windows, Linux, Mac and Android all package natively and can be used in blueprint-only projects ## Supported Platforms & Architectures @@ -57,13 +45,10 @@ Legend: ✅ Supported | ❌ Unsupported | ➖ Not applicable ## Documentation -Documentation is available at https://portal.thirdweb.com/unreal +Documentation is available at https://portal.thirdweb.com/unreal-engine [^1]: Unreal Engine's Marketplace Guidelines - Section 3.1.b https://www.unrealengine.com/en-US/marketplace-guidelines#31b [support-url]: https://thirdweb.com/support [documentation-url]: https://portal.thirdweb.com/unreal [marketplace-url]: https://www.unrealengine.com/marketplace/en-US/product/f21200c2610146f3888172994448e50d -[web-browser-doc]: https://dev.epicgames.com/documentation/en-us/unreal-engine/API/Runtime/WebBrowser -[cef-forum]: https://www.magpcss.org/ceforum/index.php -[cef3-build-cs]: https://github.com/EpicGames/UnrealEngine/blob/release/Engine/Source/ThirdParty/CEF3/CEF3.build.cs#L102 diff --git a/Source/ThirdParty/Android/libthirdweb.a b/Source/ThirdParty/Android/libthirdweb.a index a1cf3b2..2ea349b 100644 --- a/Source/ThirdParty/Android/libthirdweb.a +++ b/Source/ThirdParty/Android/libthirdweb.a @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:94a0fdc0cc6b30ea32c43b92f09f90ec35a37d2a06c47d47408779af8815adaa -size 91787038 +oid sha256:056c00ddfd76dee8d0c31239b5af243858b15f2cbad07c332fea7cf0d70ef659 +size 93481712 diff --git a/Source/ThirdParty/IOS/libthirdweb.a b/Source/ThirdParty/IOS/libthirdweb.a index 5737417..641f804 100644 --- a/Source/ThirdParty/IOS/libthirdweb.a +++ b/Source/ThirdParty/IOS/libthirdweb.a @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:c522cd478144b864a56b8b6104ebd00b1a513a7e0a7318eb4f0f5b7ef7104042 -size 61882640 +oid sha256:1c61320521b2022045b2291463ea2c1b4acac6d6239bc8a5e36dc80282cb8c9f +size 62593328 diff --git a/Source/ThirdParty/IOS/libthirdweb.sim.a b/Source/ThirdParty/IOS/libthirdweb.sim.a index 242c976..b69ddf0 100644 --- a/Source/ThirdParty/IOS/libthirdweb.sim.a +++ b/Source/ThirdParty/IOS/libthirdweb.sim.a @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:9b732291859c3fe4881cafdbfec2f66f776cc837e5333a5ceb78cda3e3786458 -size 61751072 +oid sha256:a0bee88f27117397788e2040c839328b0fc485e7e0304b69dc27aa402db6f5c3 +size 62558992 diff --git a/Source/ThirdParty/Linux/libthirdweb.a b/Source/ThirdParty/Linux/libthirdweb.a index 75915cf..517c474 100644 --- a/Source/ThirdParty/Linux/libthirdweb.a +++ b/Source/ThirdParty/Linux/libthirdweb.a @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:8a5457f4b833a1455b61b399194ee46ba97139b1940c9e9f75fc73afd935bb60 -size 94684478 +oid sha256:a16c6464c34544afe54f6d0e0d3838fade18af14979945ef09e60352ea9baa63 +size 95689318 diff --git a/Source/ThirdParty/LinuxArm64/libthirdweb.a b/Source/ThirdParty/LinuxArm64/libthirdweb.a index ffe366b..838940d 100644 --- a/Source/ThirdParty/LinuxArm64/libthirdweb.a +++ b/Source/ThirdParty/LinuxArm64/libthirdweb.a @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:db2818e3466200d1c5f0932c603e4b6387b527fccbbb6a7606b7fdc58f5fa3ed -size 94829242 +oid sha256:7cb99e0d68f73a92e4631e97d309ea4e9cd26460d23e2a621f53962a65fe184a +size 96214110 diff --git a/Source/ThirdParty/Mac/libthirdweb.a b/Source/ThirdParty/Mac/libthirdweb.a index 95b4a61..e0e3080 100644 --- a/Source/ThirdParty/Mac/libthirdweb.a +++ b/Source/ThirdParty/Mac/libthirdweb.a @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:bbb4e43a6b8e46c29798ac0a59de4271202275053e1a1a09e3a8036bf22abcbb -size 124142080 +oid sha256:c49c69b3148caab253c915a269b600714325127721d30099fdf092432109b5f6 +size 125521640 diff --git a/Source/ThirdParty/Win64/libthirdweb.lib b/Source/ThirdParty/Win64/libthirdweb.lib index 824b36c..fe476eb 100644 --- a/Source/ThirdParty/Win64/libthirdweb.lib +++ b/Source/ThirdParty/Win64/libthirdweb.lib @@ -1,3 +1,3 @@ version https://git-lfs.github.com/spec/v1 -oid sha256:edc8ca7017f5fa09dd015e54e64d7d6f8c4953ac0d80ef35ed04e173236fd511 -size 95627746 +oid sha256:b0204e1e9eb6ff13e36573452e7ac7e233fe8eb474b28647b66436da70bb4f2a +size 96724220 diff --git a/Source/Thirdweb/Private/AsyncTasks/AsyncTaskThirdwebBase.cpp b/Source/Thirdweb/Private/AsyncTasks/AsyncTaskThirdwebBase.cpp index fc13407..2f96489 100644 --- a/Source/Thirdweb/Private/AsyncTasks/AsyncTaskThirdwebBase.cpp +++ b/Source/Thirdweb/Private/AsyncTasks/AsyncTaskThirdwebBase.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "AsyncTasks/AsyncTaskThirdwebBase.h" diff --git a/Source/Thirdweb/Private/AsyncTasks/Engine/Contract/AsyncTaskContractReadContract.cpp b/Source/Thirdweb/Private/AsyncTasks/Engine/Contract/AsyncTaskContractReadContract.cpp index e07e406..f184840 100644 --- a/Source/Thirdweb/Private/AsyncTasks/Engine/Contract/AsyncTaskContractReadContract.cpp +++ b/Source/Thirdweb/Private/AsyncTasks/Engine/Contract/AsyncTaskContractReadContract.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "AsyncTasks/Engine/Contract/AsyncTaskContractReadContract.h" diff --git a/Source/Thirdweb/Private/AsyncTasks/Engine/Contract/AsyncTaskContractWriteContract.cpp b/Source/Thirdweb/Private/AsyncTasks/Engine/Contract/AsyncTaskContractWriteContract.cpp index 8a0b285..e880d25 100644 --- a/Source/Thirdweb/Private/AsyncTasks/Engine/Contract/AsyncTaskContractWriteContract.cpp +++ b/Source/Thirdweb/Private/AsyncTasks/Engine/Contract/AsyncTaskContractWriteContract.cpp @@ -1,7 +1,11 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "AsyncTasks/Engine/Contract/AsyncTaskContractWriteContract.h" +#include "JsonObjectWrapper.h" +#include "RHITransientResourceAllocator.h" +#include "ThirdwebRuntimeSettings.h" +#include "ThirdwebUtils.h" #include "Components/SlateWrapperTypes.h" #include "Engine/ThirdwebEngine.h" @@ -11,26 +15,47 @@ UAsyncTaskContractWriteContract* UAsyncTaskContractWriteContract::WriteContract( const FString& ContractAddress, const FString& BackendWalletAddress, const FSmartWalletHandle& SmartWallet, - const FString& FactoryAddress, const FString& IdempotencyKey, const FString& FunctionName, const TArray& Args, const FThirdwebEngineTransactionOverrides& TxOverrides, const FString& Abi, - const bool bSimulateTx) + const bool bSimulateTx +) +{ + FJsonObjectWrapper JsonObjectWrapper = FJsonObjectWrapper(); + JsonObjectWrapper.JsonObject->SetStringField(TEXT("functionName"), FunctionName.TrimStartAndEnd()); + JsonObjectWrapper.JsonObject->SetArrayField(TEXT("args"), ThirdwebUtils::Json::ToJsonArray(Args)); + if (!TxOverrides.IsDefault()) + { + JsonObjectWrapper.JsonObject->SetObjectField(TEXT("txOverrides"), TxOverrides.ToJson()); + } + if (!Abi.IsEmpty()) + { + JsonObjectWrapper.JsonObject->SetArrayField(TEXT("abi"), ThirdwebUtils::Json::ToJsonArray(Abi)); + } + return WriteContractRaw(WorldContextObject, ChainId, ContractAddress, BackendWalletAddress, SmartWallet, IdempotencyKey, JsonObjectWrapper, bSimulateTx); +} + +UAsyncTaskContractWriteContract* UAsyncTaskContractWriteContract::WriteContractRaw( + UObject* WorldContextObject, + const int64 ChainId, + const FString& ContractAddress, + const FString& BackendWalletAddress, + const FSmartWalletHandle& SmartWallet, + const FString& IdempotencyKey, + const FJsonObjectWrapper& Data, + const bool bSimulateTx +) { NEW_TASK Task->ChainId = ChainId; Task->ContractAddress = ContractAddress.TrimStartAndEnd(); Task->BackendWalletAddress = BackendWalletAddress.TrimStartAndEnd(); Task->SmartWallet = SmartWallet; - Task->FactoryAddress = FactoryAddress.TrimStartAndEnd(); Task->IdempotencyKey = IdempotencyKey.TrimStartAndEnd(); - Task->FunctionName = FunctionName.TrimStartAndEnd(); - Task->Args = Args; - Task->TxOverrides = TxOverrides; - Task->Abi = Abi.TrimStartAndEnd(); Task->bSimulateTx = bSimulateTx; + Task->Data = Data.JsonObject; RR_TASK } @@ -42,13 +67,9 @@ void UAsyncTaskContractWriteContract::Activate() ContractAddress, BackendWalletAddress, SmartWallet, - FactoryAddress, IdempotencyKey, - FunctionName, - Args, - TxOverrides, - Abi, bSimulateTx, + Data, BIND_UOBJECT_DELEGATE(FStringDelegate, HandleResponse), BIND_UOBJECT_DELEGATE(FStringDelegate, HandleFailed) ); diff --git a/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/AsyncTaskMarketplacePostBase.cpp b/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/AsyncTaskMarketplacePostBase.cpp index 1e8563f..1a703f3 100644 --- a/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/AsyncTaskMarketplacePostBase.cpp +++ b/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/AsyncTaskMarketplacePostBase.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "AsyncTasks/Engine/Marketplace/AsyncTaskMarketplacePostBase.h" diff --git a/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsApproveReservedBuyer.cpp b/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsApproveReservedBuyer.cpp index a7e8932..94bd091 100644 --- a/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsApproveReservedBuyer.cpp +++ b/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsApproveReservedBuyer.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsApproveReservedBuyer.h" diff --git a/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsBuy.cpp b/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsBuy.cpp index 823ea2c..e7c7608 100644 --- a/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsBuy.cpp +++ b/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsBuy.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsBuy.h" diff --git a/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsCancel.cpp b/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsCancel.cpp index c12fb8b..eed88f9 100644 --- a/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsCancel.cpp +++ b/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsCancel.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsCancel.h" diff --git a/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsCreate.cpp b/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsCreate.cpp index d8e6d70..e2f4033 100644 --- a/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsCreate.cpp +++ b/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsCreate.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsCreate.h" diff --git a/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsGet.cpp b/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsGet.cpp index 8a27922..e6b8775 100644 --- a/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsGet.cpp +++ b/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsGet.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsGet.h" diff --git a/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsGetAll.cpp b/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsGetAll.cpp index eaab275..1355c11 100644 --- a/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsGetAll.cpp +++ b/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsGetAll.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsGetAll.h" diff --git a/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsGetTotalCount.cpp b/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsGetTotalCount.cpp index 1a0c893..62e50f8 100644 --- a/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsGetTotalCount.cpp +++ b/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsGetTotalCount.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsGetTotalCount.h" diff --git a/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsIsBuyerApproved.cpp b/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsIsBuyerApproved.cpp index 45daddd..593e04f 100644 --- a/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsIsBuyerApproved.cpp +++ b/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsIsBuyerApproved.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsIsBuyerApproved.h" diff --git a/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsIsCurrencyApproved.cpp b/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsIsCurrencyApproved.cpp index 81fda83..058a96a 100644 --- a/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsIsCurrencyApproved.cpp +++ b/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsIsCurrencyApproved.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsIsCurrencyApproved.h" diff --git a/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsRevokeReservedBuyerApproval.cpp b/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsRevokeReservedBuyerApproval.cpp index 3be2248..c4a185d 100644 --- a/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsRevokeReservedBuyerApproval.cpp +++ b/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsRevokeReservedBuyerApproval.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsRevokeReservedBuyerApproval.h" diff --git a/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsRevokeReservedCurrencyApproval.cpp b/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsRevokeReservedCurrencyApproval.cpp index e7d8812..5bca96a 100644 --- a/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsRevokeReservedCurrencyApproval.cpp +++ b/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsRevokeReservedCurrencyApproval.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsRevokeReservedCurrencyApproval.h" diff --git a/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsUpdate.cpp b/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsUpdate.cpp index d4d2c5d..44cbdb8 100644 --- a/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsUpdate.cpp +++ b/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsUpdate.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsUpdate.h" diff --git a/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsBid.cpp b/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsBid.cpp index d84ade2..0f0cbd3 100644 --- a/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsBid.cpp +++ b/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsBid.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsBid.h" diff --git a/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsBuyout.cpp b/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsBuyout.cpp index 160f067..0807be7 100644 --- a/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsBuyout.cpp +++ b/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsBuyout.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsBuyout.h" diff --git a/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsCancel.cpp b/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsCancel.cpp index 883216b..6868e77 100644 --- a/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsCancel.cpp +++ b/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsCancel.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsCancel.h" diff --git a/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsCloseForBidder.cpp b/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsCloseForBidder.cpp index 612e906..496fc2a 100644 --- a/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsCloseForBidder.cpp +++ b/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsCloseForBidder.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsCloseForBidder.h" diff --git a/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsCloseForSeller.cpp b/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsCloseForSeller.cpp index f51f53b..af9f949 100644 --- a/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsCloseForSeller.cpp +++ b/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsCloseForSeller.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsCloseForSeller.h" diff --git a/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsCreate.cpp b/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsCreate.cpp index 405eb81..f6abdec 100644 --- a/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsCreate.cpp +++ b/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsCreate.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsCreate.h" diff --git a/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsExecuteSale.cpp b/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsExecuteSale.cpp index 22c8133..7228e8d 100644 --- a/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsExecuteSale.cpp +++ b/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsExecuteSale.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsExecuteSale.h" diff --git a/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsGet.cpp b/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsGet.cpp index 86a82d1..ad99009 100644 --- a/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsGet.cpp +++ b/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsGet.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsGet.h" diff --git a/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsGetAll.cpp b/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsGetAll.cpp index a7fd079..b315efd 100644 --- a/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsGetAll.cpp +++ b/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsGetAll.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsGetAll.h" diff --git a/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsGetBidBufferBps.cpp b/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsGetBidBufferBps.cpp index aa85d09..a5b3a87 100644 --- a/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsGetBidBufferBps.cpp +++ b/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsGetBidBufferBps.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsGetBidBufferBps.h" diff --git a/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsGetMinimumNextBid.cpp b/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsGetMinimumNextBid.cpp index ba40bf9..72026a8 100644 --- a/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsGetMinimumNextBid.cpp +++ b/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsGetMinimumNextBid.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsGetMinimumNextBid.h" diff --git a/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsGetTotalCount.cpp b/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsGetTotalCount.cpp index 57ec449..368122f 100644 --- a/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsGetTotalCount.cpp +++ b/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsGetTotalCount.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsGetTotalCount.h" diff --git a/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsGetWinner.cpp b/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsGetWinner.cpp index ae38300..dc4e6dc 100644 --- a/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsGetWinner.cpp +++ b/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsGetWinner.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsGetWinner.h" diff --git a/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsGetWinningBid.cpp b/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsGetWinningBid.cpp index 447601e..be6a80e 100644 --- a/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsGetWinningBid.cpp +++ b/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsGetWinningBid.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsGetWinningBid.h" diff --git a/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsIsWinningBid.cpp b/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsIsWinningBid.cpp index 9d28b7c..dea2ba6 100644 --- a/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsIsWinningBid.cpp +++ b/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsIsWinningBid.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsIsWinningBid.h" diff --git a/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/Offers/AsyncTaskOffersAccept.cpp b/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/Offers/AsyncTaskOffersAccept.cpp index c59dc33..52ed4b5 100644 --- a/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/Offers/AsyncTaskOffersAccept.cpp +++ b/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/Offers/AsyncTaskOffersAccept.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "AsyncTasks/Engine/Marketplace/Offers/AsyncTaskOffersAccept.h" diff --git a/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/Offers/AsyncTaskOffersCancel.cpp b/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/Offers/AsyncTaskOffersCancel.cpp index 514c227..1e35cdc 100644 --- a/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/Offers/AsyncTaskOffersCancel.cpp +++ b/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/Offers/AsyncTaskOffersCancel.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "AsyncTasks/Engine/Marketplace/Offers/AsyncTaskOffersCancel.h" diff --git a/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/Offers/AsyncTaskOffersGet.cpp b/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/Offers/AsyncTaskOffersGet.cpp index 94b6153..e911bf9 100644 --- a/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/Offers/AsyncTaskOffersGet.cpp +++ b/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/Offers/AsyncTaskOffersGet.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "AsyncTasks/Engine/Marketplace/Offers/AsyncTaskOffersGet.h" diff --git a/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/Offers/AsyncTaskOffersGetAll.cpp b/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/Offers/AsyncTaskOffersGetAll.cpp index 5ac56d6..d94823c 100644 --- a/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/Offers/AsyncTaskOffersGetAll.cpp +++ b/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/Offers/AsyncTaskOffersGetAll.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "AsyncTasks/Engine/Marketplace/Offers/AsyncTaskOffersGetAll.h" diff --git a/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/Offers/AsyncTaskOffersGetTotalCount.cpp b/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/Offers/AsyncTaskOffersGetTotalCount.cpp index 588b797..8db5088 100644 --- a/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/Offers/AsyncTaskOffersGetTotalCount.cpp +++ b/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/Offers/AsyncTaskOffersGetTotalCount.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "AsyncTasks/Engine/Marketplace/Offers/AsyncTaskOffersGetTotalCount.h" diff --git a/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/Offers/AsyncTaskOffersOffer.cpp b/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/Offers/AsyncTaskOffersOffer.cpp index c2e56ff..84519c8 100644 --- a/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/Offers/AsyncTaskOffersOffer.cpp +++ b/Source/Thirdweb/Private/AsyncTasks/Engine/Marketplace/Offers/AsyncTaskOffersOffer.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "AsyncTasks/Engine/Marketplace/Offers/AsyncTaskOffersOffer.h" diff --git a/Source/Thirdweb/Private/AsyncTasks/Engine/Transaction/AsyncTaskTransactionGetTransactionReceipt.cpp b/Source/Thirdweb/Private/AsyncTasks/Engine/Transaction/AsyncTaskTransactionGetTransactionReceipt.cpp index 42ed1fe..01ae251 100644 --- a/Source/Thirdweb/Private/AsyncTasks/Engine/Transaction/AsyncTaskTransactionGetTransactionReceipt.cpp +++ b/Source/Thirdweb/Private/AsyncTasks/Engine/Transaction/AsyncTaskTransactionGetTransactionReceipt.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "AsyncTasks/Engine/Transaction/AsyncTaskTransactionGetTransactionReceipt.h" diff --git a/Source/Thirdweb/Private/AsyncTasks/Engine/Transaction/AsyncTaskTransactionGetTransactionStatus.cpp b/Source/Thirdweb/Private/AsyncTasks/Engine/Transaction/AsyncTaskTransactionGetTransactionStatus.cpp index c1c1e01..a0812a4 100644 --- a/Source/Thirdweb/Private/AsyncTasks/Engine/Transaction/AsyncTaskTransactionGetTransactionStatus.cpp +++ b/Source/Thirdweb/Private/AsyncTasks/Engine/Transaction/AsyncTaskTransactionGetTransactionStatus.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "AsyncTasks/Engine/Transaction/AsyncTaskTransactionGetTransactionStatus.h" diff --git a/Source/Thirdweb/Private/AsyncTasks/Utils/AsyncTaskThirdwebFetchIpfsData.cpp b/Source/Thirdweb/Private/AsyncTasks/Utils/AsyncTaskThirdwebFetchIpfsData.cpp index b3d1720..9ca927f 100644 --- a/Source/Thirdweb/Private/AsyncTasks/Utils/AsyncTaskThirdwebFetchIpfsData.cpp +++ b/Source/Thirdweb/Private/AsyncTasks/Utils/AsyncTaskThirdwebFetchIpfsData.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "AsyncTasks/Utils/AsyncTaskThirdwebFetchIpfsData.h" diff --git a/Source/Thirdweb/Private/AsyncTasks/Wallets/InApp/AsyncTaskThirdwebGetLinkedAccounts.cpp b/Source/Thirdweb/Private/AsyncTasks/Wallets/InApp/AsyncTaskThirdwebGetLinkedAccounts.cpp index a142a72..d1c5332 100644 --- a/Source/Thirdweb/Private/AsyncTasks/Wallets/InApp/AsyncTaskThirdwebGetLinkedAccounts.cpp +++ b/Source/Thirdweb/Private/AsyncTasks/Wallets/InApp/AsyncTaskThirdwebGetLinkedAccounts.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "AsyncTasks/Wallets/InApp/AsyncTaskThirdwebGetLinkedAccounts.h" diff --git a/Source/Thirdweb/Private/AsyncTasks/Wallets/InApp/AsyncTaskThirdwebInAppSignMessage.cpp b/Source/Thirdweb/Private/AsyncTasks/Wallets/InApp/AsyncTaskThirdwebInAppSignMessage.cpp index 871eccc..144b6c5 100644 --- a/Source/Thirdweb/Private/AsyncTasks/Wallets/InApp/AsyncTaskThirdwebInAppSignMessage.cpp +++ b/Source/Thirdweb/Private/AsyncTasks/Wallets/InApp/AsyncTaskThirdwebInAppSignMessage.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "AsyncTasks/Wallets/InApp/AsyncTaskThirdwebInAppSignMessage.h" diff --git a/Source/Thirdweb/Private/AsyncTasks/Wallets/InApp/AsyncTaskThirdwebLink.cpp b/Source/Thirdweb/Private/AsyncTasks/Wallets/InApp/AsyncTaskThirdwebLink.cpp index 7b020bc..e2192a4 100644 --- a/Source/Thirdweb/Private/AsyncTasks/Wallets/InApp/AsyncTaskThirdwebLink.cpp +++ b/Source/Thirdweb/Private/AsyncTasks/Wallets/InApp/AsyncTaskThirdwebLink.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "AsyncTasks/Wallets/InApp/AsyncTaskThirdwebLink.h" diff --git a/Source/Thirdweb/Private/AsyncTasks/Wallets/InApp/AsyncTaskThirdwebLoginWithOAuth.cpp b/Source/Thirdweb/Private/AsyncTasks/Wallets/InApp/AsyncTaskThirdwebLoginWithOAuth.cpp index 7dcafbc..2279dd7 100644 --- a/Source/Thirdweb/Private/AsyncTasks/Wallets/InApp/AsyncTaskThirdwebLoginWithOAuth.cpp +++ b/Source/Thirdweb/Private/AsyncTasks/Wallets/InApp/AsyncTaskThirdwebLoginWithOAuth.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "AsyncTasks/Wallets/InApp/AsyncTaskThirdwebLoginWithOAuth.h" diff --git a/Source/Thirdweb/Private/AsyncTasks/Wallets/InApp/AsyncTaskThirdwebSendOTP.cpp b/Source/Thirdweb/Private/AsyncTasks/Wallets/InApp/AsyncTaskThirdwebSendOTP.cpp index df21f27..1d59dc8 100644 --- a/Source/Thirdweb/Private/AsyncTasks/Wallets/InApp/AsyncTaskThirdwebSendOTP.cpp +++ b/Source/Thirdweb/Private/AsyncTasks/Wallets/InApp/AsyncTaskThirdwebSendOTP.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "AsyncTasks/Wallets/InApp/AsyncTaskThirdwebSendOTP.h" diff --git a/Source/Thirdweb/Private/AsyncTasks/Wallets/InApp/AsyncTaskThirdwebSignIn.cpp b/Source/Thirdweb/Private/AsyncTasks/Wallets/InApp/AsyncTaskThirdwebSignIn.cpp index aed1c98..8cfcd31 100644 --- a/Source/Thirdweb/Private/AsyncTasks/Wallets/InApp/AsyncTaskThirdwebSignIn.cpp +++ b/Source/Thirdweb/Private/AsyncTasks/Wallets/InApp/AsyncTaskThirdwebSignIn.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "AsyncTasks/Wallets/InApp/AsyncTaskThirdwebSignIn.h" diff --git a/Source/Thirdweb/Private/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreateAuthEndpointWallet.cpp b/Source/Thirdweb/Private/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreateAuthEndpointWallet.cpp index abdbe63..494c829 100644 --- a/Source/Thirdweb/Private/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreateAuthEndpointWallet.cpp +++ b/Source/Thirdweb/Private/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreateAuthEndpointWallet.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreateAuthEndpointWallet.h" diff --git a/Source/Thirdweb/Private/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreateEmailWallet.cpp b/Source/Thirdweb/Private/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreateEmailWallet.cpp index 8651971..28d4333 100644 --- a/Source/Thirdweb/Private/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreateEmailWallet.cpp +++ b/Source/Thirdweb/Private/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreateEmailWallet.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreateEmailWallet.h" diff --git a/Source/Thirdweb/Private/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreateGuestWallet.cpp b/Source/Thirdweb/Private/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreateGuestWallet.cpp index 2f0f01a..a3e4212 100644 --- a/Source/Thirdweb/Private/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreateGuestWallet.cpp +++ b/Source/Thirdweb/Private/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreateGuestWallet.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreateGuestWallet.h" diff --git a/Source/Thirdweb/Private/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreateJwtWallet.cpp b/Source/Thirdweb/Private/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreateJwtWallet.cpp index af3dfbf..150a6e4 100644 --- a/Source/Thirdweb/Private/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreateJwtWallet.cpp +++ b/Source/Thirdweb/Private/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreateJwtWallet.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreateJwtWallet.h" diff --git a/Source/Thirdweb/Private/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreateOAuthWallet.cpp b/Source/Thirdweb/Private/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreateOAuthWallet.cpp index 6137f0c..22d6147 100644 --- a/Source/Thirdweb/Private/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreateOAuthWallet.cpp +++ b/Source/Thirdweb/Private/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreateOAuthWallet.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreateOAuthWallet.h" diff --git a/Source/Thirdweb/Private/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreatePhoneWallet.cpp b/Source/Thirdweb/Private/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreatePhoneWallet.cpp index 1725419..db0561b 100644 --- a/Source/Thirdweb/Private/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreatePhoneWallet.cpp +++ b/Source/Thirdweb/Private/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreatePhoneWallet.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreatePhoneWallet.h" diff --git a/Source/Thirdweb/Private/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreateSiweWallet.cpp b/Source/Thirdweb/Private/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreateSiweWallet.cpp index e1f6eea..9a68f80 100644 --- a/Source/Thirdweb/Private/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreateSiweWallet.cpp +++ b/Source/Thirdweb/Private/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreateSiweWallet.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreateSiweWallet.h" diff --git a/Source/Thirdweb/Private/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreateSmartWallet.cpp b/Source/Thirdweb/Private/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreateSmartWallet.cpp index 23d7558..007264e 100644 --- a/Source/Thirdweb/Private/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreateSmartWallet.cpp +++ b/Source/Thirdweb/Private/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreateSmartWallet.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreateSmartWallet.h" diff --git a/Source/Thirdweb/Private/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebInAppCreateWalletBase.cpp b/Source/Thirdweb/Private/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebInAppCreateWalletBase.cpp index c7f17a8..c89a7aa 100644 --- a/Source/Thirdweb/Private/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebInAppCreateWalletBase.cpp +++ b/Source/Thirdweb/Private/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebInAppCreateWalletBase.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebInAppCreateWalletBase.h" diff --git a/Source/Thirdweb/Private/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebAddAdmin.cpp b/Source/Thirdweb/Private/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebAddAdmin.cpp index 95d3f67..f539194 100644 --- a/Source/Thirdweb/Private/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebAddAdmin.cpp +++ b/Source/Thirdweb/Private/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebAddAdmin.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "AsyncTasks/Wallets/Smart/AsyncTaskThirdwebAddAdmin.h" diff --git a/Source/Thirdweb/Private/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebCreateSessionKey.cpp b/Source/Thirdweb/Private/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebCreateSessionKey.cpp index 600b20c..f5a65d9 100644 --- a/Source/Thirdweb/Private/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebCreateSessionKey.cpp +++ b/Source/Thirdweb/Private/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebCreateSessionKey.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "AsyncTasks/Wallets/Smart/AsyncTaskThirdwebCreateSessionKey.h" @@ -17,12 +17,14 @@ void UAsyncTaskThirdwebCreateSessionKey::Activate() ); } -UAsyncTaskThirdwebCreateSessionKey* UAsyncTaskThirdwebCreateSessionKey::CreateSessionKey(UObject* WorldContextObject, - const FSmartWalletHandle& Wallet, - const FString& Signer, - const TArray& ApprovedTargets, - const FString& NativeTokenLimitPerTransactionInWei, - const FDateTime& PermissionEnd) +UAsyncTaskThirdwebCreateSessionKey* UAsyncTaskThirdwebCreateSessionKey::CreateSessionKey( + UObject* WorldContextObject, + const FSmartWalletHandle& Wallet, + const FString& Signer, + const TArray& ApprovedTargets, + const FString& NativeTokenLimitPerTransactionInWei, + const FDateTime& PermissionEnd +) { if (!WorldContextObject) { @@ -54,7 +56,7 @@ void UAsyncTaskThirdwebCreateSessionKey::HandleResponse(const FString& TxHash) }, TStatId(), nullptr, ENamedThreads::GameThread); return; } - + Success.Broadcast(TxHash, TEXT("")); SetReadyToDestroy(); } diff --git a/Source/Thirdweb/Private/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebGetActiveSigners.cpp b/Source/Thirdweb/Private/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebGetActiveSigners.cpp index 9854858..6d51eeb 100644 --- a/Source/Thirdweb/Private/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebGetActiveSigners.cpp +++ b/Source/Thirdweb/Private/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebGetActiveSigners.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "AsyncTasks/Wallets/Smart/AsyncTaskThirdwebGetActiveSigners.h" diff --git a/Source/Thirdweb/Private/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebGetAdmins.cpp b/Source/Thirdweb/Private/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebGetAdmins.cpp index 79d72c4..c9dbd1a 100644 --- a/Source/Thirdweb/Private/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebGetAdmins.cpp +++ b/Source/Thirdweb/Private/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebGetAdmins.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "AsyncTasks/Wallets/Smart/AsyncTaskThirdwebGetAdmins.h" diff --git a/Source/Thirdweb/Private/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebIsActiveSigner.cpp b/Source/Thirdweb/Private/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebIsActiveSigner.cpp index 50bd70b..af41f0f 100644 --- a/Source/Thirdweb/Private/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebIsActiveSigner.cpp +++ b/Source/Thirdweb/Private/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebIsActiveSigner.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "AsyncTasks/Wallets/Smart/AsyncTaskThirdwebIsActiveSigner.h" diff --git a/Source/Thirdweb/Private/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebIsDeployed.cpp b/Source/Thirdweb/Private/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebIsDeployed.cpp index faa019e..281949b 100644 --- a/Source/Thirdweb/Private/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebIsDeployed.cpp +++ b/Source/Thirdweb/Private/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebIsDeployed.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "AsyncTasks/Wallets/Smart/AsyncTaskThirdwebIsDeployed.h" diff --git a/Source/Thirdweb/Private/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebRemoveAdmin.cpp b/Source/Thirdweb/Private/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebRemoveAdmin.cpp index 757999f..0505b39 100644 --- a/Source/Thirdweb/Private/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebRemoveAdmin.cpp +++ b/Source/Thirdweb/Private/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebRemoveAdmin.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "AsyncTasks/Wallets/Smart/AsyncTaskThirdwebRemoveAdmin.h" diff --git a/Source/Thirdweb/Private/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebRevokeSessionKey.cpp b/Source/Thirdweb/Private/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebRevokeSessionKey.cpp index 55b4995..03fc9ec 100644 --- a/Source/Thirdweb/Private/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebRevokeSessionKey.cpp +++ b/Source/Thirdweb/Private/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebRevokeSessionKey.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "AsyncTasks/Wallets/Smart/AsyncTaskThirdwebRevokeSessionKey.h" diff --git a/Source/Thirdweb/Private/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebSmartSignMessage.cpp b/Source/Thirdweb/Private/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebSmartSignMessage.cpp index db42640..4517d58 100644 --- a/Source/Thirdweb/Private/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebSmartSignMessage.cpp +++ b/Source/Thirdweb/Private/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebSmartSignMessage.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "AsyncTasks/Wallets/Smart/AsyncTaskThirdwebSmartSignMessage.h" diff --git a/Source/Thirdweb/Private/Browser/Android/ThirdwebAndroidJNI.cpp b/Source/Thirdweb/Private/Browser/Android/ThirdwebAndroidJNI.cpp index 6713520..b6b5693 100644 --- a/Source/Thirdweb/Private/Browser/Android/ThirdwebAndroidJNI.cpp +++ b/Source/Thirdweb/Private/Browser/Android/ThirdwebAndroidJNI.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "Browser/Android/ThirdwebAndroidJNI.h" diff --git a/Source/Thirdweb/Private/Browser/ThirdwebOAuthBrowserUserWidget.cpp b/Source/Thirdweb/Private/Browser/ThirdwebOAuthBrowserUserWidget.cpp index 622e470..f65b26f 100644 --- a/Source/Thirdweb/Private/Browser/ThirdwebOAuthBrowserUserWidget.cpp +++ b/Source/Thirdweb/Private/Browser/ThirdwebOAuthBrowserUserWidget.cpp @@ -1,11 +1,10 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "Browser/ThirdwebOAuthBrowserUserWidget.h" #include "ThirdwebLog.h" #include "ThirdwebRuntimeSettings.h" #include "Blueprint/WidgetTree.h" -#include "Browser/ThirdwebOAuthBrowserWidget.h" #include "Browser/ThirdwebOAuthExternalBrowser.h" #include "Components/Overlay.h" #include "Components/OverlaySlot.h" @@ -17,6 +16,7 @@ #endif const FString UThirdwebOAuthBrowserUserWidget::BackendUrlPrefix = TEXT("https://embedded-wallet.thirdweb.com/"); +const FString UThirdwebOAuthBrowserUserWidget::DummyUrl = TEXT("http://localhost:8789/callback"); TSharedRef UThirdwebOAuthBrowserUserWidget::RebuildWidget() { @@ -35,19 +35,6 @@ TSharedRef UThirdwebOAuthBrowserUserWidget::RebuildWidget() // Construct children if (RootWidget) { - // Construct browser widget - Browser = WidgetTree->ConstructWidget( - UThirdwebOAuthBrowserWidget::StaticClass(), TEXT("ThirdwebOauthBrowser")); - Browser->OnUrlChanged.AddUObject(this, &ThisClass::HandleUrlChanged); - Browser->OnPageLoaded.AddUObject(this, &ThisClass::HandlePageLoaded); - Browser->OnBeforePopup.AddUObject(this, &ThisClass::HandleOnBeforePopup); - UPanelSlot* PanelSlot = RootWidget->AddChild(Browser); - if (UOverlaySlot* RootWidgetSlot = Cast(PanelSlot)) - { - RootWidgetSlot->SetHorizontalAlignment(HAlign_Fill); - RootWidgetSlot->SetVerticalAlignment(VAlign_Fill); - } - // Construct External browser ExternalBrowser = NewObject(this); ExternalBrowser->OnAuthenticated.BindUObject(this, &ThisClass::HandleAuthenticated); @@ -77,13 +64,18 @@ void UThirdwebOAuthBrowserUserWidget::BeginDestroy() { ExternalBrowser->ConditionalBeginDestroy(); } - if (Browser) - { - Browser->ConditionalBeginDestroy(); - } Super::BeginDestroy(); } +FString UThirdwebOAuthBrowserUserWidget::GetDummyUrl() +{ +#if PLATFORM_ANDROID + return UThirdwebRuntimeSettings::GetAppUri(); +#else + return DummyUrl; +#endif +} + void UThirdwebOAuthBrowserUserWidget::Authenticate(const FInAppWalletHandle& InAppWallet) { // Validate Wallet @@ -100,52 +92,30 @@ void UThirdwebOAuthBrowserUserWidget::Authenticate(const FInAppWalletHandle& InA ExternalBrowser->Authenticate(TEXT("SIWE")); return; } - + // Get Login URL FString Link; - if (FString Error; !Wallet.FetchOAuthLoginURL(UThirdwebOAuthBrowserWidget::GetDummyUrl(), Link, Error)) + if (FString Error; !Wallet.FetchOAuthLoginURL(GetDummyUrl(), Link, Error)) { return HandleError(Error); } TW_LOG(VeryVerbose, TEXT("OAuthBrowserUserWidget::Authenticate::Authenticating against %s"), *Link); - // Check Browser Type - if (UThirdwebRuntimeSettings::IsExternalOAuthBackend(Wallet.GetOAuthProvider())) - { #if PLATFORM_ANDROID - if (JNIEnv* Env = FAndroidApplication::GetJavaEnv()) - { - jstring JUrl = Env->NewStringUTF(TCHAR_TO_UTF8(*Link)); - jclass JClass = FAndroidApplication::FindJavaClass("com/thirdweb/unrealengine/ThirdwebActivity"); - static jmethodID JLaunchUrl = FJavaWrapper::FindStaticMethod(Env, JClass, "startActivity", "(Landroid/app/Activity;Ljava/lang/String;)V", false); - ThirdwebUtils::Internal::Android::CallJniStaticVoidMethod(Env, JClass, JLaunchUrl, FJavaWrapper::GameActivityThis, JUrl); - TW_LOG(Verbose, TEXT("OAuthBrowserUserWidget::Authenticate::Opening CustomTabs")); - return; - } - TW_LOG(Error, TEXT("OAuthBrowserUserWidget::Authenticate::No JNIEnv found")); + if (JNIEnv *Env = FAndroidApplication::GetJavaEnv()) + { + jstring JUrl = Env->NewStringUTF(TCHAR_TO_UTF8(*Link)); + jclass JClass = FAndroidApplication::FindJavaClass("com/thirdweb/unrealengine/ThirdwebActivity"); + static jmethodID JLaunchUrl = FJavaWrapper::FindStaticMethod(Env, JClass, "startActivity", "(Landroid/app/Activity;Ljava/lang/String;)V", false); + ThirdwebUtils::Internal::Android::CallJniStaticVoidMethod(Env, JClass, JLaunchUrl, FJavaWrapper::GameActivityThis, JUrl); + TW_LOG(Verbose, TEXT("OAuthBrowserUserWidget::Authenticate::Opening CustomTabs")); return; -#endif - - return ExternalBrowser->Authenticate(Link); } - return Browser->Authenticate(Link); -} - - -bool UThirdwebOAuthBrowserUserWidget::IsBlank() const -{ - const FString Url = Browser->GetUrl(); - - return Url.IsEmpty() || Url.StartsWith(BackendUrlPrefix); -} + TW_LOG(Error, TEXT("OAuthBrowserUserWidget::Authenticate::No JNIEnv found")); + return; +#endif -FString UThirdwebOAuthBrowserUserWidget::GetUrl() const -{ - if (Browser) - { - return Browser->GetUrl(); - } - return TEXT(""); + return ExternalBrowser->Authenticate(Link); } void UThirdwebOAuthBrowserUserWidget::HandleUrlChanged(const FString& Url) @@ -155,7 +125,7 @@ void UThirdwebOAuthBrowserUserWidget::HandleUrlChanged(const FString& Url) { return SetVisible(false); } - if (Url.StartsWith(UThirdwebOAuthBrowserWidget::GetDummyUrl())) + if (Url.StartsWith(GetDummyUrl())) { SetVisible(false); FString Left, Right; @@ -178,17 +148,6 @@ void UThirdwebOAuthBrowserUserWidget::HandlePageLoaded(const FString& Url) void UThirdwebOAuthBrowserUserWidget::HandleOnBeforePopup(const FString& Url, const FString& Frame) { - if (UPanelWidget* RootWidget = Cast(GetRootWidget())) - { - // Construct browser widget - UThirdwebOAuthBrowserWidget* Popup = WidgetTree->ConstructWidget( - UThirdwebOAuthBrowserWidget::StaticClass(), TEXT("ThirdwebOAuthBrowserPopUp")); - Popup->OnUrlChanged.AddUObject(this, &ThisClass::HandleUrlChanged); - Popup->OnPageLoaded.AddUObject(this, &ThisClass::HandlePageLoaded); - Popup->OnBeforePopup.AddUObject(this, &ThisClass::HandleOnBeforePopup); - RootWidget->AddChild(Popup); - Popup->LoadUrl(Url); - } return OnPopup.Broadcast(Url, Frame); } @@ -208,13 +167,13 @@ void UThirdwebOAuthBrowserUserWidget::HandleError(const FString& Error) } #if PLATFORM_ANDROID -void UThirdwebOAuthBrowserUserWidget::HandleDeepLink(const FString& Url) +void UThirdwebOAuthBrowserUserWidget::HandleDeepLink(const FString &Url) { TW_LOG(VeryVerbose, TEXT("UThirdwebOAuthBrowserUserWidget::HandleDeepLink::%s"), *Url); HandleUrlChanged(Url); } -void UThirdwebOAuthBrowserUserWidget::HandleCustomTabsDismissed(const FString& Url) +void UThirdwebOAuthBrowserUserWidget::HandleCustomTabsDismissed(const FString &Url) { TW_LOG(VeryVerbose, TEXT("UThirdwebOAuthBrowserUserWidget::HandleCustomTabsDismissed::%s"), *Url); HandleUrlChanged(Url); diff --git a/Source/Thirdweb/Private/Browser/ThirdwebOAuthBrowserWidget.cpp b/Source/Thirdweb/Private/Browser/ThirdwebOAuthBrowserWidget.cpp deleted file mode 100644 index 2111cc8..0000000 --- a/Source/Thirdweb/Private/Browser/ThirdwebOAuthBrowserWidget.cpp +++ /dev/null @@ -1,214 +0,0 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. - -#include "Browser/ThirdwebOAuthBrowserWidget.h" - -#include "ThirdwebLog.h" -#include "ThirdwebRuntimeSettings.h" -#include "Async/Async.h" -#include "Async/TaskGraphInterfaces.h" -#include "GenericPlatform/GenericPlatformHttp.h" -#include "Widgets/Layout/SBox.h" -#include "Widgets/Text/STextBlock.h" -#if WITH_CEF -#include "SWebBrowser.h" -#endif - -#define ENSURE_VALID_BROWSER(FunctionName) \ - if (!Browser.IsValid()) \ - { \ - TW_LOG(Error, TEXT("OAuthBrowserWidget::%s::Web browser invalid"), TEXT(FunctionName)); \ - return; \ - } - -const FString UThirdwebOAuthBrowserWidget::DummyUrl = TEXT("http://localhost:8789/callback"); - -bool UThirdwebOAuthBrowserWidget::IsPageLoaded() const -{ -#if WITH_CEF - return Browser.IsValid() && Browser->IsLoaded(); -#else - return false; -#endif -} - -FString UThirdwebOAuthBrowserWidget::GetUrl() const -{ -#if WITH_CEF - if (Browser.IsValid()) - { - if (FString Url = Browser->GetUrl(); !Url.IsEmpty()) - { - return Url; - } - } -#endif - return TEXT(""); -} - -FString UThirdwebOAuthBrowserWidget::GetDummyUrl() -{ -#if PLATFORM_ANDROID - return UThirdwebRuntimeSettings::GetAppUri(); -#else - return DummyUrl; -#endif -} - -void UThirdwebOAuthBrowserWidget::ReleaseSlateResources(const bool bReleaseChildren) -{ - Super::ReleaseSlateResources(bReleaseChildren); -#if WITH_CEF - Browser.Reset(); -#endif -} - -#if WITH_EDITOR -const FText UThirdwebOAuthBrowserWidget::GetPaletteCategory() -{ - return NSLOCTEXT("Thirdweb", "Thirdweb", "Thirdweb"); -} -#endif - -// ReSharper disable once CppUE4BlueprintCallableFunctionMayBeConst -void UThirdwebOAuthBrowserWidget::Authenticate(const FString& OAuthLoginUrl) -{ -#if WITH_CEF - ENSURE_VALID_BROWSER("Authenticate") - TW_LOG(VeryVerbose, TEXT("OAuthBrowserWidget::Authenticate::Loading %s"), *OAuthLoginUrl); - Browser->LoadURL(OAuthLoginUrl); -#endif -} - -void UThirdwebOAuthBrowserWidget::HandleUrlChanged(const FText& InUrl) -{ -#if WITH_CEF - ENSURE_VALID_BROWSER("HandleUrlChanged") - if (IsInGameThread()) - { - FString Url = InUrl.ToString(); - if (Url.IsEmpty()) - { - Url = Browser->GetUrl(); - } - TW_LOG(VeryVerbose, TEXT("ThirdwebOAuthBrowserWidget::HandleUrlChanged:%s"), *Url); - OnUrlChanged.Broadcast(FGenericPlatformHttp::UrlDecode(Url)); - } - else - { - // Retry on the GameThread. - TWeakObjectPtr WeakThis = this; - FFunctionGraphTask::CreateAndDispatchWhenReady([WeakThis, InUrl]() - { - if (WeakThis.IsValid()) - { - WeakThis->HandleUrlChanged(InUrl); - } - }, TStatId(), nullptr, ENamedThreads::GameThread); - } - -#endif -} - -void UThirdwebOAuthBrowserWidget::HandleOnLoadComplete() -{ -#if WITH_CEF - ENSURE_VALID_BROWSER("HandleOnLoadComplete") - if (IsInGameThread()) - { - TW_LOG(VeryVerbose, TEXT("ThirdwebOAuthBrowserWidget::HandleOnLoadComplete:%s"), *Browser->GetUrl()); - OnPageLoaded.Broadcast(Browser->GetUrl()); - return; - } - - TWeakObjectPtr WeakThis = this; - FFunctionGraphTask::CreateAndDispatchWhenReady([WeakThis]() - { - if (WeakThis.IsValid()) - { - WeakThis->HandleOnLoadComplete(); - } - }, TStatId(), nullptr, ENamedThreads::GameThread); -#endif -} - -bool UThirdwebOAuthBrowserWidget::HandleOnBeforePopup(FString Url, FString Frame) -{ - TW_LOG(VeryVerbose, TEXT("ThirdwebOAuthBrowserWidget::HandleOnBeforePopup::%s | %s"), *Url, *Frame) - if (OnBeforePopup.IsBound()) - { - if (IsInGameThread()) - { - OnBeforePopup.Broadcast(Url, Frame); - return true; - } - - TWeakObjectPtr WeakThis = this; - FFunctionGraphTask::CreateAndDispatchWhenReady([WeakThis, Url, Frame]() - { - if (WeakThis.IsValid()) - { - WeakThis->HandleOnBeforePopup(Url, Frame); - } - }, TStatId(), nullptr, ENamedThreads::GameThread); - return true; - } - return false; -} - -bool UThirdwebOAuthBrowserWidget::HandleOnCreateWindow(const TWeakPtr& Window, const TWeakPtr& Features) -{ - TW_LOG(Error, TEXT("ThirdwebOAuthBrowserWidget::HandleOnCreateWindow::Unsupported")) - return false; -} - -void UThirdwebOAuthBrowserWidget::HandleOnLoadError() -{ - TW_LOG(Error, TEXT("ThirdwebOAuthBrowserWidget::HandleOnLoadError::Error loading")) -} - -bool UThirdwebOAuthBrowserWidget::HandleOnCloseWindow(const TWeakPtr& Window) -{ - TW_LOG(VeryVerbose, TEXT("ThirdwebOAuthBrowserWidget::HandleOnCloseWindow::Called")) - RemoveFromParent(); - return true; -} - -void UThirdwebOAuthBrowserWidget::LoadUrl(const FString& Url) -{ -#if WITH_CEF - ENSURE_VALID_BROWSER("LoadUrl") - Browser->LoadURL(Url); -#endif -} - -TSharedRef UThirdwebOAuthBrowserWidget::RebuildWidget() -{ -#if WITH_CEF - if (!IsDesignTime()) - { - Browser = SNew(SWebBrowser) - .InitialURL(InitialUrl) - .ShowControls(false) - .ShowAddressBar(false) - .SupportsTransparency(bSupportsTransparency) - .ShowInitialThrobber(bShowInitialThrobber) - .OnCreateWindow(BIND_UOBJECT_DELEGATE(FOnCreateWindowDelegate, HandleOnCreateWindow)) - .OnLoadError(BIND_UOBJECT_DELEGATE(FSimpleDelegate, HandleOnLoadError)) - .OnUrlChanged(BIND_UOBJECT_DELEGATE(FOnTextChanged, HandleUrlChanged)) - .OnLoadCompleted(BIND_UOBJECT_DELEGATE(FSimpleDelegate, HandleOnLoadComplete)) - .OnCloseWindow(BIND_UOBJECT_DELEGATE(FOnCloseWindowDelegate, HandleOnCloseWindow)) - .OnBeforePopup(BIND_UOBJECT_DELEGATE(FOnBeforePopupDelegate, HandleOnBeforePopup)); - - return Browser.ToSharedRef(); - } -#endif - return SNew(SBox).HAlign(HAlign_Fill).VAlign(VAlign_Fill) - [ - SNew(STextBlock).Text(NSLOCTEXT("Thirdweb", "Thirdweb OAuth Browser", "Thirdweb OAuth Browser")) - ]; -} - -void UThirdwebOAuthBrowserWidget::OnWidgetRebuilt() -{ - Super::OnWidgetRebuilt(); -} diff --git a/Source/Thirdweb/Private/Browser/ThirdwebOAuthExternalBrowser.cpp b/Source/Thirdweb/Private/Browser/ThirdwebOAuthExternalBrowser.cpp index ffdd6af..67dd310 100644 --- a/Source/Thirdweb/Private/Browser/ThirdwebOAuthExternalBrowser.cpp +++ b/Source/Thirdweb/Private/Browser/ThirdwebOAuthExternalBrowser.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "Browser/ThirdwebOAuthExternalBrowser.h" diff --git a/Source/Thirdweb/Private/Containers/ThirdwebCountryCodes.cpp b/Source/Thirdweb/Private/Containers/ThirdwebCountryCodes.cpp index 16546e0..9beab27 100644 --- a/Source/Thirdweb/Private/Containers/ThirdwebCountryCodes.cpp +++ b/Source/Thirdweb/Private/Containers/ThirdwebCountryCodes.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "Containers/ThirdwebCountryCodes.h" diff --git a/Source/Thirdweb/Private/Containers/ThirdwebIPFSUploadResult.cpp b/Source/Thirdweb/Private/Containers/ThirdwebIPFSUploadResult.cpp index 6587062..c185dfd 100644 --- a/Source/Thirdweb/Private/Containers/ThirdwebIPFSUploadResult.cpp +++ b/Source/Thirdweb/Private/Containers/ThirdwebIPFSUploadResult.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "Containers/ThirdwebIPFSUploadResult.h" diff --git a/Source/Thirdweb/Private/Containers/ThirdwebLinkedAccount.cpp b/Source/Thirdweb/Private/Containers/ThirdwebLinkedAccount.cpp index dda6514..86498bb 100644 --- a/Source/Thirdweb/Private/Containers/ThirdwebLinkedAccount.cpp +++ b/Source/Thirdweb/Private/Containers/ThirdwebLinkedAccount.cpp @@ -1,7 +1,9 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "Containers/ThirdwebLinkedAccount.h" +#include "Dom/JsonObject.h" + FThirdwebLinkedAccount FThirdwebLinkedAccount::FromJson(const TSharedPtr& JsonObject) { FThirdwebLinkedAccount LinkedAccount; diff --git a/Source/Thirdweb/Private/Containers/ThirdwebMultipartFormData.cpp b/Source/Thirdweb/Private/Containers/ThirdwebMultipartFormData.cpp index 4da29ed..5b34620 100644 --- a/Source/Thirdweb/Private/Containers/ThirdwebMultipartFormData.cpp +++ b/Source/Thirdweb/Private/Containers/ThirdwebMultipartFormData.cpp @@ -1,7 +1,8 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "Containers/ThirdwebMultipartFormData.h" +#include "Containers/StringConv.h" #include "Misc/FileHelper.h" #include "Misc/Guid.h" diff --git a/Source/Thirdweb/Private/Containers/ThirdwebSigner.cpp b/Source/Thirdweb/Private/Containers/ThirdwebSigner.cpp index f55e2d1..2800154 100644 --- a/Source/Thirdweb/Private/Containers/ThirdwebSigner.cpp +++ b/Source/Thirdweb/Private/Containers/ThirdwebSigner.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "Containers/ThirdwebSigner.h" diff --git a/Source/Thirdweb/Private/Engine/BackendWallet/ThirdwebBackendWallet.cpp b/Source/Thirdweb/Private/Engine/BackendWallet/ThirdwebBackendWallet.cpp index e6b3039..3406331 100644 --- a/Source/Thirdweb/Private/Engine/BackendWallet/ThirdwebBackendWallet.cpp +++ b/Source/Thirdweb/Private/Engine/BackendWallet/ThirdwebBackendWallet.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "Engine/BackendWallet/ThirdwebBackendWallet.h" diff --git a/Source/Thirdweb/Private/Engine/BackendWallet/ThirdwebEngine_BackendWallet.cpp b/Source/Thirdweb/Private/Engine/BackendWallet/ThirdwebEngine_BackendWallet.cpp index 37e07de..93b2afc 100644 --- a/Source/Thirdweb/Private/Engine/BackendWallet/ThirdwebEngine_BackendWallet.cpp +++ b/Source/Thirdweb/Private/Engine/BackendWallet/ThirdwebEngine_BackendWallet.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "Engine/BackendWallet/ThirdwebEngine_BackendWallet.h" diff --git a/Source/Thirdweb/Private/Engine/Contract/ThirdwebEngine_Contract.cpp b/Source/Thirdweb/Private/Engine/Contract/ThirdwebEngine_Contract.cpp index d657c3d..1090458 100644 --- a/Source/Thirdweb/Private/Engine/Contract/ThirdwebEngine_Contract.cpp +++ b/Source/Thirdweb/Private/Engine/Contract/ThirdwebEngine_Contract.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "Engine/Contract/ThirdwebEngine_Contract.h" @@ -61,13 +61,9 @@ namespace ThirdwebEngine::Contract const FString& ContractAddress, const FString& BackendWalletAddress, const FSmartWalletHandle& SmartWallet, - const FString& FactoryAddress, const FString& IdempotencyKey, - const FString& FunctionName, - const TArray& Args, - const FThirdwebEngineTransactionOverrides& TxOverrides, - const FString& Abi, const bool bSimulateTx, + const TSharedPtr& Data, const FStringDelegate& SuccessDelegate, const FStringDelegate& ErrorDelegate ) @@ -77,28 +73,29 @@ namespace ThirdwebEngine::Contract Headers.Set(TEXT("x-backend-wallet-address"), BackendWalletAddress); Headers.Set(TEXT("x-idempotency-key"), IdempotencyKey); Headers.Set(TEXT("x-account-address"), SmartWallet.ToAddress(), SmartWallet.IsValid()); - Headers.Set(TEXT("x-account-factory-address"), FactoryAddress); + if (FString Factory = SmartWallet.GetCustomFactory(); !Factory.IsEmpty()) + { + Headers.Set(TEXT("x-account-factory-address"), Factory); + } + Headers.UpdateRequest(Request); + if (!Data.IsValid()) { - TSharedPtr JsonObject = MakeShareable(new FJsonObject); - JsonObject->SetStringField(TEXT("functionName"), FunctionName); - TArray> JsonArgs; - for (const FString& Arg : Args) - { - JsonArgs.Emplace(MakeShareable(new FJsonValueString(Arg))); - } - JsonObject->SetArrayField(TEXT("args"), JsonArgs); - if (!TxOverrides.IsDefault()) - { - JsonObject->SetObjectField(TEXT("txOverrides"), TxOverrides.ToJson()); - } - if (!Abi.IsEmpty()) - { - JsonObject->SetArrayField(TEXT("abi"), ThirdwebUtils::Json::ToJsonArray(Abi)); - } - Request->SetContentAsString(ThirdwebUtils::Json::ToString(JsonObject)); + ErrorDelegate.Execute(TEXT("Data object is required")); + return; + } + if (!Data->HasTypedField(TEXT("functionName")) || Data->GetStringField(TEXT("functionName")).IsEmpty()) + { + ErrorDelegate.Execute(TEXT("Data object must contain a functionName field")); + return; + } + if (!Data->HasField(TEXT("args"))) + { + ErrorDelegate.Execute(TEXT("Data object must contain an args field")); + return; } + Request->SetContentAsString(ThirdwebUtils::Json::ToString(Data)); FThirdwebURLSearchParams Params; Params.Set(TEXT("simulateTx"), true, bSimulateTx); diff --git a/Source/Thirdweb/Private/Engine/Marketplace/DirectListings/ThirdwebEngine_Marketplace_DirectListings.cpp b/Source/Thirdweb/Private/Engine/Marketplace/DirectListings/ThirdwebEngine_Marketplace_DirectListings.cpp index c65c1de..c53dfa3 100644 --- a/Source/Thirdweb/Private/Engine/Marketplace/DirectListings/ThirdwebEngine_Marketplace_DirectListings.cpp +++ b/Source/Thirdweb/Private/Engine/Marketplace/DirectListings/ThirdwebEngine_Marketplace_DirectListings.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "Engine/Marketplace/DirectListings/ThirdwebEngine_Marketplace_DirectListings.h" diff --git a/Source/Thirdweb/Private/Engine/Marketplace/DirectListings/ThirdwebMarketplaceDirectListing.cpp b/Source/Thirdweb/Private/Engine/Marketplace/DirectListings/ThirdwebMarketplaceDirectListing.cpp index 338fdc4..3014aa5 100644 --- a/Source/Thirdweb/Private/Engine/Marketplace/DirectListings/ThirdwebMarketplaceDirectListing.cpp +++ b/Source/Thirdweb/Private/Engine/Marketplace/DirectListings/ThirdwebMarketplaceDirectListing.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "Engine/Marketplace/DirectListings/ThirdwebMarketplaceDirectListing.h" diff --git a/Source/Thirdweb/Private/Engine/Marketplace/DirectListings/ThirdwebMarketplaceDirectListingRequest.cpp b/Source/Thirdweb/Private/Engine/Marketplace/DirectListings/ThirdwebMarketplaceDirectListingRequest.cpp index 2b045c9..67f4f93 100644 --- a/Source/Thirdweb/Private/Engine/Marketplace/DirectListings/ThirdwebMarketplaceDirectListingRequest.cpp +++ b/Source/Thirdweb/Private/Engine/Marketplace/DirectListings/ThirdwebMarketplaceDirectListingRequest.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "Engine/Marketplace/DirectListings/ThirdwebMarketplaceDirectListingRequest.h" diff --git a/Source/Thirdweb/Private/Engine/Marketplace/EnglishAuctions/ThirdwebEngine_Marketplace_EnglishAuctions.cpp b/Source/Thirdweb/Private/Engine/Marketplace/EnglishAuctions/ThirdwebEngine_Marketplace_EnglishAuctions.cpp index a73735c..0e4ead4 100644 --- a/Source/Thirdweb/Private/Engine/Marketplace/EnglishAuctions/ThirdwebEngine_Marketplace_EnglishAuctions.cpp +++ b/Source/Thirdweb/Private/Engine/Marketplace/EnglishAuctions/ThirdwebEngine_Marketplace_EnglishAuctions.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "Engine/Marketplace/EnglishAuctions/ThirdwebEngine_Marketplace_EnglishAuctions.h" diff --git a/Source/Thirdweb/Private/Engine/Marketplace/EnglishAuctions/ThirdwebMarketplaceBid.cpp b/Source/Thirdweb/Private/Engine/Marketplace/EnglishAuctions/ThirdwebMarketplaceBid.cpp index 1e920f5..a28543c 100644 --- a/Source/Thirdweb/Private/Engine/Marketplace/EnglishAuctions/ThirdwebMarketplaceBid.cpp +++ b/Source/Thirdweb/Private/Engine/Marketplace/EnglishAuctions/ThirdwebMarketplaceBid.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "Engine/Marketplace/EnglishAuctions/ThirdwebMarketplaceBid.h" diff --git a/Source/Thirdweb/Private/Engine/Marketplace/EnglishAuctions/ThirdwebMarketplaceCreateEnglishAuctionRequest.cpp b/Source/Thirdweb/Private/Engine/Marketplace/EnglishAuctions/ThirdwebMarketplaceCreateEnglishAuctionRequest.cpp index cd5954e..f1de664 100644 --- a/Source/Thirdweb/Private/Engine/Marketplace/EnglishAuctions/ThirdwebMarketplaceCreateEnglishAuctionRequest.cpp +++ b/Source/Thirdweb/Private/Engine/Marketplace/EnglishAuctions/ThirdwebMarketplaceCreateEnglishAuctionRequest.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "Engine/Marketplace/EnglishAuctions/ThirdwebMarketplaceCreateEnglishAuctionRequest.h" diff --git a/Source/Thirdweb/Private/Engine/Marketplace/EnglishAuctions/ThirdwebMarketplaceEnglishAuction.cpp b/Source/Thirdweb/Private/Engine/Marketplace/EnglishAuctions/ThirdwebMarketplaceEnglishAuction.cpp index 6804f98..10f6570 100644 --- a/Source/Thirdweb/Private/Engine/Marketplace/EnglishAuctions/ThirdwebMarketplaceEnglishAuction.cpp +++ b/Source/Thirdweb/Private/Engine/Marketplace/EnglishAuctions/ThirdwebMarketplaceEnglishAuction.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "Engine/Marketplace/EnglishAuctions/ThirdwebMarketplaceEnglishAuction.h" diff --git a/Source/Thirdweb/Private/Engine/Marketplace/Offers/ThirdwebEngine_Marketplace_Offers.cpp b/Source/Thirdweb/Private/Engine/Marketplace/Offers/ThirdwebEngine_Marketplace_Offers.cpp index 786b0b7..dc09a00 100644 --- a/Source/Thirdweb/Private/Engine/Marketplace/Offers/ThirdwebEngine_Marketplace_Offers.cpp +++ b/Source/Thirdweb/Private/Engine/Marketplace/Offers/ThirdwebEngine_Marketplace_Offers.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "Engine/Marketplace/Offers/ThirdwebEngine_Marketplace_Offers.h" diff --git a/Source/Thirdweb/Private/Engine/Marketplace/Offers/ThirdwebMarketplaceMakeOfferRequest.cpp b/Source/Thirdweb/Private/Engine/Marketplace/Offers/ThirdwebMarketplaceMakeOfferRequest.cpp index fc66c3a..d9f451d 100644 --- a/Source/Thirdweb/Private/Engine/Marketplace/Offers/ThirdwebMarketplaceMakeOfferRequest.cpp +++ b/Source/Thirdweb/Private/Engine/Marketplace/Offers/ThirdwebMarketplaceMakeOfferRequest.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "Engine/Marketplace/Offers/ThirdwebMarketplaceMakeOfferRequest.h" diff --git a/Source/Thirdweb/Private/Engine/Marketplace/Offers/ThirdwebMarketplaceOffer.cpp b/Source/Thirdweb/Private/Engine/Marketplace/Offers/ThirdwebMarketplaceOffer.cpp index 5efd131..c52dafe 100644 --- a/Source/Thirdweb/Private/Engine/Marketplace/Offers/ThirdwebMarketplaceOffer.cpp +++ b/Source/Thirdweb/Private/Engine/Marketplace/Offers/ThirdwebMarketplaceOffer.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "Engine/Marketplace/Offers/ThirdwebMarketplaceOffer.h" diff --git a/Source/Thirdweb/Private/Engine/Marketplace/ThirdwebEngine_Marketplace.cpp b/Source/Thirdweb/Private/Engine/Marketplace/ThirdwebEngine_Marketplace.cpp index 9152193..0d9f130 100644 --- a/Source/Thirdweb/Private/Engine/Marketplace/ThirdwebEngine_Marketplace.cpp +++ b/Source/Thirdweb/Private/Engine/Marketplace/ThirdwebEngine_Marketplace.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "Engine/Marketplace/ThirdwebEngine_Marketplace.h" diff --git a/Source/Thirdweb/Private/Engine/Marketplace/ThirdwebMarketplace.cpp b/Source/Thirdweb/Private/Engine/Marketplace/ThirdwebMarketplace.cpp index 9998f14..3f1b56f 100644 --- a/Source/Thirdweb/Private/Engine/Marketplace/ThirdwebMarketplace.cpp +++ b/Source/Thirdweb/Private/Engine/Marketplace/ThirdwebMarketplace.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "Engine/Marketplace/ThirdwebMarketplace.h" diff --git a/Source/Thirdweb/Private/Engine/Marketplace/ThirdwebMarketplaceInternalEntryBase.cpp b/Source/Thirdweb/Private/Engine/Marketplace/ThirdwebMarketplaceInternalEntryBase.cpp index 184f47c..05a5cfd 100644 --- a/Source/Thirdweb/Private/Engine/Marketplace/ThirdwebMarketplaceInternalEntryBase.cpp +++ b/Source/Thirdweb/Private/Engine/Marketplace/ThirdwebMarketplaceInternalEntryBase.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "Engine/Marketplace/ThirdwebMarketplaceInternalEntryBase.h" diff --git a/Source/Thirdweb/Private/Engine/Marketplace/ThirdwebMarketplaceSubsystem.cpp b/Source/Thirdweb/Private/Engine/Marketplace/ThirdwebMarketplaceSubsystem.cpp index 0a6a6d1..973d486 100644 --- a/Source/Thirdweb/Private/Engine/Marketplace/ThirdwebMarketplaceSubsystem.cpp +++ b/Source/Thirdweb/Private/Engine/Marketplace/ThirdwebMarketplaceSubsystem.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "Engine/Marketplace/ThirdwebMarketplaceSubsystem.h" diff --git a/Source/Thirdweb/Private/Engine/ThirdwebAsset.cpp b/Source/Thirdweb/Private/Engine/ThirdwebAsset.cpp index 6f53824..1448a91 100644 --- a/Source/Thirdweb/Private/Engine/ThirdwebAsset.cpp +++ b/Source/Thirdweb/Private/Engine/ThirdwebAsset.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "Engine/ThirdwebAsset.h" diff --git a/Source/Thirdweb/Private/Engine/ThirdwebEngine.cpp b/Source/Thirdweb/Private/Engine/ThirdwebEngine.cpp index 792ded8..5c71d47 100644 --- a/Source/Thirdweb/Private/Engine/ThirdwebEngine.cpp +++ b/Source/Thirdweb/Private/Engine/ThirdwebEngine.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "Engine/ThirdwebEngine.h" diff --git a/Source/Thirdweb/Private/Engine/ThirdwebEngineCommon.cpp b/Source/Thirdweb/Private/Engine/ThirdwebEngineCommon.cpp index 36e04ea..1ca0fdb 100644 --- a/Source/Thirdweb/Private/Engine/ThirdwebEngineCommon.cpp +++ b/Source/Thirdweb/Private/Engine/ThirdwebEngineCommon.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "Engine/ThirdwebEngineCommon.h" diff --git a/Source/Thirdweb/Private/Engine/Transaction/ThirdwebEngineTransactionOverrides.cpp b/Source/Thirdweb/Private/Engine/Transaction/ThirdwebEngineTransactionOverrides.cpp index feebac6..307a92b 100644 --- a/Source/Thirdweb/Private/Engine/Transaction/ThirdwebEngineTransactionOverrides.cpp +++ b/Source/Thirdweb/Private/Engine/Transaction/ThirdwebEngineTransactionOverrides.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "Engine/Transaction/ThirdwebEngineTransactionOverrides.h" diff --git a/Source/Thirdweb/Private/Engine/Transaction/ThirdwebEngineTransactionReceipt.cpp b/Source/Thirdweb/Private/Engine/Transaction/ThirdwebEngineTransactionReceipt.cpp index 94926c0..c4d6bd9 100644 --- a/Source/Thirdweb/Private/Engine/Transaction/ThirdwebEngineTransactionReceipt.cpp +++ b/Source/Thirdweb/Private/Engine/Transaction/ThirdwebEngineTransactionReceipt.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "Engine/Transaction/ThirdwebEngineTransactionReceipt.h" diff --git a/Source/Thirdweb/Private/Engine/Transaction/ThirdwebEngineTransactionStatusResult.cpp b/Source/Thirdweb/Private/Engine/Transaction/ThirdwebEngineTransactionStatusResult.cpp index 634a810..0a80bc4 100644 --- a/Source/Thirdweb/Private/Engine/Transaction/ThirdwebEngineTransactionStatusResult.cpp +++ b/Source/Thirdweb/Private/Engine/Transaction/ThirdwebEngineTransactionStatusResult.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "Engine/Transaction/ThirdwebEngineTransactionStatusResult.h" diff --git a/Source/Thirdweb/Private/Engine/Transaction/ThirdwebEngine_Transaction.cpp b/Source/Thirdweb/Private/Engine/Transaction/ThirdwebEngine_Transaction.cpp index 37c2615..f235d88 100644 --- a/Source/Thirdweb/Private/Engine/Transaction/ThirdwebEngine_Transaction.cpp +++ b/Source/Thirdweb/Private/Engine/Transaction/ThirdwebEngine_Transaction.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "Engine/Transaction/ThirdwebEngine_Transaction.h" diff --git a/Source/Thirdweb/Private/Internal/ThirdwebHeaders.cpp b/Source/Thirdweb/Private/Internal/ThirdwebHeaders.cpp index 1ee1b79..b390f13 100644 --- a/Source/Thirdweb/Private/Internal/ThirdwebHeaders.cpp +++ b/Source/Thirdweb/Private/Internal/ThirdwebHeaders.cpp @@ -1,7 +1,8 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "Internal/ThirdwebHeaders.h" +#include "Containers/UnrealString.h" #include "Interfaces/IHttpRequest.h" FThirdwebHeaders::FThirdwebHeaders() diff --git a/Source/Thirdweb/Private/Internal/ThirdwebURLSearchParams.cpp b/Source/Thirdweb/Private/Internal/ThirdwebURLSearchParams.cpp index bb63526..9e83b44 100644 --- a/Source/Thirdweb/Private/Internal/ThirdwebURLSearchParams.cpp +++ b/Source/Thirdweb/Private/Internal/ThirdwebURLSearchParams.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "Internal/ThirdwebURLSearchParams.h" diff --git a/Source/Thirdweb/Private/Thirdweb.cpp b/Source/Thirdweb/Private/Thirdweb.cpp index 78b6ff4..8e65b86 100644 --- a/Source/Thirdweb/Private/Thirdweb.cpp +++ b/Source/Thirdweb/Private/Thirdweb.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "Thirdweb.h" diff --git a/Source/Thirdweb/Private/ThirdwebAssetManager.cpp b/Source/Thirdweb/Private/ThirdwebAssetManager.cpp index 36804e0..e18002a 100644 --- a/Source/Thirdweb/Private/ThirdwebAssetManager.cpp +++ b/Source/Thirdweb/Private/ThirdwebAssetManager.cpp @@ -1,36 +1,23 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "ThirdwebAssetManager.h" -#if WITH_EDITOR || PLATFORM_ANDROID || PLATFORM_IOS -#include "WebBrowserTexture.h" - -#include "Materials/Material.h" -#endif - UThirdwebAssetManager::UThirdwebAssetManager() { - DefaultMaterial = FString(TEXT("/Thirdweb/Assets/WebTexture_M.WebTexture_M")); - DefaultTranslucentMaterial = FString(TEXT("/Thirdweb/Assets/WebTexture_TM.WebTexture_TM")); - -#if WITH_EDITOR || PLATFORM_ANDROID || PLATFORM_IOS - // Add a hard reference to UWebBrowserTexture, without this the WebBrowserTexture DLL never gets loaded on Windows. - UWebBrowserTexture::StaticClass(); -#endif + // Default materials removed, assuming new ones will be set up later or are no longer needed. } void UThirdwebAssetManager::LoadDefaultMaterials() { - DefaultMaterial.LoadSynchronous(); - DefaultTranslucentMaterial.LoadSynchronous(); + // No materials to load now. } UMaterial* UThirdwebAssetManager::GetDefaultMaterial() { - return DefaultMaterial.Get(); + return nullptr; // Return nullptr or a new default material if necessary. } UMaterial* UThirdwebAssetManager::GetDefaultTranslucentMaterial() { - return DefaultTranslucentMaterial.Get(); + return nullptr; // Return nullptr or a new default translucent material if necessary. } diff --git a/Source/Thirdweb/Private/ThirdwebFunctionLibrary.cpp b/Source/Thirdweb/Private/ThirdwebFunctionLibrary.cpp index bd16782..d8c329d 100644 --- a/Source/Thirdweb/Private/ThirdwebFunctionLibrary.cpp +++ b/Source/Thirdweb/Private/ThirdwebFunctionLibrary.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. // ReSharper disable CppParameterMayBeConst,CppPassValueParameterByConstReference diff --git a/Source/Thirdweb/Private/ThirdwebLog.cpp b/Source/Thirdweb/Private/ThirdwebLog.cpp index 78834d2..113a2f0 100644 --- a/Source/Thirdweb/Private/ThirdwebLog.cpp +++ b/Source/Thirdweb/Private/ThirdwebLog.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "ThirdwebLog.h" diff --git a/Source/Thirdweb/Private/ThirdwebModule.cpp b/Source/Thirdweb/Private/ThirdwebModule.cpp index 372b24e..9516e66 100644 --- a/Source/Thirdweb/Private/ThirdwebModule.cpp +++ b/Source/Thirdweb/Private/ThirdwebModule.cpp @@ -1,51 +1,24 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "ThirdwebModule.h" - -#include "IWebBrowserSingleton.h" #include "ThirdwebAssetManager.h" #include "ThirdwebLog.h" -#include "WebBrowserModule.h" - -#include "Materials/Material.h" -class FThirdwebModule : public IThirdwebModule -{ +class FThirdwebModule : public IThirdwebModule { public: - virtual void StartupModule() override - { - if (ThirdwebAssetManager == nullptr) - { - ThirdwebAssetManager = NewObject((UObject*)GetTransientPackage(), NAME_None, RF_Transient | RF_Public); - ThirdwebAssetManager->LoadDefaultMaterials(); - - IWebBrowserModule::Get(); // force the module to load - if (IWebBrowserModule::IsAvailable() && IWebBrowserModule::Get().IsWebModuleAvailable()) - { - IWebBrowserModule& WebBrowserModule = IWebBrowserModule::Get(); - FWebBrowserInitSettings WebBrowserInitSettings; - // Needed to make google oauth happy on mobile - WebBrowserInitSettings.ProductVersion = TEXT("Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/128.0.0.0 Safari/537.36"); - if (!WebBrowserModule.CustomInitialize(WebBrowserInitSettings)) - { - TW_LOG(Error, TEXT("ThirdwebModule::Could not initialize WebBrowserModule with custom User-Agent! Singleton already exists")) - } - IWebBrowserSingleton* WebBrowserSingleton = WebBrowserModule.GetSingleton(); - if (WebBrowserSingleton) - { - WebBrowserSingleton->SetDefaultMaterial(ThirdwebAssetManager->GetDefaultMaterial()); - WebBrowserSingleton->SetDefaultTranslucentMaterial(ThirdwebAssetManager->GetDefaultTranslucentMaterial()); - } - } - } - } + virtual void StartupModule() override { + if (ThirdwebAssetManager == nullptr) { + ThirdwebAssetManager = + NewObject((UObject *)GetTransientPackage(), + NAME_None, RF_Transient | RF_Public); + ThirdwebAssetManager->LoadDefaultMaterials(); + } + } - virtual void ShutdownModule() override - { - } + virtual void ShutdownModule() override {} private: - UThirdwebAssetManager* ThirdwebAssetManager = nullptr; + UThirdwebAssetManager *ThirdwebAssetManager = nullptr; }; -IMPLEMENT_MODULE(FThirdwebModule, Thirdweb); +IMPLEMENT_MODULE(FThirdwebModule, Thirdweb); \ No newline at end of file diff --git a/Source/Thirdweb/Private/ThirdwebRuntimeSettings.cpp b/Source/Thirdweb/Private/ThirdwebRuntimeSettings.cpp index 7c4da2f..0a891fc 100644 --- a/Source/Thirdweb/Private/ThirdwebRuntimeSettings.cpp +++ b/Source/Thirdweb/Private/ThirdwebRuntimeSettings.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "ThirdwebRuntimeSettings.h" @@ -10,16 +10,6 @@ #include "HAL/FileManager.h" #include "Misc/Paths.h" -// These Providers do not work with an embedded browser for various reasons: -// - Google: https://accounts.youtube.com/accounts/SetSID does not load -// - Facebook: https://www.facebook.com/privacy/consent/gdp does not load -// - Telegram: Forced transient pop-up window -const TArray UThirdwebRuntimeSettings::ExternalOnlyProviders = { - EThirdwebOAuthProvider::Google, - EThirdwebOAuthProvider::Facebook, - EThirdwebOAuthProvider::Telegram, -}; - const FString UThirdwebRuntimeSettings::DefaultExternalAuthRedirectUri = TEXT("https://static.thirdweb.com/auth/complete"); UThirdwebRuntimeSettings::UThirdwebRuntimeSettings() @@ -27,9 +17,7 @@ UThirdwebRuntimeSettings::UThirdwebRuntimeSettings() bSendAnalytics = true; bOverrideExternalAuthRedirectUri = false; CustomExternalAuthRedirectUri = DefaultExternalAuthRedirectUri; - bOverrideOAuthBrowserProviderBackends = false; bOverrideAppUri = false; - for (const EThirdwebOAuthProvider Provider : ExternalOnlyProviders) OAuthBrowserProviderBackendOverrides[static_cast(Provider)] = EThirdwebOAuthBrowserBackend::External; } #if WITH_EDITOR @@ -52,17 +40,6 @@ void UThirdwebRuntimeSettings::PostEditChangeProperty(struct FPropertyChangedEve // ReSharper disable once CppTooWideScopeInitStatement const FName CurrentPropertyName = PropertyChangedEvent.GetMemberPropertyName(); UE_LOG(LogTemp, Warning, TEXT("PropertyChangedEvent=%s"), *CurrentPropertyName.ToString()) - if (CurrentPropertyName == GET_MEMBER_NAME_CHECKED(UThirdwebRuntimeSettings, OAuthBrowserProviderBackendOverrides)) - { - for (const EThirdwebOAuthProvider Provider : ExternalOnlyProviders) - { - if (OAuthBrowserProviderBackendOverrides[static_cast(Provider)] != EThirdwebOAuthBrowserBackend::External) - { - OAuthBrowserProviderBackendOverrides[static_cast(Provider)] = EThirdwebOAuthBrowserBackend::External; - bChanged = true; - } - } - } if (Trimmable.Contains(CurrentPropertyName)) { FString Value; @@ -126,6 +103,7 @@ bool UThirdwebRuntimeSettings::CanEditChange(const FProperty* InProperty) const } #endif + void UThirdwebRuntimeSettings::GenerateEncryptionKey() { #if WITH_EDITOR @@ -181,30 +159,13 @@ FString UThirdwebRuntimeSettings::GetEncryptionKey() FString UThirdwebRuntimeSettings::GetStorageDirectory() { - FString StorageDir = FPaths::Combine(IFileManager::Get().ConvertToAbsolutePathForExternalAppForWrite(*FPaths::ProjectSavedDir()), "Thirdweb", "InAppWallet"); + FString StorageDir = FPaths::Combine(IFileManager::Get().ConvertToAbsolutePathForExternalAppForWrite(*FPaths::ProjectSavedDir()), + "Thirdweb", + "InAppWallet"); TW_LOG(Verbose, TEXT("StorageDir::%s"), *StorageDir); return StorageDir; } -bool UThirdwebRuntimeSettings::IsExternalOAuthBackend(const EThirdwebOAuthProvider Provider) -{ - if (ExternalOnlyProviders.Contains(Provider)) return true; -#if PLATFORM_APPLE - // Apple natively handles apple auth links, so we want to enforce that flow - if (Provider == EThirdwebOAuthProvider::Apple) return true; -#endif - - if (const UThirdwebRuntimeSettings* Settings = Get()) - { - if (Settings->bOverrideOAuthBrowserProviderBackends) - { - return static_cast(Settings->OAuthBrowserProviderBackendOverrides[static_cast(Provider)]) == 1; - } - return static_cast(StaticClass()->GetDefaultObject()->OAuthBrowserProviderBackendOverrides[static_cast(Provider)]) == 1; - } - return false; -} - FString UThirdwebRuntimeSettings::GetEcosystemId() { if (const UThirdwebRuntimeSettings* Settings = Get()) @@ -291,24 +252,30 @@ FString UThirdwebRuntimeSettings::GetAppUri() void UThirdwebRuntimeSettings::FetchEngineSigners() { #if WITH_EDITOR - ThirdwebEngine::BackendWallet::FGetAllDelegate SuccessDelegate = ThirdwebEngine::BackendWallet::FGetAllDelegate::CreateWeakLambda(this, [this](const TArray& BackendWallets) - { - TArray Addresses; - for (const FThirdwebBackendWallet& BackendWallet : BackendWallets) + ThirdwebEngine::BackendWallet::FGetAllDelegate SuccessDelegate = ThirdwebEngine::BackendWallet::FGetAllDelegate::CreateWeakLambda(this, + [this](const TArray& BackendWallets) { - Addresses.Emplace(BackendWallet.Address); - } + TArray Addresses; + for (const FThirdwebBackendWallet& BackendWallet : BackendWallets) + { + Addresses.Emplace(BackendWallet.Address); + } - EngineSigners = Addresses; - if (MarkPackageDirty()) - { - PostEditChange(); - } - }); - FStringDelegate ErrorDelegate = FStringDelegate::CreateWeakLambda(this, [](const FString& ErrorMessage) - { - TW_LOG(Error, TEXT("UThirdwebRuntimeSettings::FetchEngineSigners::Failed to fetch engine signers::Error=%s"), *ErrorMessage); - }); + EngineSigners = Addresses; + if (MarkPackageDirty()) + { + PostEditChange(); + } + }); + FStringDelegate ErrorDelegate = FStringDelegate::CreateWeakLambda(this, + [](const FString& ErrorMessage) + { + TW_LOG(Error, + TEXT( + "UThirdwebRuntimeSettings::FetchEngineSigners::Failed to fetch engine signers::Error=%s" + ), + *ErrorMessage); + }); ThirdwebEngine::BackendWallet::GetAll(this, 1, 10, SuccessDelegate, ErrorDelegate); #endif } diff --git a/Source/Thirdweb/Private/ThirdwebUtils.cpp b/Source/Thirdweb/Private/ThirdwebUtils.cpp index f5d8f30..80c5a41 100644 --- a/Source/Thirdweb/Private/ThirdwebUtils.cpp +++ b/Source/Thirdweb/Private/ThirdwebUtils.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "ThirdwebUtils.h" @@ -27,6 +27,7 @@ #include "Kismet/KismetStringLibrary.h" #include "Misc/Base64.h" #include "Misc/DefaultValueHelper.h" +#include "Modules/ModuleManager.h" #include "Policies/CondensedJsonPrintPolicy.h" #include "Serialization/JsonReader.h" #include "Serialization/JsonSerializer.h" @@ -539,6 +540,33 @@ namespace ThirdwebUtils return JsonArray; } + TArray> ToJsonArray(const TArray& DynamicArray) + { + TArray> JsonValueArray; + for (const FString& Item : DynamicArray) + { + JsonValueArray.Emplace(ToJsonValue(Item)); + } + return JsonValueArray; + } + + TSharedPtr ToJsonValue(const FString& String) + { + if (String.StartsWith(TEXT("{")) && String.EndsWith(TEXT("}"))) + { + return MakeShareable(new FJsonValueObject(ToJson(String))); + } + if (String.StartsWith(TEXT("[")) && String.EndsWith(TEXT("]"))) + { + return MakeShareable(new FJsonValueArray(ToJsonArray(String))); + } + if (String.ToLower().Equals(TEXT("true")) || String.ToLower().Equals(TEXT("false"))) + { + return MakeShareable(new FJsonValueBoolean(String.ToLower().Equals(TEXT("true")))); + } + return MakeShareable(new FJsonValueString(String)); + } + FString ToString(const TSharedPtr& JsonObject) { FString Out; diff --git a/Source/Thirdweb/Private/Wallets/ThirdwebInAppWalletHandle.cpp b/Source/Thirdweb/Private/Wallets/ThirdwebInAppWalletHandle.cpp index 60e80e9..31fd0cd 100644 --- a/Source/Thirdweb/Private/Wallets/ThirdwebInAppWalletHandle.cpp +++ b/Source/Thirdweb/Private/Wallets/ThirdwebInAppWalletHandle.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. // ReSharper disable CppMemberFunctionMayBeConst @@ -14,17 +14,6 @@ #include "Misc/DefaultValueHelper.h" #include "Tasks/Task.h" -#define CHECK_ECOSYSTEM(ErrorDelegate) \ - if (UThirdwebRuntimeSettings::GetEcosystemId().IsEmpty()) \ - { \ - TW_LOG(Error, TEXT("Ecosystem ID not set in settings")) \ - if (ErrorDelegate.IsBound()) \ - { \ - ErrorDelegate.Execute(TEXT("Ecosystem ID not set in settings")); \ - } \ - return; \ - } - #define CHECK_SOURCE(InSource, ErrorDelegate) \ if (Source != InSource) \ { \ @@ -91,39 +80,21 @@ void FInAppWalletHandle::CreateEmailWallet(const FString& Email, const FCreateIn UE::Tasks::Launch(UE_SOURCE_LOCATION, [Email, SuccessDelegate, ErrorDelegate] { FString Error; - if (UThirdwebRuntimeSettings::IsEcosystem()) - { - if (Thirdweb::create_ecosystem_wallet( - TO_RUST_STRING(UThirdwebRuntimeSettings::GetEcosystemId()), - TO_RUST_STRING(UThirdwebRuntimeSettings::GetPartnerId()), - TO_RUST_STRING(UThirdwebRuntimeSettings::GetClientId()), - TO_RUST_STRING(UThirdwebRuntimeSettings::GetBundleId()), - nullptr, - TO_RUST_STRING(Email), - nullptr, - TO_RUST_STRING(UThirdwebRuntimeSettings::GetStorageDirectory()), - nullptr - ).AssignResult(Error)) - { - SuccessDelegate.Execute(FInAppWalletHandle(EInAppSource::Email, Error)); - return; - } - } - else - { - if (Thirdweb::create_in_app_wallet( - TO_RUST_STRING(UThirdwebRuntimeSettings::GetClientId()), - TO_RUST_STRING(UThirdwebRuntimeSettings::GetBundleId()), - nullptr, - TO_RUST_STRING(Email), - nullptr, - TO_RUST_STRING(UThirdwebRuntimeSettings::GetStorageDirectory()), - nullptr - ).AssignResult(Error)) - { - SuccessDelegate.Execute(FInAppWalletHandle(EInAppSource::Email, Error)); - return; - } + if (Thirdweb::create_ecosystem_wallet( + TO_RUST_STRING(UThirdwebRuntimeSettings::GetEcosystemId()), + TO_RUST_STRING(UThirdwebRuntimeSettings::GetPartnerId()), + TO_RUST_STRING(UThirdwebRuntimeSettings::GetClientId()), + TO_RUST_STRING(UThirdwebRuntimeSettings::GetBundleId()), + nullptr, + TO_RUST_STRING(Email), + nullptr, + TO_RUST_STRING(UThirdwebRuntimeSettings::GetStorageDirectory()), + nullptr, + nullptr + ).AssignResult(Error)) + { + SuccessDelegate.Execute(FInAppWalletHandle(EInAppSource::Email, Error)); + return; } ErrorDelegate.Execute(Error); }); @@ -135,39 +106,21 @@ void FInAppWalletHandle::CreateOAuthWallet(const EThirdwebOAuthProvider Provider UE::Tasks::Launch(UE_SOURCE_LOCATION, [Provider, SuccessDelegate, ErrorDelegate] { FString Error; - if (UThirdwebRuntimeSettings::IsEcosystem()) - { - if (Thirdweb::create_ecosystem_wallet( - TO_RUST_STRING(UThirdwebRuntimeSettings::GetEcosystemId()), - TO_RUST_STRING(UThirdwebRuntimeSettings::GetPartnerId()), - TO_RUST_STRING(UThirdwebRuntimeSettings::GetClientId()), - TO_RUST_STRING(UThirdwebRuntimeSettings::GetBundleId()), - nullptr, - nullptr, - nullptr, - TO_RUST_STRING(UThirdwebRuntimeSettings::GetStorageDirectory()), - TO_RUST_STRING(ThirdwebUtils::ToString(Provider)) - ).AssignResult(Error)) - { - SuccessDelegate.Execute(FInAppWalletHandle(Provider, Error)); - return; - } - } - else - { - if (Thirdweb::create_in_app_wallet( - TO_RUST_STRING(UThirdwebRuntimeSettings::GetClientId()), - TO_RUST_STRING(UThirdwebRuntimeSettings::GetBundleId()), - nullptr, - nullptr, - nullptr, - TO_RUST_STRING(UThirdwebRuntimeSettings::GetStorageDirectory()), - TO_RUST_STRING(ThirdwebUtils::ToString(Provider)) - ).AssignResult(Error)) - { - SuccessDelegate.Execute(FInAppWalletHandle(Provider, Error)); - return; - } + if (Thirdweb::create_ecosystem_wallet( + TO_RUST_STRING(UThirdwebRuntimeSettings::GetEcosystemId()), + TO_RUST_STRING(UThirdwebRuntimeSettings::GetPartnerId()), + TO_RUST_STRING(UThirdwebRuntimeSettings::GetClientId()), + TO_RUST_STRING(UThirdwebRuntimeSettings::GetBundleId()), + nullptr, + nullptr, + nullptr, + TO_RUST_STRING(UThirdwebRuntimeSettings::GetStorageDirectory()), + TO_RUST_STRING(ThirdwebUtils::ToString(Provider)), + nullptr + ).AssignResult(Error)) + { + SuccessDelegate.Execute(FInAppWalletHandle(Provider, Error)); + return; } ErrorDelegate.Execute(Error); }); @@ -179,40 +132,23 @@ void FInAppWalletHandle::CreatePhoneWallet(const FString& Phone, const FCreateIn UE::Tasks::Launch(UE_SOURCE_LOCATION, [Phone, SuccessDelegate, ErrorDelegate] { FString Error; - if (UThirdwebRuntimeSettings::IsEcosystem()) - { - if (Thirdweb::create_ecosystem_wallet( - TO_RUST_STRING(UThirdwebRuntimeSettings::GetEcosystemId()), - TO_RUST_STRING(UThirdwebRuntimeSettings::GetPartnerId()), - TO_RUST_STRING(UThirdwebRuntimeSettings::GetClientId()), - TO_RUST_STRING(UThirdwebRuntimeSettings::GetBundleId()), - nullptr, - nullptr, - TO_RUST_STRING(Phone), - TO_RUST_STRING(UThirdwebRuntimeSettings::GetStorageDirectory()), - nullptr - ).AssignResult(Error)) - { - SuccessDelegate.Execute(FInAppWalletHandle(EInAppSource::Phone, Error)); - return; - } - } - else - { - if (Thirdweb::create_in_app_wallet( - TO_RUST_STRING(UThirdwebRuntimeSettings::GetClientId()), - TO_RUST_STRING(UThirdwebRuntimeSettings::GetBundleId()), - nullptr, - nullptr, - TO_RUST_STRING(Phone), - TO_RUST_STRING(UThirdwebRuntimeSettings::GetStorageDirectory()), - nullptr - ).AssignResult(Error)) - { - SuccessDelegate.Execute(FInAppWalletHandle(EInAppSource::Phone, Error)); - return; - } + if (Thirdweb::create_ecosystem_wallet( + TO_RUST_STRING(UThirdwebRuntimeSettings::GetEcosystemId()), + TO_RUST_STRING(UThirdwebRuntimeSettings::GetPartnerId()), + TO_RUST_STRING(UThirdwebRuntimeSettings::GetClientId()), + TO_RUST_STRING(UThirdwebRuntimeSettings::GetBundleId()), + nullptr, + nullptr, + TO_RUST_STRING(Phone), + TO_RUST_STRING(UThirdwebRuntimeSettings::GetStorageDirectory()), + nullptr, + nullptr + ).AssignResult(Error)) + { + SuccessDelegate.Execute(FInAppWalletHandle(EInAppSource::Phone, Error)); + return; } + ErrorDelegate.Execute(Error); }); } @@ -224,39 +160,21 @@ void FInAppWalletHandle::CreateSiweWallet(const FCreateInAppWalletDelegate& Succ { static FString Provider = TEXT("SIWE"); FString Error; - if (UThirdwebRuntimeSettings::IsEcosystem()) - { - if (Thirdweb::create_ecosystem_wallet( - TO_RUST_STRING(UThirdwebRuntimeSettings::GetEcosystemId()), - TO_RUST_STRING(UThirdwebRuntimeSettings::GetPartnerId()), - TO_RUST_STRING(UThirdwebRuntimeSettings::GetClientId()), - TO_RUST_STRING(UThirdwebRuntimeSettings::GetBundleId()), - nullptr, - nullptr, - nullptr, - TO_RUST_STRING(UThirdwebRuntimeSettings::GetStorageDirectory()), - TO_RUST_STRING(Provider) - ).AssignResult(Error)) - { - SuccessDelegate.Execute(FInAppWalletHandle(Siwe, Error)); - return; - } - } - else - { - if (Thirdweb::create_in_app_wallet( - TO_RUST_STRING(UThirdwebRuntimeSettings::GetClientId()), - TO_RUST_STRING(UThirdwebRuntimeSettings::GetBundleId()), - nullptr, - nullptr, - nullptr, - TO_RUST_STRING(UThirdwebRuntimeSettings::GetStorageDirectory()), - TO_RUST_STRING(Provider) - ).AssignResult(Error)) - { - SuccessDelegate.Execute(FInAppWalletHandle(Siwe, Error)); - return; - } + if (Thirdweb::create_ecosystem_wallet( + TO_RUST_STRING(UThirdwebRuntimeSettings::GetEcosystemId()), + TO_RUST_STRING(UThirdwebRuntimeSettings::GetPartnerId()), + TO_RUST_STRING(UThirdwebRuntimeSettings::GetClientId()), + TO_RUST_STRING(UThirdwebRuntimeSettings::GetBundleId()), + nullptr, + nullptr, + nullptr, + TO_RUST_STRING(UThirdwebRuntimeSettings::GetStorageDirectory()), + TO_RUST_STRING(Provider), + nullptr + ).AssignResult(Error)) + { + SuccessDelegate.Execute(FInAppWalletHandle(Siwe, Error)); + return; } ErrorDelegate.Execute(Error); }); @@ -276,39 +194,22 @@ void FInAppWalletHandle::CreateCustomAuthWallet(const EInAppSource Source, const UE::Tasks::Launch(UE_SOURCE_LOCATION, [Source, SuccessDelegate, ErrorDelegate] { FString Error; - if (UThirdwebRuntimeSettings::IsEcosystem()) - { - if (Thirdweb::create_ecosystem_wallet( - TO_RUST_STRING(UThirdwebRuntimeSettings::GetEcosystemId()), - TO_RUST_STRING(UThirdwebRuntimeSettings::GetPartnerId()), - TO_RUST_STRING(UThirdwebRuntimeSettings::GetClientId()), - TO_RUST_STRING(UThirdwebRuntimeSettings::GetBundleId()), - nullptr, - nullptr, - nullptr, - TO_RUST_STRING(UThirdwebRuntimeSettings::GetStorageDirectory()), - TO_RUST_STRING(FString(GetSourceString(Source))) - ).AssignResult(Error)) - { - SuccessDelegate.Execute(FInAppWalletHandle(Source, Error)); - return; - } - } - else - { - if (Thirdweb::create_in_app_wallet( - TO_RUST_STRING(UThirdwebRuntimeSettings::GetClientId()), - TO_RUST_STRING(UThirdwebRuntimeSettings::GetBundleId()), - nullptr, - nullptr, - nullptr, - TO_RUST_STRING(UThirdwebRuntimeSettings::GetStorageDirectory()), - TO_RUST_STRING(FString(GetSourceString(Source))) - ).AssignResult(Error)) - { - SuccessDelegate.Execute(FInAppWalletHandle(Source, Error)); - return; - } + if (Thirdweb::create_ecosystem_wallet( + TO_RUST_STRING(UThirdwebRuntimeSettings::GetEcosystemId()), + TO_RUST_STRING(UThirdwebRuntimeSettings::GetPartnerId()), + TO_RUST_STRING(UThirdwebRuntimeSettings::GetClientId()), + TO_RUST_STRING(UThirdwebRuntimeSettings::GetBundleId()), + nullptr, + nullptr, + nullptr, + TO_RUST_STRING(UThirdwebRuntimeSettings::GetStorageDirectory()), + TO_RUST_STRING(FString(GetSourceString(Source))), + // legacy, will be used if migrating only + TO_RUST_STRING(UThirdwebRuntimeSettings::GetEncryptionKey()) + ).AssignResult(Error)) + { + SuccessDelegate.Execute(FInAppWalletHandle(Source, Error)); + return; } ErrorDelegate.Execute(Error); }); @@ -332,62 +233,29 @@ void FInAppWalletHandle::SendOTP(const FStreamableDelegate& SuccessDelegate, con UE::Tasks::Launch(UE_SOURCE_LOCATION, [ThisCopy, SuccessDelegate, ErrorDelegate] { FString Error; - if (UThirdwebRuntimeSettings::IsEcosystem()) + switch (ThisCopy.GetSource()) { - switch (ThisCopy.GetSource()) + case Phone: { - case Phone: - { - if (Thirdweb::ecosystem_wallet_send_otp_phone(ThisCopy.GetID()).AssignResult(Error, true)) - { - SuccessDelegate.Execute(); - return; - } - break; - } - case Email: + if (Thirdweb::ecosystem_wallet_send_otp_phone(ThisCopy.GetID()).AssignResult(Error, true)) { - if (Thirdweb::ecosystem_wallet_send_otp_email(ThisCopy.GetID()).AssignResult(Error, true)) - { - SuccessDelegate.Execute(); - return; - } - break; - } - default: - { - ErrorDelegate.Execute(TEXT("Wallet handle is not email/phone source")); + SuccessDelegate.Execute(); return; } + break; } - } - else - { - switch (ThisCopy.GetSource()) + case Email: { - case Phone: - { - if (Thirdweb::in_app_wallet_send_otp_phone(ThisCopy.GetID()).AssignResult(Error, true)) - { - SuccessDelegate.Execute(); - return; - } - break; - } - case Email: + if (Thirdweb::ecosystem_wallet_send_otp_email(ThisCopy.GetID()).AssignResult(Error, true)) { - if (Thirdweb::in_app_wallet_send_otp_email(ThisCopy.GetID()).AssignResult(Error, true)) - { - SuccessDelegate.Execute(); - return; - } - break; - } - default: - { - ErrorDelegate.Execute(TEXT("Wallet handle is not email/phone source")); + SuccessDelegate.Execute(); return; } + break; + } + default: + { + Error = TEXT("Wallet handle is not email/phone source"); } } ErrorDelegate.Execute(Error); @@ -407,57 +275,29 @@ void FInAppWalletHandle::SignInWithOTP(const FString& OTP, const FStreamableDele UE::Tasks::Launch(UE_SOURCE_LOCATION, [ThisCopy, OTP, SuccessDelegate, ErrorDelegate] { FString Error; - if (UThirdwebRuntimeSettings::IsEcosystem()) + switch (ThisCopy.GetSource()) { - switch (ThisCopy.GetSource()) + case Phone: { - case Phone: - { - if (Thirdweb::ecosystem_wallet_sign_in_with_otp_phone(ThisCopy.GetID(), TO_RUST_STRING(OTP)).AssignResult(Error, true)) - { - ThirdwebUtils::Internal::SendConnectEvent(ThisCopy); - SuccessDelegate.Execute(); - return; - } - break; - } - case Email: + if (Thirdweb::ecosystem_wallet_sign_in_with_otp_phone(ThisCopy.GetID(), TO_RUST_STRING(OTP)).AssignResult(Error, true)) { - if (Thirdweb::ecosystem_wallet_sign_in_with_otp_email(ThisCopy.GetID(), TO_RUST_STRING(OTP)).AssignResult(Error, true)) - { - ThirdwebUtils::Internal::SendConnectEvent(ThisCopy); - SuccessDelegate.Execute(); - return; - } - break; + ThirdwebUtils::Internal::SendConnectEvent(ThisCopy); + SuccessDelegate.Execute(); + return; } - default: return; + break; } - } - else - { - switch (ThisCopy.GetSource()) + case Email: { - case Phone: - { - if (Thirdweb::in_app_wallet_sign_in_with_otp_phone(ThisCopy.GetID(), TO_RUST_STRING(OTP)).AssignResult(Error, true)) - { - ThirdwebUtils::Internal::SendConnectEvent(ThisCopy); - SuccessDelegate.Execute(); - return; - } - } - case Email: + if (Thirdweb::ecosystem_wallet_sign_in_with_otp_email(ThisCopy.GetID(), TO_RUST_STRING(OTP)).AssignResult(Error, true)) { - if (Thirdweb::in_app_wallet_sign_in_with_otp_email(ThisCopy.GetID(), TO_RUST_STRING(OTP)).AssignResult(Error, true)) - { - ThirdwebUtils::Internal::SendConnectEvent(ThisCopy); - SuccessDelegate.Execute(); - return; - } + ThirdwebUtils::Internal::SendConnectEvent(ThisCopy); + SuccessDelegate.Execute(); + return; } - default: return; + break; } + default: return; } ErrorDelegate.Execute(Error); }); @@ -467,7 +307,6 @@ void FInAppWalletHandle::LinkOTP(const FInAppWalletHandle& Wallet, const FString { CHECK_DELEGATES(SuccessDelegate, ErrorDelegate) CHECK_VALIDITY(ErrorDelegate) - CHECK_ECOSYSTEM(ErrorDelegate) if (Wallet.GetSource() != Phone && Wallet.GetSource() != Email) { ErrorDelegate.Execute(TEXT("Wallet handle is not email/phone OTP source")); @@ -477,27 +316,20 @@ void FInAppWalletHandle::LinkOTP(const FInAppWalletHandle& Wallet, const FString UE::Tasks::Launch(UE_SOURCE_LOCATION, [ThisCopy, Wallet, OTP, SuccessDelegate, ErrorDelegate] { FString Error; - switch (ThisCopy.GetSource()) + if (Thirdweb::ecosystem_wallet_link_account( + ThisCopy.GetID(), + Wallet.GetID(), + TO_RUST_STRING(OTP), + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + nullptr + ).AssignResult(Error, true)) { - case Phone: - { - if (Thirdweb::ecosystem_wallet_link_account(ThisCopy.GetID(), Wallet.GetID(), TO_RUST_STRING(OTP), nullptr, nullptr, nullptr, nullptr, nullptr, nullptr).AssignResult(Error, true)) - { - SuccessDelegate.Execute(); - return; - } - break; - } - case Email: - { - if (Thirdweb::ecosystem_wallet_sign_in_with_otp_email(ThisCopy.GetID(), TO_RUST_STRING(OTP)).AssignResult(Error, true)) - { - SuccessDelegate.Execute(); - return; - } - break; - } - default: return; + SuccessDelegate.Execute(); + return; } ErrorDelegate.Execute(Error); }); @@ -516,25 +348,12 @@ bool FInAppWalletHandle::FetchOAuthLoginURL(const FString& RedirectUrl, FString& return false; } FInAppWalletHandle ThisCopy = *this; - if (UThirdwebRuntimeSettings::IsEcosystem()) + if (Thirdweb::ecosystem_wallet_fetch_oauth_login_link(ThisCopy.GetID(), TO_RUST_STRING(RedirectUrl)).AssignResult(Error)) { - if (Thirdweb::ecosystem_wallet_fetch_oauth_login_link(ThisCopy.GetID(), TO_RUST_STRING(RedirectUrl)).AssignResult(Error)) - { - LoginLink = Error; - Error.Empty(); - return true; - } + LoginLink = Error; + Error.Empty(); + return true; } - else - { - if (Thirdweb::in_app_wallet_fetch_oauth_login_link(ThisCopy.GetID(), TO_RUST_STRING(RedirectUrl)).AssignResult(Error)) - { - LoginLink = Error; - Error.Empty(); - return true; - } - } - return false; } @@ -554,24 +373,12 @@ void FInAppWalletHandle::SignInWithOAuth(const FString& AuthResult, const FStrea UE::Tasks::Launch(UE_SOURCE_LOCATION, [ThisCopy, Result, SuccessDelegate, ErrorDelegate] { FString Error; - if (UThirdwebRuntimeSettings::IsEcosystem()) + TW_LOG(VeryVerbose, TEXT("FInAppWalletHandle::SignInWithOAuth::Task::%s"), *Result) + if (Thirdweb::ecosystem_wallet_sign_in_with_oauth(ThisCopy.GetID(), TO_RUST_STRING(Result)).AssignResult(Error, true)) { - TW_LOG(VeryVerbose, TEXT("FInAppWalletHandle::SignInWithOAuth::Task::%s"), *Result) - if (Thirdweb::ecosystem_wallet_sign_in_with_oauth(ThisCopy.GetID(), TO_RUST_STRING(Result)).AssignResult(Error, true)) - { - ThirdwebUtils::Internal::SendConnectEvent(ThisCopy); - SuccessDelegate.Execute(); - return; - } - } - else - { - if (Thirdweb::in_app_wallet_sign_in_with_oauth(ThisCopy.GetID(), TO_RUST_STRING(Result)).AssignResult(Error, true)) - { - ThirdwebUtils::Internal::SendConnectEvent(ThisCopy); - SuccessDelegate.Execute(); - return; - } + ThirdwebUtils::Internal::SendConnectEvent(ThisCopy); + SuccessDelegate.Execute(); + return; } ErrorDelegate.Execute(Error); }); @@ -581,7 +388,6 @@ void FInAppWalletHandle::LinkOAuth(const FInAppWalletHandle& Wallet, const FStri { CHECK_DELEGATES(SuccessDelegate, ErrorDelegate) CHECK_VALIDITY(ErrorDelegate) - CHECK_ECOSYSTEM(ErrorDelegate) CHECK_WALLET_SOURCE(Wallet, OAuthProvider, ErrorDelegate) FString Result = ThirdwebUtils::ParseAuthResult(AuthResult); @@ -589,7 +395,17 @@ void FInAppWalletHandle::LinkOAuth(const FInAppWalletHandle& Wallet, const FStri UE::Tasks::Launch(UE_SOURCE_LOCATION, [ThisCopy, Wallet, Result, SuccessDelegate, ErrorDelegate] { FString Error; - if (Thirdweb::ecosystem_wallet_link_account(ThisCopy.GetID(), Wallet.GetID(), nullptr, TO_RUST_STRING(Result), nullptr, nullptr, nullptr, nullptr, nullptr).AssignResult(Error, true)) + if (Thirdweb::ecosystem_wallet_link_account( + ThisCopy.GetID(), + Wallet.GetID(), + nullptr, + TO_RUST_STRING(Result), + nullptr, + nullptr, + nullptr, + nullptr, + nullptr + ).AssignResult(Error, true)) { SuccessDelegate.Execute(); return; @@ -608,28 +424,11 @@ void FInAppWalletHandle::SignInWithJwt(const FString& Jwt, const FStreamableDele UE::Tasks::Launch(UE_SOURCE_LOCATION, [ThisCopy, Jwt, SuccessDelegate, ErrorDelegate] { FString Error; - if (UThirdwebRuntimeSettings::IsEcosystem()) - { - if (Thirdweb::ecosystem_wallet_sign_in_with_jwt(ThisCopy.GetID(), TO_RUST_STRING(Jwt)).AssignResult(Error, true)) - { - ThirdwebUtils::Internal::SendConnectEvent(ThisCopy); - SuccessDelegate.Execute(); - return; - } - } - else + if (Thirdweb::ecosystem_wallet_sign_in_with_jwt(ThisCopy.GetID(), TO_RUST_STRING(Jwt)).AssignResult(Error, true)) { - if (UThirdwebRuntimeSettings::GetEncryptionKey().IsEmpty()) - { - ErrorDelegate.Execute(TEXT("No encryption key set")); - return; - } - if (Thirdweb::in_app_wallet_sign_in_with_jwt(ThisCopy.GetID(), TO_RUST_STRING(Jwt), TO_RUST_STRING(UThirdwebRuntimeSettings::GetEncryptionKey())).AssignResult(Error, true)) - { - ThirdwebUtils::Internal::SendConnectEvent(ThisCopy); - SuccessDelegate.Execute(); - return; - } + ThirdwebUtils::Internal::SendConnectEvent(ThisCopy); + SuccessDelegate.Execute(); + return; } ErrorDelegate.Execute(Error); }); @@ -639,14 +438,23 @@ void FInAppWalletHandle::LinkJwt(const FInAppWalletHandle& Wallet, const FString { CHECK_DELEGATES(SuccessDelegate, ErrorDelegate) CHECK_VALIDITY(ErrorDelegate) - CHECK_ECOSYSTEM(ErrorDelegate) CHECK_WALLET_SOURCE(Wallet, EInAppSource::Jwt, ErrorDelegate) FInAppWalletHandle ThisCopy = *this; UE::Tasks::Launch(UE_SOURCE_LOCATION, [ThisCopy, Wallet, Jwt, SuccessDelegate, ErrorDelegate] { FString Error; - if (Thirdweb::ecosystem_wallet_link_account(ThisCopy.GetID(), Wallet.GetID(), nullptr, nullptr, TO_RUST_STRING(Jwt), nullptr, nullptr, nullptr, nullptr).AssignResult(Error, true)) + if (Thirdweb::ecosystem_wallet_link_account( + ThisCopy.GetID(), + Wallet.GetID(), + nullptr, + nullptr, + TO_RUST_STRING(Jwt), + nullptr, + nullptr, + nullptr, + nullptr + ).AssignResult(Error, true)) { SuccessDelegate.Execute(); return; @@ -665,28 +473,11 @@ void FInAppWalletHandle::SignInWithAuthEndpoint(const FString& Payload, const FS UE::Tasks::Launch(UE_SOURCE_LOCATION, [ThisCopy, Payload, SuccessDelegate, ErrorDelegate] { FString Error; - if (UThirdwebRuntimeSettings::IsEcosystem()) + if (Thirdweb::ecosystem_wallet_sign_in_with_auth_endpoint(ThisCopy.GetID(), TO_RUST_STRING(Payload)).AssignResult(Error, true)) { - if (Thirdweb::ecosystem_wallet_sign_in_with_auth_endpoint(ThisCopy.GetID(), TO_RUST_STRING(Payload)).AssignResult(Error, true)) - { - ThirdwebUtils::Internal::SendConnectEvent(ThisCopy); - SuccessDelegate.Execute(); - return; - } - } - else - { - if (UThirdwebRuntimeSettings::GetEncryptionKey().IsEmpty()) - { - ErrorDelegate.Execute(TEXT("No encryption key set")); - return; - } - if (Thirdweb::in_app_wallet_sign_in_with_auth_endpoint(ThisCopy.GetID(), TO_RUST_STRING(Payload), TO_RUST_STRING(UThirdwebRuntimeSettings::GetEncryptionKey())).AssignResult(Error, true)) - { - ThirdwebUtils::Internal::SendConnectEvent(ThisCopy); - SuccessDelegate.Execute(); - return; - } + ThirdwebUtils::Internal::SendConnectEvent(ThisCopy); + SuccessDelegate.Execute(); + return; } ErrorDelegate.Execute(Error); }); @@ -696,14 +487,23 @@ void FInAppWalletHandle::LinkAuthEndpoint(const FInAppWalletHandle& Wallet, cons { CHECK_DELEGATES(SuccessDelegate, ErrorDelegate) CHECK_VALIDITY(ErrorDelegate) - CHECK_ECOSYSTEM(ErrorDelegate) CHECK_WALLET_SOURCE(Wallet, AuthEndpoint, ErrorDelegate) FInAppWalletHandle ThisCopy = *this; UE::Tasks::Launch(UE_SOURCE_LOCATION, [ThisCopy, Wallet, Payload, SuccessDelegate, ErrorDelegate] { FString Error; - if (Thirdweb::ecosystem_wallet_link_account(ThisCopy.GetID(), Wallet.GetID(), nullptr, nullptr, nullptr, TO_RUST_STRING(Payload), nullptr, nullptr, nullptr).AssignResult(Error, true)) + if (Thirdweb::ecosystem_wallet_link_account( + ThisCopy.GetID(), + Wallet.GetID(), + nullptr, + nullptr, + nullptr, + TO_RUST_STRING(Payload), + nullptr, + nullptr, + nullptr + ).AssignResult(Error, true)) { SuccessDelegate.Execute(); return; @@ -722,23 +522,11 @@ void FInAppWalletHandle::SignInWithGuest(const FStreamableDelegate& SuccessDeleg UE::Tasks::Launch(UE_SOURCE_LOCATION, [ThisCopy, SuccessDelegate, ErrorDelegate] { FString Error; - if (UThirdwebRuntimeSettings::IsEcosystem()) - { - if (Thirdweb::ecosystem_wallet_sign_in_with_guest(ThisCopy.GetID(), TO_RUST_STRING(FPlatformMisc::GetLoginId())).AssignResult(Error, true)) - { - ThirdwebUtils::Internal::SendConnectEvent(ThisCopy); - SuccessDelegate.Execute(); - return; - } - } - else + if (Thirdweb::ecosystem_wallet_sign_in_with_guest(ThisCopy.GetID(), TO_RUST_STRING(FPlatformMisc::GetLoginId())).AssignResult(Error, true)) { - if (Thirdweb::in_app_wallet_sign_in_with_guest(ThisCopy.GetID(), TO_RUST_STRING(FPlatformMisc::GetLoginId())).AssignResult(Error, true)) - { - ThirdwebUtils::Internal::SendConnectEvent(ThisCopy); - SuccessDelegate.Execute(); - return; - } + ThirdwebUtils::Internal::SendConnectEvent(ThisCopy); + SuccessDelegate.Execute(); + return; } ErrorDelegate.Execute(Error); }); @@ -748,15 +536,22 @@ void FInAppWalletHandle::LinkGuest(const FInAppWalletHandle& Wallet, const FStre { CHECK_DELEGATES(SuccessDelegate, ErrorDelegate) CHECK_VALIDITY(ErrorDelegate) - CHECK_ECOSYSTEM(ErrorDelegate) CHECK_WALLET_SOURCE(Wallet, Guest, ErrorDelegate) FInAppWalletHandle ThisCopy = *this; UE::Tasks::Launch(UE_SOURCE_LOCATION, [ThisCopy, Wallet, SuccessDelegate, ErrorDelegate] { FString Error; - if (Thirdweb::ecosystem_wallet_link_account(ThisCopy.GetID(), Wallet.GetID(), nullptr, nullptr, nullptr, nullptr, TO_RUST_STRING(FPlatformMisc::GetLoginId()), nullptr, nullptr). - AssignResult(Error, true)) + if (Thirdweb::ecosystem_wallet_link_account( + ThisCopy.GetID(), + Wallet.GetID(), + nullptr, + nullptr, + nullptr, + nullptr, + TO_RUST_STRING(FPlatformMisc::GetLoginId()), + nullptr, + nullptr).AssignResult(Error, true)) { SuccessDelegate.Execute(); return; @@ -774,25 +569,12 @@ void FInAppWalletHandle::SignInWithEthereum(const FString& Payload, const FStrin FInAppWalletHandle ThisCopy = *this; UE::Tasks::Launch(UE_SOURCE_LOCATION, [ThisCopy, Payload, Signature, SuccessDelegate, ErrorDelegate] { - UE_LOG(LogTemp, VeryVerbose, TEXT("FInAppWalletHandle::SignInWithEthereum::Task::WalletHandle=%lld | Signature=%s | Payload=%s"), ThisCopy.GetID(), *Signature, *Payload); FString Error; - if (UThirdwebRuntimeSettings::IsEcosystem()) - { - if (Thirdweb::ecosystem_wallet_sign_in_with_siwe(ThisCopy.GetID(), TO_RUST_STRING(Payload), TO_RUST_STRING(Signature)).AssignResult(Error, true)) - { - ThirdwebUtils::Internal::SendConnectEvent(ThisCopy); - SuccessDelegate.Execute(); - return; - } - } - else + if (Thirdweb::ecosystem_wallet_sign_in_with_siwe(ThisCopy.GetID(), TO_RUST_STRING(Payload), TO_RUST_STRING(Signature)).AssignResult(Error, true)) { - if (Thirdweb::in_app_wallet_sign_in_with_siwe(ThisCopy.GetID(), TO_RUST_STRING(Payload), TO_RUST_STRING(Signature)).AssignResult(Error, true)) - { - ThirdwebUtils::Internal::SendConnectEvent(ThisCopy); - SuccessDelegate.Execute(); - return; - } + ThirdwebUtils::Internal::SendConnectEvent(ThisCopy); + SuccessDelegate.Execute(); + return; } ErrorDelegate.Execute(Error); }); @@ -802,15 +584,22 @@ void FInAppWalletHandle::LinkSiwe(const FInAppWalletHandle& Wallet, const FStrin { CHECK_DELEGATES(SuccessDelegate, ErrorDelegate) CHECK_VALIDITY(ErrorDelegate) - CHECK_ECOSYSTEM(ErrorDelegate) CHECK_WALLET_SOURCE(Wallet, Siwe, ErrorDelegate) FInAppWalletHandle ThisCopy = *this; UE::Tasks::Launch(UE_SOURCE_LOCATION, [ThisCopy, Wallet, Payload, Signature, SuccessDelegate, ErrorDelegate] { FString Error; - if (Thirdweb::ecosystem_wallet_link_account(ThisCopy.GetID(), Wallet.GetID(), nullptr, nullptr, nullptr, nullptr, nullptr, TO_RUST_STRING(Signature), TO_RUST_STRING(Payload)). - AssignResult(Error, true)) + if (Thirdweb::ecosystem_wallet_link_account( + ThisCopy.GetID(), + Wallet.GetID(), + nullptr, + nullptr, + nullptr, + nullptr, + nullptr, + TO_RUST_STRING(Signature), + TO_RUST_STRING(Payload)).AssignResult(Error, true)) { SuccessDelegate.Execute(); return; @@ -823,7 +612,6 @@ void FInAppWalletHandle::GetLinkedAccounts(const FGetLinkedAccountsDelegate& Suc { CHECK_DELEGATES(SuccessDelegate, ErrorDelegate) CHECK_VALIDITY(ErrorDelegate) - CHECK_ECOSYSTEM(ErrorDelegate) FInAppWalletHandle ThisCopy = *this; UE::Tasks::Launch(UE_SOURCE_LOCATION, [ThisCopy, SuccessDelegate, ErrorDelegate] @@ -850,11 +638,11 @@ void FInAppWalletHandle::GetLinkedAccounts(const FGetLinkedAccountsDelegate& Suc FString FInAppWalletHandle::GetDisplayName() const { return IsValid() - ? FString::Printf( - TEXT("%sWallet::%s::%lld"), - GetTypeString(), - Source == OAuthProvider - ? *FString::Printf(TEXT("%s::%s"), GetSourceString(), *ThirdwebUtils::ToString(Provider)) - : GetSourceString(), ID) + ? FString::Printf(TEXT("%sWallet::%s::%lld"), + GetTypeString(), + Source == OAuthProvider + ? *FString::Printf(TEXT("%s::%s"), GetSourceString(), *ThirdwebUtils::ToString(Provider)) + : GetSourceString(), + ID) : TEXT("InAppWallet::INVALID"); } diff --git a/Source/Thirdweb/Private/Wallets/ThirdwebSmartWalletHandle.cpp b/Source/Thirdweb/Private/Wallets/ThirdwebSmartWalletHandle.cpp index 2a533e1..25c40be 100644 --- a/Source/Thirdweb/Private/Wallets/ThirdwebSmartWalletHandle.cpp +++ b/Source/Thirdweb/Private/Wallets/ThirdwebSmartWalletHandle.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "Wallets/ThirdwebSmartWalletHandle.h" @@ -24,7 +24,7 @@ #include "Tasks/Task.h" -FSmartWalletHandle::FSmartWalletHandle(const FInAppWalletHandle& InInAppWallet, const FString& Int64String) +FSmartWalletHandle::FSmartWalletHandle(const FInAppWalletHandle& InInAppWallet, const FString& Int64String, const FString& InCustomFactory) { Type = Smart; int64 InID; @@ -32,6 +32,7 @@ FSmartWalletHandle::FSmartWalletHandle(const FInAppWalletHandle& InInAppWallet, FDefaultValueHelper::ParseInt64(Int64String, InID); ensureAlwaysMsgf(InID > 0, TEXT("Invalid id 0")); ID = InID; + CustomFactory = InCustomFactory; } void FSmartWalletHandle::Create(const FInAppWalletHandle& InInAppWallet, @@ -43,7 +44,7 @@ void FSmartWalletHandle::Create(const FInAppWalletHandle& InInAppWallet, const FStringDelegate& ErrorDelegate) { CHECK_DELEGATES(SuccessDelegate, ErrorDelegate); - + if (!InInAppWallet.IsValid()) { if (ErrorDelegate.IsBound()) @@ -52,7 +53,7 @@ void FSmartWalletHandle::Create(const FInAppWalletHandle& InInAppWallet, } return; } - + UE::Tasks::Launch(UE_SOURCE_LOCATION, [InInAppWallet, ChainID, bGasless, Factory, AccountOverride, SuccessDelegate, ErrorDelegate] { if (FString Error; Thirdweb::create_smart_wallet( @@ -66,7 +67,7 @@ void FSmartWalletHandle::Create(const FInAppWalletHandle& InInAppWallet, TO_RUST_STRING(AccountOverride) ).AssignResult(Error)) { - const FSmartWalletHandle SmartWallet = FSmartWalletHandle(InInAppWallet, Error); + const FSmartWalletHandle SmartWallet = FSmartWalletHandle(InInAppWallet, Error, Factory); SuccessDelegate.Execute(SmartWallet); ThirdwebUtils::Internal::SendConnectEvent(SmartWallet); } @@ -84,7 +85,7 @@ void FSmartWalletHandle::IsDeployed(const FBoolDelegate& SuccessDelegate, const { CHECK_DELEGATES(SuccessDelegate, ErrorDelegate); CHECK_VALIDITY(ErrorDelegate); - + FSmartWalletHandle ThisCopy = *this; UE::Tasks::Launch(UE_SOURCE_LOCATION, [ThisCopy, SuccessDelegate, ErrorDelegate] { @@ -99,16 +100,18 @@ void FSmartWalletHandle::IsDeployed(const FBoolDelegate& SuccessDelegate, const }); } -void FSmartWalletHandle::CreateSessionKey(const FString& Signer, - const TArray& ApprovedTargets, - const FString& NativeTokenLimitPerTransactionInWei, - const FDateTime& PermissionEnd, - const FStringDelegate& SuccessDelegate, - const FStringDelegate& ErrorDelegate) +void FSmartWalletHandle::CreateSessionKey( + const FString& Signer, + const TArray& ApprovedTargets, + const FString& NativeTokenLimitPerTransactionInWei, + const FDateTime& PermissionEnd, + const FStringDelegate& SuccessDelegate, + const FStringDelegate& ErrorDelegate +) { CHECK_DELEGATES(SuccessDelegate, ErrorDelegate); CHECK_VALIDITY(ErrorDelegate); - + FDateTime TenYearsFromNow = FDateTime::UtcNow() + FTimespan::FromDays(10 * 365); FDateTime EndTime = TenYearsFromNow; TArray ApprovedTargetsCArray; @@ -167,7 +170,7 @@ void FSmartWalletHandle::RevokeSessionKey(const FString& Signer, const FSimpleDe { CHECK_DELEGATES(SuccessDelegate, ErrorDelegate); CHECK_VALIDITY(ErrorDelegate); - + FSmartWalletHandle ThisCopy = *this; UE::Tasks::Launch(UE_SOURCE_LOCATION, [ThisCopy, Signer, SuccessDelegate, ErrorDelegate] { @@ -186,7 +189,7 @@ void FSmartWalletHandle::GetAdmins(const FStringArrayDelegate& SuccessDelegate, { CHECK_DELEGATES(SuccessDelegate, ErrorDelegate); CHECK_VALIDITY(ErrorDelegate); - + FSmartWalletHandle ThisCopy = *this; UE::Tasks::Launch(UE_SOURCE_LOCATION, [ThisCopy, SuccessDelegate, ErrorDelegate] { @@ -219,14 +222,15 @@ void FSmartWalletHandle::AddAdmin(const FString& Signer, const FSimpleDelegate& { CHECK_DELEGATES(SuccessDelegate, ErrorDelegate); CHECK_VALIDITY(ErrorDelegate); - + FSmartWalletHandle ThisCopy = *this; UE::Tasks::Launch(UE_SOURCE_LOCATION, [ThisCopy, Signer, SuccessDelegate, ErrorDelegate] { if (FString Error; Thirdweb::smart_wallet_add_admin(ThisCopy.GetID(), TO_RUST_STRING(Signer)).AssignResult(Error)) { SuccessDelegate.Execute(); - } else + } + else { ErrorDelegate.Execute(Error); } @@ -237,14 +241,15 @@ void FSmartWalletHandle::RemoveAdmin(const FString& Signer, const FSimpleDelegat { CHECK_DELEGATES(SuccessDelegate, ErrorDelegate); CHECK_VALIDITY(ErrorDelegate); - + FSmartWalletHandle ThisCopy = *this; UE::Tasks::Launch(UE_SOURCE_LOCATION, [ThisCopy, Signer, SuccessDelegate, ErrorDelegate] { if (FString Error; Thirdweb::smart_wallet_remove_admin(ThisCopy.GetID(), TO_RUST_STRING(Signer)).AssignResult(Error)) { SuccessDelegate.Execute(); - } else + } + else { ErrorDelegate.Execute(Error); } @@ -255,7 +260,7 @@ void FSmartWalletHandle::GetActiveSigners(const FGetActiveSignersDelegate& Succe { CHECK_DELEGATES(SuccessDelegate, ErrorDelegate); CHECK_VALIDITY(ErrorDelegate); - + FSmartWalletHandle ThisCopy = *this; UE::Tasks::Launch(UE_SOURCE_LOCATION, [ThisCopy, SuccessDelegate, ErrorDelegate] { diff --git a/Source/Thirdweb/Private/Wallets/ThirdwebWalletHandle.cpp b/Source/Thirdweb/Private/Wallets/ThirdwebWalletHandle.cpp index 21fd69b..cee1fbe 100644 --- a/Source/Thirdweb/Private/Wallets/ThirdwebWalletHandle.cpp +++ b/Source/Thirdweb/Private/Wallets/ThirdwebWalletHandle.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "Wallets/ThirdwebWalletHandle.h" diff --git a/Source/Thirdweb/Public/AsyncTasks/AsyncTaskThirdwebBase.h b/Source/Thirdweb/Public/AsyncTasks/AsyncTaskThirdwebBase.h index dd50936..f699bf7 100644 --- a/Source/Thirdweb/Public/AsyncTasks/AsyncTaskThirdwebBase.h +++ b/Source/Thirdweb/Public/AsyncTasks/AsyncTaskThirdwebBase.h @@ -1,9 +1,8 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once #include "Kismet/BlueprintAsyncActionBase.h" - #include "AsyncTaskThirdwebBase.generated.h" #define NEW_TASK \ diff --git a/Source/Thirdweb/Public/AsyncTasks/Engine/Contract/AsyncTaskContractReadContract.h b/Source/Thirdweb/Public/AsyncTasks/Engine/Contract/AsyncTaskContractReadContract.h index bce3527..235daa7 100644 --- a/Source/Thirdweb/Public/AsyncTasks/Engine/Contract/AsyncTaskContractReadContract.h +++ b/Source/Thirdweb/Public/AsyncTasks/Engine/Contract/AsyncTaskContractReadContract.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/AsyncTasks/Engine/Contract/AsyncTaskContractWriteContract.h b/Source/Thirdweb/Public/AsyncTasks/Engine/Contract/AsyncTaskContractWriteContract.h index 50bf0ff..7d3548a 100644 --- a/Source/Thirdweb/Public/AsyncTasks/Engine/Contract/AsyncTaskContractWriteContract.h +++ b/Source/Thirdweb/Public/AsyncTasks/Engine/Contract/AsyncTaskContractWriteContract.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once @@ -7,26 +7,40 @@ #include "Wallets/ThirdwebSmartWalletHandle.h" #include "AsyncTaskContractWriteContract.generated.h" +struct FJsonObjectWrapper; -UCLASS(Blueprintable, BlueprintType) +UCLASS(meta=(HasDedicatedAsyncNode)) class THIRDWEB_API UAsyncTaskContractWriteContract : public UAsyncTaskThirdwebBase { GENERATED_BODY() public: - UFUNCTION(BlueprintCallable, meta=(BlueprintInternalUseOnly="true", WorldContext="WorldContextObject", AdvancedDisplay="IdempotencyKey,FactoryAddress,TxOverrides,Abi,bSimulateTx", AutoCreateRefTerm="Args,SmartWallet,TxOverrides"), Category="Thirdweb|Engine|Contract") - static UAsyncTaskContractWriteContract* WriteContract(UObject* WorldContextObject, - const int64 ChainId, - const FString& ContractAddress, - const FString& BackendWalletAddress, - const FSmartWalletHandle& SmartWallet, - const FString& FactoryAddress, - const FString& IdempotencyKey, - const FString& FunctionName, - const TArray& Args, - const FThirdwebEngineTransactionOverrides& TxOverrides, - const FString& Abi, - const bool bSimulateTx); + UFUNCTION(BlueprintCallable, meta=(BlueprintInternalUseOnly="true", WorldContext="WorldContextObject"), Category="Thirdweb|Engine|Contract") + static UAsyncTaskContractWriteContract* WriteContract( + UObject* WorldContextObject, + const int64 ChainId, + const FString& ContractAddress, + const FString& BackendWalletAddress, + const FSmartWalletHandle& SmartWallet, + const FString& IdempotencyKey, + const FString& FunctionName, + const TArray& Args, + const FThirdwebEngineTransactionOverrides& TxOverrides, + const FString& Abi, + const bool bSimulateTx + ); + + UFUNCTION(BlueprintCallable, meta=(BlueprintInternalUseOnly="true", WorldContext="WorldContextObject"), Category="Thirdweb|Engine|Contract") + static UAsyncTaskContractWriteContract* WriteContractRaw( + UObject* WorldContextObject, + const int64 ChainId, + const FString& ContractAddress, + const FString& BackendWalletAddress, + const FSmartWalletHandle& SmartWallet, + const FString& IdempotencyKey, + const FJsonObjectWrapper& Data, + const bool bSimulateTx + ); virtual void Activate() override; @@ -51,27 +65,14 @@ class THIRDWEB_API UAsyncTaskContractWriteContract : public UAsyncTaskThirdwebBa UPROPERTY(Transient) FSmartWalletHandle SmartWallet; - UPROPERTY(Transient) - FString FactoryAddress; - UPROPERTY(Transient) FString IdempotencyKey; - UPROPERTY(Transient) - FString FunctionName; - - UPROPERTY(Transient) - TArray Args; - - UPROPERTY(Transient) - FThirdwebEngineTransactionOverrides TxOverrides; - - UPROPERTY(Transient) - FString Abi; - UPROPERTY(Transient) bool bSimulateTx; + TSharedPtr Data; + private: virtual void HandleResponse(const FString& QueueId); void HandleFailed(const FString& Error); diff --git a/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/AsyncTaskMarketplaceGetBase.h b/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/AsyncTaskMarketplaceGetBase.h index e26e3d7..1c4cb53 100644 --- a/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/AsyncTaskMarketplaceGetBase.h +++ b/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/AsyncTaskMarketplaceGetBase.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/AsyncTaskMarketplacePostBase.h b/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/AsyncTaskMarketplacePostBase.h index 16b562b..941419f 100644 --- a/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/AsyncTaskMarketplacePostBase.h +++ b/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/AsyncTaskMarketplacePostBase.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsApproveReservedBuyer.h b/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsApproveReservedBuyer.h index 5d83ad6..490f8e9 100644 --- a/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsApproveReservedBuyer.h +++ b/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsApproveReservedBuyer.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsBuy.h b/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsBuy.h index 075ce3a..c767a11 100644 --- a/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsBuy.h +++ b/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsBuy.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsCancel.h b/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsCancel.h index 6bf3f62..2f90a34 100644 --- a/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsCancel.h +++ b/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsCancel.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsCreate.h b/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsCreate.h index 548cea1..fe573bb 100644 --- a/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsCreate.h +++ b/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsCreate.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsGet.h b/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsGet.h index e7f5d00..c9451e0 100644 --- a/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsGet.h +++ b/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsGet.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsGetAll.h b/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsGetAll.h index 9b362c4..96f041c 100644 --- a/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsGetAll.h +++ b/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsGetAll.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsGetTotalCount.h b/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsGetTotalCount.h index b030354..d89612f 100644 --- a/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsGetTotalCount.h +++ b/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsGetTotalCount.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsIsBuyerApproved.h b/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsIsBuyerApproved.h index d885094..54aaff0 100644 --- a/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsIsBuyerApproved.h +++ b/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsIsBuyerApproved.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsIsCurrencyApproved.h b/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsIsCurrencyApproved.h index a9d7ba4..1dd0a40 100644 --- a/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsIsCurrencyApproved.h +++ b/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsIsCurrencyApproved.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsRevokeReservedBuyerApproval.h b/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsRevokeReservedBuyerApproval.h index 0bef55f..e62b93f 100644 --- a/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsRevokeReservedBuyerApproval.h +++ b/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsRevokeReservedBuyerApproval.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsRevokeReservedCurrencyApproval.h b/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsRevokeReservedCurrencyApproval.h index bdc83eb..3d7a122 100644 --- a/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsRevokeReservedCurrencyApproval.h +++ b/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsRevokeReservedCurrencyApproval.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsUpdate.h b/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsUpdate.h index 1b53a02..8a5e69a 100644 --- a/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsUpdate.h +++ b/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/DirectListings/AsyncTaskDirectListingsUpdate.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsBid.h b/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsBid.h index 7755a08..7fdee6d 100644 --- a/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsBid.h +++ b/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsBid.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsBuyout.h b/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsBuyout.h index 353b20e..fd58cfb 100644 --- a/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsBuyout.h +++ b/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsBuyout.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsCancel.h b/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsCancel.h index 194ab63..b2dda91 100644 --- a/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsCancel.h +++ b/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsCancel.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsCloseForBidder.h b/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsCloseForBidder.h index 6a0c789..018b238 100644 --- a/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsCloseForBidder.h +++ b/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsCloseForBidder.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsCloseForSeller.h b/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsCloseForSeller.h index 06e9129..82d1a1a 100644 --- a/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsCloseForSeller.h +++ b/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsCloseForSeller.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsCreate.h b/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsCreate.h index b95cf77..b9901f9 100644 --- a/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsCreate.h +++ b/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsCreate.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsExecuteSale.h b/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsExecuteSale.h index 076790a..0f00a14 100644 --- a/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsExecuteSale.h +++ b/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsExecuteSale.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsGet.h b/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsGet.h index 5bc99b2..1b0761b 100644 --- a/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsGet.h +++ b/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsGet.h @@ -1,12 +1,12 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once #include "AsyncTasks/Engine/Marketplace/AsyncTaskMarketplaceGetBase.h" +#include "Engine/Marketplace/EnglishAuctions/ThirdwebMarketplaceEnglishAuction.h" #include "AsyncTaskEnglishAuctionsGet.generated.h" class UThirdwebMarketplace; -struct FThirdwebMarketplaceEnglishAuction; /** * */ diff --git a/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsGetAll.h b/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsGetAll.h index a36c2e0..6842568 100644 --- a/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsGetAll.h +++ b/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsGetAll.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsGetBidBufferBps.h b/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsGetBidBufferBps.h index 70cd649..a4cb9ef 100644 --- a/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsGetBidBufferBps.h +++ b/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsGetBidBufferBps.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsGetMinimumNextBid.h b/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsGetMinimumNextBid.h index f356528..473a264 100644 --- a/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsGetMinimumNextBid.h +++ b/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsGetMinimumNextBid.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsGetTotalCount.h b/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsGetTotalCount.h index 19aaca7..cf59fef 100644 --- a/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsGetTotalCount.h +++ b/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsGetTotalCount.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsGetWinner.h b/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsGetWinner.h index 7a29ecc..58a1299 100644 --- a/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsGetWinner.h +++ b/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsGetWinner.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsGetWinningBid.h b/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsGetWinningBid.h index 71962cb..461325d 100644 --- a/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsGetWinningBid.h +++ b/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsGetWinningBid.h @@ -1,11 +1,11 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once #include "AsyncTasks/Engine/Marketplace/AsyncTaskMarketplaceGetBase.h" +#include "Engine/Marketplace/EnglishAuctions/ThirdwebMarketplaceBid.h" #include "AsyncTaskEnglishAuctionsGetWinningBid.generated.h" -struct FThirdwebMarketplaceBid; class UThirdwebMarketplace; /** * @@ -33,7 +33,7 @@ class THIRDWEB_API UAsyncTaskEnglishAuctionsGetWinningBid : public UAsyncTaskMar UPARAM(DisplayName="Listing ID") const FString& ListingId ); - DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FGetWinningBidDelegate, const FThirdwebMarketplaceBid&, WinningBid, const FString&, Error); + DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FGetWinningBidDelegate, const FThirdwebMarketplaceBid&, WinningBid, const FString&, Error); UPROPERTY(BlueprintAssignable) FGetWinningBidDelegate Success; diff --git a/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsIsWinningBid.h b/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsIsWinningBid.h index dd954a4..7086c77 100644 --- a/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsIsWinningBid.h +++ b/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/EnglishAuctions/AsyncTaskEnglishAuctionsIsWinningBid.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/Offers/AsyncTaskOffersAccept.h b/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/Offers/AsyncTaskOffersAccept.h index 5419c35..7fca2e8 100644 --- a/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/Offers/AsyncTaskOffersAccept.h +++ b/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/Offers/AsyncTaskOffersAccept.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/Offers/AsyncTaskOffersCancel.h b/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/Offers/AsyncTaskOffersCancel.h index 62dfda7..7e9cdbf 100644 --- a/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/Offers/AsyncTaskOffersCancel.h +++ b/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/Offers/AsyncTaskOffersCancel.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/Offers/AsyncTaskOffersGet.h b/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/Offers/AsyncTaskOffersGet.h index 6b825f8..d9fdb66 100644 --- a/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/Offers/AsyncTaskOffersGet.h +++ b/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/Offers/AsyncTaskOffersGet.h @@ -1,11 +1,11 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once #include "AsyncTasks/Engine/Marketplace/AsyncTaskMarketplaceGetBase.h" +#include "Engine/Marketplace/Offers/ThirdwebMarketplaceOffer.h" #include "AsyncTaskOffersGet.generated.h" -struct FThirdwebMarketplaceOffer; class UThirdwebMarketplace; /** diff --git a/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/Offers/AsyncTaskOffersGetAll.h b/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/Offers/AsyncTaskOffersGetAll.h index 3841aca..0f3c178 100644 --- a/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/Offers/AsyncTaskOffersGetAll.h +++ b/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/Offers/AsyncTaskOffersGetAll.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/Offers/AsyncTaskOffersGetTotalCount.h b/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/Offers/AsyncTaskOffersGetTotalCount.h index 4416347..913fd49 100644 --- a/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/Offers/AsyncTaskOffersGetTotalCount.h +++ b/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/Offers/AsyncTaskOffersGetTotalCount.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/Offers/AsyncTaskOffersOffer.h b/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/Offers/AsyncTaskOffersOffer.h index 5534b4a..509dc96 100644 --- a/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/Offers/AsyncTaskOffersOffer.h +++ b/Source/Thirdweb/Public/AsyncTasks/Engine/Marketplace/Offers/AsyncTaskOffersOffer.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/AsyncTasks/Engine/Transaction/AsyncTaskTransactionGetTransactionReceipt.h b/Source/Thirdweb/Public/AsyncTasks/Engine/Transaction/AsyncTaskTransactionGetTransactionReceipt.h index d603563..3e04405 100644 --- a/Source/Thirdweb/Public/AsyncTasks/Engine/Transaction/AsyncTaskTransactionGetTransactionReceipt.h +++ b/Source/Thirdweb/Public/AsyncTasks/Engine/Transaction/AsyncTaskTransactionGetTransactionReceipt.h @@ -1,11 +1,11 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once #include "AsyncTasks/AsyncTaskThirdwebBase.h" +#include "Engine/Transaction/ThirdwebEngineTransactionReceipt.h" #include "AsyncTaskTransactionGetTransactionReceipt.generated.h" -struct FThirdwebEngineTransactionReceipt; UCLASS(Blueprintable, BlueprintType) class THIRDWEB_API UAsyncTaskTransactionGetTransactionReceipt : public UAsyncTaskThirdwebBase diff --git a/Source/Thirdweb/Public/AsyncTasks/Engine/Transaction/AsyncTaskTransactionGetTransactionStatus.h b/Source/Thirdweb/Public/AsyncTasks/Engine/Transaction/AsyncTaskTransactionGetTransactionStatus.h index ddd6cec..e8d0967 100644 --- a/Source/Thirdweb/Public/AsyncTasks/Engine/Transaction/AsyncTaskTransactionGetTransactionStatus.h +++ b/Source/Thirdweb/Public/AsyncTasks/Engine/Transaction/AsyncTaskTransactionGetTransactionStatus.h @@ -1,12 +1,11 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once #include "AsyncTasks/AsyncTaskThirdwebBase.h" +#include "Engine/Transaction/ThirdwebEngineTransactionStatusResult.h" #include "AsyncTaskTransactionGetTransactionStatus.generated.h" -struct FThirdwebEngineTransactionStatusResult; - UCLASS(Blueprintable, BlueprintType) class THIRDWEB_API UAsyncTaskTransactionGetTransactionStatus : public UAsyncTaskThirdwebBase { diff --git a/Source/Thirdweb/Public/AsyncTasks/Utils/AsyncTaskThirdwebFetchIpfsData.h b/Source/Thirdweb/Public/AsyncTasks/Utils/AsyncTaskThirdwebFetchIpfsData.h index 393e9ed..f3fe11b 100644 --- a/Source/Thirdweb/Public/AsyncTasks/Utils/AsyncTaskThirdwebFetchIpfsData.h +++ b/Source/Thirdweb/Public/AsyncTasks/Utils/AsyncTaskThirdwebFetchIpfsData.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once @@ -31,13 +31,16 @@ class UAsyncTaskThirdwebFetchIpfsBase : public UAsyncTaskThirdwebBase /** * */ -UCLASS(Abstract) +UCLASS(meta=(HasDedicatedAsyncNode)) class THIRDWEB_API UAsyncTaskThirdwebFetchIpfsRaw : public UAsyncTaskThirdwebFetchIpfsBase { GENERATED_BODY() public: - UFUNCTION(BlueprintCallable, DisplayName="Fetch IPFS Raw", meta=(BlueprintInternalUseOnly="true", WorldContext="WorldContextObject", AutoCreateRefTerm="Args"), Category="Thirdweb|Utils") + UFUNCTION(BlueprintCallable, + DisplayName="Fetch IPFS Raw", + meta=(BlueprintInternalUseOnly="true", WorldContext="WorldContextObject", AutoCreateRefTerm="Args"), + Category="Thirdweb|Utils") static UAsyncTaskThirdwebFetchIpfsRaw* FetchIpfsRaw(UObject* WorldContextObject, const FString& Uri) { NEW_TASK @@ -57,13 +60,16 @@ class THIRDWEB_API UAsyncTaskThirdwebFetchIpfsRaw : public UAsyncTaskThirdwebFet virtual void HandleFailed(const FString& Error) override; }; -UCLASS(Abstract) +UCLASS(meta=(HasDedicatedAsyncNode)) class THIRDWEB_API UAsyncTaskThirdwebFetchIpfsImage : public UAsyncTaskThirdwebFetchIpfsBase { GENERATED_BODY() public: - UFUNCTION(BlueprintCallable, DisplayName="Fetch IPFS Image", meta=(BlueprintInternalUseOnly="true", WorldContext="WorldContextObject", AutoCreateRefTerm="Args"), Category="Thirdweb|Utils") + UFUNCTION(BlueprintCallable, + DisplayName="Fetch IPFS Image", + meta=(BlueprintInternalUseOnly="true", WorldContext="WorldContextObject", AutoCreateRefTerm="Args"), + Category="Thirdweb|Utils") static UAsyncTaskThirdwebFetchIpfsImage* FetchIpfsImage(UObject* WorldContextObject, const FString& Uri) { NEW_TASK @@ -83,13 +89,16 @@ class THIRDWEB_API UAsyncTaskThirdwebFetchIpfsImage : public UAsyncTaskThirdwebF virtual void HandleFailed(const FString& Error) override; }; -UCLASS(Abstract) +UCLASS(meta=(HasDedicatedAsyncNode)) class THIRDWEB_API UAsyncTaskThirdwebFetchIpfsJson : public UAsyncTaskThirdwebFetchIpfsBase { GENERATED_BODY() public: - UFUNCTION(BlueprintCallable, DisplayName="Fetch IPFS Image", meta=(BlueprintInternalUseOnly="true", WorldContext="WorldContextObject", AutoCreateRefTerm="Args"), Category="Thirdweb|Utils") + UFUNCTION(BlueprintCallable, + DisplayName="Fetch IPFS Image", + meta=(BlueprintInternalUseOnly="true", WorldContext="WorldContextObject", AutoCreateRefTerm="Args"), + Category="Thirdweb|Utils") static UAsyncTaskThirdwebFetchIpfsJson* FetchIpfsJson(UObject* WorldContextObject, const FString& Uri) { NEW_TASK diff --git a/Source/Thirdweb/Public/AsyncTasks/Wallets/InApp/AsyncTaskThirdwebGetLinkedAccounts.h b/Source/Thirdweb/Public/AsyncTasks/Wallets/InApp/AsyncTaskThirdwebGetLinkedAccounts.h index f907cd7..50bcfd0 100644 --- a/Source/Thirdweb/Public/AsyncTasks/Wallets/InApp/AsyncTaskThirdwebGetLinkedAccounts.h +++ b/Source/Thirdweb/Public/AsyncTasks/Wallets/InApp/AsyncTaskThirdwebGetLinkedAccounts.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/AsyncTasks/Wallets/InApp/AsyncTaskThirdwebInAppBase.h b/Source/Thirdweb/Public/AsyncTasks/Wallets/InApp/AsyncTaskThirdwebInAppBase.h index e060564..b6bae6b 100644 --- a/Source/Thirdweb/Public/AsyncTasks/Wallets/InApp/AsyncTaskThirdwebInAppBase.h +++ b/Source/Thirdweb/Public/AsyncTasks/Wallets/InApp/AsyncTaskThirdwebInAppBase.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/AsyncTasks/Wallets/InApp/AsyncTaskThirdwebInAppSignMessage.h b/Source/Thirdweb/Public/AsyncTasks/Wallets/InApp/AsyncTaskThirdwebInAppSignMessage.h index c0382d7..a59cef2 100644 --- a/Source/Thirdweb/Public/AsyncTasks/Wallets/InApp/AsyncTaskThirdwebInAppSignMessage.h +++ b/Source/Thirdweb/Public/AsyncTasks/Wallets/InApp/AsyncTaskThirdwebInAppSignMessage.h @@ -1,11 +1,11 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once #include "AsyncTaskThirdwebInAppBase.h" #include "AsyncTaskThirdwebInAppSignMessage.generated.h" -UCLASS(Abstract) +UCLASS(meta=(HasDedicatedAsyncNode)) class THIRDWEB_API UAsyncTaskThirdwebInAppSignMessage : public UAsyncTaskThirdwebInAppBase { GENERATED_BODY() @@ -13,24 +13,28 @@ class THIRDWEB_API UAsyncTaskThirdwebInAppSignMessage : public UAsyncTaskThirdwe public: virtual void Activate() override; - UFUNCTION(BlueprintCallable, meta=(BlueprintInternalUseOnly="true", WorldContext="WorldContextObject", AutoCreateRefTerm="Message"), DisplayName="Sign Message", Category="Thirdweb|Wallets|InApp") + UFUNCTION(BlueprintCallable, + meta=(BlueprintInternalUseOnly="true", WorldContext="WorldContextObject", AutoCreateRefTerm="Message"), + DisplayName="Sign Message", + Category="Thirdweb|Wallets|InApp") static UAsyncTaskThirdwebInAppSignMessage* SignMessage(UObject* WorldContextObject, const FInAppWalletHandle& Wallet, const FString& Message); - + DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FSignMessageDelegate, const FString&, SignedMessage, const FString&, Error); + UPROPERTY(BlueprintAssignable) FSignMessageDelegate Success; - + UPROPERTY(BlueprintAssignable) FSignMessageDelegate Failed; protected: UPROPERTY(Transient) FString UnsignedMessage; - + private: UFUNCTION() void HandleResponse(const FString& SignedMessage); - + UFUNCTION() virtual void HandleFailed(const FString& Error); }; diff --git a/Source/Thirdweb/Public/AsyncTasks/Wallets/InApp/AsyncTaskThirdwebLink.h b/Source/Thirdweb/Public/AsyncTasks/Wallets/InApp/AsyncTaskThirdwebLink.h index 18f80d5..80d36cb 100644 --- a/Source/Thirdweb/Public/AsyncTasks/Wallets/InApp/AsyncTaskThirdwebLink.h +++ b/Source/Thirdweb/Public/AsyncTasks/Wallets/InApp/AsyncTaskThirdwebLink.h @@ -1,30 +1,37 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once #include "AsyncTasks/Wallets/InApp/AsyncTaskThirdwebInAppBase.h" #include "AsyncTaskThirdwebLink.generated.h" -UCLASS(Abstract) +UCLASS(meta=(HasDedicatedAsyncNode)) class THIRDWEB_API UAsyncTaskThirdwebLink : public UAsyncTaskThirdwebInAppBase { GENERATED_BODY() public: /** Multi-Purpose runtime link node covering all link options based upon Wallet. Input is ignored if guest wallet */ - UFUNCTION(BlueprintCallable, meta=(BlueprintInternalUseOnly="true", WorldContext="WorldContextObject"), DisplayName="Link", Category="Thirdweb|Wallets|In App") - static UAsyncTaskThirdwebLink* Link(UObject* WorldContextObject, const FInAppWalletHandle& Wallet, const FInAppWalletHandle& NewWallet, const FString& Input, const FString& Signature); + UFUNCTION(BlueprintCallable, + meta=(BlueprintInternalUseOnly="true", WorldContext="WorldContextObject"), + DisplayName="Link", + Category="Thirdweb|Wallets|In App") + static UAsyncTaskThirdwebLink* Link(UObject* WorldContextObject, + const FInAppWalletHandle& Wallet, + const FInAppWalletHandle& NewWallet, + const FString& Input, + const FString& Signature); UPROPERTY(BlueprintAssignable) FErrorOnlyDelegate Success; UPROPERTY(BlueprintAssignable) FErrorOnlyDelegate Failed; - + protected: UPROPERTY(Transient) FInAppWalletHandle NewInAppWallet; - + UPROPERTY(Transient) FString AuthInput; diff --git a/Source/Thirdweb/Public/AsyncTasks/Wallets/InApp/AsyncTaskThirdwebLoginWithOAuth.h b/Source/Thirdweb/Public/AsyncTasks/Wallets/InApp/AsyncTaskThirdwebLoginWithOAuth.h index 9fd9f9f..a892599 100644 --- a/Source/Thirdweb/Public/AsyncTasks/Wallets/InApp/AsyncTaskThirdwebLoginWithOAuth.h +++ b/Source/Thirdweb/Public/AsyncTasks/Wallets/InApp/AsyncTaskThirdwebLoginWithOAuth.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/AsyncTasks/Wallets/InApp/AsyncTaskThirdwebSendOTP.h b/Source/Thirdweb/Public/AsyncTasks/Wallets/InApp/AsyncTaskThirdwebSendOTP.h index 084d87e..13dfe28 100644 --- a/Source/Thirdweb/Public/AsyncTasks/Wallets/InApp/AsyncTaskThirdwebSendOTP.h +++ b/Source/Thirdweb/Public/AsyncTasks/Wallets/InApp/AsyncTaskThirdwebSendOTP.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/AsyncTasks/Wallets/InApp/AsyncTaskThirdwebSignIn.h b/Source/Thirdweb/Public/AsyncTasks/Wallets/InApp/AsyncTaskThirdwebSignIn.h index dda4f3e..f881f98 100644 --- a/Source/Thirdweb/Public/AsyncTasks/Wallets/InApp/AsyncTaskThirdwebSignIn.h +++ b/Source/Thirdweb/Public/AsyncTasks/Wallets/InApp/AsyncTaskThirdwebSignIn.h @@ -1,18 +1,21 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once #include "AsyncTasks/Wallets/InApp/AsyncTaskThirdwebInAppBase.h" #include "AsyncTaskThirdwebSignIn.generated.h" -UCLASS(Abstract) +UCLASS(meta=(HasDedicatedAsyncNode)) class THIRDWEB_API UAsyncTaskThirdwebSignIn : public UAsyncTaskThirdwebInAppBase { GENERATED_BODY() public: /** Multi-Purpose runtime sign-in node covering all sign in options based upon Wallet. Input is ignored if guest wallet */ - UFUNCTION(BlueprintCallable, meta=(BlueprintInternalUseOnly="true", WorldContext="WorldContextObject"), DisplayName="Sign In", Category="Thirdweb|Wallets|In App") + UFUNCTION(BlueprintCallable, + meta=(BlueprintInternalUseOnly="true", WorldContext="WorldContextObject"), + DisplayName="Sign In", + Category="Thirdweb|Wallets|In App") static UAsyncTaskThirdwebSignIn* SignIn(UObject* WorldContextObject, const FInAppWalletHandle& Wallet, const FString& Input, const FString& Signature); UPROPERTY(BlueprintAssignable) @@ -20,11 +23,11 @@ class THIRDWEB_API UAsyncTaskThirdwebSignIn : public UAsyncTaskThirdwebInAppBase UPROPERTY(BlueprintAssignable) FErrorOnlyDelegate Failed; - + protected: UPROPERTY(Transient) FString AuthInput; - + UPROPERTY(Transient) FString SignatureInput; diff --git a/Source/Thirdweb/Public/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreateAuthEndpointWallet.h b/Source/Thirdweb/Public/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreateAuthEndpointWallet.h index eaa627d..ff64f8a 100644 --- a/Source/Thirdweb/Public/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreateAuthEndpointWallet.h +++ b/Source/Thirdweb/Public/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreateAuthEndpointWallet.h @@ -1,11 +1,11 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once #include "AsyncTaskThirdwebInAppCreateWalletBase.h" #include "AsyncTaskThirdwebCreateAuthEndpointWallet.generated.h" -UCLASS(Abstract) +UCLASS(meta=(HasDedicatedAsyncNode)) class THIRDWEB_API UAsyncTaskThirdwebCreateAuthEndpointWallet : public UAsyncTaskThirdwebInAppCreateWalletBase { GENERATED_BODY() diff --git a/Source/Thirdweb/Public/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreateEmailWallet.h b/Source/Thirdweb/Public/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreateEmailWallet.h index 981adc3..89b34cb 100644 --- a/Source/Thirdweb/Public/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreateEmailWallet.h +++ b/Source/Thirdweb/Public/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreateEmailWallet.h @@ -1,11 +1,12 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once #include "AsyncTaskThirdwebInAppCreateWalletBase.h" #include "AsyncTaskThirdwebCreateEmailWallet.generated.h" -UCLASS(Abstract) +UCLASS(meta=(HasDedicatedAsyncNode)) + class THIRDWEB_API UAsyncTaskThirdwebCreateEmailWallet : public UAsyncTaskThirdwebInAppCreateWalletBase { GENERATED_BODY() diff --git a/Source/Thirdweb/Public/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreateGuestWallet.h b/Source/Thirdweb/Public/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreateGuestWallet.h index 2b3eb72..9151468 100644 --- a/Source/Thirdweb/Public/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreateGuestWallet.h +++ b/Source/Thirdweb/Public/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreateGuestWallet.h @@ -1,11 +1,11 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once #include "AsyncTaskThirdwebInAppCreateWalletBase.h" #include "AsyncTaskThirdwebCreateGuestWallet.generated.h" -UCLASS(Abstract) +UCLASS(meta=(HasDedicatedAsyncNode)) class THIRDWEB_API UAsyncTaskThirdwebCreateGuestWallet : public UAsyncTaskThirdwebInAppCreateWalletBase { GENERATED_BODY() diff --git a/Source/Thirdweb/Public/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreateJwtWallet.h b/Source/Thirdweb/Public/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreateJwtWallet.h index 4dd1d70..39bac08 100644 --- a/Source/Thirdweb/Public/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreateJwtWallet.h +++ b/Source/Thirdweb/Public/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreateJwtWallet.h @@ -1,11 +1,11 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once #include "AsyncTaskThirdwebInAppCreateWalletBase.h" #include "AsyncTaskThirdwebCreateJwtWallet.generated.h" -UCLASS(Abstract) +UCLASS(meta=(HasDedicatedAsyncNode)) class THIRDWEB_API UAsyncTaskThirdwebCreateJwtWallet : public UAsyncTaskThirdwebInAppCreateWalletBase { GENERATED_BODY() diff --git a/Source/Thirdweb/Public/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreateOAuthWallet.h b/Source/Thirdweb/Public/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreateOAuthWallet.h index 3995703..b4712a6 100644 --- a/Source/Thirdweb/Public/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreateOAuthWallet.h +++ b/Source/Thirdweb/Public/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreateOAuthWallet.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once @@ -7,7 +7,7 @@ enum class EThirdwebOAuthProvider : uint8; -UCLASS(Abstract) +UCLASS(meta=(HasDedicatedAsyncNode)) class THIRDWEB_API UAsyncTaskThirdwebCreateOAuthWallet : public UAsyncTaskThirdwebInAppCreateWalletBase { GENERATED_BODY() @@ -24,7 +24,7 @@ class THIRDWEB_API UAsyncTaskThirdwebCreateOAuthWallet : public UAsyncTaskThirdw protected: UPROPERTY(Transient) EThirdwebOAuthProvider Provider; - + public: virtual void Activate() override; }; diff --git a/Source/Thirdweb/Public/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreatePhoneWallet.h b/Source/Thirdweb/Public/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreatePhoneWallet.h index 687591f..6a4dd40 100644 --- a/Source/Thirdweb/Public/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreatePhoneWallet.h +++ b/Source/Thirdweb/Public/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreatePhoneWallet.h @@ -1,11 +1,11 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once #include "AsyncTaskThirdwebInAppCreateWalletBase.h" #include "AsyncTaskThirdwebCreatePhoneWallet.generated.h" -UCLASS(Abstract) +UCLASS(meta=(HasDedicatedAsyncNode)) class THIRDWEB_API UAsyncTaskThirdwebCreatePhoneWallet : public UAsyncTaskThirdwebInAppCreateWalletBase { GENERATED_BODY() diff --git a/Source/Thirdweb/Public/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreateSiweWallet.h b/Source/Thirdweb/Public/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreateSiweWallet.h index 96dbca2..21022ef 100644 --- a/Source/Thirdweb/Public/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreateSiweWallet.h +++ b/Source/Thirdweb/Public/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreateSiweWallet.h @@ -1,11 +1,11 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once #include "AsyncTaskThirdwebInAppCreateWalletBase.h" #include "AsyncTaskThirdwebCreateSiweWallet.generated.h" -UCLASS(Abstract) +UCLASS(meta=(HasDedicatedAsyncNode)) class THIRDWEB_API UAsyncTaskThirdwebCreateSiweWallet : public UAsyncTaskThirdwebInAppCreateWalletBase { GENERATED_BODY() diff --git a/Source/Thirdweb/Public/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreateSmartWallet.h b/Source/Thirdweb/Public/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreateSmartWallet.h index 2e4f54c..411f24d 100644 --- a/Source/Thirdweb/Public/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreateSmartWallet.h +++ b/Source/Thirdweb/Public/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebCreateSmartWallet.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once @@ -8,7 +8,7 @@ struct FSmartWalletHandle; -UCLASS(Abstract) +UCLASS(meta=(HasDedicatedAsyncNode)) class THIRDWEB_API UAsyncTaskThirdwebCreateSmartWallet : public UAsyncTaskThirdwebBase { GENERATED_BODY() @@ -17,14 +17,12 @@ class THIRDWEB_API UAsyncTaskThirdwebCreateSmartWallet : public UAsyncTaskThirdw virtual void Activate() override; UFUNCTION(BlueprintCallable, meta=(BlueprintInternalUseOnly="true", WorldContext="WorldContextObject", AdvancedDisplay="Factory,AccountOverride"), Category="Thirdweb|Wallets|Smart") - static UAsyncTaskThirdwebCreateSmartWallet* CreateSmartWallet( - UObject* WorldContextObject, - const FInAppWalletHandle& InAppWallet, - const int64 ChainID, - const bool bGasless = true, - const FString& Factory = "", - const FString& AccountOverride = "" - ) + static UAsyncTaskThirdwebCreateSmartWallet* CreateSmartWallet(UObject* WorldContextObject, + const FInAppWalletHandle& InAppWallet, + const int64 ChainID, + const bool bGasless = true, + const FString& Factory = "", + const FString& AccountOverride = "") { NEW_TASK Task->InAppWallet = InAppWallet; diff --git a/Source/Thirdweb/Public/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebInAppCreateWalletBase.h b/Source/Thirdweb/Public/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebInAppCreateWalletBase.h index ccd1d9b..e2b0760 100644 --- a/Source/Thirdweb/Public/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebInAppCreateWalletBase.h +++ b/Source/Thirdweb/Public/AsyncTasks/Wallets/InApp/Create/AsyncTaskThirdwebInAppCreateWalletBase.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebAddAdmin.h b/Source/Thirdweb/Public/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebAddAdmin.h index 8a85e50..f3501f9 100644 --- a/Source/Thirdweb/Public/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebAddAdmin.h +++ b/Source/Thirdweb/Public/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebAddAdmin.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebCreateSessionKey.h b/Source/Thirdweb/Public/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebCreateSessionKey.h index 7daa259..456ab79 100644 --- a/Source/Thirdweb/Public/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebCreateSessionKey.h +++ b/Source/Thirdweb/Public/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebCreateSessionKey.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebGetActiveSigners.h b/Source/Thirdweb/Public/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebGetActiveSigners.h index cb9de2b..7baa5a9 100644 --- a/Source/Thirdweb/Public/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebGetActiveSigners.h +++ b/Source/Thirdweb/Public/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebGetActiveSigners.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebGetAdmins.h b/Source/Thirdweb/Public/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebGetAdmins.h index 8970eea..ade9551 100644 --- a/Source/Thirdweb/Public/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebGetAdmins.h +++ b/Source/Thirdweb/Public/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebGetAdmins.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebIsActiveSigner.h b/Source/Thirdweb/Public/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebIsActiveSigner.h index c1953bc..cf907b3 100644 --- a/Source/Thirdweb/Public/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebIsActiveSigner.h +++ b/Source/Thirdweb/Public/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebIsActiveSigner.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebIsDeployed.h b/Source/Thirdweb/Public/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebIsDeployed.h index 7fbfe15..fdfc74f 100644 --- a/Source/Thirdweb/Public/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebIsDeployed.h +++ b/Source/Thirdweb/Public/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebIsDeployed.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebRemoveAdmin.h b/Source/Thirdweb/Public/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebRemoveAdmin.h index a2199fb..3dd751e 100644 --- a/Source/Thirdweb/Public/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebRemoveAdmin.h +++ b/Source/Thirdweb/Public/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebRemoveAdmin.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebRevokeSessionKey.h b/Source/Thirdweb/Public/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebRevokeSessionKey.h index 0c803fc..1f20919 100644 --- a/Source/Thirdweb/Public/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebRevokeSessionKey.h +++ b/Source/Thirdweb/Public/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebRevokeSessionKey.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebSmartBase.h b/Source/Thirdweb/Public/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebSmartBase.h index 7e8e107..dc2e24a 100644 --- a/Source/Thirdweb/Public/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebSmartBase.h +++ b/Source/Thirdweb/Public/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebSmartBase.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebSmartSignMessage.h b/Source/Thirdweb/Public/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebSmartSignMessage.h index 4c0311a..634d4d6 100644 --- a/Source/Thirdweb/Public/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebSmartSignMessage.h +++ b/Source/Thirdweb/Public/AsyncTasks/Wallets/Smart/AsyncTaskThirdwebSmartSignMessage.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once @@ -6,7 +6,7 @@ #include "AsyncTaskThirdwebSmartSignMessage.generated.h" -UCLASS(Abstract) +UCLASS(meta=(HasDedicatedAsyncNode)) class THIRDWEB_API UAsyncTaskThirdwebSmartSignMessage : public UAsyncTaskThirdwebSmartBase { GENERATED_BODY() @@ -14,24 +14,28 @@ class THIRDWEB_API UAsyncTaskThirdwebSmartSignMessage : public UAsyncTaskThirdwe public: virtual void Activate() override; - UFUNCTION(BlueprintCallable, meta=(BlueprintInternalUseOnly="true", WorldContext="WorldContextObject", AutoCreateRefTerm="Message"), DisplayName="Sign Message", Category="Thirdweb|Wallets|Smart") + UFUNCTION(BlueprintCallable, + meta=(BlueprintInternalUseOnly="true", WorldContext="WorldContextObject", AutoCreateRefTerm="Message"), + DisplayName="Sign Message", + Category="Thirdweb|Wallets|Smart") static UAsyncTaskThirdwebSmartSignMessage* SignMessage(UObject* WorldContextObject, const FSmartWalletHandle& Wallet, const FString& Message); - + DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FSignMessageDelegate, const FString&, SignedMessage, const FString&, Error); + UPROPERTY(BlueprintAssignable) FSignMessageDelegate Success; - + UPROPERTY(BlueprintAssignable) FSignMessageDelegate Failed; protected: UPROPERTY(Transient) FString UnsignedMessage; - + private: UFUNCTION() void HandleResponse(const FString& SignedMessage); - + UFUNCTION() virtual void HandleFailed(const FString& Error); }; diff --git a/Source/Thirdweb/Public/Browser/Android/ThirdwebAndroidJNI.h b/Source/Thirdweb/Public/Browser/Android/ThirdwebAndroidJNI.h index 04a97d8..0924b9e 100644 --- a/Source/Thirdweb/Public/Browser/Android/ThirdwebAndroidJNI.h +++ b/Source/Thirdweb/Public/Browser/Android/ThirdwebAndroidJNI.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/Browser/ThirdwebOAuthBrowserUserWidget.h b/Source/Thirdweb/Public/Browser/ThirdwebOAuthBrowserUserWidget.h index d801de3..721bee2 100644 --- a/Source/Thirdweb/Public/Browser/ThirdwebOAuthBrowserUserWidget.h +++ b/Source/Thirdweb/Public/Browser/ThirdwebOAuthBrowserUserWidget.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once @@ -6,68 +6,72 @@ #include "Wallets/ThirdwebInAppWalletHandle.h" #include "ThirdwebOAuthBrowserUserWidget.generated.h" -UCLASS(DisplayName="OAuth Browser") +UCLASS(DisplayName = "OAuth Browser") class THIRDWEB_API UThirdwebOAuthBrowserUserWidget : public UUserWidget { GENERATED_BODY() public: - DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnAuthenticatedDelegate, const FString&, AuthResult); - UPROPERTY(BlueprintAssignable, Category="Thirdweb|OAuth Browser") + DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnAuthenticatedDelegate, const FString &, AuthResult); + + UPROPERTY(BlueprintAssignable, Category = "Thirdweb|OAuth Browser") FOnAuthenticatedDelegate OnAuthenticated; - DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FOnSiweCompleteDelegate, const FString&, Signature, const FString&, Payload); - UPROPERTY(BlueprintAssignable, Category="Thirdweb|OAuth Browser") + DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FOnSiweCompleteDelegate, const FString &, Signature, const FString &, Payload); + + UPROPERTY(BlueprintAssignable, Category = "Thirdweb|OAuth Browser") FOnSiweCompleteDelegate OnSiweComplete; - - DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnErrorDelegate, const FString&, Error); - UPROPERTY(BlueprintAssignable, Category="Thirdweb|OAuth Browser") + + DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FOnErrorDelegate, const FString &, Error); + + UPROPERTY(BlueprintAssignable, Category = "Thirdweb|OAuth Browser") FOnErrorDelegate OnError; - DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FUrlDelegate, const FString&, URL); - UPROPERTY(BlueprintAssignable, DisplayName="On URL Changed", Category="Thirdweb|OAuth Browser") + DECLARE_DYNAMIC_MULTICAST_DELEGATE_OneParam(FUrlDelegate, const FString &, URL); + + UPROPERTY(BlueprintAssignable, DisplayName = "On URL Changed", Category = "Thirdweb|OAuth Browser") FUrlDelegate OnUrlChanged; - UPROPERTY(BlueprintAssignable, Category="Thirdweb|OAuth Browser") + UPROPERTY(BlueprintAssignable, Category = "Thirdweb|OAuth Browser") FUrlDelegate OnPageLoaded; - - DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FPopupDelegate, const FString&, URL, const FString&, Frame); - UPROPERTY(BlueprintAssignable, Category="Thirdweb|OAuth Browser") + + DECLARE_DYNAMIC_MULTICAST_DELEGATE_TwoParams(FPopupDelegate, const FString &, URL, const FString &, Frame); + + UPROPERTY(BlueprintAssignable, Category = "Thirdweb|OAuth Browser") FPopupDelegate OnPopup; - + protected: /** Automatically collapse the widget when the page is blank */ - UPROPERTY(BlueprintReadWrite, EditAnywhere, Category="Browser") + UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "Browser") bool bCollapseWhenBlank = true; /** Automatically authenticate on Construct. Only works when created with a Wallet */ - UPROPERTY(BlueprintReadWrite, EditAnywhere, Category="Browser") + UPROPERTY(BlueprintReadWrite, EditAnywhere, Category = "Browser") bool bAuthenticateOnConstruct = false; - - UPROPERTY(BlueprintReadOnly, Transient, Category="Internal", meta=(ExposeOnSpawn=true)) + + UPROPERTY(BlueprintReadOnly, Transient, Category = "Internal", meta = (ExposeOnSpawn = true)) FInAppWalletHandle Wallet; - -private: - UPROPERTY(Transient) - class UThirdwebOAuthBrowserWidget* Browser = nullptr; +private: UPROPERTY(Transient) class UThirdwebOAuthExternalBrowser* ExternalBrowser = nullptr; - + static const FString BackendUrlPrefix; + static const FString DummyUrl; bool bShouldBeVisible = false; - + public: virtual TSharedRef RebuildWidget() override; virtual void OnWidgetRebuilt() override; virtual void BeginDestroy() override; - + #if WITH_EDITOR virtual const FText GetPaletteCategory() override; #endif protected: void SetVisible(const bool bVisible); + virtual FString GetDummyUrl(); virtual void HandleUrlChanged(const FString& Url); virtual void HandlePageLoaded(const FString& Url); virtual void HandleOnBeforePopup(const FString& Url, const FString& Frame); @@ -75,21 +79,13 @@ class THIRDWEB_API UThirdwebOAuthBrowserUserWidget : public UUserWidget virtual void HandleAuthenticated(const FString& AuthResult); virtual void HandleSiweComplete(const FString& Signature, const FString& Payload); virtual void HandleError(const FString& Error); - + public: #if PLATFORM_ANDROID - void HandleDeepLink(const FString& Url); - void HandleCustomTabsDismissed(const FString& Url); + void HandleDeepLink(const FString &Url); + void HandleCustomTabsDismissed(const FString &Url); #endif - - UFUNCTION(BlueprintCallable, Category="Thirdweb|OAuth Browser") - void Authenticate(const FInAppWalletHandle& InAppWallet); - /** Returns true if the page content is blank. Normally the case at startup, and mid-oauth flow */ - UFUNCTION(BlueprintPure, Category="Thirdweb|OAuth Browser") - bool IsBlank() const; - - UFUNCTION(BlueprintPure, Category="Thirdweb|OAuth Browser") - FString GetUrl() const; + UFUNCTION(BlueprintCallable, Category = "Thirdweb|OAuth Browser") + void Authenticate(const FInAppWalletHandle& InAppWallet); }; - diff --git a/Source/Thirdweb/Public/Browser/ThirdwebOAuthBrowserWidget.h b/Source/Thirdweb/Public/Browser/ThirdwebOAuthBrowserWidget.h deleted file mode 100644 index 3a8899c..0000000 --- a/Source/Thirdweb/Public/Browser/ThirdwebOAuthBrowserWidget.h +++ /dev/null @@ -1,70 +0,0 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. - -#pragma once - -#if WITH_CEF -#include "SWebBrowser.h" -#endif -#include "Components/Widget.h" -#include "Wallets/ThirdwebInAppWalletHandle.h" -#include "ThirdwebOAuthBrowserWidget.generated.h" - -DECLARE_MULTICAST_DELEGATE_OneParam(FSimpleStringDelegate, const FString&); -DECLARE_MULTICAST_DELEGATE_TwoParams(FSimpleDoubleStringDelegate, const FString&, const FString&); -DECLARE_DELEGATE_RetVal_ThreeParams(bool, FOnLoadUrl, const FString& /*Method*/, const FString& /*Url*/, FString& /* Response */) - -UCLASS(NotBlueprintable, NotBlueprintType, Hidden) -class THIRDWEB_API UThirdwebOAuthBrowserWidget : public UWidget -{ - GENERATED_BODY() - -public: - //~ Begin Public Overrides - virtual void ReleaseSlateResources(bool bReleaseChildren) override; - -#if WITH_EDITOR - virtual const FText GetPaletteCategory() override; -#endif - //~ End Public Overrides - - //~ Begin SWebBrowser Handlers - virtual void HandleUrlChanged(const FText& InUrl); - virtual void HandleOnLoadComplete(); - virtual bool HandleOnBeforePopup(FString Url, FString Frame); - virtual bool HandleOnCreateWindow(const TWeakPtr& Window, const TWeakPtr& Features); - virtual void HandleOnLoadError(); - virtual bool HandleOnCloseWindow(const TWeakPtr& Window); - //~ End SWebBrowser Handlers - - //~ Begin SWebBrowser Wrappers - virtual void LoadUrl(const FString& Url); - bool IsPageLoaded() const; - FString GetUrl() const; - //~ End SWebBrowser Wrappers - - static FString GetDummyUrl(); - - UFUNCTION(BlueprintCallable, Category="Thirdweb|OAuth Browser") - void Authenticate(const FString& OAuthLoginUrl); - -protected: - virtual TSharedRef RebuildWidget() override; - virtual void OnWidgetRebuilt() override; - -public: - FSimpleStringDelegate OnUrlChanged; - FSimpleStringDelegate OnPageLoaded; - FSimpleDoubleStringDelegate OnBeforePopup; - - - -private: - FString InitialUrl; - bool bSupportsTransparency = false; - bool bShowInitialThrobber = false; - static const FString DummyUrl; - -#if WITH_CEF - TSharedPtr Browser; -#endif -}; diff --git a/Source/Thirdweb/Public/Browser/ThirdwebOAuthExternalBrowser.h b/Source/Thirdweb/Public/Browser/ThirdwebOAuthExternalBrowser.h index 4861bff..b48cb93 100644 --- a/Source/Thirdweb/Public/Browser/ThirdwebOAuthExternalBrowser.h +++ b/Source/Thirdweb/Public/Browser/ThirdwebOAuthExternalBrowser.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/Containers/ThirdwebCountryCodes.h b/Source/Thirdweb/Public/Containers/ThirdwebCountryCodes.h index 2768892..452a152 100644 --- a/Source/Thirdweb/Public/Containers/ThirdwebCountryCodes.h +++ b/Source/Thirdweb/Public/Containers/ThirdwebCountryCodes.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. // Warning: The information provided in this file is for convenience, and is subject to change at any time. diff --git a/Source/Thirdweb/Public/Containers/ThirdwebIPFSUploadResult.h b/Source/Thirdweb/Public/Containers/ThirdwebIPFSUploadResult.h index e25904d..24b9f37 100644 --- a/Source/Thirdweb/Public/Containers/ThirdwebIPFSUploadResult.h +++ b/Source/Thirdweb/Public/Containers/ThirdwebIPFSUploadResult.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. // Warning: The information provided in this file is for convenience, and is subject to change at any time. diff --git a/Source/Thirdweb/Public/Containers/ThirdwebLinkedAccount.h b/Source/Thirdweb/Public/Containers/ThirdwebLinkedAccount.h index b711cc0..e1380ae 100644 --- a/Source/Thirdweb/Public/Containers/ThirdwebLinkedAccount.h +++ b/Source/Thirdweb/Public/Containers/ThirdwebLinkedAccount.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/Containers/ThirdwebMultipartFormData.h b/Source/Thirdweb/Public/Containers/ThirdwebMultipartFormData.h index 18432fb..bcf5e0b 100644 --- a/Source/Thirdweb/Public/Containers/ThirdwebMultipartFormData.h +++ b/Source/Thirdweb/Public/Containers/ThirdwebMultipartFormData.h @@ -1,7 +1,11 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once +#include "Containers/Array.h" +#include "Containers/UnrealString.h" +#include "HAL/Platform.h" + class FThirdwebMultipartFormData { public: diff --git a/Source/Thirdweb/Public/Containers/ThirdwebSigner.h b/Source/Thirdweb/Public/Containers/ThirdwebSigner.h index a840bc8..e1a0be1 100644 --- a/Source/Thirdweb/Public/Containers/ThirdwebSigner.h +++ b/Source/Thirdweb/Public/Containers/ThirdwebSigner.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/Engine/BackendWallet/ThirdwebEngine_BackendWallet.h b/Source/Thirdweb/Public/Engine/BackendWallet/ThirdwebEngine_BackendWallet.h index ccef47f..a921553 100644 --- a/Source/Thirdweb/Public/Engine/BackendWallet/ThirdwebEngine_BackendWallet.h +++ b/Source/Thirdweb/Public/Engine/BackendWallet/ThirdwebEngine_BackendWallet.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/Engine/Contract/ThirdwebEngine_Contract.h b/Source/Thirdweb/Public/Engine/Contract/ThirdwebEngine_Contract.h index 3fa06f3..6fd4f3b 100644 --- a/Source/Thirdweb/Public/Engine/Contract/ThirdwebEngine_Contract.h +++ b/Source/Thirdweb/Public/Engine/Contract/ThirdwebEngine_Contract.h @@ -1,7 +1,8 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once +#include "Dom/JsonObject.h" #include "ThirdwebMacros.h" struct FThirdwebEngineTransactionOverrides; @@ -28,13 +29,9 @@ namespace ThirdwebEngine::Contract const FString& ContractAddress, const FString& BackendWalletAddress, const FSmartWalletHandle& SmartWallet, - const FString& FactoryAddress, const FString& IdempotencyKey, - const FString& FunctionName, - const TArray& Args, - const FThirdwebEngineTransactionOverrides& TxOverrides, - const FString& Abi, const bool bSimulateTx, + const TSharedPtr& Data, const FStringDelegate& SuccessDelegate, const FStringDelegate& ErrorDelegate ); diff --git a/Source/Thirdweb/Public/Engine/Marketplace/DirectListings/ThirdwebEngine_Marketplace_DirectListings.h b/Source/Thirdweb/Public/Engine/Marketplace/DirectListings/ThirdwebEngine_Marketplace_DirectListings.h index e07c360..df41567 100644 --- a/Source/Thirdweb/Public/Engine/Marketplace/DirectListings/ThirdwebEngine_Marketplace_DirectListings.h +++ b/Source/Thirdweb/Public/Engine/Marketplace/DirectListings/ThirdwebEngine_Marketplace_DirectListings.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/Engine/Marketplace/DirectListings/ThirdwebMarketplaceDirectListing.h b/Source/Thirdweb/Public/Engine/Marketplace/DirectListings/ThirdwebMarketplaceDirectListing.h index 757880b..e61fd4c 100644 --- a/Source/Thirdweb/Public/Engine/Marketplace/DirectListings/ThirdwebMarketplaceDirectListing.h +++ b/Source/Thirdweb/Public/Engine/Marketplace/DirectListings/ThirdwebMarketplaceDirectListing.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/Engine/Marketplace/DirectListings/ThirdwebMarketplaceDirectListingRequest.h b/Source/Thirdweb/Public/Engine/Marketplace/DirectListings/ThirdwebMarketplaceDirectListingRequest.h index 9615330..a14c928 100644 --- a/Source/Thirdweb/Public/Engine/Marketplace/DirectListings/ThirdwebMarketplaceDirectListingRequest.h +++ b/Source/Thirdweb/Public/Engine/Marketplace/DirectListings/ThirdwebMarketplaceDirectListingRequest.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/Engine/Marketplace/EnglishAuctions/ThirdwebEngine_Marketplace_EnglishAuctions.h b/Source/Thirdweb/Public/Engine/Marketplace/EnglishAuctions/ThirdwebEngine_Marketplace_EnglishAuctions.h index 9aa3a72..fc30f09 100644 --- a/Source/Thirdweb/Public/Engine/Marketplace/EnglishAuctions/ThirdwebEngine_Marketplace_EnglishAuctions.h +++ b/Source/Thirdweb/Public/Engine/Marketplace/EnglishAuctions/ThirdwebEngine_Marketplace_EnglishAuctions.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/Engine/Marketplace/EnglishAuctions/ThirdwebMarketplaceBid.h b/Source/Thirdweb/Public/Engine/Marketplace/EnglishAuctions/ThirdwebMarketplaceBid.h index 2b4cc72..7e1cf47 100644 --- a/Source/Thirdweb/Public/Engine/Marketplace/EnglishAuctions/ThirdwebMarketplaceBid.h +++ b/Source/Thirdweb/Public/Engine/Marketplace/EnglishAuctions/ThirdwebMarketplaceBid.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/Engine/Marketplace/EnglishAuctions/ThirdwebMarketplaceCreateEnglishAuctionRequest.h b/Source/Thirdweb/Public/Engine/Marketplace/EnglishAuctions/ThirdwebMarketplaceCreateEnglishAuctionRequest.h index 861ebce..bd7dbd1 100644 --- a/Source/Thirdweb/Public/Engine/Marketplace/EnglishAuctions/ThirdwebMarketplaceCreateEnglishAuctionRequest.h +++ b/Source/Thirdweb/Public/Engine/Marketplace/EnglishAuctions/ThirdwebMarketplaceCreateEnglishAuctionRequest.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/Engine/Marketplace/EnglishAuctions/ThirdwebMarketplaceEnglishAuction.h b/Source/Thirdweb/Public/Engine/Marketplace/EnglishAuctions/ThirdwebMarketplaceEnglishAuction.h index 7b19d96..bafcf04 100644 --- a/Source/Thirdweb/Public/Engine/Marketplace/EnglishAuctions/ThirdwebMarketplaceEnglishAuction.h +++ b/Source/Thirdweb/Public/Engine/Marketplace/EnglishAuctions/ThirdwebMarketplaceEnglishAuction.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/Engine/Marketplace/Offers/ThirdwebEngine_Marketplace_Offers.h b/Source/Thirdweb/Public/Engine/Marketplace/Offers/ThirdwebEngine_Marketplace_Offers.h index b2de8d0..91421a1 100644 --- a/Source/Thirdweb/Public/Engine/Marketplace/Offers/ThirdwebEngine_Marketplace_Offers.h +++ b/Source/Thirdweb/Public/Engine/Marketplace/Offers/ThirdwebEngine_Marketplace_Offers.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/Engine/Marketplace/Offers/ThirdwebMarketplaceMakeOfferRequest.h b/Source/Thirdweb/Public/Engine/Marketplace/Offers/ThirdwebMarketplaceMakeOfferRequest.h index d815280..eb2b8f1 100644 --- a/Source/Thirdweb/Public/Engine/Marketplace/Offers/ThirdwebMarketplaceMakeOfferRequest.h +++ b/Source/Thirdweb/Public/Engine/Marketplace/Offers/ThirdwebMarketplaceMakeOfferRequest.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/Engine/Marketplace/Offers/ThirdwebMarketplaceOffer.h b/Source/Thirdweb/Public/Engine/Marketplace/Offers/ThirdwebMarketplaceOffer.h index c9e4438..183c8a6 100644 --- a/Source/Thirdweb/Public/Engine/Marketplace/Offers/ThirdwebMarketplaceOffer.h +++ b/Source/Thirdweb/Public/Engine/Marketplace/Offers/ThirdwebMarketplaceOffer.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/Engine/Marketplace/ThirdwebEngine_Marketplace.h b/Source/Thirdweb/Public/Engine/Marketplace/ThirdwebEngine_Marketplace.h index 29fc5d5..de6f1f0 100644 --- a/Source/Thirdweb/Public/Engine/Marketplace/ThirdwebEngine_Marketplace.h +++ b/Source/Thirdweb/Public/Engine/Marketplace/ThirdwebEngine_Marketplace.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/Engine/Marketplace/ThirdwebMarketplace.h b/Source/Thirdweb/Public/Engine/Marketplace/ThirdwebMarketplace.h index 5319a5b..8775a62 100644 --- a/Source/Thirdweb/Public/Engine/Marketplace/ThirdwebMarketplace.h +++ b/Source/Thirdweb/Public/Engine/Marketplace/ThirdwebMarketplace.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/Engine/Marketplace/ThirdwebMarketplaceCommon.h b/Source/Thirdweb/Public/Engine/Marketplace/ThirdwebMarketplaceCommon.h index 25f8a94..b0ed366 100644 --- a/Source/Thirdweb/Public/Engine/Marketplace/ThirdwebMarketplaceCommon.h +++ b/Source/Thirdweb/Public/Engine/Marketplace/ThirdwebMarketplaceCommon.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/Engine/Marketplace/ThirdwebMarketplaceInternalEntryBase.h b/Source/Thirdweb/Public/Engine/Marketplace/ThirdwebMarketplaceInternalEntryBase.h index 741de58..b11214c 100644 --- a/Source/Thirdweb/Public/Engine/Marketplace/ThirdwebMarketplaceInternalEntryBase.h +++ b/Source/Thirdweb/Public/Engine/Marketplace/ThirdwebMarketplaceInternalEntryBase.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once @@ -34,7 +34,7 @@ struct THIRDWEB_API FThirdwebMarketplaceInternalEntryBase FThirdwebAsset Asset; UPROPERTY(BlueprintReadWrite, Category="Core") - EThirdwebMarketplaceListingStatus Status; + EThirdwebMarketplaceListingStatus Status = EThirdwebMarketplaceListingStatus::Max; UPROPERTY(BlueprintReadWrite, Category="Core") FDateTime StartTimeInSeconds; diff --git a/Source/Thirdweb/Public/Engine/Marketplace/ThirdwebMarketplaceSubsystem.h b/Source/Thirdweb/Public/Engine/Marketplace/ThirdwebMarketplaceSubsystem.h index 19567d3..26ba7d0 100644 --- a/Source/Thirdweb/Public/Engine/Marketplace/ThirdwebMarketplaceSubsystem.h +++ b/Source/Thirdweb/Public/Engine/Marketplace/ThirdwebMarketplaceSubsystem.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/Engine/ThirdwebAccountIdentifierParams.h b/Source/Thirdweb/Public/Engine/ThirdwebAccountIdentifierParams.h index 590b27f..2598bd5 100644 --- a/Source/Thirdweb/Public/Engine/ThirdwebAccountIdentifierParams.h +++ b/Source/Thirdweb/Public/Engine/ThirdwebAccountIdentifierParams.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/Engine/ThirdwebAsset.h b/Source/Thirdweb/Public/Engine/ThirdwebAsset.h index 8827c6a..fd96336 100644 --- a/Source/Thirdweb/Public/Engine/ThirdwebAsset.h +++ b/Source/Thirdweb/Public/Engine/ThirdwebAsset.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/Engine/ThirdwebEngine.h b/Source/Thirdweb/Public/Engine/ThirdwebEngine.h index 6a618b3..845f611 100644 --- a/Source/Thirdweb/Public/Engine/ThirdwebEngine.h +++ b/Source/Thirdweb/Public/Engine/ThirdwebEngine.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/Engine/ThirdwebEngineCommon.h b/Source/Thirdweb/Public/Engine/ThirdwebEngineCommon.h index 20cef77..a1739d4 100644 --- a/Source/Thirdweb/Public/Engine/ThirdwebEngineCommon.h +++ b/Source/Thirdweb/Public/Engine/ThirdwebEngineCommon.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/Engine/Transaction/ThirdwebEngineTransactionOverrides.h b/Source/Thirdweb/Public/Engine/Transaction/ThirdwebEngineTransactionOverrides.h index 3107091..9a471ac 100644 --- a/Source/Thirdweb/Public/Engine/Transaction/ThirdwebEngineTransactionOverrides.h +++ b/Source/Thirdweb/Public/Engine/Transaction/ThirdwebEngineTransactionOverrides.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/Engine/Transaction/ThirdwebEngineTransactionReceipt.h b/Source/Thirdweb/Public/Engine/Transaction/ThirdwebEngineTransactionReceipt.h index 3d3710b..bf29cd3 100644 --- a/Source/Thirdweb/Public/Engine/Transaction/ThirdwebEngineTransactionReceipt.h +++ b/Source/Thirdweb/Public/Engine/Transaction/ThirdwebEngineTransactionReceipt.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/Engine/Transaction/ThirdwebEngineTransactionStatusResult.h b/Source/Thirdweb/Public/Engine/Transaction/ThirdwebEngineTransactionStatusResult.h index 723444c..6774df8 100644 --- a/Source/Thirdweb/Public/Engine/Transaction/ThirdwebEngineTransactionStatusResult.h +++ b/Source/Thirdweb/Public/Engine/Transaction/ThirdwebEngineTransactionStatusResult.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/Engine/Transaction/ThirdwebEngine_Transaction.h b/Source/Thirdweb/Public/Engine/Transaction/ThirdwebEngine_Transaction.h index 83124c1..6718b94 100644 --- a/Source/Thirdweb/Public/Engine/Transaction/ThirdwebEngine_Transaction.h +++ b/Source/Thirdweb/Public/Engine/Transaction/ThirdwebEngine_Transaction.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/Internal/ThirdwebHeaders.h b/Source/Thirdweb/Public/Internal/ThirdwebHeaders.h index 3fa0663..8bfa919 100644 --- a/Source/Thirdweb/Public/Internal/ThirdwebHeaders.h +++ b/Source/Thirdweb/Public/Internal/ThirdwebHeaders.h @@ -1,8 +1,13 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once -class IHttpRequest; +#include "Containers/Array.h" +#include "Containers/Map.h" +#include "Containers/UnrealString.h" +#include "Interfaces/IHttpRequest.h" +#include "Templates/SharedPointer.h" +#include "Templates/Tuple.h" class FThirdwebHeaders { diff --git a/Source/Thirdweb/Public/Internal/ThirdwebURLSearchParams.h b/Source/Thirdweb/Public/Internal/ThirdwebURLSearchParams.h index fdcd784..4f36bf3 100644 --- a/Source/Thirdweb/Public/Internal/ThirdwebURLSearchParams.h +++ b/Source/Thirdweb/Public/Internal/ThirdwebURLSearchParams.h @@ -1,7 +1,11 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once +#include "Containers/Array.h" +#include "Containers/Map.h" +#include "Containers/UnrealString.h" + struct FThirdwebURLSearchParams { FThirdwebURLSearchParams() = default; diff --git a/Source/Thirdweb/Public/Thirdweb.h b/Source/Thirdweb/Public/Thirdweb.h index 466dbed..f04c011 100644 --- a/Source/Thirdweb/Public/Thirdweb.h +++ b/Source/Thirdweb/Public/Thirdweb.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. // ReSharper disable CppUE4CodingStandardNamingViolationWarning,CppUE4CodingStandardNamingViolationWarning #pragma once @@ -10,10 +10,8 @@ #include #include "ThirdwebMacros.h" - #include "Containers/StringConv.h" #include "Containers/UnrealString.h" - #include "HAL/Platform.h" namespace Thirdweb @@ -34,116 +32,88 @@ namespace Thirdweb }; extern "C" { - // Wallet Management - - /// Private Key Wallet - - FFIResult create_private_key_wallet(const char* private_key); - FFIResult generate_private_key_wallet(); - FFIResult private_key_wallet_export(uintptr_t handle_id); - - /// In App Wallet - - FFIResult create_in_app_wallet( - const char* client_id, - const char* bundle_id, - const char* secret_key, - const char* email, - const char* phone, - const char* storage_directory_path, - const char* auth_provider - ); - FFIResult in_app_wallet_send_otp_email(uintptr_t handle_id); - FFIResult in_app_wallet_sign_in_with_otp_email(uintptr_t handle_id, const char* otp); - FFIResult in_app_wallet_send_otp_phone(uintptr_t handle_id); - FFIResult in_app_wallet_sign_in_with_otp_phone(uintptr_t handle_id, const char* otp); - FFIResult in_app_wallet_fetch_oauth_login_link(uintptr_t handle_id, const char* redirect_url); - FFIResult in_app_wallet_sign_in_with_oauth(uintptr_t handle_id, const char* auth_result); - FFIResult in_app_wallet_sign_in_with_jwt(uintptr_t handle_id, const char* jwt, const char* encryption_key); - FFIResult in_app_wallet_sign_in_with_auth_endpoint(uintptr_t handle_id, const char* payload, const char* encryption_key); - FFIResult in_app_wallet_sign_in_with_guest(uintptr_t handle_id, const char* session_id); - FFIResult in_app_wallet_sign_in_with_siwe(intptr_t handle_id, const char* payload, const char* signature); - - // In App (Ecosystem) Wallets - FFIResult create_ecosystem_wallet( - const char* ecosystem_id, - const char* ecosystem_partner_id, - const char* client_id, - const char* bundle_id, - const char* secret_key, - const char* email, - const char* phone, - const char* storage_directory_path, - const char* auth_provider - ); - FFIResult ecosystem_wallet_send_otp_email(uintptr_t handle_id); - FFIResult ecosystem_wallet_sign_in_with_otp_email(uintptr_t handle_id, const char* otp); - FFIResult ecosystem_wallet_send_otp_phone(uintptr_t handle_id); - FFIResult ecosystem_wallet_sign_in_with_otp_phone(uintptr_t handle_id, const char* otp); - FFIResult ecosystem_wallet_fetch_oauth_login_link(uintptr_t handle_id, const char* redirect_url); - FFIResult ecosystem_wallet_sign_in_with_oauth(uintptr_t handle_id, const char* auth_result); - FFIResult ecosystem_wallet_sign_in_with_jwt(uintptr_t handle_id, const char* jwt); - FFIResult ecosystem_wallet_sign_in_with_auth_endpoint(uintptr_t handle_id, const char* payload); - FFIResult ecosystem_wallet_sign_in_with_guest(uintptr_t handle_id, const char* session_id); - FFIResult ecosystem_wallet_sign_in_with_siwe(intptr_t handle_id, const char* payload, const char* signature); - - FFIResult ecosystem_wallet_link_account( - uintptr_t handle_id, - uintptr_t wallet_to_link_handle_id, - const char* otp, - const char* oauth_result, - const char* jwt, - const char* payload, - const char* session_id, - const char* siwe_payload, - const char* siwe_signature - ); - FFIResult ecosystem_wallet_get_linked_accounts(uintptr_t handle_id); - - // Smart Wallet management - - FFIResult create_smart_wallet( - const char* client_id, - const char* bundle_id, - const char* secret_key, - uintptr_t personal_wallet_handle_id, - const char* chain_id, - bool gasless, - const char* factory, - const char* account_override - ); - FFIResult smart_wallet_is_deployed(uintptr_t handle_id); - FFIResult smart_wallet_get_all_admins(uintptr_t handle_id); - FFIResult smart_wallet_get_all_active_signers(uintptr_t handle_id); - FFIResult smart_wallet_create_session_key( - uintptr_t handle_id, - const char* signer_address, - const char* const * approved_targets, - uintptr_t approved_targets_count, - const char* native_token_limit_per_transaction_in_wei, - uint64_t permission_start_timestamp, - uint64_t permission_end_timestamp, - uint64_t req_validity_start_timestamp, - uint64_t req_validity_end_timestamp - ); - FFIResult smart_wallet_revoke_session_key(uintptr_t handle_id, const char* signer_address); - FFIResult smart_wallet_add_admin(uintptr_t handle_id, const char* signer_address); - FFIResult smart_wallet_remove_admin(uintptr_t handle_id, const char* signer_address); - - // Utility Methods - - FFIResult get_wallet_address(uintptr_t handle_id); - FFIResult sign_message(uintptr_t handle_id, const char* message); - FFIResult is_connected(uintptr_t handle_id); - FFIResult disconnect(uintptr_t handle_id); - void free_wallet(uintptr_t handle_id); - void free_ffi_result(FFIResult result); - void free_string(char* s); - FFIResult is_valid_address(const char* address, bool check_checksum); - FFIResult to_checksummed_address(const char* address); - FFIResult is_valid_private_key(const char* private_key); - FFIResult compute_client_id_from_secret_key(const char* secret_key); - FFIResult get_unix_timestamp_now(); - FFIResult get_unix_timestamp_in_ten_years(); - } -} + // Private Key Wallet Methods + + FFIResult create_private_key_wallet(const char* private_key); + FFIResult generate_private_key_wallet(); + FFIResult private_key_wallet_export(uintptr_t handle_id); + + // In-App & Ecosystem Wallet Methods (In-App is now an Ecosystem Wallet without an ecosystem ID and partner ID) + + FFIResult create_ecosystem_wallet(const char* ecosystem_id, + const char* ecosystem_partner_id, + const char* client_id, + const char* bundle_id, + const char* secret_key, + const char* email, + const char* phone, + const char* storage_directory_path, + const char* auth_provider, + const char* legacy_encryption_key); + FFIResult ecosystem_wallet_send_otp_email(uintptr_t handle_id); + FFIResult ecosystem_wallet_sign_in_with_otp_email(uintptr_t handle_id, const char* otp); + FFIResult ecosystem_wallet_send_otp_phone(uintptr_t handle_id); + FFIResult ecosystem_wallet_sign_in_with_otp_phone(uintptr_t handle_id, const char* otp); + FFIResult ecosystem_wallet_fetch_oauth_login_link(uintptr_t handle_id, const char* redirect_url); + FFIResult ecosystem_wallet_sign_in_with_oauth(uintptr_t handle_id, const char* auth_result); + FFIResult ecosystem_wallet_sign_in_with_jwt(uintptr_t handle_id, const char* jwt); + FFIResult ecosystem_wallet_sign_in_with_auth_endpoint(uintptr_t handle_id, const char* payload); + FFIResult ecosystem_wallet_sign_in_with_siwe(uintptr_t handle_id, const char* payload, const char* signature); + FFIResult ecosystem_wallet_sign_in_with_guest(uintptr_t handle_id, const char* session_id); + FFIResult ecosystem_wallet_link_account(uintptr_t handle_id, + uintptr_t wallet_to_link_handle_id, + const char* otp, + const char* oauth_result, + const char* jwt, + const char* payload, + const char* session_id, + const char* siwe_payload, + const char* siwe_signature); + FFIResult ecosystem_wallet_get_linked_accounts(uintptr_t handle_id); + + // Smart Wallet Methods + + FFIResult create_smart_wallet(const char* client_id, + const char* bundle_id, + const char* secret_key, + uintptr_t personal_wallet_handle_id, + const char* chain_id, + bool gasless, + const char* factory, + const char* account_override); + FFIResult smart_wallet_is_deployed(uintptr_t handle_id); + FFIResult smart_wallet_get_all_admins(uintptr_t handle_id); + FFIResult smart_wallet_get_all_active_signers(uintptr_t handle_id); + FFIResult smart_wallet_create_session_key(uintptr_t handle_id, + const char* signer_address, + const char* const* approved_targets, + uintptr_t approved_targets_count, + const char* native_token_limit_per_transaction_in_wei, + uint64_t permission_start_timestamp, + uint64_t permission_end_timestamp, + uint64_t req_validity_start_timestamp, + uint64_t req_validity_end_timestamp); + FFIResult smart_wallet_revoke_session_key(uintptr_t handle_id, const char* signer_address); + FFIResult smart_wallet_add_admin(uintptr_t handle_id, const char* signer_address); + FFIResult smart_wallet_remove_admin(uintptr_t handle_id, const char* signer_address); + + // Shared Wallet Methods + + FFIResult get_wallet_address(uintptr_t handle_id); + FFIResult sign_message(uintptr_t handle_id, const char* message); + FFIResult is_connected(uintptr_t handle_id); + FFIResult disconnect(uintptr_t handle_id); + + // Utility Methods + + void free_ffi_result(FFIResult result); + void free_wallet(uintptr_t handle_id); + void free_string(char* s); + FFIResult get_unix_timestamp_now(); + FFIResult get_unix_timestamp_in_ten_years(); + FFIResult is_valid_address(const char* address, bool check_checksum); + FFIResult to_checksummed_address(const char* address); + FFIResult is_valid_private_key(const char* private_key); + FFIResult compute_client_id_from_secret_key(const char* secret_key); + } // extern c +} // namespace Thirdweb diff --git a/Source/Thirdweb/Public/ThirdwebAssetManager.h b/Source/Thirdweb/Public/ThirdwebAssetManager.h index bc8e64b..41c8593 100644 --- a/Source/Thirdweb/Public/ThirdwebAssetManager.h +++ b/Source/Thirdweb/Public/ThirdwebAssetManager.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/ThirdwebCommon.h b/Source/Thirdweb/Public/ThirdwebCommon.h index 7ae17a5..fc96c92 100644 --- a/Source/Thirdweb/Public/ThirdwebCommon.h +++ b/Source/Thirdweb/Public/ThirdwebCommon.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once @@ -29,33 +29,25 @@ enum class EOTPVerificationFunctionResult : uint8 Failed }; -UENUM(BlueprintType, DisplayName="OAuth Provider") +UENUM(BlueprintType, DisplayName = "OAuth Provider") enum class EThirdwebOAuthProvider : uint8 { - Google UMETA(DisplayName="Google"), - Apple UMETA(DisplayName="Apple"), - Facebook UMETA(DisplayName="Facebook"), - Discord UMETA(DisplayName="Discord"), - Farcaster UMETA(DisplayName="Farcaster"), - Telegram UMETA(DisplayName="Telegram"), - Line UMETA(DisplayName="Line"), - X UMETA(DisplayName="X"), - Coinbase UMETA(DisplayName="Coinbase"), - Twitch UMETA(DisplayName="Twitch"), - Github UMETA(DisplayName="Github"), - None UMETA(Hidden) -}; - -UENUM() -enum class EThirdwebOAuthBrowserBackend : uint8 -{ - Internal UMETA(DisplayName="Internal"), - External UMETA(DisplayName="External"), -}; - -UENUM(BlueprintType, DisplayName="OTP Method") + Google UMETA(DisplayName = "Google"), + Apple UMETA(DisplayName = "Apple"), + Facebook UMETA(DisplayName = "Facebook"), + Discord UMETA(DisplayName = "Discord"), + Farcaster UMETA(DisplayName = "Farcaster"), + Telegram UMETA(DisplayName = "Telegram"), + Line UMETA(DisplayName = "Line"), + X UMETA(DisplayName = "X"), + Coinbase UMETA(DisplayName = "Coinbase"), + Twitch UMETA(DisplayName = "Twitch"), + Github UMETA(DisplayName = "Github"), + None UMETA(Hidden)}; + +UENUM(BlueprintType, DisplayName = "OTP Method") enum class EThirdwebOTPMethod : uint8 { - Email UMETA(DisplayName="Email"), - Phone UMETA(DisplayName="Phone"), -}; \ No newline at end of file + Email UMETA(DisplayName = "Email"), + Phone UMETA(DisplayName = "Phone"), +}; diff --git a/Source/Thirdweb/Public/ThirdwebFunctionLibrary.h b/Source/Thirdweb/Public/ThirdwebFunctionLibrary.h index ae06679..b26d38c 100644 --- a/Source/Thirdweb/Public/ThirdwebFunctionLibrary.h +++ b/Source/Thirdweb/Public/ThirdwebFunctionLibrary.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/ThirdwebLog.h b/Source/Thirdweb/Public/ThirdwebLog.h index b640fe8..50e2fe0 100644 --- a/Source/Thirdweb/Public/ThirdwebLog.h +++ b/Source/Thirdweb/Public/ThirdwebLog.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/ThirdwebMacros.h b/Source/Thirdweb/Public/ThirdwebMacros.h index 20b9698..d5b9963 100644 --- a/Source/Thirdweb/Public/ThirdwebMacros.h +++ b/Source/Thirdweb/Public/ThirdwebMacros.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. // ReSharper disable CppUE4CodingStandardNamingViolationWarning,CppUE4CodingStandardNamingViolationWarning #pragma once diff --git a/Source/Thirdweb/Public/ThirdwebModule.h b/Source/Thirdweb/Public/ThirdwebModule.h index da0a044..f3f2a75 100644 --- a/Source/Thirdweb/Public/ThirdwebModule.h +++ b/Source/Thirdweb/Public/ThirdwebModule.h @@ -1,24 +1,29 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once #include "Modules/ModuleManager.h" -class IThirdwebModule : public IModuleInterface -{ +class IThirdwebModule : public IModuleInterface { public: - /** - * Singleton-like access to this module's interface. This is just for convenience! - * Beware of calling this during the shutdown phase, though. Your module might have been unloaded already. - * - * @return Returns singleton instance, loading the module on demand if needed - */ - static IThirdwebModule& Get() { return FModuleManager::LoadModuleChecked("Thirdweb"); } + /** + * Singleton-like access to this module's interface. This is just for + * convenience! Beware of calling this during the shutdown phase, though. Your + * module might have been unloaded already. + * + * @return Returns singleton instance, loading the module on demand if needed + */ + static IThirdwebModule &Get() { + return FModuleManager::LoadModuleChecked("Thirdweb"); + } - /** - * Checks to see if this module is loaded and ready. It is only valid to call Get() if IsAvailable() returns true. - * - * @return True if the module is loaded and ready to use - */ - static bool IsAvailable() { return FModuleManager::Get().IsModuleLoaded("Thirdweb"); } -}; + /** + * Checks to see if this module is loaded and ready. It is only valid to call + * Get() if IsAvailable() returns true. + * + * @return True if the module is loaded and ready to use + */ + static bool IsAvailable() { + return FModuleManager::Get().IsModuleLoaded("Thirdweb"); + } +}; \ No newline at end of file diff --git a/Source/Thirdweb/Public/ThirdwebRuntimeSettings.h b/Source/Thirdweb/Public/ThirdwebRuntimeSettings.h index 9ce1e6c..d07da94 100644 --- a/Source/Thirdweb/Public/ThirdwebRuntimeSettings.h +++ b/Source/Thirdweb/Public/ThirdwebRuntimeSettings.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once @@ -6,14 +6,13 @@ #include "Engine/DeveloperSettings.h" #include "ThirdwebRuntimeSettings.generated.h" -enum class EThirdwebOAuthBrowserBackend : uint8; enum class EThirdwebOAuthProvider : uint8; enum class EThirdwebAuthenticationMethod : uint8; /** * This class acts as a configuration holder to manage various settings required for the runtime environment in the Thirdweb system. */ -UCLASS(Config=Engine, DefaultConfig, meta=(DisplayName="Thirdweb")) +UCLASS(Config = Engine, DefaultConfig, meta = (DisplayName = "Thirdweb")) class THIRDWEB_API UThirdwebRuntimeSettings : public UDeveloperSettings { GENERATED_BODY() @@ -28,92 +27,94 @@ class THIRDWEB_API UThirdwebRuntimeSettings : public UDeveloperSettings protected: /** Stores the client identifier. */ - UPROPERTY(Config, EditAnywhere, DisplayName="Client ID", Category=Global) + UPROPERTY(Config, EditAnywhere, DisplayName = "Client ID", Category = Global) FString ClientId; /** Stores the bundle identifier. */ - UPROPERTY(Config, EditAnywhere, DisplayName="Bundle ID", Category=Global) + UPROPERTY(Config, EditAnywhere, DisplayName = "Bundle ID", Category = Global) FString BundleId; /** Ecosystem Wallet Identifier tied to your Thirdweb Ecosystem account. Only relevant when using Ecosystem Wallets. e.g. `ecosystem.my-cool-game` */ - UPROPERTY(Config, EditAnywhere, DisplayName="Ecosystem ID", Category="Wallets|Ecosystem") + UPROPERTY(Config, EditAnywhere, DisplayName = "Ecosystem ID", Category = "Wallets|Ecosystem") FString EcosystemId; - + /** Ecosystem Wallet Partner ID - Needed if Allowlist-based Ecosystem */ - UPROPERTY(Config, EditAnywhere, DisplayName="Partner ID", Category="Wallets|Ecosystem") + UPROPERTY(Config, EditAnywhere, DisplayName = "Partner ID", Category = "Wallets|Ecosystem") FString PartnerId; /** Required if using custom auth methods via standard InApp wallets (Non-Ecosystem) */ - UPROPERTY(Config, EditAnywhere, DisplayName="Encrypton Key (Legacy)", Category="Wallets|Ecosystem|Advanced") + UPROPERTY(Config, EditAnywhere, DisplayName = "Encrypton Key (Legacy)", Category = "Wallets|Ecosystem|Advanced") FString EncryptionKey; - + /** Optional array of engine signers stored globally for convenience */ - UPROPERTY(Config, EditAnywhere, Category="Wallets|Smart") + UPROPERTY(Config, EditAnywhere, Category = "Wallets|Smart") TArray EngineSigners; /** Publicly accessible Base URL To your Engine instance. Needed for all Engine nodes */ - UPROPERTY(Config, EditAnywhere, DisplayName="Base URL", Category=Engine) + UPROPERTY(Config, EditAnywhere, DisplayName = "Base URL", Category = Engine) FString EngineBaseUrl; /** Access Token for Engine Authorization */ - UPROPERTY(Config, EditAnywhere, DisplayName="Access Token", meta=(ConfigHierarchyEditable), Category=Engine) + UPROPERTY(Config, EditAnywhere, DisplayName = "Access Token", meta = (ConfigHierarchyEditable), Category = Engine) FString EngineAccessToken; - + /** Opt in or out of connect analytics */ - UPROPERTY(Config, EditAnywhere, Category=Advanced) + UPROPERTY(Config, EditAnywhere, Category = Advanced) bool bSendAnalytics; /** Edit Condition for overriding Custom Application Schema */ - UPROPERTY(Config, EditAnywhere, DisplayName="Override App URI", meta=(InlineEditConditionToggle, ConfigHierarchyEditable), Category="Advanced|Wallets") + UPROPERTY(Config, + EditAnywhere, + DisplayName = "Override App URI", + meta = (InlineEditConditionToggle, ConfigHierarchyEditable), + Category = "Advanced|Wallets") bool bOverrideAppUri; - + /** Custom Application URI for oauth redirects. default is {bundleId}://{clientId} */ - UPROPERTY(Config, EditAnywhere, DisplayName="Custom App URI", meta=(EditCondition="bOverrideAppUri", ConfigHierarchyEditable), Category="Advanced|Wallets") + UPROPERTY(Config, + EditAnywhere, + DisplayName = "Custom App URI", + meta = (EditCondition = "bOverrideAppUri", ConfigHierarchyEditable), + Category = "Advanced|Wallets") FString CustomAppUri; /** Edit Condition for overriding the final page shown after auth is complete */ - UPROPERTY(Config, EditAnywhere, meta=(InlineEditConditionToggle, ConfigHierarchyEditable), Category="Advanced|Wallets") + UPROPERTY(Config, EditAnywhere, meta = (InlineEditConditionToggle, ConfigHierarchyEditable), Category = "Advanced|Wallets") bool bOverrideExternalAuthRedirectUri; - + /** Custom URI shown after external auth is complete */ - UPROPERTY(Config, EditAnywhere, DisplayName="Custom External Auth Redirect URI", meta=(EditCondition="bOverrideExternalAuthRedirectUri", ConfigHierarchyEditable), Category="Advanced|Wallets") + UPROPERTY(Config, + EditAnywhere, + DisplayName = "Custom External Auth Redirect URI", + meta = (EditCondition = "bOverrideExternalAuthRedirectUri", ConfigHierarchyEditable), + Category = "Advanced|Wallets") FString CustomExternalAuthRedirectUri; - - /** Edit Condition for overriding OAuth Browser Provider Backends */ - UPROPERTY(Config, EditAnywhere, meta=(InlineEditConditionToggle, ConfigHierarchyEditable), Category="Advanced|Wallets") - bool bOverrideOAuthBrowserProviderBackends; - - UPROPERTY(Config, EditAnywhere, meta=(EditCondition="bOverrideOAuthBrowserProviderBackends", ArraySizeEnum="EThirdwebOAuthProvider", ConfigHierarchyEditable), Category="Advanced|Wallets") - EThirdwebOAuthBrowserBackend OAuthBrowserProviderBackendOverrides[static_cast(EThirdwebOAuthProvider::None)]; - -private: - static const TArray ExternalOnlyProviders; - + public: // UFUNCTION(CallInEditor, Category="Wallets|InApp") void GenerateEncryptionKey(); - UFUNCTION(BlueprintPure, Category="Thirdweb|Settings") + UFUNCTION(BlueprintPure, Category = "Thirdweb|Settings") static TArray GetEngineSigners(); + UFUNCTION(BlueprintPure, meta=(ReturnDisplayName="Signer"), Category="Thirdweb|Settings") + static FString UseEngineSigner(UPARAM(meta=(GetOptions="GetEngineSigners")) FString Address) { return Address; } + /** Gets the first engine signer in the array, if any */ - UFUNCTION(BlueprintPure, Category="Thirdweb|Settings", meta=(ReturnDisplayName="Signer")) + UFUNCTION(BlueprintPure, Category = "Thirdweb|Settings", meta = (ReturnDisplayName = "Signer")) static FString GetEngineSigner(); /** Static accessor to get EncryptionKey */ - UFUNCTION(BlueprintPure, DisplayName="Get External Auth Redirect URI", Category="Thirdweb|Settings") + UFUNCTION(BlueprintPure, DisplayName = "Get External Auth Redirect URI", Category = "Thirdweb|Settings") static FString GetExternalAuthRedirectUri(); - + /** Static accessor to get EncryptionKey */ - UFUNCTION(BlueprintPure, Category="Thirdweb|Settings") + UFUNCTION(BlueprintPure, Category = "Thirdweb|Settings") static FString GetEncryptionKey(); - + /** Static accessor to retrieve the absolute path of the thirdweb InAppWallet platform */ static FString GetStorageDirectory(); - /** Static accessor to get the resolved backend of an OAuth provider */ - static bool IsExternalOAuthBackend(const EThirdwebOAuthProvider Provider); - /** Static accessor to get EcosystemId */ static FString GetEcosystemId(); @@ -121,35 +122,35 @@ class THIRDWEB_API UThirdwebRuntimeSettings : public UDeveloperSettings static FString GetPartnerId(); /** Static accessor to check EcosystemId validity */ - UFUNCTION(BlueprintPure, Category="Thirdweb|Settings") + UFUNCTION(BlueprintPure, Category = "Thirdweb|Settings") static bool IsEcosystem(); /** Static accessor to get ClientId */ static FString GetClientId(); - + /** Static accessor to get BundleId */ static FString GetBundleId(); - + /** Static accessor to check Analytics Opt-In status */ static bool AnalyticsEnabled(); /** Static accessor to get BaseEngineUrl */ static FString GetEngineBaseUrl(); - + /** Static accessor to get AccessToken */ static FString GetEngineAccessToken(); /** Static accessor for AppUri */ static FString GetAppUri(); - + /** Convenience Getter */ - UFUNCTION(BlueprintPure, DisplayName="Get Thirdweb Runtime Settings", meta=(ReturnDisplayName="Settings"), Category="Thirdweb|Settings") + UFUNCTION(BlueprintPure, DisplayName = "Get Thirdweb Runtime Settings", meta = (ReturnDisplayName = "Settings"), Category = "Thirdweb|Settings") static const UThirdwebRuntimeSettings* Get() { return GetDefault(); } protected: // UFUNCTION(CallInEditor, Category="Wallets|Smart") void FetchEngineSigners(); - + private: static const FString DefaultExternalAuthRedirectUri; }; diff --git a/Source/Thirdweb/Public/ThirdwebUtils.h b/Source/Thirdweb/Public/ThirdwebUtils.h index e91422a..552c3d1 100644 --- a/Source/Thirdweb/Public/ThirdwebUtils.h +++ b/Source/Thirdweb/Public/ThirdwebUtils.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once @@ -18,7 +18,6 @@ class UTexture2D; class UTexture2DDynamic; enum class EThirdwebOAuthProvider : uint8; - namespace ThirdwebUtils { extern const TCHAR* ZeroAddress; @@ -102,6 +101,9 @@ namespace ThirdwebUtils { extern TSharedPtr ToJson(const FString& String); extern TArray> ToJsonArray(const FString& String); + // Meant for dynamic string arrays that hold different value types + extern TArray> ToJsonArray(const TArray& DynamicArray); + extern TSharedPtr ToJsonValue(const FString& String); extern FString ToString(const TSharedPtr& JsonObject); extern FString ToString(const TSharedPtr& JsonValue); extern FString AsString(const TSharedPtr& JsonValue); @@ -116,27 +118,31 @@ namespace ThirdwebUtils return JsonObject.IsValid() && JsonObject->HasField(FieldName) ? !JsonObject->GetField(FieldName)->IsNull() : false; } } - + namespace Internal { extern FString MaskSensitiveString(const FString& InString, const FString& MatchString, const FString& MaskCharacter = TEXT("*"), const int32 ShowBeginCount = 4, const int32 ShowEndCount = 4); - extern TArray MaskSensitiveString(const TArray& InStrings, - const FString& MatchString, - const FString& MaskCharacter = TEXT("*"), - const int32 ShowBeginCount = 4, - const int32 ShowEndCount = 4); - extern TArray MaskSensitiveString(const TArray& InStrings, - const TArray& MatchStrings, - const FString& MaskCharacter = TEXT("*"), - const int32 ShowBeginCount = 4, - const int32 ShowEndCount = 4); + extern TArray MaskSensitiveString( + const TArray& InStrings, + const FString& MatchString, + const FString& MaskCharacter = TEXT("*"), + const int32 ShowBeginCount = 4, + const int32 ShowEndCount = 4 + ); + extern TArray MaskSensitiveString( + const TArray& InStrings, + const TArray& MatchStrings, + const FString& MaskCharacter = TEXT("*"), + const int32 ShowBeginCount = 4, + const int32 ShowEndCount = 4 + ); extern void LogRequest(const TSharedRef& Request, const TArray& SensitiveStrings = {}); extern int64 ParseInt64(const FString& String); extern FString BytesToString(const TArray& Bytes); extern TArray StringToBytes(const FString& String); extern UTexture2DDynamic* BytesToTexture2DDynamic(const TArray& Bytes); - + extern FString GetPluginVersion(); extern FString GenerateUUID(); @@ -156,11 +162,11 @@ namespace ThirdwebUtils template extern THIRDWEB_API T ConvertDownloadResult(const TArray& Bytes); - + DECLARE_DELEGATE_OneParam(FUploadSuccessDelegate, const FThirdwebIPFSUploadResult& /* Result */); extern void UploadInternal(const FString& Filename, const TArray& Content, const FUploadSuccessDelegate& Success, const FStringDelegate& Error); template - extern THIRDWEB_API void Upload(const FString& Filename, const T Content, const FUploadSuccessDelegate& Success, const FStringDelegate& Error); + extern THIRDWEB_API void Upload(const FString& Filename, const T Content, const FUploadSuccessDelegate& Success, const FStringDelegate& Error); } } diff --git a/Source/Thirdweb/Public/Wallets/ThirdwebInAppWalletHandle.h b/Source/Thirdweb/Public/Wallets/ThirdwebInAppWalletHandle.h index 82bb063..fca370c 100644 --- a/Source/Thirdweb/Public/Wallets/ThirdwebInAppWalletHandle.h +++ b/Source/Thirdweb/Public/Wallets/ThirdwebInAppWalletHandle.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Public/Wallets/ThirdwebSmartWalletHandle.h b/Source/Thirdweb/Public/Wallets/ThirdwebSmartWalletHandle.h index 06623d5..ed21de1 100644 --- a/Source/Thirdweb/Public/Wallets/ThirdwebSmartWalletHandle.h +++ b/Source/Thirdweb/Public/Wallets/ThirdwebSmartWalletHandle.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once @@ -19,6 +19,7 @@ struct THIRDWEB_API FSmartWalletHandle : public FWalletHandle FSmartWalletHandle() { Type = Smart; + CustomFactory = ""; } private: @@ -28,9 +29,10 @@ struct THIRDWEB_API FSmartWalletHandle : public FWalletHandle InAppWallet = InInAppWallet; ensureAlwaysMsgf(InID > 0, TEXT("Invalid id 0")); ID = InID; + CustomFactory = ""; } - explicit FSmartWalletHandle(const FInAppWalletHandle& InInAppWallet, const FString& Int64String); + explicit FSmartWalletHandle(const FInAppWalletHandle& InInAppWallet, const FString& Int64String, const FString& InCustomFactory = ""); public: virtual bool IsValid() const override { return Super::IsValid() && InAppWallet.IsValid(); } @@ -83,6 +85,10 @@ struct THIRDWEB_API FSmartWalletHandle : public FWalletHandle /** Get the active signers of a smart wallet */ void GetActiveSigners(const FGetActiveSignersDelegate& SuccessDelegate, const FStringDelegate& ErrorDelegate); + /** Get the custom factory address of a smart wallet */ + FString GetCustomFactory() const { return CustomFactory; } + private: FInAppWalletHandle InAppWallet; + FString CustomFactory; }; diff --git a/Source/Thirdweb/Public/Wallets/ThirdwebWalletHandle.h b/Source/Thirdweb/Public/Wallets/ThirdwebWalletHandle.h index 24b583c..c93129c 100644 --- a/Source/Thirdweb/Public/Wallets/ThirdwebWalletHandle.h +++ b/Source/Thirdweb/Public/Wallets/ThirdwebWalletHandle.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/Thirdweb/Thirdweb.Build.cs b/Source/Thirdweb/Thirdweb.Build.cs index b8cfa3b..16eaa31 100644 --- a/Source/Thirdweb/Thirdweb.Build.cs +++ b/Source/Thirdweb/Thirdweb.Build.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. using UnrealBuildTool; using System.IO; @@ -7,121 +7,112 @@ public class Thirdweb : ModuleRules { - private bool IsWin64 => Target.Platform.Equals(UnrealTargetPlatform.Win64); + private bool IsWin64 => Target.Platform.Equals(UnrealTargetPlatform.Win64); - private bool IsIOSIsh => - Target.Platform.IsInGroup(UnrealPlatformGroup.IOS) + private bool IsIOSIsh => Target.Platform.IsInGroup(UnrealPlatformGroup.IOS) #if UE_5_4_OR_LATER - || Target.Platform.Equals(UnrealTargetPlatform.VisionOS) + || Target.Platform.Equals(UnrealTargetPlatform.VisionOS) #endif - ; + ; - private bool IsApple => Target.Platform.IsInGroup(UnrealPlatformGroup.Apple); + private bool IsApple => Target.Platform.IsInGroup(UnrealPlatformGroup.Apple); - private bool IsAndroid => Target.Platform.Equals(UnrealTargetPlatform.Android); + private bool IsAndroid => Target.Platform.Equals(UnrealTargetPlatform.Android); - private bool IsMobile => IsIOSIsh || IsAndroid; + private bool IsMobile => IsIOSIsh || IsAndroid; - private string LibExt => - IsWin64 ? ".lib" : Target.Architectures.Contains(UnrealArch.IOSSimulator) ? ".sim.a" : ".a"; + private string LibExt => IsWin64 ? ".lib" : +#if UE_5_2_OR_LATER + Target.Architectures.Contains(UnrealArch.IOSSimulator) + ? ".sim.a" + : +#endif + ".a"; - private string LibDir => Path.Combine(Path.Combine(ModuleDirectory, "..", "ThirdParty"), - IsIOSIsh ? "IOS" : Target.Platform.ToString()); + private string LibDir => + Path.Combine( + Path.Combine(ModuleDirectory, "..", "ThirdParty"), + IsIOSIsh ? "IOS" : Target.Platform.ToString() + ); - public Thirdweb(ReadOnlyTargetRules target) : base(target) - { - PrivateDependencyModuleNames.Add("Boost"); - PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs; + public Thirdweb(ReadOnlyTargetRules target) + : base(target) + { + PrivateDependencyModuleNames.Add("Boost"); + PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs; #if UE_5_3_OR_LATER - IncludeOrderVersion = EngineIncludeOrderVersion.Latest; -#endif - -#if UE_5_0_OR_LATER - PublicDefinitions.Add("WITH_CEF=1"); - PrivateDependencyModuleNames.Add("WebBrowser"); - - // Copied from WebBrowserWidget - if (target.bBuildEditor || IsAndroid || IsIOSIsh) - { - // WebBrowserTexture required for cooking Android - PrivateIncludePathModuleNames.Add("WebBrowserTexture"); - PrivateDependencyModuleNames.Add("WebBrowserTexture"); - - if (IsAndroid) - { - AdditionalPropertiesForReceipt.Add( - "AndroidPlugin", - Path.Combine( - Utils.MakePathRelativeTo(ModuleDirectory, target.RelativeEnginePath), - "Thirdweb_UPL.xml" - ) - ); - } - } -#else - PublicDefinitions.Add("WITH_CEF=0"); + IncludeOrderVersion = EngineIncludeOrderVersion.Latest; #endif - PublicSystemLibraryPaths.Add(LibDir); - PublicAdditionalLibraries.Add(Path.Combine(LibDir, "libthirdweb" + LibExt)); - - if (IsWin64) - { - PublicSystemLibraries.AddRange(new[] - { - "Advapi32.lib", - "Ntdll.lib", - "bcrypt.lib", - "userenv.lib", - "Crypt32.lib", - "Secur32.lib", - "Ncrypt.lib" - }); - } - - if (IsApple) - { - PublicFrameworks.AddRange(new[] { "SystemConfiguration", "Foundation", "AuthenticationServices" }); - PrivateDependencyModuleNames.Add("CEF3Utils"); - } - - if (IsMobile) - { - PrivateDependencyModuleNames.Add("Launch"); - } - - PublicDependencyModuleNames.AddRange(new[] - { - // Standard deps - "Core", - "CoreUObject", - "Engine", - "Projects", - // plugin settings deps - "DeveloperSettings", - // Thirdweb Engine call deps - "HTTP", - "HTTPServer", - "Networking", - "Json", - // OAuth Widget UI deps - "UMG", - "Slate", - "SlateCore", - // Utils Deps - "RHI", - "RenderCore" - }); - - // ReSharper disable once InvertIf - // Copied from WebBrowserWidget - if (target.bBuildEditor) - { - // TODO::UnrealEd Needed for the triangulation code used for sprites (but only in editor mode) - // Try to move the code dependent on the triangulation code to the editor-only module - PrivateIncludePathModuleNames.Add("UnrealEd"); - PrivateDependencyModuleNames.AddRange(new[] { "EditorFramework", "UnrealEd" }); - } - } -} \ No newline at end of file + PublicDefinitions.Add("WITH_CEF=0"); + + PublicSystemLibraryPaths.Add(LibDir); + PublicAdditionalLibraries.Add(Path.Combine(LibDir, "libthirdweb" + LibExt)); + + if (IsWin64) + { + PublicSystemLibraries.AddRange( + new[] + { + "Advapi32.lib", + "Ntdll.lib", + "bcrypt.lib", + "userenv.lib", + "Crypt32.lib", + "Secur32.lib", + "Ncrypt.lib" + } + ); + } + + if (IsApple) + { + PublicFrameworks.AddRange( + new[] { "SystemConfiguration", "Foundation", "AuthenticationServices" } + ); + } + + if (IsMobile) + { + PrivateDependencyModuleNames.Add("Launch"); + } + + if (IsAndroid) + { + AdditionalPropertiesForReceipt.Add( + "AndroidPlugin", + Path.Combine( + Utils.MakePathRelativeTo(ModuleDirectory, target.RelativeEnginePath), + "Thirdweb_UPL.xml" + ) + ); + } + + PublicDependencyModuleNames.AddRange( + new[] + { + // Standard deps + "Core", + "CoreUObject", + "Engine", + "Projects", + // plugin settings deps + "DeveloperSettings", + // Thirdweb Engine call deps + "HTTP", + "HTTPServer", + "Networking", + "Json", + "JsonUtilities", + // OAuth Widget UI deps + "UMG", + "Slate", + "SlateCore", + // Utils Deps + "RHI", + "RenderCore" + } + ); + } +} diff --git a/Source/ThirdwebEditor/Private/Checks/ITWECheck.cpp b/Source/ThirdwebEditor/Private/Checks/ITWECheck.cpp new file mode 100644 index 0000000..1449b3c --- /dev/null +++ b/Source/ThirdwebEditor/Private/Checks/ITWECheck.cpp @@ -0,0 +1,5 @@ +// Copyright (c) 2025 Thirdweb. All Rights Reserved. + +#include "Checks/ITWECheck.h" + +const TArray ITWECheck::EmptyEntries = TArray(); diff --git a/Source/ThirdwebEditor/Private/Checks/TWECheckEngine.cpp b/Source/ThirdwebEditor/Private/Checks/TWECheckEngine.cpp new file mode 100644 index 0000000..8f2f93e --- /dev/null +++ b/Source/ThirdwebEditor/Private/Checks/TWECheckEngine.cpp @@ -0,0 +1,326 @@ +// Copyright (c) 2025 Thirdweb. All Rights Reserved. + +#include "Checks/TWECheckEngine.h" + +#include "ILevelEditor.h" +#include "LevelEditor.h" +#include "SLevelViewport.h" +#include "Checks/TWEEssentialSettingsCheck.h" +#include "Modules/ModuleManager.h" +#include "Widgets/DeclarativeSyntaxSupport.h" +#include "Widgets/SBoxPanel.h" +#include "Widgets/SWidget.h" +#include "Widgets/Input/SButton.h" +#include "Widgets/Text/STextBlock.h" + +FTWECheckEngine::FTWECheckEngine() +{ + InjectedNotificationBar = SNew(SVerticalBox); + RegisteredChecks.Add(MakeShared()); +} + +FTWECheckEngine::~FTWECheckEngine() +{ + if (CurrentlyInjectedIntoWidget.IsValid()) + { + CurrentlyInjectedIntoWidget.Pin()->RemoveSlot(InjectedNotificationBar.ToSharedRef()); + InjectedNotificationBar.Reset(); + CurrentlyInjectedIntoWidget.Reset(); + } +} + +FSlateColor FTWECheckEngine::GetNotificationBackgroundColor() const +{ + return FSlateColor(FLinearColor(0.89627f, 0.799103f, 0.219526f, 1.0f)); +} + +FSlateColor FTWECheckEngine::GetNotificationButtonOutlineColor() const +{ + return FSlateColor(FLinearColor(202.f / 255.f, 187.f / 255.f, 80.f / 255.f, 1.0f)); +} + +FSlateColor FTWECheckEngine::GetNotificationButtonBackgroundColor() const +{ + return FSlateColor(FLinearColor(255.f / 255.f, 244.f / 255.f, 143.f / 255.f, 1.0f)); +} + +FSlateColor FTWECheckEngine::GetNotificationButtonBackgroundHoveredColor() const +{ + return FSlateColor(FLinearColor(1.0f, 0.921569f, 0.392157f, 1.0f)); +} + +FSlateColor FTWECheckEngine::GetNotificationButtonBackgroundPressedColor() const +{ + return FSlateColor(FLinearColor(0.947307f, 0.854993f, 0.246201f, 1.0f)); +} + +FSlateColor FTWECheckEngine::GetNotificationFontColor() const +{ + return FSlateColor(FLinearColor(0.0f, 0.0f, 0.0f, 1.0f)); +} + +const FButtonStyle* FTWECheckEngine::GetNotificationButtonStyle() const +{ + auto Self = const_cast(this); + Self->NotificationButtonStyle = FCoreStyle::Get().GetWidgetStyle("Button"); + Self->NotificationButtonStyle.Normal.OutlineSettings.Color = GetNotificationButtonOutlineColor(); + Self->NotificationButtonStyle.Hovered.OutlineSettings.Color = GetNotificationButtonOutlineColor(); + Self->NotificationButtonStyle.Pressed.OutlineSettings.Color = GetNotificationButtonOutlineColor(); + Self->NotificationButtonStyle.Normal.TintColor = GetNotificationButtonBackgroundColor(); + Self->NotificationButtonStyle.Hovered.TintColor = GetNotificationButtonBackgroundHoveredColor(); + Self->NotificationButtonStyle.Pressed.TintColor = GetNotificationButtonBackgroundPressedColor(); + return &(Self->NotificationButtonStyle); +} + +const FSlateBrush* FTWECheckEngine::GetNotificationBackgroundBrush() const +{ + auto Self = const_cast(this); + Self->NotificationBackgroundBrush = FSlateBrush(); + Self->NotificationBackgroundBrush.ImageSize = FVector2D(32, 32); + Self->NotificationBackgroundBrush.Margin = FMargin(); + Self->NotificationBackgroundBrush.TintColor = FLinearColor::White; + Self->NotificationBackgroundBrush.DrawAs = ESlateBrushDrawType::Image; + Self->NotificationBackgroundBrush.Tiling = ESlateBrushTileType::NoTile; + Self->NotificationBackgroundBrush.Mirroring = ESlateBrushMirrorType::NoMirror; + Self->NotificationBackgroundBrush.ImageType = ESlateBrushImageType::NoImage; + return &(Self->NotificationBackgroundBrush); +} + +TSharedRef FTWECheckEngine::CreateNewNotification(const FTWECheckEntry& Entry) +{ + auto HorizontalBox = SNew(SHorizontalBox); + HorizontalBox->AddSlot().FillWidth(1).VAlign( + VAlign_Center)[SNew(STextBlock) + .Text(FText::FromString(Entry.GetCheckMessage())) + .AutoWrapText(true) + .ColorAndOpacity(this, &FTWECheckEngine::GetNotificationFontColor)]; + for (const auto& Action : Entry.GetCheckActions()) + { + HorizontalBox->AddSlot() + .AutoWidth() + .Padding(FMargin(10, 0, 0, 0)) + .VAlign(EVerticalAlignment::VAlign_Center) + [SNew(SButton) + .ButtonStyle(FTWECheckEngine::GetNotificationButtonStyle()) + .OnClicked(FOnClicked::CreateSP( + this, + &FTWECheckEngine::OnActionClicked, + Entry.GetCheckId(), + Action + .GetActionId())) + [ + SNew(STextBlock) + .Text(FText::FromString(Action.GetActionDisplayName())) + .ColorAndOpacity(this, &FTWECheckEngine::GetNotificationFontColor) + ]]; + } + HorizontalBox->AddSlot() + .AutoWidth() + .Padding(FMargin(10, 0, 0, 0)) + .VAlign(EVerticalAlignment::VAlign_Center) + [SNew(SButton) + .ButtonStyle(FTWECheckEngine::GetNotificationButtonStyle()) + .OnClicked(FOnClicked::CreateSP(this, &FTWECheckEngine::OnDismissClicked, Entry.GetCheckId())) + [ + SNew(STextBlock) + .Text(FText::FromString("Dismiss")) + .ColorAndOpacity(this, &FTWECheckEngine::GetNotificationFontColor) + ]]; + + return SNew(SBorder) + .BorderBackgroundColor(this, &FTWECheckEngine::GetNotificationBackgroundColor) + .BorderImage(this, &FTWECheckEngine::GetNotificationBackgroundBrush) + [ + HorizontalBox + ] + .Padding(FMargin(10, 5)); +} + +FReply FTWECheckEngine::OnActionClicked( + // NOLINTNEXTLINE(performance-unnecessary-value-param) + FString CheckId, + // NOLINTNEXTLINE(performance-unnecessary-value-param) + FString ActionId) +{ + if (!CurrentNotifications.Contains(CheckId)) + { + return FReply::Handled(); + } + + CurrentNotifications[CheckId].Value->HandleAction(CheckId, ActionId); + + InjectedNotificationBar->RemoveSlot(CurrentNotifications[CheckId].Key.ToSharedRef()); + CurrentNotifications.Remove(CheckId); + + return FReply::Handled(); +} + +FReply FTWECheckEngine::OnDismissClicked(FString CheckId) +{ + if (!CurrentNotifications.Contains(CheckId)) + { + return FReply::Handled(); + } + + InjectedNotificationBar->RemoveSlot(CurrentNotifications[CheckId].Key.ToSharedRef()); + CurrentNotifications.Remove(CheckId); + + DismissedCheckIds.Add(CheckId); + + return FReply::Handled(); +} + +void FTWECheckEngine::Tick(float DeltaSeconds) +{ + TSet DismissedCheckIdsToForget = DismissedCheckIds; + for (const auto& Check : RegisteredChecks) + { + if (Check->ShouldTick()) + { + auto Results = Check->Tick(DeltaSeconds); + if (Results.Num() > 0) + { + for (const auto& Entry : Results) + { + if (!CurrentNotifications.Contains(Entry.GetCheckId())) + { + if (DismissedCheckIds.Contains(Entry.GetCheckId())) + { + DismissedCheckIdsToForget.Remove(Entry.GetCheckId()); + } + else + { + TSharedRef Notification = CreateNewNotification(Entry); + CurrentNotifications.Add( + Entry.GetCheckId(), + TTuple, TSharedPtr>(Notification, Check)); + InjectedNotificationBar->AddSlot() + .Padding(FMargin(0, 0, 0, 1)) + .AutoHeight() + .AttachWidget(Notification); + } + } + } + } + } + } + for (const auto& CheckId : DismissedCheckIdsToForget) + { + DismissedCheckIds.Remove(CheckId); + } + + if (FLevelEditorModule* LevelEditorModule = FModuleManager::GetModulePtr(TEXT("LevelEditor"))) + { + if (TWeakPtr LevelEditor = LevelEditorModule->GetLevelEditorInstance(); LevelEditor.IsValid()) + { + if (TSharedPtr PinnedLevelEditor = LevelEditor.Pin(); PinnedLevelEditor.IsValid()) + { + TSharedPtr CurrentActiveLevelViewport = PinnedLevelEditor->GetActiveViewportInterface(); + if (!CurrentActiveLevelViewport.IsValid()) + { + if (PinnedLevelEditor->GetViewports().Num() > 0) + { + CurrentActiveLevelViewport = PinnedLevelEditor->GetViewports()[0]; + } + } + + bool bRebuildInjectedLocation = false; + if ((CurrentActiveLevelViewport.IsValid() && !ActiveLevelViewport.IsValid()) || + (CurrentActiveLevelViewport.Get() != ActiveLevelViewport.Pin().Get())) + { + bRebuildInjectedLocation = true; + ActiveLevelViewport = CurrentActiveLevelViewport; + } + + if (bRebuildInjectedLocation) + { + TSharedPtr CurrentWidget = StaticCastSharedPtr(CurrentActiveLevelViewport); + while (CurrentWidget.IsValid() && !CurrentWidget->GetType().IsEqual(FName(TEXT("SVerticalBox"))) && + CurrentWidget->IsParentValid()) + { + CurrentWidget = CurrentWidget->GetParentWidget(); + } + + if (CurrentWidget.IsValid() && CurrentWidget->GetType().IsEqual(FName(TEXT("SVerticalBox")))) + { + if (TSharedPtr VerticalBox = StaticCastSharedPtr(CurrentWidget); VerticalBox.IsValid()) + { + if (VerticalBox->GetChildren()->Num() == 2) + { + if (CurrentlyInjectedIntoWidget.IsValid()) + { + CurrentlyInjectedIntoWidget.Pin()->RemoveSlot( + InjectedNotificationBar.ToSharedRef()); + CurrentlyInjectedIntoWidget.Reset(); + } + + VerticalBox->InsertSlot(1) + .AutoHeight() + .Padding(FMargin(0, 0, 0, 1)) + .AttachWidget(InjectedNotificationBar.ToSharedRef()); + CurrentlyInjectedIntoWidget = VerticalBox; + } + } + } + } + } + } + } +} + +void FTWECheckEngine::ProcessLogMessage(const FString& InLogLevel, const FString& Category, const FString& Message) +{ + for (const auto& Check : RegisteredChecks) + { + auto Results = Check->ProcessLogMessage(InLogLevel, Category, Message); + if (Results.Num() > 0) + { + for (const auto& Entry : Results) + { + if (!CurrentNotifications.Contains(Entry.GetCheckId())) + { + // We don't persist dismissals for log-based checks, since they aren't persistently triggered every + // tick. + DismissedCheckIds.Remove(Entry.GetCheckId()); + + TSharedRef Notification = CreateNewNotification(Entry); + CurrentNotifications.Add( + Entry.GetCheckId(), + TTuple, TSharedPtr>(Notification, Check)); + InjectedNotificationBar->AddSlot() + .Padding(FMargin(0, 0, 0, 1)) + .AutoHeight() + .AttachWidget(Notification); + } + } + } + } +} + +void FTWECheckEngine::ProcessCustomSignal(const FString& Context, const FString& SignalId) +{ + for (const auto& Check : RegisteredChecks) + { + auto Results = Check->ProcessCustomSignal(Context, SignalId); + if (Results.Num() > 0) + { + for (const auto& Entry : Results) + { + if (!CurrentNotifications.Contains(Entry.GetCheckId())) + { + // We don't persist dismissals for log-based checks, since they aren't persistently triggered every tick. + DismissedCheckIds.Remove(Entry.GetCheckId()); + + TSharedRef Notification = CreateNewNotification(Entry); + CurrentNotifications.Add( + Entry.GetCheckId(), + TTuple, TSharedPtr>(Notification, Check)); + InjectedNotificationBar->AddSlot() + .Padding(FMargin(0, 0, 0, 1)) + .AutoHeight() + .AttachWidget(Notification); + } + } + } + } +} diff --git a/Source/ThirdwebEditor/Private/Checks/TWEEssentialSettingsCheck.cpp b/Source/ThirdwebEditor/Private/Checks/TWEEssentialSettingsCheck.cpp new file mode 100644 index 0000000..b733399 --- /dev/null +++ b/Source/ThirdwebEditor/Private/Checks/TWEEssentialSettingsCheck.cpp @@ -0,0 +1,53 @@ +// Copyright (c) 2025 Thirdweb. All Rights Reserved. + +#include "Checks/TWEEssentialSettingsCheck.h" + +#include "ISettingsModule.h" +#include "ThirdwebEditorUtils.h" +#include "ThirdwebRuntimeSettings.h" +#include "UnrealEdMisc.h" +#include "Framework/Docking/TabManager.h" +#include "Widgets/Docking/SDockTab.h" + +TArray FTWEEssentialSettingsCheck::Tick(float DeltaSeconds) const +{ + // ReSharper disable once CppTooWideScopeInitStatement + TSharedPtr ExistingProjectSettingsTab = FGlobalTabmanager::Get()->FindExistingLiveTab(FName("ProjectSettings")); + if (!ExistingProjectSettingsTab.IsValid() || (!ExistingProjectSettingsTab->IsActive() && !ExistingProjectSettingsTab->IsForeground())) + { + if (UThirdwebRuntimeSettings::GetClientId().IsEmpty() || UThirdwebRuntimeSettings::GetBundleId().IsEmpty()) + { + return TArray{ + FTWECheckEntry( + "FTWEEssentialSettingsCheck::Misconfigured", + "You are missing essential settings that are required for ThirdwebSDK to work. You must set values for at least \"Client ID\" and \"Bundle ID\".", + TArray{ + FTWECheckAction("FTWEEssentialSettingsCheck::OpenProjectSettings", "Open settings"), + FTWECheckAction("FTWEEssentialSettingsCheck::OpenDocumentation", "Read documentation") + }) + }; + } + } + + return EmptyEntries; +} + +void FTWEEssentialSettingsCheck::HandleAction(const FString& CheckId, const FString& ActionId) const +{ + if (CheckId == "FTWEEssentialSettingsCheck::Misconfigured" || + CheckId == "FTWEEssentialSettingsCheck::EditorRestartRequired") + { + if (ActionId == "FTWEEssentialSettingsCheck::OpenProjectSettings") + { + ThirdwebEditorUtils::OpenDeveloperSettings(); + } + else if (ActionId == "FTWEEssentialSettingsCheck::RestartEditor") + { + FUnrealEdMisc::Get().RestartEditor(false); + } + else if (ActionId == "FTWEEssentialSettingsCheck::OpenDocumentation") + { + FPlatformProcess::LaunchURL(TEXT("https://portal.thirdweb.com/unreal-engine/getting-started"), nullptr, nullptr); + } + } +} diff --git a/Source/ThirdwebEditor/Private/ThirdwebEditorCommands.cpp b/Source/ThirdwebEditor/Private/ThirdwebEditorCommands.cpp index 62f006d..0233170 100644 --- a/Source/ThirdwebEditor/Private/ThirdwebEditorCommands.cpp +++ b/Source/ThirdwebEditor/Private/ThirdwebEditorCommands.cpp @@ -1,9 +1,7 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "ThirdwebEditorCommands.h" -#include "ThirdwebEditorSettings.h" - #define LOCTEXT_NAMESPACE "FThirdwebEditorModule" FThirdwebEditorCommands::FThirdwebEditorCommands(): TCommands( @@ -17,8 +15,21 @@ FThirdwebEditorCommands::FThirdwebEditorCommands(): TCommands( void FThirdwebEditorCommands::RegisterCommands() { - UI_COMMAND(OpenSettings, "Thirdweb Settings", "Open Thirdweb settings", EUserInterfaceActionType::Button, FInputChord()); - UI_COMMAND(TakeScreenshot, "Take Screenshot", "Take a screenshot of the currently selected blueprint nodes", EUserInterfaceActionType::Button, UThirdwebEditorSettings::GetScreenshotShortcut()); + // Configuration + UI_COMMAND(OpenRuntimeSettings, "Project Settings...", "Edit core SDK runtime settings.", EUserInterfaceActionType::Button, FInputChord()); + UI_COMMAND(OpenEditorSettings, "Editor Preferences...", "Edit optional developer settings.", EUserInterfaceActionType::Button, FInputChord()); + // Utilities + UI_COMMAND(TakeScreenshot, "Take Screenshot", "Take a screenshot of the currently selected blueprint nodes.", EUserInterfaceActionType::Button, FInputChord()); + // Reference + UI_COMMAND(ViewDocumentation, "View Documentation", "View the plugin documentation.", EUserInterfaceActionType::Button, FInputChord()); + // Support + UI_COMMAND(AccessOfficialSupport, "Official Support", "Get support from thirdweb.", EUserInterfaceActionType::Button, FInputChord()); + UI_COMMAND(AccessCommunitySupport, "Community Support", "Get support from the community.", EUserInterfaceActionType::Button, FInputChord()); + UI_COMMAND(ReportABug, "Report a Bug", "Found a bug? Let us know about it!", EUserInterfaceActionType::Button, FInputChord()); + UI_COMMAND(IssueTracker, "Issue Tracker", "Check the current status of public bugs and other issues.", EUserInterfaceActionType::Button, FInputChord()); + // Footer + UI_COMMAND(ViewWebsite, "Visit thirdweb.com", "Open the website for Thirdweb.", EUserInterfaceActionType::Button, FInputChord()); + } #undef LOCTEXT_NAMESPACE diff --git a/Source/ThirdwebEditor/Private/ThirdwebEditorLog.cpp b/Source/ThirdwebEditor/Private/ThirdwebEditorLog.cpp index cc9a07e..0a29989 100644 --- a/Source/ThirdwebEditor/Private/ThirdwebEditorLog.cpp +++ b/Source/ThirdwebEditor/Private/ThirdwebEditorLog.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "ThirdwebEditorLog.h" diff --git a/Source/ThirdwebEditor/Private/ThirdwebEditorModule.cpp b/Source/ThirdwebEditor/Private/ThirdwebEditorModule.cpp index 7fd3586..2273370 100644 --- a/Source/ThirdwebEditor/Private/ThirdwebEditorModule.cpp +++ b/Source/ThirdwebEditor/Private/ThirdwebEditorModule.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "ThirdwebEditorModule.h" @@ -9,9 +9,12 @@ #include "ThirdwebEditorScreenshotUtils.h" #include "ThirdwebEditorSettings.h" #include "ThirdwebEditorStyle.h" +#include "ThirdwebEditorUtils.h" #include "ThirdwebRuntimeSettings.h" #include "ToolMenus.h" #include "Algo/ForEach.h" +#include "Checks/TWECheckEngine.h" +#include "Internationalization/Text.h" #include "Misc/MessageDialog.h" #define LOCTEXT_NAMESPACE "FThirdwebEditorModule" @@ -20,60 +23,262 @@ void FThirdwebEditorModule::StartupModule() { FThirdwebEditorStyle::Initialize(); FThirdwebEditorStyle::ReloadTextures(); - FThirdwebEditorCommands::Register(); CommandList = MakeShareable(new FUICommandList); - + + // Configuration + CommandList->MapAction( + FThirdwebEditorCommands::Get().OpenRuntimeSettings, + FExecuteAction::CreateStatic(&FThirdwebEditorModule::OpenRuntimeSettings), + FCanExecuteAction() + ); + CommandList->MapAction( + FThirdwebEditorCommands::Get().OpenEditorSettings, + FExecuteAction::CreateStatic(&FThirdwebEditorModule::OpenEditorSettings), + FCanExecuteAction() + ); + // Utilities CommandList->MapAction( - FThirdwebEditorCommands::GetOpenSettingsCommand(), - FExecuteAction::CreateStatic(&FThirdwebEditorModule::OpenSettingsButtonClicked), + FThirdwebEditorCommands::Get().TakeScreenshot, + FExecuteAction::CreateStatic(&FThirdwebEditorModule::TakeScreenshot), FCanExecuteAction() ); + // Reference CommandList->MapAction( - FThirdwebEditorCommands::GetTakeScreenshotCommand(), - FExecuteAction::CreateStatic(&FThirdwebEditorModule::TakeScreenshotButtonClicked), + FThirdwebEditorCommands::Get().ViewDocumentation, + FExecuteAction::CreateStatic(&FThirdwebEditorModule::ViewDocumentation), + FCanExecuteAction() + ); + // Support + CommandList->MapAction( + FThirdwebEditorCommands::Get().AccessOfficialSupport, + FExecuteAction::CreateStatic(&FThirdwebEditorModule::AccessOfficialSupport), + FCanExecuteAction() + ); + CommandList->MapAction( + FThirdwebEditorCommands::Get().AccessCommunitySupport, + FExecuteAction::CreateStatic(&FThirdwebEditorModule::AccessCommunitySupport), + FCanExecuteAction() + ); + CommandList->MapAction( + FThirdwebEditorCommands::Get().ReportABug, + FExecuteAction::CreateStatic(&FThirdwebEditorModule::ReportABug), + FCanExecuteAction() + ); + CommandList->MapAction( + FThirdwebEditorCommands::Get().IssueTracker, + FExecuteAction::CreateStatic(&FThirdwebEditorModule::IssueTracker), + FCanExecuteAction() + ); + // Footer + CommandList->MapAction( + FThirdwebEditorCommands::Get().ViewWebsite, + FExecuteAction::CreateStatic(&FThirdwebEditorModule::ViewWebsite), FCanExecuteAction() ); UToolMenus::RegisterStartupCallback(FSimpleMulticastDelegate::FDelegate::CreateRaw(this, &FThirdwebEditorModule::RegisterMenus)); + + CheckEngine = MakeShared(); + + // Register ticker. + TickerHandle = FTSTicker::GetCoreTicker().AddTicker(FTickerDelegate::CreateRaw(this, &FThirdwebEditorModule::Tick)); } void FThirdwebEditorModule::ShutdownModule() { + FTSTicker::GetCoreTicker().RemoveTicker(TickerHandle); + TickerHandle.Reset(); UToolMenus::UnRegisterStartupCallback(this); UToolMenus::UnregisterOwner(this); - FThirdwebEditorStyle::Shutdown(); - FThirdwebEditorCommands::Unregister(); } -void FThirdwebEditorModule::OpenSettingsButtonClicked() +bool FThirdwebEditorModule::Tick(float DeltaSeconds) +{ + CheckEngine->Tick(DeltaSeconds); + return true; +} + +void FThirdwebEditorModule::ProcessLogMessage(const FString& InLogLevel, const FString& Category, const FString& Message) { - const UThirdwebRuntimeSettings* Settings = UThirdwebRuntimeSettings::Get(); - FModuleManager::LoadModuleChecked("Settings").ShowViewer(Settings->GetContainerName(), Settings->GetCategoryName(), Settings->GetSectionName()); + CheckEngine->ProcessLogMessage(InLogLevel, Category, Message); } -void FThirdwebEditorModule::TakeScreenshotButtonClicked() +void FThirdwebEditorModule::ProcessCustomSignal(const FString& Context, const FString& SignalId) +{ + CheckEngine->ProcessCustomSignal(Context, SignalId); +} + +void FThirdwebEditorModule::OpenRuntimeSettings() +{ + ThirdwebEditorUtils::OpenDeveloperSettings(); +} + +void FThirdwebEditorModule::OpenEditorSettings() +{ + ThirdwebEditorUtils::OpenDeveloperSettings(); +} + +void FThirdwebEditorModule::ReportABug() +{ + FPlatformProcess::LaunchURL(TEXT("https://github.com/thirdweb-dev/unreal-engine/issues/new/choose"), nullptr, nullptr); +} + +void FThirdwebEditorModule::IssueTracker() +{ + FPlatformProcess::LaunchURL(TEXT("https://github.com/thirdweb-dev/unreal-engine/issues?q=sort%3Aupdated-desc+is%3Aissue+is%3Aopen"), nullptr, nullptr); +} + +void FThirdwebEditorModule::TakeScreenshot() { FThirdwebEditorScreenshotUtils::TakeScreenshot(); } void FThirdwebEditorModule::RegisterMenus() { + TSharedPtr AccessOfficialSupport; + TSharedPtr AccessCommunitySupport; + TSharedPtr ReportABug; + TSharedPtr IssueTracker; + // Footer + TSharedPtr ViewWebsite; // Owner will be used for cleanup in call to UToolMenus::UnregisterOwner FToolMenuOwnerScoped OwnerScoped(this); - TSharedPtr Cl = CommandList; { - FToolMenuSection& Section = UToolMenus::Get()->ExtendMenu("LevelEditor.LevelEditorToolBar.PlayToolBar")->FindOrAddSection("ThirdwebSection"); - Section.AddEntry(FToolMenuEntry::InitToolBarButton(FThirdwebEditorCommands::GetOpenSettingsCommand())).SetCommandList(Cl); + UToolMenu* Menu = UToolMenus::Get()->RegisterMenu("LevelEditor.LevelEditorToolBar.LevelToolbarThirdweb"); + + // Configuration + { + FToolMenuSection& Section = Menu->AddSection("ConfigurationSection", LOCTEXT("ConfigurationSection", "Configuration")); + Section.AddMenuEntry( + FThirdwebEditorCommands::Get().OpenRuntimeSettings, + TAttribute(), + TAttribute(), + FSlateIcon(FAppStyle::GetAppStyleSetName(), "ProjectSettings.TabIcon") + ); + Section.AddMenuEntry( + FThirdwebEditorCommands::Get().OpenEditorSettings, + TAttribute(), + TAttribute(), + FSlateIcon(FAppStyle::GetAppStyleSetName(), "EditorPreferences.TabIcon") + ); + } + // Utilities + { + FToolMenuSection& Section = Menu->AddSection("UtilitiesSection", LOCTEXT("UtilitiesSection", "Utilities")); + + Section.AddMenuEntry( + FThirdwebEditorCommands::Get().TakeScreenshot, + TAttribute(), + TAttribute(), + FSlateIcon(FThirdwebEditorStyle::GetStyleSetName(), "LevelEditor.Thirdweb.Screenshot") + ); + } + // Reference + { + FToolMenuSection& Section = Menu->AddSection("ReferenceSection", LOCTEXT("ReferenceSection", "Reference")); + + Section.AddMenuEntry( + FThirdwebEditorCommands::Get().ViewDocumentation, + TAttribute(), + TAttribute(), + FSlateIcon(FAppStyle::GetAppStyleSetName(), "Icons.Documentation") + ); + } + // Support + { + FToolMenuSection& Section = Menu->AddSection("SupportSection", LOCTEXT("SupportSection", "Support")); + Section.AddMenuEntry( + FThirdwebEditorCommands::Get().AccessOfficialSupport, + TAttribute(), + TAttribute(), + FSlateIcon(FAppStyle::GetAppStyleSetName(), "MainFrame.VisitSupportWebSite") + ); + Section.AddMenuEntry( + FThirdwebEditorCommands::Get().AccessCommunitySupport, + TAttribute(), + TAttribute(), + FSlateIcon(FAppStyle::GetAppStyleSetName(), "MainFrame.VisitCommunityHome") + ); + Section.AddMenuEntry( + FThirdwebEditorCommands::Get().ReportABug, + TAttribute(), + TAttribute(), + FSlateIcon(FAppStyle::GetAppStyleSetName(), "Debug") + ); + Section.AddMenuEntry( + FThirdwebEditorCommands::Get().IssueTracker, + TAttribute(), + TAttribute(), + FSlateIcon(FAppStyle::GetAppStyleSetName(), "MainFrame.OpenIssueTracker") + ); + // Footer + Section.AddSeparator("footer"), + Section.AddMenuEntry( + FThirdwebEditorCommands::Get().ViewWebsite, + TAttribute(), + TAttribute(), + FSlateIcon(FAppStyle::GetAppStyleSetName(), "Icons.OpenInBrowser") + ); + } } { - FToolMenuSection& Section = UToolMenus::Get()->ExtendMenu("AssetEditor.WidgetBlueprintEditor.ToolBar")->FindOrAddSection("ThirdwebSection"); - FThirdwebEditorCommands::ForEach([&Section, Cl](const TSharedPtr& Ci) { Section.AddEntry(FToolMenuEntry::InitToolBarButton(Ci)).SetCommandList(Cl); }); + UToolMenu* Toolbar = UToolMenus::Get()->ExtendMenu("LevelEditor.LevelEditorToolBar.PlayToolBar"); + { + FToolMenuSection& SettingsSection = Toolbar->AddSection("ThirdwebSettings"); + { + FUIAction Action; + Action.IsActionVisibleDelegate = FIsActionButtonVisible::CreateLambda([]() + { + const UThirdwebEditorSettings* Settings = UThirdwebEditorSettings::Get(); + return !Settings || !Settings->HideDropdownInEditorToolbar(); + }); + FToolMenuEntry ComboButton = FToolMenuEntry::InitComboButton( + "LevelToolbarThirdweb", + Action, + FOnGetContent::CreateStatic( + &FThirdwebEditorModule::GenerateOnlineSettingsMenu, + CommandList.ToSharedRef()), + LOCTEXT("SettingsCombo", "Thirdweb"), + LOCTEXT("SettingsCombo_ToolTip", "Manage the Thirdweb SDK"), + FSlateIcon(FThirdwebEditorStyle::GetStyleSetName(), "LevelEditor.Thirdweb.Logo"), + false, + "LevelToolbarThirdweb"); + ComboButton.StyleNameOverride = "CalloutToolbar"; + SettingsSection.AddEntry(ComboButton); + } + } } - +} + +void FThirdwebEditorModule::ViewDocumentation() +{ + FPlatformProcess::LaunchURL(TEXT("https://portal.thirdweb.com/unreal-engine"), nullptr, nullptr); +} + +void FThirdwebEditorModule::ViewWebsite() +{ + FPlatformProcess::LaunchURL(TEXT("https://thirdweb.com/"), nullptr, nullptr); +} + +void FThirdwebEditorModule::AccessOfficialSupport() +{ + FPlatformProcess::LaunchURL(TEXT("https://thirdweb.com/support"), nullptr, nullptr); +} + +void FThirdwebEditorModule::AccessCommunitySupport() +{ + FPlatformProcess::LaunchURL(TEXT("https://discord.gg/thirdweb"), nullptr, nullptr); +} + +// ReSharper disable once CppPassValueParameterByConstReference +TSharedRef FThirdwebEditorModule::GenerateOnlineSettingsMenu(TSharedRef InCommandList) +{ + FToolMenuContext MenuContext(InCommandList); + return UToolMenus::Get()->GenerateWidget("LevelEditor.LevelEditorToolBar.LevelToolbarThirdweb", MenuContext); } #undef LOCTEXT_NAMESPACE diff --git a/Source/ThirdwebEditor/Private/ThirdwebEditorScreenshotUtils.cpp b/Source/ThirdwebEditor/Private/ThirdwebEditorScreenshotUtils.cpp index 087b08f..71ed27c 100644 --- a/Source/ThirdwebEditor/Private/ThirdwebEditorScreenshotUtils.cpp +++ b/Source/ThirdwebEditor/Private/ThirdwebEditorScreenshotUtils.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "ThirdwebEditorScreenshotUtils.h" diff --git a/Source/ThirdwebEditor/Private/ThirdwebEditorSettings.cpp b/Source/ThirdwebEditor/Private/ThirdwebEditorSettings.cpp index 2cb033b..70b9ce0 100644 --- a/Source/ThirdwebEditor/Private/ThirdwebEditorSettings.cpp +++ b/Source/ThirdwebEditor/Private/ThirdwebEditorSettings.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "ThirdwebEditorSettings.h" @@ -17,6 +17,7 @@ UThirdwebEditorSettings::UThirdwebEditorSettings() ScreenshotShortcut = FInputChord(EModifierKey::Control, EKeys::F7); bScreenshotDisableNotifications = false; ScreenshotNotificationTimeoutSeconds = 5; + bHideDropdownInEditorToolbar = false; } #if WITH_EDITOR diff --git a/Source/ThirdwebEditor/Private/ThirdwebEditorStyle.cpp b/Source/ThirdwebEditor/Private/ThirdwebEditorStyle.cpp index 7d92115..0845547 100644 --- a/Source/ThirdwebEditor/Private/ThirdwebEditorStyle.cpp +++ b/Source/ThirdwebEditor/Private/ThirdwebEditorStyle.cpp @@ -1,15 +1,11 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "ThirdwebEditorStyle.h" #include "ThirdwebEditorModule.h" - #include "Framework/Application/SlateApplication.h" - #include "Interfaces/IPluginManager.h" - #include "Slate/SlateGameResources.h" - #include "Styling/SlateStyleMacros.h" #include "Styling/SlateStyleRegistry.h" @@ -48,8 +44,8 @@ TSharedRef FThirdwebEditorStyle::Create() TSharedRef Style = MakeShareable(new FSlateStyleSet("ThirdwebEditorStyle")); Style->SetContentRoot(IPluginManager::Get().FindPlugin("Thirdweb")->GetBaseDir() / TEXT("Resources")); - Style->Set("ThirdwebEditor.OpenSettings", new IMAGE_BRUSH_SVG(TEXT("ThirdwebIcon"), Icon20x20)); - Style->Set("ThirdwebEditor.TakeScreenshot", new IMAGE_BRUSH_SVG(TEXT("ScreenshotIcon"), Icon20x20)); + Style->Set("LevelEditor.Thirdweb.Logo", new IMAGE_BRUSH_SVG(TEXT("ThirdwebIcon"), Icon20x20)); + Style->Set("LevelEditor.Thirdweb.Screenshot", new IMAGE_BRUSH_SVG(TEXT("ScreenshotIcon"), Icon20x20)); return Style; } diff --git a/Source/ThirdwebEditor/Private/ThirdwebEditorUtils.cpp b/Source/ThirdwebEditor/Private/ThirdwebEditorUtils.cpp new file mode 100644 index 0000000..e086df3 --- /dev/null +++ b/Source/ThirdwebEditor/Private/ThirdwebEditorUtils.cpp @@ -0,0 +1,3 @@ +// Copyright (c) 2025 Thirdweb. All Rights Reserved. + +#include "ThirdwebEditorUtils.h" \ No newline at end of file diff --git a/Source/ThirdwebEditor/Public/Checks/ITWECheck.h b/Source/ThirdwebEditor/Public/Checks/ITWECheck.h new file mode 100644 index 0000000..2ee729d --- /dev/null +++ b/Source/ThirdwebEditor/Public/Checks/ITWECheck.h @@ -0,0 +1,59 @@ +// Copyright (c) 2025 Thirdweb. All Rights Reserved. + +#pragma once + +#include "Containers/UnrealString.h" + +class FTWECheckAction +{ + FString ActionId; + FString ActionDisplayName; + +public: + FTWECheckAction(const FString& InActionId, const FString& InActionDisplayName): ActionId(InActionId), ActionDisplayName(InActionDisplayName) + { + } + + const FString& GetActionId() const { return ActionId; } + const FString& GetActionDisplayName() const { return ActionDisplayName; } +}; + +class FTWECheckEntry +{ + FString CheckId; + FString CheckMessage; + TArray CheckActions; + +public: + FTWECheckEntry(const FString& InCheckId, const FString& InCheckMessage, const TArray& InCheckActions) + : CheckId(InCheckId), CheckMessage(InCheckMessage), CheckActions(InCheckActions) + { + } + + const FString& GetCheckId() const { return CheckId; } + const FString& GetCheckMessage() const { return CheckMessage; } + const TArray& GetCheckActions() const { return CheckActions; } +}; + +class ITWECheck +{ +protected: + static const TArray EmptyEntries; + +public: + ITWECheck() = default; + UE_NONCOPYABLE(ITWECheck); + + virtual ~ITWECheck() + { + } + + virtual bool ShouldTick() const { return false; } + virtual TArray Tick(float DeltaSeconds) const{return EmptyEntries;} + + virtual TArray ProcessCustomSignal(const FString& Context, const FString& SignalId) const {return EmptyEntries;} + virtual TArray ProcessLogMessage(FString InLogLevel, const FString& Category, const FString& Message) const { return EmptyEntries; } + virtual void HandleAction(const FString& CheckId, const FString& ActionId) const + { + } +}; diff --git a/Source/ThirdwebEditor/Public/Checks/TWECheckEngine.h b/Source/ThirdwebEditor/Public/Checks/TWECheckEngine.h new file mode 100644 index 0000000..5224b9e --- /dev/null +++ b/Source/ThirdwebEditor/Public/Checks/TWECheckEngine.h @@ -0,0 +1,49 @@ +// Copyright (c) 2025 Thirdweb. All Rights Reserved. + +#pragma once + +#include "ITWECheck.h" +#include "Styling/SlateBrush.h" +#include "Styling/SlateColor.h" +#include "Styling/SlateTypes.h" +#include "Widgets/SBoxPanel.h" +#include "Widgets/Layout/SBorder.h" + +class FTWECheckEngine : public TSharedFromThis +{ + // These widgets are managed by the level editor, so must be TWeakPtr to allow level editor UI to be freed correctly. + TWeakPtr ActiveLevelViewport; + TWeakPtr CurrentlyInjectedIntoWidget; + + TSharedPtr InjectedNotificationBar; + + FButtonStyle NotificationButtonStyle; + FSlateBrush NotificationBackgroundBrush; + + FSlateColor GetNotificationBackgroundColor() const; + FSlateColor GetNotificationButtonOutlineColor() const; + FSlateColor GetNotificationButtonBackgroundColor() const; + FSlateColor GetNotificationButtonBackgroundHoveredColor() const; + FSlateColor GetNotificationButtonBackgroundPressedColor() const; + FSlateColor GetNotificationFontColor() const; + const FButtonStyle* GetNotificationButtonStyle() const; + const FSlateBrush* GetNotificationBackgroundBrush() const; + + TSharedRef CreateNewNotification(const FTWECheckEntry& Entry); + FReply OnActionClicked(FString CheckId, FString ActionId); + FReply OnDismissClicked(FString CheckId); + + TMap, TSharedPtr>> CurrentNotifications; + + TArray> RegisteredChecks; + TSet DismissedCheckIds; + +public: + FTWECheckEngine(); + UE_NONCOPYABLE(FTWECheckEngine); + virtual ~FTWECheckEngine(); + + void Tick(float DeltaSeconds); + void ProcessLogMessage(const FString& InLogLevel, const FString& Category, const FString& Message); + void ProcessCustomSignal(const FString& Context, const FString& SignalId); +}; diff --git a/Source/ThirdwebEditor/Public/Checks/TWEEssentialSettingsCheck.h b/Source/ThirdwebEditor/Public/Checks/TWEEssentialSettingsCheck.h new file mode 100644 index 0000000..3ee3b12 --- /dev/null +++ b/Source/ThirdwebEditor/Public/Checks/TWEEssentialSettingsCheck.h @@ -0,0 +1,25 @@ +// Copyright (c) 2025 Thirdweb. All Rights Reserved. + +#pragma once + +#include "ITWECheck.h" + +class UThirdwebRuntimeSettings; + +class FTWEEssentialSettingsCheck : public ITWECheck +{ +public: + FTWEEssentialSettingsCheck() + { + } + + UE_NONCOPYABLE(FTWEEssentialSettingsCheck); + + virtual ~FTWEEssentialSettingsCheck() + { + } + + virtual bool ShouldTick() const override { return true; } + virtual TArray Tick(float DeltaSeconds) const override; + virtual void HandleAction(const FString& CheckId, const FString& ActionId) const override; +}; diff --git a/Source/ThirdwebEditor/Public/ThirdwebEditorCommands.h b/Source/ThirdwebEditor/Public/ThirdwebEditorCommands.h index d27c5eb..566c9fa 100644 --- a/Source/ThirdwebEditor/Public/ThirdwebEditorCommands.h +++ b/Source/ThirdwebEditor/Public/ThirdwebEditorCommands.h @@ -1,9 +1,8 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once #include "ThirdwebEditorStyle.h" - #include "Framework/Commands/Commands.h" class FThirdwebEditorCommands : public TCommands @@ -13,23 +12,18 @@ class FThirdwebEditorCommands : public TCommands virtual void RegisterCommands() override; - static TSharedPtr GetOpenSettingsCommand() { return Get().OpenSettings; } - static TSharedPtr GetTakeScreenshotCommand() { return Get().TakeScreenshot; } - // ReSharper disable once CppConstValueFunctionReturnType - static const TArray> GetCommands() { return {Get().OpenSettings, Get().TakeScreenshot}; } - - template - static void ForEach(CallableT Callable) - { - // ReSharper disable once CppTooWideScopeInitStatement - const TArray> Commands = GetCommands(); - for (const TSharedPtr& Value : Commands) - { - Invoke(Callable, Value); - } - } - -protected: - TSharedPtr OpenSettings; + // Configuration + TSharedPtr OpenRuntimeSettings; + TSharedPtr OpenEditorSettings; + // Utilities TSharedPtr TakeScreenshot; + // Reference + TSharedPtr ViewDocumentation; + // Support + TSharedPtr AccessOfficialSupport; + TSharedPtr AccessCommunitySupport; + TSharedPtr ReportABug; + TSharedPtr IssueTracker; + // Footer + TSharedPtr ViewWebsite; }; diff --git a/Source/ThirdwebEditor/Public/ThirdwebEditorCommon.h b/Source/ThirdwebEditor/Public/ThirdwebEditorCommon.h index 3d593fe..0408889 100644 --- a/Source/ThirdwebEditor/Public/ThirdwebEditorCommon.h +++ b/Source/ThirdwebEditor/Public/ThirdwebEditorCommon.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/ThirdwebEditor/Public/ThirdwebEditorLog.h b/Source/ThirdwebEditor/Public/ThirdwebEditorLog.h index 24520a3..525ccc4 100644 --- a/Source/ThirdwebEditor/Public/ThirdwebEditorLog.h +++ b/Source/ThirdwebEditor/Public/ThirdwebEditorLog.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/ThirdwebEditor/Public/ThirdwebEditorModule.h b/Source/ThirdwebEditor/Public/ThirdwebEditorModule.h index c26c1f8..c04a227 100644 --- a/Source/ThirdwebEditor/Public/ThirdwebEditorModule.h +++ b/Source/ThirdwebEditor/Public/ThirdwebEditorModule.h @@ -1,25 +1,43 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once +#include "Containers/Ticker.h" #include "Modules/ModuleManager.h" - class FThirdwebEditorModule : public IModuleInterface { public: - /** IModuleInterface implementation */ virtual void StartupModule() override; virtual void ShutdownModule() override; - -private: - void RegisterMenus(); -public: - static void OpenSettingsButtonClicked(); + bool Tick(float DeltaSeconds); + + void ProcessLogMessage(const FString& InLogLevel, const FString& Category, const FString& Message); + void ProcessCustomSignal(const FString& Context, const FString& SignalId); - static void TakeScreenshotButtonClicked(); private: - TSharedPtr CommandList; + void RegisterMenus(); + + // Configuration + static void OpenRuntimeSettings(); + static void OpenEditorSettings(); + // Utilities + static void TakeScreenshot(); + // Reference + static void ViewDocumentation(); + // Support + static void AccessOfficialSupport(); + static void AccessCommunitySupport(); + static void ReportABug(); + static void IssueTracker(); + // Footer + static void ViewWebsite(); + + static TSharedRef GenerateOnlineSettingsMenu(TSharedRef InCommandList); + + TSharedPtr CommandList; + TSharedPtr CheckEngine; + FTSTicker::FDelegateHandle TickerHandle; }; diff --git a/Source/ThirdwebEditor/Public/ThirdwebEditorScreenshotUtils.h b/Source/ThirdwebEditor/Public/ThirdwebEditorScreenshotUtils.h index e4acd53..7835b08 100644 --- a/Source/ThirdwebEditor/Public/ThirdwebEditorScreenshotUtils.h +++ b/Source/ThirdwebEditor/Public/ThirdwebEditorScreenshotUtils.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/ThirdwebEditor/Public/ThirdwebEditorSettings.h b/Source/ThirdwebEditor/Public/ThirdwebEditorSettings.h index c3c6b3e..1ba6c99 100644 --- a/Source/ThirdwebEditor/Public/ThirdwebEditorSettings.h +++ b/Source/ThirdwebEditor/Public/ThirdwebEditorSettings.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once @@ -57,6 +57,9 @@ class THIRDWEBEDITOR_API UThirdwebEditorSettings : public UDeveloperSettings UPROPERTY(Config, EditAnywhere, BlueprintReadOnly, DisplayName="Timeout", meta=(EditCondition="!bScreenshotDisableNotifications", EditConditionHides), Category="Screenshots|Notifications") int32 ScreenshotNotificationTimeoutSeconds; + UPROPERTY(Config, EditAnywhere, DisplayName="Hide Dropdown In Editor Toolbar", Category=Tools) + bool bHideDropdownInEditorToolbar; + public: static bool NotificationsEnabled() { return !Get()->bScreenshotDisableNotifications; } static FInputChord GetScreenshotShortcut() { return Get()->ScreenshotShortcut; } @@ -69,7 +72,8 @@ class THIRDWEBEDITOR_API UThirdwebEditorSettings : public UDeveloperSettings static FDirectoryPath GetScreenshotSaveDirectory() { return Get()->ScreenshotSaveDirectory; } static EThirdwebEditorBlueprintImageFormat GetScreenshotFormat() { return Get()->ScreenshotFormat; } static float GetScreenshotQuality(); - + static bool HideDropdownInEditorToolbar() { return Get()->bHideDropdownInEditorToolbar; } + /** Convenience Getter */ static UThirdwebEditorSettings* Get() { return GetMutableDefault(); } }; diff --git a/Source/ThirdwebEditor/Public/ThirdwebEditorStyle.h b/Source/ThirdwebEditor/Public/ThirdwebEditorStyle.h index 920df51..51fe856 100644 --- a/Source/ThirdwebEditor/Public/ThirdwebEditorStyle.h +++ b/Source/ThirdwebEditor/Public/ThirdwebEditorStyle.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/ThirdwebEditor/Public/ThirdwebEditorUtils.h b/Source/ThirdwebEditor/Public/ThirdwebEditorUtils.h new file mode 100644 index 0000000..0936dbd --- /dev/null +++ b/Source/ThirdwebEditor/Public/ThirdwebEditorUtils.h @@ -0,0 +1,20 @@ +// Copyright (c) 2025 Thirdweb. All Rights Reserved. + +#pragma once + +#include "ISettingsModule.h" +#include "Modules/ModuleManager.h" + +namespace ThirdwebEditorUtils +{ + template + void OpenDeveloperSettings() + { + const T* Settings = GetDefault(); + FModuleManager::LoadModuleChecked("Settings").ShowViewer( + Settings->GetContainerName(), + Settings->GetCategoryName(), + Settings->GetSectionName() + ); + } +} diff --git a/Source/ThirdwebEditor/ThirdwebEditor.Build.cs b/Source/ThirdwebEditor/ThirdwebEditor.Build.cs index 1670bd0..7b50772 100644 --- a/Source/ThirdwebEditor/ThirdwebEditor.Build.cs +++ b/Source/ThirdwebEditor/ThirdwebEditor.Build.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. using UnrealBuildTool; diff --git a/Source/ThirdwebUncookedOnly/Private/K2Node/Engine/Contract/K2Node_ContractWriteContract.cpp b/Source/ThirdwebUncookedOnly/Private/K2Node/Engine/Contract/K2Node_ContractWriteContract.cpp new file mode 100644 index 0000000..ab2c05c --- /dev/null +++ b/Source/ThirdwebUncookedOnly/Private/K2Node/Engine/Contract/K2Node_ContractWriteContract.cpp @@ -0,0 +1,217 @@ +// Copyright (c) 2025 Thirdweb. All Rights Reserved. + +#include "K2Node/Engine/Contract/K2Node_ContractWriteContract.h" + +#include "JsonObjectWrapper.h" +#include "AsyncTasks/Engine/Contract/AsyncTaskContractWriteContract.h" +#include "Wallets/ThirdwebSmartWalletHandle.h" + +namespace TwPins +{ + const FName ChainId = FName(TEXT("ChainId")); + const FName ContractAddress = FName(TEXT("ContractAddress")); + const FName BackendWalletAddress = FName(TEXT("BackendWalletAddress")); + const FName IdempotencyKey = FName(TEXT("IdempotencyKey")); + const FName FunctionName = FName(TEXT("FunctionName")); + const FName Args = FName(TEXT("Args")); + const FName TxOverrides = FName(TEXT("TxOverrides")); + const FName Abi = FName(TEXT("Abi")); + const FName SimulateTx = FName(TEXT("bSimulateTx")); + const FName QueueId = FName(TEXT("QueueId")); +} + +#define LOCTEXT_NAMESPACE "ThirdwebUncookedOnly" + +UK2Node_ContractWriteContract::UK2Node_ContractWriteContract() +{ + ProxyClass = UAsyncTaskContractWriteContract::StaticClass(); + ProxyFactoryClass = UAsyncTaskContractWriteContract::StaticClass(); + ProxyFactoryFunctionName = GET_FUNCTION_NAME_CHECKED(UAsyncTaskContractWriteContract, WriteContract); + + bRaw = false; +} + +#if WITH_EDITOR +void UK2Node_ContractWriteContract::PostEditChangeProperty(struct FPropertyChangedEvent& PropertyChangedEvent) +{ + Super::PostEditChangeProperty(PropertyChangedEvent); + if (PropertyChangedEvent.GetMemberPropertyName() == GET_MEMBER_NAME_CHECKED(UK2Node_ContractWriteContract, bRaw)) + { + if (UpdatePins()) + { + ReconstructNode(); + } + } +} +#endif + +FText UK2Node_ContractWriteContract::GetNodeTitle(ENodeTitleType::Type TitleType) const +{ + return LOCTEXT("K2Node_ContractWriteContract_SmartNodeTitle", "Write Contract"); +} + +FText UK2Node_ContractWriteContract::GetTooltipText() const +{ + return LOCTEXT("K2Node_ContractWriteContract_TooltipText", "Write to a contract via an Engine instance"); +} + +FText UK2Node_ContractWriteContract::GetMenuCategory() const +{ + return LOCTEXT("K2Node_ContractWriteContract_Category", "Thirdweb|Engine|Contract"); +} + +bool UK2Node_ContractWriteContract::IsConnectionDisallowed(const UEdGraphPin* MyPin, const UEdGraphPin* OtherPin, FString& OutReason) const +{ + if (MyPin == GetWalletPin() && OtherPin) + { + if (OtherPin->PinType.PinSubCategoryObject != TBaseStructure::Get() && OtherPin->PinType.PinSubCategoryObject != TBaseStructure::Get()) + { + OutReason = LOCTEXT("K2Node_ContractWriteContract_IsConnectionDisallowed", "Only In App & Smart Wallet Handles allowed").ToString(); + return true; + } + } + return Super::IsConnectionDisallowed(MyPin, OtherPin, OutReason); +} + +void UK2Node_ContractWriteContract::PinDefaultValueChanged(UEdGraphPin* Pin) +{ + Super::Super::PinDefaultValueChanged(Pin); + UpdatePins(); +} + +void UK2Node_ContractWriteContract::AllocateDefaultPins() +{ + Super::AllocateDefaultPins(); + SetNodeHasAdvanced(true); + // Input Pins + SetPinFriendlyName( + CreatePin(EGPD_Input, UEdGraphSchema_K2::PC_Int64, TwPins::ChainId), + LOCTEXT("K2Node_ContractWriteContract_ChainId", "Chain ID") + ); + CreatePin(EGPD_Input, UEdGraphSchema_K2::PC_String, TwPins::ContractAddress); + CreatePin(EGPD_Input, UEdGraphSchema_K2::PC_String, TwPins::BackendWalletAddress); + CreatePin(EGPD_Input, UEdGraphSchema_K2::PC_Struct, FSmartWalletHandle::StaticStruct(), TwPins::SmartWallet); + CreatePin(EGPD_Input, UEdGraphSchema_K2::PC_String, TwPins::FunctionName); + FCreatePinParams ArgsPinParams = FCreatePinParams(); + ArgsPinParams.ContainerType = EPinContainerType::Array; + CreatePin(EGPD_Input, UEdGraphSchema_K2::PC_String, TwPins::Args, ArgsPinParams); + CreatePin(EGPD_Input, UEdGraphSchema_K2::PC_Boolean, TwPins::SimulateTx); + SetPinAdvancedView(CreatePin(EGPD_Input, UEdGraphSchema_K2::PC_Struct, FThirdwebEngineTransactionOverrides::StaticStruct(), TwPins::TxOverrides)); + SetPinAdvancedView(CreatePin(EGPD_Input, UEdGraphSchema_K2::PC_String, TwPins::Abi), true); + SetPinVisibility(CreatePin(EGPD_Input, UEdGraphSchema_K2::PC_Struct, FJsonObjectWrapper::StaticStruct(), TwPins::Data), false)->PinToolTip = + TEXT( + "Raw payload for the write contract endpoint. Must match all fields defined in the api documentation\nExample Payload:\n{\n \"functionName\": \"deposit\"\n \"args\": [ 1000000 ]\n}\n\nDocumentation: https://thirdweb-engine.apidocumentation.com/reference#tag/contract/POST/contract/{chain}/{contractAddress}/write\n\nJson Object Wrapper\nJson Object Structure"); + SetPinAdvancedView(CreatePin(EGPD_Input, UEdGraphSchema_K2::PC_String, TwPins::IdempotencyKey), true); + + // Output Pins + SetPinFriendlyName( + CreatePin(EGPD_Output, UEdGraphSchema_K2::PC_String, TwPins::QueueId), + LOCTEXT("K2Node_ContractWriteContract_QueueId", "Queue ID") + ); + CreatePin(EGPD_Output, UEdGraphSchema_K2::PC_String, TwPins::Error); + + UpdatePins(); +} + +void UK2Node_ContractWriteContract::ExpandNode(FKismetCompilerContext& CompilerContext, UEdGraph* SourceGraph) +{ + if (const UEdGraphPin* Pin = GetSmartWalletPin()) + { + if (bRaw) + { + ProxyFactoryFunctionName = GET_FUNCTION_NAME_CHECKED(UAsyncTaskContractWriteContract, WriteContractRaw); + } + else + { + ProxyFactoryFunctionName = GET_FUNCTION_NAME_CHECKED(UAsyncTaskContractWriteContract, WriteContract); + } + } + RemoveHiddenPins(this); + Super::ExpandNode(CompilerContext, SourceGraph); +} + +bool UK2Node_ContractWriteContract::UpdatePins() +{ + SetPinVisibility(GetFunctionNamePin(), !bRaw); + SetPinVisibility(GetArgsPin(), !bRaw); + SetPinVisibility(GetTxOverridesPin(), !bRaw); + SetPinVisibility(GetAbiPin(), !bRaw); + SetPinVisibility(GetDataPin(), bRaw); + if (UEdGraph* Graph = GetGraph()) + { + Graph->NotifyGraphChanged(); + } + return true; +} + +UEdGraphPin* UK2Node_ContractWriteContract::GetChainIdPin() const +{ + UEdGraphPin* Pin = FindPin(TwPins::ChainId); + check(Pin == NULL || Pin->Direction == EGPD_Input); + return Pin; +} + +UEdGraphPin* UK2Node_ContractWriteContract::GetContractAddressPin() const +{ + UEdGraphPin* Pin = FindPin(TwPins::ContractAddress); + check(Pin == NULL || Pin->Direction == EGPD_Input); + return Pin; +} + +UEdGraphPin* UK2Node_ContractWriteContract::GetBackendWalletAddressPin() const +{ + UEdGraphPin* Pin = FindPin(TwPins::BackendWalletAddress); + check(Pin == NULL || Pin->Direction == EGPD_Input); + return Pin; +} + +UEdGraphPin* UK2Node_ContractWriteContract::GetIdempotencyKeyPin() const +{ + UEdGraphPin* Pin = FindPin(TwPins::IdempotencyKey); + check(Pin == NULL || Pin->Direction == EGPD_Input); + return Pin; +} + +UEdGraphPin* UK2Node_ContractWriteContract::GetFunctionNamePin() const +{ + UEdGraphPin* Pin = FindPin(TwPins::FunctionName); + check(Pin == NULL || Pin->Direction == EGPD_Input); + return Pin; +} + +UEdGraphPin* UK2Node_ContractWriteContract::GetArgsPin() const +{ + UEdGraphPin* Pin = FindPin(TwPins::Args); + check(Pin == NULL || Pin->Direction == EGPD_Input); + return Pin; +} + +UEdGraphPin* UK2Node_ContractWriteContract::GetTxOverridesPin() const +{ + UEdGraphPin* Pin = FindPin(TwPins::TxOverrides); + check(Pin == NULL || Pin->Direction == EGPD_Input); + return Pin; +} + +UEdGraphPin* UK2Node_ContractWriteContract::GetAbiPin() const +{ + UEdGraphPin* Pin = FindPin(TwPins::Abi); + check(Pin == NULL || Pin->Direction == EGPD_Input); + return Pin; +} + +UEdGraphPin* UK2Node_ContractWriteContract::GetSimulateTxPin() const +{ + UEdGraphPin* Pin = FindPin(TwPins::SimulateTx); + check(Pin == NULL || Pin->Direction == EGPD_Input); + return Pin; +} + +UEdGraphPin* UK2Node_ContractWriteContract::GetDataPin() const +{ + UEdGraphPin* Pin = FindPin(TwPins::Data); + check(Pin == NULL || Pin->Direction == EGPD_Input); + return Pin; +} + +#undef LOCTEXT_NAMESPACE diff --git a/Source/ThirdwebUncookedOnly/Private/K2Node/K2Node_ThirdwebBaseAsyncTask.cpp b/Source/ThirdwebUncookedOnly/Private/K2Node/K2Node_ThirdwebBaseAsyncTask.cpp index b4e3109..a8c766c 100644 --- a/Source/ThirdwebUncookedOnly/Private/K2Node/K2Node_ThirdwebBaseAsyncTask.cpp +++ b/Source/ThirdwebUncookedOnly/Private/K2Node/K2Node_ThirdwebBaseAsyncTask.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "K2Node/K2Node_ThirdwebBaseAsyncTask.h" @@ -19,6 +19,8 @@ namespace TwPins const FName Success = FName(TEXT("Success")); const FName Failed = FName(TEXT("Failed")); const FName Error = FName(TEXT("Error")); + + const FName Data = FName(TEXT("Data")); } #define LOCTEXT_NAMESPACE "ThirdwebUncookedOnly" diff --git a/Source/ThirdwebUncookedOnly/Private/K2Node/K2Node_ThirdwebCreateWallet.cpp b/Source/ThirdwebUncookedOnly/Private/K2Node/K2Node_ThirdwebCreateWallet.cpp index 0a9d471..20afa0f 100644 --- a/Source/ThirdwebUncookedOnly/Private/K2Node/K2Node_ThirdwebCreateWallet.cpp +++ b/Source/ThirdwebUncookedOnly/Private/K2Node/K2Node_ThirdwebCreateWallet.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "K2Node/K2Node_ThirdwebCreateWallet.h" diff --git a/Source/ThirdwebUncookedOnly/Private/K2Node/K2Node_ThirdwebFetchIpfsData.cpp b/Source/ThirdwebUncookedOnly/Private/K2Node/K2Node_ThirdwebFetchIpfsData.cpp index 5143b97..8ddbe15 100644 --- a/Source/ThirdwebUncookedOnly/Private/K2Node/K2Node_ThirdwebFetchIpfsData.cpp +++ b/Source/ThirdwebUncookedOnly/Private/K2Node/K2Node_ThirdwebFetchIpfsData.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "K2Node/K2Node_ThirdwebFetchIpfsData.h" @@ -18,7 +18,6 @@ namespace TwPins { const FName Uri = FName(TEXT("Uri")); - const FName Data = FName(TEXT("Data")); } #define LOCTEXT_NAMESPACE "ThirdwebUncookedOnly" diff --git a/Source/ThirdwebUncookedOnly/Private/K2Node/K2Node_ThirdwebLink.cpp b/Source/ThirdwebUncookedOnly/Private/K2Node/K2Node_ThirdwebLink.cpp index 7f26533..5eb05d8 100644 --- a/Source/ThirdwebUncookedOnly/Private/K2Node/K2Node_ThirdwebLink.cpp +++ b/Source/ThirdwebUncookedOnly/Private/K2Node/K2Node_ThirdwebLink.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "K2Node/K2Node_ThirdwebLink.h" diff --git a/Source/ThirdwebUncookedOnly/Private/K2Node/K2Node_ThirdwebSignIn.cpp b/Source/ThirdwebUncookedOnly/Private/K2Node/K2Node_ThirdwebSignIn.cpp index 55522c4..828e90f 100644 --- a/Source/ThirdwebUncookedOnly/Private/K2Node/K2Node_ThirdwebSignIn.cpp +++ b/Source/ThirdwebUncookedOnly/Private/K2Node/K2Node_ThirdwebSignIn.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "K2Node/K2Node_ThirdwebSignIn.h" diff --git a/Source/ThirdwebUncookedOnly/Private/K2Node/K2Node_ThirdwebSignMessage.cpp b/Source/ThirdwebUncookedOnly/Private/K2Node/K2Node_ThirdwebSignMessage.cpp index 3cc82ef..9f04911 100644 --- a/Source/ThirdwebUncookedOnly/Private/K2Node/K2Node_ThirdwebSignMessage.cpp +++ b/Source/ThirdwebUncookedOnly/Private/K2Node/K2Node_ThirdwebSignMessage.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "K2Node/K2Node_ThirdwebSignMessage.h" diff --git a/Source/ThirdwebUncookedOnly/Private/TWUOFunctionLibrary.cpp b/Source/ThirdwebUncookedOnly/Private/TWUOFunctionLibrary.cpp index ff2cc67..b71278b 100644 --- a/Source/ThirdwebUncookedOnly/Private/TWUOFunctionLibrary.cpp +++ b/Source/ThirdwebUncookedOnly/Private/TWUOFunctionLibrary.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "TWUOFunctionLibrary.h" diff --git a/Source/ThirdwebUncookedOnly/Private/TWUOUtils.cpp b/Source/ThirdwebUncookedOnly/Private/TWUOUtils.cpp index e3f3058..1b9d7e1 100644 --- a/Source/ThirdwebUncookedOnly/Private/TWUOUtils.cpp +++ b/Source/ThirdwebUncookedOnly/Private/TWUOUtils.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "TWUOUtils.h" diff --git a/Source/ThirdwebUncookedOnly/Private/ThirdwebUncookedOnly.cpp b/Source/ThirdwebUncookedOnly/Private/ThirdwebUncookedOnly.cpp index fecd84e..742143a 100644 --- a/Source/ThirdwebUncookedOnly/Private/ThirdwebUncookedOnly.cpp +++ b/Source/ThirdwebUncookedOnly/Private/ThirdwebUncookedOnly.cpp @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #include "ThirdwebUncookedOnly.h" diff --git a/Source/ThirdwebUncookedOnly/Public/K2Node/Engine/Contract/K2Node_ContractWriteContract.h b/Source/ThirdwebUncookedOnly/Public/K2Node/Engine/Contract/K2Node_ContractWriteContract.h new file mode 100644 index 0000000..ce64b8a --- /dev/null +++ b/Source/ThirdwebUncookedOnly/Public/K2Node/Engine/Contract/K2Node_ContractWriteContract.h @@ -0,0 +1,65 @@ +// Copyright (c) 2025 Thirdweb. All Rights Reserved. + +#pragma once + +#include "K2Node.h" +#include "K2Node/K2Node_ThirdwebBaseAsyncTask.h" +#include "K2Node_ContractWriteContract.generated.h" + +namespace TwPins +{ + extern const FName ChainId; + extern const FName ContractAddress; + extern const FName BackendWalletAddress; + extern const FName IdempotencyKey; + extern const FName FunctionName; + extern const FName Args; + extern const FName TxOverrides; + extern const FName Abi; + extern const FName SimulateTx; + extern const FName QueueId; +} + +UCLASS() +class THIRDWEBUNCOOKEDONLY_API UK2Node_ContractWriteContract : public UK2Node_ThirdwebBaseAsyncTask +{ + GENERATED_BODY() + +public: + UK2Node_ContractWriteContract(); + + // UEdGraphNode interface implementation +#if WITH_EDITOR + virtual void PostEditChangeProperty(struct FPropertyChangedEvent& PropertyChangedEvent) override; +#endif + virtual void AllocateDefaultPins() override; + virtual FText GetTooltipText() const override; + virtual FText GetNodeTitle(ENodeTitleType::Type TitleType) const override; + virtual void PinDefaultValueChanged(UEdGraphPin* Pin) override; + // End of implementation + + // UK2Node interface implementation + virtual void ExpandNode(FKismetCompilerContext& CompilerContext, UEdGraph* SourceGraph) override; + virtual FText GetMenuCategory() const override; + virtual bool IsConnectionDisallowed(const UEdGraphPin* MyPin, const UEdGraphPin* OtherPin, FString& OutReason) const override; + virtual bool ShouldShowNodeProperties() const override { return true; } + // End of implementation + +protected: + UPROPERTY(EditDefaultsOnly, Category="Input") + bool bRaw; + + virtual bool UpdatePins() override; + + /** Pin Getters */ + virtual UEdGraphPin* GetChainIdPin() const; + virtual UEdGraphPin* GetContractAddressPin() const; + virtual UEdGraphPin* GetBackendWalletAddressPin() const; + virtual UEdGraphPin* GetIdempotencyKeyPin() const; + virtual UEdGraphPin* GetFunctionNamePin() const; + virtual UEdGraphPin* GetArgsPin() const; + virtual UEdGraphPin* GetTxOverridesPin() const; + virtual UEdGraphPin* GetAbiPin() const; + virtual UEdGraphPin* GetSimulateTxPin() const; + virtual UEdGraphPin* GetDataPin() const; +}; diff --git a/Source/ThirdwebUncookedOnly/Public/K2Node/K2Node_ThirdwebBaseAsyncTask.h b/Source/ThirdwebUncookedOnly/Public/K2Node/K2Node_ThirdwebBaseAsyncTask.h index efd0358..6b31314 100644 --- a/Source/ThirdwebUncookedOnly/Public/K2Node/K2Node_ThirdwebBaseAsyncTask.h +++ b/Source/ThirdwebUncookedOnly/Public/K2Node/K2Node_ThirdwebBaseAsyncTask.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once @@ -16,6 +16,8 @@ namespace TwPins extern const FName Success; extern const FName Failed; extern const FName Error; + + extern const FName Data; } UCLASS(Abstract) diff --git a/Source/ThirdwebUncookedOnly/Public/K2Node/K2Node_ThirdwebCreateWallet.h b/Source/ThirdwebUncookedOnly/Public/K2Node/K2Node_ThirdwebCreateWallet.h index 416eb2d..0507737 100644 --- a/Source/ThirdwebUncookedOnly/Public/K2Node/K2Node_ThirdwebCreateWallet.h +++ b/Source/ThirdwebUncookedOnly/Public/K2Node/K2Node_ThirdwebCreateWallet.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/ThirdwebUncookedOnly/Public/K2Node/K2Node_ThirdwebFetchIpfsData.h b/Source/ThirdwebUncookedOnly/Public/K2Node/K2Node_ThirdwebFetchIpfsData.h index b1dcb4a..c2f172c 100644 --- a/Source/ThirdwebUncookedOnly/Public/K2Node/K2Node_ThirdwebFetchIpfsData.h +++ b/Source/ThirdwebUncookedOnly/Public/K2Node/K2Node_ThirdwebFetchIpfsData.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once @@ -9,7 +9,6 @@ namespace TwPins { extern const FName Uri; - extern const FName Data; } UCLASS() diff --git a/Source/ThirdwebUncookedOnly/Public/K2Node/K2Node_ThirdwebLink.h b/Source/ThirdwebUncookedOnly/Public/K2Node/K2Node_ThirdwebLink.h index 3822eb9..75a11d4 100644 --- a/Source/ThirdwebUncookedOnly/Public/K2Node/K2Node_ThirdwebLink.h +++ b/Source/ThirdwebUncookedOnly/Public/K2Node/K2Node_ThirdwebLink.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/ThirdwebUncookedOnly/Public/K2Node/K2Node_ThirdwebSignIn.h b/Source/ThirdwebUncookedOnly/Public/K2Node/K2Node_ThirdwebSignIn.h index 3c71fbd..0a88586 100644 --- a/Source/ThirdwebUncookedOnly/Public/K2Node/K2Node_ThirdwebSignIn.h +++ b/Source/ThirdwebUncookedOnly/Public/K2Node/K2Node_ThirdwebSignIn.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/ThirdwebUncookedOnly/Public/K2Node/K2Node_ThirdwebSignMessage.h b/Source/ThirdwebUncookedOnly/Public/K2Node/K2Node_ThirdwebSignMessage.h index 1e4fab1..ab17a32 100644 --- a/Source/ThirdwebUncookedOnly/Public/K2Node/K2Node_ThirdwebSignMessage.h +++ b/Source/ThirdwebUncookedOnly/Public/K2Node/K2Node_ThirdwebSignMessage.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/ThirdwebUncookedOnly/Public/TWUOCommon.h b/Source/ThirdwebUncookedOnly/Public/TWUOCommon.h index 15fcb35..38a4b61 100644 --- a/Source/ThirdwebUncookedOnly/Public/TWUOCommon.h +++ b/Source/ThirdwebUncookedOnly/Public/TWUOCommon.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/ThirdwebUncookedOnly/Public/TWUOFunctionLibrary.h b/Source/ThirdwebUncookedOnly/Public/TWUOFunctionLibrary.h index 1da499f..96580e1 100644 --- a/Source/ThirdwebUncookedOnly/Public/TWUOFunctionLibrary.h +++ b/Source/ThirdwebUncookedOnly/Public/TWUOFunctionLibrary.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/ThirdwebUncookedOnly/Public/TWUOUtils.h b/Source/ThirdwebUncookedOnly/Public/TWUOUtils.h index 86111c9..9962dbb 100644 --- a/Source/ThirdwebUncookedOnly/Public/TWUOUtils.h +++ b/Source/ThirdwebUncookedOnly/Public/TWUOUtils.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/ThirdwebUncookedOnly/Public/ThirdwebUncookedOnly.h b/Source/ThirdwebUncookedOnly/Public/ThirdwebUncookedOnly.h index 5c2d842..88675d2 100644 --- a/Source/ThirdwebUncookedOnly/Public/ThirdwebUncookedOnly.h +++ b/Source/ThirdwebUncookedOnly/Public/ThirdwebUncookedOnly.h @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. #pragma once diff --git a/Source/ThirdwebUncookedOnly/ThirdwebUncookedOnly.Build.cs b/Source/ThirdwebUncookedOnly/ThirdwebUncookedOnly.Build.cs index f974596..a5c5573 100644 --- a/Source/ThirdwebUncookedOnly/ThirdwebUncookedOnly.Build.cs +++ b/Source/ThirdwebUncookedOnly/ThirdwebUncookedOnly.Build.cs @@ -1,4 +1,4 @@ -// Copyright (c) 2024 Thirdweb. All Rights Reserved. +// Copyright (c) 2025 Thirdweb. All Rights Reserved. using UnrealBuildTool; @@ -18,6 +18,7 @@ public ThirdwebUncookedOnly(ReadOnlyTargetRules Target) : base(Target) "KismetCompiler", "BlueprintGraph", "UnrealEd", + "JsonUtilities" }); PrivateDependencyModuleNames.AddRange(new[] diff --git a/Thirdweb.uplugin b/Thirdweb.uplugin index 642fd14..2dbb968 100644 --- a/Thirdweb.uplugin +++ b/Thirdweb.uplugin @@ -1,45 +1,45 @@ { - "FileVersion": 3, - "Version": 183, - "VersionName": "1.8.3", - "FriendlyName": "Thirdweb SDK", - "Description": "ThirdwebSDK for Unreal Engine", - "Category": "Thirdweb", - "CreatedBy": "Thirdweb", - "CreatedByURL": "https://thirdweb.com", - "DocsURL": "https://portal.thirdweb.com/unreal-engine", - "MarketplaceURL": "com.epicgames.launcher://ue/marketplace/product/f21200c2610146f3888172994448e50d", - "SupportURL": "https://thirdweb.com/support", - "CanContainContent": true, - "IsBetaVersion": false, - "IsExperimentalVersion": false, - "Installed": false, - "EditorCustomVirtualPath": "Thirdweb", - "Modules": [ - { - "Name": "Thirdweb", - "Type": "Runtime", - "LoadingPhase": "PreLoadingScreen", - "PlatformAllowList": [ - "Win64", - "Mac", - "Linux", - "LinuxArm64", - "Android", - "IOS", - "TVOS", - "VisionOS" - ] - }, - { - "Name": "ThirdwebEditor", - "Type": "Editor", - "LoadingPhase": "Default" - }, - { - "Name": "ThirdwebUncookedOnly", - "Type": "UncookedOnly", - "LoadingPhase": "Default" - } - ] + "FileVersion": 3, + "Version": 200, + "VersionName": "2.0.0", + "FriendlyName": "Thirdweb SDK", + "Description": "ThirdwebSDK for Unreal Engine", + "Category": "Thirdweb", + "CreatedBy": "Thirdweb", + "CreatedByURL": "https://thirdweb.com", + "DocsURL": "https://portal.thirdweb.com/unreal-engine", + "MarketplaceURL": "com.epicgames.launcher://ue/marketplace/product/f21200c2610146f3888172994448e50d", + "SupportURL": "https://thirdweb.com/support", + "CanContainContent": true, + "IsBetaVersion": false, + "IsExperimentalVersion": false, + "Installed": false, + "EditorCustomVirtualPath": "Thirdweb", + "Modules": [ + { + "Name": "Thirdweb", + "Type": "Runtime", + "LoadingPhase": "PreLoadingScreen", + "PlatformAllowList": [ + "Win64", + "Mac", + "Linux", + "LinuxArm64", + "Android", + "IOS", + "TVOS", + "VisionOS" + ] + }, + { + "Name": "ThirdwebEditor", + "Type": "Editor", + "LoadingPhase": "Default" + }, + { + "Name": "ThirdwebUncookedOnly", + "Type": "UncookedOnly", + "LoadingPhase": "Default" + } + ] } \ No newline at end of file