View Source MyspaceIPFS.Name (Myspace IPFS v0.2.0-alpha.2)

MyspaceIPFS.Name is where the name commands of the IPFS API reside.

Link to this section Summary

Functions

Publish IPNS names.

Cancel a subscription to a topic.

Show the current pubsub state.

Show the current pubsub subscribers.

Resolve IPNS names.

Link to this section Functions

Link to this function

publish(path, opts \\ [])

View Source
@spec publish(Path.t(), list()) :: {:ok, any()} | MyspaceIPFS.Api.error_response()

Publish IPNS names.

parameters

Parameters

path - Path to be published.

options

Options

https://docs.ipfs.io/reference/http/api/#api-v0-name-publish

[
  resolve: <bool>, # Resolve given path before publishing.
  lifetime: <string>, # Time duration that the record will be valid for.
  allow-offline: <bool>, # Run offline.
  ttl: <string>, # Time duration this record should be cached for (caution: experimental).
  key: <string>, # Name of the key to be used or a valid PeerID, as listed by 'ipfs key list -l'.
  quieter: <bool>, # Write minimal output.
  ipns-base: <string>, # IPNS key base.
]
@spec pubsub_cancel(binary()) :: {:ok, any()} | MyspaceIPFS.Api.error_response()

Cancel a subscription to a topic.

parameters

Parameters

https://docs.ipfs.io/reference/http/api/#api-v0-pubsub-cancel topic - The topic to cancel the subscription to.

@spec pubsub_state() :: {:ok, any()} | MyspaceIPFS.Api.error_response()

Show the current pubsub state.

@spec pubsub_subs() :: {:ok, any()} | MyspaceIPFS.Api.error_response()

Show the current pubsub subscribers.

Link to this function

resolve(path, opts \\ [])

View Source
@spec resolve(Path.t(), list()) :: {:ok, any()} | MyspaceIPFS.Api.error_response()

Resolve IPNS names.

parameters

Parameters

name - IPNS name to resolve.

options

Options

https://docs.ipfs.io/reference/http/api/#api-v0-name-resolve

[
  recursive: <bool>, # Resolve until the result is not an IPNS name.
  nocache: <bool>, # Do not use cached entries.
  dht-record-count: <int>, # Number of records to request for DHT resolution.
  dht-timeout: <string>, # Maximum time to collect values during DHT resolution eg "30s".
  stream: <bool>, # Stream the output as a continuous series of JSON values.
]