Resource Domain
The commands for uploading and processing resource files.
Methods
Types
Methods
Resource.create #
Upload a file, and for ease of use, get a resource proof for it.
parameters
- content
-
string
The content you wish to upload.
Return Object
- resource
-
Proof
Proof that can be passed back to the server to reference this asset.
Types
Resource.FileHash #
A string representing hashed resource file content.
All hashes should be computed with SHA256 and prefixed with "sha256:" All hashes should be computed using the UTF8 encoding of their content. All hashes should be encoded as hex.
Type: string
Resource.Token #
An opaque salt value that can be used to create a Proof for a file.
This string should be prepended to the file's content when calculating the file's salted hash for the Proof.
Type: string