Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

fixes for remote substreams docs #213

Merged
merged 3 commits into from
May 11, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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