mirror of
https://github.com/oceanprotocol/ocean.js.git
synced 2024-11-26 20:39:05 +01:00
add file object types
This commit is contained in:
parent
66b8da15d0
commit
cd936c24a9
@ -70,11 +70,30 @@ export enum EncryptMethod {
|
|||||||
AES = 'AES',
|
AES = 'AES',
|
||||||
ECIES = 'ECIES'
|
ECIES = 'ECIES'
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface HeadersObject {
|
||||||
|
[key: string]: string
|
||||||
|
}
|
||||||
|
|
||||||
export interface BaseFileObject {
|
export interface BaseFileObject {
|
||||||
type: string
|
type: string
|
||||||
encryptedBy?: string
|
encryptedBy?: string
|
||||||
encryptMethod?: EncryptMethod
|
encryptMethod?: EncryptMethod
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export interface UrlFileObject extends BaseFileObject {
|
||||||
|
url: string
|
||||||
|
method: string
|
||||||
|
headers?: [HeadersObject]
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface IpfsFileObject extends BaseFileObject {
|
||||||
|
hash: string
|
||||||
|
}
|
||||||
|
|
||||||
|
export interface ArweaveFileObject extends BaseFileObject {
|
||||||
|
transactionId: string
|
||||||
|
}
|
||||||
export interface ComputeAsset {
|
export interface ComputeAsset {
|
||||||
fileObject?: BaseFileObject // C2D v2
|
fileObject?: BaseFileObject // C2D v2
|
||||||
documentId: string
|
documentId: string
|
||||||
|
Loading…
x
Reference in New Issue
Block a user