@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.
- package/README.md +464 -0
- package/docs/README.md +52 -0
- package/docs/auth.md +89 -0
- package/docs/getting-started.md +129 -0
- package/docs/modules/Avatar.md +4160 -0
- package/docs/modules/Bridge.md +394 -0
- package/docs/modules/Chat.md +168 -0
- package/docs/modules/Clan.md +552 -0
- package/docs/modules/Competition.md +594 -0
- package/docs/modules/Data.md +796 -0
- package/docs/modules/EOSIO.md +508 -0
- package/docs/modules/Eggs.md +396 -0
- package/docs/modules/Files.md +312 -0
- package/docs/modules/Gifts.md +306 -0
- package/docs/modules/Health.md +90 -0
- package/docs/modules/Holochain.md +374 -0
- package/docs/modules/HyperDrive.md +3857 -0
- package/docs/modules/Karma.md +644 -0
- package/docs/modules/Keys.md +3303 -0
- package/docs/modules/Map.md +1026 -0
- package/docs/modules/Messaging.md +320 -0
- package/docs/modules/Nft.md +2216 -0
- package/docs/modules/OLand.md +425 -0
- package/docs/modules/ONET.md +442 -0
- package/docs/modules/ONODE.md +504 -0
- package/docs/modules/Provider.md +1396 -0
- package/docs/modules/Search.md +69 -0
- package/docs/modules/Seeds.md +167 -0
- package/docs/modules/Settings.md +533 -0
- package/docs/modules/Share.md +64 -0
- package/docs/modules/Social.md +190 -0
- package/docs/modules/Solana.md +150 -0
- package/docs/modules/Stats.md +359 -0
- package/docs/modules/Subscription.md +437 -0
- package/docs/modules/Video.md +150 -0
- package/docs/modules/Wallet.md +1993 -0
- package/index.d.ts +106 -0
- package/index.js +3 -0
- package/index.mjs +4 -0
- package/package.json +120 -0
- package/src/core/httpClient.js +110 -0
- package/src/core/routeHelper.js +50 -0
- package/src/core/tokenStore.js +52 -0
- package/src/core/types.d.ts +18 -0
- package/src/index.js +46 -0
- package/src/modules/Auth.d.ts +28 -0
- package/src/modules/Auth.js +98 -0
- package/src/modules/Avatar.d.ts +192 -0
- package/src/modules/Avatar.js +143 -0
- package/src/modules/Bridge.d.ts +24 -0
- package/src/modules/Bridge.js +35 -0
- package/src/modules/Cargo.js +35 -0
- package/src/modules/Chat.d.ts +15 -0
- package/src/modules/Chat.js +27 -0
- package/src/modules/Clan.d.ts +36 -0
- package/src/modules/Clan.js +41 -0
- package/src/modules/Competition.d.ts +33 -0
- package/src/modules/Competition.js +39 -0
- package/src/modules/Core.js +27 -0
- package/src/modules/Data.d.ts +36 -0
- package/src/modules/Data.js +41 -0
- package/src/modules/EOSIO.d.ts +33 -0
- package/src/modules/EOSIO.js +39 -0
- package/src/modules/Eggs.d.ts +24 -0
- package/src/modules/Eggs.js +33 -0
- package/src/modules/Files.d.ts +24 -0
- package/src/modules/Files.js +33 -0
- package/src/modules/Gifts.d.ts +24 -0
- package/src/modules/Gifts.js +33 -0
- package/src/modules/Health.d.ts +12 -0
- package/src/modules/Health.js +25 -0
- package/src/modules/Holochain.d.ts +27 -0
- package/src/modules/Holochain.js +35 -0
- package/src/modules/HyperDrive.d.ts +237 -0
- package/src/modules/HyperDrive.js +175 -0
- package/src/modules/Karma.d.ts +42 -0
- package/src/modules/Karma.js +45 -0
- package/src/modules/Keys.d.ts +183 -0
- package/src/modules/Keys.js +139 -0
- package/src/modules/Map.d.ts +75 -0
- package/src/modules/Map.js +65 -0
- package/src/modules/Messaging.d.ts +24 -0
- package/src/modules/Messaging.js +33 -0
- package/src/modules/Nft.d.ts +102 -0
- package/src/modules/Nft.js +85 -0
- package/src/modules/OAPP.js +31 -0
- package/src/modules/OLand.d.ts +27 -0
- package/src/modules/OLand.js +35 -0
- package/src/modules/ONET.d.ts +39 -0
- package/src/modules/ONET.js +43 -0
- package/src/modules/ONODE.d.ts +45 -0
- package/src/modules/ONODE.js +47 -0
- package/src/modules/Provider.d.ts +99 -0
- package/src/modules/Provider.js +83 -0
- package/src/modules/Search.d.ts +9 -0
- package/src/modules/Search.js +23 -0
- package/src/modules/Seeds.d.ts +15 -0
- package/src/modules/Seeds.js +27 -0
- package/src/modules/Settings.d.ts +48 -0
- package/src/modules/Settings.js +47 -0
- package/src/modules/Share.d.ts +9 -0
- package/src/modules/Share.js +23 -0
- package/src/modules/Social.d.ts +18 -0
- package/src/modules/Social.js +29 -0
- package/src/modules/Solana.d.ts +12 -0
- package/src/modules/Solana.js +25 -0
- package/src/modules/Stats.d.ts +30 -0
- package/src/modules/Stats.js +37 -0
- package/src/modules/Subscription.d.ts +36 -0
- package/src/modules/Subscription.js +41 -0
- package/src/modules/Telos.js +39 -0
- package/src/modules/Video.d.ts +15 -0
- package/src/modules/Video.js +27 -0
- package/src/modules/Wallet.d.ts +102 -0
- package/src/modules/Wallet.js +85 -0
- package/src/modules/index.js +79 -0
|
@@ -0,0 +1,1993 @@
|
|
|
1
|
+
# Wallet — `oasis.wallet`
|
|
2
|
+
|
|
3
|
+
Source controller: [`WalletController.cs`](https://github.com/NextGenSoftwareUK/OASIS2/blob/main/ONODE/NextGenSoftware.OASIS.API.ONODE.WebAPI/Controllers/WalletController.cs)
|
|
4
|
+
Route prefix: `api/wallet`
|
|
5
|
+
32 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
|
+
### `createWalletForAvatarByEmailAsync`
|
|
22
|
+
|
|
23
|
+
Create a new wallet for an avatar by email.
|
|
24
|
+
|
|
25
|
+
**POST** `api/wallet/avatar/email/{email}/create-wallet`
|
|
26
|
+
|
|
27
|
+
Route parameters:
|
|
28
|
+
|
|
29
|
+
| Field | Type |
|
|
30
|
+
| --- | --- |
|
|
31
|
+
| `email` | `string` |
|
|
32
|
+
|
|
33
|
+
**Request**
|
|
34
|
+
|
|
35
|
+
Body type: `CreateWalletRequest`
|
|
36
|
+
|
|
37
|
+
| Field | Type |
|
|
38
|
+
| --- | --- |
|
|
39
|
+
| `Name` | `string` |
|
|
40
|
+
| `Description` | `string` |
|
|
41
|
+
| `WalletProviderType` | `ProviderType` |
|
|
42
|
+
| `GenerateKeyPair` | `bool` |
|
|
43
|
+
| `IsDefaultWallet` | `bool` |
|
|
44
|
+
| `ShowSecretRecoveryPhase` | `bool` |
|
|
45
|
+
| `ShowPrivateKey` | `bool` |
|
|
46
|
+
|
|
47
|
+
**Response**
|
|
48
|
+
|
|
49
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
50
|
+
|
|
51
|
+
`result` type: `IProviderWallet`
|
|
52
|
+
|
|
53
|
+
| Field | Type |
|
|
54
|
+
| --- | --- |
|
|
55
|
+
| `AvatarId` | `Guid` |
|
|
56
|
+
| `WalletId` | `Guid` |
|
|
57
|
+
| `Name` | `string` |
|
|
58
|
+
| `Description` | `new string` |
|
|
59
|
+
| `PrivateKey` | `string` |
|
|
60
|
+
| `PublicKey` | `string` |
|
|
61
|
+
| `WalletAddress` | `string` |
|
|
62
|
+
| `WalletAddressSegwitP2SH` | `string` |
|
|
63
|
+
| `SecretRecoveryPhrase` | `string` |
|
|
64
|
+
| `Transactions` | `List<IWalletTransaction>` |
|
|
65
|
+
| `ProviderType` | `ProviderType` |
|
|
66
|
+
| `Balance` | `double` |
|
|
67
|
+
| `IsDefaultWallet` | `bool` |
|
|
68
|
+
|
|
69
|
+
**Example**
|
|
70
|
+
|
|
71
|
+
```js
|
|
72
|
+
const { isError, message, result } = await oasis.wallet.createWalletForAvatarByEmailAsync({
|
|
73
|
+
email: '<email>',
|
|
74
|
+
providerTypeToLoadSave: '<providerTypeToLoadSave>',
|
|
75
|
+
name: "example string",
|
|
76
|
+
description: "example string",
|
|
77
|
+
walletProviderType: { },
|
|
78
|
+
generateKeyPair: true,
|
|
79
|
+
isDefaultWallet: true,
|
|
80
|
+
showSecretRecoveryPhase: true,
|
|
81
|
+
showPrivateKey: true
|
|
82
|
+
});
|
|
83
|
+
if (isError) throw new Error(message);
|
|
84
|
+
console.log(result);
|
|
85
|
+
```
|
|
86
|
+
|
|
87
|
+
Example response:
|
|
88
|
+
|
|
89
|
+
```json
|
|
90
|
+
{
|
|
91
|
+
"isError": false,
|
|
92
|
+
"message": "",
|
|
93
|
+
"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 }
|
|
94
|
+
}
|
|
95
|
+
```
|
|
96
|
+
|
|
97
|
+
---
|
|
98
|
+
|
|
99
|
+
### `createWalletForAvatarByIdAsync`
|
|
100
|
+
|
|
101
|
+
Create a new wallet for an avatar by ID.
|
|
102
|
+
|
|
103
|
+
**POST** `api/wallet/avatar/{avatarId}/create-wallet`
|
|
104
|
+
|
|
105
|
+
Route parameters:
|
|
106
|
+
|
|
107
|
+
| Field | Type |
|
|
108
|
+
| --- | --- |
|
|
109
|
+
| `avatarId` | `Guid` |
|
|
110
|
+
|
|
111
|
+
**Request**
|
|
112
|
+
|
|
113
|
+
Body type: `CreateWalletRequest`
|
|
114
|
+
|
|
115
|
+
| Field | Type |
|
|
116
|
+
| --- | --- |
|
|
117
|
+
| `Name` | `string` |
|
|
118
|
+
| `Description` | `string` |
|
|
119
|
+
| `WalletProviderType` | `ProviderType` |
|
|
120
|
+
| `GenerateKeyPair` | `bool` |
|
|
121
|
+
| `IsDefaultWallet` | `bool` |
|
|
122
|
+
| `ShowSecretRecoveryPhase` | `bool` |
|
|
123
|
+
| `ShowPrivateKey` | `bool` |
|
|
124
|
+
|
|
125
|
+
**Response**
|
|
126
|
+
|
|
127
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
128
|
+
|
|
129
|
+
`result` type: `IProviderWallet`
|
|
130
|
+
|
|
131
|
+
| Field | Type |
|
|
132
|
+
| --- | --- |
|
|
133
|
+
| `AvatarId` | `Guid` |
|
|
134
|
+
| `WalletId` | `Guid` |
|
|
135
|
+
| `Name` | `string` |
|
|
136
|
+
| `Description` | `new string` |
|
|
137
|
+
| `PrivateKey` | `string` |
|
|
138
|
+
| `PublicKey` | `string` |
|
|
139
|
+
| `WalletAddress` | `string` |
|
|
140
|
+
| `WalletAddressSegwitP2SH` | `string` |
|
|
141
|
+
| `SecretRecoveryPhrase` | `string` |
|
|
142
|
+
| `Transactions` | `List<IWalletTransaction>` |
|
|
143
|
+
| `ProviderType` | `ProviderType` |
|
|
144
|
+
| `Balance` | `double` |
|
|
145
|
+
| `IsDefaultWallet` | `bool` |
|
|
146
|
+
|
|
147
|
+
**Example**
|
|
148
|
+
|
|
149
|
+
```js
|
|
150
|
+
const { isError, message, result } = await oasis.wallet.createWalletForAvatarByIdAsync({
|
|
151
|
+
avatarId: '<avatarId>',
|
|
152
|
+
providerTypeToLoadSave: '<providerTypeToLoadSave>',
|
|
153
|
+
name: "example string",
|
|
154
|
+
description: "example string",
|
|
155
|
+
walletProviderType: { },
|
|
156
|
+
generateKeyPair: true,
|
|
157
|
+
isDefaultWallet: true,
|
|
158
|
+
showSecretRecoveryPhase: true,
|
|
159
|
+
showPrivateKey: true
|
|
160
|
+
});
|
|
161
|
+
if (isError) throw new Error(message);
|
|
162
|
+
console.log(result);
|
|
163
|
+
```
|
|
164
|
+
|
|
165
|
+
Example response:
|
|
166
|
+
|
|
167
|
+
```json
|
|
168
|
+
{
|
|
169
|
+
"isError": false,
|
|
170
|
+
"message": "",
|
|
171
|
+
"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 }
|
|
172
|
+
}
|
|
173
|
+
```
|
|
174
|
+
|
|
175
|
+
---
|
|
176
|
+
|
|
177
|
+
### `createWalletForAvatarByUsernameAsync`
|
|
178
|
+
|
|
179
|
+
Create a new wallet for an avatar by username.
|
|
180
|
+
|
|
181
|
+
**POST** `api/wallet/avatar/username/{username}/create-wallet`
|
|
182
|
+
|
|
183
|
+
Route parameters:
|
|
184
|
+
|
|
185
|
+
| Field | Type |
|
|
186
|
+
| --- | --- |
|
|
187
|
+
| `username` | `string` |
|
|
188
|
+
|
|
189
|
+
**Request**
|
|
190
|
+
|
|
191
|
+
Body type: `CreateWalletRequest`
|
|
192
|
+
|
|
193
|
+
| Field | Type |
|
|
194
|
+
| --- | --- |
|
|
195
|
+
| `Name` | `string` |
|
|
196
|
+
| `Description` | `string` |
|
|
197
|
+
| `WalletProviderType` | `ProviderType` |
|
|
198
|
+
| `GenerateKeyPair` | `bool` |
|
|
199
|
+
| `IsDefaultWallet` | `bool` |
|
|
200
|
+
| `ShowSecretRecoveryPhase` | `bool` |
|
|
201
|
+
| `ShowPrivateKey` | `bool` |
|
|
202
|
+
|
|
203
|
+
**Response**
|
|
204
|
+
|
|
205
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
206
|
+
|
|
207
|
+
`result` type: `IProviderWallet`
|
|
208
|
+
|
|
209
|
+
| Field | Type |
|
|
210
|
+
| --- | --- |
|
|
211
|
+
| `AvatarId` | `Guid` |
|
|
212
|
+
| `WalletId` | `Guid` |
|
|
213
|
+
| `Name` | `string` |
|
|
214
|
+
| `Description` | `new string` |
|
|
215
|
+
| `PrivateKey` | `string` |
|
|
216
|
+
| `PublicKey` | `string` |
|
|
217
|
+
| `WalletAddress` | `string` |
|
|
218
|
+
| `WalletAddressSegwitP2SH` | `string` |
|
|
219
|
+
| `SecretRecoveryPhrase` | `string` |
|
|
220
|
+
| `Transactions` | `List<IWalletTransaction>` |
|
|
221
|
+
| `ProviderType` | `ProviderType` |
|
|
222
|
+
| `Balance` | `double` |
|
|
223
|
+
| `IsDefaultWallet` | `bool` |
|
|
224
|
+
|
|
225
|
+
**Example**
|
|
226
|
+
|
|
227
|
+
```js
|
|
228
|
+
const { isError, message, result } = await oasis.wallet.createWalletForAvatarByUsernameAsync({
|
|
229
|
+
username: '<username>',
|
|
230
|
+
providerTypeToLoadSave: '<providerTypeToLoadSave>',
|
|
231
|
+
name: "example string",
|
|
232
|
+
description: "example string",
|
|
233
|
+
walletProviderType: { },
|
|
234
|
+
generateKeyPair: true,
|
|
235
|
+
isDefaultWallet: true,
|
|
236
|
+
showSecretRecoveryPhase: true,
|
|
237
|
+
showPrivateKey: true
|
|
238
|
+
});
|
|
239
|
+
if (isError) throw new Error(message);
|
|
240
|
+
console.log(result);
|
|
241
|
+
```
|
|
242
|
+
|
|
243
|
+
Example response:
|
|
244
|
+
|
|
245
|
+
```json
|
|
246
|
+
{
|
|
247
|
+
"isError": false,
|
|
248
|
+
"message": "",
|
|
249
|
+
"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 }
|
|
250
|
+
}
|
|
251
|
+
```
|
|
252
|
+
|
|
253
|
+
---
|
|
254
|
+
|
|
255
|
+
### `getAvatarDefaultWalletByEmailAsync`
|
|
256
|
+
|
|
257
|
+
Get the default wallet for an avatar by email.
|
|
258
|
+
|
|
259
|
+
**GET** `api/wallet/avatar/email/{email}/default-wallet`
|
|
260
|
+
|
|
261
|
+
Route parameters:
|
|
262
|
+
|
|
263
|
+
| Field | Type |
|
|
264
|
+
| --- | --- |
|
|
265
|
+
| `email` | `string` |
|
|
266
|
+
|
|
267
|
+
**Request**
|
|
268
|
+
|
|
269
|
+
Query parameters:
|
|
270
|
+
|
|
271
|
+
| Field | Type |
|
|
272
|
+
| --- | --- |
|
|
273
|
+
| `providerType` | `ProviderType` |
|
|
274
|
+
|
|
275
|
+
**Response**
|
|
276
|
+
|
|
277
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
278
|
+
|
|
279
|
+
`result` type: `IProviderWallet`
|
|
280
|
+
|
|
281
|
+
| Field | Type |
|
|
282
|
+
| --- | --- |
|
|
283
|
+
| `AvatarId` | `Guid` |
|
|
284
|
+
| `WalletId` | `Guid` |
|
|
285
|
+
| `Name` | `string` |
|
|
286
|
+
| `Description` | `new string` |
|
|
287
|
+
| `PrivateKey` | `string` |
|
|
288
|
+
| `PublicKey` | `string` |
|
|
289
|
+
| `WalletAddress` | `string` |
|
|
290
|
+
| `WalletAddressSegwitP2SH` | `string` |
|
|
291
|
+
| `SecretRecoveryPhrase` | `string` |
|
|
292
|
+
| `Transactions` | `List<IWalletTransaction>` |
|
|
293
|
+
| `ProviderType` | `ProviderType` |
|
|
294
|
+
| `Balance` | `double` |
|
|
295
|
+
| `IsDefaultWallet` | `bool` |
|
|
296
|
+
|
|
297
|
+
**Example**
|
|
298
|
+
|
|
299
|
+
```js
|
|
300
|
+
const { isError, message, result } = await oasis.wallet.getAvatarDefaultWalletByEmailAsync({
|
|
301
|
+
email: '<email>',
|
|
302
|
+
providerType: '<providerType>'
|
|
303
|
+
});
|
|
304
|
+
if (isError) throw new Error(message);
|
|
305
|
+
console.log(result);
|
|
306
|
+
```
|
|
307
|
+
|
|
308
|
+
Example response:
|
|
309
|
+
|
|
310
|
+
```json
|
|
311
|
+
{
|
|
312
|
+
"isError": false,
|
|
313
|
+
"message": "",
|
|
314
|
+
"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 }
|
|
315
|
+
}
|
|
316
|
+
```
|
|
317
|
+
|
|
318
|
+
---
|
|
319
|
+
|
|
320
|
+
### `getAvatarDefaultWalletByIdAsync`
|
|
321
|
+
|
|
322
|
+
Get the default wallet for an avatar by ID.
|
|
323
|
+
|
|
324
|
+
**GET** `api/wallet/avatar/{id}/default-wallet`
|
|
325
|
+
|
|
326
|
+
Route parameters:
|
|
327
|
+
|
|
328
|
+
| Field | Type |
|
|
329
|
+
| --- | --- |
|
|
330
|
+
| `id` | `Guid` |
|
|
331
|
+
|
|
332
|
+
**Request**
|
|
333
|
+
|
|
334
|
+
Query parameters:
|
|
335
|
+
|
|
336
|
+
| Field | Type |
|
|
337
|
+
| --- | --- |
|
|
338
|
+
| `providerType` | `ProviderType` |
|
|
339
|
+
|
|
340
|
+
**Response**
|
|
341
|
+
|
|
342
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
343
|
+
|
|
344
|
+
`result` type: `IProviderWallet`
|
|
345
|
+
|
|
346
|
+
| Field | Type |
|
|
347
|
+
| --- | --- |
|
|
348
|
+
| `AvatarId` | `Guid` |
|
|
349
|
+
| `WalletId` | `Guid` |
|
|
350
|
+
| `Name` | `string` |
|
|
351
|
+
| `Description` | `new string` |
|
|
352
|
+
| `PrivateKey` | `string` |
|
|
353
|
+
| `PublicKey` | `string` |
|
|
354
|
+
| `WalletAddress` | `string` |
|
|
355
|
+
| `WalletAddressSegwitP2SH` | `string` |
|
|
356
|
+
| `SecretRecoveryPhrase` | `string` |
|
|
357
|
+
| `Transactions` | `List<IWalletTransaction>` |
|
|
358
|
+
| `ProviderType` | `ProviderType` |
|
|
359
|
+
| `Balance` | `double` |
|
|
360
|
+
| `IsDefaultWallet` | `bool` |
|
|
361
|
+
|
|
362
|
+
**Example**
|
|
363
|
+
|
|
364
|
+
```js
|
|
365
|
+
const { isError, message, result } = await oasis.wallet.getAvatarDefaultWalletByIdAsync({
|
|
366
|
+
id: '<id>',
|
|
367
|
+
providerType: '<providerType>'
|
|
368
|
+
});
|
|
369
|
+
if (isError) throw new Error(message);
|
|
370
|
+
console.log(result);
|
|
371
|
+
```
|
|
372
|
+
|
|
373
|
+
Example response:
|
|
374
|
+
|
|
375
|
+
```json
|
|
376
|
+
{
|
|
377
|
+
"isError": false,
|
|
378
|
+
"message": "",
|
|
379
|
+
"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 }
|
|
380
|
+
}
|
|
381
|
+
```
|
|
382
|
+
|
|
383
|
+
---
|
|
384
|
+
|
|
385
|
+
### `getAvatarDefaultWalletByUsernameAsync`
|
|
386
|
+
|
|
387
|
+
Get the default wallet for an avatar by username.
|
|
388
|
+
|
|
389
|
+
**GET** `api/wallet/avatar/username/{username}/default-wallet/{showOnlyDefault}/{decryptPrivateKeys}`
|
|
390
|
+
|
|
391
|
+
Route parameters:
|
|
392
|
+
|
|
393
|
+
| Field | Type |
|
|
394
|
+
| --- | --- |
|
|
395
|
+
| `username` | `string` |
|
|
396
|
+
| `showOnlyDefault` | `bool` |
|
|
397
|
+
| `decryptPrivateKeys` | `bool` |
|
|
398
|
+
|
|
399
|
+
**Request**
|
|
400
|
+
|
|
401
|
+
Query parameters:
|
|
402
|
+
|
|
403
|
+
| Field | Type |
|
|
404
|
+
| --- | --- |
|
|
405
|
+
| `providerType` | `ProviderType (optional)` |
|
|
406
|
+
|
|
407
|
+
**Response**
|
|
408
|
+
|
|
409
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
410
|
+
|
|
411
|
+
`result` type: `IProviderWallet`
|
|
412
|
+
|
|
413
|
+
| Field | Type |
|
|
414
|
+
| --- | --- |
|
|
415
|
+
| `AvatarId` | `Guid` |
|
|
416
|
+
| `WalletId` | `Guid` |
|
|
417
|
+
| `Name` | `string` |
|
|
418
|
+
| `Description` | `new string` |
|
|
419
|
+
| `PrivateKey` | `string` |
|
|
420
|
+
| `PublicKey` | `string` |
|
|
421
|
+
| `WalletAddress` | `string` |
|
|
422
|
+
| `WalletAddressSegwitP2SH` | `string` |
|
|
423
|
+
| `SecretRecoveryPhrase` | `string` |
|
|
424
|
+
| `Transactions` | `List<IWalletTransaction>` |
|
|
425
|
+
| `ProviderType` | `ProviderType` |
|
|
426
|
+
| `Balance` | `double` |
|
|
427
|
+
| `IsDefaultWallet` | `bool` |
|
|
428
|
+
|
|
429
|
+
**Example**
|
|
430
|
+
|
|
431
|
+
```js
|
|
432
|
+
const { isError, message, result } = await oasis.wallet.getAvatarDefaultWalletByUsernameAsync({
|
|
433
|
+
username: '<username>',
|
|
434
|
+
showOnlyDefault: '<showOnlyDefault>',
|
|
435
|
+
decryptPrivateKeys: '<decryptPrivateKeys>',
|
|
436
|
+
providerType: '<providerType>'
|
|
437
|
+
});
|
|
438
|
+
if (isError) throw new Error(message);
|
|
439
|
+
console.log(result);
|
|
440
|
+
```
|
|
441
|
+
|
|
442
|
+
Example response:
|
|
443
|
+
|
|
444
|
+
```json
|
|
445
|
+
{
|
|
446
|
+
"isError": false,
|
|
447
|
+
"message": "",
|
|
448
|
+
"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 }
|
|
449
|
+
}
|
|
450
|
+
```
|
|
451
|
+
|
|
452
|
+
---
|
|
453
|
+
|
|
454
|
+
### `getPortfolioValueAsync`
|
|
455
|
+
|
|
456
|
+
Get total portfolio value across all wallets for an avatar.
|
|
457
|
+
|
|
458
|
+
**GET** `api/wallet/avatar/{avatarId}/portfolio/value`
|
|
459
|
+
|
|
460
|
+
Route parameters:
|
|
461
|
+
|
|
462
|
+
| Field | Type |
|
|
463
|
+
| --- | --- |
|
|
464
|
+
| `avatarId` | `Guid` |
|
|
465
|
+
|
|
466
|
+
**Request**
|
|
467
|
+
|
|
468
|
+
No request body.
|
|
469
|
+
|
|
470
|
+
**Response**
|
|
471
|
+
|
|
472
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
473
|
+
|
|
474
|
+
`result` type: `object`
|
|
475
|
+
|
|
476
|
+
**Example**
|
|
477
|
+
|
|
478
|
+
```js
|
|
479
|
+
const { isError, message, result } = await oasis.wallet.getPortfolioValueAsync({
|
|
480
|
+
avatarId: '<avatarId>'
|
|
481
|
+
});
|
|
482
|
+
if (isError) throw new Error(message);
|
|
483
|
+
console.log(result);
|
|
484
|
+
```
|
|
485
|
+
|
|
486
|
+
Example response:
|
|
487
|
+
|
|
488
|
+
```json
|
|
489
|
+
{
|
|
490
|
+
"isError": false,
|
|
491
|
+
"message": "",
|
|
492
|
+
"result": {}
|
|
493
|
+
}
|
|
494
|
+
```
|
|
495
|
+
|
|
496
|
+
---
|
|
497
|
+
|
|
498
|
+
### `getSupportedChains`
|
|
499
|
+
|
|
500
|
+
Get supported chains.
|
|
501
|
+
|
|
502
|
+
**GET** `api/wallet/supported-chains`
|
|
503
|
+
|
|
504
|
+
**Request**
|
|
505
|
+
|
|
506
|
+
No request body.
|
|
507
|
+
|
|
508
|
+
**Response**
|
|
509
|
+
|
|
510
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
511
|
+
|
|
512
|
+
`result` type: `object` (array)
|
|
513
|
+
|
|
514
|
+
**Example**
|
|
515
|
+
|
|
516
|
+
```js
|
|
517
|
+
const { isError, message, result } = await oasis.wallet.getSupportedChains({});
|
|
518
|
+
if (isError) throw new Error(message);
|
|
519
|
+
console.log(result);
|
|
520
|
+
```
|
|
521
|
+
|
|
522
|
+
Example response:
|
|
523
|
+
|
|
524
|
+
```json
|
|
525
|
+
{
|
|
526
|
+
"isError": false,
|
|
527
|
+
"message": "",
|
|
528
|
+
"result": [{}]
|
|
529
|
+
}
|
|
530
|
+
```
|
|
531
|
+
|
|
532
|
+
---
|
|
533
|
+
|
|
534
|
+
### `getWalletAnalyticsAsync`
|
|
535
|
+
|
|
536
|
+
Get wallet analytics for an avatar.
|
|
537
|
+
|
|
538
|
+
**GET** `api/wallet/avatar/{avatarId}/wallet/{walletId}/analytics`
|
|
539
|
+
|
|
540
|
+
Route parameters:
|
|
541
|
+
|
|
542
|
+
| Field | Type |
|
|
543
|
+
| --- | --- |
|
|
544
|
+
| `avatarId` | `Guid` |
|
|
545
|
+
| `walletId` | `Guid` |
|
|
546
|
+
|
|
547
|
+
**Request**
|
|
548
|
+
|
|
549
|
+
No request body.
|
|
550
|
+
|
|
551
|
+
**Response**
|
|
552
|
+
|
|
553
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
554
|
+
|
|
555
|
+
`result` type: `object`
|
|
556
|
+
|
|
557
|
+
**Example**
|
|
558
|
+
|
|
559
|
+
```js
|
|
560
|
+
const { isError, message, result } = await oasis.wallet.getWalletAnalyticsAsync({
|
|
561
|
+
avatarId: '<avatarId>',
|
|
562
|
+
walletId: '<walletId>'
|
|
563
|
+
});
|
|
564
|
+
if (isError) throw new Error(message);
|
|
565
|
+
console.log(result);
|
|
566
|
+
```
|
|
567
|
+
|
|
568
|
+
Example response:
|
|
569
|
+
|
|
570
|
+
```json
|
|
571
|
+
{
|
|
572
|
+
"isError": false,
|
|
573
|
+
"message": "",
|
|
574
|
+
"result": {}
|
|
575
|
+
}
|
|
576
|
+
```
|
|
577
|
+
|
|
578
|
+
---
|
|
579
|
+
|
|
580
|
+
### `getWalletThatPublicKeyBelongsTo`
|
|
581
|
+
|
|
582
|
+
Get the wallet that a public key belongs to.
|
|
583
|
+
|
|
584
|
+
**GET** `api/wallet/find-wallet`
|
|
585
|
+
|
|
586
|
+
**Request**
|
|
587
|
+
|
|
588
|
+
Query parameters:
|
|
589
|
+
|
|
590
|
+
| Field | Type |
|
|
591
|
+
| --- | --- |
|
|
592
|
+
| `providerKey` | `string` |
|
|
593
|
+
| `providerType` | `ProviderType` |
|
|
594
|
+
|
|
595
|
+
**Response**
|
|
596
|
+
|
|
597
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
598
|
+
|
|
599
|
+
`result` type: `IProviderWallet`
|
|
600
|
+
|
|
601
|
+
| Field | Type |
|
|
602
|
+
| --- | --- |
|
|
603
|
+
| `AvatarId` | `Guid` |
|
|
604
|
+
| `WalletId` | `Guid` |
|
|
605
|
+
| `Name` | `string` |
|
|
606
|
+
| `Description` | `new string` |
|
|
607
|
+
| `PrivateKey` | `string` |
|
|
608
|
+
| `PublicKey` | `string` |
|
|
609
|
+
| `WalletAddress` | `string` |
|
|
610
|
+
| `WalletAddressSegwitP2SH` | `string` |
|
|
611
|
+
| `SecretRecoveryPhrase` | `string` |
|
|
612
|
+
| `Transactions` | `List<IWalletTransaction>` |
|
|
613
|
+
| `ProviderType` | `ProviderType` |
|
|
614
|
+
| `Balance` | `double` |
|
|
615
|
+
| `IsDefaultWallet` | `bool` |
|
|
616
|
+
|
|
617
|
+
**Example**
|
|
618
|
+
|
|
619
|
+
```js
|
|
620
|
+
const { isError, message, result } = await oasis.wallet.getWalletThatPublicKeyBelongsTo({
|
|
621
|
+
providerKey: 'example string',
|
|
622
|
+
providerType: '<providerType>'
|
|
623
|
+
});
|
|
624
|
+
if (isError) throw new Error(message);
|
|
625
|
+
console.log(result);
|
|
626
|
+
```
|
|
627
|
+
|
|
628
|
+
Example response:
|
|
629
|
+
|
|
630
|
+
```json
|
|
631
|
+
{
|
|
632
|
+
"isError": false,
|
|
633
|
+
"message": "",
|
|
634
|
+
"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 }
|
|
635
|
+
}
|
|
636
|
+
```
|
|
637
|
+
|
|
638
|
+
---
|
|
639
|
+
|
|
640
|
+
### `getWalletTokensAsync`
|
|
641
|
+
|
|
642
|
+
Get wallet tokens for an avatar.
|
|
643
|
+
|
|
644
|
+
**GET** `api/wallet/avatar/{avatarId}/wallet/{walletId}/tokens`
|
|
645
|
+
|
|
646
|
+
Route parameters:
|
|
647
|
+
|
|
648
|
+
| Field | Type |
|
|
649
|
+
| --- | --- |
|
|
650
|
+
| `avatarId` | `Guid` |
|
|
651
|
+
| `walletId` | `Guid` |
|
|
652
|
+
|
|
653
|
+
**Request**
|
|
654
|
+
|
|
655
|
+
No request body.
|
|
656
|
+
|
|
657
|
+
**Response**
|
|
658
|
+
|
|
659
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
660
|
+
|
|
661
|
+
`result` type: `object` (array)
|
|
662
|
+
|
|
663
|
+
**Example**
|
|
664
|
+
|
|
665
|
+
```js
|
|
666
|
+
const { isError, message, result } = await oasis.wallet.getWalletTokensAsync({
|
|
667
|
+
avatarId: '<avatarId>',
|
|
668
|
+
walletId: '<walletId>'
|
|
669
|
+
});
|
|
670
|
+
if (isError) throw new Error(message);
|
|
671
|
+
console.log(result);
|
|
672
|
+
```
|
|
673
|
+
|
|
674
|
+
Example response:
|
|
675
|
+
|
|
676
|
+
```json
|
|
677
|
+
{
|
|
678
|
+
"isError": false,
|
|
679
|
+
"message": "",
|
|
680
|
+
"result": [{}]
|
|
681
|
+
}
|
|
682
|
+
```
|
|
683
|
+
|
|
684
|
+
---
|
|
685
|
+
|
|
686
|
+
### `getWalletsByChainAsync`
|
|
687
|
+
|
|
688
|
+
Get wallets by chain for an avatar.
|
|
689
|
+
|
|
690
|
+
**GET** `api/wallet/avatar/{avatarId}/wallets/chain/{chain}`
|
|
691
|
+
|
|
692
|
+
Route parameters:
|
|
693
|
+
|
|
694
|
+
| Field | Type |
|
|
695
|
+
| --- | --- |
|
|
696
|
+
| `avatarId` | `Guid` |
|
|
697
|
+
| `chain` | `string` |
|
|
698
|
+
|
|
699
|
+
**Request**
|
|
700
|
+
|
|
701
|
+
No request body.
|
|
702
|
+
|
|
703
|
+
**Response**
|
|
704
|
+
|
|
705
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
706
|
+
|
|
707
|
+
`result` type: `IProviderWallet` (array)
|
|
708
|
+
|
|
709
|
+
| Field | Type |
|
|
710
|
+
| --- | --- |
|
|
711
|
+
| `AvatarId` | `Guid` |
|
|
712
|
+
| `WalletId` | `Guid` |
|
|
713
|
+
| `Name` | `string` |
|
|
714
|
+
| `Description` | `new string` |
|
|
715
|
+
| `PrivateKey` | `string` |
|
|
716
|
+
| `PublicKey` | `string` |
|
|
717
|
+
| `WalletAddress` | `string` |
|
|
718
|
+
| `WalletAddressSegwitP2SH` | `string` |
|
|
719
|
+
| `SecretRecoveryPhrase` | `string` |
|
|
720
|
+
| `Transactions` | `List<IWalletTransaction>` |
|
|
721
|
+
| `ProviderType` | `ProviderType` |
|
|
722
|
+
| `Balance` | `double` |
|
|
723
|
+
| `IsDefaultWallet` | `bool` |
|
|
724
|
+
|
|
725
|
+
**Example**
|
|
726
|
+
|
|
727
|
+
```js
|
|
728
|
+
const { isError, message, result } = await oasis.wallet.getWalletsByChainAsync({
|
|
729
|
+
avatarId: '<avatarId>',
|
|
730
|
+
chain: '<chain>'
|
|
731
|
+
});
|
|
732
|
+
if (isError) throw new Error(message);
|
|
733
|
+
console.log(result);
|
|
734
|
+
```
|
|
735
|
+
|
|
736
|
+
Example response:
|
|
737
|
+
|
|
738
|
+
```json
|
|
739
|
+
{
|
|
740
|
+
"isError": false,
|
|
741
|
+
"message": "",
|
|
742
|
+
"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 }]
|
|
743
|
+
}
|
|
744
|
+
```
|
|
745
|
+
|
|
746
|
+
---
|
|
747
|
+
|
|
748
|
+
### `importWalletUsingPrivateKeyByEmail`
|
|
749
|
+
|
|
750
|
+
Import a wallet using private key by email.
|
|
751
|
+
|
|
752
|
+
**POST** `api/wallet/avatar/email/{email}/import/private-key`
|
|
753
|
+
|
|
754
|
+
Route parameters:
|
|
755
|
+
|
|
756
|
+
| Field | Type |
|
|
757
|
+
| --- | --- |
|
|
758
|
+
| `email` | `string` |
|
|
759
|
+
|
|
760
|
+
**Request**
|
|
761
|
+
|
|
762
|
+
Body fields:
|
|
763
|
+
|
|
764
|
+
| Field | Type |
|
|
765
|
+
| --- | --- |
|
|
766
|
+
| `key` | `string` |
|
|
767
|
+
| `providerToImportTo` | `ProviderType` |
|
|
768
|
+
|
|
769
|
+
**Response**
|
|
770
|
+
|
|
771
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
772
|
+
|
|
773
|
+
`result` type: `IProviderWallet`
|
|
774
|
+
|
|
775
|
+
| Field | Type |
|
|
776
|
+
| --- | --- |
|
|
777
|
+
| `AvatarId` | `Guid` |
|
|
778
|
+
| `WalletId` | `Guid` |
|
|
779
|
+
| `Name` | `string` |
|
|
780
|
+
| `Description` | `new string` |
|
|
781
|
+
| `PrivateKey` | `string` |
|
|
782
|
+
| `PublicKey` | `string` |
|
|
783
|
+
| `WalletAddress` | `string` |
|
|
784
|
+
| `WalletAddressSegwitP2SH` | `string` |
|
|
785
|
+
| `SecretRecoveryPhrase` | `string` |
|
|
786
|
+
| `Transactions` | `List<IWalletTransaction>` |
|
|
787
|
+
| `ProviderType` | `ProviderType` |
|
|
788
|
+
| `Balance` | `double` |
|
|
789
|
+
| `IsDefaultWallet` | `bool` |
|
|
790
|
+
|
|
791
|
+
**Example**
|
|
792
|
+
|
|
793
|
+
```js
|
|
794
|
+
const { isError, message, result } = await oasis.wallet.importWalletUsingPrivateKeyByEmail({
|
|
795
|
+
email: '<email>',
|
|
796
|
+
key: 'example string',
|
|
797
|
+
providerToImportTo: '<providerToImportTo>'
|
|
798
|
+
});
|
|
799
|
+
if (isError) throw new Error(message);
|
|
800
|
+
console.log(result);
|
|
801
|
+
```
|
|
802
|
+
|
|
803
|
+
Example response:
|
|
804
|
+
|
|
805
|
+
```json
|
|
806
|
+
{
|
|
807
|
+
"isError": false,
|
|
808
|
+
"message": "",
|
|
809
|
+
"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 }
|
|
810
|
+
}
|
|
811
|
+
```
|
|
812
|
+
|
|
813
|
+
---
|
|
814
|
+
|
|
815
|
+
### `importWalletUsingPrivateKeyById`
|
|
816
|
+
|
|
817
|
+
Import a wallet using private key by avatar ID.
|
|
818
|
+
|
|
819
|
+
**POST** `api/wallet/avatar/{avatarId}/import/private-key`
|
|
820
|
+
|
|
821
|
+
Route parameters:
|
|
822
|
+
|
|
823
|
+
| Field | Type |
|
|
824
|
+
| --- | --- |
|
|
825
|
+
| `avatarId` | `Guid` |
|
|
826
|
+
|
|
827
|
+
**Request**
|
|
828
|
+
|
|
829
|
+
Body fields:
|
|
830
|
+
|
|
831
|
+
| Field | Type |
|
|
832
|
+
| --- | --- |
|
|
833
|
+
| `key` | `string` |
|
|
834
|
+
| `providerToImportTo` | `ProviderType` |
|
|
835
|
+
|
|
836
|
+
**Response**
|
|
837
|
+
|
|
838
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
839
|
+
|
|
840
|
+
`result` type: `IProviderWallet`
|
|
841
|
+
|
|
842
|
+
| Field | Type |
|
|
843
|
+
| --- | --- |
|
|
844
|
+
| `AvatarId` | `Guid` |
|
|
845
|
+
| `WalletId` | `Guid` |
|
|
846
|
+
| `Name` | `string` |
|
|
847
|
+
| `Description` | `new string` |
|
|
848
|
+
| `PrivateKey` | `string` |
|
|
849
|
+
| `PublicKey` | `string` |
|
|
850
|
+
| `WalletAddress` | `string` |
|
|
851
|
+
| `WalletAddressSegwitP2SH` | `string` |
|
|
852
|
+
| `SecretRecoveryPhrase` | `string` |
|
|
853
|
+
| `Transactions` | `List<IWalletTransaction>` |
|
|
854
|
+
| `ProviderType` | `ProviderType` |
|
|
855
|
+
| `Balance` | `double` |
|
|
856
|
+
| `IsDefaultWallet` | `bool` |
|
|
857
|
+
|
|
858
|
+
**Example**
|
|
859
|
+
|
|
860
|
+
```js
|
|
861
|
+
const { isError, message, result } = await oasis.wallet.importWalletUsingPrivateKeyById({
|
|
862
|
+
avatarId: '<avatarId>',
|
|
863
|
+
key: 'example string',
|
|
864
|
+
providerToImportTo: '<providerToImportTo>'
|
|
865
|
+
});
|
|
866
|
+
if (isError) throw new Error(message);
|
|
867
|
+
console.log(result);
|
|
868
|
+
```
|
|
869
|
+
|
|
870
|
+
Example response:
|
|
871
|
+
|
|
872
|
+
```json
|
|
873
|
+
{
|
|
874
|
+
"isError": false,
|
|
875
|
+
"message": "",
|
|
876
|
+
"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 }
|
|
877
|
+
}
|
|
878
|
+
```
|
|
879
|
+
|
|
880
|
+
---
|
|
881
|
+
|
|
882
|
+
### `importWalletUsingPrivateKeyByUsername`
|
|
883
|
+
|
|
884
|
+
Import a wallet using private key by username.
|
|
885
|
+
|
|
886
|
+
**POST** `api/wallet/avatar/username/{username}/import/private-key`
|
|
887
|
+
|
|
888
|
+
Route parameters:
|
|
889
|
+
|
|
890
|
+
| Field | Type |
|
|
891
|
+
| --- | --- |
|
|
892
|
+
| `username` | `string` |
|
|
893
|
+
|
|
894
|
+
**Request**
|
|
895
|
+
|
|
896
|
+
Body fields:
|
|
897
|
+
|
|
898
|
+
| Field | Type |
|
|
899
|
+
| --- | --- |
|
|
900
|
+
| `key` | `string` |
|
|
901
|
+
| `providerToImportTo` | `ProviderType` |
|
|
902
|
+
|
|
903
|
+
**Response**
|
|
904
|
+
|
|
905
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
906
|
+
|
|
907
|
+
`result` type: `IProviderWallet`
|
|
908
|
+
|
|
909
|
+
| Field | Type |
|
|
910
|
+
| --- | --- |
|
|
911
|
+
| `AvatarId` | `Guid` |
|
|
912
|
+
| `WalletId` | `Guid` |
|
|
913
|
+
| `Name` | `string` |
|
|
914
|
+
| `Description` | `new string` |
|
|
915
|
+
| `PrivateKey` | `string` |
|
|
916
|
+
| `PublicKey` | `string` |
|
|
917
|
+
| `WalletAddress` | `string` |
|
|
918
|
+
| `WalletAddressSegwitP2SH` | `string` |
|
|
919
|
+
| `SecretRecoveryPhrase` | `string` |
|
|
920
|
+
| `Transactions` | `List<IWalletTransaction>` |
|
|
921
|
+
| `ProviderType` | `ProviderType` |
|
|
922
|
+
| `Balance` | `double` |
|
|
923
|
+
| `IsDefaultWallet` | `bool` |
|
|
924
|
+
|
|
925
|
+
**Example**
|
|
926
|
+
|
|
927
|
+
```js
|
|
928
|
+
const { isError, message, result } = await oasis.wallet.importWalletUsingPrivateKeyByUsername({
|
|
929
|
+
username: '<username>',
|
|
930
|
+
key: 'example string',
|
|
931
|
+
providerToImportTo: '<providerToImportTo>'
|
|
932
|
+
});
|
|
933
|
+
if (isError) throw new Error(message);
|
|
934
|
+
console.log(result);
|
|
935
|
+
```
|
|
936
|
+
|
|
937
|
+
Example response:
|
|
938
|
+
|
|
939
|
+
```json
|
|
940
|
+
{
|
|
941
|
+
"isError": false,
|
|
942
|
+
"message": "",
|
|
943
|
+
"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 }
|
|
944
|
+
}
|
|
945
|
+
```
|
|
946
|
+
|
|
947
|
+
---
|
|
948
|
+
|
|
949
|
+
### `importWalletUsingPublicKeyByEmail`
|
|
950
|
+
|
|
951
|
+
Import a wallet using public key by email.
|
|
952
|
+
|
|
953
|
+
**POST** `api/wallet/avatar/email/{email}/import/public-key`
|
|
954
|
+
|
|
955
|
+
Route parameters:
|
|
956
|
+
|
|
957
|
+
| Field | Type |
|
|
958
|
+
| --- | --- |
|
|
959
|
+
| `email` | `string` |
|
|
960
|
+
|
|
961
|
+
**Request**
|
|
962
|
+
|
|
963
|
+
Body fields:
|
|
964
|
+
|
|
965
|
+
| Field | Type |
|
|
966
|
+
| --- | --- |
|
|
967
|
+
| `key` | `string` |
|
|
968
|
+
| `walletAddress` | `string` |
|
|
969
|
+
| `providerToImportTo` | `ProviderType` |
|
|
970
|
+
|
|
971
|
+
**Response**
|
|
972
|
+
|
|
973
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
974
|
+
|
|
975
|
+
`result` type: `IProviderWallet`
|
|
976
|
+
|
|
977
|
+
| Field | Type |
|
|
978
|
+
| --- | --- |
|
|
979
|
+
| `AvatarId` | `Guid` |
|
|
980
|
+
| `WalletId` | `Guid` |
|
|
981
|
+
| `Name` | `string` |
|
|
982
|
+
| `Description` | `new string` |
|
|
983
|
+
| `PrivateKey` | `string` |
|
|
984
|
+
| `PublicKey` | `string` |
|
|
985
|
+
| `WalletAddress` | `string` |
|
|
986
|
+
| `WalletAddressSegwitP2SH` | `string` |
|
|
987
|
+
| `SecretRecoveryPhrase` | `string` |
|
|
988
|
+
| `Transactions` | `List<IWalletTransaction>` |
|
|
989
|
+
| `ProviderType` | `ProviderType` |
|
|
990
|
+
| `Balance` | `double` |
|
|
991
|
+
| `IsDefaultWallet` | `bool` |
|
|
992
|
+
|
|
993
|
+
**Example**
|
|
994
|
+
|
|
995
|
+
```js
|
|
996
|
+
const { isError, message, result } = await oasis.wallet.importWalletUsingPublicKeyByEmail({
|
|
997
|
+
email: '<email>',
|
|
998
|
+
key: 'example string',
|
|
999
|
+
walletAddress: 'example string',
|
|
1000
|
+
providerToImportTo: '<providerToImportTo>'
|
|
1001
|
+
});
|
|
1002
|
+
if (isError) throw new Error(message);
|
|
1003
|
+
console.log(result);
|
|
1004
|
+
```
|
|
1005
|
+
|
|
1006
|
+
Example response:
|
|
1007
|
+
|
|
1008
|
+
```json
|
|
1009
|
+
{
|
|
1010
|
+
"isError": false,
|
|
1011
|
+
"message": "",
|
|
1012
|
+
"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 }
|
|
1013
|
+
}
|
|
1014
|
+
```
|
|
1015
|
+
|
|
1016
|
+
---
|
|
1017
|
+
|
|
1018
|
+
### `importWalletUsingPublicKeyById`
|
|
1019
|
+
|
|
1020
|
+
Import a wallet using public key by avatar ID.
|
|
1021
|
+
|
|
1022
|
+
**POST** `api/wallet/avatar/{avatarId}/import/public-key`
|
|
1023
|
+
|
|
1024
|
+
Route parameters:
|
|
1025
|
+
|
|
1026
|
+
| Field | Type |
|
|
1027
|
+
| --- | --- |
|
|
1028
|
+
| `avatarId` | `Guid` |
|
|
1029
|
+
|
|
1030
|
+
**Request**
|
|
1031
|
+
|
|
1032
|
+
Body fields:
|
|
1033
|
+
|
|
1034
|
+
| Field | Type |
|
|
1035
|
+
| --- | --- |
|
|
1036
|
+
| `key` | `string` |
|
|
1037
|
+
| `walletAddress` | `string` |
|
|
1038
|
+
| `providerToImportTo` | `ProviderType` |
|
|
1039
|
+
|
|
1040
|
+
**Response**
|
|
1041
|
+
|
|
1042
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
1043
|
+
|
|
1044
|
+
`result` type: `IProviderWallet`
|
|
1045
|
+
|
|
1046
|
+
| Field | Type |
|
|
1047
|
+
| --- | --- |
|
|
1048
|
+
| `AvatarId` | `Guid` |
|
|
1049
|
+
| `WalletId` | `Guid` |
|
|
1050
|
+
| `Name` | `string` |
|
|
1051
|
+
| `Description` | `new string` |
|
|
1052
|
+
| `PrivateKey` | `string` |
|
|
1053
|
+
| `PublicKey` | `string` |
|
|
1054
|
+
| `WalletAddress` | `string` |
|
|
1055
|
+
| `WalletAddressSegwitP2SH` | `string` |
|
|
1056
|
+
| `SecretRecoveryPhrase` | `string` |
|
|
1057
|
+
| `Transactions` | `List<IWalletTransaction>` |
|
|
1058
|
+
| `ProviderType` | `ProviderType` |
|
|
1059
|
+
| `Balance` | `double` |
|
|
1060
|
+
| `IsDefaultWallet` | `bool` |
|
|
1061
|
+
|
|
1062
|
+
**Example**
|
|
1063
|
+
|
|
1064
|
+
```js
|
|
1065
|
+
const { isError, message, result } = await oasis.wallet.importWalletUsingPublicKeyById({
|
|
1066
|
+
avatarId: '<avatarId>',
|
|
1067
|
+
key: 'example string',
|
|
1068
|
+
walletAddress: 'example string',
|
|
1069
|
+
providerToImportTo: '<providerToImportTo>'
|
|
1070
|
+
});
|
|
1071
|
+
if (isError) throw new Error(message);
|
|
1072
|
+
console.log(result);
|
|
1073
|
+
```
|
|
1074
|
+
|
|
1075
|
+
Example response:
|
|
1076
|
+
|
|
1077
|
+
```json
|
|
1078
|
+
{
|
|
1079
|
+
"isError": false,
|
|
1080
|
+
"message": "",
|
|
1081
|
+
"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 }
|
|
1082
|
+
}
|
|
1083
|
+
```
|
|
1084
|
+
|
|
1085
|
+
---
|
|
1086
|
+
|
|
1087
|
+
### `importWalletUsingPublicKeyByUsername`
|
|
1088
|
+
|
|
1089
|
+
Import a wallet using public key by username.
|
|
1090
|
+
|
|
1091
|
+
**POST** `api/wallet/avatar/username/{username}/import/public-key`
|
|
1092
|
+
|
|
1093
|
+
Route parameters:
|
|
1094
|
+
|
|
1095
|
+
| Field | Type |
|
|
1096
|
+
| --- | --- |
|
|
1097
|
+
| `username` | `string` |
|
|
1098
|
+
|
|
1099
|
+
**Request**
|
|
1100
|
+
|
|
1101
|
+
Body fields:
|
|
1102
|
+
|
|
1103
|
+
| Field | Type |
|
|
1104
|
+
| --- | --- |
|
|
1105
|
+
| `key` | `string` |
|
|
1106
|
+
| `walletAddress` | `string` |
|
|
1107
|
+
| `providerToImportTo` | `ProviderType` |
|
|
1108
|
+
|
|
1109
|
+
**Response**
|
|
1110
|
+
|
|
1111
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
1112
|
+
|
|
1113
|
+
`result` type: `IProviderWallet`
|
|
1114
|
+
|
|
1115
|
+
| Field | Type |
|
|
1116
|
+
| --- | --- |
|
|
1117
|
+
| `AvatarId` | `Guid` |
|
|
1118
|
+
| `WalletId` | `Guid` |
|
|
1119
|
+
| `Name` | `string` |
|
|
1120
|
+
| `Description` | `new string` |
|
|
1121
|
+
| `PrivateKey` | `string` |
|
|
1122
|
+
| `PublicKey` | `string` |
|
|
1123
|
+
| `WalletAddress` | `string` |
|
|
1124
|
+
| `WalletAddressSegwitP2SH` | `string` |
|
|
1125
|
+
| `SecretRecoveryPhrase` | `string` |
|
|
1126
|
+
| `Transactions` | `List<IWalletTransaction>` |
|
|
1127
|
+
| `ProviderType` | `ProviderType` |
|
|
1128
|
+
| `Balance` | `double` |
|
|
1129
|
+
| `IsDefaultWallet` | `bool` |
|
|
1130
|
+
|
|
1131
|
+
**Example**
|
|
1132
|
+
|
|
1133
|
+
```js
|
|
1134
|
+
const { isError, message, result } = await oasis.wallet.importWalletUsingPublicKeyByUsername({
|
|
1135
|
+
username: '<username>',
|
|
1136
|
+
key: 'example string',
|
|
1137
|
+
walletAddress: 'example string',
|
|
1138
|
+
providerToImportTo: '<providerToImportTo>'
|
|
1139
|
+
});
|
|
1140
|
+
if (isError) throw new Error(message);
|
|
1141
|
+
console.log(result);
|
|
1142
|
+
```
|
|
1143
|
+
|
|
1144
|
+
Example response:
|
|
1145
|
+
|
|
1146
|
+
```json
|
|
1147
|
+
{
|
|
1148
|
+
"isError": false,
|
|
1149
|
+
"message": "",
|
|
1150
|
+
"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 }
|
|
1151
|
+
}
|
|
1152
|
+
```
|
|
1153
|
+
|
|
1154
|
+
---
|
|
1155
|
+
|
|
1156
|
+
### `loadProviderWalletsForAvatarByEmailAsync`
|
|
1157
|
+
|
|
1158
|
+
Load all provider wallets for an avatar by email.
|
|
1159
|
+
|
|
1160
|
+
**GET** `api/wallet/avatar/email/{email}/wallets`
|
|
1161
|
+
|
|
1162
|
+
Route parameters:
|
|
1163
|
+
|
|
1164
|
+
| Field | Type |
|
|
1165
|
+
| --- | --- |
|
|
1166
|
+
| `email` | `string` |
|
|
1167
|
+
|
|
1168
|
+
**Request**
|
|
1169
|
+
|
|
1170
|
+
Query parameters:
|
|
1171
|
+
|
|
1172
|
+
| Field | Type |
|
|
1173
|
+
| --- | --- |
|
|
1174
|
+
| `providerType` | `ProviderType (optional)` |
|
|
1175
|
+
|
|
1176
|
+
**Response**
|
|
1177
|
+
|
|
1178
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
1179
|
+
|
|
1180
|
+
`result` type: `Dictionary<ProviderType, List<IProviderWallet>>` - a key/value map keyed by `ProviderType`, each value a `List<IProviderWallet>`.
|
|
1181
|
+
|
|
1182
|
+
**Example**
|
|
1183
|
+
|
|
1184
|
+
```js
|
|
1185
|
+
const { isError, message, result } = await oasis.wallet.loadProviderWalletsForAvatarByEmailAsync({
|
|
1186
|
+
email: '<email>',
|
|
1187
|
+
providerType: '<providerType>'
|
|
1188
|
+
});
|
|
1189
|
+
if (isError) throw new Error(message);
|
|
1190
|
+
console.log(result);
|
|
1191
|
+
```
|
|
1192
|
+
|
|
1193
|
+
Example response:
|
|
1194
|
+
|
|
1195
|
+
```json
|
|
1196
|
+
{
|
|
1197
|
+
"isError": false,
|
|
1198
|
+
"message": "",
|
|
1199
|
+
"result": { "<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 }] }
|
|
1200
|
+
}
|
|
1201
|
+
```
|
|
1202
|
+
|
|
1203
|
+
---
|
|
1204
|
+
|
|
1205
|
+
### `loadProviderWalletsForAvatarByIdAsync`
|
|
1206
|
+
|
|
1207
|
+
Load all provider wallets for an avatar by ID.
|
|
1208
|
+
|
|
1209
|
+
**GET** `api/wallet/avatar/{id}/wallets/{showOnlyDefault}/{decryptPrivateKeys}`
|
|
1210
|
+
|
|
1211
|
+
Route parameters:
|
|
1212
|
+
|
|
1213
|
+
| Field | Type |
|
|
1214
|
+
| --- | --- |
|
|
1215
|
+
| `id` | `Guid` |
|
|
1216
|
+
| `showOnlyDefault` | `bool` |
|
|
1217
|
+
| `decryptPrivateKeys` | `bool` |
|
|
1218
|
+
|
|
1219
|
+
**Request**
|
|
1220
|
+
|
|
1221
|
+
Query parameters:
|
|
1222
|
+
|
|
1223
|
+
| Field | Type |
|
|
1224
|
+
| --- | --- |
|
|
1225
|
+
| `providerType` | `ProviderType (optional)` |
|
|
1226
|
+
|
|
1227
|
+
**Response**
|
|
1228
|
+
|
|
1229
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
1230
|
+
|
|
1231
|
+
`result` type: `Dictionary<ProviderType, List<IProviderWallet>>` - a key/value map keyed by `ProviderType`, each value a `List<IProviderWallet>`.
|
|
1232
|
+
|
|
1233
|
+
**Example**
|
|
1234
|
+
|
|
1235
|
+
```js
|
|
1236
|
+
const { isError, message, result } = await oasis.wallet.loadProviderWalletsForAvatarByIdAsync({
|
|
1237
|
+
id: '<id>',
|
|
1238
|
+
showOnlyDefault: '<showOnlyDefault>',
|
|
1239
|
+
decryptPrivateKeys: '<decryptPrivateKeys>',
|
|
1240
|
+
providerType: '<providerType>'
|
|
1241
|
+
});
|
|
1242
|
+
if (isError) throw new Error(message);
|
|
1243
|
+
console.log(result);
|
|
1244
|
+
```
|
|
1245
|
+
|
|
1246
|
+
Example response:
|
|
1247
|
+
|
|
1248
|
+
```json
|
|
1249
|
+
{
|
|
1250
|
+
"isError": false,
|
|
1251
|
+
"message": "",
|
|
1252
|
+
"result": { "<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 }] }
|
|
1253
|
+
}
|
|
1254
|
+
```
|
|
1255
|
+
|
|
1256
|
+
---
|
|
1257
|
+
|
|
1258
|
+
### `loadProviderWalletsForAvatarByUsernameAsync`
|
|
1259
|
+
|
|
1260
|
+
Load all provider wallets for an avatar by username.
|
|
1261
|
+
|
|
1262
|
+
**GET** `api/wallet/avatar/username/{username}/wallets/{showOnlyDefault}/{decryptPrivateKeys}`
|
|
1263
|
+
|
|
1264
|
+
Route parameters:
|
|
1265
|
+
|
|
1266
|
+
| Field | Type |
|
|
1267
|
+
| --- | --- |
|
|
1268
|
+
| `username` | `string` |
|
|
1269
|
+
| `showOnlyDefault` | `bool` |
|
|
1270
|
+
| `decryptPrivateKeys` | `bool` |
|
|
1271
|
+
|
|
1272
|
+
**Request**
|
|
1273
|
+
|
|
1274
|
+
Query parameters:
|
|
1275
|
+
|
|
1276
|
+
| Field | Type |
|
|
1277
|
+
| --- | --- |
|
|
1278
|
+
| `providerType` | `ProviderType (optional)` |
|
|
1279
|
+
|
|
1280
|
+
**Response**
|
|
1281
|
+
|
|
1282
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
1283
|
+
|
|
1284
|
+
`result` type: `Dictionary<ProviderType, List<IProviderWallet>>` - a key/value map keyed by `ProviderType`, each value a `List<IProviderWallet>`.
|
|
1285
|
+
|
|
1286
|
+
**Example**
|
|
1287
|
+
|
|
1288
|
+
```js
|
|
1289
|
+
const { isError, message, result } = await oasis.wallet.loadProviderWalletsForAvatarByUsernameAsync({
|
|
1290
|
+
username: '<username>',
|
|
1291
|
+
showOnlyDefault: '<showOnlyDefault>',
|
|
1292
|
+
decryptPrivateKeys: '<decryptPrivateKeys>',
|
|
1293
|
+
providerType: '<providerType>'
|
|
1294
|
+
});
|
|
1295
|
+
if (isError) throw new Error(message);
|
|
1296
|
+
console.log(result);
|
|
1297
|
+
```
|
|
1298
|
+
|
|
1299
|
+
Example response:
|
|
1300
|
+
|
|
1301
|
+
```json
|
|
1302
|
+
{
|
|
1303
|
+
"isError": false,
|
|
1304
|
+
"message": "",
|
|
1305
|
+
"result": { "<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 }] }
|
|
1306
|
+
}
|
|
1307
|
+
```
|
|
1308
|
+
|
|
1309
|
+
---
|
|
1310
|
+
|
|
1311
|
+
### `saveProviderWalletsForAvatarByEmailAsync`
|
|
1312
|
+
|
|
1313
|
+
Save provider wallets for an avatar by email.
|
|
1314
|
+
|
|
1315
|
+
**POST** `api/wallet/avatar/email/{email}/wallets`
|
|
1316
|
+
|
|
1317
|
+
Route parameters:
|
|
1318
|
+
|
|
1319
|
+
| Field | Type |
|
|
1320
|
+
| --- | --- |
|
|
1321
|
+
| `email` | `string` |
|
|
1322
|
+
|
|
1323
|
+
**Request**
|
|
1324
|
+
|
|
1325
|
+
Body type: `Dictionary<ProviderType, List<IProviderWallet>>` - a key/value map keyed by `ProviderType`, each value a `List<IProviderWallet>`.
|
|
1326
|
+
|
|
1327
|
+
**Response**
|
|
1328
|
+
|
|
1329
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
1330
|
+
|
|
1331
|
+
`result` type: `bool`
|
|
1332
|
+
|
|
1333
|
+
**Example**
|
|
1334
|
+
|
|
1335
|
+
```js
|
|
1336
|
+
const { isError, message, result } = await oasis.wallet.saveProviderWalletsForAvatarByEmailAsync({
|
|
1337
|
+
email: '<email>',
|
|
1338
|
+
providerType: '<providerType>',
|
|
1339
|
+
/* ...request body fields */
|
|
1340
|
+
});
|
|
1341
|
+
if (isError) throw new Error(message);
|
|
1342
|
+
console.log(result);
|
|
1343
|
+
```
|
|
1344
|
+
|
|
1345
|
+
Example response:
|
|
1346
|
+
|
|
1347
|
+
```json
|
|
1348
|
+
{
|
|
1349
|
+
"isError": false,
|
|
1350
|
+
"message": "",
|
|
1351
|
+
"result": true
|
|
1352
|
+
}
|
|
1353
|
+
```
|
|
1354
|
+
|
|
1355
|
+
---
|
|
1356
|
+
|
|
1357
|
+
### `saveProviderWalletsForAvatarByIdAsync`
|
|
1358
|
+
|
|
1359
|
+
Save provider wallets for an avatar by ID.
|
|
1360
|
+
|
|
1361
|
+
**POST** `api/wallet/avatar/{id}/wallets`
|
|
1362
|
+
|
|
1363
|
+
Route parameters:
|
|
1364
|
+
|
|
1365
|
+
| Field | Type |
|
|
1366
|
+
| --- | --- |
|
|
1367
|
+
| `id` | `Guid` |
|
|
1368
|
+
|
|
1369
|
+
**Request**
|
|
1370
|
+
|
|
1371
|
+
Body type: `Dictionary<ProviderType, List<IProviderWallet>>` - a key/value map keyed by `ProviderType`, each value a `List<IProviderWallet>`.
|
|
1372
|
+
|
|
1373
|
+
**Response**
|
|
1374
|
+
|
|
1375
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
1376
|
+
|
|
1377
|
+
`result` type: `bool`
|
|
1378
|
+
|
|
1379
|
+
**Example**
|
|
1380
|
+
|
|
1381
|
+
```js
|
|
1382
|
+
const { isError, message, result } = await oasis.wallet.saveProviderWalletsForAvatarByIdAsync({
|
|
1383
|
+
id: '<id>',
|
|
1384
|
+
providerType: '<providerType>',
|
|
1385
|
+
/* ...request body fields */
|
|
1386
|
+
});
|
|
1387
|
+
if (isError) throw new Error(message);
|
|
1388
|
+
console.log(result);
|
|
1389
|
+
```
|
|
1390
|
+
|
|
1391
|
+
Example response:
|
|
1392
|
+
|
|
1393
|
+
```json
|
|
1394
|
+
{
|
|
1395
|
+
"isError": false,
|
|
1396
|
+
"message": "",
|
|
1397
|
+
"result": true
|
|
1398
|
+
}
|
|
1399
|
+
```
|
|
1400
|
+
|
|
1401
|
+
---
|
|
1402
|
+
|
|
1403
|
+
### `saveProviderWalletsForAvatarByUsernameAsync`
|
|
1404
|
+
|
|
1405
|
+
Save provider wallets for an avatar by username.
|
|
1406
|
+
|
|
1407
|
+
**POST** `api/wallet/avatar/username/{username}/wallets`
|
|
1408
|
+
|
|
1409
|
+
Route parameters:
|
|
1410
|
+
|
|
1411
|
+
| Field | Type |
|
|
1412
|
+
| --- | --- |
|
|
1413
|
+
| `username` | `string` |
|
|
1414
|
+
|
|
1415
|
+
**Request**
|
|
1416
|
+
|
|
1417
|
+
Body type: `Dictionary<ProviderType, List<IProviderWallet>>` - a key/value map keyed by `ProviderType`, each value a `List<IProviderWallet>`.
|
|
1418
|
+
|
|
1419
|
+
**Response**
|
|
1420
|
+
|
|
1421
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
1422
|
+
|
|
1423
|
+
`result` type: `bool`
|
|
1424
|
+
|
|
1425
|
+
**Example**
|
|
1426
|
+
|
|
1427
|
+
```js
|
|
1428
|
+
const { isError, message, result } = await oasis.wallet.saveProviderWalletsForAvatarByUsernameAsync({
|
|
1429
|
+
username: '<username>',
|
|
1430
|
+
providerType: '<providerType>',
|
|
1431
|
+
/* ...request body fields */
|
|
1432
|
+
});
|
|
1433
|
+
if (isError) throw new Error(message);
|
|
1434
|
+
console.log(result);
|
|
1435
|
+
```
|
|
1436
|
+
|
|
1437
|
+
Example response:
|
|
1438
|
+
|
|
1439
|
+
```json
|
|
1440
|
+
{
|
|
1441
|
+
"isError": false,
|
|
1442
|
+
"message": "",
|
|
1443
|
+
"result": true
|
|
1444
|
+
}
|
|
1445
|
+
```
|
|
1446
|
+
|
|
1447
|
+
---
|
|
1448
|
+
|
|
1449
|
+
### `sendTokenAsync`
|
|
1450
|
+
|
|
1451
|
+
Send's a given token to the target provider.
|
|
1452
|
+
|
|
1453
|
+
**POST** `api/wallet/send_token`
|
|
1454
|
+
|
|
1455
|
+
**Request**
|
|
1456
|
+
|
|
1457
|
+
Body type: `ISendWeb4TokenRequest`
|
|
1458
|
+
|
|
1459
|
+
| Field | Type |
|
|
1460
|
+
| --- | --- |
|
|
1461
|
+
| `FromProvider` | `EnumValue<ProviderType>` |
|
|
1462
|
+
| `ToProvider` | `EnumValue<ProviderType>` |
|
|
1463
|
+
| `FromAvatarId` | `Guid` |
|
|
1464
|
+
| `FromAvatarUsername` | `string` |
|
|
1465
|
+
| `FromAvatarEmail` | `string` |
|
|
1466
|
+
| `ToAvatarId` | `Guid` |
|
|
1467
|
+
| `ToAvatarUsername` | `string` |
|
|
1468
|
+
| `ToAvatarEmail` | `string` |
|
|
1469
|
+
| `WaitTillTokenSent` | `bool` |
|
|
1470
|
+
| `WaitForTokenToSendInSeconds` | `int` |
|
|
1471
|
+
| `AttemptToSendTokenEveryXSeconds` | `int` |
|
|
1472
|
+
| `WaitTillTokenLocked` | `bool` |
|
|
1473
|
+
| `WaitForTokenToLockInSeconds` | `int` |
|
|
1474
|
+
| `AttemptToLockEveryXSeconds` | `int` |
|
|
1475
|
+
| `WaitTillTokenBurnt` | `bool` |
|
|
1476
|
+
| `WaitForTokenToBurnInSeconds` | `int` |
|
|
1477
|
+
| `AttemptToBurnEveryXSeconds` | `int` |
|
|
1478
|
+
| `WaitTillTokenUnlocked` | `bool` |
|
|
1479
|
+
| `WaitForTokenToUnlockInSeconds` | `int` |
|
|
1480
|
+
| `AttemptToUnlockEveryXSeconds` | `int` |
|
|
1481
|
+
|
|
1482
|
+
**Response**
|
|
1483
|
+
|
|
1484
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
1485
|
+
|
|
1486
|
+
`result` type: `ISendWeb4TokenResponse`
|
|
1487
|
+
|
|
1488
|
+
| Field | Type |
|
|
1489
|
+
| --- | --- |
|
|
1490
|
+
| `SendTransactionResult` | `string` |
|
|
1491
|
+
| `LockTransactionResult` | `string` |
|
|
1492
|
+
| `BurnTransactionResult` | `string` |
|
|
1493
|
+
| `UnlockTransactionResult` | `string` |
|
|
1494
|
+
| `BridgeOrderId` | `string` |
|
|
1495
|
+
|
|
1496
|
+
**Example**
|
|
1497
|
+
|
|
1498
|
+
```js
|
|
1499
|
+
const { isError, message, result } = await oasis.wallet.sendTokenAsync({
|
|
1500
|
+
fromProvider: { "Score": 1.0 },
|
|
1501
|
+
toProvider: { "Score": 1.0 },
|
|
1502
|
+
fromAvatarId: "3fa85f64-5717-4562-b3fc-2c963f66afa6",
|
|
1503
|
+
fromAvatarUsername: "example string",
|
|
1504
|
+
fromAvatarEmail: "example string",
|
|
1505
|
+
toAvatarId: "3fa85f64-5717-4562-b3fc-2c963f66afa6",
|
|
1506
|
+
toAvatarUsername: "example string",
|
|
1507
|
+
toAvatarEmail: "example string",
|
|
1508
|
+
waitTillTokenSent: true,
|
|
1509
|
+
waitForTokenToSendInSeconds: 1,
|
|
1510
|
+
attemptToSendTokenEveryXSeconds: 1,
|
|
1511
|
+
waitTillTokenLocked: true,
|
|
1512
|
+
waitForTokenToLockInSeconds: 1,
|
|
1513
|
+
attemptToLockEveryXSeconds: 1,
|
|
1514
|
+
waitTillTokenBurnt: true,
|
|
1515
|
+
waitForTokenToBurnInSeconds: 1,
|
|
1516
|
+
attemptToBurnEveryXSeconds: 1,
|
|
1517
|
+
waitTillTokenUnlocked: true,
|
|
1518
|
+
waitForTokenToUnlockInSeconds: 1,
|
|
1519
|
+
attemptToUnlockEveryXSeconds: 1
|
|
1520
|
+
});
|
|
1521
|
+
if (isError) throw new Error(message);
|
|
1522
|
+
console.log(result);
|
|
1523
|
+
```
|
|
1524
|
+
|
|
1525
|
+
Example response:
|
|
1526
|
+
|
|
1527
|
+
```json
|
|
1528
|
+
{
|
|
1529
|
+
"isError": false,
|
|
1530
|
+
"message": "",
|
|
1531
|
+
"result": { "SendTransactionResult": "example string", "LockTransactionResult": "example string", "BurnTransactionResult": "example string", "UnlockTransactionResult": "example string", "BridgeOrderId": "example string" }
|
|
1532
|
+
}
|
|
1533
|
+
```
|
|
1534
|
+
|
|
1535
|
+
---
|
|
1536
|
+
|
|
1537
|
+
### `setAvatarDefaultWalletByEmailAsync`
|
|
1538
|
+
|
|
1539
|
+
Set the default wallet for an avatar by email.
|
|
1540
|
+
|
|
1541
|
+
**POST** `api/wallet/avatar/email/{email}/default-wallet/{walletId}`
|
|
1542
|
+
|
|
1543
|
+
Route parameters:
|
|
1544
|
+
|
|
1545
|
+
| Field | Type |
|
|
1546
|
+
| --- | --- |
|
|
1547
|
+
| `email` | `string` |
|
|
1548
|
+
| `walletId` | `Guid` |
|
|
1549
|
+
|
|
1550
|
+
**Request**
|
|
1551
|
+
|
|
1552
|
+
Body fields:
|
|
1553
|
+
|
|
1554
|
+
| Field | Type |
|
|
1555
|
+
| --- | --- |
|
|
1556
|
+
| `providerType` | `ProviderType` |
|
|
1557
|
+
|
|
1558
|
+
**Response**
|
|
1559
|
+
|
|
1560
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
1561
|
+
|
|
1562
|
+
`result` type: `IProviderWallet`
|
|
1563
|
+
|
|
1564
|
+
| Field | Type |
|
|
1565
|
+
| --- | --- |
|
|
1566
|
+
| `AvatarId` | `Guid` |
|
|
1567
|
+
| `WalletId` | `Guid` |
|
|
1568
|
+
| `Name` | `string` |
|
|
1569
|
+
| `Description` | `new string` |
|
|
1570
|
+
| `PrivateKey` | `string` |
|
|
1571
|
+
| `PublicKey` | `string` |
|
|
1572
|
+
| `WalletAddress` | `string` |
|
|
1573
|
+
| `WalletAddressSegwitP2SH` | `string` |
|
|
1574
|
+
| `SecretRecoveryPhrase` | `string` |
|
|
1575
|
+
| `Transactions` | `List<IWalletTransaction>` |
|
|
1576
|
+
| `ProviderType` | `ProviderType` |
|
|
1577
|
+
| `Balance` | `double` |
|
|
1578
|
+
| `IsDefaultWallet` | `bool` |
|
|
1579
|
+
|
|
1580
|
+
**Example**
|
|
1581
|
+
|
|
1582
|
+
```js
|
|
1583
|
+
const { isError, message, result } = await oasis.wallet.setAvatarDefaultWalletByEmailAsync({
|
|
1584
|
+
email: '<email>',
|
|
1585
|
+
walletId: '<walletId>',
|
|
1586
|
+
providerType: '<providerType>'
|
|
1587
|
+
});
|
|
1588
|
+
if (isError) throw new Error(message);
|
|
1589
|
+
console.log(result);
|
|
1590
|
+
```
|
|
1591
|
+
|
|
1592
|
+
Example response:
|
|
1593
|
+
|
|
1594
|
+
```json
|
|
1595
|
+
{
|
|
1596
|
+
"isError": false,
|
|
1597
|
+
"message": "",
|
|
1598
|
+
"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 }
|
|
1599
|
+
}
|
|
1600
|
+
```
|
|
1601
|
+
|
|
1602
|
+
---
|
|
1603
|
+
|
|
1604
|
+
### `setAvatarDefaultWalletByIdAsync`
|
|
1605
|
+
|
|
1606
|
+
Set the default wallet for an avatar by ID.
|
|
1607
|
+
|
|
1608
|
+
**POST** `api/wallet/avatar/{id}/default-wallet/{walletId}`
|
|
1609
|
+
|
|
1610
|
+
Route parameters:
|
|
1611
|
+
|
|
1612
|
+
| Field | Type |
|
|
1613
|
+
| --- | --- |
|
|
1614
|
+
| `id` | `Guid` |
|
|
1615
|
+
| `walletId` | `Guid` |
|
|
1616
|
+
|
|
1617
|
+
**Request**
|
|
1618
|
+
|
|
1619
|
+
Body fields:
|
|
1620
|
+
|
|
1621
|
+
| Field | Type |
|
|
1622
|
+
| --- | --- |
|
|
1623
|
+
| `providerType` | `ProviderType` |
|
|
1624
|
+
|
|
1625
|
+
**Response**
|
|
1626
|
+
|
|
1627
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
1628
|
+
|
|
1629
|
+
`result` type: `IProviderWallet`
|
|
1630
|
+
|
|
1631
|
+
| Field | Type |
|
|
1632
|
+
| --- | --- |
|
|
1633
|
+
| `AvatarId` | `Guid` |
|
|
1634
|
+
| `WalletId` | `Guid` |
|
|
1635
|
+
| `Name` | `string` |
|
|
1636
|
+
| `Description` | `new string` |
|
|
1637
|
+
| `PrivateKey` | `string` |
|
|
1638
|
+
| `PublicKey` | `string` |
|
|
1639
|
+
| `WalletAddress` | `string` |
|
|
1640
|
+
| `WalletAddressSegwitP2SH` | `string` |
|
|
1641
|
+
| `SecretRecoveryPhrase` | `string` |
|
|
1642
|
+
| `Transactions` | `List<IWalletTransaction>` |
|
|
1643
|
+
| `ProviderType` | `ProviderType` |
|
|
1644
|
+
| `Balance` | `double` |
|
|
1645
|
+
| `IsDefaultWallet` | `bool` |
|
|
1646
|
+
|
|
1647
|
+
**Example**
|
|
1648
|
+
|
|
1649
|
+
```js
|
|
1650
|
+
const { isError, message, result } = await oasis.wallet.setAvatarDefaultWalletByIdAsync({
|
|
1651
|
+
id: '<id>',
|
|
1652
|
+
walletId: '<walletId>',
|
|
1653
|
+
providerType: '<providerType>'
|
|
1654
|
+
});
|
|
1655
|
+
if (isError) throw new Error(message);
|
|
1656
|
+
console.log(result);
|
|
1657
|
+
```
|
|
1658
|
+
|
|
1659
|
+
Example response:
|
|
1660
|
+
|
|
1661
|
+
```json
|
|
1662
|
+
{
|
|
1663
|
+
"isError": false,
|
|
1664
|
+
"message": "",
|
|
1665
|
+
"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 }
|
|
1666
|
+
}
|
|
1667
|
+
```
|
|
1668
|
+
|
|
1669
|
+
---
|
|
1670
|
+
|
|
1671
|
+
### `setAvatarDefaultWalletByUsernameAsync`
|
|
1672
|
+
|
|
1673
|
+
Set the default wallet for an avatar by username.
|
|
1674
|
+
|
|
1675
|
+
**POST** `api/wallet/avatar/username/{username}/default-wallet/{walletId}`
|
|
1676
|
+
|
|
1677
|
+
Route parameters:
|
|
1678
|
+
|
|
1679
|
+
| Field | Type |
|
|
1680
|
+
| --- | --- |
|
|
1681
|
+
| `username` | `string` |
|
|
1682
|
+
| `walletId` | `Guid` |
|
|
1683
|
+
|
|
1684
|
+
**Request**
|
|
1685
|
+
|
|
1686
|
+
Body fields:
|
|
1687
|
+
|
|
1688
|
+
| Field | Type |
|
|
1689
|
+
| --- | --- |
|
|
1690
|
+
| `providerType` | `ProviderType` |
|
|
1691
|
+
|
|
1692
|
+
**Response**
|
|
1693
|
+
|
|
1694
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
1695
|
+
|
|
1696
|
+
`result` type: `IProviderWallet`
|
|
1697
|
+
|
|
1698
|
+
| Field | Type |
|
|
1699
|
+
| --- | --- |
|
|
1700
|
+
| `AvatarId` | `Guid` |
|
|
1701
|
+
| `WalletId` | `Guid` |
|
|
1702
|
+
| `Name` | `string` |
|
|
1703
|
+
| `Description` | `new string` |
|
|
1704
|
+
| `PrivateKey` | `string` |
|
|
1705
|
+
| `PublicKey` | `string` |
|
|
1706
|
+
| `WalletAddress` | `string` |
|
|
1707
|
+
| `WalletAddressSegwitP2SH` | `string` |
|
|
1708
|
+
| `SecretRecoveryPhrase` | `string` |
|
|
1709
|
+
| `Transactions` | `List<IWalletTransaction>` |
|
|
1710
|
+
| `ProviderType` | `ProviderType` |
|
|
1711
|
+
| `Balance` | `double` |
|
|
1712
|
+
| `IsDefaultWallet` | `bool` |
|
|
1713
|
+
|
|
1714
|
+
**Example**
|
|
1715
|
+
|
|
1716
|
+
```js
|
|
1717
|
+
const { isError, message, result } = await oasis.wallet.setAvatarDefaultWalletByUsernameAsync({
|
|
1718
|
+
username: '<username>',
|
|
1719
|
+
walletId: '<walletId>',
|
|
1720
|
+
providerType: '<providerType>'
|
|
1721
|
+
});
|
|
1722
|
+
if (isError) throw new Error(message);
|
|
1723
|
+
console.log(result);
|
|
1724
|
+
```
|
|
1725
|
+
|
|
1726
|
+
Example response:
|
|
1727
|
+
|
|
1728
|
+
```json
|
|
1729
|
+
{
|
|
1730
|
+
"isError": false,
|
|
1731
|
+
"message": "",
|
|
1732
|
+
"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 }
|
|
1733
|
+
}
|
|
1734
|
+
```
|
|
1735
|
+
|
|
1736
|
+
---
|
|
1737
|
+
|
|
1738
|
+
### `transferBetweenWalletsAsync`
|
|
1739
|
+
|
|
1740
|
+
Transfer tokens between wallets.
|
|
1741
|
+
|
|
1742
|
+
**POST** `api/wallet/transfer`
|
|
1743
|
+
|
|
1744
|
+
**Request**
|
|
1745
|
+
|
|
1746
|
+
Body fields:
|
|
1747
|
+
|
|
1748
|
+
| Field | Type |
|
|
1749
|
+
| --- | --- |
|
|
1750
|
+
| `request` | `object` |
|
|
1751
|
+
|
|
1752
|
+
**Response**
|
|
1753
|
+
|
|
1754
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
1755
|
+
|
|
1756
|
+
`result` type: `object`
|
|
1757
|
+
|
|
1758
|
+
**Example**
|
|
1759
|
+
|
|
1760
|
+
```js
|
|
1761
|
+
const { isError, message, result } = await oasis.wallet.transferBetweenWalletsAsync({
|
|
1762
|
+
request: {}
|
|
1763
|
+
});
|
|
1764
|
+
if (isError) throw new Error(message);
|
|
1765
|
+
console.log(result);
|
|
1766
|
+
```
|
|
1767
|
+
|
|
1768
|
+
Example response:
|
|
1769
|
+
|
|
1770
|
+
```json
|
|
1771
|
+
{
|
|
1772
|
+
"isError": false,
|
|
1773
|
+
"message": "",
|
|
1774
|
+
"result": {}
|
|
1775
|
+
}
|
|
1776
|
+
```
|
|
1777
|
+
|
|
1778
|
+
---
|
|
1779
|
+
|
|
1780
|
+
### `updateWalletForAvatarByEmailAsync`
|
|
1781
|
+
|
|
1782
|
+
Update a wallet for an avatar by email.
|
|
1783
|
+
|
|
1784
|
+
**PUT** `api/wallet/avatar/email/{email}/wallet/{walletId}`
|
|
1785
|
+
|
|
1786
|
+
Route parameters:
|
|
1787
|
+
|
|
1788
|
+
| Field | Type |
|
|
1789
|
+
| --- | --- |
|
|
1790
|
+
| `email` | `string` |
|
|
1791
|
+
| `walletId` | `Guid` |
|
|
1792
|
+
|
|
1793
|
+
**Request**
|
|
1794
|
+
|
|
1795
|
+
Body type: `UpdateWalletRequest`
|
|
1796
|
+
|
|
1797
|
+
| Field | Type |
|
|
1798
|
+
| --- | --- |
|
|
1799
|
+
| `Name` | `string` |
|
|
1800
|
+
| `Description` | `string` |
|
|
1801
|
+
| `WalletProviderType` | `ProviderType` |
|
|
1802
|
+
|
|
1803
|
+
**Response**
|
|
1804
|
+
|
|
1805
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
1806
|
+
|
|
1807
|
+
`result` type: `IProviderWallet`
|
|
1808
|
+
|
|
1809
|
+
| Field | Type |
|
|
1810
|
+
| --- | --- |
|
|
1811
|
+
| `AvatarId` | `Guid` |
|
|
1812
|
+
| `WalletId` | `Guid` |
|
|
1813
|
+
| `Name` | `string` |
|
|
1814
|
+
| `Description` | `new string` |
|
|
1815
|
+
| `PrivateKey` | `string` |
|
|
1816
|
+
| `PublicKey` | `string` |
|
|
1817
|
+
| `WalletAddress` | `string` |
|
|
1818
|
+
| `WalletAddressSegwitP2SH` | `string` |
|
|
1819
|
+
| `SecretRecoveryPhrase` | `string` |
|
|
1820
|
+
| `Transactions` | `List<IWalletTransaction>` |
|
|
1821
|
+
| `ProviderType` | `ProviderType` |
|
|
1822
|
+
| `Balance` | `double` |
|
|
1823
|
+
| `IsDefaultWallet` | `bool` |
|
|
1824
|
+
|
|
1825
|
+
**Example**
|
|
1826
|
+
|
|
1827
|
+
```js
|
|
1828
|
+
const { isError, message, result } = await oasis.wallet.updateWalletForAvatarByEmailAsync({
|
|
1829
|
+
email: '<email>',
|
|
1830
|
+
walletId: '<walletId>',
|
|
1831
|
+
providerTypeToLoadSave: '<providerTypeToLoadSave>',
|
|
1832
|
+
name: "example string",
|
|
1833
|
+
description: "example string",
|
|
1834
|
+
walletProviderType: { }
|
|
1835
|
+
});
|
|
1836
|
+
if (isError) throw new Error(message);
|
|
1837
|
+
console.log(result);
|
|
1838
|
+
```
|
|
1839
|
+
|
|
1840
|
+
Example response:
|
|
1841
|
+
|
|
1842
|
+
```json
|
|
1843
|
+
{
|
|
1844
|
+
"isError": false,
|
|
1845
|
+
"message": "",
|
|
1846
|
+
"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 }
|
|
1847
|
+
}
|
|
1848
|
+
```
|
|
1849
|
+
|
|
1850
|
+
---
|
|
1851
|
+
|
|
1852
|
+
### `updateWalletForAvatarByIdAsync`
|
|
1853
|
+
|
|
1854
|
+
Update a wallet for an avatar by ID.
|
|
1855
|
+
|
|
1856
|
+
**PUT** `api/wallet/avatar/{avatarId}/wallet/{walletId}`
|
|
1857
|
+
|
|
1858
|
+
Route parameters:
|
|
1859
|
+
|
|
1860
|
+
| Field | Type |
|
|
1861
|
+
| --- | --- |
|
|
1862
|
+
| `avatarId` | `Guid` |
|
|
1863
|
+
| `walletId` | `Guid` |
|
|
1864
|
+
|
|
1865
|
+
**Request**
|
|
1866
|
+
|
|
1867
|
+
Body type: `UpdateWalletRequest`
|
|
1868
|
+
|
|
1869
|
+
| Field | Type |
|
|
1870
|
+
| --- | --- |
|
|
1871
|
+
| `Name` | `string` |
|
|
1872
|
+
| `Description` | `string` |
|
|
1873
|
+
| `WalletProviderType` | `ProviderType` |
|
|
1874
|
+
|
|
1875
|
+
**Response**
|
|
1876
|
+
|
|
1877
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
1878
|
+
|
|
1879
|
+
`result` type: `IProviderWallet`
|
|
1880
|
+
|
|
1881
|
+
| Field | Type |
|
|
1882
|
+
| --- | --- |
|
|
1883
|
+
| `AvatarId` | `Guid` |
|
|
1884
|
+
| `WalletId` | `Guid` |
|
|
1885
|
+
| `Name` | `string` |
|
|
1886
|
+
| `Description` | `new string` |
|
|
1887
|
+
| `PrivateKey` | `string` |
|
|
1888
|
+
| `PublicKey` | `string` |
|
|
1889
|
+
| `WalletAddress` | `string` |
|
|
1890
|
+
| `WalletAddressSegwitP2SH` | `string` |
|
|
1891
|
+
| `SecretRecoveryPhrase` | `string` |
|
|
1892
|
+
| `Transactions` | `List<IWalletTransaction>` |
|
|
1893
|
+
| `ProviderType` | `ProviderType` |
|
|
1894
|
+
| `Balance` | `double` |
|
|
1895
|
+
| `IsDefaultWallet` | `bool` |
|
|
1896
|
+
|
|
1897
|
+
**Example**
|
|
1898
|
+
|
|
1899
|
+
```js
|
|
1900
|
+
const { isError, message, result } = await oasis.wallet.updateWalletForAvatarByIdAsync({
|
|
1901
|
+
avatarId: '<avatarId>',
|
|
1902
|
+
walletId: '<walletId>',
|
|
1903
|
+
providerTypeToLoadSave: '<providerTypeToLoadSave>',
|
|
1904
|
+
name: "example string",
|
|
1905
|
+
description: "example string",
|
|
1906
|
+
walletProviderType: { }
|
|
1907
|
+
});
|
|
1908
|
+
if (isError) throw new Error(message);
|
|
1909
|
+
console.log(result);
|
|
1910
|
+
```
|
|
1911
|
+
|
|
1912
|
+
Example response:
|
|
1913
|
+
|
|
1914
|
+
```json
|
|
1915
|
+
{
|
|
1916
|
+
"isError": false,
|
|
1917
|
+
"message": "",
|
|
1918
|
+
"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 }
|
|
1919
|
+
}
|
|
1920
|
+
```
|
|
1921
|
+
|
|
1922
|
+
---
|
|
1923
|
+
|
|
1924
|
+
### `updateWalletForAvatarByUsernameAsync`
|
|
1925
|
+
|
|
1926
|
+
Update a wallet for an avatar by username.
|
|
1927
|
+
|
|
1928
|
+
**PUT** `api/wallet/avatar/username/{username}/wallet/{walletId}`
|
|
1929
|
+
|
|
1930
|
+
Route parameters:
|
|
1931
|
+
|
|
1932
|
+
| Field | Type |
|
|
1933
|
+
| --- | --- |
|
|
1934
|
+
| `username` | `string` |
|
|
1935
|
+
| `walletId` | `Guid` |
|
|
1936
|
+
|
|
1937
|
+
**Request**
|
|
1938
|
+
|
|
1939
|
+
Body type: `UpdateWalletRequest`
|
|
1940
|
+
|
|
1941
|
+
| Field | Type |
|
|
1942
|
+
| --- | --- |
|
|
1943
|
+
| `Name` | `string` |
|
|
1944
|
+
| `Description` | `string` |
|
|
1945
|
+
| `WalletProviderType` | `ProviderType` |
|
|
1946
|
+
|
|
1947
|
+
**Response**
|
|
1948
|
+
|
|
1949
|
+
Standard `OASISResult` envelope (see top of this page) with:
|
|
1950
|
+
|
|
1951
|
+
`result` type: `IProviderWallet`
|
|
1952
|
+
|
|
1953
|
+
| Field | Type |
|
|
1954
|
+
| --- | --- |
|
|
1955
|
+
| `AvatarId` | `Guid` |
|
|
1956
|
+
| `WalletId` | `Guid` |
|
|
1957
|
+
| `Name` | `string` |
|
|
1958
|
+
| `Description` | `new string` |
|
|
1959
|
+
| `PrivateKey` | `string` |
|
|
1960
|
+
| `PublicKey` | `string` |
|
|
1961
|
+
| `WalletAddress` | `string` |
|
|
1962
|
+
| `WalletAddressSegwitP2SH` | `string` |
|
|
1963
|
+
| `SecretRecoveryPhrase` | `string` |
|
|
1964
|
+
| `Transactions` | `List<IWalletTransaction>` |
|
|
1965
|
+
| `ProviderType` | `ProviderType` |
|
|
1966
|
+
| `Balance` | `double` |
|
|
1967
|
+
| `IsDefaultWallet` | `bool` |
|
|
1968
|
+
|
|
1969
|
+
**Example**
|
|
1970
|
+
|
|
1971
|
+
```js
|
|
1972
|
+
const { isError, message, result } = await oasis.wallet.updateWalletForAvatarByUsernameAsync({
|
|
1973
|
+
username: '<username>',
|
|
1974
|
+
walletId: '<walletId>',
|
|
1975
|
+
providerTypeToLoadSave: '<providerTypeToLoadSave>',
|
|
1976
|
+
name: "example string",
|
|
1977
|
+
description: "example string",
|
|
1978
|
+
walletProviderType: { }
|
|
1979
|
+
});
|
|
1980
|
+
if (isError) throw new Error(message);
|
|
1981
|
+
console.log(result);
|
|
1982
|
+
```
|
|
1983
|
+
|
|
1984
|
+
Example response:
|
|
1985
|
+
|
|
1986
|
+
```json
|
|
1987
|
+
{
|
|
1988
|
+
"isError": false,
|
|
1989
|
+
"message": "",
|
|
1990
|
+
"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 }
|
|
1991
|
+
}
|
|
1992
|
+
```
|
|
1993
|
+
|