ethpm

2019-08-15 admin

ethpm是什么

什么是ethpm,Ethereum Package Installer and Publishing Library

ethpm使用教程帮助文档

Ethereum Package Manager / Javascript

Join the chat at https://gitter.im/ethpm/Lobby

Overview

This package provides utilities for publishing and consuming Ethereum packages based on the Ethereum Package Manager specification. It is meant to be integrated directly into development tools to support their use of the Ethereum Package Management ecosystem.

Usage

// Require and configure EthPM relative to a package location on disk.
// `host` and `registry` must conform to Javascript Host and Registry interface.
// A "host" is a service that holds the files, like IPFS. A "registry" is a
// service that records package versions that have been published and their
// associated lockfile on the host.
var EthPM = require("ethpm");
var config = EthPM.configure(package_directory, host, registry);

// Install a single package into the current package, denoted by name and version.
// Returns a promise.
EthPM.installDependency(config, package_name, version_range);

// Install all dependencies of the current package.
// Returns a promise.
EthPM.installPackage(config);

// Publish the current package.
// Returns a promise.
// `contract_metadata` is information about published contracts you'd like include
// in this package. See lockfile spec for more information.
EthPM.publishPackage(config, contract_metadata);

Running Tests

$ npm test

Contributors

Initial author: Tim Coulter (@tcoulter)

This is a joint effort by Truffle, Populus, Dapple and Eris.

你可能感兴趣的文章:

本站文章除注明转载外,均为本站原创或编译。欢迎任何形式的转载,但请务必注明出处。

转载请注明:文章转载自 JavaScript中文网 [https://www.javascriptcn.com]

本文地址:https://www.javascriptcn.com/read-72576.html

文章标题:ethpm

回到顶部