Giter Club home page Giter Club logo

i-made-this's Introduction

I Made This

This repo contains the completed project files for the I Made This Bitcore tutorial. I Made This is an electron app that leverages Bitcore to timestamp files in the blockchain.

Download this project with:

git clone [email protected]:bitpay/i-made-this.git

Install

Install and Run Bitcore Node

Follow this guide to install and run a full Bitcore node.

Assuming the created Bitcore node is called mynode and resides in your home directory, Symlink the i-made-this stampingservice into the node_modules directory of ~/mynode

ln -s ~/mynode/node_modules ~/i-made-this/stampingservice

Add stampingservice as a dependency in ~/mynode/bitcore-node.json

{
  "datadir": "./data",
  "network": "testnet",
  "port": 3001,
  "services": [
    "bitcoind",
    "db",
    "address",
    "web",
    "stampingservice"
  ]
}

Run npm install from within the stampingservice directory:

cd ~/i-made-this/stampingservice
npm install

Start your bitcore-node from within the ~/mynode directory

cd ~/mynode
bitcored

Install the Electron App

In a new terminal tab or window, run:

npm install electron-prebuilt -g

cd i-made-this
npm install
bower install
electron .

To learn how to create this project from scratch, read the tutorial.

i-made-this's People

Contributors

bitjson avatar gabegattis avatar msalcala11 avatar stormasm 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

Watchers

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

i-made-this's Issues

Error: Cannot find module 'app'

Hi,

After following the instructions of the repo regarding the installation of the Electron App:

npm install electron-prebuilt -g

cd i-made-this
npm install
bower install
electron .

When I execute electron . a window appears with an error saying:

A JavaScript error occurred in the main process

Uncaught Exception:
Error: Cannot find module 'app'
    at Module._resolveFilename (module.js:440:15)
    at Function.Module._resolveFilename (/xxx/xxx/.nvm/versions/node/v4.4.5/lib/node_modules/electron-prebuilt/dist/Electron.app/Contents/Resources/electron.asar/common/reset-search-paths.js:35:12)
    at Function.Module._load (module.js:388:25)
    at Module.require (module.js:468:17)
    at require (internal/module.js:20:19)
    at Object.<anonymous> (/xxx/xxx/i-made-this/main.js:2:11)
    at Module._compile (module.js:541:32)
    at Object.Module._extensions..js (module.js:550:10)
    at Module.load (module.js:458:32)
    at tryModuleLoad (module.js:417:12)

Any idea about this error?

Kind regards, beth.

Some question

I have setup your project successfully, however I don't understand some thing, please guide me :)

  1. I register an account on https://blockchain.info. after select a file from my computer, it generate hash code such as "mnvky8Pk9YVNBREki14cdL58DAAqNUNih7". I tried to use my account send 0.0005 BTC to this address but blockchain website inform "Invalid Bitcoin Address". screenshot
  2. Why is 0.0005 BTC and can I send lower price ?

Thank you.

Uncaught exception: Error: Unknown network: testnet

After adding the stampingservice in the bitcore-node.json and restarting my bitcore,
I faced the problem of unknown network and it shutdown immediately. Can anyone help me to solve or anyone have the same issue of me.

[2018-11-25T06:31:14.905Z] info: Using network: testnet
[2018-11-25T06:31:14.907Z] info: Starting bitcoind
[2018-11-25T06:31:14.909Z] info: Using bitcoin config file: /Users/kinkin926/Documents/i-made-this/mynode/data/bitcoin.conf
[2018-11-25T06:31:14.913Z] info: Starting bitcoin process
[2018-11-25T06:31:19.973Z] warn: Loading block index...
[2018-11-25T06:31:24.977Z] warn: Loading block index...
[2018-11-25T06:31:29.980Z] warn: Verifying blocks...
[2018-11-25T06:31:35.003Z] info: Bitcoin Height: 1445116 Percentage: 100.00
[2018-11-25T06:31:35.010Z] info: Bitcoin Daemon Ready
[2018-11-25T06:31:35.011Z] info: Starting web
[2018-11-25T06:31:35.097Z] info: Starting insight-api
[2018-11-25T06:31:35.099Z] info: Starting insight-ui
[2018-11-25T06:31:35.102Z] info: Starting stampingservice
[2018-11-25T06:31:35.103Z] error: uncaught exception: Error: Unknown network: testnet
at StampingService._setDataPath (/Users/kinkin926/Documents/i-made-this/stampingservice/index.js:75:11)
at new StampingService (/Users/kinkin926/Documents/i-made-this/stampingservice/index.js:43:8)
at Node._startService (/Users/kinkin926/Documents/i-made-this/mynode/node_modules/bitcore-node/lib/node.js:200:17)
at /Users/kinkin926/Documents/i-made-this/mynode/node_modules/bitcore-node/lib/node.js:260:12
at /Users/kinkin926/Documents/i-made-this/mynode/node_modules/bitcore-node/node_modules/async/lib/async.js:181:20
at iterate (/Users/kinkin926/Documents/i-made-this/mynode/node_modules/bitcore-node/node_modules/async/lib/async.js:262:13)
at /Users/kinkin926/Documents/i-made-this/mynode/node_modules/bitcore-node/node_modules/async/lib/async.js:274:29
at /Users/kinkin926/Documents/i-made-this/mynode/node_modules/bitcore-node/node_modules/async/lib/async.js:44:16
at Immediate._onImmediate (/Users/kinkin926/Documents/i-made-this/mynode/node_modules/bitcore-node/lib/node.js:233:5)
at runCallback (timers.js:810:20)
[2018-11-25T06:31:35.105Z] error: Error: Unknown network: testnet
at StampingService._setDataPath (/Users/kinkin926/Documents/i-made-this/stampingservice/index.js:75:11)
at new StampingService (/Users/kinkin926/Documents/i-made-this/stampingservice/index.js:43:8)
at Node._startService (/Users/kinkin926/Documents/i-made-this/mynode/node_modules/bitcore-node/lib/node.js:200:17)
at /Users/kinkin926/Documents/i-made-this/mynode/node_modules/bitcore-node/lib/node.js:260:12
at /Users/kinkin926/Documents/i-made-this/mynode/node_modules/bitcore-node/node_modules/async/lib/async.js:181:20
at iterate (/Users/kinkin926/Documents/i-made-this/mynode/node_modules/bitcore-node/node_modules/async/lib/async.js:262:13)
at /Users/kinkin926/Documents/i-made-this/mynode/node_modules/bitcore-node/node_modules/async/lib/async.js:274:29
at /Users/kinkin926/Documents/i-made-this/mynode/node_modules/bitcore-node/node_modules/async/lib/async.js:44:16
at Immediate._onImmediate (/Users/kinkin926/Documents/i-made-this/mynode/node_modules/bitcore-node/lib/node.js:233:5)
at runCallback (timers.js:810:20)

