1
+ // Copyright (c) 2025 IOTA Stiftung
2
+ // SPDX-License-Identifier: Apache-2.0
3
+
4
+ syntax = "proto3" ;
5
+
6
+ package iota.grpc.node ;
7
+
8
+ import "common.proto" ;
9
+
10
+ service NodeService {
11
+ rpc ExecuteTransaction (ExecuteTransactionRequest ) returns (ExecuteTransactionResponse );
12
+ rpc GetObject (GetObjectRequest ) returns (GetObjectResponse );
13
+ }
14
+
15
+ // ExecuteTransaction
16
+ message ExecuteTransactionRequest {
17
+ // BCS serialized transaction data bytes
18
+ bytes tx_bytes = 1 ;
19
+ // List of signatures
20
+ repeated bytes signatures = 2 ;
21
+ // Options for specifying the content to be returned
22
+ optional TransactionResponseOptions options = 3 ;
23
+ // The request type
24
+ optional ExecuteTransactionRequestType request_type = 4 ;
25
+ }
26
+
27
+ message TransactionResponseOptions {
28
+ bool show_input = 1 ;
29
+ bool show_raw_input = 2 ;
30
+ bool show_effects = 3 ;
31
+ bool show_events = 4 ;
32
+ bool show_object_changes = 5 ;
33
+ bool show_balance_changes = 6 ;
34
+ bool show_raw_effects = 7 ;
35
+ }
36
+
37
+ enum ExecuteTransactionRequestType {
38
+ WAIT_FOR_EFFECTS_CERT = 0 ;
39
+ WAIT_FOR_LOCAL_EXECUTION = 1 ;
40
+ }
41
+
42
+ message ExecuteTransactionResponse {
43
+ // Transaction digest
44
+ iota.grpc.common.Digest digest = 1 ;
45
+ // Transaction data (if show_input or show_raw_input is true)
46
+ optional iota.grpc.common.BcsData transaction = 2 ;
47
+ // Raw transaction bytes (if show_raw_input is true)
48
+ optional bytes raw_transaction = 3 ;
49
+ // Transaction effects (if show_effects is true)
50
+ optional iota.grpc.common.BcsData effects = 4 ;
51
+ // Events (if show_events is true)
52
+ repeated iota.grpc.common.BcsData events = 5 ;
53
+ // Object changes (if show_object_changes is true)
54
+ repeated iota.grpc.common.BcsData object_changes = 6 ;
55
+ // Balance changes (if show_balance_changes is true)
56
+ repeated iota.grpc.common.BcsData balance_changes = 7 ;
57
+ // Timestamp when transaction was executed
58
+ optional uint64 timestamp_ms = 8 ;
59
+ // Whether the transaction was confirmed locally
60
+ optional bool confirmed_local_execution = 9 ;
61
+ // Checkpoint sequence number (if available)
62
+ optional uint64 checkpoint = 10 ;
63
+ // Error messages (if any)
64
+ repeated string errors = 11 ;
65
+ // Raw effects (if show_raw_effects is true)
66
+ optional bytes raw_effects = 12 ;
67
+ }
68
+
69
+ // GetObject - corresponds to REST API GetObject
70
+ message GetObjectRequest {
71
+ // Object ID to retrieve
72
+ iota.grpc.common.Address object_id = 1 ;
73
+ // Options for specifying the content to be returned
74
+ optional ObjectDataOptions options = 2 ;
75
+ }
76
+
77
+ message ObjectDataOptions {
78
+ bool show_type = 1 ;
79
+ bool show_owner = 2 ;
80
+ bool show_previous_transaction = 3 ;
81
+ bool show_display = 4 ;
82
+ bool show_content = 5 ;
83
+ bool show_bcs = 6 ;
84
+ bool show_storage_rebate = 7 ;
85
+ }
86
+
87
+ message GetObjectResponse {
88
+ // Object data (if exists)
89
+ optional ObjectData data = 1 ;
90
+ // Error (if object doesn't exist or other error)
91
+ optional ObjectError error = 2 ;
92
+ }
93
+
94
+ message ObjectData {
95
+ // Object ID
96
+ iota.grpc.common.Address object_id = 1 ;
97
+ // Object version
98
+ uint64 version = 2 ;
99
+ // Object digest
100
+ iota.grpc.common.Digest digest = 3 ;
101
+ // Object type (if show_type is true)
102
+ optional string type = 4 ;
103
+ // Object owner (if show_owner is true)
104
+ optional string owner = 5 ;
105
+ // Previous transaction digest (if show_previous_transaction is true)
106
+ optional iota.grpc.common.Digest previous_transaction = 6 ;
107
+ // Storage rebate (if show_storage_rebate is true)
108
+ optional uint64 storage_rebate = 7 ;
109
+ // Display fields (if show_display is true)
110
+ optional iota.grpc.common.BcsData display = 8 ;
111
+ // Parsed content data (if show_content is true)
112
+ optional iota.grpc.common.BcsData content = 9 ;
113
+ // BCS raw data (if show_bcs is true)
114
+ optional iota.grpc.common.BcsData bcs = 10 ;
115
+ }
116
+
117
+ message ObjectError {
118
+ // Error type (e.g., "NotExists")
119
+ string error_type = 1 ;
120
+ // Object ID that caused the error
121
+ iota.grpc.common.Address object_id = 2 ;
122
+ }
0 commit comments