Beta
Optional
signature: stringReadonly
dataBalance's data such as currencies and available amounts
Readonly
kindThe resource kind (balance)
Readonly
metadataMetadata such as sender, date created, date updated, and ID
Resource creation time. Expressed as ISO8601
The sender's DID
the resource's id
the protocol version
the resource's cryptographic signature
Resource last updated time. Expressed as ISO8601
Computes a digest of the payload by:
The SHA-256 hash of the canonicalized payload, represented as a byte array.
returns the resource as a json object. Automatically used by JSON.stringify
method.
Validates the resource structure and verifies the cryptographic signature
Resource signer's DID
if the resource signature is invalid
if the signer's DID does not match Resource.metadata.from
if the resource structure is invalid
see Crypto.verify
Static
createCreates an Balance with the given options
options to create an balance
Static
generateGenerates a unique id with the resource kind's prefix
Static
parseParses a json resource into an Balance
the Balance to parse
The parsed Balance
if the balance could not be parsed or is not a valid Balance
A Balance is a protected resource used to communicate the amounts of each currency held by the PFI on behalf of its customer.