scripts/helpers/parsed-rpc-traits.js
function getMethodsFromRustTraits () {
  const traitsDir = path.join(__dirname, '../../.parity/rpc/src/v1/traits');

  return fs
    .readdirSync(traitsDir)
    .filter((name) => name !== 'mod.rs' && /\.rs$/.test(name))
    .map((name) => fs.readFileSync(path.join(traitsDir, name)))
    .map(parseMethodsFromRust)
    .reduce((a, b) => a.concat(b));
}
function getMethodsFromRustTraits () {
  const traitsDir = path.join(__dirname, '../../.parity/rpc/src/v1/traits');

  return fs
    .readdirSync(traitsDir)
    .filter((name) => name !== 'mod.rs' && /\.rs$/.test(name))
    .map((name) => fs.readFileSync(path.join(traitsDir, name)))
    .map(parseMethodsFromRust)
    .reduce((a, b) => a.concat(b));
}
function getMethodsFromRustTraits ( ) { const traitsDir = path . join ( __dirname , '../../.parity/rpc/src/v1/traits' ) ; return fs . readdirSync ( traitsDir ) . filter ( ( name ) => name !== 'mod.rs' && / \.rs$ / . test ( name ) ) . map ( ( name ) => fs . readFileSync ( path . join ( traitsDir , name ) ) ) . map ( parseMethodsFromRust ) . reduce ( ( a , b ) => a . concat ( b ) ) ; }
Get a list of all JSON-RPC methods from all defined traits
Get a list of all JSON - RPC methods from all defined traits