Commit Graph

710 Commits

Author SHA1 Message Date
sairajzero
0381c44733 Convert fund management
- Added Withdrawal of convert fund
- Convert fund is moved to a different table (ConvertFund)
- Added APIs for withdraw fund
- Changed add-convert-fund to deposit-convert-fund
- Fixed minor bugs
2022-10-19 21:26:11 +05:30
sairajzero
970b4547cb Update Std_op 2022-10-18 04:46:15 +05:30
sairajzero
fde297fb44 Convert feature add-ons
- Reject request when not enough fund is available to convert.
- MIN_FUND  is the minimum fund that should be reserved.
- Add funds for conversion via adminID

- Added: Refund feature
- Automate a refund on currency when convertToCoin request is made when fund is insufficient
- ConvertFrom now accepts an non-broadcasted tx_hex from user and broadcast it when convert fund is available. (if convert fund is insufficient, then tx is not broadcasted)
2022-10-18 04:45:55 +05:30
sairajzero
87f0260fe4 btcOperator v1.0.11
- Added createSignedTx: creates a signed tx (same as sendTx, but doesnt broadcast)
- Added transactionID: returns the txid of the tx_hex (or tx-object)
2022-10-18 04:43:53 +05:30
sairajzero
c38b7257cf Minor fixes
floCrypto v2.3.3e
- Adding options args to toFloID function. options object accept std and/or bech properties. if specified only converts if given address are from specified version

floBlockchainAPI v2.3.3c
- Fixed: tx failing due to dust amount in change value
- readData: when passes tx option as true, now also gives senders and receivers (Set)

