Huge News!Announcing our $40M Series B led by Abstract Ventures.Learn More
Socket
Sign inDemoInstall
Socket

mec

Package Overview
Dependencies
Maintainers
1
Versions
21
Alerts
File Explorer

Advanced tools

Socket logo

Install Socket

Detect and block malicious and high-risk dependencies

Install

mec

This package helps to create multi-layer chains upon Ethereum Network. Also it provides easy to use nodejs API to any of consortium network and helps to manage all of them at the same time

  • 0.0.7
  • Source
  • npm
  • Socket score

Version published
Weekly downloads
1
decreased by-95.83%
Maintainers
1
Weekly downloads
 
Created
Source

nodejs-MEC

The official repository for mec npm package. The mec package is designed to quickly deploy a MEC client in a nodejs application and quickly integrate with any service from a decentralized MEC network

Use-case

Searching for specific blockchain sub-network:

const mec = require('mec')

mec.init()

mec.startLayer.search("signup")

Response contains interface needed to start new sub-network connection:

{
  "name": "signup",
  "enode": "enode://b61f72cb88eed0ea9c2214492186a473774a8a9bb3…38cc9d0230a81d8fde59724ea313fa@212.20.41.42:30303",
  "address": "0xeac784b35b697740a3dc17ec59247749cc298c37",
  "abi": [
    {
      "constant":true,
      "inputs":[0],
      "name":"abidata",
      "outputs":[1],
      "payable":false,
      "stateMutability":"view",
      "type":"function"
    }, 
    {},
    {}
  ]
}

Globaly available sub-networks

mec.startLayer.getInterface()

Response contains all available sub-networks interfaces:

> []
  [Object, Object]
  0: { 
    abi: Array[3],
    address: "0xeac784b35b697740a3dc17ec59247749cc298c37",
    enode: "enode://b61f72cb88eed0ea9c2214492186a473774a8a9bb318194ac38d3900062a11a0b48d1a4e8d36e04432c2e287e485f2f30a38cc9d0230a81d8fde59724ea313fa@212.20.41.42:30303",
    name: "signup"
  }
  1: {
    abi: Array[3],
    address: "0x1234567890123456789012345678901234567890",
    enode: "enode://.....",
    name: "main"
  }

Starting new connection

mec.startLayer.start("signup", 1092015)

Successfull response means that now you can interact with sub-network applications over http/ipc/API

Keywords

FAQs

Package last updated on 04 Mar 2018

Did you know?

Socket

Socket for GitHub automatically highlights issues in each pull request and monitors the health of all your open source dependencies. Discover the contents of your packages and block harmful activity before you install or update your dependencies.

Install

Related posts

SocketSocket SOC 2 Logo

Product

  • Package Alerts
  • Integrations
  • Docs
  • Pricing
  • FAQ
  • Roadmap
  • Changelog

Packages

npm

Stay in touch

Get open source security insights delivered straight into your inbox.


  • Terms
  • Privacy
  • Security

Made with ⚡️ by Socket Inc