forked from trent_larson/crowd-funder-for-time-pwa
- Fix Vue template syntax in App.vue by using proper event handler format - Update Vite config to properly handle ESM imports and crypto modules - Add manual chunks for better code splitting - Improve environment variable handling in vite-env.d.ts - Fix TypeScript linting errors in App.vue
69 lines
2.0 KiB
TypeScript
69 lines
2.0 KiB
TypeScript
import { GenericVerifiableCredential } from './common'
|
|
|
|
export interface AgreeVerifiableCredential {
|
|
'@context': string
|
|
'@type': string
|
|
object: Record<string, unknown>
|
|
}
|
|
|
|
// Note that previous VCs may have additional fields.
|
|
// https://endorser.ch/doc/html/transactions.html#id4
|
|
export interface GiveVerifiableCredential extends GenericVerifiableCredential {
|
|
'@context'?: string
|
|
'@type': 'GiveAction'
|
|
agent?: { identifier: string }
|
|
description?: string
|
|
fulfills?: { '@type': string; identifier?: string; lastClaimId?: string }[]
|
|
identifier?: string
|
|
image?: string
|
|
object?: { amountOfThisGood: number; unitCode: string }
|
|
provider?: GenericVerifiableCredential
|
|
recipient?: { identifier: string }
|
|
}
|
|
|
|
// Note that previous VCs may have additional fields.
|
|
// https://endorser.ch/doc/html/transactions.html#id8
|
|
export interface OfferVerifiableCredential extends GenericVerifiableCredential {
|
|
'@context'?: string
|
|
'@type': 'Offer'
|
|
description?: string
|
|
includesObject?: { amountOfThisGood: number; unitCode: string }
|
|
itemOffered?: {
|
|
description?: string
|
|
isPartOf?: {
|
|
identifier?: string
|
|
lastClaimId?: string
|
|
'@type'?: string
|
|
name?: string
|
|
}
|
|
}
|
|
offeredBy?: { identifier: string }
|
|
recipient?: { identifier: string }
|
|
validThrough?: string
|
|
}
|
|
|
|
// Note that previous VCs may have additional fields.
|
|
// https://endorser.ch/doc/html/transactions.html#id7
|
|
export interface PlanVerifiableCredential extends GenericVerifiableCredential {
|
|
'@context': 'https://schema.org'
|
|
'@type': 'PlanAction'
|
|
name: string
|
|
agent?: { identifier: string }
|
|
description?: string
|
|
identifier?: string
|
|
lastClaimId?: string
|
|
location?: {
|
|
geo: { '@type': 'GeoCoordinates'; latitude: number; longitude: number }
|
|
}
|
|
}
|
|
|
|
// AKA Registration & RegisterAction
|
|
export interface RegisterVerifiableCredential {
|
|
'@context': string
|
|
'@type': 'RegisterAction'
|
|
agent: { identifier: string }
|
|
identifier?: string
|
|
object: string
|
|
participant?: { identifier: string }
|
|
}
|