commit 58bc1000077a40dedab1dc72fac14c0f4a115d98 Author: Keerthana.A.V <85394235+Keerthana-A-V@users.noreply.github.com> Date: Tue Nov 23 22:23:47 2021 +0530 Add files via upload diff --git a/index.html b/index.html new file mode 100644 index 0000000..d2a7632 --- /dev/null +++ b/index.html @@ -0,0 +1,11336 @@ + + + + + + + FLO_Operations + + + + + + + + + + + + + +

+

+
+ Cancel + OK +
+
+ +

+

+ +
+ Cancel + OK +
+
+ + +

Send Tx


+

Parameters:



+

+ sendTx sends a transaction to blockchain, resolves transaction id if the transacation was succsessful.
+ + senderAddr - FLO address from which the data and amount has to be sent.
+ receiverAddr - FLO address to which has to be sent.
+ sendAmt - Amount of FLO coins to be sent to receiver.
+ PrivKey - Private key of sender to verify sender.
+ floData - FLO data (string, max 1040 characters) (optional, default value is empty string)
+ Resolves: TransactionID (String)
+

+
+ +

SendTx Multiple


+

Parameters:



+

+ sendTxMultiple sends a transaction to blockchain from multiple floIDs to multiple floIDs, resolves transaction id if the transacation was succsessful.
+ + senderPrivKeys - Array of Private keys of the senders (or) Object of private keys with sendAmount for each floID (eg: { privateKey1: sendAmt1, privateKey2: sendAmt2...}) . Note: If passed as Array, then ratio of the balance of the senders are preserved. If passed as Object uses the amount given.
+ receivers - Object of receiver floIDs with receive amount (eg: {receiverID1: receiveAmt1, receiver2: receiveAmt2...})
+ floData - FLO data (string, max 1040 characters) (optional, default value is empty string)
+ Resolves: TransactionID (String)
+

+
+ +

Merge UTXOs


+

Parameters:



+

+ mergeUTXOs sends a transaction to blockchain that merges all utxos of the given floID.
+ + floID - FLO address of which the utxos should be merged.
+ privKey - private key of the floID.
+ floData - FLO data (string, max 1040 characters) (optional, default value is empty string)
+ Resolves: TransactionID (String)
+

+
+ +

Read Tx


+

Parameters:



+

+ readTxs reads transactions of specified address between from and to.
+ + addr - FLO address for which the transactions has to be read.
+ from - Reading transactions starts from 'from'.
+ to - Reading transactions ends on 'to'.
+ Resolves: TransactionData (Object)
+

+
+ +

Read all Tx's


+

Parameters:



+

+ readAllTxs reads all transactions of specified address(newest first).
+ + addr - FLO address for which the transactions has to be read.
+Resolves: TransactionData (Object)
+

+
+ +

Get Balance


+

Parameters:



+

+ getBalance requests balance for specified FLO address.
+ + addr - FLO address for which balance has to be retrieved
+ Resolves: balance (Number)
+

+
+ +

Read Data


+

Parameters:



+

+ readData reads FLO data from transactions of specified address
+ + addr - FLO address for which the transactions data has to be read.
+ options - Contains options for filter data from transactions.
+ limit : maximum number of filtered data (default = no limit)
+ ignoreOld : ignore old transactions (default = 0)
+ sentOnly : filters only sent data
+ pattern : filters data that contains pattern as an object key in the JSON string
+ filter : custom filter funtion for floData (eg . filter: d => {return d[0] == '$'})
+ Resolves: Object {totalTxs, floData (Array)}
+

+
+ +

Write Data


+

Parameters:



+

+ writeData writes data into blockchain, resolves transaction id if the transacation was succsessful.
+ + senderAddr - FLO address from which the data and amount has to be sent.
+ Data - FLO data (string, max 1040 characters)
+ receiverAddr - FLO address to which has to be sent. (Default is specified in floGlobals.adminID)
+ PrivKey - Private key of sender
+ Resolves: TransactionID (String)
+

+
+ +

Write Data Multiple


+

Parameters:



+

