All packages

stellar_foundational

StreamingFast
This is not the latest version — go to v0.6.1
v0.3.0/23 downloads/Repository

Package ref

stellar-foundational@v0.3.0

Run package

CLI

Run filtered_transactions from the command line.

substreams run stellar-foundational@v0.3.0 filtered_transactions -e stellar-mainnet --start-block -1
Authenticate by running substreams auth or directly on thegraph.market (see docs).

README

Stellar Foundational Modules

The Stellar Foundational Modules Substreams contains a set of modules that allow you to easily retrieve basic information from the Stellar blockchain, such as transactions or operations.

Modules

map_transactions

This module retrieves all the NOT failed transactions, without any more filtering.

index_transactions

This module creates a cache of transactions based on:

  • The source account of the transaction.
  • The source accounts of every operation contained within the transaction.

You can use this module as a blockFilter to filter transactions based on the parameters specified above:

  - name: my_module
    ...
    blockFilter:
      module: index_transactions
      query:
        string: (source_account:source_account1 || source_account:source_account2)

filtered_transactions

This module uses the index_transactions cache to match the filtered transactions based on the parameters passed as input to the module.

You can directly use this module to retrieve filtered transactions:

modules:
    - name: my_module
      use: stellar_common:filtered_transactions

params:
    my_module: source_account:account1

map_operations

This module decodes some of the Stellar operations. These are the operation supported:

&Op::CreateAccount(_) => "create_account",
&Op::AccountMerge(_) => "account_merge",
&Op::Payment(_) => "payment",
&Op::CreateClaimableBalance(_) => "create_claimable_balance",
&Op::ClaimClaimableBalance(_) => "claim_claimable_balance",
&Op::Clawback(_) => "clawback",
&Op::ClawbackClaimableBalance(_) => "clawback_claimable_balance",
&Op::AllowTrust(_) => "allow_trust",
&Op::SetTrustLineFlags(_) => "set_trust_line_flags",
&Op::LiquidityPoolDeposit(_) => "liquidity_pool_deposit",
&Op::LiquidityPoolWithdraw(_) => "liquidity_pool_withdraw",
&Op::ManageBuyOffer(_) => "manage_buy_offer",
&Op::ManageSellOffer(_) => "manage_sell_offer",
&Op::CreatePassiveSellOffer(_) => "create_passive_sell_offer",
&Op::PathPaymentStrictSend(_) => "path_payment_strict_send",
&Op::PathPaymentStrictReceive(_) => "path_payment_strict_receive",

index_operations

This module creates a cache of operations, which you can use to filter by the operation name.

You can use this module as a blockFilter to filter operations:

  - name: my_module
    ...
    blockFilter:
      module: index_operations
      query:
        string: (operation:payment || operation:create_account)

filtered_operations

This module uses the index_operations cache to do the actual filtering of the operations.

You can directly use this module to retrieve filtered operations:

modules:
    - name: my_module
      use: stellar_common:filtered_operations

params:
    my_module: (operation:payment || operation:create_account)

Modules

Execution graph

6 modules
mapMain

filtered_transactions

Output

sf.substreams.stellar.type.v1.Transactions

Inputs

map

filtered_operations

Output

sf.substreams.stellar.type.v1.Operations

Inputs

blockIndex

index_operations

Output

sf.substreams.index.v1.Keys

blockIndex

index_transactions

Output

sf.substreams.index.v1.Keys

map

map_operations

Output

sf.substreams.stellar.type.v1.Operations