/construction/preprocess REST API Endpoint
身體參數
network_identifier
物件
必填
載入中...
區塊鏈
字串
必填
載入中...
網路
字串
必填
載入中...
sub_network_identifier
物件
載入中...
網路
字串
必填
載入中...
metadata
物件
載入中...
operations
陣列
必填
載入中...
operation_identifier
物件
必填
載入中...
目錄
整數
必填
載入中...
network_index
整數
載入中...
related_operations
陣列
載入中...
目錄
整數
必填
載入中...
network_index
整數
載入中...
類型
字串
必填
載入中...
狀態
字串
載入中...
帳戶
物件
載入中...
地址
字串
必填
載入中...
sub_account
物件
載入中...
地址
字串
必填
載入中...
metadata
物件
載入中...
metadata
物件
載入中...
金額
物件
載入中...
值
字串
必填
載入中...
currency
物件
必填
載入中...
符號
字串
必填
載入中...
小數
整數
必填
載入中...
metadata
物件
載入中...
metadata
物件
載入中...
coin_change
物件
載入中...
coin_identifier
物件
必填
載入中...
identifier
字串
必填
載入中...
coin_action
字串
必填
載入中...
metadata
物件
載入中...
metadata
物件
載入中...
退貨
物件
物件
載入中...
選項
物件
載入中...
required_public_keys
陣列
載入中...
地址
字串
載入中...
sub_account
物件
載入中...
地址
字串
載入中...
metadata
物件
載入中...
metadata
物件
載入中...
請求
1curl --location 'https://docs-demo.stacks-mainnet.quiknode.pro/rosetta/v1/construction/preprocess' \2--標頭 'Content-Type: application/json' \3--data '{4"network_identifier": {5"blockchain": "stacks",6"network": "mainnet"7},8"operations": [9{10"operation_identifier": {11"index": 012},13"type": "<OPERATION_TYPE>",14"account": {15"address": "<ADDRESS>"16},17"amount": {18"value": "<AMOUNT_IN_MICROSTX>",19"currency": {20"symbol": "STX",21"decimals": 622}23}24}25],26"metadata": {}27}'
1curl --location 'https://docs-demo.stacks-mainnet.quiknode.pro/rosetta/v1/construction/preprocess' \2--標頭 'Content-Type: application/json' \3--data '{4"network_identifier": {5"blockchain": "stacks",6"network": "mainnet"7},8"operations": [9{10"operation_identifier": {11"index": 012},13"type": "<OPERATION_TYPE>",14"account": {15"address": "<ADDRESS>"16},17"amount": {18"value": "<AMOUNT_IN_MICROSTX>",19"currency": {20"symbol": "STX",21"decimals": 622}23}24}25],26"metadata": {}27}'
1const myHeaders = new Headers();2myHeaders.追加("Content-Type", "application/json");34const raw = JSON.stringify({5"network_identifier": {6"blockchain": "stacks",7"network": "mainnet"8},9"operations": [10{11"operation_identifier": {12"index": 013},14"type": "<OPERATION_TYPE>",15"account": {16"address": "<ADDRESS>"17},18"amount": {19"value": "<AMOUNT_IN_MICROSTX>",20"currency": {21"symbol": "STX",22"decimals": 623}24}25}26],27"metadata": {}28});2930const requestOptions = {31方法: 「POST」,32標題: myHeaders,33正文: 原始,34重定向: 「追蹤」35};3637fetch("https://docs-demo.stacks-mainnet.quiknode.pro/rosetta/v1/construction/preprocess", requestOptions)38.接著((回應) => 回應.文字())39.接著((結果) => 控制台.log(結果))40.catch((錯誤) => 控制台.錯誤(錯誤));
1const myHeaders = new Headers();2myHeaders.追加("Content-Type", "application/json");34const raw = JSON.stringify({5"network_identifier": {6"blockchain": "stacks",7"network": "mainnet"8},9"operations": [10{11"operation_identifier": {12"index": 013},14"type": "<OPERATION_TYPE>",15"account": {16"address": "<ADDRESS>"17},18"amount": {19"value": "<AMOUNT_IN_MICROSTX>",20"currency": {21"symbol": "STX",22"decimals": 623}24}25}26],27"metadata": {}28});2930const requestOptions = {31方法: 「POST」,32標題: myHeaders,33正文: 原始,34重定向: 「追蹤」35};3637fetch("https://docs-demo.stacks-mainnet.quiknode.pro/rosetta/v1/construction/preprocess", requestOptions)38.接著((回應) => 回應.文字())39.接著((結果) => 控制台.log(結果))40.catch((錯誤) => 控制台.錯誤(錯誤));
1匯入 請求2import json34url = "https://docs-demo.stacks-mainnet.quiknode.pro/rosetta/v1/construction/preprocess"56有效載荷 = json.dumps({7"network_identifier": {8"blockchain": "stacks",9"network": "mainnet"10},11"operations": [12{13"operation_identifier": {14"index": 015},16"type": "<OPERATION_TYPE>",17"account": {18"address": "<ADDRESS>"19},20"amount": {21"value": "<AMOUNT_IN_MICROSTX>",22"currency": {23"symbol": "STX",24"decimals": 625}26}27}28],29"metadata": {}30})31標題 = {32「Content-Type」: 'application/json'33}3435回應 = 請求.請求("POST", url, headers=headers, data=有效載荷)3637列印(回應.text)
1匯入 請求2import json34url = "https://docs-demo.stacks-mainnet.quiknode.pro/rosetta/v1/construction/preprocess"56有效載荷 = json.dumps({7"network_identifier": {8"blockchain": "stacks",9"network": "mainnet"10},11"operations": [12{13"operation_identifier": {14"index": 015},16"type": "<OPERATION_TYPE>",17"account": {18"address": "<ADDRESS>"19},20"amount": {21"value": "<AMOUNT_IN_MICROSTX>",22"currency": {23"symbol": "STX",24"decimals": 625}26}27}28],29"metadata": {}30})31標題 = {32「Content-Type」: 'application/json'33}3435回應 = 請求.請求("POST", url, headers=headers, data=有效載荷)3637列印(回應.text)
1需要 "uri"2require "json"3需要 "net/http"45url = URI("https://docs-demo.stacks-mainnet.quiknode.pro/rosetta/v1/construction/preprocess")67http = Net::HTTP.new(url.host, url.port)8http.use_ssl = true910請求 = 淨::HTTP::POST.new(網址)11請求["Content-Type"] = "application/json"12請求。正文 = JSON.dump({13"network_identifier": {14"blockchain": "stacks",15"network": "mainnet"16},17"operations": [18{19"operation_identifier": {20"index": 021},22"type": "<OPERATION_TYPE>",23"account": {24"address": "<ADDRESS>"25},26"amount": {27"value": "<AMOUNT_IN_MICROSTX>",28"currency": {29"symbol": "STX",30"decimals": 631}32}33}34],35"metadata": {}36})3738回應 = http.請求(請求)39將回應。read_body
1需要 "uri"2require "json"3需要 "net/http"45url = URI("https://docs-demo.stacks-mainnet.quiknode.pro/rosetta/v1/construction/preprocess")67http = Net::HTTP.new(url.host, url.port)8http.use_ssl = true910請求 = 淨::HTTP::POST.new(網址)11請求["Content-Type"] = "application/json"12請求。正文 = JSON.dump({13"network_identifier": {14"blockchain": "stacks",15"network": "mainnet"16},17"operations": [18{19"operation_identifier": {20"index": 021},22"type": "<OPERATION_TYPE>",23"account": {24"address": "<ADDRESS>"25},26"amount": {27"value": "<AMOUNT_IN_MICROSTX>",28"currency": {29"symbol": "STX",30"decimals": 631}32}33}34],35"metadata": {}36})3738回應 = http.請求(請求)39將回應。read_body