case class SendCmd(toolConf: ErgoToolConfig, name: String, storageFile: File, storagePass: Array[Char], recipient: Address, amountToSend: Long) extends Cmd with RunWithErgoClient with Product with Serializable

Creates and sends a new transaction to transfer Ergs from one address to another.

Steps:
1) request storage password from the user
2) read storage file, unlock using password and get secret
3) get master public key and compute sender's address
4) load available coins belonging to the sender's address
5) select coins to cover amountToSend, compute transaction fee and amount of change
6) create and sign (using secret key) transaction
7) if no --dry-run option is specified, send the transaction to the network
otherwise skip sending
8) serialize transaction to Json and print to the console

storageFile

storage with secret key of the sender

storagePass

password to access sender secret key in the storage

recipient

address of the recepient of the transfer

amountToSend

amount of NanoErg to transfer to recipient

Linear Supertypes
Serializable, Serializable, Product, Equals, RunWithErgoClient, Cmd, AnyRef, Any
Ordering
  1. Alphabetic
  2. By Inheritance
Inherited
  1. SendCmd
  2. Serializable
  3. Serializable
  4. Product
  5. Equals
  6. RunWithErgoClient
  7. Cmd
  8. AnyRef
  9. Any
  1. Hide All
  2. Show All
Visibility
  1. Public
  2. All

Instance Constructors

  1. new SendCmd(toolConf: ErgoToolConfig, name: String, storageFile: File, storagePass: Array[Char], recipient: Address, amountToSend: Long)

    storageFile

    storage with secret key of the sender

    storagePass

    password to access sender secret key in the storage

    recipient

    address of the recepient of the transfer

    amountToSend

    amount of NanoErg to transfer to recipient

Value Members

  1. final def !=(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  2. final def ##(): Int
    Definition Classes
    AnyRef → Any
  3. final def ==(arg0: Any): Boolean
    Definition Classes
    AnyRef → Any
  4. val amountToSend: Long
  5. def apiKey: String

    ApiKey which is used for Ergo node API authentication.

    ApiKey which is used for Ergo node API authentication. This is a secret key whose hash was used in Ergo node config. This is only necessary to communicate to the protected parts of node API.

    Definition Classes
    Cmd
  6. def apiUrl: String

    Returns the url of the Ergo blockchain node used to communicate with the network.

    Returns the url of the Ergo blockchain node used to communicate with the network.

    Definition Classes
    Cmd
  7. final def asInstanceOf[T0]: T0
    Definition Classes
    Any
  8. def clone(): AnyRef
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )
  9. final def eq(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  10. def error(msg: String): Nothing

    Helper method to throw a new CmdException from this command.

    Helper method to throw a new CmdException from this command.

    Definition Classes
    Cmd
  11. def finalize(): Unit
    Attributes
    protected[java.lang]
    Definition Classes
    AnyRef
    Annotations
    @throws( classOf[java.lang.Throwable] )
  12. final def getClass(): Class[_]
    Definition Classes
    AnyRef → Any
    Annotations
    @native()
  13. final def isInstanceOf[T0]: Boolean
    Definition Classes
    Any
  14. def loggedStep[T](msg: String, console: Console)(step: ⇒ T): T
  15. val name: String

    Returns the name of this command (Example: send, mnemonic etc.)

    Returns the name of this command (Example: send, mnemonic etc.)

    Definition Classes
    SendCmdCmd
  16. final def ne(arg0: AnyRef): Boolean
    Definition Classes
    AnyRef
  17. def networkType: NetworkType

    Returns the network type (MAINNET or TESTNET) ErgoTool is expected to communicate.

    Returns the network type (MAINNET or TESTNET) ErgoTool is expected to communicate. This parameter should correspond to the real network type of the node pointed to by apiUrl.

    Definition Classes
    Cmd
  18. final def notify(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  19. final def notifyAll(): Unit
    Definition Classes
    AnyRef
    Annotations
    @native()
  20. val recipient: Address
  21. def run(ctx: AppContext): Unit

    Runs this command using given AppContext.

    Runs this command using given AppContext.

    ctx

    context information of this command execution collected from command line, configuration file etc.

    Definition Classes
    RunWithErgoClientCmd
    Exceptions thrown

    CmdException when command execution fails

  22. def runWithClient(ergoClient: ErgoClient, runCtx: AppContext): Unit

    Called from run method with ErgoClient instance ready for Ergo blockchain communication.

    Called from run method with ErgoClient instance ready for Ergo blockchain communication.

    Definition Classes
    SendCmdRunWithErgoClient
  23. val storageFile: File
  24. val storagePass: Array[Char]
  25. final def synchronized[T0](arg0: ⇒ T0): T0
    Definition Classes
    AnyRef
  26. val toolConf: ErgoToolConfig

    Returns current tool configuration parameters

    Returns current tool configuration parameters

    Definition Classes
    SendCmdCmd
  27. final def wait(): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  28. final def wait(arg0: Long, arg1: Int): Unit
    Definition Classes
    AnyRef
    Annotations
    @throws( ... )
  29. final def wait(arg0: Long): Unit
    Definition Classes
    AnyRef
    Annotations
    @native() @throws( ... )

Inherited from Serializable

Inherited from Serializable

Inherited from Product

Inherited from Equals

Inherited from RunWithErgoClient

Inherited from Cmd

Inherited from AnyRef

Inherited from Any

Ungrouped