diff --git a/src/libs/endorserServer.ts b/src/libs/endorserServer.ts index e48aa1a6..8db51eb8 100644 --- a/src/libs/endorserServer.ts +++ b/src/libs/endorserServer.ts @@ -59,12 +59,22 @@ export interface GiveServerRecord { unit: string; } +export interface OfferServerRecord { + amount: number; + amountGiven: number; + offeredByDid: string; + recipientDid: string; + requirementsMet: boolean; + unit: string; + validThrough: string; +} + export interface GiveVerifiableCredential { "@context"?: string; // optional when embedded, eg. in an Agree "@type": "GiveAction"; agent?: { identifier: string }; description?: string; - fulfills?: { "@type": string; identifier: string }; + fulfills?: { "@type": string; identifier?: string; lastClaimId?: string }; identifier?: string; object?: { amountOfThisGood: number; unitCode: string }; recipient?: { identifier: string }; @@ -77,7 +87,7 @@ export interface OfferVerifiableCredential { includesObject?: { amountOfThisGood: number; unitCode: string }; itemOffered?: { description?: string; - isPartOf?: { handleId?: string; lastClaimId?: string; "@type"?: string }; + isPartOf?: { identifier?: string; lastClaimId?: string; "@type"?: string }; }; offeredBy?: { identifier: string }; validThrough?: string; @@ -242,7 +252,7 @@ export async function createAndSubmitOffer( vcClaim.itemOffered = vcClaim.itemOffered || {}; vcClaim.itemOffered.isPartOf = { "@type": "PlanAction", - handleId: fulfillsProjectHandleId, + identifier: fulfillsProjectHandleId, }; } return createAndSubmitClaim( diff --git a/src/views/ProjectViewView.vue b/src/views/ProjectViewView.vue index b270c3a7..3a2f4d51 100644 --- a/src/views/ProjectViewView.vue +++ b/src/views/ProjectViewView.vue @@ -146,13 +146,38 @@