floBlockchainAPI v2.2.1a
- Minor bug fixed: Out of bound index when handling unconfirmed transactions in readData
floCloudAPI v2.1.3
- fetching object-data will now properly check for correct object when updating in local and ignores vc that have been parsed previously
- fetching general-data will now use afterTime instead of lowerVectorClock (thus, any change in tag/note is reflected in it).
. existing apps will automatically change the stored lastVC of generalData to respective afterTime value
- Fixed: objectifier not called on singleRequests for objectData and generalData
(Bug fixes)
floBlockchainAPI v2.2.1
- Fixed: Unconfirmed transaction (propably dropped) causing new transaction not to be read in readData
floCloudAPI v2.1.2a
- Fixed: singleRequest not returning response correctly
- Fixed: afterTime optional parameter not added in requests
- Fixed: setStatus and requestStatus not working
Added support for status feature
1. setStatus(options): set status as online for myFloID
2. requestStatus(trackList, options) : request status of floID(s) in trackList
- Both uses websocket connection
- resolves a reqID (local) that can be used in closeRequest function
- Use callback parameter in options to use the response from cloud
Added support for note feature
1. noteApplicationData(vectorClock, note): add/edit a note for a data in cloud
- Only allows receiverID of the data to add/edit note
- subAdmin can use it as exception, when receiverID is adminID
Other changes
- Fixed issues of tagApplicationData (previously markApplicationData) not working.
- Fixed issue where senderID option not working correctly in requesting data from cloud (new cloud uses 'senderID' parameter for both array of floIDs or a single floID)
*NOTE: change senderIDs to senderID in apps if any*
- MarkApplicationData not working correctly when Array is passed
- Marking data should fetch to data's receiverID supernode
- findDiff and mergeDiff moved to bottom of floCloudAPI tag
- improved sendTx to check if the utxo is already used but unconfirmed (ie, still in mempool) and ignore those utxos.
This allows users to send multiple tx from the same floID without the need to wait for confirmation of prev tx as long as enough utxos are available.
- Optional parameter: strict_utxo (boolean): Default=true (safe mode).
If false, allows unconfirmed UTXOs to be included in the txn.
This will allow users to chain send tx as long as enough balance FLO is available.
WARNING: if one tx in the chain is dropped, all next tx dependent on that tx will be dropped too.
- writeData (as it invokes sendTx) also have the above improvements
- readData: option txid changed to tx. now resolves data with txid, time, blockheight along with flo data as an object [if option tx is true].
Note: backward not compactible when txid was passed as option
Additional filter options to readData function
- receivedOnly: filters only received data
- txid: (boolean) resolve txid or not
- sender: flo-id(s) of sender
- receiver: flo-id(s) of receiver
- Added verifyPin: function to verify the pin of login credentials without logging in (ie, not storing the keys in memory)
- 'pin' argument can be ignored to check if private key is secured or not.
floCloudAPI_v2.0.2d
- Fixed bug: syntax error in requestObjectData
- Added closeRequest: closes the active live requests
floDapps_v2.0.1b
- minor improvements and alignment.
- Fixed: deleteAppData deletes the lastTx data of the adminID.
- Fixed bug: database upgrade not working correctly when upgrading existing db.
- Added upgradeDB as a standalone function. (also called by initDB if upgrade is required)
- Added getDBversion: resolves the version of the db
- Improved openDB: rejects if the db is not found
floCloudAPI v2.0.2a
- deleteApplicationData accepts options instead of application (to match other functions).
- Added editApplicationData
- sendGeneralData not longer stores data in IDB.
- fixed bug: Infinite callback loop in requestGeneralData and requestObjectData
floDapps v2.0.1
- added mid startup support
- added deleteUserData and deleteAppData
- replaced reactor startup logger with setCustomStartupLogger
- spliting IDB into 3 parts:
1. floDapps - common DB for all apps across all users
2. userDB - common DB for all apps for specific user floID
3. appDB - app DB across all users
- contacts, pubKeys can be stored by users in userDB
- users can send direct message across all apps using floDapps.sendMessage
- syncData can be used to sync user data between devices
STD_OP
floGlobals
- combined vectorClock (for objectData) and generalVC (for generalData) into lastVC.
init
- Bug fixed: floData of 16 character dropped by floSight.
floCrypto
- Improved getFloIDfromPubkeyHex to getFloID: return floID from either pubKey or privKey.
- verifyPrivKey, validateAddr return false if arguments are empty.
floSupernode
- Removed floSupernode module.
- Kbucket submodule moved to floCloudAPI
Kbucket (subModule)
- Improved KBucket module
- Kbucket cyclic array (SNCO) is formed (w.r.t. distance) when kBucket is launched
- nextNode, prevNode are determined by SNCO
compactIDB
- Improved searchData (accepts option parameter instead of patternEval)
.options (lowerKey, upperKey, atKey, patternEval, lastOnly)
floCloudAPI
- Improved data signature during sending.
.current format ( ["receiverID", "time", "application", "type", "message", "comment"])
- Adding live request:
.requesting data now accepts option callback
.when callback option is passed, the request becomes live request
.ie, cloud automatically forwards new data received by the requested floID
.callback function is called with new data is received
.callback supported functions: requestApplicationData, requestGeneralData, requestObjectData
- Adding feature to delete from cloud.
.data received can now be deleted from cloud
.signature is required for verification (thus requires privKey logged in)
.can only delete own data (received only)
floDapps
- merged manageSubAdmins and setApplicationSettings into manageAppConfig(adminPrivKey, addList, rmList, settings)
- Improved getNextGeneralData
.getNextGeneralData can now sub-categorize comment (even when generalData is request for all comment)
.getNextGeneralData now keeps a track pointer of previously called. [vectorClock (ie, second parameter) must be null, default is null]
- floBlockchainAPI.readData's option pattern ll now test for JSON key matching the pattern
- startUp fn readAppConfigFromAPI checks if the content is a object or not to prevent errors
- generalData now also stores sign and pubKey.
- renamed startup fn readSubAdminListFromAPI to readAppConfigFromAPI.
- readAppConfigFromAPI also loads settings from the IDB to floGlobals.
- floDapps now reads 'settings' from blockchain
- improved manageSubAdmins: doesnot send tx if addList and rmList are empty (i.e, no changes)
- setApplicationSettings: used to set settings for the application.
Note: existing settings are overwritten (ie, not appended) if same key is used.
- sendGeneralData now supports a new option (encrypt): Encrypts the message before sending.
Note: option value can be boolean true or pubKey of a floID. Passing true will encrypt the data using the default encryptionKey (default 'encryptionKey' must be set in settings).
- getNextGeneralData now supports a new option (decrypt): Decrypts the message if possible.
Note: option value can be true, privateKey or array of privateKeys.
If boolean true is passed, decrypts using myPrivKey (loggedIn privateKey).
If privateKey (string) is passed, decrypts using the given privateKey.
If array of privateKeys are passed, decrypts the message using the suitable key from the given array. (for example, say messages A, B, C are encrypted for keys X, Y, Z respectively, passing [X, Z] will decrypt messages A and C.
floDapps.securePrivKey(pwd): replaces the stored private key with encrypted variant.
Changed made in startup function getCredentials to support securePrivateKey.
Improved and promisified clearCredentials.
sendTxMultiple:
There are 2 modes (given send amount, preserve ratio)
- Given Send Amount: Uses the given send amount from each sender IDs. Pass the senderPrivKeys as object with amount to invoke this mode
eg. { privateKey1: sendAmt1, privateKey2: sendAmt2...}
- preserveRatio: The ratio of the balance of the senders are maintained. Pass the senderPrivKeys as array of private keys.
eg. [privatekey1, privatekey2....]
*Note: receivers must always be object of floIDs with receive amount.
eg. {receiverID1: receiveAmt1, receiver2: receiveAmt2...}
writeDataMultiple:
There are 2 modes (preserveRatio, equalContribution)
- preserveRatio: preserves the ratio of the balance of senders
- equalContribution: all senders contribute equal amount to the transaction
Note:
*senderPrivKey and receivers are arrays
eq. [privateKey1, privateKey2, ..] and [receiverID1, receiverID2...]
*sends default amount (floGlobals.sendAmt) to each receiver)
*last (4th) parameter is optional:
(default) true: invokes preserveRatio mode
false: invokes equalContibution mode
mergeUTXOs: /merge all UTXOs of a given floID into a single UTXO
sendTxMulti: Send Tx from (and/or) to multiple floID
writeDataMulti: Write data into blockchain from (and/or) to multiple floID