@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,374 @@
1
+ # Holochain — `oasis.holochain`
2
+
3
+ Source controller: [`HolochainController.cs`](https://github.com/NextGenSoftwareUK/OASIS2/blob/main/ONODE/NextGenSoftware.OASIS.API.ONODE.WebAPI/Controllers/HolochainController.cs)
4
+ Route prefix: `api/holochain`
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
+ ### `getAvatarForHolochainAgentId`
22
+
23
+ Get's the Avatar for the the given Holochain agent id.
24
+
25
+ **GET** `api/holochain/get-avatar-for-holochain-agentid`
26
+
27
+ **Request**
28
+
29
+ Query parameters:
30
+
31
+ | Field | Type |
32
+ | --- | --- |
33
+ | `agentId` | `string` |
34
+
35
+ **Response**
36
+
37
+ Standard `OASISResult` envelope (see top of this page) with:
38
+
39
+ `result` type: `IAvatar`
40
+
41
+ | Field | Type |
42
+ | --- | --- |
43
+ | `ProviderWallets` | `Dictionary<ProviderType, List<IProviderWallet>>` |
44
+ | `ProviderPrivateKey` | `Dictionary<ProviderType, string>` |
45
+ | `ProviderPublicKey` | `Dictionary<ProviderType, List<string>>` |
46
+ | `ProviderUsername` | `Dictionary<ProviderType, string>` |
47
+ | `ProviderWalletAddress` | `Dictionary<ProviderType, List<string>>` |
48
+ | `AvatarId` | `Guid` |
49
+ | `Title` | `string` |
50
+ | `FirstName` | `string` |
51
+ | `LastName` | `string` |
52
+ | `FullName` | `string` |
53
+ | `FullNameWithTitle` | `string` |
54
+ | `Username` | `string` |
55
+ | `Email` | `string` |
56
+ | `Password` | `string` |
57
+ | `AvatarType` | `EnumValue<AvatarType>` |
58
+ | `AcceptTerms` | `bool` |
59
+ | `IsVerified` | `bool` |
60
+ | `JwtToken` | `string` |
61
+ | `PasswordReset` | `DateTime?` |
62
+ | `RefreshToken` | `string` |
63
+ | `RefreshTokens` | `List<RefreshToken>` |
64
+ | `ResetToken` | `string` |
65
+ | `ResetTokenExpires` | `DateTime?` |
66
+ | `VerificationToken` | `string` |
67
+ | `Verified` | `DateTime?` |
68
+ | `LastBeamedIn` | `DateTime?` |
69
+ | `LastBeamedOut` | `DateTime?` |
70
+ | `IsBeamedIn` | `bool` |
71
+ | `Image2D` | `string` |
72
+ | `Karma` | `int` |
73
+ | `Level` | `int` |
74
+ | `XP` | `int` |
75
+
76
+ **Example**
77
+
78
+ ```js
79
+ const { isError, message, result } = await oasis.holochain.getAvatarForHolochainAgentId({
80
+ agentId: 'example string'
81
+ });
82
+ if (isError) throw new Error(message);
83
+ console.log(result);
84
+ ```
85
+
86
+ Example response:
87
+
88
+ ```json
89
+ {
90
+ "isError": false,
91
+ "message": "",
92
+ "result": { "ProviderWallets": { "<ProviderType>": [{ "AvatarId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "WalletId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "Name": "example string", "Description": /* <new string> */, "PrivateKey": "example string", "PublicKey": "example string", "WalletAddress": "example string", "WalletAddressSegwitP2SH": "example string", "SecretRecoveryPhrase": "example string", "Transactions": [{ "TransactionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "FromWalletAddress": "example string", "ToWalletAddress": "example string", "Amount": 1.0, "Description": "example string", "CreatedDate": "2026-01-01T00:00:00Z", "TransactionType": { }, "TransactionCategory": { } }], "ProviderType": { }, "Balance": 1.0, "IsDefaultWallet": true }] }, "ProviderPrivateKey": { "<ProviderType>": "example string" }, "ProviderPublicKey": { "<ProviderType>": ["example string"] }, "ProviderUsername": { "<ProviderType>": "example string" }, "ProviderWalletAddress": { "<ProviderType>": ["example string"] }, "AvatarId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "Title": "example string", "FirstName": "example string", "LastName": "example string", "FullName": "example string", "FullNameWithTitle": "example string", "Username": "example string", "Email": "example string", "Password": "example string", "AvatarType": { "Score": 1.0 }, "AcceptTerms": true, "IsVerified": true, "JwtToken": "example string", "PasswordReset": "2026-01-01T00:00:00Z", "RefreshToken": "example string", "RefreshTokens": [{ "Id": 1, "Avatar": {}, "Token": "example string", "Expires": "2026-01-01T00:00:00Z", "Created": "2026-01-01T00:00:00Z", "CreatedByIp": "example string", "Revoked": "2026-01-01T00:00:00Z", "RevokedByIp": "example string", "ReplacedByToken": "example string" }], "ResetToken": "example string", "ResetTokenExpires": "2026-01-01T00:00:00Z", "VerificationToken": "example string", "Verified": "2026-01-01T00:00:00Z", "LastBeamedIn": "2026-01-01T00:00:00Z", "LastBeamedOut": "2026-01-01T00:00:00Z", "IsBeamedIn": true, "Image2D": "example string", "Karma": 1, "Level": 1, "XP": 1 }
93
+ }
94
+ ```
95
+
96
+ ---
97
+
98
+ ### `getAvatarIdForHolochainAgentId`
99
+
100
+ Get's the Avatar id for the the given EOS account name.
101
+
102
+ **GET** `api/holochain/get-avatar-id-for-holochain-agentid`
103
+
104
+ **Request**
105
+
106
+ Query parameters:
107
+
108
+ | Field | Type |
109
+ | --- | --- |
110
+ | `agentId` | `string` |
111
+
112
+ **Response**
113
+
114
+ Standard `OASISResult` envelope (see top of this page) with:
115
+
116
+ `result` type: `Guid`
117
+
118
+ **Example**
119
+
120
+ ```js
121
+ const { isError, message, result } = await oasis.holochain.getAvatarIdForHolochainAgentId({
122
+ agentId: 'example string'
123
+ });
124
+ if (isError) throw new Error(message);
125
+ console.log(result);
126
+ ```
127
+
128
+ Example response:
129
+
130
+ ```json
131
+ {
132
+ "isError": false,
133
+ "message": "",
134
+ "result": "3fa85f64-5717-4562-b3fc-2c963f66afa6"
135
+ }
136
+ ```
137
+
138
+ ---
139
+
140
+ ### `getHoloFuelBalanceForAgentId`
141
+
142
+ Get's the HoloFuel balance for the given agent.
143
+
144
+ **GET** `api/holochain/get-holo-fuel-balance-for-agentId`
145
+
146
+ **Request**
147
+
148
+ Query parameters:
149
+
150
+ | Field | Type |
151
+ | --- | --- |
152
+ | `agentID` | `string` |
153
+
154
+ **Response**
155
+
156
+ Standard `OASISResult` envelope (see top of this page) with:
157
+
158
+ `result` type: `string`
159
+
160
+ **Example**
161
+
162
+ ```js
163
+ const { isError, message, result } = await oasis.holochain.getHoloFuelBalanceForAgentId({
164
+ agentID: 'example string'
165
+ });
166
+ if (isError) throw new Error(message);
167
+ console.log(result);
168
+ ```
169
+
170
+ Example response:
171
+
172
+ ```json
173
+ {
174
+ "isError": false,
175
+ "message": "",
176
+ "result": "example string"
177
+ }
178
+ ```
179
+
180
+ ---
181
+
182
+ ### `getHoloFuelBalanceForAvatar`
183
+
184
+ Get's the EOSIO balance for the given avatar.
185
+
186
+ **GET** `api/holochain/get-holo-fuel-balance-for-avatar`
187
+
188
+ **Request**
189
+
190
+ Query parameters:
191
+
192
+ | Field | Type |
193
+ | --- | --- |
194
+ | `avatarId` | `Guid` |
195
+
196
+ **Response**
197
+
198
+ Standard `OASISResult` envelope (see top of this page) with:
199
+
200
+ `result` type: `string`
201
+
202
+ **Example**
203
+
204
+ ```js
205
+ const { isError, message, result } = await oasis.holochain.getHoloFuelBalanceForAvatar({
206
+ avatarId: '3fa85f64-5717-4562-b3fc-2c963f66afa6'
207
+ });
208
+ if (isError) throw new Error(message);
209
+ console.log(result);
210
+ ```
211
+
212
+ Example response:
213
+
214
+ ```json
215
+ {
216
+ "isError": false,
217
+ "message": "",
218
+ "result": "example string"
219
+ }
220
+ ```
221
+
222
+ ---
223
+
224
+ ### `getHolochainAgentIdsForAvatar`
225
+
226
+ Get's the Holochain Agent ID(s) for the given Avatar.
227
+
228
+ **GET** `api/holochain/get-holochain-agentids-for-avatar`
229
+
230
+ **Request**
231
+
232
+ Query parameters:
233
+
234
+ | Field | Type |
235
+ | --- | --- |
236
+ | `avatarId` | `Guid` |
237
+
238
+ **Response**
239
+
240
+ Standard `OASISResult` envelope (see top of this page) with:
241
+
242
+ `result` type: `string` (array)
243
+
244
+ **Example**
245
+
246
+ ```js
247
+ const { isError, message, result } = await oasis.holochain.getHolochainAgentIdsForAvatar({
248
+ avatarId: '3fa85f64-5717-4562-b3fc-2c963f66afa6'
249
+ });
250
+ if (isError) throw new Error(message);
251
+ console.log(result);
252
+ ```
253
+
254
+ Example response:
255
+
256
+ ```json
257
+ {
258
+ "isError": false,
259
+ "message": "",
260
+ "result": ["example string"]
261
+ }
262
+ ```
263
+
264
+ ---
265
+
266
+ ### `getHolochainAgentPrivateKeysForAvatar`
267
+
268
+ Get's the Holochain Agent's private key's for the given Avatar.
269
+
270
+ **GET** `api/holochain/get-holochain-agent-private-keys-for-avatar`
271
+
272
+ **Request**
273
+
274
+ Query parameters:
275
+
276
+ | Field | Type |
277
+ | --- | --- |
278
+ | `avatarId` | `Guid` |
279
+
280
+ **Response**
281
+
282
+ Standard `OASISResult` envelope (see top of this page) with:
283
+
284
+ `result` type: `string` (array)
285
+
286
+ **Example**
287
+
288
+ ```js
289
+ const { isError, message, result } = await oasis.holochain.getHolochainAgentPrivateKeysForAvatar({
290
+ avatarId: '3fa85f64-5717-4562-b3fc-2c963f66afa6'
291
+ });
292
+ if (isError) throw new Error(message);
293
+ console.log(result);
294
+ ```
295
+
296
+ Example response:
297
+
298
+ ```json
299
+ {
300
+ "isError": false,
301
+ "message": "",
302
+ "result": ["example string"]
303
+ }
304
+ ```
305
+
306
+ ---
307
+
308
+ ### `linkHolochainAgentIdToAvatar`
309
+
310
+ Link's a given holochain AgentId to the given avatar.
311
+
312
+ **POST** `api/holochain/{avatarId}/{holochainAgentId}`
313
+
314
+ Route parameters:
315
+
316
+ | Field | Type |
317
+ | --- | --- |
318
+ | `avatarId` | `Guid` |
319
+ | `holochainAgentId` | `string` |
320
+
321
+ **Request**
322
+
323
+ Body fields:
324
+
325
+ | Field | Type |
326
+ | --- | --- |
327
+ | `walletId` | `Guid` |
328
+ | `providerToLoadSaveAvatarTo` | `ProviderType (optional)` |
329
+
330
+ **Response**
331
+
332
+ Standard `OASISResult` envelope (see top of this page) with:
333
+
334
+ `result` type: `IProviderWallet`
335
+
336
+ | Field | Type |
337
+ | --- | --- |
338
+ | `AvatarId` | `Guid` |
339
+ | `WalletId` | `Guid` |
340
+ | `Name` | `string` |
341
+ | `Description` | `new string` |
342
+ | `PrivateKey` | `string` |
343
+ | `PublicKey` | `string` |
344
+ | `WalletAddress` | `string` |
345
+ | `WalletAddressSegwitP2SH` | `string` |
346
+ | `SecretRecoveryPhrase` | `string` |
347
+ | `Transactions` | `List<IWalletTransaction>` |
348
+ | `ProviderType` | `ProviderType` |
349
+ | `Balance` | `double` |
350
+ | `IsDefaultWallet` | `bool` |
351
+
352
+ **Example**
353
+
354
+ ```js
355
+ const { isError, message, result } = await oasis.holochain.linkHolochainAgentIdToAvatar({
356
+ avatarId: '<avatarId>',
357
+ holochainAgentId: '<holochainAgentId>',
358
+ walletId: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
359
+ providerToLoadSaveAvatarTo: '<providerToLoadSaveAvatarTo>'
360
+ });
361
+ if (isError) throw new Error(message);
362
+ console.log(result);
363
+ ```
364
+
365
+ Example response:
366
+
367
+ ```json
368
+ {
369
+ "isError": false,
370
+ "message": "",
371
+ "result": { "AvatarId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "WalletId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "Name": "example string", "Description": /* <new string> */, "PrivateKey": "example string", "PublicKey": "example string", "WalletAddress": "example string", "WalletAddressSegwitP2SH": "example string", "SecretRecoveryPhrase": "example string", "Transactions": [{ "TransactionId": "3fa85f64-5717-4562-b3fc-2c963f66afa6", "FromWalletAddress": "example string", "ToWalletAddress": "example string", "Amount": 1.0, "Description": "example string", "CreatedDate": "2026-01-01T00:00:00Z", "TransactionType": { }, "TransactionCategory": { } }], "ProviderType": { }, "Balance": 1.0, "IsDefaultWallet": true }
372
+ }
373
+ ```
374
+