gitmark 0.0.65 → 0.0.66
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-list +8 -3
- package/package.json +1 -1
package/bin/git-mark-list
CHANGED
|
@@ -84,6 +84,7 @@ function addCryptoToCommit(commit) {
|
|
|
84
84
|
function renderCommit(commit, type) {
|
|
85
85
|
if (!commit) return
|
|
86
86
|
commit.tags = commit.tags || []
|
|
87
|
+
if (commit.c) commit.tags.push(["c", commit.c])
|
|
87
88
|
if (type === 'nostr') {
|
|
88
89
|
var canon = [0, commit.pubkey, commit.authorDate, 17, commit.tags, commit.hash]
|
|
89
90
|
|
|
@@ -139,6 +140,8 @@ function getPrivKey() {
|
|
|
139
140
|
data.privkey = argv._[0] || getPrivKey() || data.privkey
|
|
140
141
|
data.g = argv.g
|
|
141
142
|
data.count = argv.count
|
|
143
|
+
data.genesis = argv.genesis
|
|
144
|
+
data.created_at = argv.created
|
|
142
145
|
|
|
143
146
|
var POINT = Buffer.from(data.privkey, 'hex')
|
|
144
147
|
|
|
@@ -157,8 +160,9 @@ var b3
|
|
|
157
160
|
var genesis = require('../gitmark.json')
|
|
158
161
|
var genesisCommit = {
|
|
159
162
|
"hash": "genesis",
|
|
160
|
-
"authorDate":
|
|
161
|
-
"privkey": b1.toString(16)
|
|
163
|
+
"authorDate": data.created_at,
|
|
164
|
+
"privkey": b1.toString(16),
|
|
165
|
+
"c": data.genesis,
|
|
162
166
|
}
|
|
163
167
|
var keyPair1 = bitcoin.ECPair.fromPrivateKey(
|
|
164
168
|
Buffer.from(b1.toString(16), 'hex'),
|
|
@@ -197,7 +201,8 @@ for (var i = commits.length - 1; i >= 0; i--) {
|
|
|
197
201
|
hash: commits[i + 1]?.hash,
|
|
198
202
|
subject: commits[i].subject,
|
|
199
203
|
authorDate: Math.floor(new Date(commits[i].authorDate).getTime() / 1000),
|
|
200
|
-
privkey: b1.toString(16)
|
|
204
|
+
privkey: b1.toString(16),
|
|
205
|
+
c: commits[i].subject
|
|
201
206
|
}
|
|
202
207
|
commit = addCryptoToCommit(commit)
|
|
203
208
|
// console.log(commit)
|