@newtype-ai/nit 0.2.5 → 0.2.6

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.
@@ -249,19 +249,6 @@ async function signChallenge(nitDir, challenge) {
249
249
  const sig = sign(null, Buffer.from(challenge, "utf-8"), privateKey);
250
250
  return sig.toString("base64");
251
251
  }
252
- function verifySignature(pubBase64, challenge, signatureBase64) {
253
- const xB64url = base64ToBase64url(pubBase64);
254
- const publicKeyObj = createPublicKey({
255
- key: { kty: "OKP", crv: "Ed25519", x: xB64url },
256
- format: "jwk"
257
- });
258
- return verify(
259
- null,
260
- Buffer.from(challenge, "utf-8"),
261
- publicKeyObj,
262
- Buffer.from(signatureBase64, "base64")
263
- );
264
- }
265
252
  async function signMessage(nitDir, message) {
266
253
  const privateKey = await loadPrivateKey(nitDir);
267
254
  const sig = sign(null, Buffer.from(message, "utf-8"), privateKey);
@@ -1153,7 +1140,6 @@ export {
1153
1140
  formatPublicKeyField,
1154
1141
  parsePublicKeyField,
1155
1142
  signChallenge,
1156
- verifySignature,
1157
1143
  signMessage,
1158
1144
  NIT_NAMESPACE,
1159
1145
  deriveAgentId,
package/dist/cli.js CHANGED
@@ -15,7 +15,7 @@ import {
15
15
  remoteSetUrl,
16
16
  sign,
17
17
  status
18
- } from "./chunk-U6PEH4IJ.js";
18
+ } from "./chunk-3RRHLPAC.js";
19
19
 
20
20
  // src/cli.ts
21
21
  var bold = (s) => `\x1B[1m${s}\x1B[0m`;
package/dist/index.d.ts CHANGED
@@ -149,12 +149,6 @@ declare function parsePublicKeyField(field: string): string;
149
149
  * Returns a standard base64-encoded signature.
150
150
  */
151
151
  declare function signChallenge(nitDir: string, challenge: string): Promise<string>;
152
- /**
153
- * Verify a signature against a challenge using the raw base64 public key.
154
- * This is a utility for consumers; nit itself uses it in the remote module
155
- * for challenge-response flows.
156
- */
157
- declare function verifySignature(pubBase64: string, challenge: string, signatureBase64: string): boolean;
158
152
  /**
159
153
  * Sign an arbitrary message with the agent's private key.
160
154
  * Returns a standard base64-encoded signature.
@@ -311,4 +305,4 @@ declare function remoteSetUrl(name: string, url: string, options?: {
311
305
  projectDir?: string;
312
306
  }): Promise<void>;
313
307
 
314
- export { type AgentCard, type AgentCardSkill, type DiffResult, type FieldDiff, type InitResult, type LoginPayload, NIT_NAMESPACE, type NitBranch, type NitCommit, type NitConfig, type NitHead, type NitRemoteConfig, type PushResult, type RemoteInfo, type SkillMetadata, type StatusResult, branch, checkout, commit, deriveAgentId, diff, diffCards, fetchBranchCard, findNitDir, formatDiff, formatPublicKeyField, init, loadAgentId, log, loginPayload, parsePublicKeyField, push, remote, remoteAdd, remoteSetUrl, sign, signChallenge, signMessage, status, verifySignature };
308
+ export { type AgentCard, type AgentCardSkill, type DiffResult, type FieldDiff, type InitResult, type LoginPayload, NIT_NAMESPACE, type NitBranch, type NitCommit, type NitConfig, type NitHead, type NitRemoteConfig, type PushResult, type RemoteInfo, type SkillMetadata, type StatusResult, branch, checkout, commit, deriveAgentId, diff, diffCards, fetchBranchCard, findNitDir, formatDiff, formatPublicKeyField, init, loadAgentId, log, loginPayload, parsePublicKeyField, push, remote, remoteAdd, remoteSetUrl, sign, signChallenge, signMessage, status };
package/dist/index.js CHANGED
@@ -23,9 +23,8 @@ import {
23
23
  sign,
24
24
  signChallenge,
25
25
  signMessage,
26
- status,
27
- verifySignature
28
- } from "./chunk-U6PEH4IJ.js";
26
+ status
27
+ } from "./chunk-3RRHLPAC.js";
29
28
  export {
30
29
  NIT_NAMESPACE,
31
30
  branch,
@@ -50,6 +49,5 @@ export {
50
49
  sign,
51
50
  signChallenge,
52
51
  signMessage,
53
- status,
54
- verifySignature
52
+ status
55
53
  };
package/package.json CHANGED
@@ -1,6 +1,6 @@
1
1
  {
2
2
  "name": "@newtype-ai/nit",
3
- "version": "0.2.5",
3
+ "version": "0.2.6",
4
4
  "description": "Version control for agent cards",
5
5
  "type": "module",
6
6
  "bin": {