Class AssetParams

AssetParams specifies the parameters for an asset. (apar) when part of an AssetConfig transaction. Definition: data/transactions/asset.go : AssetParams

Hierarchy

Constructors

  • Creates a new AssetParams object.

    Parameters

    • __namedParameters: { clawback?: string; creator: string; decimals: number | bigint; defaultFrozen?: boolean; freeze?: string; manager?: string; metadataHash?: string | Uint8Array; name?: string; nameB64?: string | Uint8Array; reserve?: string; total: number | bigint; unitName?: string; unitNameB64?: string | Uint8Array; url?: string; urlB64?: string | Uint8Array }
      • Optional clawback?: string
      • creator: string
      • decimals: number | bigint
      • Optional defaultFrozen?: boolean
      • Optional freeze?: string
      • Optional manager?: string
      • Optional metadataHash?: string | Uint8Array
      • Optional name?: string
      • Optional nameB64?: string | Uint8Array
      • Optional reserve?: string
      • total: number | bigint
      • Optional unitName?: string
      • Optional unitNameB64?: string | Uint8Array
      • Optional url?: string
      • Optional urlB64?: string | Uint8Array

    Returns indexerModels.AssetParams

Properties

attribute_map: Record<string, string>
clawback?: string

Address of account used to clawback holdings of this asset. If empty, clawback is not permitted.

creator: string

The address that created this asset. This is the address where the parameters for this asset can be found, and also the address where unwanted asset units can be sent in the worst case.

decimals: number | bigint

The number of digits to use after the decimal point when displaying this asset. If 0, the asset is not divisible. If 1, the base unit of the asset is in tenths. If 2, the base unit of the asset is in hundredths, and so on. This value must be between 0 and 19 (inclusive).

defaultFrozen?: boolean

Whether holdings of this asset are frozen by default.

freeze?: string

Address of account used to freeze holdings of this asset. If empty, freezing is not permitted.

manager?: string

Address of account used to manage the keys of this asset and to destroy it.

metadataHash?: Uint8Array

A commitment to some unspecified asset metadata. The format of this metadata is up to the application.

name?: string

Name of this asset, as supplied by the creator. Included only when the asset name is composed of printable utf-8 characters.

nameB64?: Uint8Array

Base64 encoded name of this asset, as supplied by the creator.

reserve?: string

Address of account holding reserve (non-minted) units of this asset.

total: number | bigint

The total number of units of this asset.

unitName?: string

Name of a unit of this asset, as supplied by the creator. Included only when the name of a unit of this asset is composed of printable utf-8 characters.

unitNameB64?: Uint8Array

Base64 encoded name of a unit of this asset, as supplied by the creator.

url?: string

URL where more information about the asset can be retrieved. Included only when the URL is composed of printable utf-8 characters.

urlB64?: Uint8Array

Base64 encoded URL where more information about the asset can be retrieved.

Methods

  • Get an object ready for encoding to either JSON or msgpack.

    Parameters

    • binary: boolean = false

      Use true to indicate that the encoding can handle raw binary objects (Uint8Arrays). Use false to indicate that raw binary objects should be converted to base64 strings. True should be used for objects that will be encoded with msgpack, and false should be used for objects that will be encoded with JSON.

    Returns Record<string, any>

Generated using TypeDoc