factom-asset-tokens / fat-js Goto Github PK
View Code? Open in Web Editor NEWFAT client & RPC in JS
License: MIT License
FAT client & RPC in JS
License: MIT License
fatd 1.0 is now supposed to support both pending balances and transactions and I believe this does require some changes in fat-js to be supported. If not, a short explanation of how to use it would be welcomed and the issue can be closed. Thanks!
fatd 1.0 authorize an address to be both in input and output but fat-js reject those transactions with errors Output address already occurs in inputs
or Input address already occurs in inputs
Quickly looking I didn't see a dependency on http://mikemcl.github.io/bignumber.js/ (or similar libraries). I think it is necessary to work with such a library when manipulating big numbers or numbers with decimals up to 10^-10 (as per your spec). You can see that web3.js uses it: https://github.com/ethereum/wiki/wiki/JavaScript-API#a-note-on-big-numbers-in-web3js
Those conditions are always true:
https://github.com/Factom-Asset-Tokens/fat-js/blob/development/0/TransactionBuilder.js#L281
https://github.com/Factom-Asset-Tokens/fat-js/blob/development/1/TransactionBuilder.js#L307
because findIndex returns -1 when the element is not found: https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/Array/findIndex
Because of that the method with throw Cannot set property 'publicKey' of undefined
which is hard to interpret for a user of the library.
There is no default protocol when building the cli which result in having by default an endpoint defined as undefined://localhost:8078/v1
.
The protocol should either default to http
or the builder should fail when trying to build a cli without the protocol being set.
In both FAT0 and FAT1 standard it is not possible for an address to appear twice across both inputs and outputs. fat-js library should prevent building such a transaction and throw as early as possible when detecting the user is building an incorrect transaction.
fatd 1.0 allows for fat 0 and fat 1 transaction with 0/empty input/output but fat-js reject them with errors like Input amount must be a positive nonzero integer
.
https://github.com/Factom-Asset-Tokens/fat-js/blob/master/0/Issuance.js#L143
That field can be a simple Number in some cases. Should probably always cast to BigNumber.
I am using the develop
branch here. Both FAT0 and FAT1 transaction objects don't seem to have a pending
attribute/accessor to be able to distinguish if the transaction is pending or confirmed
Compatibility module does not work with fatd 1.0. That line throws: https://github.com/Factom-Asset-Tokens/fat-js/blob/master/cli/CLI.js#L187 because the attibute returned by fatd is fatdversion
and not fatd-version
Currently on develop branch: https://github.com/Factom-Asset-Tokens/fat-js/blob/development/cli/CLI.js#L116
A declarative, efficient, and flexible JavaScript library for building user interfaces.
๐ Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
An Open Source Machine Learning Framework for Everyone
The Web framework for perfectionists with deadlines.
A PHP framework for web artisans
Bring data to life with SVG, Canvas and HTML. ๐๐๐
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
Some thing interesting about web. New door for the world.
A server is a program made to process requests and deliver data to clients.
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
Some thing interesting about visualization, use data art
Some thing interesting about game, make everyone happy.
We are working to build community through open source technology. NB: members must have two-factor auth.
Open source projects and samples from Microsoft.
Google โค๏ธ Open Source for everyone.
Alibaba Open Source for everyone
Data-Driven Documents codes.
China tencent open source team.