DPS API Documentation
September 21, 2021 ยท View on GitHub
Table of Contents
- Table of Contents
- Endpoints
- Types
- GetFirstRequest
- GetFirstResponse
- GetLastRequest
- GetLastResponse
- GetHeightRequest
- GetHeightResponse
- GetCommitRequest
- GetCommitResponse
- GetHeaderRequest
- GetHeaderResponse
- GetEventsRequest
- GetEventsResponse
- GetTransactionRequest
- GetTransactionResponse
- ListCollectionsForBlockRequest
- ListCollectionsForBlockResponse
- ListTransactionsForBlockRequest
- ListTransactionsForBlockResponse
- ListTransactionsForCollectionRequest
- ListTransactionsForCollectionResponse
- GetRegistersRequest
- GetRegistersResponse
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 |