- Added support for requests and responses
- Listing requests and responses:
.list_request_sent
.list_request_received
.list_response_sent
.list_response_received
Note: the above fns accept options (as object). Available options: floID, type, completed (bool)
- Current available request types:
1. pubKey
- function to request/respond pubKeys:
.request_pubKey(receiver, message = '')
.respond_pubKey(req_id, message = '')
- sendPipelineMessage: sends message to the pipeline (can send to multisig pipeline too)
- when receiving tx_hex from multisig pipeline, store it in data.tx_hex instead of data.message
- createTx resolved pipeline id
- signTx resolves an object {tx_hex, *txid}
- store the message type for multisig pipeline
- Added loadDataFromBlockchain to messenger init fn
- Adding pipeline list to getChatOrder
- Added disablePipeline(pipeID): disables the pipeline and stops its requests from cloud.
- Close btc_multisig pipeline when a tx is broadcasted into blockchain
- Changed all spread operators to standard alternatives
- Add pipeline when CREATE_PIPELINE message is received
- Fixed: 'User is not a part of this multisig' error shown incorrectly
- Fixed various minor bugs
- Added optional fee argument for multisig.createTx
- Fixed: createTransaction not returning promise
- Fixed: script not correctly added for multisig inputs
- Fixed: signTx throwing syntax error
- Added checkSigned(tx, bool?): check if the tx is signed or not. (bool is optional, default=true, if true returns a boolean value, else returns a detailed array of input's length)
- Fixed minor bugs in lib.js
- Added floCrypto.tmpID: generates a random floID with no private key (use this only for one-time id)
- Added toFloID(address): returns equivalent floID (btc-segwit address NOT supported)
- Fixed bug: legacy addresses of length 33 not working in verifyPubKey and validateAddr
- Added createTx: Create an unsigned tx (no privkey required) [segwit sender not supported for now as redeem-script needed]
- Added createMultiSigTx: Create an unsigned tx for multisig address
- Optimised sendTx to reuse code (no functional change)
floDapps login:
- login to btc address when btc private key is entered
- login to flo id when flo (or any other) private key is entered
floCloudAPI user:
- accept userID and private key for user set
Others:
- Fixed: minor bugs
floCrypto.verifyPubKey: verify public key of any blockchain address
- Parameters:
1. pubKeyHex - public key hex
2. address - blockchain address
floCrypto.getAddress: get address respective to the blockchain
- Parameters:
1. privateKeyHex - private key (WIF)
2. strict - (optional, default=false) if false returns floID when no match of privatekey prefix found.
- Removed the options for launchStartUp
- private-key is on lock mode by default
- Added utility functions that uses private-key without entering password in .user
.sign(message): signs message
.decrypt(data): decrypts ciphertext in asymmetric
.encipher(message): encrypts message in symmetric
.decipher(data): decrypts ciphertext in symmetric
floCrypto.validateAddr: validate any blockchain address
- Parameters:
1. address - address to validate
2. std - checks for legacy version (optional, default=true) (true: allow any, array: list of versions, value: one version only, false: allow none)
3. bech - checks for bech version (optional, default=false) (true: allow any, array: list of versions, value: one version only, false: allow none)
- For validating only floID, use floCrypto.validateFloID(floID)
- Store AES-encrypted private key in memory. (exploring memory of browser will not have raw private key)
- floDapps lock/unlock (in user): locks or unlock the private key (ie, lock= Password required, unlock= password not required in returning private key)
- floDapps.launchStartUp now accepts options object
- to lock the private key on startup, pass {lock_key: true} in options objects of launchStartUp