在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:AKASHAorg/ipfs-connector开源软件地址:https://github.com/AKASHAorg/ipfs-connector开源编程语言:TypeScript 100.0%开源软件介绍:ipfs-connectorLibrary for solving the cross-platform binaries problem (works on Windows as well) containing helpers for easier read/write on IPFS by extending the JavaScript IPFS API functionality. Some of the differences:
For more information please see the API docs Installation
Usageimport { IpfsConnector } from '@akashaproject/ipfs-connector';
const instance = IpfsConnector.getInstance();
// start ipfs daemon and download binaries if needed
instance.start().then((api) => {});
// stop daemon
instance.stop()
// see api docs
// add/get data to ipfs
// cid zdpuB2CAUgUbyJ4s8SmqcGGaGfs7bG337dDNty8NSCR3fhgRw
const cid = instance.api.add({firstName: 'John', lastName: 'Doe'});
//returns John
instance.api.get(cid, '/firstName');
// read data from ipfs
instance.api.ipfsApi.cat('ipfs hash')
// access default ipfs-http-api from
instance.api.ipfsApi Dev
|
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论