# OCAP GraphQL API List


## Table of Contents

* [Queries](#queries)
  * [getAccountState](#getaccountstate)
  * [getAssetState](#getassetstate)
  * [getFactoryState](#getfactorystate)
  * [getDelegateState](#getdelegatestate)
  * [getTokenState](#gettokenstate)
  * [getEvidenceState](#getevidencestate)
  * [getForgeState](#getforgestate)
  * [getTokenFactoryState](#gettokenfactorystate)
  * [getTx](#gettx)
  * [getBlock](#getblock)
  * [getBlocks](#getblocks)
  * [getUnconfirmedTxs](#getunconfirmedtxs)
  * [getChainInfo](#getchaininfo)
  * [getConfig](#getconfig)
  * [getNetInfo](#getnetinfo)
  * [getNodeInfo](#getnodeinfo)
  * [getValidatorsInfo](#getvalidatorsinfo)
  * [getForgeStats](#getforgestats)
  * [listAssetTransactions](#listassettransactions)
  * [listAssets](#listassets)
  * [listBlocks](#listblocks)
  * [listTopAccounts](#listtopaccounts)
  * [listTransactions](#listtransactions)
  * [listTokens](#listtokens)
  * [listFactories](#listfactories)
  * [getAccountTokens](#getaccounttokens)
  * [getStakeState](#getstakestate)
  * [listStakes](#liststakes)
  * [getRollupState](#getrollupstate)
  * [listRollups](#listrollups)
  * [getRollupBlock](#getrollupblock)
  * [listRollupBlocks](#listrollupblocks)
  * [listRollupValidators](#listrollupvalidators)
  * [listDelegations](#listdelegations)
  * [search](#search)
  * [estimateGas](#estimategas)
  * [listTokenFlows](#listtokenflows)
  * [verifyAccountRisk](#verifyaccountrisk)
  * [getTokenDistribution](#gettokendistribution)
  * [listTokenFactories](#listtokenfactories)
* [Subscriptions](#subscriptions)
* [Mutations](#mutations)
  * [sendTx](#sendtx)


## Queries

### getAccountState

#### Arguments

* **address**, optional, null
* **height**, optional, null
* **keys**, optional, null
* **traceMigration**, optional, null

#### Result Format

```graphql
{
  getAccountState(
    address: "abc"
    height: "abc"
    keys: ["abc"]
    traceMigration: true
  ) {
    code
    state {
      address
      balance
      gasBalance
      issuer
      migratedFrom
      migratedTo
      moniker
      nonce
      numAssets
      numTxs
      pk
      context {
        genesisTime
        renaissanceTime
        genesisTx {
          code
          hash
          height
          index
          receiver
          sender
          time
          receipts {
            address
            changes {
              action
              target
              value
            }
          }
          tags {
            key
            value
          }
          tokenSymbols {
            address
            decimal
            symbol
            unit
          }
          tx {
            chainId
            delegator
            from
            gasFee
            gasPaid
            itxJson
            nonce
            pk
            receiver
            sender
            serviceFee
            signature
            signatures {
              delegator
              pk
              signature
              signer
              data {
                typeUrl
                value
              }
            }
          }
        }
        renaissanceTx {
          code
          hash
          height
          index
          receiver
          sender
          time
          receipts {
            address
            changes {
              action
              target
              value
            }
          }
          tags {
            key
            value
          }
          tokenSymbols {
            address
            decimal
            symbol
            unit
          }
          tx {
            chainId
            delegator
            from
            gasFee
            gasPaid
            itxJson
            nonce
            pk
            receiver
            sender
            serviceFee
            signature
            signatures {
              delegator
              pk
              signature
              signer
              data {
                typeUrl
                value
              }
            }
          }
        }
      }
      data {
        typeUrl
        value
      }
      tokens {
        address
        decimal
        symbol
        unit
        value
      }
      type {
        address
        hash
        pk
        role
      }
    }
  }
}
```

### getAssetState

#### Arguments

* **address**, optional, null
* **height**, optional, null
* **keys**, optional, null

#### Result Format

```graphql
{
  getAssetState(address: "abc", height: "abc", keys: ["abc"]) {
    code
    state {
      address
      consumedTime
      issuer
      moniker
      owner
      parent
      readonly
      tags
      transferrable
      ttl
      context {
        genesisTime
        renaissanceTime
        genesisTx {
          code
          hash
          height
          index
          receiver
          sender
          time
          receipts {
            address
            changes {
              action
              target
              value
            }
          }
          tags {
            key
            value
          }
          tokenSymbols {
            address
            decimal
            symbol
            unit
          }
          tx {
            chainId
            delegator
            from
            gasFee
            gasPaid
            itxJson
            nonce
            pk
            receiver
            sender
            serviceFee
            signature
            signatures {
              delegator
              pk
              signature
              signer
              data {
                typeUrl
                value
              }
            }
          }
        }
        renaissanceTx {
          code
          hash
          height
          index
          receiver
          sender
          time
          receipts {
            address
            changes {
              action
              target
              value
            }
          }
          tags {
            key
            value
          }
          tokenSymbols {
            address
            decimal
            symbol
            unit
          }
          tx {
            chainId
            delegator
            from
            gasFee
            gasPaid
            itxJson
            nonce
            pk
            receiver
            sender
            serviceFee
            signature
            signatures {
              delegator
              pk
              signature
              signer
              data {
                typeUrl
                value
              }
            }
          }
        }
      }
      data {
        typeUrl
        value
      }
      display {
        content
        type
      }
      endpoint {
        id
        scope
      }
    }
  }
}
```

### getFactoryState

#### Arguments

* **address**, optional, null

#### Result Format

```graphql
{
  getFactoryState(address: "abc") {
    code
    state {
      address
      balance
      description
      lastSettlement
      limit
      name
      numMinted
      owner
      settlement
      trustedIssuers
      context {
        genesisTime
        renaissanceTime
        genesisTx {
          code
          hash
          height
          index
          receiver
          sender
          time
          receipts {
            address
            changes {
              action
              target
              value
            }
          }
          tags {
            key
            value
          }
          tokenSymbols {
            address
            decimal
            symbol
            unit
          }
          tx {
            chainId
            delegator
            from
            gasFee
            gasPaid
            itxJson
            nonce
            pk
            receiver
            sender
            serviceFee
            signature
            signatures {
              delegator
              pk
              signature
              signer
              data {
                typeUrl
                value
              }
            }
          }
        }
        renaissanceTx {
          code
          hash
          height
          index
          receiver
          sender
          time
          receipts {
            address
            changes {
              action
              target
              value
            }
          }
          tags {
            key
            value
          }
          tokenSymbols {
            address
            decimal
            symbol
            unit
          }
          tx {
            chainId
            delegator
            from
            gasFee
            gasPaid
            itxJson
            nonce
            pk
            receiver
            sender
            serviceFee
            signature
            signatures {
              delegator
              pk
              signature
              signer
              data {
                typeUrl
                value
              }
            }
          }
        }
      }
      data {
        typeUrl
        value
      }
      display {
        content
        type
      }
      hooks {
        hook
        name
        type
      }
      input {
        assets
        value
        tokens {
          address
          decimal
          symbol
          unit
          value
        }
        variables {
          description
          name
          required
          value
        }
      }
      output {
        address
        issuer
        moniker
        parent
        readonly
        tags
        transferrable
        ttl
        data {
          typeUrl
          value
        }
        display {
          content
          type
        }
        endpoint {
          id
          scope
        }
      }
      tokens {
        address
        decimal
        symbol
        unit
        value
      }
    }
  }
}
```

### getDelegateState

#### Arguments

* **address**, optional, null
* **height**, optional, null
* **keys**, optional, null

#### Result Format

```graphql
{
  getDelegateState(address: "abc", height: "abc", keys: ["abc"]) {
    code
    state {
      address
      deny
      from
      ops
      to
      validUntil
      context {
        genesisTime
        renaissanceTime
        genesisTx {
          code
          hash
          height
          index
          receiver
          sender
          time
          receipts {
            address
            changes {
              action
              target
              value
            }
          }
          tags {
            key
            value
          }
          tokenSymbols {
            address
            decimal
            symbol
            unit
          }
          tx {
            chainId
            delegator
            from
            gasFee
            gasPaid
            itxJson
            nonce
            pk
            receiver
            sender
            serviceFee
            signature
            signatures {
              delegator
              pk
              signature
              signer
              data {
                typeUrl
                value
              }
            }
          }
        }
        renaissanceTx {
          code
          hash
          height
          index
          receiver
          sender
          time
          receipts {
            address
            changes {
              action
              target
              value
            }
          }
          tags {
            key
            value
          }
          tokenSymbols {
            address
            decimal
            symbol
            unit
          }
          tx {
            chainId
            delegator
            from
            gasFee
            gasPaid
            itxJson
            nonce
            pk
            receiver
            sender
            serviceFee
            signature
            signatures {
              delegator
              pk
              signature
              signer
              data {
                typeUrl
                value
              }
            }
          }
        }
      }
      data {
        typeUrl
        value
      }
    }
  }
}
```

### getTokenState

#### Arguments

* **address**, optional, null

#### Result Format

```graphql
{
  getTokenState(address: "abc") {
    code
    state {
      address
      decimal
      description
      icon
      initialSupply
      issuer
      maxTotalSupply
      minters
      name
      spenders
      symbol
      tokenFactoryAddress
      totalSupply
      type
      unit
      website
      context {
        genesisTime
        renaissanceTime
        genesisTx {
          code
          hash
          height
          index
          receiver
          sender
          time
          receipts {
            address
            changes {
              action
              target
              value
            }
          }
          tags {
            key
            value
          }
          tokenSymbols {
            address
            decimal
            symbol
            unit
          }
          tx {
            chainId
            delegator
            from
            gasFee
            gasPaid
            itxJson
            nonce
            pk
            receiver
            sender
            serviceFee
            signature
            signatures {
              delegator
              pk
              signature
              signer
              data {
                typeUrl
                value
              }
            }
          }
        }
        renaissanceTx {
          code
          hash
          height
          index
          receiver
          sender
          time
          receipts {
            address
            changes {
              action
              target
              value
            }
          }
          tags {
            key
            value
          }
          tokenSymbols {
            address
            decimal
            symbol
            unit
          }
          tx {
            chainId
            delegator
            from
            gasFee
            gasPaid
            itxJson
            nonce
            pk
            receiver
            sender
            serviceFee
            signature
            signatures {
              delegator
              pk
              signature
              signer
              data {
                typeUrl
                value
              }
            }
          }
        }
      }
      data {
        typeUrl
        value
      }
      foreignToken {
        chainId
        chainName
        chainType
        contractAddress
        type
      }
      metadata {
        typeUrl
        value
      }
    }
  }
}
```

### getEvidenceState

#### Arguments

* **hash**, optional, null

#### Result Format

```graphql
{
  getEvidenceState(hash: "abc") {
    code
    state {
      data
      hash
      context {
        genesisTime
        renaissanceTime
        genesisTx {
          code
          hash
          height
          index
          receiver
          sender
          time
          receipts {
            address
            changes {
              action
              target
              value
            }
          }
          tags {
            key
            value
          }
          tokenSymbols {
            address
            decimal
            symbol
            unit
          }
          tx {
            chainId
            delegator
            from
            gasFee
            gasPaid
            itxJson
            nonce
            pk
            receiver
            sender
            serviceFee
            signature
            signatures {
              delegator
              pk
              signature
              signer
              data {
                typeUrl
                value
              }
            }
          }
        }
        renaissanceTx {
          code
          hash
          height
          index
          receiver
          sender
          time
          receipts {
            address
            changes {
              action
              target
              value
            }
          }
          tags {
            key
            value
          }
          tokenSymbols {
            address
            decimal
            symbol
            unit
          }
          tx {
            chainId
            delegator
            from
            gasFee
            gasPaid
            itxJson
            nonce
            pk
            receiver
            sender
            serviceFee
            signature
            signatures {
              delegator
              pk
              signature
              signer
              data {
                typeUrl
                value
              }
            }
          }
        }
      }
    }
  }
}
```

### getForgeState

#### Arguments

* **height**, optional, null
* **keys**, optional, null

#### Result Format

```graphql
{
  getForgeState(height: "abc", keys: ["abc"]) {
    code
    state {
      address
      reservedSymbols
      tasks
      version
      accountConfig {
        address
        balance
        pk
      }
      consensus {
        maxBytes
        maxCandidates
        maxGas
        maxValidators
        paramChanged
        pubKeyTypes
        validatorChanged
        validators {
          address
          power
        }
      }
      data {
        typeUrl
        value
      }
      token {
        address
        decimal
        description
        icon
        inflationRate
        initialSupply
        name
        symbol
        totalSupply
        unit
      }
      txConfig {
        maxAssetSize
        maxListSize
        maxMultisig
        delegate {
          deltaInterval
          typeUrls
        }
        txFee {
          fee
          typeUrl
        }
        txGas {
          createState
          dataStorage
          maxStake
          minStake
          price
          stakeLockPeriod
          updateState
        }
        txStake {
          createToken
          createTokenLockPeriod
        }
      }
      upgradeInfo {
        height
        version
      }
      vaults {
        slashedStake
        txFee
        txGas
      }
    }
  }
}
```

### getTokenFactoryState

#### Arguments

* **address**, optional, null

#### Result Format

```graphql
{
  getTokenFactoryState(address: "abc") {
    code
    state {
      address
      currentSupply
      feeRate
      owner
      reserveAddress
      reserveBalance
      status
      tokenAddress
      context {
        genesisTime
        renaissanceTime
        genesisTx {
          code
          hash
          height
          index
          receiver
          sender
          time
          receipts {
            address
            changes {
              action
              target
              value
            }
          }
          tags {
            key
            value
          }
          tokenSymbols {
            address
            decimal
            symbol
            unit
          }
          tx {
            chainId
            delegator
            from
            gasFee
            gasPaid
            itxJson
            nonce
            pk
            receiver
            sender
            serviceFee
            signature
            signatures {
              delegator
              pk
              signature
              signer
              data {
                typeUrl
                value
              }
            }
          }
        }
        renaissanceTx {
          code
          hash
          height
          index
          receiver
          sender
          time
          receipts {
            address
            changes {
              action
              target
              value
            }
          }
          tags {
            key
            value
          }
          tokenSymbols {
            address
            decimal
            symbol
            unit
          }
          tx {
            chainId
            delegator
            from
            gasFee
            gasPaid
            itxJson
            nonce
            pk
            receiver
            sender
            serviceFee
            signature
            signatures {
              delegator
              pk
              signature
              signer
              data {
                typeUrl
                value
              }
            }
          }
        }
      }
      curve {
        basePrice
        constant
        fixedPrice
        slope
        type
      }
      data {
        typeUrl
        value
      }
      reserveToken {
        address
        decimal
        description
        icon
        initialSupply
        issuer
        maxTotalSupply
        minters
        name
        spenders
        symbol
        tokenFactoryAddress
        totalSupply
        type
        unit
        website
        context {
          genesisTime
          renaissanceTime
          genesisTx {
            code
            hash
            height
            index
            receiver
            sender
            time
            receipts {
              address
              changes {
                action
                target
                value
              }
            }
            tags {
              key
              value
            }
            tokenSymbols {
              address
              decimal
              symbol
              unit
            }
            tx {
              chainId
              delegator
              from
              gasFee
              gasPaid
              itxJson
              nonce
              pk
              receiver
              sender
              serviceFee
              signature
              signatures {
                delegator
                pk
                signature
                signer
              }
            }
          }
          renaissanceTx {
            code
            hash
            height
            index
            receiver
            sender
            time
            receipts {
              address
              changes {
                action
                target
                value
              }
            }
            tags {
              key
              value
            }
            tokenSymbols {
              address
              decimal
              symbol
              unit
            }
            tx {
              chainId
              delegator
              from
              gasFee
              gasPaid
              itxJson
              nonce
              pk
              receiver
              sender
              serviceFee
              signature
              signatures {
                delegator
                pk
                signature
                signer
              }
            }
          }
        }
        data {
          typeUrl
          value
        }
        foreignToken {
          chainId
          chainName
          chainType
          contractAddress
          type
        }
        metadata {
          typeUrl
          value
        }
      }
      token {
        address
        decimal
        description
        icon
        initialSupply
        issuer
        maxTotalSupply
        minters
        name
        spenders
        symbol
        tokenFactoryAddress
        totalSupply
        type
        unit
        website
        context {
          genesisTime
          renaissanceTime
          genesisTx {
            code
            hash
            height
            index
            receiver
            sender
            time
            receipts {
              address
              changes {
                action
                target
                value
              }
            }
            tags {
              key
              value
            }
            tokenSymbols {
              address
              decimal
              symbol
              unit
            }
            tx {
              chainId
              delegator
              from
              gasFee
              gasPaid
              itxJson
              nonce
              pk
              receiver
              sender
              serviceFee
              signature
              signatures {
                delegator
                pk
                signature
                signer
              }
            }
          }
          renaissanceTx {
            code
            hash
            height
            index
            receiver
            sender
            time
            receipts {
              address
              changes {
                action
                target
                value
              }
            }
            tags {
              key
              value
            }
            tokenSymbols {
              address
              decimal
              symbol
              unit
            }
            tx {
              chainId
              delegator
              from
              gasFee
              gasPaid
              itxJson
              nonce
              pk
              receiver
              sender
              serviceFee
              signature
              signatures {
                delegator
                pk
                signature
                signer
              }
            }
          }
        }
        data {
          typeUrl
          value
        }
        foreignToken {
          chainId
          chainName
          chainType
          contractAddress
          type
        }
        metadata {
          typeUrl
          value
        }
      }
    }
  }
}
```

### getTx

#### Arguments

* **hash**, optional, null

#### Result Format

```graphql
{
  getTx(hash: "abc") {
    code
    info {
      code
      hash
      height
      index
      receiver
      sender
      time
      receipts {
        address
        changes {
          action
          target
          value
        }
      }
      tags {
        key
        value
      }
      tokenSymbols {
        address
        decimal
        symbol
        unit
      }
      tx {
        chainId
        delegator
        from
        gasFee
        gasPaid
        itxJson
        nonce
        pk
        receiver
        sender
        serviceFee
        signature
        signatures {
          delegator
          pk
          signature
          signer
          data {
            typeUrl
            value
          }
        }
      }
    }
  }
}
```

### getBlock

#### Arguments

* **height**, optional, null

#### Result Format

```graphql
{
  getBlock(height: "abc") {
    code
    block {
      appHash
      consensusHash
      dataHash
      evidenceHash
      height
      invalidTxsHashes
      lastCommitHash
      lastResultsHash
      nextValidatorsHash
      numTxs
      proposer
      time
      totalTxs
      txsHashes
      validatorsHash
      invalidTxs {
        code
        hash
        height
        index
        receiver
        sender
        time
        receipts {
          address
          changes {
            action
            target
            value
          }
        }
        tags {
          key
          value
        }
        tokenSymbols {
          address
          decimal
          symbol
          unit
        }
        tx {
          chainId
          delegator
          from
          gasFee
          gasPaid
          itxJson
          nonce
          pk
          receiver
          sender
          serviceFee
          signature
          signatures {
            delegator
            pk
            signature
            signer
            data {
              typeUrl
              value
            }
          }
        }
      }
      lastBlockId {
        hash
        partsHeader {
          hash
          total
        }
      }
      txs {
        code
        hash
        height
        index
        receiver
        sender
        time
        receipts {
          address
          changes {
            action
            target
            value
          }
        }
        tags {
          key
          value
        }
        tokenSymbols {
          address
          decimal
          symbol
          unit
        }
        tx {
          chainId
          delegator
          from
          gasFee
          gasPaid
          itxJson
          nonce
          pk
          receiver
          sender
          serviceFee
          signature
          signatures {
            delegator
            pk
            signature
            signer
            data {
              typeUrl
              value
            }
          }
        }
      }
      version {
        app
        block
      }
    }
  }
}
```

### getBlocks

#### Arguments

* **emptyExcluded**, optional, null
* **heightFilter**, optional, null
* **paging**, optional, null

#### Result Format

```graphql
{
  getBlocks(emptyExcluded: true) {
    code
    blocks {
      appHash
      consensusHash
      dataHash
      evidenceHash
      height
      invalidTxsHashes
      lastCommitHash
      lastResultsHash
      nextValidatorsHash
      numTxs
      proposer
      time
      totalTxs
      txsHashes
      validatorsHash
      lastBlockId {
        hash
        partsHeader {
          hash
          total
        }
      }
      version {
        app
        block
      }
    }
    page {
      cursor
      next
      total
    }
  }
}
```

### getUnconfirmedTxs

#### Arguments

* **paging**, optional, null

#### Result Format

```graphql
{
  getUnconfirmedTxs {
    code
    page {
      cursor
      next
      total
    }
    unconfirmedTxs {
      nTxs
      txs {
        chainId
        delegator
        from
        gasFee
        gasPaid
        itxJson
        nonce
        pk
        receiver
        sender
        serviceFee
        signature
        signatures {
          delegator
          pk
          signature
          signer
          data {
            typeUrl
            value
          }
        }
      }
    }
  }
}
```

### getChainInfo

#### Arguments

No arguments

#### Result Format

```graphql
{
  getChainInfo {
    code
    info {
      address
      appHash
      blockHash
      blockHeight
      blockTime
      consensusVersion
      forgeAppsVersion
      id
      moniker
      network
      supportedTxs
      synced
      totalTxs
      version
      votingPower
    }
  }
}
```

### getConfig

#### Arguments

* **parsed**, optional, null

#### Result Format

```graphql
{
  getConfig(parsed: true) {
    code
    config
  }
}
```

### getNetInfo

#### Arguments

No arguments

#### Result Format

```graphql
{
  getNetInfo {
    code
    netInfo {
      listeners
      listening
      nPeers
      peers {
        consensusVersion
        id
        ip
        moniker
        network
        geoInfo {
          city
          country
          latitude
          longitude
        }
      }
    }
  }
}
```

### getNodeInfo

#### Arguments

No arguments

#### Result Format

```graphql
{
  getNodeInfo {
    code
    info {
      address
      appHash
      blockHash
      blockHeight
      blockTime
      consensusVersion
      forgeAppsVersion
      id
      ip
      moniker
      network
      p2pAddress
      supportedTxs
      synced
      totalTxs
      version
      votingPower
      geoInfo {
        city
        country
        latitude
        longitude
      }
    }
  }
}
```

### getValidatorsInfo

#### Arguments

No arguments

#### Result Format

```graphql
{
  getValidatorsInfo {
    code
    validatorsInfo {
      blockHeight
      validators {
        address
        name
        proposerPriority
        votingPower
        geoInfo {
          city
          country
          latitude
          longitude
        }
        pubKey {
          data
          type
        }
      }
    }
  }
}
```

### getForgeStats

#### Arguments

No arguments

#### Result Format

```graphql
{
  getForgeStats {
    code
    forgeStats {
      avgBlockTime
      avgTps
      maxTps
      numAccountMigrateTxs
      numBlocks
      numConsensusUpgradeTxs
      numConsumeAssetTxs
      numCreateAssetTxs
      numDeclareFileTxs
      numDeclareTxs
      numExchangeTxs
      numStakes
      numStakeTxs
      numSysUpgradeTxs
      numTransferTxs
      numTxs
      numUpdateAssetTxs
      numValidators
      tps
    }
  }
}
```

### listAssetTransactions

#### Arguments

* **address**, optional, null
* **paging**, optional, null

#### Result Format

```graphql
{
  listAssetTransactions(address: "abc") {
    code
    page {
      cursor
      next
      total
    }
    transactions {
      code
      hash
      receiver
      sender
      time
      type
      valid
      receipts {
        address
        changes {
          action
          target
          value
        }
      }
      tokenSymbols {
        address
        balance
        decimal
        symbol
        unit
      }
      tx {
        chainId
        delegator
        from
        gasFee
        gasPaid
        itxJson
        nonce
        pk
        receiver
        sender
        serviceFee
        signature
        signatures {
          delegator
          pk
          signature
          signer
          data {
            typeUrl
            value
          }
        }
      }
    }
  }
}
```

### listAssets

#### Arguments

* **ownerAddress**, optional, null
* **paging**, optional, null
* **factoryAddress**, optional, null
* **timeFilter**, optional, null

#### Result Format

```graphql
{
  listAssets(ownerAddress: "abc", factoryAddress: "abc") {
    code
    assets {
      address
      consumedTime
      genesisTime
      issuer
      moniker
      owner
      parent
      readonly
      renaissanceTime
      tags
      transferrable
      ttl
      data {
        typeUrl
        value
      }
      display {
        content
        type
      }
      endpoint {
        id
        scope
      }
    }
    page {
      cursor
      next
      total
    }
  }
}
```

### listBlocks

#### Arguments

* **heightFilter**, optional, null
* **numInvalidTxsFilter**, optional, null
* **numTxsFilter**, optional, null
* **paging**, optional, null
* **proposer**, optional, null
* **timeFilter**, optional, null

#### Result Format

```graphql
{
  listBlocks(proposer: "abc") {
    code
    blocks {
      height
      numInvalidTxs
      numTxs
      proposer
      time
    }
    page {
      cursor
      next
      total
    }
  }
}
```

### listTopAccounts

#### Arguments

* **paging**, optional, null
* **tokenAddress**, optional, null
* **timeFilter**, optional, null

#### Result Format

```graphql
{
  listTopAccounts(tokenAddress: "abc") {
    code
    accounts {
      address
      balance
      genesisTime
      migratedFrom
      migratedTo
      moniker
      nonce
      numAssets
      numTxs
      recentNumTxs
      renaissanceTime
      totalReceivedStakes
      totalStakes
      totalUnstakes
      tokens {
        address
        balance
        decimal
        symbol
        unit
      }
    }
    page {
      cursor
      next
      total
    }
  }
}
```

### listTransactions

#### Arguments

* **addressFilter**, optional, null
* **paging**, optional, null
* **timeFilter**, optional, null
* **typeFilter**, optional, null
* **validityFilter**, optional, null
* **factoryFilter**, optional, null
* **tokenFilter**, optional, null
* **assetFilter**, optional, null
* **accountFilter**, optional, null
* **txFilter**, optional, null
* **rollupFilter**, optional, null
* **stakeFilter**, optional, null
* **delegationFilter**, optional, null
* **tokenFactoryFilter**, optional, null
* **includeItxData**, optional, null

#### Result Format

```graphql
{
  listTransactions(includeItxData: true) {
    code
    page {
      cursor
      next
      total
    }
    transactions {
      code
      hash
      receiver
      sender
      time
      type
      valid
      receipts {
        address
        changes {
          action
          target
          value
        }
      }
      tokenSymbols {
        address
        balance
        decimal
        symbol
        unit
      }
      tx {
        chainId
        delegator
        from
        gasFee
        gasPaid
        itxJson
        nonce
        pk
        receiver
        sender
        serviceFee
        signature
        signatures {
          delegator
          pk
          signature
          signer
          data {
            typeUrl
            value
          }
        }
      }
    }
  }
}
```

### listTokens

#### Arguments

* **issuerAddress**, optional, null
* **paging**, optional, null
* **timeFilter**, optional, null

#### Result Format

```graphql
{
  listTokens(issuerAddress: "abc") {
    code
    page {
      cursor
      next
      total
    }
    tokens {
      address
      decimal
      description
      genesisTime
      icon
      initialSupply
      issuer
      maxTotalSupply
      minters
      name
      renaissanceTime
      spenders
      symbol
      tokenFactoryAddress
      totalSupply
      type
      unit
      website
      data {
        typeUrl
        value
      }
      foreignToken {
        chainId
        chainName
        chainType
        contractAddress
        type
      }
      metadata {
        typeUrl
        value
      }
    }
  }
}
```

### listFactories

#### Arguments

* **ownerAddress**, optional, null
* **addressList**, optional, null
* **paging**, optional, null
* **timeFilter**, optional, null

#### Result Format

```graphql
{
  listFactories(ownerAddress: "abc", addressList: ["abc"]) {
    code
    factories {
      address
      balance
      description
      genesisTime
      lastSettlement
      limit
      name
      numMinted
      owner
      renaissanceTime
      settlement
      trustedIssuers
      data {
        typeUrl
        value
      }
      display {
        content
        type
      }
      hooks {
        hook
        name
        type
      }
      input {
        assets
        value
        tokens {
          address
          decimal
          symbol
          unit
          value
        }
        variables {
          description
          name
          required
          value
        }
      }
      output {
        address
        issuer
        moniker
        parent
        readonly
        tags
        transferrable
        ttl
        data {
          typeUrl
          value
        }
        display {
          content
          type
        }
        endpoint {
          id
          scope
        }
      }
      tokens {
        address
        balance
        decimal
        symbol
        unit
      }
    }
    page {
      cursor
      next
      total
    }
  }
}
```

### getAccountTokens

#### Arguments

* **address**, optional, null
* **token**, optional, null

#### Result Format

```graphql
{
  getAccountTokens(address: "abc", token: "abc") {
    code
    tokens {
      address
      balance
      decimal
      symbol
    }
  }
}
```

### getStakeState

#### Arguments

* **address**, optional, null
* **height**, optional, null
* **keys**, optional, null

#### Result Format

```graphql
{
  getStakeState(address: "abc", height: "abc", keys: ["abc"]) {
    code
    state {
      address
      assets
      message
      nonce
      receiver
      revocable
      revokedAssets
      revokeWaitingPeriod
      sender
      slashers
      context {
        genesisTime
        renaissanceTime
        genesisTx {
          code
          hash
          height
          index
          receiver
          sender
          time
          receipts {
            address
            changes {
              action
              target
              value
            }
          }
          tags {
            key
            value
          }
          tokenSymbols {
            address
            decimal
            symbol
            unit
          }
          tx {
            chainId
            delegator
            from
            gasFee
            gasPaid
            itxJson
            nonce
            pk
            receiver
            sender
            serviceFee
            signature
            signatures {
              delegator
              pk
              signature
              signer
              data {
                typeUrl
                value
              }
            }
          }
        }
        renaissanceTx {
          code
          hash
          height
          index
          receiver
          sender
          time
          receipts {
            address
            changes {
              action
              target
              value
            }
          }
          tags {
            key
            value
          }
          tokenSymbols {
            address
            decimal
            symbol
            unit
          }
          tx {
            chainId
            delegator
            from
            gasFee
            gasPaid
            itxJson
            nonce
            pk
            receiver
            sender
            serviceFee
            signature
            signatures {
              delegator
              pk
              signature
              signer
              data {
                typeUrl
                value
              }
            }
          }
        }
      }
      data {
        typeUrl
        value
      }
      revokedTokens {
        address
        decimal
        symbol
        unit
        value
      }
      tokens {
        address
        decimal
        symbol
        unit
        value
      }
    }
  }
}
```

### listStakes

#### Arguments

* **addressFilter**, optional, null
* **assetFilter**, optional, null
* **timeFilter**, optional, null
* **paging**, optional, null

#### Result Format

```graphql
{
  listStakes {
    code
    page {
      cursor
      next
      total
    }
    stakes {
      address
      assets
      genesisTime
      message
      nonce
      receiver
      renaissanceTime
      revocable
      revokedAssets
      revokeWaitingPeriod
      sender
      slashers
      data {
        typeUrl
        value
      }
      revokedTokens {
        address
        balance
        decimal
        symbol
        unit
      }
      tokens {
        address
        balance
        decimal
        symbol
        unit
      }
    }
  }
}
```

### getRollupState

#### Arguments

* **address**, optional, null
* **height**, optional, null
* **keys**, optional, null

#### Result Format

```graphql
{
  getRollupState(address: "abc", height: "abc", keys: ["abc"]) {
    code
    state {
      address
      blockHash
      blockHeight
      closed
      contractAddress
      depositFeeRate
      issuer
      leaveWaitingPeriod
      maxBlockSize
      maxDepositAmount
      maxDepositFee
      maxSignerCount
      maxStakeAmount
      maxWithdrawAmount
      maxWithdrawFee
      migrateHistory
      minBlockConfirmation
      minBlockInterval
      minBlockSize
      minDepositAmount
      minDepositFee
      minSignerCount
      minStakeAmount
      minWithdrawAmount
      minWithdrawFee
      paused
      proposerFeeShare
      publisherFeeShare
      publishSlashRate
      publishWaitingPeriod
      tokenAddress
      totalDepositAmount
      totalWithdrawAmount
      vaultAddress
      vaultHistory
      withdrawFeeRate
      context {
        genesisTime
        renaissanceTime
        genesisTx {
          code
          hash
          height
          index
          receiver
          sender
          time
          receipts {
            address
            changes {
              action
              target
              value
            }
          }
          tags {
            key
            value
          }
          tokenSymbols {
            address
            decimal
            symbol
            unit
          }
          tx {
            chainId
            delegator
            from
            gasFee
            gasPaid
            itxJson
            nonce
            pk
            receiver
            sender
            serviceFee
            signature
            signatures {
              delegator
              pk
              signature
              signer
              data {
                typeUrl
                value
              }
            }
          }
        }
        renaissanceTx {
          code
          hash
          height
          index
          receiver
          sender
          time
          receipts {
            address
            changes {
              action
              target
              value
            }
          }
          tags {
            key
            value
          }
          tokenSymbols {
            address
            decimal
            symbol
            unit
          }
          tx {
            chainId
            delegator
            from
            gasFee
            gasPaid
            itxJson
            nonce
            pk
            receiver
            sender
            serviceFee
            signature
            signatures {
              delegator
              pk
              signature
              signer
              data {
                typeUrl
                value
              }
            }
          }
        }
      }
      data {
        typeUrl
        value
      }
      foreignToken {
        chainId
        chainName
        chainType
        contractAddress
        type
      }
      seedValidators {
        address
        endpoint
        pk
      }
      tokenInfo {
        address
        decimal
        symbol
        unit
        value
      }
      validators {
        address
        endpoint
        pk
      }
    }
  }
}
```

### listRollups

#### Arguments

* **paging**, optional, null
* **tokenAddress**, optional, null
* **erc20TokenAddress**, optional, null
* **foreignTokenAddress**, optional, null
* **timeFilter**, optional, null

#### Result Format

```graphql
{
  listRollups(
    tokenAddress: "abc"
    erc20TokenAddress: "abc"
    foreignTokenAddress: "abc"
  ) {
    code
    page {
      cursor
      next
      total
    }
    rollups {
      address
      blockHash
      blockHeight
      closed
      contractAddress
      depositFeeRate
      genesisTime
      issuer
      leaveWaitingPeriod
      maxBlockSize
      maxDepositAmount
      maxDepositFee
      maxSignerCount
      maxStakeAmount
      maxWithdrawAmount
      maxWithdrawFee
      migrateHistory
      minBlockConfirmation
      minBlockInterval
      minBlockSize
      minDepositAmount
      minDepositFee
      minSignerCount
      minStakeAmount
      minWithdrawAmount
      minWithdrawFee
      paused
      proposerFeeShare
      publisherFeeShare
      publishSlashRate
      publishWaitingPeriod
      renaissanceTime
      tokenAddress
      totalDepositAmount
      totalWithdrawAmount
      vaultAddress
      vaultHistory
      withdrawFeeRate
      data {
        typeUrl
        value
      }
      foreignToken {
        chainId
        chainName
        chainType
        contractAddress
        type
      }
      seedValidators {
        address
        endpoint
        pk
      }
      tokenInfo {
        address
        decimal
        symbol
        unit
        value
      }
      validators {
        address
        endpoint
        pk
      }
    }
  }
}
```

### getRollupBlock

#### Arguments

* **hash**, optional, null
* **height**, optional, null
* **rollupAddress**, optional, null

#### Result Format

```graphql
{
  getRollupBlock(hash: "abc", height: "abc", rollupAddress: "abc") {
    code
    block {
      burnedAmount
      governance
      hash
      height
      merkleRoot
      minReward
      mintedAmount
      previousHash
      proposer
      rewardAmount
      rollup
      txs
      txsHash
      context {
        genesisTime
        renaissanceTime
        genesisTx {
          code
          hash
          height
          index
          receiver
          sender
          time
          receipts {
            address
            changes {
              action
              target
              value
            }
          }
          tags {
            key
            value
          }
          tokenSymbols {
            address
            decimal
            symbol
            unit
          }
          tx {
            chainId
            delegator
            from
            gasFee
            gasPaid
            itxJson
            nonce
            pk
            receiver
            sender
            serviceFee
            signature
            signatures {
              delegator
              pk
              signature
              signer
              data {
                typeUrl
                value
              }
            }
          }
        }
        renaissanceTx {
          code
          hash
          height
          index
          receiver
          sender
          time
          receipts {
            address
            changes {
              action
              target
              value
            }
          }
          tags {
            key
            value
          }
          tokenSymbols {
            address
            decimal
            symbol
            unit
          }
          tx {
            chainId
            delegator
            from
            gasFee
            gasPaid
            itxJson
            nonce
            pk
            receiver
            sender
            serviceFee
            signature
            signatures {
              delegator
              pk
              signature
              signer
              data {
                typeUrl
                value
              }
            }
          }
        }
      }
      data {
        typeUrl
        value
      }
      signatures {
        delegator
        pk
        signature
        signer
        data {
          typeUrl
          value
        }
      }
    }
  }
}
```

### listRollupBlocks

#### Arguments

* **paging**, optional, null
* **rollupAddress**, optional, null
* **tokenAddress**, optional, null
* **proposer**, optional, null
* **validatorFilter**, optional, null
* **txFilter**, optional, null
* **timeFilter**, optional, null

#### Result Format

```graphql
{
  listRollupBlocks(rollupAddress: "abc", tokenAddress: "abc", proposer: "abc") {
    code
    blocks {
      burnedAmount
      genesisTime
      governance
      hash
      height
      merkleRoot
      mintedAmount
      previousHash
      proposer
      renaissanceTime
      rewardAmount
      rollup
      txs
      txsHash
      data {
        typeUrl
        value
      }
      signatures {
        delegator
        pk
        signature
        signer
        data {
          typeUrl
          value
        }
      }
      tokenInfo {
        address
        decimal
        symbol
        unit
        value
      }
    }
    page {
      cursor
      next
      total
    }
  }
}
```

### listRollupValidators

#### Arguments

* **paging**, optional, null
* **rollupAddress**, optional, null

#### Result Format

```graphql
{
  listRollupValidators(rollupAddress: "abc") {
    code
    page {
      cursor
      next
      total
    }
    validators {
      address
      availableStake
      endpoint
      genesisTime
      joinTime
      latestBlockHash
      latestBlockHeight
      leaveTime
      moniker
      pk
      proposedBlockCount
      renaissanceTime
      revokedStake
      rollup
      totalGain
      totalStake
      verifiedBlockCount
    }
  }
}
```

### listDelegations

#### Arguments

* **from**, optional, null
* **to**, optional, null
* **paging**, optional, null
* **timeFilter**, optional, null

#### Result Format

```graphql
{
  listDelegations(from: "abc", to: "abc") {
    code
    delegations {
      address
      from
      genesisTime
      ops
      renaissanceTime
      to
      data {
        typeUrl
        value
      }
    }
    page {
      cursor
      next
      total
    }
  }
}
```

### search

#### Arguments

* **paging**, optional, null
* **keyword**, optional, null

#### Result Format

```graphql
{
  search(keyword: "abc") {
    code
    page {
      cursor
      next
      total
    }
    results {
      description
      id
      subtitle
      tags
      timestamp
      title
      type
    }
  }
}
```

### estimateGas

#### Arguments

* **typeUrl**, optional, null
* **tx**, optional, null

#### Result Format

```graphql
{
  estimateGas(typeUrl: "abc", tx: "abc") {
    code
    estimate {
      max
    }
  }
}
```

### listTokenFlows

#### Arguments

* **accountAddress**, optional, null
* **tokenAddress**, optional, null
* **paging**, optional, null
* **depth**, optional, null
* **direction**, optional, null

#### Result Format

```graphql
{
  listTokenFlows(accountAddress: "abc", tokenAddress: "abc", depth: 123) {
    code
    data {
      from
      hash
      to
      value
    }
    page {
      cursor
      next
      total
    }
  }
}
```

### verifyAccountRisk

#### Arguments

* **accountAddress**, optional, null
* **tokenAddress**, optional, null

#### Result Format

```graphql
{
  verifyAccountRisk(accountAddress: "abc", tokenAddress: "abc") {
    code
    data {
      isRisky
      reason
      data {
        accountCount
        address
        balance
        transferIn
        transferOut
        txCount
      }
    }
  }
}
```

### getTokenDistribution

#### Arguments

* **tokenAddress**, optional, null

#### Result Format

```graphql
{
  getTokenDistribution(tokenAddress: "abc") {
    code
    data {
      account
      fee
      gas
      gasStake
      revokedStake
      slashedVault
      stake
      tokenAddress
      txTime
    }
  }
}
```

### listTokenFactories

#### Arguments

* **tokenAddress**, optional, null
* **reserveAddress**, optional, null
* **owner**, optional, null
* **paging**, optional, null
* **timeFilter**, optional, null

#### Result Format

```graphql
{
  listTokenFactories(tokenAddress: "abc", reserveAddress: "abc", owner: "abc") {
    code
    page {
      cursor
      next
      total
    }
    tokenFactories {
      address
      currentSupply
      feeRate
      genesisTime
      owner
      renaissanceTime
      reserveAddress
      reserveBalance
      status
      tokenAddress
      curve {
        basePrice
        constant
        fixedPrice
        slope
        type
      }
      data {
        typeUrl
        value
      }
      reserveToken {
        address
        decimal
        symbol
        unit
        value
      }
      token {
        address
        decimal
        symbol
        unit
        value
      }
    }
  }
}
```


## Subscriptions

No Subscriptions supported yet.


## Mutations

### sendTx

#### Arguments

* **commit**, optional, null
* **token**, optional, null
* **tx**, optional, null
* **wallet**, optional, null
* **extra**, optional, null

#### Result Format

```graphql
mutation {
  sendTx(commit: true, token: "abc", tx: "abc", wallet: "abc", extra: "abc") {
    code
    hash
  }
}
```
