trait TransactionBuilderApi[F[_]] extends AnyRef
Defines a builder for IoTransaction
- Alphabetic
- By Inheritance
- TransactionBuilderApi
- AnyRef
- Any
- Hide All
- Show All
- Public
- Protected
Abstract Value Members
- abstract def assetOutput(lockAddress: LockAddress, quantity: Int128, groupId: GroupId, seriesId: SeriesId, fungibilityType: FungibilityType, quantityDescriptorType: QuantityDescriptorType, metadata: Option[Struct], commitment: Option[ByteString]): F[UnspentTransactionOutput]
Builds an asset unspent transaction output for the given parameters
Builds an asset unspent transaction output for the given parameters
- lockAddress
The lock address to use to build the asset output
- quantity
The quantity to use to build the asset output
- groupId
The group id to use to build the asset output
- seriesId
The series id to use to build the asset output
- fungibilityType
The fungibility type to use to build the asset output
- quantityDescriptorType
The quantity descriptor type to use to build the asset output
- metadata
The metadata to use to build the asset output
- commitment
The commitment to use to build the asset output
- returns
An unspent transaction output containing asset tokens
- abstract def buildAssetMintingTransaction(mintingStatement: AssetMintingStatement, txos: Seq[Txo], locks: Map[LockAddress, Predicate], fee: Long, mintedAssetLockAddress: LockAddress, changeAddress: LockAddress, ephemeralMetadata: Option[Struct] = None, commitment: Option[ByteString] = None): F[Either[BuilderError, IoTransaction]]
Builds a simple transaction to mint asset tokens.
Builds a simple transaction to mint asset tokens. If successful, the transaction will have two or more inputs (at least the group and series registration tokens) and two or more outputs (at least the minted asset tokens and the input group constructor token). There can be more inputs and outputs if the supplied txos contain more tokens.
- mintingStatement
The minting statement that specifies the asset to mint.
- txos
All the TXOs encumbered by the Locks given by locks. These TXOs must contain some group and series constructors (as referenced in the AMS) to satisfy the minting requirements. Else an error will be returned. Any TXOs that contain values of an invalid type, such as UnknownType, will be filtered out and won't be included in the inputs.
- locks
A mapping of Predicate Locks that encumbers the funds in the txos. This will be used in the attestations of the txos' inputs.
- fee
The transaction fee. The txos must contain enough LVLs to satisfy this fee
- mintedAssetLockAddress
The LockAddress to send the minted asset tokens to.
- changeAddress
The LockAddress to send the change to.
- ephemeralMetadata
Optional ephemeral metadata to include in the minted asset tokens.
- commitment
Optional commitment to include in the minted asset tokens.
- returns
An unproven asset minting transaction if possible. Else, an error
- Note
If the "tokenSupply" field in the registration series constructor tokens is present, then the quantity of asset tokens to mint (defined in the AMS) has to be a multiple of this field, else an error will be returned. In this case, minting each multiple of "tokenSupply" quantity of assets will burn a single series constructor token.
- abstract def buildGroupMintingTransaction(txos: Seq[Txo], lockPredicateFrom: Predicate, groupPolicy: GroupPolicy, quantityToMint: Long, mintedAddress: LockAddress, changeAddress: LockAddress, fee: Long): F[Either[BuilderError, IoTransaction]]
Builds a simple transaction to mint Group Constructor tokens.
Builds a simple transaction to mint Group Constructor tokens. If successful, the transaction will have one or more inputs (at least the registrationUtxo) and one or more outputs (at least the minted group constructor tokens). There can be more inputs and outputs if the supplied txos contain more tokens.
- txos
All the TXOs encumbered by the Lock given by lockPredicateFrom. These TXOs must contain some LVLs (as specified in the policy), to satisfy the registration fee. Else an error will be returned. Any TXOs that contain values of an invalid type, such as UnknownType, will be filtered out and won't be included in the inputs.
- lockPredicateFrom
The Predicate Lock that encumbers the funds in the txos. This will be used in the attestations of the inputs.
- groupPolicy
The group policy for which we are minting constructor tokens. This group policy specifies a registrationUtxo to be used as an input in this transaction.
- quantityToMint
The quantity of constructor tokens to mint
- mintedAddress
The LockAddress to send the minted constructor tokens to.
- changeAddress
The LockAddress to send the change to.
- fee
The transaction fee. The txos must contain enough LVLs to satisfy this fee
- returns
An unproven Group Constructor minting transaction if possible. Else, an error
- abstract def buildSeriesMintingTransaction(txos: Seq[Txo], lockPredicateFrom: Predicate, seriesPolicy: SeriesPolicy, quantityToMint: Long, mintedAddress: LockAddress, changeAddress: LockAddress, fee: Long): F[Either[BuilderError, IoTransaction]]
Builds a simple transaction to mint Series Constructor tokens.
Builds a simple transaction to mint Series Constructor tokens. If successful, the transaction will have one or more inputs (at least the registrationUtxo) and one or more outputs (at least the minted series constructor tokens). There can be more inputs and outputs if the supplied txos contain more tokens.
- txos
All the TXOs encumbered by the Lock given by lockPredicateFrom. These TXOs must contain some LVLs (as specified in the policy), to satisfy the registration fee. Else an error will be returned. Any TXOs that contain values of an invalid type, such as UnknownType, will be filtered out and won't be included in the inputs.
- lockPredicateFrom
The Predicate Lock that encumbers the funds in the txos. This will be used in the attestations of the inputs.
- seriesPolicy
The series policy for which we are minting constructor tokens. This series policy specifies a registrationUtxo to be used as an input in this transaction.
- quantityToMint
The quantity of constructor tokens to mint
- mintedAddress
The LockAddress to send the minted constructor tokens to.
- changeAddress
The LockAddress to send the change to.
- fee
The transaction fee. The txos must contain enough LVLs to satisfy this fee
- returns
An unproven Series Constructor minting transaction if possible. Else, an error
- abstract def buildSimpleLvlTransaction(lvlTxos: Seq[Txo], lockPredicateFrom: Predicate, lockPredicateForChange: Predicate, recipientLockAddress: LockAddress, amount: Long): F[IoTransaction]
Builds a simple lvl transaction with the given parameters
Builds a simple lvl transaction with the given parameters
- lvlTxos
The lvl transaction outputs that are able to be spent in the transaction
- lockPredicateFrom
The predicate to use to build the transaction input
- lockPredicateForChange
The predicate to use to build the transaction change output
- recipientLockAddress
The lock address to use to build the transaction recipient output
- amount
The amount to use to build the transaction recipient output
- returns
A simple lvl transaction
- abstract def buildTransferAllTransaction(txos: Seq[Txo], lockPredicateFrom: Predicate, recipientLockAddress: LockAddress, changeLockAddress: LockAddress, fee: Long, tokenIdentifier: Option[ValueTypeIdentifier] = None): F[Either[BuilderError, IoTransaction]]
Builds a transaction to transfer the ownership of tokens (optionally identified by tokenIdentifier).
Builds a transaction to transfer the ownership of tokens (optionally identified by tokenIdentifier). If tokenIdentifier is provided, only the TXOs matching the identifier will go to the recipient. If it is None, then all tokens provided in txos will go to the recipient. Any remaining tokens in txos that are not transferred to the recipient will be transferred to the change address.
- txos
All the TXOs encumbered by the Lock given by lockPredicateFrom. These TXOs must contain some token matching tokenIdentifier (if it is provided) and at least the quantity of LVLs to satisfy the fee. Else an error will be returned. Any TXOs that contain values of an invalid type, such as UnknownType, will be filtered out and won't be included in the inputs.
- lockPredicateFrom
The Lock Predicate encumbering the txos
- recipientLockAddress
The LockAddress of the recipient
- changeLockAddress
A LockAddress to send the tokens that are not going to the recipient
- fee
The fee to pay for the transaction. The txos must contain enough LVLs to satisfy this fee
- tokenIdentifier
An optional token identifier to denote the type of token to transfer to the recipient. If None, all tokens in txos will be transferred to the recipient and changeLockAddress will be ignored. This must not be UnknownType.
- returns
An unproven transaction
- abstract def buildTransferAmountTransaction(tokenIdentifier: ValueTypeIdentifier, txos: Seq[Txo], lockPredicateFrom: Predicate, amount: Long, recipientLockAddress: LockAddress, changeLockAddress: LockAddress, fee: Long): F[Either[BuilderError, IoTransaction]]
Builds a transaction to transfer a certain amount of a specified Token (given by tokenIdentifier).
Builds a transaction to transfer a certain amount of a specified Token (given by tokenIdentifier). The transaction will also transfer any other tokens (in the txos) that are encumbered by the same predicate to the change address.
- tokenIdentifier
The Token Identifier denoting the type of token to transfer to the recipient. If this denotes an Asset Token, the referenced asset's quantity descriptor type must be LIQUID, else an error will be returned. This must not be UnknownType.
- txos
All the TXOs encumbered by the Lock given by lockPredicateFrom. These TXOs must contain at least the necessary quantity (given by amount) of the identified Token and at least the quantity of LVLs to satisfy the fee. Else an error will be returned. Any TXOs that contain values of an invalid type, such as UnknownType, will be filtered out and won't be included in the inputs.
- lockPredicateFrom
The Lock Predicate encumbering the txos
- amount
The amount of identified Token to transfer to the recipient
- recipientLockAddress
The LockAddress of the recipient
- changeLockAddress
A LockAddress to send the tokens that are not going to the recipient
- fee
The transaction fee. The txos must contain enough LVLs to satisfy this fee
- returns
An unproven transaction
- Note
This function only supports transferring a specific amount of assets (via tokenIdentifier) if their quantity descriptor type is LIQUID.
,This function only support transferring a specific amount of TOPLs (via tokenIdentifier) if their staking registration is None.
- abstract def datum(): F[IoTransaction]
Builds a datum with default values for a transaction.
Builds a datum with default values for a transaction. The schedule is defaulted to use the current timestamp, with min and max slot being 0 and Long.MaxValue respectively.
- returns
A transaction datum
- abstract def groupOutput(lockAddress: LockAddress, quantity: Int128, groupId: GroupId, fixedSeries: Option[SeriesId]): F[UnspentTransactionOutput]
Builds a group constructor unspent transaction output for the given parameters
Builds a group constructor unspent transaction output for the given parameters
- lockAddress
The lock address to use to build the group constructor output
- quantity
The quantity to use to build the group constructor output
- groupId
The group id to use to build the group constructor output
- fixedSeries
The fixed series to use to build the group constructor output
- returns
An unspent transaction output containing group constructor tokens
- abstract def lockAddress(lock: Lock): F[LockAddress]
Builds a lock address for the given lock
Builds a lock address for the given lock
- lock
The lock to use to build the lock address
- returns
A lock address
- abstract def lvlOutput(lockAddress: LockAddress, amount: Int128): F[UnspentTransactionOutput]
Builds a lvl unspent transaction output for the given lock address and amount
Builds a lvl unspent transaction output for the given lock address and amount
- lockAddress
The lock address to use to build the lvl output
- amount
The amount to use to build the lvl output
- returns
An unspent transaction output containing lvls
- abstract def lvlOutput(predicate: Predicate, amount: Int128): F[UnspentTransactionOutput]
Builds a lvl unspent transaction output for the given predicate lock and amount
Builds a lvl unspent transaction output for the given predicate lock and amount
- predicate
The predicate to use to build the lvl output
- amount
The amount to use to build the lvl output
- returns
An unspent transaction output containing lvls
- abstract def seriesOutput(lockAddress: LockAddress, quantity: Int128, seriesId: SeriesId, tokenSupply: Option[Int], fungibility: FungibilityType, quantityDescriptor: QuantityDescriptorType): F[UnspentTransactionOutput]
Builds a series constructor unspent transaction output for the given parameters
Builds a series constructor unspent transaction output for the given parameters
- lockAddress
The lock address to use to build the series constructor output
- quantity
The quantity to use to build the series constructor output
- seriesId
The series id to use to build the series constructor output
- tokenSupply
The token supply to use to build the series constructor output
- fungibility
The fungibility type to use to build the series constructor output
- quantityDescriptor
The quantity descriptor type to use to build the series constructor output
- abstract def unprovenAttestation(lockPredicate: Predicate): F[Attestation]
Builds an unproven attestation for the given predicate
Builds an unproven attestation for the given predicate
- lockPredicate
The predicate to use to build the unproven attestation
- returns
An unproven attestation
Concrete Value Members
- final def !=(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def ##: Int
- Definition Classes
- AnyRef → Any
- final def ==(arg0: Any): Boolean
- Definition Classes
- AnyRef → Any
- final def asInstanceOf[T0]: T0
- Definition Classes
- Any
- def clone(): AnyRef
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.CloneNotSupportedException]) @HotSpotIntrinsicCandidate() @native()
- final def eq(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- def equals(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef → Any
- final def getClass(): Class[_ <: AnyRef]
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- def hashCode(): Int
- Definition Classes
- AnyRef → Any
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def isInstanceOf[T0]: Boolean
- Definition Classes
- Any
- final def ne(arg0: AnyRef): Boolean
- Definition Classes
- AnyRef
- final def notify(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def notifyAll(): Unit
- Definition Classes
- AnyRef
- Annotations
- @HotSpotIntrinsicCandidate() @native()
- final def synchronized[T0](arg0: => T0): T0
- Definition Classes
- AnyRef
- def toString(): String
- Definition Classes
- AnyRef → Any
- final def wait(arg0: Long, arg1: Int): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
- final def wait(arg0: Long): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException]) @native()
- final def wait(): Unit
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.InterruptedException])
Deprecated Value Members
- def finalize(): Unit
- Attributes
- protected[lang]
- Definition Classes
- AnyRef
- Annotations
- @throws(classOf[java.lang.Throwable]) @Deprecated
- Deprecated
(Since version 9)