From 61d4395287414e0b7dc1ea59f946c83a3873cdef Mon Sep 17 00:00:00 2001 From: Zdravko Iliev <zdravko.iliev61@gmail.com> Date: Wed, 29 Jun 2022 14:24:28 +0300 Subject: [PATCH] change interface for ipns support --- __tests__/QrCodeDataService.test.ts | 2 +- dist/types.d.ts | 7 ++++++- src/types.ts | 8 +++++++- 3 files changed, 14 insertions(+), 3 deletions(-) diff --git a/__tests__/QrCodeDataService.test.ts b/__tests__/QrCodeDataService.test.ts index bfef66f..365183d 100644 --- a/__tests__/QrCodeDataService.test.ts +++ b/__tests__/QrCodeDataService.test.ts @@ -5,7 +5,7 @@ import Utils, { base64ToArrayBuffer, arrayBufferToBase64, } from "../src/utils/common"; -import { MessageData, DocumentData, IpfsContentData } from "../src"; +import { MessageData, DocumentData } from "../src"; const emailData: MessageData = { sender: { diff --git a/dist/types.d.ts b/dist/types.d.ts index dcb3e8d..ca96459 100644 --- a/dist/types.d.ts +++ b/dist/types.d.ts @@ -16,6 +16,11 @@ export interface IpfsContentData { key: string; head: string; } +export interface IpfsDocumentContentData { + ipnsKeyId: string; + key: string; + head: string; +} export interface IpfsAttachmentData { cid: string; key: string; @@ -172,7 +177,7 @@ export interface DocumentData { documentPages: number; expired?: boolean; signatures?: Array<ISignature>; - ipfs?: IpfsContentData; + ipfs?: IpfsDocumentContentData; } export interface DocumentStatusObject { timestamp: number; diff --git a/src/types.ts b/src/types.ts index b5a7e60..cbef052 100644 --- a/src/types.ts +++ b/src/types.ts @@ -20,6 +20,12 @@ export interface IpfsContentData { head: string; } +export interface IpfsDocumentContentData { + ipnsKeyId: string; + key: string; + head: string; +} + export interface IpfsAttachmentData { cid: string; key: string; @@ -192,7 +198,7 @@ export interface DocumentData { documentPages: number; expired?: boolean; signatures?: Array<ISignature>; - ipfs?: IpfsContentData; + ipfs?: IpfsDocumentContentData; } export interface DocumentStatusObject { -- GitLab