@webwallet/graphstore
Advanced tools
Comparing version 0.1.1 to 0.2.0
@@ -16,9 +16,9 @@ 'use strict' | ||
with spender, countspaces, toString(i) as outputPosition, {outputs}[i] as output | ||
match (countspace:Countspace {id: output.countspace})-[:Addresses]->(addressIndex) | ||
match (countspace:Countspace {id: output.counter})-[:Addresses]->(addressIndex) | ||
merge (address:Address {id: output.address}) | ||
merge (address)<-[:Address]-(addressIndex) | ||
merge (address)-[:Outputs {id: output.countspace}]->(outputsIndex:Index) | ||
merge (address)-[:Outputs {id: output.counter}]->(outputsIndex:Index) | ||
merge (outputsIndex)-[:Points {id: outputPosition}]->(spender) | ||
merge (outputsIndex)-[:Unspent {id: outputPosition}]->(spender) | ||
with address, countspace, outputsIndex, output.previous as previous, spender | ||
with address, countspace, outputsIndex, output.sources as previous, spender | ||
unwind (case previous when [] then [''] else previous end) as previousOutput | ||
@@ -35,5 +35,5 @@ optional match (outputsIndex)-[unspent:Unspent]->(spendee:Transaction) | ||
with spender, collect({ | ||
adr: address.id, | ||
cru: countspace.id, | ||
pre: previousOutputs | ||
address: address.id, | ||
counter: countspace.id, | ||
sources: previousOutputs | ||
}) as outputs | ||
@@ -40,0 +40,0 @@ unwind (case {inputs} when [] then [''] else {inputs} end) as input |
{ | ||
"name": "@webwallet/graphstore", | ||
"version": "0.1.1", | ||
"version": "0.2.0", | ||
"description": "WebWallet Graphstore microservice for transaction clearing.", | ||
@@ -5,0 +5,0 @@ "main": "index.js", |
10197
14