Create a new blockchain
Registers a new tenant-managed blockchain from the supplied declared properties. The blockchain starts in the CREATED state and must be activated separately before it can be used.
POST
/
blockchain_link
/
blockchains
TypeScript
const response: Promise<FireblocksResponse<CreateBlockchainResponse>> = fireblocks.blockchainLinkBeta.createBlockchainLinkChain(blockchainLinkBetaApiCreateBlockchainLinkChainRequest);CompletableFuture<ApiResponse<CreateBlockchainResponse>> response = fireblocks.blockchainLinkBeta().createBlockchainLinkChain(createBlockchainRequest, idempotencyKey);response = fireblocks.blockchain_link_beta.create_blockchain_link_chain(create_blockchain_request, idempotency_key);curl --request POST \
--url https://api.fireblocks.io/v1/blockchain_link/blockchains \
--header 'Content-Type: application/json' \
--data '
{
"declaredProperties": {
"chainName": "Ethereum",
"chainId": 1,
"symbolName": "ETH",
"rpcUrls": [
"https://rpc.example.com"
],
"environmentType": "ENVIRONMENT_TYPE_MAINNET",
"decimals": 18,
"blockExplorerUrl": "https://etherscan.io",
"blockExplorerTransactionPath": "/tx",
"blockExplorerAddressPath": "/address",
"networkId": 1,
"hasFee": true,
"isPoa": false,
"hasLayeredFee": false,
"nodeType": "NODE_TYPE_CORE_GETH",
"transactionFormat": 0,
"baseAssetTenantIds": [
"f47ac10b-58cc-4372-a567-0e02b2c3d479"
],
"explorerApiUrl": "https://api.etherscan.io",
"explorerApiKey": "my-explorer-api-key",
"isTraceEnabled": false
}
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
declaredProperties: {
chainName: 'Ethereum',
chainId: 1,
symbolName: 'ETH',
rpcUrls: ['https://rpc.example.com'],
environmentType: 'ENVIRONMENT_TYPE_MAINNET',
decimals: 18,
blockExplorerUrl: 'https://etherscan.io',
blockExplorerTransactionPath: '/tx',
blockExplorerAddressPath: '/address',
networkId: 1,
hasFee: true,
isPoa: false,
hasLayeredFee: false,
nodeType: 'NODE_TYPE_CORE_GETH',
transactionFormat: 0,
baseAssetTenantIds: ['f47ac10b-58cc-4372-a567-0e02b2c3d479'],
explorerApiUrl: 'https://api.etherscan.io',
explorerApiKey: 'my-explorer-api-key',
isTraceEnabled: false
}
})
};
fetch('https://api.fireblocks.io/v1/blockchain_link/blockchains', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fireblocks.io/v1/blockchain_link/blockchains",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'declaredProperties' => [
'chainName' => 'Ethereum',
'chainId' => 1,
'symbolName' => 'ETH',
'rpcUrls' => [
'https://rpc.example.com'
],
'environmentType' => 'ENVIRONMENT_TYPE_MAINNET',
'decimals' => 18,
'blockExplorerUrl' => 'https://etherscan.io',
'blockExplorerTransactionPath' => '/tx',
'blockExplorerAddressPath' => '/address',
'networkId' => 1,
'hasFee' => true,
'isPoa' => false,
'hasLayeredFee' => false,
'nodeType' => 'NODE_TYPE_CORE_GETH',
'transactionFormat' => 0,
'baseAssetTenantIds' => [
'f47ac10b-58cc-4372-a567-0e02b2c3d479'
],
'explorerApiUrl' => 'https://api.etherscan.io',
'explorerApiKey' => 'my-explorer-api-key',
'isTraceEnabled' => false
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.fireblocks.io/v1/blockchain_link/blockchains"
payload := strings.NewReader("{\n \"declaredProperties\": {\n \"chainName\": \"Ethereum\",\n \"chainId\": 1,\n \"symbolName\": \"ETH\",\n \"rpcUrls\": [\n \"https://rpc.example.com\"\n ],\n \"environmentType\": \"ENVIRONMENT_TYPE_MAINNET\",\n \"decimals\": 18,\n \"blockExplorerUrl\": \"https://etherscan.io\",\n \"blockExplorerTransactionPath\": \"/tx\",\n \"blockExplorerAddressPath\": \"/address\",\n \"networkId\": 1,\n \"hasFee\": true,\n \"isPoa\": false,\n \"hasLayeredFee\": false,\n \"nodeType\": \"NODE_TYPE_CORE_GETH\",\n \"transactionFormat\": 0,\n \"baseAssetTenantIds\": [\n \"f47ac10b-58cc-4372-a567-0e02b2c3d479\"\n ],\n \"explorerApiUrl\": \"https://api.etherscan.io\",\n \"explorerApiKey\": \"my-explorer-api-key\",\n \"isTraceEnabled\": false\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://api.fireblocks.io/v1/blockchain_link/blockchains")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"declaredProperties\": {\n \"chainName\": \"Ethereum\",\n \"chainId\": 1,\n \"symbolName\": \"ETH\",\n \"rpcUrls\": [\n \"https://rpc.example.com\"\n ],\n \"environmentType\": \"ENVIRONMENT_TYPE_MAINNET\",\n \"decimals\": 18,\n \"blockExplorerUrl\": \"https://etherscan.io\",\n \"blockExplorerTransactionPath\": \"/tx\",\n \"blockExplorerAddressPath\": \"/address\",\n \"networkId\": 1,\n \"hasFee\": true,\n \"isPoa\": false,\n \"hasLayeredFee\": false,\n \"nodeType\": \"NODE_TYPE_CORE_GETH\",\n \"transactionFormat\": 0,\n \"baseAssetTenantIds\": [\n \"f47ac10b-58cc-4372-a567-0e02b2c3d479\"\n ],\n \"explorerApiUrl\": \"https://api.etherscan.io\",\n \"explorerApiKey\": \"my-explorer-api-key\",\n \"isTraceEnabled\": false\n }\n}"
response = http.request(request)
puts response.read_body{
"blockchain": {
"id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"blockchainState": "BLOCKCHAIN_STATE_ACTIVATED",
"declaredProperties": {
"chainName": "Ethereum",
"chainId": 1,
"symbolName": "ETH",
"rpcUrls": [
"https://rpc.example.com"
],
"environmentType": "ENVIRONMENT_TYPE_MAINNET",
"decimals": 18,
"blockExplorerUrl": "https://etherscan.io",
"blockExplorerTransactionPath": "/tx",
"blockExplorerAddressPath": "/address",
"networkId": 1,
"hasFee": true,
"isPoa": false,
"hasLayeredFee": false,
"nodeType": "NODE_TYPE_CORE_GETH",
"transactionFormat": 0,
"baseAssetTenantIds": [
"f47ac10b-58cc-4372-a567-0e02b2c3d479"
],
"explorerApiUrl": "https://api.etherscan.io",
"explorerApiKey": "my-explorer-api-key",
"isTraceEnabled": false,
"rpcAuth": {
"type": "RPC_AUTH_BASIC",
"username": "rpc_user",
"password": "my-password",
"token": "my-bearer-token",
"headerName": "X-Custom-Auth",
"headerValue": "my-header-value"
}
},
"createdAtUtc": 1700000000000,
"updatedAtUtc": 1700000000000,
"validationFailureReasons": [
"RPC endpoint unreachable"
],
"validationSessionId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"validationStatus": "VALIDATION_STATUS_SUCCEEDED",
"validationCreatedAtUtc": 1700000000000,
"validationUpdatedAtUtc": 1700000000000,
"validationCompletedAtUtc": 1700000000000,
"failedStep": "FAILED_STEP_CONFIGURATION"
},
"message": "Blockchain created successfully"
}{
"message": "<string>",
"code": 123
}Headers
A unique identifier for the request. If the request is sent multiple times with the same idempotency key, the server will return the same response as the first request. The idempotency key is valid for 24 hours.
Body
application/json
Create blockchain request. tenant_id is derived from the JWT token context.
Declared properties for blockchain configuration (create/update API and response) Only the fields sent by the API and returned in list/create/update responses.
Show child attributes
Show child attributes
Was this page helpful?
Previous
Get a blockchain by IDReturns a single blockchain owned by the tenant, identified by its ID.
Next
⌘I
TypeScript
const response: Promise<FireblocksResponse<CreateBlockchainResponse>> = fireblocks.blockchainLinkBeta.createBlockchainLinkChain(blockchainLinkBetaApiCreateBlockchainLinkChainRequest);CompletableFuture<ApiResponse<CreateBlockchainResponse>> response = fireblocks.blockchainLinkBeta().createBlockchainLinkChain(createBlockchainRequest, idempotencyKey);response = fireblocks.blockchain_link_beta.create_blockchain_link_chain(create_blockchain_request, idempotency_key);curl --request POST \
--url https://api.fireblocks.io/v1/blockchain_link/blockchains \
--header 'Content-Type: application/json' \
--data '
{
"declaredProperties": {
"chainName": "Ethereum",
"chainId": 1,
"symbolName": "ETH",
"rpcUrls": [
"https://rpc.example.com"
],
"environmentType": "ENVIRONMENT_TYPE_MAINNET",
"decimals": 18,
"blockExplorerUrl": "https://etherscan.io",
"blockExplorerTransactionPath": "/tx",
"blockExplorerAddressPath": "/address",
"networkId": 1,
"hasFee": true,
"isPoa": false,
"hasLayeredFee": false,
"nodeType": "NODE_TYPE_CORE_GETH",
"transactionFormat": 0,
"baseAssetTenantIds": [
"f47ac10b-58cc-4372-a567-0e02b2c3d479"
],
"explorerApiUrl": "https://api.etherscan.io",
"explorerApiKey": "my-explorer-api-key",
"isTraceEnabled": false
}
}
'const options = {
method: 'POST',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
declaredProperties: {
chainName: 'Ethereum',
chainId: 1,
symbolName: 'ETH',
rpcUrls: ['https://rpc.example.com'],
environmentType: 'ENVIRONMENT_TYPE_MAINNET',
decimals: 18,
blockExplorerUrl: 'https://etherscan.io',
blockExplorerTransactionPath: '/tx',
blockExplorerAddressPath: '/address',
networkId: 1,
hasFee: true,
isPoa: false,
hasLayeredFee: false,
nodeType: 'NODE_TYPE_CORE_GETH',
transactionFormat: 0,
baseAssetTenantIds: ['f47ac10b-58cc-4372-a567-0e02b2c3d479'],
explorerApiUrl: 'https://api.etherscan.io',
explorerApiKey: 'my-explorer-api-key',
isTraceEnabled: false
}
})
};
fetch('https://api.fireblocks.io/v1/blockchain_link/blockchains', options)
.then(res => res.json())
.then(res => console.log(res))
.catch(err => console.error(err));<?php
$curl = curl_init();
curl_setopt_array($curl, [
CURLOPT_URL => "https://api.fireblocks.io/v1/blockchain_link/blockchains",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "POST",
CURLOPT_POSTFIELDS => json_encode([
'declaredProperties' => [
'chainName' => 'Ethereum',
'chainId' => 1,
'symbolName' => 'ETH',
'rpcUrls' => [
'https://rpc.example.com'
],
'environmentType' => 'ENVIRONMENT_TYPE_MAINNET',
'decimals' => 18,
'blockExplorerUrl' => 'https://etherscan.io',
'blockExplorerTransactionPath' => '/tx',
'blockExplorerAddressPath' => '/address',
'networkId' => 1,
'hasFee' => true,
'isPoa' => false,
'hasLayeredFee' => false,
'nodeType' => 'NODE_TYPE_CORE_GETH',
'transactionFormat' => 0,
'baseAssetTenantIds' => [
'f47ac10b-58cc-4372-a567-0e02b2c3d479'
],
'explorerApiUrl' => 'https://api.etherscan.io',
'explorerApiKey' => 'my-explorer-api-key',
'isTraceEnabled' => false
]
]),
CURLOPT_HTTPHEADER => [
"Content-Type: application/json"
],
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"strings"
"net/http"
"io"
)
func main() {
url := "https://api.fireblocks.io/v1/blockchain_link/blockchains"
payload := strings.NewReader("{\n \"declaredProperties\": {\n \"chainName\": \"Ethereum\",\n \"chainId\": 1,\n \"symbolName\": \"ETH\",\n \"rpcUrls\": [\n \"https://rpc.example.com\"\n ],\n \"environmentType\": \"ENVIRONMENT_TYPE_MAINNET\",\n \"decimals\": 18,\n \"blockExplorerUrl\": \"https://etherscan.io\",\n \"blockExplorerTransactionPath\": \"/tx\",\n \"blockExplorerAddressPath\": \"/address\",\n \"networkId\": 1,\n \"hasFee\": true,\n \"isPoa\": false,\n \"hasLayeredFee\": false,\n \"nodeType\": \"NODE_TYPE_CORE_GETH\",\n \"transactionFormat\": 0,\n \"baseAssetTenantIds\": [\n \"f47ac10b-58cc-4372-a567-0e02b2c3d479\"\n ],\n \"explorerApiUrl\": \"https://api.etherscan.io\",\n \"explorerApiKey\": \"my-explorer-api-key\",\n \"isTraceEnabled\": false\n }\n}")
req, _ := http.NewRequest("POST", url, payload)
req.Header.Add("Content-Type", "application/json")
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}require 'uri'
require 'net/http'
url = URI("https://api.fireblocks.io/v1/blockchain_link/blockchains")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Post.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"declaredProperties\": {\n \"chainName\": \"Ethereum\",\n \"chainId\": 1,\n \"symbolName\": \"ETH\",\n \"rpcUrls\": [\n \"https://rpc.example.com\"\n ],\n \"environmentType\": \"ENVIRONMENT_TYPE_MAINNET\",\n \"decimals\": 18,\n \"blockExplorerUrl\": \"https://etherscan.io\",\n \"blockExplorerTransactionPath\": \"/tx\",\n \"blockExplorerAddressPath\": \"/address\",\n \"networkId\": 1,\n \"hasFee\": true,\n \"isPoa\": false,\n \"hasLayeredFee\": false,\n \"nodeType\": \"NODE_TYPE_CORE_GETH\",\n \"transactionFormat\": 0,\n \"baseAssetTenantIds\": [\n \"f47ac10b-58cc-4372-a567-0e02b2c3d479\"\n ],\n \"explorerApiUrl\": \"https://api.etherscan.io\",\n \"explorerApiKey\": \"my-explorer-api-key\",\n \"isTraceEnabled\": false\n }\n}"
response = http.request(request)
puts response.read_body{
"blockchain": {
"id": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"blockchainState": "BLOCKCHAIN_STATE_ACTIVATED",
"declaredProperties": {
"chainName": "Ethereum",
"chainId": 1,
"symbolName": "ETH",
"rpcUrls": [
"https://rpc.example.com"
],
"environmentType": "ENVIRONMENT_TYPE_MAINNET",
"decimals": 18,
"blockExplorerUrl": "https://etherscan.io",
"blockExplorerTransactionPath": "/tx",
"blockExplorerAddressPath": "/address",
"networkId": 1,
"hasFee": true,
"isPoa": false,
"hasLayeredFee": false,
"nodeType": "NODE_TYPE_CORE_GETH",
"transactionFormat": 0,
"baseAssetTenantIds": [
"f47ac10b-58cc-4372-a567-0e02b2c3d479"
],
"explorerApiUrl": "https://api.etherscan.io",
"explorerApiKey": "my-explorer-api-key",
"isTraceEnabled": false,
"rpcAuth": {
"type": "RPC_AUTH_BASIC",
"username": "rpc_user",
"password": "my-password",
"token": "my-bearer-token",
"headerName": "X-Custom-Auth",
"headerValue": "my-header-value"
}
},
"createdAtUtc": 1700000000000,
"updatedAtUtc": 1700000000000,
"validationFailureReasons": [
"RPC endpoint unreachable"
],
"validationSessionId": "f47ac10b-58cc-4372-a567-0e02b2c3d479",
"validationStatus": "VALIDATION_STATUS_SUCCEEDED",
"validationCreatedAtUtc": 1700000000000,
"validationUpdatedAtUtc": 1700000000000,
"validationCompletedAtUtc": 1700000000000,
"failedStep": "FAILED_STEP_CONFIGURATION"
},
"message": "Blockchain created successfully"
}{
"message": "<string>",
"code": 123
}