The cl-ipfs-api2 Reference Manual

This is the cl-ipfs-api2 Reference Manual, version 0.51, generated automatically by Declt version 4.0 beta 2 "William Riker" on Sun Sep 15 04:06:34 2024 GMT+0.

Table of Contents


1 Introduction


2 Systems

The main system appears first, followed by any subsystem dependency.


2.1 cl-ipfs-api2

Bindings for the IPFS HTTP API.

Author

Jaidyn Ann <>

License

LGPLv3

Version

0.51

Dependencies
  • drakma (system).
  • yason (system).
  • arnesi (system).
  • uiop (system).
Source

cl-ipfs-api2.asd.

Child Components

3 Files

Files are sorted by type and then listed depth-first from the systems components trees.


3.1 Lisp


3.1.1 cl-ipfs-api2/cl-ipfs-api2.asd

Source

cl-ipfs-api2.asd.

Parent Component

cl-ipfs-api2 (system).

ASDF Systems

cl-ipfs-api2.


3.1.2 cl-ipfs-api2/package.lisp

Source

cl-ipfs-api2.asd.

Parent Component

cl-ipfs-api2 (system).

Packages

cl-ipfs-api2.


3.1.3 cl-ipfs-api2/main.lisp

Source

cl-ipfs-api2.asd.

Parent Component

cl-ipfs-api2 (system).

Public Interface
Internals

4 Packages

Packages are listed by definition order.


4.1 cl-ipfs-api2

Source

package.lisp.

Nicknames
  • cl-ipfs
  • ipfs
Use List
  • common-lisp.
  • it.bese.arnesi.
Public Interface
Internals

5 Definitions

Definitions are sorted by export status, category, package, and then by lexicographic order.


5.1 Public Interface


5.1.1 Special variables

Special Variable: *api-host*
Package

cl-ipfs-api2.

Source

main.lisp.

Special Variable: *api-root*
Package

cl-ipfs-api2.

Source

main.lisp.

Special Variable: *ipfs-root*
Package

cl-ipfs-api2.

Source

main.lisp.


5.1.2 Macros

Macro: with-files-write ((stream dest-path &rest params) &body body)

A convenience macro for files-write. In the body of the macro, any writes to the stream named by STREAM will be sent to the mfs file at DEST-PATH. PARAMS will be passed directly to the files-write function.

Package

cl-ipfs-api2.

Source

main.lisp.


5.1.3 Ordinary functions

Function: add (pathname &key pin only-hash cid-version)

Add a file to IPFS, return it’s hash. /ipns/docs.ipfs.io/reference/api/http/#api-v0-add

Package

cl-ipfs-api2.

Source

main.lisp.

Function: bitswap-ledger (peer-id)

Show the current ledger for a peer. /ipns/docs.ipfs.io/reference/api/http/#api-v0-bitswap-ledger

Package

cl-ipfs-api2.

Source

main.lisp.

Function: bitswap-reprovide ()

Trigger the reprovider. /ipns/docs.ipfs.io/reference/api/http/#api-v0-bitswap-reprovide

Package

cl-ipfs-api2.

Source

main.lisp.

Function: bitswap-stat ()

Show diagnostic info on the bitswap agent. /ipns/docs.ipfs.io/reference/api/http/#api-v0-bitswap-stat

Package

cl-ipfs-api2.

Source

main.lisp.

Function: bitswap-wantlist (&optional peer-id)

Show blocks currently on the wantlist. /ipns/docs.ipfs.io/reference/api/http/#api-v0-bitswap-wantlist

Package

cl-ipfs-api2.

Source

main.lisp.

Function: block-get (hash)

Get a raw IPFS block. /ipns/docs.ipfs.io/reference/api/http/#api-v0-block-get

Package

cl-ipfs-api2.

Source

main.lisp.

Function: block-put (pathname &key format mhtype mhlen pin)

Store input as an IPFS block. /ipns/docs.ipfs.io/reference/api/http/#api-v0-block-put

Package

cl-ipfs-api2.

Source

main.lisp.

Function: block-rm (hash &key force)

Delete an IPFS block(s). /ipns/docs.ipfs.io/reference/api/http/#api-v0-block-rm

Package

cl-ipfs-api2.

Source

main.lisp.

Function: block-stat (hash)

Print info about a raw IPFS block /ipns/docs.ipfs.io/reference/api/http/#api-v0-block-stat

Package

cl-ipfs-api2.

Source

main.lisp.

Function: bootstrap ()

Return a list of bootstrap peers /ipns/docs.ipfs.io/reference/api/http/#api-v0-bootstrap

Package

cl-ipfs-api2.

Source

main.lisp.

Function: bootstrap-add (peer)

Add a peer to the bootstrap list /ipns/docs.ipfs.io/reference/api/http/#api-v0-bootstrap-add

Package

cl-ipfs-api2.

Source

main.lisp.

Function: bootstrap-add-default ()

Add default peers to the bootstrap list /ipns/docs.ipfs.io/reference/api/http/#api-v0-bootstrap-add-default

Package

cl-ipfs-api2.

Source

main.lisp.

Function: bootstrap-list ()

Return a list of bootstrap peers /ipns/docs.ipfs.io/reference/api/http/#api-v0-bootstrap-list

Package

cl-ipfs-api2.

Source

main.lisp.

Function: bootstrap-rm (peer)

Remove a peer from the bootstrap list /ipns/docs.ipfs.io/reference/api/http/#api-v0-bootstrap-rm

Package

cl-ipfs-api2.

Source

main.lisp.

Function: bootstrap-rm-all ()

Remove a peer from the bootstrap list /ipns/docs.ipfs.io/reference/api/http/#api-v0-bootstrap-rm

Package

cl-ipfs-api2.

Source

main.lisp.

Function: cat (ipfs-path &key offset length)

Return a string of the data at the given IPFS path. /ipns/docs.ipfs.io/reference/api/http/#api-v0-cat

Package

cl-ipfs-api2.

Source

main.lisp.

Function: cid-base32 (cid)

Convert a CID into Base32 CIDv1 /ipns/docs.ipfs.io/reference/api/http/#api-v0-cid-base32

Package

cl-ipfs-api2.

Source

main.lisp.

Function: cid-bases ()

Return a associative list of available bases in plist format; each base’s name is a assigned a given code-number.
((CODE-A . NAME-A) (CODE-B . NAME-B) … (CODE-N . NAME-N)) /ipns/docs.ipfs.io/reference/api/http/#api-v0-cid-bases

Package

cl-ipfs-api2.

Source

main.lisp.

Function: config (key &key value bool json)

Get/set a config key’s value. /ipns/docs.ipfs.io/reference/api/http/#api-v0-config

Package

cl-ipfs-api2.

Source

main.lisp.

Function: config-show ()

Return the config file’s contents, in alist-format… y’know, with several sub-alists.
Doesn’t quite line up with #api-v0-config-show /ipns/docs.ipfs.io/reference/api/http/#api-v0-config-show

Package

cl-ipfs-api2.

Source

main.lisp.

Function: dag-get (dag-node)

Get a dag node from IPFS. /ipns/docs.ipfs.io/reference/api/http/#api-v0-dag-get

Package

cl-ipfs-api2.

Source

main.lisp.

Function: dag-put (dag-node &key format input-enc pin)

Add a dag node to IPFS. Returns CID string. /ipns/docs.ipfs.io/reference/api/http/#api-v0-dag-put

Package

cl-ipfs-api2.

Source

main.lisp.

Function: dag-resolve (path)

Resolve an IPLD block. /ipns/docs.ipfs.io/reference/api/http/#api-v0-dag-resolve

Package

cl-ipfs-api2.

Source

main.lisp.

Function: dht-findpeer (peer-id)

Find the multiaddresses associated with a peer ID. /ipns/docs.ipfs.io/reference/api/http/#api-v0-dht-findpeer

Package

cl-ipfs-api2.

Source

main.lisp.

Function: dht-findprovs (key &key provider-quantity)

Find peers that can provide a specific value, given a key. /ipns/docs.ipfs.io/reference/api/http/#api-v0-dht-findprovs

Package

cl-ipfs-api2.

Source

main.lisp.

Function: dht-get (key)

Query the routing system for a key’s best value. /ipns/docs.ipfs.io/reference/api/http/#api-v0-dht-get

Package

cl-ipfs-api2.

Source

main.lisp.

Function: dht-provide (key &key recursive)

Announce to the network that you’re providing the given values. /ipns/docs.ipfs.io/reference/api/http/#api-v0-dht-provide

Package

cl-ipfs-api2.

Source

main.lisp.

Function: dht-put (key value)

Write a key-value pair to the routing system. /ipns/docs.ipfs.io/reference/api/http/#api-v0-dht-put

Package

cl-ipfs-api2.

Source

main.lisp.

Function: dht-query (peer-id)

Find the closest peer IDs to the given one by querying the DHT. /ipns/docs.ipfs.io/reference/api/http/#api-v0-dht-query

Package

cl-ipfs-api2.

Source

main.lisp.

Function: diag-cmds ()

List commands run on this IPFS node. /ipns/docs.ipfs.io/reference/api/http/#api-v0-diag-cmds

Package

cl-ipfs-api2.

Source

main.lisp.

Function: diag-cmds-clear ()

Clear inactive requests from the log. /ipns/docs.ipfs.io/reference/api/http/#api-v0-diag-cmds-clear

Package

cl-ipfs-api2.

Source

main.lisp.

Function: diag-cmds-set-time (time)

Set how long to keep inactive requests in the log. /ipns/docs.ipfs.io/reference/api/http/#api-v0-diag-cmds-set-time

Package

cl-ipfs-api2.

Source

main.lisp.

Function: diag-sys ()

Print system diagnostic info. /ipns/docs.ipfs.io/reference/api/http/#api-v0-diag-sys

Package

cl-ipfs-api2.

Source

main.lisp.

Function: dl (ipfs-path out-file)

