@airgap/moonbeam 0.13.10 → 0.13.11-beta.1
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 +12 -9
- package/airgap-coinlib-moonbeam.min.js +0 -115369
- package/index.d.ts +0 -1
- package/index.js +0 -18
- package/index.js.map +0 -1
- package/v0/index.d.ts +0 -6
- package/v0/index.js +0 -37
- package/v0/index.js.map +0 -1
- package/v0/protocol/moonbase/MoonbaseProtocol.d.ts +0 -17
- package/v0/protocol/moonbase/MoonbaseProtocol.js +0 -75
- package/v0/protocol/moonbase/MoonbaseProtocol.js.map +0 -1
- package/v0/protocol/moonbase/MoonbaseProtocolOptions.d.ts +0 -21
- package/v0/protocol/moonbase/MoonbaseProtocolOptions.js +0 -80
- package/v0/protocol/moonbase/MoonbaseProtocolOptions.js.map +0 -1
- package/v0/protocol/moonbeam/MoonbeamProtocol.d.ts +0 -55
- package/v0/protocol/moonbeam/MoonbeamProtocol.js +0 -641
- package/v0/protocol/moonbeam/MoonbeamProtocol.js.map +0 -1
- package/v0/protocol/moonbeam/MoonbeamProtocolOptions.d.ts +0 -32
- package/v0/protocol/moonbeam/MoonbeamProtocolOptions.js +0 -104
- package/v0/protocol/moonbeam/MoonbeamProtocolOptions.js.map +0 -1
- package/v0/protocol/moonbeam/controllers/MoonbeamAccountController.d.ts +0 -28
- package/v0/protocol/moonbeam/controllers/MoonbeamAccountController.js +0 -551
- package/v0/protocol/moonbeam/controllers/MoonbeamAccountController.js.map +0 -1
- package/v0/protocol/moonbeam/controllers/MoonbeamTransactionController.d.ts +0 -9
- package/v0/protocol/moonbeam/controllers/MoonbeamTransactionController.js +0 -75
- package/v0/protocol/moonbeam/controllers/MoonbeamTransactionController.js.map +0 -1
- package/v0/protocol/moonbeam/data/staking/MoonbeamBond.d.ts +0 -13
- package/v0/protocol/moonbeam/data/staking/MoonbeamBond.js +0 -43
- package/v0/protocol/moonbeam/data/staking/MoonbeamBond.js.map +0 -1
- package/v0/protocol/moonbeam/data/staking/MoonbeamCandidateBondLessRequest.d.ts +0 -11
- package/v0/protocol/moonbeam/data/staking/MoonbeamCandidateBondLessRequest.js +0 -43
- package/v0/protocol/moonbeam/data/staking/MoonbeamCandidateBondLessRequest.js.map +0 -1
- package/v0/protocol/moonbeam/data/staking/MoonbeamCandidateMetadata.d.ts +0 -28
- package/v0/protocol/moonbeam/data/staking/MoonbeamCandidateMetadata.js +0 -49
- package/v0/protocol/moonbeam/data/staking/MoonbeamCandidateMetadata.js.map +0 -1
- package/v0/protocol/moonbeam/data/staking/MoonbeamCollatorDetails.d.ts +0 -9
- package/v0/protocol/moonbeam/data/staking/MoonbeamCollatorDetails.js +0 -3
- package/v0/protocol/moonbeam/data/staking/MoonbeamCollatorDetails.js.map +0 -1
- package/v0/protocol/moonbeam/data/staking/MoonbeamDelegationDetails.d.ts +0 -13
- package/v0/protocol/moonbeam/data/staking/MoonbeamDelegationDetails.js +0 -3
- package/v0/protocol/moonbeam/data/staking/MoonbeamDelegationDetails.js.map +0 -1
- package/v0/protocol/moonbeam/data/staking/MoonbeamDelegationScheduledRequests.d.ts +0 -46
- package/v0/protocol/moonbeam/data/staking/MoonbeamDelegationScheduledRequests.js +0 -148
- package/v0/protocol/moonbeam/data/staking/MoonbeamDelegationScheduledRequests.js.map +0 -1
- package/v0/protocol/moonbeam/data/staking/MoonbeamDelegator.d.ts +0 -40
- package/v0/protocol/moonbeam/data/staking/MoonbeamDelegator.js +0 -132
- package/v0/protocol/moonbeam/data/staking/MoonbeamDelegator.js.map +0 -1
- package/v0/protocol/moonbeam/data/staking/MoonbeamDelegatorDetails.d.ts +0 -5
- package/v0/protocol/moonbeam/data/staking/MoonbeamDelegatorDetails.js +0 -3
- package/v0/protocol/moonbeam/data/staking/MoonbeamDelegatorDetails.js.map +0 -1
- package/v0/protocol/moonbeam/data/staking/MoonbeamRoundInfo.d.ts +0 -8
- package/v0/protocol/moonbeam/data/staking/MoonbeamRoundInfo.js +0 -22
- package/v0/protocol/moonbeam/data/staking/MoonbeamRoundInfo.js.map +0 -1
- package/v0/protocol/moonbeam/data/staking/MoonbeamStakingActionType.d.ts +0 -13
- package/v0/protocol/moonbeam/data/staking/MoonbeamStakingActionType.js +0 -18
- package/v0/protocol/moonbeam/data/staking/MoonbeamStakingActionType.js.map +0 -1
- package/v0/protocol/moonbeam/node/MoonbeamNodeClient.d.ts +0 -26
- package/v0/protocol/moonbeam/node/MoonbeamNodeClient.js +0 -220
- package/v0/protocol/moonbeam/node/MoonbeamNodeClient.js.map +0 -1
- package/v0/protocol/moonriver/MoonriverProtocol.d.ts +0 -17
- package/v0/protocol/moonriver/MoonriverProtocol.js +0 -75
- package/v0/protocol/moonriver/MoonriverProtocol.js.map +0 -1
- package/v0/protocol/moonriver/MoonriverProtocolOptions.d.ts +0 -21
- package/v0/protocol/moonriver/MoonriverProtocolOptions.js +0 -80
- package/v0/protocol/moonriver/MoonriverProtocolOptions.js.map +0 -1
- package/v1/block-explorer/SubscanBlockExplorer.d.ts +0 -4
- package/v1/block-explorer/SubscanBlockExplorer.js +0 -21
- package/v1/block-explorer/SubscanBlockExplorer.js.map +0 -1
- package/v1/controller/MoonbeamAccountController.d.ts +0 -22
- package/v1/controller/MoonbeamAccountController.js +0 -494
- package/v1/controller/MoonbeamAccountController.js.map +0 -1
- package/v1/controller/MoonbeamTransactionController.d.ts +0 -5
- package/v1/controller/MoonbeamTransactionController.js +0 -28
- package/v1/controller/MoonbeamTransactionController.js.map +0 -1
- package/v1/data/staking/MoonbeamBond.d.ts +0 -9
- package/v1/data/staking/MoonbeamBond.js +0 -41
- package/v1/data/staking/MoonbeamBond.js.map +0 -1
- package/v1/data/staking/MoonbeamCandidateBondLessRequest.d.ts +0 -9
- package/v1/data/staking/MoonbeamCandidateBondLessRequest.js +0 -41
- package/v1/data/staking/MoonbeamCandidateBondLessRequest.js.map +0 -1
- package/v1/data/staking/MoonbeamCandidateMetadata.d.ts +0 -27
- package/v1/data/staking/MoonbeamCandidateMetadata.js +0 -50
- package/v1/data/staking/MoonbeamCandidateMetadata.js.map +0 -1
- package/v1/data/staking/MoonbeamCollatorDetails.d.ts +0 -9
- package/v1/data/staking/MoonbeamCollatorDetails.js +0 -3
- package/v1/data/staking/MoonbeamCollatorDetails.js.map +0 -1
- package/v1/data/staking/MoonbeamDelegationDetails.d.ts +0 -13
- package/v1/data/staking/MoonbeamDelegationDetails.js +0 -3
- package/v1/data/staking/MoonbeamDelegationDetails.js.map +0 -1
- package/v1/data/staking/MoonbeamDelegationScheduledRequests.d.ts +0 -40
- package/v1/data/staking/MoonbeamDelegationScheduledRequests.js +0 -148
- package/v1/data/staking/MoonbeamDelegationScheduledRequests.js.map +0 -1
- package/v1/data/staking/MoonbeamDelegator.d.ts +0 -35
- package/v1/data/staking/MoonbeamDelegator.js +0 -132
- package/v1/data/staking/MoonbeamDelegator.js.map +0 -1
- package/v1/data/staking/MoonbeamDelegatorDetails.d.ts +0 -5
- package/v1/data/staking/MoonbeamDelegatorDetails.js +0 -3
- package/v1/data/staking/MoonbeamDelegatorDetails.js.map +0 -1
- package/v1/data/staking/MoonbeamRoundInfo.d.ts +0 -9
- package/v1/data/staking/MoonbeamRoundInfo.js +0 -21
- package/v1/data/staking/MoonbeamRoundInfo.js.map +0 -1
- package/v1/data/staking/MoonbeamStakingActionType.d.ts +0 -13
- package/v1/data/staking/MoonbeamStakingActionType.js +0 -18
- package/v1/data/staking/MoonbeamStakingActionType.js.map +0 -1
- package/v1/data/transaction/method/args.d.ts +0 -2
- package/v1/data/transaction/method/args.js +0 -475
- package/v1/data/transaction/method/args.js.map +0 -1
- package/v1/data/transaction/transaction.d.ts +0 -2
- package/v1/data/transaction/transaction.js +0 -29
- package/v1/data/transaction/transaction.js.map +0 -1
- package/v1/index.d.ts +0 -11
- package/v1/index.js +0 -16
- package/v1/index.js.map +0 -1
- package/v1/module/MoonbeamModule.d.ts +0 -17
- package/v1/module/MoonbeamModule.js +0 -121
- package/v1/module/MoonbeamModule.js.map +0 -1
- package/v1/node/MoonbeamNodeClient.d.ts +0 -35
- package/v1/node/MoonbeamNodeClient.js +0 -269
- package/v1/node/MoonbeamNodeClient.js.map +0 -1
- package/v1/protocol/MoonbaseProtocol.d.ts +0 -14
- package/v1/protocol/MoonbaseProtocol.js +0 -110
- package/v1/protocol/MoonbaseProtocol.js.map +0 -1
- package/v1/protocol/MoonbeamBaseProtocol.d.ts +0 -27
- package/v1/protocol/MoonbeamBaseProtocol.js +0 -432
- package/v1/protocol/MoonbeamBaseProtocol.js.map +0 -1
- package/v1/protocol/MoonbeamProtocol.d.ts +0 -14
- package/v1/protocol/MoonbeamProtocol.js +0 -125
- package/v1/protocol/MoonbeamProtocol.js.map +0 -1
- package/v1/protocol/MoonriverProtocol.d.ts +0 -14
- package/v1/protocol/MoonriverProtocol.js +0 -110
- package/v1/protocol/MoonriverProtocol.js.map +0 -1
- package/v1/serializer/v3/schemas/converter/transaction-converter.d.ts +0 -7
- package/v1/serializer/v3/schemas/converter/transaction-converter.js +0 -21
- package/v1/serializer/v3/schemas/converter/transaction-converter.js.map +0 -1
- package/v1/serializer/v3/schemas/definitions/transaction-sign-request-moonbeam.d.ts +0 -3
- package/v1/serializer/v3/schemas/definitions/transaction-sign-request-moonbeam.js +0 -3
- package/v1/serializer/v3/schemas/definitions/transaction-sign-request-moonbeam.js.map +0 -1
- package/v1/serializer/v3/schemas/definitions/transaction-sign-response-moonbeam.d.ts +0 -3
- package/v1/serializer/v3/schemas/definitions/transaction-sign-response-moonbeam.js +0 -3
- package/v1/serializer/v3/schemas/definitions/transaction-sign-response-moonbeam.js.map +0 -1
- package/v1/serializer/v3/schemas/generated/transaction-sign-request-moonbeam.json +0 -36
- package/v1/serializer/v3/schemas/generated/transaction-sign-response-moonbeam.json +0 -19
- package/v1/serializer/v3/serializer-companion.d.ts +0 -14
- package/v1/serializer/v3/serializer-companion.js +0 -189
- package/v1/serializer/v3/serializer-companion.js.map +0 -1
- package/v1/serializer/v3/validators/transaction-validator.d.ts +0 -4
- package/v1/serializer/v3/validators/transaction-validator.js +0 -28
- package/v1/serializer/v3/validators/transaction-validator.js.map +0 -1
- package/v1/serializer/v3/validators/validators.d.ts +0 -4
- package/v1/serializer/v3/validators/validators.js +0 -6
- package/v1/serializer/v3/validators/validators.js.map +0 -1
- package/v1/types/configuration.d.ts +0 -11
- package/v1/types/configuration.js +0 -3
- package/v1/types/configuration.js.map +0 -1
- package/v1/types/protocol.d.ts +0 -13
- package/v1/types/protocol.js +0 -3
- package/v1/types/protocol.js.map +0 -1
|
@@ -1,121 +0,0 @@
|
|
|
1
|
-
"use strict";
|
|
2
|
-
var __awaiter = (this && this.__awaiter) || function (thisArg, _arguments, P, generator) {
|
|
3
|
-
function adopt(value) { return value instanceof P ? value : new P(function (resolve) { resolve(value); }); }
|
|
4
|
-
return new (P || (P = Promise))(function (resolve, reject) {
|
|
5
|
-
function fulfilled(value) { try { step(generator.next(value)); } catch (e) { reject(e); } }
|
|
6
|
-
function rejected(value) { try { step(generator["throw"](value)); } catch (e) { reject(e); } }
|
|
7
|
-
function step(result) { result.done ? resolve(result.value) : adopt(result.value).then(fulfilled, rejected); }
|
|
8
|
-
step((generator = generator.apply(thisArg, _arguments || [])).next());
|
|
9
|
-
});
|
|
10
|
-
};
|
|
11
|
-
var __generator = (this && this.__generator) || function (thisArg, body) {
|
|
12
|
-
var _ = { label: 0, sent: function() { if (t[0] & 1) throw t[1]; return t[1]; }, trys: [], ops: [] }, f, y, t, g;
|
|
13
|
-
return g = { next: verb(0), "throw": verb(1), "return": verb(2) }, typeof Symbol === "function" && (g[Symbol.iterator] = function() { return this; }), g;
|
|
14
|
-
function verb(n) { return function (v) { return step([n, v]); }; }
|
|
15
|
-
function step(op) {
|
|
16
|
-
if (f) throw new TypeError("Generator is already executing.");
|
|
17
|
-
while (_) try {
|
|
18
|
-
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;
|
|
19
|
-
if (y = 0, t) op = [op[0] & 2, t.value];
|
|
20
|
-
switch (op[0]) {
|
|
21
|
-
case 0: case 1: t = op; break;
|
|
22
|
-
case 4: _.label++; return { value: op[1], done: false };
|
|
23
|
-
case 5: _.label++; y = op[1]; op = [0]; continue;
|
|
24
|
-
case 7: op = _.ops.pop(); _.trys.pop(); continue;
|
|
25
|
-
default:
|
|
26
|
-
if (!(t = _.trys, t = t.length > 0 && t[t.length - 1]) && (op[0] === 6 || op[0] === 2)) { _ = 0; continue; }
|
|
27
|
-
if (op[0] === 3 && (!t || (op[1] > t[0] && op[1] < t[3]))) { _.label = op[1]; break; }
|
|
28
|
-
if (op[0] === 6 && _.label < t[1]) { _.label = t[1]; t = op; break; }
|
|
29
|
-
if (t && _.label < t[2]) { _.label = t[2]; _.ops.push(op); break; }
|
|
30
|
-
if (t[2]) _.ops.pop();
|
|
31
|
-
_.trys.pop(); continue;
|
|
32
|
-
}
|
|
33
|
-
op = body.call(thisArg, _);
|
|
34
|
-
} catch (e) { op = [6, e]; y = 0; } finally { f = t = 0; }
|
|
35
|
-
if (op[0] & 5) throw op[1]; return { value: op[0] ? op[1] : void 0, done: true };
|
|
36
|
-
}
|
|
37
|
-
};
|
|
38
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
39
|
-
exports.MoonbeamModule = void 0;
|
|
40
|
-
var coinlib_core_1 = require("@airgap/coinlib-core");
|
|
41
|
-
var errors_1 = require("@airgap/coinlib-core/errors");
|
|
42
|
-
var module_kit_1 = require("@airgap/module-kit");
|
|
43
|
-
var SubscanBlockExplorer_1 = require("../block-explorer/SubscanBlockExplorer");
|
|
44
|
-
var MoonbeamProtocol_1 = require("../protocol/MoonbeamProtocol");
|
|
45
|
-
var MoonriverProtocol_1 = require("../protocol/MoonriverProtocol");
|
|
46
|
-
var serializer_companion_1 = require("../serializer/v3/serializer-companion");
|
|
47
|
-
var MoonbeamModule = /** @class */ (function () {
|
|
48
|
-
function MoonbeamModule() {
|
|
49
|
-
var _a;
|
|
50
|
-
this.networkRegistries = (_a = {},
|
|
51
|
-
_a[coinlib_core_1.MainProtocolSymbols.MOONBEAM] = new module_kit_1.ModuleNetworkRegistry({
|
|
52
|
-
supportedNetworks: [MoonbeamProtocol_1.MOONBEAM_MAINNET_PROTOCOL_NETWORK]
|
|
53
|
-
}),
|
|
54
|
-
_a[coinlib_core_1.MainProtocolSymbols.MOONRIVER] = new module_kit_1.ModuleNetworkRegistry({
|
|
55
|
-
supportedNetworks: [MoonriverProtocol_1.MOONRIVER_MAINNET_PROTOCOL_NETWORK]
|
|
56
|
-
}),
|
|
57
|
-
_a);
|
|
58
|
-
this.supportedProtocols = (0, module_kit_1.createSupportedProtocols)(this.networkRegistries);
|
|
59
|
-
}
|
|
60
|
-
MoonbeamModule.prototype.createOfflineProtocol = function (identifier) {
|
|
61
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
62
|
-
return __generator(this, function (_a) {
|
|
63
|
-
return [2 /*return*/, this.createProtocol(identifier)];
|
|
64
|
-
});
|
|
65
|
-
});
|
|
66
|
-
};
|
|
67
|
-
MoonbeamModule.prototype.createOnlineProtocol = function (identifier, networkId) {
|
|
68
|
-
var _a;
|
|
69
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
70
|
-
var network;
|
|
71
|
-
return __generator(this, function (_b) {
|
|
72
|
-
network = (_a = this.networkRegistries[identifier]) === null || _a === void 0 ? void 0 : _a.findNetwork(networkId);
|
|
73
|
-
if (network === undefined) {
|
|
74
|
-
throw new errors_1.ConditionViolationError(coinlib_core_1.Domain.SUBSTRATE, "Protocol network type not supported. (Moonbeam)");
|
|
75
|
-
}
|
|
76
|
-
return [2 /*return*/, this.createProtocol(identifier, network)];
|
|
77
|
-
});
|
|
78
|
-
});
|
|
79
|
-
};
|
|
80
|
-
MoonbeamModule.prototype.createBlockExplorer = function (identifier, networkId) {
|
|
81
|
-
var _a;
|
|
82
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
83
|
-
var network;
|
|
84
|
-
return __generator(this, function (_b) {
|
|
85
|
-
network = (_a = this.networkRegistries[identifier]) === null || _a === void 0 ? void 0 : _a.findNetwork(networkId);
|
|
86
|
-
if ((network === null || network === void 0 ? void 0 : network.type) !== 'mainnet') {
|
|
87
|
-
throw new errors_1.ConditionViolationError(coinlib_core_1.Domain.SUBSTRATE, "Block Explorer network type not supported. (Moonbeam)");
|
|
88
|
-
}
|
|
89
|
-
switch (identifier) {
|
|
90
|
-
case coinlib_core_1.MainProtocolSymbols.MOONBEAM:
|
|
91
|
-
return [2 /*return*/, (0, SubscanBlockExplorer_1.createMoonbeamSubscanBlockExplorer)()];
|
|
92
|
-
case coinlib_core_1.MainProtocolSymbols.MOONRIVER:
|
|
93
|
-
return [2 /*return*/, (0, SubscanBlockExplorer_1.createMoonriverSubscanBlockExplorer)()];
|
|
94
|
-
default:
|
|
95
|
-
throw new errors_1.ConditionViolationError(coinlib_core_1.Domain.SUBSTRATE, "Protocol ".concat(identifier, " not supported. (Moonbeam)"));
|
|
96
|
-
}
|
|
97
|
-
return [2 /*return*/];
|
|
98
|
-
});
|
|
99
|
-
});
|
|
100
|
-
};
|
|
101
|
-
MoonbeamModule.prototype.createV3SerializerCompanion = function () {
|
|
102
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
103
|
-
return __generator(this, function (_a) {
|
|
104
|
-
return [2 /*return*/, new serializer_companion_1.MoonbeamV3SerializerCompanion()];
|
|
105
|
-
});
|
|
106
|
-
});
|
|
107
|
-
};
|
|
108
|
-
MoonbeamModule.prototype.createProtocol = function (identifier, network) {
|
|
109
|
-
switch (identifier) {
|
|
110
|
-
case coinlib_core_1.MainProtocolSymbols.MOONBEAM:
|
|
111
|
-
return (0, MoonbeamProtocol_1.createMoonbeamProtocol)({ network: network });
|
|
112
|
-
case coinlib_core_1.MainProtocolSymbols.MOONRIVER:
|
|
113
|
-
return (0, MoonriverProtocol_1.createMoonriverProtocol)({ network: network });
|
|
114
|
-
default:
|
|
115
|
-
throw new errors_1.ConditionViolationError(coinlib_core_1.Domain.SUBSTRATE, "Protocol ".concat(identifier, " not supported. (Moonbeam)"));
|
|
116
|
-
}
|
|
117
|
-
};
|
|
118
|
-
return MoonbeamModule;
|
|
119
|
-
}());
|
|
120
|
-
exports.MoonbeamModule = MoonbeamModule;
|
|
121
|
-
//# sourceMappingURL=MoonbeamModule.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MoonbeamModule.js","sourceRoot":"","sources":["../../../src/v1/module/MoonbeamModule.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AAAA,qDAAkE;AAClE,sDAAqE;AACrE,iDAO2B;AAI3B,+EAAgI;AAChI,iEAAwG;AACxG,mEAA2G;AAC3G,8EAAqF;AAIrF;IAAA;;QACmB,sBAAiB;YAChC,GAAC,kCAAmB,CAAC,QAAQ,IAAG,IAAI,kCAAqB,CAAC;gBACxD,iBAAiB,EAAE,CAAC,oDAAiC,CAAC;aACvD,CAAC;YACF,GAAC,kCAAmB,CAAC,SAAS,IAAG,IAAI,kCAAqB,CAAC;gBACzD,iBAAiB,EAAE,CAAC,sDAAkC,CAAC;aACxD,CAAC;gBACH;QACe,uBAAkB,GAAsD,IAAA,qCAAwB,EAAC,IAAI,CAAC,iBAAiB,CAAC,CAAA;IA6C1I,CAAC;IA3Cc,8CAAqB,GAAlC,UAAmC,UAA8B;;;gBAC/D,sBAAO,IAAI,CAAC,cAAc,CAAC,UAAU,CAAC,EAAA;;;KACvC;IAEY,6CAAoB,GAAjC,UAAkC,UAA8B,EAAE,SAAkB;;;;;gBAC5E,OAAO,GAAgC,MAAA,IAAI,CAAC,iBAAiB,CAAC,UAAU,CAAC,0CAAE,WAAW,CAAC,SAAS,CAAC,CAAA;gBACvG,IAAI,OAAO,KAAK,SAAS,EAAE;oBACzB,MAAM,IAAI,gCAAuB,CAAC,qBAAM,CAAC,SAAS,EAAE,iDAAiD,CA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,wCAAc"}
|
|
@@ -1,35 +0,0 @@
|
|
|
1
|
-
import BigNumber from '@airgap/coinlib-core/dependencies/src/bignumber.js-9.0.0/bignumber';
|
|
2
|
-
import { SubstrateCommonNodeClient, SubstrateEthAddress } from '@airgap/substrate/v1';
|
|
3
|
-
import { MoonbeamCandidateMetadata } from '../data/staking/MoonbeamCandidateMetadata';
|
|
4
|
-
import { MoonbeamDelegationScheduledRequests } from '../data/staking/MoonbeamDelegationScheduledRequests';
|
|
5
|
-
import { MoonbeamDelegator } from '../data/staking/MoonbeamDelegator';
|
|
6
|
-
import { MoonbeamRoundInfo } from '../data/staking/MoonbeamRoundInfo';
|
|
7
|
-
import { MoonbeamProtocolConfiguration } from '../types/configuration';
|
|
8
|
-
export declare class MoonbeamNodeClient extends SubstrateCommonNodeClient<MoonbeamProtocolConfiguration> {
|
|
9
|
-
constructor(configuration: MoonbeamProtocolConfiguration, url: string);
|
|
10
|
-
getRound(): Promise<MoonbeamRoundInfo | undefined>;
|
|
11
|
-
getCollators(): Promise<SubstrateEthAddress[] | undefined>;
|
|
12
|
-
getDelegatorState(address: SubstrateEthAddress): Promise<MoonbeamDelegator | undefined>;
|
|
13
|
-
getDelegationScheduledRequests(address: SubstrateEthAddress): Promise<MoonbeamDelegationScheduledRequests | undefined>;
|
|
14
|
-
getCandidateInfo(address: SubstrateEthAddress): Promise<MoonbeamCandidateMetadata | undefined>;
|
|
15
|
-
getCollatorCommission(): Promise<BigNumber | undefined>;
|
|
16
|
-
getMaxTopDelegationsPerCandidate(): Promise<BigNumber | undefined>;
|
|
17
|
-
getMaxBottomDelegationsPerCandidate(): Promise<BigNumber | undefined>;
|
|
18
|
-
getMaxDelegationsPerDelegator(): Promise<BigNumber | undefined>;
|
|
19
|
-
getMinDelegation(): Promise<BigNumber | undefined>;
|
|
20
|
-
getMinDelegatorStake(): Promise<BigNumber | undefined>;
|
|
21
|
-
getCandidateBondLessDelay(): Promise<BigNumber | undefined>;
|
|
22
|
-
getLeaveDelegatorsDelay(): Promise<BigNumber | undefined>;
|
|
23
|
-
getRevokeDelegationDelay(): Promise<BigNumber | undefined>;
|
|
24
|
-
getDelegationBondLessDelay(): Promise<BigNumber | undefined>;
|
|
25
|
-
getDefaultBlocksPerRound(): Promise<BigNumber | undefined>;
|
|
26
|
-
}
|
|
27
|
-
export declare const STORAGE_ENTRIES: {
|
|
28
|
-
ParachainStaking: readonly ["CollatorCommission", "CandidateInfo", "DelegatorState", "Round", "SelectedCandidates", "DelegationScheduledRequests"];
|
|
29
|
-
};
|
|
30
|
-
export declare const CALLS: {
|
|
31
|
-
ParachainStaking: readonly ["delegate", "schedule_leave_delegators", "execute_leave_delegators", "cancel_leave_delegators", "schedule_revoke_delegation", "execute_delegation_request", "cancel_delegation_request", "delegator_bond_more", "schedule_delegator_bond_less", "execute_candidate_bond_less", "cancel_candidate_bond_less"];
|
|
32
|
-
};
|
|
33
|
-
export declare const CONSTANTS: {
|
|
34
|
-
ParachainStaking: readonly ["DefaultBlocksPerRound", "MaxTopDelegationsPerCandidate", "MaxBottomDelegationsPerCandidate", "MaxDelegationsPerDelegator", "MinDelegation", "MinDelegatorStk", "CandidateBondLessDelay", "LeaveDelegatorsDelay", "RevokeDelegationDelay", "DelegationBondLessDelay"];
|
|
35
|
-
};
|
|
@@ -1,269 +0,0 @@
|
|
|
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
|
-
};
|
|
53
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
54
|
-
exports.CONSTANTS = exports.CALLS = exports.STORAGE_ENTRIES = exports.MoonbeamNodeClient = void 0;
|
|
55
|
-
var v1_1 = require("@airgap/substrate/v1");
|
|
56
|
-
var MoonbeamCandidateMetadata_1 = require("../data/staking/MoonbeamCandidateMetadata");
|
|
57
|
-
var MoonbeamDelegationScheduledRequests_1 = require("../data/staking/MoonbeamDelegationScheduledRequests");
|
|
58
|
-
var MoonbeamDelegator_1 = require("../data/staking/MoonbeamDelegator");
|
|
59
|
-
var MoonbeamRoundInfo_1 = require("../data/staking/MoonbeamRoundInfo");
|
|
60
|
-
var MoonbeamNodeClient = /** @class */ (function (_super) {
|
|
61
|
-
__extends(MoonbeamNodeClient, _super);
|
|
62
|
-
function MoonbeamNodeClient(configuration, url) {
|
|
63
|
-
var _this = _super.call(this, configuration, url) || this;
|
|
64
|
-
_this.registerCallEntrypointEntries([
|
|
65
|
-
_this.createCallEndpointEntry('delegate', 'ParachainStaking', 'delegate'),
|
|
66
|
-
_this.createCallEndpointEntry('schedule_leave_delegators', 'ParachainStaking', 'schedule_leave_delegators'),
|
|
67
|
-
_this.createCallEndpointEntry('execute_leave_delegators', 'ParachainStaking', 'execute_leave_delegators'),
|
|
68
|
-
_this.createCallEndpointEntry('cancel_leave_delegators', 'ParachainStaking', 'cancel_leave_delegators'),
|
|
69
|
-
_this.createCallEndpointEntry('schedule_revoke_delegation', 'ParachainStaking', 'schedule_revoke_delegation'),
|
|
70
|
-
_this.createCallEndpointEntry('execute_delegation_request', 'ParachainStaking', 'execute_delegation_request'),
|
|
71
|
-
_this.createCallEndpointEntry('cancel_delegation_request', 'ParachainStaking', 'cancel_delegation_request'),
|
|
72
|
-
_this.createCallEndpointEntry('delegator_bond_more', 'ParachainStaking', 'delegator_bond_more'),
|
|
73
|
-
_this.createCallEndpointEntry('schedule_delegator_bond_less', 'ParachainStaking', 'schedule_delegator_bond_less'),
|
|
74
|
-
_this.createCallEndpointEntry('execute_candidate_bond_less', 'ParachainStaking', 'execute_candidate_bond_less'),
|
|
75
|
-
_this.createCallEndpointEntry('cancel_candidate_bond_less', 'ParachainStaking', 'cancel_candidate_bond_less')
|
|
76
|
-
]);
|
|
77
|
-
return _this;
|
|
78
|
-
}
|
|
79
|
-
MoonbeamNodeClient.prototype.getRound = function () {
|
|
80
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
81
|
-
var _this = this;
|
|
82
|
-
return __generator(this, function (_a) {
|
|
83
|
-
return [2 /*return*/, this.fromStorage('ParachainStaking', 'Round').then(function (item) {
|
|
84
|
-
return item ? MoonbeamRoundInfo_1.MoonbeamRoundInfo.decode(_this.configuration, _this.runtimeVersion, item) : undefined;
|
|
85
|
-
})];
|
|
86
|
-
});
|
|
87
|
-
});
|
|
88
|
-
};
|
|
89
|
-
MoonbeamNodeClient.prototype.getCollators = function () {
|
|
90
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
91
|
-
var _this = this;
|
|
92
|
-
return __generator(this, function (_a) {
|
|
93
|
-
return [2 /*return*/, this.fromStorage('ParachainStaking', 'SelectedCandidates').then(function (items) {
|
|
94
|
-
return items
|
|
95
|
-
? v1_1.SCALEArray.decode(_this.configuration, _this.runtimeVersion, items, function (configuration, _, hex) {
|
|
96
|
-
return v1_1.SCALEAccountId.decode(configuration, hex, 20);
|
|
97
|
-
}).decoded.elements.map(function (encoded) { return encoded.address; })
|
|
98
|
-
: undefined;
|
|
99
|
-
})];
|
|
100
|
-
});
|
|
101
|
-
});
|
|
102
|
-
};
|
|
103
|
-
MoonbeamNodeClient.prototype.getDelegatorState = function (address) {
|
|
104
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
105
|
-
var _this = this;
|
|
106
|
-
return __generator(this, function (_a) {
|
|
107
|
-
return [2 /*return*/, this.fromStorage('ParachainStaking', 'DelegatorState', v1_1.SCALEAccountId.from(address, this.configuration)).then(function (item) {
|
|
108
|
-
return item ? MoonbeamDelegator_1.MoonbeamDelegator.decode(_this.configuration, _this.runtimeVersion, item) : undefined;
|
|
109
|
-
})];
|
|
110
|
-
});
|
|
111
|
-
});
|
|
112
|
-
};
|
|
113
|
-
MoonbeamNodeClient.prototype.getDelegationScheduledRequests = function (address) {
|
|
114
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
115
|
-
var _this = this;
|
|
116
|
-
return __generator(this, function (_a) {
|
|
117
|
-
return [2 /*return*/, this.fromStorage('ParachainStaking', 'DelegationScheduledRequests', v1_1.SCALEAccountId.from(address, this.configuration)).then(function (item) { return (item ? MoonbeamDelegationScheduledRequests_1.MoonbeamDelegationScheduledRequests.decode(_this.configuration, _this.runtimeVersion, item) : undefined); })];
|
|
118
|
-
});
|
|
119
|
-
});
|
|
120
|
-
};
|
|
121
|
-
MoonbeamNodeClient.prototype.getCandidateInfo = function (address) {
|
|
122
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
123
|
-
var _this = this;
|
|
124
|
-
return __generator(this, function (_a) {
|
|
125
|
-
return [2 /*return*/, this.fromStorage('ParachainStaking', 'CandidateInfo', v1_1.SCALEAccountId.from(address, this.configuration)).then(function (item) {
|
|
126
|
-
return item ? MoonbeamCandidateMetadata_1.MoonbeamCandidateMetadata.decode(_this.configuration, _this.runtimeVersion, item) : undefined;
|
|
127
|
-
})];
|
|
128
|
-
});
|
|
129
|
-
});
|
|
130
|
-
};
|
|
131
|
-
MoonbeamNodeClient.prototype.getCollatorCommission = function () {
|
|
132
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
133
|
-
return __generator(this, function (_a) {
|
|
134
|
-
return [2 /*return*/, this.fromStorage('ParachainStaking', 'CollatorCommission').then(function (item) {
|
|
135
|
-
return item ? v1_1.SCALEInt.decode(item, 32).decoded.value : undefined;
|
|
136
|
-
})];
|
|
137
|
-
});
|
|
138
|
-
});
|
|
139
|
-
};
|
|
140
|
-
MoonbeamNodeClient.prototype.getMaxTopDelegationsPerCandidate = function () {
|
|
141
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
142
|
-
return __generator(this, function (_a) {
|
|
143
|
-
return [2 /*return*/, this.getConstant('ParachainStaking', 'MaxTopDelegationsPerCandidate').then(function (item) {
|
|
144
|
-
return item ? v1_1.SCALEInt.decode(item, 32).decoded.value : undefined;
|
|
145
|
-
})];
|
|
146
|
-
});
|
|
147
|
-
});
|
|
148
|
-
};
|
|
149
|
-
MoonbeamNodeClient.prototype.getMaxBottomDelegationsPerCandidate = function () {
|
|
150
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
151
|
-
return __generator(this, function (_a) {
|
|
152
|
-
return [2 /*return*/, this.getConstant('ParachainStaking', 'MaxBottomDelegationsPerCandidate').then(function (item) {
|
|
153
|
-
return item ? v1_1.SCALEInt.decode(item, 32).decoded.value : undefined;
|
|
154
|
-
})];
|
|
155
|
-
});
|
|
156
|
-
});
|
|
157
|
-
};
|
|
158
|
-
MoonbeamNodeClient.prototype.getMaxDelegationsPerDelegator = function () {
|
|
159
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
160
|
-
return __generator(this, function (_a) {
|
|
161
|
-
return [2 /*return*/, this.getConstant('ParachainStaking', 'MaxDelegationsPerDelegator').then(function (item) {
|
|
162
|
-
return item ? v1_1.SCALEInt.decode(item, 32).decoded.value : undefined;
|
|
163
|
-
})];
|
|
164
|
-
});
|
|
165
|
-
});
|
|
166
|
-
};
|
|
167
|
-
MoonbeamNodeClient.prototype.getMinDelegation = function () {
|
|
168
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
169
|
-
return __generator(this, function (_a) {
|
|
170
|
-
return [2 /*return*/, this.getConstant('ParachainStaking', 'MinDelegation').then(function (item) { return (item ? v1_1.SCALEInt.decode(item).decoded.value : undefined); })];
|
|
171
|
-
});
|
|
172
|
-
});
|
|
173
|
-
};
|
|
174
|
-
MoonbeamNodeClient.prototype.getMinDelegatorStake = function () {
|
|
175
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
176
|
-
return __generator(this, function (_a) {
|
|
177
|
-
return [2 /*return*/, this.getConstant('ParachainStaking', 'MinDelegatorStk').then(function (item) { return (item ? v1_1.SCALEInt.decode(item).decoded.value : undefined); })];
|
|
178
|
-
});
|
|
179
|
-
});
|
|
180
|
-
};
|
|
181
|
-
MoonbeamNodeClient.prototype.getCandidateBondLessDelay = function () {
|
|
182
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
183
|
-
return __generator(this, function (_a) {
|
|
184
|
-
return [2 /*return*/, this.getConstant('ParachainStaking', 'CandidateBondLessDelay').then(function (item) {
|
|
185
|
-
return item ? v1_1.SCALEInt.decode(item).decoded.value : undefined;
|
|
186
|
-
})];
|
|
187
|
-
});
|
|
188
|
-
});
|
|
189
|
-
};
|
|
190
|
-
MoonbeamNodeClient.prototype.getLeaveDelegatorsDelay = function () {
|
|
191
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
192
|
-
return __generator(this, function (_a) {
|
|
193
|
-
return [2 /*return*/, this.getConstant('ParachainStaking', 'LeaveDelegatorsDelay').then(function (item) {
|
|
194
|
-
return item ? v1_1.SCALEInt.decode(item).decoded.value : undefined;
|
|
195
|
-
})];
|
|
196
|
-
});
|
|
197
|
-
});
|
|
198
|
-
};
|
|
199
|
-
MoonbeamNodeClient.prototype.getRevokeDelegationDelay = function () {
|
|
200
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
201
|
-
return __generator(this, function (_a) {
|
|
202
|
-
return [2 /*return*/, this.getConstant('ParachainStaking', 'RevokeDelegationDelay').then(function (item) {
|
|
203
|
-
return item ? v1_1.SCALEInt.decode(item).decoded.value : undefined;
|
|
204
|
-
})];
|
|
205
|
-
});
|
|
206
|
-
});
|
|
207
|
-
};
|
|
208
|
-
MoonbeamNodeClient.prototype.getDelegationBondLessDelay = function () {
|
|
209
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
210
|
-
return __generator(this, function (_a) {
|
|
211
|
-
return [2 /*return*/, this.getConstant('ParachainStaking', 'DelegationBondLessDelay').then(function (item) {
|
|
212
|
-
return item ? v1_1.SCALEInt.decode(item).decoded.value : undefined;
|
|
213
|
-
})];
|
|
214
|
-
});
|
|
215
|
-
});
|
|
216
|
-
};
|
|
217
|
-
MoonbeamNodeClient.prototype.getDefaultBlocksPerRound = function () {
|
|
218
|
-
return __awaiter(this, void 0, void 0, function () {
|
|
219
|
-
return __generator(this, function (_a) {
|
|
220
|
-
return [2 /*return*/, this.getConstant('ParachainStaking', 'DefaultBlocksPerRound').then(function (item) {
|
|
221
|
-
return item ? v1_1.SCALEInt.decode(item).decoded.value : undefined;
|
|
222
|
-
})];
|
|
223
|
-
});
|
|
224
|
-
});
|
|
225
|
-
};
|
|
226
|
-
return MoonbeamNodeClient;
|
|
227
|
-
}(v1_1.SubstrateCommonNodeClient));
|
|
228
|
-
exports.MoonbeamNodeClient = MoonbeamNodeClient;
|
|
229
|
-
// Supported Calls
|
|
230
|
-
exports.STORAGE_ENTRIES = {
|
|
231
|
-
ParachainStaking: [
|
|
232
|
-
'CollatorCommission',
|
|
233
|
-
'CandidateInfo',
|
|
234
|
-
'DelegatorState',
|
|
235
|
-
'Round',
|
|
236
|
-
'SelectedCandidates',
|
|
237
|
-
'DelegationScheduledRequests'
|
|
238
|
-
]
|
|
239
|
-
};
|
|
240
|
-
exports.CALLS = {
|
|
241
|
-
ParachainStaking: [
|
|
242
|
-
'delegate',
|
|
243
|
-
'schedule_leave_delegators',
|
|
244
|
-
'execute_leave_delegators',
|
|
245
|
-
'cancel_leave_delegators',
|
|
246
|
-
'schedule_revoke_delegation',
|
|
247
|
-
'execute_delegation_request',
|
|
248
|
-
'cancel_delegation_request',
|
|
249
|
-
'delegator_bond_more',
|
|
250
|
-
'schedule_delegator_bond_less',
|
|
251
|
-
'execute_candidate_bond_less',
|
|
252
|
-
'cancel_candidate_bond_less'
|
|
253
|
-
]
|
|
254
|
-
};
|
|
255
|
-
exports.CONSTANTS = {
|
|
256
|
-
ParachainStaking: [
|
|
257
|
-
'DefaultBlocksPerRound',
|
|
258
|
-
'MaxTopDelegationsPerCandidate',
|
|
259
|
-
'MaxBottomDelegationsPerCandidate',
|
|
260
|
-
'MaxDelegationsPerDelegator',
|
|
261
|
-
'MinDelegation',
|
|
262
|
-
'MinDelegatorStk',
|
|
263
|
-
'CandidateBondLessDelay',
|
|
264
|
-
'LeaveDelegatorsDelay',
|
|
265
|
-
'RevokeDelegationDelay',
|
|
266
|
-
'DelegationBondLessDelay'
|
|
267
|
-
]
|
|
268
|
-
};
|
|
269
|
-
//# sourceMappingURL=MoonbeamNodeClient.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"file":"MoonbeamNodeClient.js","sourceRoot":"","sources":["../../../src/v1/node/MoonbeamNodeClient.ts"],"names":[],"mappings":";;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;AACA,2CAA2H;AAE3H,uFAAqF;AACrF,2GAAyG;AACzG,uEAAqE;AACrE,uEAAqE;AAGrE;IAAwC,sCAAwD;IAC9F,4BAAmB,aAA4C,EAAE,GAAW;QAA5E,YACE,kBAAM,aAAa,EAAE,GAAG,CAAC,SAc1B;QAbC,KAAI,CAAC,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;QAChB,oBAAoB;QACpB,eAAe;QACf,gBAAgB;QAChB,OAAO;QACP,oBAAoB;QACpB,6BAA6B;KACrB;CACX,CAAA;AAEY,QAAA,KAAK,GAAG;IACnB,gBAAgB,EAAE;QAChB,UAAU;QACV,2BAA2B;QAC3B,0BAA0B;QAC1B,yBAAyB;QACzB,4BAA4B;QAC5B,4BAA4B;QAC5B,2BAA2B;QAC3B,qBAAqB;QACrB,8BAA8B;QAC9B,6BAA6B;QAC7B,4BAA4B;KACpB;CACX,CAAA;AAEY,QAAA,SAAS,GAAG;IACvB,gBAAgB,EAAE;QAChB,uBAAuB;QACvB,+BAA+B;QAC/B,kCAAkC;QAClC,4BAA4B;QAC5B,eAAe;QACf,iBAAiB;QACjB,wBAAwB;QACxB,sBAAsB;QACtB,uBAAuB;QACvB,yBAAyB;KACjB;CACX,CAAA"}
|
|
@@ -1,14 +0,0 @@
|
|
|
1
|
-
import { ProtocolMetadata, RecursivePartial } from '@airgap/module-kit';
|
|
2
|
-
import { MoonbeamProtocolConfiguration } from '../types/configuration';
|
|
3
|
-
import { MoonbaseUnits, MoonbeamProtocolNetwork, MoonbeamProtocolOptions } from '../types/protocol';
|
|
4
|
-
import { MoonbeamBaseProtocol, MoonbeamBaseProtocolImpl } from './MoonbeamBaseProtocol';
|
|
5
|
-
export interface MoonbaseProtocol extends MoonbeamBaseProtocol<MoonbaseUnits> {
|
|
6
|
-
}
|
|
7
|
-
export declare const MOONBASE_METADATA: ProtocolMetadata<MoonbaseUnits>;
|
|
8
|
-
export declare const MOONBASE_CONFIGURATION: MoonbeamProtocolConfiguration;
|
|
9
|
-
export declare class MoonbaseProtocolImpl extends MoonbeamBaseProtocolImpl<MoonbaseUnits> implements MoonbaseProtocol {
|
|
10
|
-
constructor(options?: RecursivePartial<MoonbeamProtocolOptions>);
|
|
11
|
-
}
|
|
12
|
-
export declare function createMoonbaseProtocol(options?: RecursivePartial<MoonbeamProtocolOptions>): MoonbaseProtocol;
|
|
13
|
-
export declare const MOONBASE_MAINNET_PROTOCOL_NETWORK: MoonbeamProtocolNetwork;
|
|
14
|
-
export declare function createMoonbaseProtocolOptions(network?: Partial<MoonbeamProtocolNetwork>): MoonbeamProtocolOptions;
|
|
@@ -1,110 +0,0 @@
|
|
|
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 __assign = (this && this.__assign) || function () {
|
|
18
|
-
__assign = Object.assign || function(t) {
|
|
19
|
-
for (var s, i = 1, n = arguments.length; i < n; i++) {
|
|
20
|
-
s = arguments[i];
|
|
21
|
-
for (var p in s) if (Object.prototype.hasOwnProperty.call(s, p))
|
|
22
|
-
t[p] = s[p];
|
|
23
|
-
}
|
|
24
|
-
return t;
|
|
25
|
-
};
|
|
26
|
-
return __assign.apply(this, arguments);
|
|
27
|
-
};
|
|
28
|
-
Object.defineProperty(exports, "__esModule", { value: true });
|
|
29
|
-
exports.createMoonbaseProtocolOptions = exports.MOONBASE_MAINNET_PROTOCOL_NETWORK = exports.createMoonbaseProtocol = exports.MoonbaseProtocolImpl = exports.MOONBASE_CONFIGURATION = exports.MOONBASE_METADATA = void 0;
|
|
30
|
-
var coinlib_core_1 = require("@airgap/coinlib-core");
|
|
31
|
-
var MoonbeamBaseProtocol_1 = require("./MoonbeamBaseProtocol");
|
|
32
|
-
var MoonbeamProtocol_1 = require("./MoonbeamProtocol");
|
|
33
|
-
// Implementation
|
|
34
|
-
exports.MOONBASE_METADATA = {
|
|
35
|
-
identifier: coinlib_core_1.MainProtocolSymbols.MOONBASE,
|
|
36
|
-
name: 'Moonbase',
|
|
37
|
-
units: {
|
|
38
|
-
DEV: {
|
|
39
|
-
symbol: { value: 'DEV' },
|
|
40
|
-
decimals: 18
|
|
41
|
-
},
|
|
42
|
-
mDEV: {
|
|
43
|
-
symbol: { value: 'mDEV' },
|
|
44
|
-
decimals: 15
|
|
45
|
-
},
|
|
46
|
-
uDEV: {
|
|
47
|
-
symbol: { value: 'uDEV' },
|
|
48
|
-
decimals: 12
|
|
49
|
-
},
|
|
50
|
-
nDEV: {
|
|
51
|
-
symbol: { value: 'nDEV' },
|
|
52
|
-
decimals: 9
|
|
53
|
-
},
|
|
54
|
-
pDEV: {
|
|
55
|
-
symbol: { value: 'pDEV' },
|
|
56
|
-
decimals: 6
|
|
57
|
-
},
|
|
58
|
-
fDEV: {
|
|
59
|
-
symbol: { value: 'fDEV' },
|
|
60
|
-
decimals: 3
|
|
61
|
-
},
|
|
62
|
-
aDEV: {
|
|
63
|
-
symbol: { value: 'aDEV' },
|
|
64
|
-
decimals: 0
|
|
65
|
-
}
|
|
66
|
-
},
|
|
67
|
-
mainUnit: 'DEV',
|
|
68
|
-
account: {
|
|
69
|
-
standardDerivationPath: "m/44'/60'/0'/0/0",
|
|
70
|
-
address: {
|
|
71
|
-
isCaseSensitive: false,
|
|
72
|
-
placeholder: '0xabc...',
|
|
73
|
-
regex: '^0x[a-fA-F0-9]{40}$'
|
|
74
|
-
}
|
|
75
|
-
}
|
|
76
|
-
};
|
|
77
|
-
exports.MOONBASE_CONFIGURATION = MoonbeamProtocol_1.MOONBEAM_CONFIGURATION;
|
|
78
|
-
var MoonbaseProtocolImpl = /** @class */ (function (_super) {
|
|
79
|
-
__extends(MoonbaseProtocolImpl, _super);
|
|
80
|
-
function MoonbaseProtocolImpl(options) {
|
|
81
|
-
if (options === void 0) { options = {}; }
|
|
82
|
-
var completeOptions = createMoonbaseProtocolOptions(options.network);
|
|
83
|
-
var metadata = exports.MOONBASE_METADATA;
|
|
84
|
-
var configuration = exports.MOONBASE_CONFIGURATION;
|
|
85
|
-
return _super.call(this, { metadata: metadata, configuration: configuration, network: completeOptions.network }) || this;
|
|
86
|
-
}
|
|
87
|
-
return MoonbaseProtocolImpl;
|
|
88
|
-
}(MoonbeamBaseProtocol_1.MoonbeamBaseProtocolImpl));
|
|
89
|
-
exports.MoonbaseProtocolImpl = MoonbaseProtocolImpl;
|
|
90
|
-
// Factory
|
|
91
|
-
function createMoonbaseProtocol(options) {
|
|
92
|
-
if (options === void 0) { options = {}; }
|
|
93
|
-
return new MoonbaseProtocolImpl(options);
|
|
94
|
-
}
|
|
95
|
-
exports.createMoonbaseProtocol = createMoonbaseProtocol;
|
|
96
|
-
exports.MOONBASE_MAINNET_PROTOCOL_NETWORK = {
|
|
97
|
-
name: 'Mainnet',
|
|
98
|
-
type: 'mainnet',
|
|
99
|
-
rpcUrl: 'https://moonbeam-alpha.api.onfinality.io/public',
|
|
100
|
-
blockExplorerApi: 'https://moonbase.subscan.io/api/scan'
|
|
101
|
-
};
|
|
102
|
-
var DEFAULT_MOONBASE_PROTOCOL_NETWORK = exports.MOONBASE_MAINNET_PROTOCOL_NETWORK;
|
|
103
|
-
function createMoonbaseProtocolOptions(network) {
|
|
104
|
-
if (network === void 0) { network = {}; }
|
|
105
|
-
return {
|
|
106
|
-
network: __assign(__assign({}, DEFAULT_MOONBASE_PROTOCOL_NETWORK), network)
|
|
107
|
-
};
|
|
108
|
-
}
|
|
109
|
-
exports.createMoonbaseProtocolOptions = createMoonbaseProtocolOptions;
|
|
110
|
-
//# sourceMappingURL=MoonbaseProtocol.js.map
|
|
@@ -1 +0,0 @@
|
|
|
1
|
-
{"version":3,"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;QAAvD,wBAAA,EAAA,YAAuD;QACxE,IAAM,eAAe,GAA4B,6BAA6B,CAAC,OAAO,CAAC,OAAO,CAAC,CAAA;QAE/F,IAAM,QAAQ,GAAoC,yBAAiB,CAAA;QACnE,IAAM,aAAa,GAAkC,8BAAsB,CAAA;eAE3E,kBAAM,EAAE,QAAQ,UAAA,EAAE,aAAa,eAAA,EAAE,OAAO,EAAE,eAAe,CAAC,OAAO,EAAE,CAAC;IACtE,CAAC;IACH,2BAAC;AAAD,CAAC,AATD,CAA0C,+CAAwB,GASjE;AATY,oDAAoB;AAWjC,UAAU;AAEV,SAAgB,sBAAsB,CAAC,OAAuD;IAAvD,wBAAA,EAAA,YAAuD;IAC5F,OAAO,IAAI,oBAAoB,CAAC,OAAO,CAAC,CAAA;AAC1C,CAAC;AAFD,wDAEC;AAEY,QAAA,iCAAiC,GAA4B;IACxE,IAAI,EAAE,SAAS;IACf,IAAI,EAAE,SAAS;IACf,MAAM,EAAE,iDAAiD;IACzD,gBAAgB,EAAE,sCAAsC;CACzD,CAAA;AAED,IAAM,iCAAiC,GAA4B,yCAAiC,CAAA;AAEpG,SAAgB,6BAA6B,CAAC,OAA8C;IAA9C,wBAAA,EAAA,YAA8C;IAC1F,OAAO;QACL,OAAO,wBAAO,iCAAiC,GAAK,OAAO,CAAE;KAC9D,CAAA;AACH,CAAC;AAJD,sEAIC"}
|
|
@@ -1,27 +0,0 @@
|
|
|
1
|
-
import BigNumber from '@airgap/coinlib-core/dependencies/src/bignumber.js-9.0.0/bignumber';
|
|
2
|
-
import { PublicKey } from '@airgap/module-kit';
|
|
3
|
-
import { SubstrateAccountId, SubstrateEthAddress, SubstrateProtocol, SubstrateProtocolImpl, SubstrateTransactionType, SubstrateUnsignedTransaction } from '@airgap/substrate/v1';
|
|
4
|
-
import { MoonbeamAccountController } from '../controller/MoonbeamAccountController';
|
|
5
|
-
import { MoonbeamTransactionController } from '../controller/MoonbeamTransactionController';
|
|
6
|
-
import { MoonbeamNodeClient } from '../node/MoonbeamNodeClient';
|
|
7
|
-
import { MoonbeamProtocolConfiguration } from '../types/configuration';
|
|
8
|
-
import { MoonbeamBaseProtocolOptions, MoonbeamProtocolNetwork } from '../types/protocol';
|
|
9
|
-
export interface MoonbeamBaseProtocol<_Units extends string = string> extends SubstrateProtocol<_Units, MoonbeamProtocolNetwork> {
|
|
10
|
-
}
|
|
11
|
-
export declare abstract class MoonbeamBaseProtocolImpl<_Units extends string> extends SubstrateProtocolImpl<_Units, MoonbeamProtocolConfiguration, MoonbeamProtocolNetwork, MoonbeamNodeClient, MoonbeamAccountController, MoonbeamTransactionController> implements MoonbeamBaseProtocol<_Units> {
|
|
12
|
-
constructor(options: MoonbeamBaseProtocolOptions<_Units>);
|
|
13
|
-
prepareDelegation(publicKey: PublicKey, tip: string | number | BigNumber, candidate: string, amount: string | number | BigNumber): Promise<SubstrateUnsignedTransaction>;
|
|
14
|
-
prepareScheduleUndelegate(publicKey: PublicKey, tip: string | number | BigNumber, collator: string): Promise<SubstrateUnsignedTransaction>;
|
|
15
|
-
prepareExecuteUndelegate(publicKey: PublicKey, tip: string | number | BigNumber, candidate: string): Promise<SubstrateUnsignedTransaction>;
|
|
16
|
-
prepareCancelUndelegate(publicKey: PublicKey, tip: string | number | BigNumber, candidate: string): Promise<SubstrateUnsignedTransaction>;
|
|
17
|
-
prepareScheduleUndelegateAll(publicKey: PublicKey, tip: string | number | BigNumber): Promise<SubstrateUnsignedTransaction>;
|
|
18
|
-
prepareExecuteUndelegateAll(publicKey: PublicKey, tip: string | number | BigNumber): Promise<SubstrateUnsignedTransaction>;
|
|
19
|
-
prepareCancelUndelegateAll(publicKey: PublicKey, tip: string | number | BigNumber): Promise<SubstrateUnsignedTransaction>;
|
|
20
|
-
prepareDelegatorBondMore(publicKey: PublicKey, tip: string | number | BigNumber, candidate: string, more: string | number | BigNumber): Promise<SubstrateUnsignedTransaction>;
|
|
21
|
-
prepareScheduleDelegatorBondLess(publicKey: PublicKey, tip: string | number | BigNumber, candidate: string, less: string | number | BigNumber): Promise<SubstrateUnsignedTransaction>;
|
|
22
|
-
prepareExecuteDelegatorBondLess(publicKey: PublicKey, tip: string | number | BigNumber, candidate: string): Promise<SubstrateUnsignedTransaction>;
|
|
23
|
-
prepareCancelDelegatorBondLess(publicKey: PublicKey, tip: string | number | BigNumber, candidate: string): Promise<SubstrateUnsignedTransaction>;
|
|
24
|
-
private prepareExecuteDelegationRequest;
|
|
25
|
-
private prepareCancelDelegationRequest;
|
|
26
|
-
protected getFutureRequiredTransactions(accountId: SubstrateAccountId<SubstrateEthAddress>, intention: 'transfer' | 'check' | 'delegate'): Promise<[SubstrateTransactionType<MoonbeamProtocolConfiguration>, any][]>;
|
|
27
|
-
}
|