在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称:Eximua/solid-ipfs开源软件地址:https://github.com/Eximua/solid-ipfs开源编程语言:JavaScript 100.0%开源软件介绍:solid-ipfsUsing Solid to store IPFS Hash privately or publicly. You need to have a solid account to use solid-ipfs. If you don't already have one, please click here to register. Install$ npm install solid-ipfs --save Usageimport SolidIPFS from 'solid-ipfs';
const main = async () => {
const solidIpfs = new SolidIPFS({
url: 'YOUR_SOLID_URL', // e.g. https://alicea.solid.authing.cn/inbox/
});
const result = await solidIpfs.storeHash({
hash: 'YOUR_IPFS_HASH',
});
console.log(result, result ? '保存成功' : '保存失败');
}
main(); Then you can get IPFS hash list via If you don't have a solid account, please click here to register. In Solid, the path with the suffix Private path exampleimport SolidIPFS from 'solid-ipfs';
const main = async () => {
const solidIpfs = new SolidIPFS({
url: 'https://alicea.solid.authing.cn/inbox/', // inbox -> private
});
const result = await solidIpfs.storeHash({
hash: 'YOUR_IPFS_HASH',
});
console.log(result, result ? '保存成功' : '保存失败');
}
main(); Public path exampleimport SolidIPFS from 'solid-ipfs';
const main = async () => {
const solidIpfs = new SolidIPFS({
url: 'https://alicea.solid.authing.cn/public/', // public -> public
});
const result = await solidIpfs.storeHash({
hash: 'YOUR_IPFS_HASH',
});
console.log(result, result ? '保存成功' : '保存失败');
}
main(); AuthingUsing withAuthing is an identity for EVERYONE and EVERYTHING, which likes Auth0. We have integrated authing so that you can see statistics in the Authing dashboard after logging in/registering solid. import SolidIPFS from 'solid-ipfs';
const main = async () => {
const solidIpfs = new SolidIPFS({
url: 'https://alicea.solid.authing.cn/inbox/', // inbox -> private
clientId: '<YOUR_AUTHING_CLIENT_ID>',
secret: '<YOUR_AUTHING_CLIENT_SECRET>',
});
await solidIpfs.initInstance(); // MUST
const result = await solidIpfs.storeHash({
hash: 'YOUR_IPFS_HASH',
});
console.log(result, result ? '保存成功' : '保存失败');
}
main(); |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论