Options
All
  • Public
  • Public/Protected
  • All
Menu

Class AssetMintTransaction

Creates a new asset type and that asset itself.

The owner of the new asset created can be assigned by a lock script hash and parameters.

  • A metadata is a string that explains the asset's type.
  • Amount defines the quantity of asset to be created. If set as null, it will be set as the maximum value of a 64-bit unsigned integer by default.
  • If registrar exists, the registrar must be the Signer of the Parcel when sending the created asset through AssetTransferTransaction.
  • A transaction hash can be changed by changing nonce.
  • If an identical transaction hash already exists, then the change fails. In this situation, a transaction can be created again by arbitrarily changing the nonce.

Hierarchy

  • AssetMintTransaction

Index

Constructors

constructor

Properties

metadata

metadata: string

networkId

networkId: NetworkId

nonce

nonce: number

output

output: object

Type declaration

  • amount: number | null
  • lockScriptHash: H256
  • parameters: Buffer[]

registrar

registrar: PlatformAddress | null

shardId

shardId: number

type

type: "assetMint" = "assetMint"

worldId

worldId: number

Methods

getAssetAddress

  • getAssetAddress(): H256

getAssetScheme

getAssetSchemeAddress

  • getAssetSchemeAddress(): H256

getMintedAsset

  • getMintedAsset(): Asset

hash

rlpBytes

  • rlpBytes(): Buffer

toEncodeObject

  • toEncodeObject(): (string | number | number[] | string[] | Buffer[])[]

toJSON

  • toJSON(): object
  • Convert to an AssetMintTransaction JSON object.

    Returns object

    An AssetMintTransaction JSON object.

    • type: string
    • data: object
      • metadata: string
      • networkId: string
      • nonce: number
      • registrar: null | string
      • shardId: number
      • worldId: number
      • output: object
        • amount: null | number
        • lockScriptHash: string
        • parameters: number[][]

Static fromJSON

Generated using TypeDoc