11syntax = "proto3" ;
2+ package capabilities.blockchain.solana.v1alpha ;
23
3- import "tools/generator/v1alpha/cre_metadata.proto" ;
44import "sdk/v1alpha/sdk.proto" ;
5+ import "tools/generator/v1alpha/cre_metadata.proto" ;
56import "values/v1/values.proto" ;
6- package capabilities.blockchain.solana.v1alpha ;
7-
87
98// Account/tx data encodings.
109enum EncodingType {
1110 ENCODING_TYPE_NONE = 0 ;
12- ENCODING_TYPE_BASE58 = 1 ; // for data <129 bytes
13- ENCODING_TYPE_BASE64 = 2 ; // any size
11+ ENCODING_TYPE_BASE58 = 1 ; // for data <129 bytes
12+ ENCODING_TYPE_BASE64 = 2 ; // any size
1413 ENCODING_TYPE_TYPE_BASE64_ZSTD = 3 ; // zstd-compressed, base64-wrapped
1514 ENCODING_TYPE_JSON_PARSED = 4 ; // program parsers; fallback to base64 if unknown
16- ENCODING_TYPE_JSON = 5 ; // raw JSON (rare; prefer JSON_PARSED)
15+ ENCODING_TYPE_JSON = 5 ; // raw JSON (rare; prefer JSON_PARSED)
1716}
1817
1918// Read consistency of queried state.
@@ -34,33 +33,33 @@ enum ConfirmationStatusType {
3433
3534// Transaction execution status returned by submitters/simulations.
3635enum TxStatus {
37- TX_STATUS_FATAL = 0 ; // unrecoverable failure
38- TX_STATUS_ABORTED = 1 ; // not executed / dropped
39- TX_STATUS_SUCCESS = 2 ; // executed successfully
36+ TX_STATUS_FATAL = 0 ; // unrecoverable failure
37+ TX_STATUS_ABORTED = 1 ; // not executed / dropped
38+ TX_STATUS_SUCCESS = 2 ; // executed successfully
4039}
4140
4241// On-chain account state.
4342message Account {
44- uint64 lamports = 1 ; // balance in lamports (1e-9 SOL)
45- bytes owner = 2 ; // 32-byte program id (Pubkey)
46- DataBytesOrJSON data = 3 ; // account data (encoded or JSON)
47- bool executable = 4 ; // true if this is a program account
48- values.v1.BigInt rent_epoch = 5 ; // next rent epoch
49- uint64 space = 6 ; // data length in bytes
43+ uint64 lamports = 1 ; // balance in lamports (1e-9 SOL)
44+ bytes owner = 2 ; // 32-byte program id (Pubkey)
45+ DataBytesOrJSON data = 3 ; // account data (encoded or JSON)
46+ bool executable = 4 ; // true if this is a program account
47+ values.v1.BigInt rent_epoch = 5 ; // next rent epoch
48+ uint64 space = 6 ; // data length in bytes
5049}
5150
5251// Compute budget configuration when submitting txs.
5352message ComputeConfig {
54- uint32 compute_limit = 1 ; // max CUs (approx per-tx limit)
55- uint64 compute_max_price = 2 ; // max lamports per CU
53+ uint32 compute_limit = 1 ; // max CUs (approx per-tx limit)
54+ uint64 compute_max_price = 2 ; // max lamports per CU
5655}
5756
5857// Raw bytes vs parsed JSON (as returned by RPC).
5958message DataBytesOrJSON {
6059 EncodingType encoding = 1 ;
6160 oneof body {
62- bytes raw = 2 ; // program data (node’s base64/base58 decoded)
63- bytes json = 3 ; // json: UTF-8 bytes of the jsonParsed payload.
61+ bytes raw = 2 ; // program data (node’s base64/base58 decoded)
62+ bytes json = 3 ; // json: UTF-8 bytes of the jsonParsed payload.
6463 }
6564}
6665
@@ -72,21 +71,21 @@ message DataSlice {
7271
7372// Options for GetAccountInfo.
7473message GetAccountInfoOpts {
75- EncodingType encoding = 1 ; // data encoding
76- CommitmentType commitment = 2 ; // read consistency
77- DataSlice data_slice = 3 ; // optional slice window
78- uint64 min_context_slot = 4 ; // lower bound slot
74+ EncodingType encoding = 1 ; // data encoding
75+ CommitmentType commitment = 2 ; // read consistency
76+ DataSlice data_slice = 3 ; // optional slice window
77+ uint64 min_context_slot = 4 ; // lower bound slot
7978}
8079
8180// Reply for GetAccountInfoWithOpts.
8281message GetAccountInfoWithOptsReply {
8382 RPCContext rpc_context = 1 ; // read slot
84- optional Account value = 2 ; // account (may be empty)
83+ optional Account value = 2 ; // account (may be empty)
8584}
8685
8786// Request for GetAccountInfoWithOpts.
8887message GetAccountInfoWithOptsRequest {
89- bytes account = 1 ; // 32-byte Pubkey
88+ bytes account = 1 ; // 32-byte Pubkey
9089 GetAccountInfoOpts opts = 2 ;
9190}
9291
@@ -97,27 +96,27 @@ message GetBalanceReply {
9796
9897// Request for GetBalance.
9998message GetBalanceRequest {
100- bytes addr = 1 ; // 32-byte Pubkey
101- CommitmentType commitment = 2 ; // read consistency
99+ bytes addr = 1 ; // 32-byte Pubkey
100+ CommitmentType commitment = 2 ; // read consistency
102101}
103102
104103// Options for GetBlock.
105104message GetBlockOpts {
106- CommitmentType commitment = 4 ; // read consistency
105+ CommitmentType commitment = 4 ; // read consistency
107106}
108107
109108// Block response.
110109message GetBlockReply {
111- bytes blockhash = 1 ; // 32-byte block hash
112- bytes previous_blockhash = 2 ; // 32-byte parent hash
110+ bytes blockhash = 1 ; // 32-byte block hash
111+ bytes previous_blockhash = 2 ; // 32-byte parent hash
113112 uint64 parent_slot = 3 ;
114- optional int64 block_time = 4 ; // unix seconds, node may not report it
115- uint64 block_height = 5 ; // chain height
113+ optional int64 block_time = 4 ; // unix seconds, node may not report it
114+ uint64 block_height = 5 ; // chain height
116115}
117116
118117// Request for GetBlock.
119118message GetBlockRequest {
120- uint64 slot = 1 ; // target slot
119+ uint64 slot = 1 ; // target slot
121120 GetBlockOpts opts = 2 ;
122121}
123122
@@ -127,8 +126,8 @@ message GetFeeForMessageReply {
127126}
128127
129128message GetFeeForMessageRequest {
130- string message = 1 ; // must be base58-encoded Message
131- CommitmentType commitment = 2 ; // read consistency
129+ string message = 1 ; // must be base58-encoded Message
130+ CommitmentType commitment = 2 ; // read consistency
132131}
133132
134133// Options for GetMultipleAccounts.
@@ -140,13 +139,13 @@ message GetMultipleAccountsOpts {
140139}
141140
142141message OptionalAccountWrapper {
143- optional Account account = 1 ;
142+ optional Account account = 1 ;
144143}
145144
146145// Reply for GetMultipleAccountsWithOpts.
147146message GetMultipleAccountsWithOptsReply {
148147 RPCContext rpc_context = 1 ; // read slot
149- repeated OptionalAccountWrapper value = 2 ; // accounts (nil entries allowed)
148+ repeated OptionalAccountWrapper value = 2 ; // accounts (nil entries allowed)
150149}
151150
152151// Request for GetMultipleAccountsWithOpts.
@@ -167,9 +166,9 @@ message GetSignatureStatusesRequest {
167166
168167// Per-signature status.
169168message GetSignatureStatusesResult {
170- uint64 slot = 1 ; // processed slot
171- optional uint64 confirmations = 2 ; // null->0 here
172- string err = 3 ; // error JSON string (empty on success)
169+ uint64 slot = 1 ; // processed slot
170+ optional uint64 confirmations = 2 ; // null->0 here
171+ string err = 3 ; // error JSON string (empty on success)
173172 ConfirmationStatusType confirmation_status = 4 ;
174173}
175174
@@ -184,15 +183,15 @@ message GetSlotHeightRequest {
184183
185184// Message header counts.
186185message MessageHeader {
187- uint32 num_required_signatures = 1 ; // signer count
188- uint32 num_readonly_signed_accounts = 2 ; // trailing signed RO
186+ uint32 num_required_signatures = 1 ; // signer count
187+ uint32 num_readonly_signed_accounts = 2 ; // trailing signed RO
189188 uint32 num_readonly_unsigned_accounts = 3 ; // trailing unsigned RO
190189}
191190
192191// Parsed message (no address tables).
193192message ParsedMessage {
194- bytes recent_blockhash = 1 ; // 32-byte Hash
195- repeated bytes account_keys = 2 ; // list of 32-byte Pubkeys
193+ bytes recent_blockhash = 1 ; // 32-byte Hash
194+ repeated bytes account_keys = 2 ; // list of 32-byte Pubkeys
196195 MessageHeader header = 3 ;
197196 repeated CompiledInstruction instructions = 4 ;
198197}
@@ -205,24 +204,24 @@ message ParsedTransaction {
205204
206205// Token amount (UI-friendly).
207206message UiTokenAmount {
208- string amount = 1 ; // raw integer string
209- uint32 decimals = 2 ; // mint decimals
207+ string amount = 1 ; // raw integer string
208+ uint32 decimals = 2 ; // mint decimals
210209 string ui_amount_string = 4 ; // amount / 10^decimals
211210}
212211
213212// SPL token balance entry.
214213message TokenBalance {
215- uint32 account_index = 1 ; // index in account_keys
216- optional bytes owner = 2 ; // 32-byte owner (optional)
217- optional bytes program_id = 3 ; // 32-byte token program (optional)
218- bytes mint = 4 ; // 32-byte mint
219- UiTokenAmount ui = 5 ; // formatted amounts
214+ uint32 account_index = 1 ; // index in account_keys
215+ optional bytes owner = 2 ; // 32-byte owner (optional)
216+ optional bytes program_id = 3 ; // 32-byte token program (optional)
217+ bytes mint = 4 ; // 32-byte mint
218+ UiTokenAmount ui = 5 ; // formatted amounts
220219}
221220
222221// Inner instruction list at a given outer instruction index.
223222message InnerInstruction {
224- uint32 index = 1 ; // outer ix index
225- repeated CompiledInstruction instructions = 2 ; // invoked ixs
223+ uint32 index = 1 ; // outer ix index
224+ repeated CompiledInstruction instructions = 2 ; // invoked ixs
226225}
227226
228227// Address table lookups expanded by loader.
@@ -235,51 +234,51 @@ message LoadedAddresses {
235234message CompiledInstruction {
236235 uint32 program_id_index = 1 ; // index into account_keys
237236 repeated uint32 accounts = 2 ; // indices into account_keys
238- bytes data = 3 ; // program input bytes
239- optional uint32 stack_height = 4 ; // if recorded by node
237+ bytes data = 3 ; // program input bytes
238+ optional uint32 stack_height = 4 ; // if recorded by node
240239}
241240
242241// Raw bytes with encoding tag.
243242message Data {
244- bytes content = 1 ; // raw bytes
243+ bytes content = 1 ; // raw bytes
245244 EncodingType encoding = 2 ; // how it was encoded originally
246245}
247246
248247// Program return data.
249248message ReturnData {
250249 bytes program_id = 1 ; // 32-byte Pubkey
251- Data data = 2 ; // raw return bytes
250+ Data data = 2 ; // raw return bytes
252251}
253252
254253// Transaction execution metadata.
255254message TransactionMeta {
256- string err_json = 1 ; // error JSON (empty on success)
257- uint64 fee = 2 ; // lamports
258- repeated uint64 pre_balances = 3 ; // lamports per account
259- repeated uint64 post_balances = 4 ; // lamports per account
260- repeated string log_messages = 5 ; // runtime logs
261- repeated TokenBalance pre_token_balances = 6 ;
255+ string err_json = 1 ; // error JSON (empty on success)
256+ uint64 fee = 2 ; // lamports
257+ repeated uint64 pre_balances = 3 ; // lamports per account
258+ repeated uint64 post_balances = 4 ; // lamports per account
259+ repeated string log_messages = 5 ; // runtime logs
260+ repeated TokenBalance pre_token_balances = 6 ;
262261 repeated TokenBalance post_token_balances = 7 ;
263262 repeated InnerInstruction inner_instructions = 8 ;
264263 LoadedAddresses loaded_addresses = 9 ;
265264 ReturnData return_data = 10 ;
266- optional uint64 compute_units_consumed = 11 ; // CUs
265+ optional uint64 compute_units_consumed = 11 ; // CUs
267266}
268267
269268// Transaction envelope: raw bytes or parsed struct.
270269message TransactionEnvelope {
271270 oneof transaction {
272- bytes raw = 1 ; // raw tx bytes (for RAW/base64)
271+ bytes raw = 1 ; // raw tx bytes (for RAW/base64)
273272 ParsedTransaction parsed = 2 ; // parsed tx (for JSON_PARSED)
274273 }
275274}
276275
277276// GetTransaction reply.
278277message GetTransactionReply {
279- uint64 slot = 1 ; // processed slot
280- optional int64 block_time = 2 ; // unix seconds
278+ uint64 slot = 1 ; // processed slot
279+ optional int64 block_time = 2 ; // unix seconds
281280 optional TransactionEnvelope transaction = 3 ; // tx bytes or parsed
282- optional TransactionMeta meta = 4 ; // may be omitted by node
281+ optional TransactionMeta meta = 4 ; // may be omitted by node
283282}
284283
285284// GetTransaction request.
@@ -294,52 +293,52 @@ message RPCContext {
294293
295294// Simulation options.
296295message SimulateTXOpts {
297- bool sig_verify = 1 ; // verify sigs
298- CommitmentType commitment = 2 ; // read consistency
299- bool replace_recent_blockhash = 3 ; // refresh blockhash
296+ bool sig_verify = 1 ; // verify sigs
297+ CommitmentType commitment = 2 ; // read consistency
298+ bool replace_recent_blockhash = 3 ; // refresh blockhash
300299 SimulateTransactionAccountsOpts accounts = 4 ; // return accounts
301300}
302301
303302// Simulation result.
304303message SimulateTXReply {
305- string err = 1 ; // empty on success
306- repeated string logs = 2 ; // runtime logs
307- repeated Account accounts = 3 ; // returned accounts
308- uint64 units_consumed = 4 ; // CUs
304+ string err = 1 ; // empty on success
305+ repeated string logs = 2 ; // runtime logs
306+ repeated Account accounts = 3 ; // returned accounts
307+ uint64 units_consumed = 4 ; // CUs
309308}
310309
311310// Simulation request.
312311message SimulateTXRequest {
313- bytes receiver = 1 ; // 32-byte program id (target)
312+ bytes receiver = 1 ; // 32-byte program id (target)
314313 string encoded_transaction = 2 ; // base64/base58 tx
315314 SimulateTXOpts opts = 3 ;
316315}
317316
318317// Accounts to return during simulation.
319318message SimulateTransactionAccountsOpts {
320- EncodingType encoding = 1 ; // account data encoding
319+ EncodingType encoding = 1 ; // account data encoding
321320 repeated bytes addresses = 2 ; // 32-byte Pubkeys
322321}
323322
324323message FilterLogTriggerRequest {
325- // TODO PLEX-1828
324+ // TODO PLEX-1828
326325}
327326
328327message Log {
329- // TODO PLEX-1828
328+ // TODO PLEX-1828
330329}
331330
332331// All metas are non-signers.
333332message AccountMeta {
334- bytes public_key = 1 ; // 32 bytes account public key
335- bool is_writable = 2 ; // write flag
333+ bytes public_key = 1 ; // 32 bytes account public key
334+ bool is_writable = 2 ; // write flag
336335}
337336
338337message WriteReportRequest {
339- repeated AccountMeta remaining_accounts = 1 ; // accounts that are required by the receiver to accept the report
340- bytes receiver = 2 ; // 32 bytes receiver
341- optional ComputeConfig compute_config = 3 ;
342- sdk.v1alpha.ReportResponse report = 4 ;
338+ repeated AccountMeta remaining_accounts = 1 ; // accounts that are required by the receiver to accept the report
339+ bytes receiver = 2 ; // 32 bytes receiver
340+ optional ComputeConfig compute_config = 3 ;
341+ sdk.v1alpha.ReportResponse report = 4 ;
343342}
344343
345344enum ReceiverContractExecutionStatus {
@@ -362,7 +361,7 @@ service Client {
362361 labels : {
363362 // from https://github.com/smartcontractkit/chain-selectors/blob/main/selectors.yml
364363 // as a subset of the selectors supported on the CRE
365- key : "ChainSelector" ,
364+ key : "ChainSelector"
366365 value : {
367366 uint64_label : {
368367 defaults : [
@@ -395,4 +394,3 @@ service Client {
395394 rpc LogTrigger (FilterLogTriggerRequest ) returns (stream Log );
396395 rpc WriteReport (WriteReportRequest ) returns (WriteReportReply );
397396}
398-
0 commit comments