Asset

org.plasmalabs.sdk.models.box.Value.Asset
See theAsset companion object
final case class Asset(groupId: Option[GroupId], seriesId: Option[SeriesId], quantity: Int128, groupAlloy: Option[ByteString], seriesAlloy: Option[ByteString], fungibility: FungibilityType, quantityDescriptor: QuantityDescriptorType, ephemeralMetadata: Option[Struct], commitment: Option[ByteString], unknownFields: UnknownFieldSet) extends GeneratedMessage, Updatable[Asset]

A user-defined token

Value parameters

commitment

This field is optional and meant to store a commitment in the form of a hash. This field is managed by the user. Metadata concerning this field can be added to the metadata.

ephemeralMetadata

This is the ephemeral metadata of an asset. It follows the schema defined in the ephemeral metadata schema of the series policy corresponding to the token being minted. The conformance of this field to the schema is not checked by the node. This field is managed by the user.

fungibility

Describes the fungibility of the asset..

groupAlloy

This field is optional and represents a Merkle root of the alloy of groups in this asset. This is only valid for tokens that are series fungible. length = 32

groupId

The group identifier of the group token that was used to mint this asset. When there is a groupAlloy this field is not used.

quantity

A quantity

quantityDescriptor

Describes the quantity behavior of this asset.

seriesAlloy

This field is optional and represents a Merkle root of the alloy of series in this asset. This is only valid for tokens that are group fungible. length = 32

seriesId

The series identifier of the series token that was used to mint this asset. When there is a seriesAlloy this field is not used.

Attributes

Companion
object
Graph
Supertypes
trait Updatable[Asset]
trait GeneratedMessage
trait Serializable
trait Product
trait Equals
class Object
trait Matchable
class Any
Show all

Members list

Value members

Concrete methods

def companion: Asset.type
def getCommitment: ByteString
def getEphemeralMetadata: Struct
def getField(`__field`: FieldDescriptor): PValue
def getFieldByNumber(`__fieldNumber`: Int): Any
def getGroupAlloy: ByteString
def getSeriesAlloy: ByteString
override def serializedSize: Int

Attributes

Definition Classes
GeneratedMessage
def toProtoString: String

Returns a human-readable ASCII format representation of this message.

Returns a human-readable ASCII format representation of this message.

The original message can be decoded from this format by using fromAscii on the companion object.

Attributes

Returns

human-readable representation of this message.

def withCommitment(`__v`: ByteString): Asset
def withEphemeralMetadata(`__v`: Struct): Asset
def withGroupAlloy(`__v`: ByteString): Asset
def withGroupId(`__v`: GroupId): Asset
def withQuantity(`__v`: Int128): Asset
def withSeriesAlloy(`__v`: ByteString): Asset
def withSeriesId(`__v`: SeriesId): Asset
def withUnknownFields(`__v`: UnknownFieldSet): Asset
def writeTo(`_output__`: CodedOutputStream): Unit

Serializes the message into the given coded output stream

Serializes the message into the given coded output stream

Attributes

Inherited methods

def productElementNames: Iterator[String]

Attributes

Inherited from:
Product
def productIterator: Iterator[Any]

Attributes

Inherited from:
Product
final def toByteArray: Array[Byte]

Serializes the message and returns a byte array containing its raw bytes

Serializes the message and returns a byte array containing its raw bytes

Attributes

Inherited from:
GeneratedMessage
final def toByteString: ByteString

Serializes the message and returns a ByteString containing its raw bytes

Serializes the message and returns a ByteString containing its raw bytes

Attributes

Inherited from:
GeneratedMessage
final def toPMessage: PMessage

Attributes

Inherited from:
GeneratedMessage
def update(ms: (Lens[Asset, Asset]) => () => Asset*): Asset

Attributes

Inherited from:
Updatable
final def writeDelimitedTo(output: OutputStream): Unit

Attributes

Inherited from:
GeneratedMessage
final def writeTo(output: OutputStream): Unit

Serializes the message into the given output stream

Serializes the message into the given output stream

Attributes

Inherited from:
GeneratedMessage