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
https://github.com/tonlabs/sdk-samples/tree/master/core-examples/node-js/query
Last updated