Skip to content

Commit

Permalink
Release Luna Features 0.3a
Browse files Browse the repository at this point in the history
  • Loading branch information
schrink committed Mar 12, 2018
1 parent 7f112c2 commit 99a274c
Show file tree
Hide file tree
Showing 52 changed files with 4,020 additions and 1,898 deletions.
3 changes: 3 additions & 0 deletions .env.example
Original file line number Diff line number Diff line change
@@ -1,5 +1,8 @@
NODE_ENV=development
NODE_IP=
DH_NODE_IP=
DH_NODE_PORT=
DH_WALLET=

DB_USERNAME=root
DB_PASSWORD=root
Expand Down
4 changes: 0 additions & 4 deletions .eslintrc.js
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,6 @@ module.exports = {
"error",
"unix"
],
"quotes": [
"error",
"single"
],
"semi": [
"error",
"always"
Expand Down
12 changes: 11 additions & 1 deletion .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,4 +3,14 @@ node_modules
.idea
config.json
.env
.nyc_output
.nyc_output
package-lock.json
kad-storage/*
!kad-storage/.gitkeep
system/*
!system/.gitkeep
import-log.txt
OT-GIT-NODE-DEVELOP.zip
manual-testing-scripts
log.log

3 changes: 2 additions & 1 deletion .npmrc
Original file line number Diff line number Diff line change
@@ -1,2 +1,3 @@
npm config set save=true
npm config set save-exact=true
npm config set save-exact=true
package-lock = false
54 changes: 32 additions & 22 deletions .snyk
Original file line number Diff line number Diff line change
@@ -1,57 +1,67 @@
# Snyk (https://snyk.io) policy file, patches or ignores known vulnerabilities.
version: v1.10.1
version: v1.10.2
# ignores vulnerabilities until expiry date; change duration by modifying expiry date
ignore:
'npm:hoek:20180212':
- unirest > request > hawk > hoek:
reason: None given
expires: '2018-03-21T09:26:34.785Z'
expires: '2018-03-28T17:01:29.940Z'
- unirest > request > hawk > boom > hoek:
reason: None given
expires: '2018-03-21T09:26:34.785Z'
expires: '2018-03-28T17:01:29.940Z'
- unirest > request > hawk > sntp > hoek:
reason: None given
expires: '2018-03-21T09:26:34.785Z'
expires: '2018-03-28T17:01:29.940Z'
- unirest > request > hawk > cryptiles > boom > hoek:
reason: None given
expires: '2018-03-21T09:26:34.785Z'
expires: '2018-03-28T17:01:29.940Z'
- solidity-sha3 > babel-cli > chokidar > fsevents > node-pre-gyp > hawk > hoek:
reason: None given
expires: '2018-03-21T09:26:34.785Z'
expires: '2018-03-28T17:01:29.940Z'
- solidity-sha3 > babel-cli > chokidar > fsevents > node-pre-gyp > hawk > boom > hoek:
reason: None given
expires: '2018-03-21T09:26:34.785Z'
expires: '2018-03-28T17:01:29.940Z'
- solidity-sha3 > babel-cli > chokidar > fsevents > node-pre-gyp > hawk > sntp > hoek:
reason: None given
expires: '2018-03-21T09:26:34.785Z'
expires: '2018-03-28T17:01:29.940Z'
- solidity-sha3 > babel-cli > chokidar > fsevents > node-pre-gyp > hawk > cryptiles > boom > hoek:
reason: None given
expires: '2018-03-21T09:26:34.785Z'
expires: '2018-03-28T17:01:29.940Z'
- solidity-sha3 > babel-cli > chokidar > fsevents > node-pre-gyp > request > hawk > hoek:
reason: None given
expires: '2018-03-21T09:26:34.786Z'
expires: '2018-03-28T17:01:29.940Z'
- solidity-sha3 > babel-cli > chokidar > fsevents > node-pre-gyp > request > hawk > boom > hoek:
reason: None given
expires: '2018-03-21T09:26:34.786Z'
expires: '2018-03-28T17:01:29.940Z'
- solidity-sha3 > babel-cli > chokidar > fsevents > node-pre-gyp > request > hawk > sntp > hoek:
reason: None given
expires: '2018-03-21T09:26:34.786Z'
expires: '2018-03-28T17:01:29.940Z'
- solidity-sha3 > babel-cli > chokidar > fsevents > node-pre-gyp > request > hawk > cryptiles > boom > hoek:
reason: None given
expires: '2018-03-21T09:26:34.786Z'
expires: '2018-03-28T17:01:29.940Z'
'npm:mime:20170907':
- unirest > mime:
reason: None given
expires: '2018-03-21T09:26:34.786Z'
expires: '2018-03-28T17:01:29.940Z'
'npm:tunnel-agent:20170305':
- unirest > request > tunnel-agent:
reason: None given
expires: '2018-03-21T09:26:34.786Z'
# patches apply the minimum changes required to fix a vulnerability
patch:
expires: '2018-03-28T17:01:29.940Z'
'npm:braces:20180219':
- solidity-sha3 > babel-cli > chokidar > anymatch > micromatch > braces:
reason: None given
expires: '2018-03-28T17:01:29.940Z'
'npm:debug:20170905':
- solidity-sha3 > babel-cli > chokidar > fsevents > node-pre-gyp > tar-pack > debug:
patched: '2018-02-19T09:25:12.181Z'
'npm:tough-cookie:20170905':
- solidity-sha3 > babel-cli > chokidar > fsevents > node-pre-gyp > request > tough-cookie:
patched: '2018-02-19T09:25:12.181Z'
- nat-pmp > debug:
reason: None given
expires: '2018-03-28T17:01:29.940Z'
- tcp-port-used > debug:
reason: None given
expires: '2018-03-28T17:01:29.940Z'
'npm:lodash:20180130':
- eth-lightwallet > bitcore-lib > lodash:
reason: None given
expires: '2018-03-28T17:01:29.940Z'
- eth-lightwallet > bitcore-mnemonic > bitcore-lib > lodash:
reason: None given
expires: '2018-03-28T17:01:29.940Z'
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ __OriginTrail is building first Purpose-built Protocol for Supply Chains Based o

This repository contains a work-in-progress code for a network node. Please have in mind that code is still __in early alpha version__ developed mostly as a quick proof of concept and although main features will work, there are many limitations.

We expect __Test Network__ release to be available by the end of Q2 2018 as a beta o our protocol, while __Main Network__ is scheduled for Q3 2018. For further information about our roadmap please see our [website](https://origintrail.io/roadmap).
We expect __Test Network__ release to be available by the end of Q2 2018 as a beta of our protocol, while __Main Network__ is scheduled for Q3 2018. For further information about our roadmap please see our [website](https://origintrail.io/roadmap).

[Please see our main wiki page for more information](http://github.com/OriginTrail/ot-yimishiji-pilot/wiki/)

Expand All @@ -18,7 +18,7 @@ Installation

Detailed instructions for installation and configuration of OriginTrail Node are provided on our wiki.

* [Installation Instructions](http://github.com/OriginTrail/ot-yimishiji-pilot/wiki/Installation-Instructions)
* [Integration Instructions](http://github.com/OriginTrail/ot-yimishiji-pilot/wiki/Integration-Instructions)
* [Configuration](http://github.com/OriginTrail/ot-yimishiji-pilot/wiki/Configuration)

Contribution
Expand Down
24 changes: 12 additions & 12 deletions gulpfile.js
Original file line number Diff line number Diff line change
@@ -1,14 +1,14 @@
const gulp = require('gulp')
const beautify = require('gulp-beautify')
const eslint = require('gulp-eslint')
const gulp = require('gulp');
const beautify = require('gulp-beautify');
const eslint = require('gulp-eslint');

gulp.task('make-origintrail-great-again', function () {
gulp.src('./**/*.js')
.pipe(beautify({
indent_size: 2
}))
.pipe(eslint({
fix: true
}))
.pipe(gulp.dest('./'))
})
gulp.src('./**/*.js')
.pipe(beautify({
indent_size: 2
}))
.pipe(eslint({
fix: true
}))
.pipe(gulp.dest('./'));
});
File renamed without changes.
2 changes: 1 addition & 1 deletion importers/default_importer.py
Original file line number Diff line number Diff line change
Expand Up @@ -48,7 +48,7 @@
password = os.environ.get("DB_PASSWORD"),
enable_logging = True)

