LogoLogo
CSPR.build Portal
1.2.x
1.2.x
  • Documentation
    • Introduction
    • Overview
      • Authorization
      • Rate limits and quotas
      • Pagination
      • Sorting
      • Filtering
      • Optional properties
      • Errors
    • Getting started
    • Highlights
      • Including related entities
      • Including CSPR rates
      • Including account info
      • Accessing auction data
      • Accessing token data
      • Accessing NFT data
      • De-anonymizing account hashes
      • De-anonymizing account purses
      • Receiving contract-level events
    • Changelog
  • REST API
    • Reference
    • Account
      • Get account
      • Get accounts
    • Account Info
      • Get account info
      • Get account infos
    • Auction metrics
      • Get auction metrics
    • Awaiting deploy
      • Create Awaiting Deploy
      • Add Awaiting Deploy signatures
      • Get Awaiting Deploy
    • Block
      • Get block
      • Get blocks
      • Get validator blocks
    • Bidder
      • Get bidder
      • Get bidders
    • Centralized account info
      • Get centralized account info
      • Get centralized account infos
    • Contract
      • Get contract
      • Get contracts
      • Get contracts by contract package
      • Get contract types
    • Contract entry point
      • Get contract entry points
      • Get contract entry point costs
    • Contract package
      • Get contract package
      • Get contract packages
      • Get account contract packages
    • Delegation
      • Get account delegations
      • Get validator delegations
    • Delegator reward
      • Get account delegator rewards
      • Get total account delegation rewards
      • Get total validator delegators' rewards
    • Deploy
      • Get deploy
      • Get deploys
      • Get account deploys
      • Get block deploys
      • Get deploy execution types
    • Fungible token action
      • Get fungible token actions
      • Get fungible token action types
      • Get account fungible token actions
      • Get contract package fungible token actions
    • Fungible token ownership
      • Get account fungible token ownership
      • Get contract package fungible token ownership
    • Non-fungible token (NFT)
      • Get NFT
      • Get account NFTs
      • Get contract package NFTs
      • Get NFT standards
      • Get off-chain NFT metadata statuses
    • Non-fungible token (NFT) action
      • Get contract package NFT actions for a token
      • Get account NFT actions
      • Get contract package NFT actions
      • Get NFT action types
    • Non-fungible token (NFT) ownership
      • Get contract package NFT ownership
      • Get account NFT ownership
    • CSPR rate
      • Get the current currency rate
      • Get historical currency rates
      • Get currencies
    • CSPR supply
      • Get supply
    • Transfer
      • Get account transfers
      • Get deploy transfers
    • Validator
      • Get validator
      • Get validators
    • Validator performance
      • Get historical validator performance
      • Get historical average validator performance
      • Get historical average validators performance
    • Validator reward
      • Get validator rewards
      • Get validator total rewards
  • Streaming API
    • Reference
    • Account balance
    • Block
    • Contract
    • Contract package
    • Contract-level events
    • Deploy
    • Fungible token action
    • Non-fungible token (NFT)
    • Non-fungible token (NFT) action
    • Transfer
  • Casper Node API
    • Connecting with an SDK
Powered by GitBook
On this page
  1. Documentation
  2. Highlights

Including account info

PreviousIncluding CSPR ratesNextAccessing auction data

Last updated 10 months ago

Accounts on Casper Mainnet and Testnet networks have the possibility to self-identify themselves in a decentralized with the smart contract. Many validators and contract owner accounts provide information about themselves to increase trust on the network.

CSPR.cloud REST API allows including account information to simplify the integration with the standard for dApps developers. Typically, account info standard data can be included in responses that contain account identifiers like account hashes or public keys.

In the example below, we'll include validator account info data in the account delegations API response. To demonstrate the possibility of , we'll request only the owner name and logo properties of the account info object.

curl -X 'GET' -G \
  'https://api.testnet.cspr.cloud/accounts/018df66cb0257dd378d1944d665ea001518419408d55db740a9bb1a262093cefd9/delegations' \
  --data-urlencode 'includes=validator_account_info{info{owner{name,branding{logo}}}}' \
  -H 'accept: application/json' \
  -H 'authorization: 55f79117-fc4d-4d60-9956-65423f39a06a'
{
  "data": [
    {
      "bonding_purse": "uref-845ca8130882c27ee0da81252ed0deb7787796a3868df4b771e0518383d89a4b-007",
      "public_key": "018df66cb0257dd378d1944d665ea001518419408d55db740a9bb1a262093cefd9",
      "stake": "235732110487",
      "validator_account_info": null,
      "validator_public_key": "0196948158bf5b35c0c84f680f110b8debaa4e7628e13ba336a95651a214d3b9bd"
    },
    {
      "bonding_purse": "uref-a5bac0a17edeed284a0264f3fbbd189d3c4819f0e788a576792dc028c8476fba-007",
      "public_key": "018df66cb0257dd378d1944d665ea001518419408d55db740a9bb1a262093cefd9",
      "stake": "565388190696",
      "validator_account_info": {
        "info": {
          "owner": {
            "branding": {
              "logo": {
                "png_1024": "",
                "png_256": "https://picsum.photos/256/256",
                "svg": ""
              }
            },
            "name": "ACME"
          }
        }
      },
      "validator_public_key": "0106ca7c39cd272dbf21a86eeb3b36b7c26e2e9b94af64292419f7862936bca2ca"
    }
  ],
  "item_count": 2,
  "page_count": 1
}
Casper Account Info Standard
filtering included object data