Added startUpOptions
- cloud: (DEFAULT=true). set to false for app that doesnt require floCloudAPI module
- app_config: (DEFAULT=true). set to false for app that doesnt require configs from adminID (via blockchain)
Only for Testing purpose
- Added quick param: pass quick in url query to ignore onLoadStartup
- Added testnet param: pass testnet in url query to change blockchain to FLO_TEST (testnet FLO)
- Added checkSigned: check if the tx is signed or not (if optional args is passed as false, returns a detailed array indicating if each input is signed or not)
- Added checkIfSameTx: check if the passed 2 tx are same or not (ie, input, output and flodata are same or not)
- Added transactionID: returns the transaction id of the tx hex
- Added createTx: create unsigned tx (resolves tx-hex )
- Updated createMultisigTx: resolve tx-hex instead of tx object
- Added signTx: (synchronized fn) sign the given tx (hex or object) with given private key and returns the signed txhex
- pass tx_data (hex or byte array) to bitjs.transaction to deserialize the transaction
ie, `tx = bitjs.transaction(tx_data)`
- invoking without any parameter `bitjs.transaction()` will create an empty tx as before (no change)
- Added toMultisigFloID: converts given multisig address to FLO multisig ID
- Improved verifyPubKey: also support verifying multisig redeemScript for the multisig address
- Improved isSameAddr: supports multisig bech32
- Improved decodeAddress: supports multisig bech32
- pubkeys2MultisigAddressBech32: returns another value 'scripthash'
- Fixed multisigBech32Address: returning scripthash as redeemScript. (now returns both scripthash and redeemScript
Changes:
- multisig addresses are accepted as receiver address in all send-tx fns
- multisig addresses are accepted in query fns
- sendTx: sender can be regular address only
Added 3 multisig transaction fns:
- createMultisigTx: creates unsigned tx for multisig sender
- sendMultisigTx: create signed multisig tx and broadcast it
- writeMultisigData: same as writeData(), but for multisig
- Added getMultisigAddress(pubkeys, required_sigs): returns a multisig address from given pubkey list and required signatures
- Added decodeRedeemScript (redeemScript): decodes the given redeemscript (of multisig)
- Updated validateFloID: now validates FLO regular and multisig address. optional argument regularOnly(default=false) if true validates only FLO regular address.
- Bitcoin.Address now supports multisg version
- new Bitcoin.Address (hex) will now assign the respective version when its regular or multisig address
- Added constants: Bitcoin.Address
.standardVersion= 0x23
.multisigVersion = 0x5e
.testnetVersion = 0x73
- Updated tx.addflodata: will now check if the data is valid or not
- Optimized tx.serialize: changed complex code for appending flodata to a simple one
- Added bitjs.strToBytes: converts string (ascii) to strToBytes
- Added bitjs.pubkeydecompress: decompresses the public key
- Added bitjs.verifySignature: verify the signature (of hash and pubkey)
- Added getTx.hex(txid): resolves the tx hex of the txid
- Update: api responses are checked for response.ok
- Fixed: getTx giving incorrect confirmation value for unconfirmed tx