@eluvio/elv-client-js 4.0.11 → 4.0.13

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 (111) hide show
  1. package/dist/.keep +0 -0
  2. package/dist/ElvClient-min.js +11 -10
  3. package/dist/ElvClient-node-min.js +11 -10
  4. package/dist/ElvFrameClient-min.js +11 -10
  5. package/dist/ElvPermissionsClient-min.js +10 -9
  6. package/dist/ElvWalletClient-min.js +10 -9
  7. package/dist/ElvWalletClient-node-min.js +10 -9
  8. package/dist/src/AuthorizationClient.js +1555 -2076
  9. package/dist/src/ContentObjectVerification.js +134 -185
  10. package/dist/src/Crypto.js +224 -319
  11. package/dist/src/ElvClient.js +822 -1114
  12. package/dist/src/ElvWallet.js +64 -106
  13. package/dist/src/EthClient.js +719 -974
  14. package/dist/src/FrameClient.js +223 -319
  15. package/dist/src/HttpClient.js +117 -156
  16. package/dist/src/Id.js +1 -6
  17. package/dist/src/LogMessage.js +4 -8
  18. package/dist/src/PermissionsClient.js +973 -1271
  19. package/dist/src/RemoteSigner.js +161 -232
  20. package/dist/src/UserProfileClient.js +781 -1038
  21. package/dist/src/Utils.js +159 -299
  22. package/dist/src/Validation.js +2 -17
  23. package/dist/src/client/ABRPublishing.js +828 -958
  24. package/dist/src/client/AccessGroups.js +849 -1095
  25. package/dist/src/client/ContentAccess.js +3323 -4195
  26. package/dist/src/client/ContentManagement.js +1818 -2290
  27. package/dist/src/client/Contracts.js +468 -614
  28. package/dist/src/client/Files.js +1506 -1846
  29. package/dist/src/client/NFT.js +94 -116
  30. package/dist/src/client/NTP.js +326 -425
  31. package/dist/src/index.js +2 -5
  32. package/dist/src/walletClient/ClientMethods.js +1368 -1763
  33. package/dist/src/walletClient/Configuration.js +5 -3
  34. package/dist/src/walletClient/Notifications.js +98 -127
  35. package/dist/src/walletClient/Profile.js +184 -246
  36. package/dist/src/walletClient/Utils.js +76 -122
  37. package/dist/src/walletClient/index.js +1171 -1496
  38. package/package.json +4 -21
  39. package/src/FrameClient.js +1 -0
  40. package/src/HttpClient.js +4 -2
  41. package/src/client/ABRPublishing.js +126 -105
  42. package/src/client/ContentAccess.js +1 -0
  43. package/src/client/ContentManagement.js +4 -2
  44. package/src/walletClient/Configuration.js +3 -2
  45. package/dist/AccessClient-min.js +0 -54
  46. package/dist/AccessClient-node-min.js +0 -74
  47. package/dist/src/AccessClient.js +0 -798
  48. package/dist/src/LimitedMap.js +0 -120
  49. package/dist/src/client/Access.js +0 -1
  50. package/dist/src/client/Management.js +0 -1606
  51. package/dist/src/contracts/AccessIndexor.js +0 -831
  52. package/dist/src/contracts/Accessible.js +0 -31
  53. package/dist/src/contracts/AdmgrAdvertisement.js +0 -695
  54. package/dist/src/contracts/AdmgrCampaign.js +0 -648
  55. package/dist/src/contracts/AdmgrCampaignManager.js +0 -493
  56. package/dist/src/contracts/AdmgrCommercialOffering.js +0 -622
  57. package/dist/src/contracts/AdmgrCommercialOfferingManager.js +0 -413
  58. package/dist/src/contracts/AdmgrMarketPlace.js +0 -413
  59. package/dist/src/contracts/AvailsDelivery.js +0 -535
  60. package/dist/src/contracts/BaseAccessControlGroup.js +0 -1221
  61. package/dist/src/contracts/BaseAccessWallet.js +0 -1575
  62. package/dist/src/contracts/BaseAccessWalletFactory.js +0 -93
  63. package/dist/src/contracts/BaseContent.js +0 -1104
  64. package/dist/src/contracts/BaseContentFactory.js +0 -99
  65. package/dist/src/contracts/BaseContentFactoryExt.js +0 -219
  66. package/dist/src/contracts/BaseContentSpace.js +0 -1346
  67. package/dist/src/contracts/BaseContentType.js +0 -353
  68. package/dist/src/contracts/BaseFactory.js +0 -107
  69. package/dist/src/contracts/BaseGroupFactory.js +0 -93
  70. package/dist/src/contracts/BaseLibrary.js +0 -1035
  71. package/dist/src/contracts/BaseLibraryFactory.js +0 -96
  72. package/dist/src/contracts/Certifyer.js +0 -87
  73. package/dist/src/contracts/Container.js +0 -543
  74. package/dist/src/contracts/Content.js +0 -432
  75. package/dist/src/contracts/Editable.js +0 -295
  76. package/dist/src/contracts/FactorySpace.js +0 -57
  77. package/dist/src/contracts/KmsSpace.js +0 -52
  78. package/dist/src/contracts/LvProvider.js +0 -512
  79. package/dist/src/contracts/LvRecordableStream.js +0 -1026
  80. package/dist/src/contracts/LvRecording.js +0 -627
  81. package/dist/src/contracts/LvStreamRightsHolder.js +0 -551
  82. package/dist/src/contracts/MetaObject.js +0 -110
  83. package/dist/src/contracts/Node.js +0 -167
  84. package/dist/src/contracts/NodeSpace.js +0 -18
  85. package/dist/src/contracts/NodeSpaceImpl.js +0 -273
  86. package/dist/src/contracts/Ownable.js +0 -87
  87. package/dist/src/contracts/PaymentService.js +0 -616
  88. package/dist/src/contracts/Precompile.js +0 -15
  89. package/dist/src/contracts/SampleContentAdMarketplace.js +0 -564
  90. package/dist/src/contracts/SampleContentAdvertising.js +0 -444
  91. package/dist/src/contracts/SampleContentHelloWorld.js +0 -459
  92. package/dist/src/contracts/SampleContentLicensing.js +0 -618
  93. package/dist/src/contracts/SampleContentSigned.js +0 -447
  94. package/dist/src/contracts/SampleInstance.js +0 -438
  95. package/dist/src/contracts/SampleInstanceFactory.js +0 -451
  96. package/dist/src/contracts/Transactable.js +0 -82
  97. package/dist/src/contracts/UserSpace.js +0 -18
  98. package/dist/src/contracts/UserSpaceImpl.js +0 -43
  99. package/dist/src/contracts/Utils.js +0 -18
  100. package/dist/src/contracts/Verifier.js +0 -53
  101. package/dist/src/contracts/strings.js +0 -4
  102. package/dist/src/contracts/v2/BaseContentFactoryExt.js +0 -219
  103. package/dist/src/contracts/v2/FactorySpace.js +0 -57
  104. package/dist/src/contracts/v2/KmsSpace.js +0 -52
  105. package/dist/src/contracts/v2/NodeSpaceImpl.js +0 -273
  106. package/dist/src/contracts/v2/UserSpaceImpl.js +0 -43
  107. package/dist/src/marketplaceClient/ClientMethods.js +0 -1918
  108. package/dist/src/marketplaceClient/Configuration.js +0 -29
  109. package/dist/src/marketplaceClient/Utils.js +0 -304
  110. package/dist/src/marketplaceClient/index.js +0 -1553
  111. package/utilities/ListAccessGroups.js +0 -34
