MCPcopy Index your code
hub / github.com/atomicdata-dev/atomic-data-browser / sign

Method sign

lib/src/commit.ts:47–55  ·  view source on GitHub ↗

* Signs the commit using the privateKey of the Agent, and returns a full * Commit which is ready to be sent to an Atomic-Server `/commit` endpoint.

(privateKey: string, agentSubject: string)

Source from the content-addressed store, hash-verified

45 * Commit which is ready to be sent to an Atomic-Server `/commit` endpoint.
46 */
47 async sign(privateKey: string, agentSubject: string): Promise<Commit> {
48 const commit = await signAt(
49 this.clone(),
50 agentSubject,
51 privateKey,
52 getTimestampNow(),
53 );
54 return commit;
55 }
56
57 /** Returns true if the CommitBuilder has non-empty changes (set, remove, destroy) */
58 hasUnsavedChanges(): boolean {

Callers 2

destroyMethod · 0.95
saveMethod · 0.80

Calls 3

cloneMethod · 0.95
signAtFunction · 0.85
getTimestampNowFunction · 0.85

Tested by

no test coverage detected