Skip to content

Commit 4cd0275

Browse files
authored
Merge pull request #1463 from onflow/leo/add-get-full-collection-by-id-api
add get full collection by id api
2 parents ddf481d + b47eadc commit 4cd0275

File tree

3 files changed

+343
-202
lines changed

3 files changed

+343
-202
lines changed

protobuf/flow/access/access.proto

Lines changed: 13 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -51,6 +51,8 @@ service AccessAPI {
5151

5252
// GetCollectionByID gets a collection by ID.
5353
rpc GetCollectionByID(GetCollectionByIDRequest) returns (CollectionResponse);
54+
// GetFullCollectionByID gets a collection by ID.
55+
rpc GetFullCollectionByID(GetFullCollectionByIDRequest) returns (FullCollectionResponse);
5456

5557
// Transactions
5658

@@ -189,7 +191,7 @@ service AccessAPI {
189191
// if the status is "sealed", only sealed blocks will be returned.
190192
rpc SubscribeBlocksFromLatest(SubscribeBlocksFromLatestRequest)
191193
returns (stream SubscribeBlocksResponse);
192-
194+
193195
// Subscribe block headers
194196

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

322+
message GetFullCollectionByIDRequest {
323+
bytes id = 1;
324+
}
325+
320326
message CollectionResponse {
321327
entities.Collection collection = 1;
322328
entities.Metadata metadata = 2;
323329
}
324330

331+
message FullCollectionResponse {
332+
repeated entities.Transaction transactions = 1;
333+
entities.Metadata metadata = 2;
334+
}
335+
325336
// Transactions
326337

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

0 commit comments

Comments
 (0)