@typus/typus-sdk 1.1.37 → 1.1.38
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.
|
@@ -40,4 +40,12 @@ interface DrawDisplay {
|
|
|
40
40
|
bet_amount: string;
|
|
41
41
|
exp: string;
|
|
42
42
|
}
|
|
43
|
+
export interface ProfitSharing {
|
|
44
|
+
level_profits: string[];
|
|
45
|
+
level_users: string[];
|
|
46
|
+
pool: string;
|
|
47
|
+
remaining: string;
|
|
48
|
+
total: string;
|
|
49
|
+
}
|
|
50
|
+
export declare function getProfitSharing(provider: JsonRpcProvider, diceProfitSharing: string): Promise<ProfitSharing>;
|
|
43
51
|
export {};
|
|
@@ -36,7 +36,7 @@ var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
|
36
36
|
}
|
|
37
37
|
};
|
|
38
38
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.getHistory = exports.getPlaygrounds = void 0;
|
|
39
|
+
exports.getProfitSharing = exports.getHistory = exports.getPlaygrounds = void 0;
|
|
40
40
|
var token_1 = require("../token");
|
|
41
41
|
function getPlaygrounds(provider, diceRegistry) {
|
|
42
42
|
return __awaiter(this, void 0, void 0, function () {
|
|
@@ -149,3 +149,22 @@ function getHistory(provider, dicePackage, playgrounds) {
|
|
|
149
149
|
});
|
|
150
150
|
}
|
|
151
151
|
exports.getHistory = getHistory;
|
|
152
|
+
function getProfitSharing(provider, diceProfitSharing) {
|
|
153
|
+
var _a, _b;
|
|
154
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
155
|
+
var object, result;
|
|
156
|
+
return __generator(this, function (_c) {
|
|
157
|
+
switch (_c.label) {
|
|
158
|
+
case 0: return [4 /*yield*/, provider.getObject({
|
|
159
|
+
id: diceProfitSharing,
|
|
160
|
+
options: { showContent: true },
|
|
161
|
+
})];
|
|
162
|
+
case 1:
|
|
163
|
+
object = _c.sent();
|
|
164
|
+
result = (_b = (_a = object.data) === null || _a === void 0 ? void 0 : _a.content) === null || _b === void 0 ? void 0 : _b.fields.value.fields;
|
|
165
|
+
return [2 /*return*/, result];
|
|
166
|
+
}
|
|
167
|
+
});
|
|
168
|
+
});
|
|
169
|
+
}
|
|
170
|
+
exports.getProfitSharing = getProfitSharing;
|