Skip to content

Commit

Permalink
Merge pull request #213 from B2o5T/patch-1
Browse files Browse the repository at this point in the history
fixes for remote substreams docs
  • Loading branch information
maoueh authored May 11, 2023
2 parents 9da51a2 + cb3f7a9 commit b05a463
Show file tree
Hide file tree
Showing 2 changed files with 14 additions and 11 deletions.
11 changes: 6 additions & 5 deletions docs/developers-guide/modules/inputs.md
Original file line number Diff line number Diff line change
Expand Up @@ -23,11 +23,12 @@ An `inputs` of type `source` represents a chain-specific, Firehose-provisioned p

The `source` `inputs` type \_\_ is defined in the Substreams manifest. It is important to specify the correct `Block` object for the chain.

<pre class="language-yaml" data-title="manifest excerpt"><code class="lang-yaml">modules:
```yaml
modules:
- name: my_mod
inputs:
- <a data-footnote-ref href="#user-content-fn-1">source: sf.ethereum.type.v2.Block</a>
</code></pre>
- source: sf.ethereum.type.v2.Block
```
#### `Clock` object

Expand Down Expand Up @@ -56,7 +57,7 @@ An input of type `map` represents the output of another `map` module. It defines
The object's type is defined in the [`output.type`](../../reference-and-specs/manifests.md#modules-.output) attribute of the `map` module.

{% hint style="warning" %}
**Important**_**:**_ The graph built by input dependencies is a Directed Acyclic Graph, which means there can be no circular dependencies.
**Important**: The graph built by input dependencies is a Directed Acyclic Graph, which means there can be no circular dependencies.
{% endhint %}

Define the `map` input type in the manifest and choose a name for the `map` reflecting the logic contained within it.
Expand Down Expand Up @@ -112,7 +113,7 @@ Substreams uses two types of `mode` for modules:
`get` mode provides a key-value store readily queryable and guaranteed to be in sync with the block being processed.

{% hint style="success" %}
**Tip**_**:**_ `get` `mode` is the default mode for modules.
**Tip**: `get` `mode` is the default mode for modules.
{% endhint %}

### `delta` mode
Expand Down
14 changes: 8 additions & 6 deletions docs/reference-and-specs/authentication.md
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,9 @@ The StreamingFast team is also available on [Discord](https://discord.gg/jZwqxJA

Use your API Key to obtain a shorter-lived authentication token using `curl`:

<pre class="language-bash" data-overflow="wrap"><code class="lang-bash">curl -s https://auth.streamingfast.io/v1/auth/issue --data-binary '{<a data-footnote-ref href="#user-content-fn-2">"api_key"</a>: "your-secret-key"}'
</code></pre>
```bash
curl -s https://auth.streamingfast.io/v1/auth/issue --data-binary '{<a data-footnote-ref href="#user-content-fn-2">"api_key"</a>: "your-secret-key"}'
```

### Set your environment variable

Expand All @@ -37,12 +38,13 @@ The `substreams` [`run`](https://substreams.streamingfast.io/reference-and-specs

Place this function in your terminal profile (`.bashrc` or `.zshrc`), for a quick all-in-one token fetcher:

<pre class="language-bash" data-overflow="wrap"><code class="lang-bash">export STREAMINGFAST_KEY=server_YOUR_KEY_HERE
```bash
export STREAMINGFAST_KEY=server_YOUR_KEY_HERE
function sftoken {
export SUBSTREAMS_API_TOKEN=$(curl https://auth.streamingfast.io/v1/auth/issue -s --data-binary '{"api_key":"'$STREAMINGFAST_KEY'"}' | <a data-footnote-ref href="#user-content-fn-3">jq</a> -r .token)
echo "Token set on in SUBSTREAMS_API_TOKEN"
export SUBSTREAMS_API_TOKEN=$(curl https://auth.streamingfast.io/v1/auth/issue -s --data-binary '{"api_key":"'$STREAMINGFAST_KEY'"}' | <a data-footnote-ref href="#user-content-fn-3">jq</a> -r .token)
echo "Token set on in SUBSTREAMS_API_TOKEN"
}
</code></pre>
```

Then obtain a new key and set it in your environment by running:

Expand Down

0 comments on commit b05a463

Please sign in to comment.