Remove LayerZero peers
Remove LayerZero peers to disconnect adapter contracts. This endpoint removes peer relationships between LayerZero adapters.
const response: Promise<FireblocksResponse<RemoveLayerZeroPeersResponse>> = fireblocks.tokenization.removeLayerZeroPeers(tokenizationApiRemoveLayerZeroPeersRequest);CompletableFuture<ApiResponse<RemoveLayerZeroPeersResponse>> response = fireblocks.tokenization().removeLayerZeroPeers(removeLayerZeroPeersRequest, idempotencyKey);response = fireblocks.tokenization.remove_layer_zero_peers(remove_layer_zero_peers_request, idempotency_key);curl --request DELETE \
--url https://api.fireblocks.io/v1/tokenization/multichain/bridge/layerzero/config/peers \
--header 'Content-Type: application/json' \
--data '
{
"vaultAccountId": "0",
"sourceAdapterTokenLinkId": "123-432-1234-1234-123456789012",
"destinationAdapterTokenLinkIds": [
"123-432-1234-1234-123456789012",
"123-432-1234-1234-123456789012"
],
"bidirectional": true
}
'const options = {
method: 'DELETE',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
vaultAccountId: '0',
sourceAdapterTokenLinkId: '123-432-1234-1234-123456789012',
destinationAdapterTokenLinkIds: ['123-432-1234-1234-123456789012', '123-432-1234-1234-123456789012'],
bidirectional: true
})
};
fetch('https://api.fireblocks.io/v1/tokenization/multichain/bridge/layerzero/config/peers', 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/tokenization/multichain/bridge/layerzero/config/peers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'vaultAccountId' => '0',
'sourceAdapterTokenLinkId' => '123-432-1234-1234-123456789012',
'destinationAdapterTokenLinkIds' => [
'123-432-1234-1234-123456789012',
'123-432-1234-1234-123456789012'
],
'bidirectional' => true
]),
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/tokenization/multichain/bridge/layerzero/config/peers"
payload := strings.NewReader("{\n \"vaultAccountId\": \"0\",\n \"sourceAdapterTokenLinkId\": \"123-432-1234-1234-123456789012\",\n \"destinationAdapterTokenLinkIds\": [\n \"123-432-1234-1234-123456789012\",\n \"123-432-1234-1234-123456789012\"\n ],\n \"bidirectional\": true\n}")
req, _ := http.NewRequest("DELETE", 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/tokenization/multichain/bridge/layerzero/config/peers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"vaultAccountId\": \"0\",\n \"sourceAdapterTokenLinkId\": \"123-432-1234-1234-123456789012\",\n \"destinationAdapterTokenLinkIds\": [\n \"123-432-1234-1234-123456789012\",\n \"123-432-1234-1234-123456789012\"\n ],\n \"bidirectional\": true\n}"
response = http.request(request)
puts response.read_body{
"txnIds": [
"123-432-1234-1234-123456789012",
"123-432-1234-1234-123456789012"
]
}{
"error": {
"type": "VALIDATION",
"message": "Invalid input data or parameters"
}
}{
"error": {
"type": "NOT_FOUND",
"message": "The specified token link was not found"
}
}{
"error": {
"type": "UNPROCESSABLE_ENTITY",
"message": "An error occurred during token link processing"
}
}{
"error": {
"type": "INTERNAL",
"message": "An unexpected error occurred during execution. Please try again later."
}
}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
The id of the vault account that will be used to inititate transactions ot set peers
"0"
token_link ID of the source adapter contract
"123-432-1234-1234-123456789012"
Array of token_link IDs for destination adapter contracts
1[
"123-432-1234-1234-123456789012",
"123-432-1234-1234-123456789012"
]
If true, also sets peers from destination(s) back to source
true
Response
LayerZero peers removal process completed
Array of fireblocks transaction IDs, each corresponding to an on-chain transaction to set peers
1[
"123-432-1234-1234-123456789012",
"123-432-1234-1234-123456789012"
]
Was this page helpful?
const response: Promise<FireblocksResponse<RemoveLayerZeroPeersResponse>> = fireblocks.tokenization.removeLayerZeroPeers(tokenizationApiRemoveLayerZeroPeersRequest);CompletableFuture<ApiResponse<RemoveLayerZeroPeersResponse>> response = fireblocks.tokenization().removeLayerZeroPeers(removeLayerZeroPeersRequest, idempotencyKey);response = fireblocks.tokenization.remove_layer_zero_peers(remove_layer_zero_peers_request, idempotency_key);curl --request DELETE \
--url https://api.fireblocks.io/v1/tokenization/multichain/bridge/layerzero/config/peers \
--header 'Content-Type: application/json' \
--data '
{
"vaultAccountId": "0",
"sourceAdapterTokenLinkId": "123-432-1234-1234-123456789012",
"destinationAdapterTokenLinkIds": [
"123-432-1234-1234-123456789012",
"123-432-1234-1234-123456789012"
],
"bidirectional": true
}
'const options = {
method: 'DELETE',
headers: {'Content-Type': 'application/json'},
body: JSON.stringify({
vaultAccountId: '0',
sourceAdapterTokenLinkId: '123-432-1234-1234-123456789012',
destinationAdapterTokenLinkIds: ['123-432-1234-1234-123456789012', '123-432-1234-1234-123456789012'],
bidirectional: true
})
};
fetch('https://api.fireblocks.io/v1/tokenization/multichain/bridge/layerzero/config/peers', 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/tokenization/multichain/bridge/layerzero/config/peers",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "DELETE",
CURLOPT_POSTFIELDS => json_encode([
'vaultAccountId' => '0',
'sourceAdapterTokenLinkId' => '123-432-1234-1234-123456789012',
'destinationAdapterTokenLinkIds' => [
'123-432-1234-1234-123456789012',
'123-432-1234-1234-123456789012'
],
'bidirectional' => true
]),
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/tokenization/multichain/bridge/layerzero/config/peers"
payload := strings.NewReader("{\n \"vaultAccountId\": \"0\",\n \"sourceAdapterTokenLinkId\": \"123-432-1234-1234-123456789012\",\n \"destinationAdapterTokenLinkIds\": [\n \"123-432-1234-1234-123456789012\",\n \"123-432-1234-1234-123456789012\"\n ],\n \"bidirectional\": true\n}")
req, _ := http.NewRequest("DELETE", 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/tokenization/multichain/bridge/layerzero/config/peers")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Delete.new(url)
request["Content-Type"] = 'application/json'
request.body = "{\n \"vaultAccountId\": \"0\",\n \"sourceAdapterTokenLinkId\": \"123-432-1234-1234-123456789012\",\n \"destinationAdapterTokenLinkIds\": [\n \"123-432-1234-1234-123456789012\",\n \"123-432-1234-1234-123456789012\"\n ],\n \"bidirectional\": true\n}"
response = http.request(request)
puts response.read_body{
"txnIds": [
"123-432-1234-1234-123456789012",
"123-432-1234-1234-123456789012"
]
}{
"error": {
"type": "VALIDATION",
"message": "Invalid input data or parameters"
}
}{
"error": {
"type": "NOT_FOUND",
"message": "The specified token link was not found"
}
}{
"error": {
"type": "UNPROCESSABLE_ENTITY",
"message": "An error occurred during token link processing"
}
}{
"error": {
"type": "INTERNAL",
"message": "An unexpected error occurred during execution. Please try again later."
}
}