Tezos · Schema

DelegationOperation

TezosBlockchainTzKTBaking BadCryptocurrencySmart ContractsNFTTokensDelegationsStakingGovernanceFA1.2FA2WebSocket
View JSON Schema on GitHub

JSON Schema

delegationoperation.json Raw ↑
{
  "$schema": "http://json-schema.org/draft-07/schema#",
  "title": "DelegationOperation",
  "allOf": [
    {
      "type": "object",
      "additionalProperties": false,
      "properties": {
        "type": {
          "type": "string",
          "description": "Type of the operation, `delegation` -  is used to delegate funds to a delegate (an implicit account registered as a baker)"
        },
        "id": {
          "type": "integer",
          "description": "Unique ID of the operation, stored in the TzKT indexer database",
          "format": "int64"
        },
        "level": {
          "type": "integer",
          "description": "The height of the block from the genesis block, in which the operation was included",
          "format": "int32"
        },
        "timestamp": {
          "type": "string",
          "description": "Datetime of the block, in which the operation was included (ISO 8601, e.g. `2020-02-20T02:40:57Z`)",
          "format": "date-time"
        },
        "block": {
          "type": "string",
          "description": "Hash of the block, in which the operation was included"
        },
        "hash": {
          "type": "string",
          "description": "Hash of the operation"
        },
        "counter": {
          "type": "integer",
          "description": "An account nonce which is used to prevent operation replay",
          "format": "int32"
        },
        "initiator": {
          "description": "Information about the initiator of the delegation contract call",
          "nullable": true,
          "oneOf": [
            {
              "$ref": "#/components/schemas/Alias"
            }
          ]
        },
        "sender": {
          "description": "Information about the delegated account",
          "oneOf": [
            {
              "$ref": "#/components/schemas/Alias"
            }
          ]
        },
        "senderCodeHash": {
          "type": "integer",
          "description": "Hash of the sender contract code, or `null` is the sender is not a contract",
          "format": "int32",
          "nullable": true
        },
        "nonce": {
          "type": "integer",
          "description": "An account nonce which is used to prevent internal operation replay",
          "format": "int32",
          "nullable": true
        },
        "gasLimit": {
          "type": "integer",
          "description": "A cap on the amount of gas a given operation can consume",
          "format": "int32"
        },
        "gasUsed": {
          "type": "integer",
          "description": "Amount of gas, consumed by the operation",
          "format": "int32"
        },
        "storageLimit": {
          "type": "integer",
          "description": "A cap on the amount of storage a given operation can consume",
          "format": "int32"
        },
        "bakerFee": {
          "type": "integer",
          "description": "Fee to a baker, produced block, in which the operation was included",
          "format": "int64"
        },
        "amount": {
          "type": "integer",
          "description": "Sender's balance at the time of delegation operation (aka delegation amount).",
          "format": "int64"
        },
        "stakingUpdatesCount": {
          "type": "integer",
          "description": "Number of staking updates happened internally",
          "format": "int32",
          "nullable": true
        },
        "prevDelegate": {
          "description": "Information about the previous delegate of the account. `null` if there is no previous delegate",
          "nullable": true,
          "oneOf": [
            {
              "$ref": "#/components/schemas/Alias"
            }
          ]
        },
        "newDelegate": {
          "description": "Information about the delegate to which the operation was sent. `null` if there is no new delegate (an un-delegation operation)",
          "nullable": true,
          "oneOf": [
            {
              "$ref": "#/components/schemas/Alias"
            }
          ]
        },
        "status": {
          "type": "string",
          "description": "Operation status (`applied` - an operation applied by the node and successfully added to the blockchain,\n`failed` - an operation which failed with some particular error (not enough balance, gas limit, etc),\n`backtracked` - an operation which was successful but reverted due to one of the following operations in the same operation group was failed,\n`skipped` - all operations after the failed one in an operation group)"
        },
        "errors": {
          "type": "array",
          "description": "List of errors provided by the node, injected the operation to the blockchain. `null` if there is no errors",
          "nullable": true,
          "items": {
            "$ref": "#/components/schemas/OperationError"
          }
        },
        "quote": {
          "description": "Injected historical quote at the time of operation",
          "nullable": true,
          "oneOf": [
            {
              "$ref": "#/components/schemas/QuoteShort"
            }
          ]
        }
      }
    }
  ]
}