Asset

Interface
Attributes of a first class asset. Users will typically only interact with the NEO and GAS Assets.
export interface Asset { 
  readonly hash: Hash256String; 
  readonly type: AssetType; 
  readonly name: string; 
  readonly amount: BigNumber; 
  readonly available: BigNumber; 
  readonly precision: number; 
  readonly owner: PublicKeyString; 
  readonly admin: AddressString; 
  readonly issuer: AddressString; 
  readonly expiration: number; 
  readonly frozen: boolean; 
} 

Properties

hash
Hash256String
type
Type of the Asset
name
string
User configurable name of the Asset
amount
BigNumber
Total possible supply of the Asset
available
BigNumber
Amount currently available of the Asset
precision
number
Precision (number of decimal places) of the Asset
owner
Owner of the Asset.
admin
Admin of the Asset.
issuer
Issuer of the Asset.
expiration
number
Unix timestamp of when the Asset must be renewed by or it expires.
frozen
boolean
true if no transfers are allowed with the Asset.

Example

const asset = readClient.getAsset(Hash256.NEO); 
const neoAmount = asset.amount; 
  • @neo-one/client
  • @neo-one/smart-contract
DOCS
InstallationMain ConceptsAdvanced GuidesAPI ReferenceContributing
CHANNELS
GitHubStack OverflowDiscord ChatTwitterYouTube
COPYRIGHT © 2021 NEO•ONE