finish the loading of an invite RegisterAction when clicking on a link
This commit is contained in:
@@ -65,7 +65,7 @@ export async function createEndorserJwtForKey(
|
||||
issuer: account.did,
|
||||
signer: signer,
|
||||
expiresIn: undefined as number | undefined,
|
||||
}
|
||||
};
|
||||
if (expiresIn) {
|
||||
options.expiresIn = expiresIn;
|
||||
}
|
||||
|
||||
@@ -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
|
||||
|
||||
@@ -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;
|
||||
|
||||
Reference in New Issue
Block a user