Skip to main content
Version: 3.0.1

Publish Name

Publish Name

IPNS Publish Name publishes (or republishes) an IPNS name through a pinning service. This function requires inputs as follows:

  • Ipfs Address 1 : Struct, holds the CID and path of the file on IPFS network.
  • Private Key PEM 2 : Byte array, the private key used to sign the record in PEM encoding.
  • Ipns Service 3 : Enum, the pinning service used to publish the record.

There's also additional inputs that can be left empty, but offer additional control over the name:

  • Password 4 : UTF-8 String, pass-phrase used to decrypt the private key (should stay empty if the key is not encrypted).
  • Lifetime 5 : Timespan, the length of time for which the record will be valid without additional republishing. By default, this value is set to 1 year (365 days).
  • Ttl 6 : uint64, this is a DNS-related term better explained here. The default value is 300 (5 minutes).
  • Request Name 7 : Name, a unique identifier for the plugin's HTTP subsystem. It allows to fetch the request by name. This is purely optional and only changes how the HTTP request will be managed internally by the plugin.

IPNS Publish Name

The returned Response is a struct that holds data such as headers, status code, and body of the response of the HTTP request.

info

If Success is True that only means that the response from the IPFS network was successful only.

If successful, returns the request structure 8 containing the record field values and the IPNS name.