diff --git a/src/main/scala/org/ergoplatform/api/WalletApiRoute.scala b/src/main/scala/org/ergoplatform/api/WalletApiRoute.scala index 8ca4febce2..c53e2afa74 100644 --- a/src/main/scala/org/ergoplatform/api/WalletApiRoute.scala +++ b/src/main/scala/org/ergoplatform/api/WalletApiRoute.scala @@ -7,6 +7,7 @@ import io.circe.Encoder import org.ergoplatform.modifiers.mempool.ErgoTransaction import org.ergoplatform.nodeView.ErgoReadersHolder.{GetReaders, Readers} import org.ergoplatform.nodeView.wallet._ +import org.ergoplatform.nodeView.wallet.requests.{PaymentRequest, PaymentRequestDecoder} import org.ergoplatform.settings.ErgoSettings import scorex.core.NodeViewHolder.ReceivableMessages.LocallyGeneratedTransaction import scorex.core.api.http.ApiError.BadRequest diff --git a/src/main/scala/org/ergoplatform/local/TransactionGenerator.scala b/src/main/scala/org/ergoplatform/local/TransactionGenerator.scala index f293a6d8a0..84a9100783 100644 --- a/src/main/scala/org/ergoplatform/local/TransactionGenerator.scala +++ b/src/main/scala/org/ergoplatform/local/TransactionGenerator.scala @@ -8,6 +8,7 @@ import org.ergoplatform.nodeView.history.ErgoHistory import org.ergoplatform.nodeView.mempool.ErgoMemPool import org.ergoplatform.nodeView.state.UtxoState import org.ergoplatform.nodeView.wallet._ +import org.ergoplatform.nodeView.wallet.requests.PaymentRequest import org.ergoplatform.settings.ErgoSettings import scorex.core.NodeViewHolder.ReceivableMessages.{GetDataFromCurrentView, LocallyGeneratedTransaction} import scorex.core.network.NodeViewSynchronizer.ReceivableMessages.{SemanticallySuccessfulModifier, SuccessfulTransaction} diff --git a/src/main/scala/org/ergoplatform/nodeView/wallet/ErgoWalletReader.scala b/src/main/scala/org/ergoplatform/nodeView/wallet/ErgoWalletReader.scala index 69b57386f7..6477651b0b 100644 --- a/src/main/scala/org/ergoplatform/nodeView/wallet/ErgoWalletReader.scala +++ b/src/main/scala/org/ergoplatform/nodeView/wallet/ErgoWalletReader.scala @@ -7,6 +7,7 @@ import akka.pattern.ask import akka.util.Timeout import org.ergoplatform.modifiers.mempool.ErgoTransaction import org.ergoplatform.nodeView.wallet.ErgoWalletActor.{GenerateTransaction, ReadPublicKeys, ReadRandomPublicKey, ReadTrackedAddresses} +import org.ergoplatform.nodeView.wallet.requests.PaymentRequest import scorex.core.transaction.wallet.VaultReader import scala.concurrent.Future diff --git a/src/main/scala/org/ergoplatform/nodeView/wallet/requests/AssetIssueRequest.scala b/src/main/scala/org/ergoplatform/nodeView/wallet/requests/AssetIssueRequest.scala new file mode 100644 index 0000000000..1e83be32ea --- /dev/null +++ b/src/main/scala/org/ergoplatform/nodeView/wallet/requests/AssetIssueRequest.scala @@ -0,0 +1,12 @@ +package org.ergoplatform.nodeView.wallet.requests + +import org.ergoplatform.ErgoBoxCandidate +import org.ergoplatform.nodeView.wallet.ErgoAddress + +case class AssetIssueRequest(address: ErgoAddress, + amount: Long, + name: String, + decimals: Int) { + + def toBoxCandidate: ErgoBoxCandidate = ??? +} diff --git a/src/main/scala/org/ergoplatform/nodeView/wallet/PaymentRequest.scala b/src/main/scala/org/ergoplatform/nodeView/wallet/requests/PaymentRequest.scala similarity index 89% rename from src/main/scala/org/ergoplatform/nodeView/wallet/PaymentRequest.scala rename to src/main/scala/org/ergoplatform/nodeView/wallet/requests/PaymentRequest.scala index b62eb6727f..45ba2d01c6 100644 --- a/src/main/scala/org/ergoplatform/nodeView/wallet/PaymentRequest.scala +++ b/src/main/scala/org/ergoplatform/nodeView/wallet/requests/PaymentRequest.scala @@ -1,9 +1,10 @@ -package org.ergoplatform.nodeView.wallet +package org.ergoplatform.nodeView.wallet.requests import io.circe.syntax._ import io.circe.{Decoder, Encoder, HCursor, Json} import org.ergoplatform.ErgoBox.NonMandatoryRegisterId import org.ergoplatform.modifiers.mempool.ErgoTransaction._ +import org.ergoplatform.nodeView.wallet.{ErgoAddress, ErgoAddressEncoder} import org.ergoplatform.settings.ErgoSettings import org.ergoplatform.{ErgoBox, ErgoBoxCandidate} import sigmastate.SType @@ -23,7 +24,7 @@ case class PaymentRequest(address: ErgoAddress, class PaymentRequestEncoder(settings: ErgoSettings) extends Encoder[PaymentRequest] { - implicit val addressEncoder = new ErgoAddressEncoder(settings).encoder + implicit val addressEncoder: Encoder[ErgoAddress] = new ErgoAddressEncoder(settings).encoder def apply(request: PaymentRequest): Json = { Json.obj(