@@ -1,31 +1,26 @@
1
1
  var _typeof = require("@babel/runtime/helpers/typeof");
2
-
3
2
  var _regeneratorRuntime = require("@babel/runtime/regenerator");
4
-
5
3
  var _asyncToGenerator = require("@babel/runtime/helpers/asyncToGenerator");
6
-
7
4
  var Utils = require("../Utils");
8
-
9
5
  var UrlJoin = require("url-join");
10
-
11
6
  var StateStorePath = function StateStorePath(_ref) {
12
7
  var network = _ref.network,
13
- path = _ref.path;
8
+ path = _ref.path;
14
9
  return UrlJoin(network === "main" ? "/main" : "/dv3", path);
15
10
  };
16
-
17
11
  var UserProfilePath = function UserProfilePath(_ref2) {
18
12
  var network = _ref2.network,
19
- appId = _ref2.appId,
20
- userAddress = _ref2.userAddress,
21
- key = _ref2.key,
22
- type = _ref2.type,
23
- mode = _ref2.mode;
13
+ appId = _ref2.appId,
14
+ userAddress = _ref2.userAddress,
15
+ key = _ref2.key,
16
+ type = _ref2.type,
17
+ mode = _ref2.mode;
24
18
  return StateStorePath({
25
19
  network: network,
26
20
  path: UrlJoin(type === "app" ? "app" : "usr", type === "app" ? appId : "", userAddress, mode === "public" ? "pub" : "pri", key || "")
27
21
  });
28
22
  };
