@super-protocol/sdk-js 0.11.9-beta.4 → 0.11.9-beta.5

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.
@@ -30,6 +30,12 @@ declare class Offer {
30
30
  * @param transactionOptions - object what contains alternative action account or gas limit (optional)
31
31
  */
32
32
  setDescription(description: string, transactionOptions?: TransactionOptions): Promise<void>;
33
+ /**
34
+ * Updates description in order info
35
+ * @param description - new description
36
+ * @param transactionOptions - object what contains alternative action account or gas limit (optional)
37
+ */
38
+ setValueOfferInfo(newInfo: OfferInfo, transactionOptions?: TransactionOptions): Promise<void>;
33
39
  /**
34
40
  * Function for fetching offer info from blockchain
35
41
  */
@@ -107,6 +107,28 @@ var Offer = /** @class */ (function () {
107
107
  });
108
108
  });
109
109
  };
110
+ /**
111
+ * Updates description in order info
112
+ * @param description - new description
113
+ * @param transactionOptions - object what contains alternative action account or gas limit (optional)
114
+ */
115
+ Offer.prototype.setValueOfferInfo = function (newInfo, transactionOptions) {
116
+ return __awaiter(this, void 0, void 0, function () {
117
+ return __generator(this, function (_a) {
118
+ switch (_a.label) {
119
+ case 0:
120
+ transactionOptions !== null && transactionOptions !== void 0 ? transactionOptions : this.checkInitOffer(transactionOptions);
121
+ (0, utils_1.checkIfActionAccountInitialized)(transactionOptions);
122
+ return [4 /*yield*/, TxManager_1.default.execute(Offer.contract.methods.setValueOfferInfo, [this.id, newInfo], transactionOptions)];
123
+ case 1:
124
+ _a.sent();
125
+ if (this.offerInfo)
126
+ this.offerInfo = newInfo;
127
+ return [2 /*return*/];
128
+ }
129
+ });
130
+ });
131
+ };
110
132
  /**
111
133
  * Function for fetching offer info from blockchain
112
134
  */
@@ -82,17 +82,23 @@ declare class TeeOffer {
82
82
  */
83
83
  getOrigins(): Promise<Origins>;
84
84
  /**
85
- * Updates TLB in order info
85
+ * Updates TLB in offer info
86
86
  * @param tlb - new TLB
87
87
  * @param transactionOptions - object what contains alternative action account or gas limit (optional)
88
88
  */
89
89
  addTlb(tlb: string, transactionOptions?: TransactionOptions): Promise<void>;
90
90
  /**
91
- * Updates name in order info
91
+ * Updates name in offer info
92
92
  * @param name - new name
93
93
  * @param transactionOptions - object what contains alternative action account or gas limit (optional)
94
94
  */
95
95
  setName(name: string, transactionOptions?: TransactionOptions): Promise<void>;
96
+ /**
97
+ * Updates offer info
98
+ * @param newInfo - new offer info
99
+ * @param transactionOptions - object what contains alternative action account or gas limit (optional)
100
+ */
101
+ setOfferInfo(newInfo: TeeOfferInfo, transactionOptions?: TransactionOptions): Promise<void>;
96
102
  /**
97
103
  * Updates description in order info
98
104
  * @param description - new description
@@ -313,7 +313,7 @@ var TeeOffer = /** @class */ (function () {
313
313
  });
314
314
  };
315
315
  /**
316
- * Updates TLB in order info
316
+ * Updates TLB in offer info
317
317
  * @param tlb - new TLB
318
318
  * @param transactionOptions - object what contains alternative action account or gas limit (optional)
319
319
  */
@@ -335,7 +335,7 @@ var TeeOffer = /** @class */ (function () {
335
335
  });
336
336
  };
337
337
  /**
338
- * Updates name in order info
338
+ * Updates name in offer info
339
339
  * @param name - new name
340
340
  * @param transactionOptions - object what contains alternative action account or gas limit (optional)
341
341
  */
@@ -356,6 +356,28 @@ var TeeOffer = /** @class */ (function () {
356
356
  });
357
357
  });
358
358
  };
359
+ /**
360
+ * Updates offer info
361
+ * @param newInfo - new offer info
362
+ * @param transactionOptions - object what contains alternative action account or gas limit (optional)
363
+ */
364
+ TeeOffer.prototype.setOfferInfo = function (newInfo, transactionOptions) {
365
+ return __awaiter(this, void 0, void 0, function () {
366
+ return __generator(this, function (_a) {
367
+ switch (_a.label) {
368
+ case 0:
369
+ transactionOptions !== null && transactionOptions !== void 0 ? transactionOptions : this.checkInitTeeOffer(transactionOptions);
370
+ (0, utils_1.checkIfActionAccountInitialized)(transactionOptions);
371
+ return [4 /*yield*/, TxManager_1.default.execute(TeeOffer.contract.methods.setTeeOfferInfo, [this.id, newInfo], transactionOptions)];
372
+ case 1:
373
+ _a.sent();
374
+ if (this.offerInfo)
375
+ this.offerInfo = newInfo;
376
+ return [2 /*return*/];
377
+ }
378
+ });
379
+ });
380
+ };
359
381
  /**
360
382
  * Updates description in order info
361
383
  * @param description - new description
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@super-protocol/sdk-js",
3
- "version": "0.11.9-beta.4",
3
+ "version": "0.11.9-beta.5",
4
4
  "main": "build/index.js",
5
5
  "license": "MIT",
6
6
  "files": [