uPort Funding Service
This endpoints tries to send funds to the address on the from
field of the transaction.
The from
field needs to match with the deviceKey
in the Authorization token.
Sensui, does some limit check before actually sending the funds. If sensui funds an attempt to abuse a 429 Too many connections
is returned
The endpoint is private, only valid tokens from nisaba
are allowed.
POST /fund
Authorization: Bearer <jwt token>
The authorization header needs a JWT token that is signed by the nisaba service (a build that very much resembles this one, in that it also uses the serverless framework and AWS lambda. The JWT token is generated from the following control flow (for uPort):
{
tx: <signedTx>,
blockchain: <blockchain name>
}
Status | Message | ||
---|---|---|---|
200 | Ok. | address funded | |
400 | Bad request | No JSON or paramter missing | |
401 | Forbidden | Fuel token not granted by nisaba | |
403 | Forbidden | JWT token missing or invalid | |
429 | Abuse | Abusing gasPrice or funds not needed | |
500 | Internal Error | Internal error |
{
txHash: <tx hash>
}
POST /relay
Authorization: Bearer <jwt token>
{
metaSignedTx: <metaSignedTx>,
blockchain: <blockchain name>
}
Status | Message | |
---|---|---|
200 | Ok. | address funded |
400 | Bad request | No JSON or paramter missing |
401 | Forbidden | Fuel token not granted by nisaba |
403 | Forbidden | Invalid metaTx signature |
500 | Internal Error | Internal error |
{
txHash: <tx hash>
}