github.com/Tri-stone/burrow@v0.25.0/protobuf/rpctransact.proto (about)

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