All checks were successful
Open PR on Staging / audit_and_check (pull_request) Successful in 30s
39 lines
991 B
TypeScript
39 lines
991 B
TypeScript
/* eslint-disable @typescript-eslint/no-explicit-any */
|
|
interface OpenTimestamps {
|
|
// Create a detached timestamp file from a buffer or file hash
|
|
DetachedTimestampFile: {
|
|
fromHash(op: any, hash: Uint8Array): any
|
|
fromBytes(op: any, buffer: Uint8Array): any
|
|
deserialize(buffer: any): any
|
|
}
|
|
|
|
// Stamp the provided timestamp file and return a Promise
|
|
stamp(file: any): Promise<void>
|
|
|
|
// Verify the provided timestamp proof file
|
|
verify(
|
|
ots: string,
|
|
file: string
|
|
): Promise<TimestampVerficiationResponse | Record<string, never>>
|
|
|
|
// Other utilities or operations (like OpSHA256, serialization)
|
|
Ops: {
|
|
OpSHA256: any
|
|
OpSHA1?: any
|
|
}
|
|
|
|
Context: {
|
|
StreamSerialization: any
|
|
}
|
|
|
|
// Load a timestamp file from a buffer
|
|
deserialize(bytes: Uint8Array): any
|
|
|
|
// Other potential methods based on repo functions
|
|
upgrade(file: any): Promise<boolean>
|
|
}
|
|
|
|
interface TimestampVerficiationResponse {
|
|
bitcoin: { timestamp: number; height: number }
|
|
}
|