lovelacePseudoAsset top-level property

CurrencyAsset lovelacePseudoAsset
final

Pseudo ADA asset instance allows principal asset to be treated like other native tokens. Blockfrost returns 'lovelace' as the currency unit, whereas all other native tokens are identified by their assetId, a hex string. For consistency, 'lovelace' unit values must be converted to lovelaceHex strings.

Implementation

final lovelacePseudoAsset = CurrencyAsset(
  policyId: '',
  assetName: lovelaceHex,
  quantity: '45000000000', //max
  initialMintTxHash: '',
  metadata: CurrencyAssetMetadata(
    name: 'Cardano',
    description: 'Principal currency of Cardano',
    ticker: 'ADA',
    url: 'https://cardano.org',
    logo: null,
    decimals: 6,
  ),
);