Skip to content

Commit

Permalink
resolve comments
Browse files Browse the repository at this point in the history
  • Loading branch information
volodymyr-basiuk committed Nov 28, 2024
1 parent 1f6c819 commit 370ee39
Show file tree
Hide file tree
Showing 3 changed files with 6 additions and 12 deletions.
4 changes: 2 additions & 2 deletions src/iden3comm/types/protocol/auth.ts
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ import {
DIDDocument as DidResolverDidDocument,
VerificationMethod as DidResolverVerificationMethod
} from 'did-resolver';
import { RootInfoWithProof, StateInfo } from '../../../storage';
import { RootInfo, StateInfo } from '../../../storage';

/** AuthorizationResponseMessage is struct the represents iden3message authorization response */
export type AuthorizationResponseMessage = BasicMessage & {
Expand Down Expand Up @@ -89,5 +89,5 @@ export type DIDDocument = DidResolverDidDocument & {
export type VerificationMethod = DidResolverVerificationMethod & {
published?: boolean;
info?: StateInfo;
global?: RootInfoWithProof;
global?: RootInfo;
};
3 changes: 3 additions & 0 deletions src/storage/blockchain/did-resolver-readonly-storage.ts
Original file line number Diff line number Diff line change
Expand Up @@ -31,6 +31,9 @@ export class DidResolverStateReadonlyStorage implements IStateStorage {
throw new Error('GIST root not found');
}
const { proof } = global;
if (!proof) {
throw new Error('GIST proof not found');
}
return {
root: global.root,
existence: proof.existence,
Expand Down
11 changes: 1 addition & 10 deletions src/storage/entities/state.ts
Original file line number Diff line number Diff line change
Expand Up @@ -45,16 +45,7 @@ export interface RootInfo {
replacedAtTimestamp: bigint;
createdAtBlock: bigint;
replacedAtBlock: bigint;
}

/**
* global identity state root info from DID resolver document
*
* @public
* @interface RootInfoWithProof
*/
export interface RootInfoWithProof extends RootInfo {
proof: ProofJSON;
proof?: ProofJSON;
}

/**
Expand Down

0 comments on commit 370ee39

Please sign in to comment.