• y6_138866
  • 908.2KB
  • zip
  • 0
  • VIP专享
  • 0
  • 2022-04-09 10:05
区块链程序 依赖 npm install crypto-js npm install elliptic npm install secp256k1 运行方法: node main.js
# **node-addon-api module** This module contains **header-only C++ wrapper classes** which simplify the use of the C based [N-API]( provided by Node.js when using C++. It provides a C++ object model and exception handling semantics with low overhead. N-API is an ABI stable C interface provided by Node.js for building native addons. It is independent from the underlying JavaScript runtime (e.g. V8 or ChakraCore) and is maintained as part of Node.js itself. It is intended to insulate native addons from changes in the underlying JavaScript engine and allow modules compiled for one version to run on later versions of Node.js without recompilation. The `node-addon-api` module, which is not part of Node.js, preserves the benefits of the N-API as it consists only of inline code that depends only on the stable API provided by N-API. As such, modules built against one version of Node.js using node-addon-api should run without having to be rebuilt with newer versions of Node.js. It is important to remember that *other* Node.js interfaces such as `libuv` (included in a project via `#include <uv.h>`) are not ABI-stable across Node.js major versions. Thus, an addon must use N-API and/or `node-addon-api` exclusively and build against a version of Node.js that includes an implementation of N-API (meaning a version of Node.js newer than 6.14.2) in order to benefit from ABI stability across Node.js major versions. Node.js provides an [ABI stability guide][] containing a detailed explanation of ABI stability in general, and the N-API ABI stability guarantee in particular. As new APIs are added to N-API, node-addon-api must be updated to provide wrappers for those new APIs. For this reason node-addon-api provides methods that allow callers to obtain the underlying N-API handles so direct calls to N-API and the use of the objects/methods provided by node-addon-api can be used together. For example, in order to be able to use an API for which the node-addon-api does not yet provide a wrapper. APIs exposed by node-addon-api are generally used to create and manipulate JavaScript values. Concepts and operations generally map to ideas specified in the **ECMA262 Language Specification**. - **[Setup](#setup)** - **[API Documentation](#api)** - **[Examples](#examples)** - **[Tests](#tests)** - **[More resource and info about native Addons](#resources)** - **[Code of Conduct](** - **[Contributors](#contributors)** - **[License](#license)** ## **Current version: 2.0.0** (See []( for complete Changelog) [![NPM](]( [![NPM](]( <a name="setup" rel='nofollow' onclick='return false;'></a> ## Setup - [Installation and usage](doc/ - [node-gyp](doc/ - [cmake-js](doc/ - [Conversion tool](doc/ - [Checker tool](doc/ - [Generator](doc/ - [Prebuild tools](doc/ <a name="api" rel='nofollow' onclick='return false;'></a> ### **API Documentation** The following is the documentation for node-addon-api. - [Basic Types](doc/ - [Array](doc/ - [Symbol](doc/ - [String](doc/ - [Name](doc/ - [Number](doc/ - [Date](doc/ - [BigInt](doc/ - [Boolean](doc/ - [Env](doc/ - [Value](doc/ - [CallbackInfo](doc/ - [Reference](doc/ - [External](doc/ - [Object](doc/ - [ObjectReference](doc/ - [PropertyDescriptor](doc/ - [Error Handling](doc/ - [Error](doc/ - [TypeError](doc/ - [RangeError](doc/ - [Object Lifetime Management](doc/ - [HandleScope](doc/ - [EscapableHandleScope](doc/ - [Working with JavaScript Values](doc/ - [Function](doc/ - [FunctionReference](doc/ - [ObjectWrap](doc/ - [ClassPropertyDescriptor](doc/ - [Buffer](doc/ - [ArrayBuffer](doc/ - [TypedArray](doc/ - [TypedArrayOf](doc/ - [DataView](doc/ - [Memory Management](doc/ - [Async Operations](doc/ - [AsyncWorker](doc/ - [AsyncContext](doc/ - [AsyncProgressWorker](doc/ - [Thread-safe Functions](doc/ - [Promises](doc/ - [Version management](doc/ <a name="examples" rel='nofollow' onclick='return false;'></a> ### **Examples** Are you new to **node-addon-api**? Take a look at our **[examples](** - **[Hello World](** - **[Pass arguments to a function](** - **[Callbacks](** - **[Object factory](** - **[Function factory](** - **[Wrapping C++ Object](** - **[Factory of wrapped object](** - **[Passing wrapped object around](** <a name="tests" rel='nofollow' onclick='return false;'></a> ### **Tests** To run the **node-addon-api** tests do: ``` npm install npm test ``` To avoid testing the deprecated portions of the API run ``` npm install npm test --disable-deprecated ``` ### **Debug** To run the **node-addon-api** tests with `--debug` option: ``` npm run-script dev ``` If you want faster build, you might use the following option: ``` npm run-script dev:incremental ``` Take a look and get inspired by our **[test suite](** <a name="resources" rel='nofollow' onclick='return false;'></a> ## **Contributing** We love contributions from the community to **node-addon-api**. See []( for more details on our philosophy around extending this module. ### **More resource and info about native Addons** - **[C++ Addons](** - **[N-API](** - **[N-API - Next Generation Node API for Native Modules](** <a name="contributors" rel='nofollow' onclick='return false;'></a> ## WG Members / Collaborators ### Active | Name | GitHub Link | | ------------------- | ----------------------------------------------------- | | Anna Henningsen | [addaleax]( | | Gabriel Schulhof | [gabrielschulhof]( | | Hitesh Kanwathirtha | [digitalinfinity]( | | Jim Schlight | [jschlight]( | | Michael Dawson | [mhdawson]( | | Kevin Eady | [KevinEady]( | Nicola Del Gobbo | [NickNaso]( | ### Emeritus | Name | GitHub Link
    • 私人区块链
      私人区块链应用 您以区块链开发人员的身份开始旅程,此项目可让您证明您已熟悉区块链平台的基本概念。 像这样的概念:-区块-区块链-钱包-区块链身份-存在证明 您是否需要描述区块链框架中一些最重要的组件,为什么不...
    • blockstack-auth-agent:使用区块链身份验证登录网站的代理
      区块链授权代理 使用区块链身份验证登录网站的代理。 入门 该库旨在在浏览器中使用。 首先,通过npm安装该库,然后浏览器打包您的捆绑软件,并将其包含在Web应用程序中。 npm install blockchain-auth-agent 在...
    • stag:区块链合法资产
      但是在区块链世界中,如果您丢失了私钥,哦,不……没有人能救您…… 该项目旨在在三种不同的情况下为加密货币提供帐户安全机制-私钥丢失,私钥被盗和帐户沉入睡眠中。 当私钥丢失时,通过确认一组朋友,您可以...
    • PoS区块链
    • monerochain:一个漂亮的Monero区块链资源管理器
      门罗链 跑: npm run dev # run app in dev mode 建立: npm run build # build app 它在dist文件夹中生成应用程序。
    • purescript-simplecrypto:一组用于区块链开发的有用密码实用程序
      一组用于区块链开发的有用密码实用程序。 特征 ECDSA公钥/私钥生成 ECDSA签名 SHA256 / SHA512 / RIPEMD160哈希 Base58编码/解码 AES支持(当前仅在CTR模式下) 安装 bower install --save purescript-simplecrypto...
    • JienanCoin:使用js创建区块链
      揭南币 使用js创建区块链 怎么测试呢? 1.叉子或克隆 2.安装依赖项 npm install 3.运行它 npm start
    • EHRS:使用区块链和 ipfs 的电子健康记录系统
      使用区块链的电子医疗记录系统 用法 npm i truffle compile truffle migrate -reset 现在让我们启动 react client cd client && npm i npm start
    • doxieChain:我用JS构建的区块链模块
      用JS内置的轻量级区块链 用法 要添加到项目的依赖项,请执行以下操作: npm install doxie-chain --save 导入/要求 import { Block, Blockchain } from doxie-chain或 const { Block, Blockchain } = require('...
    • SIM800C_MQTT.rar