+ writeDataMultiple writes data into blockchain from multiple floIDs to multiple floIDs, resolves transaction id if the transacation was succsessful.
+ + senderPrivKeys - Array of Private keys of the senders.
+ Data - FLO data (string, max 1040 characters)
+ receivers - Array of receiver FLO Addresses. (Default is specified in floGlobals.adminID)
+ preserveRatio - boolean (true: preserves the ratio of the balance of senders, false: all senders contribute equal amount to the transaction) (optional, default is true)
+ Resolves: TransactionID (String)
+

+
+ +
+

Verify Private key

+

+

Parameters:


+ +
+ +

Generate new FLO ID:


+

Parameters:


+ +
+ +

Calculate FLO ID


+

Parameters:


+ +

+ +

Calculate Public Key HEX


+

Parameters:


+ + +

+ +

Generate Random Integer

+

+

Parameters:


+ +

+
+ +

Generate Random String



+

Parameters:


+ +
+

Options:

+

Set "TRUE" if you wish to generate a alphanumeric string, Set "FALSE" if you wish to generate a string without numbers.

+

+ +

Sign Data


+

Parameters:


+ + +

+ +

Verify Private Key



+

Parameters:


+ + +
+ +

Validate FLO Id



+

Parameters:


+ +
+ +

Verify Signature



+

Parameters:


+ +

+ +

Create Shamir's Secret shares



+

Parameters:


+ +

+ +

Retrieve Shamir's Secret



+

Parameters:


+ +

+ +

Verify Shamir's Secret



+

Parameters:


+ +

+ +

Data Encryption



+

Parameters:


+ +

+
+ +

Decrypt Data



+

Parameters:


+ +

+ + +

sendGeneralData


