Blockdaemon Documentation
How to Connect to Fantom
It’s easy to connect to your Fantom infrastructure via RPC or WebSocket.
If you haven’t already configured any Fantom infrastructure, visit the Fantom marketplace page to learn more about Blockdaemon’s Fantom options.
Once you have purchased your Blockdaemon Fantom infrastructure, Your Blockdaemon Technical Account Manager (TAM) will send you the necessary access credentials. There are multiple ways to use these to connect to your node/cluster.
In this guide, we will show you how to connect to Fantom via cURL
In this guide, we will cover the following simple methods of connection to your infrastructure:
Fantom RPC Connection via cURL
Step 1 – Your TAM will send you the following access credentials:
- Your Unique Endpoint URL
- Your Unique Auth Token
Please Note: These are one-time view, so make sure to copy them.
Step 2 – Add your access credentials to a cURL request.
curl -X POST -H 'Authorization: Bearer 'YOUR_AUTH_TOKEN' \
-H 'Accept: application/json' \
-H 'Content-Type: application/json' \
'YOUR_ENDPOINT_URL' \
--data-raw '{"jsonrpc":"2.0","method":"YOUR_RPC_METHOD","params":[],"id": "0"}'
-
- Replace
YOUR_ENDPOINT_URL
with the Endpoint URL sent by your Blockdaemon TAM - Replace
YOUR_AUTH_TOKEN
with the Auth Token sent by your Blockdaemon TAM - Replace
YOUR_RPC_METHOD
with your chosen RPC method
- Replace
Fantom Connection via WebSocket
Step 1 – Your TAM will send you the following access credentials:
- Your Unique Endpoint URL
- Your Unique Auth Token
Please Note: These are one-time view, so make sure to copy them.
Step 2 – Add your access credentials to a websockets connection request:
wscat -H 'X-Auth-Token: <YOUR_AUTH_TOKEN>' -c wss://<YOUR_ENDPOINT_URL>:443/websocket
-
- Replace
YOUR_ENDPOINT_URL
with the Endpoint URL sent by your Blockdaemon TAM - Replace
YOUR_AUTH_TOKEN
with the Auth Token sent by your Blockdaemon TAM
- Replace