Giter Site home page Giter Site logo

aqua-ipfs's Introduction

Aqua IPFS bindings

Native IPFS integration to Aqua language. Orchestrate IPFS file transfer with Aqua scripts.

Documentation

See Aqua Book.

How to use it in TypeScript

  1. Add the following to your dependencies

    • @fluencelabs/aqua-ipfs
    • @fluencelabs/fluence
    • @fluencelabs/fluence-network-environment
  2. Import and call

import { get_and_cache } from '@fluencelabs/aqua-ipfs';
import { createClient } from "@fluencelabs/fluence";
import { krasnodar } from "@fluencelabs/fluence-network-environment";

// connect to the Fluence network
const fluence = await createClient(krasnodar[1]);
// get some file's or dir's IPFS CID
let cid = "Qm...";
let ipfsMultiaddr = "/ip4/x.x.x.x/tcp/5001/"
// And cache it on the IPFS node running along the Fluence node we've connected to
let localCID = await get_and_cache(fluence, fluence.relayPeerId, cid, ipfs, { ttl: 10000 });
cid === localCID // true

Directory structure

  • aqua Aqua API of AquaIPFS. See aqua/README
  • service contains Rust service that implements all the IPFS calls by using ipfs cli mounted binary
  • example A simple example of how to use ipfs adapter from TypeScript
  • local-network contains Docker Compose YAML config to run a local Fluence network of 3 nodes

Contribution

Contributions are welcome!

aqua-ipfs integrates with IPFS by using ipfs CLI, so it's possible to expose virtually any IPFS API to Aqua. Feel free to open an issue or contribute APIs and patterns you find useful.

aqua-ipfs's People

Contributors

boneyard93501 avatar coder11 avatar folex avatar justprosh avatar

Watchers

 avatar

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    ๐Ÿ–– Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. ๐Ÿ“Š๐Ÿ“ˆ๐ŸŽ‰

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google โค๏ธ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.