Skip to main content

FileData

Hierarchy

Index

Constructors

constructor

  • new FileData(value: { fileRoot: Field; fileType?: FileDataType; filename: string; height: number; metadata?: Field; mimeType: string; sha3_512: string; size: number; storage: string }): FileData
  • Parameters

    • value: { fileRoot: Field; fileType?: FileDataType; filename: string; height: number; metadata?: Field; mimeType: string; sha3_512: string; size: number; storage: string }

    Returns FileData

Properties

fileRoot

fileRoot: Field

optionalfileType

fileType?: FileDataType

filename

filename: string

height

height: number

optionalmetadata

metadata?: Field

mimeType

mimeType: string

root

root: Field

sha3_512

sha3_512: string

size

size: number

storage

storage: string

type

Methods

publicbuildTree

  • buildTree(): { fields: Field[]; tree: MerkleTree }
  • Returns { fields: Field[]; tree: MerkleTree }

    • fields: Field[]
    • tree: MerkleTree

publicproof

  • proof(verbose?: boolean): Promise<TreeStateProof>
  • Parameters

    • optionalverbose: boolean

    Returns Promise<TreeStateProof>

publictoJSON

  • toJSON(): object
  • Returns object

publicstaticfromJSON