Transfers

Transfers endpoint manage wallet transfers and are used to send and check the state of your transfers. All transfers made are saved to a database. Consequently, it is possible to retrieve your funds if the hub is unresponsive, satisfying the non-custodian property.

Send

Send a transfer to :recipient of :amount wei.

Endpoint

POST /transfers/send

Request

Name Required Description Default Value Example
recipient required Ethereum address to sent the transaction to   0x62730609 0abaB3A6e14 00e9345bC60 c78a8BEf57
amount required Amount to be transfered in wei   1000000000 000000000

Response

Name Required Description Default Value Example
sender required Ethereum address used to perform the transaction   0x62730609 0abaB3A6e14 00e9345bC60 c78a8BEf57
recipient required Ethereum address of the recipient   0x62730609 0abaB3A6e14 00e9345bC60 c78a8BEf57
amount required Amount to be transfered in wei   1000000000 000000000
created_on required Date the transaction has been performed (ISO format)   1970-01-01 T00:00:00.0 00Z
nonce required Identifier generated from transaction   *1270040570 *
transactionId required Unique identifier of the transaction   1
status required Status of the transaction   confirmed, pending

Example

POST /tranfers/send
data: {
  "recipient": "0x627306090abaB3A6e1400e9345bC60c78a8BEf57",
  "amount": 1
}
{
    "sender": "0x627306090abaB3A6e1400e9345bC60c78a8BEf57",
    "recipient": "0x627306090abaB3A6e1400e9345bC60c78a8BEf57",
    "amount": "1",
    "created_on": "1970-01-01T00:00:00.000Z",
    "nonce": "1270040570",
    "txId": 1,
    "status": "pending",
}

List

A List of all transfers performed by the automaton during this round. Filters can be applied.

Endpoint

GET /transfers/list

Request

Name Required Description Default Value Example
count optional Amount to be transfered in wei 100 50
recipient optional Ethereum address to sent the transaction to   0x62730609 0abaB3A6e14 00e9345bC60 c78a8BEf57
sender optional Ethereum address used to perform the transaction SDK’s ethereum address 0x62730609 0abaB3A6e14 00e9345bC60 c78a8BEf57
amount optional Amount to be transfered in wei   1000000000 000000000
transactionId optional Unique identifier of the transaction   1
status optional Status of the transaction confirmed confirmed, pending

Response

Array

Name Required Description Default Value Example
recipient required Ethereum address to sent the transaction to   0x62730609 0abaB3A6e14 00e9345bC60 c78a8BEf57
sender required Ethereum address used to perform the transaction SDK’s ethereum address 0x62730609 0abaB3A6e14 00e9345bC60 c78a8BEf57
amount required Amount to be transfered in wei   1000000000 000000000
transactionId required Unique identifier of the transaction   1
status required Status of the transaction   confirmed, pending
nonce required Identifier generated from transaction   *1270040570 *
created_on required Date the transaction has been performed (ISO format)   1970-01-01 T00:00:00.0 00Z

Example

GET /transfers/list?status=pending
[
    {
        "sender": "0x627306090abaB3A6e1400e9345bC60c78a8BEf57",
        "recipient": "0x627306090abaB3A6e1400e9345bC60c78a8BEf57",
        "amount": "1",
        "created_on": "1970-01-01T00:00:00.000Z",
        "nonce": "1270040570",
        "txId": 1,
        "status": "pending",
    }
]