For Acki Nacki Developers
Acki Nacki docsFor DevelopersFor Validators
  • About Acki Nacki SDK
  • How to deploy a Multisig Wallet
  • Dapp ID Full Guide: creation, fees, centralized replenishment
  • Quick Starts
    • Quick Start TVM SDK JavaScript
    • GraphQL Quick Start
  • Reference
    • Core Library Reference
      • Modules
      • Module abi
      • Module boc
      • Module client
      • Module crypto
      • Module debot
      • Module net
      • Module processing
      • Module proofs
      • Module tvm
      • Module utils
    • Core Library Error API
    • Error Codes
    • TVM-CLI Reference
  • VM Instructions
    • Acki Nacki VM Instructions
    • Formal Verification
      • Acki Nacki VM Instructions Business-Level Specification
  • GraphQL
    • GraphQL API
    • Schema
    • Blockchain API
    • Query Collections: Query Language
    • Field Descriptions
    • Info API
    • Web Playground
    • Examples
  • ABI
    • ABI Specification
  • Examples
    • Client Libraries JS Examples
    • GraphQL API Examples
      • Connect to GraphQL API
      • Send message
      • Accounts
      • Blocks
      • Messages
      • Block and Transaction Pagination: Best Practice
      • Transactions
  • For Binding Developers
    • How to work with Application Objects in binding generators
    • JSON Interface to TVM Client
  • Links
    • TVM SDK repository
Powered by GitBook
On this page
  • When you may need collections?
  • About collections
  • Usage
  • Sample source code
  1. JS(TS) guides
  2. Queries

Query Collection

When you may need collections?

If you want to apply some custom filters and sortings on the data.

About collections

There are a few collections with blockchain data:

  • accounts: blockchain account data;

  • transactions: transactions related to accounts;

  • messages: input and output messages related to transactions;

  • blocks: blockchain blocks.

Use query_collection method to query data that can be filtered and sorted.

Usage

await client.net.query_collection({
    collection: 'accounts',
    filter: {
        id: {
            eq: wallet1Address
        }
    },
    result: 'balance'
})

Sample source code

Core

Last updated 4 months ago

https://github.com/tonlabs/sdk-samples/tree/master/core-examples/node-js/query