diff --git a/src/@types/FileInfo.ts b/src/@types/FileInfo.ts index 6b88d74c..5c591c1a 100644 --- a/src/@types/FileInfo.ts +++ b/src/@types/FileInfo.ts @@ -36,6 +36,12 @@ export interface FileInfo { */ method?: string + /** + * Computed file checksum + * @type {string} + */ + checksum?: string + /** * check if file exists * @type {boolean} diff --git a/src/provider/Provider.ts b/src/provider/Provider.ts index 1b67bc9f..aa47a2c5 100644 --- a/src/provider/Provider.ts +++ b/src/provider/Provider.ts @@ -168,8 +168,9 @@ export class Provider { */ public async checkDidFiles( did: string, - serviceId: number, + serviceId: string, providerUri: string, + withChecksum: boolean = false, signal?: AbortSignal ): Promise { const providerEndpoints = await this.getEndpoints(providerUri) @@ -177,7 +178,7 @@ export class Provider { providerUri, providerEndpoints ) - const args = { did: did, serviceId: serviceId } + const args = { did: did, serviceId: serviceId, checksum: withChecksum } const files: FileInfo[] = [] const path = this.getEndpointURL(serviceEndpoints, 'fileinfo') ? this.getEndpointURL(serviceEndpoints, 'fileinfo').urlPath