@airgap/moonbeam 0.13.45-beta.3 → 0.13.45-beta.4
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/package.json +5 -5
- package/v0/index.js +7 -7
- package/v0/index.js.map +1 -1
- package/v0/protocol/moonbase/MoonbaseProtocol.js +36 -17
- package/v0/protocol/moonbase/MoonbaseProtocol.js.map +1 -1
- package/v0/protocol/moonbase/MoonbaseProtocolOptions.js +67 -28
- package/v0/protocol/moonbase/MoonbaseProtocolOptions.js.map +1 -1
- package/v0/protocol/moonbeam/MoonbeamProtocol.js +589 -334
- package/v0/protocol/moonbeam/MoonbeamProtocol.js.map +1 -1
- package/v0/protocol/moonbeam/MoonbeamProtocolOptions.js +87 -41
- package/v0/protocol/moonbeam/MoonbeamProtocolOptions.js.map +1 -1
- package/v0/protocol/moonbeam/controllers/MoonbeamAccountController.js +495 -287
- package/v0/protocol/moonbeam/controllers/MoonbeamAccountController.js.map +1 -1
- package/v0/protocol/moonbeam/controllers/MoonbeamTransactionController.d.ts +1 -0
- package/v0/protocol/moonbeam/controllers/MoonbeamTransactionController.js +69 -9
- package/v0/protocol/moonbeam/controllers/MoonbeamTransactionController.js.map +1 -1
- package/v0/protocol/moonbeam/data/staking/MoonbeamBond.js +34 -16
- package/v0/protocol/moonbeam/data/staking/MoonbeamBond.js.map +1 -1
- package/v0/protocol/moonbeam/data/staking/MoonbeamCandidateBondLessRequest.js +34 -16
- package/v0/protocol/moonbeam/data/staking/MoonbeamCandidateBondLessRequest.js.map +1 -1
- package/v0/protocol/moonbeam/data/staking/MoonbeamCandidateMetadata.js +23 -22
- package/v0/protocol/moonbeam/data/staking/MoonbeamCandidateMetadata.js.map +1 -1
- package/v0/protocol/moonbeam/data/staking/MoonbeamDelegationScheduledRequests.js +107 -64
- package/v0/protocol/moonbeam/data/staking/MoonbeamDelegationScheduledRequests.js.map +1 -1
- package/v0/protocol/moonbeam/data/staking/MoonbeamDelegator.js +90 -50
- package/v0/protocol/moonbeam/data/staking/MoonbeamDelegator.js.map +1 -1
- package/v0/protocol/moonbeam/data/staking/MoonbeamRoundInfo.js +13 -12
- package/v0/protocol/moonbeam/data/staking/MoonbeamRoundInfo.js.map +1 -1
- package/v0/protocol/moonbeam/data/staking/MoonbeamStakingActionType.js +1 -1
- package/v0/protocol/moonbeam/data/staking/MoonbeamStakingActionType.js.map +1 -1
- package/v0/protocol/moonbeam/node/MoonbeamNodeClient.js +215 -60
- package/v0/protocol/moonbeam/node/MoonbeamNodeClient.js.map +1 -1
- package/v0/protocol/moonriver/MoonriverProtocol.js +36 -17
- package/v0/protocol/moonriver/MoonriverProtocol.js.map +1 -1
- package/v0/protocol/moonriver/MoonriverProtocolOptions.js +67 -28
- package/v0/protocol/moonriver/MoonriverProtocolOptions.js.map +1 -1
- package/v1/controller/MoonbeamAccountController.js +456 -252
- package/v1/controller/MoonbeamAccountController.js.map +1 -1
- package/v1/controller/MoonbeamTransactionController.js +23 -3
- package/v1/controller/MoonbeamTransactionController.js.map +1 -1
- package/v1/data/staking/MoonbeamBond.js +32 -14
- package/v1/data/staking/MoonbeamBond.js.map +1 -1
- package/v1/data/staking/MoonbeamCandidateBondLessRequest.js +32 -14
- package/v1/data/staking/MoonbeamCandidateBondLessRequest.js.map +1 -1
- package/v1/data/staking/MoonbeamCandidateMetadata.js +24 -21
- package/v1/data/staking/MoonbeamCandidateMetadata.js.map +1 -1
- package/v1/data/staking/MoonbeamDelegationScheduledRequests.js +107 -62
- package/v1/data/staking/MoonbeamDelegationScheduledRequests.js.map +1 -1
- package/v1/data/staking/MoonbeamDelegator.js +90 -48
- package/v1/data/staking/MoonbeamDelegator.js.map +1 -1
- package/v1/data/staking/MoonbeamRoundInfo.js +12 -11
- package/v1/data/staking/MoonbeamRoundInfo.js.map +1 -1
- package/v1/data/staking/MoonbeamStakingActionType.js +1 -1
- package/v1/data/staking/MoonbeamStakingActionType.js.map +1 -1
- package/v1/data/transaction/method/args.js +293 -160
- package/v1/data/transaction/method/args.js.map +1 -1
- package/v1/data/transaction/transaction.js +23 -12
- package/v1/data/transaction/transaction.js.map +1 -1
- package/v1/index.js +5 -5
- package/v1/index.js.map +1 -1
- package/v1/module/MoonbeamModule.d.ts +1 -1
- package/v1/module/MoonbeamModule.js +98 -40
- package/v1/module/MoonbeamModule.js.map +1 -1
- package/v1/module.js +3 -2
- package/v1/module.js.map +1 -1
- package/v1/node/MoonbeamNodeClient.js +222 -71
- package/v1/node/MoonbeamNodeClient.js.map +1 -1
- package/v1/protocol/MoonbaseProtocol.js +49 -18
- package/v1/protocol/MoonbaseProtocol.js.map +1 -1
- package/v1/protocol/MoonbeamBaseProtocol.js +625 -340
- package/v1/protocol/MoonbeamBaseProtocol.js.map +1 -1
- package/v1/protocol/MoonbeamProtocol.js +51 -20
- package/v1/protocol/MoonbeamProtocol.js.map +1 -1
- package/v1/protocol/MoonriverProtocol.js +49 -18
- package/v1/protocol/MoonriverProtocol.js.map +1 -1
- package/v1/serializer/v3/schemas/converter/transaction-converter.js +6 -5
- package/v1/serializer/v3/schemas/converter/transaction-converter.js.map +1 -1
- package/v1/serializer/v3/serializer-companion.js +154 -75
- package/v1/serializer/v3/serializer-companion.js.map +1 -1
- package/v1/serializer/v3/validators/transaction-validator.js +23 -3
- package/v1/serializer/v3/validators/transaction-validator.js.map +1 -1
- package/v1/serializer/v3/validators/validators.js +1 -1
- package/v1/serializer/v3/validators/validators.js.map +1 -1
- package/v1/types/configuration.d.ts +1 -1
- package/v1/types/crypto.d.ts +1 -1
- package/v1/types/protocol.d.ts +3 -3
|
@@ -1,23 +1,51 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __spreadArray = (this && this.__spreadArray) || function (to, from, pack) {
|
|
18
|
+
if (pack || arguments.length === 2) for (var i = 0, l = from.length, ar; i < l; i++) {
|
|
19
|
+
if (ar || !(i in from)) {
|
|
20
|
+
if (!ar) ar = Array.prototype.slice.call(from, 0, i);
|
|
21
|
+
ar[i] = from[i];
|
|
22
|
+
}
|
|
23
|
+
}
|
|
24
|
+
return to.concat(ar || Array.prototype.slice.call(from));
|
|
25
|
+
};
|
|
2
26
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
27
|
exports.MoonbeamDelegator = exports.MoonbeamDelegatorStatusLeaving = exports.MoonbeamDelegatorStatusActive = exports.MoonbeamDelegatorStatus = exports.MoonbeamDelegatorStatusRaw = void 0;
|
|
4
28
|
// tslint:disable: max-classes-per-file
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
29
|
+
var errors_1 = require("@airgap/coinlib-core/errors");
|
|
30
|
+
var coinlib_error_1 = require("@airgap/coinlib-core/errors/coinlib-error");
|
|
31
|
+
var SCALEDecoder_1 = require("@airgap/substrate/v0/protocol/common/data/scale/SCALEDecoder");
|
|
32
|
+
var SCALEClass_1 = require("@airgap/substrate/v0/protocol/common/data/scale/type/SCALEClass");
|
|
33
|
+
var SCALEEnum_1 = require("@airgap/substrate/v0/protocol/common/data/scale/type/SCALEEnum");
|
|
34
|
+
var SubstrateNetwork_1 = require("@airgap/substrate/v0/protocol/SubstrateNetwork");
|
|
35
|
+
var MoonbeamBond_1 = require("./MoonbeamBond");
|
|
12
36
|
var MoonbeamDelegatorStatusRaw;
|
|
13
37
|
(function (MoonbeamDelegatorStatusRaw) {
|
|
14
38
|
MoonbeamDelegatorStatusRaw[MoonbeamDelegatorStatusRaw["ACTIVE"] = 0] = "ACTIVE";
|
|
15
39
|
MoonbeamDelegatorStatusRaw[MoonbeamDelegatorStatusRaw["LEAVING"] = 1] = "LEAVING";
|
|
16
|
-
})(MoonbeamDelegatorStatusRaw
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
40
|
+
})(MoonbeamDelegatorStatusRaw = exports.MoonbeamDelegatorStatusRaw || (exports.MoonbeamDelegatorStatusRaw = {}));
|
|
41
|
+
var MoonbeamDelegatorStatus = /** @class */ (function (_super) {
|
|
42
|
+
__extends(MoonbeamDelegatorStatus, _super);
|
|
43
|
+
function MoonbeamDelegatorStatus() {
|
|
44
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
45
|
+
}
|
|
46
|
+
MoonbeamDelegatorStatus.decode = function (network, runtimeVersion, raw) {
|
|
47
|
+
var prefix = parseInt(raw.substring(0, 2), 16);
|
|
48
|
+
var decoderMethod;
|
|
21
49
|
switch (prefix) {
|
|
22
50
|
case MoonbeamDelegatorStatusRaw.ACTIVE:
|
|
23
51
|
decoderMethod = MoonbeamDelegatorStatusActive.decode;
|
|
@@ -28,65 +56,77 @@ class MoonbeamDelegatorStatus extends SCALEClass_1.SCALEClass {
|
|
|
28
56
|
default:
|
|
29
57
|
throw new errors_1.InvalidValueError(coinlib_error_1.Domain.SUBSTRATE, 'Unknown Moonbeam delegator status');
|
|
30
58
|
}
|
|
31
|
-
|
|
59
|
+
var decoded = decoderMethod(network, runtimeVersion, raw.slice(2));
|
|
32
60
|
return {
|
|
33
61
|
bytesDecoded: 1 + decoded.bytesDecoded,
|
|
34
62
|
decoded: decoded.decoded
|
|
35
63
|
};
|
|
36
|
-
}
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
}
|
|
64
|
+
};
|
|
65
|
+
Object.defineProperty(MoonbeamDelegatorStatus.prototype, "scaleFields", {
|
|
66
|
+
get: function () {
|
|
67
|
+
return __spreadArray([this.type], this._scaleFields, true);
|
|
68
|
+
},
|
|
69
|
+
enumerable: false,
|
|
70
|
+
configurable: true
|
|
71
|
+
});
|
|
72
|
+
return MoonbeamDelegatorStatus;
|
|
73
|
+
}(SCALEClass_1.SCALEClass));
|
|
41
74
|
exports.MoonbeamDelegatorStatus = MoonbeamDelegatorStatus;
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
75
|
+
var MoonbeamDelegatorStatusActive = /** @class */ (function (_super) {
|
|
76
|
+
__extends(MoonbeamDelegatorStatusActive, _super);
|
|
77
|
+
function MoonbeamDelegatorStatusActive() {
|
|
78
|
+
var _this = _super !== null && _super.apply(this, arguments) || this;
|
|
79
|
+
_this.type = SCALEEnum_1.SCALEEnum.from(MoonbeamDelegatorStatusRaw.ACTIVE);
|
|
80
|
+
_this._scaleFields = [];
|
|
81
|
+
return _this;
|
|
47
82
|
}
|
|
48
|
-
|
|
83
|
+
MoonbeamDelegatorStatusActive.decode = function (_network, _runtimeVersion, _raw) {
|
|
49
84
|
return {
|
|
50
85
|
bytesDecoded: 0,
|
|
51
86
|
decoded: new MoonbeamDelegatorStatusActive()
|
|
52
87
|
};
|
|
53
|
-
}
|
|
54
|
-
|
|
88
|
+
};
|
|
89
|
+
return MoonbeamDelegatorStatusActive;
|
|
90
|
+
}(MoonbeamDelegatorStatus));
|
|
55
91
|
exports.MoonbeamDelegatorStatusActive = MoonbeamDelegatorStatusActive;
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
92
|
+
var MoonbeamDelegatorStatusLeaving = /** @class */ (function (_super) {
|
|
93
|
+
__extends(MoonbeamDelegatorStatusLeaving, _super);
|
|
94
|
+
function MoonbeamDelegatorStatusLeaving(roundIndex) {
|
|
95
|
+
var _this = _super.call(this) || this;
|
|
96
|
+
_this.roundIndex = roundIndex;
|
|
97
|
+
_this.type = SCALEEnum_1.SCALEEnum.from(MoonbeamDelegatorStatusRaw.LEAVING);
|
|
98
|
+
_this._scaleFields = [];
|
|
99
|
+
return _this;
|
|
100
|
+
}
|
|
101
|
+
MoonbeamDelegatorStatusLeaving.decode = function (network, runtimeVersion, raw) {
|
|
102
|
+
var decoder = new SCALEDecoder_1.SCALEDecoder(network, runtimeVersion, raw);
|
|
103
|
+
var roundIndex = decoder.decodeNextInt(32);
|
|
60
104
|
return {
|
|
61
105
|
bytesDecoded: roundIndex.bytesDecoded,
|
|
62
106
|
decoded: new MoonbeamDelegatorStatusLeaving(roundIndex.decoded)
|
|
63
107
|
};
|
|
64
|
-
}
|
|
65
|
-
|
|
66
|
-
|
|
67
|
-
this.roundIndex = roundIndex;
|
|
68
|
-
this.type = SCALEEnum_1.SCALEEnum.from(MoonbeamDelegatorStatusRaw.LEAVING);
|
|
69
|
-
this._scaleFields = [];
|
|
70
|
-
}
|
|
71
|
-
}
|
|
108
|
+
};
|
|
109
|
+
return MoonbeamDelegatorStatusLeaving;
|
|
110
|
+
}(MoonbeamDelegatorStatus));
|
|
72
111
|
exports.MoonbeamDelegatorStatusLeaving = MoonbeamDelegatorStatusLeaving;
|
|
73
|
-
|
|
74
|
-
|
|
75
|
-
const decoder = new SCALEDecoder_1.SCALEDecoder(SubstrateNetwork_1.SubstrateNetwork.MOONBEAM, runtimeVersion, raw);
|
|
76
|
-
const id = decoder.decodeNextAccountId(20);
|
|
77
|
-
const delegations = decoder.decodeNextArray((_, runtimeVersion, hex) => MoonbeamBond_1.MoonbeamBond.decode(runtimeVersion, hex));
|
|
78
|
-
const total = decoder.decodeNextInt(128);
|
|
79
|
-
const lessTotal = decoder.decodeNextInt(128);
|
|
80
|
-
const status = decoder.decodeNextObject(MoonbeamDelegatorStatus.decode);
|
|
81
|
-
return new MoonbeamDelegator(id.decoded, delegations.decoded, total.decoded, lessTotal.decoded, status.decoded);
|
|
82
|
-
}
|
|
83
|
-
constructor(id, delegations, total, lessTotal, status) {
|
|
112
|
+
var MoonbeamDelegator = /** @class */ (function () {
|
|
113
|
+
function MoonbeamDelegator(id, delegations, total, lessTotal, status) {
|
|
84
114
|
this.id = id;
|
|
85
115
|
this.delegations = delegations;
|
|
86
116
|
this.total = total;
|
|
87
117
|
this.lessTotal = lessTotal;
|
|
88
118
|
this.status = status;
|
|
89
119
|
}
|
|
90
|
-
|
|
120
|
+
MoonbeamDelegator.decode = function (runtimeVersion, raw) {
|
|
121
|
+
var decoder = new SCALEDecoder_1.SCALEDecoder(SubstrateNetwork_1.SubstrateNetwork.MOONBEAM, runtimeVersion, raw);
|
|
122
|
+
var id = decoder.decodeNextAccountId(20);
|
|
123
|
+
var delegations = decoder.decodeNextArray(function (_, runtimeVersion, hex) { return MoonbeamBond_1.MoonbeamBond.decode(runtimeVersion, hex); });
|
|
124
|
+
var total = decoder.decodeNextInt(128);
|
|
125
|
+
var lessTotal = decoder.decodeNextInt(128);
|
|
126
|
+
var status = decoder.decodeNextObject(MoonbeamDelegatorStatus.decode);
|
|
127
|
+
return new MoonbeamDelegator(id.decoded, delegations.decoded, total.decoded, lessTotal.decoded, status.decoded);
|
|
128
|
+
};
|
|
129
|
+
return MoonbeamDelegator;
|
|
130
|
+
}());
|
|
91
131
|
exports.MoonbeamDelegator = MoonbeamDelegator;
|
|
92
132
|
//# sourceMappingURL=MoonbeamDelegator.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MoonbeamDelegator.js","sourceRoot":"","sources":["../../../../../../src/v0/protocol/moonbeam/data/staking/MoonbeamDelegator.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MoonbeamDelegator.js","sourceRoot":"","sources":["../../../../../../src/v0/protocol/moonbeam/data/staking/MoonbeamDelegator.ts"],"names":[],"mappings":";;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AAS,CAAU;QACnB,WAAM,GAAN,MAAM,CAAyB;IAC9C,CAAC;IAlBU,wBAAM,GAApB,UAAqB,cAAkC,EAAE,GAAW;QAClE,IAAM,OAAO,GAAG,IAAI,2BAAY,CAAC,mCAAgB,CAAC,QAAQ,EAAE,cAAc,EAAE,GAAG,CAAC,CAAA;QAEhF,IAAM,EAAE,GAAG,OAAO,CAAC,mBAAmB,CAAC,EAAE,CAAC,CAAA;QAC1C,IAAM,WAAW,GAAG,OAAO,CAAC,eAAe,CAAC,UAAC,CAAC,EAAE,cAAc,EAAE,GAAG,IAAK,OAAA,2BAAY,CAAC,MAAM,CAAC,cAAc,EAAE,GAAG,CAAC,EAAxC,CAAwC,CAAC,CAAA;QACjH,IAAM,KAAK,GAAG,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,CAAA;QACxC,IAAM,SAAS,GAAG,OAAO,CAAC,aAAa,CAAC,GAAG,CAAC,CAAA;QAC5C,IAAM,MAAM,GAAG,OAAO,CAAC,gBAAgB,CAAC,uBAAuB,CAAC,MAAM,CAAC,CAAA;QAEvE,OAAO,IAAI,iBAAiB,CAAC,EAAE,CAAC,OAAO,EAAE,WAAW,CAAC,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,SAAS,CAAC,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,CAAA;IACjH,CAAC;IASH,wBAAC;AAAD,CAAC,AApBD,IAoBC;AApBY,8CAAiB"}
|
|
@@ -1,21 +1,22 @@
|
|
|
1
1
|
"use strict";
|
|
2
2
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
3
|
exports.MoonbeamRoundInfo = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
const decoder = new SCALEDecoder_1.SCALEDecoder(SubstrateNetwork_1.SubstrateNetwork.MOONBEAM, runtimeVersion, raw);
|
|
9
|
-
const current = decoder.decodeNextInt(32);
|
|
10
|
-
const first = decoder.decodeNextInt(32);
|
|
11
|
-
const length = decoder.decodeNextInt(32);
|
|
12
|
-
return new MoonbeamRoundInfo(current.decoded, first.decoded, length.decoded);
|
|
13
|
-
}
|
|
14
|
-
constructor(current, first, length) {
|
|
4
|
+
var SCALEDecoder_1 = require("@airgap/substrate/v0/protocol/common/data/scale/SCALEDecoder");
|
|
5
|
+
var SubstrateNetwork_1 = require("@airgap/substrate/v0/protocol/SubstrateNetwork");
|
|
6
|
+
var MoonbeamRoundInfo = /** @class */ (function () {
|
|
7
|
+
function MoonbeamRoundInfo(current, first, length) {
|
|
15
8
|
this.current = current;
|
|
16
9
|
this.first = first;
|
|
17
10
|
this.length = length;
|
|
18
11
|
}
|
|
19
|
-
|
|
12
|
+
MoonbeamRoundInfo.decode = function (runtimeVersion, raw) {
|
|
13
|
+
var decoder = new SCALEDecoder_1.SCALEDecoder(SubstrateNetwork_1.SubstrateNetwork.MOONBEAM, runtimeVersion, raw);
|
|
14
|
+
var current = decoder.decodeNextInt(32);
|
|
15
|
+
var first = decoder.decodeNextInt(32);
|
|
16
|
+
var length = decoder.decodeNextInt(32);
|
|
17
|
+
return new MoonbeamRoundInfo(current.decoded, first.decoded, length.decoded);
|
|
18
|
+
};
|
|
19
|
+
return MoonbeamRoundInfo;
|
|
20
|
+
}());
|
|
20
21
|
exports.MoonbeamRoundInfo = MoonbeamRoundInfo;
|
|
21
22
|
//# sourceMappingURL=MoonbeamRoundInfo.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MoonbeamRoundInfo.js","sourceRoot":"","sources":["../../../../../../src/v0/protocol/moonbeam/data/staking/MoonbeamRoundInfo.ts"],"names":[],"mappings":";;;AAAA
|
|
1
|
+
{"version":3,"file":"MoonbeamRoundInfo.js","sourceRoot":"","sources":["../../../../../../src/v0/protocol/moonbeam/data/staking/MoonbeamRoundInfo.ts"],"names":[],"mappings":";;;AAAA,6FAA2F;AAE3F,mFAAiF;AAEjF;IAWE,2BAAoC,OAAiB,EAAkB,KAAe,EAAkB,MAAgB;QAApF,YAAO,GAAP,OAAO,CAAU;QAAkB,UAAK,GAAL,KAAK,CAAU;QAAkB,WAAM,GAAN,MAAM,CAAU;IAAG,CAAC;IAV9G,wBAAM,GAApB,UAAqB,cAAkC,EAAE,GAAW;QAClE,IAAM,OAAO,GAAG,IAAI,2BAAY,CAAC,mCAAgB,CAAC,QAAQ,EAAE,cAAc,EAAE,GAAG,CAAC,CAAA;QAEhF,IAAM,OAAO,GAAG,OAAO,CAAC,aAAa,CAAC,EAAE,CAAC,CAAA;QACzC,IAAM,KAAK,GAAG,OAAO,CAAC,aAAa,CAAC,EAAE,CAAC,CAAA;QACvC,IAAM,MAAM,GAAG,OAAO,CAAC,aAAa,CAAC,EAAE,CAAC,CAAA;QAExC,OAAO,IAAI,iBAAiB,CAAC,OAAO,CAAC,OAAO,EAAE,KAAK,CAAC,OAAO,EAAE,MAAM,CAAC,OAAO,CAAC,CAAA;IAC9E,CAAC;IAGH,wBAAC;AAAD,CAAC,AAZD,IAYC;AAZY,8CAAiB"}
|
|
@@ -14,5 +14,5 @@ var MoonbeamStakingActionType;
|
|
|
14
14
|
MoonbeamStakingActionType["SCHEDULE_BOND_LESS"] = "schedule_bond_less";
|
|
15
15
|
MoonbeamStakingActionType["EXECUTE_BOND_LESS"] = "execute_bond_less";
|
|
16
16
|
MoonbeamStakingActionType["CANCEL_BOND_LESS"] = "cancel_bond_less";
|
|
17
|
-
})(MoonbeamStakingActionType
|
|
17
|
+
})(MoonbeamStakingActionType = exports.MoonbeamStakingActionType || (exports.MoonbeamStakingActionType = {}));
|
|
18
18
|
//# sourceMappingURL=MoonbeamStakingActionType.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MoonbeamStakingActionType.js","sourceRoot":"","sources":["../../../../../../src/v0/protocol/moonbeam/data/staking/MoonbeamStakingActionType.ts"],"names":[],"mappings":";;;AAAA,IAAY,yBAYX;AAZD,WAAY,yBAAyB;IACnC,kDAAqB,CAAA;IACrB,wEAA2C,CAAA;IAC3C,sEAAyC,CAAA;IACzC,oEAAuC,CAAA;IACvC,gFAAmD,CAAA;IACnD,8EAAiD,CAAA;IACjD,4EAA+C,CAAA;IAC/C,oDAAuB,CAAA;IACvB,sEAAyC,CAAA;IACzC,oEAAuC,CAAA;IACvC,kEAAqC,CAAA;AACvC,CAAC,EAZW,yBAAyB,
|
|
1
|
+
{"version":3,"file":"MoonbeamStakingActionType.js","sourceRoot":"","sources":["../../../../../../src/v0/protocol/moonbeam/data/staking/MoonbeamStakingActionType.ts"],"names":[],"mappings":";;;AAAA,IAAY,yBAYX;AAZD,WAAY,yBAAyB;IACnC,kDAAqB,CAAA;IACrB,wEAA2C,CAAA;IAC3C,sEAAyC,CAAA;IACzC,oEAAuC,CAAA;IACvC,gFAAmD,CAAA;IACnD,8EAAiD,CAAA;IACjD,4EAA+C,CAAA;IAC/C,oDAAuB,CAAA;IACvB,sEAAyC,CAAA;IACzC,oEAAuC,CAAA;IACvC,kEAAqC,CAAA;AACvC,CAAC,EAZW,yBAAyB,GAAzB,iCAAyB,KAAzB,iCAAyB,QAYpC"}
|
|
@@ -1,65 +1,220 @@
|
|
|
1
1
|
"use strict";
|
|
2
|
+
var __extends = (this && this.__extends) || (function () {
|
|
3
|
+
var extendStatics = function (d, b) {
|
|
4
|
+
extendStatics = Object.setPrototypeOf ||
|
|
5
|
+
({ __proto__: [] } instanceof Array && function (d, b) { d.__proto__ = b; }) ||
|
|
6
|
+
function (d, b) { for (var p in b) if (Object.prototype.hasOwnProperty.call(b, p)) d[p] = b[p]; };
|
|
7
|
+
return extendStatics(d, b);
|
|
8
|
+
};
|
|
9
|
+
return function (d, b) {
|
|
10
|
+
if (typeof b !== "function" && b !== null)
|
|
11
|
+
throw new TypeError("Class extends value " + String(b) + " is not a constructor or null");
|
|
12
|
+
extendStatics(d, b);
|
|
13
|
+
function __() { this.constructor = d; }
|
|
14
|
+
d.prototype = b === null ? Object.create(b) : (__.prototype = b.prototype, new __());
|
|
15
|
+
};
|
|
16
|
+
})();
|
|
17
|
+
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
18
|
+
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
19
|
+
return new (P || (P = Promise))(function (resolve, reject) {
|
|
20
|
+
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
21
|
+
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
22
|
+
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
23
|
+
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
24
|
+
});
|
|
25
|
+
};
|
|
26
|
+
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
27
|
+
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
28
|
+
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
29
|
+
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
30
|
+
function step(op) {
|
|
31
|
+
if (f) throw new TypeError("Generator is already executing.");
|
|
32
|
+
while (_) try {
|
|
33
|
+
if (f = 1, y && (t = op[0] & 2 ? y["return"] : op[0] ? y["throw"] || ((t = y["return"]) && t.call(y), 0) : y.next) && !(t = t.call(y, op[1])).done) return t;
|
|
34
|
+
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
35
|
+
switch (op[0]) {
|
|
36
|
+
case 0: case 1: t = op; break;
|
|
37
|
+
case 4: _.label++; return { value: op[1], done: false };
|
|
38
|
+
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
39
|
+
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
40
|
+
default:
|
|
41
|
+
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
42
|
+
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
43
|
+
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
44
|
+
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
45
|
+
if (t[2]) _.ops.pop();
|
|
46
|
+
_.trys.pop(); continue;
|
|
47
|
+
}
|
|
48
|
+
op = body.call(thisArg, _);
|
|
49
|
+
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
50
|
+
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
51
|
+
}
|
|
52
|
+
};
|
|
2
53
|
Object.defineProperty(exports, "__esModule", { value: true });
|
|
3
54
|
exports.MoonbeamNodeClient = void 0;
|
|
4
|
-
|
|
5
|
-
|
|
6
|
-
|
|
7
|
-
|
|
8
|
-
|
|
9
|
-
|
|
10
|
-
|
|
11
|
-
|
|
12
|
-
|
|
13
|
-
|
|
14
|
-
|
|
15
|
-
|
|
16
|
-
|
|
17
|
-
|
|
18
|
-
|
|
19
|
-
|
|
20
|
-
|
|
21
|
-
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
|
|
25
|
-
|
|
26
|
-
}
|
|
27
|
-
|
|
28
|
-
return this
|
|
29
|
-
|
|
30
|
-
|
|
31
|
-
|
|
32
|
-
|
|
33
|
-
|
|
34
|
-
|
|
35
|
-
|
|
36
|
-
|
|
37
|
-
|
|
38
|
-
|
|
39
|
-
|
|
40
|
-
|
|
41
|
-
|
|
42
|
-
|
|
43
|
-
|
|
44
|
-
|
|
45
|
-
|
|
46
|
-
|
|
47
|
-
|
|
48
|
-
|
|
49
|
-
|
|
50
|
-
}
|
|
51
|
-
|
|
52
|
-
return this
|
|
53
|
-
|
|
54
|
-
|
|
55
|
-
|
|
56
|
-
|
|
57
|
-
|
|
58
|
-
|
|
59
|
-
|
|
60
|
-
|
|
61
|
-
|
|
62
|
-
|
|
63
|
-
|
|
55
|
+
var SCALEAccountId_1 = require("@airgap/substrate/v0/protocol/common/data/scale/type/SCALEAccountId");
|
|
56
|
+
var SCALEArray_1 = require("@airgap/substrate/v0/protocol/common/data/scale/type/SCALEArray");
|
|
57
|
+
var SCALEInt_1 = require("@airgap/substrate/v0/protocol/common/data/scale/type/SCALEInt");
|
|
58
|
+
var SubstrateNodeClient_1 = require("@airgap/substrate/v0/protocol/common/node/SubstrateNodeClient");
|
|
59
|
+
var MoonbeamCandidateMetadata_1 = require("../data/staking/MoonbeamCandidateMetadata");
|
|
60
|
+
var MoonbeamDelegationScheduledRequests_1 = require("../data/staking/MoonbeamDelegationScheduledRequests");
|
|
61
|
+
var MoonbeamDelegator_1 = require("../data/staking/MoonbeamDelegator");
|
|
62
|
+
var MoonbeamRoundInfo_1 = require("../data/staking/MoonbeamRoundInfo");
|
|
63
|
+
var MoonbeamNodeClient = /** @class */ (function (_super) {
|
|
64
|
+
__extends(MoonbeamNodeClient, _super);
|
|
65
|
+
function MoonbeamNodeClient() {
|
|
66
|
+
return _super !== null && _super.apply(this, arguments) || this;
|
|
67
|
+
}
|
|
68
|
+
MoonbeamNodeClient.prototype.getRound = function () {
|
|
69
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
70
|
+
var _this = this;
|
|
71
|
+
return __generator(this, function (_a) {
|
|
72
|
+
return [2 /*return*/, this.fromStorage('ParachainStaking', 'Round').then(function (item) {
|
|
73
|
+
return item ? MoonbeamRoundInfo_1.MoonbeamRoundInfo.decode(_this.runtimeVersion, item) : undefined;
|
|
74
|
+
})];
|
|
75
|
+
});
|
|
76
|
+
});
|
|
77
|
+
};
|
|
78
|
+
MoonbeamNodeClient.prototype.getCollators = function () {
|
|
79
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
80
|
+
var _this = this;
|
|
81
|
+
return __generator(this, function (_a) {
|
|
82
|
+
return [2 /*return*/, this.fromStorage('ParachainStaking', 'SelectedCandidates').then(function (items) {
|
|
83
|
+
return items
|
|
84
|
+
? SCALEArray_1.SCALEArray.decode(_this.network, _this.runtimeVersion, items, function (network, _, hex) {
|
|
85
|
+
return SCALEAccountId_1.SCALEAccountId.decode(network, hex, 20);
|
|
86
|
+
}).decoded.elements.map(function (encoded) { return encoded.address; })
|
|
87
|
+
: undefined;
|
|
88
|
+
})];
|
|
89
|
+
});
|
|
90
|
+
});
|
|
91
|
+
};
|
|
92
|
+
MoonbeamNodeClient.prototype.getDelegatorState = function (address) {
|
|
93
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
94
|
+
var _this = this;
|
|
95
|
+
return __generator(this, function (_a) {
|
|
96
|
+
return [2 /*return*/, this.fromStorage('ParachainStaking', 'DelegatorState', SCALEAccountId_1.SCALEAccountId.from(address, this.network)).then(function (item) {
|
|
97
|
+
return item ? MoonbeamDelegator_1.MoonbeamDelegator.decode(_this.runtimeVersion, item) : undefined;
|
|
98
|
+
})];
|
|
99
|
+
});
|
|
100
|
+
});
|
|
101
|
+
};
|
|
102
|
+
MoonbeamNodeClient.prototype.getDelegationScheduledRequests = function (address) {
|
|
103
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
104
|
+
var _this = this;
|
|
105
|
+
return __generator(this, function (_a) {
|
|
106
|
+
return [2 /*return*/, this.fromStorage('ParachainStaking', 'DelegationScheduledRequests', SCALEAccountId_1.SCALEAccountId.from(address, this.network)).then(function (item) {
|
|
107
|
+
return item ? MoonbeamDelegationScheduledRequests_1.MoonbeamDelegationScheduledRequests.decode(_this.runtimeVersion, item) : undefined;
|
|
108
|
+
})];
|
|
109
|
+
});
|
|
110
|
+
});
|
|
111
|
+
};
|
|
112
|
+
MoonbeamNodeClient.prototype.getCandidateInfo = function (address) {
|
|
113
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
114
|
+
var _this = this;
|
|
115
|
+
return __generator(this, function (_a) {
|
|
116
|
+
return [2 /*return*/, this.fromStorage('ParachainStaking', 'CandidateInfo', SCALEAccountId_1.SCALEAccountId.from(address, this.network)).then(function (item) {
|
|
117
|
+
return item ? MoonbeamCandidateMetadata_1.MoonbeamCandidateMetadata.decode(_this.runtimeVersion, item) : undefined;
|
|
118
|
+
})];
|
|
119
|
+
});
|
|
120
|
+
});
|
|
121
|
+
};
|
|
122
|
+
MoonbeamNodeClient.prototype.getCollatorCommission = function () {
|
|
123
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
124
|
+
return __generator(this, function (_a) {
|
|
125
|
+
return [2 /*return*/, this.fromStorage('ParachainStaking', 'CollatorCommission').then(function (item) {
|
|
126
|
+
return item ? SCALEInt_1.SCALEInt.decode(item, 32).decoded.value : undefined;
|
|
127
|
+
})];
|
|
128
|
+
});
|
|
129
|
+
});
|
|
130
|
+
};
|
|
131
|
+
MoonbeamNodeClient.prototype.getMaxTopDelegationsPerCandidate = function () {
|
|
132
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
133
|
+
return __generator(this, function (_a) {
|
|
134
|
+
return [2 /*return*/, this.getConstant('ParachainStaking', 'MaxTopDelegationsPerCandidate').then(function (item) {
|
|
135
|
+
return item ? SCALEInt_1.SCALEInt.decode(item, 32).decoded.value : undefined;
|
|
136
|
+
})];
|
|
137
|
+
});
|
|
138
|
+
});
|
|
139
|
+
};
|
|
140
|
+
MoonbeamNodeClient.prototype.getMaxBottomDelegationsPerCandidate = function () {
|
|
141
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
142
|
+
return __generator(this, function (_a) {
|
|
143
|
+
return [2 /*return*/, this.getConstant('ParachainStaking', 'MaxBottomDelegationsPerCandidate').then(function (item) {
|
|
144
|
+
return item ? SCALEInt_1.SCALEInt.decode(item, 32).decoded.value : undefined;
|
|
145
|
+
})];
|
|
146
|
+
});
|
|
147
|
+
});
|
|
148
|
+
};
|
|
149
|
+
MoonbeamNodeClient.prototype.getMaxDelegationsPerDelegator = function () {
|
|
150
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
151
|
+
return __generator(this, function (_a) {
|
|
152
|
+
return [2 /*return*/, this.getConstant('ParachainStaking', 'MaxDelegationsPerDelegator').then(function (item) {
|
|
153
|
+
return item ? SCALEInt_1.SCALEInt.decode(item, 32).decoded.value : undefined;
|
|
154
|
+
})];
|
|
155
|
+
});
|
|
156
|
+
});
|
|
157
|
+
};
|
|
158
|
+
MoonbeamNodeClient.prototype.getMinDelegation = function () {
|
|
159
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
160
|
+
return __generator(this, function (_a) {
|
|
161
|
+
return [2 /*return*/, this.getConstant('ParachainStaking', 'MinDelegation').then(function (item) { return (item ? SCALEInt_1.SCALEInt.decode(item).decoded.value : undefined); })];
|
|
162
|
+
});
|
|
163
|
+
});
|
|
164
|
+
};
|
|
165
|
+
MoonbeamNodeClient.prototype.getMinDelegatorStake = function () {
|
|
166
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
167
|
+
return __generator(this, function (_a) {
|
|
168
|
+
return [2 /*return*/, this.getConstant('ParachainStaking', 'MinDelegatorStk').then(function (item) { return (item ? SCALEInt_1.SCALEInt.decode(item).decoded.value : undefined); })];
|
|
169
|
+
});
|
|
170
|
+
});
|
|
171
|
+
};
|
|
172
|
+
MoonbeamNodeClient.prototype.getCandidateBondLessDelay = function () {
|
|
173
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
174
|
+
return __generator(this, function (_a) {
|
|
175
|
+
return [2 /*return*/, this.getConstant('ParachainStaking', 'CandidateBondLessDelay').then(function (item) {
|
|
176
|
+
return item ? SCALEInt_1.SCALEInt.decode(item).decoded.value : undefined;
|
|
177
|
+
})];
|
|
178
|
+
});
|
|
179
|
+
});
|
|
180
|
+
};
|
|
181
|
+
MoonbeamNodeClient.prototype.getLeaveDelegatorsDelay = function () {
|
|
182
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
183
|
+
return __generator(this, function (_a) {
|
|
184
|
+
return [2 /*return*/, this.getConstant('ParachainStaking', 'LeaveDelegatorsDelay').then(function (item) {
|
|
185
|
+
return item ? SCALEInt_1.SCALEInt.decode(item).decoded.value : undefined;
|
|
186
|
+
})];
|
|
187
|
+
});
|
|
188
|
+
});
|
|
189
|
+
};
|
|
190
|
+
MoonbeamNodeClient.prototype.getRevokeDelegationDelay = function () {
|
|
191
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
192
|
+
return __generator(this, function (_a) {
|
|
193
|
+
return [2 /*return*/, this.getConstant('ParachainStaking', 'RevokeDelegationDelay').then(function (item) {
|
|
194
|
+
return item ? SCALEInt_1.SCALEInt.decode(item).decoded.value : undefined;
|
|
195
|
+
})];
|
|
196
|
+
});
|
|
197
|
+
});
|
|
198
|
+
};
|
|
199
|
+
MoonbeamNodeClient.prototype.getDelegationBondLessDelay = function () {
|
|
200
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
201
|
+
return __generator(this, function (_a) {
|
|
202
|
+
return [2 /*return*/, this.getConstant('ParachainStaking', 'DelegationBondLessDelay').then(function (item) {
|
|
203
|
+
return item ? SCALEInt_1.SCALEInt.decode(item).decoded.value : undefined;
|
|
204
|
+
})];
|
|
205
|
+
});
|
|
206
|
+
});
|
|
207
|
+
};
|
|
208
|
+
MoonbeamNodeClient.prototype.getDefaultBlocksPerRound = function () {
|
|
209
|
+
return __awaiter(this, void 0, void 0, function () {
|
|
210
|
+
return __generator(this, function (_a) {
|
|
211
|
+
return [2 /*return*/, this.getConstant('ParachainStaking', 'DefaultBlocksPerRound').then(function (item) {
|
|
212
|
+
return item ? SCALEInt_1.SCALEInt.decode(item).decoded.value : undefined;
|
|
213
|
+
})];
|
|
214
|
+
});
|
|
215
|
+
});
|
|
216
|
+
};
|
|
217
|
+
return MoonbeamNodeClient;
|
|
218
|
+
}(SubstrateNodeClient_1.SubstrateNodeClient));
|
|
64
219
|
exports.MoonbeamNodeClient = MoonbeamNodeClient;
|
|
65
220
|
//# sourceMappingURL=MoonbeamNodeClient.js.map
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"MoonbeamNodeClient.js","sourceRoot":"","sources":["../../../../../src/v0/protocol/moonbeam/node/MoonbeamNodeClient.ts"],"names":[],"mappings":"
|
|
1
|
+
{"version":3,"file":"MoonbeamNodeClient.js","sourceRoot":"","sources":["../../../../../src/v0/protocol/moonbeam/node/MoonbeamNodeClient.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,sGAAoG;AACpG,8FAA4F;AAC5F,0FAAwF;AACxF,qGAAmG;AAInG,uFAAqF;AACrF,2GAAyG;AACzG,uEAAqE;AACrE,uEAAqE;AAErE;IAAwC,sCAA8C;IAAtF;;IAgGA,CAAC;IA/Fc,qCAAQ,GAArB;;;;gBACE,sBAAO,IAAI,CAAC,WAAW,CAAC,kBAAkB,EAAE,OAAO,CAAC,CAAC,IAAI,CAAC,UAAC,IAAI;wBAC7D,OAAA,IAAI,CAAC,CAAC,CAAC,qCAAiB,CAAC,MAAM,CAAC,KAAI,CAAC,cAAc,EAAE,IAAI,CAAC,CAAC,CAAC,CAAC,SAAS;oBAAtE,CAAsE,CACvE,EAAA;;;KACF;IAEY,yCAAY,GAAzB;;;;gBACE,sBAAO,IAAI,CAAC,WAAW,CAAC,kBAAkB,EAAE,oBAAoB,CAAC,CAAC,IAAI,CAAC,UAAC,KAAK;wBAC3E,OAAA,KAAK;4BACH,CAAC,CAAC,uBAAU,CAAC,MAAM,CAAC,KAAI,CAAC,OAAO,EAAE,KAAI,CAAC,cAAc,EAAE,KAAK,EAAE,UAAC,OAAO,EAAE,CAAC,EAAE,GAAG;gCAC1E,OAAA,+BAAc,CAAC,MAAM,CAAC,OAAO,EAAE,GAAG,EAAE,EAAE,CAAC;4BAAvC,CAAuC,CACxC,CAAC,OAAO,CAAC,QAAQ,CAAC,GAAG,CAAC,UAAC,OAAO,IAAK,OAAA,OAAO,CAAC,OAAO,EAAf,CAAe,CAAC;4BACtD,CAAC,CAAC,SAAS;oBAJb,CAIa,CACd,EAAA;;;KACF;IAEY,8CAAiB,GAA9B,UAA+B,OAAwB;;;;gBACrD,sBAAO,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