Ana içeriğe geç

Deploy Currency Token

Deploys the on-chain contract for an existing currency token. The currency token must already be created before deployment. This call is asynchronous — the handler enqueues a DeployCurrencyToken (type 1) blockchain transaction and returns HTTP 200 immediately. Poll Get Currency Token Transactions by ID to observe completion.

Request

POST /v2/admin/currency-tokens/{id}/deploy

Parameters

NameTypeInDescription
idstringpathRequired. Currency token ID

Headers

NameDescription
AuthorizationRequired. Bearer token for authentication

Example

curl --request POST \
--url '\{\{baseUrl\}\}/v2/admin/currency-tokens/68fe8c129367fd414b227c7a/deploy' \
--header 'Authorization: Bearer eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9...'

Yanıt

{
"transaction_id": "6a8b5e13f9129816a6cc7a12"
}

Yanıt Alanları

AlanTipAçıklama
transaction_idstringBu çağrının başlattığı para birimi token işlemi. Durumu 3 (Done) veya 4 (Error) olana kadar Get Currency Token Transactions by ID ile sorgulayın

200, deploy işleminin kuyruğa alındığı anlamına gelir, tamamlandığı değil. Bu çağrı eskiden boş gövde dönüyordu; sonucu takip edecek hiçbir şey yoktu.

Durum Kodları

Durum KoduAçıklama
200Başarılı - deploy kuyruğa alındı
400Hatalı İstek - geçersiz girdi, token bulunamadı veya ön koşullar sağlanmadı
401Yetkisiz - geçersiz veya eksik kimlik doğrulama token'ı
500Sunucu Hatası