Class

ClientAssetRecord

ClientAssetRecord()

This object represents an asset record owned by a ledger key pair.

Constructor

# new ClientAssetRecord()

See:
  • open_client_asset_record for information about how to decrypt an encrypted asset record.

View Source pkg/wasm.js, line 1033

Methods

# static from_json(val) → {ClientAssetRecord}

Builds a client record from a JSON-encoded JavaScript value.

Parameters:
Name Type Description
val JsValue

JSON-encoded autehtnicated asset record fetched from ledger server with the utxo_sid/{sid} route, where sid can be fetched from the query server with the get_owned_utxos/{address} route. Note: The first field of an asset record is utxo. See the example below.

See:
  • Network.getUtxo for information about how to fetch an asset record from the ledger server.

View Source pkg/wasm.js, line 1071

Example
"utxo":{
  "amount":{
    "NonConfidential":5
  },
 "asset_type":{
    "NonConfidential":[113,168,158,149,55,64,18,189,88,156,133,204,156,46,106,46,232,62,69,233,157,112,240,132,164,120,4,110,14,247,109,127]
  },
  "public_key":"Glf8dKF6jAPYHzR_PYYYfzaWqpYcMvnrIcazxsilmlA="
}