1.0.0 • Published 3 years ago

linden-test v1.0.0

Weekly downloads
-
License
ISC
Repository
-
Last release
3 years ago

flipped-POSS

standard-readme compliant TODO: Put more badges here.

A private OSS client based on IPFS.

Table of Contents

Install

npm install --save linden-poss

Usage

const createClient = require('linden-poss');
const client = createClient.create({ clientID: "testnet" });

// add data
(async function(){
    const res = await client.add.data('Hello world!')
    console.log('Added data contents:', res)
})();

// add file
(async function(){
    const res = await client.add.file('c:/Users/xieyu/Pictures/94156e5566c82ae7233655505653d674.mp4')
    console.log('Added file:', res)
})();

//get data
(async function() {
    for await (const chunk of client.get.data("QmebsgayqHpYSzSGZDZLu8dhkfyu1j1EBKseqit1gyvaqc")) {
        console.info('geted data:', chunk.toString())
    }
})();

// add web site
(async function(){
    const res = await client.add.addr('C:/linden/linden-newpc/dist')
    console.log('Added addr contents:', res)
})();

Maintainers

@do-nothing

Contributing

PRs accepted.

Small note: If editing the README, please conform to the standard-readme specification.

License

MIT © 2021 lindensys.com