23
+
29
24
  /**
30
25
  * Methods related to getting and setting user profile data.
31
26
  *
@@ -45,77 +40,62 @@ var UserProfilePath = function UserProfilePath(_ref2) {
45
40
  *
46
41
  * @returns {Promise<Object|String>} - Returns the specified metadata
47
42
  */
48
-
49
-
50
43
  exports.ProfileMetadata = /*#__PURE__*/function () {
51
44
  var _ref4 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee(_ref3) {
52
45
  var _ref3$type, type, _ref3$mode, mode, appId, userAddress, key, response;
53
-
54
46
  return _regeneratorRuntime.wrap(function _callee$(_context) {
55
- while (1) {
56
- switch (_context.prev = _context.next) {
57
- case 0:
58
- _ref3$type = _ref3.type, type = _ref3$type === void 0 ? "app" : _ref3$type, _ref3$mode = _ref3.mode, mode = _ref3$mode === void 0 ? "public" : _ref3$mode, appId = _ref3.appId, userAddress = _ref3.userAddress, key = _ref3.key;
59
- _context.prev = 1;
60
- _context.next = 4;
61
- return this.stateStoreClient.Request({
62
- path: UserProfilePath({
63
- network: this.network,
64
- appId: appId || this.appId,
65
- userAddress: userAddress || this.UserAddress(),
66
- type: type,
67
- mode: mode,
68
- key: key
69
- }),
70
- headers: mode === "private" ? {
71
- Authorization: "Bearer ".concat(this.AuthToken())
72
- } : undefined
73
- });
74
-
75
- case 4:
76
- response = _context.sent;
77
-
78
- if (response.ok) {
79
- _context.next = 7;
80
- break;
81
- }
82
-
83
- throw response;
84
-
85
- case 7:
86
- _context.next = 9;
87
- return Utils.ResponseToJson(response);
88
-
89
- case 9:
90
- _context.t0 = key;
91
- return _context.abrupt("return", _context.sent[_context.t0]);
92
-
93
- case 13:
94
- _context.prev = 13;
95
- _context.t1 = _context["catch"](1);
96
-
97
- if (!(_context.t1.status === 404)) {
98
- _context.next = 17;
99
- break;
100
- }
101
-
102
- return _context.abrupt("return", undefined);
103
-
104
- case 17:
105
- throw _context.t1;
106
-
107
- case 18:
108
- case "end":
109
- return _context.stop();
110
- }
47
+ while (1) switch (_context.prev = _context.next) {
48
+ case 0:
49
+ _ref3$type = _ref3.type, type = _ref3$type === void 0 ? "app" : _ref3$type, _ref3$mode = _ref3.mode, mode = _ref3$mode === void 0 ? "public" : _ref3$mode, appId = _ref3.appId, userAddress = _ref3.userAddress, key = _ref3.key;
50
+ _context.prev = 1;
51
+ _context.next = 4;
52
+ return this.stateStoreClient.Request({
53
+ path: UserProfilePath({
54
+ network: this.network,
55
+ appId: appId || this.appId,
56
+ userAddress: userAddress || this.UserAddress(),
57
+ type: type,
58
+ mode: mode,
59
+ key: key
60
+ }),
61
+ headers: mode === "private" ? {
62
+ Authorization: "Bearer ".concat(this.AuthToken())
63
+ } : undefined
64
+ });
65
+ case 4:
66
+ response = _context.sent;
67
+ if (response.ok) {
68
+ _context.next = 7;
69
+ break;
70
+ }
71
+ throw response;
72
+ case 7:
73
+ _context.next = 9;
74
+ return Utils.ResponseToJson(response);
75
+ case 9:
76
+ _context.t0 = key;
77
+ return _context.abrupt("return", _context.sent[_context.t0]);
78
+ case 13:
79
+ _context.prev = 13;
80
+ _context.t1 = _context["catch"](1);
81
+ if (!(_context.t1.status === 404)) {
82
+ _context.next = 17;
83
+ break;
84
+ }
85
+ return _context.abrupt("return", undefined);
86
+ case 17:
87
+ throw _context.t1;
88
+ case 18:
89
+ case "end":
90
+ return _context.stop();
111
91
  }
112
92
  }, _callee, this, [[1, 13]]);
113
93
  }));
