Methods
# static from_json_record(val) → {AuthenticatedAssetRecord}
Builds an AuthenticatedAssetRecord from a JSON-encoded asset record returned from the ledger server.
Parameters:
Name | Type | Description |
---|---|---|
val |
JsValue | JSON-encoded asset record fetched from ledger server. |
- See:
-
- Network.getUtxo for information about how to fetch an asset record from the ledger server.
# is_valid(state_commitment) → {boolean}
Given a serialized state commitment, returns true if the authenticated UTXO proofs validate correctly and false otherwise. If the proofs validate, the asset record contained in this structure exists on the ledger and is unspent.
Parameters:
Name | Type | Description |
---|---|---|
state_commitment |
string | String representing the state commitment. |
- See:
-
- getStateCommitment for instructions on fetching a ledger state commitment.
Will throw an error if the state commitment fails to deserialize.
boolean