curl --request GET \
--url https://api.dev.ekiden.fi/api/v1/collateral/assets/{asset_id}/disclosuresimport requests
url = "https://api.dev.ekiden.fi/api/v1/collateral/assets/{asset_id}/disclosures"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.dev.ekiden.fi/api/v1/collateral/assets/{asset_id}/disclosures', 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.dev.ekiden.fi/api/v1/collateral/assets/{asset_id}/disclosures",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.dev.ekiden.fi/api/v1/collateral/assets/{asset_id}/disclosures"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.dev.ekiden.fi/api/v1/collateral/assets/{asset_id}/disclosures")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dev.ekiden.fi/api/v1/collateral/assets/{asset_id}/disclosures")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"asset_id": 1,
"collateral_registry": {
"contractId": "<string>",
"createdEventBlob": "<string>",
"synchronizerId": "<string>",
"templateId": "<string>"
},
"fees": {
"deposit": "<string>",
"withdraw": "<string>"
},
"funding_fee_config": {
"contractId": "<string>",
"createdEventBlob": "<string>",
"synchronizerId": "<string>",
"templateId": "<string>"
},
"status": "active"
}Contracts a user's own deposit or withdraw of a collateral asset must disclose
DepositIntoFundingAsset and WithdrawFromFunding are submitted by the user alone, who cannot
see the collateral registry or the asset’s fee config. A deposit passes both in
disclosedContracts, with their contract ids as collateralRegistryCid and
fundingFeeConfigCid; a withdraw passes the fee config alone. The registry is replaced on
every registry change, so fetch this right before submitting. Every listed asset
is served whatever its status, since a ReduceOnly or Disabled asset can still be withdrawn;
only an Active asset takes deposits. fees are the config’s own, in whole tokens of the asset:
a deposit’s CIP-56 transfer is amount + fees.deposit, and a withdrawal needs
amount + fees.withdraw unlocked.
curl --request GET \
--url https://api.dev.ekiden.fi/api/v1/collateral/assets/{asset_id}/disclosuresimport requests
url = "https://api.dev.ekiden.fi/api/v1/collateral/assets/{asset_id}/disclosures"
response = requests.get(url)
print(response.text)const options = {method: 'GET'};
fetch('https://api.dev.ekiden.fi/api/v1/collateral/assets/{asset_id}/disclosures', 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.dev.ekiden.fi/api/v1/collateral/assets/{asset_id}/disclosures",
CURLOPT_RETURNTRANSFER => true,
CURLOPT_ENCODING => "",
CURLOPT_MAXREDIRS => 10,
CURLOPT_TIMEOUT => 30,
CURLOPT_HTTP_VERSION => CURL_HTTP_VERSION_1_1,
CURLOPT_CUSTOMREQUEST => "GET",
]);
$response = curl_exec($curl);
$err = curl_error($curl);
curl_close($curl);
if ($err) {
echo "cURL Error #:" . $err;
} else {
echo $response;
}package main
import (
"fmt"
"net/http"
"io"
)
func main() {
url := "https://api.dev.ekiden.fi/api/v1/collateral/assets/{asset_id}/disclosures"
req, _ := http.NewRequest("GET", url, nil)
res, _ := http.DefaultClient.Do(req)
defer res.Body.Close()
body, _ := io.ReadAll(res.Body)
fmt.Println(string(body))
}HttpResponse<String> response = Unirest.get("https://api.dev.ekiden.fi/api/v1/collateral/assets/{asset_id}/disclosures")
.asString();require 'uri'
require 'net/http'
url = URI("https://api.dev.ekiden.fi/api/v1/collateral/assets/{asset_id}/disclosures")
http = Net::HTTP.new(url.host, url.port)
http.use_ssl = true
request = Net::HTTP::Get.new(url)
response = http.request(request)
puts response.read_body{
"asset_id": 1,
"collateral_registry": {
"contractId": "<string>",
"createdEventBlob": "<string>",
"synchronizerId": "<string>",
"templateId": "<string>"
},
"fees": {
"deposit": "<string>",
"withdraw": "<string>"
},
"funding_fee_config": {
"contractId": "<string>",
"createdEventBlob": "<string>",
"synchronizerId": "<string>",
"templateId": "<string>"
},
"status": "active"
}Response
The contracts to disclose
What a user's own deposit or withdraw of one collateral asset must disclose.