Skip to content

Commit

Permalink
Merge pull request #1463 from onflow/leo/add-get-full-collection-by-i…
Browse files Browse the repository at this point in the history
…d-api

add get full collection by id api
  • Loading branch information
zhangchiqing authored May 10, 2024
2 parents ddf481d + b47eadc commit 4cd0275
Show file tree
Hide file tree
Showing 3 changed files with 343 additions and 202 deletions.
15 changes: 13 additions & 2 deletions protobuf/flow/access/access.proto
Original file line number Diff line number Diff line change
Expand Up @@ -51,6 +51,8 @@ service AccessAPI {

// GetCollectionByID gets a collection by ID.
rpc GetCollectionByID(GetCollectionByIDRequest) returns (CollectionResponse);
// GetFullCollectionByID gets a collection by ID.
rpc GetFullCollectionByID(GetFullCollectionByIDRequest) returns (FullCollectionResponse);

// Transactions

Expand Down Expand Up @@ -189,7 +191,7 @@ service AccessAPI {
// if the status is "sealed", only sealed blocks will be returned.
rpc SubscribeBlocksFromLatest(SubscribeBlocksFromLatestRequest)
returns (stream SubscribeBlocksResponse);

// Subscribe block headers

// SubscribeBlockHeadersFromStartBlockID streams finalized or sealed block headers starting at the requested
Expand Down Expand Up @@ -317,11 +319,20 @@ message GetCollectionByIDRequest {
bytes id = 1;
}

message GetFullCollectionByIDRequest {
bytes id = 1;
}

message CollectionResponse {
entities.Collection collection = 1;
entities.Metadata metadata = 2;
}

message FullCollectionResponse {
repeated entities.Transaction transactions = 1;
entities.Metadata metadata = 2;
}

// Transactions

message SendTransactionRequest {
Expand Down Expand Up @@ -666,4 +677,4 @@ message SendAndSubscribeTransactionStatusesResponse {
TransactionResultResponse transaction_results = 1;
// The message index of the response message. Used by the client to ensure they received all messages. Starts from "0".
uint64 message_index = 2;
}
}
Loading

0 comments on commit 4cd0275

Please sign in to comment.