issue-166-open-timestamps #220
@ -3,7 +3,8 @@ import {
|
|||||||
CreateSignatureEventContent,
|
CreateSignatureEventContent,
|
||||||
DocSignatureEvent,
|
DocSignatureEvent,
|
||||||
Meta,
|
Meta,
|
||||||
SignedEventContent
|
SignedEventContent,
|
||||||
|
Timestamp
|
||||||
} from '../types'
|
} from '../types'
|
||||||
import { Mark } from '../types/mark'
|
import { Mark } from '../types/mark'
|
||||||
import {
|
import {
|
||||||
@ -59,6 +60,8 @@ export interface FlatMeta
|
|||||||
signersStatus: {
|
signersStatus: {
|
||||||
[signer: `npub1${string}`]: SignStatus
|
[signer: `npub1${string}`]: SignStatus
|
||||||
}
|
}
|
||||||
|
|
||||||
|
timestamps?: Timestamp[]
|
||||||
}
|
}
|
||||||
|
|
||||||
/**
|
/**
|
||||||
@ -163,7 +166,6 @@ export const useSigitMeta = (meta: Meta): FlatMeta => {
|
|||||||
setEncryptionKey(decrypted)
|
setEncryptionKey(decrypted)
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
// Temp. map to hold events and signers
|
// Temp. map to hold events and signers
|
||||||
const parsedSignatureEventsMap = new Map<
|
const parsedSignatureEventsMap = new Map<
|
||||||
`npub1${string}`,
|
`npub1${string}`,
|
||||||
@ -277,6 +279,7 @@ export const useSigitMeta = (meta: Meta): FlatMeta => {
|
|||||||
createSignature: meta?.createSignature,
|
createSignature: meta?.createSignature,
|
||||||
docSignatures: meta?.docSignatures,
|
docSignatures: meta?.docSignatures,
|
||||||
keys: meta?.keys,
|
keys: meta?.keys,
|
||||||
|
timestamps: meta?.timestamps,
|
||||||
isValid,
|
isValid,
|
||||||
kind,
|
kind,
|
||||||
tags,
|
tags,
|
||||||
|
@ -43,6 +43,14 @@ export interface Sigit {
|
|||||||
export interface Timestamp {
|
export interface Timestamp {
|
||||||
nostrId: string
|
nostrId: string
|
||||||
timestamp: string
|
timestamp: string
|
||||||
|
isComplete?: boolean
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface TimestampUpgradeResponse {
|
||||||
|
upgraded: boolean
|
||||||
|
nostrId: string
|
||||||
|
timestamp: string
|
||||||
|
isComplete: boolean
|
||||||
}
|
}
|
||||||
|
|
||||||
export interface UserAppData {
|
export interface UserAppData {
|
||||||
|
5
src/types/opentimestamps.d.ts
vendored
5
src/types/opentimestamps.d.ts
vendored
@ -3,13 +3,14 @@ interface OpenTimestamps {
|
|||||||
DetachedTimestampFile: {
|
DetachedTimestampFile: {
|
||||||
fromHash(op: any, hash: Uint8Array): any
|
fromHash(op: any, hash: Uint8Array): any
|
||||||
fromBytes(op: any, buffer: Uint8Array): any
|
fromBytes(op: any, buffer: Uint8Array): any
|
||||||
|
deserialize(buffer: any): any
|
||||||
}
|
}
|
||||||
|
|
||||||
// Stamp the provided timestamp file and return a Promise
|
// Stamp the provided timestamp file and return a Promise
|
||||||
stamp(file: any): Promise<void>
|
stamp(file: any): Promise<void>
|
||||||
|
|
||||||
// Verify the provided timestamp proof file
|
// Verify the provided timestamp proof file
|
||||||
verify(file: any): Promise<void>
|
verify(ots: string, file: string): Promise<void>
|
||||||
|
|
||||||
// Other utilities or operations (like OpSHA256, serialization)
|
// Other utilities or operations (like OpSHA256, serialization)
|
||||||
Ops: {
|
Ops: {
|
||||||
@ -25,5 +26,5 @@ interface OpenTimestamps {
|
|||||||
deserialize(bytes: Uint8Array): any
|
deserialize(bytes: Uint8Array): any
|
||||||
|
|
||||||
// Other potential methods based on repo functions
|
// Other potential methods based on repo functions
|
||||||
upgrade(file: any): Promise<void>
|
upgrade(file: any): Promise<boolean>
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user