/construction/payloads REST API Endpoint
身体参数
network_identifier
对象
必填
正在加载...
区块链
字符串
必填
正在加载...
网络
字符串
必填
正在加载...
sub_network_identifier
对象
正在加载...
网络
字符串
必填
正在加载...
metadata
对象
正在加载...
运营
数组
必填
正在加载...
operation_identifier
对象
必填
正在加载...
索引
整数
必填
正在加载...
network_index
整数
正在加载...
related_operations
数组
正在加载...
索引
整数
必填
正在加载...
network_index
整数
正在加载...
类型
字符串
必填
正在加载...
状态
字符串
正在加载...
账户
对象
正在加载...
地址
字符串
必填
正在加载...
sub_account
对象
正在加载...
地址
字符串
必填
正在加载...
metadata
对象
正在加载...
metadata
对象
正在加载...
金额
对象
正在加载...
值
字符串
必填
正在加载...
货币
对象
必填
正在加载...
符号
字符串
必填
正在加载...
小数
整数
必填
正在加载...
metadata
对象
正在加载...
metadata
对象
正在加载...
coin_change
对象
正在加载...
coin_identifier
对象
必填
正在加载...
identifier
字符串
必填
正在加载...
coin_action
字符串
必填
正在加载...
metadata
对象
正在加载...
metadata
对象
正在加载...
public_keys
数组
正在加载...
hex_bytes
字符串
必填
正在加载...
curve_type
字符串
必填
正在加载...
退货
对象
对象
正在加载...
unsigned_transaction
字符串
正在加载...
payloads
数组
正在加载...
地址
字符串
正在加载...
account_identifier
对象
正在加载...
地址
字符串
正在加载...
sub_account
对象
正在加载...
地址
字符串
正在加载...
metadata
对象
正在加载...
metadata
对象
正在加载...
hex_bytes
字符串
正在加载...
signature_type
字符串
正在加载...
请求
1curl --location 'https://docs-demo.stacks-mainnet.quiknode.pro/rosetta/v1/construction/payloads' \2--header 'Content-Type: application/json' \3--data '{4"network_identifier": {5"blockchain": "stacks",6"network": "mainnet"7},8"operations": [9{10"operation_identifier": { "index": 0 },11"type": "<OPERATION_TYPE>",12"account": { "address": "<STACKS_SENDER_ADDRESS>" },13"amount": {14"value": "<AMOUNT_IN_MICROSTX>",15"currency": { "symbol": "STX", "decimals": 6 }16}17}18],19"metadata": {20"<METADATA_KEY>": "<METADATA_VALUE>"21},22"public_keys": [23{24"hex_bytes": "<SENDER_PUBLIC_KEY_HEX>",25"curve_type": "secp256k1"26}27]28}'
1curl --location 'https://docs-demo.stacks-mainnet.quiknode.pro/rosetta/v1/construction/payloads' \2--header 'Content-Type: application/json' \3--data '{4"network_identifier": {5"blockchain": "stacks",6"network": "mainnet"7},8"operations": [9{10"operation_identifier": { "index": 0 },11"type": "<OPERATION_TYPE>",12"account": { "address": "<STACKS_SENDER_ADDRESS>" },13"amount": {14"value": "<AMOUNT_IN_MICROSTX>",15"currency": { "symbol": "STX", "decimals": 6 }16}17}18],19"metadata": {20"<METADATA_KEY>": "<METADATA_VALUE>"21},22"public_keys": [23{24"hex_bytes": "<SENDER_PUBLIC_KEY_HEX>",25"curve_type": "secp256k1"26}27]28}'
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": { "index": 0 },12"type": "<OPERATION_TYPE>",13"account": { "address": "<STACKS_SENDER_ADDRESS>" },14"amount": {15"value": "<AMOUNT_IN_MICROSTX>",16"currency": { "symbol": "STX", "decimals": 6 }17}18}19],20"metadata": {21"<METADATA_KEY>": "<METADATA_VALUE>"22},23"public_keys": [24{25"hex_bytes": "<SENDER_PUBLIC_KEY_HEX>",26"curve_type": "secp256k1"27}28]29});3031const requestOptions = {32方法: "POST",33标题: myHeaders,34正文: raw,35重定向: "follow"36};3738fetch("https://docs-demo.stacks-mainnet.quiknode.pro/rosetta/v1/construction/payloads", requestOptions)39.然后((响应) => 响应.文本())40.然后((结果) => 控制台.log(result))41.catch((error) => 控制台.错误(error));
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": { "index": 0 },12"type": "<OPERATION_TYPE>",13"account": { "address": "<STACKS_SENDER_ADDRESS>" },14"amount": {15"value": "<AMOUNT_IN_MICROSTX>",16"currency": { "symbol": "STX", "decimals": 6 }17}18}19],20"metadata": {21"<METADATA_KEY>": "<METADATA_VALUE>"22},23"public_keys": [24{25"hex_bytes": "<SENDER_PUBLIC_KEY_HEX>",26"curve_type": "secp256k1"27}28]29});3031const requestOptions = {32方法: "POST",33标题: myHeaders,34正文: raw,35重定向: "follow"36};3738fetch("https://docs-demo.stacks-mainnet.quiknode.pro/rosetta/v1/construction/payloads", requestOptions)39.然后((响应) => 响应.文本())40.然后((结果) => 控制台.log(result))41.catch((error) => 控制台.错误(error));
1导入 请求2import json34url = "https://docs-demo.stacks-mainnet.quiknode.pro/rosetta/v1/construction/payloads"56有效载荷 = json.dumps({7"network_identifier": {8"blockchain": "stacks",9"network": "mainnet"10},11"operations": [12{13"operation_identifier": { "index": 0 },14"type": "<OPERATION_TYPE>",15"account": { "address": "<STACKS_SENDER_ADDRESS>" },16"amount": {17"value": "<AMOUNT_IN_MICROSTX>",18"currency": { "symbol": "STX", "decimals": 6 }19}20}21],22"metadata": {23"<METADATA_KEY>": "<METADATA_VALUE>"24},25"public_keys": [26{27"hex_bytes": "<SENDER_PUBLIC_KEY_HEX>",28"curve_type": "secp256k1"29}30]31})32标题 = {33“Content-Type”: 'application/json'34}3536回复 = 请求.请求("POST", url, headers=headers, data=有效载荷)3738打印(响应.text)
1导入 请求2import json34url = "https://docs-demo.stacks-mainnet.quiknode.pro/rosetta/v1/construction/payloads"56有效载荷 = json.dumps({7"network_identifier": {8"blockchain": "stacks",9"network": "mainnet"10},11"operations": [12{13"operation_identifier": { "index": 0 },14"type": "<OPERATION_TYPE>",15"account": { "address": "<STACKS_SENDER_ADDRESS>" },16"amount": {17"value": "<AMOUNT_IN_MICROSTX>",18"currency": { "symbol": "STX", "decimals": 6 }19}20}21],22"metadata": {23"<METADATA_KEY>": "<METADATA_VALUE>"24},25"public_keys": [26{27"hex_bytes": "<SENDER_PUBLIC_KEY_HEX>",28"curve_type": "secp256k1"29}30]31})32标题 = {33“Content-Type”: 'application/json'34}3536回复 = 请求.请求("POST", url, headers=headers, data=有效载荷)3738打印(响应.text)
1require "uri"2require "json"3require "net/http"45url = URI("https://docs-demo.stacks-mainnet.quiknode.pro/rosetta/v1/construction/payloads")67http = Net::HTTP.new(url.host, url.port)8http.use_ssl = true910请求 = Net::HTTP::POST.new(url)11请求["Content-Type"] = "application/json"12请求.请求体 = JSON.dump({13"network_identifier": {14"blockchain": "stacks",15"network": "mainnet"16},17"operations": [18{19"operation_identifier": { "index": 0 },20"type": "<OPERATION_TYPE>",21"account": { "address": "<STACKS_SENDER_ADDRESS>" },22"amount": {23"value": "<AMOUNT_IN_MICROSTX>",24"currency": { "symbol": "STX", "decimals": 6 }25}26}27],28"metadata": {29"<METADATA_KEY>": "<METADATA_VALUE>"30},31"public_keys": [32{33"hex_bytes": "<SENDER_PUBLIC_KEY_HEX>",34"curve_type": "secp256k1"35}36]37})3839回复 = http.请求(请求)40返回响应.read_body
1require "uri"2require "json"3require "net/http"45url = URI("https://docs-demo.stacks-mainnet.quiknode.pro/rosetta/v1/construction/payloads")67http = Net::HTTP.new(url.host, url.port)8http.use_ssl = true910请求 = Net::HTTP::POST.new(url)11请求["Content-Type"] = "application/json"12请求.请求体 = JSON.dump({13"network_identifier": {14"blockchain": "stacks",15"network": "mainnet"16},17"operations": [18{19"operation_identifier": { "index": 0 },20"type": "<OPERATION_TYPE>",21"account": { "address": "<STACKS_SENDER_ADDRESS>" },22"amount": {23"value": "<AMOUNT_IN_MICROSTX>",24"currency": { "symbol": "STX", "decimals": 6 }25}26}27],28"metadata": {29"<METADATA_KEY>": "<METADATA_VALUE>"30},31"public_keys": [32{33"hex_bytes": "<SENDER_PUBLIC_KEY_HEX>",34"curve_type": "secp256k1"35}36]37})3839回复 = http.请求(请求)40返回响应.read_body