-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
2 changed files
with
3 additions
and
3 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -5,7 +5,7 @@ description: "Create new transaction/s, which will be submitted to the Mempool n | |
sidebar_label: "create_transactions" | ||
hide_title: true | ||
hide_table_of_contents: true | ||
api: {"tags":["transaction"],"description":"Create new transaction/s, which will be submitted to the Mempool nodes for inclusion into a new block. This call assumes a full transaction as part of the request body, which might make raw calls difficult to manage. For convenience, it may be best to use an AIBlock library or SDK that abstracts this call for you.","operationId":"createTx","parameters":[{"in":"header","name":"x-cache-id","description":"An idempotent key for retrieving cached responses from the node","schema":{"type":"string","example":"4d1e5754af0931a15138445c3ecd1a82","pattern":"^[a-z0-9]{32}$"}}],"requestBody":{"description":"Create a new transaction","content":{"application/json":{"schema":{"type":"object","xml":{"name":"txcreate"},"properties":{"inputs":{"type":"array","items":{"type":"object","xml":{"name":"txinput"},"properties":{"previous_out":{"description":"Previous output tx hash","type":"object","properties":{"t_hash":{"type":"string","example":"f0698b112da09","description":"Transaction hash"},"n":{"type":"number","example":0,"description":"The index of the output in the input transaction"}},"title":"previousOut"},"script_signature":{"type":"object","properties":{"Pay2PkH":{"type":"object","properties":{"signable_data":{"type":"string","example":"1b061ff7e94765f95a2a5122d3bde757f2daaacef762c5aef2bf237ca3da2abf","description":"Data to sign for verification. This is a SHA3 hash of the previous outpoint's data in the form \"${n}-${t_hash}\""},"signature":{"type":"string","example":"b576d3f5c1703206bad8b9de0ce3a3167e203b78164c86d78774534c930a535a31c49adae9e70569008c0329fb4a9128ca96d350f47a88ce06ef5a334506f803","description":"Signature of the signable data"},"public_key":{"type":"string","example":"5e7856117f404562c47dbdccfb8c23dc9ec69be14df5712bb459eeb440f40808","description":"Public key used to sign the signable data"},"address_version":{"type":"string","example":"null"}},"title":"ScriptSig"}},"title":"Pay2PkH"}},"title":"TransactionInput"},"description":"The inputs to the transaction"},"outputs":{"type":"array","items":{"type":"object","xml":{"name":"txinput"},"properties":{"value":{"type":"object","properties":{"Token":{"type":"number","example":10,"description":"Token amount"}}},"locktime":{"type":"number","example":0},"script_public_key":{"type":"string","example":"ec66c99201a7a8299e5acace235b03932c7990cc479eca35ee1dd692a5d3c030"}},"title":"TransactionOutput"},"description":"The outputs to the transaction"},"version":{"type":"integer","format":"int8","example":2,"description":"The transaction's schema version"},"druid_info":{"type":"object","properties":{"druid":{"type":"string","example":"DRUID_1"},"participants":{"type":"integer","example":2},"expectations":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"asset":{"type":"object"}}}}}},"title":"TransactionCreate"}}},"required":true},"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"a1d46199e5c89b00509e118f5af83172","description":"The ID of the call, which corresponds to the x-cache-id used in the header"},"status":{"type":"string","example":"Success","description":"The status of the call, which will be one of either \"Success\", \"Error\", or \"Pending\""},"reason":{"type":"string","example":"Transaction/s successfully created","description":"The reason for the status of the call. Most useful to debug errors"},"route":{"type":"string","example":"create_transactions","description":"The endpoint route that was called"},"content":{"type":"object","properties":{"transaction":{"type":"object","example":"This section is unfinished, refer to postman collection for more details","description":"This section is unfinished, refer to postman collection for more details"}}}},"title":"ResponseCreateTransactions"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":null},"status":{"type":"string","example":"Error"},"reason":{"type":"string","example":"Bad Request"},"route":{"type":"string","example":null},"content":{"type":"string","example":null}},"title":"ResponseBadRequest"}}}}},"method":"post","path":"/create_transactions","servers":[{"url":"http://37.27.23.104:3003","description":"Testnet Mempool Node"}],"jsonRequestBodyExample":{"inputs":[{"previous_out":{"t_hash":"f0698b112da09","n":0},"script_signature":{"Pay2PkH":{"signable_data":"1b061ff7e94765f95a2a5122d3bde757f2daaacef762c5aef2bf237ca3da2abf","signature":"b576d3f5c1703206bad8b9de0ce3a3167e203b78164c86d78774534c930a535a31c49adae9e70569008c0329fb4a9128ca96d350f47a88ce06ef5a334506f803","public_key":"5e7856117f404562c47dbdccfb8c23dc9ec69be14df5712bb459eeb440f40808","address_version":"null"}}}],"outputs":[{"value":{"Token":10},"locktime":0,"script_public_key":"ec66c99201a7a8299e5acace235b03932c7990cc479eca35ee1dd692a5d3c030"}],"version":2,"druid_info":{"druid":"DRUID_1","participants":2,"expectations":{"from":"string","to":"string","asset":{}}}},"info":{"title":"Mempool API","description":"⚠️ **Some sections may still be incomplete. We higly recommend getting started by downloading our [Postman collection](/docs/postman-collections)**.\n\nThe Mempool node is a special type of node responsible for collecting transactions and bundling them into new blocks. \nThey also partition the mining network for mining and validate the blocks that these partitions mine. \nThere are only a limited number of Mempool nodes. ","contact":{"email":"[email protected]"},"license":{"name":"GPL-3.0","url":"https://www.gnu.org/licenses/gpl-3.0.en.html"},"version":"1.0.1"},"postman":{"name":"create_transactions","description":{"content":"Create new transaction/s, which will be submitted to the Mempool nodes for inclusion into a new block. This call assumes a full transaction as part of the request body, which might make raw calls difficult to manage. For convenience, it may be best to use an AIBlock library or SDK that abstracts this call for you.","type":"text/plain"},"url":{"path":["create_transactions"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"disabled":false,"description":{"content":"An idempotent key for retrieving cached responses from the node","type":"text/plain"},"key":"x-cache-id","value":""},{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}}}} | ||
api: {"tags":["transaction"],"description":"Create new transaction/s, which will be submitted to the Mempool nodes for inclusion into a new block. This call assumes a full transaction as part of the request body, which might make raw calls difficult to manage. For convenience, it may be best to use an AIBlock library or SDK that abstracts this call for you.","operationId":"createTx","parameters":[{"in":"header","name":"x-cache-id","description":"An idempotent key for retrieving cached responses from the node","schema":{"type":"string","example":"4d1e5754af0931a15138445c3ecd1a82","pattern":"^[a-z0-9]{32}$"}}],"requestBody":{"description":"Create a new transaction","content":{"application/json":{"schema":{"type":"object","xml":{"name":"txcreate"},"properties":{"inputs":{"type":"array","items":{"type":"object","xml":{"name":"txinput"},"properties":{"previous_out":{"description":"Previous output tx hash","type":"object","properties":{"t_hash":{"type":"string","example":"f0698b112da09","description":"Transaction hash"},"n":{"type":"number","example":0,"description":"The index of the output in the input transaction"}},"title":"previousOut"},"script_signature":{"type":"object","properties":{"Pay2PkH":{"type":"object","properties":{"signable_data":{"type":"string","example":"1b061ff7e94765f95a2a5122d3bde757f2daaacef762c5aef2bf237ca3da2abf","description":"Data to sign for verification. This is a SHA3 hash of the all the transaction outputs and this input's previous output, for example \"{output1}{output2}{previousOut}\""},"signature":{"type":"string","example":"b576d3f5c1703206bad8b9de0ce3a3167e203b78164c86d78774534c930a535a31c49adae9e70569008c0329fb4a9128ca96d350f47a88ce06ef5a334506f803","description":"Signature of the signable data"},"public_key":{"type":"string","example":"5e7856117f404562c47dbdccfb8c23dc9ec69be14df5712bb459eeb440f40808","description":"Public key used to sign the signable data"},"address_version":{"type":"string","example":"null"}},"title":"ScriptSig"}},"title":"Pay2PkH"}},"title":"TransactionInput"},"description":"The inputs to the transaction"},"outputs":{"type":"array","items":{"type":"object","xml":{"name":"txinput"},"properties":{"value":{"type":"object","properties":{"Token":{"type":"number","example":10,"description":"Token amount"}}},"locktime":{"type":"number","example":0},"script_public_key":{"type":"string","example":"ec66c99201a7a8299e5acace235b03932c7990cc479eca35ee1dd692a5d3c030"}},"title":"TransactionOutput"},"description":"The outputs to the transaction"},"version":{"type":"integer","format":"int8","example":2,"description":"The transaction's schema version"},"druid_info":{"type":"object","properties":{"druid":{"type":"string","example":"DRUID_1"},"participants":{"type":"integer","example":2},"expectations":{"type":"object","properties":{"from":{"type":"string"},"to":{"type":"string"},"asset":{"type":"object"}}}}}},"title":"TransactionCreate"}}},"required":true},"responses":{"200":{"description":"Successful operation","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":"a1d46199e5c89b00509e118f5af83172","description":"The ID of the call, which corresponds to the x-cache-id used in the header"},"status":{"type":"string","example":"Success","description":"The status of the call, which will be one of either \"Success\", \"Error\", or \"Pending\""},"reason":{"type":"string","example":"Transaction/s successfully created","description":"The reason for the status of the call. Most useful to debug errors"},"route":{"type":"string","example":"create_transactions","description":"The endpoint route that was called"},"content":{"type":"object","properties":{"transaction":{"type":"object","example":"This section is unfinished, refer to postman collection for more details","description":"This section is unfinished, refer to postman collection for more details"}}}},"title":"ResponseCreateTransactions"}}}},"400":{"description":"Invalid input","content":{"application/json":{"schema":{"type":"object","properties":{"id":{"type":"string","example":null},"status":{"type":"string","example":"Error"},"reason":{"type":"string","example":"Bad Request"},"route":{"type":"string","example":null},"content":{"type":"string","example":null}},"title":"ResponseBadRequest"}}}}},"method":"post","path":"/create_transactions","servers":[{"url":"http://37.27.23.104:3003","description":"Testnet Mempool Node"}],"jsonRequestBodyExample":{"inputs":[{"previous_out":{"t_hash":"f0698b112da09","n":0},"script_signature":{"Pay2PkH":{"signable_data":"1b061ff7e94765f95a2a5122d3bde757f2daaacef762c5aef2bf237ca3da2abf","signature":"b576d3f5c1703206bad8b9de0ce3a3167e203b78164c86d78774534c930a535a31c49adae9e70569008c0329fb4a9128ca96d350f47a88ce06ef5a334506f803","public_key":"5e7856117f404562c47dbdccfb8c23dc9ec69be14df5712bb459eeb440f40808","address_version":"null"}}}],"outputs":[{"value":{"Token":10},"locktime":0,"script_public_key":"ec66c99201a7a8299e5acace235b03932c7990cc479eca35ee1dd692a5d3c030"}],"version":2,"druid_info":{"druid":"DRUID_1","participants":2,"expectations":{"from":"string","to":"string","asset":{}}}},"info":{"title":"Mempool API","description":"⚠️ **Some sections may still be incomplete. We higly recommend getting started by downloading our [Postman collection](/docs/postman-collections)**.\n\nThe Mempool node is a special type of node responsible for collecting transactions and bundling them into new blocks. \nThey also partition the mining network for mining and validate the blocks that these partitions mine. \nThere are only a limited number of Mempool nodes. ","contact":{"email":"[email protected]"},"license":{"name":"GPL-3.0","url":"https://www.gnu.org/licenses/gpl-3.0.en.html"},"version":"1.0.1"},"postman":{"name":"create_transactions","description":{"content":"Create new transaction/s, which will be submitted to the Mempool nodes for inclusion into a new block. This call assumes a full transaction as part of the request body, which might make raw calls difficult to manage. For convenience, it may be best to use an AIBlock library or SDK that abstracts this call for you.","type":"text/plain"},"url":{"path":["create_transactions"],"host":["{{baseUrl}}"],"query":[],"variable":[]},"header":[{"disabled":false,"description":{"content":"An idempotent key for retrieving cached responses from the node","type":"text/plain"},"key":"x-cache-id","value":""},{"key":"Content-Type","value":"application/json"},{"key":"Accept","value":"application/json"}],"method":"POST","body":{"mode":"raw","raw":"\"\"","options":{"raw":{"language":"json"}}}}} | ||
sidebar_class_name: "post api-method" | ||
info_path: docs/api/mempool/mempool-api | ||
custom_edit_url: null | ||
|
@@ -39,7 +39,7 @@ The inputs to the transaction | |
|
||
Previous output tx hash | ||
|
||
</div><SchemaItem collapsible={false} name={"t_hash"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","example":"f0698b112da09","description":"Transaction hash"}}></SchemaItem><SchemaItem collapsible={false} name={"n"} required={false} schemaName={"number"} qualifierMessage={undefined} schema={{"type":"number","example":0,"description":"The index of the output in the input transaction"}}></SchemaItem></div></details></SchemaItem><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}}><summary style={{}}><strong>script_signature</strong><span style={{"opacity":"0.6"}}> object</span></summary><div style={{"marginLeft":"1rem"}}><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}}><summary style={{}}><strong>Pay2PkH</strong><span style={{"opacity":"0.6"}}> object</span></summary><div style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"signable_data"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","example":"1b061ff7e94765f95a2a5122d3bde757f2daaacef762c5aef2bf237ca3da2abf","description":"Data to sign for verification. This is a SHA3 hash of the previous outpoint's data in the form \"${n}-${t_hash}\""}}></SchemaItem><SchemaItem collapsible={false} name={"signature"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","example":"b576d3f5c1703206bad8b9de0ce3a3167e203b78164c86d78774534c930a535a31c49adae9e70569008c0329fb4a9128ca96d350f47a88ce06ef5a334506f803","description":"Signature of the signable data"}}></SchemaItem><SchemaItem collapsible={false} name={"public_key"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","example":"5e7856117f404562c47dbdccfb8c23dc9ec69be14df5712bb459eeb440f40808","description":"Public key used to sign the signable data"}}></SchemaItem><SchemaItem collapsible={false} name={"address_version"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","example":"null"}}></SchemaItem></div></details></SchemaItem></div></details></SchemaItem><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem"}}>]</div></li></div></details></SchemaItem><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}}><summary style={{}}><strong>outputs</strong><span style={{"opacity":"0.6"}}> txinput[]</span></summary><div style={{"marginLeft":"1rem"}}><div style={{"marginTop":".5rem","marginBottom":".5rem"}}> | ||
</div><SchemaItem collapsible={false} name={"t_hash"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","example":"f0698b112da09","description":"Transaction hash"}}></SchemaItem><SchemaItem collapsible={false} name={"n"} required={false} schemaName={"number"} qualifierMessage={undefined} schema={{"type":"number","example":0,"description":"The index of the output in the input transaction"}}></SchemaItem></div></details></SchemaItem><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}}><summary style={{}}><strong>script_signature</strong><span style={{"opacity":"0.6"}}> object</span></summary><div style={{"marginLeft":"1rem"}}><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}}><summary style={{}}><strong>Pay2PkH</strong><span style={{"opacity":"0.6"}}> object</span></summary><div style={{"marginLeft":"1rem"}}><SchemaItem collapsible={false} name={"signable_data"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","example":"1b061ff7e94765f95a2a5122d3bde757f2daaacef762c5aef2bf237ca3da2abf","description":"Data to sign for verification. This is a SHA3 hash of the all the transaction outputs and this input's previous output, for example \"{output1}{output2}{previousOut}\""}}></SchemaItem><SchemaItem collapsible={false} name={"signature"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","example":"b576d3f5c1703206bad8b9de0ce3a3167e203b78164c86d78774534c930a535a31c49adae9e70569008c0329fb4a9128ca96d350f47a88ce06ef5a334506f803","description":"Signature of the signable data"}}></SchemaItem><SchemaItem collapsible={false} name={"public_key"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","example":"5e7856117f404562c47dbdccfb8c23dc9ec69be14df5712bb459eeb440f40808","description":"Public key used to sign the signable data"}}></SchemaItem><SchemaItem collapsible={false} name={"address_version"} required={false} schemaName={"string"} qualifierMessage={undefined} schema={{"type":"string","example":"null"}}></SchemaItem></div></details></SchemaItem></div></details></SchemaItem><li><div style={{"fontSize":"var(--ifm-code-font-size)","opacity":"0.6","marginLeft":"-.5rem"}}>]</div></li></div></details></SchemaItem><SchemaItem collapsible={true} className={"schemaItem"}><details style={{}}><summary style={{}}><strong>outputs</strong><span style={{"opacity":"0.6"}}> txinput[]</span></summary><div style={{"marginLeft":"1rem"}}><div style={{"marginTop":".5rem","marginBottom":".5rem"}}> | ||
|
||
The outputs to the transaction | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters