diff --git a/docs/components/CollapsibleDetails.tsx b/docs/components/CollapsibleDetails.tsx new file mode 100644 index 00000000000..e6d2bb27025 --- /dev/null +++ b/docs/components/CollapsibleDetails.tsx @@ -0,0 +1,25 @@ +interface CollapsibleDetailsProps { + title: string; + items: { + key: string; + value: string; + }[] +} + +export const CollapsibleDetails = (props: CollapsibleDetailsProps) => { + return ( +
+ {props.title} +
+ {props.items.map((item, index) => { + return ( +
+

{item.key}

+

{item.value}

+
+ ) + })} +
+
+ ) +} \ No newline at end of file diff --git a/docs/components/TabbedContent/style.css b/docs/components/TabbedContent/style.css index b36c01cbccc..17861a57255 100644 --- a/docs/components/TabbedContent/style.css +++ b/docs/components/TabbedContent/style.css @@ -33,4 +33,9 @@ border-radius: 0.4rem; border: 1px solid rgba(0, 158, 255, 0.165); background-color: rgba(0, 143, 245, 0.098); +} + +.tabbed-content__content.borderless { + padding: 0; + border: unset; } \ No newline at end of file diff --git a/docs/pages/sdk/unreal/authentication.mdx b/docs/pages/sdk/unreal/authentication.mdx index ddcdb49f37b..448df674c40 100644 --- a/docs/pages/sdk/unreal/authentication.mdx +++ b/docs/pages/sdk/unreal/authentication.mdx @@ -16,7 +16,7 @@ Sign in users with any email, and they will receive a one-time password in their Listen for the Email Requires Code event. -
+
{'img'}
@@ -32,7 +32,7 @@ On mobile platforms, listen for the `Id Token Received` event. ### Get Google Id Token -
+
{'img'}
@@ -40,7 +40,7 @@ On mobile platforms, listen for the `Id Token Received` event. ### Get Apple Id Token -
+
{'img'}
@@ -50,7 +50,7 @@ On mobile platforms, listen for the `Id Token Received` event. Use this method to start a session using a valid Id token from Google or Apple. -
+
{'img'}
@@ -63,7 +63,7 @@ during [Configuration](/sdk/unreal/configuration) and [configure PlayFab in the ### Register a new PlayFab user -
+
{'img'}
@@ -71,7 +71,7 @@ during [Configuration](/sdk/unreal/configuration) and [configure PlayFab in the ### Login with existing PlayFab user -
+
{'img'}
@@ -85,7 +85,7 @@ If you have your own PlayFab integration, you are welcome to use it. Once you've You can sign in users as guests. However, note that they will lose access to their wallet if they uninstall the app or sign out. -
+
{'img'}
@@ -98,7 +98,7 @@ account in order to have persistent credentials with which they can access their While a user is authenticated with the Sequence API, you can add an additional login method by using the appropriate federate account call. -
+
{'img'}
@@ -108,11 +108,11 @@ While a user is authenticated with the Sequence API, you can add an additional l Clear the credentials cache and sign out the current user. -
+
{'img'}
-
+
```cpp const TOptional WalletOptional = USequenceWallet::Get(); if (WalletOptional.IsSet() && WalletOptional.GetValue()) @@ -129,11 +129,11 @@ Clear the credentials cache and sign out the current user. List the active sessions. -
+
{'img'}
-
+
```cpp const TSuccessCallback> OnSuccess = [=](TArray Response) { diff --git a/docs/pages/sdk/unreal/bootstrap_game.mdx b/docs/pages/sdk/unreal/bootstrap_game.mdx new file mode 100644 index 00000000000..cd19f2bfab4 --- /dev/null +++ b/docs/pages/sdk/unreal/bootstrap_game.mdx @@ -0,0 +1,88 @@ +--- +title: Sequence - Web3 Gaming Platform - Unreal SDK Sequence API +description: Documentation for Unreal SDK API for reading from the blockchain with the Sequence infrastructure stack for web3 gaming. +--- + +import {CollapsibleDetails} from "../../../components/CollapsibleDetails.tsx"; +import TabbedContent from "../../../components/TabbedContent"; + +# Bootstrap your Game + +Sequence's Unreal SDK includes a range of features to help you bootstrap your game. +You can create them as shown below or duplicate the `.uasset` files from the `Plugins/SequencePlugin Content/Samples/` +folder and customize them to fit your needs. + +## Inventory + +Create the `Sequence Inventory` widget to display a QR code to receive funds or send funds to other wallets. + +{'img'} +{'img'} + + + +## Primary Sale + +Create the `Sequence Primary Sale` widget to display a QR code to receive funds or send funds to other wallets. + +{'img'} +{'img'} + + + +## My Wallet View + +Create the `Sequence Profile` widget to display a QR code to receive funds or send funds to other wallets. + +{'img'} +{'img'} + + diff --git a/docs/pages/sdk/unreal/configuration.mdx b/docs/pages/sdk/unreal/configuration.mdx index 53dbc275ca0..69efd65c4cf 100644 --- a/docs/pages/sdk/unreal/configuration.mdx +++ b/docs/pages/sdk/unreal/configuration.mdx @@ -16,13 +16,7 @@ In your Project's Build.cs file ([where to find](https://forums.unrealengine.com { PCHUsage = PCHUsageMode.UseExplicitOrSharedPCHs; PublicDependencyModuleNames.AddRange(new string[] { "Core", "CoreUObject", "Engine", "InputCore" }); - //The line below is what you want PrivateDependencyModuleNames.AddRange(new string[] { "SequencePlugin" }); - // Uncomment if you are using Slate UI - // PrivateDependencyModuleNames.AddRange(new string[] { "Slate", "SlateCore" }); - // Uncomment if you are using online features - // PrivateDependencyModuleNames.Add("OnlineSubsystem"); - // To include OnlineSubsystemSteam, add it to the plugins section in your uproject file with the Enabled attribute set to true } ``` diff --git a/docs/pages/sdk/unreal/introduction.mdx b/docs/pages/sdk/unreal/introduction.mdx index 1dd919a2a93..88df6aad726 100644 --- a/docs/pages/sdk/unreal/introduction.mdx +++ b/docs/pages/sdk/unreal/introduction.mdx @@ -23,7 +23,7 @@ Please view our [Platform Requirements](/sdk/unreal/platforms) ## Supported Authentication Methods -Start the integration in any of [your Blueprints](/sdk/unreal/platforms) +Start the integration using our [Subsystems for Blueprints](/sdk/unreal/subsystems) - Email with One-Time-Password - Google- & Apple Single Sign On diff --git a/docs/pages/sdk/unreal/read-from-blockchain.mdx b/docs/pages/sdk/unreal/read-from-blockchain.mdx index 568898e7848..dea94fba53a 100644 --- a/docs/pages/sdk/unreal/read-from-blockchain.mdx +++ b/docs/pages/sdk/unreal/read-from-blockchain.mdx @@ -3,6 +3,7 @@ title: Sequence - Web3 Gaming Platform - Unreal SDK Sequence API description: Documentation for Unreal SDK API for reading from the blockchain with the Sequence infrastructure stack for web3 gaming. --- +import {CollapsibleDetails} from "../../../components/CollapsibleDetails.tsx"; import TabbedContent from "../../../components/TabbedContent"; # Read From Blockchain @@ -12,26 +13,28 @@ import TabbedContent from "../../../components/TabbedContent"; Select the Chain ID from which you want to retrieve user information. By default, this is set to Polygon. -
+
{'img'}
-:::warning -Make sure that you use the correct Chain Id for your project from [Sequence's Builder](https://sequence.build). -::: + ## Get Ether Balance Use the Indexer API to retrieve the Ether balance for a specified wallet address, such as the local user's address. -
+
{'img'}
-
- ```cpp +
+ ```cpp twoslash // Define success and failure callbacks const TSuccessCallback GenericSuccess = [=](const FEtherBalance& etherBalance) { }; const FFailureCallback GenericFailure = [=](const FSequenceError& Error) { }; @@ -48,17 +51,27 @@ Use the Indexer API to retrieve the Ether balance for a specified wallet address
+ + + + ## Get Token Balances Retrieve the user's token balances for ERC20, ERC721, and ERC1155 tokens. This will return an array of all tokens -owned by the user. Ensure that 'includeMetadata' is enabled to include contract information in the response. +owned by the user. -
+
{'img'}
-
+
```cpp const TSuccessCallback GenericSuccess = [=](const FGetTokenBalancesReturn& tokenBalances) { @@ -82,17 +95,37 @@ owned by the user. Ensure that 'includeMetadata' is enabled to include contract
+ + + + ## Get Token Supplies -Retrieve the token supplies for an ERC20, ERC721, or ERC1155 token. Make sure 'includeMetadata' is enabled to -include contract information in the response. +Retrieve the token supplies for an ERC20, ERC721, or ERC1155 token. -
+
{'img'}
-
+
```cpp const TSuccessCallback GenericSuccess = [=](const FGetTokenSuppliesReturn& tokenSupplies) { @@ -116,17 +149,33 @@ include contract information in the response.
+ + + + ## Get Token Supplies Map -Retrieve a collection of token supplies for ERC20, ERC721, or ERC1155 tokens. Make sure 'includeMetadata' is enabled to -include contract information in the response. +Retrieve a collection of token supplies for ERC20, ERC721, or ERC1155 tokens. -
+
{'img'}
-
+
```cpp const TSuccessCallback GenericSuccess = [=](const FGetTokenSuppliesMapReturn& tokenSuppliesMap) { @@ -152,17 +201,34 @@ include contract information in the response.
+FSeqTokenList Map))', + value: "A map of token IDs that you want to retrieve data from." + }, + { + key: 'Include Metadata (Boolean)', + value: "Enable this flag if you want to receive token metadata in the response." + }]} +/> + + + ## Get Transaction History Retrieve the transaction history for a wallet- or token address. -For example, here we get all transaction for the current user. +For example, here we get all transactions for the current user. -
+
{'img'}
-
+
```cpp const TSuccessCallback GenericSuccess = [=](const FGetTransactionHistoryReturn& transactionHistory) { @@ -187,3 +253,23 @@ For example, here we get all transaction for the current user. ```
+ + + + diff --git a/docs/pages/sdk/unreal/write-to-blockchain.mdx b/docs/pages/sdk/unreal/write-to-blockchain.mdx index 5d50813af84..b4844259444 100644 --- a/docs/pages/sdk/unreal/write-to-blockchain.mdx +++ b/docs/pages/sdk/unreal/write-to-blockchain.mdx @@ -7,18 +7,16 @@ import TabbedContent from "../../../components/TabbedContent"; # Write to Blockchain -When transferring tokens, listen to the `Send Transaction` event when the transaction is finished. - ## Sign Message Sign a given message as a hex string. For example, you can use this signature to validate content on your backend. -
+
{'img'}
-
+
```cpp const TSuccessCallback OnResponse = [this] (const FSeqSignMessageResponse_Response& Response) { @@ -44,11 +42,11 @@ Sign a given message as a hex string. For example, you can use this signature to Send native token balances to other users, such as sending ETH on the Ethereum Mainnet. -
+
{'img'}
-
+
```cpp FRawTransaction T; T.data = "0x0"; @@ -66,11 +64,11 @@ Send native token balances to other users, such as sending ETH on the Ethereum M Send your custom ERC20 tokens from Builder to users, or transfer existing tokens like USDC or WETH. -
+
{'img'}
-
+
```cpp // Create the ERC20 transaction FERC20Transaction T20; @@ -89,11 +87,11 @@ Send your custom ERC20 tokens from Builder to users, or transfer existing tokens Enable your users to send NFTs to others. -
+
{'img'}
-
+
```cpp // Create the ERC721 transaction FERC721Transaction T721; @@ -113,11 +111,11 @@ Enable your users to send NFTs to others. Enable your users to send Collectibles to others. -
+
{'img'}
-
+
```cpp // Create the ERC1155 transaction FERC1155Transaction T1155; @@ -140,11 +138,11 @@ Enable your users to send Collectibles to others. *Note: if you want call contracts with the Raw type you'll want include the header #include "ABI/ABI.h" in order to use the ABI to encode the data for a contract call.* -
+
{'img'}
-
+
```cpp void UMyClass::BurnToken(TArray> Txn, FString ContractAddress, int32 TokenId, int32 Amount) { @@ -172,11 +170,11 @@ Enable your users to send Collectibles to others. When working with Blueprints, it is easier to call a contract via server-side encoding using a Delayed Encode transaction. -
+
{'img'}
-
+
```cpp FDelayedTransaction DelayedEncodeTxn; DelayedEncodeTxn.to = ERC20Address; @@ -201,11 +199,11 @@ Once the fee options are received, select a fee option and use the `SendTransact the transaction with the selected fee. -
+
{'img'}
-
+
```cpp // Define the callback for handling the fee options response const TFunction)> OnFeeResponse = [Transactions, OnSuccess, OnFailure](const TArray& Response) diff --git a/docs/public/img/unreal/feature_inventory.png b/docs/public/img/unreal/feature_inventory.png new file mode 100644 index 00000000000..2cfa05f2e04 --- /dev/null +++ b/docs/public/img/unreal/feature_inventory.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:3625192a9c3bca5cae39288ea624aafb83b322beb4f40147b78d19ba75b7a12d +size 132263 diff --git a/docs/public/img/unreal/feature_inventory_demo.gif b/docs/public/img/unreal/feature_inventory_demo.gif new file mode 100644 index 00000000000..c28f75e0ca8 --- /dev/null +++ b/docs/public/img/unreal/feature_inventory_demo.gif @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:38764f486f3f6c7ac4bbdfde2146e2334a27c3aba28c4af5ce389f515f3aaeb8 +size 523265 diff --git a/docs/public/img/unreal/feature_sale.png b/docs/public/img/unreal/feature_sale.png new file mode 100644 index 00000000000..b831946952a --- /dev/null +++ b/docs/public/img/unreal/feature_sale.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:9f6f67e835997d86d42737a654077c3773fba38f3b3cb782930fdef90d1d116e +size 215468 diff --git a/docs/public/img/unreal/feature_sale_demo.gif b/docs/public/img/unreal/feature_sale_demo.gif new file mode 100644 index 00000000000..3eabb253f4c --- /dev/null +++ b/docs/public/img/unreal/feature_sale_demo.gif @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:7c965247bc5134dd89decf7703ee75681cc6b6778eb39ef605b34b979e1aee40 +size 590678 diff --git a/docs/public/img/unreal/feature_wallet.png b/docs/public/img/unreal/feature_wallet.png new file mode 100644 index 00000000000..619fae424ff --- /dev/null +++ b/docs/public/img/unreal/feature_wallet.png @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:91d6197767b668a0d933bcdc284298bd0e33c22a9b83473a2bf6e3635fd82585 +size 109612 diff --git a/docs/public/img/unreal/feature_wallet_demo.gif b/docs/public/img/unreal/feature_wallet_demo.gif new file mode 100644 index 00000000000..9c26c49327e --- /dev/null +++ b/docs/public/img/unreal/feature_wallet_demo.gif @@ -0,0 +1,3 @@ +version https://git-lfs.github.com/spec/v1 +oid sha256:b358e6f643d423c861fac7cb937631a2d1fff90faa73534610d20db082f0b1de +size 279227 diff --git a/nav.ts b/nav.ts index b8ad0b990fd..46ddeead075 100644 --- a/nav.ts +++ b/nav.ts @@ -692,7 +692,8 @@ export const sidebar = { { text: 'Installation', link: '/sdk/unreal/installation' }, { text: 'Configuration', link: '/sdk/unreal/configuration' }, { text: 'Blueprint Subsystems', link: '/sdk/unreal/subsystems' }, - { text: 'Bootstrap your UI', link: '/sdk/unreal/user_interfaces' }, + { text: "Bootstrap your Game", link: "/sdk/unreal/bootstrap_game" }, + { text: 'Sign-In UI', link: '/sdk/unreal/user_interfaces' }, { text: 'Authenticate Users', link: '/sdk/unreal/authentication' }, { text: 'Write to Blockchain', link: '/sdk/unreal/write-to-blockchain' }, { text: 'Read from Blockchain', link: '/sdk/unreal/read-from-blockchain' },