mirror of
https://github.com/fluencelabs/aqua-ipfs
synced 2025-03-15 05:00:50 +00:00
Aqua IPFS bindings
Native IPFS integration to Aqua language. Orchestrate IPFS file transfer with Aqua scripts.
How to use it in TypeScript
- Add the following to your dependencies
@fluencelabs/aqua-ipfs
@fluencelabs/fluence
@fluencelabs/fluence-network-environment
- Import and call
import { put, get_from } from '@fluencelabs/aqua-ipfs';
import { createClient } from "@fluencelabs/fluence";
import { krasnodar } from "@fluencelabs/fluence-network-environment";
const fluence = await createClient(krasnodar[1]);
let cid = "Qm...";
let ipfs = "/ip4/x.x.x.x/tcp/5001/"
let getResult = await get_from(fluence, fluence.relayPeerId, cid, ipfs, { ttl: 10000 });
Directory structure
aqua
Aqua API of IPFS-adapter, go to its READMEservice
contains Rust service that implements all the IPFS calls by usingipfs
cli mounted binaryexample
A simple example of how to use ipfs adapter from TypeScriptlocal-network
contains Docker Compose YAML config to run a local Fluence network of 3 nodes
Contribution
Contributions are welcome!
ipfs-adapter
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.
Description
Languages
Rust
78.6%
Python
8.9%
TypeScript
6.6%
Shell
5.4%
JavaScript
0.5%