Account

Represents the state of an account on the ledger.

JSON representation
{
  "sequenceNumber": string,
  "publicKey": string,
  "roundId": string,
  "comment": string,

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "userDetails": {
    object (UserDetails)
  },
  "accountManagerDetails": {
    object (AccountManagerDetails)
  },
  "tokenManagerDetails": {
    object (TokenManagerDetails)
  },
  "contractTokenManagerDetails": {
    object (ContractTokenManagerDetails)
  },
  "contractDetails": {
    object (ContractDetails)
  },
  "clearinghouseDetails": {
    object (ClearingHouseDetails)
  },
  "currencyOperatorDetails": {
    object (CurrencyOperatorDetails)
  },
  "platformOperatorDetails": {
    object (PlatformOperatorDetails)
  }
  // End of mutually exclusive fields.
}
Fields
sequenceNumber

string (int64 format)

Output only. The sequence number of this account. This number increments with each transaction sent by this account.

publicKey

string (bytes format)

Output only. The primary public key associated with this account, used for signature verification.

A base64-encoded string.

roundId

string (int64 format)

Output only. The ID of the execution round (similar to block "height") at which the account information provided is accurate.

comment

string

Output only. The account comment stored when this account was created.

Specific details based on the type of account. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response:
userDetails

object (UserDetails)

Output only. Details for a standard user account.

accountManagerDetails

object (AccountManagerDetails)

Output only. Details for an account manager account.

tokenManagerDetails

object (TokenManagerDetails)

Output only. Details for a token manager account.

contractTokenManagerDetails

object (ContractTokenManagerDetails)

Output only. Details for a contract token manager account.

contractDetails

object (ContractDetails)

Output only. Details for a smart contract account.

clearinghouseDetails

object (ClearingHouseDetails)

Output only. Details for a clearinghouse account.

currencyOperatorDetails

object (CurrencyOperatorDetails)

Output only. Details for a currency operator account.

platformOperatorDetails

object (PlatformOperatorDetails)

Output only. Details for a platform operator account.

End of mutually exclusive fields.

UserDetails

Details specific to a User account.

JSON representation
{
  "accountManager": {
    object (Entity)
  },
  "accountManagerId": string,
  "tokenManager": {
    object (Entity)
  },
  "tokenManagerId": string,
  "roles": [
    enum (Role)
  ],
  "accountStatus": enum (AccountStatus),
  "balance": {
    object (CurrencyValue)
  },
  "accountFields": {
    string: {
      object (Fields)
    },
    ...
  },
  "contractAccountFields": {
    string: {
      object (Fields)
    },
    ...
  }
}
Fields
accountManager
(deprecated)

object (Entity)

Output only. Deprecated: Use accountManagerId instead. The account manager for this user.

accountManagerId

string

Output only. The ID of the account manager for this user.

tokenManager
(deprecated)

object (Entity)

Output only. Deprecated: Use tokenManagerId instead. The token manager for this user.

tokenManagerId

string

Output only. The ID of the token manager for this user.

roles[]

enum (Role)

Output only. The list of roles granted to this account.

accountStatus

enum (AccountStatus)

Output only. The status of this account.

balance

object (CurrencyValue)

Output only. The token balance of this user account.

accountFields
(deprecated)

map (key: string, value: object (Fields))

Output only. Deprecated: Use contractAccountFields instead. The contract account fields (contract ID -> fields) for this user.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

contractAccountFields

map (key: string, value: object (Fields))

Output only. The contract account fields (contract ID -> fields) for this user.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

Entity

An entity in the Universal Ledger network. All accounts are attached to an entity. The entity ID, also often referred to as the account ID, is unique and immutable across the network.

JSON representation
{
  "id": string
}
Fields
id

string

Output only. The ID assigned to the entity. This is assigned by the network on account creation.

Role

The regular set of roles.

Enums
ROLE_UNSPECIFIED Invalid role.
ROLE_PAYER The role that allows an account to initiate a payment transaction.
ROLE_RECEIVER The role that allows an account to receive payments.
ROLE_CONTRACT_CREATOR The role that allows an account to deploy contracts.
ROLE_CONTRACT_PARTICIPANT The role that allows an account to interact with deployed contracts.

