Skip to content
This repository was archived by the owner on Dec 26, 2022. It is now read-only.

Send Transfer Message

ender503 edited this page Jul 5, 2019 · 19 revisions

Send transfer to tangle

Build the transfer bundle from request and broadcast to the tangle. Input fields include address, value, tag, and message. This API would also try to find the transactions after bundle sent. Header of Content-Type with application/json is required.

POST /transaction

Parameters

All inputs are optional, tangle-accelerator would still send a transaction even with some inputs are not provided.

Name Type Description
value integer Optional. Amount of the IOTA currency will be sent.
message string Optional. Message of the transaction in Trytes format.
message_format string Optional. Treating message field as specified format. Can be one of ascii or tytes. Default: ascii
tag string Optional. Tag of transactions into several classifications.
address string Optional. Address of the receiver where IOTA currency will be sent to.

Sample Input

{
  "value": 0,
  "message": "ZBCDKDTCFDTCSCEAQCMDEAHDPCBDVC9DTCRAPCRCRCTC9DTCFDPCHDCDFD",
  "tag": "POWEREDBYTANGLEACCELERATOR9",
  "address": "POWEREDBYTANGLEACCELERATOR9999999999999999999999999999999999999999999999999999999"
}

Sample Response

{
  "hash": "JDXAQAWQQKCYHEJXDJQAVQIJM9NBRF9ZNL9DVNJQVRVSENYPEN9XLZP9SIFVHUDIPOVOPLJLLJUY99999",
  "signature_and_message_fragment": "ZBCDKDTCFDTCSCEAQCMDEAHDPCBDVC9DTCRAPCRCRCTC9DTCFDPCHDCDFD99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999",
  "address": "POWEREDBYTANGLEACCELERATOR9999999999999999999999999999999999999999999999999999999",
  "value": 0,
  "obsolete_tag": "JVWEREDBYTANGLEACCELERATOR9",
  "timestamp": 1553152590683,
  "current_index": 0,
  "last_index": 0,
  "bundle_hash": "OULAGFKDOFDJILVVW9QTZXLTODAZPTHXBNPEKWGYJWAAUETEJJTANLRXJZ9HEDJWJHNTXHLHXNJUINZBZ",
  "trunk_transaction_hash": "EIZYHREBPTASWGHTRYCT9WZGSGXCGLPQRUZGDCRHGHVRST9URTKMSUHJXAVUWCFYFGTW9NFJJQRTZ9999",
  "branch_transaction_hash": "XXUZDQVYMWJZPUUHMRYDGULBDOJFJVTPEHVBJYETKWLTMQUGCCDIWVFBNMXJSBCYBJGHQ9UIDDHK99999",
  "tag": "POWEREDBYTANGLEACCELERATOR9",
  "attachment_timestamp": 1553152593300,
  "attachment_timestamp_lower_bound": 0,
  "attachment_timestamp_upper_bound": 3812798742493,
  "nonce": "P999999999IIDB9999999999999"
}

curl Example

$ curl http://node.deviceproof.org:5566/transaction/ \
    -X POST \
    -H 'Content-Type: application/json' \
    -d '{"value": 0, "message": "ZBCDKDTCFDTCSCEAQCMDEAHDPCBDVC9DTCRAPCRCRCTC9DTCFDPCHDCDFD", "tag": "POWEREDBYTANGLEACCELERATOR9", "address": "POWEREDBYTANGLEACCELERATOR9999999999999999999999999999999999999999999999999999999"}'

{
  "hash": "JDXAQAWQQKCYHEJXDJQAVQIJM9NBRF9ZNL9DVNJQVRVSENYPEN9XLZP9SIFVHUDIPOVOPLJLLJUY99999",
  "signature_and_message_fragment": "ZBCDKDTCFDTCSCEAQCMDEAHDPCBDVC9DTCRAPCRCRCTC9DTCFDPCHDCDFD99999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999999",
  "address": "POWEREDBYTANGLEACCELERATOR9999999999999999999999999999999999999999999999999999999",
  "value": 0,
  "obsolete_tag": "JVWEREDBYTANGLEACCELERATOR9",
  "timestamp": 1553152590683,
  "current_index": 0,
  "last_index": 0,
  "bundle_hash": "OULAGFKDOFDJILVVW9QTZXLTODAZPTHXBNPEKWGYJWAAUETEJJTANLRXJZ9HEDJWJHNTXHLHXNJUINZBZ",
  "trunk_transaction_hash": "EIZYHREBPTASWGHTRYCT9WZGSGXCGLPQRUZGDCRHGHVRST9URTKMSUHJXAVUWCFYFGTW9NFJJQRTZ9999",
  "branch_transaction_hash": "XXUZDQVYMWJZPUUHMRYDGULBDOJFJVTPEHVBJYETKWLTMQUGCCDIWVFBNMXJSBCYBJGHQ9UIDDHK99999",
  "tag": "POWEREDBYTANGLEACCELERATOR9",
  "attachment_timestamp": 1553152593300,
  "attachment_timestamp_lower_bound": 0,
  "attachment_timestamp_upper_bound": 3812798742493,
  "nonce": "P999999999IIDB9999999999999"
}

Clone this wiki locally