Executes a transaction template and pushes the transaction to the network.
POST/wallet/tx-template/run
Executes a transaction template and pushes the transaction to the network.
Request
Query Parameters
debug boolean
Turn debug on. Optional parameter to log more data when the template is built.
Header Parameters
x-wallet-id stringrequired
Defines the key of the wallet on which the request will be executed.
- application/json
Body
array
required
A transaction template in JSON format.
Array [
]
Responses
- 200
Success confirmation or handled error
- application/json
- Schema
- success
- wallet-not-ready
- invalid-instruction
- invalid-argument
- no-wallet-id
- invalid-wallet-id
Schema
any
Success
{
"success": true,
"inputs": [
{
"hash": "0000742e9e0a147d72cad5e0a2e2da893119c1da1096de218b420e5f87b70742",
"index": 0,
"tx_id": "0000742e9e0a147d72cad5e0a2e2da893119c1da1096de218b420e5f87b70742"
}
],
"outputs": [
{
"value": 100,
"tokenData": 1,
"decodedScript": null,
"token_data": 1
}
],
"signalBits": 0,
"version": 2,
"weight": 17.0299,
"nonce": 72798,
"timestamp": 1742486041,
"parents": [
"0000805f6ec264cd17069e4a7054c4735885cf914c29431e4cad80f3508d12fd",
"00006a88cede497d4c5419da0859c397048f56bc8bd76bcff1fbab2b89f25540"
],
"tokens": [],
"hash": "00005d39b210f230cf238b894fbba8aa15a0ff80bd69fc637c439af3b93ee45d",
"name": "ApiDocsToken",
"symbol": "ApiTK"
}
Wallet is not ready yet
{
"success": false,
"message": "Wallet is not ready.",
"state": 1
}
Using an instruction that does not exist
{
"success": false,
"details": [
"0.type is Invalid discriminator value. Expected 'input/raw' | 'input/utxo' | 'input/authority' | 'output/raw' | 'output/data' | 'output/token' | 'output/authority' | 'action/shuffle' | 'action/change' | 'action/complete' | 'action/config' | 'action/setvar'"
]
}
Invalid argument in instruction
{
"success": false,
"details": [
"0.name is Required"
]
}
No wallet id parameter
{
"success": false,
"message": "Parameter 'wallet-id' is required."
}
Wallet id parameter is invalid
{
"success": false,
"message": "Invalid wallet-id parameter."
}
Loading...