Write an IPFS file directly to a file on the local file-system. Non-recursive, in the case of directories… for now.
(Thanks to this thread ♥: https://stackoverflow.com/a/12607423)
Is a general replacement for the ’get’ API call, but actually just uses the ’cat’ call, due to some issues with using ’get’.
Will not actually return NIL when an error is reached (like other functions) with an error-message, it’lll just write the error JSON to the file. Whoops.

Package

cl-ipfs-api2.

Source

main.lisp.

Function: dns (domain &key recursive)

Resolve a domain into a path (usually /ipfs/). /ipns/docs.ipfs.io/reference/api/http/#api-v0-dns

Package

cl-ipfs-api2.

Source

main.lisp.

Function: file-ls (path)

List directory contents for UNIX filesystem objects. /ipns/docs.ipfs.io/reference/api/http/#api-v0-file-ls

Package

cl-ipfs-api2.

Source

main.lisp.

Function: files-chcid (path &key cid-version hash)

Change the cid version or hash function of the root node of a given path. /ipns/docs.ipfs.io/reference/api/http/#api-v0-files-chcid

Package

cl-ipfs-api2.

Source

main.lisp.

Function: files-cp (source destination)

Copy files into mfs. /ipns/docs.ipfs.io/reference/api/http/#api-v0-files-cp

Package

cl-ipfs-api2.

Source

main.lisp.

Function: files-flush (&optional path)

Flush a given path’s data to disk. Returns CID. /ipns/docs.ipfs.io/reference/api/http/#api-v0-files-flush

Package

cl-ipfs-api2.

Source

main.lisp.

Function: files-ls (&optional path)

List directories in local mutable namespace. /ipns/docs.ipfs.io/reference/api/http/#api-v0-files-ls

Package

cl-ipfs-api2.

Source

main.lisp.

Function: files-mkdir (path &key parents cid-version hash)

Make a directory. /ipns/docs.ipfs.io/reference/api/http/#api-v0-files-mkdir

Package

cl-ipfs-api2.

Source

main.lisp.

Function: files-mv (source destination)

Move a file. /ipns/docs.ipfs.io/reference/api/http/#api-v0-files-mv

Package

cl-ipfs-api2.

Source

main.lisp.

Function: files-read (path &key offset max)

Read a file in given mfs. /ipns/docs.ipfs.io/reference/api/http/#api-v0-files-read

Package

cl-ipfs-api2.

Source

main.lisp.

Function: files-rm (path &key recursive force)

Remove a given file. /ipns/docs.ipfs.io/reference/api/http/#api-v0-files-rm

Package

cl-ipfs-api2.

Source

main.lisp.

Function: files-stat (path)

Remove a given file. /ipns/docs.ipfs.io/reference/api/http/#api-v0-files-rm

Package

cl-ipfs-api2.

Source

main.lisp.

Function: files-write (path-or-string dest-path &key offset create parents truncate count raw-leaves cid-version hash)

Write to a given file. First parameter can be a string or a path to a local file. /ipns/docs.ipfs.io/reference/api/http/#api-v0-files-rm

Package

cl-ipfs-api2.

Source

main.lisp.

Function: filestore-dups ()

List blocks that’re both in the filestore and standard block storage. /ipns/docs.ipfs.io/reference/api/http/#api-v0-filestore-dups

Package

cl-ipfs-api2.

Source

main.lisp.

Function: filestore-ls (&optional cid)

List objects in filestore. /ipns/docs.ipfs.io/reference/api/http/#api-v0-filestore-ls

Package

cl-ipfs-api2.

Source

main.lisp.

Function: filestore-verify (&optional cid)

Verify objects in filestore. /ipns/docs.ipfs.io/reference/api/http/#api-v0-filestore-verify

Package

cl-ipfs-api2.

Source

main.lisp.

Function: id (&optional peer-id)

Return info on a node by ID. Returns as an associative list, the public key, agent version, etc. If no node ID is specified, then your own is assumed. /ipns/docs.ipfs.io/reference/api/http/#api-v0-id

Package

cl-ipfs-api2.

Source

main.lisp.

Function: key-gen (name &key type size)

Create a new keypair. /ipns/docs.ipfs.io/reference/api/http/#api-v0-key-gen

Package

cl-ipfs-api2.

Source

main.lisp.

Function: key-list ()

List all local keypairs. /ipns/docs.ipfs.io/reference/api/http/#api-v0-key-list

Package

cl-ipfs-api2.

Source

main.lisp.

Function: key-remove (name)

Remove a keypair, based on name. /ipns/docs.ipfs.io/reference/api/http/#api-v0-key-remove

Package

cl-ipfs-api2.

Source

main.lisp.

Function: key-rename (old-name new-name &key force)

Rename a local keypair. /ipns/docs.ipfs.io/reference/api/http/#api-v0-key-rename

Package

cl-ipfs-api2.

Source

main.lisp.

Function: log-level (subsystem level)

Change the logging level of a subsystem. /ipns/docs.ipfs.io/reference/api/http/#api-v0-log-level

Package

cl-ipfs-api2.

Source

main.lisp.

Function: log-ls ()

List the logging subsystems. /ipns/docs.ipfs.io/reference/api/http/#api-v0-log-ls

Package

cl-ipfs-api2.

Source

main.lisp.

Function: log-tail ()

Read the event log. /ipns/docs.ipfs.io/reference/api/http/#api-v0-log-tail

Package

cl-ipfs-api2.

Source

main.lisp.

Function: ls (ipfs-path &key resolve-type size)

Returns all sub-objects (IPFS hashes) under a given IPFS/IPNS directory path. Returns as an associative list. /ipns/docs.ipfs.io/reference/api/http/#api-v0-ls

Package

cl-ipfs-api2.

Source

main.lisp.

Function: name-publish (ipfs-path &key resolve lifetime allow-offline ttl)

Publish an IPNS name– associate it with an IPFS path. /ipns/docs.ipfs.io/reference/api/http/#api-v0-name-publish

Package

cl-ipfs-api2.

Source

main.lisp.

Function: name-pubsub-cancel (name)

Cancel subscription to a name. /ipns/docs.ipfs.io/reference/api/http/#api-v0-name-pubsub-cancel

Package

cl-ipfs-api2.

Source

main.lisp.

Function: name-pubsub-state ()

Query the state of IPNS pubsub. /ipns/docs.ipfs.io/reference/api/http/#api-v0-name-pubsub-state

Package

cl-ipfs-api2.

Source

main.lisp.

Function: name-pubsub-subs ()

Show current name subscriptions. /ipns/docs.ipfs.io/reference/api/http/#api-v0-name-pubsub-subs

Package

cl-ipfs-api2.

Source

main.lisp.

Function: name-resolve (name &key recursive nocache dht-record-count dht-timeout)

Resolve a given IPNS name. /ipns/docs.ipfs.io/reference/api/http/#api-v0-name-resolve

Package

cl-ipfs-api2.

Source

main.lisp.

Function: object-data (key)

Output the raw data of an IPFS object. /ipns/docs.ipfs.io/reference/api/http/#api-v0-object-data

Package

cl-ipfs-api2.

Source

main.lisp.

Function: object-diff (object-a object-b)

Display the differences between two IPFS objects. /ipns/docs.ipfs.io/reference/api/http/#api-v0-object-diff

Package

cl-ipfs-api2.

Source

main.lisp.

Function: object-get (key &key data-encoding)

Get and serialize the named DAG node. /ipns/docs.ipfs.io/reference/api/http/#api-v0-object-get

Package

cl-ipfs-api2.

Source

main.lisp.

Output the links pointed to by the specified object. /ipns/docs.ipfs.io/reference/api/http/#api-v0-object-links

Package

cl-ipfs-api2.

Source

main.lisp.

Function: object-new (&key template)

Create a new object from an IPFS template. /ipns/docs.ipfs.io/reference/api/http/#api-v0-object-new

Package

cl-ipfs-api2.

Source

main.lisp.

Add a link to a given object. /ipns/docs.ipfs.io/reference/api/http/#api-v0-object-patch-add-link

Package

cl-ipfs-api2.

Source

main.lisp.

Remove a link from a given object. /ipns/docs.ipfs.io/reference/api/http/#api-v0-object-patch-rm-link

Package

cl-ipfs-api2.

Source

main.lisp.

Function: object-stat (key)

Get stats for a DAG node. /ipns/docs.ipfs.io/reference/api/http/#api-v0-object-stat

Package

cl-ipfs-api2.

Source

main.lisp.

Function: p2p-close (&key all protocol listen-address target-address)

Stop listening for new connections to forward. /ipns/docs.ipfs.io/reference/api/http/#api-v0-p2p-close

Package

cl-ipfs-api2.

Source

main.lisp.

Function: p2p-listen (protocol target-endpoint &key allow-custom-protocol report-peer-id)

Create libp2p service. /ipns/docs.ipfs.io/reference/api/http/#api-v0-p2p-listen

Package

cl-ipfs-api2.

Source

main.lisp.

Function: p2p-ls ()

List active p2p listeners. /ipns/docs.ipfs.io/reference/api/http/#api-v0-p2p-ls

Package

cl-ipfs-api2.

Source

main.lisp.

Function: p2p-stream-close (&key identifier all)

Close an active p2p stream. /ipns/docs.ipfs.io/reference/api/http/#api-v0-p2p-stream-close

Package

cl-ipfs-api2.

Source

main.lisp.

Function: p2p-stream-ls ()

List active p2p streams. /ipns/docs.ipfs.io/reference/api/http/#api-v0-p2p-stream-ls

Package

cl-ipfs-api2.

Source

main.lisp.

Function: pin-add (path &key recursive)

Pin an object to local storage. /ipns/docs.ipfs.io/reference/api/http/#api-v0-pin-add

Package

cl-ipfs-api2.

Source

main.lisp.

Function: pin-ls (&key path type)

List objects pinned to local storage. /ipns/docs.ipfs.io/reference/api/http/#api-v0-pin-ls

Package

cl-ipfs-api2.

Source

main.lisp.

Function: pin-rm (path &key recursive)

Remove pinned objects from local storage. /ipns/docs.ipfs.io/reference/api/http/#api-v0-pin-rm

Package

cl-ipfs-api2.

Source

main.lisp.

Function: pin-update (old-path new-path &key unpin)

Update a recursive pin. /ipns/docs.ipfs.io/reference/api/http/#api-v0-pin-update

Package

cl-ipfs-api2.

Source

main.lisp.

Function: pin-verify ()

Verify that recursive pins are complete. /ipns/docs.ipfs.io/reference/api/http/#api-v0-pin-verify

Package

cl-ipfs-api2.

Source

main.lisp.

Function: pubsub-ls ()

Return a list of subscribed topics. /ipns/docs.ipfs.io/reference/api/http/#api-v0-pubsub-ls

Package

cl-ipfs-api2.

Source

main.lisp.

Function: pubsub-peers (&optional topic)

Return a list of peers with pubsub enabled. /ipns/docs.ipfs.io/reference/api/http/#api-v0-pubsub-peers

Package

cl-ipfs-api2.

Source

main.lisp.

Function: pubsub-pub (topic string &key env)

Publish a string to a given pubsub topic. /ipns/docs.ipfs.io/reference/api/http/#api-v0-pubsub-pub

Package

cl-ipfs-api2.

Source

main.lisp.

Function: pubsub-sub (topic &key env)

Subscribe to a given pubsub topic— this function requires go-ipfs to be installed on the current machine, and that ‘ipfs‘ is in the current $PATH. This probably will only work on *nix systems (sorry Windows nerds). Returns a uiop/launch-program::process-info socket– can be used in conjunction with the #’pubsub-sub-* functions, or with :uiop/launch-program’s functions.
A system-dependent replacement for /ipns/docs.ipfs.io/reference/api/http/#api-v0-pubsub-sub

Package

cl-ipfs-api2.

Source

main.lisp.

Function: pubsub-sub-close (pubsub-socket)

Close a ’pubsub stream’ (process-info-stream) and related processes.

Package

cl-ipfs-api2.

Source

main.lisp.

Function: pubsub-sub-listen (pubsub-socket)

Process a ’pubsub stream’ (process-info-stream) and #’listen it.

Package

cl-ipfs-api2.

Source

main.lisp.

Function: pubsub-sub-process (pubsub-socket)

Turn a uiop process-info-stream (’pubsub stream’) into a fd-stream that is #’read-char-able, etc.

Package

cl-ipfs-api2.

Source

main.lisp.

Function: pubsub-sub-read-char (pubsub-socket)

Process a ’pubsub stream’ (process-info-stream) and #’readchar it.

Package

cl-ipfs-api2.

Source

main.lisp.

Function: refs (path &key unique recursive max-depth)

List links (references) from an object. /ipns/docs.ipfs.io/reference/api/http/#api-v0-refs

Package

cl-ipfs-api2.

Source

main.lisp.

Function: refs-local ()

List all local references. /ipns/docs.ipfs.io/reference/api/http/#api-v0-refs-local

Package

cl-ipfs-api2.

Source

main.lisp.

Function: repo-fsck ()

Remove repo lock-files. /ipns/docs.ipfs.io/reference/api/http/#api-v0-repo-fsck

Package

cl-ipfs-api2.

Source

main.lisp.

Function: repo-gc ()

Perform garbage collection on the repo. /ipns/docs.ipfs.io/reference/api/http/#api-v0-repo-gc

Package

cl-ipfs-api2.

Source

main.lisp.

Function: repo-stat ()

Get stats for the current repo. /ipns/docs.ipfs.io/reference/api/http/#api-v0-repo-stat

Package

cl-ipfs-api2.

Source

main.lisp.

Function: repo-verify ()

Verify that all repo blocks aren’t corrupted. /ipns/docs.ipfs.io/reference/api/http/#api-v0-repo-verify

Package

cl-ipfs-api2.

Source

main.lisp.

Function: repo-version ()

Show the repo version. /ipns/docs.ipfs.io/reference/api/http/#api-v0-repo-version

Package

cl-ipfs-api2.

Source

main.lisp.

Function: resolve (ipfs-path &key recursive dht-record-count dht-timeout)

Resolve a given name to an IPFS path.

Package

cl-ipfs-api2.

Source

main.lisp.

Function: shutdown ()

Shut down the connected IPFS node. /ipns/docs.ipfs.io/reference/api/http/#api-v0-shutdown

Package

cl-ipfs-api2.

Source

main.lisp.

Function: stats-bitswap ()

Show diagnostics on bitswap. /ipns/docs.ipfs.io/reference/api/http/#api-v0-stats-bitswap

Package

cl-ipfs-api2.

Source

main.lisp.

Function: stats-bw (&key peer proto interval)

Return bandwidth information. /ipns/docs.ipfs.io/reference/api/http/#api-v0-stats-bw

Package

cl-ipfs-api2.

Source

main.lisp.

Function: stats-repo ()

Show diagnostics on current repo. /ipns/docs.ipfs.io/reference/api/http/#api-v0-stats-repo

Package

cl-ipfs-api2.

Source

main.lisp.

Function: swarm-addrs ()

List known addresses. /ipns/docs.ipfs.io/reference/api/http/#api-v0-swarm-addrs

Package

cl-ipfs-api2.

Source

main.lisp.

Function: swarm-addrs-listen ()

List interface listening addresses. /ipns/docs.ipfs.io/reference/api/http/#api-v0-swarm-addrs-listen

Package

cl-ipfs-api2.

Source

main.lisp.

Function: swarm-addrs-local ()

List local addresses. /ipns/docs.ipfs.io/reference/api/http/#api-v0-swarm-addrs-local

Package

cl-ipfs-api2.

Source

main.lisp.

Function: swarm-connect (address)

Open connection to a given address. /ipns/docs.ipfs.io/reference/api/http/#api-v0-swarm-connect

Package

cl-ipfs-api2.

Source

main.lisp.

Function: swarm-disconnect (address)

Close connection to a given address. /ipns/docs.ipfs.io/reference/api/http/#api-v0-swarm-disconnect

Package

cl-ipfs-api2.

Source

main.lisp.

Function: swarm-filters ()

List address filters. /ipns/docs.ipfs.io/reference/api/http/#api-v0-swarm-filters

Package

cl-ipfs-api2.

Source

main.lisp.

Function: swarm-filters-add (multiaddr)

Add an address filter. /ipns/docs.ipfs.io/reference/api/http/#api-v0-swarm-filters-add

Package

cl-ipfs-api2.

Source

main.lisp.

Function: swarm-filters-rm (multiaddr)

Remove an address filter. /ipns/docs.ipfs.io/reference/api/http/#api-v0-swarm-filters-rm

Package

cl-ipfs-api2.

Source

main.lisp.

Function: swarm-peers ()

List peers with open connections. /ipns/docs.ipfs.io/reference/api/http/#api-v0-swarm-peers

Package

cl-ipfs-api2.

Source

main.lisp.

Function: urlstore-add (url &key pin trickle)

Add a URL via urlstore. /ipns/docs.ipfs.io/reference/api/http/#api-v0-urlstore-add

Package

cl-ipfs-api2.

Source

main.lisp.

Function: version ()

Return the current golang, system, repo, and IPFS versions. /ipns/docs.ipfs.io/reference/api/http/#api-v0-version

Package

cl-ipfs-api2.

Source

main.lisp.

Function: version-deps ()

Return info about dependencies used for build; I.E., Go version, OS, etc. /ipns/docs.ipfs.io/reference/api/http/#api-v0-version

Package

cl-ipfs-api2.

Source

main.lisp.


5.2 Internals


5.2.1 Ordinary functions

Function: config-get (key)

Get a config key’s value.
Doesn’t map with any existant API call; it’s just a convenience wrapper around #’config.

Package

cl-ipfs-api2.

Source

main.lisp.

Function: config-set (key value &key bool json)

Set a config key’s value.
Doesn’t map with any existant API call; it’s just a convenience wrapper around #’config.

Package

cl-ipfs-api2.

Source

main.lisp.

Function: empty-string-p (string)

Return whether or not a given item is an empty string.

Package

cl-ipfs-api2.

Source

main.lisp.

Function: ipfs-call (call arguments &key parameters want-stream method)

Make an IPFS HTTP API call. Quite commonly used.
Some calls return strings/raw data, and others return JSON.
When strings/arbitrary data are recieved, they’re returned verbatim. But, when JSON is returned, it is parsed into a hashtable.
If the JSON is ’error JSON’, I.E., it signals that an error has been recieved, two values are returned: NIL and the string-error-message.

Package

cl-ipfs-api2.

Source

main.lisp.

Function: make-call-url (call arguments &key host root)

Create the URL of an API call, as per the given arguments.
Symbols are assumed to be something like ’T (so boolean), nil likewise. Arguments should look like this:
((’recursive’ nil)(’name’ ’xabbu’))

Package

cl-ipfs-api2.

Source

main.lisp.

Function: p2p-forward (protocol listening-endpoint target-endpoint &key allow-custom-protocol)

Forward connections to libp2p service. /ipns/docs.ipfs.io/reference/api/http/#api-v0-p2p-forward

Package

cl-ipfs-api2.

Source

main.lisp.

Function: process-result (body status-code headers uri http-stream must-close status-text)
Package

cl-ipfs-api2.

Source

main.lisp.

Function: s-assoc (key alist)

Get the value of an associative list using a string key.

Package

cl-ipfs-api2.

Source

main.lisp.

Function: simplify (list)

’Simplify’ a list. Remove any extraneous sublisting [ ((2 3)) -> (2 3) ], and remove extraneous strings in otherwise pure alists, e.g.
[ (“Apple” (2 2) (3 3) (4 4)) -> ((2 2) (3 3) (4 4)) ]

Package

cl-ipfs-api2.

Source

main.lisp.

Function: string+ (&rest strings)

Combine an arbitrary amount of strings into a single string.

Package

cl-ipfs-api2.

Source

main.lisp.

Function: url-encode (string &rest ignored)

Wrap around drakma’s url encoder, with a slight change– instead of using plus-signs for spaces, we want to use %20.

Package

cl-ipfs-api2.

Source

main.lisp.


Appendix A Indexes


A.1 Concepts


A.2 Functions

Jump to:   A   B   C   D   E   F   I   K   L   M   N   O   P   R   S   U   V   W  
Index Entry  Section

A
add: Public ordinary functions

B
bitswap-ledger: Public ordinary functions
bitswap-reprovide: Public ordinary functions
bitswap-stat: Public ordinary functions
bitswap-wantlist: Public ordinary functions
block-get: Public ordinary functions
block-put: Public ordinary functions
block-rm: Public ordinary functions
block-stat: Public ordinary functions
bootstrap: Public ordinary functions
bootstrap-add: Public ordinary functions
bootstrap-add-default: Public ordinary functions
bootstrap-list: Public ordinary functions
bootstrap-rm: Public ordinary functions
bootstrap-rm-all: Public ordinary functions

C
cat: Public ordinary functions
cid-base32: Public ordinary functions
cid-bases: Public ordinary functions
config: Public ordinary functions
config-get: Private ordinary functions
config-set: Private ordinary functions
config-show: Public ordinary functions

D
dag-get: Public ordinary functions
dag-put: Public ordinary functions
dag-resolve: Public ordinary functions
dht-findpeer: Public ordinary functions
dht-findprovs: Public ordinary functions
dht-get: Public ordinary functions
dht-provide: Public ordinary functions
dht-put: Public ordinary functions
dht-query: Public ordinary functions
diag-cmds: Public ordinary functions
diag-cmds-clear: Public ordinary functions
diag-cmds-set-time: Public ordinary functions
diag-sys: Public ordinary functions
dl: Public ordinary functions
dns: Public ordinary functions

E
empty-string-p: Private ordinary functions

F
file-ls: Public ordinary functions
files-chcid: Public ordinary functions
files-cp: Public ordinary functions
files-flush: Public ordinary functions
files-ls: Public ordinary functions
files-mkdir: Public ordinary functions
files-mv: Public ordinary functions
files-read: Public ordinary functions
files-rm: Public ordinary functions
files-stat: Public ordinary functions
files-write: Public ordinary functions
filestore-dups: Public ordinary functions
filestore-ls: Public ordinary functions
filestore-verify: Public ordinary functions
Function, add: Public ordinary functions
Function, bitswap-ledger: Public ordinary functions
Function, bitswap-reprovide: Public ordinary functions
Function, bitswap-stat: Public ordinary functions
Function, bitswap-wantlist: Public ordinary functions
Function, block-get: Public ordinary functions
Function, block-put: Public ordinary functions
Function, block-rm: Public ordinary functions
Function, block-stat: Public ordinary functions
Function, bootstrap: Public ordinary functions
Function, bootstrap-add: Public ordinary functions
Function, bootstrap-add-default: Public ordinary functions
Function, bootstrap-list: Public ordinary functions
Function, bootstrap-rm: Public ordinary functions
Function, bootstrap-rm-all: Public ordinary functions
Function, cat: Public ordinary functions
Function, cid-base32: Public ordinary functions
Function, cid-bases: Public ordinary functions
Function, config: Public ordinary functions
Function, config-get: Private ordinary functions
Function, config-set: Private ordinary functions
Function, config-show: Public ordinary functions
Function, dag-get: Public ordinary functions
Function, dag-put: Public ordinary functions
Function, dag-resolve: Public ordinary functions
Function, dht-findpeer: Public ordinary functions
Function, dht-findprovs: Public ordinary functions
Function, dht-get: Public ordinary functions
Function, dht-provide: Public ordinary functions
Function, dht-put: Public ordinary functions
Function, dht-query: Public ordinary functions
Function, diag-cmds: Public ordinary functions
Function, diag-cmds-clear: Public ordinary functions
Function, diag-cmds-set-time: Public ordinary functions
Function, diag-sys: Public ordinary functions
Function, dl: Public ordinary functions
Function, dns: Public ordinary functions
Function, empty-string-p: Private ordinary functions
Function, file-ls: Public ordinary functions
Function, files-chcid: Public ordinary functions
Function, files-cp: Public ordinary functions
Function, files-flush: Public ordinary functions
Function, files-ls: Public ordinary functions
Function, files-mkdir: Public ordinary functions
Function, files-mv: Public ordinary functions
Function, files-read: Public ordinary functions
Function, files-rm: Public ordinary functions
Function, files-stat: Public ordinary functions
Function, files-write: Public ordinary functions
Function, filestore-dups: Public ordinary functions
Function, filestore-ls: Public ordinary functions
Function, filestore-verify: Public ordinary functions
Function, id: Public ordinary functions
Function, ipfs-call: Private ordinary functions
Function, key-gen: Public ordinary functions
Function, key-list: Public ordinary functions
Function, key-remove: Public ordinary functions
Function, key-rename: Public ordinary functions
Function, log-level: Public ordinary functions
Function, log-ls: Public ordinary functions
Function, log-tail: Public ordinary functions
Function, ls: Public ordinary functions
Function, make-call-url: Private ordinary functions
Function, name-publish: Public ordinary functions
Function, name-pubsub-cancel: Public ordinary functions
Function, name-pubsub-state: Public ordinary functions
Function, name-pubsub-subs: Public ordinary functions
Function, name-resolve: Public ordinary functions
Function, object-data: Public ordinary functions
Function, object-diff: Public ordinary functions
Function, object-get: Public ordinary functions
Function, object-links: Public ordinary functions
Function, object-new: Public ordinary functions
Function, object-patch-add-link: Public ordinary functions
Function, object-patch-rm-link: Public ordinary functions
Function, object-stat: Public ordinary functions
Function, p2p-close: Public ordinary functions
Function, p2p-forward: Private ordinary functions
Function, p2p-listen: Public ordinary functions
Function, p2p-ls: Public ordinary functions
Function, p2p-stream-close: Public ordinary functions
Function, p2p-stream-ls: Public ordinary functions
Function, pin-add: Public ordinary functions
Function, pin-ls: Public ordinary functions
Function, pin-rm: Public ordinary functions
Function, pin-update: Public ordinary functions
Function, pin-verify: Public ordinary functions
Function, process-result: Private ordinary functions
Function, pubsub-ls: Public ordinary functions
Function, pubsub-peers: Public ordinary functions
Function, pubsub-pub: Public ordinary functions
Function, pubsub-sub: Public ordinary functions
Function, pubsub-sub-close: Public ordinary functions
Function, pubsub-sub-listen: Public ordinary functions
Function, pubsub-sub-process: Public ordinary functions
Function, pubsub-sub-read-char: Public ordinary functions
Function, refs: Public ordinary functions
Function, refs-local: Public ordinary functions
Function, repo-fsck: Public ordinary functions
Function, repo-gc: Public ordinary functions
Function, repo-stat: Public ordinary functions
Function, repo-verify: Public ordinary functions
Function, repo-version: Public ordinary functions
Function, resolve: Public ordinary functions
Function, s-assoc: Private ordinary functions
Function, shutdown: Public ordinary functions
Function, simplify: Private ordinary functions
Function, stats-bitswap: Public ordinary functions
Function, stats-bw: Public ordinary functions
Function, stats-repo: Public ordinary functions
Function, string+: Private ordinary functions
Function, swarm-addrs: Public ordinary functions
Function, swarm-addrs-listen: Public ordinary functions
Function, swarm-addrs-local: Public ordinary functions
Function, swarm-connect: Public ordinary functions
Function, swarm-disconnect: Public ordinary functions
Function, swarm-filters: Public ordinary functions
Function, swarm-filters-add: Public ordinary functions
Function, swarm-filters-rm: Public ordinary functions
Function, swarm-peers: Public ordinary functions
Function, url-encode: Private ordinary functions
Function, urlstore-add: Public ordinary functions
Function, version: Public ordinary functions
Function, version-deps: Public ordinary functions

I
id: Public ordinary functions
ipfs-call: Private ordinary functions

K
key-gen: Public ordinary functions
key-list: Public ordinary functions
key-remove: Public ordinary functions
key-rename: Public ordinary functions

L
log-level: Public ordinary functions
log-ls: Public ordinary functions
log-tail: Public ordinary functions
ls: Public ordinary functions

M
Macro, with-files-write: Public macros
make-call-url: Private ordinary functions

N
name-publish: Public ordinary functions
name-pubsub-cancel: Public ordinary functions
name-pubsub-state: Public ordinary functions
name-pubsub-subs: Public ordinary functions
name-resolve: Public ordinary functions

O
object-data: Public ordinary functions
object-diff: Public ordinary functions
object-get: Public ordinary functions
object-links: Public ordinary functions
object-new: Public ordinary functions
object-patch-add-link: Public ordinary functions
object-patch-rm-link: Public ordinary functions
object-stat: Public ordinary functions

P
p2p-close: Public ordinary functions
p2p-forward: Private ordinary functions
p2p-listen: Public ordinary functions
p2p-ls: Public ordinary functions
p2p-stream-close: Public ordinary functions
p2p-stream-ls: Public ordinary functions
pin-add: Public ordinary functions
pin-ls: Public ordinary functions
pin-rm: Public ordinary functions
pin-update: Public ordinary functions
pin-verify: Public ordinary functions
process-result: Private ordinary functions
pubsub-ls: Public ordinary functions
pubsub-peers: Public ordinary functions
pubsub-pub: Public ordinary functions
pubsub-sub: Public ordinary functions
pubsub-sub-close: Public ordinary functions
pubsub-sub-listen: Public ordinary functions
pubsub-sub-process: Public ordinary functions
pubsub-sub-read-char: Public ordinary functions

R
refs: Public ordinary functions
refs-local: Public ordinary functions
repo-fsck: Public ordinary functions
repo-gc: Public ordinary functions
repo-stat: Public ordinary functions
repo-verify: Public ordinary functions
repo-version: Public ordinary functions
resolve: Public ordinary functions

S
s-assoc: Private ordinary functions
shutdown: Public ordinary functions
simplify: Private ordinary functions
stats-bitswap: Public ordinary functions
stats-bw: Public ordinary functions
stats-repo: Public ordinary functions
string+: Private ordinary functions
swarm-addrs: Public ordinary functions
swarm-addrs-listen: Public ordinary functions
swarm-addrs-local: Public ordinary functions
swarm-connect: Public ordinary functions
swarm-disconnect: Public ordinary functions
swarm-filters: Public ordinary functions
swarm-filters-add: Public ordinary functions
swarm-filters-rm: Public ordinary functions
swarm-peers: Public ordinary functions

U
url-encode: Private ordinary functions
urlstore-add: Public ordinary functions

V
version: Public ordinary functions
version-deps: Public ordinary functions

W
with-files-write: Public macros