1 | "use strict";
|
2 | Object.defineProperty(exports, "__esModule", { value: true });
|
3 | exports.decorateDeriveSections = void 0;
|
4 | const api_derive_1 = require("@polkadot/api-derive");
|
5 |
|
6 |
|
7 |
|
8 | function decorateDeriveSections(decorateMethod, derives) {
|
9 | const getKeys = (s) => Object.keys(derives[s]);
|
10 | const creator = (s, m) => decorateMethod(derives[s][m]);
|
11 | const result = {};
|
12 | const names = Object.keys(derives);
|
13 | for (let i = 0, count = names.length; i < count; i++) {
|
14 | (0, api_derive_1.lazyDeriveSection)(result, names[i], getKeys, creator);
|
15 | }
|
16 | return result;
|
17 | }
|
18 | exports.decorateDeriveSections = decorateDeriveSections;
|