* 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)
| 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 { |
no test coverage detected