db = client.db('origintrail')
db = client.db(os.environ.get("DB_DATABASE"))
# client.grant_user_access(os.environ.get("DB_USERNAME"), os.environ.get("DB_DATABASE"))

current_graphs = db.graphs()
Expand Down
200 changes: 200 additions & 0 deletions importers/example_connected_v1.5.xml
Original file line number Diff line number Diff line change
@@ -0,0 +1,200 @@
<OriginTrailExport version="1.5">
<DataProvider> <!-- Unique ID for supply chain entity that provides the file -->
<ParticipantId>WALLET_2_ID</ParticipantId>
</DataProvider>
<MasterData>
<!--
Master data is the core data that is essential to operations in a specific business or business unit. It represents the business objects which are agreed on and shared across the enterprise. It can cover relatively static reference data, unstructured, analytical, hierarchical and metadata. In our current XML structure, the Master Data entities are:
- ParticipantsList and Participant – Description of all entities (participants) in the supply chain
- BusinessLocationsList and BusinessLocation - describe all physical or system locations where business processes are executed
- ObjectsList and Object – entities that are subjects of business processes (items or goods being described)
-->
<ParticipantsList> <!-- Description of all entities (participants) in supply chain -->
<Participant>
<ParticipantIdentifiers>
<ParticipantId>RETAILER_ID</ParticipantId>
</ParticipantIdentifiers>
<ParticipantData>
<Name>
<EN>Retailer</EN>
</Name>
<Location>
<Address>Retailer's Street 01C</Address>
<City>Bytesfield</City>
<Country>Cryptonia</Country>
<Zip>20001</Zip>
<GeoLocation>
<Latitude>00.0000</Latitude>
<Longitude>00.0000</Longitude>
</GeoLocation>
</Location>
</ParticipantData>
</Participant>
<Participant>
<ParticipantIdentifiers> <!-- Required -->
<ParticipantId>PROVIDER_ID</ParticipantId> <!-- Required -->
<AnotherIdentifier>SomeValue</AnotherIdentifier> <!-- Optional: you may define and add more identifiers if needed -->
</ParticipantIdentifiers>
<ParticipantData>
<!-- ParticipantData tag is required, but all the contents inside are optional -->
<Name> <!-- Required -->
<en>Green Warehouse Ltd</en>
<de>Gruene Warehouse Ltd</de>
<!-- languages are defined by ISO 639-1 (https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes)-->
</Name>
<Location> <!-- Optional -->
<Address>Data Boulevard 01</Address>
<City>Traceshire</City>
<Country>Cryptonia</Country>
<Zip>10000</Zip>
<GeoLocation>
<Latitude>00.0000</Latitude>
<Longitude>00.0000</Longitude>
</GeoLocation>
</Location>
<AdditionalInformation> Lorem Ipsum </AdditionalInformation> <!-- Optional: you may add additional tags if needed -->
</ParticipantData>
</Participant>
</ParticipantsList>
<BusinessLocationsList> <!-- This tag describes all physical locations where business processes are executed -->
<BusinessLocation>
<BusinessLocationOwnerId>RETAILER_ID</BusinessLocationOwnerId>
<BusinessLocationIdentifiers>
<BusinessLocationId>STORE_1</BusinessLocationId>
</BusinessLocationIdentifiers>
<BusinessLocationData>
<BusinessLocationName>
<EN>Retailer's Store</EN>
</BusinessLocationName>
<BusinessLocationType>Store</BusinessLocationType>
<Location>
<Address>Retailer's Street 01C</Address>
<City>Bytesfield</City>
<Country>Cryptonia</Country>
<Zip>20001</Zip>
<GeoLocation>
<Latitude>00.0000</Latitude>
<Longitude>00.0000</Longitude>
</GeoLocation>
</Location>
</BusinessLocationData>
</BusinessLocation>
<BusinessLocation>
<BusinessLocationOwnerId>PROVIDER_ID</BusinessLocationOwnerId> <!-- Required. Corresponds to ParticipantId in ParticipantsList above -->
<BusinessLocationIdentifiers> <!-- Required -->
<BusinessLocationId>WAREHOUSE_1</BusinessLocationId> <!-- Required -->
<AnotherIdentifier>SomeValue</AnotherIdentifier> <!-- Optional: you may define and add more identifiers if needed -->
</BusinessLocationIdentifiers>
<BusinessLocationData> <!-- Required -->
<Name> <!-- Required -->
<en>Provider's Warehouse</en>
<de>Das Warehouse des Anbieters</de>
<!-- languages are defined by ISO 639-1 (https://en.wikipedia.org/wiki/List_of_ISO_639-1_codes)-->
</Name>
<BusinessLocationType>Warehouse</BusinessLocationType> <!-- Required -->
<Location> <!-- Optional -->
<Address>Data Boulevard 02</Address>
<City>Traceshire</City>
<Country>Cryptonia</Country>
<Zip>10000</Zip>
<GeoLocation>
<Latitude>00.0000</Latitude>
<Longitude>00.0000</Longitude>
</GeoLocation>
</Location>
<AdditionalInformation> Lorem Ipsum </AdditionalInformation> <!-- Optional: you may add additional tags if needed -->
</BusinessLocationData>
</BusinessLocation>

</BusinessLocationsList>
<ObjectsList> <!-- Object descriptions - i.e. product (object) master data, involved in the supply chain -->
<Object>
<ObjectIdentifiers>
<ObjectId>OBJECT_2</ObjectId>
<ean13>1234567890124</ean13>
</ObjectIdentifiers>
<ObjectData>
<Name>
<EN>Packed crypto Carrots 1 Kg</EN>
</Name>
<ObjectType>Vegetable</ObjectType>
<ObjectCategory>Carrot</ObjectCategory>
<ObjectDescription>
<en>The cryptiest carrots in the entire Cryptonia, packed for retail in 1 Kg package.</en>
</ObjectDescription>
</ObjectData>
</Object>
</ObjectsList>
<BatchesList>
<Batch>
<BatchIdentifiers>
<BatchId>OUTPUT_BATCH_ID</BatchId> <!-- Required -->
<ObjectId>OBJECT_2</ObjectId> <!-- Required -->
<SomeOtherCode>SomeValue</SomeOtherCode> <!-- Optional -->
</BatchIdentifiers>
<BatchData>
<QuantitiesDataList> <!-- Optional -->
<QuantityData>
<Quantity>1</Quantity>
<Measure>Unit</Measure>
</QuantityData>
<QuantityData>
<Quantity>10</Quantity>
<Measure>Kg</Measure>
</QuantityData>
</QuantitiesDataList>
<Note>Purchased on time</Note> <!-- Optional -->
<AdditionalInformation>Lorem ipsum</AdditionalInformation> <!--Required -->
</BatchData>
</Batch>
</BatchesList>
</MasterData>
<TransactionData>
<ExternalTransactionsList>
<ExternalTransaction>
<ExternalTransactionIdentifiers>
<ExternalTransactionId>TRANSACTION_3</ExternalTransactionId>
<ExternalTransactionDocumentId>TRANSACTION_DOCUMENT_3</ExternalTransactionDocumentId>
</ExternalTransactionIdentifiers>
<TransactionBatchesInformation>
<TransactionBatchesList> <!-- Required -->
<TransactionBatch>
<TransactionBatchId>OUTPUT_BATCH_ID</TransactionBatchId>
<TransactionBatchData>
<QuantitiesDataList>
<QuantityData>
<Quantity>1</Quantity>
<Measure>Unit</Measure>
</QuantityData>
<QuantityData>
<Quantity>10</Quantity>
<Measure>Kg</Measure>
</QuantityData>
</QuantitiesDataList>
</TransactionBatchData>
</TransactionBatch>
</TransactionBatchesList>
</TransactionBatchesInformation>
<ExternalTransactionData>
<TransactionTime>21.12.2012T00:00:00</TransactionTime>
<BusinessProcess>Purchase</BusinessProcess>
<BusinessLocationId>STORE_1</BusinessLocationId>
<TransactionFlow>Input</TransactionFlow> <!-- Required -->
<SourceBusinessLocationId>WAREHOUSE_1</SourceBusinessLocationId>
<DestinationBusinessLocationId>STORE_1</DestinationBusinessLocationId>
<BusinessProcessDescription>Regular Purchase</BusinessProcessDescription>
<AdditionalInformation> <!-- Optional -->
<Price>
<Value>10</Value>
<VAT>1%</VAT>
<Total>11</Total>
<Currency>USD</Currency>
<Discount>0%</Discount>
</Price>
</AdditionalInformation>
</ExternalTransactionData>
</ExternalTransaction>
</ExternalTransactionsList>
</TransactionData>
</OriginTrailExport>
Loading

0 comments on commit 99a274c

Please sign in to comment.