- Intro
- History
- State
- Tokens
- Submit new transaction
Build info for new transaction
POST
https://api.trait.tech/tx/build_info
Submit new transaction
This allows to create new transactions without connection to a blockchain node.
Request
Body Params application/json
Request params for the endpoint `/tx/build_info`.
context
object (BuildInfoContext)
required
tx_origin
string
Tx Origin
>= 47 characters<= 49 characters
Match pattern:
^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{47,49}$
Example
Request samples
Shell
JavaScript
Java
Swift
Go
PHP
Python
HTTP
C
C#
Objective-C
Ruby
OCaml
Dart
R
Request Request Example
Shell
JavaScript
Java
Swift
curl --location --request POST 'https://api.trait.tech/tx/build_info' \
--header 'Content-Type: application/json' \
--data-raw ''
Responses
🟢200OK
application/json
Body
Response schema for the endpoint `/tx/build_info`.
metadata
object (ResponseMetadata)
required
request_context
object (ResponseBlockId)
required
blockchain_head
object (ResponseBlockId)
required
data
object (TxBuildInfo)
required
tx_origin
string
Tx Origin
>= 47 characters<= 49 characters
Match pattern:
^[123456789ABCDEFGHJKLMNPQRSTUVWXYZabcdefghijkmnopqrstuvwxyz]{47,49}$
tx_origin_next_tx_index
integer
Tx Origin Next Tx Index
>= 0<= 4294967295
tx_origin_free_native_token_balance
integer
Tx Origin Free Native Token Balance
>= 0<= 3.402823669209385e+38
chain_genesis_block_hash
string
Chain Genesis Block Hash
>= 66 characters<= 66 characters
Match pattern:
^0x[0-9abcdefABCDEF]{64}$
chain_name
string
Chain Name
>= 1 characters<= 50 characters
chain_ss58_format
integer
Chain Ss58 Format
>= 0<= 16383
block_hash
string
Block Hash
>= 66 characters<= 66 characters
Match pattern:
^0x[0-9abcdefABCDEF]{64}$
block_index
integer
Block Index
>= 0<= 4294967295
block_timestamp
integer
Block Timestamp
>= 0<= 18446744073709552000
runtime_spec_name
string
Runtime Spec Name
>= 1 characters<= 50 characters
runtime_spec_version
integer
Runtime Spec Version
>= 0<= 4294967295
runtime_transaction_version
integer
Runtime Transaction Version
>= 0<= 4294967295
runtime_metadata_raw
string
Runtime Metadata Raw
>= 18 characters
Match pattern:
^0x[0-9abcdefABCDEF]{16,}$
Example
{
"metadata": {
"request_context": {
"block_hash": "0xab8006019066f080402ab43da043127b930ef0ffb3349a333222d67c0f542338",
"block_index": 29702,
"block_timestamp": 1727581488000
},
"blockchain_head": {
"block_hash": "0xab8006019066f080402ab43da043127b930ef0ffb3349a333222d67c0f542338",
"block_index": 29702,
"block_timestamp": 1727581488000
}
},
"data": {
"tx_origin": "ttrENnXUfsdTDFwweKjK1dSvCXcAtVVQ9xgARy8iBisAFfc5e",
"tx_origin_next_tx_index": 1,
"tx_origin_free_native_token_balance": 1000000000000000000,
"chain_genesis_block_hash": "0x806dec5d0216895474ef81e2c61dd0cd3e8bc2a7eabb1eb76cdf8e18ad2b49be",
"chain_name": "Trait Asset Hub",
"chain_ss58_format": 5335,
"block_hash": "0xab8006019066f080402ab43da043127b930ef0ffb3349a333222d67c0f542338",
"block_index": 29702,
"block_timestamp": 1727581488000,
"runtime_spec_name": "trait-asset-hub-runtime",
"runtime_spec_version": 1000,
"runtime_transaction_version": 1,
"runtime_metadata_raw": "0x6d6574610e6d0800"
}
}
🟠422Parameter Error
Modified at 2024-11-21 18:59:09