diff --git a/index.html b/index.html
index f3eacb3..12fba01 100644
--- a/index.html
+++ b/index.html
@@ -1,32 +1,39 @@
-
-
-
+
+
+
+
+
+
Loading
+
+
+
+
-
-
-
-
+ /* type 1
+ expirytime payeeaddress minimumsubscriptionamount maximumsubscriptionamount contractamount
+
+ // type 2
+ expirytime userchoices contractamount minimumsubscriptionamount maximumsubscriptionamount
+ */
+
+ return obj = {};
+ });
+ }
+
+ function getContractParticipants(contract) {
+ return fetch(
+ `${tokenapiUrl}/api/v1.0/getSmartContractParticipants?contractName=${contract.name}&contractAddress=${contract.address}`
+ )
+ .then(function (response) {
+ return response.json();
+ })
+ .then(function (contractParticipants) {
+ /*let obj = {
+ blockHeight: blockInfo["height"],
+ size: blockInfo["size"],
+ transactions: "",
+ reward: blockInfo["reward"],
+ hash: blockInfo["hash"],
+ difficulty: blockInfo["difficulty"],
+ nonce: blockInfo["nonce"],
+ };*/
+ return obj = {};
+ });
+ }
+
+ function getContractTransactions(contract) {
+ return fetch(
+ `${tokenapiUrl}/api/v1.0/getSmartContractTransactions?contractName=${contract.name}&contractAddress=${contract.address}`
+ )
+ .then(function (response) {
+ return response.json();
+ })
+ .then(function (contractTxs) {
+ /*let obj = {
+ blockHeight: blockInfo["height"],
+ size: blockInfo["size"],
+ transactions: "",
+ reward: blockInfo["reward"],
+ hash: blockInfo["hash"],
+ difficulty: blockInfo["difficulty"],
+ nonce: blockInfo["nonce"],
+ };*/
+ return obj = {};
+ });
+ }
+
+ function getViewallBlocks() {
+ return fetch(
+ `${tokenapiUrl}/api/v1.0/getLatestBlockDetails?limit=100`
+ )
+ .then(function (response) {
+ return response.json();
+ })
+ .then(function (contractTxs) {
+ debugger;
+ /*let obj = {
+ blockHeight: blockInfo["height"],
+ size: blockInfo["size"],
+ transactions: "",
+ reward: blockInfo["reward"],
+ hash: blockInfo["hash"],
+ difficulty: blockInfo["difficulty"],
+ nonce: blockInfo["nonce"],
+ }; */
+ return obj;
+ });
+ }
+
+ function getViewallTxs() {
+ return fetch(
+ `${tokenapiUrl}/api/v1.0/getLatestTransactionDetails?limit=200`
+ )
+ .then(function (response) {
+ return response.json();
+ })
+ .then(function (contractTxs) {
+ let obj = {
+ blockHeight: blockInfo["height"],
+ size: blockInfo["size"],
+ transactions: "",
+ reward: blockInfo["reward"],
+ hash: blockInfo["hash"],
+ difficulty: blockInfo["difficulty"],
+ nonce: blockInfo["nonce"],
+ };
+ return obj;
+ });
+ }
+
+ function getAddressInfo(floAddress) {
+ return fetch(
+ `${tokenapiUrl}/api/v1.0/getFloAddressInfo?floAddress=${floAddress}`
+ )
+ .then(function (response) {
+ return response.json();
+ })
+ .then(function (addressInfo) {
+ // tokens
+ if (typeof addressInfo["floAddressBalances"] === "undefined") {
+ for (
+ let i = 0,
+ tokenkeys = Object.keys(addressInfo["floAddressBalances"]);
+ i < tokenkeys.length;
+ i++
+ ) { }
+ }
+
+ // contracts
+ if (typeof addressInfo["incorporatedSmartContracts"] === "undefined") {
+ for (let i = 0,
+ contractkeys = Object.keys(
+ addressInfo["incorporatedSmartContracts"]
+ );
+ i < contractkeys.length;
+ i++
+ ) { }
+ }
+
+ /*let obj = {
+ blockHeight: blockInfo["height"],
+ size: blockInfo["size"],
+ transactions: "",
+ reward: blockInfo["reward"],
+ hash: blockInfo["hash"],
+ difficulty: blockInfo["difficulty"],
+ nonce: blockInfo["nonce"],
+ };*/
+ return (obj = {});
+ });
+ }
+
+ function getAddressBalance(floAddress) {
+ return fetch(
+ `${floapiUrl}/api/addr/${floAddress}/balance`
+ )
+ .then(function (response) {
+ return response.json();
+ })
+ .then(function (addressBalance) {
+ return addressBalance;
+ });
+ }
+
+ function getAddressTxs(floAddress) {
+ return fetch(
+ `${tokenapiUrl}/api/v1.0/getFloAddressTransactions?floAddress=${floAddress}`
+ )
+ .then(function (response) {
+ return response.json();
+ })
+ .then(function (addressTxs) {
+ /*
+ let obj = {
+ blockHeight: blockInfo["height"],
+ size: blockInfo["size"],
+ transactions: "",
+ reward: blockInfo["reward"],
+ hash: blockInfo["hash"],
+ difficulty: blockInfo["difficulty"],
+ nonce: blockInfo["nonce"],
+ };
+ */
+ return (obj = {});
+ });
+ }
+
+ function getTxInfo(thisTx) {
+ return fetch(
+ `${tokenapiUrl}/api/v1.0/getTransactionDetails/${thisTx}`
+ )
+ .then(function (response) {
+ return response.json();
+ })
+ .then(function (txDetails) {
+ debugger;
+ let obj = {
+ blockHeight: blockInfo["blockDetails"]["height"],
+ size: blockInfo["blockDetails"]["size"],
+ transactions: "",
+ reward: blockInfo["blockDetails"]["reward"],
+ hash: blockInfo["blockDetails"]["hash"],
+ difficulty: blockInfo["blockDetails"]["difficulty"],
+ nonce: blockInfo["blockDetails"]["nonce"],
+ };
+ return obj;
+ });
+ }
+
+
+
+
+