Git Product home page Git Product logo

authentifi's Introduction

AuthentiFi

Hackathon Status GitHub Issues GitHub Pull Requests License


A blockchain-based Product Ownership Management System for anti-counterfeits in the Post Supply Chain.

Table of Contents

About

  • In today’s world, how do you know if you are buying a genuine product?
  • For more than a decade now, RFID (Radio Frequency IDentification) technology has been quite effective in providing anti-counterfeits measures in the supply chain.
  • We leverage the idea of Bitcoin’s blockchain that anyone can check the proof of possession of balance. Along with this, we plan to use QR codes.
  • We plan to implement a proof-of-concept system employing a blockchain-based decentralized application which gives a customer the entire history of a product (eg - brand info, owner, etc).

Data Flow

Data Flow

Why blockchain?

  • Unlike a normal database, Blockchain has a non-destructive (immutable) way to track data changes over time. This means that data is not editable rather, whenever updates are made, a new block is added to the “block-chain”. This helps track historical data (authenticity and owner data) of a product.
  • Given the amount of data to be dealt with (large amount of products being developed), if you have to keep track of all of them, it is better to have a decentralized and distributed network of nodes so that no entity can tamper with the product data and we also obtain 100% up time.
  • Transparent nature of the Blockchain helps avoid parallel trade.
  • Using Blockchain, authenticity can be checked and ownership of a product can be transferred decades from now; even if the product is discontinued.

Getting Started

These instructions will get you a copy of the project up and running on your local machine for development and testing purposes. See deployment for notes on how to deploy the project on a live system.

Prerequisites

What things you need to install the software and how to install them Installing NodeJs

$ sudo apt-get install nodejs

Installing Android Studio

Installing

A step by step series of examples that tell you how to get a development env running

Cloning the repo

$ git clone https://github.com/kylelobo/AuthentiFi.git

Installing the dependencies

$ cd AuthentiFi
$ npm install

Running the server

$ node server.js

Deployment

1. Instantiate your data directory

geth --datadir ./myDataDir init ./myGenesis.json

2. Start your Ethereum peer node.

  • Networkid helps ensure the privacy of your network. You can use any number here (where we used “1114”), but other peers joining your network must use the same one.
geth --datadir ./myDataDir --networkid 1114 console 2>> myEth.log
  • Output should look like this:
Welcome to the Geth JavaScript console!

instance: Geth/v1.7.3-stable-4bb3c89d/darwin-amd64/go1.8.3
coinbase: 0xae13d41d66af28380c7af6d825ab557eb271ffff
at block: 5 (Thu, 07 Dec 2017 17:08:48 PST)
datadir: /Users/test/my-eth-chain/myDataDir
modules: admin:1.0 clique:1.0 debug:1.0 eth:1.0 miner:1.0 net:1.0 personal:1.0 rpc:1.0 txpool:1.0 web3:1.0

>

This is the geth JavaScript console. Any command with the symbol > should be typed here.

3. Display your Ethereum logs

  • Open another terminal window
  • cd my-eth-chain
  • Type tail -f myEth.log

4. Import/Create an Account

  • If you allocated ETH in the Genesis file, import the corresponding account by dragging the UTC file into the myDataDir/keystoredirectory and skip to step 5.
  • In the geth JavaScript console, create an account:
> personal.newAccount("<YOUR_PASSPHRASE>")
  • Do not forget this passphrase! You will be typing this a lot, so for this test network you can keep it simple.

5. Set Default Account

  • Check your default account, type
> eth.coinbase
  • If this address is the same as the one from step 4, skip the rest of step 5.
  • To set your default account, type
> miner.setEtherbase(web3.eth.accounts[0])

6. Start mining

  • Check your balance with
> eth.getBalance(eth.coinbase)
  • Run
> miner.start()
  • Look at your other terminal window, you should see some mining action in the logs. Check your balance again and it should be higher.
  • To end mining, type
> miner.stop()

Built With

Mobile App:

Blockchain:

  • Ethereum - Blockchain Network
  • Solidity - Smart Contracts
  • Ganache - Create private Ethereum blockchain to run tests

Website:

  • HTML - Markup language for creating web pages
  • CSS - Style Sheet Language
  • JavaScript - Scripting Language for web pages
  • Bootstrap - Templating

