finish the loading of an invite RegisterAction when clicking on a link

This commit is contained in:
2024-10-06 20:01:07 -06:00
parent 1bfdcab90b
commit 149481d468
14 changed files with 247 additions and 44 deletions

View File

@@ -65,7 +65,7 @@ export async function createEndorserJwtForKey(
issuer: account.did,
signer: signer,
expiresIn: undefined as number | undefined,
}
};
if (expiresIn) {
options.expiresIn = expiresIn;
}

View File

@@ -49,6 +49,7 @@ export interface ClaimResult {
error: { code: string; message: string };
}
// similar to VerifiableCredentialSubject... maybe rename this
export interface GenericVerifiableCredential {
"@context"?: string; // optional when embedded, eg. in an Agree
"@type": string;
@@ -56,8 +57,6 @@ export interface GenericVerifiableCredential {
}
export interface GenericCredWrapper<T extends GenericVerifiableCredential> {
"@context": string;
"@type": string;
claim: T;
claimType?: string;
handleId: string;
@@ -68,8 +67,6 @@ export interface GenericCredWrapper<T extends GenericVerifiableCredential> {
}
export const BLANK_GENERIC_SERVER_RECORD: GenericCredWrapper<GenericVerifiableCredential> =
{
"@context": SCHEMA_ORG_CONTEXT,
"@type": "",
claim: { "@type": "" },
handleId: "",
id: "",
@@ -223,11 +220,21 @@ export interface ImageRateLimits {
}
export interface VerifiableCredential {
exp?: number;
iat: number;
iss: string;
vc: {
"@context": string[];
type: string[];
credentialSubject: VerifiableCredentialSubject;
};
}
// similar to GenericVerifiableCredential... maybe replace that one
export interface VerifiableCredentialSubject {
"@context": string;
"@type": string;
name: string;
description: string;
identifier?: string;
[key: string]: any; // eslint-disable-line @typescript-eslint/no-explicit-any
}
export interface WorldProperties {
@@ -235,13 +242,14 @@ export interface WorldProperties {
endTime?: string;
}
// AKA Registration & RegisterAction
export interface RegisterVerifiableCredential {
"@context": string;
"@type": string;
"@context": typeof SCHEMA_ORG_CONTEXT;
"@type": "RegisterAction";
agent: { identifier: string };
identifier?: string;
identifier?: string; // used for invites (when participant ID isn't known)
object: string;
participant?: { identifier: string };
participant?: { identifier: string }; // used when person is known (not an invite)
}
// now for some of the error & other wrapper types

View File

@@ -314,7 +314,7 @@ export const generateSaveAndActivateIdentity = async (): Promise<string> => {
});
await updateDefaultSettings({ activeDid: newId.did });
console.log("Updated default settings in util");
//console.log("Updated default settings in util");
await updateAccountSettings(newId.did, { isRegistered: false });
return newId.did;