Züs
Search
K

Creating Constants

1
const newWallet = {
2
clientId: "7d35a6c3ba5066e62989d34cee7dd434d0833d5ea9ff00928aa89994d80e4700",
3
privateKey:
4
"5ababb1e99fe08e44b9843a0a365a832928f9e1aa2d6bba24e01058f1bf0e813",
5
publicKey:
6
"5b7ce801f11b5ce02c2ff980469b00e7ed34a9690977661b0cc80bc5eb33ee13baaf6b099f38a2586c5ff63c576870829c117e392fc40868e4bd6418dbaf389c",
7
};
8
9
export default function Home() {
10
const [message, setMessage] = useState("");
11
const [balance, setBalance] = useState(0);
12
const [allocationList, setAllocationList] = useState([]);
13
const [selectedAllocation, setSelectedAllocation] = useState();
14
const [allocationDetails, setAllocationDetails] = useState();
15
const [filesForUpload, setFilesForUpload] = useState([]);
16
const [fileList, setFilesList] = useState([]);
17
const [destFileList, setDestFilesList] = useState([]);
18
const [selectedFile, setSelectedFile] = useState();
19
const [clientId, setClientId] = useState(newWallet.clientId);
20
const [privateKey, setPrivateKey] = useState(newWallet.privateKey);
21
const [publicKey, setPublicKey] = useState(newWallet.publicKey);
22
const [sendTo, setSendTo] = useState(
23
"0ab9c5ab5effbe47db31299aff6464e7b447e7fb372109758c0d9dcd596b5429"
24
);
25
const [sendAmount, setSendAmount] = useState("10000000000");
26
const [authTicket, setAuthTicket] = useState(
27
"eyJjbGllbnRfaWQiOiIiLCJvd25lcl9pZCI6IjdkMzVhNmMzYmE1MDY2ZTYyOTg5ZDM0Y2VlN2RkNDM0ZDA4MzNkNWVhOWZmMDA5MjhhYTg5OTk0ZDgwZTQ3MDAiLCJhbGxvY2F0aW9uX2lkIjoiMDZmNzRhYWE1OWVmM2E5M2I1NmNkM2E3NTMxODlkODkzNjMzMDllYzk4NWNmMTRiMmMyMTBkYzhkYTFkZmVhNyIsImZpbGVfcGF0aF9oYXNoIjoiODc1MTA4NDFhZDJkZjViZjUwMTA3Yzg1MWNmMDU0ZDVkYzc0YTU2ZTg0NjFjYzBmYmNhZTMzNGVhNzJmNWRlYSIsImFjdHVhbF9maWxlX2hhc2giOiI1ZWRiN2E5ZTIyM2ZkMzVlODczYzJhMzQzZjFhZWZjMGE5ZjE0MWY0YzdkZDZmNzYxOTA4N2YxNGI1OGUyYjU2IiwiZmlsZV9uYW1lIjoiMS5wbmciLCJyZWZlcmVuY2VfdHlwZSI6ImYiLCJleHBpcmF0aW9uIjowLCJ0aW1lc3RhbXAiOjE2NzY0NDQ4OTgsImVuY3J5cHRlZCI6ZmFsc2UsInNpZ25hdHVyZSI6IjcxNzhiODBjYjQ1M2Q3NWUyYzg1YThiNTM4YjAxYjQ1ZTBhY2UwYjdmOGZiZmNjN2RlYzE3NTQ5OTNiZmUwOTMifQ=="
28
);
29
const [allocationSize, setAllocationSize] = useState(2147483648);
30
const [dirName, setDirName] = useState("/test");
31
const [output, setOutput] = useState("");
32
const [encryptKey, setEncryptKey] = useState("");
33
const [mnemonic, setMnemonic] = useState(
34
"plunge tray magic student meat basic wheel mountain elevator neglect ginger oyster gallery hen ensure roast lake stage color oval antenna plug orchard initial"
35
);
36
const [txHash, setTxHash] = useState("abc");
37
38
const configJson = {
39
chainId: "0afc093ffb509f059c55478bc1a60351cef7b4e9c008a53a6cc8241ca8617dfe",
40
signatureScheme: "bls0chain",
41
minConfirmation: 50,
42
minSubmit: 50,
43
confirmationChainLength: 3,
44
blockWorker: "https://dev.zus.network/dns",
45
zboxHost: "https://0box.dev.zus.network",
46
zboxAppType: "vult",
47
};
48
49
const config = [
50
configJson.chainId,
51
configJson.blockWorker,
52
configJson.signatureScheme,
53
configJson.minConfirmation,
54
configJson.minSubmit,
55
configJson.confirmationChainLength,
56
configJson.zboxHost,
57
configJson.zboxAppType,
58
];
59
Here is the list of variables and their description
message: Track Message balance : Track Wallet Balance allocationList : Track List of Allocations selectedAllocation : Track Selected Allocation allocationDetails : Track Allocation Details filesForUpload : TrackList of files selected for upload fileList : Track all available files. destFileList : Track list of all files available at the destination. selectedFile : Track the selected file by the user. clientId : Track value of wallet clientID privateKey : Track Value of wallet private key. publicKey: Track Value of wallet public key. sendTo : Track value of sendTo Wallet Client ID sendAmount : Track the amount send to sender's wallet. authTicket : Track the wallet AuthTicket. allocationSize : Track allocation Size.Current is 2GB dirName:Track directory name ("/test"); output : Track output . encryptKey : Track Wallet Encryption Key mnemonic : Track Wallet Mnemonic Phrase txHash : Track Transaction Hash configJson: Contains data related to Züs network