2020-10-01 01:55:22 +08:00
|
|
|
syntax = "proto3";
|
|
|
|
|
2020-10-15 18:04:10 -06:00
|
|
|
package solana.storage.ConfirmedBlock;
|
2020-10-01 01:55:22 +08:00
|
|
|
|
|
|
|
message ConfirmedBlock {
|
|
|
|
string previous_blockhash = 1;
|
|
|
|
string blockhash = 2;
|
|
|
|
uint64 parent_slot = 3;
|
|
|
|
repeated ConfirmedTransaction transactions = 4;
|
|
|
|
repeated Reward rewards = 5;
|
|
|
|
UnixTimestamp block_time = 6;
|
2021-05-26 22:16:16 -06:00
|
|
|
BlockHeight block_height = 7;
|
2020-10-01 01:55:22 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message ConfirmedTransaction {
|
|
|
|
Transaction transaction = 1;
|
|
|
|
TransactionStatusMeta meta = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Transaction {
|
|
|
|
repeated bytes signatures = 1;
|
|
|
|
Message message = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message Message {
|
|
|
|
MessageHeader header = 1;
|
|
|
|
repeated bytes account_keys = 2;
|
|
|
|
bytes recent_blockhash = 3;
|
|
|
|
repeated CompiledInstruction instructions = 4;
|
2022-01-14 15:24:41 +08:00
|
|
|
bool versioned = 5;
|
|
|
|
repeated MessageAddressTableLookup address_table_lookups = 6;
|
2020-10-01 01:55:22 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message MessageHeader {
|
|
|
|
uint32 num_required_signatures = 1;
|
|
|
|
uint32 num_readonly_signed_accounts = 2;
|
|
|
|
uint32 num_readonly_unsigned_accounts = 3;
|
|
|
|
}
|
|
|
|
|
2022-01-14 15:24:41 +08:00
|
|
|
message MessageAddressTableLookup {
|
|
|
|
bytes account_key = 1;
|
|
|
|
bytes writable_indexes = 2;
|
|
|
|
bytes readonly_indexes = 3;
|
|
|
|
}
|
|
|
|
|
2020-10-01 01:55:22 +08:00
|
|
|
message TransactionStatusMeta {
|
|
|
|
TransactionError err = 1;
|
|
|
|
uint64 fee = 2;
|
|
|
|
repeated uint64 pre_balances = 3;
|
|
|
|
repeated uint64 post_balances = 4;
|
|
|
|
repeated InnerInstructions inner_instructions = 5;
|
2021-12-02 10:35:53 -08:00
|
|
|
bool inner_instructions_none = 10;
|
2020-10-13 18:11:52 -06:00
|
|
|
repeated string log_messages = 6;
|
2021-12-02 10:35:53 -08:00
|
|
|
bool log_messages_none = 11;
|
2020-12-10 19:25:07 -08:00
|
|
|
repeated TokenBalance pre_token_balances = 7;
|
|
|
|
repeated TokenBalance post_token_balances = 8;
|
2021-05-26 14:43:15 -07:00
|
|
|
repeated Reward rewards = 9;
|
2022-01-14 15:24:41 +08:00
|
|
|
repeated bytes loaded_writable_addresses = 12;
|
|
|
|
repeated bytes loaded_readonly_addresses = 13;
|
2020-10-01 01:55:22 +08:00
|
|
|
}
|
|
|
|
|
|
|
|
message TransactionError {
|
|
|
|
bytes err = 1;
|
|
|
|
}
|
|
|
|
|
|
|
|
message InnerInstructions {
|
|
|
|
uint32 index = 1;
|
|
|
|
repeated CompiledInstruction instructions = 2;
|
|
|
|
}
|
|
|
|
|
|
|
|
message CompiledInstruction {
|
|
|
|
uint32 program_id_index = 1;
|
|
|
|
bytes accounts = 2;
|
|
|
|
bytes data = 3;
|
|
|
|
}
|
|
|
|
|
2020-12-10 19:25:07 -08:00
|
|
|
message TokenBalance {
|
|
|
|
uint32 account_index = 1;
|
|
|
|
string mint = 2;
|
|
|
|
UiTokenAmount ui_token_amount = 3;
|
2021-10-13 21:46:52 -06:00
|
|
|
string owner = 4;
|
2020-12-10 19:25:07 -08:00
|
|
|
}
|
|
|
|
|
|
|
|
message UiTokenAmount {
|
|
|
|
double ui_amount = 1;
|
|
|
|
uint32 decimals = 2;
|
|
|
|
string amount = 3;
|
2021-03-02 22:51:41 -07:00
|
|
|
string ui_amount_string = 4;
|
2020-12-10 19:25:07 -08:00
|
|
|
}
|
|
|
|
|
2020-10-09 12:55:35 -07:00
|
|
|
enum RewardType {
|
|
|
|
Unspecified = 0;
|
|
|
|
Fee = 1;
|
|
|
|
Rent = 2;
|
|
|
|
Staking = 3;
|
|
|
|
Voting = 4;
|
|
|
|
}
|
|
|
|
|
2020-10-01 01:55:22 +08:00
|
|
|
message Reward {
|
|
|
|
string pubkey = 1;
|
|
|
|
int64 lamports = 2;
|
2020-09-30 17:57:06 -06:00
|
|
|
uint64 post_balance = 3;
|
2020-10-09 12:55:35 -07:00
|
|
|
RewardType reward_type = 4;
|
2021-07-10 23:18:42 -07:00
|
|
|
string commission = 5;
|
2020-10-01 01:55:22 +08:00
|
|
|
}
|
|
|
|
|
2020-10-15 18:04:10 -06:00
|
|
|
message Rewards {
|
|
|
|
repeated Reward rewards = 1;
|
|
|
|
}
|
|
|
|
|
2020-10-01 01:55:22 +08:00
|
|
|
message UnixTimestamp {
|
|
|
|
int64 timestamp = 1;
|
|
|
|
}
|
2021-05-26 22:16:16 -06:00
|
|
|
|
|
|
|
message BlockHeight {
|
|
|
|
uint64 block_height = 1;
|
|
|
|
}
|