diff --git a/src/test/resources/demo-node-ui.html b/src/test/resources/demo-node-ui.html new file mode 100644 index 00000000..33c70ac1 --- /dev/null +++ b/src/test/resources/demo-node-ui.html @@ -0,0 +1,181 @@ + + + + + + + + +
+ + + + + + + + + +
+
+ Peers management goes here +
+ +
+
+ Minting address: + <-- filled in from entries found in window.localStorage +
+ Recipient address:
+ Percentage (0 to 100):
+ +

+ + "Submit" should then use recipient's address to find recipient's public key.
+ Use recipient's public key to generate proxy private key.
+ Use proxy private key to calculate proxy public key.
+ use proxy public key to build and submit PROXY_FORGING transaction. +

+ If minting address's private key is not available decrypted then do pop-up asking for password then decrypt and save into cachedPrivateKeys.
+ See <script> code in this page's source. +

+ If recipient does not have public key yet (fetch using API) then do pop-up asking if minting account should send small amount of QORA.
+ When recipient receives QORA they need to do a transaction, for example: JOIN_GROUP 2, which will make their public key available from the blockchain/API. +
+

+ +

+ + Minting relationships: (found by API call GET /addresses/proxying)
+ + + + + + + +
Minting addressRecipient addressPercentageBlocksStatusActions
QgV4s3xnzLhVBEJxcYui4u4q11yhUHsd9vQaUpHNhT3Ygx6avRiKobuLdusppR5biXjL20%14Active
QgV4s3xnzLhVBEJxcYui4u4q11yhUHsd9vQcFmNxSArv5tWEzCtTKb2Lqc5QkKuQ7RNs0%3Stopped
QgV4s3xnzLhVBEJxcYui4u4q11yhUHsd9vQci5m9k4rcwe4ruKrZZQKka4FzUUMut3er40%Pending
QgV4s3xnzLhVBEJxcYui4u4q11yhUHsd9vQaUpHNhT3Ygx6avRiKobuLdusppR5biXjL20%14Active
+

+ + "Active" means proxy private key for minting & recipient pair is listed by API call GET /admin/forgingaccounts.
+ "Pending" means PROXY_FORGING transaction for this relationship has not yet confirmed.
+ "Stopped" means proxy private key is NOT listed by API call GET /admin/forgingaccounts but also that the PROXY_FORGING transaction for this relationship has confirmed. +

+ "Edit" button could fill in the form above with current details? +

+ "Start" button adds relationship's proxy private key to node via API call POST /admin/forgingaccounts.
+ "Stop" button removes relationship's proxy private key to node via API call DELETE /admin/forgingaccounts. +

+ Again, if minting/recipient's private key (to calculate proxy private key to send to API) is not available
+ then do pop-up asking for password to decrypt and save into cachedPrivateKeys. +

+ Last entry in the table (above) is an example when node is instead run by recipient "QaUpHNhT3Ygx6avRiKobuLdusppR5biXjL" and so "Edit" is disabled. + +

+ +
+
+ Mnemonic phrase:
+ Password:
+ +

+ + Use mnemonic phrase to calculate private key and address.
+ Encrypt private key using password and store with window.localStorage.setItem(address, encryptedPrivateKey).
+ Add address & unencrypted private key to cache, e.g. cachedPrivateKeys[address] = privateKey. +
+

+ +

+ + Minting accounts:
+ + + + + +
AddressStatusActions
QgV4s3xnzLhVBEJxcYui4u4q11yhUHsd9vLocked
QixPbJUwsaHsVEofJdozU9zgVqkK6aYhrKUnlocked
+

+ + Table rows made from addresses found in window.localStorage entries and "unlocked" if also in cachedPrivateKeys. + +

+
+
+ + \ No newline at end of file