Pin
With the Pin() methods you can pin an IPFS hash on the Aleph Network. If you either prefer to upload the file by yourself refer to the Publish() methods.
Usage
Import the Store declaration to interact with the Publish function and the Item type to choose your storage location.
Then call the pinStore function, with the required parameters as follow:
Parameters
Parameter | Description |
---|---|
account - required Account | Account to use for signing. |
channel - required string | Channel of the message. Ideally, an application would decide and use one channel. |
fileHash - required string | The hash you want to Pin |
APIServer - optional string | The API server endpoint used to carry the request to Aleph's network. default: 'https://api2.aleph.im' |
Pin with the publish() method
You can also pin your hash by using the Publish method by sending the fileHash
parameter over the fileObject
one:
Warning
You can't pass the fileHash
and the fileObject
at the same time.
The hash resolution when you upload a file is made by the SDK.
Last updated