Persistence API
The Persistence API allows the DCC middleware to notify you of transactions and report results.
Some events are for asynchronous processes you initialized such as Reporting API requests. Others are based on Provenance Blockchain activity.
Persist Coin Movement
POST /api/v1/transactions/logship
Default logging mechanism for all USDF coin movement when the from/to address is a Provenance Blockchain account registered by your bank or DCC key pair address.
Request
Sample Request
{
"recordCount": 2,
"transactions": [
{
"txId": "8278F5B2C11E4B4BF42E03F987C9F0BF3D23186279B40F26E50D3047B9DE71DE",
"fromAddress": "tp1uuwul8w8385lsgjdq9gazwje5eulft42pde73e",
"fromAddressBankUuid": "e886fda6-1ef2-4afb-85cd-05fc2a497929",
"toAddress": "tp1dg7qc5ujk3lq3u94u5xm0ssvs6aqrr2xcuhgjd",
"toAddressBankUuid": "efb871db-84ff-40bf-b7d7-c8d81a9d7c4c",
"blockHeight": "100",
"timestamp": "2021-12-03T10:15:30.000Z",
"amount": "1000",
"denom": "usdf.c",
"transactionType": "TRANSFER"
},
{
"txId": "3366D2FE51C763D66A74EA85002B7606FC3C294D972216843D151E5B5FA0A5E4",
"fromAddress": "tp1zl388azlallp5rygath0kmpz6w2agpampukfc3",
"toAddress": "tp1uuwul8w8385lsgjdq9gazwje5eulft42pde73e",
"toAddressBankUuid": "e886fda6-1ef2-4afb-85cd-05fc2a497929",
"blockHeight": "101",
"timestamp": "2021-12-03T10:15:50.000Z",
"amount": "200",
"denom": "usdf.c",
"transactionType": "MINT"
}
]
}
Parameters
Attribute | Type | Requirement | Notes |
---|---|---|---|
recordCount | number | Required | Number of transactions in request |
transactions | array of Transaction | Required | List of transaction coin movements |
Transaction
Attribute | Type | Requirement | Notes |
---|---|---|---|
txId | string | Required | Unique identifier of transaction |
fromAddress | string | Required | From Provenance Blockchain account of transaction |
fromAddressBankUuid | string | Optional | From bank account identifier of transaction if a registered Provenance Blockchain account |
toAddress | string | Required | To Provenance Blockchain account of transaction |
toAddressBankUuid | string | Optional | To bank account identifier of transaction if a registered Provenance Blockchain account |
blockHeight | string | Required | The block height of transaction on Provenance Blockchain |
timestamp | string (timestamp) | Required | Timestamp of the transaction on Provenance Blockchain |
amount | string | Required | Quantity of coin for transaction |
denom | string | Required | The marker denomination of coin for transaction |
transactionType | Enums.TransactionType | Required | MINT ,TRANSFER ,REDEEM , BURN Identifier of type of transaction |
Enums
Transaction Type
Attribute | Description |
---|---|
MINT | Mint and withdraw to a registered bank account or DCC key pair address |
TRANSFER | General transfer of USDF coin where the from and/or to address is a registered account or DCC key pair address |
REDEEM | Transfer of USDF from a registered account to DCC key pair address for redemption |
BURN | Burn USDF coin out of circulation |
Response
Expects a 200 status code response with any string value.
Persist Balance Report
POST /api/v1/transactions/balreport
Paginated result response for a balance report initialized via Reporting API create balance report.
Request
Sample Request
{
"requestUuid": "b353605f-0d0d-443f-90db-eb5c3ce4763d",
"recordCount": 2,
"page": 1,
"totalPages": 1,
"transactions": [
{
"uuid": "be388b23-b8b1-4a6d-af60-d2babb4fa52e",
"address": "tp1uuwul8w8385lsgjdq9gazwje5eulft42pde73e",
"amount": "35243",
"denom": "usdf.c",
"timestamp": "2021-12-04T10:15:50.000Z"
},
{
"uuid": "5f39d217-bdb0-4a00-9751-71335c9bbf60",
"address": "tp1zksylcrjnhv7nc3k7vltac85lfk3j0w54gazcn",
"amount": "981",
"denom": "usdf.c",
"timestamp": "2021-12-04T10:15:51.000Z"
}
]
}
Parameters
Attribute | Type | Requirement | Notes |
---|---|---|---|
requestUuid | string | Required | Unique identifier of the balance report request |
recordCount | number | Required | Number of transactions in request |
page | number | Required | Page number of balance report |
totalPages | number | Required | Total number of pages in this balance report |
transactions | array of Transaction | Required | List of transaction coin movements |
Transaction
Attribute | Type | Requirement | Notes |
---|---|---|---|
uuid | string | Required | Unique identifier of transaction |
address | string | Required | Provenance Blockchain account of balance |
amount | string | Required | Amount of coin |
denom | string | Required | The marker denomination of coin for this report |
timestamp (timestamp) | string | Required | Timestamp of when the balance was queried from the Provenance Blockchain node |
Pagination Note
For a balance report with multiple pages, you will receive a separate request per page until all are received.
Response
Expects a 200 status code response with any string value.
Persist Alert
POST /api/v1/alerts
Default alerting mechanism of material code changes to USDF.
Alert Note
Currently only supporting smart contract migration alerts.
Request
Sample Request
{
"uuid": "a258ccb0-70e1-423b-859e-2c15601dec42",
"alertLevel": "INFO",
"message": "Contract migrated to code id 2 with tx hash 082E37A767988FD80BA99E20C86E89B8B0F9BC0F368DBAF2C4B17938322E6356",
"timestamp": "2021-12-04T10:16:00.000Z"
}
Parameters
Attribute | Type | Requirement | Notes |
---|---|---|---|
uuid | string | Required | Unique identifier of alert record |
alertLevel | string | Required | INFO ,WARNING ,ERROR ,CRITICAL level of importance |
message | string | Required | Alert content |
timestamp (timestamp) | string | Required | Timestamp of when alert record was created |
Response
Expects a 200 status code response with any string value.