Skip to content

Commit fdb811a

Browse files
authored
Merge pull request #418 from tronprotocol/develop
Release 4.1.2
2 parents 50a3dfb + 11d6a28 commit fdb811a

File tree

3 files changed

+70
-0
lines changed

3 files changed

+70
-0
lines changed

src/main/protos/api/api.proto

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -41,6 +41,28 @@ service Wallet {
4141
};
4242
};
4343

44+
45+
rpc GetAccountBalance (AccountBalanceRequest) returns (AccountBalanceResponse) {
46+
option (google.api.http) = {
47+
post: "/wallet/getaccountbalance"
48+
body: "*"
49+
additional_bindings {
50+
get: "/wallet/getaccountbalance"
51+
}
52+
};
53+
};
54+
55+
rpc GetBlockBalanceTrace (BlockBalanceTrace.BlockIdentifier) returns (BlockBalanceTrace) {
56+
option (google.api.http) = {
57+
post: "/wallet/getblockbalancetrace"
58+
body: "*"
59+
additional_bindings {
60+
get: "/wallet/getblockbalancetrace"
61+
}
62+
};
63+
};
64+
65+
4466
//Please use CreateTransaction2 instead of this function.
4567
rpc CreateTransaction (TransferContract) returns (Transaction) {
4668
option (google.api.http) = {

src/main/protos/core/Tron.proto

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -383,6 +383,7 @@ message TransactionInfo {
383383

384384
bytes orderId = 25;
385385
repeated MarketOrderDetail orderDetails = 26;
386+
int64 packingFee = 27;
386387
}
387388

388389
message TransactionRet {

src/main/protos/core/contract/balance_contract.proto

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -34,3 +34,50 @@ message TransferContract {
3434
bytes to_address = 2;
3535
int64 amount = 3;
3636
}
37+
38+
39+
message TransactionBalanceTrace {
40+
message Operation {
41+
int64 operation_identifier = 1;
42+
bytes address = 2;
43+
int64 amount = 3;
44+
}
45+
46+
bytes transaction_identifier = 1;
47+
repeated Operation operation = 2;
48+
string type = 3;
49+
string status = 4;
50+
}
51+
52+
53+
54+
message BlockBalanceTrace {
55+
message BlockIdentifier {
56+
bytes hash = 1;
57+
int64 number = 2;
58+
}
59+
60+
BlockIdentifier block_identifier = 1;
61+
int64 timestamp = 2;
62+
repeated TransactionBalanceTrace transaction_balance_trace = 3;
63+
// BlockIdentifier parent_block_identifier = 4;
64+
}
65+
66+
message AccountTrace {
67+
int64 balance = 1;
68+
int64 placeholder = 99;
69+
}
70+
71+
message AccountIdentifier {
72+
bytes address = 1;
73+
}
74+
75+
message AccountBalanceRequest {
76+
AccountIdentifier account_identifier = 1;
77+
BlockBalanceTrace.BlockIdentifier block_identifier = 2;
78+
}
79+
80+
message AccountBalanceResponse {
81+
int64 balance = 1;
82+
BlockBalanceTrace.BlockIdentifier block_identifier = 2;
83+
}

0 commit comments

Comments
 (0)