Construction
Construction endpoints
post
Body
Responses
200
Default Response
application/json
addressstringOptional
500
Default Response
application/json
post/construction/derive
POST /construction/derive HTTP/1.1
Host: localhost:3000
Content-Type: application/json
Accept: */*
Content-Length: 125
{
"network_identifier": {
"blockchain": "stacks",
"network": "mainnet"
},
"public_key": {
"hex_bytes": "text",
"curve_type": "secp256k1"
}
}{
"address": "text",
"account_identifier": {
"address": "text",
"sub_account": {
"address": "text",
"metadata": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}
}
}post
Body
suggested_fee_multipliernumberOptional
Responses
200
Default Response
application/json
optionsany ofOptional
or
or
500
Default Response
application/json
post/construction/preprocess
POST /construction/preprocess HTTP/1.1
Host: localhost:3000
Content-Type: application/json
Accept: */*
Content-Length: 666
{
"network_identifier": {
"blockchain": "stacks",
"network": "mainnet"
},
"operations": [
{
"operation_identifier": {
"index": 1,
"network_index": 1
},
"type": "token_transfer",
"account": {
"address": "text",
"sub_account": {
"address": "text",
"metadata": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}
},
"amount": {
"value": "text",
"currency": {
"symbol": "text",
"decimals": 1,
"metadata": {
"asset_identifier": "text",
"name": "text",
"value": "text",
"token_type": "ft"
}
}
},
"metadata": {
"memo": "text"
}
}
],
"metadata": {
"memo": "text"
},
"max_fee": [
{
"value": "text",
"currency": {
"symbol": "text",
"decimals": 1,
"metadata": {
"asset_identifier": "text",
"name": "text",
"value": "text",
"token_type": "ft"
}
}
}
],
"suggested_fee_multiplier": 1
}{
"options": {
"sender_address": "text",
"max_fee": "text",
"suggested_fee_multiplier": 1,
"type": "contract_call",
"contract_identifier": "text",
"function_name": "text",
"args": [
"text"
]
},
"required_public_keys": [
{
"address": "text",
"sub_account": {
"address": "text",
"metadata": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}
}
]
}post
Body
Responses
200
Default Response
application/json
unsigned_transactionstringRequiredPattern:
^(0x)?[0-9a-fA-F]+$500
Default Response
application/json
post/construction/payloads
POST /construction/payloads HTTP/1.1
Host: localhost:3000
Content-Type: application/json
Accept: */*
Content-Length: 766
{
"network_identifier": {
"blockchain": "stacks",
"network": "mainnet"
},
"operations": [
{
"operation_identifier": {
"index": 1,
"network_index": 1
},
"type": "token_transfer",
"account": {
"address": "text",
"sub_account": {
"address": "text",
"metadata": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}
},
"amount": {
"value": "text",
"currency": {
"symbol": "text",
"decimals": 1,
"metadata": {
"asset_identifier": "text",
"name": "text",
"value": "text",
"token_type": "ft"
}
}
},
"metadata": {
"memo": "text"
}
}
],
"metadata": {
"options": {
"sender_address": "text",
"max_fee": "text",
"suggested_fee_multiplier": 1,
"type": "contract_call",
"contract_identifier": "text",
"function_name": "text",
"args": [
"text"
]
},
"sender_account_info": {
"nonce": 1,
"balance": "text"
},
"memo": "text"
},
"public_keys": [
{
"hex_bytes": "text",
"curve_type": "secp256k1"
}
]
}{
"unsigned_transaction": "text",
"payloads": [
{
"address": "text",
"account_identifier": {
"address": "text",
"sub_account": {
"address": "text",
"metadata": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}
},
"hex_bytes": "text",
"signature_type": "ecdsa_recovery"
}
]
}post
Body
unsigned_transactionstringRequiredPattern:
^(0x)?[0-9a-fA-F]+$Responses
200
Default Response
application/json
signed_transactionstringRequiredPattern:
^(0x)?[0-9a-fA-F]+$500
Default Response
application/json
post/construction/combine
POST /construction/combine HTTP/1.1
Host: localhost:3000
Content-Type: application/json
Accept: */*
Content-Length: 438
{
"network_identifier": {
"blockchain": "stacks",
"network": "mainnet"
},
"unsigned_transaction": "text",
"signatures": [
{
"signing_payload": {
"address": "text",
"account_identifier": {
"address": "text",
"sub_account": {
"address": "text",
"metadata": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}
},
"hex_bytes": "text",
"signature_type": "ecdsa_recovery"
},
"public_key": {
"hex_bytes": "text",
"curve_type": "secp256k1"
},
"signature_type": "ecdsa_recovery",
"hex_bytes": "text"
}
]
}{
"signed_transaction": "text"
}post
Body
signedbooleanRequired
transactionstringRequiredPattern:
^(0x)?[0-9a-fA-F]+$Responses
200
Default Response
application/json
signersstring[]Optional
500
Default Response
application/json
post/construction/parse
POST /construction/parse HTTP/1.1
Host: localhost:3000
Content-Type: application/json
Accept: */*
Content-Length: 101
{
"network_identifier": {
"blockchain": "stacks",
"network": "mainnet"
},
"signed": true,
"transaction": "text"
}{
"operations": [
{
"operation_identifier": {
"index": 1,
"network_index": 1
},
"related_operations": [
{
"index": 1,
"network_index": 1
}
],
"status": "pending",
"account": {
"address": "text",
"sub_account": {
"address": "text",
"metadata": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}
},
"type": "coinbase",
"metadata": {
"alt_recipient": "text",
"vrf_proof": "text"
}
}
],
"signers": [
"text"
],
"account_identifier_signers": [
{
"address": "text",
"sub_account": {
"address": "text",
"metadata": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}
}
],
"metadata": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}post
Body
signed_transactionstringRequiredPattern:
^(0x)?[0-9a-fA-F]+$Responses
200
Default Response
application/json
500
Default Response
application/json
post/construction/hash
POST /construction/hash HTTP/1.1
Host: localhost:3000
Content-Type: application/json
Accept: */*
Content-Length: 94
{
"network_identifier": {
"blockchain": "stacks",
"network": "mainnet"
},
"signed_transaction": "text"
}{
"transaction_identifier": {
"hash": "text"
},
"metadata": {
"ANY_ADDITIONAL_PROPERTY": "anything"
}
}Last updated
Was this helpful?