@@ -24,24 +24,18 @@ message Digest {
2424 bytes digest = 1 ;
2525}
2626
27- // Container for the BcsData and the name of the type
28- message Bcs {
29- // Name that identifies the type of the serialized value.
30- string name = 1 ;
31-
32- // The BCS-serialized data.
33- BcsData value = 2 ;
34- }
35-
3627// ============================================================================
3728// Object-related types
3829// ============================================================================
3930
40- // Object reference
41- message ObjectRef {
31+ // Reference to an object.
32+ message ObjectReference {
33+ // The object id of this object.
4234 Address object_id = 1 ;
43- uint64 version = 2 ;
44- Digest digest = 3 ;
35+ // The version of this object.
36+ optional uint64 version = 2 ;
37+ // The digest of this object.
38+ optional Digest digest = 3 ;
4539}
4640
4741// Owner types
@@ -60,58 +54,14 @@ message SharedOwner {
6054
6155message ImmutableOwner {}
6256
63- // ============================================================================
64- // Filter types (for events and queries)
65- // ============================================================================
66-
67- // Match all events (catch-all filter)
68- message AllFilter {
69- }
70-
71- // Filter by address (sender, package, etc.)
72- message AddressFilter {
73- Address address = 1 ;
74- }
75-
76- // Filter by transaction digest
77- message TransactionDigestFilter {
78- Digest tx_digest = 1 ;
79- }
80-
81- // Filter by Move module (package + module)
82- message MoveModuleFilter {
83- Address package_id = 1 ; // Package ID
84- string module = 2 ; // Module name
85- }
86-
87- // Filter by Move event type (package + module + event name)
88- message MoveEventTypeFilter {
89- Address package_id = 1 ; // Package ID
90- string module = 2 ; // Module name
91- string name = 3 ; // Event name
92- }
93-
94- // Filter by Move event module (package + module)
95- message MoveEventModuleFilter {
96- Address package_id = 1 ; // Package ID
97- string module = 2 ; // Module name
98- }
99-
100- // Filter by Move function (package + module + function)
101- message MoveFunctionFilter {
102- Address package_id = 1 ; // Package ID
103- optional string module = 2 ; // Module name (optional)
104- optional string function = 3 ; // Function name (optional)
105- }
106-
10757// ============================================================================
10858// Transaction-related types
10959// ============================================================================
11060
11161// Gas data for transactions
11262message GasData {
11363 // Payment objects
114- repeated ObjectRef payment = 1 ;
64+ repeated ObjectReference payment = 1 ;
11565 // Gas owner
11666 Address owner = 2 ;
11767 // Gas price
@@ -193,67 +143,3 @@ message ObjectCreated {
193143 uint64 version = 5 ;
194144 Digest digest = 6 ;
195145}
196-
197- // BalanceChange represents balance changes during transaction execution
198- message BalanceChange {
199- // Owner of the balance change
200- Owner owner = 1 ;
201- // Type of the Coin
202- string coin_type = 2 ;
203- // Amount as string to support i128 (can be negative)
204- // Format: decimal string representation of i128
205- string amount = 3 ;
206- }
207-
208- // ============================================================================
209- // Event-related types
210- // ============================================================================
211-
212- // Event represents a transaction event
213- message Event {
214- EventID event_id = 1 ;
215- Address package_id = 2 ;
216- string transaction_module = 3 ;
217- Address sender = 4 ;
218- string type_name = 5 ;
219- optional uint64 timestamp_ms = 6 ;
220- Bcs event_data = 7 ; // BCS-encoded event data, name should be the event type from type_name, or we remove type_name? (To discuss)
221- }
222-
223- // Event identifier
224- message EventID {
225- uint64 event_seq = 1 ;
226- Digest tx_digest = 2 ;
227- }
228-
229- // ============================================================================
230- // Coin-related types
231- // ============================================================================
232-
233- // Coin information for individual coin objects
234- message CoinInfo {
235- // Coin type as TypeTag string (e.g., "0x2::iota::IOTA")
236- string coin_type = 1 ;
237-
238- // Object reference (ID + version + digest)
239- ObjectRef object_ref = 2 ;
240-
241- // Balance value extracted for convenience (avoids BCS deserialization)
242- uint64 balance = 3 ;
243-
244- /// BCS-encoded iota_types::object::Object
245- Bcs object = 4 ;
246- }
247-
248- // Balance information aggregated across all coin objects of a type
249- message BalanceInfo {
250- // Coin type as TypeTag string (e.g., "0x2::iota::IOTA")
251- string coin_type = 1 ;
252-
253- // Number of coin objects owned (each returned by GetCoins)
254- uint64 coin_object_count = 2 ;
255-
256- // Total balance across all coin objects (as string to support u128)
257- // Sum of all individual coin balances for this coin type
258- string total_balance = 3 ;
259- }
0 commit comments