114
-
115
94
  return function (_x) {
116
95
  return _ref4.apply(this, arguments);
117
96
  };
118
97
  }();
98
+
119
99
  /**
120
100
  * Set user profile metadata for the current user
121
101
  *
@@ -127,47 +107,41 @@ exports.ProfileMetadata = /*#__PURE__*/function () {
127
107
  * @param {string} key - The metadata key to set
128
108
  * @param {string} value - The metadata value to set
129
109
  */
130
-
131
-
132
110
  exports.SetProfileMetadata = /*#__PURE__*/function () {
133
111
  var _ref6 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee2(_ref5) {
134
112
  var _ref5$type, type, _ref5$mode, mode, appId, key, value;
135
-
136
113
  return _regeneratorRuntime.wrap(function _callee2$(_context2) {
137
- while (1) {
138
- switch (_context2.prev = _context2.next) {
139
- case 0:
140
- _ref5$type = _ref5.type, type = _ref5$type === void 0 ? "app" : _ref5$type, _ref5$mode = _ref5.mode, mode = _ref5$mode === void 0 ? "public" : _ref5$mode, appId = _ref5.appId, key = _ref5.key, value = _ref5.value;
141
- _context2.next = 3;
142
- return this.stateStoreClient.Request({
143
- method: "POST",
144
- path: UserProfilePath({
145
- network: this.network,
146
- appId: appId || this.appId,
147
- userAddress: this.UserAddress(),
148
- type: type,
149
- mode: mode,
150
- key: key
151
- }),
152
- body: value,
153
- bodyType: _typeof(value) === "object" ? "JSON" : "string",
154
- headers: {
155
- Authorization: "Bearer ".concat(this.AuthToken())
156
- }
157
- });
158
-
159
- case 3:
160
- case "end":
161
- return _context2.stop();
162
- }
114
+ while (1) switch (_context2.prev = _context2.next) {
115
+ case 0:
116
+ _ref5$type = _ref5.type, type = _ref5$type === void 0 ? "app" : _ref5$type, _ref5$mode = _ref5.mode, mode = _ref5$mode === void 0 ? "public" : _ref5$mode, appId = _ref5.appId, key = _ref5.key, value = _ref5.value;
117
+ _context2.next = 3;
118
+ return this.stateStoreClient.Request({
119
+ method: "POST",
120
+ path: UserProfilePath({
121
+ network: this.network,
122
+ appId: appId || this.appId,
123
+ userAddress: this.UserAddress(),
124
+ type: type,
125
+ mode: mode,
126
+ key: key
127
+ }),
128
+ body: value,
129
+ bodyType: _typeof(value) === "object" ? "JSON" : "string",
130
+ headers: {
131
+ Authorization: "Bearer ".concat(this.AuthToken())
132
+ }
133
+ });
134
+ case 3:
135
+ case "end":
136
+ return _context2.stop();
163
137
  }
164
138
  }, _callee2, this);
165
139
  }));
166
-
167
140
  return function (_x2) {
168
141
  return _ref6.apply(this, arguments);
169
142
  };
170
143
  }();
