ipns: IPNS name

Description Usage Arguments References Examples

Description

IPNS is a PKI namespace, where names are the hashes of public keys, and the private key enables publishing new (signed) values. In publish, the default value of <name> is your own identity public key.

Usage

1
2
3
ipfs_resolve(name = NULL, recursive = FALSE, nocache = FALSE)

ipfs_publish(path, lifetime = "24h")

Arguments

name

the IPNS name (owner) to resolve. Defaults to your own name

recursive

resolve until the result is not an IPNS name

nocache

do not use cached entries

path

IPFS path of the object to be published under your name

lifetime

Time duration that the record will be valid for. This accepts durations such as "300s", "1.5h" or "2h45m".

References

https://github.com/ipfs/examples/tree/master/examples/ipns#readme

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
# Publish a file!
writeLines("Hi there!", tmp <- tempfile())
out <- ipfs_add(tmp)
ipfs_browse(out$hash)

# Link your name to this file
ipfs_publish(out$hash)

# Resolve back via your name
me <- ipfs_info()$ID
doc <- ipfs_resolve(me)
ipfs_cat(doc)

# Resolve other people
ipfs_resolve("QmaCpDMGvV2BGHeYERUEnRQAwe3N8SzbUtfsmvsqQLuvuJ")
ipfs_resolve('ipfs.io')

jeroenooms/ipfs documentation built on May 17, 2017, 6:18 p.m.