btcOperator v1.0.10b
- Fixed: minor bugs
2022-10-14 23:11:05 +05:30
sairajzero
d8682a2561 minor fixes: bobs fund
- Fixed: tapoutWindow and tapoutInterval storing in DB when there is no tapout
- Fixed: lockin-period and tapout check in closeFund
2022-10-11 17:46:49 +05:30
sairajzero
29bedbdcc8 Bug fixes
- Fixed: refreshData for bobs-fund and blockchain-bonds not been invoked
- Fixed: DB assignment for conversion, bonds and bobs-fund
2022-10-11 17:12:30 +05:30
sairajzero
d3f08dd921 Background process for close-fund 2022-10-11 16:56:42 +05:30
sairajzero
8a82a0b675 Close Bobs-Fund feature
- Adding feature to close bobs' fund investment upon user requests
- Added: API for the same
2022-10-11 03:15:34 +05:30
sairajzero
80879a250b Bug fix
- Fixed: incorrect eCode file mapped
- moved productStr inside IIF
- Fixed: some minor syntax bugs
2022-10-11 03:05:04 +05:30
sairajzero
7c99f41e48 API for close-blockchain-bonds 2022-10-10 19:23:20 +05:30
sairajzero
90d2a4764e Close-Blockchain-bond support
- Adding feature to close blockchain bonds upon user requests (when lock-in period is over)
- Improved some syntax and structure of coding
2022-10-10 19:22:51 +05:30
sairajzero
fef11b4712 moving conversion.js into service folder 2022-10-09 23:08:48 +05:30
sairajzero
5344b79cdb Minor Syntax improvements
- Replaced convertDateToString() to new Date() as SQL queries accepts js-object Date
- Pass nested array for bulk insert in backup-restore
2022-10-08 19:13:50 +05:30
sairajzero
a193291bd7 APIs for coin-convert feature 2022-10-07 23:02:59 +05:30
sairajzero
87e6bc01de Update floExchangeAPI.js 2022-10-07 23:01:09 +05:30
sairajzero
7d09babea7 Adding Coin-convert support
- Convert rupee token (currency) to coin (BTC) and vise-versa
2022-10-07 22:38:56 +05:30
sairajzero
bdd79a1a76 Adding support for BTC withdrawal 2022-09-30 05:52:30 +05:30
sairajzero
7d84ded426 btcOperator v1.0.10a: broadcastTx resolves txid
- When broadcast is successful, txid is resolved
- sendTx also resolves txid due to the above change
2022-09-30 05:11:09 +05:30
sairajzero
d2f1ba8cda Update std_ops 2022-09-30 04:21:58 +05:30
sairajzero
1e8f2c17e7 Fix: invoking 'collectAndCall' for withdraws 2022-09-26 01:34:26 +05:30
sairajzero
dd232c5a71 Fixes: sinkID and sinkPrivKey usage 2022-09-25 02:28:08 +05:30
sairajzero
65f7a5d94e Improved sink-key management
- multiple sink keys supported
- sink keys are split and shared among nodes (master and slaves)
- when a key is required, master collects the shares from slaves and reconstructs. (key is removed from memory after usage)
2022-09-25 01:06:08 +05:30
sairajzero
084ffe10e2 btcOperator v1.0.10: parseTransaction
- Added parseTransaction: parse the given transaction
Parameters:
tx : transaction hex (or tx object from coinjs.transaction)
Resolves: parsed object
2022-09-11 22:36:50 +05:30
sairajzero
39d34f6e8c floCloudAPI v2.4.2e
- Adding generalDataset to floGlobals: returns the filtered general data set. (Parameters type and options)
2022-09-04 04:09:27 +05:30
sairajzero
04aad28600 Improved auto-fee calc
- createTx and createMultiSigTx will now resolve an object with tx_hex and other values (amount, size, etc)
2022-08-25 03:04:56 +05:30
sairajzero
77ff76d787 Replacing Math.random with securedMathRandom 2022-08-22 22:06:14 +05:30
sairajzero
7b5a5e6bfe Bug fixes and improvements
floCrypto v2.3.3b
floCloudAPI v2.4.2d
floDapps v2.3.2d
2022-08-21 21:14:29 +05:30
sairajzero
67386fd69f Update btcOperator.js
- Added checkIfSameTx(tx1, tx2): checks if the transactions is of the same
2022-08-16 20:39:49 +05:30
sairajzero
dc19a4e565 Bug fixes: floBlockchainAPI and lib.js 2022-08-16 17:30:46 +05:30
sairajzero
f0a4837222 btcOperator v1.0.7c
- 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
2022-08-16 03:24:55 +05:30
sairajzero
6e5cdbd820 floCrypto v2.3.3b
- 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
2022-08-16 03:11:24 +05:30
sairajzero
36a4067d67 bug fix 2022-08-16 00:37:38 +05:30
sairajzero
45878e6ebe Update floDapps.js
- myFloID, myPubKey, myPrivKey will now return undefined when user not logged in
2022-08-14 18:38:29 +05:30
sairajzero
91e6b82387 btcOperator v1.0.7b
- Added: signTx
- Added multiSigAddress
2022-08-10 02:58:36 +05:30
sairajzero
bc44405102 btcOperator v1.0.7a
- Adding auto fee calculation
- Optimized the code
- Fixed minor bugs
2022-08-09 03:19:56 +05:30
sairajzero
4244774635 btcOperator v1.0.7
- 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)
2022-08-03 03:54:58 +05:30
sairajzero
9dd132b145 Update README.md 2022-07-28 02:45:56 +05:30
sairajzero
4bced4352d floDapps, floCloudAPI: retain blkchain id on login
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
2022-07-28 02:27:07 +05:30
sairajzero
f673d3f37a floCrypto v2.3.3a
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.
2022-07-28 02:11:48 +05:30
sairajzero
2b8e77b5f7 Bug fixes
- floCrypto.validateAddr: bech default=true
- floCloudAPI: proxyID
- commented coinjs api vars
2022-07-26 15:16:22 +05:30
sairajzero
8a211be849 Adding btcOperator module 2022-07-24 20:33:45 +05:30
sairajzero
0526a1f29f floCloudAPI v2.4.2: cross-blockchain receiverID
- Accept any blockchain ID as receiverID and automatically convert it into floID
2022-07-24 02:34:02 +05:30
sairajzero
fa3d790c6c floDapps v2.3.2: lock privkey by default
- 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
2022-07-24 02:29:04 +05:30
sairajzero
0a74e393ed floCrypto v2.3.2: validate any address
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)
2022-07-19 21:21:06 +05:30
sairajzero
fcc5f3ce4e Edit library to accept WIF of other versions 2022-07-17 17:04:03 +05:30
sairajzero
b80bd43313 floDapps, floCloudAPI: Secure private key
- 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
2022-07-17 17:02:27 +05:30
sairajzero
5ab0bc36f0 Update floCrypto.js
- Removing explicit use of BigInteger in signing(/verify-sign) data
2022-07-16 03:32:44 +05:30
sairajzero
cfc36b80cd Secure private key using capsule 2022-07-16 03:30:03 +05:30
Sai Raj
80b4a8b9fe
Merge pull request #9 from ranchimall/master
Update README.md
2022-07-12 19:13:20 +05:30