Package foundation.icon.icx
Class TransactionBuilder.DepositBuilder
- java.lang.Object
-
- foundation.icon.icx.TransactionBuilder.DepositBuilder
-
- Enclosing class:
- TransactionBuilder
public static final class TransactionBuilder.DepositBuilder extends java.lang.Object
A Builder for the deposit transaction.- Since:
- 0.9.13
-
-
Method Summary
All Methods Instance Methods Concrete Methods Deprecated Methods Modifier and Type Method Description TransactionBuilder.DepositBuilder
add()
Adds the deposit in the SCORE for generating virtual steps.Transaction
build()
Builds a new transaction using the given propertiesTransactionBuilder.DepositBuilder
withdraw()
Withdraws the whole deposited ICXTransactionBuilder.DepositBuilder
withdraw(Bytes id)
Deprecated.This method can be replaced bywithdraw(BigInteger)
orwithdraw()
.TransactionBuilder.DepositBuilder
withdraw(java.math.BigInteger amount)
Withdraws the deposited ICX by the specified amount
-
-
-
Method Detail
-
add
public TransactionBuilder.DepositBuilder add()
Adds the deposit in the SCORE for generating virtual steps.- Returns:
- this
-
withdraw
public TransactionBuilder.DepositBuilder withdraw(Bytes id)
Deprecated.This method can be replaced bywithdraw(BigInteger)
orwithdraw()
.Withdraws the deposited ICX- Parameters:
id
- the deposit ID (txHash of the add deposit transaction)- Returns:
- this
-
withdraw
public TransactionBuilder.DepositBuilder withdraw(java.math.BigInteger amount)
Withdraws the deposited ICX by the specified amount- Parameters:
amount
- the amount of deposit to withdraw- Returns:
- this
- Since:
- 2.0.0
-
withdraw
public TransactionBuilder.DepositBuilder withdraw()
Withdraws the whole deposited ICX- Returns:
- this
- Since:
- 2.0.0
-
build
public Transaction build()
Builds a new transaction using the given properties- Returns:
- a transaction to send
-
-