@polkadot/extrinsics
Advanced tools
Comparing version
38
index.js
@@ -6,27 +6,27 @@ "use strict"; | ||
// of the ISC license. See the LICENSE file for details. | ||
const bnToU8a = require('@polkadot/util/bn/toU8a'); | ||
const consensus = require('./consensus'); | ||
const expandMethods = require('./methods'); // NOTE: Order here is important, counts as an index | ||
const council = require('./council'); | ||
const councilVoting = require('./councilVoting'); | ||
const BASIC_KEYS = ['consensus', 'session', 'staking', 'timestamp', 'treasury', 'democracy', 'council', 'councilVoting']; | ||
const democracy = require('./democracy'); | ||
module.exports = function init(baseMap) { | ||
return BASIC_KEYS.reduce((extrinsics, name, sectionIndex) => { | ||
const section = baseMap[name]; | ||
const session = require('./session'); | ||
if (section) { | ||
const description = section.description; | ||
const index = bnToU8a(sectionIndex, 8); | ||
extrinsics[name] = { | ||
description, | ||
index, | ||
name, | ||
private: expandMethods(section.private, name, index), | ||
public: expandMethods(section.public, name, index) | ||
}; | ||
} | ||
const staking = require('./staking'); | ||
return extrinsics; | ||
}, {}); | ||
const timestamp = require('./timestamp'); | ||
const treasury = require('./treasury'); | ||
module.exports = { | ||
consensus: consensus('consensus', 0), | ||
session: session('session', 1), | ||
staking: staking('staking', 2), | ||
timestamp: timestamp('timestamp', 3), | ||
treasury: treasury('treasury', 4), | ||
democracy: democracy('democracy', 5), | ||
council: council('council', 6), | ||
councilVoting: councilVoting('councilVoting', 7) | ||
}; |
{ | ||
"name": "@polkadot/extrinsics", | ||
"version": "0.16.15", | ||
"version": "0.17.1", | ||
"main": "index.js", | ||
@@ -15,6 +15,6 @@ "repository": "https://github.com/polkadot-js/apps.git", | ||
"@babel/runtime": "^7.0.0-beta.47", | ||
"@polkadot/params": "^0.16.15", | ||
"@polkadot/primitives": "^0.16.15", | ||
"@polkadot/params": "^0.17.1", | ||
"@polkadot/primitives": "^0.17.1", | ||
"@polkadot/util": "^0.22.2" | ||
} | ||
} |
Sorry, the diff of this file is not supported yet
Sorry, the diff of this file is not supported yet
Major refactor
Supply chain riskPackage has recently undergone a major refactor. It may be unstable or indicate significant internal changes. Use caution when updating to versions that include significant changes.
Found 1 instance in 1 package
23859
264.26%23
155.56%291
506.25%1
Infinity%+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
+ Added
- Removed
- Removed
- Removed
Updated
Updated