Git Product home page Git Product logo

bitcoinfilesjs's People

Contributors

adrianbarwicki avatar deswurstes avatar jcramer avatar nodemaster115 avatar

Stargazers

 avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar  avatar

Watchers

 avatar  avatar

bitcoinfilesjs's Issues

Include axios as dependency

Axios is not included as a dependency in the package.json, but is used in ./lib/bitdb.js

This is failing in a Webpack build downstream because Webpack will always try to require something like that

File size greater than OP_RETURN example

When uploading a file size greater than the OP_RETURN size, what happens? Do you have to input the chunk_count variable as 2?

It would be great to see an example of how the library is designed to handle this, including upload & download

Reduce pkg size via Dependency injection for BITBOX-SDK or SLP-SDK

The size of the bitcoinfilesjs pkg can be reduced significantly by allowing the consumer to inject their own version of BITBOX. Whether it be BITBOX-SDK, SLP-SDK, or a customized version. See bitbox-dep branch.

Here are comments on the existing implementation of this on the bitbox-dep branch:

Adrian Barwicki, [13.01.19 05:07]
Yeah, I implemented it.

Adrian Barwicki, [13.01.19 05:07]
This is exactly what I meant. In this way, I could inject my lightweight version of bitbox

Adrian Barwicki, [13.01.19 05:09]
One thing though - I import the source code, not the built version. What would help me a lot is static type checking to ensure that the methods and the methods’ interfaces are still the same. Otherwise, I’d have to have full test coverage which I don’t 🙂

Adrian Barwicki, [13.01.19 05:10]
The lib-files are classes anyway so if you converted the file names to TS without any other changes, I think it would work out of the box.

Adrian Barwicki, [13.01.19 05:10]
For the built, you could generate index.d.ts and then the built imports would have the types as well.

Adrian Barwicki, [13.01.19 05:11]
[ Photo ]

Adrian Barwicki, [13.01.19 05:11]
Also, is there a reason you want to have a Bitbox class and not the instance?

Adrian Barwicki, [13.01.19 05:12]
In this way, you take away the option to specify if they want to use the cloud api hosted by bitcoin.com or self-hosted one.

Adrian Barwicki, [13.01.19 05:13]
And I think you use one instance of Bitbox across the whole library, so it should be ok 🙂

Adrian Barwicki, [13.01.19 05:15]
Another feedback:

Adrian Barwicki, [13.01.19 05:15]
console.logs could be replaced with optional loggers maybe

James Cramer, [13.01.19 08:35]
[In reply to Adrian Barwicki]
Yes because switching networks (like to testnet) is handled in the constructor. Not sure if there is some network switching method.

James Cramer, [13.01.19 08:36]
[In reply to Adrian Barwicki]
Ok

Adrian Barwicki, [13.01.19 08:39]
[In reply to James Cramer]
Rest.bitcoin.com is open source and can be run locally. It’s not only about choosing mainnet vs testnet but also about specifying the restURL

James Cramer, [13.01.19 08:39]
Ah yes, that’s what I meant

Add type 2 file uploads using p2sh scriptSig data space

As defined in the BFP spec, type 2 file uploads represent data storage using p2sh scriptSig. Current network rules allow each input to contain up to 1650KB of data in scriptSig. With the 25 transaction chain network policy, we should be able to use this to get files uploaded that are larger than 30KB in size. This is also a more efficient way to store data, rather than using OP_RETURN space which is currently limited to 220 bytes.

TypeError: Cannot read property 'passesHashCheck' of undefined

I am facing the following issue on the download script.

/home/testbed/Downloads/btcash/download.js:14
if(result.passesHashCheck){
^

TypeError: Cannot read property 'passesHashCheck' of undefined
at Object. (/home/testbed/Downloads/btcash/download.js:14:11)
at Module._compile (internal/modules/cjs/loader.js:1138:30)
at Object.Module._extensions..js (internal/modules/cjs/loader.js:1158:10)
at Module.load (internal/modules/cjs/loader.js:986:32)
at Function.Module._load (internal/modules/cjs/loader.js:879:14)
at Function.executeUserEntryPoint [as runMain] (internal/modules/run_main.js:71:12)
at internal/main/run_main_module.js:17:47

error_passeshashcheck

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.