DPS API Documentation

September 21, 2021 ยท View on GitHub

Table of Contents

  1. Table of Contents
  2. Endpoints
  3. Types

Endpoints

Method NameRequest TypeResponse Type
GetFirstGetFirstRequestGetFirstResponse
GetLastGetLastRequestGetLastResponse
GetHeightGetHeightRequestGetHeightResponse
GetCommitGetCommitRequestGetCommitResponse
GetHeaderGetHeaderRequestGetHeaderResponse
GetEventsGetEventsRequestGetEventsResponse
GetTransactionGetTransactionRequestGetTransactionResponse
ListCollectionsForBlockListCollectionsForBlockRequestListCollectionsForBlockResponse
ListTransactionsForBlockListTransactionsForBlockRequestListTransactionsForBlockResponse
ListTransactionsForCollectionListTransactionsForCollectionRequestListTransactionsForCollectionResponse
GetRegistersGetRegistersRequestGetRegistersResponse

Types

GetFirstRequest

For now, GetFirstRequest is empty.

GetFirstResponse

FieldTypeLabel
heightuint64

GetLastRequest

For now, GetLastRequest is empty.

GetLastResponse

FieldTypeLabel
heightuint64

GetHeightRequest

FieldTypeLabel
blockIDbytes

GetHeightResponse

FieldTypeLabel
blockIDbytes
heightuint64

GetCommitRequest

FieldTypeLabel
heightuint64

GetCommitResponse

FieldTypeLabel
heightuint64
commitbytes

GetHeaderRequest

FieldTypeLabel
heightuint64

GetHeaderResponse

FieldTypeLabel
heightuint64
databytes

The data field contains a CBOR-encoded Flow header (flow.Header) as payload.

Here is an example of how to decode this field in a small Go program:

   var header flow.Header
   err := cbor.Unmarshal(response.Data, &header)
   if err != nil {
        return err
   }

GetEventsRequest

FieldTypeLabel
heightuint64
typesstringrepeated

GetEventsResponse

FieldTypeLabel
heightuint64
typesstringrepeated
databytes

The data field contains a CBOR-encoded slice of Flow events ([]flow.Event) as payload.

Here is an example of how to decode this field in a small Go program:

   var events []flow.Event
   err := cbor.Unmarshal(response.Data, &events)
   if err != nil {
        return err
   }

GetTransactionRequest

FieldTypeLabel
transactionIDbytes

GetTransactionResponse

FieldTypeLabel
transactionIDbytes
databytes

ListCollectionsForBlockRequest

FieldTypeLabel
blockIDbytes

ListCollectionsForBlockResponse

FieldTypeLabel
blockIDbytes
collectionIDsbytesrepeated

ListTransactionsForBlockRequest

FieldTypeLabel
blockIDbytes

ListTransactionsForBlockResponse

FieldTypeLabel
blockIDbytes
transactionIDsbytesrepeated

ListTransactionsForCollectionRequest

FieldTypeLabel
collectionIDbytes

ListTransactionsForCollectionResponse

FieldTypeLabel
collectionIDbytes
transactionIDsbytesrepeated

GetRegistersRequest

FieldTypeLabel
heightuint64
pathsbytesrepeated

GetRegistersResponse

FieldTypeLabel
heightuint64
pathsbytesrepeated
valuesbytesrepeated