Skip to content

@ipfs.get

Fetch content from IPFS and return it as text.

Returns: string

@ipfs.get(cid)
NameTypeDescription
cidstringContent identifier to fetch

Content is pinned and returned byte-exact, so @ipfs.get(@ipfs("hello")) returns hello.

The terminal editor uses this helper automatically: pasting a hex string larger than 64 bytes pins it to IPFS and replaces it with an @ipfs.get call. Paste with Ctrl+Shift+V (Cmd+Shift+V on Mac) to keep the raw hex instead.

# Send a raw transaction whose calldata is pinned on IPFS
send 0xe91D153E0b41518A2Ce8Dd3D7944Fa863463a97d --data @ipfs.get("QmPK1s3pNYLi9ERiq3BDxKa4XosgWwFRQUydHUtz4YgpqB")
# Round-trip text through IPFS
set $cid @ipfs("hello world")
set $content @ipfs.get($cid)
  • @ipfs — upload content to IPFS and return the CID