Install the new CLI:
npm install -g @web3-storage/w3cli
Create and register new space:
w3 space create SPACENAME
lassie fetch --dag-scope=entity -providers=/dns4/dag.w3s.link/tcp/443/https/p2p/QmUA9D3H7HeCYsirB3KmPSvZh3dNXMZas6Lwgr4fv1HTTp bafybeicuc7vfbxzaperdc6ng2c4ufeulyjpfrmwuxhxrm6cfdamp5hpw5i |
$ curl -v -H "Accept: application/vnd.ipld.car;order=dfs" https://dag.w3s.link/ipfs/bafybeibrqc2se2p3k4kfdwg7deigdggamlumemkiggrnqw3edrjosqhvnm --output my.dfs.car | |
... | |
> GET /ipfs/bafybeibrqc2se2p3k4kfdwg7deigdggamlumemkiggrnqw3edrjosqhvnm HTTP/2 | |
> Host: dag.w3s.link | |
> user-agent: curl/7.77.0 | |
> accept: application/vnd.ipld.car;order=dfs | |
> | |
... | |
< HTTP/2 200 | |
< date: Fri, 19 May 2023 14:16:47 GMT |
import { createWriter } from '@ipld/unixfs' | |
import * as CAR from '@web3-storage/upload-client/car' | |
import { create } from '@web3-storage/w3up-client' | |
/** | |
* @param {import('@web3-storage/w3up-client').Client} client | |
* @param {import('@web3-storage/w3up-client/types').FileLike} file | |
*/ | |
async function uploadFile (client, file) { | |
/** @type {import('@web3-storage/upload-client/types').DirectoryEntryLink[]} */ |
import { CarIndexedReader } from '@ipld/car' | |
import * as pb from '@ipld/dag-pb' | |
import { UnixFS } from 'ipfs-unixfs' | |
// usage: node create-perma-map-fixture sharded-dir.car | |
/** @typedef {{ bitfield: number[], links: Array<Link|Element>, prefix?: string }} Link */ | |
/** @typedef {{ key: string, value: string, prefix: string }} Element */ | |
async function main () { |
Install the new CLI:
npm install -g @web3-storage/w3cli
Create and register new space:
w3 space create SPACENAME
// Goals: | |
// 1. Decouple store from agent | |
// 2. Simplify agent creation | |
// 3. Agent governs data format not store | |
// 4. Initialization of agent, not store | |
// 5. DRY initialization in agent, not repeated in each store impl | |
/** | |
* @param {AgentData} [data] Agent data | |
* @param {object} [options] |
import fs from 'fs' | |
import path from 'path' | |
const dir = path.join('ansible', 'inventories', 'bifrost', 'host_vars') | |
const regex = /ipfs_config_identity_peerid: "(.*)"/ig | |
async function main () { | |
const peers = [] | |
for (const f of fs.readdirSync(dir)) { | |
if (!(f.startsWith('ipfs-bank') && f.endsWith('ipfs.gateway.dwebops.net.yml'))) continue |
import { useState } from 'react' | |
import { useUploader } from '@w3ui/react-uploader' | |
export default function Component () { | |
const { uploader } = useUploader() | |
const [file, setFile] = useState(null) | |
const [cid, setCid] = useState('') | |
const handleUploadSubmit = async e => { | |
e.preventDefault() |
An index mapping block CID to linked block CID.