@oasisomniverse/web4-api 2.0.0

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (116) hide show
  1. package/README.md +464 -0
  2. package/docs/README.md +52 -0
  3. package/docs/auth.md +89 -0
  4. package/docs/getting-started.md +129 -0
  5. package/docs/modules/Avatar.md +4160 -0
  6. package/docs/modules/Bridge.md +394 -0
  7. package/docs/modules/Chat.md +168 -0
  8. package/docs/modules/Clan.md +552 -0
  9. package/docs/modules/Competition.md +594 -0
  10. package/docs/modules/Data.md +796 -0
  11. package/docs/modules/EOSIO.md +508 -0
  12. package/docs/modules/Eggs.md +396 -0
  13. package/docs/modules/Files.md +312 -0
  14. package/docs/modules/Gifts.md +306 -0
  15. package/docs/modules/Health.md +90 -0
  16. package/docs/modules/Holochain.md +374 -0
  17. package/docs/modules/HyperDrive.md +3857 -0
  18. package/docs/modules/Karma.md +644 -0
  19. package/docs/modules/Keys.md +3303 -0
  20. package/docs/modules/Map.md +1026 -0
  21. package/docs/modules/Messaging.md +320 -0
  22. package/docs/modules/Nft.md +2216 -0
  23. package/docs/modules/OLand.md +425 -0
  24. package/docs/modules/ONET.md +442 -0
  25. package/docs/modules/ONODE.md +504 -0
  26. package/docs/modules/Provider.md +1396 -0
  27. package/docs/modules/Search.md +69 -0
  28. package/docs/modules/Seeds.md +167 -0
  29. package/docs/modules/Settings.md +533 -0
  30. package/docs/modules/Share.md +64 -0
  31. package/docs/modules/Social.md +190 -0
  32. package/docs/modules/Solana.md +150 -0
  33. package/docs/modules/Stats.md +359 -0
  34. package/docs/modules/Subscription.md +437 -0
  35. package/docs/modules/Video.md +150 -0
  36. package/docs/modules/Wallet.md +1993 -0
  37. package/index.d.ts +106 -0
  38. package/index.js +3 -0
  39. package/index.mjs +4 -0
  40. package/package.json +120 -0
  41. package/src/core/httpClient.js +110 -0
  42. package/src/core/routeHelper.js +50 -0
  43. package/src/core/tokenStore.js +52 -0
  44. package/src/core/types.d.ts +18 -0
  45. package/src/index.js +46 -0
  46. package/src/modules/Auth.d.ts +28 -0
  47. package/src/modules/Auth.js +98 -0
  48. package/src/modules/Avatar.d.ts +192 -0
  49. package/src/modules/Avatar.js +143 -0
  50. package/src/modules/Bridge.d.ts +24 -0
  51. package/src/modules/Bridge.js +35 -0
  52. package/src/modules/Cargo.js +35 -0
  53. package/src/modules/Chat.d.ts +15 -0
  54. package/src/modules/Chat.js +27 -0
  55. package/src/modules/Clan.d.ts +36 -0
  56. package/src/modules/Clan.js +41 -0
  57. package/src/modules/Competition.d.ts +33 -0
  58. package/src/modules/Competition.js +39 -0
  59. package/src/modules/Core.js +27 -0
  60. package/src/modules/Data.d.ts +36 -0
  61. package/src/modules/Data.js +41 -0
  62. package/src/modules/EOSIO.d.ts +33 -0
  63. package/src/modules/EOSIO.js +39 -0
  64. package/src/modules/Eggs.d.ts +24 -0
  65. package/src/modules/Eggs.js +33 -0
  66. package/src/modules/Files.d.ts +24 -0
  67. package/src/modules/Files.js +33 -0
  68. package/src/modules/Gifts.d.ts +24 -0
  69. package/src/modules/Gifts.js +33 -0
  70. package/src/modules/Health.d.ts +12 -0
  71. package/src/modules/Health.js +25 -0
  72. package/src/modules/Holochain.d.ts +27 -0
  73. package/src/modules/Holochain.js +35 -0
  74. package/src/modules/HyperDrive.d.ts +237 -0
  75. package/src/modules/HyperDrive.js +175 -0
  76. package/src/modules/Karma.d.ts +42 -0
  77. package/src/modules/Karma.js +45 -0
  78. package/src/modules/Keys.d.ts +183 -0
  79. package/src/modules/Keys.js +139 -0
  80. package/src/modules/Map.d.ts +75 -0
  81. package/src/modules/Map.js +65 -0
  82. package/src/modules/Messaging.d.ts +24 -0
  83. package/src/modules/Messaging.js +33 -0
  84. package/src/modules/Nft.d.ts +102 -0
  85. package/src/modules/Nft.js +85 -0
  86. package/src/modules/OAPP.js +31 -0
  87. package/src/modules/OLand.d.ts +27 -0
  88. package/src/modules/OLand.js +35 -0
  89. package/src/modules/ONET.d.ts +39 -0
  90. package/src/modules/ONET.js +43 -0
  91. package/src/modules/ONODE.d.ts +45 -0
  92. package/src/modules/ONODE.js +47 -0
  93. package/src/modules/Provider.d.ts +99 -0
  94. package/src/modules/Provider.js +83 -0
  95. package/src/modules/Search.d.ts +9 -0
  96. package/src/modules/Search.js +23 -0
  97. package/src/modules/Seeds.d.ts +15 -0
  98. package/src/modules/Seeds.js +27 -0
  99. package/src/modules/Settings.d.ts +48 -0
  100. package/src/modules/Settings.js +47 -0
  101. package/src/modules/Share.d.ts +9 -0
  102. package/src/modules/Share.js +23 -0
  103. package/src/modules/Social.d.ts +18 -0
  104. package/src/modules/Social.js +29 -0
  105. package/src/modules/Solana.d.ts +12 -0
  106. package/src/modules/Solana.js +25 -0
  107. package/src/modules/Stats.d.ts +30 -0
  108. package/src/modules/Stats.js +37 -0
  109. package/src/modules/Subscription.d.ts +36 -0
  110. package/src/modules/Subscription.js +41 -0
  111. package/src/modules/Telos.js +39 -0
  112. package/src/modules/Video.d.ts +15 -0
  113. package/src/modules/Video.js +27 -0
  114. package/src/modules/Wallet.d.ts +102 -0
  115. package/src/modules/Wallet.js +85 -0
  116. package/src/modules/index.js +79 -0