144
+
171
145
  /**
172
146
  * Remove user profile metadata for the current user
173
147
  *
@@ -178,45 +152,39 @@ exports.SetProfileMetadata = /*#__PURE__*/function () {
178
152
  * @param {string=} appId - Namespace to use for the metadata, if retrieving app metadata.. Uses the app ID specified on client initialization by default.
179
153
  * @param {string} key - The metadata key to set
180
154
  */
181
-
182
-
183
155
  exports.RemoveProfileMetadata = /*#__PURE__*/function () {
184
156
  var _ref8 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee3(_ref7) {
185
157
  var _ref7$type, type, _ref7$mode, mode, appId, key;
186
-
187
158
  return _regeneratorRuntime.wrap(function _callee3$(_context3) {
188
- while (1) {
189
- switch (_context3.prev = _context3.next) {
190
- case 0:
191
- _ref7$type = _ref7.type, type = _ref7$type === void 0 ? "app" : _ref7$type, _ref7$mode = _ref7.mode, mode = _ref7$mode === void 0 ? "public" : _ref7$mode, appId = _ref7.appId, key = _ref7.key;
192
- _context3.next = 3;
193
- return this.stateStoreClient.Request({
194
- method: "DELETE",
195
- path: UserProfilePath({
196
- network: this.network,
197
- appId: appId || this.appId,
198
- userAddress: this.UserAddress(),
199
- type: type,
200
- mode: mode,
201
- key: key
202
- }),
203
- headers: {
204
- Authorization: "Bearer ".concat(this.AuthToken())
205
- }
206
- });
207
-
208
- case 3:
209
- case "end":
210
- return _context3.stop();
211
- }
159
+ while (1) switch (_context3.prev = _context3.next) {
160
+ case 0:
161
+ _ref7$type = _ref7.type, type = _ref7$type === void 0 ? "app" : _ref7$type, _ref7$mode = _ref7.mode, mode = _ref7$mode === void 0 ? "public" : _ref7$mode, appId = _ref7.appId, key = _ref7.key;
162
+ _context3.next = 3;
163
+ return this.stateStoreClient.Request({
164
+ method: "DELETE",
165
+ path: UserProfilePath({
166
+ network: this.network,
167
+ appId: appId || this.appId,
168
+ userAddress: this.UserAddress(),
169
+ type: type,
170
+ mode: mode,
171
+ key: key
172
+ }),
173
+ headers: {
174
+ Authorization: "Bearer ".concat(this.AuthToken())
175
+ }
176
+ });
177
+ case 3:
178
+ case "end":
179
+ return _context3.stop();
212
180
  }
213
181
  }, _callee3, this);
214
182
  }));
215
-
216
183
  return function (_x3) {
217
184
  return _ref8.apply(this, arguments);
218
185
  };
219
186
  }();
187
+
220
188
  /**
221
189
  * Retrieve profile info for the specified user, including address, username and profile image (if set)
222
190
  *
@@ -226,140 +194,110 @@ exports.RemoveProfileMetadata = /*#__PURE__*/function () {
226
194
  *
227
195
  * @returns {Promise<Object>} - Profile info of the specified user
228
196
  */
229
-
230
-
231
197
  exports.Profile = /*#__PURE__*/function () {
232
198
  var _ref10 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee4(_ref9) {
233
199
  var userAddress, userName, imageUrl;
234
200
  return _regeneratorRuntime.wrap(function _callee4$(_context4) {
235
- while (1) {
236
- switch (_context4.prev = _context4.next) {
237
- case 0:
238
- userAddress = _ref9.userAddress, userName = _ref9.userName;
239
-
240
- if (!userName) {
241
- _context4.next = 5;
242
- break;
243
- }
244
-
245
- _context4.next = 4;
246
- return this.UserNameToAddress({
247
- userName: userName
248
- });
249
-
250
- case 4:
251
- userAddress = _context4.sent;
252
-
253
- case 5:
254
- if (userAddress) {
255
- _context4.next = 7;
256
- break;
257
- }
258
-
259
- throw Error("Eluvio Wallet Client: Unable to determine profile - user address not specified");
260
-
261
- case 7:
262
- if (userName) {
263
- _context4.next = 11;
264
- break;
265
- }
266
-
267
- _context4.next = 10;
268
- return this.ProfileMetadata({
269
- type: "user",
270
- userAddress: userAddress,
271
- key: "username"
272
- });
273
-
274
- case 10:
275
- userName = _context4.sent;
276
-
277
- case 11:
278
- _context4.next = 13;
279
- return this.ProfileMetadata({
280
- type: "user",
281
- userAddress: userAddress,
282
- key: "icon_url"
283
- });
284
-
285
- case 13:
286
- imageUrl = _context4.sent;
287
- return _context4.abrupt("return", {
288
- userAddress: Utils.FormatAddress(userAddress),
289
- userName: userName,
290
- imageUrl: imageUrl
291
- });
292
-
293
- case 15:
294
- case "end":
295
- return _context4.stop();
296
- }
201
+ while (1) switch (_context4.prev = _context4.next) {
202
+ case 0:
203
+ userAddress = _ref9.userAddress, userName = _ref9.userName;
204
+ if (!userName) {
205
+ _context4.next = 5;
206
+ break;
207
+ }
208
+ _context4.next = 4;
209
+ return this.UserNameToAddress({
210
+ userName: userName
211
+ });
212
+ case 4:
213
+ userAddress = _context4.sent;
214
+ case 5:
215
+ if (userAddress) {
216
+ _context4.next = 7;
217
+ break;
218
+ }
219
+ throw Error("Eluvio Wallet Client: Unable to determine profile - user address not specified");
220
+ case 7:
221
+ if (userName) {
222
+ _context4.next = 11;
223
+ break;
224
+ }
225
+ _context4.next = 10;
226
+ return this.ProfileMetadata({
227
+ type: "user",
228
+ userAddress: userAddress,
229
+ key: "username"
230
+ });
231
+ case 10:
232
+ userName = _context4.sent;
233
+ case 11:
234
+ _context4.next = 13;
235
+ return this.ProfileMetadata({
236
+ type: "user",
237
+ userAddress: userAddress,
238
+ key: "icon_url"
239
+ });
240
+ case 13:
241
+ imageUrl = _context4.sent;
242
+ return _context4.abrupt("return", {
243
+ userAddress: Utils.FormatAddress(userAddress),
244
+ userName: userName,
245
+ imageUrl: imageUrl
246
+ });
247
+ case 15:
248
+ case "end":
249
+ return _context4.stop();
297
250
  }
298
251
  }, _callee4, this);
299
252
  }));
300
-
301
253
  return function (_x4) {
302
254
  return _ref10.apply(this, arguments);
303
255
  };
304
256
  }();
