Class PeerGUI

All Implemented Interfaces:
ImageObserver, MenuContainer, Serializable, Accessible

public class PeerGUI extends JPanel
See Also:
  • Field Details

    • KEYPAIRS

      public static List<convex.core.crypto.AKeyPair> KEYPAIRS
    • PEERKEYS

      public static List<convex.core.data.AccountKey> PEERKEYS
    • genesisState

      public static convex.core.State genesisState
    • tickState

      public static StateModel<Long> tickState
    • maxBlock

      public static long maxBlock
    • peerList

      public static DefaultListModel<Convex> peerList
  • Constructor Details

    • PeerGUI

      public PeerGUI()
      Create the application.
  • Method Details

    • main

      public static void main(String[] args)
      Launch the application.
      Parameters:
      args - Command line args
    • finalize

      public void finalize()
      Overrides:
      finalize in class Object
    • switchPanel

      public void switchPanel(String title)
    • getWalletPanel

      public WalletPanel getWalletPanel()
    • makeConnection

      public static Convex makeConnection(convex.core.data.Address address, convex.core.crypto.AKeyPair kp) throws IOException, TimeoutException
      Builds a connection to the peer network
      Parameters:
      address - Address for connection
      kp - Key Pair for connection
      Returns:
      Convex connection instance
      Throws:
      IOException - If IO error occurs during connection attempt
      TimeoutException - If attempt to connect times out
    • execute

      public static CompletableFuture<convex.core.Result> execute(convex.core.crypto.WalletEntry we, convex.core.data.ACell code)
      Executes a transaction using the given Wallet
      Parameters:
      code - Code to execute
      we - Wallet to use
      Returns:
      Future for Result
    • execute

      public static CompletableFuture<convex.core.Result> execute(convex.core.crypto.WalletEntry we, convex.core.transactions.ATransaction trans)
      Executes a transaction using the given Wallet
      Parameters:
      we - Wallet to use
      trans - Transaction to execute
      Returns:
      Future for Result
    • execute

      public static void execute(convex.core.crypto.WalletEntry we, convex.core.transactions.ATransaction trans, Consumer<convex.core.Result> receiveAction)
      Executes a transaction using the given Wallet
      Parameters:
      we - Wallet to use
      trans - Transaction to execute
      receiveAction - Action to invoke when result is received
    • getLatestState

      public static convex.core.State getLatestState()
    • getFrame

      public static Component getFrame()
    • getStateModel

      public static StateModel<convex.core.State> getStateModel()
    • getDefaultConvex

      public static Convex getDefaultConvex()
    • getUserAddress

      public static convex.core.data.Address getUserAddress(int i)
    • getUserKeyPair

      public static convex.core.crypto.AKeyPair getUserKeyPair(int i)
    • getGenesisAddress

      public static convex.core.data.Address getGenesisAddress()
    • connectClient

      public static Convex connectClient(convex.core.data.Address address, convex.core.crypto.AKeyPair keyPair)
    • getStateModel

      public static StateModel<convex.core.Peer> getStateModel(Convex peer)
    • getRandomServer

      public static Server getRandomServer()
    • getPrimaryServer

      public static Server getPrimaryServer()
    • runWithLatestState

      public static void runWithLatestState(Consumer<convex.core.State> f)
    • runOnPrimaryServer

      public static void runOnPrimaryServer(Consumer<Server> f)
    • runOnServer

      public static void runOnServer(Server server, Consumer<Server> f)