@@ -0,0 +1,425 @@
1
+ # OLand — `oasis.oLand`
2
+
3
+ Source controller: [`OLandController.cs`](https://github.com/NextGenSoftwareUK/OASIS2/blob/main/ONODE/NextGenSoftware.OASIS.API.ONODE.WebAPI/Controllers/OLandController.cs)
4
+ Route prefix: `api/oLand`
5
+ 7 operation(s).
6
+
7
+ Every method takes a single args object: any key matching a `{token}` in the route is substituted into the URL; everything else becomes the query string (GET/DELETE) or JSON body (POST/PUT). Every call resolves to the standard OASIS envelope:
8
+
9
+ ```ts
10
+ {
11
+ isError: boolean;
12
+ isWarning: boolean;
13
+ message: string;
14
+ errorCode?: string;
15
+ result: T; // see each endpoint's Response section below
16
+ }
17
+ ```
18
+
19
+ ## Operations
20
+
21
+ ### `deleteOlandAsync`
22
+
23
+ **POST** `api/oLand/delete-oland/{olandId}`
24
+
25
+ Route parameters:
26
+
27
+ | Field | Type |
28
+ | --- | --- |
29
+ | `olandId` | `Guid` |
30
+
31
+ **Request**
32
+
33
+ Body fields:
34
+
35
+ | Field | Type |
36
+ | --- | --- |
37
+ | `avatarId` | `Guid` |
38
+
39
+ **Response**
40
+
41
+ Standard `OASISResult` envelope (see top of this page) with:
42
+
43
+ `result` type: `IHolon`
44
+
45
+ | Field | Type |
46
+ | --- | --- |
47
+ | `CreatedOASISType` | `EnumValue<OASISType>` |
48
+ | `CreatedProviderType` | `EnumValue<ProviderType>` |
49
+ | `GlobalHolonData` | `GlobalHolonData` |
50
+ | `InstanceSavedOnProviderType` | `EnumValue<ProviderType>` |
51
+ | `IsChanged` | `bool` |
52
+ | `IsNewHolon` | `bool` |
53
+ | `IsSaving` | `bool` |
54
+ | `Original` | `IHolon` |
55
+ | `PreviousVersionId` | `Guid` |
56
+ | `PreviousVersionProviderUniqueStorageKey` | `Dictionary<ProviderType, string>` |
57
+ | `ProviderMetaData` | `Dictionary<ProviderType, Dictionary<string, string>>` |
58
+ | `ProviderUniqueStorageKey` | `Dictionary<ProviderType, string>` |
59
+ | `Nodes` | `IList<INode>` |
60
+ | `ParentOmniverseId` | `Guid` |
61
+ | `ParentOmniverse` | `IOmiverse` |
62
+ | `ParentMultiverseId` | `Guid` |
63
+ | `ParentMultiverse` | `IMultiverse` |
64
+ | `ParentUniverseId` | `Guid` |
65
+ | `ParentUniverse` | `IUniverse` |
66
+ | `ParentDimensionId` | `Guid` |
67
+ | `ParentDimension` | `IDimension` |
68
+ | `DimensionLevel` | `DimensionLevel` |
69
+ | `SubDimensionLevel` | `SubDimensionLevel` |
70
+ | `ParentGalaxyClusterId` | `Guid` |
71
+ | `ParentGalaxyCluster` | `IGalaxyCluster` |
72
+ | `ParentGalaxyId` | `Guid` |
73
+ | `ParentGalaxy` | `IGalaxy` |
74
+ | `ParentSolarSystemId` | `Guid` |
75
+ | `ParentSolarSystem` | `ISolarSystem` |
76
+ | `ParentGreatGrandSuperStarId` | `Guid` |
77
+ | `ParentGreatGrandSuperStar` | `IGreatGrandSuperStar` |
78
+ | `ParentGrandSuperStarId` | `Guid` |
79
+ | `ParentGrandSuperStar` | `IGrandSuperStar` |
80
+ | `ParentSuperStarId` | `Guid` |
81
+ | `ParentSuperStar` | `ISuperStar` |
82
+ | `ParentStarId` | `Guid` |
83
+ | `ParentStar` | `IStar` |
84
+ | `ParentPlanetId` | `Guid` |
85
+ | `ParentPlanet` | `IPlanet` |
86
+ | `ParentMoonId` | `Guid` |
87
+ | `ParentMoon` | `IMoon` |
88
+ | `ParentCelestialSpaceId` | `Guid` |
89
+ | `ParentCelestialSpace` | `ICelestialSpace` |
90
+ | `ParentCelestialBodyId` | `Guid` |
91
+ | `ParentCelestialBody` | `ICelestialBody` |
92
+ | `ParentZomeId` | `Guid` |
93
+ | `ParentZome` | `IZome` |
94
+
95
+ **Example**
96
+
97
+ ```js
98
+ const { isError, message, result } = await oasis.oLand.deleteOlandAsync({
99
+ olandId: '<olandId>',
100
+ avatarId: '3fa85f64-5717-4562-b3fc-2c963f66afa6'
101
+ });
102
+ if (isError) throw new Error(message);
103
+ console.log(result);
104
+ ```
105
+
106
+ Example response:
107
+
108
+ ```json
109
+ {
110
+ "isError": false,
111
+ "message": "",
112
+ "result": { "CreatedOASISType": { "Score": 1.0 }, "CreatedProviderType": { "Score": 1.0 }, "GlobalHolonData": { }, "InstanceSavedOnProviderType": {}, "IsChanged": true, "IsNewHolon": true, "IsSaving": true, "Original": {}, "PreviousVersionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "PreviousVersionProviderUniqueStorageKey": { "<ProviderType>": "example string" }, "ProviderMetaData": { "<ProviderType>": { "<string>": "example string" } }, "ProviderUniqueStorageKey": { "<ProviderType>": "example string" }, "Nodes": [{ "Id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "Parent": {}, "NodeName": "example string", "NodeType": { } }], "ParentOmniverseId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentOmniverse": { "GreatGrandSuperStar": { }, "Dimensions": { "EighthDimension": { }, "NinthDimension": { }, "TenthDimension": { }, "EleventhDimension": { }, "TwelfthDimension": { }, "CustomDimensions": [{ "DimensionLevel": { } }] }, "Multiverses": [{ "GrandSuperStar": { "Stars": [ /* <I> */ ] }, "Dimensions": { "FirstDimension": { "Universe": { "Dimensions": [], "GalaxyClusters": [{ "Galaxies": [{ "SuperStar": { "Stars": [{ "Luminosity": 1, "StarType": { }, "StarClassification": { }, "StarBinaryType": { } }] }, "SolarSystems": [{ "Star": {}, "Planets": [{ "Moons": [{ }] }], "Asteroids": [{ }], "Comets": [{ }], "Meteroids": [{ }] }], "Nebulas": [{ }], "Stars": [], "Planets": [], "Asteroids": [], "Comets": [], "Meteroids": [] }], "SolarSystems": [], "Stars": [], "Planets": [], "Asteroids": [], "Comets": [], "Meteroids": [], "IsSuperCluster": true }], "SolarSystems": [], "Nebulas": [], "Stars": [], "Planets": [], "Asteroids": [], "Comets": [], "Meteroids": [] } }, "SecondDimension": { "Universe": {} }, "ThirdDimension": { "UniversePrime": {}, "MagicVerse": {}, "ParallelUniverses": [] }, "FourthDimension": { "Universe": {} }, "FifthDimension": { "Universe": {} }, "SixthDimension": { "Universe": {} }, "SeventhDimension": { "Universe": {} }, "CustomDimensions": [] } }] }, "ParentMultiverseId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentMultiverse": {}, "ParentUniverseId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentUniverse": {}, "ParentDimensionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentDimension": {}, "DimensionLevel": {}, "SubDimensionLevel": { }, "ParentGalaxyClusterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentGalaxyCluster": {}, "ParentGalaxyId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentGalaxy": {}, "ParentSolarSystemId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentSolarSystem": {}, "ParentGreatGrandSuperStarId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentGreatGrandSuperStar": {}, "ParentGrandSuperStarId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentGrandSuperStar": {}, "ParentSuperStarId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentSuperStar": {}, "ParentStarId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentStar": {}, "ParentPlanetId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentPlanet": {}, "ParentMoonId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentMoon": {}, "ParentCelestialSpaceId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentCelestialSpace": { "NearestStar": {}, "CelestialBodies": /* <ReadOnlyCollection<ICelestialBody>> */, "CelestialSpaces": /* <ReadOnlyCollection<ICelestialSpace>> */, "Children": /* <new ReadOnlyCollection<IHolon>> */ }, "ParentCelestialBodyId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentCelestialBody": { "CelestialBodyCore": { "Holons": [], "Zomes": [{ "HoloNETClient": { "WebSocket": /* <WebSocket.WebSocket> */, "Logger": /* <ILogger> */, "HolochainVersion": { } }, "ZomeName": "example string", "Holons": [{ "GlobalHolonData": {}, "ProviderUniqueStorageKey": { "<ProviderType>": "example string" }, "ProviderMetaData": { "<ProviderType>": { "<string>": "example string" } }, "CustomKey": "example string", "IsNewHolon": true, "IsSaving": true, "PreviousVersionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "PreviousVersionProviderUniqueStorageKey": { "<ProviderType>": "example string" }, "CreatedProviderType": {}, "InstanceSavedOnProviderType": {}, "CreatedOASISType": {}, "Nodes": [], "ParentOmniverseId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentOmniverse": {}, "ParentMultiverseId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentMultiverse": {}, "ParentUniverseId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentUniverse": {}, "ParentDimensionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentDimension": {}, "DimensionLevel": {}, "SubDimensionLevel": {}, "ParentGalaxyClusterId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentGalaxyCluster": {}, "ParentGalaxyId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentGalaxy": {}, "ParentSolarSystemId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentSolarSystem": {}, "ParentGreatGrandSuperStarId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentGreatGrandSuperStar": {}, "ParentGrandSuperStarId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentGrandSuperStar": {}, "ParentSuperStarId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentSuperStar": {}, "ParentStarId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentStar": {}, "ParentPlanetId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentPlanet": {}, "ParentMoonId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentMoon": {}, "ParentCelestialSpaceId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentCelestialSpace": {}, "ParentCelestialBodyId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentCelestialBody": {}, "ParentZomeId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentZome": {} }] }] }, "CurrentOrbitAngleOfParentStar": 1, "Density": 1, "DistanceFromParentStarInMetres": 1, "GravitaionalPull": 1, "Id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "Mass": 1, "NumberActiveAvatars": 1, "NumberRegisteredAvatars": 1, "OrbitPeriod": 1, "OrbitPositionFromParentStar": 1, "ProviderUniqueStorageKey": { "<ProviderType>": "example string" }, "RotationPeriod": 1, "RotationSpeed": 1, "TiltAngle": 1, "Weight": 1 }, "ParentZomeId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "ParentZome": {} }
113
+ }
114
+ ```
115
+
116
+ ---
117
+
118
+ ### `getOlandPrice`
119
+
120
+ **GET** `api/oLand/get-oland-price`
121
+
122
+ **Request**
123
+
124
+ Query parameters:
125
+
126
+ | Field | Type |
127
+ | --- | --- |
128
+ | `count` | `int` |
129
+ | `couponCode` | `string` |
130
+
131
+ **Response**
132
+
133
+ Standard `OASISResult` envelope (see top of this page) with:
134
+
135
+ `result` type: `int`
136
+
137
+ **Example**
138
+
139
+ ```js
140
+ const { isError, message, result } = await oasis.oLand.getOlandPrice({
141
+ count: 1,
142
+ couponCode: 'example string'
143
+ });
144
+ if (isError) throw new Error(message);
145
+ console.log(result);
146
+ ```
147
+
148
+ Example response:
149
+
150
+ ```json
151
+ {
152
+ "isError": false,
153
+ "message": "",
154
+ "result": 1
155
+ }
156
+ ```
157
+
158
+ ---
159
+
160
+ ### `loadAllOlands`
161
+
162
+ **GET** `api/oLand/load-all-olands`
163
+
164
+ **Request**
165
+
166
+ No request body.
167
+
168
+ **Response**
169
+
170
+ Standard `OASISResult` envelope (see top of this page) with:
171
+
172
+ `result` type: `IOLand` (array)
173
+
174
+ | Field | Type |
175
+ | --- | --- |
176
+ | `Id` | `Guid` |
177
+ | `Price` | `decimal` |
178
+ | `Discount` | `decimal` |
179
+ | `OlandsCount` | `int` |
180
+ | `TopSize` | `decimal` |
181
+ | `RightSize` | `decimal` |
182
+ | `UnitOfMeasure` | `string` |
183
+ | `IsRemoved` | `bool` |
184
+ | `PreviousId` | `Guid` |
185
+
186
+ **Example**
187
+
188
+ ```js
189
+ const { isError, message, result } = await oasis.oLand.loadAllOlands({});
190
+ if (isError) throw new Error(message);
191
+ console.log(result);
192
+ ```
193
+
194
+ Example response:
195
+
196
+ ```json
197
+ {
198
+ "isError": false,
199
+ "message": "",
200
+ "result": [{ "Id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "Price": 1.0, "Discount": 1.0, "OlandsCount": 1, "TopSize": 1.0, "RightSize": 1.0, "UnitOfMeasure": "example string", "IsRemoved": true, "PreviousId": "3fa85f64-5717-4562-b3fc-2c963f66afa6" }]
201
+ }
202
+ ```
203
+
204
+ ---
205
+
206
+ ### `loadOlandAsync`
207
+
208
+ **GET** `api/oLand/load-oland/{olandId}`
209
+
210
+ Route parameters:
211
+
212
+ | Field | Type |
213
+ | --- | --- |
214
+ | `olandId` | `Guid` |
215
+
216
+ **Request**
217
+
218
+ No request body.
219
+
220
+ **Response**
221
+
222
+ Standard `OASISResult` envelope (see top of this page) with:
223
+
224
+ `result` type: `IOLand`
225
+
226
+ | Field | Type |
227
+ | --- | --- |
228
+ | `Id` | `Guid` |
229
+ | `Price` | `decimal` |
230
+ | `Discount` | `decimal` |
231
+ | `OlandsCount` | `int` |
232
+ | `TopSize` | `decimal` |
233
+ | `RightSize` | `decimal` |
234
+ | `UnitOfMeasure` | `string` |
235
+ | `IsRemoved` | `bool` |
236
+ | `PreviousId` | `Guid` |
237
+
238
+ **Example**
239
+
240
+ ```js
241
+ const { isError, message, result } = await oasis.oLand.loadOlandAsync({
242
+ olandId: '<olandId>'
243
+ });
244
+ if (isError) throw new Error(message);
245
+ console.log(result);
246
+ ```
247
+
248
+ Example response:
249
+
250
+ ```json
251
+ {
252
+ "isError": false,
253
+ "message": "",
254
+ "result": { "Id": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "Price": 1.0, "Discount": 1.0, "OlandsCount": 1, "TopSize": 1.0, "RightSize": 1.0, "UnitOfMeasure": "example string", "IsRemoved": true, "PreviousId": "3fa85f64-5717-4562-b3fc-2c963f66afa6" }
255
+ }
256
+ ```
257
+
258
+ ---
259
+
260
+ ### `purchaseOland`
261
+
262
+ **POST** `api/oLand/purchase-oland`
263
+
264
+ **Request**
265
+
266
+ Body type: `PurchaseOlandRequest`
267
+
268
+ | Field | Type |
269
+ | --- | --- |
270
+ | `OlandIds` | `List<Guid>` |
271
+ | `AvatarId` | `Guid` |
272
+ | `AvatarUsername` | `string` |
273
+ | `Tiles` | `string` |
274
+ | `WalletAddress` | `string` |
275
+ | `ProviderType` | `ProviderType` |
276
+
277
+ **Response**
278
+
279
+ Standard `OASISResult` envelope (see top of this page) with:
280
+
281
+ `result` type: `PurchaseOlandResponse`
282
+
283
+ | Field | Type |
284
+ | --- | --- |
285
+ | `TransactionHash` | `string` |
286
+ | `OlandIds` | `List<Guid>` |
287
+ | `OLandPurchaseId` | `Guid` |
288
+
289
+ **Example**
290
+
291
+ ```js
292
+ const { isError, message, result } = await oasis.oLand.purchaseOland({
293
+ olandIds: ["3fa85f64-5717-4562-b3fc-2c963f66afa6"],
294
+ avatarId: "3fa85f64-5717-4562-b3fc-2c963f66afa6",
295
+ avatarUsername: "example string",
296
+ tiles: "example string",
297
+ walletAddress: "example string",
298
+ providerType: { }
299
+ });
300
+ if (isError) throw new Error(message);
301
+ console.log(result);
302
+ ```
303
+
304
+ Example response:
305
+
306
+ ```json
307
+ {
308
+ "isError": false,
309
+ "message": "",
310
+ "result": { "TransactionHash": "example string", "OlandIds": ["3fa85f64-5717-4562-b3fc-2c963f66afa6"], "OLandPurchaseId": "3fa85f64-5717-4562-b3fc-2c963f66afa6" }
311
+ }
312
+ ```
313
+
314
+ ---
315
+
316
+ ### `saveOlandAsync`
317
+
318
+ **POST** `api/oLand/save-oland`
319
+
320
+ **Request**
321
+
322
+ Body type: `IOLand`
323
+
324
+ | Field | Type |
325
+ | --- | --- |
326
+ | `Id` | `Guid` |
327
+ | `Price` | `decimal` |
328
+ | `Discount` | `decimal` |
329
+ | `OlandsCount` | `int` |
330
+ | `TopSize` | `decimal` |
331
+ | `RightSize` | `decimal` |
332
+ | `UnitOfMeasure` | `string` |
333
+ | `IsRemoved` | `bool` |
334
+ | `PreviousId` | `Guid` |
335
+
336
+ **Response**
337
+
338
+ Standard `OASISResult` envelope (see top of this page) with:
339
+
340
+ `result` type: `string`
341
+
342
+ **Example**
343
+
344
+ ```js
345
+ const { isError, message, result } = await oasis.oLand.saveOlandAsync({
346
+ id: "3fa85f64-5717-4562-b3fc-2c963f66afa6",
347
+ price: 1.0,
348
+ discount: 1.0,
349
+ olandsCount: 1,
350
+ topSize: 1.0,
351
+ rightSize: 1.0,
352
+ unitOfMeasure: "example string",
353
+ isRemoved: true,
354
+ previousId: "3fa85f64-5717-4562-b3fc-2c963f66afa6"
355
+ });
356
+ if (isError) throw new Error(message);
357
+ console.log(result);
358
+ ```
359
+
360
+ Example response:
361
+
362
+ ```json
363
+ {
364
+ "isError": false,
365
+ "message": "",
366
+ "result": "example string"
367
+ }
368
+ ```
369
+
370
+ ---
371
+
372
+ ### `updateOlandAsync`
373
+
374
+ **POST** `api/oLand/update-oland`
375
+
376
+ **Request**
377
+
378
+ Body type: `IOLand`
379
+
380
+ | Field | Type |
381
+ | --- | --- |
382
+ | `Id` | `Guid` |
383
+ | `Price` | `decimal` |
384
+ | `Discount` | `decimal` |
385
+ | `OlandsCount` | `int` |
386
+ | `TopSize` | `decimal` |
387
+ | `RightSize` | `decimal` |
388
+ | `UnitOfMeasure` | `string` |
389
+ | `IsRemoved` | `bool` |
390
+ | `PreviousId` | `Guid` |
391
+
392
+ **Response**
393
+
394
+ Standard `OASISResult` envelope (see top of this page) with:
395
+
396
+ `result` type: `string`
397
+
398
+ **Example**
399
+
400
+ ```js
401
+ const { isError, message, result } = await oasis.oLand.updateOlandAsync({
402
+ id: "3fa85f64-5717-4562-b3fc-2c963f66afa6",
403
+ price: 1.0,
404
+ discount: 1.0,
405
+ olandsCount: 1,
406
+ topSize: 1.0,
407
+ rightSize: 1.0,
408
+ unitOfMeasure: "example string",
409
+ isRemoved: true,
410
+ previousId: "3fa85f64-5717-4562-b3fc-2c963f66afa6"
411
+ });
412
+ if (isError) throw new Error(message);
413
+ console.log(result);
414
+ ```
415
+
416
+ Example response:
417
+
418
+ ```json
419
+ {
420
+ "isError": false,
421
+ "message": "",
422
+ "result": "example string"
423
+ }
424
+ ```
425
+