Hub

In your config.json file, you have specified a HUB_PROVIDER_URL. This url is how the automaton communicates and retrieves information stored on the hub. Hub endpoints are exposed through this category and allow the user to receive low level information.

Wallets

List all wallets registered on the associated liquidity hub.

Endpoint

GET /hub/wallets

Request

Name Required Description Default Value Example
         

Response

Array

Name Required Description Default Value Example
address required Liquidity registered ethereum address without prepending 0x   627306090abaB3A6e1400e9345bC60c78a8BEf57

Example

GET /hub/wallets
[
    {
        "address": "627306090abaB3A6e1400e9345bC60c78a8BEf57",
    },
]

Audit Registration

For a specific :address, get information about its registration.

Endpoint

GET /hub/audit/:address/registration

Request

Name Required Description Default Value Example
address required Liquidity registered ethereum address SDK’s ethereum address 0x627306090abaB3A6e1400e9345bC60c78a8BEf57

Response

Name Required Description Default Value Example
round required Round the wallet was registered   4
wallet_signature required Wallet signature on registratio n   691550b1480f09d50789777d176323f9c4c13a0817263f063d35986ce940086d398517571e68511025800f94789faf6331d93b8af8698546e25f850ceceffb711b
hub_signature required Hub signature on registratio n   7795d1f7314bbbbf8a4144a7343ce413d5640099d889093270909e34b21e55f12956b66cf786da22e0c3774ffe72b107812ed3cddae35dc488705b1a736a2c401b

Example

GET /hub/audit/0x627306090abaB3A6e1400e9345bC60c78a8BEf57/registration
{
    "round": 4,
    "wallet_signature": "691550b1480f09d50789777d176323f9c4c13a0817263f063d35986ce940086d398517571e68511025800f94789faf6331d93b8af8698546e25f850ceceffb711b",
    "hub_signature": "7795d1f7314bbbbf8a4144a7343ce413d5640099d889093270909e34b21e55f12956b66cf786da22e0c3774ffe72b107812ed3cddae35dc488705b1a736a2c401b"
}

Audit Transfers

For a specific :address, get information about its transfers.

Endpoint

GET /hub/audit/:address/transfers

Request

Name Required Description Default Value Example
address required Liquidity registered ethereum address SDK’s ethereum address 0x62730609 0abaB3A6e14 00e9345bC60 c78a8BEf57

Response

Array

Name Required Description Default Value Example
recipient required Ethereum address to sent the transaction to   0x627306090abaB3A6e1400e9345bC60c78a8BEf57
sender required Ethereum address used to perform the transaction SDK’s ethereum address 0x627306090abaB3A6e1400e9345bC60c78a8BEf57
amount required Amount transfered in wei   1000000000000000000
transactionId required Unique identifier of the transaction   1
status required Status of the transaction   confirmed, pending
nonce required Identifier generated from transaction   1270040570
round required Round the transaction was performed   4

Example

GET /hub/audit/0x627306090abaB3A6e1400e9345bC60c78a8BEf57/transfers
[
    {
        "transactionId": "38",
        "round": 4,
        "recipient": "0x627306090abaB3A6e1400e9345bC60c78a8BEf57",
        "sender": "0xd977dA63d086d222EDE0aa68ee84328310485FFE",
        "amount": "50000",
        "nonce": "1270040570",
    }
]

Audit Deposits

For a specific :address, get information about its deposits.

Endpoint

GET /hub/audit/:address/deposits

Request

Name Required Description Default Value Example
address required Liquidity registered ethereum address SDK’s ethereum address 0x627306090abaB3A6e1400e9345bC60c78a8BEf57

Response

Name Required Description Default Value Example
transactionId required Transaction id of the deposit on Ethereum   ee456c4f5f31e9b44c94df251690469fef4cf1c2b8f603edc62d7703acda098c
block required Block the transaction has been included into on Ethereum   5898261
round required Round the wallet was registered   4
amount required Amount deposited in wei   1000000000000000000
created_on required Date the transaction has been performed (ISO format)   1970-01-01T00:00:00.000Z

Example

GET /hub/audit/0x627306090abaB3A6e1400e9345bC60c78a8BEf57/deposits
[
    {
        "transactionId": "ee456c4f5f31e9b44c94df251690469fef4cf1c2b8f603edc62d7703acda098c",
        "block": 5898261,
        "round": 4,
        "amount": "50000",
        "time": "2018-07-03T12:33:27.409540Z",
    }
]