This repository has been archived by the owner on May 13, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 344
/
Copy pathrpctransact.proto
78 lines (64 loc) · 3.83 KB
/
rpctransact.proto
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
syntax = 'proto3';
package rpctransact;
option go_package = "github.com/hyperledger/burrow/rpc/rpctransact";
import "gogoproto/gogo.proto";
import "google/protobuf/duration.proto";
import "exec.proto";
import "payload.proto";
import "txs.proto";
option (gogoproto.marshaler_all) = true;
option (gogoproto.unmarshaler_all) = true;
option (gogoproto.stable_marshaler_all) = true;
// Enable custom Size method (Required by Marshal and Unmarshal).
option (gogoproto.sizer_all) = true;
// Enable registration with golang/protobuf for the grpc-gateway.
option (gogoproto.goproto_registration) = true;
// Enable generation of XXX_MessageName methods for grpc-go/status.
option (gogoproto.messagename_all) = true;
// Transaction Service Definition
service Transact {
// Broadcast a transaction to the mempool - if the transaction is not signed signing will be attempted server-side
// and wait for it to be included in block
rpc BroadcastTxSync (TxEnvelopeParam) returns (exec.TxExecution);
// Broadcast a transaction to the mempool - if the transaction is not signed signing will be attempted server-side
rpc BroadcastTxAsync (TxEnvelopeParam) returns (txs.Receipt);
// Sign transaction server-side
rpc SignTx (TxEnvelopeParam) returns (TxEnvelope);
// Formulate a transaction from a Payload and retrun the envelop with the Tx bytes ready to sign
rpc FormulateTx (payload.Any) returns (TxEnvelope);
// Formulate and sign a CallTx transaction signed server-side and wait for it to be included in a block, retrieving response
rpc CallTxSync (payload.CallTx) returns (exec.TxExecution);
// Formulate and sign a CallTx transaction signed server-side
rpc CallTxAsync (payload.CallTx) returns (txs.Receipt);
// Perform a 'simulated' call of a contract against the current committed EVM state without any changes been saved
// and wait for the transaction to be included in a block
rpc CallTxSim (payload.CallTx) returns (exec.TxExecution);
// Perform a 'simulated' execution of provided code against the current committed EVM state without any changes been saved
rpc CallCodeSim (CallCodeParam) returns (exec.TxExecution);
// Formulate a SendTx transaction signed server-side and wait for it to be included in a block, retrieving response
rpc SendTxSync (payload.SendTx) returns (exec.TxExecution);
// Formulate and SendTx transaction signed server-side
rpc SendTxAsync (payload.SendTx) returns (txs.Receipt);
// Formulate a NameTx signed server-side and wait for it to be included in a block returning the registered name
rpc NameTxSync (payload.NameTx) returns (exec.TxExecution);
// Formulate a NameTx signed server-side
rpc NameTxAsync (payload.NameTx) returns (txs.Receipt);
}
message CallCodeParam {
bytes FromAddress = 1 [(gogoproto.customtype) = "github.com/hyperledger/burrow/crypto.Address", (gogoproto.nullable) = false];
bytes Code = 2;
bytes Data = 3;
}
message TxEnvelope {
txs.Envelope Envelope = 1 [(gogoproto.customtype) = "github.com/hyperledger/burrow/txs.Envelope"];
}
message TxEnvelopeParam {
// An existing Envelope - either signed or unsigned - if the latter will be signed server-side
txs.Envelope Envelope = 1 [(gogoproto.customtype) = "github.com/hyperledger/burrow/txs.Envelope"];
// If no Envelope provided then one will be generated from the provided payload and signed server-side
payload.Any Payload = 2;
// The amount of time to wait for the transaction to be committed and the TxExecution to be returned (server-side).
// If zero there wait is unbounded. Timed out transactions return SyncInfo state that may be helpful debugging
// non-committed transactions - this timeout must be less than client timeout to see such information!
google.protobuf.Duration Timeout = 3 [(gogoproto.nullable) = false, (gogoproto.stdduration) = true];
}