Skip to content

Latest commit

 

History

History
212 lines (157 loc) · 7.47 KB

File metadata and controls

212 lines (157 loc) · 7.47 KB

DPS API Documentation

Table of Contents

  1. Table of Contents
  2. Endpoints
  3. Types

Endpoints

Method Name Request Type Response Type
GetFirst GetFirstRequest GetFirstResponse
GetLast GetLastRequest GetLastResponse
GetHeight GetHeightRequest GetHeightResponse
GetCommit GetCommitRequest GetCommitResponse
GetHeader GetHeaderRequest GetHeaderResponse
GetEvents GetEventsRequest GetEventsResponse
GetTransaction GetTransactionRequest GetTransactionResponse
ListCollectionsForBlock ListCollectionsForBlockRequest ListCollectionsForBlockResponse
ListTransactionsForBlock ListTransactionsForBlockRequest ListTransactionsForBlockResponse
ListTransactionsForCollection ListTransactionsForCollectionRequest ListTransactionsForCollectionResponse
GetRegisters GetRegistersRequest GetRegistersResponse

Types

GetFirstRequest

For now, GetFirstRequest is empty.

GetFirstResponse

Field Type Label
height uint64

GetLastRequest

For now, GetLastRequest is empty.

GetLastResponse

Field Type Label
height uint64

GetHeightRequest

Field Type Label
blockID bytes

GetHeightResponse

Field Type Label
blockID bytes
height uint64

GetCommitRequest

Field Type Label
height uint64

GetCommitResponse

Field Type Label
height uint64
commit bytes

GetHeaderRequest

Field Type Label
height uint64

GetHeaderResponse

Field Type Label
height uint64
data bytes

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

Field Type Label
height uint64
types string repeated

GetEventsResponse

Field Type Label
height uint64
types string repeated
data bytes

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

Field Type Label
transactionID bytes

GetTransactionResponse

Field Type Label
transactionID bytes
data bytes

ListCollectionsForBlockRequest

Field Type Label
blockID bytes

ListCollectionsForBlockResponse

Field Type Label
blockID bytes
collectionIDs bytes repeated

ListTransactionsForBlockRequest

Field Type Label
blockID bytes

ListTransactionsForBlockResponse

Field Type Label
blockID bytes
transactionIDs bytes repeated

ListTransactionsForCollectionRequest

Field Type Label
collectionID bytes

ListTransactionsForCollectionResponse

Field Type Label
collectionID bytes
transactionIDs bytes repeated

GetRegistersRequest

Field Type Label
height uint64
paths bytes repeated

GetRegistersResponse

Field Type Label
height uint64
paths bytes repeated
values bytes repeated