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

Single transaction API endpoint #8

Open
olemis opened this issue Feb 24, 2019 · 0 comments
Open

Single transaction API endpoint #8

olemis opened this issue Feb 24, 2019 · 0 comments
Assignees

Comments

@olemis
Copy link
Contributor

olemis commented Feb 24, 2019

[POST] /api/transactions/single

Should build not signed transaction to transfer from the single source to the single destination. If the transaction with the specified operationId has already been built by one of the [POST] /api/transactions/* call, it should be ignored and regular response (as in the first request) should be returned.

Body:

{
    // Operation ID  
    “operationId”: “guid”,
    // Source address
    “fromAddress”: “string”,
    // Destination address
    “toAddress”: “string”,
    // Asset ID to transfer
    “assetId”: “string”,
    // Amount to transfer. Integer as string, aligned
    // to the asset accuracy. Actual value can be
    // calculated as
    // x = amount / (10 ^ asset.Accuracy)
    “amount”: “string”,
    // Ignored . No Fiber coin implements this ... yet
    “includeFee”: boolean
}

Response:

{
// Error code.
// Can be empty.
// Should be non empty if an error that match one of the
// listed code is occured. For other errors use HTTP
// status codes.
// enum values:
// -  amountIsTooSmall:  amount is too small to execute
// transaction
// -  notEnoughBalance:  transaction can’t be executed due
// to balance insufficiency on the source address.
   "errorCode": "enum",
// The transaction context which will be passed to the
// [POST] /api/sign.
// Should be not empty when result is successful.
“transactionContext”: “string”
}
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