+ +
  • message - data to be sent
  • +
  • type - type of the data
  • +
  • options -this parameter is optional
  • + +
  • Options
  • + + +

    + Never use senderIDs in SEND GENERAL DATA options. The system + automatically picks the FLO ID of the sender from FLO Globals. Its a + common mistake developers make. +

    + +

    + Type is mandatory in SEND GENERAL DATA because without at least one data + identifier like TYPE, the message cannot be retrieved back. +

    + +

    + Application field is used by the Cloud to judge whether this message + should be deleted after 7 days, or stored permanently. Developers should + be careful not to change value of application field if the default value + enables the message to be stored permanently. Currently messages sent + from subadmins to any receiverID for applications notified by the cloud + in the FLO Blockchain are stored permanently. So do not change + application field as a caution. Use the comment field. +

    +
    + + +

    requestGeneralData

    +

    + The results are available in floGlobals.generalData after the request + promise has been resolved +

    + +

    + floDapps.getNextGeneralData should be used to retrieve the output in the + client browser where the retrieval from floGlobals.generalData has been + simplified. +

    + +

    + Type is mandatory in REQUEST GENERAL DATA. So every TYPE of general data + must be requested individually and separately. If you want to use + requests to give results from all types at one go, use Application Data. +

    + +

    + Application field is used by the Cloud to judge whether this message + should be deleted after 7 days, or stored permanently. Developers should + be careful not to change value of application field if the default value + enables the message to be stored permanently. Currently messages sent + from subadmins to any receiverID for applications notified by the cloud + in the FLO Blockchain are stored permanently. So do not change + application field as a caution. Use the comment field. +

    +
    + + +

    resetObjectData


    +
    +

    + Note: The object data corresponding with Object Name must be defined in + floGlobals.appObjects[objectName] before a reset or update can be done. +

    + +

    + Note: Never use senderIDs in RESET and UPDATE. The system automatically + picks the FLO ID of the sender from FLO Globals. Its a common mistake + developers make. +

    + +

    + Note: Type field is never used in RESET, UPDATE or REQUEST operations in + Object Data. Type field is internally blocked for Object Data. +

    +
    + +

    Request Object Data


    + +

    + The output is available in floGlobals.appObjects[objectName] after + request Object Data promise is resolved. +

    + +

    + Type field is never used while RESET, UPDATE or REQUEST operations in + Object Data. Type field is internally blocked for Object Data. +

    + +

    + Application field is used by the Cloud to judge whether this message + should be deleted after 7 days, or stored permanently. Developers should + be careful not to change value of application field if the default value + enables the message to be stored permanently. Currently messages sent + from subadmins to any receiverID for applications notified by the cloud + in the FLO Blockchain are stored permanently. So do not change + application field as a caution. Use the comment field. +

    +
    + + +

    sendApplicationData


    +
    +

    + Results will be available in + promise.resolve(requestApplicationData(..)), and user will have to + handle the response himself. +

    + +

    + TYPE is mandatory while SEND APPLICATION DATA but not in REQUEST + APPLICATION DATA. This enables a single Application Data request to + fetch across all TYPES +

    + +

    + We recommend developers to use either objectData or GeneralData as we + provide inbuilt data synchronization with cloud in them. If developer + wants to receive response across all TYPES, or he is interested in doing + request response management of the promise himself, he should use + Application Data. +

    + +

    + Application Data results are not stored in local IndexedDB by Standard + Operations Framework. If a blank REQUEST APPLICATION DATA is made, then + cloud will give all application data at the admin ID of the application. +

    + +

    + Application field is used by the Cloud to judge whether this message + should be deleted after 7 days, or stored permanently. Developers should + be careful not to change value of application field if the default value + enables the message to be stored permanently. Currently messages sent + from subadmins to any receiverID for applications notified by the cloud + in the FLO Blockchain are stored permanently. So do not change + application field as a caution. Use the comment field. +

    +
    + + +

    Request Application Data


    +
    +

    + Important: Never use senderIDs in SEND DATA options. The system + automatically picks the FLO ID of the sender from FLO Globals. Its a + common mistake developers make. +

    + +

    + Type is mandatory in SEND APPLICATION DATA because without at least one + data identifier like TYPE, the message cannot be retrieved back +

    + +

    + Application field is used by the Cloud to judge whether this message + should be deleted after 7 days, or stored permanently. Developers should + be careful not to change value of application field if the default value + enables the message to be stored permanently. Currently messages sent + from subadmins to any receiverID for applications notified by the cloud + in the FLO Blockchain are stored permanently. So do not change + application field as a caution. Use the comment field. +

    +
    + + +
    +
    + + +
    + + Blockchain API Operations + Crypto Operations + Cloud Operations + + + +
    +
    +
    +

    FLO Blockchain API Operations

    +

    + In this page we have, Transactions, Read and Write sections. +

    +
    +
    + + Transactions + Read + Write +
    + + +
    + +
    +

    SendTx

    +

    + It is used to send a transaction to blockchain, resolves transaction id if the transacation was succsessful. +

    +
    +
    +

    SendTx multiple

    +

    + It is used to send a transaction to blockchain from multiple floIDs to multiple FLO Id's. +

    +
    +
    +

    Merge UTXOs

    +

    + It is used to send a transaction to blockchain that merges all utxos of the given FLO Id. +

    +
    +
    +

    ReadTx

    +

    + It is used to read transactions of specified address between from and to. +

    +
    +
    +

    ReadallTx

    +

    + It is used to read all transactions of specified address(newest first). +

    +
    +

    + +
    +

    Send Tx


    +

    + It is used to send a transaction to blockchain, resolves transaction id if the transacation was succsessful. +

    +

    Syntax: floBlockchainAPI.sendTx(senderAddr, receiverAddr, sendAmt, PrivKey, floData = '')
    + Read more about SendTx>>> +

    + + + + + + + SEND + +
    +
    +

    +
    +


    + +
    +

    Send Tx Multiple


    +

    + It is used to send a transaction to blockchain from multiple floIDs to multiple FLO Id's. +

    +

    Syntax: floBlockchainAPI.sendTxMultiple(senderPrivKeys, receivers, floData = '')
    + Read more about SendTx Multiple>>> +

    + + + ADD + CLEAR + + + ADD + CLEAR +
    + + SEND +
    +
    +
    +

    +
    +


    + + +
    +

    MergeUTXO's


    +

    + It is used to send a transaction to blockchain that merges all utxos of the given FLO Id. +

    +

    Syntax: floBlockchainAPI.mergeUTXOs(floID, privKey, floData = '')
    + Read more about Merge UTXO's>>> +

    + + + + + MERGE + +
    +
    +

    +
    +


    + +
    +

    Read Tx


    +

    + It is used to read transactions of specified address between from and to. +

    +

    Syntax: floBlockchainAPI.readTxs(addr, from, to)
    + Read more about ReadTx>>> +

    + + + + + READ + +
    +
    +

    +
    +
    +
    +


    + + +
    +

    Read all Tx's


    +

    + It is used to read all transactions of specified address(newest first). +

    +

    Syntax: floBlockchainAPI.readTxs(addr)
    + Read more about ReadallTx's>>> +

    + + + READ + +
    +
    +

    +
    +


    + +
    + +
    + +
    +

    Get Balance

    +

    + It is used to fetch the Balance of an FLO Id. +

    +
    +
    +

    Read Data

    +

    + It is used to read FLO data from transactions of specified address. +

    +
    + +

    + +
    +

    Get Balance


    +

    + It is used to fetch the Balance of an FLO Id. +

    +

    Syntax: floBlockchainAPI.getBalance(addr)
    + Read more about Get Balance>>> +


    + +
    + REQUEST
    +
    +
    +
    +
    +
    +
    + + +
    +

    Read Data


    +

    + It is used to read FLO data from transactions of specified address. +

    +

    Syntax: floBlockchainAPI.readData(addr, options = {})
    + Read more about Read Data>>> +

    + + +

    --------OPTIONS--------

    + + + + + + READ +
    +
    +
    +
    +
    +
    +


    +
    + +
    + +
    +

    Write Data

    +

    + It is used to write data into blockchain, resolves transaction id if the transacation was succsessful. +

    +
    +
    +

    Write Data Multiple

    +

    + It is used to writes data into blockchain from multiple FLO ID's to multiple FLO ID's, resolves transaction id if the transacation was succsessful. +

    +
    +

    +
    +

    Write Data


    +

    + It is used to write data into blockchain, resolves transaction id if the transacation was succsessful. +

    +

    Syntax: floBlockchainAPI.writeData(senderAddr, Data, PrivKey, receiverAddr = floGlobals.adminID)
    + Read more about Write Data>>> +

    + + + + + + WRITE + +


    +
    +
    +
    +
    + +
    +

    Write Data Multiple


    +

    + It is used to writes data into blockchain from multiple FLO ID's to multiple FLO ID's, resolves transaction id if the transacation was succsessful. +

    +

    Syntax: floBlockchainAPI.writeDataMultiple(senderPrivKeys, data, receivers = [floGlobals.adminID], preserveRatio = true)
    + Read more about Write Data Multiple>>> +

    + + + PUSH + CLEAR + + PUSH + CLEAR +
    + + + WRITE +
    +
    +
    +
    +
    +


    +
    +
    + +
    + +
    +
    +
    +

    FLO Crypto Operations

    +

    + In this page we have, Generate, Verify, Shamir's Secret Shares and Encrypt & Decrypt sections. +

    +
    +
    + + Generate + Verify + Shamir's Secret + Encrypt&Decrypt +
    + +
    + +
    +

    Generate FLO ID

    +

    + To generate a new set of FLO ID,private key, Public key. +

    +
    +
    +

    Calculate FLO ID

    +

    + To calculate FLO ID using Private or Public key. +

    +
    +
    +

    Calculate Public key

    +

    + To Calculate Public key using private key. +

    +
    +
    +

    Random Integer

    +

    + To Generate a Random Integer by providing minimum and maximum values. +

    +
    +
    +

    Random String

    +

    + To Generate Random String by its length. +

    +
    +
    +

    Sign Data

    +

    + To sign data using Private key. +

    +
    +

    + +

    +

    Generate new FLO ID:


    +

    To generate new set of FLO ID, click the GENERATE button.

    +

    Syntax: floCrypto.generateNewID()
    + + Read more about Generate new FLO ID>>>

    + + +
    + +GENERATE
    +
    +
    +
    +
    +
    +
    + +
    +
    + + + +
    +

    Calculate FLO ID

    +

    To get FLO ID using your Private key or Public key,click on CALCULATE button.

    +

    Syntax: floCrypto.getFloID(publickey_or_privateKey)
    + Read more about Calculate FLO ID>>>

    + +
    +
    + +CALCULATE
    +
    +
    +
    +
    + + + +
    +

    Calculate Public Key HEX

    +

    To get the Public key using your Private key, click the CALCULATE button.

    +

    Syntax: floCrypto.getPubKeyHex(privateKey)
    + Read more about Calculate Public Key Hex>>>

    +
    + + + CALCULATE

    +
    +
    +
    +
    + + + +
    +

    Generate Random Integer

    +

    To Generate Random integer click on, GENERATE button.

    +

    Syntax: floCrypto.randInt(min, max)
    + Read more about Generate Random Integer>>>

    + +


    + + + + + GENERATE

    + +
    +
    +
    +
    + + + +
    +

    Generate Random String

    +

    To Generate Random string click on, GENERATE button.

    +

    Syntax: floCrypto.randString(length, alphaNumeric)
    + + Read more about Generate Random String>>>

    + +


    + + + + GENERATE

    +
    +
    +
    +
    + +
    +
    +
    + + + +

    +

    Sign Data

    +

    To Sign the data, click on SIGN button.

    +

    Syntax: floCrypto.signData(data, privateKey)
    + Read more about Sign Data>>>

    + +
    + + + + SIGN

    + +
    +
    +
    +
    +
    + +


    + +
    +
    + +
    +

    Verify Private Key

    +

    + To Verify Private key using Public key or FLO Id. +

    +
    +
    +

    Validate FLO ID

    +

    + To Validate FLO ID is correct or not. +

    +
    +
    +

    Verify Signature

    +

    + To Verify Signature using the Public key. +

    +
    +

    + + +
    +

    Verify Private key

    +

    To verify the Private key using Public or FLO ID, click on VERIFY button.

    +

    Syntax: floCrypto.verifyPrivKey(privateKey, pubKey_floID, *isfloID)
    + Read more about Verify Private Key>>>

    + +
    + + + + VERIFY

    +
    +
    +
    +
    + + + +
    +

    Validate FLO Id

    +

    To Validate FLO ID click on, VALIDATE button.

    +

    Syntax: floCrypto.validateAddr(floID)
    + Read more about Validate FLO ID>>>

    +
    + + + VALIDATE

    +
    +

    +
    +
    + + +
    +

    Verify Signature

    +

    To Verify Signature ,click on VERIFY button.

    +

    Syntax: floCrypto.verifySign(data, signature, publicKey)
    + Read more about Verify Signature>>>

    +
    + + + + + VERIFY

    +
    +
    +
    +
    +
    +
    + +
    +
    + +
    +

    Create Shamir's Secret Shares

    +

    + To Create Shamir's Secret Shares By providing the number of shares and threshold limit. +

    +
    +
    +

    Retrieve Shamir's Secret

    +

    + To retrieve Shamir's secret by providing Shares created. +

    +
    +

    Verify shamir's Secret

    +

    + To Verify Shamirs Secret shares by providing the shares and the original strig. +

    +
    + +


    + + +
    +

    Create Shamir's Secret shares

    +

    To Create Shamir's Secret click on, CREATE button.

    +

    Syntax: floCrypto.createShamirsSecretShares(str, total_shares, threshold_limit)
    + Read more about Create Shamir's Secret>>>

    + +
    + + + + + CREATE

    +
    +
    +
    +
    +
    +
    +
    +
    + + + +
    +

    Retrieve Shamir's Secret

    +

    To Retrieve Shamir's Secret shares click on, RETRIEVE button.

    +

    Syntax: floCrypto.retrieveShamirSecret(sharesArray)
    + Read more about Retrieve Shamir's Secret>>>

    + +
    +

    + + PUSH

    + RETRIEVE + RESET +

    +
    +
    + +
    +
    +
    + + + +
    +

    Verify Shamir's Secret

    +

    To Verify Shamir's Secret shares click on, VERIFY button.

    +

    Syntax: floCrypto.verifyShamirsSecret(sharesArray, str)
    + Read more about Verify Shamir's Secret>>>

    + +
    + + + PUSH
    + + VERIFY + RESET
    +
    +
    +
    +
    +
    +
    + +
    +
    + +
    +

    Encrypt Data

    +

    + To Encrypt the data using Public key. +

    +
    +
    +

    Decrypt Data

    +

    + To Decrypt the data using Private key. +

    +
    +
    + + +

    +
    +

    Data Encryption

    +

    To Encrypt the data, click on ENCRYPT button.

    +

    Syntax: floCrypto.encryptData(data, publicKey)
    + Read more about Data Encryption>>>

    + + +
    + + + + ENCRYPT
    +
    +

    +
    +
    +
    +
    +
    + +
    + + + + +
    +

    Decrypt Data

    +

    To Decrypt data click on, DECRYPT button.

    +

    Syntax: floCrypto.decryptData(data, privateKey)
    + Read more about Decrypt Data>>>

    + +
    + + + + + + DECRYPT

    +
    +
    +
    +
    +
    + +
    + +
    +
    +
    + +
    +
    +
    +

    FLO Cloud Operations

    +

    + In this page we have, Application Data, General Data and Object Data sections. +

    +
    +
    + + Application Data + General Data + Object Data +
    + +
    + +
    +

    Send Application Data

    +

    + To Send Application Data sends
    data to the cloud. +

    +
    +
    +

    Request Application Data

    +

    + Request Application Data requests the
    application data from the cloud. +

    +
    +

    +
    +

    Send Application Data


    +

    + Send Application Data sends application data to the cloud.
    + Read more about Send Application Data>>> +

    +

    Syntax:floCloudAPI.sendApplicationData(message, type, options = {})

    +
    +
    + + + + + + +

    ------SET OPTIONS------

    + + + + + + + SEND +
    +


    +
    + +
    +

    Request Application Data


    +

    + Request Application Data requests application data from the cloud.
    + Read more about Request Application Data>>>

    +

    Syntax:floCloudAPI.requestApplicationData(options = {})

    +
    + +
    +

    ------SET OPTIONS------

    + + + + + + + + + + + + + + + + REQUEST +
    +
    +
    +
    + +
    +

    Send General Data


    +

    + Send General Data sends
    general data to the cloud. +

    +
    +
    +

    Request General Data


    +

    + Request General Data requests
    application data from the cloud. +

    +
    +
    +
    +

    Send General Data


    +

    + Send General Data sends general data to the cloud.
    + Read more about sendGeneralData>>> +

    +

    Syntax : floCloudAPI.sendGeneralData(message, type, options = {})

    +
    + +
    + + + + + +

    ------SET OPTIONS------

    + + + + + + + SEND +
    +
    +

    + +
    +

    Request General Data


    +

    + Request General Data requests application data from the cloud.
    + Read more about Request General Data>>> +

    + +

    Syntax : floCloudAPI.requestGeneralData(type, options = {})

    +
    + +
    + + + +

    ------SET OPTIONS------

    + + + + + + + + + + + + + + + + REQUEST + +
    +
    +
    +
    + +
    +

    Reset Object Data

    +

    + resetObjectData resets the objectData to cloud +

    +
    +
    +

    Update Object Data

    +

    + updateObjectData updates the objectData to cloud. +

    +
    +
    +

    Request Object Data

    +

    + requestObjectData requests application data from the cloud. +

    +
    +

    +
    +

    Reset Object Data


    +

    + Reset Object Data resets the objectData to cloud.
    + Read more about resetObjectData>>> +

    +

    Syntax : floCloudAPI.resetObjectData("objectName", options = {}) +

    +
    + +
    + + + +
    +

    Key-Value Pairs

    +
    + + + + +
    + + +
    +
    +
    + +

    ------SET OPTIONS------

    + + + + + + RESET +
    +


    + +
    +

    Update Object Data


    +

    + Update Object Data updates the objectData to cloud.
    + Read more about updateObjectData>>> +

    +

    Syntax : floCloudAPI.updateObjectData("objectName", options = {}) +

    +
    + +
    + + + +
    +

    Key-Value Pairs

    +
    + + + + +
    + + +
    +
    +
    + +

    ------SET OPTIONS------

    + + + + + + + Update +
    +


    + +
    +

    Request Object Data


    +

    + Request Object Data requests application data from the cloud. + Read more about requestObjectData>>> +

    +

    Syntax : floCloudAPI.requestObjectData("objectName", options = {}) +

    +
    + +
    + + + +

    ------SET OPTIONS------

    + + + + + + + + + + + + + + + + REQUEST +
    +



    +
    +
    +
    +
    +
    + + + + + + + + + + + + + + + + + + \ No newline at end of file