You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: README.md
+18-18Lines changed: 18 additions & 18 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -105,12 +105,12 @@ This boilerplate project has been tested with the following Unity3D Releases:
105
105
-[Helpful Tools](#helpful-tools)
106
106
107
107
# 🏗 Moralis SDK
108
-
The.NET Moralis SDK provides easy to use method that make integrating your application with Moralis a snap. You will find that the.NET SDK works much the same as in JavaScript. For use in Unity3D we have added additional quick start objects that make integrating the Moralis SDK in a Unity3D application.
108
+
The.NET Moralis SDK provides easy to use methods that make integrating your application with Moralis a snap. You will find that the.NET SDK works much the same as in JavaScript. For use in Unity3D, we have added additional quick start objects for integrating the Moralis SDK in a Unity3D application.
109
109
For the examples that follow we provide examples of how to use the Moralis.NET SDK directly and perform the same functionality using the provided Moralis Unity3D quick start tools.
110
110
111
111
## `Client`
112
112
The Moralis SDK Client provides a way to easily interact with Moralis database and the Web3API. In .NET we use the *MoralisClient*
113
-
to interact with Moralis. For Unity3D we have provided a signleton wrapper named *MoralisInterface* that makes it easy to initialize the MoralisClient and then access it from anywhere in your Unity3D application. With either option you can initialize the Moralis Client with a single line of code
113
+
to interact with Moralis. For Unity3D we have provided a singleton wrapper named *MoralisInterface* that makes it easy to initialize the MoralisClient and then access it from anywhere in your Unity3D application. With either option you can initialize the Moralis Client with a single line of code
114
114
115
115
### SDK Client Initialization
116
116
**Required Using Statements**
@@ -123,18 +123,18 @@ using Moralis.Web3Api.Client;
123
123
```
124
124
MoralisClient moralis = new MoralisClient(new ServerConnectionData() { ApplicationID = "YOUR_APPLICATION_ID_HERE", ServerURI = "YOUR_SERER_URL_HERE"}, new Web3ApiClient());
125
125
```
126
-
_note: The **new Web3ApiClient()** parameter is optional and should be included only when you will be using functionality fromt the Moralis Web3AP REST service._
126
+
_note: The **new Web3ApiClient()** parameter is optional and should be included only when you will be using functionality from the Moralis Web3API REST service._
_note: For the **hostManifestData** parameter see [`HostManifestData`](#hostmanifestdata). This is requried for Unity3D applications._
133
+
_note: For the **hostManifestData** parameter see [`HostManifestData`](#hostmanifestdata). This is required for Unity3D applications._
134
134
_note: See [`User Object`](#userobject) for information about initializing the Moralis Client for a custom User Object._
135
135
136
136
## `Authentication`
137
-
Authentication is handled in a similar manner in both the SDK and the Unity3d. There is not direct manner to interact securely with a wallet in a .NET application so the Moralis SDK interacts with wallets in a lose cupled manner. For the Unity3D boilerplate application, and the other examples we provide, we use Wallet Connect to facilitate interaction with wallets.
137
+
Authentication is handled in a similar manner in both the SDK and the Unity3d. There is no direct manner to interact securely with a wallet in a .NET application so the Moralis SDK interacts with wallets in a loosely coupled manner. For the Unity3D boilerplate application, and the other examples we provide, we use Wallet Connect to facilitate interaction with wallets.
138
138
139
139
### Basic Moralis Authentication
140
140
Here are the statements used to authenticate with Moralis:
@@ -169,7 +169,7 @@ MoralisUser user = await MoralisInterface.LogInAsync(authData);
169
169
```
170
170
171
171
## `Queries`
172
-
Queries provide a way to retrieve informaition from your Moralis database.
172
+
Queries provide a way to retrieve information from your Moralis database.
173
173
#### Required Using Statement(s)
174
174
```
175
175
using Moralis;
@@ -214,7 +214,7 @@ The foloowing examples use the [query example from above](#queries)
_note: the **callbacks** parameter is optional. Please see [Callbacks Explained](#live-query-callbacks-explained)bellow.
217
+
_note: the **callbacks** parameter is optional. Please see [Callbacks Explained](#live-query-callbacks-explained)below.
218
218
### Live Query Example (Unity3D)
219
219
Since Unity3d is mainly used to create games, Unity3D apps generaly have life cycle events you do not usually need to worray about in a normal program.
220
220
We have created a special Live Query wrapper object that automatically handles your subscriptions for pause, unpause, close, etc.
@@ -228,11 +228,11 @@ _note: the **callbacks** parameter is optional. Please see [Callbacks Explained]
228
228
The _**MoralisLiveQueryController**_ is a singleton object and so is available anywhere within your application.
229
229
The first parameter ("Hero" above") is a key that you can use to retrieve a subscription (to check its status for example) or to remove a subscription.
230
230
231
-
By using the The _**MoralisLiveQueryController**_ object you do not need to worry about properly closing or disposing of your scubscriptions as this wrapper object handles all of that for you.
231
+
By using the The _**MoralisLiveQueryController**_ object you do not need to worry about properly closing or disposing of your subscriptions as this wrapper object handles all of that for you.
232
232
233
233
### Live Query Callbacks Explained.
234
-
Callbacks are used to handle the events emitted by a subscription. You can set the callbacks directly agains a subscription. However it is usually cleaner to
235
-
seperate these from the main code. To facilitate this we have included the _**MoralisLiveQueryCallbacks**_ object. This optional object can be passed to the subscription.
234
+
Callbacks are used to handle the events emitted by a subscription. You can set the callbacks directly against a subscription. However it is usually cleaner to
235
+
separate these from the main code. To facilitate this we have included the _**MoralisLiveQueryCallbacks**_ object. This optional object can be passed to the subscription.
236
236
#### Example MoralisLiveQueryCallbacks Use
237
237
```
238
238
MoralisLiveQueryCallbacks<Hero> callbacks = new MoralisLiveQueryCallbacks<Hero>();
Creating your own objects to support NPCs, characters, and game objects is a simple as creating a Plain Old C# Object (POCO). The only stipulation is that your custom object must be a child of Moralis Object and when you create an instance of the object it should be made via _**moralis.Create**_ method. This associates some extensions to your object that enable you to perform Moralis functions such as _Save_ directly on the object.
265
+
Creating your own objects to support NPCs, characters, and game objects is as simple as creating a Plain Old C# Object (POCO). The only stipulation is that your custom object must be a child of Moralis Object and when you create an instance of the object it should be made via _**moralis.Create**_ method. This associates some extensions to your object that enable you to perform Moralis functions such as _Save_ directly on the object.
266
266
#### Required Using Statement(s)
267
267
```
268
268
using Moralis;
@@ -312,7 +312,7 @@ await h.SaveAsync();
312
312
## `User Object`
313
313
The user object contains information about the currently logged in user. Upon successful login, the user is stored in local storage until logout. This allows a user to log in once and not login again until their session expires or they logout.
314
314
315
-
If you create a custom user object it must descend from MoralisUser.
315
+
If you create a custom user object it must inherit from MoralisUser.
316
316
317
317
Since C# is a typed language the compiler must know what types are used at compile time. Due to this, since the MoralisUser is integral to internal functions in the Moralis SDK, when you create a custom User Object you must initialize the Moralis client using your custom User Object. After this step you can use the Moralis Client as usual.
318
318
@@ -324,7 +324,7 @@ _note: for Unity3D you will need to make the above change in the **MoralisInterf
324
324
_**WARNING** do not make any replacements to any files under the MoralisDtoNet folder_
325
325
326
326
## `Authentication Data`
327
-
Authentucation data is a _**Dictionary<string, string>**_ object that contains the information required by Moralis to authenticate a user.
327
+
Authentication data is a _**Dictionary<string, string>**_ object that contains the information required by Moralis to authenticate a user.
328
328
As a minimum the authentication data dictionary must contain the following entries:
329
329
1.**id** The wallet address of the wallet used to sign the message.
330
330
2.**signature** The signature data returned by the Sign request sent to the wallet.
@@ -344,9 +344,9 @@ Description here
344
344
# 🏗 Ethereum Web3Api Methods
345
345
346
346
## `Web3Api Notes`
347
-
The complete Moralis Web3API schema including endpoints, operations and models, can be found by loggining into your Moralis Server and selecting **Web3 API***
347
+
The complete Moralis Web3API schema including endpoints, operations and models, can be found by logging in to your Moralis Server and selecting **Web3 API***
348
348
349
-
For use with either Moralis SDK or in Unity3d, the following using statements are requried:
349
+
For use with either Moralis SDK or in Unity3d, the following using statements are required:
350
350
```
351
351
using System.Collections.Generic;
352
352
using Moralis.Web3Api.Models;
@@ -612,7 +612,7 @@ IpfsFileRequest req = new IpfsFileRequest()
0 commit comments