decentldotland / weave-aggregator

an aggregator for the Permaweb's feeds
MIT License
18 stars 3 forks source link

@decentdotland/weave-aggregator

Synopsis

The weave-aggregator library aggregates data and feeds from the Permaweb, and make the access for it easier. The weave-aggregator aggregates especially public feeds from protocols that use Arweave as a storage solution.

The library will be under continious development mode to keep on track with the new & currently unsupported protocols that use Arweave. By aggregating data from different protocols, the weave-aggregator allows developers to create a frontend for the "timeline of the Permaweb".

Install

npm install weave-aggregator

Current Supported Protocols

protocol name directory API ID
ArweaveSaves arweave-saves arweave-saves
Koii Network koii koii
ardrive.io ardrive ardrive
permacast.net permacast permacast
mirror.xyz mirror-xyz mirror-xyz
Pianity pianity pianity
Lens Protocol lens-protocol lens
Art By City art-by-city art-by-city
ANS safe-cache-api ans-cache
Metaweave Permatweets metaweave-xyz metaweave-permatweets
PermaPages IMG permapages/img permapages-img
PermaPages Stamps permapages/stamps permapages-stamps
ArNS arns arns

Usage Example

get permacast podcasts

import { getWeaveAggregator } from "weave-aggregator";

async function podcasts() {
  const podcastsMetadata = await getWeaveAggregator("permacast");

  return podcastsMetadata;
}

get Koii collectibles

import { getWeaveAggregator } from "weave-aggregator";

const address = "...";

async function nftsOf(address) {
  const collectibles = await getWeaveAggregator("koii", address);

  return collectibles;

omiting the address parameter returns the recent feed of the requested network. The networks that support per address filtering are: ArweaveSaves, Koii, and Ardrive.

get Stamps

import { getWeaveAggregator } from "weave-aggregator";

const address = "...";

async function stamps(address) {
  const stamps = await getWeaveAggregator("permapages-stamps", address);

  return stamps;
}

console.log(await stamps(address))

For ReactJS usage:

Modifying utils/arweave/arweave.js no longer required for ReactJS.

License

This projects is licensed under the MIT license