- 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
- convert address from one blockchain to another (target version required)
- Conversions: btc_api.convert
. legacy2legacy
. legacy2bech
. bech2bech
. bech2legacy
- Added: form for WIF conversion
- Added: Input fields for private-keys of senders in sendTx
- Added: feedback/result box for sendTx panel (txid or error is displayed)
- convert compressed WIF from one blockchain to another (target privkey prefix needed)
- btc_api.pubkey: return the same if pubkey is passed. (thus address, segwitAddress, bech32Address now accepts pubkey, privkey and wif)
- btc_api.address: accepts optional parameter 'prefix' to generate address for respective blockchain (Default: 0x00 BTC)
- sendTx not signing properly when legacy is after bech32/segwit address (senders)
Solution used: sort privkey before signing the tx (legacy 1st then bech32/segwit)
- now signing works for multiple input-ids for the following
. all legacy
. all segwit/bech32
- Adding change_addr optional parameter in sendTx (if entered sends the change to given address)
- ignore unconfirmed utxos
- Adding support for multiple input IDs in sendTx
- Pass array to senders/privKeys for multiple InputIDs (both arrays should have equal length)
- Pass array to receivers/amount for multipls outputIDs (both arrays should have equal length)
- Address-keys are verified for sender pairs
- Address, amounts are validated for receiver pairs
- send tx not working when single receiver is entered (UI bug)
- View details UI: Aligned the addresses in view tx table
- sendTx: reject when total receiver amount is less than fee or zero
- re-enabled segwit and bech32 address shown in generation and retrieval (signing issue fixed in prev commit)
- view address details: remove duplicate address shown in same tx
- broadcast the rawtx via api (ajax)
- Check if the entered private key is WIF format of legacy address (sender)
UI update:
- View details: handle when tx has change sent back
- Change text-color to red when tx is unconfirmed
sendTx:
- check total balance before processing utxos
- reject "Insufficient FLO: Some UTXOs are unconfirmed" when balance is there but some utxo are used/unconfimed
- Removed default values from floGlobals
- Default values are now in their respective modules
- The following properties of floGlobals can be use to override the default values of respective modules: apiURL, sendAmt, fee, tokenURL, currency, SNStorageID
- Default/current values can be obtained from each module with getter properties
- Some current values can be set with setter properties
- The containers for appObjects, generalData, lastVC are now in floCloudAPI module. Also automatically adds get/set properties for them in floGlobals. Thus can be accessed from floGlobals as before
- Token Operator to send/receive tokens via blockchain using token system API
floBlockchainAPI v2.3.1
- Added options parameter to writeData . Options can have the following properties:
. strict_utxo : passes strict_utxo parameter to sendTx (Default: true)
. sendAmt : amount of FLO to send (Default: floGlobals.sendAmt)