@super-protocol/sdk-js 0.12.5-beta.1 → 0.12.7-beta.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/build/connectors/BlockchainEventsListener.d.ts +2 -0
- package/build/connectors/BlockchainEventsListener.js +3 -0
- package/build/models/Offer.d.ts +1 -1
- package/build/models/Offer.js +5 -3
- package/build/models/TeeOffer.js +5 -3
- package/build/types/Offer.d.ts +1 -0
- package/build/types/TeeOffer.d.ts +1 -0
- package/package.json +1 -1
|
@@ -1,8 +1,10 @@
|
|
|
1
1
|
import { BaseConnector, Config } from "./BaseConnector";
|
|
2
|
+
import { WebsocketProviderBase } from "web3-core-helpers";
|
|
2
3
|
declare class BlockchainEventsListener extends BaseConnector {
|
|
3
4
|
private static instance;
|
|
4
5
|
private constructor();
|
|
5
6
|
static getInstance(): BlockchainEventsListener;
|
|
7
|
+
getProvider(): WebsocketProviderBase | undefined;
|
|
6
8
|
/**
|
|
7
9
|
* Function for connecting to blockchain using web socket
|
|
8
10
|
* Needs to run this function before using events
|
|
@@ -72,6 +72,9 @@ var BlockchainEventsListener = /** @class */ (function (_super) {
|
|
|
72
72
|
}
|
|
73
73
|
return BlockchainEventsListener.instance;
|
|
74
74
|
};
|
|
75
|
+
BlockchainEventsListener.prototype.getProvider = function () {
|
|
76
|
+
return this.provider;
|
|
77
|
+
};
|
|
75
78
|
/**
|
|
76
79
|
* Function for connecting to blockchain using web socket
|
|
77
80
|
* Needs to run this function before using events
|
package/build/models/Offer.d.ts
CHANGED
package/build/models/Offer.js
CHANGED
|
@@ -155,13 +155,15 @@ var Offer = /** @class */ (function () {
|
|
|
155
155
|
*/
|
|
156
156
|
Offer.prototype.getInfo = function () {
|
|
157
157
|
return __awaiter(this, void 0, void 0, function () {
|
|
158
|
-
var _a,
|
|
158
|
+
var _a, offerInfoParams, enabled;
|
|
159
159
|
return __generator(this, function (_b) {
|
|
160
160
|
switch (_b.label) {
|
|
161
161
|
case 0: return [4 /*yield*/, Offer.contract.methods.getValueOffer(this.id).call()];
|
|
162
162
|
case 1:
|
|
163
|
-
_a = _b.sent(),
|
|
164
|
-
|
|
163
|
+
_a = _b.sent(), offerInfoParams = _a[2], enabled = _a[3];
|
|
164
|
+
this.offerInfo = (0, utils_1.tupleToObject)(offerInfoParams, Offer_1.OfferInfoStructure);
|
|
165
|
+
this.offerInfo.enabled = enabled;
|
|
166
|
+
return [2 /*return*/, this.offerInfo];
|
|
165
167
|
}
|
|
166
168
|
});
|
|
167
169
|
});
|
package/build/models/TeeOffer.js
CHANGED
|
@@ -102,13 +102,15 @@ var TeeOffer = /** @class */ (function () {
|
|
|
102
102
|
*/
|
|
103
103
|
TeeOffer.prototype.getInfo = function () {
|
|
104
104
|
return __awaiter(this, void 0, void 0, function () {
|
|
105
|
-
var _a, teeOfferInfoParams;
|
|
105
|
+
var _a, teeOfferInfoParams, enabled;
|
|
106
106
|
return __generator(this, function (_b) {
|
|
107
107
|
switch (_b.label) {
|
|
108
108
|
case 0: return [4 /*yield*/, TeeOffer.contract.methods.getTeeOffer(this.id).call()];
|
|
109
109
|
case 1:
|
|
110
|
-
_a = _b.sent(), teeOfferInfoParams = _a[2];
|
|
111
|
-
|
|
110
|
+
_a = _b.sent(), teeOfferInfoParams = _a[2], enabled = _a[3];
|
|
111
|
+
this.offerInfo = (0, utils_1.tupleToObject)(teeOfferInfoParams, TeeOffer_1.TeeOfferInfoStructure);
|
|
112
|
+
this.offerInfo.enabled = enabled;
|
|
113
|
+
return [2 /*return*/, this.offerInfo];
|
|
112
114
|
}
|
|
113
115
|
});
|
|
114
116
|
});
|
package/build/types/Offer.d.ts
CHANGED