Skip to content

Commit

Permalink
tx-signing-js: fixed tests
Browse files Browse the repository at this point in the history
  • Loading branch information
aslesarenko committed Aug 6, 2023
1 parent c4369ac commit 964feda
Show file tree
Hide file tree
Showing 3 changed files with 13 additions and 13 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -27,7 +27,7 @@ import special.sigma._

import java.math.BigInteger
import scala.collection.compat.immutable.ArraySeq
import scala.collection.immutable.VectorMap
import scala.collection.immutable.ListMap
import scala.collection.mutable.ListBuffer
import scala.reflect.ClassTag

Expand Down Expand Up @@ -239,7 +239,7 @@ trait ObjectGenerators extends TypeGenerators

lazy val contextExtensionGen: Gen[ContextExtension] = for {
values <- Gen.sequence(contextExtensionValuesGen(0, 5))(Buildable.buildableSeq)
} yield ContextExtension(VectorMap.from(values.sortBy(_._1)))
} yield ContextExtension(ListMap.empty ++ values.sortBy(_._1))

lazy val serializedProverResultGen: Gen[ProverResult] = for {
bytes <- arrayOfRange(1, 100, arbByte.arbitrary)
Expand Down
16 changes: 8 additions & 8 deletions sdk/js/src/main/scala/org/ergoplatform/sdk/js/Isos.scala
Original file line number Diff line number Diff line change
@@ -1,30 +1,30 @@
package org.ergoplatform.sdk.js

import org.ergoplatform.ErgoBox._
import org.ergoplatform.{DataInput, ErgoBox, ErgoBoxCandidate, ErgoLikeTransaction, Input, UnsignedErgoLikeTransaction, UnsignedInput}
import org.ergoplatform.sdk.{ExtendedInputBox, Iso}
import org.ergoplatform.sdk.JavaHelpers.UniversalConverter
import org.ergoplatform.sdk.wallet.protocol.context
import org.ergoplatform.sdk.{ExtendedInputBox, Iso}
import org.ergoplatform._
import scalan.RType
import scorex.crypto.authds.ADKey
import scorex.util.ModifierId
import scorex.util.encode.Base16
import sigmastate.{AvlTreeData, AvlTreeFlags, SType}
import sigmastate.Values.{Constant, GroupElementConstant}
import sigmastate.eval.Extensions.ArrayOps
import sigmastate.eval.{CAvlTree, CBigInt, CHeader, CPreHeader, Colls, Digest32Coll, Evaluation}
import sigmastate.fleetSdkCommon.distEsmTypesBoxesMod.Box
import sigmastate.fleetSdkCommon.distEsmTypesCommonMod.HexString
import sigmastate.fleetSdkCommon.distEsmTypesRegistersMod.NonMandatoryRegisters
import sigmastate.fleetSdkCommon.distEsmTypesTokenMod.TokenAmount
import sigmastate.fleetSdkCommon.distEsmTypesTransactionsMod.{SignedTransaction, UnsignedTransaction}
import sigmastate.fleetSdkCommon.{distEsmTypesBoxesMod => boxesMod, distEsmTypesCommonMod => commonMod, distEsmTypesContextExtensionMod => contextExtensionMod, distEsmTypesInputsMod => inputsMod, distEsmTypesProverResultMod => proverResultMod, distEsmTypesRegistersMod => registersMod, distEsmTypesTokenMod => tokenMod}
import sigmastate.interpreter.{ContextExtension, ProverResult}
import sigmastate.serialization.{ErgoTreeSerializer, ValueSerializer}
import sigmastate.{AvlTreeData, AvlTreeFlags, SType}
import special.collection.Coll
import special.collection.Extensions.CollBytesOps
import special.sigma
import special.sigma.GroupElement
import sigmastate.fleetSdkCommon.distEsmTypesBoxesMod.Box
import sigmastate.fleetSdkCommon.distEsmTypesCommonMod.HexString
import sigmastate.fleetSdkCommon.distEsmTypesRegistersMod.NonMandatoryRegisters
import sigmastate.fleetSdkCommon.distEsmTypesTokenMod.TokenAmount
import sigmastate.fleetSdkCommon.distEsmTypesTransactionsMod.{SignedTransaction, UnsignedTransaction}

import java.math.BigInteger
import scala.collection.immutable.ListMap
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -2,7 +2,7 @@ package org.ergoplatform.sdk.js

import org.ergoplatform.ErgoAddressEncoder.NetworkPrefix
import org.ergoplatform.sdk
import org.ergoplatform.sdk.{BlockchainParameters, SecretString}
import org.ergoplatform.sdk.SecretString

import scala.scalajs.js
import scala.scalajs.js.annotation.JSExportTopLevel
Expand All @@ -11,8 +11,8 @@ import sigmastate.eval.SigmaDsl

/** Equivalent of [[sdk.ProverBuilder]] available from JS. */
@JSExportTopLevel("ProverBuilder")
class ProverBuilder(parameters: BlockchainParameters, networkPrefix: NetworkPrefix) extends js.Object {
val _builder = new sdk.ProverBuilder(parameters, networkPrefix)
class ProverBuilder(parameters: BlockchainParameters, network: NetworkPrefix) extends js.Object {
val _builder = new sdk.ProverBuilder(parameters, network)

/** Configure this builder to use the given seed when building a new prover.
*
Expand Down

0 comments on commit 964feda

Please sign in to comment.