gitmark 0.0.51 → 0.0.55
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/bin/git-mark +6 -1
- package/bin/git-mark-init +3 -2
- package/bin/git-mark-verify +1 -2
- package/package.json +1 -1
package/bin/git-mark
CHANGED
|
@@ -102,6 +102,11 @@ const commits = gitlog(options)
|
|
|
102
102
|
var head = commits[0].hash
|
|
103
103
|
console.log('current head', head)
|
|
104
104
|
|
|
105
|
+
if (argv._[0] === 'init') {
|
|
106
|
+
console.log($('./bin/git-mark-init').toString())
|
|
107
|
+
process.exit(0)
|
|
108
|
+
}
|
|
109
|
+
|
|
105
110
|
data.privkey = argv._[0] || secret || getPrivKey() || data.privkey
|
|
106
111
|
data.hash = argv._[1] || head || data.hash
|
|
107
112
|
data.genesis = argv.genesis || data.genesis
|
|
@@ -199,7 +204,7 @@ const gitmarkTxBase = homedir + '/.gitmark/tx'
|
|
|
199
204
|
|
|
200
205
|
try {
|
|
201
206
|
if (data.genesis) {
|
|
202
|
-
tx = { total_output: '1', fees: '0.00001' }
|
|
207
|
+
tx = { total_output: '0.1', fees: '0.00001' }
|
|
203
208
|
} else {
|
|
204
209
|
tx = require(gitmarkTxBase + '/' + lastCommit[0] + '.json')
|
|
205
210
|
if (!tx.total_output) tx.total_output = tx.vout[0].value
|
package/bin/git-mark-init
CHANGED
|
@@ -12,6 +12,7 @@ const homedir = require('os').homedir()
|
|
|
12
12
|
const exec = require('child_process').exec
|
|
13
13
|
const $ = require('child_process').execSync
|
|
14
14
|
const execSync = require('child_process').execSync
|
|
15
|
+
const package = require('../package.json')
|
|
15
16
|
|
|
16
17
|
// MODEL
|
|
17
18
|
// default privkey = brain for urn:json:bitmark
|
|
@@ -140,8 +141,8 @@ console.log('tx', tx)
|
|
|
140
141
|
// create gitmark.json
|
|
141
142
|
console.log('create gitmark.json and check in files')
|
|
142
143
|
console.log(`{
|
|
143
|
-
"@id": "gitmark:${tx}:
|
|
144
|
-
"genesis": "gitmark:${tx}:
|
|
144
|
+
"@id": "gitmark:${tx}:0",
|
|
145
|
+
"genesis": "gitmark:${tx}:0",
|
|
145
146
|
"nick": "gitmark",
|
|
146
147
|
"package": "./package.json",
|
|
147
148
|
"repository": "./"
|
package/bin/git-mark-verify
CHANGED