Skip to content

Commit

Permalink
extend VM with state info
Browse files Browse the repository at this point in the history
  • Loading branch information
volodymyr-basiuk committed Sep 27, 2024
1 parent 5b84ea7 commit 2249936
Show file tree
Hide file tree
Showing 3 changed files with 19 additions and 4 deletions.
2 changes: 1 addition & 1 deletion src/iden3comm/handlers/credential-proposal.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,7 @@ import {
BasicMessage,
CredentialOffer,
CredentialsOfferMessage,
DIDDocument,
IPackageManager,
JsonDocumentObject,
PackerParams
Expand All @@ -21,7 +22,6 @@ import { IIdentityWallet } from '../../identity';
import { byteEncoder } from '../../utils';
import { W3CCredential } from '../../verifiable';
import { AbstractMessageHandler, IProtocolMessageHandler } from './message-handler';
import { DIDDocument } from 'did-resolver';

/** @beta ProposalRequestCreationOptions represents proposal-request creation options */
export type ProposalRequestCreationOptions = {
Expand Down
18 changes: 17 additions & 1 deletion src/iden3comm/types/protocol/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ import { BasicMessage, JsonDocumentObject } from '../packer';
import { PROTOCOL_MESSAGE_TYPE } from '../../constants';
import { ProofType } from '../../../verifiable';
import { CircuitId } from '../../../circuits';
import { DIDDocument } from 'did-resolver';
import {
DIDDocument as DidResolverDidDocument,
VerificationMethod as DidResolverVerificationMethod
} from 'did-resolver';
import { RootInfo, StateInfo } from '../../../storage';

/** AuthorizationResponseMessage is struct the represents iden3message authorization response */
export type AuthorizationResponseMessage = BasicMessage & {
Expand Down Expand Up @@ -75,3 +79,15 @@ export type VerifiablePresentation = {
credentialSubject: JsonDocumentObject;
};
};

/** DIDDocument represents structure of DID Document */
export type DIDDocument = DidResolverDidDocument & {
verificationMethod?: VerificationMethod[];
};

/** VerificationMethod represents structure of Verification Method */
export type VerificationMethod = DidResolverVerificationMethod & {
published?: boolean;
info?: StateInfo;
global?: RootInfo;
};
3 changes: 1 addition & 2 deletions src/iden3comm/types/protocol/proposal-request.ts
Original file line number Diff line number Diff line change
@@ -1,5 +1,4 @@
import { DIDDocument } from 'did-resolver';
import { BasicMessage, JsonDocumentObject } from '../';
import { BasicMessage, DIDDocument, JsonDocumentObject } from '../';
import { PROTOCOL_MESSAGE_TYPE } from '../../constants';

/** @beta ProposalRequestMessage is struct the represents proposal-request message */
Expand Down

0 comments on commit 2249936

Please sign in to comment.