Skip to content

Commit

Permalink
api: v2alpha1 transaction service (#5933)
Browse files Browse the repository at this point in the history
Definition:
```
service TransactionService {
  rpc List(TransactionRequest) returns (TransactionList);
  rpc ParseTransaction(ParseTransactionRequest) returns (ParseTransactionResponse);
  rpc SubmitTransaction(SubmitTransactionRequest) returns (SubmitTransactionResponse);
  rpc EstimateGas(EstimateGasRequest) returns (EstimateGasResponse);
}
```


Stream will be implemented in separate PR
  • Loading branch information
kacpersaw committed May 23, 2024
1 parent 993e8fd commit c55700a
Show file tree
Hide file tree
Showing 10 changed files with 1,218 additions and 36 deletions.
42 changes: 22 additions & 20 deletions api/grpcserver/config.go
Original file line number Diff line number Diff line change
Expand Up @@ -28,37 +28,39 @@ type Config struct {
type Service = string

const (
Admin Service = "admin"
Debug Service = "debug"
GlobalState Service = "global"
Mesh Service = "mesh"
Transaction Service = "transaction"
Activation Service = "activation"
Smesher Service = "smesher"
Post Service = "post"
PostInfo Service = "postInfo"
Node Service = "node"
ActivationV2Alpha1 Service = "activation_v2alpha1"
ActivationStreamV2Alpha1 Service = "activation_stream_v2alpha1"
RewardV2Alpha1 Service = "reward_v2alpha1"
RewardStreamV2Alpha1 Service = "reward_stream_v2alpha1"
NetworkV2Alpha1 Service = "network_v2alpha1"
NodeV2Alpha1 Service = "node_v2alpha1"
LayerV2Alpha1 Service = "layer_v2alpha1"
LayerStreamV2Alpha1 Service = "layer_stream_v2alpha1"
Admin Service = "admin"
Debug Service = "debug"
GlobalState Service = "global"
Mesh Service = "mesh"
Transaction Service = "transaction"
Activation Service = "activation"
Smesher Service = "smesher"
Post Service = "post"
PostInfo Service = "postInfo"
Node Service = "node"
ActivationV2Alpha1 Service = "activation_v2alpha1"
ActivationStreamV2Alpha1 Service = "activation_stream_v2alpha1"
RewardV2Alpha1 Service = "reward_v2alpha1"
RewardStreamV2Alpha1 Service = "reward_stream_v2alpha1"
NetworkV2Alpha1 Service = "network_v2alpha1"
NodeV2Alpha1 Service = "node_v2alpha1"
LayerV2Alpha1 Service = "layer_v2alpha1"
LayerStreamV2Alpha1 Service = "layer_stream_v2alpha1"
TransactionV2Alpha1 Service = "transaction_v2alpha1"
TransactionStreamV2Alpha1 Service = "transaction_stream_v2alpha1"
)

// DefaultConfig defines the default configuration options for api.
func DefaultConfig() Config {
return Config{
PublicServices: []Service{
GlobalState, Mesh, Transaction, Node, Activation, ActivationV2Alpha1,
RewardV2Alpha1, NetworkV2Alpha1, NodeV2Alpha1, LayerV2Alpha1,
RewardV2Alpha1, NetworkV2Alpha1, NodeV2Alpha1, LayerV2Alpha1, TransactionV2Alpha1,
},
PublicListener: "0.0.0.0:9092",
PrivateServices: []Service{
Admin, Smesher, Debug, ActivationStreamV2Alpha1,
RewardStreamV2Alpha1, LayerStreamV2Alpha1,
RewardStreamV2Alpha1, LayerStreamV2Alpha1, TransactionStreamV2Alpha1,
},
PrivateListener: "127.0.0.1:9093",
PostServices: []Service{Post, PostInfo},
Expand Down

0 comments on commit c55700a

Please sign in to comment.