Options
All
  • Public
  • Public/Protected
  • All
Menu

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

Hierarchy

Index

Constructors

  • new AssetParams(__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 }): AssetParams
  • 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 AssetParams

Properties

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

(c) 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

(dc) 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

(df) Whether holdings of this asset are frozen by default.

freeze?: string

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

manager?: string

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

metadataHash?: Uint8Array

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

name?: string

(an) 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

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

total: number | bigint

(t) The total number of units of this asset.

unitName?: string

(un) 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

(au) 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_obj_for_encoding(binary?: boolean): Record<string, any>
  • 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