Skip to main content

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

AttributeTypeRequirementNotes
recordCountnumberRequiredNumber of transactions in request
transactionsarray of TransactionRequiredList of transaction coin movements

Transaction

AttributeTypeRequirementNotes
txIdstringRequiredUnique identifier of transaction
fromAddressstringRequiredFrom Provenance Blockchain account of transaction
fromAddressBankUuidstringOptionalFrom bank account identifier of transaction if a registered Provenance Blockchain account
toAddressstringRequiredTo Provenance Blockchain account of transaction
toAddressBankUuidstringOptionalTo bank account identifier of transaction if a registered Provenance Blockchain account
blockHeightstringRequiredThe block height of transaction on Provenance Blockchain
timestampstring (timestamp)RequiredTimestamp of the transaction on Provenance Blockchain
amountstringRequiredQuantity of coin for transaction
denomstringRequiredThe marker denomination of coin for transaction
transactionTypeEnums.TransactionTypeRequiredMINT,TRANSFER,REDEEM, BURN Identifier of type of transaction

Enums

Transaction Type

AttributeDescription
MINTMint and withdraw to a registered bank account or DCC key pair address
TRANSFERGeneral transfer of USDF coin where the from and/or to address is a registered account or DCC key pair address
REDEEMTransfer of USDF from a registered account to DCC key pair address for redemption
BURNBurn 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

AttributeTypeRequirementNotes
requestUuidstringRequiredUnique identifier of the balance report request
recordCountnumberRequiredNumber of transactions in request
pagenumberRequiredPage number of balance report
totalPagesnumberRequiredTotal number of pages in this balance report
transactionsarray of TransactionRequiredList of transaction coin movements

Transaction

AttributeTypeRequirementNotes
uuidstringRequiredUnique identifier of transaction
addressstringRequiredProvenance Blockchain account of balance
amountstringRequiredAmount of coin
denomstringRequiredThe marker denomination of coin for this report
timestamp (timestamp)stringRequiredTimestamp 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

AttributeTypeRequirementNotes
uuidstringRequiredUnique identifier of alert record
alertLevelstringRequiredINFO,WARNING,ERROR,CRITICAL level of importance
messagestringRequiredAlert content
timestamp (timestamp)stringRequiredTimestamp of when alert record was created

Response

Expects a 200 status code response with any string value.