@otskit/mcp 0.7.1 → 0.7.2
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/README.md +2 -2
- package/dist/{chunk-XG7NDZR3.js → chunk-2QPOSJTC.js} +1 -1
- package/dist/{chunk-KVHJHTFL.js → chunk-PWAVQJWD.js} +12 -3
- package/dist/{chunk-4S4MSBQL.js → chunk-TNLRNQZ3.js} +1 -0
- package/dist/{cli-WOUUWARK.js → cli-XKUZWP2T.js} +2 -2
- package/dist/index.js +3 -3
- package/dist/{server-NDG4QZ56.js → server-DBVOG2RS.js} +3 -3
- package/dist/{watch-TQR2L42L.js → watch-TOXK5UVL.js} +2 -2
- package/package.json +1 -1
package/README.md
CHANGED
|
@@ -104,7 +104,7 @@ npm test # run tests
|
|
|
104
104
|
|
|
105
105
|
## Dependencies
|
|
106
106
|
|
|
107
|
-
- [`@otskit/core`](https://github.com/
|
|
108
|
-
- [`@otskit/client`](https://github.com/
|
|
107
|
+
- [`@otskit/core`](https://github.com/OTSkit/otskit-core) - OpenTimestamps core logic
|
|
108
|
+
- [`@otskit/client`](https://github.com/OTSkit/otskit-client) - OTS calendar client
|
|
109
109
|
- [`@modelcontextprotocol/sdk`](https://github.com/modelcontextprotocol/typescript-sdk) - MCP SDK
|
|
110
110
|
- `node-sqlite3-wasm` - local database (pure WASM, no native compilation)
|
|
@@ -3,8 +3,9 @@ import {
|
|
|
3
3
|
getStamp,
|
|
4
4
|
insertStamp,
|
|
5
5
|
listStamps,
|
|
6
|
-
logOperation
|
|
7
|
-
|
|
6
|
+
logOperation,
|
|
7
|
+
updateStampStatus
|
|
8
|
+
} from "./chunk-TNLRNQZ3.js";
|
|
8
9
|
import {
|
|
9
10
|
writeAtomic
|
|
10
11
|
} from "./chunk-YFSUDT24.js";
|
|
@@ -89,12 +90,20 @@ async function verifyTimestamp(input, db, config) {
|
|
|
89
90
|
logOperation(db, { stamp_id: input.id, action: "verify", result: "failed", error_msg: result.error });
|
|
90
91
|
return { status: "unknown", hash: record.hash };
|
|
91
92
|
}
|
|
93
|
+
const bitcoinTime = new Date(result.timestamp * 1e3).toISOString();
|
|
94
|
+
const now = (/* @__PURE__ */ new Date()).toISOString();
|
|
95
|
+
updateStampStatus(db, input.id, {
|
|
96
|
+
status: "confirmed",
|
|
97
|
+
bitcoin_block: result.blockHeight,
|
|
98
|
+
bitcoin_time: bitcoinTime,
|
|
99
|
+
confirmed_at: now
|
|
100
|
+
});
|
|
92
101
|
logOperation(db, { stamp_id: input.id, action: "verify", result: "success" });
|
|
93
102
|
return {
|
|
94
103
|
status: "confirmed",
|
|
95
104
|
hash: record.hash,
|
|
96
105
|
bitcoin_block: result.blockHeight,
|
|
97
|
-
bitcoin_time:
|
|
106
|
+
bitcoin_time: bitcoinTime
|
|
98
107
|
};
|
|
99
108
|
}
|
|
100
109
|
|
|
@@ -2,13 +2,13 @@ import {
|
|
|
2
2
|
createTimestamp,
|
|
3
3
|
listPending,
|
|
4
4
|
verifyTimestamp
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-PWAVQJWD.js";
|
|
6
6
|
import {
|
|
7
7
|
backupDb,
|
|
8
8
|
getDb,
|
|
9
9
|
loadConfig,
|
|
10
10
|
upgradeTimestamp
|
|
11
|
-
} from "./chunk-
|
|
11
|
+
} from "./chunk-TNLRNQZ3.js";
|
|
12
12
|
import "./chunk-YFSUDT24.js";
|
|
13
13
|
|
|
14
14
|
// src/cli.ts
|
package/dist/index.js
CHANGED
|
@@ -20,7 +20,7 @@ Commands:
|
|
|
20
20
|
}
|
|
21
21
|
switch (command) {
|
|
22
22
|
case "serve": {
|
|
23
|
-
const { runServer } = await import("./server-
|
|
23
|
+
const { runServer } = await import("./server-DBVOG2RS.js");
|
|
24
24
|
await runServer();
|
|
25
25
|
break;
|
|
26
26
|
}
|
|
@@ -49,7 +49,7 @@ switch (command) {
|
|
|
49
49
|
break;
|
|
50
50
|
}
|
|
51
51
|
case "watch": {
|
|
52
|
-
const { normalizeWatchInterval, watchPending } = await import("./watch-
|
|
52
|
+
const { normalizeWatchInterval, watchPending } = await import("./watch-TOXK5UVL.js");
|
|
53
53
|
const parsed = args[0] ? parseInt(args[0], 10) : NaN;
|
|
54
54
|
const interval = normalizeWatchInterval(isNaN(parsed) ? void 0 : parsed);
|
|
55
55
|
if (args[0] && (isNaN(parsed) || parsed < 15))
|
|
@@ -65,7 +65,7 @@ switch (command) {
|
|
|
65
65
|
case "check-pending":
|
|
66
66
|
case "backup":
|
|
67
67
|
case "scheduler": {
|
|
68
|
-
const { runCli } = await import("./cli-
|
|
68
|
+
const { runCli } = await import("./cli-XKUZWP2T.js");
|
|
69
69
|
await runCli(command, args);
|
|
70
70
|
break;
|
|
71
71
|
}
|
|
@@ -2,16 +2,16 @@ import {
|
|
|
2
2
|
createTimestamp,
|
|
3
3
|
listPending,
|
|
4
4
|
verifyTimestamp
|
|
5
|
-
} from "./chunk-
|
|
5
|
+
} from "./chunk-PWAVQJWD.js";
|
|
6
6
|
import {
|
|
7
7
|
normalizeWatchInterval
|
|
8
|
-
} from "./chunk-
|
|
8
|
+
} from "./chunk-2QPOSJTC.js";
|
|
9
9
|
import {
|
|
10
10
|
getDb,
|
|
11
11
|
getStamp,
|
|
12
12
|
loadConfig,
|
|
13
13
|
upgradeTimestamp
|
|
14
|
-
} from "./chunk-
|
|
14
|
+
} from "./chunk-TNLRNQZ3.js";
|
|
15
15
|
import "./chunk-YFSUDT24.js";
|
|
16
16
|
|
|
17
17
|
// src/server.ts
|
package/package.json
CHANGED