mirror of
https://github.com/oceanprotocol/ocean.js.git
synced 2024-11-26 20:39:05 +01:00
add checksum param when fetching fileinfo and checksum aatribute to fileinfo interface
This commit is contained in:
parent
869ef38fc3
commit
00f776d540
@ -36,6 +36,12 @@ export interface FileInfo {
|
||||
*/
|
||||
method?: string
|
||||
|
||||
/**
|
||||
* Computed file checksum
|
||||
* @type {string}
|
||||
*/
|
||||
checksum?: string
|
||||
|
||||
/**
|
||||
* check if file exists
|
||||
* @type {boolean}
|
||||
|
@ -168,8 +168,9 @@ export class Provider {
|
||||
*/
|
||||
public async checkDidFiles(
|
||||
did: string,
|
||||
serviceId: number,
|
||||
serviceId: string,
|
||||
providerUri: string,
|
||||
withChecksum: boolean = false,
|
||||
signal?: AbortSignal
|
||||
): Promise<FileInfo[]> {
|
||||
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
|
||||
|
Loading…
x
Reference in New Issue
Block a user