Skip to content

Commit a5f654d

Browse files
committed
Update near accounts docs
1 parent 33522cc commit a5f654d

File tree

1 file changed

+11
-0
lines changed

1 file changed

+11
-0
lines changed

pages/en/cookbook/near.mdx

Lines changed: 11 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -62,6 +62,13 @@ dataSources:
6262
source:
6363
account: app.good-morning.near # This data source will monitor this account
6464
startBlock: 10662188 # Required for NEAR
65+
accounts:
66+
prefixes:
67+
- app
68+
- good
69+
suffixes:
70+
- morning.near
71+
- morning.testnet
6572
mapping:
6673
apiVersion: 0.0.5
6774
language: wasm/assemblyscript
@@ -75,6 +82,10 @@ dataSources:
7582
- NEAR subgraphs introduce a new `kind` of data source (`near`)
7683
- The `network` should correspond to a network on the hosting Graph Node. On the Hosted Service, NEAR's mainnet is `near-mainnet`, and NEAR's testnet is `near-testnet`
7784
- NEAR data sources introduce an optional `source.account` field, which is a human-readable ID corresponding to a [NEAR account](https://docs.near.org/docs/concepts/account). This can be an account or a sub-account.
85+
- NEAR data sources introduce an optional `source.accounts` field, which contains optional suffixes and prefixes.
86+
At least prefix or suffix must be specified, they will match the any account starting or ending with the list of values respectively.
87+
For the provided example it would match: [app|good].*[morning.near|morning.testnet]. If only a list of prefixes or suffixes is necessary
88+
the other field can be omitted.
7889

7990
NEAR data sources support two types of handlers:
8091

0 commit comments

Comments
 (0)