AccountStatus

The status of an account.

Enums
ACCOUNT_STATUS_UNSPECIFIED Invalid status.
ACCOUNT_STATUS_ACTIVE Active state where the account can conduct the operations allowed by its roles.
ACCOUNT_STATUS_INACTIVE Inactive state where all transactions on the account are forbidden. The manager of the account can still send account management transactions.

CurrencyValue

Represents an amount of currency (i.e. money). Note that the denominated currency is not included in this message. The relevant currency is decided by the account that sends the transaction. Each account has a unique immutable currency associated to it.

JSON representation
{
  "value": string
}
Fields
value

string (int64 format)

Required. The number of minor units of the currency.

This smallest valid denomination is referred to as "minor units" and is specified in ISO 4217. As an example, for USD, the value will be the number of cents and for GBP it will be the number of pence. For the Japanese Yen which does not have a minor unit, it will be the number of Yen.

Fields

A map of fields (field name -> value) from a contract used to represent contract fields or account fields.

JSON representation
{
  "fields": {
    string: {
      object (Value)
    },
    ...
  }
}
Fields
fields

map (key: string, value: object (Value))

Output only. The map of field names to their values.

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

Value

A concrete value of some type.

JSON representation
{

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "noneValue": enum (NoneValue),
  "boolValue": boolean,
  "int64Value": string,
  "stringValue": string,
  "accountId": string,
  "dictValue": {
    object (DictValue)
  },
  "qualifiedCurrencyValue": {
    object (QualifiedCurrencyValue)
  },
  "amountValue": {
    object (AmountValue)
  }
  // End of mutually exclusive fields.
}
Fields
The actual value. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response:
noneValue

enum (NoneValue)

Optional. Represents a None value.

boolValue

boolean

Optional. A boolean value.

int64Value

string (int64 format)

Optional. An int64 value.

stringValue

string

Optional. A string value.

accountId

string

Optional. An account ID.

dictValue

object (DictValue)

Optional. A dictionary value.

qualifiedCurrencyValue

object (QualifiedCurrencyValue)

Optional. A qualified currency value.

amountValue

object (AmountValue)

Optional. An amount value.

End of mutually exclusive fields.

NoneValue

A singleton enumeration to represent the None value.

Enums
NONE_VALUE_UNSPECIFIED The None value.

DictValue

Indices map key to value. For example, keys[0] key maps to values[0].

JSON representation
{

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "boolKeys": {
    object (BoolList)
  },
  "stringKeys": {
    object (StringList)
  },
  "int64Keys": {
    object (Int64List)
  },
  "accountIdKeys": {
    object (AccountIdList)
  }
  // End of mutually exclusive fields.

  // The following is a list of mutually exclusive fields. At most one of the
  // fields will be set in a response:
  "boolValues": {
    object (BoolList)
  },
  "stringValues": {
    object (StringList)
  },
  "int64Values": {
    object (Int64List)
  },
  "dictValues": {
    object (DictList)
  }
  // End of mutually exclusive fields.
}
Fields
Each key can be exactly one kind. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response:
boolKeys

object (BoolList)

Optional. A list of boolean keys.

stringKeys

object (StringList)

Optional. A list of string keys.

int64Keys

object (Int64List)

Optional. A list of int64 keys.

accountIdKeys

object (AccountIdList)

Optional. A list of account ID keys.

End of mutually exclusive fields.
Each value can be exactly one kind. The following is a list of mutually exclusive fields. At most one of the fields will be set in a response:
boolValues

object (BoolList)

Optional. A list of boolean values.

stringValues

object (StringList)

Optional. A list of string values.

int64Values

object (Int64List)

Optional. A list of int64 values.

dictValues

object (DictList)

Optional. Values are a list of nested dictionaries.

End of mutually exclusive fields.

BoolList

A list of booleans.

JSON representation
{
  "values": [
    boolean
  ]
}
Fields
values[]

boolean

Optional. The boolean values.

StringList

A list of strings.

JSON representation
{
  "values": [
    string
  ]
}
Fields
values[]

string

Optional. The string values.

Int64List

A list of int64s.

JSON representation
{
  "values": [
    string
  ]
}
Fields
values[]

string (int64 format)

Optional. The int64 values.

