@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,508 @@
1
+ # EOSIO — `oasis.eOSIO`
2
+
3
+ Source controller: [`EOSIOController.cs`](https://github.com/NextGenSoftwareUK/OASIS2/blob/main/ONODE/NextGenSoftware.OASIS.API.ONODE.WebAPI/Controllers/EOSIOController.cs)
4
+ Route prefix: `api/eosio`
5
+ 9 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
+ ### `getAvatarForEOSIOAccountName`
22
+
23
+ Get's the Avatar for the the given EOS account name.
24
+
25
+ **GET** `api/eosio/get-avatar-for-eosio-account-name`
26
+
27
+ **Request**
28
+
29
+ Query parameters:
30
+
31
+ | Field | Type |
32
+ | --- | --- |
33
+ | `eosioAccountName` | `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.eOSIO.getAvatarForEOSIOAccountName({
80
+ eosioAccountName: '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
+ ### `getAvatarIdForEOSIOAccountName`
99
+
100
+ Get's the Avatar id for the the given EOS account name.
101
+
102
+ **GET** `api/eosio/get-avatar-id-for-eosio-account-name`
103
+
104
+ **Request**
105
+
106
+ Query parameters:
107
+
108
+ | Field | Type |
109
+ | --- | --- |
110
+ | `eosioAccountName` | `string` |
111
+
112
+ **Response**
113
+
114
+ Standard `OASISResult` envelope (see top of this page) with:
115
+
116
+ `result` type: `string`
117
+
118
+ **Example**
119
+
120
+ ```js
121
+ const { isError, message, result } = await oasis.eOSIO.getAvatarIdForEOSIOAccountName({
122
+ eosioAccountName: '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": "example string"
135
+ }
136
+ ```
137
+
138
+ ---
139
+
140
+ ### `getBalanceForAvatar`
141
+
142
+ Get's the EOSIO balance for the given avatar.
143
+
144
+ **GET** `api/eosio/get-balance-for-avatar`
145
+
146
+ **Request**
147
+
148
+ Query parameters:
149
+
150
+ | Field | Type |
151
+ | --- | --- |
152
+ | `avatarId` | `Guid` |
153
+ | `code` | `string` |
154
+ | `symbol` | `string` |
155
+
156
+ **Response**
157
+
158
+ Standard `OASISResult` envelope (see top of this page) with:
159
+
160
+ `result` type: `string`
161
+
162
+ **Example**
163
+
164
+ ```js
165
+ const { isError, message, result } = await oasis.eOSIO.getBalanceForAvatar({
166
+ avatarId: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
167
+ code: 'example string',
168
+ symbol: 'example string'
169
+ });
170
+ if (isError) throw new Error(message);
171
+ console.log(result);
172
+ ```
173
+
174
+ Example response:
175
+
176
+ ```json
177
+ {
178
+ "isError": false,
179
+ "message": "",
180
+ "result": "example string"
181
+ }
182
+ ```
183
+
184
+ ---
185
+
186
+ ### `getBalanceForEOSIOAccount`
187
+
188
+ Get's the EOSIO balance for the given EOSIO account.
189
+
190
+ **GET** `api/eosio/get-balance-for-eosio-account`
191
+
192
+ **Request**
193
+
194
+ Query parameters:
195
+
196
+ | Field | Type |
197
+ | --- | --- |
198
+ | `eosioAccountName` | `string` |
199
+ | `code` | `string` |
200
+ | `symbol` | `string` |
201
+
202
+ **Response**
203
+
204
+ Standard `OASISResult` envelope (see top of this page) with:
205
+
206
+ `result` type: `string`
207
+
208
+ **Example**
209
+
210
+ ```js
211
+ const { isError, message, result } = await oasis.eOSIO.getBalanceForEOSIOAccount({
212
+ eosioAccountName: 'example string',
213
+ code: 'example string',
214
+ symbol: 'example string'
215
+ });
216
+ if (isError) throw new Error(message);
217
+ console.log(result);
218
+ ```
219
+
220
+ Example response:
221
+
222
+ ```json
223
+ {
224
+ "isError": false,
225
+ "message": "",
226
+ "result": "example string"
227
+ }
228
+ ```
229
+
230
+ ---
231
+
232
+ ### `getEOSIOAccount`
233
+
234
+ Get's the EOSIO account.
235
+
236
+ **GET** `api/eosio/get-eosio-account`
237
+
238
+ **Request**
239
+
240
+ Query parameters:
241
+
242
+ | Field | Type |
243
+ | --- | --- |
244
+ | `eosioAccountName` | `string` |
245
+
246
+ **Response**
247
+
248
+ Standard `OASISResult` envelope (see top of this page) with:
249
+
250
+ `result` type: `GetAccountResponseDto`
251
+
252
+ | Field | Type |
253
+ | --- | --- |
254
+ | `AccountName` | `string` |
255
+ | `HeadBlockNum` | `int` |
256
+ | `HeadBlockTime` | `string` |
257
+ | `LastCodeUpdate` | `string` |
258
+ | `Created` | `string` |
259
+ | `RefundRequest` | `EosAccountRefundRequestDto` |
260
+ | `RamQuota` | `string` |
261
+ | `NetLimit` | `EosAccountNetLimitDto` |
262
+ | `CpuLimit` | `EosAccountCpuLimitDto` |
263
+ | `TotalResources` | `EosAccountTotalResourcesDto` |
264
+ | `CoreLiquidBalance` | `string` |
265
+ | `SelfDelegatedBandwidth` | `EosAccountSelfDelegatedBandwidthDto` |
266
+ | `NetWeight` | `string` |
267
+ | `CpuWeight` | `string` |
268
+ | `RamUsage` | `string` |
269
+ | `Privileged` | `bool` |
270
+ | `Permissions` | `List<EosAccountPermissionDto>` |
271
+ | `VoterInfo` | `EosAccountVoterInfoDto` |
272
+
273
+ **Example**
274
+
275
+ ```js
276
+ const { isError, message, result } = await oasis.eOSIO.getEOSIOAccount({
277
+ eosioAccountName: 'example string'
278
+ });
279
+ if (isError) throw new Error(message);
280
+ console.log(result);
281
+ ```
282
+
283
+ Example response:
284
+
285
+ ```json
286
+ {
287
+ "isError": false,
288
+ "message": "",
289
+ "result": { "AccountName": "example string", "HeadBlockNum": 1, "HeadBlockTime": "example string", "LastCodeUpdate": "example string", "Created": "example string", "RefundRequest": { "Owner": "example string", "RequestTime": "example string", "NetAmount": "example string", "CpuAmount": "example string" }, "RamQuota": "example string", "NetLimit": { "Max": "example string", "Available": "example string", "Used": "example string" }, "CpuLimit": { "Max": "example string", "Available": "example string", "Used": "example string" }, "TotalResources": { "Owner": "example string", "RamBytes": "example string", "NetWeight": "example string", "CpuWeight": "example string" }, "CoreLiquidBalance": "example string", "SelfDelegatedBandwidth": { "From": "example string", "To": "example string", "NetWeight": "example string", "CpuWeight": "example string" }, "NetWeight": "example string", "CpuWeight": "example string", "RamUsage": "example string", "Privileged": true, "Permissions": [{ "Parent": "example string", "PermName": "example string", "RequiredAuth": { "Waits": [{ "WaitSec": 1, "Weight": 1 }], "Keys": [{ "Key": "example string", "Weight": 1 }], "Threshold": 1, "Accounts": [{ "Weight": 1, "Permission": {} }] } }], "VoterInfo": { "Owner": "example string", "Proxy": "example string", "Producers": ["example string"], "Staked": "example string", "LastVoteWeight": "example string", "ProxiedVoteWeight": "example string", "IsProxy": 1, "Flags1": 1, "Reserved2": 1, "Reserved3": "example string" } }
290
+ }
291
+ ```
292
+
293
+ ---
294
+
295
+ ### `getEOSIOAccountForAvatar`
296
+
297
+ Get's the EOSIO account for the given Avatar.
298
+
299
+ **GET** `api/eosio/get-eosio-account-for-avatar`
300
+
301
+ **Request**
302
+
303
+ Query parameters:
304
+
305
+ | Field | Type |
306
+ | --- | --- |
307
+ | `avatarId` | `Guid` |
308
+
309
+ **Response**
310
+
311
+ Standard `OASISResult` envelope (see top of this page) with:
312
+
313
+ `result` type: `GetAccountResponseDto`
314
+
315
+ | Field | Type |
316
+ | --- | --- |
317
+ | `AccountName` | `string` |
318
+ | `HeadBlockNum` | `int` |
319
+ | `HeadBlockTime` | `string` |
320
+ | `LastCodeUpdate` | `string` |
321
+ | `Created` | `string` |
322
+ | `RefundRequest` | `EosAccountRefundRequestDto` |
323
+ | `RamQuota` | `string` |
324
+ | `NetLimit` | `EosAccountNetLimitDto` |
325
+ | `CpuLimit` | `EosAccountCpuLimitDto` |
326
+ | `TotalResources` | `EosAccountTotalResourcesDto` |
327
+ | `CoreLiquidBalance` | `string` |
328
+ | `SelfDelegatedBandwidth` | `EosAccountSelfDelegatedBandwidthDto` |
329
+ | `NetWeight` | `string` |
330
+ | `CpuWeight` | `string` |
331
+ | `RamUsage` | `string` |
332
+ | `Privileged` | `bool` |
333
+ | `Permissions` | `List<EosAccountPermissionDto>` |
334
+ | `VoterInfo` | `EosAccountVoterInfoDto` |
335
+
336
+ **Example**
337
+
338
+ ```js
339
+ const { isError, message, result } = await oasis.eOSIO.getEOSIOAccountForAvatar({
340
+ avatarId: '3fa85f64-5717-4562-b3fc-2c963f66afa6'
341
+ });
342
+ if (isError) throw new Error(message);
343
+ console.log(result);
344
+ ```
345
+
346
+ Example response:
347
+
348
+ ```json
349
+ {
350
+ "isError": false,
351
+ "message": "",
352
+ "result": { "AccountName": "example string", "HeadBlockNum": 1, "HeadBlockTime": "example string", "LastCodeUpdate": "example string", "Created": "example string", "RefundRequest": { "Owner": "example string", "RequestTime": "example string", "NetAmount": "example string", "CpuAmount": "example string" }, "RamQuota": "example string", "NetLimit": { "Max": "example string", "Available": "example string", "Used": "example string" }, "CpuLimit": { "Max": "example string", "Available": "example string", "Used": "example string" }, "TotalResources": { "Owner": "example string", "RamBytes": "example string", "NetWeight": "example string", "CpuWeight": "example string" }, "CoreLiquidBalance": "example string", "SelfDelegatedBandwidth": { "From": "example string", "To": "example string", "NetWeight": "example string", "CpuWeight": "example string" }, "NetWeight": "example string", "CpuWeight": "example string", "RamUsage": "example string", "Privileged": true, "Permissions": [{ "Parent": "example string", "PermName": "example string", "RequiredAuth": { "Waits": [{ "WaitSec": 1, "Weight": 1 }], "Keys": [{ "Key": "example string", "Weight": 1 }], "Threshold": 1, "Accounts": [{ "Weight": 1, "Permission": {} }] } }], "VoterInfo": { "Owner": "example string", "Proxy": "example string", "Producers": ["example string"], "Staked": "example string", "LastVoteWeight": "example string", "ProxiedVoteWeight": "example string", "IsProxy": 1, "Flags1": 1, "Reserved2": 1, "Reserved3": "example string" } }
353
+ }
354
+ ```
355
+
356
+ ---
357
+
358
+ ### `getEOSIOAccountNamesForAvatar`
359
+
360
+ Get's the EOSIO account name for the given Avatar.
361
+
362
+ **GET** `api/eosio/get-eosio-account-name-for-avatar`
363
+
364
+ **Request**
365
+
366
+ Query parameters:
367
+
368
+ | Field | Type |
369
+ | --- | --- |
370
+ | `avatarId` | `Guid` |
371
+
372
+ **Response**
373
+
374
+ Standard `OASISResult` envelope (see top of this page) with:
375
+
376
+ `result` type: `string` (array)
377
+
378
+ **Example**
379
+
380
+ ```js
381
+ const { isError, message, result } = await oasis.eOSIO.getEOSIOAccountNamesForAvatar({
382
+ avatarId: '3fa85f64-5717-4562-b3fc-2c963f66afa6'
383
+ });
384
+ if (isError) throw new Error(message);
385
+ console.log(result);
386
+ ```
387
+
388
+ Example response:
389
+
390
+ ```json
391
+ {
392
+ "isError": false,
393
+ "message": "",
394
+ "result": ["example string"]
395
+ }
396
+ ```
397
+
398
+ ---
399
+
400
+ ### `getTelosAccountPrivateKeyForAvatar`
401
+
402
+ Get's the EOSIO private key for the given Avatar.
403
+
404
+ **GET** `api/eosio/get-eosio-account-private-key-for-avatar`
405
+
406
+ **Request**
407
+
408
+ Query parameters:
409
+
410
+ | Field | Type |
411
+ | --- | --- |
412
+ | `avatarId` | `Guid` |
413
+
414
+ **Response**
415
+
416
+ Standard `OASISResult` envelope (see top of this page) with:
417
+
418
+ `result` type: `string`
419
+
420
+ **Example**
421
+
422
+ ```js
423
+ const { isError, message, result } = await oasis.eOSIO.getTelosAccountPrivateKeyForAvatar({
424
+ avatarId: '3fa85f64-5717-4562-b3fc-2c963f66afa6'
425
+ });
426
+ if (isError) throw new Error(message);
427
+ console.log(result);
428
+ ```
429
+
430
+ Example response:
431
+
432
+ ```json
433
+ {
434
+ "isError": false,
435
+ "message": "",
436
+ "result": "example string"
437
+ }
438
+ ```
439
+
440
+ ---
441
+
442
+ ### `linkEOSIOAccountToAvatar`
443
+
444
+ Link's a given eosioAccountName to the given avatar.
445
+
446
+ **POST** `api/eosio/{avatarId}/{eosioAccountName}`
447
+
448
+ Route parameters:
449
+
450
+ | Field | Type |
451
+ | --- | --- |
452
+ | `avatarId` | `Guid` |
453
+ | `eosioAccountName` | `string` |
454
+
455
+ **Request**
456
+
457
+ Body fields:
458
+
459
+ | Field | Type |
460
+ | --- | --- |
461
+ | `walletId` | `Guid` |
462
+ | `walletAddress` | `string` |
463
+
464
+ **Response**
465
+
466
+ Standard `OASISResult` envelope (see top of this page) with:
467
+
468
+ `result` type: `IProviderWallet`
469
+
470
+ | Field | Type |
471
+ | --- | --- |
472
+ | `AvatarId` | `Guid` |
473
+ | `WalletId` | `Guid` |
474
+ | `Name` | `string` |
475
+ | `Description` | `new string` |
476
+ | `PrivateKey` | `string` |
477
+ | `PublicKey` | `string` |
478
+ | `WalletAddress` | `string` |
479
+ | `WalletAddressSegwitP2SH` | `string` |
480
+ | `SecretRecoveryPhrase` | `string` |
481
+ | `Transactions` | `List<IWalletTransaction>` |
482
+ | `ProviderType` | `ProviderType` |
483
+ | `Balance` | `double` |
484
+ | `IsDefaultWallet` | `bool` |
485
+
486
+ **Example**
487
+
488
+ ```js
489
+ const { isError, message, result } = await oasis.eOSIO.linkEOSIOAccountToAvatar({
490
+ avatarId: '<avatarId>',
491
+ eosioAccountName: '<eosioAccountName>',
492
+ walletId: '3fa85f64-5717-4562-b3fc-2c963f66afa6',
493
+ walletAddress: 'example string'
494
+ });
495
+ if (isError) throw new Error(message);
496
+ console.log(result);
497
+ ```
498
+
499
+ Example response:
500
+
501
+ ```json
502
+ {
503
+ "isError": false,
504
+ "message": "",
505
+ "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 }
506
+ }
507
+ ```
508
+