Asset

Interface
Attributes of a first class asset. Smart contract authors will typically only interact with the NEO and GAS Assets.
export interface Asset { 
  readonly hash: Hash256; 
  readonly type: AssetType; 
  readonly amount: Fixed8; 
  readonly available: Fixed8; 
  readonly precision: Integer; 
  readonly owner: PublicKey; 
  readonly admin: Address; 
  readonly issuer: Address; 
  readonly [OpaqueTagSymbol0]: unique symbol; 
} 

Properties

hash
Hash256
Hash256 of this Asset.
amount
Total possible supply of the Asset
available
Amount currently available of the Asset
precision
Precision (number of decimal places) of the Asset
owner
Owner of the Asset.
admin
Admin of the Asset.
issuer
Issuer of the Asset.

Static Methods

for

(hash: Hash256) => Asset 

Example

const asset = Asset.for(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