The following list includes all the upcoming webhooks which we are currently working on. Please note that since the information here is currently in Beta it is subject to change at any time.
Events
| Event | Description | Event type |
|---|---|---|
| Ethereum Block Internal Transfers Received | An ethereum wallet belonging to the trustId has received at least 1 internal transfer in a block (*) | ETHEREUMBLOCKINTERNALTRANSFERSRECEIVED |
(*) - ETHEREUM_BLOCK_INTERNAL_TRANSFERS_RECEIVED operates on the block level meaning only 1 webhook will be sent per block.
Event Triggers
| Event type | Trigger |
|---|---|
| ETHEREUMBLOCKINTERNALTRANSFERSRECEIVED | At least 1 internal transfer relating to the user's address occurred in a block (1 block confirmation as seen by TrustVault Ethereum indexer) |
Ethereum Block Internal Transfers Payload
| Attribute | Description |
|---|---|
| trustId | string Unique identifier for the TrustVault user |
| blockHeight | string The block number in integer string format |
| blockHash | string Unique identifier for the block |
| transactionBlockTime | number The epoch time when the block was confirmed |
| subWalletId | object Unique identifier for the sub-wallet that received an internal transfer, in object format |
| subWalletIdString | string Unique identifier for the sub-wallet that received an internal transfer, in string format |
| balanceBefore | object The ETH balance of the ethereum sub-wallet BEFORE the block was confirmed |
| balanceAfter | string The ETH balance of the ethereum sub-wallet AFTER the block was confirmed |
| transactions | array The list of transactions in the block where the ethereum sub-wallet had at least 1 internal transaction |
| internalTransfers | array The list of internal ETH transfers for particular transaction where the ethereum-sub-wallet was involved (*) |
| quantity | object The amount expressed in the given symbol (usually ETH) |
| rawQuantity | object The amount expressed in wei |
| status | number 1 | 0 (1) The transaction was successfully executed (0) The transaction was reverted and gas fees was deducted |
(*) internalTransfers - can only be in ETH and transactionDirection will always be RECEIVED
Verifying the transactions / internal transfers data
The set of transactions and internal transfers in the webhook can be verified by checking your balance before and after the block and performing the steps below:
-
Add up the total gas fees (gasPrice x gasUsed) for any
outgoing
transactions (
from = <BITPANDA_CUSTODY_ADDRESS>), both successful & reverted (status = 1 / 0) in the block -
Add up the total transactionValue for any
outgoing
transactions (
from = <BITPANDA_CUSTODY_ADDRESS>) for ONLY the successfully executed transactions (status = 1) in the block -
Add up the total transactionValue for any
incoming
transactions (
to = <BITPANDA_CUSTODY_ADDRESS>) for ONLY the successfully executed transactions (status = 1) in the block -
Add up the total internal transfers received (
to = <BITPANDA_CUSTODY_ADDRESS>)in the block
balanceBefore - (1) - (2) + (3) + (4) = balanceAfterSample Ethereum Block Internal Transfers Received
In a single block a TrustVault user sends:
- a transaction that results in 3 internal transfers returned to their address
- as well as a transaction that did NOT result in any internal transfers:
{
"version": "1.0.0",
"type": "ETHEREUM_BLOCK_INTERNAL_TRANSFERS_RECEIVED",
"messageId": "81f16610-813d-4bd5-ad31-183f14a62404",
"timestamp": 1598363410185,
"isoTimestamp": "2020-08-25T13:50:10.185Z",
"payload": {
"trustId": "9297e0bd-24ff-4ac1-bdbb-560d81272803",
"blockHeight": "9560642",
"blockHash": "0x64830d8dccfe2768ca5d54e47cb90248dff9cc1668e08b3259fb60a941b7707b",
"transactionBlockTime": 1611935580,
"subWalletId": {
"id": "7a9e053c-47fc-489b-956f-2aafbe7d2ff0",
"type": "ETH",
"index": 1
},
"subWalletIdString": "7a9e053c-47fc-489b-956f-2aafbe7d2ff0/ETH/1",
"balanceBefore": {
"quantity": "2",
"rawQuantity": "2020526000000000000",
"symbol": "ETH",
},
"balanceAfter": {
"quantity": "2.5",
"rawQuantity": "2500000000000000000",
"symbol": "ETH",
},
"transactions": [
// contract call that resulted in 3 internal transfers back to the TrustVault address
{
"from": "<TRUSTVAULT_ADDRESS>",
"transactionId": "0xdd063ed7b19f3497c3fe0c0375bd13b3ed92012f640202fc374342b77a07ac61",
"to": "<CONTRACT_ADDRESS>",
"gasUsed": "51315",
"gasPrice": "200000000000",
"transactionValue": "0",
"transactionValueInEth": "0",
"status": 1,
"decodedInput": {
"id": "0x2e1a7d4d",
"signature": "withdraw(uint256 amount)",
"params": [
{
"name": "amount",
"type": "uint256",
"value": "0x39e9215b"
}
]
},
"decodedEvents": [],
"internalTransfers": [
{
"from": "<CONTRACT_ADDRESS>",
"to": "<TRUSTVAULT_ADDRESS>",
"quantity": "0.5",
"rawQuantity": "500000000000000000",
"symbol": "ETH",
"tokenDirectionType": "RECEIVED"
},
{
"from": "<CONTRACT_ADDRESS>",
"to": "<TRUSTVAULT_ADDRESS>",
"quantity": "0.5",
"rawQuantity": "500000000000000000",
"symbol": "ETH",
"tokenDirectionType": "RECEIVED"
},
{
"from": "<CONTRACT_ADDRESS>",
"to": "<TRUSTVAULT_ADDRESS>",
"quantity": "0.5",
"rawQuantity": "500000000000000000",
"symbol": "ETH",
"tokenDirectionType": "RECEIVED"
}
]
},
// simple ETH transaction with 0 internal transfers
{
"from": "<TRUSTVAULT_ADDRESS>",
"transactionId": "0xdd60bb69855803cb1f762f4d7e65d4080f25dee222e0026539908a6b8bf8cf00",
"to": "<CONTRACT_ADDRESS>",
"gasUsed": "51315",
"gasPrice": "200000000000",
"transactionValue": "1000000000000000000",
"transactionValueInEth": "1",
"status": 1,
"decodedInput": null,
"decodedEvents": [],
"internalTransfers": []
}
]
}
}- TrustVault user receives an internal transfer without sending a transaction in the block
{
"version": "1.0.0",
"type": "ETHEREUM_BLOCK_INTERNAL_TRANSFERS_RECEIVED",
"messageId": "c55d8b4a-350b-4d75-b842-6ba464334384",
"timestamp": 1598363410185,
"isoTimestamp": "2020-08-25T13:50:10.185Z",
"payload": {
"trustId": "9297e0bd-24ff-4ac1-bdbb-560d81272803",
"blockHeight": "9560642",
"blockHash": "0x64830d8dccfe2768ca5d54e47cb90248dff9cc1668e08b3259fb60a941b7707b",
"transactionBlockTime": 1611935580,
"subWalletId": {
"id": "7a9e053c-47fc-489b-956f-2aafbe7d2ff0",
"type": "ETH",
"index": 1
},
"subWalletIdString": "7a9e053c-47fc-489b-956f-2aafbe7d2ff0/ETH/1",
"balanceBefore": {
"quantity": "2",
"rawQuantity": "2020526000000000000",
"symbol": "ETH",
},
"balanceAfter": {
"quantity": "2.5",
"rawQuantity": "2500000000000000000",
"symbol": "ETH",
},
"transactions": [
{
"from": "<SOME_ADDRESS>",
"transactionId": "0x6bd383b4fef87a59eda26f8fc072c7681489028818ac5207501b49a50a22eae8",
"to": "<CONTRACT_ADDRESS>",
"gasUsed": "51315",
"gasPrice": "200000000000",
"transactionValue": "0",
"transactionValueInEth": "0",
"status": 1,
"decodedInput": {
"id": "0x2e1a7d4d",
"signature": "withdraw(uint256 amount)",
"params": [
{
"name": "amount",
"type": "uint256",
"value": "0x39e9215b"
}
]
},
"decodedEvents": [],
"internalTransfers": [
{
"from": "<CONTRACT_ADDRESS>",
"to": "<TRUSTVAULT_ADDRESS>",
"quantity": "0.5",
"rawQuantity": "500000000000000000",
"symbol": "ETH",
"tokenDirectionType": "RECEIVED"
}
]
}
]
}
}