Error: More than one instance of bitcore-lib found

Hi there!

Running bitcored throws the following error:
Error: More than one instance of bitcore-lib found. Please make sure to require bitcore-lib and check that submodules do not also include their own bitcore-lib dependency.

It seems to be related with the fact that only one copy of bitcore-lib can be used/required by the whole app including the used modules, however the service requires it.

After digging for a while, it seems that others are having issues with the same error in other projects, but a clear solution is'nt given. bitcore#1188, bitcore-lib#21, etc.

I must say that I've checked all the versions of bitcore-lib everywhere it's used, starting from a clean node installation, and all the versions installed are 0.13.19. But I think that it has nothing to do with the library version, as in the module is only checked that a variable is defined, actually: global._bitcore in line 15, checked if it's defined in line 8 of index.js.

Quick and dirty fix: set it to undefined before var bitcore = require('bitcore-lib'); in index.js of the stampingservice, fooling bitcore.versionGuard in index.js of bitcore-lib. However I think it's not the way to go.

And what's more strange to me, has it worked before?

Regards, beth.

update README install symlink

Am I missing something? Or installation instructions at README needs to be updated?

After run ~/projects$ ln -s ~/projects/mynode/node_modules ~/projects/i-made-this/stampingservice I have:

~/projects$ ls -la i-made-this/stampingservice/
total 20
drwxrwxr-x 2 moreno moreno 4096 Mai  2 12:11 .
drwxrwxr-x 7 moreno moreno 4096 Mai  2 11:52 ..
-rw-rw-r-- 1 moreno moreno 6616 Mai  2 11:52 index.js
lrwxrwxrwx 1 moreno moreno   47 Mai  2 12:11 node_modules -> /home/moreno/projects/mynode/node_modules
-rw-rw-r-- 1 moreno moreno   50 Mai  2 11:52 package.json

but to fix:

~/projects/mynode$ bitcored
module.js:327
    throw err;
    ^

Error: Cannot find module 'stampingservice/package.json'
    at Function.Module._resolveFilename (module.js:325:15)
    at Function.Module._load (module.js:276:25)
    at Module.require (module.js:353:17)
    at require (internal/module.js:12:17)
    at Function.setupServices (/home/moreno/projects/mynode/node_modules/bitcore-node/lib/scaffold/start.js:51:30)
    at start (/home/moreno/projects/mynode/node_modules/bitcore-node/lib/scaffold/start.js:203:31)
    at Object.main [as daemon] (/home/moreno/projects/mynode/node_modules/bitcore-node/lib/cli/daemon.js:38:3)
    at Liftoff.<anonymous> (/home/moreno/.nvm/versions/node/v4.4.3/lib/node_modules/bitcore/node_modules/bitcore-node/lib/cli/bitcored.js:29:16)
    at Liftoff.<anonymous> (/home/moreno/.nvm/versions/node/v4.4.3/lib/node_modules/bitcore/node_modules/bitcore-node/node_modules/liftoff/index.js:197:12)
    at Liftoff.<anonymous> (/home/moreno/.nvm/versions/node/v4.4.3/lib/node_modules/bitcore/node_modules/bitcore-node/node_modules/liftoff/index.js:164:7)

I also had to create:

~/projects$ ln -s ~/projects/i-made-this/stampingservice ~/projects/mynode/node_modules
~/projects$ ls -la mynode/node_modules/
total 24
drwxrwxr-x  6 moreno moreno 4096 Mai  2 12:13 .
drwxrwxr-x  4 moreno moreno 4096 Mai  2 12:05 ..
drwxrwxr-x  4 moreno moreno 4096 Mai  2 11:59 async
drwxrwxr-x  2 moreno moreno 4096 Mai  2 11:59 .bin
drwxrwxr-x  7 moreno moreno 4096 Mai  1 17:12 bitcore-lib
drwxrwxr-x 13 moreno moreno 4096 Mai  1 17:15 bitcore-node
lrwxrwxrwx  1 moreno moreno   55 Mai  2 12:13 stampingservice -> /home/moreno/projects/i-made-this/stampingservice

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.