Skip to content

Commit

Permalink
[transactions] refs fibercrypto#7 - Add spec for [POST] /api/transact…
Browse files Browse the repository at this point in the history
…ions/many-inputs
  • Loading branch information
mauricio1802 committed Feb 26, 2019
1 parent 53e214d commit 99f1732
Showing 1 changed file with 71 additions and 3 deletions.
74 changes: 71 additions & 3 deletions mauricio1802_specs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -92,7 +92,7 @@ paths:
$ref : '#/components/schemas/genericError'


/api/balances: #issue 9
/api/balances:
get:
summary: Return balance of the observed wallets
description: Should return balances of the observed wallets with non zero balances. Wallets balance observation is enabled by the [POST] /api/balances/{address}/observation and disabled by the [DELETE] /api/balances/{address}/observation.
Expand Down Expand Up @@ -143,15 +143,83 @@ paths:
description: Balance is integer as string, aligned to the asset accuracy. Actual value can be calculated as x = sourceBalance * (10 ^ asset.Accuracy)Balance is integer as string, aligned to the asset accuracy. Actual value can be calculated as x = sourceBalance * (10 ^ asset.Accuracy)
type: string
block:
description: Incremental ID of the moment, when balance is updated. It should be the same sequence as for block in the []GET] /api/transactions/broadcast/* responses
description: Incremental ID of the moment, when balance is updated. It should be the same sequence as for block in the [GET] /api/transactions/broadcast/* responses
type: integer




default:
$ref : '#/components/schemas/genericError'



/api/transaction/many-inputs:
post:
summary: Build not signed transactions with many inputs.
description: Should build not signed transaction with many inputs. If the transaction with the specified operationId has already been built by one of the [POST] /api/transactions/* call, it should be ignored

security:
- CsrfTokenAuth: []

requestBody:
required: true
description: Transaction object
content:
application/json:
schema:
description: ewr
type: object
properties:
operationId:
description: Operation ID
type: string

inputs:
description: Sources
type: array
items:
type: object
properties:
fromAddress:
description: Source Address
type: string
amount:
description: Amount to transfer from the fromAddress. Integer as string, aligned to the droplet precision exponent. Actual value can be calculated as x = amount / (10 ^ asset.Accuracy).
type: string

toAddress:
description: Destination Address
type: string
assetId:
description: Ticker ID of the fiber coin, SKY by default
type: string


responses:
'200': # status code
description: OK
content:
application/json:
schema:
type: object
properties:

ErrorCode:
description: Error Code
type: string
enum:
- amountIsTooSmall
- notEnoughBalance

transactionContext:
description: The transaction context which will be passed to the [POST] /api/sign
type: string

default:
$ref : '#/components/schemas/genericError'






Expand Down

0 comments on commit 99f1732

Please sign in to comment.