AccountIdList

A list of account IDs.

JSON representation
{
  "values": [
    string
  ]
}
Fields
values[]

string

Optional. The account ID values.

DictList

A list of dictionaries.

JSON representation
{
  "values": [
    {
      object (DictValue)
    }
  ]
}
Fields
values[]

object (DictValue)

Optional. The DictValue values. All nested dicts must have the same concrete type.

QualifiedCurrencyValue

Represents a currency on the ledger, which is qualified by its Currency Operator.

JSON representation
{
  "operatorId": string
}
Fields
operatorId

string

Required. The Currency Operator ID administering the currency.

AmountValue

Represents a denominated amount in a currency.

JSON representation
{
  "currency": {
    object (QualifiedCurrencyValue)
  },
  "amountValue": string
}
Fields
currency

object (QualifiedCurrencyValue)

Required. The currency of the amount.

amountValue

string (int64 format)

Required. The number of minor units of the currency.

AccountManagerDetails

Details specific to an Account Manager.

JSON representation
{
  "tokenManager": {
    object (Entity)
  },
  "numAccounts": integer,
  "tokenManagerId": string
}
Fields
tokenManager
(deprecated)

object (Entity)

Output only. Deprecated: Use tokenManagerId instead. The default token manager for accounts created by this account manager.

numAccounts

integer

Output only. The number of accounts created by this account manager.

tokenManagerId

string

Output only. The ID of the default token manager for accounts created by this account manager.

TokenManagerDetails

Details specific to a Token Manager.

JSON representation
{
  "issuanceLimit": {
    object (CurrencyValue)
  },
  "issuedTokens": {
    object (CurrencyValue)
  }
}
Fields
issuanceLimit

object (CurrencyValue)

Output only. The amount of tokens this token manager is allowed to mint.

issuedTokens

object (CurrencyValue)

Output only. The amount of tokens minted by this token manager. This number will increase when minting and decrease when burning.

ContractTokenManagerDetails

Details specific to a Contract Token Manager.

JSON representation
{
  "issuanceLimit": {
    object (CurrencyValue)
  },
  "issuedTokens": {
    object (CurrencyValue)
  },
  "previousContractTokenManagerId": string,
  "accountStatus": enum (AccountStatus)
}
Fields
issuanceLimit

object (CurrencyValue)

Output only. The amount of tokens this contract token manager is allowed to provide backing for.

Since contract token managers cannot increase or decrease their issuance limit, this should equal the issuedTokens.

issuedTokens

object (CurrencyValue)

Output only. The amount of tokens this contract token manager is providing backing for (that is, its total liability).

This equals to the sum of all balances held in contracts for its currency, plus its net position in the settlement matrix.

previousContractTokenManagerId

string

Output only. The account ID of the previous contract token manager for this currency. This forms an audit trail that can be traversed to discover all previous managers. If this is the first contract token manager for the currency, this will be empty.

accountStatus

enum (AccountStatus)

Output only. The status of this account.

ContractDetails

Details specific to a Smart Contract.

JSON representation
{
  "owner": {
    object (Entity)
  },
  "ownerId": string,
  "code": string,
  "contractFields": {
    object (Fields)
  },
  "currencyBalances": {
    string: {
      object (CurrencyValue)
    },
    ...
  }
}
Fields
owner
(deprecated)

object (Entity)

Output only. Deprecated: Use ownerId instead. The owner of the contract.

ownerId

string

Output only. The ID of the owner of the contract.

code

string (bytes format)

Output only. The serialized contract code.

A base64-encoded string.

contractFields

object (Fields)

Output only. The contract fields (field name -> value) for this contract.

currencyBalances

map (key: string, value: object (CurrencyValue))

Output only. The currency balances held by the contract (currency operator -> balance).

An object containing a list of "key": value pairs. Example: { "name": "wrench", "mass": "1.3kg", "count": "3" }.

ClearingHouseDetails

Details specific to a Clearinghouse.

JSON representation
{
  "accountStatus": enum (AccountStatus),
  "balances": [
    {
      object (BalanceToSettle)
    }
  ],
  "settlementMode": enum (SettlementMode)
}
Fields
accountStatus

enum (AccountStatus)

Output only. The status of this account.