Limitations

  • The user needs to have a QR code scanner in order to check the product information.
  • Products that have already been manufactured prior to today cannot be tracked.
  • We currently depend on the company to register with our services, without which, we cannot provide information about a brand to the user.

Future Scope

  • To track every genuine product that is to be sold.
  • Implement this idea in other fields.
  • Virtual transactions
  • Using tamper-proof tags
  • Dynamic (read & write NFC tags)
  • QR codes which have secure graphic
  • Implement our own tokens which can be sold to users so that they can purchase ownership of a product using tokens which helps in insurance processing.

Contributing

  1. Fork it (https://github.com/kylelobo/AuthentiFi/fork)
  2. Create your feature branch (git checkout -b feature/fooBar)
  3. Commit your changes (git commit -am 'Add some fooBar')
  4. Push to the branch (git push origin feature/fooBar)
  5. Create a new Pull Request

Authors

See also the list of contributors who participated in this project.

Acknowledgements

How To: Create Your Own Private Ethereum Blockchain - Mercury Protocol

authentifi's People

Contributors

caldenrodrigues avatar kylelobo avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

authentifi's Issues

mysql database

I am trying to run the code but I am not able to find the structure of the MySQL database.

what are the tables you are using for the project?

when i am trying to run the code it says "some sql error" even though i have created a schema named authentifi and the server is connecting to mysql successfully

TypeError: web3.eth.contract is not a function

when I run node server.js I get the error below please how can I solve it

Talking with a geth server undefined

/Volumes/Untitled/Conterfix/AuthentiFi/server.js:420
const contract = web3.eth.contract(abiArray);
^

TypeError: web3.eth.contract is not a function
at Object. (/Volumes/Untitled/Conterfix/AuthentiFi/server.js:420:27)
at Module._compile (internal/modules/cjs/loader.js:1063:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1092:10)
at Module.load (internal/modules/cjs/loader.js:928:32)
at Function.Module._load (internal/modules/cjs/loader.js:769:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:72:12)
at internal/main/run_main_module.js:17:47

Error when running npm install

hi there nice work so far but I keep getting errors when I try to run npm install as seen below please how can I get passed this issue thank you.

npm WARN old lockfile
npm WARN old lockfile The package-lock.json file was created with an old version of npm,
npm WARN old lockfile so supplemental metadata must be fetched from the registry.
npm WARN old lockfile
npm WARN old lockfile This is a one-time fix-up, please be patient...
npm WARN old lockfile
npm WARN deprecated [email protected]: versions < v5.0.0 do not handle NUL in passwords properly
npm WARN deprecated [email protected]: This package is no longer supported. It's now a built-in Node module. If you've depended on crypto, you should switch to the one that's built-in.
npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (debug-js/debug#797)
npm WARN deprecated [email protected]: Debug versions >=3.2.0 <3.2.7 || >=4 <4.3.1 have a low-severity ReDos regression when used in a Node.js environment. It is recommended you upgrade to 3.2.7 or 4.3.1. (debug-js/debug#797)
npm ERR! code 1
npm ERR! path /Volumes/Untitled/Conterfix/AuthentiFi/node_modules/bcrypt
npm ERR! command failed
npm ERR! command sh -c node-pre-gyp install --fallback-to-build
npm ERR! CXX(target) Release/obj.target/bcrypt_lib/src/blowfish.o
npm ERR! CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt.o
npm ERR! CXX(target) Release/obj.target/bcrypt_lib/src/bcrypt_node.o
npm ERR! Failed to execute '/usr/local/Cellar/node/18.0.0/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Volumes/Untitled/Conterfix/AuthentiFi/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/Volumes/Untitled/Conterfix/AuthentiFi/node_modules/bcrypt/lib/binding --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v108' (1)
npm ERR! node-pre-gyp info it worked if it ends with ok
npm ERR! node-pre-gyp info using [email protected]
npm ERR! node-pre-gyp info using [email protected] | darwin | x64
npm ERR! node-pre-gyp WARN Using needle for node-pre-gyp https download
npm ERR! node-pre-gyp info check checked for "/Volumes/Untitled/Conterfix/AuthentiFi/node_modules/bcrypt/lib/binding/bcrypt_lib.node" (not found)
npm ERR! node-pre-gyp http GET https://github.com/kelektiv/node.bcrypt.js/releases/download/v3.0.3/bcrypt_lib-v3.0.3-node-v108-darwin-x64-unknown.tar.gz
npm ERR! node-pre-gyp http 404 https://github.com/kelektiv/node.bcrypt.js/releases/download/v3.0.3/bcrypt_lib-v3.0.3-node-v108-darwin-x64-unknown.tar.gz
npm ERR! node-pre-gyp WARN Tried to download(404): https://github.com/kelektiv/node.bcrypt.js/releases/download/v3.0.3/bcrypt_lib-v3.0.3-node-v108-darwin-x64-unknown.tar.gz
npm ERR! node-pre-gyp WARN Pre-built binaries not found for [email protected] and [email protected] (node-v108 ABI, unknown) (falling back to source compile with node-gyp)
npm ERR! node-pre-gyp http 404 status code downloading tarball https://github.com/kelektiv/node.bcrypt.js/releases/download/v3.0.3/bcrypt_lib-v3.0.3-node-v108-darwin-x64-unknown.tar.gz
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | darwin | x64
npm ERR! gyp info ok
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | darwin | x64
npm ERR! gyp info find Python using Python version 3.8.9 found at "/Library/Developer/CommandLineTools/usr/bin/python3"
npm ERR! gyp info spawn /Library/Developer/CommandLineTools/usr/bin/python3
npm ERR! gyp info spawn args [
npm ERR! gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/gyp/gyp_main.py',
npm ERR! gyp info spawn args 'binding.gyp',
npm ERR! gyp info spawn args '-f',
npm ERR! gyp info spawn args 'make',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Volumes/Untitled/Conterfix/AuthentiFi/node_modules/bcrypt/build/config.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/usr/local/lib/node_modules/npm/node_modules/node-gyp/addon.gypi',
npm ERR! gyp info spawn args '-I',
npm ERR! gyp info spawn args '/Users/Rexdomine/Library/Caches/node-gyp/18.0.0/include/node/common.gypi',
npm ERR! gyp info spawn args '-Dlibrary=shared_library',
npm ERR! gyp info spawn args '-Dvisibility=default',
npm ERR! gyp info spawn args '-Dnode_root_dir=/Users/Rexdomine/Library/Caches/node-gyp/18.0.0',
npm ERR! gyp info spawn args '-Dnode_gyp_dir=/usr/local/lib/node_modules/npm/node_modules/node-gyp',
npm ERR! gyp info spawn args '-Dnode_lib_file=/Users/Rexdomine/Library/Caches/node-gyp/18.0.0/<(target_arch)/node.lib',
npm ERR! gyp info spawn args '-Dmodule_root_dir=/Volumes/Untitled/Conterfix/AuthentiFi/node_modules/bcrypt',
npm ERR! gyp info spawn args '-Dnode_engine=v8',
npm ERR! gyp info spawn args '--depth=.',
npm ERR! gyp info spawn args '--no-parallel',
npm ERR! gyp info spawn args '--generator-output',
npm ERR! gyp info spawn args 'build',
npm ERR! gyp info spawn args '-Goutput_dir=.'
npm ERR! gyp info spawn args ]
npm ERR! gyp info ok
npm ERR! gyp info it worked if it ends with ok
npm ERR! gyp info using [email protected]
npm ERR! gyp info using [email protected] | darwin | x64
npm ERR! gyp info spawn make
npm ERR! gyp info spawn args [ 'BUILDTYPE=Release', '-C', 'build' ]
npm ERR! In file included from ../src/bcrypt_node.cc:1:
npm ERR! In file included from ../../nan/nan.h:222:
npm ERR! In file included from ../../nan/nan_converters.h:67:
npm ERR! ../../nan/nan_converters_43_inl.h:22:1: error: no viable conversion from 'Localv8::Context' to 'v8::Isolate '
npm ERR! X(Boolean)
npm ERR! ^~~~~~~~~~
npm ERR! ../../nan/nan_converters_43_inl.h:18:23: note: expanded from macro 'X'
npm ERR! val->To ## TYPE(isolate->GetCurrentContext())
npm ERR! ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! /Users/Rexdomine/Library/Caches/node-gyp/18.0.0/include/node/v8-value.h:398:37: note: passing argument to parameter 'isolate' here
npm ERR! Local ToBoolean(Isolate
isolate) const;
npm ERR! ^
npm ERR! In file included from ../src/bcrypt_node.cc:1:
npm ERR! In file included from ../../nan/nan.h:222:
npm ERR! In file included from ../../nan/nan_converters.h:67:
npm ERR! ../../nan/nan_converters_43_inl.h:22:1: error: no member named 'FromMaybe' in 'v8::Localv8::Boolean'
npm ERR! X(Boolean)
npm ERR! ^~~~~~~~~~
npm ERR! ../../nan/nan_converters_43_inl.h:19:12: note: expanded from macro 'X'
npm ERR! .FromMaybe(v8::Localv8::TYPE()));
npm ERR! ^
npm ERR! ../../nan/nan_converters_43_inl.h:40:1: error: no viable conversion from 'Localv8::Context' to 'v8::Isolate '
npm ERR! X(bool, Boolean)
npm ERR! ^~~~~~~~~~~~~~~~
npm ERR! ../../nan/nan_converters_43_inl.h:37:29: note: expanded from macro 'X'
npm ERR! return val->NAME ## Value(isolate->GetCurrentContext());
npm ERR! ^~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! /Users/Rexdomine/Library/Caches/node-gyp/18.0.0/include/node/v8-value.h:408:30: note: passing argument to parameter 'isolate' here
npm ERR! bool BooleanValue(Isolate
isolate) const;
npm ERR! ^
npm ERR! In file included from ../src/bcrypt_node.cc:1:
npm ERR! In file included from ../../nan/nan.h:222:
npm ERR! In file included from ../../nan/nan_converters.h:67:
npm ERR! ../../nan/nan_converters_43_inl.h:40:1: error: no viable conversion from returned value of type 'bool' to function return type 'imp::ToFactory::return_t' (aka 'Maybe')
npm ERR! X(bool, Boolean)
npm ERR! ^~~~~~~~~~~~~~~~
npm ERR! ../../nan/nan_converters_43_inl.h:37:10: note: expanded from macro 'X'
npm ERR! return val->NAME ## Value(isolate->GetCurrentContext());
npm ERR! ^~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
npm ERR! /Users/Rexdomine/Library/Caches/node-gyp/18.0.0/include/node/v8-maybe.h:29:7: note: candidate constructor (the implicit copy constructor) not viable: no known conversion from 'bool' to 'const v8::Maybe &' for 1st argument
npm ERR! class Maybe {
npm ERR! ^
npm ERR! /Users/Rexdomine/Library/Caches/node-gyp/18.0.0/include/node/v8-maybe.h:29:7: note: candidate constructor (the implicit move constructor) not viable: no known conversion from 'bool' to 'v8::Maybe &&' for 1st argument
npm ERR! /Users/Rexdomine/Library/Caches/node-gyp/18.0.0/include/node/v8-maybe.h:84:12: note: explicit constructor is not a candidate
npm ERR! explicit Maybe(const T& t) : has_value_(true), value_(t) {}
npm ERR! ^
npm ERR! In file included from ../src/bcrypt_node.cc:1:
npm ERR! In file included from ../../nan/nan.h:223:
npm ERR! In file included from ../../nan/nan_new.h:189:
npm ERR! ../../nan/nan_implementation_12_inl.h:356:37: error: too few arguments to function call, expected 2, have 1
npm ERR! return v8::StringObject::New(value).Asv8::StringObject();
npm ERR! ~~~~~~~~~~~~~~~~~~~~~ ^
npm ERR! /Users/Rexdomine/Library/Caches/node-gyp/18.0.0/include/node/v8-primitive-object.h:81:23: note: 'New' declared here
npm ERR! static Local New(Isolate* isolate, Local value);
npm ERR! ^
npm ERR! In file included from ../src/bcrypt_node.cc:1:
npm ERR! ../../nan/nan.h:2470:8: warning: 'SetAccessor' is deprecated: Do signature check in accessor [-Wdeprecated-declarations]
npm ERR! tpl->SetAccessor(
npm ERR! ^
npm ERR! /Users/Rexdomine/Library/Caches/node-gyp/18.0.0/include/node/v8-template.h:837:3: note: 'SetAccessor' has been explicitly marked deprecated here
npm ERR! V8_DEPRECATED("Do signature check in accessor")
npm ERR! ^
npm ERR! /Users/Rexdomine/Library/Caches/node-gyp/18.0.0/include/node/v8config.h:460:35: note: expanded from macro 'V8_DEPRECATED'
npm ERR! # define V8_DEPRECATED(message) [[deprecated(message)]]
npm ERR! ^
npm ERR! In file included from ../src/bcrypt_node.cc:1:
npm ERR! In file included from ../../nan/nan.h:2722:
npm ERR! ../../nan/nan_object_wrap.h:24:25: error: no member named 'IsNearDeath' in 'Nan::Persistentv8::Object'
npm ERR! assert(persistent().IsNearDeath());
npm ERR! ~~~~~~~~~~~~ ^
npm ERR! /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/assert.h:99:25: note: expanded from macro 'assert'
npm ERR! (__builtin_expect(!(e), 0) ? __assert_rtn(func, _ASSERT_FILE_NAME, LINE, #e) : (void)0)
npm ERR! ^
npm ERR! In file included from ../src/bcrypt_node.cc:1:
npm ERR! In file included from ../../nan/nan.h:2722:
npm ERR! ../../nan/nan_object_wrap.h:127:26: error: no member named 'IsNearDeath' in 'Nan::Persistentv8::Object'
npm ERR! assert(wrap->handle
.IsNearDeath());
npm ERR! ~~~~~~~~~~~~~ ^
npm ERR! /Library/Developer/CommandLineTools/SDKs/MacOSX.sdk/usr/include/assert.h:99:25: note: expanded from macro 'assert'
npm ERR! (__builtin_expect(!(e), 0) ? __assert_rtn(func, __ASSERT_FILE_NAME, LINE, #e) : (void)0)
npm ERR! ^
npm ERR! In file included from ../src/bcrypt_node.cc:1:
npm ERR! In file included from ../../nan/nan.h:2818:
npm ERR! ../../nan/nan_typedarray_contents.h:34:43: error: no member named 'GetContents' in 'v8::ArrayBuffer'
npm ERR! data = static_cast<char*>(buffer->GetContents().Data()) + byte_offset;
npm ERR! ~~~~~~~~^
npm ERR! ../src/bcrypt_node.cc:66:21: error: no matching constructor for initialization of 'String::Utf8Value'
npm ERR! String::Utf8Value value(str);
npm ERR! ^ ~~~
npm ERR! /Users/Rexdomine/Library/Caches/node-gyp/18.0.0/include/node/v8-primitive.h:517:5: note: candidate constructor not viable: no known conversion from 'Localv8::String' to 'const v8::String::Utf8Value' for 1st argument
npm ERR! Utf8Value(const Utf8Value&) = delete;
npm ERR! ^
npm ERR! /Users/Rexdomine/Library/Caches/node-gyp/18.0.0/include/node/v8-primitive.h:510:5: note: candidate constructor not viable: requires 2 arguments, but 1 was provided
npm ERR! Utf8Value(Isolate* isolate, Localv8::Value obj);
npm ERR! ^
npm ERR! ../src/bcrypt_node.cc:121:60: error: too few arguments to function call, single argument 'context' was not specified
npm ERR! const char minor_ver = ToCharVersion(info[0]->ToString());
npm ERR! ~~~~~~~~~~~~~~~~~ ^
npm ERR! /Users/Rexdomine/Library/Caches/node-gyp/18.0.0/include/node/v8-value.h:360:44: note: 'ToString' declared here
npm ERR! V8_WARN_UNUSED_RESULT MaybeLocal ToString(
npm ERR! ^
npm ERR! ../src/bcrypt_node.cc:121:28: error: no matching function for call to 'ToCharVersion'
npm ERR! const char minor_ver = ToCharVersion(info[0]->ToString());
npm ERR! ^~~~~~~~~~~~~
npm ERR! ../src/bcrypt_node.cc:65:6: note: candidate function not viable: no known conversion from 'MaybeLocalv8::String' to 'Localv8::String' for 1st argument
npm ERR! char ToCharVersion(Local str) {
npm ERR! ^
npm ERR! ../src/bcrypt_node.cc:150:60: error: too few arguments to function call, single argument 'context' was not specified
npm ERR! const char minor_ver = ToCharVersion(info[0]->ToString());
npm ERR! ~~~~~~~~~~~~~~~~~ ^
npm ERR! /Users/Rexdomine/Library/Caches/node-gyp/18.0.0/include/node/v8-value.h:360:44: note: 'ToString' declared here
npm ERR! V8_WARN_UNUSED_RESULT MaybeLocal ToString(
npm ERR! ^
npm ERR! ../src/bcrypt_node.cc:150:28: error: no matching function for call to 'ToCharVersion'
npm ERR! const char minor_ver = ToCharVersion(info[0]->ToString());
npm ERR! ^~~~~~~~~~~~~
npm ERR! ../src/bcrypt_node.cc:65:6: note: candidate function not viable: no known conversion from 'MaybeLocalv8::String' to 'Localv8::String' for 1st argument
npm ERR! char ToCharVersion(Local str) {
npm ERR! ^
npm ERR! ../src/bcrypt_node.cc:212:44: error: too few arguments to function call, single argument 'context' was not specified
npm ERR! Nan::Utf8String data(info[0]->ToString());
npm ERR! ~~~~~~~~~~~~~~~~~ ^
npm ERR! /Users/Rexdomine/Library/Caches/node-gyp/18.0.0/include/node/v8-value.h:360:44: note: 'ToString' declared here
npm ERR! V8_WARN_UNUSED_RESULT MaybeLocal ToString(
npm ERR! ^
npm ERR! ../src/bcrypt_node.cc:212:21: error: no matching constructor for initialization of 'Nan::Utf8String'
npm ERR! Nan::Utf8String data(info[0]->ToString());
npm ERR! ^ ~~~~~~~~~~~~~~~~~~~
npm ERR! ../../nan/nan.h:1060:19: note: candidate constructor not viable: no known conversion from 'MaybeLocalv8::String' to 'v8::Localv8::Value' for 1st argument
npm ERR! inline explicit Utf8String(v8::Localv8::Value from) :
npm ERR! ^
npm ERR! ../../nan/nan.h:1120:33: note: candidate constructor not viable: no known conversion from 'MaybeLocalv8::String' to 'const Nan::Utf8String' for 1st argument
npm ERR! NAN_DISALLOW_ASSIGN_COPY_MOVE(Utf8String)
npm ERR! ^
npm ERR! ../../nan/nan.h:137:23: note: expanded from macro 'NAN_DISALLOW_ASSIGN_COPY_MOVE'
npm ERR! NAN_DISALLOW_COPY(CLASS)
npm ERR! ^
npm ERR! ../../nan/nan.h:113:35: note: expanded from macro 'NAN_DISALLOW_COPY'
npm ERR! # define NAN_DISALLOW_COPY(CLASS) CLASS(const CLASS&) = delete;
npm ERR! ^
npm ERR! ../../nan/nan.h:1120:33: note: candidate constructor not viable: no known conversion from 'MaybeLocalv8::String' to 'Nan::Utf8String' for 1st argument
npm ERR! ../../nan/nan.h:138:23: note: expanded from macro 'NAN_DISALLOW_ASSIGN_COPY_MOVE'
npm ERR! NAN_DISALLOW_MOVE(CLASS)
npm ERR! ^
npm ERR! ../../nan/nan.h:115:5: note: expanded from macro 'NAN_DISALLOW_MOVE'
npm ERR! CLASS(CLASS&&) = delete; /* NOLINT(build/c++11) /
npm ERR! ^
npm ERR! ../src/bcrypt_node.cc:213:44: error: too few arguments to function call, single argument 'context' was not specified
npm ERR! Nan::Utf8String salt(info[1]->ToString());
npm ERR! ~~~~~~~~~~~~~~~~~ ^
npm ERR! /Users/Rexdomine/Library/Caches/node-gyp/18.0.0/include/node/v8-value.h:360:44: note: 'ToString' declared here
npm ERR! V8_WARN_UNUSED_RESULT MaybeLocal ToString(
npm ERR! ^
npm ERR! ../src/bcrypt_node.cc:213:21: error: no matching constructor for initialization of 'Nan::Utf8String'
npm ERR! Nan::Utf8String salt(info[1]->ToString());
npm ERR! ^ ~~~~~~~~~~~~~~~~~~~
npm ERR! ../../nan/nan.h:1060:19: note: candidate constructor not viable: no known conversion from 'MaybeLocalv8::String' to 'v8::Localv8::Value' for 1st argument
npm ERR! inline explicit Utf8String(v8::Localv8::Value from) :
npm ERR! ^
npm ERR! ../../nan/nan.h:1120:33: note: candidate constructor not viable: no known conversion from 'MaybeLocalv8::String' to 'const Nan::Utf8String' for 1st argument
npm ERR! NAN_DISALLOW_ASSIGN_COPY_MOVE(Utf8String)
npm ERR! ^
npm ERR! ../../nan/nan.h:137:23: note: expanded from macro 'NAN_DISALLOW_ASSIGN_COPY_MOVE'
npm ERR! NAN_DISALLOW_COPY(CLASS)
npm ERR! ^
npm ERR! ../../nan/nan.h:113:35: note: expanded from macro 'NAN_DISALLOW_COPY'
npm ERR! # define NAN_DISALLOW_COPY(CLASS) CLASS(const CLASS&) = delete;
npm ERR! ^
npm ERR! ../../nan/nan.h:1120:33: note: candidate constructor not viable: no known conversion from 'MaybeLocalv8::String' to 'Nan::Utf8String' for 1st argument
npm ERR! ../../nan/nan.h:138:23: note: expanded from macro 'NAN_DISALLOW_ASSIGN_COPY_MOVE'
npm ERR! NAN_DISALLOW_MOVE(CLASS)
npm ERR! ^
npm ERR! ../../nan/nan.h:115:5: note: expanded from macro 'NAN_DISALLOW_MOVE'
npm ERR! CLASS(CLASS&&) = delete; /
NOLINT(build/c++11) /
npm ERR! ^
npm ERR! ../src/bcrypt_node.cc:231:44: error: too few arguments to function call, single argument 'context' was not specified
npm ERR! Nan::Utf8String data(info[0]->ToString());
npm ERR! ~~~~~~~~~~~~~~~~~ ^
npm ERR! /Users/Rexdomine/Library/Caches/node-gyp/18.0.0/include/node/v8-value.h:360:44: note: 'ToString' declared here
npm ERR! V8_WARN_UNUSED_RESULT MaybeLocal ToString(
npm ERR! ^
npm ERR! ../src/bcrypt_node.cc:231:21: error: no matching constructor for initialization of 'Nan::Utf8String'
npm ERR! Nan::Utf8String data(info[0]->ToString());
npm ERR! ^ ~~~~~~~~~~~~~~~~~~~
npm ERR! ../../nan/nan.h:1060:19: note: candidate constructor not viable: no known conversion from 'MaybeLocalv8::String' to 'v8::Localv8::Value' for 1st argument
npm ERR! inline explicit Utf8String(v8::Localv8::Value from) :
npm ERR! ^
npm ERR! ../../nan/nan.h:1120:33: note: candidate constructor not viable: no known conversion from 'MaybeLocalv8::String' to 'const Nan::Utf8String' for 1st argument
npm ERR! NAN_DISALLOW_ASSIGN_COPY_MOVE(Utf8String)
npm ERR! ^
npm ERR! ../../nan/nan.h:137:23: note: expanded from macro 'NAN_DISALLOW_ASSIGN_COPY_MOVE'
npm ERR! NAN_DISALLOW_COPY(CLASS)
npm ERR! ^
npm ERR! ../../nan/nan.h:113:35: note: expanded from macro 'NAN_DISALLOW_COPY'
npm ERR! # define NAN_DISALLOW_COPY(CLASS) CLASS(const CLASS&) = delete;
npm ERR! ^
npm ERR! ../../nan/nan.h:1120:33: note: candidate constructor not viable: no known conversion from 'MaybeLocalv8::String' to 'Nan::Utf8String' for 1st argument
npm ERR! ../../nan/nan.h:138:23: note: expanded from macro 'NAN_DISALLOW_ASSIGN_COPY_MOVE'
npm ERR! NAN_DISALLOW_MOVE(CLASS)
npm ERR! ^
npm ERR! ../../nan/nan.h:115:5: note: expanded from macro 'NAN_DISALLOW_MOVE'
npm ERR! CLASS(CLASS&&) = delete; /
NOLINT(build/c++11) */
npm ERR! ^
npm ERR! fatal error: too many errors emitted, stopping now [-ferror-limit=]
npm ERR! 1 warning and 20 errors generated.
npm ERR! make: *** [Release/obj.target/bcrypt_lib/src/bcrypt_node.o] Error 1
npm ERR! gyp ERR! build error
npm ERR! gyp ERR! stack Error: make failed with exit code: 2
npm ERR! gyp ERR! stack at ChildProcess.onExit (/usr/local/lib/node_modules/npm/node_modules/node-gyp/lib/build.js:194:23)
npm ERR! gyp ERR! stack at ChildProcess.emit (node:events:527:28)
npm ERR! gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:291:12)
npm ERR! gyp ERR! System Darwin 21.2.0
npm ERR! gyp ERR! command "/usr/local/Cellar/node/18.0.0/bin/node" "/usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js" "build" "--fallback-to-build" "--module=/Volumes/Untitled/Conterfix/AuthentiFi/node_modules/bcrypt/lib/binding/bcrypt_lib.node" "--module_name=bcrypt_lib" "--module_path=/Volumes/Untitled/Conterfix/AuthentiFi/node_modules/bcrypt/lib/binding" "--napi_version=8" "--node_abi_napi=napi" "--napi_build_version=0" "--node_napi_label=node-v108"
npm ERR! gyp ERR! cwd /Volumes/Untitled/Conterfix/AuthentiFi/node_modules/bcrypt
npm ERR! gyp ERR! node -v v18.0.0
npm ERR! gyp ERR! node-gyp -v v9.0.0
npm ERR! gyp ERR! not ok
npm ERR! node-pre-gyp ERR! build error
npm ERR! node-pre-gyp ERR! stack Error: Failed to execute '/usr/local/Cellar/node/18.0.0/bin/node /usr/local/lib/node_modules/npm/node_modules/node-gyp/bin/node-gyp.js build --fallback-to-build --module=/Volumes/Untitled/Conterfix/AuthentiFi/node_modules/bcrypt/lib/binding/bcrypt_lib.node --module_name=bcrypt_lib --module_path=/Volumes/Untitled/Conterfix/AuthentiFi/node_modules/bcrypt/lib/binding --napi_version=8 --node_abi_napi=napi --napi_build_version=0 --node_napi_label=node-v108' (1)
npm ERR! node-pre-gyp ERR! stack at ChildProcess. (/Volumes/Untitled/Conterfix/AuthentiFi/node_modules/bcrypt/node_modules/node-pre-gyp/lib/util/compile.js:83:29)
npm ERR! node-pre-gyp ERR! stack at ChildProcess.emit (node:events:527:28)
npm ERR! node-pre-gyp ERR! stack at maybeClose (node:internal/child_process:1090:16)
npm ERR! node-pre-gyp ERR! stack at ChildProcess._handle.onexit (node:internal/child_process:302:5)
npm ERR! node-pre-gyp ERR! System Darwin 21.2.0
npm ERR! node-pre-gyp ERR! command "/usr/local/Cellar/node/18.0.0/bin/node" "/Volumes/Untitled/Conterfix/AuthentiFi/node_modules/bcrypt/node_modules/.bin/node-pre-gyp" "install" "--fallback-to-build"
npm ERR! node-pre-gyp ERR! cwd /Volumes/Untitled/Conterfix/AuthentiFi/node_modules/bcrypt
npm ERR! node-pre-gyp ERR! node -v v18.0.0
npm ERR! node-pre-gyp ERR! node-pre-gyp -v v0.12.0
npm ERR! node-pre-gyp ERR! not ok

npm ERR! A complete log of this run can be found in:
npm ERR! /Users/Rexdomine/.npm/_logs/2022-05-16T14_44_45_679Z-debug-0.log

web3 error during node server.js

Below is console log after node server.js command

C:\Users\User\Desktop\AuthentiFi>node server.js
Talking with a geth server 0.20.6

C:\Users\User\Desktop\AuthentiFi\node_modules\web3\lib\web3\httpprovider.js:101
throw errors.InvalidResponse(request.responseText);
^

Error: Invalid JSON RPC response: undefined
at Object.InvalidResponse (C:\Users\User\Desktop\AuthentiFi\node_modules\web3\lib\web3\errors.js:38:16)
at HttpProvider.send (C:\Users\User\Desktop\AuthentiFi\node_modules\web3\lib\web3\httpprovider.js:101:18)
at RequestManager.send (C:\Users\User\Desktop\AuthentiFi\node_modules\web3\lib\web3\requestmanager.js:58:32)
at Eth.get [as coinbase] (C:\Users\User\Desktop\AuthentiFi\node_modules\web3\lib\web3\property.js:107:62)
at Object. (C:\Users\User\Desktop\AuthentiFi\server.js:426:36)
at Module._compile (internal/modules/cjs/loader.js:1158:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1178:10)
at Module.load (internal/modules/cjs/loader.js:1002:32)
at Function.Module._load (internal/modules/cjs/loader.js:901:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:74:12)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.