Skip to content

Commit

Permalink
Removed duplicated calls, added fields to request structs
Browse files Browse the repository at this point in the history
  • Loading branch information
AndriiDiachuk committed Jun 25, 2024
1 parent 2f2b5f5 commit 3f6dd96
Show file tree
Hide file tree
Showing 5 changed files with 304 additions and 406 deletions.
21 changes: 7 additions & 14 deletions protobuf/flow/access/access.proto
Original file line number Diff line number Diff line change
Expand Up @@ -97,8 +97,6 @@ service AccessAPI {
rpc GetAccountAtBlockHeight(GetAccountAtBlockHeightRequest)
returns (AccountResponse);

// GetAccountBalance gets an account balance by address.
rpc GetAccountBalance(GetAccountBalanceRequest) returns (AccountBalanceResponse);
// GetAccountBalanceAtLatestBlock gets an account balance by address from the latest sealed
// execution state.
rpc GetAccountBalanceAtLatestBlock(GetAccountBalanceAtLatestBlockRequest)
Expand All @@ -108,8 +106,6 @@ service AccessAPI {
rpc GetAccountBalanceAtBlockHeight(GetAccountBalanceAtBlockHeightRequest)
returns (AccountBalanceResponse);

// GetAccountKeys gets an account public keys by address.
rpc GetAccountKeys(GetAccountKeysRequest) returns (AccountKeysResponse);
// GetAccountKeysAtLatestBlock gets an account public keys by address from the latest sealed
// execution state.
rpc GetAccountKeysAtLatestBlock(GetAccountKeysAtLatestBlockRequest)
Expand Down Expand Up @@ -446,10 +442,6 @@ message GetAccountAtBlockHeightRequest {
uint64 block_height = 2;
}

message GetAccountBalanceRequest {
bytes address = 1;
}

message GetAccountBalanceAtLatestBlockRequest {
bytes address = 1;
}
Expand All @@ -460,16 +452,17 @@ message GetAccountBalanceAtBlockHeightRequest {
}

message AccountBalanceResponse {
uint64 account_balance = 1;
entities.Metadata metadata = 2;
}

message GetAccountKeysRequest {
bytes address = 1;
uint64 balance = 1;
uint64 available_balance = 2;
entities.Metadata metadata = 3;
}

message GetAccountKeysAtLatestBlockRequest {
// address of account
bytes address = 1;
// index of key to return
// omit to return all keys
entities.AccountKeyIndex index = 2;
}

message GetAccountKeysAtBlockHeightRequest {
Expand Down
4 changes: 4 additions & 0 deletions protobuf/flow/entities/account.proto
Original file line number Diff line number Diff line change
Expand Up @@ -22,3 +22,7 @@ message AccountKey {
uint32 sequence_number = 6;
bool revoked = 7;
}

message AccountKeyIndex {
uint32 value = 1;
}
Loading

0 comments on commit 3f6dd96

Please sign in to comment.