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 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}:1",
144
- "genesis": "gitmark:${tx}:1",
144
+ "@id": "gitmark:${tx}:0",
145
+ "genesis": "gitmark:${tx}:0",
145
146
  "nick": "gitmark",
146
147
  "package": "./package.json",
147
148
  "repository": "./"
@@ -106,8 +106,7 @@ for (var i = commits.length - 1; i >= 0; i--) {
106
106
 
107
107
  console.log(
108
108
  'https://chainz.cryptoid.info/marks/tx.dws?' +
109
- subject.split(' ')[1].split(':')[0] +
110
- '.htm'
109
+ subject.split(/[: ]/)[1] + '.htm'
111
110
  )
112
111
  }
113
112
  }
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "gitmark",
3
- "version": "0.0.51",
3
+ "version": "0.0.55",
4
4
  "description": "gitmark",
5
5
  "main": "index.js",
6
6
  "scripts": {