Authentication

Overview

Authentication will be required for the following behaviors

  • Getting a sequencer co-signature on a built block.

  • Retrieving bundles from the bundle relay.

Authentication will be performed using a standard OAuth2 client credential grant and then the access token you receive can be used to authorize all requests to the sequencer and bundle relay.

OAuth Identity Provider Reference

Holesky

Authenticating Using curl

First off a basic example of getting an OAuth2 access token and using it to authenticate any of our secured API's

Step 1: Obtain an Access Token

Make a POST request to the token endpoint with your client credentials.

Step 2: Use the Access Token to Call Protected APIs

Once you receive the access token, include it in the Authorization header as a Bearer token.

circle-info

The access_token that is returned should be base64 encoded, and should remain base64 encoded when passed via the Authorization header

Parameters:

  • -H "Authorization: Bearer $ACCESS_TOKEN": Sets the Authorization header with the access token stored in an environment variable

Authenticating in Rust

Prerequisites

Add the following dependencies to your Cargo.toml file:

Example Code

Last updated