Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[api] Get broadcast tx many-outputs #19

Open
olemis opened this issue Feb 24, 2019 · 1 comment
Open

[api] Get broadcast tx many-outputs #19

olemis opened this issue Feb 24, 2019 · 1 comment
Assignees

Comments

@olemis
Copy link
Contributor

olemis commented Feb 24, 2019

[GET] /api/transactions/broadcast/many-outputs/{operationId}

See [GET] /api/capabilities

Should return broadcasted transaction by operation ID . All transactions with many
outputs, that were broadcasted by the [POST] /api/transactions/broadcast should be available here.

Response:

{
// Operation ID.
“operationId”: “guid”,
// State of the transaction
// enum values:
//
// -  inProgress : transaction is being in-progress
// -  completed : transaction is completed for sure. When
// transaction is switched to the completed state, 
// amount of this transaction should be already subtracted from
// the balance returned by the  [GET] /api/balances , 
// for outgoing transactions
// -  failed : transaction is failed
“state”: “enum”,
 // Transaction moment as ISO 8601 in UTC
“timestamp”: “datetime”,
// Source address
“fromAddress”: “string”,
// Destinations.
// Should be non null if the  state is  Completed.
“outputs”: [
{
// Destination address
“toAddress”: “string”,
// Actual amount that is transferred to the
//  toAddress . Integer as string, aligned
// to the asset accuracy. Actual value can be
// calculated as
// x = amount / (10 ^ asset.Accuracy)
“amount”: “string”
} ],
//  Fee. Is integer as string, aligned
   // to the asset accuracy. Actual value can be
   // calculated as
   // x = sourceFee * (10 ^ asset.Accuracy)
// Should be non empty if the  state is  Completed
“fee”: “string”,
   // Transaction hash as base64 string.
   // Can be empty
// Should be non empty if the  state is  Completed
    “hash”: “string”,
// Error description
// Can be empty
// Should be non empty if the  state is  Error
“error”: “string”,
// Error code.
// Can be empty.
// Should be non empty if the state is Failed.
// enum values:
// -  unknown : any error that does not fit another codes.
// -  amountIsTooSmall : amount is too small to execute
// transaction
// -  notEnoughBalance : transaction can’t be executed due
// to balance insufficiency on the source address.
// Should be non empty if the  state is  Error
“errorCode”: “enum”,
// Incremental ID of the moment, when the transaction
// state changing is detected. It should be the same
// sequence as for block in the  [GET] /api/balances
// response. In other words block number/height.
    “block”: integer64
}

Errors:

* `204 No content`  - specified transaction not found
@cbermudez97 cbermudez97 self-assigned this Feb 25, 2019
cbermudez97 pushed a commit to uhsimelo/skyxcommons that referenced this issue Feb 25, 2019
…dpoint

/api/transactions/broadcast/many-outputs/{operationId}
@cbermudez97
Copy link

In the Errors for the 204 the response is a string or it should use a default JSON response such as:

{
     code: 204,
     message: 'specified transaction not found'
}

cbermudez97 pushed a commit to uhsimelo/skyxcommons that referenced this issue Feb 28, 2019
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants