Package Logo
solana_accounts_foundational
solana-accounts-foundational@v0.1.1
Total Downloads
1827
Published
1 weeks ago
Network
solana-accounts-mainnet solana-accounts-mainnet
Publisher
User Avatar sduchesneau
Total Downloads
1827
Published
1 weeks ago
Network
solana-accounts-mainnet solana-accounts-mainnet
Publisher
User Avatar sduchesneau

Readme

Solana Accounts Foundational module

This package allows filtered access to a stream of account changes based on the account or the owner of that account.

Example query parameter

  • Only accounts owned by Tokenkeg: owner:TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA
  • Change to a list of accounts: account:AwjomjhbNqkgEZN1ADvbEcTYsDfBuX4AKzNmxwgtKvxM || account:5Q544fKrFoe6tsEbD7S8EmxGTJYAKtTVhAW5Q5pge4j1

Example response:

note: the response is in bytes, we represented the address and owner in base54 and the data in hex for the sake of clarity.

[
      {
        "address": "HxGjvBoVFNX2gXzsJBA5Ttd61WH8RV8YXyA7yaVF8rnE",
        "owner": "TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA",
        "data": "069b8857feab8184fb687f634618c035dac439dc1aeb3b5598a0f000000000018d91334d84916c39"
      },
      {
        "address": "J4kiQKJXCQm4Khmw5mtKvjfW7noFiF48Ngvoekp64Jdy",
        "owner": "00000000000000000000000000000000000000000000000",
        "data": "",
        "deleted": true
      }
]
  • The slot number, hash and timestamp are not in the response object, as they are part of the Clock returned as part of any Substreams response..

Restrictions

Note: These restrictions are on the Substreams wsolana-accounts" endpoint itself, not implemented in this package. They are listed for your convenience.

  • An individual account's changes are "rounded-up" to each block (for multiple changes to the same account within a block, you get a single event with the last value)
  • Changes that only affect the lamports are omitted (unless they cause the deletion of the account)
  • Accounts changes under the Vote111111111111111111111111111111111111111 owner are all filtered out directly on the Substreams endpoint: they cannot be queried here.

Documentation

Modules

Maps icon
Maps

map
filtered_accounts

e5ddeb2628988f2f0ffad3dff72c19bed38cb294
map filtered_accounts (
paramsstring
accountblocksf.solana.type.v1.AccountBlock
)  -> sf.substreams.solana.type.v1.FilteredAccounts
Default param : owner:TokenkegQfeZyiNwAJbNbGKPFXCWuBvf9Ss623VQ5DA
substreams gui solana-accounts-foundational@v0.1.1 filtered_accounts
Block Indexes icon
Block Indexes

blockIndex
index_accounts

026a4c3ce9c94e4e962c274b7eea6aedd785f813
blockIndex index_accounts (
)  -> sf.substreams.index.v1.Keys

index_accounts will index the accounts by their address and owner as given in the account block ex: account:AwjomjhbNqkgEZN1ADvbEcTYsDfBuX4AKzNmxwgtKvxM, owner:stk17KkSJ7amyTVpGBHgo3Kcz52GjkzKYXuDwsFSk95

substreams gui solana-accounts-foundational@v0.1.1 index_accounts
Protobuf

Protobuf Docs Explorer

sf.firehose.v2
sf.solana.type.v1
sf.solana.transforms.v1