balances[]

object (BalanceToSettle)

Output only. The balances that this clearinghouse is currently tracking for settlement.

settlementMode

enum (SettlementMode)

Output only. The settlement mode of this clearinghouse.

BalanceToSettle

A balance to settle between two token managers.

JSON representation
{
  "balancePayer": {
    object (Entity)
  },
  "balancePayerId": string,
  "balanceReceiver": {
    object (Entity)
  },
  "balanceReceiverId": string,
  "balance": {
    object (CurrencyValue)
  }
}
Fields
balancePayer
(deprecated)

object (Entity)

Output only. Deprecated: Use balancePayerId instead. The account which owes the balance to be settled.

balancePayerId

string

Output only. The ID of the account which owes the balance to be settled.

balanceReceiver
(deprecated)

object (Entity)

Output only. Deprecated: Use balanceReceiverId instead. The account which is owed the balance to be settled.

balanceReceiverId

string

Output only. The ID of the account which is owed the balance to be settled.

balance

object (CurrencyValue)

Output only. The balance to settle. Must be positive.

SettlementMode

The settlement mode for a clearinghouse.

Enums
SETTLEMENT_MODE_UNSPECIFIED The settlement mode is unspecified. This value is invalid and should not be used.
SETTLEMENT_MODE_DEFERRED The clearinghouse is responsible for tracking the ownership of the off-ledger funds, and periodically issuing SettlementRequest transactions to maintain the corresponding balances on the ledger in sync.
SETTLEMENT_MODE_INSTANT The clearinghouse maintains a single pool of funds and the ledger acts as the golden source for the allocation of those funds between the token managers. This settlement mode can also be described as "instant gross settlement."

CurrencyOperatorDetails

Details specific to a Currency Operator.

JSON representation
{
  "currency": string,
  "currencyCode": string,
  "accountStatus": enum (AccountStatus),
  "previousEntityId": {
    object (Entity)
  },
  "previousCurrencyOperatorId": string,
  "platformOperatorEntityId": {
    object (Entity)
  },
  "platformOperatorId": string,
  "contractTokenManager": {
    object (Entity)
  },
  "contractTokenManagerId": string,
  "clearinghouseId": string
}
Fields
currency
(deprecated)

string

Output only. Deprecated: Use currencyCode instead. The currency associated with this account, represented by the 3-letter ISO 4217 code.

currencyCode

string

Output only. The ID of the currency associated with this account, represented by the 3-letter ISO 4217 code.

accountStatus

enum (AccountStatus)

Output only. The status of this account.

previousEntityId
(deprecated)

object (Entity)

Output only. Deprecated: Use previousCurrencyOperatorId instead. The previous currency operator which transferred ownership of the currency operator role to this account. If this is the first currency operator for the currency, this will be empty.

previousCurrencyOperatorId

string

Output only. The ID of the previous currency operator which transferred ownership of the currency operator role to this account. If this is the first currency operator for the currency, this will be empty.

platformOperatorEntityId
(deprecated)

object (Entity)

Output only. Deprecated: Use platformOperatorId instead. The platform operator which created this currency operator.

platformOperatorId

string

Output only. The ID of the platform operator which created this currency operator.

contractTokenManager
(deprecated)

object (Entity)

Output only. Deprecated: Use contractTokenManagerId instead. The contract token manager associated with this currency operator.

contractTokenManagerId

string

Output only. The ID of the contract token manager associated with this currency operator.

clearinghouseId

string

Output only. The ID of the clearinghouse associated with this currency operator.

PlatformOperatorDetails

Details specific to a Platform Operator.

JSON representation
{
  "accountStatus": enum (AccountStatus),
  "previousEntityId": {
    object (Entity)
  },
  "previousPlatformOperatorId": string
}
Fields
accountStatus

enum (AccountStatus)

Output only. The status of this account.

previousEntityId
(deprecated)

object (Entity)

Output only. Deprecated: Use previousPlatformOperatorId instead. The previous platform operator which transferred ownership of the platform operator role to this account. If this is the first platform operator, this will be empty.

previousPlatformOperatorId

string

Output only. The ID of the previous platform operator which transferred ownership of the platform operator role to this account. If this is the first platform operator, this will be empty.