305
-
306
257
  exports.UserNameToAddress = /*#__PURE__*/function () {
307
258
  var _ref12 = _asyncToGenerator( /*#__PURE__*/_regeneratorRuntime.mark(function _callee5(_ref11) {
308
259
  var userName, response;
309
260
  return _regeneratorRuntime.wrap(function _callee5$(_context5) {
310
- while (1) {
311
- switch (_context5.prev = _context5.next) {
312
- case 0:
313
- userName = _ref11.userName;
314
- _context5.prev = 1;
315
- _context5.next = 4;
316
- return this.stateStoreClient.Request({
317
- method: "GET",
318
- path: StateStorePath({
319
- network: this.network,
320
- path: UrlJoin("usr", "profile_for_username", userName)
321
- })
322
- });
323
-
324
- case 4:
325
- response = _context5.sent;
326
-
327
- if (response.ok) {
328
- _context5.next = 7;
329
- break;
330
- }
331
-
332
- throw response;
333
-
334
- case 7:
335
- _context5.next = 9;
336
- return Utils.ResponseToJson(response);
337
-
338
- case 9:
339
- return _context5.abrupt("return", _context5.sent.address);
340
-
341
- case 12:
342
- _context5.prev = 12;
343
- _context5.t0 = _context5["catch"](1);
344
-
345
- if (!(_context5.t0.status !== 404)) {
346
- _context5.next = 16;
347
- break;
348
- }
349
-
350
- throw _context5.t0;
351
-
352
- case 16:
353
- return _context5.abrupt("return", undefined);
354
-
355
- case 17:
356
- case "end":
357
- return _context5.stop();
358
- }
261
+ while (1) switch (_context5.prev = _context5.next) {
262
+ case 0:
263
+ userName = _ref11.userName;
264
+ _context5.prev = 1;
265
+ _context5.next = 4;
266
+ return this.stateStoreClient.Request({
267
+ method: "GET",
268
+ path: StateStorePath({
269
+ network: this.network,
270
+ path: UrlJoin("usr", "profile_for_username", userName)
271
+ })
272
+ });
273
+ case 4:
274
+ response = _context5.sent;
275
+ if (response.ok) {
276
+ _context5.next = 7;
277
+ break;
278
+ }
279
+ throw response;
280
+ case 7:
281
+ _context5.next = 9;
282
+ return Utils.ResponseToJson(response);
283
+ case 9:
284
+ return _context5.abrupt("return", _context5.sent.address);
285
+ case 12:
286
+ _context5.prev = 12;
287
+ _context5.t0 = _context5["catch"](1);
288
+ if (!(_context5.t0.status !== 404)) {
289
+ _context5.next = 16;
290
+ break;
291
+ }
292
+ throw _context5.t0;
293
+ case 16:
294
+ return _context5.abrupt("return", undefined);
295
+ case 17:
296
+ case "end":
297
+ return _context5.stop();
359
298
  }
360
299
  }, _callee5, this, [[1, 12]]);
361
300
  }));
362
-
363
301
  return function (_x5) {
364
302
  return _ref12.apply(this, arguments);
365
303
  };