diff --git a/.github/workflows/push.yml b/.github/workflows/push.yml index 5290005e..1ef67edc 100644 --- a/.github/workflows/push.yml +++ b/.github/workflows/push.yml @@ -21,6 +21,8 @@ jobs: run: | # TODO Implement test for all packages go test -v ./core/taskengine + go test -v ./core/taskengine/trigger + go test -v ./core/taskengine/macros go test -v ./pkg/timekeeper publish-dev-build: diff --git a/aggregator/repl.go b/aggregator/repl.go index b24d5588..81b4fc89 100644 --- a/aggregator/repl.go +++ b/aggregator/repl.go @@ -137,6 +137,10 @@ func handleConnection(agg *Aggregator, conn net.Conn) { case "exit": fmt.Fprintln(conn, "Exiting...") return + case "trigger": + fmt.Fprintln(conn, "about to trigger on server") + //agg.engine.TriggerWith + default: fmt.Fprintln(conn, "Unknown command:", command) } diff --git a/aggregator/rpc_server.go b/aggregator/rpc_server.go index 04fca889..ce8c3150 100644 --- a/aggregator/rpc_server.go +++ b/aggregator/rpc_server.go @@ -29,6 +29,8 @@ import ( // RpcServer is our grpc sever struct hold the entry point of request handler type RpcServer struct { avsproto.UnimplementedAggregatorServer + avsproto.UnimplementedNodeServer + config *config.Config cache *bigcache.BigCache db storage.Storage @@ -191,23 +193,30 @@ func (r *RpcServer) GetTask(ctx context.Context, payload *avsproto.IdReq) (*avsp } // Operator action -func (r *RpcServer) SyncTasks(payload *avsproto.SyncTasksReq, srv avsproto.Aggregator_SyncTasksServer) error { +func (r *RpcServer) SyncMessages(payload *avsproto.SyncMessagesReq, srv avsproto.Node_SyncMessagesServer) error { err := r.engine.StreamCheckToOperator(payload, srv) return err } // Operator action -func (r *RpcServer) UpdateChecks(ctx context.Context, payload *avsproto.UpdateChecksReq) (*avsproto.UpdateChecksResp, error) { - if err := r.engine.AggregateChecksResult(payload.Address, payload.Id); err != nil { +func (r *RpcServer) NotifyTriggers(ctx context.Context, payload *avsproto.NotifyTriggersReq) (*avsproto.NotifyTriggersResp, error) { + if err := r.engine.AggregateChecksResult(payload.Address, payload); err != nil { return nil, err } - return &avsproto.UpdateChecksResp{ + return &avsproto.NotifyTriggersResp{ UpdatedAt: timestamppb.Now(), }, nil } +// Operator action +func (r *RpcServer) Ack(ctx context.Context, payload *avsproto.AckMessageReq) (*wrapperspb.BoolValue, error) { + // TODO: Implement ACK before merge + + return wrapperspb.Bool(true), nil +} + // startRpcServer initializes and establish a tcp socket on given address from // config file func (agg *Aggregator) startRpcServer(ctx context.Context) error { @@ -231,7 +240,7 @@ func (agg *Aggregator) startRpcServer(ctx context.Context) error { panic(err) } - avsproto.RegisterAggregatorServer(s, &RpcServer{ + rpcServer := &RpcServer{ cache: agg.cache, db: agg.db, engine: agg.engine, @@ -241,7 +250,11 @@ func (agg *Aggregator) startRpcServer(ctx context.Context) error { config: agg.config, operatorPool: agg.operatorPool, - }) + } + + // TODO: split node and aggregator + avsproto.RegisterAggregatorServer(s, rpcServer) + avsproto.RegisterNodeServer(s, rpcServer) // Register reflection service on gRPC server. // This allow clien to discover url endpoint diff --git a/aggregator/task_engine.go b/aggregator/task_engine.go index 3042b67e..5cda0f29 100644 --- a/aggregator/task_engine.go +++ b/aggregator/task_engine.go @@ -23,9 +23,13 @@ func (agg *Aggregator) startTaskEngine(ctx context.Context) { Prefix: "default", }) agg.worker = apqueue.NewWorker(agg.queue, agg.db) + taskExecutor := taskengine.NewExecutor(agg.db, agg.logger) + taskengine.SetMacro(agg.config.Macros) + taskengine.SetCache(agg.cache) + agg.worker.RegisterProcessor( - "contract_run", - taskengine.NewProcessor(agg.db, agg.config.SmartWallet, agg.logger), + taskengine.ExecuteTask, + taskExecutor, ) agg.engine = taskengine.New( diff --git a/core/apqueue/worker.go b/core/apqueue/worker.go index beb548f9..306c8387 100644 --- a/core/apqueue/worker.go +++ b/core/apqueue/worker.go @@ -53,15 +53,15 @@ func (w *Worker) loop() { } else { w.logger.Info("unsupported job", "job", string(job.Data)) } - w.logger.Info("decoded job", "jobid", jid, "jobdata", string(job.Data)) + w.logger.Info("decoded job", "jobid", jid, "jobName", job.Name, "jobdata", string(job.Data)) if err == nil { w.q.markJobDone(job, jobComplete) - w.logger.Info("succesfully perform job", "jobid", jid) + w.logger.Info("succesfully perform job", "jobid", jid, "task_id", job.Name) } else { // TODO: move to a retry queue depend on what kind of error w.q.markJobDone(job, jobFailed) - w.logger.Info("failed to perform job", "jobid", jid) + w.logger.Errorf("failed to perform job %w", err, "jobid", jid, "task_id", job.Name) } case <-w.q.closeCh: // loop was stopped return diff --git a/core/config/config.go b/core/config/config.go index db52b095..2de7f360 100644 --- a/core/config/config.go +++ b/core/config/config.go @@ -48,6 +48,8 @@ type Config struct { SocketPath string Environment sdklogging.LogLevel + + Macros map[string]string } type SmartWalletConfig struct { @@ -85,6 +87,8 @@ type ConfigRaw struct { } `yaml:"smart_wallet"` SocketPath string `yaml:"socket_path"` + + Macros map[string]string `yaml:"macros"` } // These are read from CredibleSquaringDeploymentFileFlag @@ -188,6 +192,7 @@ func NewConfig(configFilePath string) (*Config, error) { }, SocketPath: configRaw.SocketPath, + Macros: configRaw.Macros, } if config.SocketPath == "" { diff --git a/core/taskengine/cron_trigger.go b/core/taskengine/cron_trigger.go deleted file mode 100644 index 4566ba7c..00000000 --- a/core/taskengine/cron_trigger.go +++ /dev/null @@ -1 +0,0 @@ -package taskengine diff --git a/core/taskengine/engine.go b/core/taskengine/engine.go index dbc6c599..7733f9c4 100644 --- a/core/taskengine/engine.go +++ b/core/taskengine/engine.go @@ -16,34 +16,87 @@ import ( "github.com/AvaProtocol/ap-avs/model" "github.com/AvaProtocol/ap-avs/storage" sdklogging "github.com/Layr-Labs/eigensdk-go/logging" + "github.com/allegro/bigcache/v3" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/common/math" "github.com/ethereum/go-ethereum/ethclient" "google.golang.org/grpc/codes" "google.golang.org/grpc/status" grpcstatus "google.golang.org/grpc/status" + "google.golang.org/protobuf/encoding/protojson" avsproto "github.com/AvaProtocol/ap-avs/protobuf" ) +const ( + ExecuteTask = "execute_task" +) + var ( rpcConn *ethclient.Client // websocket client used for subscription wsEthClient *ethclient.Client wsRpcURL string logger sdklogging.Logger + + // a global variable that we expose to our tasks. User can use `{{name}}` to access them + // These macro are define in our aggregator yaml config file under `macros` + macroEnvs map[string]string + cache *bigcache.BigCache ) +// Set a global logger for task engine func SetLogger(mylogger sdklogging.Logger) { logger = mylogger } +// Set the global macro system. macros are static, immutable and available to all tasks at runtime +func SetMacro(v map[string]string) { + macroEnvs = v +} + +func SetCache(c *bigcache.BigCache) { + cache = c +} + +// Initialize a shared rpc client instance +func SetRpc(rpcURL string) { + if conn, err := ethclient.Dial(rpcURL); err == nil { + rpcConn = conn + } else { + panic(err) + } +} + +// Initialize a shared websocket rpc client instance +func SetWsRpc(rpcURL string) { + wsRpcURL = rpcURL + if err := retryWsRpc(); err != nil { + panic(err) + } +} + +func retryWsRpc() error { + for { + conn, err := ethclient.Dial(wsRpcURL) + if err == nil { + wsEthClient = conn + return nil + } + logger.Errorf("cannot establish websocket client for RPC, retry in 15 seconds", "err", err) + time.Sleep(15 * time.Second) + } + + return nil +} + type operatorState struct { // list of task id that we had synced to this operator TaskID map[string]bool MonotonicClock int64 } +// The core datastructure of the task engine type Engine struct { db storage.Storage queue *apqueue.Queue @@ -66,31 +119,7 @@ type Engine struct { logger sdklogging.Logger } -func SetRpc(rpcURL string) { - if conn, err := ethclient.Dial(rpcURL); err == nil { - rpcConn = conn - } else { - panic(err) - } -} - -func SetWsRpc(rpcURL string) { - wsRpcURL = rpcURL - if err := retryWsRpc(); err != nil { - panic(err) - } -} - -func retryWsRpc() error { - conn, err := ethclient.Dial(wsRpcURL) - if err == nil { - wsEthClient = conn - return nil - } - - return err -} - +// create a new task engine using given storage, config and queueu func New(db storage.Storage, config *config.Config, queue *apqueue.Queue, logger sdklogging.Logger) *Engine { e := Engine{ db: db, @@ -129,9 +158,12 @@ func (n *Engine) MustStart() { panic(e) } for _, item := range kvs { - var task model.Task - if err := json.Unmarshal(item.Value, &task); err == nil { - n.tasks[string(item.Key)] = &task + task := &model.Task{ + Task: &avsproto.Task{}, + } + err := protojson.Unmarshal(item.Value, task) + if err == nil { + n.tasks[string(item.Key)] = task } } } @@ -254,7 +286,7 @@ func (n *Engine) CreateTask(user *model.User, taskPayload *avsproto.CreateTaskRe return task, nil } -func (n *Engine) StreamCheckToOperator(payload *avsproto.SyncTasksReq, srv avsproto.Aggregator_SyncTasksServer) error { +func (n *Engine) StreamCheckToOperator(payload *avsproto.SyncMessagesReq, srv avsproto.Node_SyncMessagesServer) error { ticker := time.NewTicker(5 * time.Second) address := payload.Address @@ -297,15 +329,23 @@ func (n *Engine) StreamCheckToOperator(payload *avsproto.SyncTasksReq, srv avspr continue } - n.logger.Info("stream check to operator", "taskID", task.Id, "operator", payload.Address) - resp := avsproto.SyncTasksResp{ - Id: task.Id, - CheckType: "CheckTrigger", - Trigger: task.Trigger, + resp := avsproto.SyncMessagesResp{ + Id: task.Id, + Op: avsproto.MessageOp_MonitorTaskTrigger, + + TaskMetadata: &avsproto.SyncMessagesResp_TaskMetadata{ + TaskId: task.Id, + Remain: task.MaxExecution, + ExpiredAt: task.ExpiredAt, + Trigger: task.Trigger, + }, } + n.logger.Info("stream check to operator", "taskID", task.Id, "operator", payload.Address, "resp", resp) if err := srv.Send(&resp); err != nil { - return err + // return error to cause client to establish re-connect the connection + n.logger.Info("error sending check to operator", "taskID", task.Id, "operator", payload.Address) + return fmt.Errorf("cannot send data back to grpc channel") } n.lock.Lock() @@ -317,35 +357,29 @@ func (n *Engine) StreamCheckToOperator(payload *avsproto.SyncTasksReq, srv avspr } // TODO: Merge and verify from multiple operators -func (n *Engine) AggregateChecksResult(address string, ids []string) error { - if len(ids) < 1 { +func (n *Engine) AggregateChecksResult(address string, payload *avsproto.NotifyTriggersReq) error { + if len(payload.TaskId) < 1 { return nil } - n.logger.Debug("process aggregator check hits", "operator", address, "task_ids", ids) - for _, id := range ids { - n.lock.Lock() - delete(n.tasks, id) - delete(n.trackSyncedTasks[address].TaskID, id) - n.logger.Info("processed aggregator check hit", "operator", address, "id", id) - n.lock.Unlock() - } + n.lock.Lock() + // delete(n.tasks, payload.TaskId) + // delete(n.trackSyncedTasks[address].TaskID, payload.TaskId) + // uncomment later - // Now we will queue the job - for _, id := range ids { - n.logger.Debug("mark task in executing status", "task_id", id) + n.logger.Info("processed aggregator check hit", "operator", address, "task_id", payload.TaskId) + n.lock.Unlock() - if err := n.db.Move( - []byte(TaskStorageKey(id, avsproto.TaskStatus_Active)), - []byte(TaskStorageKey(id, avsproto.TaskStatus_Executing)), - ); err != nil { - n.logger.Error("error moving the task storage from active to executing", "task", id, "error", err) - } - - n.queue.Enqueue("contract_run", id, []byte(id)) - n.logger.Info("enqueue contract_run job", "taskid", id) + data, err := json.Marshal(payload.TriggerMarker) + if err != nil { + n.logger.Error("error serialize trigger to json", err) + return err } + n.queue.Enqueue(ExecuteTask, payload.TaskId, data) + n.logger.Info("enqueue task into the queue system", "task_id", payload.TaskId) + + // if the task can still run, add it back return nil } @@ -455,7 +489,6 @@ func (n *Engine) CancelTaskByUser(user *model.User, taskID string) (bool, error) updates := map[string][]byte{} oldStatus := task.Status task.SetCanceled() - fmt.Println("found task", task, string(TaskStorageKey(task.Id, oldStatus)), string(TaskUserKey(task))) updates[string(TaskStorageKey(task.Id, oldStatus))], err = task.ToJSON() updates[string(TaskUserKey(task))] = []byte(fmt.Sprintf("%d", task.Status)) diff --git a/core/taskengine/listener.go b/core/taskengine/listener.go deleted file mode 100644 index 7b320d9d..00000000 --- a/core/taskengine/listener.go +++ /dev/null @@ -1,45 +0,0 @@ -package taskengine - -import ( - "context" - "time" - - "github.com/ethereum/go-ethereum/core/types" -) - -type OnblockFunc func(*types.Block) error - -func RegisterBlockListener(ctx context.Context, fn OnblockFunc) error { - headers := make(chan *types.Header) - sub, err := wsEthClient.SubscribeNewHead(ctx, headers) - if err != nil { - return err - } - - for { - select { - case <-ctx.Done(): - return nil - case err := <-sub.Err(): - // TODO: look into error and consider re-connect or wait - logger.Errorf("error when fetching new block from websocket, retry in 15 seconds", "err", err) - time.Sleep(15 * time.Second) - retryWsRpc() - sub, err = wsEthClient.SubscribeNewHead(ctx, headers) - if err != nil { - logger.Errorf("fail to subscribe to rpc for new block", "err", err) - } - case header := <-headers: - logger.Info("detect new block, evaluate checks", "component", "taskengine", "block", header.Hash().Hex()) - - block, err := wsEthClient.BlockByHash(context.Background(), header.Hash()) - if err != nil { - logger.Errorf("error when fetching new block from websocket", "err", err) - // TODO: report error in metric - // The operator will skip run this time - } else { - fn(block) - } - } - } -} diff --git a/core/taskengine/abi_const.go b/core/taskengine/macros/abi_const.go similarity index 83% rename from core/taskengine/abi_const.go rename to core/taskengine/macros/abi_const.go index a148f16f..499d6e84 100644 --- a/core/taskengine/abi_const.go +++ b/core/taskengine/macros/abi_const.go @@ -1,4 +1,4 @@ -package taskengine +package macros import _ "embed" diff --git a/core/taskengine/abis/chainlink/eac_aggregator_proxy.json b/core/taskengine/macros/abis/chainlink/eac_aggregator_proxy.json similarity index 100% rename from core/taskengine/abis/chainlink/eac_aggregator_proxy.json rename to core/taskengine/macros/abis/chainlink/eac_aggregator_proxy.json diff --git a/core/taskengine/contract_trigger.go b/core/taskengine/macros/contract.go similarity index 92% rename from core/taskengine/contract_trigger.go rename to core/taskengine/macros/contract.go index add7588e..c68f14a0 100644 --- a/core/taskengine/contract_trigger.go +++ b/core/taskengine/macros/contract.go @@ -1,4 +1,4 @@ -package taskengine +package macros import ( "context" @@ -23,7 +23,6 @@ func QueryContractRaw( Data: data, } - //log.Println("msg to send to contract", common.Bytes2Hex(data)) return client.CallContract(ctx, msg, nil) } diff --git a/core/taskengine/contract_trigger_test.go b/core/taskengine/macros/contract_test.go similarity index 99% rename from core/taskengine/contract_trigger_test.go rename to core/taskengine/macros/contract_test.go index 50ae6343..1cf8d333 100644 --- a/core/taskengine/contract_trigger_test.go +++ b/core/taskengine/macros/contract_test.go @@ -1,4 +1,4 @@ -package taskengine +package macros import ( "math/big" diff --git a/core/taskengine/expression_trigger.go b/core/taskengine/macros/exp.go similarity index 77% rename from core/taskengine/expression_trigger.go rename to core/taskengine/macros/exp.go index 78ffea77..55e32ea2 100644 --- a/core/taskengine/expression_trigger.go +++ b/core/taskengine/macros/exp.go @@ -1,26 +1,37 @@ -package taskengine +package macros import ( "context" "fmt" - "log" "math/big" "strings" "github.com/ethereum/go-ethereum/accounts/abi" "github.com/ethereum/go-ethereum/common" ethmath "github.com/ethereum/go-ethereum/common/math" + "github.com/ethereum/go-ethereum/ethclient" "github.com/expr-lang/expr" "github.com/expr-lang/expr/vm" ) +var ( + rpcConn *ethclient.Client +) + +func SetRpc(rpcURL string) { + if conn, err := ethclient.Dial(rpcURL); err == nil { + rpcConn = conn + } else { + panic(err) + } +} + // A generic function to query any contract. The method andcontractABI is // necessary so we can unpack the result func readContractData(contractAddress string, data string, method string, contractABI string) []any { parsedABI, err := abi.JSON(strings.NewReader(contractABI)) if err != nil { - log.Println("read contract data parse abi error", err) return nil } @@ -31,14 +42,12 @@ func readContractData(contractAddress string, data string, method string, contra common.HexToAddress(contractAddress), common.FromHex(data)) if err != nil { - log.Println("read contract data error", err) return nil } // Unpack the output result, err := parsedABI.Unpack(method, output) if err != nil { - log.Println("unpack contract result error", err) return nil } @@ -84,11 +93,19 @@ func chainlinkLatestAnswer(tokenPair string) *big.Int { return output[0].(*big.Int) } -func bigCmp(a *big.Int, b *big.Int) (r int) { +func BigCmp(a *big.Int, b *big.Int) (r int) { return a.Cmp(b) } -func parseUnit(val string, decimal uint) *big.Int { +func BigGt(a *big.Int, b *big.Int) bool { + return a.Cmp(b) > 0 +} + +func BigLt(a *big.Int, b *big.Int) bool { + return a.Cmp(b) < 0 +} + +func ParseUnit(val string, decimal uint) *big.Int { b, ok := ethmath.ParseBig256(val) if !ok { panic(fmt.Errorf("Parse error: %s", val)) @@ -98,7 +115,7 @@ func parseUnit(val string, decimal uint) *big.Int { return r.Div(b, big.NewInt(int64(decimal))) } -func toBigInt(val string) *big.Int { +func ToBigInt(val string) *big.Int { // parse either string or hex b, ok := ethmath.ParseBig256(val) if !ok { @@ -113,14 +130,31 @@ var ( "readContractData": readContractData, "priceChainlink": chainlinkLatestAnswer, + "chainlinkPrice": chainlinkLatestAnswer, "latestRoundDataChainlink": chainlinkLatestRoundData, - "bigCmp": bigCmp, - "parseUnit": parseUnit, - "toBigInt": toBigInt, + "bigCmp": BigCmp, + "bigGt": BigGt, + "bigLt": BigLt, + "parseUnit": ParseUnit, + "toBigInt": ToBigInt, } ) +func GetEnvs(extra map[string]any) map[string]interface{} { + envs := map[string]any{} + + for k, v := range exprEnv { + envs[k] = v + } + + for k, v := range extra { + envs[k] = v + } + + return envs +} + func CompileExpression(rawExp string) (*vm.Program, error) { return expr.Compile(rawExp, expr.Env(exprEnv)) } @@ -134,7 +168,6 @@ func RunExpressionQuery(exprCode string) (bool, error) { result, err := expr.Run(program, exprEnv) if err != nil { - log.Println("error when evaluting", err) return false, nil } diff --git a/core/taskengine/expression_trigger_test.go b/core/taskengine/macros/exp_test.go similarity index 95% rename from core/taskengine/expression_trigger_test.go rename to core/taskengine/macros/exp_test.go index 52bf6d5f..5d0f9aa4 100644 --- a/core/taskengine/expression_trigger_test.go +++ b/core/taskengine/macros/exp_test.go @@ -1,4 +1,4 @@ -package taskengine +package macros import ( "testing" diff --git a/core/taskengine/macros/vars.go b/core/taskengine/macros/vars.go new file mode 100644 index 00000000..8e29beef --- /dev/null +++ b/core/taskengine/macros/vars.go @@ -0,0 +1,19 @@ +package macros + +import ( + "fmt" + "strings" +) + +func Render(text []byte, vars map[string]string) string { + return RenderString(string(text), vars) +} + +// TODO: Add more variable and coument these macros +func RenderString(text string, vars map[string]string) string { + for k, v := range vars { + text = strings.ReplaceAll(text, fmt.Sprintf("{{%s}}", k), v) + } + + return text +} diff --git a/core/taskengine/processor.go b/core/taskengine/processor.go index da9b9bd4..a70a97cc 100644 --- a/core/taskengine/processor.go +++ b/core/taskengine/processor.go @@ -8,6 +8,7 @@ import ( "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/ethclient" + "google.golang.org/protobuf/encoding/protojson" "github.com/AvaProtocol/ap-avs/core/chainio/aa" "github.com/AvaProtocol/ap-avs/core/config" @@ -21,20 +22,91 @@ import ( "github.com/AvaProtocol/ap-avs/storage" ) +func NewExecutor(db storage.Storage, logger sdklogging.Logger) *TaskExecutor { + return &TaskExecutor{ + db: db, + logger: logger, + } +} + +type TaskExecutor struct { + db storage.Storage + logger sdklogging.Logger +} + +func (x *TaskExecutor) GetTask(id string) (*model.Task, error) { + task := &model.Task{ + Task: &avsproto.Task{}, + } + item, err := x.db.GetKey([]byte(fmt.Sprintf("t:%s:%s", TaskStatusToStorageKey(avsproto.TaskStatus_Active), id))) + + if err != nil { + return nil, err + } + err = protojson.Unmarshal(item, task) + if err != nil { + return nil, err + } + + return task, nil +} + +func (x *TaskExecutor) Perform(job *apqueue.Job) error { + task, err := x.GetTask(job.Name) + if err != nil { + return fmt.Errorf("fail to load task: %s", job.Name) + } + + // A task executor data is the trigger mark + // ref: AggregateChecksResult + triggerMark := &avsproto.TriggerMark{} + err = json.Unmarshal(job.Data, triggerMark) + if err != nil { + return fmt.Errorf("error decode job payload when executing task: %s with job id %d", task.Id, job.ID) + } + + vm, err := NewVMWithData(job.Name, triggerMark, task.Nodes, task.Edges) + + if err != nil { + return fmt.Errorf("vm failed to initialize: %w", err) + } + + vm.Compile() + err = vm.Run() + + defer func() { + updates := map[string][]byte{} + updates[string(TaskStorageKey(task.Id, task.Status))], err = task.ToJSON() + updates[string(TaskUserKey(task))] = []byte(fmt.Sprintf("%d", task.Status)) + + if err = x.db.BatchWrite(updates); err != nil { + // TODO Gracefully handling of storage cleanup + x.logger.Errorf("error updating task status. %w", err, "task_id", task.Id, "job_id", job.ID) + } + }() + + // TODO: Track max execution reached to set as completed + currentTime := time.Now() + if err == nil { + x.logger.Info("succesfully executing task", "taskid", job.Name, "triggermark", string(job.Data)) + task.AppendExecution(currentTime.Unix(), triggerMark, vm.ExecutionLogs, nil) + //task.SetCompleted() + } else { + x.logger.Error("error executing task", "taskid", job.Name, "triggermark", string(job.Data), err) + task.AppendExecution(currentTime.Unix(), triggerMark, vm.ExecutionLogs, err) + //task.SetFailed() + return fmt.Errorf("Error executing program: %v", err) + } + + return nil +} + type ContractProcessor struct { db storage.Storage smartWalletConfig *config.SmartWalletConfig logger sdklogging.Logger } -func NewProcessor(db storage.Storage, smartWalletConfig *config.SmartWalletConfig, logger sdklogging.Logger) *ContractProcessor { - return &ContractProcessor{ - db: db, - smartWalletConfig: smartWalletConfig, - logger: logger, - } -} - func (c *ContractProcessor) GetTask(id string) (*model.Task, error) { var task model.Task item, err := c.db.GetKey([]byte(fmt.Sprintf("t:%s:%s", TaskStatusToStorageKey(avsproto.TaskStatus_Executing), id))) @@ -50,8 +122,8 @@ func (c *ContractProcessor) GetTask(id string) (*model.Task, error) { return &task, nil } -func (c *ContractProcessor) Perform(job *apqueue.Job) error { - currentTime := time.Now() +func (c *ContractProcessor) ContractWrite(job *apqueue.Job) error { + //currentTime := time.Now() conn, _ := ethclient.Dial(c.smartWalletConfig.EthRpcUrl) //defer conn.Close() @@ -85,7 +157,7 @@ func (c *ContractProcessor) Perform(job *apqueue.Job) error { // TODO: move to vm.go if action.GetContractWrite() == nil { err := fmt.Errorf("invalid task action") - task.AppendExecution(currentTime.Unix(), "", err) + //task.AppendExecution(currentTime.Unix(), "", err) task.SetFailed() return err } @@ -102,7 +174,7 @@ func (c *ContractProcessor) Perform(job *apqueue.Job) error { if e != nil { // TODO: maybe set retry? err := fmt.Errorf("internal error, bundler not available") - task.AppendExecution(currentTime.Unix(), "", err) + //task.AppendExecution(currentTime.Unix(), "", err) task.SetFailed() return err } @@ -117,11 +189,10 @@ func (c *ContractProcessor) Perform(job *apqueue.Job) error { ) if txResult != "" { - task.AppendExecution(currentTime.Unix(), txResult, nil) - task.SetCompleted() + // only set complete when the task is not reaching max + // task.SetCompleted() c.logger.Info("succesfully perform userop", "taskid", task.Id, "userop", txResult) } else { - task.AppendExecution(currentTime.Unix(), "", err) task.SetFailed() c.logger.Error("err perform userop", "taskid", task.Id, "error", err) } diff --git a/core/taskengine/testutil.go b/core/taskengine/testutil.go index 2fdd2885..4566ba7c 100644 --- a/core/taskengine/testutil.go +++ b/core/taskengine/testutil.go @@ -1,20 +1 @@ package taskengine - -import ( - "os" - - "github.com/AvaProtocol/ap-avs/storage" -) - -// Shortcut to initialize a storage at the given path, panic if we cannot create db -func TestMustDB() storage.Storage { - dir, err := os.MkdirTemp("", "aptest") - if err != nil { - panic(err) - } - db, err := storage.NewWithPath(dir) - if err != nil { - panic(err) - } - return db -} diff --git a/core/taskengine/trigger/block.go b/core/taskengine/trigger/block.go new file mode 100644 index 00000000..49b70ad9 --- /dev/null +++ b/core/taskengine/trigger/block.go @@ -0,0 +1,152 @@ +package trigger + +import ( + "context" + "sync" + "time" + + "math/big" + + sdklogging "github.com/Layr-Labs/eigensdk-go/logging" + + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/ethclient" +) + +var ( + zero = big.NewInt(0) +) + +type RpcOption struct { + RpcURL string + WsRpcURL string +} + +type TriggerMark[T any] struct { + TaskID string + + Marker T +} + +type CommonTrigger struct { + wsEthClient *ethclient.Client + ethClient *ethclient.Client + rpcOption *RpcOption + + logger sdklogging.Logger + + // channel to track shutdown + done chan bool + shutdown bool + mu *sync.Mutex +} + +type BlockTrigger struct { + *CommonTrigger + + schedule map[int][]string + + // channel that we will push the trigger information back + triggerCh chan TriggerMark[string] +} + +func NewBlockTrigger(o *RpcOption, triggerCh chan TriggerMark[string]) *BlockTrigger { + var err error + + logger, err := sdklogging.NewZapLogger(sdklogging.Production) + b := BlockTrigger{ + CommonTrigger: &CommonTrigger{ + done: make(chan bool), + shutdown: false, + rpcOption: o, + + logger: logger, + mu: &sync.Mutex{}, + }, + schedule: make(map[int][]string), + triggerCh: triggerCh, + } + + b.ethClient, err = ethclient.Dial(o.RpcURL) + if err != nil { + panic(err) + } + + b.wsEthClient, err = ethclient.Dial(o.WsRpcURL) + + if err != nil { + panic(err) + } + + return &b +} + +func (b *CommonTrigger) retryConnectToRpc() error { + for { + if b.shutdown { + return nil + } + + conn, err := ethclient.Dial(b.rpcOption.WsRpcURL) + if err == nil { + b.wsEthClient = conn + return nil + } + b.logger.Errorf("cannot establish websocket client for RPC, retry in 15 seconds", "err", err) + time.Sleep(15 * time.Second) + } + + return nil +} + +func (b *CommonTrigger) Shutdown() { + b.shutdown = true + b.done <- true +} + +func (b *BlockTrigger) Run(ctx context.Context) error { + //func RegisterBlockListener(ctx context.Context, fn OnblockFunc) error { + headers := make(chan *types.Header) + sub, err := b.wsEthClient.SubscribeNewHead(ctx, headers) + if err != nil { + return err + } + + go func() { + for { + select { + case <-ctx.Done(): + err = nil + case <-b.done: + err = nil + case err := <-sub.Err(): + b.logger.Errorf("getting error when subscribe to websocket rpc. start reconnecting", "errror", err) + b.retryConnectToRpc() + b.wsEthClient.SubscribeNewHead(ctx, headers) + case header := <-headers: + b.logger.Info("detect new block, evaluate checks", "component", "blocktrigger", "block", header.Hash().Hex(), "number", header.Number) + + toRemove := []int{} + for interval, tasks := range b.schedule { + z := new(big.Int) + if z.Mod(header.Number, big.NewInt(int64(interval))).Cmp(zero) == 0 { + for _, taskID := range tasks { + b.triggerCh <- TriggerMark[string]{ + TaskID: taskID, + Marker: header.Number.String(), + } + + } + // Remove the task from the queue + toRemove = append(toRemove, interval) + } + } + + for _, v := range toRemove { + delete(b.schedule, v) + } + } + } + }() + return err +} diff --git a/core/taskengine/trigger/event.go b/core/taskengine/trigger/event.go new file mode 100644 index 00000000..7e3b546d --- /dev/null +++ b/core/taskengine/trigger/event.go @@ -0,0 +1,191 @@ +package trigger + +import ( + "context" + "strings" + "sync" + + "github.com/AvaProtocol/ap-avs/core/taskengine/macros" + sdklogging "github.com/Layr-Labs/eigensdk-go/logging" + "github.com/expr-lang/expr" + "github.com/expr-lang/expr/vm" + "github.com/ginkgoch/godash/v2" + + "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/ethclient" + + avsproto "github.com/AvaProtocol/ap-avs/protobuf" +) + +type EventMark struct { + BlockNumber uint64 + LogIndex uint + TxHash string +} + +type Check struct { + Program *vm.Program + TaskMetadata *avsproto.SyncMessagesResp_TaskMetadata +} + +type EventTrigger struct { + *CommonTrigger + + checks sync.Map + + // channel that we will push the trigger information back + triggerCh chan TriggerMark[EventMark] +} + +func NewEventTrigger(o *RpcOption, triggerCh chan TriggerMark[EventMark]) *EventTrigger { + var err error + + logger, err := sdklogging.NewZapLogger(sdklogging.Production) + b := EventTrigger{ + CommonTrigger: &CommonTrigger{ + done: make(chan bool), + shutdown: false, + rpcOption: o, + logger: logger, + }, + + triggerCh: triggerCh, + checks: sync.Map{}, + } + + b.ethClient, err = ethclient.Dial(o.RpcURL) + if err != nil { + panic(err) + } + + b.wsEthClient, err = ethclient.Dial(o.WsRpcURL) + + if err != nil { + panic(err) + } + + return &b +} + +// TODO: track remainExecution and expriedAt before merge +func (t *EventTrigger) AddCheck(check *avsproto.SyncMessagesResp_TaskMetadata) error { + // Dummy value to get type + envs := macros.GetEnvs(map[string]interface{}{ + "trigger1": map[string]interface{}{ + "data": map[string]interface{}{ + "address": "dummy", + "topics": godash.Map([]common.Hash{}, func(topic common.Hash) string { + return "0x" + }), + "data": "0x", + "tx_hash": "dummy", + }, + }, + }) + program, err := expr.Compile(check.GetTrigger().GetEvent().GetExpression(), expr.Env(envs), expr.AsBool()) + if err != nil { + return err + } + + t.checks.Store(check.TaskId, &Check{ + Program: program, + TaskMetadata: check, + }) + + return nil +} + +func (t *EventTrigger) RemoveCheck(id string) error { + t.checks.Delete(id) + + return nil +} + +func (evt *EventTrigger) Run(ctx context.Context) error { + logs := make(chan types.Log) + query := ethereum.FilterQuery{} + sub, err := evt.wsEthClient.SubscribeFilterLogs(context.Background(), ethereum.FilterQuery{}, logs) + if err != nil { + return err + } + + go func() { + for { + select { + case <-ctx.Done(): + err = nil + case <-evt.done: + err = nil + case err := <-sub.Err(): + evt.logger.Errorf("getting error when subscribe to websocket rpc. start reconnecting", "errror", err) + evt.retryConnectToRpc() + sub, err = evt.wsEthClient.SubscribeFilterLogs(context.Background(), query, logs) + case event := <-logs: + evt.logger.Debug("detect new event, evaluate checks", "event", event.Topics[0], "contract", event.Address) + // TODO: implement hint to avoid scan all checks + toRemove := []string{} + + evt.checks.Range(func(key any, value any) bool { + if evt.shutdown { + return false + } + + check := value.(*Check) + if hit, err := evt.Evaluate(&event, check.Program); err == nil && hit { + evt.logger.Info("check hit, notify aggregator", "task_id", key) + evt.triggerCh <- TriggerMark[EventMark]{ + TaskID: key.(string), + Marker: EventMark{ + BlockNumber: event.BlockNumber, + LogIndex: event.Index, + TxHash: event.TxHash.String(), + }, + } + + // if check.metadata.Remain >= 0 { + // if check.metadata.Remain == 1 { + // toRemove = append(toRemove, key.(string)) + // check.metadata.Remain = -1 + // } + // } + } + + return true + }) + + if len(toRemove) > 0 { + for _, v := range toRemove { + evt.checks.Delete(v) + } + } + } + } + }() + + return err +} + +func (evt *EventTrigger) Evaluate(event *types.Log, program *vm.Program) (bool, error) { + envs := macros.GetEnvs(map[string]interface{}{ + "trigger1": map[string]interface{}{ + "data": map[string]interface{}{ + "address": strings.ToLower(event.Address.Hex()), + "topics": godash.Map(event.Topics, func(topic common.Hash) string { + return "0x" + strings.ToLower(strings.TrimLeft(topic.String(), "0x0")) + }), + "data": "0x" + common.Bytes2Hex(event.Data), + "tx_hash": event.TxHash, + }, + }, + }) + + result, err := expr.Run(program, envs) + + if err != nil { + return false, err + } + + return result.(bool), err +} diff --git a/core/taskengine/trigger/event_test.go b/core/taskengine/trigger/event_test.go new file mode 100644 index 00000000..dd6103dc --- /dev/null +++ b/core/taskengine/trigger/event_test.go @@ -0,0 +1,56 @@ +package trigger + +import ( + "testing" + + "github.com/AvaProtocol/ap-avs/core/taskengine/macros" + "github.com/AvaProtocol/ap-avs/core/testutil" + "github.com/expr-lang/expr" +) + +func TestChainlinkLatestAnswer(t *testing.T) { + event, err := testutil.GetEventForTx("0x8f7c1f698f03d6d32c996b679ea1ebad45bbcdd9aa95d250dda74763cc0f508d", 82) + + if err != nil { + t.Errorf("expect no error but got one: %v", err) + } + + eventTrigger := NewEventTrigger(&RpcOption{ + RpcURL: testutil.GetTestRPCURL(), + WsRpcURL: testutil.GetTestRPCURL(), + }, make(chan TriggerMark[EventMark], 1000)) + + envs := macros.GetEnvs(map[string]interface{}{ + "trigger1": map[string]interface{}{ + "data": map[string]interface{}{ + "topics": []string{ + "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef", + "0xabcdef", + "0xc114fb059434563dc65ac8d57e7976e3eac534f4", + }, + }, + }, + }) + + program, err := expr.Compile(` + trigger1.data.topics[0] == "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef" && trigger1.data.topics[2] == "0xc114fb059434563dc65ac8d57e7976e3eac534f4" + `, expr.Env(envs), expr.AsBool()) + + if err != nil { + panic(err) + } + + result, err := eventTrigger.Evaluate(event, program) + if !result { + t.Errorf("expect expression to be match, but got false: error: %v", err) + } + + program, err = expr.Compile(` + (trigger1.data.topics[0] == "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef" && trigger1.data.topics[2] == "abc") + `) + + result, err = eventTrigger.Evaluate(event, program) + if result { + t.Errorf("expect expression to be not match, but got match: error: %v", err) + } +} diff --git a/core/taskengine/trigger/time.go b/core/taskengine/trigger/time.go new file mode 100644 index 00000000..dee4fe7a --- /dev/null +++ b/core/taskengine/trigger/time.go @@ -0,0 +1 @@ +package trigger diff --git a/core/taskengine/utils.go b/core/taskengine/utils.go new file mode 100644 index 00000000..fe924c8d --- /dev/null +++ b/core/taskengine/utils.go @@ -0,0 +1,111 @@ +package taskengine + +import ( + "context" + "encoding/json" + "fmt" + "math/big" + + "github.com/AvaProtocol/ap-avs/pkg/erc20" + "github.com/ethereum/go-ethereum/core/types" + "github.com/shopspring/decimal" +) + +// Metadata holds token and block metadata +type Metadata struct { + Name string + Symbol string + Decimals uint8 + FormattedValue string + BlockNumber uint64 +} + +// GetMetadata retrieves and caches token metadata and block data +func GetMetadataForTransfer(log *types.Log) (*Metadata, error) { + tokenAddress := log.Address.Hex() + cacheKey := fmt.Sprintf("erc20:%s", tokenAddress) + + m := Metadata{} + + // Check if metadata is cached + if data, err := cache.Get(cacheKey); err == nil { + var metadata Metadata + json.Unmarshal(data, &metadata) + } + + if m.Name == "" { + // Retrieve token data + token, err := erc20.NewErc20(log.Address, rpcConn) + if err != nil { + return nil, fmt.Errorf("error creating ERC20 instance: %w", err) + } + + m.Symbol, err = token.Symbol(nil) + if err != nil { + return nil, fmt.Errorf("error fetching token symbol: %w", err) + } + + m.Name, err = token.Name(nil) + if err != nil { + return nil, fmt.Errorf("error fetching token name: %w", err) + } + + m.Decimals, err = token.Decimals(nil) + if err != nil { + return nil, fmt.Errorf("error fetching token decimals: %w", err) + } + data, err := json.Marshal(m) + cache.Set(cacheKey, data) + } + + return &m, nil +} + +func GetBlock(blockNumber uint64) (*types.Header, error) { + cacheKey := fmt.Sprintf("blkt:%d", blockNumber) + + var blockHeader *types.Header + // Check if metadata is cached + if data, err := cache.Get(cacheKey); err == nil { + if err = json.Unmarshal(data, blockHeader); err == nil { + return blockHeader, nil + } + } + + blockHeader, err := rpcConn.HeaderByNumber(context.Background(), big.NewInt(int64(blockNumber))) + if err != nil { + return nil, fmt.Errorf("error fetching block header: %w", err) + } + + data, err := json.Marshal(blockHeader) + cache.Set(cacheKey, data) + + return blockHeader, nil +} + +// ToDecimal converts a big.Int value to a human-readable format +func FormatUnit(value *big.Int, decimals int) *big.Float { + f := new(big.Float).SetInt(value) + decimalFactor := new(big.Float).SetFloat64(1) + ten := big.NewFloat(10) + for i := 0; i < decimals; i++ { + decimalFactor.Mul(decimalFactor, ten) + } + return new(big.Float).Quo(f, decimalFactor) +} + +func ToDecimal(ivalue interface{}, decimals int) decimal.Decimal { + value := new(big.Int) + switch v := ivalue.(type) { + case string: + value.SetString(v, 10) + case *big.Int: + value = v + } + + mul := decimal.NewFromFloat(float64(10)).Pow(decimal.NewFromFloat(float64(decimals))) + num, _ := decimal.NewFromString(value.String()) + result := num.Div(mul) + + return result +} diff --git a/core/taskengine/validation_test.go b/core/taskengine/validation_test.go index 3813176d..24d08d9b 100644 --- a/core/taskengine/validation_test.go +++ b/core/taskengine/validation_test.go @@ -3,9 +3,12 @@ package taskengine import ( "testing" + "github.com/ethereum/go-ethereum/common" + "github.com/AvaProtocol/ap-avs/model" "github.com/AvaProtocol/ap-avs/storage" - "github.com/ethereum/go-ethereum/common" + + "github.com/AvaProtocol/ap-avs/core/testutil" ) func TestWalletOwnerReturnTrueForDefaultAddress(t *testing.T) { @@ -22,7 +25,7 @@ func TestWalletOwnerReturnTrueForDefaultAddress(t *testing.T) { } func TestWalletOwnerReturnTrueForNonDefaultAddress(t *testing.T) { - db := TestMustDB() + db := testutil.TestMustDB() defer storage.Destroy(db.(*storage.BadgerStorage)) eoa := common.HexToAddress("0xe272b72E51a5bF8cB720fc6D6DF164a4D5E321C5") diff --git a/core/taskengine/vm.go b/core/taskengine/vm.go index dcd181b2..2ace20b6 100644 --- a/core/taskengine/vm.go +++ b/core/taskengine/vm.go @@ -1,5 +1,389 @@ package taskengine +import ( + "context" + "fmt" + "strings" + "sync" + "time" + + "github.com/dop251/goja" + "github.com/ginkgoch/godash/v2" + + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/expr-lang/expr" + + "github.com/AvaProtocol/ap-avs/core/taskengine/macros" + "github.com/AvaProtocol/ap-avs/pkg/erc20" + avsproto "github.com/AvaProtocol/ap-avs/protobuf" +) + +type VMState string + +const ( + VMStateInitialize = "vm_initialize" + VMStateCompiled = "vm_compiled" + VMStateReady = "vm_ready" + VMStateExecuting = "vm_executing" + VMStateCompleted = "vm_completed" + + TriggerEdge = "__TRIGGER__" +) + +type Step struct { + NodeID string + Next []string +} + // The VM is the core component that load the node information and execute them, yield finaly result type VM struct { + // Input raw task data + // TaskID can be used to cache compile program + TaskID string + TaskNodes map[string]*avsproto.TaskNode + TaskEdges []*avsproto.TaskEdge + + // executin logs and result per plans + ExecutionLogs []*avsproto.Execution_Step + + Status VMState + mu *sync.Mutex + // internal state that is set through out program execution + vars map[string]any + + plans map[string]*Step + entrypoint string + instructionCount int64 +} + +func NewVM() (*VM, error) { + v := &VM{ + Status: VMStateInitialize, + mu: &sync.Mutex{}, + instructionCount: 0, + } + + return v, nil +} + +func (v *VM) Reset() { + v.ExecutionLogs = []*avsproto.Execution_Step{} + v.plans = map[string]*Step{} + v.entrypoint = "" + v.Status = VMStateInitialize + v.instructionCount = 0 +} + +func NewVMWithData(taskID string, triggerMark *avsproto.TriggerMark, nodes []*avsproto.TaskNode, edges []*avsproto.TaskEdge) (*VM, error) { + v := &VM{ + Status: VMStateInitialize, + TaskEdges: edges, + TaskNodes: make(map[string]*avsproto.TaskNode), + plans: make(map[string]*Step), + mu: &sync.Mutex{}, + instructionCount: 0, + } + + for _, node := range nodes { + v.TaskNodes[node.Id] = node + } + + v.vars = macros.GetEnvs(map[string]any{}) + + // popular trigger data for trigger variable + if triggerMark != nil && triggerMark.LogIndex > 0 && triggerMark.TxHash != "" { + // if it contains event, we need to fetch and pop + receipt, err := rpcConn.TransactionReceipt(context.Background(), common.HexToHash(triggerMark.TxHash)) + if err != nil { + return nil, err + } + + var event *types.Log + //event := receipt.Logs[triggerMark.LogIndex] + + for _, l := range receipt.Logs { + if uint64(l.Index) == triggerMark.LogIndex { + event = l + } + } + + if event == nil { + return nil, fmt.Errorf("tx %s doesn't content event %d", triggerMark.TxHash, triggerMark.LogIndex) + } + + tokenMetadata, err := GetMetadataForTransfer(event) + ef, err := erc20.NewErc20(event.Address, nil) + + blockHeader, err := GetBlock(event.BlockNumber) + if err != nil { + return nil, fmt.Errorf("RPC error getting block header. Retry: %w", err) + } + + parseTransfer, err := ef.ParseTransfer(*event) + formattedValue := ToDecimal(parseTransfer.Value, int(tokenMetadata.Decimals)).String() + + v.vars["trigger1"] = map[string]interface{}{ + "data": map[string]interface{}{ + "topics": godash.Map(event.Topics, func(topic common.Hash) string { + return "0x" + strings.ToLower(strings.TrimLeft(topic.String(), "0x0")) + }), + "data": "0x" + common.Bytes2Hex(event.Data), + + "token_name": tokenMetadata.Name, + "token_symbol": tokenMetadata.Symbol, + "token_decimals": tokenMetadata.Decimals, + "transaction_hash": event.TxHash, + "address": strings.ToLower(event.Address.Hex()), + "block_number": event.BlockNumber, + "block_timestamp": blockHeader.Time, + "from_address": parseTransfer.From.String(), + "to_address": parseTransfer.To.String(), + "value": parseTransfer.Value.String(), + "value_formatted": formattedValue, + "transaction_index": event.TxIndex, + }, + } + + } + + return v, nil +} + +func (v *VM) CreateSandbox() error { + return nil +} + +func (v *VM) AddVar(key string, value any) { + v.vars[key] = value +} + +// Compile generates an execution plan based on edge +func (v *VM) Compile() error { + for _, edge := range v.TaskEdges { + if strings.Contains(edge.Source, ".") { + v.plans[edge.Source] = &Step{ + NodeID: edge.Source, + Next: []string{edge.Target}, + } + + continue + } + + if _, ok := v.plans[edge.Target]; !ok { + v.plans[edge.Target] = &Step{ + NodeID: edge.Target, + Next: []string{}, + } + } + + if edge.Source != "__TRIGGER__" { + if _, ok := v.plans[edge.Source]; ok { + v.plans[edge.Source].Next = append(v.plans[edge.Source].Next, edge.Target) + } else { + v.plans[edge.Source] = &Step{ + NodeID: edge.Source, + Next: []string{edge.Target}, + } + } + } else { + v.entrypoint = edge.Target + } + } + + // TODO Setup a timeout context + // currentStep := v.plans[v.entrypoint] + // for currentStep != nil { + // node := v.TaskNodes[currentStep.NodeID] + + // v.instructions = append(v.instructions, &Instruction{ + // Op: "Invoke", + // Value: node.Id, + // }) + + // if len(currentStep.Next) == 0 { + // break + // } + + // // TODO: Support multiple next + // for _, next := range currentStep.Next { + // v.instructions = append(v.instructions, &Instruction{ + // Op: "Invoke", + // Value: next, + // }) + // } + + // currentStep = v.plans[currentStep.Next[0]] + // } + v.Status = VMStateReady + + return nil +} + +//func (v *VM) Plan(node) { +// // if not if or not foo +// // v.instruction = append(v.instruction, { +// // op: "invoke", nodeid +// // } +// +// // if if block +// // first we put the instruction at the end +// // currentPosition +// +// // v.instruction = append(v.instruction, the block +// +//} + +// Run the program. The VM will only run once. +func (v *VM) Run() error { + if v.Status != VMStateReady { + return fmt.Errorf("VM isn't in ready state") + } + + v.mu.Lock() + v.Status = VMStateExecuting + defer func() { + v.Status = VMStateCompleted + v.mu.Unlock() + }() + if len(v.plans) == 0 { + return fmt.Errorf("internal error: not compiled") + } + + // TODO Setup a timeout context + currentStep := v.plans[v.entrypoint] + for currentStep != nil { + node := v.TaskNodes[currentStep.NodeID] + + _, err := v.executeNode(node) + if err != nil { + // abort execution as soon as a node raise error + return err + } + + if len(currentStep.Next) == 0 { + break + } + + // TODO: Support multiple next + currentStep = v.plans[currentStep.Next[0]] + } + + return nil +} + +func (v *VM) executeNode(node *avsproto.TaskNode) (*avsproto.Execution_Step, error) { + v.instructionCount += 1 + + var err error + executionLog := &avsproto.Execution_Step{ + NodeId: node.Id, + } + + if nodeValue := node.GetRestApi(); nodeValue != nil { + // TODO: refactor into function + p := NewRestProrcessor() + + // only evaluate string when there is string interpolation + if nodeValue.Body != "" && strings.Contains(nodeValue.Body, "$") { + nodeValue2 := &avsproto.RestAPINode{ + Url: macros.RenderString(nodeValue.Url, macroEnvs), + Headers: nodeValue.Headers, + Method: nodeValue.Method, + Body: strings.Clone(nodeValue.Body), + } + vm := goja.New() + // TODO: dynamically set var + vm.Set("trigger1", v.vars["trigger1"]) + + renderBody, err := vm.RunString(nodeValue.Body) + if err == nil { + nodeValue2.Body = renderBody.Export().(string) + } + executionLog, err = p.Execute(node.Id, nodeValue2) + } else { + executionLog, err = p.Execute(node.Id, nodeValue) + } + + v.ExecutionLogs = append(v.ExecutionLogs, executionLog) + } else if nodeValue := node.GetBranch(); nodeValue != nil { + outcome := "" + executionLog, outcome, err = v.runBranch(node.Id, nodeValue) + v.ExecutionLogs = append(v.ExecutionLogs, executionLog) + if err == nil && outcome != "" { + if outcomeNodes := v.plans[outcome].Next; len(outcomeNodes) >= 0 { + for _, nodeID := range outcomeNodes { + // TODO: track stack too deepth and abort + node := v.TaskNodes[nodeID] + executionLog, err = v.executeNode(node) + //v.ExecutionLogs = append(v.ExecutionLogs, executionLog) + + } + } + } + } + + return executionLog, err +} + +func (v *VM) runBranch(stepID string, node *avsproto.BranchNode) (*avsproto.Execution_Step, string, error) { + s := &avsproto.Execution_Step{ + NodeId: stepID, + OutputData: "", + Log: "", + Error: "", + Success: true, + } + + var sb strings.Builder + + sb.WriteString("Execute Branch: ") + sb.WriteString(stepID) + outcome := "" + for _, statement := range node.Conditions { + if strings.EqualFold(statement.Type, "else") { + // Execute this directly + outcome = fmt.Sprintf("%s.%s", stepID, statement.Id) + sb.WriteString("\n") + sb.WriteString(time.Now().String()) + sb.WriteString("evaluate else, follow else path ") + sb.WriteString(outcome) + s.Log = sb.String() + s.OutputData = outcome + return s, outcome, nil + } + sb.WriteString(fmt.Sprintf("\n%s evaluate condition: %s expression: `%s`", time.Now(), statement.Id, statement.Expression)) + + // now we need to valuate condition + program, err := expr.Compile(statement.Expression, expr.Env(v.vars), expr.AsBool()) + if err != nil { + s.Success = false + s.Error = fmt.Errorf("error compile the statement: %w", err).Error() + sb.WriteString("error compile expression") + s.Log = sb.String() + return s, outcome, fmt.Errorf("error compile the statement: %w", err) + } + result, err := expr.Run(program, v.vars) + if err != nil { + s.Success = false + s.Error = fmt.Errorf("error run statement: %w", err).Error() + sb.WriteString("error run expression") + s.Log = sb.String() + return s, outcome, fmt.Errorf("error evaluate the statement: %w", err) + } + + if result.(bool) == true { + outcome = fmt.Sprintf("%s.%s", stepID, statement.Id) + sb.WriteString("\nexpression result to true. follow path ") + sb.WriteString(outcome) + // run the node + s.Log = sb.String() + s.OutputData = outcome + return s, outcome, nil + } + } + + sb.WriteString("\nno condition matched. halt execution") + s.Log = sb.String() + return s, "", nil } diff --git a/core/taskengine/vm_runner_rest.go b/core/taskengine/vm_runner_rest.go new file mode 100644 index 00000000..07e5bf63 --- /dev/null +++ b/core/taskengine/vm_runner_rest.go @@ -0,0 +1,79 @@ +package taskengine + +import ( + "fmt" + "net/url" + "strings" + "time" + + "github.com/go-resty/resty/v2" + + avsproto "github.com/AvaProtocol/ap-avs/protobuf" +) + +type RestProcessor struct { + client *resty.Client +} + +func NewRestProrcessor() *RestProcessor { + client := resty.New() + + // Unique settings at Client level + // -------------------------------- + // Enable debug mode + // client.SetDebug(true) + + // Set client timeout as per your need + client.SetTimeout(1 * time.Minute) + + r := RestProcessor{ + client: client, + } + + return &r +} + +func (r *RestProcessor) Execute(stepID string, node *avsproto.RestAPINode) (*avsproto.Execution_Step, error) { + s := &avsproto.Execution_Step{ + NodeId: stepID, + Log: "", + OutputData: "", + Success: true, + Error: "", + } + + var log strings.Builder + + request := r.client.R(). + SetBody([]byte(node.Body)) + + for k, v := range node.Headers { + request = request.SetHeader(k, v) + } + + var resp *resty.Response + var err error + if strings.EqualFold(node.Method, "post") { + resp, err = request.Post(node.Url) + } else if strings.EqualFold(node.Method, "get") { + resp, err = request.Get(node.Url) + } else if strings.EqualFold(node.Method, "delete") { + resp, err = request.Delete(node.Url) + } + + u, err := url.Parse(node.Url) + if err != nil { + return nil, err + } + + log.WriteString(fmt.Sprintf("Execute %s %s at %s", node.Method, u.Hostname(), time.Now())) + s.Log = log.String() + s.OutputData = string(resp.Body()) + if err != nil { + s.Success = false + s.Error = err.Error() + return s, err + } + + return s, nil +} diff --git a/core/taskengine/vm_runner_rest_test.go b/core/taskengine/vm_runner_rest_test.go new file mode 100644 index 00000000..0b4034d2 --- /dev/null +++ b/core/taskengine/vm_runner_rest_test.go @@ -0,0 +1,41 @@ +package taskengine + +import ( + "strings" + "testing" + + avsproto "github.com/AvaProtocol/ap-avs/protobuf" +) + +func TestRestRequest(t *testing.T) { + n := NewRestProrcessor() + + node := &avsproto.RestAPINode{ + Url: "https://webhook.site/4a2cb0c4-86ea-4189-b1e3-ce168f5d4840", + Headers: map[string]string{ + "Content-type": "application/x-www-form-urlencoded", + }, + Body: "chat_id=123&disable_notification=true&text=%2AThis+is+a+test+format%2A", + Method: "POST", + } + step, err := n.Execute("foo123", node) + + if err != nil { + t.Errorf("expected rest node run succesfull but got error: %v", err) + } + + if !step.Success { + t.Errorf("expected rest node run succesfully but failed") + } + + if !strings.Contains(step.Log, "Execute POST webhook.site at") { + t.Errorf("expected log contains request trace data but found no") + } + + if step.Error != "" { + t.Errorf("expected log contains request trace data but found no") + } + if !strings.Contains(step.OutputData, "This URL has no default content configured") { + t.Errorf("expected step result contains the http endpoint response body") + } +} diff --git a/core/taskengine/vm_test.go b/core/taskengine/vm_test.go new file mode 100644 index 00000000..f4a634e8 --- /dev/null +++ b/core/taskengine/vm_test.go @@ -0,0 +1,403 @@ +package taskengine + +import ( + "fmt" + "strings" + "testing" + + "github.com/dop251/goja" + "github.com/k0kubun/pp/v3" + + "github.com/AvaProtocol/ap-avs/core/testutil" + avsproto "github.com/AvaProtocol/ap-avs/protobuf" +) + +func TestVMCompile(t *testing.T) { + nodes := []*avsproto.TaskNode{ + &avsproto.TaskNode{ + Id: "123", + Name: "httpnode", + TaskType: &avsproto.TaskNode_RestApi{ + RestApi: &avsproto.RestAPINode{ + Url: "https://webhook.site/15431497-2b59-4000-97ee-245fef272967", + Method: "POST", + Body: "a=123", + }, + }, + }, + } + + edges := []*avsproto.TaskEdge{ + &avsproto.TaskEdge{ + Id: "e1", + Source: "__TRIGGER__", + Target: "123", + }, + } + + vm, err := NewVMWithData("123", nil, nodes, edges) + if err != nil { + t.Errorf("expect vm initialized") + } + + vm.Compile() + if vm.entrypoint != "123" { + t.Errorf("Error compute entrypoint. Expected 123 Got %s", vm.entrypoint) + } + if len(vm.plans) < 1 { + t.Errorf("Expect steps is populated, got nil") + } +} + +func TestRunSimpleTasks(t *testing.T) { + nodes := []*avsproto.TaskNode{ + &avsproto.TaskNode{ + Id: "123", + Name: "httpnode", + TaskType: &avsproto.TaskNode_RestApi{ + RestApi: &avsproto.RestAPINode{ + Url: "https://httpbin.org/post", + Method: "POST", + Body: "a=123", + }, + }, + }, + } + + edges := []*avsproto.TaskEdge{ + &avsproto.TaskEdge{ + Id: "e1", + Source: "__TRIGGER__", + Target: "123", + }, + } + + vm, err := NewVMWithData("123", nil, nodes, edges) + if err != nil { + t.Errorf("expect vm initialized") + } + + vm.Compile() + + if vm.entrypoint != "123" { + t.Errorf("Error compute entrypoint. Expected 123 Got %s", vm.entrypoint) + } + err = vm.Run() + if err != nil { + t.Errorf("Error executing program. Expected no error Got error %v", err) + } + + if !strings.Contains(vm.ExecutionLogs[0].Log, "Execute") { + t.Errorf("error generating log for executing. expect a log line displaying the request attempt, got nothing") + } +} + +func TestRunSequentialTasks(t *testing.T) { + nodes := []*avsproto.TaskNode{ + &avsproto.TaskNode{ + Id: "123", + Name: "httpnode", + TaskType: &avsproto.TaskNode_RestApi{ + RestApi: &avsproto.RestAPINode{ + Url: "https://httpbin.org/post", + Method: "POST", + Body: "post123", + }, + }, + }, + &avsproto.TaskNode{ + Id: "456", + Name: "graphql", + TaskType: &avsproto.TaskNode_RestApi{ + RestApi: &avsproto.RestAPINode{ + Url: "https://httpbin.org/get?query123", + Method: "GET", + Headers: map[string]string{ + "content-type": "application/json", + }, + }, + }, + }, + } + + edges := []*avsproto.TaskEdge{ + &avsproto.TaskEdge{ + Id: "e1", + Source: "__TRIGGER__", + Target: "123", + }, + &avsproto.TaskEdge{ + Id: "e2", + Source: "123", + Target: "456", + }, + } + + vm, err := NewVMWithData("123", nil, nodes, edges) + if err != nil { + t.Errorf("expect vm initialized") + } + + vm.Compile() + + if len(vm.plans) < 2 { + t.Errorf("incorrect generated plan") + } + + if vm.entrypoint != "123" { + t.Errorf("Error compute entrypoint. Expected 123 Got %s", vm.entrypoint) + } + err = vm.Run() + if err != nil { + t.Errorf("Error executing program. Expected run ok, got error %v", err) + } + + if len(vm.ExecutionLogs) < 2 { + t.Errorf("Missing an execution") + } + + pp.Print(vm.ExecutionLogs) + + if !strings.Contains(vm.ExecutionLogs[0].Log, "Execute POST httpbin.org at") || !strings.Contains(vm.ExecutionLogs[1].Log, "Execute GET httpbin.org") { + t.Errorf("error generating log for executing. expect a log line displaying the request attempt, got nothing") + } + + if !vm.ExecutionLogs[0].Success || !vm.ExecutionLogs[1].Success { + t.Errorf("incorrect success status, expect all success but got failure") + } + + if vm.ExecutionLogs[0].NodeId != "123" || vm.ExecutionLogs[1].NodeId != "456" { + t.Errorf("incorrect node id in execution log") + } + + if !strings.Contains(vm.ExecutionLogs[0].OutputData, "post123") { + t.Errorf("rest node result is incorrect, should contains the string post123") + } + if !strings.Contains(vm.ExecutionLogs[1].OutputData, "query123") { + t.Errorf("rest node result is incorrect, should contains the string query123") + } +} + +func TestRunTaskWithBranchNode(t *testing.T) { + nodes := []*avsproto.TaskNode{ + &avsproto.TaskNode{ + Id: "branch1", + Name: "branch", + TaskType: &avsproto.TaskNode_Branch{ + Branch: &avsproto.BranchNode{ + Conditions: []*avsproto.Condition{ + &avsproto.Condition{ + Id: "a1", + Type: "if", + Expression: "a >= 5", + }, + &avsproto.Condition{ + Id: "a2", + Type: "else", + }, + }, + }, + }, + }, + &avsproto.TaskNode{ + Id: "notification1", + Name: "httpnode", + TaskType: &avsproto.TaskNode_RestApi{ + RestApi: &avsproto.RestAPINode{ + Url: "https://httpbin.org/post", + Method: "POST", + Body: "hit=notification1", + }, + }, + }, + &avsproto.TaskNode{ + Id: "notification2", + Name: "httpnode", + TaskType: &avsproto.TaskNode_RestApi{ + RestApi: &avsproto.RestAPINode{ + Url: "https://httpbin.org/get?hit=notification2", + Method: "GET", + Headers: map[string]string{ + "content-type": "application/json", + }, + }, + }, + }, + } + + edges := []*avsproto.TaskEdge{ + &avsproto.TaskEdge{ + Id: "e1", + Source: "__TRIGGER__", + Target: "branch1", + }, + &avsproto.TaskEdge{ + Id: "e1", + Source: "branch1.a1", + Target: "notification1", + }, + &avsproto.TaskEdge{ + Id: "e1", + Source: "branch1.a2", + Target: "notification2", + }, + } + + vm, err := NewVMWithData("123", nil, nodes, edges) + if err != nil { + t.Errorf("expect vm initialized") + } + + vm.vars["a"] = 10 + vm.Compile() + + if vm.entrypoint != "branch1" { + t.Errorf("Error compute entrypoint. Expected branch1, got %s", vm.entrypoint) + return + } + + pp.Print(vm.plans) + + if len(vm.plans) != 3 { + t.Errorf("Invalid plan generation. Expect one step, got %d", len(vm.plans)) + } + + err = vm.Run() + if err != nil { + t.Errorf("Error executing program. Expected success, got error %v", err) + return + } + + if vm.instructionCount != 2 { + t.Errorf("incorrect steps, expect 2 got %d", vm.instructionCount) + } + if len(vm.ExecutionLogs) != 2 { + t.Errorf("incorrect log, expect 2 got %d", len(vm.ExecutionLogs)) + } + pp.Print(vm.ExecutionLogs[0]) + pp.Print(vm.ExecutionLogs[1]) + fmt.Println(vm.ExecutionLogs[1].OutputData) + if !strings.Contains(vm.ExecutionLogs[1].OutputData, `notification1`) { + t.Errorf("expect executing notification1 step but not it didn't run") + } + + vm.Reset() + vm.vars["a"] = 1 + vm.Compile() + err = vm.Run() + if err != nil { + t.Errorf("Error executing program. Expected success, got error %v", err) + return + } + + if vm.instructionCount != 2 { + t.Errorf("incorrect steps, expect 2 got %d", vm.instructionCount) + } + if len(vm.ExecutionLogs) != 2 { + t.Errorf("incorrect log, expect 2 got %d", len(vm.ExecutionLogs)) + } + pp.Print(vm.ExecutionLogs[0]) + pp.Print(vm.ExecutionLogs[1]) + fmt.Println(vm.ExecutionLogs[1].OutputData) + if !strings.Contains(vm.ExecutionLogs[1].OutputData, `notification2`) { + t.Errorf("expect executing notification1 step but not it didn't run") + } +} + +func TestRenderString(t *testing.T) { + vm := goja.New() + vm.Set("trigger1", map[string]any{ + "data": map[string]any{ + "token_symbol": "0xtoken", + "amount": 123456, + "tx_hash": "0x53beb2163994510e0984b436ebc828dc57e480ee671cfbe7ed52776c2a4830c8", + }, + }) + vm.Set("target", "123") + + result, err := vm.RunString(`JSON.stringify({ + chat_id:-4609037622, + text: ` + "`Congrat, your walllet ${target} received ${trigger1.data.amount} ${trigger1.data.token_symbol} at [${trigger1.data.tx_hash}](sepolia.etherscan.io/tx/${trigger1.data.tx_hash}`" + ` + })`) + v := result.Export().(string) + if err != nil || !strings.Contains(v, "123456") || !strings.Contains(v, "0x53beb2163994510e0984b436ebc828dc57e480ee671cfbe7ed52776c2a4830c8") { + t.Errorf("text not render correctly") + } +} + +func TestEvaluateEvent(t *testing.T) { + nodes := []*avsproto.TaskNode{ + &avsproto.TaskNode{ + Id: "branch1", + Name: "branch", + TaskType: &avsproto.TaskNode_Branch{ + Branch: &avsproto.BranchNode{ + Conditions: []*avsproto.Condition{ + &avsproto.Condition{ + Id: "a1", + Type: "if", + Expression: `trigger1.data.address == "0x1c7d4b196cb0c7b01d743fbc6116a902379c7238" && bigGt(toBigInt(trigger1.data.data), toBigInt("1200000"))`}, + }, + }, + }, + }, + &avsproto.TaskNode{ + Id: "notification1", + Name: "httpnode", + TaskType: &avsproto.TaskNode_RestApi{ + RestApi: &avsproto.RestAPINode{ + Url: "https://httpbin.org/post", + Method: "POST", + Body: "hit=notification1", + }, + }, + }, + } + + edges := []*avsproto.TaskEdge{ + &avsproto.TaskEdge{ + Id: "e1", + Source: "__TRIGGER__", + Target: "branch1", + }, + &avsproto.TaskEdge{ + Id: "e1", + Source: "branch1.a1", + Target: "notification1", + }, + } + + mark := avsproto.TriggerMark{ + BlockNumber: 7212417, + TxHash: "0x53beb2163994510e0984b436ebc828dc57e480ee671cfbe7ed52776c2a4830c8", + LogIndex: 98, + } + + SetRpc(testutil.GetTestRPCURL()) + SetCache(testutil.GetDefaultCache()) + + vm, err := NewVMWithData("sampletaskid1", &mark, nodes, edges) + if err != nil { + t.Errorf("expect vm initialized") + } + + vm.Compile() + + if vm.entrypoint != "branch1" { + t.Errorf("Error compute entrypoint. Expected branch1, got %s", vm.entrypoint) + return + } + + pp.Print(vm.plans) + + err = vm.Run() + if err != nil { + t.Errorf("Error executing program. Expected success, got error %v", err) + return + } + + pp.Print(vm.ExecutionLogs) + if vm.ExecutionLogs[0].OutputData != "branch1.a1" { + t.Errorf("expression evaluate incorrect") + } +} diff --git a/core/testutil/utils.go b/core/testutil/utils.go new file mode 100644 index 00000000..f26c0bc6 --- /dev/null +++ b/core/testutil/utils.go @@ -0,0 +1,124 @@ +package testutil + +import ( + "context" + "fmt" + "log" + "os" + "time" + + "github.com/allegro/bigcache/v3" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/ethclient" + + "github.com/AvaProtocol/ap-avs/storage" +) + +func GetTestRPCURL() string { + v := os.Getenv("RPC_URL") + if v == "" { + return "https://sepolia.drpc.org" + } + + return v +} + +func GetTestWsRPCURL() string { + v := os.Getenv("WS_RPC_URL") + if v == "" { + return "wss://sepolia.drpc.org" + } + + return v +} + +func GetRpcClient() *ethclient.Client { + client, err := ethclient.Dial(GetTestRPCURL()) + if err != nil { + log.Fatalf("Failed to connect to Ethereum client: %v", err) + } + + return client +} + +func GetEventForTx(txHash string, evtIndex uint64) (*types.Log, error) { + client := GetRpcClient() + + receipt, err := client.TransactionReceipt(context.Background(), common.HexToHash(txHash)) + if err != nil { + return nil, err + } + + var event *types.Log + for _, l := range receipt.Logs { + if uint64(l.Index) == evtIndex { + event = l + } + } + + if event == nil { + return nil, fmt.Errorf("not found event") + } + return event, nil +} + +// Shortcut to initialize a storage at the given path, panic if we cannot create db +func TestMustDB() storage.Storage { + dir, err := os.MkdirTemp("", "aptest") + if err != nil { + panic(err) + } + db, err := storage.NewWithPath(dir) + if err != nil { + panic(err) + } + return db +} + +func GetDefaultCache() *bigcache.BigCache { + config := bigcache.Config{ + + // number of shards (must be a power of 2) + Shards: 1024, + + // time after which entry can be evicted + LifeWindow: 10 * time.Minute, + + // Interval between removing expired entries (clean up). + // If set to <= 0 then no action is performed. + // Setting to < 1 second is counterproductive — bigcache has a one second resolution. + CleanWindow: 5 * time.Minute, + + // rps * lifeWindow, used only in initial memory allocation + MaxEntriesInWindow: 1000 * 10 * 60, + + // max entry size in bytes, used only in initial memory allocation + MaxEntrySize: 500, + + // prints information about additional memory allocation + Verbose: true, + + // cache will not allocate more memory than this limit, value in MB + // if value is reached then the oldest entries can be overridden for the new ones + // 0 value means no size limit + HardMaxCacheSize: 8192, + + // callback fired when the oldest entry is removed because of its expiration time or no space left + // for the new entry, or because delete was called. A bitmask representing the reason will be returned. + // Default value is nil which means no callback and it prevents from unwrapping the oldest entry. + OnRemove: nil, + + // OnRemoveWithReason is a callback fired when the oldest entry is removed because of its expiration time or no space left + // for the new entry, or because delete was called. A constant representing the reason will be passed through. + // Default value is nil which means no callback and it prevents from unwrapping the oldest entry. + // Ignored if OnRemove is specified. + OnRemoveWithReason: nil, + } + cache, err := bigcache.New(context.Background(), config) + if err != nil { + panic(fmt.Errorf("error get default cache for test")) + } + return cache + +} diff --git a/examples/example.js b/examples/example.js index b213d0e9..322a4bdc 100644 --- a/examples/example.js +++ b/examples/example.js @@ -255,6 +255,9 @@ const main = async (cmd) => { smartWalletAddress ); break; + case "schedule-monitor": + scheduleMonitor(owner, token, process.argv[3]); + break; case "schedule": case "schedule-cron": case "schedule-event": @@ -356,6 +359,7 @@ const main = async (cmd) => { schedule-cron : to schedule a task that run on cron schedule-event : to schedule a task that run on occurenct of an event schedule-generic: to schedule a task with an arbitrary contract query + monitor-address : monitor erc20 in/out for an address cancel : to cancel a task delete : to completely remove a task`); } @@ -438,7 +442,7 @@ async function scheduleERC20TransferJob(owner, token, taskCondition) { const nodeIdTransfer = UlidMonotonic.generate().toCanonical(); const nodeIdNotification = UlidMonotonic.generate().toCanonical(); - console.log("\nTrigger type", trigger.trigger_type); + console.log("\nTrigger type", trigger1.trigger_type); const result = await asyncRPC( client, @@ -498,6 +502,120 @@ async function scheduleERC20TransferJob(owner, token, taskCondition) { return result; } + + +// setup a task to monitor in/out transfer for a wallet and send notification +async function scheduleMonitor(owner, token, target) { + const wallets = await getWallets(owner, token); + const smartWalletAddress = wallets[0].address; + + const metadata = new grpc.Metadata(); + metadata.add("authkey", token); + + let trigger = { + name: "trigger1", + trigger_type: TaskTrigger.TriggerTypeCase.EVENT, + event: { + // This is an example to show case the branch + // + // IN PRACTICE, it strongly recomend to add the filter directly to trigger to make it more efficient and not wasting aggregator resources + // native eth transfer emit no event, we use this partciular topic[0] to simulate it + // .. (trigger1.data.topic[0] == "native_eth_tx" && trigger1.data.topic[2] == "${target}" ) || + // TODO: eventually we want to allow trigger2 trigger3 but for now has to hardcode trigger1 + expression: `trigger1.data.topics[0] == "0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef" && trigger1.data.topics[2] == "${target.toLowerCase()}"`, + }, + }; + + const nodeIdNotification = UlidMonotonic.generate().toCanonical(); + const nodeIdCheckAmount = UlidMonotonic.generate().toCanonical(); + const branchIdCheckAmount = UlidMonotonic.generate().toCanonical(); + + const result = await asyncRPC( + client, + "CreateTask", + { + smart_wallet_address: smartWalletAddress, + nodes: [ + { + id: nodeIdCheckAmount, + name: 'checkAmount', + branch: { + conditions: [ + { + id: branchIdCheckAmount, + type: "if", + expression: ` + // usdc + ( trigger1.data.address == "0x1c7d4b196cb0c7b01d743fbc6116a902379c7238" && + bigGt( + toBigInt(trigger1.data.value), + toBigInt("2000000") + ) + ) || + ( trigger1.data.address == lower("0x779877a7b0d9e8603169ddbd7836e478b4624789") && + bigGt( + // link token + chainlinkPrice("0xc59E3633BAAC79493d908e63626716e204A45EdF"), + toBigInt("5000000") + ) + ) + ` + } + ] + }, + }, + { + id: nodeIdNotification, + name: 'notification', + rest_api: { + // As an user, they have 2 option to provide telegram bot token: + // 1. Use their own bot by putting the token directly here. That user is the only one see their own tasks/logs + // 2. (Prefered way) Use Ava Protocol Bot token. However, now because the user can see their own task config, we cannot use the raw token and has to use a variable here. + url: "https://api.telegram.org/bot{{notify_bot_token}}/sendMessage?parse_mode=MarkdownV2", + //url: `https://webhook.site/4a2cb0c4-86ea-4189-b1e3-ce168f5d4840`, + method: "POST", + //body: "chat_id=-4609037622&disable_notification=true&text=%2AWallet+${target.toLowerCase()}+receive+{{ trigger1.data.data }} {{ trigger1.data.token_symbol }} at {{ trigger1.data.tx_hash }}%2A", + // This body is written this way so that it will be evaluate at run time in a JavaScript sandbox + // It's important to quote amount with `` because it may contains a `.` and need to be escape with markdownv2 + body: `JSON.stringify({ + chat_id:-4609037622, + text: \`Congrat, your walllet [\${trigger1.data.to_address}](https://sepolia.etherscan.io/address/\${trigger1.data.to_address}) received \\\`\${trigger1.data.value_formatted}\\\` [\${trigger1.data.token_symbol}](https://sepolia.etherscan.io/token/\${trigger1.data.address}) at [\${trigger1.data.transaction_hash}](sepolia.etherscan.io/tx/\${trigger1.data.transaction_hash})\` + })`, + headers: { + "content-type": "application/json" + } + } + }, + ], + + edges: [ + { + id: UlidMonotonic.generate().toCanonical(), + // __TRIGGER__ is a special node. It doesn't appear directly in the task data, but it should be draw on the UI to show what is the entrypoint + source: "__TRIGGER__", + target: nodeIdCheckAmount, + }, + { + id: UlidMonotonic.generate().toCanonical(), + // __TRIGGER__ is a special node. It doesn't appear directly in the task data, but it should be draw on the UI to show what is the entrypoint + source: `${nodeIdCheckAmount}.${branchIdCheckAmount}`, + target: nodeIdNotification, + }, + ], + + trigger, + start_at: Math.floor(Date.now() / 1000) + 30, + expired_at: Math.floor(Date.now() / 1000 + 3600 * 24 * 30), + memo: `Montoring large token transfer for ${target}`, + }, + metadata + ); + + console.log("create task", result); + + return result; +} + (async () => { try { main(process.argv[2]); diff --git a/examples/static_codegen/avs_grpc_pb.js b/examples/static_codegen/avs_grpc_pb.js index 25d3e951..f788a2d7 100644 --- a/examples/static_codegen/avs_grpc_pb.js +++ b/examples/static_codegen/avs_grpc_pb.js @@ -6,6 +6,17 @@ var avs_pb = require('./avs_pb.js'); var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); var google_protobuf_wrappers_pb = require('google-protobuf/google/protobuf/wrappers_pb.js'); +function serialize_aggregator_AckMessageReq(arg) { + if (!(arg instanceof avs_pb.AckMessageReq)) { + throw new Error('Expected argument of type aggregator.AckMessageReq'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_aggregator_AckMessageReq(buffer_arg) { + return avs_pb.AckMessageReq.deserializeBinary(new Uint8Array(buffer_arg)); +} + function serialize_aggregator_Checkin(arg) { if (!(arg instanceof avs_pb.Checkin)) { throw new Error('Expected argument of type aggregator.Checkin'); @@ -171,59 +182,59 @@ function deserialize_aggregator_NonceResp(buffer_arg) { return avs_pb.NonceResp.deserializeBinary(new Uint8Array(buffer_arg)); } -function serialize_aggregator_SyncTasksReq(arg) { - if (!(arg instanceof avs_pb.SyncTasksReq)) { - throw new Error('Expected argument of type aggregator.SyncTasksReq'); +function serialize_aggregator_NotifyTriggersReq(arg) { + if (!(arg instanceof avs_pb.NotifyTriggersReq)) { + throw new Error('Expected argument of type aggregator.NotifyTriggersReq'); } return Buffer.from(arg.serializeBinary()); } -function deserialize_aggregator_SyncTasksReq(buffer_arg) { - return avs_pb.SyncTasksReq.deserializeBinary(new Uint8Array(buffer_arg)); +function deserialize_aggregator_NotifyTriggersReq(buffer_arg) { + return avs_pb.NotifyTriggersReq.deserializeBinary(new Uint8Array(buffer_arg)); } -function serialize_aggregator_SyncTasksResp(arg) { - if (!(arg instanceof avs_pb.SyncTasksResp)) { - throw new Error('Expected argument of type aggregator.SyncTasksResp'); +function serialize_aggregator_NotifyTriggersResp(arg) { + if (!(arg instanceof avs_pb.NotifyTriggersResp)) { + throw new Error('Expected argument of type aggregator.NotifyTriggersResp'); } return Buffer.from(arg.serializeBinary()); } -function deserialize_aggregator_SyncTasksResp(buffer_arg) { - return avs_pb.SyncTasksResp.deserializeBinary(new Uint8Array(buffer_arg)); +function deserialize_aggregator_NotifyTriggersResp(buffer_arg) { + return avs_pb.NotifyTriggersResp.deserializeBinary(new Uint8Array(buffer_arg)); } -function serialize_aggregator_Task(arg) { - if (!(arg instanceof avs_pb.Task)) { - throw new Error('Expected argument of type aggregator.Task'); +function serialize_aggregator_SyncMessagesReq(arg) { + if (!(arg instanceof avs_pb.SyncMessagesReq)) { + throw new Error('Expected argument of type aggregator.SyncMessagesReq'); } return Buffer.from(arg.serializeBinary()); } -function deserialize_aggregator_Task(buffer_arg) { - return avs_pb.Task.deserializeBinary(new Uint8Array(buffer_arg)); +function deserialize_aggregator_SyncMessagesReq(buffer_arg) { + return avs_pb.SyncMessagesReq.deserializeBinary(new Uint8Array(buffer_arg)); } -function serialize_aggregator_UpdateChecksReq(arg) { - if (!(arg instanceof avs_pb.UpdateChecksReq)) { - throw new Error('Expected argument of type aggregator.UpdateChecksReq'); +function serialize_aggregator_SyncMessagesResp(arg) { + if (!(arg instanceof avs_pb.SyncMessagesResp)) { + throw new Error('Expected argument of type aggregator.SyncMessagesResp'); } return Buffer.from(arg.serializeBinary()); } -function deserialize_aggregator_UpdateChecksReq(buffer_arg) { - return avs_pb.UpdateChecksReq.deserializeBinary(new Uint8Array(buffer_arg)); +function deserialize_aggregator_SyncMessagesResp(buffer_arg) { + return avs_pb.SyncMessagesResp.deserializeBinary(new Uint8Array(buffer_arg)); } -function serialize_aggregator_UpdateChecksResp(arg) { - if (!(arg instanceof avs_pb.UpdateChecksResp)) { - throw new Error('Expected argument of type aggregator.UpdateChecksResp'); +function serialize_aggregator_Task(arg) { + if (!(arg instanceof avs_pb.Task)) { + throw new Error('Expected argument of type aggregator.Task'); } return Buffer.from(arg.serializeBinary()); } -function deserialize_aggregator_UpdateChecksResp(buffer_arg) { - return avs_pb.UpdateChecksResp.deserializeBinary(new Uint8Array(buffer_arg)); +function deserialize_aggregator_Task(buffer_arg) { + return avs_pb.Task.deserializeBinary(new Uint8Array(buffer_arg)); } function serialize_google_protobuf_BoolValue(arg) { @@ -341,9 +352,13 @@ createTask: { responseSerialize: serialize_google_protobuf_BoolValue, responseDeserialize: deserialize_google_protobuf_BoolValue, }, +}; + +exports.AggregatorClient = grpc.makeGenericClientConstructor(AggregatorService); +var NodeService = exports.NodeService = { // Operator endpoint ping: { - path: '/aggregator.Aggregator/Ping', + path: '/aggregator.Node/Ping', requestStream: false, responseStream: false, requestType: avs_pb.Checkin, @@ -353,28 +368,39 @@ ping: { responseSerialize: serialize_aggregator_CheckinResp, responseDeserialize: deserialize_aggregator_CheckinResp, }, - syncTasks: { - path: '/aggregator.Aggregator/SyncTasks', + syncMessages: { + path: '/aggregator.Node/SyncMessages', requestStream: false, responseStream: true, - requestType: avs_pb.SyncTasksReq, - responseType: avs_pb.SyncTasksResp, - requestSerialize: serialize_aggregator_SyncTasksReq, - requestDeserialize: deserialize_aggregator_SyncTasksReq, - responseSerialize: serialize_aggregator_SyncTasksResp, - responseDeserialize: deserialize_aggregator_SyncTasksResp, + requestType: avs_pb.SyncMessagesReq, + responseType: avs_pb.SyncMessagesResp, + requestSerialize: serialize_aggregator_SyncMessagesReq, + requestDeserialize: deserialize_aggregator_SyncMessagesReq, + responseSerialize: serialize_aggregator_SyncMessagesResp, + responseDeserialize: deserialize_aggregator_SyncMessagesResp, }, - updateChecks: { - path: '/aggregator.Aggregator/UpdateChecks', + ack: { + path: '/aggregator.Node/Ack', requestStream: false, responseStream: false, - requestType: avs_pb.UpdateChecksReq, - responseType: avs_pb.UpdateChecksResp, - requestSerialize: serialize_aggregator_UpdateChecksReq, - requestDeserialize: deserialize_aggregator_UpdateChecksReq, - responseSerialize: serialize_aggregator_UpdateChecksResp, - responseDeserialize: deserialize_aggregator_UpdateChecksResp, + requestType: avs_pb.AckMessageReq, + responseType: google_protobuf_wrappers_pb.BoolValue, + requestSerialize: serialize_aggregator_AckMessageReq, + requestDeserialize: deserialize_aggregator_AckMessageReq, + responseSerialize: serialize_google_protobuf_BoolValue, + responseDeserialize: deserialize_google_protobuf_BoolValue, + }, + notifyTriggers: { + path: '/aggregator.Node/NotifyTriggers', + requestStream: false, + responseStream: false, + requestType: avs_pb.NotifyTriggersReq, + responseType: avs_pb.NotifyTriggersResp, + requestSerialize: serialize_aggregator_NotifyTriggersReq, + requestDeserialize: deserialize_aggregator_NotifyTriggersReq, + responseSerialize: serialize_aggregator_NotifyTriggersResp, + responseDeserialize: deserialize_aggregator_NotifyTriggersResp, }, }; -exports.AggregatorClient = grpc.makeGenericClientConstructor(AggregatorService); +exports.NodeClient = grpc.makeGenericClientConstructor(NodeService); diff --git a/examples/static_codegen/avs_pb.js b/examples/static_codegen/avs_pb.js index 57ec5796..ca67c289 100644 --- a/examples/static_codegen/avs_pb.js +++ b/examples/static_codegen/avs_pb.js @@ -25,6 +25,7 @@ var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/time goog.object.extend(proto, google_protobuf_timestamp_pb); var google_protobuf_wrappers_pb = require('google-protobuf/google/protobuf/wrappers_pb.js'); goog.object.extend(proto, google_protobuf_wrappers_pb); +goog.exportSymbol('proto.aggregator.AckMessageReq', null, global); goog.exportSymbol('proto.aggregator.BlockCondition', null, global); goog.exportSymbol('proto.aggregator.BranchNode', null, global); goog.exportSymbol('proto.aggregator.Checkin', null, global); @@ -38,12 +39,13 @@ goog.exportSymbol('proto.aggregator.CreateTaskResp', null, global); goog.exportSymbol('proto.aggregator.CreateWalletReq', null, global); goog.exportSymbol('proto.aggregator.CreateWalletResp', null, global); goog.exportSymbol('proto.aggregator.CronCondition', null, global); +goog.exportSymbol('proto.aggregator.CustomCodeLang', null, global); goog.exportSymbol('proto.aggregator.CustomCodeNode', null, global); -goog.exportSymbol('proto.aggregator.CustomCodeType', null, global); goog.exportSymbol('proto.aggregator.ETHTransferNode', null, global); goog.exportSymbol('proto.aggregator.Error', null, global); goog.exportSymbol('proto.aggregator.EventCondition', null, global); goog.exportSymbol('proto.aggregator.Execution', null, global); +goog.exportSymbol('proto.aggregator.Execution.Step', null, global); goog.exportSymbol('proto.aggregator.FilterNode', null, global); goog.exportSymbol('proto.aggregator.FixedEpochCondition', null, global); goog.exportSymbol('proto.aggregator.GetKeyReq', null, global); @@ -55,12 +57,17 @@ goog.exportSymbol('proto.aggregator.ListTasksResp', null, global); goog.exportSymbol('proto.aggregator.ListWalletReq', null, global); goog.exportSymbol('proto.aggregator.ListWalletResp', null, global); goog.exportSymbol('proto.aggregator.LoopNode', null, global); +goog.exportSymbol('proto.aggregator.LoopNode.RunnerCase', null, global); +goog.exportSymbol('proto.aggregator.MessageOp', null, global); goog.exportSymbol('proto.aggregator.NonceRequest', null, global); goog.exportSymbol('proto.aggregator.NonceResp', null, global); +goog.exportSymbol('proto.aggregator.NotifyTriggersReq', null, global); +goog.exportSymbol('proto.aggregator.NotifyTriggersResp', null, global); goog.exportSymbol('proto.aggregator.RestAPINode', null, global); goog.exportSymbol('proto.aggregator.SmartWallet', null, global); -goog.exportSymbol('proto.aggregator.SyncTasksReq', null, global); -goog.exportSymbol('proto.aggregator.SyncTasksResp', null, global); +goog.exportSymbol('proto.aggregator.SyncMessagesReq', null, global); +goog.exportSymbol('proto.aggregator.SyncMessagesResp', null, global); +goog.exportSymbol('proto.aggregator.SyncMessagesResp.TaskMetadata', null, global); goog.exportSymbol('proto.aggregator.Task', null, global); goog.exportSymbol('proto.aggregator.TaskEdge', null, global); goog.exportSymbol('proto.aggregator.TaskNode', null, global); @@ -68,8 +75,7 @@ goog.exportSymbol('proto.aggregator.TaskNode.TaskTypeCase', null, global); goog.exportSymbol('proto.aggregator.TaskStatus', null, global); goog.exportSymbol('proto.aggregator.TaskTrigger', null, global); goog.exportSymbol('proto.aggregator.TaskTrigger.TriggerTypeCase', null, global); -goog.exportSymbol('proto.aggregator.UpdateChecksReq', null, global); -goog.exportSymbol('proto.aggregator.UpdateChecksResp', null, global); +goog.exportSymbol('proto.aggregator.TriggerMark', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -164,16 +170,79 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.SyncTasksReq = function(opt_data) { +proto.aggregator.SyncMessagesReq = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.aggregator.SyncTasksReq, jspb.Message); +goog.inherits(proto.aggregator.SyncMessagesReq, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.aggregator.SyncTasksReq.displayName = 'proto.aggregator.SyncTasksReq'; + proto.aggregator.SyncMessagesReq.displayName = 'proto.aggregator.SyncMessagesReq'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.aggregator.SyncMessagesResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.aggregator.SyncMessagesResp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.aggregator.SyncMessagesResp.displayName = 'proto.aggregator.SyncMessagesResp'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.aggregator.SyncMessagesResp.TaskMetadata = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.aggregator.SyncMessagesResp.TaskMetadata, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.aggregator.SyncMessagesResp.TaskMetadata.displayName = 'proto.aggregator.SyncMessagesResp.TaskMetadata'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.aggregator.AckMessageReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.aggregator.AckMessageReq, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.aggregator.AckMessageReq.displayName = 'proto.aggregator.AckMessageReq'; } /** * Generated by JsPbCodeGenerator. @@ -280,27 +349,6 @@ if (goog.DEBUG && !COMPILED) { */ proto.aggregator.TaskTrigger.displayName = 'proto.aggregator.TaskTrigger'; } -/** - * Generated by JsPbCodeGenerator. - * @param {Array=} opt_data Optional initial data array, typically from a - * server response, or constructed directly in Javascript. The array is used - * in place and becomes part of the constructed object. It is not cloned. - * If no data is provided, the constructed object will be empty, but still - * valid. - * @extends {jspb.Message} - * @constructor - */ -proto.aggregator.SyncTasksResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); -}; -goog.inherits(proto.aggregator.SyncTasksResp, jspb.Message); -if (goog.DEBUG && !COMPILED) { - /** - * @public - * @override - */ - proto.aggregator.SyncTasksResp.displayName = 'proto.aggregator.SyncTasksResp'; -} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -501,7 +549,7 @@ if (goog.DEBUG && !COMPILED) { * @constructor */ proto.aggregator.LoopNode = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.aggregator.LoopNode.oneofGroups_); }; goog.inherits(proto.aggregator.LoopNode, jspb.Message); if (goog.DEBUG && !COMPILED) { @@ -564,7 +612,7 @@ if (goog.DEBUG && !COMPILED) { * @constructor */ proto.aggregator.Execution = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); + jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.Execution.repeatedFields_, null); }; goog.inherits(proto.aggregator.Execution, jspb.Message); if (goog.DEBUG && !COMPILED) { @@ -574,6 +622,27 @@ if (goog.DEBUG && !COMPILED) { */ proto.aggregator.Execution.displayName = 'proto.aggregator.Execution'; } +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.aggregator.Execution.Step = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.aggregator.Execution.Step, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.aggregator.Execution.Step.displayName = 'proto.aggregator.Execution.Step'; +} /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -836,16 +905,37 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.UpdateChecksReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.UpdateChecksReq.repeatedFields_, null); +proto.aggregator.TriggerMark = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.aggregator.TriggerMark, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.aggregator.TriggerMark.displayName = 'proto.aggregator.TriggerMark'; +} +/** + * Generated by JsPbCodeGenerator. + * @param {Array=} opt_data Optional initial data array, typically from a + * server response, or constructed directly in Javascript. The array is used + * in place and becomes part of the constructed object. It is not cloned. + * If no data is provided, the constructed object will be empty, but still + * valid. + * @extends {jspb.Message} + * @constructor + */ +proto.aggregator.NotifyTriggersReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.aggregator.UpdateChecksReq, jspb.Message); +goog.inherits(proto.aggregator.NotifyTriggersReq, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.aggregator.UpdateChecksReq.displayName = 'proto.aggregator.UpdateChecksReq'; + proto.aggregator.NotifyTriggersReq.displayName = 'proto.aggregator.NotifyTriggersReq'; } /** * Generated by JsPbCodeGenerator. @@ -857,16 +947,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.UpdateChecksResp = function(opt_data) { +proto.aggregator.NotifyTriggersResp = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.aggregator.UpdateChecksResp, jspb.Message); +goog.inherits(proto.aggregator.NotifyTriggersResp, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.aggregator.UpdateChecksResp.displayName = 'proto.aggregator.UpdateChecksResp'; + proto.aggregator.NotifyTriggersResp.displayName = 'proto.aggregator.NotifyTriggersResp'; } /** * Generated by JsPbCodeGenerator. @@ -1749,8 +1839,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.aggregator.SyncTasksReq.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.SyncTasksReq.toObject(opt_includeInstance, this); +proto.aggregator.SyncMessagesReq.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.SyncMessagesReq.toObject(opt_includeInstance, this); }; @@ -1759,15 +1849,15 @@ proto.aggregator.SyncTasksReq.prototype.toObject = function(opt_includeInstance) * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.aggregator.SyncTasksReq} msg The msg instance to transform. + * @param {!proto.aggregator.SyncMessagesReq} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.SyncTasksReq.toObject = function(includeInstance, msg) { +proto.aggregator.SyncMessagesReq.toObject = function(includeInstance, msg) { var f, obj = { id: jspb.Message.getFieldWithDefault(msg, 1, ""), address: jspb.Message.getFieldWithDefault(msg, 2, ""), - signature: jspb.Message.getFieldWithDefault(msg, 3, ""), + signature: msg.getSignature_asB64(), monotonicClock: jspb.Message.getFieldWithDefault(msg, 4, 0) }; @@ -1782,23 +1872,23 @@ proto.aggregator.SyncTasksReq.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.SyncTasksReq} + * @return {!proto.aggregator.SyncMessagesReq} */ -proto.aggregator.SyncTasksReq.deserializeBinary = function(bytes) { +proto.aggregator.SyncMessagesReq.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.SyncTasksReq; - return proto.aggregator.SyncTasksReq.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.SyncMessagesReq; + return proto.aggregator.SyncMessagesReq.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.aggregator.SyncTasksReq} msg The message object to deserialize into. + * @param {!proto.aggregator.SyncMessagesReq} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.SyncTasksReq} + * @return {!proto.aggregator.SyncMessagesReq} */ -proto.aggregator.SyncTasksReq.deserializeBinaryFromReader = function(msg, reader) { +proto.aggregator.SyncMessagesReq.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1814,7 +1904,7 @@ proto.aggregator.SyncTasksReq.deserializeBinaryFromReader = function(msg, reader msg.setAddress(value); break; case 3: - var value = /** @type {string} */ (reader.readString()); + var value = /** @type {!Uint8Array} */ (reader.readBytes()); msg.setSignature(value); break; case 4: @@ -1834,9 +1924,9 @@ proto.aggregator.SyncTasksReq.deserializeBinaryFromReader = function(msg, reader * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.SyncTasksReq.prototype.serializeBinary = function() { +proto.aggregator.SyncMessagesReq.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.SyncTasksReq.serializeBinaryToWriter(this, writer); + proto.aggregator.SyncMessagesReq.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -1844,11 +1934,11 @@ proto.aggregator.SyncTasksReq.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.SyncTasksReq} message + * @param {!proto.aggregator.SyncMessagesReq} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.SyncTasksReq.serializeBinaryToWriter = function(message, writer) { +proto.aggregator.SyncMessagesReq.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getId(); if (f.length > 0) { @@ -1864,9 +1954,9 @@ proto.aggregator.SyncTasksReq.serializeBinaryToWriter = function(message, writer f ); } - f = message.getSignature(); + f = message.getSignature_asU8(); if (f.length > 0) { - writer.writeString( + writer.writeBytes( 3, f ); @@ -1885,16 +1975,16 @@ proto.aggregator.SyncTasksReq.serializeBinaryToWriter = function(message, writer * optional string id = 1; * @return {string} */ -proto.aggregator.SyncTasksReq.prototype.getId = function() { +proto.aggregator.SyncMessagesReq.prototype.getId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.aggregator.SyncTasksReq} returns this + * @return {!proto.aggregator.SyncMessagesReq} returns this */ -proto.aggregator.SyncTasksReq.prototype.setId = function(value) { +proto.aggregator.SyncMessagesReq.prototype.setId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; @@ -1903,35 +1993,59 @@ proto.aggregator.SyncTasksReq.prototype.setId = function(value) { * optional string address = 2; * @return {string} */ -proto.aggregator.SyncTasksReq.prototype.getAddress = function() { +proto.aggregator.SyncMessagesReq.prototype.getAddress = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @return {!proto.aggregator.SyncTasksReq} returns this + * @return {!proto.aggregator.SyncMessagesReq} returns this */ -proto.aggregator.SyncTasksReq.prototype.setAddress = function(value) { +proto.aggregator.SyncMessagesReq.prototype.setAddress = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; /** - * optional string signature = 3; + * optional bytes signature = 3; + * @return {!(string|Uint8Array)} + */ +proto.aggregator.SyncMessagesReq.prototype.getSignature = function() { + return /** @type {!(string|Uint8Array)} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * optional bytes signature = 3; + * This is a type-conversion wrapper around `getSignature()` * @return {string} */ -proto.aggregator.SyncTasksReq.prototype.getSignature = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.aggregator.SyncMessagesReq.prototype.getSignature_asB64 = function() { + return /** @type {string} */ (jspb.Message.bytesAsB64( + this.getSignature())); }; /** - * @param {string} value - * @return {!proto.aggregator.SyncTasksReq} returns this + * optional bytes signature = 3; + * Note that Uint8Array is not supported on all browsers. + * @see http://caniuse.com/Uint8Array + * This is a type-conversion wrapper around `getSignature()` + * @return {!Uint8Array} */ -proto.aggregator.SyncTasksReq.prototype.setSignature = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); +proto.aggregator.SyncMessagesReq.prototype.getSignature_asU8 = function() { + return /** @type {!Uint8Array} */ (jspb.Message.bytesAsU8( + this.getSignature())); +}; + + +/** + * @param {!(string|Uint8Array)} value + * @return {!proto.aggregator.SyncMessagesReq} returns this + */ +proto.aggregator.SyncMessagesReq.prototype.setSignature = function(value) { + return jspb.Message.setProto3BytesField(this, 3, value); }; @@ -1939,28 +2053,21 @@ proto.aggregator.SyncTasksReq.prototype.setSignature = function(value) { * optional int64 monotonic_clock = 4; * @return {number} */ -proto.aggregator.SyncTasksReq.prototype.getMonotonicClock = function() { +proto.aggregator.SyncMessagesReq.prototype.getMonotonicClock = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** * @param {number} value - * @return {!proto.aggregator.SyncTasksReq} returns this + * @return {!proto.aggregator.SyncMessagesReq} returns this */ -proto.aggregator.SyncTasksReq.prototype.setMonotonicClock = function(value) { +proto.aggregator.SyncMessagesReq.prototype.setMonotonicClock = function(value) { return jspb.Message.setProto3IntField(this, 4, value); }; -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.aggregator.FixedEpochCondition.repeatedFields_ = [1]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -1976,8 +2083,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.aggregator.FixedEpochCondition.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.FixedEpochCondition.toObject(opt_includeInstance, this); +proto.aggregator.SyncMessagesResp.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.SyncMessagesResp.toObject(opt_includeInstance, this); }; @@ -1986,13 +2093,15 @@ proto.aggregator.FixedEpochCondition.prototype.toObject = function(opt_includeIn * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.aggregator.FixedEpochCondition} msg The msg instance to transform. + * @param {!proto.aggregator.SyncMessagesResp} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.FixedEpochCondition.toObject = function(includeInstance, msg) { +proto.aggregator.SyncMessagesResp.toObject = function(includeInstance, msg) { var f, obj = { - epochsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + op: jspb.Message.getFieldWithDefault(msg, 2, 0), + taskMetadata: (f = msg.getTaskMetadata()) && proto.aggregator.SyncMessagesResp.TaskMetadata.toObject(includeInstance, f) }; if (includeInstance) { @@ -2006,23 +2115,23 @@ proto.aggregator.FixedEpochCondition.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.FixedEpochCondition} + * @return {!proto.aggregator.SyncMessagesResp} */ -proto.aggregator.FixedEpochCondition.deserializeBinary = function(bytes) { +proto.aggregator.SyncMessagesResp.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.FixedEpochCondition; - return proto.aggregator.FixedEpochCondition.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.SyncMessagesResp; + return proto.aggregator.SyncMessagesResp.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.aggregator.FixedEpochCondition} msg The message object to deserialize into. + * @param {!proto.aggregator.SyncMessagesResp} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.FixedEpochCondition} + * @return {!proto.aggregator.SyncMessagesResp} */ -proto.aggregator.FixedEpochCondition.deserializeBinaryFromReader = function(msg, reader) { +proto.aggregator.SyncMessagesResp.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2030,10 +2139,17 @@ proto.aggregator.FixedEpochCondition.deserializeBinaryFromReader = function(msg, var field = reader.getFieldNumber(); switch (field) { case 1: - var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedInt64() : [reader.readInt64()]); - for (var i = 0; i < values.length; i++) { - msg.addEpochs(values[i]); - } + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + case 2: + var value = /** @type {!proto.aggregator.MessageOp} */ (reader.readEnum()); + msg.setOp(value); + break; + case 3: + var value = new proto.aggregator.SyncMessagesResp.TaskMetadata; + reader.readMessage(value,proto.aggregator.SyncMessagesResp.TaskMetadata.deserializeBinaryFromReader); + msg.setTaskMetadata(value); break; default: reader.skipField(); @@ -2048,9 +2164,9 @@ proto.aggregator.FixedEpochCondition.deserializeBinaryFromReader = function(msg, * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.FixedEpochCondition.prototype.serializeBinary = function() { +proto.aggregator.SyncMessagesResp.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.FixedEpochCondition.serializeBinaryToWriter(this, writer); + proto.aggregator.SyncMessagesResp.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2058,66 +2174,37 @@ proto.aggregator.FixedEpochCondition.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.FixedEpochCondition} message + * @param {!proto.aggregator.SyncMessagesResp} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.FixedEpochCondition.serializeBinaryToWriter = function(message, writer) { +proto.aggregator.SyncMessagesResp.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getEpochsList(); + f = message.getId(); if (f.length > 0) { - writer.writePackedInt64( + writer.writeString( 1, f ); } + f = message.getOp(); + if (f !== 0.0) { + writer.writeEnum( + 2, + f + ); + } + f = message.getTaskMetadata(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.aggregator.SyncMessagesResp.TaskMetadata.serializeBinaryToWriter + ); + } }; -/** - * repeated int64 epochs = 1; - * @return {!Array} - */ -proto.aggregator.FixedEpochCondition.prototype.getEpochsList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.aggregator.FixedEpochCondition} returns this - */ -proto.aggregator.FixedEpochCondition.prototype.setEpochsList = function(value) { - return jspb.Message.setField(this, 1, value || []); -}; - - -/** - * @param {number} value - * @param {number=} opt_index - * @return {!proto.aggregator.FixedEpochCondition} returns this - */ -proto.aggregator.FixedEpochCondition.prototype.addEpochs = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.aggregator.FixedEpochCondition} returns this - */ -proto.aggregator.FixedEpochCondition.prototype.clearEpochsList = function() { - return this.setEpochsList([]); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.aggregator.CronCondition.repeatedFields_ = [1]; @@ -2134,8 +2221,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.aggregator.CronCondition.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.CronCondition.toObject(opt_includeInstance, this); +proto.aggregator.SyncMessagesResp.TaskMetadata.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.SyncMessagesResp.TaskMetadata.toObject(opt_includeInstance, this); }; @@ -2144,13 +2231,16 @@ proto.aggregator.CronCondition.prototype.toObject = function(opt_includeInstance * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.aggregator.CronCondition} msg The msg instance to transform. + * @param {!proto.aggregator.SyncMessagesResp.TaskMetadata} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.CronCondition.toObject = function(includeInstance, msg) { +proto.aggregator.SyncMessagesResp.TaskMetadata.toObject = function(includeInstance, msg) { var f, obj = { - scheduleList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f + taskId: jspb.Message.getFieldWithDefault(msg, 1, ""), + remain: jspb.Message.getFieldWithDefault(msg, 2, 0), + expiredAt: jspb.Message.getFieldWithDefault(msg, 3, 0), + trigger: (f = msg.getTrigger()) && proto.aggregator.TaskTrigger.toObject(includeInstance, f) }; if (includeInstance) { @@ -2164,23 +2254,23 @@ proto.aggregator.CronCondition.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.CronCondition} + * @return {!proto.aggregator.SyncMessagesResp.TaskMetadata} */ -proto.aggregator.CronCondition.deserializeBinary = function(bytes) { +proto.aggregator.SyncMessagesResp.TaskMetadata.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.CronCondition; - return proto.aggregator.CronCondition.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.SyncMessagesResp.TaskMetadata; + return proto.aggregator.SyncMessagesResp.TaskMetadata.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.aggregator.CronCondition} msg The message object to deserialize into. + * @param {!proto.aggregator.SyncMessagesResp.TaskMetadata} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.CronCondition} + * @return {!proto.aggregator.SyncMessagesResp.TaskMetadata} */ -proto.aggregator.CronCondition.deserializeBinaryFromReader = function(msg, reader) { +proto.aggregator.SyncMessagesResp.TaskMetadata.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2189,7 +2279,20 @@ proto.aggregator.CronCondition.deserializeBinaryFromReader = function(msg, reade switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.addSchedule(value); + msg.setTaskId(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setRemain(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setExpiredAt(value); + break; + case 4: + var value = new proto.aggregator.TaskTrigger; + reader.readMessage(value,proto.aggregator.TaskTrigger.deserializeBinaryFromReader); + msg.setTrigger(value); break; default: reader.skipField(); @@ -2204,9 +2307,9 @@ proto.aggregator.CronCondition.deserializeBinaryFromReader = function(msg, reade * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.CronCondition.prototype.serializeBinary = function() { +proto.aggregator.SyncMessagesResp.TaskMetadata.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.CronCondition.serializeBinaryToWriter(this, writer); + proto.aggregator.SyncMessagesResp.TaskMetadata.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2214,186 +2317,205 @@ proto.aggregator.CronCondition.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.CronCondition} message + * @param {!proto.aggregator.SyncMessagesResp.TaskMetadata} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.CronCondition.serializeBinaryToWriter = function(message, writer) { +proto.aggregator.SyncMessagesResp.TaskMetadata.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getScheduleList(); + f = message.getTaskId(); if (f.length > 0) { - writer.writeRepeatedString( + writer.writeString( 1, f ); } + f = message.getRemain(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getExpiredAt(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getTrigger(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.aggregator.TaskTrigger.serializeBinaryToWriter + ); + } }; /** - * repeated string schedule = 1; - * @return {!Array} + * optional string task_id = 1; + * @return {string} */ -proto.aggregator.CronCondition.prototype.getScheduleList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +proto.aggregator.SyncMessagesResp.TaskMetadata.prototype.getTaskId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {!Array} value - * @return {!proto.aggregator.CronCondition} returns this + * @param {string} value + * @return {!proto.aggregator.SyncMessagesResp.TaskMetadata} returns this */ -proto.aggregator.CronCondition.prototype.setScheduleList = function(value) { - return jspb.Message.setField(this, 1, value || []); +proto.aggregator.SyncMessagesResp.TaskMetadata.prototype.setTaskId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; /** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.aggregator.CronCondition} returns this + * optional int64 remain = 2; + * @return {number} */ -proto.aggregator.CronCondition.prototype.addSchedule = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +proto.aggregator.SyncMessagesResp.TaskMetadata.prototype.getRemain = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.aggregator.CronCondition} returns this + * @param {number} value + * @return {!proto.aggregator.SyncMessagesResp.TaskMetadata} returns this */ -proto.aggregator.CronCondition.prototype.clearScheduleList = function() { - return this.setScheduleList([]); +proto.aggregator.SyncMessagesResp.TaskMetadata.prototype.setRemain = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; +/** + * optional int64 expired_at = 3; + * @return {number} + */ +proto.aggregator.SyncMessagesResp.TaskMetadata.prototype.getExpiredAt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; +/** + * @param {number} value + * @return {!proto.aggregator.SyncMessagesResp.TaskMetadata} returns this + */ +proto.aggregator.SyncMessagesResp.TaskMetadata.prototype.setExpiredAt = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + -if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} + * optional TaskTrigger trigger = 4; + * @return {?proto.aggregator.TaskTrigger} */ -proto.aggregator.BlockCondition.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.BlockCondition.toObject(opt_includeInstance, this); +proto.aggregator.SyncMessagesResp.TaskMetadata.prototype.getTrigger = function() { + return /** @type{?proto.aggregator.TaskTrigger} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.TaskTrigger, 4)); }; /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.aggregator.BlockCondition} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * @param {?proto.aggregator.TaskTrigger|undefined} value + * @return {!proto.aggregator.SyncMessagesResp.TaskMetadata} returns this +*/ +proto.aggregator.SyncMessagesResp.TaskMetadata.prototype.setTrigger = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.aggregator.SyncMessagesResp.TaskMetadata} returns this */ -proto.aggregator.BlockCondition.toObject = function(includeInstance, msg) { - var f, obj = { - interval: jspb.Message.getFieldWithDefault(msg, 1, 0) - }; +proto.aggregator.SyncMessagesResp.TaskMetadata.prototype.clearTrigger = function() { + return this.setTrigger(undefined); +}; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.aggregator.SyncMessagesResp.TaskMetadata.prototype.hasTrigger = function() { + return jspb.Message.getField(this, 4) != null; }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.BlockCondition} + * optional string id = 1; + * @return {string} */ -proto.aggregator.BlockCondition.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.BlockCondition; - return proto.aggregator.BlockCondition.deserializeBinaryFromReader(msg, reader); +proto.aggregator.SyncMessagesResp.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.aggregator.BlockCondition} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.BlockCondition} + * @param {string} value + * @return {!proto.aggregator.SyncMessagesResp} returns this */ -proto.aggregator.BlockCondition.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt64()); - msg.setInterval(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.aggregator.SyncMessagesResp.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * optional MessageOp op = 2; + * @return {!proto.aggregator.MessageOp} */ -proto.aggregator.BlockCondition.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.BlockCondition.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.aggregator.SyncMessagesResp.prototype.getOp = function() { + return /** @type {!proto.aggregator.MessageOp} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.BlockCondition} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * @param {!proto.aggregator.MessageOp} value + * @return {!proto.aggregator.SyncMessagesResp} returns this */ -proto.aggregator.BlockCondition.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getInterval(); - if (f !== 0) { - writer.writeInt64( - 1, - f - ); - } +proto.aggregator.SyncMessagesResp.prototype.setOp = function(value) { + return jspb.Message.setProto3EnumField(this, 2, value); }; /** - * optional int64 interval = 1; - * @return {number} + * optional TaskMetadata task_metadata = 3; + * @return {?proto.aggregator.SyncMessagesResp.TaskMetadata} */ -proto.aggregator.BlockCondition.prototype.getInterval = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.aggregator.SyncMessagesResp.prototype.getTaskMetadata = function() { + return /** @type{?proto.aggregator.SyncMessagesResp.TaskMetadata} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.SyncMessagesResp.TaskMetadata, 3)); }; /** - * @param {number} value - * @return {!proto.aggregator.BlockCondition} returns this + * @param {?proto.aggregator.SyncMessagesResp.TaskMetadata|undefined} value + * @return {!proto.aggregator.SyncMessagesResp} returns this +*/ +proto.aggregator.SyncMessagesResp.prototype.setTaskMetadata = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.aggregator.SyncMessagesResp} returns this */ -proto.aggregator.BlockCondition.prototype.setInterval = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); +proto.aggregator.SyncMessagesResp.prototype.clearTaskMetadata = function() { + return this.setTaskMetadata(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.aggregator.SyncMessagesResp.prototype.hasTaskMetadata = function() { + return jspb.Message.getField(this, 3) != null; }; @@ -2413,8 +2535,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.aggregator.EventCondition.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.EventCondition.toObject(opt_includeInstance, this); +proto.aggregator.AckMessageReq.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.AckMessageReq.toObject(opt_includeInstance, this); }; @@ -2423,13 +2545,13 @@ proto.aggregator.EventCondition.prototype.toObject = function(opt_includeInstanc * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.aggregator.EventCondition} msg The msg instance to transform. + * @param {!proto.aggregator.AckMessageReq} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.EventCondition.toObject = function(includeInstance, msg) { +proto.aggregator.AckMessageReq.toObject = function(includeInstance, msg) { var f, obj = { - expression: jspb.Message.getFieldWithDefault(msg, 1, "") + id: jspb.Message.getFieldWithDefault(msg, 1, "") }; if (includeInstance) { @@ -2443,23 +2565,23 @@ proto.aggregator.EventCondition.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.EventCondition} + * @return {!proto.aggregator.AckMessageReq} */ -proto.aggregator.EventCondition.deserializeBinary = function(bytes) { +proto.aggregator.AckMessageReq.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.EventCondition; - return proto.aggregator.EventCondition.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.AckMessageReq; + return proto.aggregator.AckMessageReq.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.aggregator.EventCondition} msg The message object to deserialize into. + * @param {!proto.aggregator.AckMessageReq} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.EventCondition} + * @return {!proto.aggregator.AckMessageReq} */ -proto.aggregator.EventCondition.deserializeBinaryFromReader = function(msg, reader) { +proto.aggregator.AckMessageReq.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2468,7 +2590,7 @@ proto.aggregator.EventCondition.deserializeBinaryFromReader = function(msg, read switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setExpression(value); + msg.setId(value); break; default: reader.skipField(); @@ -2483,9 +2605,9 @@ proto.aggregator.EventCondition.deserializeBinaryFromReader = function(msg, read * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.EventCondition.prototype.serializeBinary = function() { +proto.aggregator.AckMessageReq.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.EventCondition.serializeBinaryToWriter(this, writer); + proto.aggregator.AckMessageReq.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2493,13 +2615,13 @@ proto.aggregator.EventCondition.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.EventCondition} message + * @param {!proto.aggregator.AckMessageReq} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.EventCondition.serializeBinaryToWriter = function(message, writer) { +proto.aggregator.AckMessageReq.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getExpression(); + f = message.getId(); if (f.length > 0) { writer.writeString( 1, @@ -2510,52 +2632,30 @@ proto.aggregator.EventCondition.serializeBinaryToWriter = function(message, writ /** - * optional string expression = 1; + * optional string id = 1; * @return {string} */ -proto.aggregator.EventCondition.prototype.getExpression = function() { +proto.aggregator.AckMessageReq.prototype.getId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.aggregator.EventCondition} returns this + * @return {!proto.aggregator.AckMessageReq} returns this */ -proto.aggregator.EventCondition.prototype.setExpression = function(value) { +proto.aggregator.AckMessageReq.prototype.setId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} + * List of repeated fields within this message type. + * @private {!Array} * @const */ -proto.aggregator.TaskTrigger.oneofGroups_ = [[1,2,3,4,5]]; - -/** - * @enum {number} - */ -proto.aggregator.TaskTrigger.TriggerTypeCase = { - TRIGGER_TYPE_NOT_SET: 0, - MANUAL: 1, - FIXED_TIME: 2, - CRON: 3, - BLOCK: 4, - EVENT: 5 -}; - -/** - * @return {proto.aggregator.TaskTrigger.TriggerTypeCase} - */ -proto.aggregator.TaskTrigger.prototype.getTriggerTypeCase = function() { - return /** @type {proto.aggregator.TaskTrigger.TriggerTypeCase} */(jspb.Message.computeOneofCase(this, proto.aggregator.TaskTrigger.oneofGroups_[0])); -}; +proto.aggregator.FixedEpochCondition.repeatedFields_ = [1]; @@ -2572,8 +2672,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.aggregator.TaskTrigger.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.TaskTrigger.toObject(opt_includeInstance, this); +proto.aggregator.FixedEpochCondition.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.FixedEpochCondition.toObject(opt_includeInstance, this); }; @@ -2582,17 +2682,13 @@ proto.aggregator.TaskTrigger.prototype.toObject = function(opt_includeInstance) * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.aggregator.TaskTrigger} msg The msg instance to transform. + * @param {!proto.aggregator.FixedEpochCondition} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.TaskTrigger.toObject = function(includeInstance, msg) { +proto.aggregator.FixedEpochCondition.toObject = function(includeInstance, msg) { var f, obj = { - manual: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), - fixedTime: (f = msg.getFixedTime()) && proto.aggregator.FixedEpochCondition.toObject(includeInstance, f), - cron: (f = msg.getCron()) && proto.aggregator.CronCondition.toObject(includeInstance, f), - block: (f = msg.getBlock()) && proto.aggregator.BlockCondition.toObject(includeInstance, f), - event: (f = msg.getEvent()) && proto.aggregator.EventCondition.toObject(includeInstance, f) + epochsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f }; if (includeInstance) { @@ -2606,23 +2702,23 @@ proto.aggregator.TaskTrigger.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.TaskTrigger} + * @return {!proto.aggregator.FixedEpochCondition} */ -proto.aggregator.TaskTrigger.deserializeBinary = function(bytes) { +proto.aggregator.FixedEpochCondition.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.TaskTrigger; - return proto.aggregator.TaskTrigger.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.FixedEpochCondition; + return proto.aggregator.FixedEpochCondition.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.aggregator.TaskTrigger} msg The message object to deserialize into. + * @param {!proto.aggregator.FixedEpochCondition} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.TaskTrigger} + * @return {!proto.aggregator.FixedEpochCondition} */ -proto.aggregator.TaskTrigger.deserializeBinaryFromReader = function(msg, reader) { +proto.aggregator.FixedEpochCondition.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2630,28 +2726,10 @@ proto.aggregator.TaskTrigger.deserializeBinaryFromReader = function(msg, reader) var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setManual(value); - break; - case 2: - var value = new proto.aggregator.FixedEpochCondition; - reader.readMessage(value,proto.aggregator.FixedEpochCondition.deserializeBinaryFromReader); - msg.setFixedTime(value); - break; - case 3: - var value = new proto.aggregator.CronCondition; - reader.readMessage(value,proto.aggregator.CronCondition.deserializeBinaryFromReader); - msg.setCron(value); - break; - case 4: - var value = new proto.aggregator.BlockCondition; - reader.readMessage(value,proto.aggregator.BlockCondition.deserializeBinaryFromReader); - msg.setBlock(value); - break; - case 5: - var value = new proto.aggregator.EventCondition; - reader.readMessage(value,proto.aggregator.EventCondition.deserializeBinaryFromReader); - msg.setEvent(value); + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedInt64() : [reader.readInt64()]); + for (var i = 0; i < values.length; i++) { + msg.addEpochs(values[i]); + } break; default: reader.skipField(); @@ -2666,9 +2744,9 @@ proto.aggregator.TaskTrigger.deserializeBinaryFromReader = function(msg, reader) * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.TaskTrigger.prototype.serializeBinary = function() { +proto.aggregator.FixedEpochCondition.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.TaskTrigger.serializeBinaryToWriter(this, writer); + proto.aggregator.FixedEpochCondition.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2676,238 +2754,66 @@ proto.aggregator.TaskTrigger.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.TaskTrigger} message + * @param {!proto.aggregator.FixedEpochCondition} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.TaskTrigger.serializeBinaryToWriter = function(message, writer) { +proto.aggregator.FixedEpochCondition.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = /** @type {boolean} */ (jspb.Message.getField(message, 1)); - if (f != null) { - writer.writeBool( + f = message.getEpochsList(); + if (f.length > 0) { + writer.writePackedInt64( 1, f ); } - f = message.getFixedTime(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.aggregator.FixedEpochCondition.serializeBinaryToWriter - ); - } - f = message.getCron(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.aggregator.CronCondition.serializeBinaryToWriter - ); - } - f = message.getBlock(); - if (f != null) { - writer.writeMessage( - 4, - f, - proto.aggregator.BlockCondition.serializeBinaryToWriter - ); - } - f = message.getEvent(); - if (f != null) { - writer.writeMessage( - 5, - f, - proto.aggregator.EventCondition.serializeBinaryToWriter - ); - } -}; - - -/** - * optional bool manual = 1; - * @return {boolean} - */ -proto.aggregator.TaskTrigger.prototype.getManual = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); -}; - - -/** - * @param {boolean} value - * @return {!proto.aggregator.TaskTrigger} returns this - */ -proto.aggregator.TaskTrigger.prototype.setManual = function(value) { - return jspb.Message.setOneofField(this, 1, proto.aggregator.TaskTrigger.oneofGroups_[0], value); -}; - - -/** - * Clears the field making it undefined. - * @return {!proto.aggregator.TaskTrigger} returns this - */ -proto.aggregator.TaskTrigger.prototype.clearManual = function() { - return jspb.Message.setOneofField(this, 1, proto.aggregator.TaskTrigger.oneofGroups_[0], undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.aggregator.TaskTrigger.prototype.hasManual = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional FixedEpochCondition fixed_time = 2; - * @return {?proto.aggregator.FixedEpochCondition} - */ -proto.aggregator.TaskTrigger.prototype.getFixedTime = function() { - return /** @type{?proto.aggregator.FixedEpochCondition} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.FixedEpochCondition, 2)); -}; - - -/** - * @param {?proto.aggregator.FixedEpochCondition|undefined} value - * @return {!proto.aggregator.TaskTrigger} returns this -*/ -proto.aggregator.TaskTrigger.prototype.setFixedTime = function(value) { - return jspb.Message.setOneofWrapperField(this, 2, proto.aggregator.TaskTrigger.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.aggregator.TaskTrigger} returns this - */ -proto.aggregator.TaskTrigger.prototype.clearFixedTime = function() { - return this.setFixedTime(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.aggregator.TaskTrigger.prototype.hasFixedTime = function() { - return jspb.Message.getField(this, 2) != null; -}; - - -/** - * optional CronCondition cron = 3; - * @return {?proto.aggregator.CronCondition} - */ -proto.aggregator.TaskTrigger.prototype.getCron = function() { - return /** @type{?proto.aggregator.CronCondition} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.CronCondition, 3)); -}; - - -/** - * @param {?proto.aggregator.CronCondition|undefined} value - * @return {!proto.aggregator.TaskTrigger} returns this -*/ -proto.aggregator.TaskTrigger.prototype.setCron = function(value) { - return jspb.Message.setOneofWrapperField(this, 3, proto.aggregator.TaskTrigger.oneofGroups_[0], value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.aggregator.TaskTrigger} returns this - */ -proto.aggregator.TaskTrigger.prototype.clearCron = function() { - return this.setCron(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.aggregator.TaskTrigger.prototype.hasCron = function() { - return jspb.Message.getField(this, 3) != null; }; /** - * optional BlockCondition block = 4; - * @return {?proto.aggregator.BlockCondition} + * repeated int64 epochs = 1; + * @return {!Array} */ -proto.aggregator.TaskTrigger.prototype.getBlock = function() { - return /** @type{?proto.aggregator.BlockCondition} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.BlockCondition, 4)); -}; - - -/** - * @param {?proto.aggregator.BlockCondition|undefined} value - * @return {!proto.aggregator.TaskTrigger} returns this -*/ -proto.aggregator.TaskTrigger.prototype.setBlock = function(value) { - return jspb.Message.setOneofWrapperField(this, 4, proto.aggregator.TaskTrigger.oneofGroups_[0], value); +proto.aggregator.FixedEpochCondition.prototype.getEpochsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); }; /** - * Clears the message field making it undefined. - * @return {!proto.aggregator.TaskTrigger} returns this + * @param {!Array} value + * @return {!proto.aggregator.FixedEpochCondition} returns this */ -proto.aggregator.TaskTrigger.prototype.clearBlock = function() { - return this.setBlock(undefined); +proto.aggregator.FixedEpochCondition.prototype.setEpochsList = function(value) { + return jspb.Message.setField(this, 1, value || []); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {number} value + * @param {number=} opt_index + * @return {!proto.aggregator.FixedEpochCondition} returns this */ -proto.aggregator.TaskTrigger.prototype.hasBlock = function() { - return jspb.Message.getField(this, 4) != null; +proto.aggregator.FixedEpochCondition.prototype.addEpochs = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); }; /** - * optional EventCondition event = 5; - * @return {?proto.aggregator.EventCondition} + * Clears the list making it empty but non-null. + * @return {!proto.aggregator.FixedEpochCondition} returns this */ -proto.aggregator.TaskTrigger.prototype.getEvent = function() { - return /** @type{?proto.aggregator.EventCondition} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.EventCondition, 5)); -}; - - -/** - * @param {?proto.aggregator.EventCondition|undefined} value - * @return {!proto.aggregator.TaskTrigger} returns this -*/ -proto.aggregator.TaskTrigger.prototype.setEvent = function(value) { - return jspb.Message.setOneofWrapperField(this, 5, proto.aggregator.TaskTrigger.oneofGroups_[0], value); +proto.aggregator.FixedEpochCondition.prototype.clearEpochsList = function() { + return this.setEpochsList([]); }; -/** - * Clears the message field making it undefined. - * @return {!proto.aggregator.TaskTrigger} returns this - */ -proto.aggregator.TaskTrigger.prototype.clearEvent = function() { - return this.setEvent(undefined); -}; - /** - * Returns whether this field is set. - * @return {boolean} + * List of repeated fields within this message type. + * @private {!Array} + * @const */ -proto.aggregator.TaskTrigger.prototype.hasEvent = function() { - return jspb.Message.getField(this, 5) != null; -}; - - +proto.aggregator.CronCondition.repeatedFields_ = [1]; @@ -2924,8 +2830,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.aggregator.SyncTasksResp.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.SyncTasksResp.toObject(opt_includeInstance, this); +proto.aggregator.CronCondition.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.CronCondition.toObject(opt_includeInstance, this); }; @@ -2934,15 +2840,13 @@ proto.aggregator.SyncTasksResp.prototype.toObject = function(opt_includeInstance * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.aggregator.SyncTasksResp} msg The msg instance to transform. + * @param {!proto.aggregator.CronCondition} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.SyncTasksResp.toObject = function(includeInstance, msg) { +proto.aggregator.CronCondition.toObject = function(includeInstance, msg) { var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, ""), - checktype: jspb.Message.getFieldWithDefault(msg, 2, ""), - trigger: (f = msg.getTrigger()) && proto.aggregator.TaskTrigger.toObject(includeInstance, f) + scheduleList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f }; if (includeInstance) { @@ -2956,23 +2860,23 @@ proto.aggregator.SyncTasksResp.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.SyncTasksResp} + * @return {!proto.aggregator.CronCondition} */ -proto.aggregator.SyncTasksResp.deserializeBinary = function(bytes) { +proto.aggregator.CronCondition.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.SyncTasksResp; - return proto.aggregator.SyncTasksResp.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.CronCondition; + return proto.aggregator.CronCondition.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.aggregator.SyncTasksResp} msg The message object to deserialize into. + * @param {!proto.aggregator.CronCondition} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.SyncTasksResp} + * @return {!proto.aggregator.CronCondition} */ -proto.aggregator.SyncTasksResp.deserializeBinaryFromReader = function(msg, reader) { +proto.aggregator.CronCondition.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2981,16 +2885,7 @@ proto.aggregator.SyncTasksResp.deserializeBinaryFromReader = function(msg, reade switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setId(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setChecktype(value); - break; - case 3: - var value = new proto.aggregator.TaskTrigger; - reader.readMessage(value,proto.aggregator.TaskTrigger.deserializeBinaryFromReader); - msg.setTrigger(value); + msg.addSchedule(value); break; default: reader.skipField(); @@ -3005,9 +2900,9 @@ proto.aggregator.SyncTasksResp.deserializeBinaryFromReader = function(msg, reade * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.SyncTasksResp.prototype.serializeBinary = function() { +proto.aggregator.CronCondition.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.SyncTasksResp.serializeBinaryToWriter(this, writer); + proto.aggregator.CronCondition.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3015,107 +2910,56 @@ proto.aggregator.SyncTasksResp.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.SyncTasksResp} message + * @param {!proto.aggregator.CronCondition} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.SyncTasksResp.serializeBinaryToWriter = function(message, writer) { +proto.aggregator.CronCondition.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getId(); + f = message.getScheduleList(); if (f.length > 0) { - writer.writeString( + writer.writeRepeatedString( 1, f ); } - f = message.getChecktype(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getTrigger(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.aggregator.TaskTrigger.serializeBinaryToWriter - ); - } -}; - - -/** - * optional string id = 1; - * @return {string} - */ -proto.aggregator.SyncTasksResp.prototype.getId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {string} value - * @return {!proto.aggregator.SyncTasksResp} returns this + * repeated string schedule = 1; + * @return {!Array} */ -proto.aggregator.SyncTasksResp.prototype.setId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); +proto.aggregator.CronCondition.prototype.getScheduleList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); }; /** - * optional string checkType = 2; - * @return {string} + * @param {!Array} value + * @return {!proto.aggregator.CronCondition} returns this */ -proto.aggregator.SyncTasksResp.prototype.getChecktype = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.aggregator.CronCondition.prototype.setScheduleList = function(value) { + return jspb.Message.setField(this, 1, value || []); }; /** * @param {string} value - * @return {!proto.aggregator.SyncTasksResp} returns this - */ -proto.aggregator.SyncTasksResp.prototype.setChecktype = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional TaskTrigger trigger = 3; - * @return {?proto.aggregator.TaskTrigger} - */ -proto.aggregator.SyncTasksResp.prototype.getTrigger = function() { - return /** @type{?proto.aggregator.TaskTrigger} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.TaskTrigger, 3)); -}; - - -/** - * @param {?proto.aggregator.TaskTrigger|undefined} value - * @return {!proto.aggregator.SyncTasksResp} returns this -*/ -proto.aggregator.SyncTasksResp.prototype.setTrigger = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.aggregator.SyncTasksResp} returns this + * @param {number=} opt_index + * @return {!proto.aggregator.CronCondition} returns this */ -proto.aggregator.SyncTasksResp.prototype.clearTrigger = function() { - return this.setTrigger(undefined); +proto.aggregator.CronCondition.prototype.addSchedule = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); }; /** - * Returns whether this field is set. - * @return {boolean} + * Clears the list making it empty but non-null. + * @return {!proto.aggregator.CronCondition} returns this */ -proto.aggregator.SyncTasksResp.prototype.hasTrigger = function() { - return jspb.Message.getField(this, 3) != null; +proto.aggregator.CronCondition.prototype.clearScheduleList = function() { + return this.setScheduleList([]); }; @@ -3135,8 +2979,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.aggregator.ETHTransferNode.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.ETHTransferNode.toObject(opt_includeInstance, this); +proto.aggregator.BlockCondition.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.BlockCondition.toObject(opt_includeInstance, this); }; @@ -3145,14 +2989,13 @@ proto.aggregator.ETHTransferNode.prototype.toObject = function(opt_includeInstan * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.aggregator.ETHTransferNode} msg The msg instance to transform. + * @param {!proto.aggregator.BlockCondition} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.ETHTransferNode.toObject = function(includeInstance, msg) { +proto.aggregator.BlockCondition.toObject = function(includeInstance, msg) { var f, obj = { - destination: jspb.Message.getFieldWithDefault(msg, 1, ""), - amount: jspb.Message.getFieldWithDefault(msg, 2, "") + interval: jspb.Message.getFieldWithDefault(msg, 1, 0) }; if (includeInstance) { @@ -3166,23 +3009,23 @@ proto.aggregator.ETHTransferNode.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.ETHTransferNode} + * @return {!proto.aggregator.BlockCondition} */ -proto.aggregator.ETHTransferNode.deserializeBinary = function(bytes) { +proto.aggregator.BlockCondition.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ETHTransferNode; - return proto.aggregator.ETHTransferNode.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.BlockCondition; + return proto.aggregator.BlockCondition.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.aggregator.ETHTransferNode} msg The message object to deserialize into. + * @param {!proto.aggregator.BlockCondition} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.ETHTransferNode} + * @return {!proto.aggregator.BlockCondition} */ -proto.aggregator.ETHTransferNode.deserializeBinaryFromReader = function(msg, reader) { +proto.aggregator.BlockCondition.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3190,12 +3033,8 @@ proto.aggregator.ETHTransferNode.deserializeBinaryFromReader = function(msg, rea var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setDestination(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setAmount(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setInterval(value); break; default: reader.skipField(); @@ -3210,9 +3049,9 @@ proto.aggregator.ETHTransferNode.deserializeBinaryFromReader = function(msg, rea * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.ETHTransferNode.prototype.serializeBinary = function() { +proto.aggregator.BlockCondition.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.ETHTransferNode.serializeBinaryToWriter(this, writer); + proto.aggregator.BlockCondition.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3220,62 +3059,37 @@ proto.aggregator.ETHTransferNode.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.ETHTransferNode} message + * @param {!proto.aggregator.BlockCondition} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.ETHTransferNode.serializeBinaryToWriter = function(message, writer) { +proto.aggregator.BlockCondition.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getDestination(); - if (f.length > 0) { - writer.writeString( + f = message.getInterval(); + if (f !== 0) { + writer.writeInt64( 1, f ); } - f = message.getAmount(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } -}; - - -/** - * optional string destination = 1; - * @return {string} - */ -proto.aggregator.ETHTransferNode.prototype.getDestination = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.aggregator.ETHTransferNode} returns this - */ -proto.aggregator.ETHTransferNode.prototype.setDestination = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional string amount = 2; - * @return {string} + * optional int64 interval = 1; + * @return {number} */ -proto.aggregator.ETHTransferNode.prototype.getAmount = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.aggregator.BlockCondition.prototype.getInterval = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** - * @param {string} value - * @return {!proto.aggregator.ETHTransferNode} returns this + * @param {number} value + * @return {!proto.aggregator.BlockCondition} returns this */ -proto.aggregator.ETHTransferNode.prototype.setAmount = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.aggregator.BlockCondition.prototype.setInterval = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -3295,8 +3109,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.aggregator.ContractWriteNode.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.ContractWriteNode.toObject(opt_includeInstance, this); +proto.aggregator.EventCondition.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.EventCondition.toObject(opt_includeInstance, this); }; @@ -3305,15 +3119,13 @@ proto.aggregator.ContractWriteNode.prototype.toObject = function(opt_includeInst * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.aggregator.ContractWriteNode} msg The msg instance to transform. + * @param {!proto.aggregator.EventCondition} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.ContractWriteNode.toObject = function(includeInstance, msg) { +proto.aggregator.EventCondition.toObject = function(includeInstance, msg) { var f, obj = { - contractAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), - callData: jspb.Message.getFieldWithDefault(msg, 2, ""), - contractAbi: jspb.Message.getFieldWithDefault(msg, 3, "") + expression: jspb.Message.getFieldWithDefault(msg, 1, "") }; if (includeInstance) { @@ -3327,23 +3139,23 @@ proto.aggregator.ContractWriteNode.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.ContractWriteNode} + * @return {!proto.aggregator.EventCondition} */ -proto.aggregator.ContractWriteNode.deserializeBinary = function(bytes) { +proto.aggregator.EventCondition.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ContractWriteNode; - return proto.aggregator.ContractWriteNode.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.EventCondition; + return proto.aggregator.EventCondition.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.aggregator.ContractWriteNode} msg The message object to deserialize into. + * @param {!proto.aggregator.EventCondition} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.ContractWriteNode} + * @return {!proto.aggregator.EventCondition} */ -proto.aggregator.ContractWriteNode.deserializeBinaryFromReader = function(msg, reader) { +proto.aggregator.EventCondition.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3352,15 +3164,7 @@ proto.aggregator.ContractWriteNode.deserializeBinaryFromReader = function(msg, r switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setContractAddress(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setCallData(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setContractAbi(value); + msg.setExpression(value); break; default: reader.skipField(); @@ -3375,9 +3179,9 @@ proto.aggregator.ContractWriteNode.deserializeBinaryFromReader = function(msg, r * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.ContractWriteNode.prototype.serializeBinary = function() { +proto.aggregator.EventCondition.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.ContractWriteNode.serializeBinaryToWriter(this, writer); + proto.aggregator.EventCondition.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3385,93 +3189,72 @@ proto.aggregator.ContractWriteNode.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.ContractWriteNode} message + * @param {!proto.aggregator.EventCondition} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.ContractWriteNode.serializeBinaryToWriter = function(message, writer) { +proto.aggregator.EventCondition.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getContractAddress(); + f = message.getExpression(); if (f.length > 0) { writer.writeString( 1, f ); } - f = message.getCallData(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getContractAbi(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } }; /** - * optional string contract_address = 1; + * optional string expression = 1; * @return {string} */ -proto.aggregator.ContractWriteNode.prototype.getContractAddress = function() { +proto.aggregator.EventCondition.prototype.getExpression = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.aggregator.ContractWriteNode} returns this + * @return {!proto.aggregator.EventCondition} returns this */ -proto.aggregator.ContractWriteNode.prototype.setContractAddress = function(value) { +proto.aggregator.EventCondition.prototype.setExpression = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; + /** - * optional string call_data = 2; - * @return {string} + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const */ -proto.aggregator.ContractWriteNode.prototype.getCallData = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - +proto.aggregator.TaskTrigger.oneofGroups_ = [[2,3,4,5,6]]; /** - * @param {string} value - * @return {!proto.aggregator.ContractWriteNode} returns this - */ -proto.aggregator.ContractWriteNode.prototype.setCallData = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - -/** - * optional string contract_abi = 3; - * @return {string} + * @enum {number} */ -proto.aggregator.ContractWriteNode.prototype.getContractAbi = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.aggregator.TaskTrigger.TriggerTypeCase = { + TRIGGER_TYPE_NOT_SET: 0, + MANUAL: 2, + FIXED_TIME: 3, + CRON: 4, + BLOCK: 5, + EVENT: 6 }; - /** - * @param {string} value - * @return {!proto.aggregator.ContractWriteNode} returns this + * @return {proto.aggregator.TaskTrigger.TriggerTypeCase} */ -proto.aggregator.ContractWriteNode.prototype.setContractAbi = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); +proto.aggregator.TaskTrigger.prototype.getTriggerTypeCase = function() { + return /** @type {proto.aggregator.TaskTrigger.TriggerTypeCase} */(jspb.Message.computeOneofCase(this, proto.aggregator.TaskTrigger.oneofGroups_[0])); }; - - if (jspb.Message.GENERATE_TO_OBJECT) { /** * Creates an object representation of this proto. @@ -3485,8 +3268,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.aggregator.ContractReadNode.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.ContractReadNode.toObject(opt_includeInstance, this); +proto.aggregator.TaskTrigger.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.TaskTrigger.toObject(opt_includeInstance, this); }; @@ -3495,15 +3278,18 @@ proto.aggregator.ContractReadNode.prototype.toObject = function(opt_includeInsta * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.aggregator.ContractReadNode} msg The msg instance to transform. + * @param {!proto.aggregator.TaskTrigger} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.ContractReadNode.toObject = function(includeInstance, msg) { +proto.aggregator.TaskTrigger.toObject = function(includeInstance, msg) { var f, obj = { - contractAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), - callData: jspb.Message.getFieldWithDefault(msg, 2, ""), - contractAbi: jspb.Message.getFieldWithDefault(msg, 3, "") + name: jspb.Message.getFieldWithDefault(msg, 1, ""), + manual: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), + fixedTime: (f = msg.getFixedTime()) && proto.aggregator.FixedEpochCondition.toObject(includeInstance, f), + cron: (f = msg.getCron()) && proto.aggregator.CronCondition.toObject(includeInstance, f), + block: (f = msg.getBlock()) && proto.aggregator.BlockCondition.toObject(includeInstance, f), + event: (f = msg.getEvent()) && proto.aggregator.EventCondition.toObject(includeInstance, f) }; if (includeInstance) { @@ -3517,23 +3303,23 @@ proto.aggregator.ContractReadNode.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.ContractReadNode} + * @return {!proto.aggregator.TaskTrigger} */ -proto.aggregator.ContractReadNode.deserializeBinary = function(bytes) { +proto.aggregator.TaskTrigger.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ContractReadNode; - return proto.aggregator.ContractReadNode.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.TaskTrigger; + return proto.aggregator.TaskTrigger.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.aggregator.ContractReadNode} msg The message object to deserialize into. + * @param {!proto.aggregator.TaskTrigger} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.ContractReadNode} + * @return {!proto.aggregator.TaskTrigger} */ -proto.aggregator.ContractReadNode.deserializeBinaryFromReader = function(msg, reader) { +proto.aggregator.TaskTrigger.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3542,15 +3328,31 @@ proto.aggregator.ContractReadNode.deserializeBinaryFromReader = function(msg, re switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setContractAddress(value); + msg.setName(value); break; case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setCallData(value); + var value = /** @type {boolean} */ (reader.readBool()); + msg.setManual(value); break; case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setContractAbi(value); + var value = new proto.aggregator.FixedEpochCondition; + reader.readMessage(value,proto.aggregator.FixedEpochCondition.deserializeBinaryFromReader); + msg.setFixedTime(value); + break; + case 4: + var value = new proto.aggregator.CronCondition; + reader.readMessage(value,proto.aggregator.CronCondition.deserializeBinaryFromReader); + msg.setCron(value); + break; + case 5: + var value = new proto.aggregator.BlockCondition; + reader.readMessage(value,proto.aggregator.BlockCondition.deserializeBinaryFromReader); + msg.setBlock(value); + break; + case 6: + var value = new proto.aggregator.EventCondition; + reader.readMessage(value,proto.aggregator.EventCondition.deserializeBinaryFromReader); + msg.setEvent(value); break; default: reader.skipField(); @@ -3565,9 +3367,9 @@ proto.aggregator.ContractReadNode.deserializeBinaryFromReader = function(msg, re * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.ContractReadNode.prototype.serializeBinary = function() { +proto.aggregator.TaskTrigger.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.ContractReadNode.serializeBinaryToWriter(this, writer); + proto.aggregator.TaskTrigger.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3575,281 +3377,261 @@ proto.aggregator.ContractReadNode.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.ContractReadNode} message + * @param {!proto.aggregator.TaskTrigger} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.ContractReadNode.serializeBinaryToWriter = function(message, writer) { +proto.aggregator.TaskTrigger.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getContractAddress(); + f = message.getName(); if (f.length > 0) { writer.writeString( 1, f ); } - f = message.getCallData(); - if (f.length > 0) { - writer.writeString( + f = /** @type {boolean} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeBool( 2, f ); } - f = message.getContractAbi(); - if (f.length > 0) { - writer.writeString( + f = message.getFixedTime(); + if (f != null) { + writer.writeMessage( 3, - f + f, + proto.aggregator.FixedEpochCondition.serializeBinaryToWriter + ); + } + f = message.getCron(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.aggregator.CronCondition.serializeBinaryToWriter + ); + } + f = message.getBlock(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.aggregator.BlockCondition.serializeBinaryToWriter + ); + } + f = message.getEvent(); + if (f != null) { + writer.writeMessage( + 6, + f, + proto.aggregator.EventCondition.serializeBinaryToWriter ); } }; /** - * optional string contract_address = 1; + * optional string name = 1; * @return {string} */ -proto.aggregator.ContractReadNode.prototype.getContractAddress = function() { +proto.aggregator.TaskTrigger.prototype.getName = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.aggregator.ContractReadNode} returns this + * @return {!proto.aggregator.TaskTrigger} returns this */ -proto.aggregator.ContractReadNode.prototype.setContractAddress = function(value) { +proto.aggregator.TaskTrigger.prototype.setName = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional string call_data = 2; - * @return {string} + * optional bool manual = 2; + * @return {boolean} */ -proto.aggregator.ContractReadNode.prototype.getCallData = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.aggregator.TaskTrigger.prototype.getManual = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; /** - * @param {string} value - * @return {!proto.aggregator.ContractReadNode} returns this + * @param {boolean} value + * @return {!proto.aggregator.TaskTrigger} returns this */ -proto.aggregator.ContractReadNode.prototype.setCallData = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.aggregator.TaskTrigger.prototype.setManual = function(value) { + return jspb.Message.setOneofField(this, 2, proto.aggregator.TaskTrigger.oneofGroups_[0], value); }; /** - * optional string contract_abi = 3; - * @return {string} + * Clears the field making it undefined. + * @return {!proto.aggregator.TaskTrigger} returns this */ -proto.aggregator.ContractReadNode.prototype.getContractAbi = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.aggregator.TaskTrigger.prototype.clearManual = function() { + return jspb.Message.setOneofField(this, 2, proto.aggregator.TaskTrigger.oneofGroups_[0], undefined); }; /** - * @param {string} value - * @return {!proto.aggregator.ContractReadNode} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.aggregator.ContractReadNode.prototype.setContractAbi = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); +proto.aggregator.TaskTrigger.prototype.hasManual = function() { + return jspb.Message.getField(this, 2) != null; }; +/** + * optional FixedEpochCondition fixed_time = 3; + * @return {?proto.aggregator.FixedEpochCondition} + */ +proto.aggregator.TaskTrigger.prototype.getFixedTime = function() { + return /** @type{?proto.aggregator.FixedEpochCondition} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.FixedEpochCondition, 3)); +}; - -if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ -proto.aggregator.GraphQLQueryNode.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.GraphQLQueryNode.toObject(opt_includeInstance, this); + * @param {?proto.aggregator.FixedEpochCondition|undefined} value + * @return {!proto.aggregator.TaskTrigger} returns this +*/ +proto.aggregator.TaskTrigger.prototype.setFixedTime = function(value) { + return jspb.Message.setOneofWrapperField(this, 3, proto.aggregator.TaskTrigger.oneofGroups_[0], value); }; /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.aggregator.GraphQLQueryNode} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * Clears the message field making it undefined. + * @return {!proto.aggregator.TaskTrigger} returns this */ -proto.aggregator.GraphQLQueryNode.toObject = function(includeInstance, msg) { - var f, obj = { - url: jspb.Message.getFieldWithDefault(msg, 1, ""), - query: jspb.Message.getFieldWithDefault(msg, 2, ""), - variablesMap: (f = msg.getVariablesMap()) ? f.toObject(includeInstance, undefined) : [] - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +proto.aggregator.TaskTrigger.prototype.clearFixedTime = function() { + return this.setFixedTime(undefined); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.GraphQLQueryNode} + * Returns whether this field is set. + * @return {boolean} */ -proto.aggregator.GraphQLQueryNode.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.GraphQLQueryNode; - return proto.aggregator.GraphQLQueryNode.deserializeBinaryFromReader(msg, reader); +proto.aggregator.TaskTrigger.prototype.hasFixedTime = function() { + return jspb.Message.getField(this, 3) != null; }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.aggregator.GraphQLQueryNode} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.GraphQLQueryNode} + * optional CronCondition cron = 4; + * @return {?proto.aggregator.CronCondition} */ -proto.aggregator.GraphQLQueryNode.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setUrl(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setQuery(value); - break; - case 3: - var value = msg.getVariablesMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); - }); - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.aggregator.TaskTrigger.prototype.getCron = function() { + return /** @type{?proto.aggregator.CronCondition} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.CronCondition, 4)); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * @param {?proto.aggregator.CronCondition|undefined} value + * @return {!proto.aggregator.TaskTrigger} returns this +*/ +proto.aggregator.TaskTrigger.prototype.setCron = function(value) { + return jspb.Message.setOneofWrapperField(this, 4, proto.aggregator.TaskTrigger.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.aggregator.TaskTrigger} returns this */ -proto.aggregator.GraphQLQueryNode.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.GraphQLQueryNode.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.aggregator.TaskTrigger.prototype.clearCron = function() { + return this.setCron(undefined); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.GraphQLQueryNode} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * Returns whether this field is set. + * @return {boolean} */ -proto.aggregator.GraphQLQueryNode.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getUrl(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getQuery(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getVariablesMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(3, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); - } +proto.aggregator.TaskTrigger.prototype.hasCron = function() { + return jspb.Message.getField(this, 4) != null; }; /** - * optional string url = 1; - * @return {string} + * optional BlockCondition block = 5; + * @return {?proto.aggregator.BlockCondition} */ -proto.aggregator.GraphQLQueryNode.prototype.getUrl = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.aggregator.TaskTrigger.prototype.getBlock = function() { + return /** @type{?proto.aggregator.BlockCondition} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.BlockCondition, 5)); }; /** - * @param {string} value - * @return {!proto.aggregator.GraphQLQueryNode} returns this + * @param {?proto.aggregator.BlockCondition|undefined} value + * @return {!proto.aggregator.TaskTrigger} returns this +*/ +proto.aggregator.TaskTrigger.prototype.setBlock = function(value) { + return jspb.Message.setOneofWrapperField(this, 5, proto.aggregator.TaskTrigger.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.aggregator.TaskTrigger} returns this */ -proto.aggregator.GraphQLQueryNode.prototype.setUrl = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); +proto.aggregator.TaskTrigger.prototype.clearBlock = function() { + return this.setBlock(undefined); }; /** - * optional string query = 2; - * @return {string} + * Returns whether this field is set. + * @return {boolean} */ -proto.aggregator.GraphQLQueryNode.prototype.getQuery = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.aggregator.TaskTrigger.prototype.hasBlock = function() { + return jspb.Message.getField(this, 5) != null; }; /** - * @param {string} value - * @return {!proto.aggregator.GraphQLQueryNode} returns this + * optional EventCondition event = 6; + * @return {?proto.aggregator.EventCondition} */ -proto.aggregator.GraphQLQueryNode.prototype.setQuery = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.aggregator.TaskTrigger.prototype.getEvent = function() { + return /** @type{?proto.aggregator.EventCondition} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.EventCondition, 6)); }; /** - * map variables = 3; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} + * @param {?proto.aggregator.EventCondition|undefined} value + * @return {!proto.aggregator.TaskTrigger} returns this +*/ +proto.aggregator.TaskTrigger.prototype.setEvent = function(value) { + return jspb.Message.setOneofWrapperField(this, 6, proto.aggregator.TaskTrigger.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.aggregator.TaskTrigger} returns this */ -proto.aggregator.GraphQLQueryNode.prototype.getVariablesMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 3, opt_noLazyCreate, - null)); +proto.aggregator.TaskTrigger.prototype.clearEvent = function() { + return this.setEvent(undefined); }; /** - * Clears values from the map. The map will be non-null. - * @return {!proto.aggregator.GraphQLQueryNode} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.aggregator.GraphQLQueryNode.prototype.clearVariablesMap = function() { - this.getVariablesMap().clear(); - return this;}; +proto.aggregator.TaskTrigger.prototype.hasEvent = function() { + return jspb.Message.getField(this, 6) != null; +}; @@ -3868,8 +3650,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.aggregator.RestAPINode.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.RestAPINode.toObject(opt_includeInstance, this); +proto.aggregator.ETHTransferNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ETHTransferNode.toObject(opt_includeInstance, this); }; @@ -3878,16 +3660,14 @@ proto.aggregator.RestAPINode.prototype.toObject = function(opt_includeInstance) * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.aggregator.RestAPINode} msg The msg instance to transform. + * @param {!proto.aggregator.ETHTransferNode} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.RestAPINode.toObject = function(includeInstance, msg) { +proto.aggregator.ETHTransferNode.toObject = function(includeInstance, msg) { var f, obj = { - url: jspb.Message.getFieldWithDefault(msg, 1, ""), - headersMap: (f = msg.getHeadersMap()) ? f.toObject(includeInstance, undefined) : [], - body: jspb.Message.getFieldWithDefault(msg, 3, ""), - method: jspb.Message.getFieldWithDefault(msg, 4, "") + destination: jspb.Message.getFieldWithDefault(msg, 1, ""), + amount: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { @@ -3901,23 +3681,23 @@ proto.aggregator.RestAPINode.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.RestAPINode} + * @return {!proto.aggregator.ETHTransferNode} */ -proto.aggregator.RestAPINode.deserializeBinary = function(bytes) { +proto.aggregator.ETHTransferNode.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.RestAPINode; - return proto.aggregator.RestAPINode.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.ETHTransferNode; + return proto.aggregator.ETHTransferNode.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.aggregator.RestAPINode} msg The message object to deserialize into. + * @param {!proto.aggregator.ETHTransferNode} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.RestAPINode} + * @return {!proto.aggregator.ETHTransferNode} */ -proto.aggregator.RestAPINode.deserializeBinaryFromReader = function(msg, reader) { +proto.aggregator.ETHTransferNode.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3926,21 +3706,11 @@ proto.aggregator.RestAPINode.deserializeBinaryFromReader = function(msg, reader) switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setUrl(value); + msg.setDestination(value); break; case 2: - var value = msg.getHeadersMap(); - reader.readMessage(value, function(message, reader) { - jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); - }); - break; - case 3: var value = /** @type {string} */ (reader.readString()); - msg.setBody(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setMethod(value); + msg.setAmount(value); break; default: reader.skipField(); @@ -3955,9 +3725,9 @@ proto.aggregator.RestAPINode.deserializeBinaryFromReader = function(msg, reader) * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.RestAPINode.prototype.serializeBinary = function() { +proto.aggregator.ETHTransferNode.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.RestAPINode.serializeBinaryToWriter(this, writer); + proto.aggregator.ETHTransferNode.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3965,34 +3735,23 @@ proto.aggregator.RestAPINode.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.RestAPINode} message + * @param {!proto.aggregator.ETHTransferNode} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.RestAPINode.serializeBinaryToWriter = function(message, writer) { +proto.aggregator.ETHTransferNode.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getUrl(); + f = message.getDestination(); if (f.length > 0) { writer.writeString( 1, f ); } - f = message.getHeadersMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(2, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); - } - f = message.getBody(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getMethod(); + f = message.getAmount(); if (f.length > 0) { writer.writeString( - 4, + 2, f ); } @@ -4000,78 +3759,38 @@ proto.aggregator.RestAPINode.serializeBinaryToWriter = function(message, writer) /** - * optional string url = 1; + * optional string destination = 1; * @return {string} */ -proto.aggregator.RestAPINode.prototype.getUrl = function() { +proto.aggregator.ETHTransferNode.prototype.getDestination = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.aggregator.RestAPINode} returns this + * @return {!proto.aggregator.ETHTransferNode} returns this */ -proto.aggregator.RestAPINode.prototype.setUrl = function(value) { +proto.aggregator.ETHTransferNode.prototype.setDestination = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** - * map headers = 2; - * @param {boolean=} opt_noLazyCreate Do not create the map if - * empty, instead returning `undefined` - * @return {!jspb.Map} - */ -proto.aggregator.RestAPINode.prototype.getHeadersMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 2, opt_noLazyCreate, - null)); -}; - - -/** - * Clears values from the map. The map will be non-null. - * @return {!proto.aggregator.RestAPINode} returns this - */ -proto.aggregator.RestAPINode.prototype.clearHeadersMap = function() { - this.getHeadersMap().clear(); - return this;}; - - -/** - * optional string body = 3; - * @return {string} - */ -proto.aggregator.RestAPINode.prototype.getBody = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.aggregator.RestAPINode} returns this - */ -proto.aggregator.RestAPINode.prototype.setBody = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional string method = 4; + * optional string amount = 2; * @return {string} */ -proto.aggregator.RestAPINode.prototype.getMethod = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +proto.aggregator.ETHTransferNode.prototype.getAmount = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @return {!proto.aggregator.RestAPINode} returns this + * @return {!proto.aggregator.ETHTransferNode} returns this */ -proto.aggregator.RestAPINode.prototype.setMethod = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); +proto.aggregator.ETHTransferNode.prototype.setAmount = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; @@ -4091,8 +3810,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.aggregator.CustomCodeNode.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.CustomCodeNode.toObject(opt_includeInstance, this); +proto.aggregator.ContractWriteNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ContractWriteNode.toObject(opt_includeInstance, this); }; @@ -4101,14 +3820,15 @@ proto.aggregator.CustomCodeNode.prototype.toObject = function(opt_includeInstanc * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.aggregator.CustomCodeNode} msg The msg instance to transform. + * @param {!proto.aggregator.ContractWriteNode} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.CustomCodeNode.toObject = function(includeInstance, msg) { +proto.aggregator.ContractWriteNode.toObject = function(includeInstance, msg) { var f, obj = { - type: jspb.Message.getFieldWithDefault(msg, 1, 0), - source: jspb.Message.getFieldWithDefault(msg, 2, "") + contractAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + callData: jspb.Message.getFieldWithDefault(msg, 2, ""), + contractAbi: jspb.Message.getFieldWithDefault(msg, 3, "") }; if (includeInstance) { @@ -4122,23 +3842,23 @@ proto.aggregator.CustomCodeNode.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.CustomCodeNode} + * @return {!proto.aggregator.ContractWriteNode} */ -proto.aggregator.CustomCodeNode.deserializeBinary = function(bytes) { +proto.aggregator.ContractWriteNode.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.CustomCodeNode; - return proto.aggregator.CustomCodeNode.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.ContractWriteNode; + return proto.aggregator.ContractWriteNode.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.aggregator.CustomCodeNode} msg The message object to deserialize into. + * @param {!proto.aggregator.ContractWriteNode} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.CustomCodeNode} + * @return {!proto.aggregator.ContractWriteNode} */ -proto.aggregator.CustomCodeNode.deserializeBinaryFromReader = function(msg, reader) { +proto.aggregator.ContractWriteNode.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -4146,12 +3866,16 @@ proto.aggregator.CustomCodeNode.deserializeBinaryFromReader = function(msg, read var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!proto.aggregator.CustomCodeType} */ (reader.readEnum()); - msg.setType(value); + var value = /** @type {string} */ (reader.readString()); + msg.setContractAddress(value); break; case 2: var value = /** @type {string} */ (reader.readString()); - msg.setSource(value); + msg.setCallData(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setContractAbi(value); break; default: reader.skipField(); @@ -4166,9 +3890,9 @@ proto.aggregator.CustomCodeNode.deserializeBinaryFromReader = function(msg, read * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.CustomCodeNode.prototype.serializeBinary = function() { +proto.aggregator.ContractWriteNode.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.CustomCodeNode.serializeBinaryToWriter(this, writer); + proto.aggregator.ContractWriteNode.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -4176,65 +3900,90 @@ proto.aggregator.CustomCodeNode.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.CustomCodeNode} message + * @param {!proto.aggregator.ContractWriteNode} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.CustomCodeNode.serializeBinaryToWriter = function(message, writer) { +proto.aggregator.ContractWriteNode.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getType(); - if (f !== 0.0) { - writer.writeEnum( + f = message.getContractAddress(); + if (f.length > 0) { + writer.writeString( 1, f ); } - f = message.getSource(); + f = message.getCallData(); if (f.length > 0) { writer.writeString( 2, f ); } + f = message.getContractAbi(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } }; /** - * optional CustomCodeType type = 1; - * @return {!proto.aggregator.CustomCodeType} + * optional string contract_address = 1; + * @return {string} */ -proto.aggregator.CustomCodeNode.prototype.getType = function() { - return /** @type {!proto.aggregator.CustomCodeType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.aggregator.ContractWriteNode.prototype.getContractAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {!proto.aggregator.CustomCodeType} value - * @return {!proto.aggregator.CustomCodeNode} returns this + * @param {string} value + * @return {!proto.aggregator.ContractWriteNode} returns this */ -proto.aggregator.CustomCodeNode.prototype.setType = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); +proto.aggregator.ContractWriteNode.prototype.setContractAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional string source = 2; + * optional string call_data = 2; * @return {string} */ -proto.aggregator.CustomCodeNode.prototype.getSource = function() { +proto.aggregator.ContractWriteNode.prototype.getCallData = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @return {!proto.aggregator.CustomCodeNode} returns this + * @return {!proto.aggregator.ContractWriteNode} returns this */ -proto.aggregator.CustomCodeNode.prototype.setSource = function(value) { +proto.aggregator.ContractWriteNode.prototype.setCallData = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; +/** + * optional string contract_abi = 3; + * @return {string} + */ +proto.aggregator.ContractWriteNode.prototype.getContractAbi = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.aggregator.ContractWriteNode} returns this + */ +proto.aggregator.ContractWriteNode.prototype.setContractAbi = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + @@ -4251,8 +4000,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.aggregator.Condition.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.Condition.toObject(opt_includeInstance, this); +proto.aggregator.ContractReadNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ContractReadNode.toObject(opt_includeInstance, this); }; @@ -4261,15 +4010,15 @@ proto.aggregator.Condition.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.aggregator.Condition} msg The msg instance to transform. + * @param {!proto.aggregator.ContractReadNode} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.Condition.toObject = function(includeInstance, msg) { +proto.aggregator.ContractReadNode.toObject = function(includeInstance, msg) { var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, ""), - type: jspb.Message.getFieldWithDefault(msg, 2, ""), - expression: jspb.Message.getFieldWithDefault(msg, 3, "") + contractAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + callData: jspb.Message.getFieldWithDefault(msg, 2, ""), + contractAbi: jspb.Message.getFieldWithDefault(msg, 3, "") }; if (includeInstance) { @@ -4283,23 +4032,23 @@ proto.aggregator.Condition.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.Condition} + * @return {!proto.aggregator.ContractReadNode} */ -proto.aggregator.Condition.deserializeBinary = function(bytes) { +proto.aggregator.ContractReadNode.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.Condition; - return proto.aggregator.Condition.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.ContractReadNode; + return proto.aggregator.ContractReadNode.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.aggregator.Condition} msg The message object to deserialize into. + * @param {!proto.aggregator.ContractReadNode} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.Condition} + * @return {!proto.aggregator.ContractReadNode} */ -proto.aggregator.Condition.deserializeBinaryFromReader = function(msg, reader) { +proto.aggregator.ContractReadNode.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -4308,15 +4057,15 @@ proto.aggregator.Condition.deserializeBinaryFromReader = function(msg, reader) { switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setId(value); + msg.setContractAddress(value); break; case 2: var value = /** @type {string} */ (reader.readString()); - msg.setType(value); + msg.setCallData(value); break; case 3: var value = /** @type {string} */ (reader.readString()); - msg.setExpression(value); + msg.setContractAbi(value); break; default: reader.skipField(); @@ -4331,9 +4080,9 @@ proto.aggregator.Condition.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.Condition.prototype.serializeBinary = function() { +proto.aggregator.ContractReadNode.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.Condition.serializeBinaryToWriter(this, writer); + proto.aggregator.ContractReadNode.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -4341,27 +4090,27 @@ proto.aggregator.Condition.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.Condition} message + * @param {!proto.aggregator.ContractReadNode} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.Condition.serializeBinaryToWriter = function(message, writer) { +proto.aggregator.ContractReadNode.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getId(); + f = message.getContractAddress(); if (f.length > 0) { writer.writeString( 1, f ); } - f = message.getType(); + f = message.getCallData(); if (f.length > 0) { writer.writeString( 2, f ); } - f = message.getExpression(); + f = message.getContractAbi(); if (f.length > 0) { writer.writeString( 3, @@ -4372,67 +4121,60 @@ proto.aggregator.Condition.serializeBinaryToWriter = function(message, writer) { /** - * optional string id = 1; + * optional string contract_address = 1; * @return {string} */ -proto.aggregator.Condition.prototype.getId = function() { +proto.aggregator.ContractReadNode.prototype.getContractAddress = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.aggregator.Condition} returns this + * @return {!proto.aggregator.ContractReadNode} returns this */ -proto.aggregator.Condition.prototype.setId = function(value) { +proto.aggregator.ContractReadNode.prototype.setContractAddress = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional string type = 2; + * optional string call_data = 2; * @return {string} */ -proto.aggregator.Condition.prototype.getType = function() { +proto.aggregator.ContractReadNode.prototype.getCallData = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @return {!proto.aggregator.Condition} returns this + * @return {!proto.aggregator.ContractReadNode} returns this */ -proto.aggregator.Condition.prototype.setType = function(value) { +proto.aggregator.ContractReadNode.prototype.setCallData = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; /** - * optional string expression = 3; + * optional string contract_abi = 3; * @return {string} */ -proto.aggregator.Condition.prototype.getExpression = function() { +proto.aggregator.ContractReadNode.prototype.getContractAbi = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value - * @return {!proto.aggregator.Condition} returns this + * @return {!proto.aggregator.ContractReadNode} returns this */ -proto.aggregator.Condition.prototype.setExpression = function(value) { +proto.aggregator.ContractReadNode.prototype.setContractAbi = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.aggregator.BranchNode.repeatedFields_ = [1]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -4448,8 +4190,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.aggregator.BranchNode.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.BranchNode.toObject(opt_includeInstance, this); +proto.aggregator.GraphQLQueryNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.GraphQLQueryNode.toObject(opt_includeInstance, this); }; @@ -4458,14 +4200,15 @@ proto.aggregator.BranchNode.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.aggregator.BranchNode} msg The msg instance to transform. + * @param {!proto.aggregator.GraphQLQueryNode} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.BranchNode.toObject = function(includeInstance, msg) { +proto.aggregator.GraphQLQueryNode.toObject = function(includeInstance, msg) { var f, obj = { - conditionsList: jspb.Message.toObjectList(msg.getConditionsList(), - proto.aggregator.Condition.toObject, includeInstance) + url: jspb.Message.getFieldWithDefault(msg, 1, ""), + query: jspb.Message.getFieldWithDefault(msg, 2, ""), + variablesMap: (f = msg.getVariablesMap()) ? f.toObject(includeInstance, undefined) : [] }; if (includeInstance) { @@ -4479,23 +4222,23 @@ proto.aggregator.BranchNode.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.BranchNode} + * @return {!proto.aggregator.GraphQLQueryNode} */ -proto.aggregator.BranchNode.deserializeBinary = function(bytes) { +proto.aggregator.GraphQLQueryNode.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.BranchNode; - return proto.aggregator.BranchNode.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.GraphQLQueryNode; + return proto.aggregator.GraphQLQueryNode.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.aggregator.BranchNode} msg The message object to deserialize into. + * @param {!proto.aggregator.GraphQLQueryNode} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.BranchNode} + * @return {!proto.aggregator.GraphQLQueryNode} */ -proto.aggregator.BranchNode.deserializeBinaryFromReader = function(msg, reader) { +proto.aggregator.GraphQLQueryNode.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -4503,9 +4246,18 @@ proto.aggregator.BranchNode.deserializeBinaryFromReader = function(msg, reader) var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.aggregator.Condition; - reader.readMessage(value,proto.aggregator.Condition.deserializeBinaryFromReader); - msg.addConditions(value); + var value = /** @type {string} */ (reader.readString()); + msg.setUrl(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setQuery(value); + break; + case 3: + var value = msg.getVariablesMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); break; default: reader.skipField(); @@ -4520,9 +4272,9 @@ proto.aggregator.BranchNode.deserializeBinaryFromReader = function(msg, reader) * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.BranchNode.prototype.serializeBinary = function() { +proto.aggregator.GraphQLQueryNode.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.BranchNode.serializeBinaryToWriter(this, writer); + proto.aggregator.GraphQLQueryNode.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -4530,61 +4282,91 @@ proto.aggregator.BranchNode.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.BranchNode} message + * @param {!proto.aggregator.GraphQLQueryNode} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.BranchNode.serializeBinaryToWriter = function(message, writer) { +proto.aggregator.GraphQLQueryNode.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getConditionsList(); + f = message.getUrl(); if (f.length > 0) { - writer.writeRepeatedMessage( + writer.writeString( 1, - f, - proto.aggregator.Condition.serializeBinaryToWriter + f + ); + } + f = message.getQuery(); + if (f.length > 0) { + writer.writeString( + 2, + f ); } + f = message.getVariablesMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(3, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } }; /** - * repeated Condition conditions = 1; - * @return {!Array} + * optional string url = 1; + * @return {string} */ -proto.aggregator.BranchNode.prototype.getConditionsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.aggregator.Condition, 1)); +proto.aggregator.GraphQLQueryNode.prototype.getUrl = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {!Array} value - * @return {!proto.aggregator.BranchNode} returns this -*/ -proto.aggregator.BranchNode.prototype.setConditionsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); + * @param {string} value + * @return {!proto.aggregator.GraphQLQueryNode} returns this + */ +proto.aggregator.GraphQLQueryNode.prototype.setUrl = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; /** - * @param {!proto.aggregator.Condition=} opt_value - * @param {number=} opt_index - * @return {!proto.aggregator.Condition} + * optional string query = 2; + * @return {string} */ -proto.aggregator.BranchNode.prototype.addConditions = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.aggregator.Condition, opt_index); +proto.aggregator.GraphQLQueryNode.prototype.getQuery = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.aggregator.BranchNode} returns this + * @param {string} value + * @return {!proto.aggregator.GraphQLQueryNode} returns this */ -proto.aggregator.BranchNode.prototype.clearConditionsList = function() { - return this.setConditionsList([]); +proto.aggregator.GraphQLQueryNode.prototype.setQuery = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * map variables = 3; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.aggregator.GraphQLQueryNode.prototype.getVariablesMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 3, opt_noLazyCreate, + null)); }; +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.aggregator.GraphQLQueryNode} returns this + */ +proto.aggregator.GraphQLQueryNode.prototype.clearVariablesMap = function() { + this.getVariablesMap().clear(); + return this;}; + + @@ -4601,8 +4383,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.aggregator.FilterNode.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.FilterNode.toObject(opt_includeInstance, this); +proto.aggregator.RestAPINode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.RestAPINode.toObject(opt_includeInstance, this); }; @@ -4611,13 +4393,16 @@ proto.aggregator.FilterNode.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.aggregator.FilterNode} msg The msg instance to transform. + * @param {!proto.aggregator.RestAPINode} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.FilterNode.toObject = function(includeInstance, msg) { +proto.aggregator.RestAPINode.toObject = function(includeInstance, msg) { var f, obj = { - expression: jspb.Message.getFieldWithDefault(msg, 1, "") + url: jspb.Message.getFieldWithDefault(msg, 1, ""), + headersMap: (f = msg.getHeadersMap()) ? f.toObject(includeInstance, undefined) : [], + body: jspb.Message.getFieldWithDefault(msg, 3, ""), + method: jspb.Message.getFieldWithDefault(msg, 4, "") }; if (includeInstance) { @@ -4631,23 +4416,23 @@ proto.aggregator.FilterNode.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.FilterNode} + * @return {!proto.aggregator.RestAPINode} */ -proto.aggregator.FilterNode.deserializeBinary = function(bytes) { +proto.aggregator.RestAPINode.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.FilterNode; - return proto.aggregator.FilterNode.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.RestAPINode; + return proto.aggregator.RestAPINode.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.aggregator.FilterNode} msg The message object to deserialize into. + * @param {!proto.aggregator.RestAPINode} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.FilterNode} + * @return {!proto.aggregator.RestAPINode} */ -proto.aggregator.FilterNode.deserializeBinaryFromReader = function(msg, reader) { +proto.aggregator.RestAPINode.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -4656,7 +4441,21 @@ proto.aggregator.FilterNode.deserializeBinaryFromReader = function(msg, reader) switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setExpression(value); + msg.setUrl(value); + break; + case 2: + var value = msg.getHeadersMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setBody(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setMethod(value); break; default: reader.skipField(); @@ -4671,9 +4470,9 @@ proto.aggregator.FilterNode.deserializeBinaryFromReader = function(msg, reader) * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.FilterNode.prototype.serializeBinary = function() { +proto.aggregator.RestAPINode.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.FilterNode.serializeBinaryToWriter(this, writer); + proto.aggregator.RestAPINode.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -4681,40 +4480,116 @@ proto.aggregator.FilterNode.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.FilterNode} message + * @param {!proto.aggregator.RestAPINode} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.FilterNode.serializeBinaryToWriter = function(message, writer) { +proto.aggregator.RestAPINode.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getExpression(); + f = message.getUrl(); if (f.length > 0) { writer.writeString( 1, f ); } + f = message.getHeadersMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(2, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } + f = message.getBody(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getMethod(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } }; /** - * optional string expression = 1; + * optional string url = 1; * @return {string} */ -proto.aggregator.FilterNode.prototype.getExpression = function() { +proto.aggregator.RestAPINode.prototype.getUrl = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.aggregator.FilterNode} returns this + * @return {!proto.aggregator.RestAPINode} returns this */ -proto.aggregator.FilterNode.prototype.setExpression = function(value) { +proto.aggregator.RestAPINode.prototype.setUrl = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; +/** + * map headers = 2; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.aggregator.RestAPINode.prototype.getHeadersMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 2, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.aggregator.RestAPINode} returns this + */ +proto.aggregator.RestAPINode.prototype.clearHeadersMap = function() { + this.getHeadersMap().clear(); + return this;}; + + +/** + * optional string body = 3; + * @return {string} + */ +proto.aggregator.RestAPINode.prototype.getBody = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.aggregator.RestAPINode} returns this + */ +proto.aggregator.RestAPINode.prototype.setBody = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional string method = 4; + * @return {string} + */ +proto.aggregator.RestAPINode.prototype.getMethod = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +}; + + +/** + * @param {string} value + * @return {!proto.aggregator.RestAPINode} returns this + */ +proto.aggregator.RestAPINode.prototype.setMethod = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); +}; + + @@ -4731,8 +4606,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.aggregator.LoopNode.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.LoopNode.toObject(opt_includeInstance, this); +proto.aggregator.CustomCodeNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.CustomCodeNode.toObject(opt_includeInstance, this); }; @@ -4741,14 +4616,14 @@ proto.aggregator.LoopNode.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.aggregator.LoopNode} msg The msg instance to transform. + * @param {!proto.aggregator.CustomCodeNode} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.LoopNode.toObject = function(includeInstance, msg) { +proto.aggregator.CustomCodeNode.toObject = function(includeInstance, msg) { var f, obj = { - iterVar: jspb.Message.getFieldWithDefault(msg, 1, ""), - iterKey: jspb.Message.getFieldWithDefault(msg, 2, "") + lang: jspb.Message.getFieldWithDefault(msg, 1, 0), + source: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { @@ -4762,23 +4637,23 @@ proto.aggregator.LoopNode.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.LoopNode} + * @return {!proto.aggregator.CustomCodeNode} */ -proto.aggregator.LoopNode.deserializeBinary = function(bytes) { +proto.aggregator.CustomCodeNode.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.LoopNode; - return proto.aggregator.LoopNode.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.CustomCodeNode; + return proto.aggregator.CustomCodeNode.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.aggregator.LoopNode} msg The message object to deserialize into. + * @param {!proto.aggregator.CustomCodeNode} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.LoopNode} + * @return {!proto.aggregator.CustomCodeNode} */ -proto.aggregator.LoopNode.deserializeBinaryFromReader = function(msg, reader) { +proto.aggregator.CustomCodeNode.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -4786,12 +4661,12 @@ proto.aggregator.LoopNode.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setIterVar(value); + var value = /** @type {!proto.aggregator.CustomCodeLang} */ (reader.readEnum()); + msg.setLang(value); break; case 2: var value = /** @type {string} */ (reader.readString()); - msg.setIterKey(value); + msg.setSource(value); break; default: reader.skipField(); @@ -4806,9 +4681,9 @@ proto.aggregator.LoopNode.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.LoopNode.prototype.serializeBinary = function() { +proto.aggregator.CustomCodeNode.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.LoopNode.serializeBinaryToWriter(this, writer); + proto.aggregator.CustomCodeNode.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -4816,20 +4691,20 @@ proto.aggregator.LoopNode.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.LoopNode} message + * @param {!proto.aggregator.CustomCodeNode} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.LoopNode.serializeBinaryToWriter = function(message, writer) { +proto.aggregator.CustomCodeNode.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getIterVar(); - if (f.length > 0) { - writer.writeString( + f = message.getLang(); + if (f !== 0.0) { + writer.writeEnum( 1, f ); } - f = message.getIterKey(); + f = message.getSource(); if (f.length > 0) { writer.writeString( 2, @@ -4840,37 +4715,37 @@ proto.aggregator.LoopNode.serializeBinaryToWriter = function(message, writer) { /** - * optional string iter_var = 1; - * @return {string} + * optional CustomCodeLang lang = 1; + * @return {!proto.aggregator.CustomCodeLang} */ -proto.aggregator.LoopNode.prototype.getIterVar = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.aggregator.CustomCodeNode.prototype.getLang = function() { + return /** @type {!proto.aggregator.CustomCodeLang} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** - * @param {string} value - * @return {!proto.aggregator.LoopNode} returns this + * @param {!proto.aggregator.CustomCodeLang} value + * @return {!proto.aggregator.CustomCodeNode} returns this */ -proto.aggregator.LoopNode.prototype.setIterVar = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); +proto.aggregator.CustomCodeNode.prototype.setLang = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); }; /** - * optional string iter_key = 2; + * optional string source = 2; * @return {string} */ -proto.aggregator.LoopNode.prototype.getIterKey = function() { +proto.aggregator.CustomCodeNode.prototype.getSource = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @return {!proto.aggregator.LoopNode} returns this + * @return {!proto.aggregator.CustomCodeNode} returns this */ -proto.aggregator.LoopNode.prototype.setIterKey = function(value) { +proto.aggregator.CustomCodeNode.prototype.setSource = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; @@ -4891,8 +4766,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.aggregator.TaskEdge.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.TaskEdge.toObject(opt_includeInstance, this); +proto.aggregator.Condition.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.Condition.toObject(opt_includeInstance, this); }; @@ -4901,15 +4776,15 @@ proto.aggregator.TaskEdge.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.aggregator.TaskEdge} msg The msg instance to transform. + * @param {!proto.aggregator.Condition} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.TaskEdge.toObject = function(includeInstance, msg) { +proto.aggregator.Condition.toObject = function(includeInstance, msg) { var f, obj = { id: jspb.Message.getFieldWithDefault(msg, 1, ""), - source: jspb.Message.getFieldWithDefault(msg, 2, ""), - target: jspb.Message.getFieldWithDefault(msg, 3, "") + type: jspb.Message.getFieldWithDefault(msg, 2, ""), + expression: jspb.Message.getFieldWithDefault(msg, 3, "") }; if (includeInstance) { @@ -4923,23 +4798,23 @@ proto.aggregator.TaskEdge.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.TaskEdge} + * @return {!proto.aggregator.Condition} */ -proto.aggregator.TaskEdge.deserializeBinary = function(bytes) { +proto.aggregator.Condition.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.TaskEdge; - return proto.aggregator.TaskEdge.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.Condition; + return proto.aggregator.Condition.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.aggregator.TaskEdge} msg The message object to deserialize into. + * @param {!proto.aggregator.Condition} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.TaskEdge} + * @return {!proto.aggregator.Condition} */ -proto.aggregator.TaskEdge.deserializeBinaryFromReader = function(msg, reader) { +proto.aggregator.Condition.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -4952,11 +4827,11 @@ proto.aggregator.TaskEdge.deserializeBinaryFromReader = function(msg, reader) { break; case 2: var value = /** @type {string} */ (reader.readString()); - msg.setSource(value); + msg.setType(value); break; case 3: var value = /** @type {string} */ (reader.readString()); - msg.setTarget(value); + msg.setExpression(value); break; default: reader.skipField(); @@ -4971,9 +4846,9 @@ proto.aggregator.TaskEdge.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.TaskEdge.prototype.serializeBinary = function() { +proto.aggregator.Condition.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.TaskEdge.serializeBinaryToWriter(this, writer); + proto.aggregator.Condition.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -4981,11 +4856,11 @@ proto.aggregator.TaskEdge.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.TaskEdge} message + * @param {!proto.aggregator.Condition} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.TaskEdge.serializeBinaryToWriter = function(message, writer) { +proto.aggregator.Condition.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getId(); if (f.length > 0) { @@ -4994,14 +4869,14 @@ proto.aggregator.TaskEdge.serializeBinaryToWriter = function(message, writer) { f ); } - f = message.getSource(); + f = message.getType(); if (f.length > 0) { writer.writeString( 2, f ); } - f = message.getTarget(); + f = message.getExpression(); if (f.length > 0) { writer.writeString( 3, @@ -5015,89 +4890,63 @@ proto.aggregator.TaskEdge.serializeBinaryToWriter = function(message, writer) { * optional string id = 1; * @return {string} */ -proto.aggregator.TaskEdge.prototype.getId = function() { +proto.aggregator.Condition.prototype.getId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.aggregator.TaskEdge} returns this + * @return {!proto.aggregator.Condition} returns this */ -proto.aggregator.TaskEdge.prototype.setId = function(value) { +proto.aggregator.Condition.prototype.setId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional string source = 2; + * optional string type = 2; * @return {string} */ -proto.aggregator.TaskEdge.prototype.getSource = function() { +proto.aggregator.Condition.prototype.getType = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @return {!proto.aggregator.TaskEdge} returns this + * @return {!proto.aggregator.Condition} returns this */ -proto.aggregator.TaskEdge.prototype.setSource = function(value) { +proto.aggregator.Condition.prototype.setType = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; /** - * optional string target = 3; + * optional string expression = 3; * @return {string} */ -proto.aggregator.TaskEdge.prototype.getTarget = function() { +proto.aggregator.Condition.prototype.getExpression = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value - * @return {!proto.aggregator.TaskEdge} returns this + * @return {!proto.aggregator.Condition} returns this */ -proto.aggregator.TaskEdge.prototype.setTarget = function(value) { +proto.aggregator.Condition.prototype.setExpression = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; /** - * Oneof group definitions for this message. Each group defines the field - * numbers belonging to that group. When of these fields' value is set, all - * other fields in the group are cleared. During deserialization, if multiple - * fields are encountered for a group, only the last value seen will be kept. - * @private {!Array>} + * List of repeated fields within this message type. + * @private {!Array} * @const */ -proto.aggregator.TaskNode.oneofGroups_ = [[10,11,12,13,14,15,16,17,18]]; - -/** - * @enum {number} - */ -proto.aggregator.TaskNode.TaskTypeCase = { - TASK_TYPE_NOT_SET: 0, - ETH_TRANSFER: 10, - CONTRACT_WRITE: 11, - CONTRACT_READ: 12, - GRAPHQL_DATA_QUERY: 13, - REST_API: 14, - BRANCH: 15, - FILTER: 16, - LOOP: 17, - CUSTOM_CODE: 18 -}; - -/** - * @return {proto.aggregator.TaskNode.TaskTypeCase} - */ -proto.aggregator.TaskNode.prototype.getTaskTypeCase = function() { - return /** @type {proto.aggregator.TaskNode.TaskTypeCase} */(jspb.Message.computeOneofCase(this, proto.aggregator.TaskNode.oneofGroups_[0])); -}; +proto.aggregator.BranchNode.repeatedFields_ = [1]; @@ -5114,8 +4963,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.aggregator.TaskNode.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.TaskNode.toObject(opt_includeInstance, this); +proto.aggregator.BranchNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.BranchNode.toObject(opt_includeInstance, this); }; @@ -5124,23 +4973,14 @@ proto.aggregator.TaskNode.prototype.toObject = function(opt_includeInstance) { * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.aggregator.TaskNode} msg The msg instance to transform. + * @param {!proto.aggregator.BranchNode} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.TaskNode.toObject = function(includeInstance, msg) { +proto.aggregator.BranchNode.toObject = function(includeInstance, msg) { var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 2, ""), - name: jspb.Message.getFieldWithDefault(msg, 3, ""), - ethTransfer: (f = msg.getEthTransfer()) && proto.aggregator.ETHTransferNode.toObject(includeInstance, f), - contractWrite: (f = msg.getContractWrite()) && proto.aggregator.ContractWriteNode.toObject(includeInstance, f), - contractRead: (f = msg.getContractRead()) && proto.aggregator.ContractReadNode.toObject(includeInstance, f), - graphqlDataQuery: (f = msg.getGraphqlDataQuery()) && proto.aggregator.GraphQLQueryNode.toObject(includeInstance, f), - restApi: (f = msg.getRestApi()) && proto.aggregator.RestAPINode.toObject(includeInstance, f), - branch: (f = msg.getBranch()) && proto.aggregator.BranchNode.toObject(includeInstance, f), - filter: (f = msg.getFilter()) && proto.aggregator.FilterNode.toObject(includeInstance, f), - loop: (f = msg.getLoop()) && proto.aggregator.LoopNode.toObject(includeInstance, f), - customCode: (f = msg.getCustomCode()) && proto.aggregator.CustomCodeNode.toObject(includeInstance, f) + conditionsList: jspb.Message.toObjectList(msg.getConditionsList(), + proto.aggregator.Condition.toObject, includeInstance) }; if (includeInstance) { @@ -5154,81 +4994,33 @@ proto.aggregator.TaskNode.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.TaskNode} + * @return {!proto.aggregator.BranchNode} */ -proto.aggregator.TaskNode.deserializeBinary = function(bytes) { +proto.aggregator.BranchNode.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.TaskNode; - return proto.aggregator.TaskNode.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.BranchNode; + return proto.aggregator.BranchNode.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.aggregator.TaskNode} msg The message object to deserialize into. + * @param {!proto.aggregator.BranchNode} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.TaskNode} + * @return {!proto.aggregator.BranchNode} */ -proto.aggregator.TaskNode.deserializeBinaryFromReader = function(msg, reader) { +proto.aggregator.BranchNode.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setId(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setName(value); - break; - case 10: - var value = new proto.aggregator.ETHTransferNode; - reader.readMessage(value,proto.aggregator.ETHTransferNode.deserializeBinaryFromReader); - msg.setEthTransfer(value); - break; - case 11: - var value = new proto.aggregator.ContractWriteNode; - reader.readMessage(value,proto.aggregator.ContractWriteNode.deserializeBinaryFromReader); - msg.setContractWrite(value); - break; - case 12: - var value = new proto.aggregator.ContractReadNode; - reader.readMessage(value,proto.aggregator.ContractReadNode.deserializeBinaryFromReader); - msg.setContractRead(value); - break; - case 13: - var value = new proto.aggregator.GraphQLQueryNode; - reader.readMessage(value,proto.aggregator.GraphQLQueryNode.deserializeBinaryFromReader); - msg.setGraphqlDataQuery(value); - break; - case 14: - var value = new proto.aggregator.RestAPINode; - reader.readMessage(value,proto.aggregator.RestAPINode.deserializeBinaryFromReader); - msg.setRestApi(value); - break; - case 15: - var value = new proto.aggregator.BranchNode; - reader.readMessage(value,proto.aggregator.BranchNode.deserializeBinaryFromReader); - msg.setBranch(value); - break; - case 16: - var value = new proto.aggregator.FilterNode; - reader.readMessage(value,proto.aggregator.FilterNode.deserializeBinaryFromReader); - msg.setFilter(value); - break; - case 17: - var value = new proto.aggregator.LoopNode; - reader.readMessage(value,proto.aggregator.LoopNode.deserializeBinaryFromReader); - msg.setLoop(value); - break; - case 18: - var value = new proto.aggregator.CustomCodeNode; - reader.readMessage(value,proto.aggregator.CustomCodeNode.deserializeBinaryFromReader); - msg.setCustomCode(value); + case 1: + var value = new proto.aggregator.Condition; + reader.readMessage(value,proto.aggregator.Condition.deserializeBinaryFromReader); + msg.addConditions(value); break; default: reader.skipField(); @@ -5243,9 +5035,9 @@ proto.aggregator.TaskNode.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.TaskNode.prototype.serializeBinary = function() { +proto.aggregator.BranchNode.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.TaskNode.serializeBinaryToWriter(this, writer); + proto.aggregator.BranchNode.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -5253,112 +5045,1201 @@ proto.aggregator.TaskNode.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.TaskNode} message + * @param {!proto.aggregator.BranchNode} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.TaskNode.serializeBinaryToWriter = function(message, writer) { +proto.aggregator.BranchNode.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getId(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getName(); + f = message.getConditionsList(); if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getEthTransfer(); - if (f != null) { - writer.writeMessage( - 10, - f, - proto.aggregator.ETHTransferNode.serializeBinaryToWriter - ); - } - f = message.getContractWrite(); - if (f != null) { - writer.writeMessage( - 11, - f, - proto.aggregator.ContractWriteNode.serializeBinaryToWriter - ); - } - f = message.getContractRead(); - if (f != null) { - writer.writeMessage( - 12, - f, - proto.aggregator.ContractReadNode.serializeBinaryToWriter - ); - } - f = message.getGraphqlDataQuery(); - if (f != null) { - writer.writeMessage( - 13, - f, - proto.aggregator.GraphQLQueryNode.serializeBinaryToWriter - ); - } - f = message.getRestApi(); - if (f != null) { - writer.writeMessage( - 14, - f, - proto.aggregator.RestAPINode.serializeBinaryToWriter - ); - } - f = message.getBranch(); - if (f != null) { - writer.writeMessage( - 15, - f, - proto.aggregator.BranchNode.serializeBinaryToWriter - ); - } - f = message.getFilter(); - if (f != null) { - writer.writeMessage( - 16, - f, - proto.aggregator.FilterNode.serializeBinaryToWriter - ); - } - f = message.getLoop(); - if (f != null) { - writer.writeMessage( - 17, - f, - proto.aggregator.LoopNode.serializeBinaryToWriter - ); - } - f = message.getCustomCode(); - if (f != null) { - writer.writeMessage( - 18, + writer.writeRepeatedMessage( + 1, f, - proto.aggregator.CustomCodeNode.serializeBinaryToWriter + proto.aggregator.Condition.serializeBinaryToWriter ); } }; /** - * optional string id = 2; - * @return {string} + * repeated Condition conditions = 1; + * @return {!Array} */ -proto.aggregator.TaskNode.prototype.getId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.aggregator.BranchNode.prototype.getConditionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.Condition, 1)); }; /** - * @param {string} value + * @param {!Array} value + * @return {!proto.aggregator.BranchNode} returns this +*/ +proto.aggregator.BranchNode.prototype.setConditionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.aggregator.Condition=} opt_value + * @param {number=} opt_index + * @return {!proto.aggregator.Condition} + */ +proto.aggregator.BranchNode.prototype.addConditions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.aggregator.Condition, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.aggregator.BranchNode} returns this + */ +proto.aggregator.BranchNode.prototype.clearConditionsList = function() { + return this.setConditionsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.aggregator.FilterNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.FilterNode.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.aggregator.FilterNode} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.FilterNode.toObject = function(includeInstance, msg) { + var f, obj = { + expression: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.aggregator.FilterNode} + */ +proto.aggregator.FilterNode.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.FilterNode; + return proto.aggregator.FilterNode.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.aggregator.FilterNode} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.aggregator.FilterNode} + */ +proto.aggregator.FilterNode.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setExpression(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.aggregator.FilterNode.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.FilterNode.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.aggregator.FilterNode} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.FilterNode.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getExpression(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string expression = 1; + * @return {string} + */ +proto.aggregator.FilterNode.prototype.getExpression = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.aggregator.FilterNode} returns this + */ +proto.aggregator.FilterNode.prototype.setExpression = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.aggregator.LoopNode.oneofGroups_ = [[10,11,12,13,14,15]]; + +/** + * @enum {number} + */ +proto.aggregator.LoopNode.RunnerCase = { + RUNNER_NOT_SET: 0, + ETH_TRANSFER: 10, + CONTRACT_WRITE: 11, + CONTRACT_READ: 12, + GRAPHQL_DATA_QUERY: 13, + REST_API: 14, + CUSTOM_CODE: 15 +}; + +/** + * @return {proto.aggregator.LoopNode.RunnerCase} + */ +proto.aggregator.LoopNode.prototype.getRunnerCase = function() { + return /** @type {proto.aggregator.LoopNode.RunnerCase} */(jspb.Message.computeOneofCase(this, proto.aggregator.LoopNode.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.aggregator.LoopNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.LoopNode.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.aggregator.LoopNode} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.LoopNode.toObject = function(includeInstance, msg) { + var f, obj = { + input: jspb.Message.getFieldWithDefault(msg, 1, ""), + iterVal: jspb.Message.getFieldWithDefault(msg, 2, ""), + iterKey: jspb.Message.getFieldWithDefault(msg, 3, ""), + ethTransfer: (f = msg.getEthTransfer()) && proto.aggregator.ETHTransferNode.toObject(includeInstance, f), + contractWrite: (f = msg.getContractWrite()) && proto.aggregator.ContractWriteNode.toObject(includeInstance, f), + contractRead: (f = msg.getContractRead()) && proto.aggregator.ContractReadNode.toObject(includeInstance, f), + graphqlDataQuery: (f = msg.getGraphqlDataQuery()) && proto.aggregator.GraphQLQueryNode.toObject(includeInstance, f), + restApi: (f = msg.getRestApi()) && proto.aggregator.RestAPINode.toObject(includeInstance, f), + customCode: (f = msg.getCustomCode()) && proto.aggregator.CustomCodeNode.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.aggregator.LoopNode} + */ +proto.aggregator.LoopNode.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.LoopNode; + return proto.aggregator.LoopNode.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.aggregator.LoopNode} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.aggregator.LoopNode} + */ +proto.aggregator.LoopNode.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setInput(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setIterVal(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setIterKey(value); + break; + case 10: + var value = new proto.aggregator.ETHTransferNode; + reader.readMessage(value,proto.aggregator.ETHTransferNode.deserializeBinaryFromReader); + msg.setEthTransfer(value); + break; + case 11: + var value = new proto.aggregator.ContractWriteNode; + reader.readMessage(value,proto.aggregator.ContractWriteNode.deserializeBinaryFromReader); + msg.setContractWrite(value); + break; + case 12: + var value = new proto.aggregator.ContractReadNode; + reader.readMessage(value,proto.aggregator.ContractReadNode.deserializeBinaryFromReader); + msg.setContractRead(value); + break; + case 13: + var value = new proto.aggregator.GraphQLQueryNode; + reader.readMessage(value,proto.aggregator.GraphQLQueryNode.deserializeBinaryFromReader); + msg.setGraphqlDataQuery(value); + break; + case 14: + var value = new proto.aggregator.RestAPINode; + reader.readMessage(value,proto.aggregator.RestAPINode.deserializeBinaryFromReader); + msg.setRestApi(value); + break; + case 15: + var value = new proto.aggregator.CustomCodeNode; + reader.readMessage(value,proto.aggregator.CustomCodeNode.deserializeBinaryFromReader); + msg.setCustomCode(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.aggregator.LoopNode.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.LoopNode.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.aggregator.LoopNode} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.LoopNode.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInput(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getIterVal(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getIterKey(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getEthTransfer(); + if (f != null) { + writer.writeMessage( + 10, + f, + proto.aggregator.ETHTransferNode.serializeBinaryToWriter + ); + } + f = message.getContractWrite(); + if (f != null) { + writer.writeMessage( + 11, + f, + proto.aggregator.ContractWriteNode.serializeBinaryToWriter + ); + } + f = message.getContractRead(); + if (f != null) { + writer.writeMessage( + 12, + f, + proto.aggregator.ContractReadNode.serializeBinaryToWriter + ); + } + f = message.getGraphqlDataQuery(); + if (f != null) { + writer.writeMessage( + 13, + f, + proto.aggregator.GraphQLQueryNode.serializeBinaryToWriter + ); + } + f = message.getRestApi(); + if (f != null) { + writer.writeMessage( + 14, + f, + proto.aggregator.RestAPINode.serializeBinaryToWriter + ); + } + f = message.getCustomCode(); + if (f != null) { + writer.writeMessage( + 15, + f, + proto.aggregator.CustomCodeNode.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string input = 1; + * @return {string} + */ +proto.aggregator.LoopNode.prototype.getInput = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.aggregator.LoopNode} returns this + */ +proto.aggregator.LoopNode.prototype.setInput = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string iter_val = 2; + * @return {string} + */ +proto.aggregator.LoopNode.prototype.getIterVal = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.aggregator.LoopNode} returns this + */ +proto.aggregator.LoopNode.prototype.setIterVal = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string iter_key = 3; + * @return {string} + */ +proto.aggregator.LoopNode.prototype.getIterKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.aggregator.LoopNode} returns this + */ +proto.aggregator.LoopNode.prototype.setIterKey = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional ETHTransferNode eth_transfer = 10; + * @return {?proto.aggregator.ETHTransferNode} + */ +proto.aggregator.LoopNode.prototype.getEthTransfer = function() { + return /** @type{?proto.aggregator.ETHTransferNode} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.ETHTransferNode, 10)); +}; + + +/** + * @param {?proto.aggregator.ETHTransferNode|undefined} value + * @return {!proto.aggregator.LoopNode} returns this +*/ +proto.aggregator.LoopNode.prototype.setEthTransfer = function(value) { + return jspb.Message.setOneofWrapperField(this, 10, proto.aggregator.LoopNode.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.aggregator.LoopNode} returns this + */ +proto.aggregator.LoopNode.prototype.clearEthTransfer = function() { + return this.setEthTransfer(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.aggregator.LoopNode.prototype.hasEthTransfer = function() { + return jspb.Message.getField(this, 10) != null; +}; + + +/** + * optional ContractWriteNode contract_write = 11; + * @return {?proto.aggregator.ContractWriteNode} + */ +proto.aggregator.LoopNode.prototype.getContractWrite = function() { + return /** @type{?proto.aggregator.ContractWriteNode} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.ContractWriteNode, 11)); +}; + + +/** + * @param {?proto.aggregator.ContractWriteNode|undefined} value + * @return {!proto.aggregator.LoopNode} returns this +*/ +proto.aggregator.LoopNode.prototype.setContractWrite = function(value) { + return jspb.Message.setOneofWrapperField(this, 11, proto.aggregator.LoopNode.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.aggregator.LoopNode} returns this + */ +proto.aggregator.LoopNode.prototype.clearContractWrite = function() { + return this.setContractWrite(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.aggregator.LoopNode.prototype.hasContractWrite = function() { + return jspb.Message.getField(this, 11) != null; +}; + + +/** + * optional ContractReadNode contract_read = 12; + * @return {?proto.aggregator.ContractReadNode} + */ +proto.aggregator.LoopNode.prototype.getContractRead = function() { + return /** @type{?proto.aggregator.ContractReadNode} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.ContractReadNode, 12)); +}; + + +/** + * @param {?proto.aggregator.ContractReadNode|undefined} value + * @return {!proto.aggregator.LoopNode} returns this +*/ +proto.aggregator.LoopNode.prototype.setContractRead = function(value) { + return jspb.Message.setOneofWrapperField(this, 12, proto.aggregator.LoopNode.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.aggregator.LoopNode} returns this + */ +proto.aggregator.LoopNode.prototype.clearContractRead = function() { + return this.setContractRead(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.aggregator.LoopNode.prototype.hasContractRead = function() { + return jspb.Message.getField(this, 12) != null; +}; + + +/** + * optional GraphQLQueryNode graphql_data_query = 13; + * @return {?proto.aggregator.GraphQLQueryNode} + */ +proto.aggregator.LoopNode.prototype.getGraphqlDataQuery = function() { + return /** @type{?proto.aggregator.GraphQLQueryNode} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.GraphQLQueryNode, 13)); +}; + + +/** + * @param {?proto.aggregator.GraphQLQueryNode|undefined} value + * @return {!proto.aggregator.LoopNode} returns this +*/ +proto.aggregator.LoopNode.prototype.setGraphqlDataQuery = function(value) { + return jspb.Message.setOneofWrapperField(this, 13, proto.aggregator.LoopNode.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.aggregator.LoopNode} returns this + */ +proto.aggregator.LoopNode.prototype.clearGraphqlDataQuery = function() { + return this.setGraphqlDataQuery(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.aggregator.LoopNode.prototype.hasGraphqlDataQuery = function() { + return jspb.Message.getField(this, 13) != null; +}; + + +/** + * optional RestAPINode rest_api = 14; + * @return {?proto.aggregator.RestAPINode} + */ +proto.aggregator.LoopNode.prototype.getRestApi = function() { + return /** @type{?proto.aggregator.RestAPINode} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.RestAPINode, 14)); +}; + + +/** + * @param {?proto.aggregator.RestAPINode|undefined} value + * @return {!proto.aggregator.LoopNode} returns this +*/ +proto.aggregator.LoopNode.prototype.setRestApi = function(value) { + return jspb.Message.setOneofWrapperField(this, 14, proto.aggregator.LoopNode.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.aggregator.LoopNode} returns this + */ +proto.aggregator.LoopNode.prototype.clearRestApi = function() { + return this.setRestApi(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.aggregator.LoopNode.prototype.hasRestApi = function() { + return jspb.Message.getField(this, 14) != null; +}; + + +/** + * optional CustomCodeNode custom_code = 15; + * @return {?proto.aggregator.CustomCodeNode} + */ +proto.aggregator.LoopNode.prototype.getCustomCode = function() { + return /** @type{?proto.aggregator.CustomCodeNode} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.CustomCodeNode, 15)); +}; + + +/** + * @param {?proto.aggregator.CustomCodeNode|undefined} value + * @return {!proto.aggregator.LoopNode} returns this +*/ +proto.aggregator.LoopNode.prototype.setCustomCode = function(value) { + return jspb.Message.setOneofWrapperField(this, 15, proto.aggregator.LoopNode.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.aggregator.LoopNode} returns this + */ +proto.aggregator.LoopNode.prototype.clearCustomCode = function() { + return this.setCustomCode(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.aggregator.LoopNode.prototype.hasCustomCode = function() { + return jspb.Message.getField(this, 15) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.aggregator.TaskEdge.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.TaskEdge.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.aggregator.TaskEdge} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.TaskEdge.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + source: jspb.Message.getFieldWithDefault(msg, 2, ""), + target: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.aggregator.TaskEdge} + */ +proto.aggregator.TaskEdge.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.TaskEdge; + return proto.aggregator.TaskEdge.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.aggregator.TaskEdge} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.aggregator.TaskEdge} + */ +proto.aggregator.TaskEdge.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSource(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setTarget(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.aggregator.TaskEdge.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.TaskEdge.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.aggregator.TaskEdge} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.TaskEdge.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSource(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getTarget(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.aggregator.TaskEdge.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.aggregator.TaskEdge} returns this + */ +proto.aggregator.TaskEdge.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string source = 2; + * @return {string} + */ +proto.aggregator.TaskEdge.prototype.getSource = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.aggregator.TaskEdge} returns this + */ +proto.aggregator.TaskEdge.prototype.setSource = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string target = 3; + * @return {string} + */ +proto.aggregator.TaskEdge.prototype.getTarget = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.aggregator.TaskEdge} returns this + */ +proto.aggregator.TaskEdge.prototype.setTarget = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.aggregator.TaskNode.oneofGroups_ = [[10,11,12,13,14,15,16,17,18]]; + +/** + * @enum {number} + */ +proto.aggregator.TaskNode.TaskTypeCase = { + TASK_TYPE_NOT_SET: 0, + ETH_TRANSFER: 10, + CONTRACT_WRITE: 11, + CONTRACT_READ: 12, + GRAPHQL_DATA_QUERY: 13, + REST_API: 14, + BRANCH: 15, + FILTER: 16, + LOOP: 17, + CUSTOM_CODE: 18 +}; + +/** + * @return {proto.aggregator.TaskNode.TaskTypeCase} + */ +proto.aggregator.TaskNode.prototype.getTaskTypeCase = function() { + return /** @type {proto.aggregator.TaskNode.TaskTypeCase} */(jspb.Message.computeOneofCase(this, proto.aggregator.TaskNode.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.aggregator.TaskNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.TaskNode.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.aggregator.TaskNode} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.TaskNode.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 2, ""), + name: jspb.Message.getFieldWithDefault(msg, 3, ""), + ethTransfer: (f = msg.getEthTransfer()) && proto.aggregator.ETHTransferNode.toObject(includeInstance, f), + contractWrite: (f = msg.getContractWrite()) && proto.aggregator.ContractWriteNode.toObject(includeInstance, f), + contractRead: (f = msg.getContractRead()) && proto.aggregator.ContractReadNode.toObject(includeInstance, f), + graphqlDataQuery: (f = msg.getGraphqlDataQuery()) && proto.aggregator.GraphQLQueryNode.toObject(includeInstance, f), + restApi: (f = msg.getRestApi()) && proto.aggregator.RestAPINode.toObject(includeInstance, f), + branch: (f = msg.getBranch()) && proto.aggregator.BranchNode.toObject(includeInstance, f), + filter: (f = msg.getFilter()) && proto.aggregator.FilterNode.toObject(includeInstance, f), + loop: (f = msg.getLoop()) && proto.aggregator.LoopNode.toObject(includeInstance, f), + customCode: (f = msg.getCustomCode()) && proto.aggregator.CustomCodeNode.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.aggregator.TaskNode} + */ +proto.aggregator.TaskNode.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.TaskNode; + return proto.aggregator.TaskNode.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.aggregator.TaskNode} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.aggregator.TaskNode} + */ +proto.aggregator.TaskNode.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 10: + var value = new proto.aggregator.ETHTransferNode; + reader.readMessage(value,proto.aggregator.ETHTransferNode.deserializeBinaryFromReader); + msg.setEthTransfer(value); + break; + case 11: + var value = new proto.aggregator.ContractWriteNode; + reader.readMessage(value,proto.aggregator.ContractWriteNode.deserializeBinaryFromReader); + msg.setContractWrite(value); + break; + case 12: + var value = new proto.aggregator.ContractReadNode; + reader.readMessage(value,proto.aggregator.ContractReadNode.deserializeBinaryFromReader); + msg.setContractRead(value); + break; + case 13: + var value = new proto.aggregator.GraphQLQueryNode; + reader.readMessage(value,proto.aggregator.GraphQLQueryNode.deserializeBinaryFromReader); + msg.setGraphqlDataQuery(value); + break; + case 14: + var value = new proto.aggregator.RestAPINode; + reader.readMessage(value,proto.aggregator.RestAPINode.deserializeBinaryFromReader); + msg.setRestApi(value); + break; + case 15: + var value = new proto.aggregator.BranchNode; + reader.readMessage(value,proto.aggregator.BranchNode.deserializeBinaryFromReader); + msg.setBranch(value); + break; + case 16: + var value = new proto.aggregator.FilterNode; + reader.readMessage(value,proto.aggregator.FilterNode.deserializeBinaryFromReader); + msg.setFilter(value); + break; + case 17: + var value = new proto.aggregator.LoopNode; + reader.readMessage(value,proto.aggregator.LoopNode.deserializeBinaryFromReader); + msg.setLoop(value); + break; + case 18: + var value = new proto.aggregator.CustomCodeNode; + reader.readMessage(value,proto.aggregator.CustomCodeNode.deserializeBinaryFromReader); + msg.setCustomCode(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.aggregator.TaskNode.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.TaskNode.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.aggregator.TaskNode} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.TaskNode.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getEthTransfer(); + if (f != null) { + writer.writeMessage( + 10, + f, + proto.aggregator.ETHTransferNode.serializeBinaryToWriter + ); + } + f = message.getContractWrite(); + if (f != null) { + writer.writeMessage( + 11, + f, + proto.aggregator.ContractWriteNode.serializeBinaryToWriter + ); + } + f = message.getContractRead(); + if (f != null) { + writer.writeMessage( + 12, + f, + proto.aggregator.ContractReadNode.serializeBinaryToWriter + ); + } + f = message.getGraphqlDataQuery(); + if (f != null) { + writer.writeMessage( + 13, + f, + proto.aggregator.GraphQLQueryNode.serializeBinaryToWriter + ); + } + f = message.getRestApi(); + if (f != null) { + writer.writeMessage( + 14, + f, + proto.aggregator.RestAPINode.serializeBinaryToWriter + ); + } + f = message.getBranch(); + if (f != null) { + writer.writeMessage( + 15, + f, + proto.aggregator.BranchNode.serializeBinaryToWriter + ); + } + f = message.getFilter(); + if (f != null) { + writer.writeMessage( + 16, + f, + proto.aggregator.FilterNode.serializeBinaryToWriter + ); + } + f = message.getLoop(); + if (f != null) { + writer.writeMessage( + 17, + f, + proto.aggregator.LoopNode.serializeBinaryToWriter + ); + } + f = message.getCustomCode(); + if (f != null) { + writer.writeMessage( + 18, + f, + proto.aggregator.CustomCodeNode.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string id = 2; + * @return {string} + */ +proto.aggregator.TaskNode.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value * @return {!proto.aggregator.TaskNode} returns this */ proto.aggregator.TaskNode.prototype.setId = function(value) { @@ -5416,27 +6297,249 @@ proto.aggregator.TaskNode.prototype.clearEthTransfer = function() { * Returns whether this field is set. * @return {boolean} */ -proto.aggregator.TaskNode.prototype.hasEthTransfer = function() { - return jspb.Message.getField(this, 10) != null; +proto.aggregator.TaskNode.prototype.hasEthTransfer = function() { + return jspb.Message.getField(this, 10) != null; +}; + + +/** + * optional ContractWriteNode contract_write = 11; + * @return {?proto.aggregator.ContractWriteNode} + */ +proto.aggregator.TaskNode.prototype.getContractWrite = function() { + return /** @type{?proto.aggregator.ContractWriteNode} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.ContractWriteNode, 11)); +}; + + +/** + * @param {?proto.aggregator.ContractWriteNode|undefined} value + * @return {!proto.aggregator.TaskNode} returns this +*/ +proto.aggregator.TaskNode.prototype.setContractWrite = function(value) { + return jspb.Message.setOneofWrapperField(this, 11, proto.aggregator.TaskNode.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.aggregator.TaskNode} returns this + */ +proto.aggregator.TaskNode.prototype.clearContractWrite = function() { + return this.setContractWrite(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.aggregator.TaskNode.prototype.hasContractWrite = function() { + return jspb.Message.getField(this, 11) != null; +}; + + +/** + * optional ContractReadNode contract_read = 12; + * @return {?proto.aggregator.ContractReadNode} + */ +proto.aggregator.TaskNode.prototype.getContractRead = function() { + return /** @type{?proto.aggregator.ContractReadNode} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.ContractReadNode, 12)); +}; + + +/** + * @param {?proto.aggregator.ContractReadNode|undefined} value + * @return {!proto.aggregator.TaskNode} returns this +*/ +proto.aggregator.TaskNode.prototype.setContractRead = function(value) { + return jspb.Message.setOneofWrapperField(this, 12, proto.aggregator.TaskNode.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.aggregator.TaskNode} returns this + */ +proto.aggregator.TaskNode.prototype.clearContractRead = function() { + return this.setContractRead(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.aggregator.TaskNode.prototype.hasContractRead = function() { + return jspb.Message.getField(this, 12) != null; +}; + + +/** + * optional GraphQLQueryNode graphql_data_query = 13; + * @return {?proto.aggregator.GraphQLQueryNode} + */ +proto.aggregator.TaskNode.prototype.getGraphqlDataQuery = function() { + return /** @type{?proto.aggregator.GraphQLQueryNode} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.GraphQLQueryNode, 13)); +}; + + +/** + * @param {?proto.aggregator.GraphQLQueryNode|undefined} value + * @return {!proto.aggregator.TaskNode} returns this +*/ +proto.aggregator.TaskNode.prototype.setGraphqlDataQuery = function(value) { + return jspb.Message.setOneofWrapperField(this, 13, proto.aggregator.TaskNode.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.aggregator.TaskNode} returns this + */ +proto.aggregator.TaskNode.prototype.clearGraphqlDataQuery = function() { + return this.setGraphqlDataQuery(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.aggregator.TaskNode.prototype.hasGraphqlDataQuery = function() { + return jspb.Message.getField(this, 13) != null; +}; + + +/** + * optional RestAPINode rest_api = 14; + * @return {?proto.aggregator.RestAPINode} + */ +proto.aggregator.TaskNode.prototype.getRestApi = function() { + return /** @type{?proto.aggregator.RestAPINode} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.RestAPINode, 14)); +}; + + +/** + * @param {?proto.aggregator.RestAPINode|undefined} value + * @return {!proto.aggregator.TaskNode} returns this +*/ +proto.aggregator.TaskNode.prototype.setRestApi = function(value) { + return jspb.Message.setOneofWrapperField(this, 14, proto.aggregator.TaskNode.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.aggregator.TaskNode} returns this + */ +proto.aggregator.TaskNode.prototype.clearRestApi = function() { + return this.setRestApi(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.aggregator.TaskNode.prototype.hasRestApi = function() { + return jspb.Message.getField(this, 14) != null; +}; + + +/** + * optional BranchNode branch = 15; + * @return {?proto.aggregator.BranchNode} + */ +proto.aggregator.TaskNode.prototype.getBranch = function() { + return /** @type{?proto.aggregator.BranchNode} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.BranchNode, 15)); +}; + + +/** + * @param {?proto.aggregator.BranchNode|undefined} value + * @return {!proto.aggregator.TaskNode} returns this +*/ +proto.aggregator.TaskNode.prototype.setBranch = function(value) { + return jspb.Message.setOneofWrapperField(this, 15, proto.aggregator.TaskNode.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.aggregator.TaskNode} returns this + */ +proto.aggregator.TaskNode.prototype.clearBranch = function() { + return this.setBranch(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.aggregator.TaskNode.prototype.hasBranch = function() { + return jspb.Message.getField(this, 15) != null; +}; + + +/** + * optional FilterNode filter = 16; + * @return {?proto.aggregator.FilterNode} + */ +proto.aggregator.TaskNode.prototype.getFilter = function() { + return /** @type{?proto.aggregator.FilterNode} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.FilterNode, 16)); +}; + + +/** + * @param {?proto.aggregator.FilterNode|undefined} value + * @return {!proto.aggregator.TaskNode} returns this +*/ +proto.aggregator.TaskNode.prototype.setFilter = function(value) { + return jspb.Message.setOneofWrapperField(this, 16, proto.aggregator.TaskNode.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.aggregator.TaskNode} returns this + */ +proto.aggregator.TaskNode.prototype.clearFilter = function() { + return this.setFilter(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.aggregator.TaskNode.prototype.hasFilter = function() { + return jspb.Message.getField(this, 16) != null; }; /** - * optional ContractWriteNode contract_write = 11; - * @return {?proto.aggregator.ContractWriteNode} + * optional LoopNode loop = 17; + * @return {?proto.aggregator.LoopNode} */ -proto.aggregator.TaskNode.prototype.getContractWrite = function() { - return /** @type{?proto.aggregator.ContractWriteNode} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.ContractWriteNode, 11)); +proto.aggregator.TaskNode.prototype.getLoop = function() { + return /** @type{?proto.aggregator.LoopNode} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.LoopNode, 17)); }; /** - * @param {?proto.aggregator.ContractWriteNode|undefined} value + * @param {?proto.aggregator.LoopNode|undefined} value * @return {!proto.aggregator.TaskNode} returns this */ -proto.aggregator.TaskNode.prototype.setContractWrite = function(value) { - return jspb.Message.setOneofWrapperField(this, 11, proto.aggregator.TaskNode.oneofGroups_[0], value); +proto.aggregator.TaskNode.prototype.setLoop = function(value) { + return jspb.Message.setOneofWrapperField(this, 17, proto.aggregator.TaskNode.oneofGroups_[0], value); }; @@ -5444,8 +6547,8 @@ proto.aggregator.TaskNode.prototype.setContractWrite = function(value) { * Clears the message field making it undefined. * @return {!proto.aggregator.TaskNode} returns this */ -proto.aggregator.TaskNode.prototype.clearContractWrite = function() { - return this.setContractWrite(undefined); +proto.aggregator.TaskNode.prototype.clearLoop = function() { + return this.setLoop(undefined); }; @@ -5453,27 +6556,27 @@ proto.aggregator.TaskNode.prototype.clearContractWrite = function() { * Returns whether this field is set. * @return {boolean} */ -proto.aggregator.TaskNode.prototype.hasContractWrite = function() { - return jspb.Message.getField(this, 11) != null; +proto.aggregator.TaskNode.prototype.hasLoop = function() { + return jspb.Message.getField(this, 17) != null; }; /** - * optional ContractReadNode contract_read = 12; - * @return {?proto.aggregator.ContractReadNode} + * optional CustomCodeNode custom_code = 18; + * @return {?proto.aggregator.CustomCodeNode} */ -proto.aggregator.TaskNode.prototype.getContractRead = function() { - return /** @type{?proto.aggregator.ContractReadNode} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.ContractReadNode, 12)); +proto.aggregator.TaskNode.prototype.getCustomCode = function() { + return /** @type{?proto.aggregator.CustomCodeNode} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.CustomCodeNode, 18)); }; /** - * @param {?proto.aggregator.ContractReadNode|undefined} value + * @param {?proto.aggregator.CustomCodeNode|undefined} value * @return {!proto.aggregator.TaskNode} returns this */ -proto.aggregator.TaskNode.prototype.setContractRead = function(value) { - return jspb.Message.setOneofWrapperField(this, 12, proto.aggregator.TaskNode.oneofGroups_[0], value); +proto.aggregator.TaskNode.prototype.setCustomCode = function(value) { + return jspb.Message.setOneofWrapperField(this, 18, proto.aggregator.TaskNode.oneofGroups_[0], value); }; @@ -5481,8 +6584,8 @@ proto.aggregator.TaskNode.prototype.setContractRead = function(value) { * Clears the message field making it undefined. * @return {!proto.aggregator.TaskNode} returns this */ -proto.aggregator.TaskNode.prototype.clearContractRead = function() { - return this.setContractRead(undefined); +proto.aggregator.TaskNode.prototype.clearCustomCode = function() { + return this.setCustomCode(undefined); }; @@ -5490,420 +6593,589 @@ proto.aggregator.TaskNode.prototype.clearContractRead = function() { * Returns whether this field is set. * @return {boolean} */ -proto.aggregator.TaskNode.prototype.hasContractRead = function() { - return jspb.Message.getField(this, 12) != null; +proto.aggregator.TaskNode.prototype.hasCustomCode = function() { + return jspb.Message.getField(this, 18) != null; }; + /** - * optional GraphQLQueryNode graphql_data_query = 13; - * @return {?proto.aggregator.GraphQLQueryNode} + * List of repeated fields within this message type. + * @private {!Array} + * @const */ -proto.aggregator.TaskNode.prototype.getGraphqlDataQuery = function() { - return /** @type{?proto.aggregator.GraphQLQueryNode} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.GraphQLQueryNode, 13)); +proto.aggregator.Execution.repeatedFields_ = [6]; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.aggregator.Execution.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.Execution.toObject(opt_includeInstance, this); }; /** - * @param {?proto.aggregator.GraphQLQueryNode|undefined} value - * @return {!proto.aggregator.TaskNode} returns this -*/ -proto.aggregator.TaskNode.prototype.setGraphqlDataQuery = function(value) { - return jspb.Message.setOneofWrapperField(this, 13, proto.aggregator.TaskNode.oneofGroups_[0], value); + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.aggregator.Execution} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.Execution.toObject = function(includeInstance, msg) { + var f, obj = { + epoch: jspb.Message.getFieldWithDefault(msg, 1, 0), + success: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), + error: jspb.Message.getFieldWithDefault(msg, 3, ""), + triggerMark: (f = msg.getTriggerMark()) && proto.aggregator.TriggerMark.toObject(includeInstance, f), + result: jspb.Message.getFieldWithDefault(msg, 5, ""), + stepsList: jspb.Message.toObjectList(msg.getStepsList(), + proto.aggregator.Execution.Step.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * Clears the message field making it undefined. - * @return {!proto.aggregator.TaskNode} returns this + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.aggregator.Execution} */ -proto.aggregator.TaskNode.prototype.clearGraphqlDataQuery = function() { - return this.setGraphqlDataQuery(undefined); +proto.aggregator.Execution.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.Execution; + return proto.aggregator.Execution.deserializeBinaryFromReader(msg, reader); }; /** - * Returns whether this field is set. - * @return {boolean} + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.aggregator.Execution} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.aggregator.Execution} */ -proto.aggregator.TaskNode.prototype.hasGraphqlDataQuery = function() { - return jspb.Message.getField(this, 13) != null; +proto.aggregator.Execution.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setEpoch(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setSuccess(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setError(value); + break; + case 4: + var value = new proto.aggregator.TriggerMark; + reader.readMessage(value,proto.aggregator.TriggerMark.deserializeBinaryFromReader); + msg.setTriggerMark(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setResult(value); + break; + case 6: + var value = new proto.aggregator.Execution.Step; + reader.readMessage(value,proto.aggregator.Execution.Step.deserializeBinaryFromReader); + msg.addSteps(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * optional RestAPINode rest_api = 14; - * @return {?proto.aggregator.RestAPINode} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.aggregator.TaskNode.prototype.getRestApi = function() { - return /** @type{?proto.aggregator.RestAPINode} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.RestAPINode, 14)); +proto.aggregator.Execution.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.Execution.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * @param {?proto.aggregator.RestAPINode|undefined} value - * @return {!proto.aggregator.TaskNode} returns this -*/ -proto.aggregator.TaskNode.prototype.setRestApi = function(value) { - return jspb.Message.setOneofWrapperField(this, 14, proto.aggregator.TaskNode.oneofGroups_[0], value); + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.aggregator.Execution} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.Execution.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getEpoch(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getSuccess(); + if (f) { + writer.writeBool( + 2, + f + ); + } + f = message.getError(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getTriggerMark(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.aggregator.TriggerMark.serializeBinaryToWriter + ); + } + f = message.getResult(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getStepsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 6, + f, + proto.aggregator.Execution.Step.serializeBinaryToWriter + ); + } }; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Clears the message field making it undefined. - * @return {!proto.aggregator.TaskNode} returns this + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} */ -proto.aggregator.TaskNode.prototype.clearRestApi = function() { - return this.setRestApi(undefined); +proto.aggregator.Execution.Step.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.Execution.Step.toObject(opt_includeInstance, this); }; /** - * Returns whether this field is set. - * @return {boolean} + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.aggregator.Execution.Step} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.Execution.Step.toObject = function(includeInstance, msg) { + var f, obj = { + nodeId: jspb.Message.getFieldWithDefault(msg, 1, ""), + success: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), + result: jspb.Message.getFieldWithDefault(msg, 3, ""), + log: jspb.Message.getFieldWithDefault(msg, 4, ""), + error: jspb.Message.getFieldWithDefault(msg, 5, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.aggregator.Execution.Step} */ -proto.aggregator.TaskNode.prototype.hasRestApi = function() { - return jspb.Message.getField(this, 14) != null; +proto.aggregator.Execution.Step.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.Execution.Step; + return proto.aggregator.Execution.Step.deserializeBinaryFromReader(msg, reader); }; /** - * optional BranchNode branch = 15; - * @return {?proto.aggregator.BranchNode} + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.aggregator.Execution.Step} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.aggregator.Execution.Step} */ -proto.aggregator.TaskNode.prototype.getBranch = function() { - return /** @type{?proto.aggregator.BranchNode} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.BranchNode, 15)); +proto.aggregator.Execution.Step.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setNodeId(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setSuccess(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setResult(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setLog(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setError(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * @param {?proto.aggregator.BranchNode|undefined} value - * @return {!proto.aggregator.TaskNode} returns this -*/ -proto.aggregator.TaskNode.prototype.setBranch = function(value) { - return jspb.Message.setOneofWrapperField(this, 15, proto.aggregator.TaskNode.oneofGroups_[0], value); + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.aggregator.Execution.Step.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.Execution.Step.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * Clears the message field making it undefined. - * @return {!proto.aggregator.TaskNode} returns this + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.aggregator.Execution.Step} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.TaskNode.prototype.clearBranch = function() { - return this.setBranch(undefined); +proto.aggregator.Execution.Step.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getNodeId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSuccess(); + if (f) { + writer.writeBool( + 2, + f + ); + } + f = message.getResult(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getLog(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + f = message.getError(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } }; /** - * Returns whether this field is set. - * @return {boolean} + * optional string node_id = 1; + * @return {string} */ -proto.aggregator.TaskNode.prototype.hasBranch = function() { - return jspb.Message.getField(this, 15) != null; +proto.aggregator.Execution.Step.prototype.getNodeId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional FilterNode filter = 16; - * @return {?proto.aggregator.FilterNode} + * @param {string} value + * @return {!proto.aggregator.Execution.Step} returns this */ -proto.aggregator.TaskNode.prototype.getFilter = function() { - return /** @type{?proto.aggregator.FilterNode} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.FilterNode, 16)); +proto.aggregator.Execution.Step.prototype.setNodeId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; /** - * @param {?proto.aggregator.FilterNode|undefined} value - * @return {!proto.aggregator.TaskNode} returns this -*/ -proto.aggregator.TaskNode.prototype.setFilter = function(value) { - return jspb.Message.setOneofWrapperField(this, 16, proto.aggregator.TaskNode.oneofGroups_[0], value); + * optional bool success = 2; + * @return {boolean} + */ +proto.aggregator.Execution.Step.prototype.getSuccess = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; /** - * Clears the message field making it undefined. - * @return {!proto.aggregator.TaskNode} returns this + * @param {boolean} value + * @return {!proto.aggregator.Execution.Step} returns this */ -proto.aggregator.TaskNode.prototype.clearFilter = function() { - return this.setFilter(undefined); +proto.aggregator.Execution.Step.prototype.setSuccess = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); }; /** - * Returns whether this field is set. - * @return {boolean} + * optional string result = 3; + * @return {string} */ -proto.aggregator.TaskNode.prototype.hasFilter = function() { - return jspb.Message.getField(this, 16) != null; +proto.aggregator.Execution.Step.prototype.getResult = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** - * optional LoopNode loop = 17; - * @return {?proto.aggregator.LoopNode} + * @param {string} value + * @return {!proto.aggregator.Execution.Step} returns this */ -proto.aggregator.TaskNode.prototype.getLoop = function() { - return /** @type{?proto.aggregator.LoopNode} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.LoopNode, 17)); +proto.aggregator.Execution.Step.prototype.setResult = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); }; /** - * @param {?proto.aggregator.LoopNode|undefined} value - * @return {!proto.aggregator.TaskNode} returns this -*/ -proto.aggregator.TaskNode.prototype.setLoop = function(value) { - return jspb.Message.setOneofWrapperField(this, 17, proto.aggregator.TaskNode.oneofGroups_[0], value); + * optional string log = 4; + * @return {string} + */ +proto.aggregator.Execution.Step.prototype.getLog = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; /** - * Clears the message field making it undefined. - * @return {!proto.aggregator.TaskNode} returns this + * @param {string} value + * @return {!proto.aggregator.Execution.Step} returns this */ -proto.aggregator.TaskNode.prototype.clearLoop = function() { - return this.setLoop(undefined); +proto.aggregator.Execution.Step.prototype.setLog = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); }; /** - * Returns whether this field is set. - * @return {boolean} + * optional string error = 5; + * @return {string} */ -proto.aggregator.TaskNode.prototype.hasLoop = function() { - return jspb.Message.getField(this, 17) != null; +proto.aggregator.Execution.Step.prototype.getError = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); }; /** - * optional CustomCodeNode custom_code = 18; - * @return {?proto.aggregator.CustomCodeNode} + * @param {string} value + * @return {!proto.aggregator.Execution.Step} returns this */ -proto.aggregator.TaskNode.prototype.getCustomCode = function() { - return /** @type{?proto.aggregator.CustomCodeNode} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.CustomCodeNode, 18)); +proto.aggregator.Execution.Step.prototype.setError = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); }; /** - * @param {?proto.aggregator.CustomCodeNode|undefined} value - * @return {!proto.aggregator.TaskNode} returns this -*/ -proto.aggregator.TaskNode.prototype.setCustomCode = function(value) { - return jspb.Message.setOneofWrapperField(this, 18, proto.aggregator.TaskNode.oneofGroups_[0], value); + * optional int64 epoch = 1; + * @return {number} + */ +proto.aggregator.Execution.prototype.getEpoch = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** - * Clears the message field making it undefined. - * @return {!proto.aggregator.TaskNode} returns this + * @param {number} value + * @return {!proto.aggregator.Execution} returns this */ -proto.aggregator.TaskNode.prototype.clearCustomCode = function() { - return this.setCustomCode(undefined); +proto.aggregator.Execution.prototype.setEpoch = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); }; /** - * Returns whether this field is set. + * optional bool success = 2; * @return {boolean} */ -proto.aggregator.TaskNode.prototype.hasCustomCode = function() { - return jspb.Message.getField(this, 18) != null; +proto.aggregator.Execution.prototype.getSuccess = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); }; +/** + * @param {boolean} value + * @return {!proto.aggregator.Execution} returns this + */ +proto.aggregator.Execution.prototype.setSuccess = function(value) { + return jspb.Message.setProto3BooleanField(this, 2, value); +}; - -if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} + * optional string error = 3; + * @return {string} */ -proto.aggregator.Execution.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.Execution.toObject(opt_includeInstance, this); +proto.aggregator.Execution.prototype.getError = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.aggregator.Execution} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * @param {string} value + * @return {!proto.aggregator.Execution} returns this */ -proto.aggregator.Execution.toObject = function(includeInstance, msg) { - var f, obj = { - epoch: jspb.Message.getFieldWithDefault(msg, 1, 0), - userOpHash: jspb.Message.getFieldWithDefault(msg, 2, ""), - error: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +proto.aggregator.Execution.prototype.setError = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.Execution} + * optional TriggerMark trigger_mark = 4; + * @return {?proto.aggregator.TriggerMark} */ -proto.aggregator.Execution.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.Execution; - return proto.aggregator.Execution.deserializeBinaryFromReader(msg, reader); +proto.aggregator.Execution.prototype.getTriggerMark = function() { + return /** @type{?proto.aggregator.TriggerMark} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.TriggerMark, 4)); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.aggregator.Execution} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.Execution} - */ -proto.aggregator.Execution.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt64()); - msg.setEpoch(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setUserOpHash(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setError(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; + * @param {?proto.aggregator.TriggerMark|undefined} value + * @return {!proto.aggregator.Execution} returns this +*/ +proto.aggregator.Execution.prototype.setTriggerMark = function(value) { + return jspb.Message.setWrapperField(this, 4, value); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * Clears the message field making it undefined. + * @return {!proto.aggregator.Execution} returns this */ -proto.aggregator.Execution.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.Execution.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.aggregator.Execution.prototype.clearTriggerMark = function() { + return this.setTriggerMark(undefined); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.Execution} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * Returns whether this field is set. + * @return {boolean} */ -proto.aggregator.Execution.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getEpoch(); - if (f !== 0) { - writer.writeInt64( - 1, - f - ); - } - f = message.getUserOpHash(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getError(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } +proto.aggregator.Execution.prototype.hasTriggerMark = function() { + return jspb.Message.getField(this, 4) != null; }; /** - * optional int64 epoch = 1; - * @return {number} + * optional string result = 5; + * @return {string} */ -proto.aggregator.Execution.prototype.getEpoch = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.aggregator.Execution.prototype.getResult = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); }; /** - * @param {number} value + * @param {string} value * @return {!proto.aggregator.Execution} returns this */ -proto.aggregator.Execution.prototype.setEpoch = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); +proto.aggregator.Execution.prototype.setResult = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); }; /** - * optional string user_op_hash = 2; - * @return {string} + * repeated Step steps = 6; + * @return {!Array} */ -proto.aggregator.Execution.prototype.getUserOpHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.aggregator.Execution.prototype.getStepsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.Execution.Step, 6)); }; /** - * @param {string} value + * @param {!Array} value * @return {!proto.aggregator.Execution} returns this - */ -proto.aggregator.Execution.prototype.setUserOpHash = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); +*/ +proto.aggregator.Execution.prototype.setStepsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 6, value); }; /** - * optional string error = 3; - * @return {string} + * @param {!proto.aggregator.Execution.Step=} opt_value + * @param {number=} opt_index + * @return {!proto.aggregator.Execution.Step} */ -proto.aggregator.Execution.prototype.getError = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.aggregator.Execution.prototype.addSteps = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 6, opt_value, proto.aggregator.Execution.Step, opt_index); }; /** - * @param {string} value + * Clears the list making it empty but non-null. * @return {!proto.aggregator.Execution} returns this */ -proto.aggregator.Execution.prototype.setError = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); +proto.aggregator.Execution.prototype.clearStepsList = function() { + return this.setStepsList([]); }; @@ -8419,12 +9691,195 @@ proto.aggregator.KeyResp.prototype.setKey = function(value) { + + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * List of repeated fields within this message type. - * @private {!Array} - * @const + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.aggregator.TriggerMark.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.TriggerMark.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.aggregator.TriggerMark} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.TriggerMark.toObject = function(includeInstance, msg) { + var f, obj = { + blockNumber: jspb.Message.getFieldWithDefault(msg, 1, 0), + logIndex: jspb.Message.getFieldWithDefault(msg, 2, 0), + txHash: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.aggregator.TriggerMark} + */ +proto.aggregator.TriggerMark.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.TriggerMark; + return proto.aggregator.TriggerMark.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.aggregator.TriggerMark} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.aggregator.TriggerMark} + */ +proto.aggregator.TriggerMark.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readUint64()); + msg.setBlockNumber(value); + break; + case 2: + var value = /** @type {number} */ (reader.readUint64()); + msg.setLogIndex(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setTxHash(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.aggregator.TriggerMark.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.TriggerMark.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.aggregator.TriggerMark} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.TriggerMark.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getBlockNumber(); + if (f !== 0) { + writer.writeUint64( + 1, + f + ); + } + f = message.getLogIndex(); + if (f !== 0) { + writer.writeUint64( + 2, + f + ); + } + f = message.getTxHash(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional uint64 block_number = 1; + * @return {number} + */ +proto.aggregator.TriggerMark.prototype.getBlockNumber = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.aggregator.TriggerMark} returns this + */ +proto.aggregator.TriggerMark.prototype.setBlockNumber = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional uint64 log_index = 2; + * @return {number} */ -proto.aggregator.UpdateChecksReq.repeatedFields_ = [3]; +proto.aggregator.TriggerMark.prototype.getLogIndex = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.aggregator.TriggerMark} returns this + */ +proto.aggregator.TriggerMark.prototype.setLogIndex = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional string tx_hash = 3; + * @return {string} + */ +proto.aggregator.TriggerMark.prototype.getTxHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.aggregator.TriggerMark} returns this + */ +proto.aggregator.TriggerMark.prototype.setTxHash = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + @@ -8441,8 +9896,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.aggregator.UpdateChecksReq.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.UpdateChecksReq.toObject(opt_includeInstance, this); +proto.aggregator.NotifyTriggersReq.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.NotifyTriggersReq.toObject(opt_includeInstance, this); }; @@ -8451,15 +9906,16 @@ proto.aggregator.UpdateChecksReq.prototype.toObject = function(opt_includeInstan * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.aggregator.UpdateChecksReq} msg The msg instance to transform. + * @param {!proto.aggregator.NotifyTriggersReq} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.UpdateChecksReq.toObject = function(includeInstance, msg) { +proto.aggregator.NotifyTriggersReq.toObject = function(includeInstance, msg) { var f, obj = { address: jspb.Message.getFieldWithDefault(msg, 1, ""), signature: jspb.Message.getFieldWithDefault(msg, 2, ""), - idList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f + taskId: jspb.Message.getFieldWithDefault(msg, 3, ""), + triggerMarker: (f = msg.getTriggerMarker()) && proto.aggregator.TriggerMark.toObject(includeInstance, f) }; if (includeInstance) { @@ -8473,23 +9929,23 @@ proto.aggregator.UpdateChecksReq.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.UpdateChecksReq} + * @return {!proto.aggregator.NotifyTriggersReq} */ -proto.aggregator.UpdateChecksReq.deserializeBinary = function(bytes) { +proto.aggregator.NotifyTriggersReq.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.UpdateChecksReq; - return proto.aggregator.UpdateChecksReq.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.NotifyTriggersReq; + return proto.aggregator.NotifyTriggersReq.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.aggregator.UpdateChecksReq} msg The message object to deserialize into. + * @param {!proto.aggregator.NotifyTriggersReq} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.UpdateChecksReq} + * @return {!proto.aggregator.NotifyTriggersReq} */ -proto.aggregator.UpdateChecksReq.deserializeBinaryFromReader = function(msg, reader) { +proto.aggregator.NotifyTriggersReq.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -8506,7 +9962,12 @@ proto.aggregator.UpdateChecksReq.deserializeBinaryFromReader = function(msg, rea break; case 3: var value = /** @type {string} */ (reader.readString()); - msg.addId(value); + msg.setTaskId(value); + break; + case 4: + var value = new proto.aggregator.TriggerMark; + reader.readMessage(value,proto.aggregator.TriggerMark.deserializeBinaryFromReader); + msg.setTriggerMarker(value); break; default: reader.skipField(); @@ -8521,9 +9982,9 @@ proto.aggregator.UpdateChecksReq.deserializeBinaryFromReader = function(msg, rea * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.UpdateChecksReq.prototype.serializeBinary = function() { +proto.aggregator.NotifyTriggersReq.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.UpdateChecksReq.serializeBinaryToWriter(this, writer); + proto.aggregator.NotifyTriggersReq.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -8531,11 +9992,11 @@ proto.aggregator.UpdateChecksReq.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.UpdateChecksReq} message + * @param {!proto.aggregator.NotifyTriggersReq} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.UpdateChecksReq.serializeBinaryToWriter = function(message, writer) { +proto.aggregator.NotifyTriggersReq.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getAddress(); if (f.length > 0) { @@ -8551,13 +10012,21 @@ proto.aggregator.UpdateChecksReq.serializeBinaryToWriter = function(message, wri f ); } - f = message.getIdList(); + f = message.getTaskId(); if (f.length > 0) { - writer.writeRepeatedString( + writer.writeString( 3, f ); } + f = message.getTriggerMarker(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.aggregator.TriggerMark.serializeBinaryToWriter + ); + } }; @@ -8565,16 +10034,16 @@ proto.aggregator.UpdateChecksReq.serializeBinaryToWriter = function(message, wri * optional string address = 1; * @return {string} */ -proto.aggregator.UpdateChecksReq.prototype.getAddress = function() { +proto.aggregator.NotifyTriggersReq.prototype.getAddress = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.aggregator.UpdateChecksReq} returns this + * @return {!proto.aggregator.NotifyTriggersReq} returns this */ -proto.aggregator.UpdateChecksReq.prototype.setAddress = function(value) { +proto.aggregator.NotifyTriggersReq.prototype.setAddress = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; @@ -8583,54 +10052,72 @@ proto.aggregator.UpdateChecksReq.prototype.setAddress = function(value) { * optional string signature = 2; * @return {string} */ -proto.aggregator.UpdateChecksReq.prototype.getSignature = function() { +proto.aggregator.NotifyTriggersReq.prototype.getSignature = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @return {!proto.aggregator.UpdateChecksReq} returns this + * @return {!proto.aggregator.NotifyTriggersReq} returns this */ -proto.aggregator.UpdateChecksReq.prototype.setSignature = function(value) { +proto.aggregator.NotifyTriggersReq.prototype.setSignature = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; /** - * repeated string id = 3; - * @return {!Array} + * optional string task_id = 3; + * @return {string} */ -proto.aggregator.UpdateChecksReq.prototype.getIdList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); +proto.aggregator.NotifyTriggersReq.prototype.getTaskId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** - * @param {!Array} value - * @return {!proto.aggregator.UpdateChecksReq} returns this + * @param {string} value + * @return {!proto.aggregator.NotifyTriggersReq} returns this */ -proto.aggregator.UpdateChecksReq.prototype.setIdList = function(value) { - return jspb.Message.setField(this, 3, value || []); +proto.aggregator.NotifyTriggersReq.prototype.setTaskId = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); }; /** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.aggregator.UpdateChecksReq} returns this + * optional TriggerMark trigger_marker = 4; + * @return {?proto.aggregator.TriggerMark} */ -proto.aggregator.UpdateChecksReq.prototype.addId = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 3, value, opt_index); +proto.aggregator.NotifyTriggersReq.prototype.getTriggerMarker = function() { + return /** @type{?proto.aggregator.TriggerMark} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.TriggerMark, 4)); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.aggregator.UpdateChecksReq} returns this + * @param {?proto.aggregator.TriggerMark|undefined} value + * @return {!proto.aggregator.NotifyTriggersReq} returns this +*/ +proto.aggregator.NotifyTriggersReq.prototype.setTriggerMarker = function(value) { + return jspb.Message.setWrapperField(this, 4, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.aggregator.NotifyTriggersReq} returns this + */ +proto.aggregator.NotifyTriggersReq.prototype.clearTriggerMarker = function() { + return this.setTriggerMarker(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} */ -proto.aggregator.UpdateChecksReq.prototype.clearIdList = function() { - return this.setIdList([]); +proto.aggregator.NotifyTriggersReq.prototype.hasTriggerMarker = function() { + return jspb.Message.getField(this, 4) != null; }; @@ -8650,8 +10137,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.aggregator.UpdateChecksResp.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.UpdateChecksResp.toObject(opt_includeInstance, this); +proto.aggregator.NotifyTriggersResp.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.NotifyTriggersResp.toObject(opt_includeInstance, this); }; @@ -8660,11 +10147,11 @@ proto.aggregator.UpdateChecksResp.prototype.toObject = function(opt_includeInsta * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.aggregator.UpdateChecksResp} msg The msg instance to transform. + * @param {!proto.aggregator.NotifyTriggersResp} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.UpdateChecksResp.toObject = function(includeInstance, msg) { +proto.aggregator.NotifyTriggersResp.toObject = function(includeInstance, msg) { var f, obj = { updatedAt: (f = msg.getUpdatedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) }; @@ -8680,23 +10167,23 @@ proto.aggregator.UpdateChecksResp.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.UpdateChecksResp} + * @return {!proto.aggregator.NotifyTriggersResp} */ -proto.aggregator.UpdateChecksResp.deserializeBinary = function(bytes) { +proto.aggregator.NotifyTriggersResp.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.UpdateChecksResp; - return proto.aggregator.UpdateChecksResp.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.NotifyTriggersResp; + return proto.aggregator.NotifyTriggersResp.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.aggregator.UpdateChecksResp} msg The message object to deserialize into. + * @param {!proto.aggregator.NotifyTriggersResp} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.UpdateChecksResp} + * @return {!proto.aggregator.NotifyTriggersResp} */ -proto.aggregator.UpdateChecksResp.deserializeBinaryFromReader = function(msg, reader) { +proto.aggregator.NotifyTriggersResp.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -8721,9 +10208,9 @@ proto.aggregator.UpdateChecksResp.deserializeBinaryFromReader = function(msg, re * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.UpdateChecksResp.prototype.serializeBinary = function() { +proto.aggregator.NotifyTriggersResp.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.UpdateChecksResp.serializeBinaryToWriter(this, writer); + proto.aggregator.NotifyTriggersResp.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -8731,11 +10218,11 @@ proto.aggregator.UpdateChecksResp.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.UpdateChecksResp} message + * @param {!proto.aggregator.NotifyTriggersResp} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.UpdateChecksResp.serializeBinaryToWriter = function(message, writer) { +proto.aggregator.NotifyTriggersResp.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getUpdatedAt(); if (f != null) { @@ -8752,7 +10239,7 @@ proto.aggregator.UpdateChecksResp.serializeBinaryToWriter = function(message, wr * optional google.protobuf.Timestamp updated_at = 1; * @return {?proto.google.protobuf.Timestamp} */ -proto.aggregator.UpdateChecksResp.prototype.getUpdatedAt = function() { +proto.aggregator.NotifyTriggersResp.prototype.getUpdatedAt = function() { return /** @type{?proto.google.protobuf.Timestamp} */ ( jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 1)); }; @@ -8760,18 +10247,18 @@ proto.aggregator.UpdateChecksResp.prototype.getUpdatedAt = function() { /** * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.aggregator.UpdateChecksResp} returns this + * @return {!proto.aggregator.NotifyTriggersResp} returns this */ -proto.aggregator.UpdateChecksResp.prototype.setUpdatedAt = function(value) { +proto.aggregator.NotifyTriggersResp.prototype.setUpdatedAt = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. - * @return {!proto.aggregator.UpdateChecksResp} returns this + * @return {!proto.aggregator.NotifyTriggersResp} returns this */ -proto.aggregator.UpdateChecksResp.prototype.clearUpdatedAt = function() { +proto.aggregator.NotifyTriggersResp.prototype.clearUpdatedAt = function() { return this.setUpdatedAt(undefined); }; @@ -8780,7 +10267,7 @@ proto.aggregator.UpdateChecksResp.prototype.clearUpdatedAt = function() { * Returns whether this field is set. * @return {boolean} */ -proto.aggregator.UpdateChecksResp.prototype.hasUpdatedAt = function() { +proto.aggregator.NotifyTriggersResp.prototype.hasUpdatedAt = function() { return jspb.Message.getField(this, 1) != null; }; @@ -9135,6 +10622,17 @@ proto.aggregator.CreateWalletResp.prototype.setFactoryAddress = function(value) }; +/** + * @enum {number} + */ +proto.aggregator.MessageOp = { + UNSET: 0, + MONITORTASKTRIGGER: 1, + CANCELTASK: 2, + DELETETASK: 3, + COMPLETEDTASK: 4 +}; + /** * @enum {number} */ @@ -9163,7 +10661,7 @@ proto.aggregator.TaskStatus = { /** * @enum {number} */ -proto.aggregator.CustomCodeType = { +proto.aggregator.CustomCodeLang = { JAVASCRIPT: 0 }; diff --git a/go.mod b/go.mod index 00962a40..8dfcd2ad 100644 --- a/go.mod +++ b/go.mod @@ -5,11 +5,16 @@ go 1.23.0 require ( github.com/Layr-Labs/cerberus-api v0.0.0-20241016214048-d52f5ddc5559 github.com/Layr-Labs/eigensdk-go v0.1.6 + github.com/allegro/bigcache/v3 v3.1.0 github.com/dgraph-io/badger/v4 v4.2.0 + github.com/dop251/goja v0.0.0-20241024094426-79f3a7efcdbd github.com/ethereum/go-ethereum v1.13.14 github.com/expr-lang/expr v1.16.9 + github.com/ginkgoch/godash/v2 v2.0.1 github.com/go-co-op/gocron/v2 v2.11.0 + github.com/go-resty/resty/v2 v2.16.2 github.com/golang-jwt/jwt/v5 v5.2.1 + github.com/k0kubun/pp/v3 v3.4.1 github.com/labstack/echo/v4 v4.12.0 github.com/oklog/ulid/v2 v2.1.0 github.com/prometheus/client_golang v1.20.5 @@ -23,7 +28,6 @@ require ( require ( github.com/Microsoft/go-winio v0.6.1 // indirect github.com/StackExchange/wmi v1.2.1 // indirect - github.com/allegro/bigcache/v3 v3.1.0 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bits-and-blooms/bitset v1.10.0 // indirect github.com/btcsuite/btcd/btcec/v2 v2.2.0 // indirect @@ -34,6 +38,7 @@ require ( github.com/deckarep/golang-set/v2 v2.3.0 // indirect github.com/decred/dcrd/dcrec/secp256k1/v4 v4.0.1 // indirect github.com/dgraph-io/ristretto v0.1.1 // indirect + github.com/dlclark/regexp2 v1.11.4 // indirect github.com/dustin/go-humanize v1.0.0 // indirect github.com/ethereum/c-kzg-4844 v0.4.0 // indirect github.com/fsnotify/fsnotify v1.6.0 // indirect @@ -42,6 +47,7 @@ require ( github.com/go-playground/locales v0.14.1 // indirect github.com/go-playground/universal-translator v0.18.1 // indirect github.com/go-playground/validator/v10 v10.22.1 // indirect + github.com/go-sourcemap/sourcemap v2.1.3+incompatible // indirect github.com/gogo/protobuf v1.3.2 // indirect github.com/golang-jwt/jwt v3.2.2+incompatible // indirect github.com/golang/glog v1.2.2 // indirect @@ -49,6 +55,7 @@ require ( github.com/golang/protobuf v1.5.4 // indirect github.com/golang/snappy v0.0.5-0.20220116011046-fa5810519dcb // indirect github.com/google/flatbuffers v1.12.1 // indirect + github.com/google/pprof v0.0.0-20230207041349-798e818bf904 // indirect github.com/google/uuid v1.6.0 // indirect github.com/gorilla/websocket v1.4.2 // indirect github.com/grpc-ecosystem/grpc-gateway/v2 v2.22.0 // indirect @@ -69,6 +76,7 @@ require ( github.com/prometheus/procfs v0.15.1 // indirect github.com/robfig/cron/v3 v3.0.1 // indirect github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible // indirect + github.com/shopspring/decimal v1.4.0 // indirect github.com/spf13/pflag v1.0.5 // indirect github.com/supranational/blst v0.3.11 // indirect github.com/tklauser/go-sysconf v0.3.12 // indirect @@ -83,7 +91,7 @@ require ( golang.org/x/net v0.28.0 // indirect golang.org/x/sync v0.8.0 // indirect golang.org/x/sys v0.24.0 // indirect - golang.org/x/text v0.17.0 // indirect + golang.org/x/text v0.19.0 // indirect golang.org/x/tools v0.22.0 // indirect google.golang.org/genproto/googleapis/api v0.0.0-20241104194629-dd2ea8efbc28 // indirect google.golang.org/genproto/googleapis/rpc v0.0.0-20241021214115-324edc3d5d38 // indirect diff --git a/go.sum b/go.sum index 2af08e5d..55469ef2 100644 --- a/go.sum +++ b/go.sum @@ -6,6 +6,8 @@ github.com/Layr-Labs/cerberus-api v0.0.0-20241016214048-d52f5ddc5559 h1:qbkT/+tx github.com/Layr-Labs/cerberus-api v0.0.0-20241016214048-d52f5ddc5559/go.mod h1:Lm4fhzy0S3P7GjerzuseGaBFVczsIKmEhIjcT52Hluo= github.com/Layr-Labs/eigensdk-go v0.1.6 h1:LEJ8QZFAjuXH3H7BkwixFAxm1GVbCiTmsj1Q21xxsEA= github.com/Layr-Labs/eigensdk-go v0.1.6/go.mod h1:HOSNuZcwaKbP4cnNk9c1hK2B2RitcMQ36Xj2msBBBpE= +github.com/Masterminds/semver/v3 v3.2.1 h1:RN9w6+7QoMeJVGyfmbcgs28Br8cvmnucEXnY0rYXWg0= +github.com/Masterminds/semver/v3 v3.2.1/go.mod h1:qvl/7zhW3nngYb5+80sSMF+FG2BjYrf8m9wsX0PNOMQ= github.com/Microsoft/go-winio v0.6.1 h1:9/kr64B9VUZrLm5YYwbGtUJnMgqWVOdUAXu6Migciow= github.com/Microsoft/go-winio v0.6.1/go.mod h1:LRdKpFKfdobln8UmuiYcKPot9D2v6svN5+sAH+4kjUM= github.com/StackExchange/wmi v1.2.1 h1:VIkavFPXSjcnS+O8yTq7NI32k0R5Aj+v39y29VYDOSA= @@ -71,6 +73,10 @@ github.com/dgraph-io/ristretto v0.1.1 h1:6CWw5tJNgpegArSHpNHJKldNeq03FQCwYvfMVWa github.com/dgraph-io/ristretto v0.1.1/go.mod h1:S1GPSBCYCIhmVNfcth17y2zZtQT6wzkzgwUve0VDWWA= github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2 h1:tdlZCpZ/P9DhczCTSixgIKmwPv6+wP5DGjqLYw5SUiA= github.com/dgryski/go-farm v0.0.0-20190423205320-6a90982ecee2/go.mod h1:SqUrOPUnsFjfmXRMNPybcSiG0BgUW2AuFH8PAnS2iTw= +github.com/dlclark/regexp2 v1.11.4 h1:rPYF9/LECdNymJufQKmri9gV604RvvABwgOA8un7yAo= +github.com/dlclark/regexp2 v1.11.4/go.mod h1:DHkYz0B9wPfa6wondMfaivmHpzrQ3v9q8cnmRbL6yW8= +github.com/dop251/goja v0.0.0-20241024094426-79f3a7efcdbd h1:QMSNEh9uQkDjyPwu/J541GgSH+4hw+0skJDIj9HJ3mE= +github.com/dop251/goja v0.0.0-20241024094426-79f3a7efcdbd/go.mod h1:MxLav0peU43GgvwVgNbLAj1s/bSGboKkhuULvq/7hx4= github.com/dustin/go-humanize v1.0.0 h1:VSnTsYCnlFHaM2/igO1h6X3HA71jcobQuxemgkq4zYo= github.com/dustin/go-humanize v1.0.0/go.mod h1:HtrtbFcZ19U5GC7JDqmcUSB87Iq5E25KnS6fMYU6eOk= github.com/envoyproxy/go-control-plane v0.9.0/go.mod h1:YTl/9mNaCwkRvm6d1a2C3ymFceY/DCBVvsKhRF0iEA4= @@ -93,6 +99,8 @@ github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff h1:tY80oXqG github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff/go.mod h1:x7DCsMOv1taUwEWCzT4cmDeAkigA5/QCwUodaVOe8Ww= github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46 h1:BAIP2GihuqhwdILrV+7GJel5lyPV3u1+PgzrWLc0TkE= github.com/gballet/go-verkle v0.1.1-0.20231031103413-a67434b50f46/go.mod h1:QNpY22eby74jVhqH4WhDLDwxc/vqsern6pW+u2kbkpc= +github.com/ginkgoch/godash/v2 v2.0.1 h1:VEpzpsZGTVFhYBXIrjh+5xpI8mP4ip4Sk3cZj43E3sg= +github.com/ginkgoch/godash/v2 v2.0.1/go.mod h1:lyQg4RqW9hWWkW1GzIWHuGvvqbZsm1akNliSiYcZYm8= github.com/go-co-op/gocron/v2 v2.11.0 h1:IOowNA6SzwdRFnD4/Ol3Kj6G2xKfsoiiGq2Jhhm9bvE= github.com/go-co-op/gocron/v2 v2.11.0/go.mod h1:xY7bJxGazKam1cz04EebrlP4S9q4iWdiAylMGP3jY9w= github.com/go-ole/go-ole v1.2.5/go.mod h1:pprOEPIfldk/42T2oK7lQ4v4JSDwmV0As9GaiUsvbm0= @@ -106,6 +114,10 @@ github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJn github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= github.com/go-playground/validator/v10 v10.22.1 h1:40JcKH+bBNGFczGuoBYgX4I6m/i27HYW8P9FDk5PbgA= github.com/go-playground/validator/v10 v10.22.1/go.mod h1:dbuPbCMFw/DrkbEynArYaCwl3amGuJotoKCe95atGMM= +github.com/go-resty/resty/v2 v2.16.2 h1:CpRqTjIzq/rweXUt9+GxzzQdlkqMdt8Lm/fuK/CAbAg= +github.com/go-resty/resty/v2 v2.16.2/go.mod h1:0fHAoK7JoBy/Ch36N8VFeMsK7xQOHhvWaC3iOktwmIU= +github.com/go-sourcemap/sourcemap v2.1.3+incompatible h1:W1iEw64niKVGogNgBN3ePyLFfuisuzeidWPMPWmECqU= +github.com/go-sourcemap/sourcemap v2.1.3+incompatible/go.mod h1:F8jJfvm2KbVjc5NqelyYJmf/v5J0dwNLS2mL4sNA1Jg= github.com/gofrs/flock v0.8.1 h1:+gYjHKf32LDeiEEFhQaotPbLuUXjY5ZqxKgXy7n59aw= github.com/gofrs/flock v0.8.1/go.mod h1:F1TvTiK9OcQqauNUHlbJvyl9Qa1QvF/gOUDKA14jxHU= github.com/gogo/protobuf v1.3.2 h1:Ov1cvc58UF3b5XjBnZv7+opcTcQFZebYjWzi34vdm4Q= @@ -148,6 +160,8 @@ github.com/google/go-cmp v0.6.0 h1:ofyhxvXcZhMsU5ulbFiLKl/XBFqE1GSq7atu8tAmTRI= github.com/google/go-cmp v0.6.0/go.mod h1:17dUlkBOakJ0+DkrSSNjCkIjxS6bF9zb3elmeNGIjoY= github.com/google/gofuzz v1.2.0 h1:xRy4A+RhZaiKjJ1bPfwQ8sedCA+YS2YcCHW6ec7JMi0= github.com/google/gofuzz v1.2.0/go.mod h1:dBl0BpW6vV/+mYPU4Po3pmUjxk6FQPldtuIdl/M65Eg= +github.com/google/pprof v0.0.0-20230207041349-798e818bf904 h1:4/hN5RUoecvl+RmJRE2YxKWtnnQls6rQjjW5oV7qg2U= +github.com/google/pprof v0.0.0-20230207041349-798e818bf904/go.mod h1:uglQLonpP8qtYCYyzA+8c/9qtqgA3qsXGYqCPKARAFg= github.com/google/subcommands v1.2.0/go.mod h1:ZjhPrFU+Olkh9WazFPsl27BQ4UPiG37m3yTrtFlrHVk= github.com/google/uuid v1.1.2/go.mod h1:TIyPZe4MgqvfeYDBFedMoGGpEw/LqOeaOT+nhxU+yHo= github.com/google/uuid v1.6.0 h1:NIvaJDMOsjHA8n1jAhLSgzrAzy1Hgr+hNrb57e+94F0= @@ -172,6 +186,8 @@ github.com/jackpal/go-nat-pmp v1.0.2 h1:KzKSgb7qkJvOUTqYl9/Hg/me3pWgBmERKrTGD7Bd github.com/jackpal/go-nat-pmp v1.0.2/go.mod h1:QPH045xvCAeXUZOxsnwmrtiCoxIr9eob+4orBN1SBKc= github.com/jonboulle/clockwork v0.4.0 h1:p4Cf1aMWXnXAUh8lVfewRBx1zaTSYKrKMF2g3ST4RZ4= github.com/jonboulle/clockwork v0.4.0/go.mod h1:xgRqUGwRcjKCO1vbZUEtSLrqKoPSsUpK7fnezOII0kc= +github.com/k0kubun/pp/v3 v3.4.1 h1:1WdFZDRRqe8UsR61N/2RoOZ3ziTEqgTPVqKrHeb779Y= +github.com/k0kubun/pp/v3 v3.4.1/go.mod h1:+SiNiqKnBfw1Nkj82Lh5bIeKQOAkPy6Xw9CAZUZ8npI= github.com/kisielk/errcheck v1.5.0/go.mod h1:pFxgyoBC7bSaBwPgfKdkLd5X25qrDl4LWUI2bnpBCr8= github.com/kisielk/gotool v1.0.0/go.mod h1:XhKaO+MFFWcvkIS/tQcRk01m1F5IRFswLeQ+oQHNcck= github.com/klauspost/compress v1.17.9 h1:6KIumPrER1LHsvBVuDa0r5xaG0Es51mhhB9BQB2qeMA= @@ -238,6 +254,8 @@ github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible h1:Bn1aCHHRnjv4Bl16T8rcaFjYSrGrIZvpiGO6P3Q4GpU= github.com/shirou/gopsutil v3.21.4-0.20210419000835-c7a38de76ee5+incompatible/go.mod h1:5b4v6he4MtMOwMlS0TUMTu2PcXUg8+E1lC7eC3UO/RA= +github.com/shopspring/decimal v1.4.0 h1:bxl37RwXBklmTi0C79JfXCEBD1cqqHt0bbgBAGFp81k= +github.com/shopspring/decimal v1.4.0/go.mod h1:gawqmDU56v4yIKSwfBSFip1HdCCXN8/+DMd9qYNcwME= github.com/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= github.com/spf13/cobra v1.8.0/go.mod h1:WXLWApfZ71AjXPya3WOlMsY9yMs7YeiHhFVlvLyhcho= github.com/spf13/pflag v1.0.5 h1:iy+VFUOCP1a+8yFto/drg2CJ5u0yRoB7fZw3DKv/JXA= @@ -335,10 +353,10 @@ golang.org/x/sys v0.24.0 h1:Twjiwq9dn6R1fQcyiK+wQyHWfaz/BJB+YIpzU/Cv3Xg= golang.org/x/sys v0.24.0/go.mod h1:/VUhepiaJMQUp4+oa/7Zr1D23ma6VTLIYjOOTFZPUcA= golang.org/x/text v0.3.0/go.mod h1:NqM8EUOU14njkJ3fqMW+pc6Ldnwhi/IjpwHt7yyuwOQ= golang.org/x/text v0.3.3/go.mod h1:5Zoc/QRtKVWzQhOtBMvqHzDpF6irO9z98xDceosuGiQ= -golang.org/x/text v0.17.0 h1:XtiM5bkSOt+ewxlOE/aE/AKEHibwj/6gvWMl9Rsh0Qc= -golang.org/x/text v0.17.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= -golang.org/x/time v0.5.0 h1:o7cqy6amK/52YcAKIPlM3a+Fpj35zvRj2TP+e1xFSfk= -golang.org/x/time v0.5.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= +golang.org/x/text v0.19.0 h1:kTxAhCbGbxhK0IwgSKiMO5awPoDQ0RpfiVYBfK860YM= +golang.org/x/text v0.19.0/go.mod h1:BuEKDfySbSR4drPmRPG/7iBdf8hvFMuRexcpahXilzY= +golang.org/x/time v0.6.0 h1:eTDhh4ZXt5Qf0augr54TN6suAUudPcawVZeIAPU7D4U= +golang.org/x/time v0.6.0/go.mod h1:3BpzKBy/shNhVucY/MWOyx10tF3SFh9QdLuxbVysPQM= golang.org/x/tools v0.0.0-20180917221912-90fa682c2a6e/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190114222345-bf090417da8b/go.mod h1:n7NCudcB/nEzxVGmLbDWY5pfWTLqBcC2KZ6jyYvM4mQ= golang.org/x/tools v0.0.0-20190226205152-f727befe758c/go.mod h1:9Yl7xja0Znq3iFh3HoIrodX9oNMXvdceNzlUR8zjMvY= @@ -391,6 +409,8 @@ gopkg.in/yaml.v2 v2.4.0/go.mod h1:RDklbk79AGWmwhnvt/jBztapEOGDOx6ZbXqjP6csGnQ= gopkg.in/yaml.v3 v3.0.0-20200313102051-9f266ea9e77c/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= gopkg.in/yaml.v3 v3.0.1 h1:fxVm/GzAzEWqLHuvctI91KS9hhNmmWOoWu0XTYJS7CA= gopkg.in/yaml.v3 v3.0.1/go.mod h1:K4uyk7z7BCEPqu6E+C64Yfv1cQ7kz7rIZviUmN+EgEM= +gotest.tools v2.2.0+incompatible h1:VsBPFP1AI068pPrMxtb/S8Zkgf9xEmTLJjfM+P5UIEo= +gotest.tools v2.2.0+incompatible/go.mod h1:DsYFclhRJ6vuDpmuTbkuFWG+y2sxOXAzmJt81HFBacw= honnef.co/go/tools v0.0.0-20190102054323-c2f93a96b099/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= honnef.co/go/tools v0.0.0-20190523083050-ea95bdfd59fc/go.mod h1:rf3lG4BRIbNafJWhAfAdb/ePZxsR/4RtNHQocxwk9r4= rsc.io/tmplfunc v0.0.3 h1:53XFQh69AfOa8Tw0Jm7t+GV7KZhOi6jzsCzTtKbMvzU= diff --git a/model/task.go b/model/task.go index e417fc5c..db57fe6c 100644 --- a/model/task.go +++ b/model/task.go @@ -108,6 +108,10 @@ func (t *Task) SetCompleted() { t.CompletedAt = time.Now().Unix() } +func (t *Task) SetActive() { + t.Status = avsproto.TaskStatus_Active +} + func (t *Task) SetFailed() { t.Status = avsproto.TaskStatus_Failed t.CompletedAt = time.Now().Unix() @@ -118,14 +122,18 @@ func (t *Task) SetCanceled() { t.CompletedAt = time.Now().Unix() } -func (t *Task) AppendExecution(epoch int64, userOpHash string, err error) { +func (t *Task) AppendExecution(epoch int64, triggerMark *avsproto.TriggerMark, steps []*avsproto.Execution_Step, runError error) { exc := &avsproto.Execution{ - Epoch: epoch, - UserOpHash: userOpHash, + Epoch: epoch, + Success: true, + Error: "", + Steps: steps, + TriggerMark: triggerMark, } - if err != nil { - exc.Error = err.Error() + if runError != nil { + exc.Success = false + exc.Error = runError.Error() } t.Executions = append(t.Executions, exc) diff --git a/operator/operator.go b/operator/operator.go index 2dfa58ea..aa8721e7 100644 --- a/operator/operator.go +++ b/operator/operator.go @@ -51,6 +51,7 @@ import ( avsproto "github.com/AvaProtocol/ap-avs/protobuf" "github.com/AvaProtocol/ap-avs/version" + triggerengine "github.com/AvaProtocol/ap-avs/core/taskengine/trigger" "github.com/AvaProtocol/ap-avs/pkg/ipfetcher" "github.com/AvaProtocol/ap-avs/pkg/timekeeper" ) @@ -131,8 +132,9 @@ type Operator struct { newTaskCreatedChan chan *cstaskmanager.ContractAutomationTaskManagerNewTaskCreated // rpc client to send signed task responses to aggregator - aggregatorRpcClient avsproto.AggregatorClient - aggregatorConn *grpc.ClientConn + nodeRpcClient avsproto.NodeClient + aggregatorConn *grpc.ClientConn + // needed when opting in to avs (allow this service manager contract to slash operator) credibleSquaringServiceManagerAddr common.Address @@ -143,7 +145,9 @@ type Operator struct { publicIP string - scheduler gocron.Scheduler + scheduler gocron.Scheduler + eventTrigger *triggerengine.EventTrigger + blockTrigger *triggerengine.BlockTrigger } func RunWithConfig(configPath string) { @@ -343,7 +347,7 @@ func NewOperatorFromConfig(c OperatorConfig) (*Operator, error) { operatorAddr: common.HexToAddress(c.OperatorAddress), signerAddress: signerAddress, - //aggregatorRpcClient: aggregatorRpcClient, + //nodeRpcClient: nodeRpcClient, //aggregatorConn: aggregatorConn, newTaskCreatedChan: make(chan *cstaskmanager.ContractAutomationTaskManagerNewTaskCreated), @@ -391,6 +395,7 @@ func NewOperatorFromConfig(c OperatorConfig) (*Operator, error) { return operator, nil } +// main entry function to bootstrap an operator func (o *Operator) Start(ctx context.Context) error { if o.signerAddress.Cmp(o.operatorAddr) != 0 { // Ensure alias key is correctly bind to operator address @@ -445,7 +450,7 @@ func (o *Operator) retryConnect() error { if err != nil { return err } - o.aggregatorRpcClient = avsproto.NewAggregatorClient(o.aggregatorConn) + o.nodeRpcClient = avsproto.NewNodeClient(o.aggregatorConn) o.logger.Info("connected to aggregator", "aggregatorAddress", o.config.AggregatorServerIpPortAddress) return nil } diff --git a/operator/worker_loop.go b/operator/worker_loop.go index 4c2ae0a6..94782fc9 100644 --- a/operator/worker_loop.go +++ b/operator/worker_loop.go @@ -6,17 +6,14 @@ import ( "encoding/hex" "fmt" "io" - "log" - "maps" - "sync" "time" - "github.com/ethereum/go-ethereum/core/types" - "github.com/expr-lang/expr/vm" "github.com/go-co-op/gocron/v2" "github.com/AvaProtocol/ap-avs/core/taskengine" - pb "github.com/AvaProtocol/ap-avs/protobuf" + "github.com/AvaProtocol/ap-avs/core/taskengine/macros" + triggerengine "github.com/AvaProtocol/ap-avs/core/taskengine/trigger" + avspb "github.com/AvaProtocol/ap-avs/protobuf" "github.com/AvaProtocol/ap-avs/version" ) @@ -24,23 +21,20 @@ const ( retryIntervalSecond = 15 ) -var ( - checkLock sync.Mutex - checks map[string]*pb.SyncTasksResp - compileExp map[string]*vm.Program -) - -// runWorkLoop is main entrypoint where we sync data with aggregator +// runWorkLoop is main entrypoint where we sync data with aggregator. It performs these op +// - subscribe to server to receive update. act on these update to update local storage +// - spawn a loop to check triggering condition func (o *Operator) runWorkLoop(ctx context.Context) error { // Setup taskengine, initialize local storage and cache, establish rpc - checks = map[string]*pb.SyncTasksResp{} - var err error o.scheduler, err = gocron.NewScheduler() if err != nil { panic(err) } + o.scheduler.Start() + o.scheduler.NewJob(gocron.DurationJob(time.Second*5), gocron.NewTask(o.PingServer)) + macros.SetRpc(o.config.TargetChain.EthWsUrl) taskengine.SetRpc(o.config.TargetChain.EthRpcUrl) taskengine.SetWsRpc(o.config.TargetChain.EthWsUrl) taskengine.SetLogger(o.logger) @@ -51,23 +45,50 @@ func (o *Operator) runWorkLoop(ctx context.Context) error { } else { metricsErrChan = make(chan error, 1) } + // Register a subscriber on new block event and perform our code such as + // reporting time and perform check result + // TODO: Initialize time based task checking + rpcConfig := triggerengine.RpcOption{ + RpcURL: o.config.TargetChain.EthRpcUrl, + WsRpcURL: o.config.TargetChain.EthWsUrl, + } + blockTriggerCh := make(chan triggerengine.TriggerMark[string], 1000) + o.blockTrigger = triggerengine.NewBlockTrigger(&rpcConfig, blockTriggerCh) + + eventTriggerCh := make(chan triggerengine.TriggerMark[triggerengine.EventMark], 1000) + o.eventTrigger = triggerengine.NewEventTrigger(&rpcConfig, eventTriggerCh) + + o.blockTrigger.Run(ctx) + o.eventTrigger.Run(ctx) // Establish a connection with gRPC server where new task will be pushed // automatically o.logger.Info("open channel to grpc to receive check") - go o.StreamChecks() - - // Register a subscriber on new block event and perform our code such as - // reporting time and perform check result - // TODO: Initialize time based task checking - go taskengine.RegisterBlockListener(ctx, o.RunChecks) - o.scheduler.Start() - o.scheduler.NewJob(gocron.DurationJob(time.Second*5), gocron.NewTask(o.PingServer)) + go o.StreamMessages() for { select { case <-ctx.Done(): return nil + case triggerItem := <-blockTriggerCh: + o.logger.Debug("Trigger this task", triggerItem) + case triggerItem := <-eventTriggerCh: + o.logger.Debug("trigger hit, notifiy aggregator", "task id", triggerItem.TaskID, "marker", triggerItem.Marker) + + if _, err := o.nodeRpcClient.NotifyTriggers(context.Background(), &avspb.NotifyTriggersReq{ + Address: o.config.OperatorAddress, + Signature: "pending", + TaskId: triggerItem.TaskID, + TriggerMarker: &avspb.TriggerMark{ + BlockNumber: uint64(triggerItem.Marker.BlockNumber), + LogIndex: uint64(triggerItem.Marker.LogIndex), + TxHash: triggerItem.Marker.TxHash, + }, + }); err == nil { + o.logger.Debug("Succesfully notifiy aggregator for task hit", "taskid", triggerItem.TaskID) + } else { + o.logger.Errorf("task trigger is in alert condition but failed to sync to aggregator", err, "taskid", triggerItem.TaskID) + } case err := <-metricsErrChan: // TODO: handle gracefully o.logger.Fatal("Error in metrics server", "err", err) @@ -75,22 +96,26 @@ func (o *Operator) runWorkLoop(ctx context.Context) error { } } -// StreamChecks setup a streaming connection to receive task from server, and also -// increase metric once we got data -func (o *Operator) StreamChecks() { +// StreamMessages setup a streaming connection to receive task from server +func (o *Operator) StreamMessages() { id := hex.EncodeToString(o.operatorId[:]) + ctx := context.Background() for { - req := &pb.SyncTasksReq{ + epoch := time.Now().Unix() + blsSignature, err := o.GetSignature(ctx, []byte(fmt.Sprintf("operator connection: %s %s %d", o.config.OperatorAddress, id, epoch))) + if err != nil { + panic("cannot get signature") + } + + req := &avspb.SyncMessagesReq{ Address: o.config.OperatorAddress, Id: id, - // TODO: generate signature with ecda/alias key - Signature: "pending", - // TODO: use lambort clock - MonotonicClock: time.Now().Unix(), + MonotonicClock: epoch, + Signature: blsSignature.Serialize(), } - stream, err := o.aggregatorRpcClient.SyncTasks(context.Background(), req) + stream, err := o.nodeRpcClient.SyncMessages(ctx, req) if err != nil { o.logger.Errorf("error open a stream to aggregator, retry in 15 seconds. error: %v", err) time.Sleep(time.Duration(retryIntervalSecond) * time.Second) @@ -108,9 +133,24 @@ func (o *Operator) StreamChecks() { time.Sleep(time.Duration(retryIntervalSecond) * time.Second) break } - o.metrics.IncNumTasksReceived(resp.CheckType) - o.logger.Info("received new task", "id", resp.Id, "type", resp.CheckType) - checks[resp.Id] = resp + o.metrics.IncNumTasksReceived(resp.Id) + + fmt.Println("receive new message", resp, "op", resp.Op) + switch resp.Op { + case avspb.MessageOp_CancelTask, avspb.MessageOp_DeleteTask: + o.eventTrigger.RemoveCheck(resp.TaskMetadata.TaskId) + //o.blockTriggerCh.RemoveCheck(resp.ID) + case avspb.MessageOp_MonitorTaskTrigger: + fmt.Println("get metadata found trigger", resp.TaskMetadata.GetTrigger(), "got event", resp.TaskMetadata.GetTrigger().GetEvent()) + if trigger := resp.TaskMetadata.GetTrigger().GetEvent(); trigger != nil { + o.logger.Info("received new event trigger", "id", resp.Id, "type", resp.TaskMetadata.Trigger) + if err := o.eventTrigger.AddCheck(resp.TaskMetadata); err != nil { + o.logger.Info("add trigger to monitor error", err) + } + } else if trigger := resp.TaskMetadata.Trigger.GetBlock(); trigger != nil { + } + } + //checks[resp.Id] = resp } } } @@ -131,7 +171,7 @@ func (o *Operator) PingServer() { str := base64.StdEncoding.EncodeToString(blsSignature.Serialize()) - _, err = o.aggregatorRpcClient.Ping(context.Background(), &pb.Checkin{ + _, err = o.nodeRpcClient.Ping(context.Background(), &avspb.Checkin{ Address: o.config.OperatorAddress, Id: id, Signature: str, @@ -143,7 +183,7 @@ func (o *Operator) PingServer() { if err != nil { o.logger.Error("check in error", "err", err) } else { - o.logger.Debug("check in succesfully") + o.logger.Debug("check in succesfully", "component", "grpc") } elapsed := time.Now().Sub(start) @@ -155,45 +195,3 @@ func (o *Operator) PingServer() { } o.metrics.SetPingDuration(elapsed.Seconds()) } - -func (o *Operator) RunChecks(block *types.Block) error { - hits := []string{} - hitLookup := map[string]bool{} - - for _, check := range checks { - switch check.CheckType { - case "CheckTrigger": - // TODO: Re-implemenmt in the new execution engine - //v, e := taskengine.RunExpressionQuery(check.Trigger.Expression.Expression) - v, e := taskengine.RunExpressionQuery("check.Trigger.Expression.Expression") - if e == nil && v == true { - hits = append(hits, check.Id) - hitLookup[check.Id] = true - o.logger.Debug("Check hit", "taskID", check.Id) - } else { - log.Println("Check miss for ", check.Id) - } - case "contract_query_check": - } - } - - if len(hits) >= 0 { - if _, err := o.aggregatorRpcClient.UpdateChecks(context.Background(), &pb.UpdateChecksReq{ - Address: o.config.OperatorAddress, - Signature: "pending", - Id: hits, - }); err == nil { - // Remove the hit from local cache - checkLock.Lock() - defer checkLock.Unlock() - maps.DeleteFunc(checks, func(k string, v *pb.SyncTasksResp) bool { - _, ok := hitLookup[k] - return ok - }) - } else { - o.logger.Error("error pushing checks result to aggregator", "error", err) - } - } - - return nil -} diff --git a/pkg/erc20/Makefile b/pkg/erc20/Makefile new file mode 100644 index 00000000..73b68557 --- /dev/null +++ b/pkg/erc20/Makefile @@ -0,0 +1,2 @@ +genabi: + abigen --abi=erc20.abi --pkg=erc20 --out=erc20.go diff --git a/pkg/erc20/erc20.abi b/pkg/erc20/erc20.abi new file mode 100644 index 00000000..12a64ce3 --- /dev/null +++ b/pkg/erc20/erc20.abi @@ -0,0 +1 @@ +[{"inputs":[],"stateMutability":"nonpayable","type":"constructor"},{"inputs":[{"internalType":"address","name":"target","type":"address"}],"name":"AddressEmptyCode","type":"error"},{"inputs":[],"name":"ECDSAInvalidSignature","type":"error"},{"inputs":[{"internalType":"uint256","name":"length","type":"uint256"}],"name":"ECDSAInvalidSignatureLength","type":"error"},{"inputs":[{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"ECDSAInvalidSignatureS","type":"error"},{"inputs":[{"internalType":"address","name":"implementation","type":"address"}],"name":"ERC1967InvalidImplementation","type":"error"},{"inputs":[],"name":"ERC1967NonPayable","type":"error"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"allowance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"ERC20InsufficientAllowance","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"},{"internalType":"uint256","name":"balance","type":"uint256"},{"internalType":"uint256","name":"needed","type":"uint256"}],"name":"ERC20InsufficientBalance","type":"error"},{"inputs":[{"internalType":"address","name":"approver","type":"address"}],"name":"ERC20InvalidApprover","type":"error"},{"inputs":[{"internalType":"address","name":"receiver","type":"address"}],"name":"ERC20InvalidReceiver","type":"error"},{"inputs":[{"internalType":"address","name":"sender","type":"address"}],"name":"ERC20InvalidSender","type":"error"},{"inputs":[{"internalType":"address","name":"spender","type":"address"}],"name":"ERC20InvalidSpender","type":"error"},{"inputs":[{"internalType":"uint256","name":"deadline","type":"uint256"}],"name":"ERC2612ExpiredSignature","type":"error"},{"inputs":[{"internalType":"address","name":"signer","type":"address"},{"internalType":"address","name":"owner","type":"address"}],"name":"ERC2612InvalidSigner","type":"error"},{"inputs":[],"name":"FailedInnerCall","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"currentNonce","type":"uint256"}],"name":"InvalidAccountNonce","type":"error"},{"inputs":[],"name":"InvalidInitialization","type":"error"},{"inputs":[],"name":"NotInitializing","type":"error"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"OwnableInvalidOwner","type":"error"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"OwnableUnauthorizedAccount","type":"error"},{"inputs":[],"name":"UUPSUnauthorizedCallContext","type":"error"},{"inputs":[{"internalType":"bytes32","name":"slot","type":"bytes32"}],"name":"UUPSUnsupportedProxiableUUID","type":"error"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"owner","type":"address"},{"indexed":true,"internalType":"address","name":"spender","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Approval","type":"event"},{"anonymous":false,"inputs":[],"name":"EIP712DomainChanged","type":"event"},{"anonymous":false,"inputs":[{"indexed":false,"internalType":"uint64","name":"version","type":"uint64"}],"name":"Initialized","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"previousOwner","type":"address"},{"indexed":true,"internalType":"address","name":"newOwner","type":"address"}],"name":"OwnershipTransferred","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"from","type":"address"},{"indexed":true,"internalType":"address","name":"to","type":"address"},{"indexed":false,"internalType":"uint256","name":"value","type":"uint256"}],"name":"Transfer","type":"event"},{"anonymous":false,"inputs":[{"indexed":true,"internalType":"address","name":"implementation","type":"address"}],"name":"Upgraded","type":"event"},{"inputs":[],"name":"DOMAIN_SEPARATOR","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"UPGRADE_INTERFACE_VERSION","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"}],"name":"allowance","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"approve","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"}],"name":"balanceOf","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"uint256","name":"value","type":"uint256"}],"name":"burn","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"account","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"burnFrom","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"decimals","outputs":[{"internalType":"uint8","name":"","type":"uint8"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"eip712Domain","outputs":[{"internalType":"bytes1","name":"fields","type":"bytes1"},{"internalType":"string","name":"name","type":"string"},{"internalType":"string","name":"version","type":"string"},{"internalType":"uint256","name":"chainId","type":"uint256"},{"internalType":"address","name":"verifyingContract","type":"address"},{"internalType":"bytes32","name":"salt","type":"bytes32"},{"internalType":"uint256[]","name":"extensions","type":"uint256[]"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"initialOwner","type":"address"}],"name":"initialize","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"amount","type":"uint256"}],"name":"mint","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"name","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"}],"name":"nonces","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"owner","outputs":[{"internalType":"address","name":"","type":"address"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"owner","type":"address"},{"internalType":"address","name":"spender","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"},{"internalType":"uint256","name":"deadline","type":"uint256"},{"internalType":"uint8","name":"v","type":"uint8"},{"internalType":"bytes32","name":"r","type":"bytes32"},{"internalType":"bytes32","name":"s","type":"bytes32"}],"name":"permit","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"proxiableUUID","outputs":[{"internalType":"bytes32","name":"","type":"bytes32"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"renounceOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[],"name":"symbol","outputs":[{"internalType":"string","name":"","type":"string"}],"stateMutability":"view","type":"function"},{"inputs":[],"name":"totalSupply","outputs":[{"internalType":"uint256","name":"","type":"uint256"}],"stateMutability":"view","type":"function"},{"inputs":[{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transfer","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"from","type":"address"},{"internalType":"address","name":"to","type":"address"},{"internalType":"uint256","name":"value","type":"uint256"}],"name":"transferFrom","outputs":[{"internalType":"bool","name":"","type":"bool"}],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newOwner","type":"address"}],"name":"transferOwnership","outputs":[],"stateMutability":"nonpayable","type":"function"},{"inputs":[{"internalType":"address","name":"newImplementation","type":"address"},{"internalType":"bytes","name":"data","type":"bytes"}],"name":"upgradeToAndCall","outputs":[],"stateMutability":"payable","type":"function"}] \ No newline at end of file diff --git a/pkg/erc20/erc20.go b/pkg/erc20/erc20.go new file mode 100644 index 00000000..9bf5e7f4 --- /dev/null +++ b/pkg/erc20/erc20.go @@ -0,0 +1,1695 @@ +// Code generated - DO NOT EDIT. +// This file is a generated binding and any manual changes will be lost. + +package erc20 + +import ( + "errors" + "math/big" + "strings" + + ethereum "github.com/ethereum/go-ethereum" + "github.com/ethereum/go-ethereum/accounts/abi" + "github.com/ethereum/go-ethereum/accounts/abi/bind" + "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/core/types" + "github.com/ethereum/go-ethereum/event" +) + +// Reference imports to suppress errors if they are not otherwise used. +var ( + _ = errors.New + _ = big.NewInt + _ = strings.NewReader + _ = ethereum.NotFound + _ = bind.Bind + _ = common.Big1 + _ = types.BloomLookup + _ = event.NewSubscription + _ = abi.ConvertType +) + +// Erc20MetaData contains all meta data concerning the Erc20 contract. +var Erc20MetaData = &bind.MetaData{ + ABI: "[{\"inputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"constructor\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"target\",\"type\":\"address\"}],\"name\":\"AddressEmptyCode\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ECDSAInvalidSignature\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"length\",\"type\":\"uint256\"}],\"name\":\"ECDSAInvalidSignatureLength\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"ECDSAInvalidSignatureS\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"ERC1967InvalidImplementation\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"ERC1967NonPayable\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"allowance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"}],\"name\":\"ERC20InsufficientAllowance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"balance\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"needed\",\"type\":\"uint256\"}],\"name\":\"ERC20InsufficientBalance\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"approver\",\"type\":\"address\"}],\"name\":\"ERC20InvalidApprover\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"receiver\",\"type\":\"address\"}],\"name\":\"ERC20InvalidReceiver\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"sender\",\"type\":\"address\"}],\"name\":\"ERC20InvalidSender\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"ERC20InvalidSpender\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"}],\"name\":\"ERC2612ExpiredSignature\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"signer\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"ERC2612InvalidSigner\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"FailedInnerCall\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"currentNonce\",\"type\":\"uint256\"}],\"name\":\"InvalidAccountNonce\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"InvalidInitialization\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"NotInitializing\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"OwnableInvalidOwner\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"OwnableUnauthorizedAccount\",\"type\":\"error\"},{\"inputs\":[],\"name\":\"UUPSUnauthorizedCallContext\",\"type\":\"error\"},{\"inputs\":[{\"internalType\":\"bytes32\",\"name\":\"slot\",\"type\":\"bytes32\"}],\"name\":\"UUPSUnsupportedProxiableUUID\",\"type\":\"error\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Approval\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[],\"name\":\"EIP712DomainChanged\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":false,\"internalType\":\"uint64\",\"name\":\"version\",\"type\":\"uint64\"}],\"name\":\"Initialized\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"previousOwner\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"OwnershipTransferred\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"indexed\":true,\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"indexed\":false,\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"Transfer\",\"type\":\"event\"},{\"anonymous\":false,\"inputs\":[{\"indexed\":true,\"internalType\":\"address\",\"name\":\"implementation\",\"type\":\"address\"}],\"name\":\"Upgraded\",\"type\":\"event\"},{\"inputs\":[],\"name\":\"DOMAIN_SEPARATOR\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"UPGRADE_INTERFACE_VERSION\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"}],\"name\":\"allowance\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"approve\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"}],\"name\":\"balanceOf\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"burn\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"account\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"burnFrom\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"decimals\",\"outputs\":[{\"internalType\":\"uint8\",\"name\":\"\",\"type\":\"uint8\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"eip712Domain\",\"outputs\":[{\"internalType\":\"bytes1\",\"name\":\"fields\",\"type\":\"bytes1\"},{\"internalType\":\"string\",\"name\":\"name\",\"type\":\"string\"},{\"internalType\":\"string\",\"name\":\"version\",\"type\":\"string\"},{\"internalType\":\"uint256\",\"name\":\"chainId\",\"type\":\"uint256\"},{\"internalType\":\"address\",\"name\":\"verifyingContract\",\"type\":\"address\"},{\"internalType\":\"bytes32\",\"name\":\"salt\",\"type\":\"bytes32\"},{\"internalType\":\"uint256[]\",\"name\":\"extensions\",\"type\":\"uint256[]\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"initialOwner\",\"type\":\"address\"}],\"name\":\"initialize\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"amount\",\"type\":\"uint256\"}],\"name\":\"mint\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"name\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"}],\"name\":\"nonces\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"owner\",\"outputs\":[{\"internalType\":\"address\",\"name\":\"\",\"type\":\"address\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"owner\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"spender\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"},{\"internalType\":\"uint256\",\"name\":\"deadline\",\"type\":\"uint256\"},{\"internalType\":\"uint8\",\"name\":\"v\",\"type\":\"uint8\"},{\"internalType\":\"bytes32\",\"name\":\"r\",\"type\":\"bytes32\"},{\"internalType\":\"bytes32\",\"name\":\"s\",\"type\":\"bytes32\"}],\"name\":\"permit\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"proxiableUUID\",\"outputs\":[{\"internalType\":\"bytes32\",\"name\":\"\",\"type\":\"bytes32\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"renounceOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"symbol\",\"outputs\":[{\"internalType\":\"string\",\"name\":\"\",\"type\":\"string\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[],\"name\":\"totalSupply\",\"outputs\":[{\"internalType\":\"uint256\",\"name\":\"\",\"type\":\"uint256\"}],\"stateMutability\":\"view\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transfer\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"from\",\"type\":\"address\"},{\"internalType\":\"address\",\"name\":\"to\",\"type\":\"address\"},{\"internalType\":\"uint256\",\"name\":\"value\",\"type\":\"uint256\"}],\"name\":\"transferFrom\",\"outputs\":[{\"internalType\":\"bool\",\"name\":\"\",\"type\":\"bool\"}],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newOwner\",\"type\":\"address\"}],\"name\":\"transferOwnership\",\"outputs\":[],\"stateMutability\":\"nonpayable\",\"type\":\"function\"},{\"inputs\":[{\"internalType\":\"address\",\"name\":\"newImplementation\",\"type\":\"address\"},{\"internalType\":\"bytes\",\"name\":\"data\",\"type\":\"bytes\"}],\"name\":\"upgradeToAndCall\",\"outputs\":[],\"stateMutability\":\"payable\",\"type\":\"function\"}]", +} + +// Erc20ABI is the input ABI used to generate the binding from. +// Deprecated: Use Erc20MetaData.ABI instead. +var Erc20ABI = Erc20MetaData.ABI + +// Erc20 is an auto generated Go binding around an Ethereum contract. +type Erc20 struct { + Erc20Caller // Read-only binding to the contract + Erc20Transactor // Write-only binding to the contract + Erc20Filterer // Log filterer for contract events +} + +// Erc20Caller is an auto generated read-only Go binding around an Ethereum contract. +type Erc20Caller struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// Erc20Transactor is an auto generated write-only Go binding around an Ethereum contract. +type Erc20Transactor struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// Erc20Filterer is an auto generated log filtering Go binding around an Ethereum contract events. +type Erc20Filterer struct { + contract *bind.BoundContract // Generic contract wrapper for the low level calls +} + +// Erc20Session is an auto generated Go binding around an Ethereum contract, +// with pre-set call and transact options. +type Erc20Session struct { + Contract *Erc20 // Generic contract binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// Erc20CallerSession is an auto generated read-only Go binding around an Ethereum contract, +// with pre-set call options. +type Erc20CallerSession struct { + Contract *Erc20Caller // Generic contract caller binding to set the session for + CallOpts bind.CallOpts // Call options to use throughout this session +} + +// Erc20TransactorSession is an auto generated write-only Go binding around an Ethereum contract, +// with pre-set transact options. +type Erc20TransactorSession struct { + Contract *Erc20Transactor // Generic contract transactor binding to set the session for + TransactOpts bind.TransactOpts // Transaction auth options to use throughout this session +} + +// Erc20Raw is an auto generated low-level Go binding around an Ethereum contract. +type Erc20Raw struct { + Contract *Erc20 // Generic contract binding to access the raw methods on +} + +// Erc20CallerRaw is an auto generated low-level read-only Go binding around an Ethereum contract. +type Erc20CallerRaw struct { + Contract *Erc20Caller // Generic read-only contract binding to access the raw methods on +} + +// Erc20TransactorRaw is an auto generated low-level write-only Go binding around an Ethereum contract. +type Erc20TransactorRaw struct { + Contract *Erc20Transactor // Generic write-only contract binding to access the raw methods on +} + +// NewErc20 creates a new instance of Erc20, bound to a specific deployed contract. +func NewErc20(address common.Address, backend bind.ContractBackend) (*Erc20, error) { + contract, err := bindErc20(address, backend, backend, backend) + if err != nil { + return nil, err + } + return &Erc20{Erc20Caller: Erc20Caller{contract: contract}, Erc20Transactor: Erc20Transactor{contract: contract}, Erc20Filterer: Erc20Filterer{contract: contract}}, nil +} + +// NewErc20Caller creates a new read-only instance of Erc20, bound to a specific deployed contract. +func NewErc20Caller(address common.Address, caller bind.ContractCaller) (*Erc20Caller, error) { + contract, err := bindErc20(address, caller, nil, nil) + if err != nil { + return nil, err + } + return &Erc20Caller{contract: contract}, nil +} + +// NewErc20Transactor creates a new write-only instance of Erc20, bound to a specific deployed contract. +func NewErc20Transactor(address common.Address, transactor bind.ContractTransactor) (*Erc20Transactor, error) { + contract, err := bindErc20(address, nil, transactor, nil) + if err != nil { + return nil, err + } + return &Erc20Transactor{contract: contract}, nil +} + +// NewErc20Filterer creates a new log filterer instance of Erc20, bound to a specific deployed contract. +func NewErc20Filterer(address common.Address, filterer bind.ContractFilterer) (*Erc20Filterer, error) { + contract, err := bindErc20(address, nil, nil, filterer) + if err != nil { + return nil, err + } + return &Erc20Filterer{contract: contract}, nil +} + +// bindErc20 binds a generic wrapper to an already deployed contract. +func bindErc20(address common.Address, caller bind.ContractCaller, transactor bind.ContractTransactor, filterer bind.ContractFilterer) (*bind.BoundContract, error) { + parsed, err := Erc20MetaData.GetAbi() + if err != nil { + return nil, err + } + return bind.NewBoundContract(address, *parsed, caller, transactor, filterer), nil +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Erc20 *Erc20Raw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _Erc20.Contract.Erc20Caller.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Erc20 *Erc20Raw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Erc20.Contract.Erc20Transactor.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Erc20 *Erc20Raw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Erc20.Contract.Erc20Transactor.contract.Transact(opts, method, params...) +} + +// Call invokes the (constant) contract method with params as input values and +// sets the output to result. The result type might be a single field for simple +// returns, a slice of interfaces for anonymous returns and a struct for named +// returns. +func (_Erc20 *Erc20CallerRaw) Call(opts *bind.CallOpts, result *[]interface{}, method string, params ...interface{}) error { + return _Erc20.Contract.contract.Call(opts, result, method, params...) +} + +// Transfer initiates a plain transaction to move funds to the contract, calling +// its default method if one is available. +func (_Erc20 *Erc20TransactorRaw) Transfer(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Erc20.Contract.contract.Transfer(opts) +} + +// Transact invokes the (paid) contract method with params as input values. +func (_Erc20 *Erc20TransactorRaw) Transact(opts *bind.TransactOpts, method string, params ...interface{}) (*types.Transaction, error) { + return _Erc20.Contract.contract.Transact(opts, method, params...) +} + +// DOMAINSEPARATOR is a free data retrieval call binding the contract method 0x3644e515. +// +// Solidity: function DOMAIN_SEPARATOR() view returns(bytes32) +func (_Erc20 *Erc20Caller) DOMAINSEPARATOR(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _Erc20.contract.Call(opts, &out, "DOMAIN_SEPARATOR") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// DOMAINSEPARATOR is a free data retrieval call binding the contract method 0x3644e515. +// +// Solidity: function DOMAIN_SEPARATOR() view returns(bytes32) +func (_Erc20 *Erc20Session) DOMAINSEPARATOR() ([32]byte, error) { + return _Erc20.Contract.DOMAINSEPARATOR(&_Erc20.CallOpts) +} + +// DOMAINSEPARATOR is a free data retrieval call binding the contract method 0x3644e515. +// +// Solidity: function DOMAIN_SEPARATOR() view returns(bytes32) +func (_Erc20 *Erc20CallerSession) DOMAINSEPARATOR() ([32]byte, error) { + return _Erc20.Contract.DOMAINSEPARATOR(&_Erc20.CallOpts) +} + +// UPGRADEINTERFACEVERSION is a free data retrieval call binding the contract method 0xad3cb1cc. +// +// Solidity: function UPGRADE_INTERFACE_VERSION() view returns(string) +func (_Erc20 *Erc20Caller) UPGRADEINTERFACEVERSION(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _Erc20.contract.Call(opts, &out, "UPGRADE_INTERFACE_VERSION") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// UPGRADEINTERFACEVERSION is a free data retrieval call binding the contract method 0xad3cb1cc. +// +// Solidity: function UPGRADE_INTERFACE_VERSION() view returns(string) +func (_Erc20 *Erc20Session) UPGRADEINTERFACEVERSION() (string, error) { + return _Erc20.Contract.UPGRADEINTERFACEVERSION(&_Erc20.CallOpts) +} + +// UPGRADEINTERFACEVERSION is a free data retrieval call binding the contract method 0xad3cb1cc. +// +// Solidity: function UPGRADE_INTERFACE_VERSION() view returns(string) +func (_Erc20 *Erc20CallerSession) UPGRADEINTERFACEVERSION() (string, error) { + return _Erc20.Contract.UPGRADEINTERFACEVERSION(&_Erc20.CallOpts) +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address owner, address spender) view returns(uint256) +func (_Erc20 *Erc20Caller) Allowance(opts *bind.CallOpts, owner common.Address, spender common.Address) (*big.Int, error) { + var out []interface{} + err := _Erc20.contract.Call(opts, &out, "allowance", owner, spender) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address owner, address spender) view returns(uint256) +func (_Erc20 *Erc20Session) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { + return _Erc20.Contract.Allowance(&_Erc20.CallOpts, owner, spender) +} + +// Allowance is a free data retrieval call binding the contract method 0xdd62ed3e. +// +// Solidity: function allowance(address owner, address spender) view returns(uint256) +func (_Erc20 *Erc20CallerSession) Allowance(owner common.Address, spender common.Address) (*big.Int, error) { + return _Erc20.Contract.Allowance(&_Erc20.CallOpts, owner, spender) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address account) view returns(uint256) +func (_Erc20 *Erc20Caller) BalanceOf(opts *bind.CallOpts, account common.Address) (*big.Int, error) { + var out []interface{} + err := _Erc20.contract.Call(opts, &out, "balanceOf", account) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address account) view returns(uint256) +func (_Erc20 *Erc20Session) BalanceOf(account common.Address) (*big.Int, error) { + return _Erc20.Contract.BalanceOf(&_Erc20.CallOpts, account) +} + +// BalanceOf is a free data retrieval call binding the contract method 0x70a08231. +// +// Solidity: function balanceOf(address account) view returns(uint256) +func (_Erc20 *Erc20CallerSession) BalanceOf(account common.Address) (*big.Int, error) { + return _Erc20.Contract.BalanceOf(&_Erc20.CallOpts, account) +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() view returns(uint8) +func (_Erc20 *Erc20Caller) Decimals(opts *bind.CallOpts) (uint8, error) { + var out []interface{} + err := _Erc20.contract.Call(opts, &out, "decimals") + + if err != nil { + return *new(uint8), err + } + + out0 := *abi.ConvertType(out[0], new(uint8)).(*uint8) + + return out0, err + +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() view returns(uint8) +func (_Erc20 *Erc20Session) Decimals() (uint8, error) { + return _Erc20.Contract.Decimals(&_Erc20.CallOpts) +} + +// Decimals is a free data retrieval call binding the contract method 0x313ce567. +// +// Solidity: function decimals() view returns(uint8) +func (_Erc20 *Erc20CallerSession) Decimals() (uint8, error) { + return _Erc20.Contract.Decimals(&_Erc20.CallOpts) +} + +// Eip712Domain is a free data retrieval call binding the contract method 0x84b0196e. +// +// Solidity: function eip712Domain() view returns(bytes1 fields, string name, string version, uint256 chainId, address verifyingContract, bytes32 salt, uint256[] extensions) +func (_Erc20 *Erc20Caller) Eip712Domain(opts *bind.CallOpts) (struct { + Fields [1]byte + Name string + Version string + ChainId *big.Int + VerifyingContract common.Address + Salt [32]byte + Extensions []*big.Int +}, error) { + var out []interface{} + err := _Erc20.contract.Call(opts, &out, "eip712Domain") + + outstruct := new(struct { + Fields [1]byte + Name string + Version string + ChainId *big.Int + VerifyingContract common.Address + Salt [32]byte + Extensions []*big.Int + }) + if err != nil { + return *outstruct, err + } + + outstruct.Fields = *abi.ConvertType(out[0], new([1]byte)).(*[1]byte) + outstruct.Name = *abi.ConvertType(out[1], new(string)).(*string) + outstruct.Version = *abi.ConvertType(out[2], new(string)).(*string) + outstruct.ChainId = *abi.ConvertType(out[3], new(*big.Int)).(**big.Int) + outstruct.VerifyingContract = *abi.ConvertType(out[4], new(common.Address)).(*common.Address) + outstruct.Salt = *abi.ConvertType(out[5], new([32]byte)).(*[32]byte) + outstruct.Extensions = *abi.ConvertType(out[6], new([]*big.Int)).(*[]*big.Int) + + return *outstruct, err + +} + +// Eip712Domain is a free data retrieval call binding the contract method 0x84b0196e. +// +// Solidity: function eip712Domain() view returns(bytes1 fields, string name, string version, uint256 chainId, address verifyingContract, bytes32 salt, uint256[] extensions) +func (_Erc20 *Erc20Session) Eip712Domain() (struct { + Fields [1]byte + Name string + Version string + ChainId *big.Int + VerifyingContract common.Address + Salt [32]byte + Extensions []*big.Int +}, error) { + return _Erc20.Contract.Eip712Domain(&_Erc20.CallOpts) +} + +// Eip712Domain is a free data retrieval call binding the contract method 0x84b0196e. +// +// Solidity: function eip712Domain() view returns(bytes1 fields, string name, string version, uint256 chainId, address verifyingContract, bytes32 salt, uint256[] extensions) +func (_Erc20 *Erc20CallerSession) Eip712Domain() (struct { + Fields [1]byte + Name string + Version string + ChainId *big.Int + VerifyingContract common.Address + Salt [32]byte + Extensions []*big.Int +}, error) { + return _Erc20.Contract.Eip712Domain(&_Erc20.CallOpts) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_Erc20 *Erc20Caller) Name(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _Erc20.contract.Call(opts, &out, "name") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_Erc20 *Erc20Session) Name() (string, error) { + return _Erc20.Contract.Name(&_Erc20.CallOpts) +} + +// Name is a free data retrieval call binding the contract method 0x06fdde03. +// +// Solidity: function name() view returns(string) +func (_Erc20 *Erc20CallerSession) Name() (string, error) { + return _Erc20.Contract.Name(&_Erc20.CallOpts) +} + +// Nonces is a free data retrieval call binding the contract method 0x7ecebe00. +// +// Solidity: function nonces(address owner) view returns(uint256) +func (_Erc20 *Erc20Caller) Nonces(opts *bind.CallOpts, owner common.Address) (*big.Int, error) { + var out []interface{} + err := _Erc20.contract.Call(opts, &out, "nonces", owner) + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// Nonces is a free data retrieval call binding the contract method 0x7ecebe00. +// +// Solidity: function nonces(address owner) view returns(uint256) +func (_Erc20 *Erc20Session) Nonces(owner common.Address) (*big.Int, error) { + return _Erc20.Contract.Nonces(&_Erc20.CallOpts, owner) +} + +// Nonces is a free data retrieval call binding the contract method 0x7ecebe00. +// +// Solidity: function nonces(address owner) view returns(uint256) +func (_Erc20 *Erc20CallerSession) Nonces(owner common.Address) (*big.Int, error) { + return _Erc20.Contract.Nonces(&_Erc20.CallOpts, owner) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_Erc20 *Erc20Caller) Owner(opts *bind.CallOpts) (common.Address, error) { + var out []interface{} + err := _Erc20.contract.Call(opts, &out, "owner") + + if err != nil { + return *new(common.Address), err + } + + out0 := *abi.ConvertType(out[0], new(common.Address)).(*common.Address) + + return out0, err + +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_Erc20 *Erc20Session) Owner() (common.Address, error) { + return _Erc20.Contract.Owner(&_Erc20.CallOpts) +} + +// Owner is a free data retrieval call binding the contract method 0x8da5cb5b. +// +// Solidity: function owner() view returns(address) +func (_Erc20 *Erc20CallerSession) Owner() (common.Address, error) { + return _Erc20.Contract.Owner(&_Erc20.CallOpts) +} + +// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (_Erc20 *Erc20Caller) ProxiableUUID(opts *bind.CallOpts) ([32]byte, error) { + var out []interface{} + err := _Erc20.contract.Call(opts, &out, "proxiableUUID") + + if err != nil { + return *new([32]byte), err + } + + out0 := *abi.ConvertType(out[0], new([32]byte)).(*[32]byte) + + return out0, err + +} + +// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (_Erc20 *Erc20Session) ProxiableUUID() ([32]byte, error) { + return _Erc20.Contract.ProxiableUUID(&_Erc20.CallOpts) +} + +// ProxiableUUID is a free data retrieval call binding the contract method 0x52d1902d. +// +// Solidity: function proxiableUUID() view returns(bytes32) +func (_Erc20 *Erc20CallerSession) ProxiableUUID() ([32]byte, error) { + return _Erc20.Contract.ProxiableUUID(&_Erc20.CallOpts) +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_Erc20 *Erc20Caller) Symbol(opts *bind.CallOpts) (string, error) { + var out []interface{} + err := _Erc20.contract.Call(opts, &out, "symbol") + + if err != nil { + return *new(string), err + } + + out0 := *abi.ConvertType(out[0], new(string)).(*string) + + return out0, err + +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_Erc20 *Erc20Session) Symbol() (string, error) { + return _Erc20.Contract.Symbol(&_Erc20.CallOpts) +} + +// Symbol is a free data retrieval call binding the contract method 0x95d89b41. +// +// Solidity: function symbol() view returns(string) +func (_Erc20 *Erc20CallerSession) Symbol() (string, error) { + return _Erc20.Contract.Symbol(&_Erc20.CallOpts) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_Erc20 *Erc20Caller) TotalSupply(opts *bind.CallOpts) (*big.Int, error) { + var out []interface{} + err := _Erc20.contract.Call(opts, &out, "totalSupply") + + if err != nil { + return *new(*big.Int), err + } + + out0 := *abi.ConvertType(out[0], new(*big.Int)).(**big.Int) + + return out0, err + +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_Erc20 *Erc20Session) TotalSupply() (*big.Int, error) { + return _Erc20.Contract.TotalSupply(&_Erc20.CallOpts) +} + +// TotalSupply is a free data retrieval call binding the contract method 0x18160ddd. +// +// Solidity: function totalSupply() view returns(uint256) +func (_Erc20 *Erc20CallerSession) TotalSupply() (*big.Int, error) { + return _Erc20.Contract.TotalSupply(&_Erc20.CallOpts) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address spender, uint256 value) returns(bool) +func (_Erc20 *Erc20Transactor) Approve(opts *bind.TransactOpts, spender common.Address, value *big.Int) (*types.Transaction, error) { + return _Erc20.contract.Transact(opts, "approve", spender, value) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address spender, uint256 value) returns(bool) +func (_Erc20 *Erc20Session) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) { + return _Erc20.Contract.Approve(&_Erc20.TransactOpts, spender, value) +} + +// Approve is a paid mutator transaction binding the contract method 0x095ea7b3. +// +// Solidity: function approve(address spender, uint256 value) returns(bool) +func (_Erc20 *Erc20TransactorSession) Approve(spender common.Address, value *big.Int) (*types.Transaction, error) { + return _Erc20.Contract.Approve(&_Erc20.TransactOpts, spender, value) +} + +// Burn is a paid mutator transaction binding the contract method 0x42966c68. +// +// Solidity: function burn(uint256 value) returns() +func (_Erc20 *Erc20Transactor) Burn(opts *bind.TransactOpts, value *big.Int) (*types.Transaction, error) { + return _Erc20.contract.Transact(opts, "burn", value) +} + +// Burn is a paid mutator transaction binding the contract method 0x42966c68. +// +// Solidity: function burn(uint256 value) returns() +func (_Erc20 *Erc20Session) Burn(value *big.Int) (*types.Transaction, error) { + return _Erc20.Contract.Burn(&_Erc20.TransactOpts, value) +} + +// Burn is a paid mutator transaction binding the contract method 0x42966c68. +// +// Solidity: function burn(uint256 value) returns() +func (_Erc20 *Erc20TransactorSession) Burn(value *big.Int) (*types.Transaction, error) { + return _Erc20.Contract.Burn(&_Erc20.TransactOpts, value) +} + +// BurnFrom is a paid mutator transaction binding the contract method 0x79cc6790. +// +// Solidity: function burnFrom(address account, uint256 value) returns() +func (_Erc20 *Erc20Transactor) BurnFrom(opts *bind.TransactOpts, account common.Address, value *big.Int) (*types.Transaction, error) { + return _Erc20.contract.Transact(opts, "burnFrom", account, value) +} + +// BurnFrom is a paid mutator transaction binding the contract method 0x79cc6790. +// +// Solidity: function burnFrom(address account, uint256 value) returns() +func (_Erc20 *Erc20Session) BurnFrom(account common.Address, value *big.Int) (*types.Transaction, error) { + return _Erc20.Contract.BurnFrom(&_Erc20.TransactOpts, account, value) +} + +// BurnFrom is a paid mutator transaction binding the contract method 0x79cc6790. +// +// Solidity: function burnFrom(address account, uint256 value) returns() +func (_Erc20 *Erc20TransactorSession) BurnFrom(account common.Address, value *big.Int) (*types.Transaction, error) { + return _Erc20.Contract.BurnFrom(&_Erc20.TransactOpts, account, value) +} + +// Initialize is a paid mutator transaction binding the contract method 0xc4d66de8. +// +// Solidity: function initialize(address initialOwner) returns() +func (_Erc20 *Erc20Transactor) Initialize(opts *bind.TransactOpts, initialOwner common.Address) (*types.Transaction, error) { + return _Erc20.contract.Transact(opts, "initialize", initialOwner) +} + +// Initialize is a paid mutator transaction binding the contract method 0xc4d66de8. +// +// Solidity: function initialize(address initialOwner) returns() +func (_Erc20 *Erc20Session) Initialize(initialOwner common.Address) (*types.Transaction, error) { + return _Erc20.Contract.Initialize(&_Erc20.TransactOpts, initialOwner) +} + +// Initialize is a paid mutator transaction binding the contract method 0xc4d66de8. +// +// Solidity: function initialize(address initialOwner) returns() +func (_Erc20 *Erc20TransactorSession) Initialize(initialOwner common.Address) (*types.Transaction, error) { + return _Erc20.Contract.Initialize(&_Erc20.TransactOpts, initialOwner) +} + +// Mint is a paid mutator transaction binding the contract method 0x40c10f19. +// +// Solidity: function mint(address to, uint256 amount) returns() +func (_Erc20 *Erc20Transactor) Mint(opts *bind.TransactOpts, to common.Address, amount *big.Int) (*types.Transaction, error) { + return _Erc20.contract.Transact(opts, "mint", to, amount) +} + +// Mint is a paid mutator transaction binding the contract method 0x40c10f19. +// +// Solidity: function mint(address to, uint256 amount) returns() +func (_Erc20 *Erc20Session) Mint(to common.Address, amount *big.Int) (*types.Transaction, error) { + return _Erc20.Contract.Mint(&_Erc20.TransactOpts, to, amount) +} + +// Mint is a paid mutator transaction binding the contract method 0x40c10f19. +// +// Solidity: function mint(address to, uint256 amount) returns() +func (_Erc20 *Erc20TransactorSession) Mint(to common.Address, amount *big.Int) (*types.Transaction, error) { + return _Erc20.Contract.Mint(&_Erc20.TransactOpts, to, amount) +} + +// Permit is a paid mutator transaction binding the contract method 0xd505accf. +// +// Solidity: function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) returns() +func (_Erc20 *Erc20Transactor) Permit(opts *bind.TransactOpts, owner common.Address, spender common.Address, value *big.Int, deadline *big.Int, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _Erc20.contract.Transact(opts, "permit", owner, spender, value, deadline, v, r, s) +} + +// Permit is a paid mutator transaction binding the contract method 0xd505accf. +// +// Solidity: function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) returns() +func (_Erc20 *Erc20Session) Permit(owner common.Address, spender common.Address, value *big.Int, deadline *big.Int, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _Erc20.Contract.Permit(&_Erc20.TransactOpts, owner, spender, value, deadline, v, r, s) +} + +// Permit is a paid mutator transaction binding the contract method 0xd505accf. +// +// Solidity: function permit(address owner, address spender, uint256 value, uint256 deadline, uint8 v, bytes32 r, bytes32 s) returns() +func (_Erc20 *Erc20TransactorSession) Permit(owner common.Address, spender common.Address, value *big.Int, deadline *big.Int, v uint8, r [32]byte, s [32]byte) (*types.Transaction, error) { + return _Erc20.Contract.Permit(&_Erc20.TransactOpts, owner, spender, value, deadline, v, r, s) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_Erc20 *Erc20Transactor) RenounceOwnership(opts *bind.TransactOpts) (*types.Transaction, error) { + return _Erc20.contract.Transact(opts, "renounceOwnership") +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_Erc20 *Erc20Session) RenounceOwnership() (*types.Transaction, error) { + return _Erc20.Contract.RenounceOwnership(&_Erc20.TransactOpts) +} + +// RenounceOwnership is a paid mutator transaction binding the contract method 0x715018a6. +// +// Solidity: function renounceOwnership() returns() +func (_Erc20 *Erc20TransactorSession) RenounceOwnership() (*types.Transaction, error) { + return _Erc20.Contract.RenounceOwnership(&_Erc20.TransactOpts) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address to, uint256 value) returns(bool) +func (_Erc20 *Erc20Transactor) Transfer(opts *bind.TransactOpts, to common.Address, value *big.Int) (*types.Transaction, error) { + return _Erc20.contract.Transact(opts, "transfer", to, value) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address to, uint256 value) returns(bool) +func (_Erc20 *Erc20Session) Transfer(to common.Address, value *big.Int) (*types.Transaction, error) { + return _Erc20.Contract.Transfer(&_Erc20.TransactOpts, to, value) +} + +// Transfer is a paid mutator transaction binding the contract method 0xa9059cbb. +// +// Solidity: function transfer(address to, uint256 value) returns(bool) +func (_Erc20 *Erc20TransactorSession) Transfer(to common.Address, value *big.Int) (*types.Transaction, error) { + return _Erc20.Contract.Transfer(&_Erc20.TransactOpts, to, value) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 value) returns(bool) +func (_Erc20 *Erc20Transactor) TransferFrom(opts *bind.TransactOpts, from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) { + return _Erc20.contract.Transact(opts, "transferFrom", from, to, value) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 value) returns(bool) +func (_Erc20 *Erc20Session) TransferFrom(from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) { + return _Erc20.Contract.TransferFrom(&_Erc20.TransactOpts, from, to, value) +} + +// TransferFrom is a paid mutator transaction binding the contract method 0x23b872dd. +// +// Solidity: function transferFrom(address from, address to, uint256 value) returns(bool) +func (_Erc20 *Erc20TransactorSession) TransferFrom(from common.Address, to common.Address, value *big.Int) (*types.Transaction, error) { + return _Erc20.Contract.TransferFrom(&_Erc20.TransactOpts, from, to, value) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_Erc20 *Erc20Transactor) TransferOwnership(opts *bind.TransactOpts, newOwner common.Address) (*types.Transaction, error) { + return _Erc20.contract.Transact(opts, "transferOwnership", newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_Erc20 *Erc20Session) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _Erc20.Contract.TransferOwnership(&_Erc20.TransactOpts, newOwner) +} + +// TransferOwnership is a paid mutator transaction binding the contract method 0xf2fde38b. +// +// Solidity: function transferOwnership(address newOwner) returns() +func (_Erc20 *Erc20TransactorSession) TransferOwnership(newOwner common.Address) (*types.Transaction, error) { + return _Erc20.Contract.TransferOwnership(&_Erc20.TransactOpts, newOwner) +} + +// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286. +// +// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns() +func (_Erc20 *Erc20Transactor) UpgradeToAndCall(opts *bind.TransactOpts, newImplementation common.Address, data []byte) (*types.Transaction, error) { + return _Erc20.contract.Transact(opts, "upgradeToAndCall", newImplementation, data) +} + +// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286. +// +// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns() +func (_Erc20 *Erc20Session) UpgradeToAndCall(newImplementation common.Address, data []byte) (*types.Transaction, error) { + return _Erc20.Contract.UpgradeToAndCall(&_Erc20.TransactOpts, newImplementation, data) +} + +// UpgradeToAndCall is a paid mutator transaction binding the contract method 0x4f1ef286. +// +// Solidity: function upgradeToAndCall(address newImplementation, bytes data) payable returns() +func (_Erc20 *Erc20TransactorSession) UpgradeToAndCall(newImplementation common.Address, data []byte) (*types.Transaction, error) { + return _Erc20.Contract.UpgradeToAndCall(&_Erc20.TransactOpts, newImplementation, data) +} + +// Erc20ApprovalIterator is returned from FilterApproval and is used to iterate over the raw logs and unpacked data for Approval events raised by the Erc20 contract. +type Erc20ApprovalIterator struct { + Event *Erc20Approval // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *Erc20ApprovalIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(Erc20Approval) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(Erc20Approval) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *Erc20ApprovalIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *Erc20ApprovalIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// Erc20Approval represents a Approval event raised by the Erc20 contract. +type Erc20Approval struct { + Owner common.Address + Spender common.Address + Value *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterApproval is a free log retrieval operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) +func (_Erc20 *Erc20Filterer) FilterApproval(opts *bind.FilterOpts, owner []common.Address, spender []common.Address) (*Erc20ApprovalIterator, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var spenderRule []interface{} + for _, spenderItem := range spender { + spenderRule = append(spenderRule, spenderItem) + } + + logs, sub, err := _Erc20.contract.FilterLogs(opts, "Approval", ownerRule, spenderRule) + if err != nil { + return nil, err + } + return &Erc20ApprovalIterator{contract: _Erc20.contract, event: "Approval", logs: logs, sub: sub}, nil +} + +// WatchApproval is a free log subscription operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) +func (_Erc20 *Erc20Filterer) WatchApproval(opts *bind.WatchOpts, sink chan<- *Erc20Approval, owner []common.Address, spender []common.Address) (event.Subscription, error) { + + var ownerRule []interface{} + for _, ownerItem := range owner { + ownerRule = append(ownerRule, ownerItem) + } + var spenderRule []interface{} + for _, spenderItem := range spender { + spenderRule = append(spenderRule, spenderItem) + } + + logs, sub, err := _Erc20.contract.WatchLogs(opts, "Approval", ownerRule, spenderRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(Erc20Approval) + if err := _Erc20.contract.UnpackLog(event, "Approval", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseApproval is a log parse operation binding the contract event 0x8c5be1e5ebec7d5bd14f71427d1e84f3dd0314c0f7b2291e5b200ac8c7c3b925. +// +// Solidity: event Approval(address indexed owner, address indexed spender, uint256 value) +func (_Erc20 *Erc20Filterer) ParseApproval(log types.Log) (*Erc20Approval, error) { + event := new(Erc20Approval) + if err := _Erc20.contract.UnpackLog(event, "Approval", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// Erc20EIP712DomainChangedIterator is returned from FilterEIP712DomainChanged and is used to iterate over the raw logs and unpacked data for EIP712DomainChanged events raised by the Erc20 contract. +type Erc20EIP712DomainChangedIterator struct { + Event *Erc20EIP712DomainChanged // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *Erc20EIP712DomainChangedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(Erc20EIP712DomainChanged) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(Erc20EIP712DomainChanged) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *Erc20EIP712DomainChangedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *Erc20EIP712DomainChangedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// Erc20EIP712DomainChanged represents a EIP712DomainChanged event raised by the Erc20 contract. +type Erc20EIP712DomainChanged struct { + Raw types.Log // Blockchain specific contextual infos +} + +// FilterEIP712DomainChanged is a free log retrieval operation binding the contract event 0x0a6387c9ea3628b88a633bb4f3b151770f70085117a15f9bf3787cda53f13d31. +// +// Solidity: event EIP712DomainChanged() +func (_Erc20 *Erc20Filterer) FilterEIP712DomainChanged(opts *bind.FilterOpts) (*Erc20EIP712DomainChangedIterator, error) { + + logs, sub, err := _Erc20.contract.FilterLogs(opts, "EIP712DomainChanged") + if err != nil { + return nil, err + } + return &Erc20EIP712DomainChangedIterator{contract: _Erc20.contract, event: "EIP712DomainChanged", logs: logs, sub: sub}, nil +} + +// WatchEIP712DomainChanged is a free log subscription operation binding the contract event 0x0a6387c9ea3628b88a633bb4f3b151770f70085117a15f9bf3787cda53f13d31. +// +// Solidity: event EIP712DomainChanged() +func (_Erc20 *Erc20Filterer) WatchEIP712DomainChanged(opts *bind.WatchOpts, sink chan<- *Erc20EIP712DomainChanged) (event.Subscription, error) { + + logs, sub, err := _Erc20.contract.WatchLogs(opts, "EIP712DomainChanged") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(Erc20EIP712DomainChanged) + if err := _Erc20.contract.UnpackLog(event, "EIP712DomainChanged", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseEIP712DomainChanged is a log parse operation binding the contract event 0x0a6387c9ea3628b88a633bb4f3b151770f70085117a15f9bf3787cda53f13d31. +// +// Solidity: event EIP712DomainChanged() +func (_Erc20 *Erc20Filterer) ParseEIP712DomainChanged(log types.Log) (*Erc20EIP712DomainChanged, error) { + event := new(Erc20EIP712DomainChanged) + if err := _Erc20.contract.UnpackLog(event, "EIP712DomainChanged", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// Erc20InitializedIterator is returned from FilterInitialized and is used to iterate over the raw logs and unpacked data for Initialized events raised by the Erc20 contract. +type Erc20InitializedIterator struct { + Event *Erc20Initialized // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *Erc20InitializedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(Erc20Initialized) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(Erc20Initialized) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *Erc20InitializedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *Erc20InitializedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// Erc20Initialized represents a Initialized event raised by the Erc20 contract. +type Erc20Initialized struct { + Version uint64 + Raw types.Log // Blockchain specific contextual infos +} + +// FilterInitialized is a free log retrieval operation binding the contract event 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. +// +// Solidity: event Initialized(uint64 version) +func (_Erc20 *Erc20Filterer) FilterInitialized(opts *bind.FilterOpts) (*Erc20InitializedIterator, error) { + + logs, sub, err := _Erc20.contract.FilterLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return &Erc20InitializedIterator{contract: _Erc20.contract, event: "Initialized", logs: logs, sub: sub}, nil +} + +// WatchInitialized is a free log subscription operation binding the contract event 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. +// +// Solidity: event Initialized(uint64 version) +func (_Erc20 *Erc20Filterer) WatchInitialized(opts *bind.WatchOpts, sink chan<- *Erc20Initialized) (event.Subscription, error) { + + logs, sub, err := _Erc20.contract.WatchLogs(opts, "Initialized") + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(Erc20Initialized) + if err := _Erc20.contract.UnpackLog(event, "Initialized", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseInitialized is a log parse operation binding the contract event 0xc7f505b2f371ae2175ee4913f4499e1f2633a7b5936321eed1cdaeb6115181d2. +// +// Solidity: event Initialized(uint64 version) +func (_Erc20 *Erc20Filterer) ParseInitialized(log types.Log) (*Erc20Initialized, error) { + event := new(Erc20Initialized) + if err := _Erc20.contract.UnpackLog(event, "Initialized", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// Erc20OwnershipTransferredIterator is returned from FilterOwnershipTransferred and is used to iterate over the raw logs and unpacked data for OwnershipTransferred events raised by the Erc20 contract. +type Erc20OwnershipTransferredIterator struct { + Event *Erc20OwnershipTransferred // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *Erc20OwnershipTransferredIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(Erc20OwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(Erc20OwnershipTransferred) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *Erc20OwnershipTransferredIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *Erc20OwnershipTransferredIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// Erc20OwnershipTransferred represents a OwnershipTransferred event raised by the Erc20 contract. +type Erc20OwnershipTransferred struct { + PreviousOwner common.Address + NewOwner common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterOwnershipTransferred is a free log retrieval operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_Erc20 *Erc20Filterer) FilterOwnershipTransferred(opts *bind.FilterOpts, previousOwner []common.Address, newOwner []common.Address) (*Erc20OwnershipTransferredIterator, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _Erc20.contract.FilterLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return &Erc20OwnershipTransferredIterator{contract: _Erc20.contract, event: "OwnershipTransferred", logs: logs, sub: sub}, nil +} + +// WatchOwnershipTransferred is a free log subscription operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_Erc20 *Erc20Filterer) WatchOwnershipTransferred(opts *bind.WatchOpts, sink chan<- *Erc20OwnershipTransferred, previousOwner []common.Address, newOwner []common.Address) (event.Subscription, error) { + + var previousOwnerRule []interface{} + for _, previousOwnerItem := range previousOwner { + previousOwnerRule = append(previousOwnerRule, previousOwnerItem) + } + var newOwnerRule []interface{} + for _, newOwnerItem := range newOwner { + newOwnerRule = append(newOwnerRule, newOwnerItem) + } + + logs, sub, err := _Erc20.contract.WatchLogs(opts, "OwnershipTransferred", previousOwnerRule, newOwnerRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(Erc20OwnershipTransferred) + if err := _Erc20.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseOwnershipTransferred is a log parse operation binding the contract event 0x8be0079c531659141344cd1fd0a4f28419497f9722a3daafe3b4186f6b6457e0. +// +// Solidity: event OwnershipTransferred(address indexed previousOwner, address indexed newOwner) +func (_Erc20 *Erc20Filterer) ParseOwnershipTransferred(log types.Log) (*Erc20OwnershipTransferred, error) { + event := new(Erc20OwnershipTransferred) + if err := _Erc20.contract.UnpackLog(event, "OwnershipTransferred", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// Erc20TransferIterator is returned from FilterTransfer and is used to iterate over the raw logs and unpacked data for Transfer events raised by the Erc20 contract. +type Erc20TransferIterator struct { + Event *Erc20Transfer // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *Erc20TransferIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(Erc20Transfer) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(Erc20Transfer) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *Erc20TransferIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *Erc20TransferIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// Erc20Transfer represents a Transfer event raised by the Erc20 contract. +type Erc20Transfer struct { + From common.Address + To common.Address + Value *big.Int + Raw types.Log // Blockchain specific contextual infos +} + +// FilterTransfer is a free log retrieval operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_Erc20 *Erc20Filterer) FilterTransfer(opts *bind.FilterOpts, from []common.Address, to []common.Address) (*Erc20TransferIterator, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _Erc20.contract.FilterLogs(opts, "Transfer", fromRule, toRule) + if err != nil { + return nil, err + } + return &Erc20TransferIterator{contract: _Erc20.contract, event: "Transfer", logs: logs, sub: sub}, nil +} + +// WatchTransfer is a free log subscription operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_Erc20 *Erc20Filterer) WatchTransfer(opts *bind.WatchOpts, sink chan<- *Erc20Transfer, from []common.Address, to []common.Address) (event.Subscription, error) { + + var fromRule []interface{} + for _, fromItem := range from { + fromRule = append(fromRule, fromItem) + } + var toRule []interface{} + for _, toItem := range to { + toRule = append(toRule, toItem) + } + + logs, sub, err := _Erc20.contract.WatchLogs(opts, "Transfer", fromRule, toRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(Erc20Transfer) + if err := _Erc20.contract.UnpackLog(event, "Transfer", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseTransfer is a log parse operation binding the contract event 0xddf252ad1be2c89b69c2b068fc378daa952ba7f163c4a11628f55a4df523b3ef. +// +// Solidity: event Transfer(address indexed from, address indexed to, uint256 value) +func (_Erc20 *Erc20Filterer) ParseTransfer(log types.Log) (*Erc20Transfer, error) { + event := new(Erc20Transfer) + if err := _Erc20.contract.UnpackLog(event, "Transfer", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} + +// Erc20UpgradedIterator is returned from FilterUpgraded and is used to iterate over the raw logs and unpacked data for Upgraded events raised by the Erc20 contract. +type Erc20UpgradedIterator struct { + Event *Erc20Upgraded // Event containing the contract specifics and raw log + + contract *bind.BoundContract // Generic contract to use for unpacking event data + event string // Event name to use for unpacking event data + + logs chan types.Log // Log channel receiving the found contract events + sub ethereum.Subscription // Subscription for errors, completion and termination + done bool // Whether the subscription completed delivering logs + fail error // Occurred error to stop iteration +} + +// Next advances the iterator to the subsequent event, returning whether there +// are any more events found. In case of a retrieval or parsing error, false is +// returned and Error() can be queried for the exact failure. +func (it *Erc20UpgradedIterator) Next() bool { + // If the iterator failed, stop iterating + if it.fail != nil { + return false + } + // If the iterator completed, deliver directly whatever's available + if it.done { + select { + case log := <-it.logs: + it.Event = new(Erc20Upgraded) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + default: + return false + } + } + // Iterator still in progress, wait for either a data or an error event + select { + case log := <-it.logs: + it.Event = new(Erc20Upgraded) + if err := it.contract.UnpackLog(it.Event, it.event, log); err != nil { + it.fail = err + return false + } + it.Event.Raw = log + return true + + case err := <-it.sub.Err(): + it.done = true + it.fail = err + return it.Next() + } +} + +// Error returns any retrieval or parsing error occurred during filtering. +func (it *Erc20UpgradedIterator) Error() error { + return it.fail +} + +// Close terminates the iteration process, releasing any pending underlying +// resources. +func (it *Erc20UpgradedIterator) Close() error { + it.sub.Unsubscribe() + return nil +} + +// Erc20Upgraded represents a Upgraded event raised by the Erc20 contract. +type Erc20Upgraded struct { + Implementation common.Address + Raw types.Log // Blockchain specific contextual infos +} + +// FilterUpgraded is a free log retrieval operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b. +// +// Solidity: event Upgraded(address indexed implementation) +func (_Erc20 *Erc20Filterer) FilterUpgraded(opts *bind.FilterOpts, implementation []common.Address) (*Erc20UpgradedIterator, error) { + + var implementationRule []interface{} + for _, implementationItem := range implementation { + implementationRule = append(implementationRule, implementationItem) + } + + logs, sub, err := _Erc20.contract.FilterLogs(opts, "Upgraded", implementationRule) + if err != nil { + return nil, err + } + return &Erc20UpgradedIterator{contract: _Erc20.contract, event: "Upgraded", logs: logs, sub: sub}, nil +} + +// WatchUpgraded is a free log subscription operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b. +// +// Solidity: event Upgraded(address indexed implementation) +func (_Erc20 *Erc20Filterer) WatchUpgraded(opts *bind.WatchOpts, sink chan<- *Erc20Upgraded, implementation []common.Address) (event.Subscription, error) { + + var implementationRule []interface{} + for _, implementationItem := range implementation { + implementationRule = append(implementationRule, implementationItem) + } + + logs, sub, err := _Erc20.contract.WatchLogs(opts, "Upgraded", implementationRule) + if err != nil { + return nil, err + } + return event.NewSubscription(func(quit <-chan struct{}) error { + defer sub.Unsubscribe() + for { + select { + case log := <-logs: + // New log arrived, parse the event and forward to the user + event := new(Erc20Upgraded) + if err := _Erc20.contract.UnpackLog(event, "Upgraded", log); err != nil { + return err + } + event.Raw = log + + select { + case sink <- event: + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + case err := <-sub.Err(): + return err + case <-quit: + return nil + } + } + }), nil +} + +// ParseUpgraded is a log parse operation binding the contract event 0xbc7cd75a20ee27fd9adebab32041f755214dbc6bffa90cc0225b39da2e5c2d3b. +// +// Solidity: event Upgraded(address indexed implementation) +func (_Erc20 *Erc20Filterer) ParseUpgraded(log types.Log) (*Erc20Upgraded, error) { + event := new(Erc20Upgraded) + if err := _Erc20.contract.UnpackLog(event, "Upgraded", log); err != nil { + return nil, err + } + event.Raw = log + return event, nil +} diff --git a/protobuf/avs.pb.go b/protobuf/avs.pb.go index 2a58a679..c99dc5d5 100644 --- a/protobuf/avs.pb.go +++ b/protobuf/avs.pb.go @@ -22,6 +22,61 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) +type MessageOp int32 + +const ( + MessageOp_Unset MessageOp = 0 + MessageOp_MonitorTaskTrigger MessageOp = 1 + MessageOp_CancelTask MessageOp = 2 + MessageOp_DeleteTask MessageOp = 3 + MessageOp_CompletedTask MessageOp = 4 +) + +// Enum value maps for MessageOp. +var ( + MessageOp_name = map[int32]string{ + 0: "Unset", + 1: "MonitorTaskTrigger", + 2: "CancelTask", + 3: "DeleteTask", + 4: "CompletedTask", + } + MessageOp_value = map[string]int32{ + "Unset": 0, + "MonitorTaskTrigger": 1, + "CancelTask": 2, + "DeleteTask": 3, + "CompletedTask": 4, + } +) + +func (x MessageOp) Enum() *MessageOp { + p := new(MessageOp) + *p = x + return p +} + +func (x MessageOp) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (MessageOp) Descriptor() protoreflect.EnumDescriptor { + return file_protobuf_avs_proto_enumTypes[0].Descriptor() +} + +func (MessageOp) Type() protoreflect.EnumType { + return &file_protobuf_avs_proto_enumTypes[0] +} + +func (x MessageOp) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use MessageOp.Descriptor instead. +func (MessageOp) EnumDescriptor() ([]byte, []int) { + return file_protobuf_avs_proto_rawDescGZIP(), []int{0} +} + // gRPC internal error code use up to 17, we extend and start from 1000 to avoid any conflict // Guide: https://grpc.io/docs/guides/error/ // Go: https://github.com/grpc/grpc-go/blob/master/codes/codes.go#L199 @@ -78,11 +133,11 @@ func (x Error) String() string { } func (Error) Descriptor() protoreflect.EnumDescriptor { - return file_protobuf_avs_proto_enumTypes[0].Descriptor() + return file_protobuf_avs_proto_enumTypes[1].Descriptor() } func (Error) Type() protoreflect.EnumType { - return &file_protobuf_avs_proto_enumTypes[0] + return &file_protobuf_avs_proto_enumTypes[1] } func (x Error) Number() protoreflect.EnumNumber { @@ -91,7 +146,7 @@ func (x Error) Number() protoreflect.EnumNumber { // Deprecated: Use Error.Descriptor instead. func (Error) EnumDescriptor() ([]byte, []int) { - return file_protobuf_avs_proto_rawDescGZIP(), []int{0} + return file_protobuf_avs_proto_rawDescGZIP(), []int{1} } // TaskStatus represents status of the task. The transition is as follow @@ -134,11 +189,11 @@ func (x TaskStatus) String() string { } func (TaskStatus) Descriptor() protoreflect.EnumDescriptor { - return file_protobuf_avs_proto_enumTypes[1].Descriptor() + return file_protobuf_avs_proto_enumTypes[2].Descriptor() } func (TaskStatus) Type() protoreflect.EnumType { - return &file_protobuf_avs_proto_enumTypes[1] + return &file_protobuf_avs_proto_enumTypes[2] } func (x TaskStatus) Number() protoreflect.EnumNumber { @@ -147,50 +202,50 @@ func (x TaskStatus) Number() protoreflect.EnumNumber { // Deprecated: Use TaskStatus.Descriptor instead. func (TaskStatus) EnumDescriptor() ([]byte, []int) { - return file_protobuf_avs_proto_rawDescGZIP(), []int{1} + return file_protobuf_avs_proto_rawDescGZIP(), []int{2} } -type CustomCodeType int32 +type CustomCodeLang int32 const ( - CustomCodeType_JavaScript CustomCodeType = 0 + CustomCodeLang_JavaScript CustomCodeLang = 0 ) -// Enum value maps for CustomCodeType. +// Enum value maps for CustomCodeLang. var ( - CustomCodeType_name = map[int32]string{ + CustomCodeLang_name = map[int32]string{ 0: "JavaScript", } - CustomCodeType_value = map[string]int32{ + CustomCodeLang_value = map[string]int32{ "JavaScript": 0, } ) -func (x CustomCodeType) Enum() *CustomCodeType { - p := new(CustomCodeType) +func (x CustomCodeLang) Enum() *CustomCodeLang { + p := new(CustomCodeLang) *p = x return p } -func (x CustomCodeType) String() string { +func (x CustomCodeLang) String() string { return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) } -func (CustomCodeType) Descriptor() protoreflect.EnumDescriptor { - return file_protobuf_avs_proto_enumTypes[2].Descriptor() +func (CustomCodeLang) Descriptor() protoreflect.EnumDescriptor { + return file_protobuf_avs_proto_enumTypes[3].Descriptor() } -func (CustomCodeType) Type() protoreflect.EnumType { - return &file_protobuf_avs_proto_enumTypes[2] +func (CustomCodeLang) Type() protoreflect.EnumType { + return &file_protobuf_avs_proto_enumTypes[3] } -func (x CustomCodeType) Number() protoreflect.EnumNumber { +func (x CustomCodeLang) Number() protoreflect.EnumNumber { return protoreflect.EnumNumber(x) } -// Deprecated: Use CustomCodeType.Descriptor instead. -func (CustomCodeType) EnumDescriptor() ([]byte, []int) { - return file_protobuf_avs_proto_rawDescGZIP(), []int{2} +// Deprecated: Use CustomCodeLang.Descriptor instead. +func (CustomCodeLang) EnumDescriptor() ([]byte, []int) { + return file_protobuf_avs_proto_rawDescGZIP(), []int{3} } type IdReq struct { @@ -382,19 +437,19 @@ func (x *CheckinResp) GetUpdatedAt() *timestamppb.Timestamp { return nil } -type SyncTasksReq struct { +type SyncMessagesReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` Address string `protobuf:"bytes,2,opt,name=address,proto3" json:"address,omitempty"` - Signature string `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"` + Signature []byte `protobuf:"bytes,3,opt,name=signature,proto3" json:"signature,omitempty"` MonotonicClock int64 `protobuf:"varint,4,opt,name=monotonic_clock,json=monotonicClock,proto3" json:"monotonic_clock,omitempty"` } -func (x *SyncTasksReq) Reset() { - *x = SyncTasksReq{} +func (x *SyncMessagesReq) Reset() { + *x = SyncMessagesReq{} if protoimpl.UnsafeEnabled { mi := &file_protobuf_avs_proto_msgTypes[3] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -402,13 +457,13 @@ func (x *SyncTasksReq) Reset() { } } -func (x *SyncTasksReq) String() string { +func (x *SyncMessagesReq) String() string { return protoimpl.X.MessageStringOf(x) } -func (*SyncTasksReq) ProtoMessage() {} +func (*SyncMessagesReq) ProtoMessage() {} -func (x *SyncTasksReq) ProtoReflect() protoreflect.Message { +func (x *SyncMessagesReq) ProtoReflect() protoreflect.Message { mi := &file_protobuf_avs_proto_msgTypes[3] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -420,39 +475,150 @@ func (x *SyncTasksReq) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use SyncTasksReq.ProtoReflect.Descriptor instead. -func (*SyncTasksReq) Descriptor() ([]byte, []int) { +// Deprecated: Use SyncMessagesReq.ProtoReflect.Descriptor instead. +func (*SyncMessagesReq) Descriptor() ([]byte, []int) { return file_protobuf_avs_proto_rawDescGZIP(), []int{3} } -func (x *SyncTasksReq) GetId() string { +func (x *SyncMessagesReq) GetId() string { if x != nil { return x.Id } return "" } -func (x *SyncTasksReq) GetAddress() string { +func (x *SyncMessagesReq) GetAddress() string { if x != nil { return x.Address } return "" } -func (x *SyncTasksReq) GetSignature() string { +func (x *SyncMessagesReq) GetSignature() []byte { if x != nil { return x.Signature } - return "" + return nil } -func (x *SyncTasksReq) GetMonotonicClock() int64 { +func (x *SyncMessagesReq) GetMonotonicClock() int64 { if x != nil { return x.MonotonicClock } return 0 } +type SyncMessagesResp struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // message id is used to support dedup + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Op MessageOp `protobuf:"varint,2,opt,name=op,proto3,enum=aggregator.MessageOp" json:"op,omitempty"` + TaskMetadata *SyncMessagesResp_TaskMetadata `protobuf:"bytes,3,opt,name=task_metadata,json=taskMetadata,proto3" json:"task_metadata,omitempty"` +} + +func (x *SyncMessagesResp) Reset() { + *x = SyncMessagesResp{} + if protoimpl.UnsafeEnabled { + mi := &file_protobuf_avs_proto_msgTypes[4] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SyncMessagesResp) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SyncMessagesResp) ProtoMessage() {} + +func (x *SyncMessagesResp) ProtoReflect() protoreflect.Message { + mi := &file_protobuf_avs_proto_msgTypes[4] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SyncMessagesResp.ProtoReflect.Descriptor instead. +func (*SyncMessagesResp) Descriptor() ([]byte, []int) { + return file_protobuf_avs_proto_rawDescGZIP(), []int{4} +} + +func (x *SyncMessagesResp) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *SyncMessagesResp) GetOp() MessageOp { + if x != nil { + return x.Op + } + return MessageOp_Unset +} + +func (x *SyncMessagesResp) GetTaskMetadata() *SyncMessagesResp_TaskMetadata { + if x != nil { + return x.TaskMetadata + } + return nil +} + +type AckMessageReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` +} + +func (x *AckMessageReq) Reset() { + *x = AckMessageReq{} + if protoimpl.UnsafeEnabled { + mi := &file_protobuf_avs_proto_msgTypes[5] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *AckMessageReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*AckMessageReq) ProtoMessage() {} + +func (x *AckMessageReq) ProtoReflect() protoreflect.Message { + mi := &file_protobuf_avs_proto_msgTypes[5] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use AckMessageReq.ProtoReflect.Descriptor instead. +func (*AckMessageReq) Descriptor() ([]byte, []int) { + return file_protobuf_avs_proto_rawDescGZIP(), []int{5} +} + +func (x *AckMessageReq) GetId() string { + if x != nil { + return x.Id + } + return "" +} + type FixedEpochCondition struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -464,7 +630,7 @@ type FixedEpochCondition struct { func (x *FixedEpochCondition) Reset() { *x = FixedEpochCondition{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[4] + mi := &file_protobuf_avs_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -477,7 +643,7 @@ func (x *FixedEpochCondition) String() string { func (*FixedEpochCondition) ProtoMessage() {} func (x *FixedEpochCondition) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[4] + mi := &file_protobuf_avs_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -490,7 +656,7 @@ func (x *FixedEpochCondition) ProtoReflect() protoreflect.Message { // Deprecated: Use FixedEpochCondition.ProtoReflect.Descriptor instead. func (*FixedEpochCondition) Descriptor() ([]byte, []int) { - return file_protobuf_avs_proto_rawDescGZIP(), []int{4} + return file_protobuf_avs_proto_rawDescGZIP(), []int{6} } func (x *FixedEpochCondition) GetEpochs() []int64 { @@ -512,7 +678,7 @@ type CronCondition struct { func (x *CronCondition) Reset() { *x = CronCondition{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[5] + mi := &file_protobuf_avs_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -525,7 +691,7 @@ func (x *CronCondition) String() string { func (*CronCondition) ProtoMessage() {} func (x *CronCondition) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[5] + mi := &file_protobuf_avs_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -538,7 +704,7 @@ func (x *CronCondition) ProtoReflect() protoreflect.Message { // Deprecated: Use CronCondition.ProtoReflect.Descriptor instead. func (*CronCondition) Descriptor() ([]byte, []int) { - return file_protobuf_avs_proto_rawDescGZIP(), []int{5} + return file_protobuf_avs_proto_rawDescGZIP(), []int{7} } func (x *CronCondition) GetSchedule() []string { @@ -559,7 +725,7 @@ type BlockCondition struct { func (x *BlockCondition) Reset() { *x = BlockCondition{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[6] + mi := &file_protobuf_avs_proto_msgTypes[8] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -572,7 +738,7 @@ func (x *BlockCondition) String() string { func (*BlockCondition) ProtoMessage() {} func (x *BlockCondition) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[6] + mi := &file_protobuf_avs_proto_msgTypes[8] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -585,7 +751,7 @@ func (x *BlockCondition) ProtoReflect() protoreflect.Message { // Deprecated: Use BlockCondition.ProtoReflect.Descriptor instead. func (*BlockCondition) Descriptor() ([]byte, []int) { - return file_protobuf_avs_proto_rawDescGZIP(), []int{6} + return file_protobuf_avs_proto_rawDescGZIP(), []int{8} } func (x *BlockCondition) GetInterval() int64 { @@ -618,7 +784,7 @@ type EventCondition struct { func (x *EventCondition) Reset() { *x = EventCondition{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[7] + mi := &file_protobuf_avs_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -631,7 +797,7 @@ func (x *EventCondition) String() string { func (*EventCondition) ProtoMessage() {} func (x *EventCondition) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[7] + mi := &file_protobuf_avs_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -644,7 +810,7 @@ func (x *EventCondition) ProtoReflect() protoreflect.Message { // Deprecated: Use EventCondition.ProtoReflect.Descriptor instead. func (*EventCondition) Descriptor() ([]byte, []int) { - return file_protobuf_avs_proto_rawDescGZIP(), []int{7} + return file_protobuf_avs_proto_rawDescGZIP(), []int{9} } func (x *EventCondition) GetExpression() string { @@ -659,6 +825,7 @@ type TaskTrigger struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields + Name string `protobuf:"bytes,1,opt,name=name,proto3" json:"name,omitempty"` // Types that are assignable to TriggerType: // // *TaskTrigger_Manual @@ -672,7 +839,7 @@ type TaskTrigger struct { func (x *TaskTrigger) Reset() { *x = TaskTrigger{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[8] + mi := &file_protobuf_avs_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -685,7 +852,7 @@ func (x *TaskTrigger) String() string { func (*TaskTrigger) ProtoMessage() {} func (x *TaskTrigger) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[8] + mi := &file_protobuf_avs_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -698,7 +865,14 @@ func (x *TaskTrigger) ProtoReflect() protoreflect.Message { // Deprecated: Use TaskTrigger.ProtoReflect.Descriptor instead. func (*TaskTrigger) Descriptor() ([]byte, []int) { - return file_protobuf_avs_proto_rawDescGZIP(), []int{8} + return file_protobuf_avs_proto_rawDescGZIP(), []int{10} +} + +func (x *TaskTrigger) GetName() string { + if x != nil { + return x.Name + } + return "" } func (m *TaskTrigger) GetTriggerType() isTaskTrigger_TriggerType { @@ -748,27 +922,27 @@ type isTaskTrigger_TriggerType interface { } type TaskTrigger_Manual struct { - Manual bool `protobuf:"varint,1,opt,name=manual,proto3,oneof"` + Manual bool `protobuf:"varint,2,opt,name=manual,proto3,oneof"` } type TaskTrigger_FixedTime struct { // run at a specific epoch, name inspired by unix `at` utility - FixedTime *FixedEpochCondition `protobuf:"bytes,2,opt,name=fixed_time,json=fixedTime,proto3,oneof"` + FixedTime *FixedEpochCondition `protobuf:"bytes,3,opt,name=fixed_time,json=fixedTime,proto3,oneof"` } type TaskTrigger_Cron struct { // interval such as every hour/day/ etc can be converted to cronsyntax by the sdk/studio - Cron *CronCondition `protobuf:"bytes,3,opt,name=cron,proto3,oneof"` + Cron *CronCondition `protobuf:"bytes,4,opt,name=cron,proto3,oneof"` } type TaskTrigger_Block struct { // currently the only support syntax is every blocks - Block *BlockCondition `protobuf:"bytes,4,opt,name=block,proto3,oneof"` + Block *BlockCondition `protobuf:"bytes,5,opt,name=block,proto3,oneof"` } type TaskTrigger_Event struct { // support filter by event expression such as topic0, topic1, topoc2 and event_data and contract_address - Event *EventCondition `protobuf:"bytes,5,opt,name=event,proto3,oneof"` + Event *EventCondition `protobuf:"bytes,6,opt,name=event,proto3,oneof"` } func (*TaskTrigger_Manual) isTaskTrigger_TriggerType() {} @@ -781,69 +955,6 @@ func (*TaskTrigger_Block) isTaskTrigger_TriggerType() {} func (*TaskTrigger_Event) isTaskTrigger_TriggerType() {} -type SyncTasksResp struct { - state protoimpl.MessageState - sizeCache protoimpl.SizeCache - unknownFields protoimpl.UnknownFields - - Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - CheckType string `protobuf:"bytes,2,opt,name=checkType,proto3" json:"checkType,omitempty"` - Trigger *TaskTrigger `protobuf:"bytes,3,opt,name=trigger,proto3" json:"trigger,omitempty"` -} - -func (x *SyncTasksResp) Reset() { - *x = SyncTasksResp{} - if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[9] - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - ms.StoreMessageInfo(mi) - } -} - -func (x *SyncTasksResp) String() string { - return protoimpl.X.MessageStringOf(x) -} - -func (*SyncTasksResp) ProtoMessage() {} - -func (x *SyncTasksResp) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[9] - if protoimpl.UnsafeEnabled && x != nil { - ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) - if ms.LoadMessageInfo() == nil { - ms.StoreMessageInfo(mi) - } - return ms - } - return mi.MessageOf(x) -} - -// Deprecated: Use SyncTasksResp.ProtoReflect.Descriptor instead. -func (*SyncTasksResp) Descriptor() ([]byte, []int) { - return file_protobuf_avs_proto_rawDescGZIP(), []int{9} -} - -func (x *SyncTasksResp) GetId() string { - if x != nil { - return x.Id - } - return "" -} - -func (x *SyncTasksResp) GetCheckType() string { - if x != nil { - return x.CheckType - } - return "" -} - -func (x *SyncTasksResp) GetTrigger() *TaskTrigger { - if x != nil { - return x.Trigger - } - return nil -} - type ETHTransferNode struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -856,7 +967,7 @@ type ETHTransferNode struct { func (x *ETHTransferNode) Reset() { *x = ETHTransferNode{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[10] + mi := &file_protobuf_avs_proto_msgTypes[11] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -869,7 +980,7 @@ func (x *ETHTransferNode) String() string { func (*ETHTransferNode) ProtoMessage() {} func (x *ETHTransferNode) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[10] + mi := &file_protobuf_avs_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -882,7 +993,7 @@ func (x *ETHTransferNode) ProtoReflect() protoreflect.Message { // Deprecated: Use ETHTransferNode.ProtoReflect.Descriptor instead. func (*ETHTransferNode) Descriptor() ([]byte, []int) { - return file_protobuf_avs_proto_rawDescGZIP(), []int{10} + return file_protobuf_avs_proto_rawDescGZIP(), []int{11} } func (x *ETHTransferNode) GetDestination() string { @@ -913,7 +1024,7 @@ type ContractWriteNode struct { func (x *ContractWriteNode) Reset() { *x = ContractWriteNode{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[11] + mi := &file_protobuf_avs_proto_msgTypes[12] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -926,7 +1037,7 @@ func (x *ContractWriteNode) String() string { func (*ContractWriteNode) ProtoMessage() {} func (x *ContractWriteNode) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[11] + mi := &file_protobuf_avs_proto_msgTypes[12] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -939,7 +1050,7 @@ func (x *ContractWriteNode) ProtoReflect() protoreflect.Message { // Deprecated: Use ContractWriteNode.ProtoReflect.Descriptor instead. func (*ContractWriteNode) Descriptor() ([]byte, []int) { - return file_protobuf_avs_proto_rawDescGZIP(), []int{11} + return file_protobuf_avs_proto_rawDescGZIP(), []int{12} } func (x *ContractWriteNode) GetContractAddress() string { @@ -977,7 +1088,7 @@ type ContractReadNode struct { func (x *ContractReadNode) Reset() { *x = ContractReadNode{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[12] + mi := &file_protobuf_avs_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -990,7 +1101,7 @@ func (x *ContractReadNode) String() string { func (*ContractReadNode) ProtoMessage() {} func (x *ContractReadNode) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[12] + mi := &file_protobuf_avs_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1003,7 +1114,7 @@ func (x *ContractReadNode) ProtoReflect() protoreflect.Message { // Deprecated: Use ContractReadNode.ProtoReflect.Descriptor instead. func (*ContractReadNode) Descriptor() ([]byte, []int) { - return file_protobuf_avs_proto_rawDescGZIP(), []int{12} + return file_protobuf_avs_proto_rawDescGZIP(), []int{13} } func (x *ContractReadNode) GetContractAddress() string { @@ -1040,7 +1151,7 @@ type GraphQLQueryNode struct { func (x *GraphQLQueryNode) Reset() { *x = GraphQLQueryNode{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[13] + mi := &file_protobuf_avs_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1053,7 +1164,7 @@ func (x *GraphQLQueryNode) String() string { func (*GraphQLQueryNode) ProtoMessage() {} func (x *GraphQLQueryNode) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[13] + mi := &file_protobuf_avs_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1066,7 +1177,7 @@ func (x *GraphQLQueryNode) ProtoReflect() protoreflect.Message { // Deprecated: Use GraphQLQueryNode.ProtoReflect.Descriptor instead. func (*GraphQLQueryNode) Descriptor() ([]byte, []int) { - return file_protobuf_avs_proto_rawDescGZIP(), []int{13} + return file_protobuf_avs_proto_rawDescGZIP(), []int{14} } func (x *GraphQLQueryNode) GetUrl() string { @@ -1104,7 +1215,7 @@ type RestAPINode struct { func (x *RestAPINode) Reset() { *x = RestAPINode{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[14] + mi := &file_protobuf_avs_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1117,7 +1228,7 @@ func (x *RestAPINode) String() string { func (*RestAPINode) ProtoMessage() {} func (x *RestAPINode) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[14] + mi := &file_protobuf_avs_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1130,7 +1241,7 @@ func (x *RestAPINode) ProtoReflect() protoreflect.Message { // Deprecated: Use RestAPINode.ProtoReflect.Descriptor instead. func (*RestAPINode) Descriptor() ([]byte, []int) { - return file_protobuf_avs_proto_rawDescGZIP(), []int{14} + return file_protobuf_avs_proto_rawDescGZIP(), []int{15} } func (x *RestAPINode) GetUrl() string { @@ -1166,14 +1277,14 @@ type CustomCodeNode struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Type CustomCodeType `protobuf:"varint,1,opt,name=type,proto3,enum=aggregator.CustomCodeType" json:"type,omitempty"` + Lang CustomCodeLang `protobuf:"varint,1,opt,name=lang,proto3,enum=aggregator.CustomCodeLang" json:"lang,omitempty"` Source string `protobuf:"bytes,2,opt,name=source,proto3" json:"source,omitempty"` } func (x *CustomCodeNode) Reset() { *x = CustomCodeNode{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[15] + mi := &file_protobuf_avs_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1186,7 +1297,7 @@ func (x *CustomCodeNode) String() string { func (*CustomCodeNode) ProtoMessage() {} func (x *CustomCodeNode) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[15] + mi := &file_protobuf_avs_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1199,14 +1310,14 @@ func (x *CustomCodeNode) ProtoReflect() protoreflect.Message { // Deprecated: Use CustomCodeNode.ProtoReflect.Descriptor instead. func (*CustomCodeNode) Descriptor() ([]byte, []int) { - return file_protobuf_avs_proto_rawDescGZIP(), []int{15} + return file_protobuf_avs_proto_rawDescGZIP(), []int{16} } -func (x *CustomCodeNode) GetType() CustomCodeType { +func (x *CustomCodeNode) GetLang() CustomCodeLang { if x != nil { - return x.Type + return x.Lang } - return CustomCodeType_JavaScript + return CustomCodeLang_JavaScript } func (x *CustomCodeNode) GetSource() string { @@ -1229,7 +1340,7 @@ type Condition struct { func (x *Condition) Reset() { *x = Condition{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[16] + mi := &file_protobuf_avs_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1242,7 +1353,7 @@ func (x *Condition) String() string { func (*Condition) ProtoMessage() {} func (x *Condition) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[16] + mi := &file_protobuf_avs_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1255,7 +1366,7 @@ func (x *Condition) ProtoReflect() protoreflect.Message { // Deprecated: Use Condition.ProtoReflect.Descriptor instead. func (*Condition) Descriptor() ([]byte, []int) { - return file_protobuf_avs_proto_rawDescGZIP(), []int{16} + return file_protobuf_avs_proto_rawDescGZIP(), []int{17} } func (x *Condition) GetId() string { @@ -1290,7 +1401,7 @@ type BranchNode struct { func (x *BranchNode) Reset() { *x = BranchNode{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[17] + mi := &file_protobuf_avs_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1303,7 +1414,7 @@ func (x *BranchNode) String() string { func (*BranchNode) ProtoMessage() {} func (x *BranchNode) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[17] + mi := &file_protobuf_avs_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1316,7 +1427,7 @@ func (x *BranchNode) ProtoReflect() protoreflect.Message { // Deprecated: Use BranchNode.ProtoReflect.Descriptor instead. func (*BranchNode) Descriptor() ([]byte, []int) { - return file_protobuf_avs_proto_rawDescGZIP(), []int{17} + return file_protobuf_avs_proto_rawDescGZIP(), []int{18} } func (x *BranchNode) GetConditions() []*Condition { @@ -1338,7 +1449,7 @@ type FilterNode struct { func (x *FilterNode) Reset() { *x = FilterNode{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[18] + mi := &file_protobuf_avs_proto_msgTypes[19] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1351,7 +1462,7 @@ func (x *FilterNode) String() string { func (*FilterNode) ProtoMessage() {} func (x *FilterNode) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[18] + mi := &file_protobuf_avs_proto_msgTypes[19] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1364,7 +1475,7 @@ func (x *FilterNode) ProtoReflect() protoreflect.Message { // Deprecated: Use FilterNode.ProtoReflect.Descriptor instead. func (*FilterNode) Descriptor() ([]byte, []int) { - return file_protobuf_avs_proto_rawDescGZIP(), []int{18} + return file_protobuf_avs_proto_rawDescGZIP(), []int{19} } func (x *FilterNode) GetExpression() string { @@ -1380,15 +1491,28 @@ type LoopNode struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // name the iteration key and value. - IterVar string `protobuf:"bytes,1,opt,name=iter_var,json=iterVar,proto3" json:"iter_var,omitempty"` - IterKey string `protobuf:"bytes,2,opt,name=iter_key,json=iterKey,proto3" json:"iter_key,omitempty"` + // this is the variable name of any previous step so we can took it + Input string `protobuf:"bytes,1,opt,name=input,proto3" json:"input,omitempty"` + // a var that the function can refer to it + IterVal string `protobuf:"bytes,2,opt,name=iter_val,json=iterVal,proto3" json:"iter_val,omitempty"` + IterKey string `protobuf:"bytes,3,opt,name=iter_key,json=iterKey,proto3" json:"iter_key,omitempty"` + // inside the runner, it can access to the current value of the loop iteration through the iter_val/iter_key above + // + // Types that are assignable to Runner: + // + // *LoopNode_EthTransfer + // *LoopNode_ContractWrite + // *LoopNode_ContractRead + // *LoopNode_GraphqlDataQuery + // *LoopNode_RestApi + // *LoopNode_CustomCode + Runner isLoopNode_Runner `protobuf_oneof:"runner"` } func (x *LoopNode) Reset() { *x = LoopNode{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[19] + mi := &file_protobuf_avs_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1401,7 +1525,7 @@ func (x *LoopNode) String() string { func (*LoopNode) ProtoMessage() {} func (x *LoopNode) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[19] + mi := &file_protobuf_avs_proto_msgTypes[20] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1414,12 +1538,19 @@ func (x *LoopNode) ProtoReflect() protoreflect.Message { // Deprecated: Use LoopNode.ProtoReflect.Descriptor instead. func (*LoopNode) Descriptor() ([]byte, []int) { - return file_protobuf_avs_proto_rawDescGZIP(), []int{19} + return file_protobuf_avs_proto_rawDescGZIP(), []int{20} } -func (x *LoopNode) GetIterVar() string { +func (x *LoopNode) GetInput() string { if x != nil { - return x.IterVar + return x.Input + } + return "" +} + +func (x *LoopNode) GetIterVal() string { + if x != nil { + return x.IterVal } return "" } @@ -1431,6 +1562,101 @@ func (x *LoopNode) GetIterKey() string { return "" } +func (m *LoopNode) GetRunner() isLoopNode_Runner { + if m != nil { + return m.Runner + } + return nil +} + +func (x *LoopNode) GetEthTransfer() *ETHTransferNode { + if x, ok := x.GetRunner().(*LoopNode_EthTransfer); ok { + return x.EthTransfer + } + return nil +} + +func (x *LoopNode) GetContractWrite() *ContractWriteNode { + if x, ok := x.GetRunner().(*LoopNode_ContractWrite); ok { + return x.ContractWrite + } + return nil +} + +func (x *LoopNode) GetContractRead() *ContractReadNode { + if x, ok := x.GetRunner().(*LoopNode_ContractRead); ok { + return x.ContractRead + } + return nil +} + +func (x *LoopNode) GetGraphqlDataQuery() *GraphQLQueryNode { + if x, ok := x.GetRunner().(*LoopNode_GraphqlDataQuery); ok { + return x.GraphqlDataQuery + } + return nil +} + +func (x *LoopNode) GetRestApi() *RestAPINode { + if x, ok := x.GetRunner().(*LoopNode_RestApi); ok { + return x.RestApi + } + return nil +} + +func (x *LoopNode) GetCustomCode() *CustomCodeNode { + if x, ok := x.GetRunner().(*LoopNode_CustomCode); ok { + return x.CustomCode + } + return nil +} + +type isLoopNode_Runner interface { + isLoopNode_Runner() +} + +type LoopNode_EthTransfer struct { + // Transfer eth require no calldata etc, just a destination address and an eth amount to be sent + EthTransfer *ETHTransferNode `protobuf:"bytes,10,opt,name=eth_transfer,json=ethTransfer,proto3,oneof"` +} + +type LoopNode_ContractWrite struct { + // Run one ore more contracts. The call call also be batched with tool like + // multicall to wrap many calls. in a contract write, we need to generate signature and send as userops. + ContractWrite *ContractWriteNode `protobuf:"bytes,11,opt,name=contract_write,json=contractWrite,proto3,oneof"` +} + +type LoopNode_ContractRead struct { + // read data fron a target contract + ContractRead *ContractReadNode `protobuf:"bytes,12,opt,name=contract_read,json=contractRead,proto3,oneof"` +} + +type LoopNode_GraphqlDataQuery struct { + // Make call to a graphql endpoint + GraphqlDataQuery *GraphQLQueryNode `protobuf:"bytes,13,opt,name=graphql_data_query,json=graphqlDataQuery,proto3,oneof"` +} + +type LoopNode_RestApi struct { + // Make call to a HTTP endpoint + RestApi *RestAPINode `protobuf:"bytes,14,opt,name=rest_api,json=restApi,proto3,oneof"` +} + +type LoopNode_CustomCode struct { + CustomCode *CustomCodeNode `protobuf:"bytes,15,opt,name=custom_code,json=customCode,proto3,oneof"` +} + +func (*LoopNode_EthTransfer) isLoopNode_Runner() {} + +func (*LoopNode_ContractWrite) isLoopNode_Runner() {} + +func (*LoopNode_ContractRead) isLoopNode_Runner() {} + +func (*LoopNode_GraphqlDataQuery) isLoopNode_Runner() {} + +func (*LoopNode_RestApi) isLoopNode_Runner() {} + +func (*LoopNode_CustomCode) isLoopNode_Runner() {} + // The edge is relationship or direct between node type TaskEdge struct { state protoimpl.MessageState @@ -1445,7 +1671,7 @@ type TaskEdge struct { func (x *TaskEdge) Reset() { *x = TaskEdge{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[20] + mi := &file_protobuf_avs_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1458,7 +1684,7 @@ func (x *TaskEdge) String() string { func (*TaskEdge) ProtoMessage() {} func (x *TaskEdge) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[20] + mi := &file_protobuf_avs_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1471,7 +1697,7 @@ func (x *TaskEdge) ProtoReflect() protoreflect.Message { // Deprecated: Use TaskEdge.ProtoReflect.Descriptor instead. func (*TaskEdge) Descriptor() ([]byte, []int) { - return file_protobuf_avs_proto_rawDescGZIP(), []int{20} + return file_protobuf_avs_proto_rawDescGZIP(), []int{21} } func (x *TaskEdge) GetId() string { @@ -1521,7 +1747,7 @@ type TaskNode struct { func (x *TaskNode) Reset() { *x = TaskNode{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[21] + mi := &file_protobuf_avs_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1534,7 +1760,7 @@ func (x *TaskNode) String() string { func (*TaskNode) ProtoMessage() {} func (x *TaskNode) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[21] + mi := &file_protobuf_avs_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1547,7 +1773,7 @@ func (x *TaskNode) ProtoReflect() protoreflect.Message { // Deprecated: Use TaskNode.ProtoReflect.Descriptor instead. func (*TaskNode) Descriptor() ([]byte, []int) { - return file_protobuf_avs_proto_rawDescGZIP(), []int{21} + return file_protobuf_avs_proto_rawDescGZIP(), []int{22} } func (x *TaskNode) GetId() string { @@ -1704,15 +1930,19 @@ type Execution struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Epoch int64 `protobuf:"varint,1,opt,name=epoch,proto3" json:"epoch,omitempty"` - UserOpHash string `protobuf:"bytes,2,opt,name=user_op_hash,json=userOpHash,proto3" json:"user_op_hash,omitempty"` - Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"` + Epoch int64 `protobuf:"varint,1,opt,name=epoch,proto3" json:"epoch,omitempty"` + Success bool `protobuf:"varint,2,opt,name=success,proto3" json:"success,omitempty"` + Error string `protobuf:"bytes,3,opt,name=error,proto3" json:"error,omitempty"` + TriggerMark *TriggerMark `protobuf:"bytes,4,opt,name=trigger_mark,json=triggerMark,proto3" json:"trigger_mark,omitempty"` + // final return data of the whole execution of the task + Result string `protobuf:"bytes,5,opt,name=result,proto3" json:"result,omitempty"` + Steps []*Execution_Step `protobuf:"bytes,6,rep,name=steps,proto3" json:"steps,omitempty"` } func (x *Execution) Reset() { *x = Execution{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[22] + mi := &file_protobuf_avs_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1725,7 +1955,7 @@ func (x *Execution) String() string { func (*Execution) ProtoMessage() {} func (x *Execution) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[22] + mi := &file_protobuf_avs_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1738,7 +1968,7 @@ func (x *Execution) ProtoReflect() protoreflect.Message { // Deprecated: Use Execution.ProtoReflect.Descriptor instead. func (*Execution) Descriptor() ([]byte, []int) { - return file_protobuf_avs_proto_rawDescGZIP(), []int{22} + return file_protobuf_avs_proto_rawDescGZIP(), []int{23} } func (x *Execution) GetEpoch() int64 { @@ -1748,11 +1978,11 @@ func (x *Execution) GetEpoch() int64 { return 0 } -func (x *Execution) GetUserOpHash() string { +func (x *Execution) GetSuccess() bool { if x != nil { - return x.UserOpHash + return x.Success } - return "" + return false } func (x *Execution) GetError() string { @@ -1762,6 +1992,27 @@ func (x *Execution) GetError() string { return "" } +func (x *Execution) GetTriggerMark() *TriggerMark { + if x != nil { + return x.TriggerMark + } + return nil +} + +func (x *Execution) GetResult() string { + if x != nil { + return x.Result + } + return "" +} + +func (x *Execution) GetSteps() []*Execution_Step { + if x != nil { + return x.Steps + } + return nil +} + type Task struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1789,7 +2040,7 @@ type Task struct { func (x *Task) Reset() { *x = Task{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[23] + mi := &file_protobuf_avs_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1802,7 +2053,7 @@ func (x *Task) String() string { func (*Task) ProtoMessage() {} func (x *Task) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[23] + mi := &file_protobuf_avs_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1815,7 +2066,7 @@ func (x *Task) ProtoReflect() protoreflect.Message { // Deprecated: Use Task.ProtoReflect.Descriptor instead. func (*Task) Descriptor() ([]byte, []int) { - return file_protobuf_avs_proto_rawDescGZIP(), []int{23} + return file_protobuf_avs_proto_rawDescGZIP(), []int{24} } func (x *Task) GetId() string { @@ -1929,7 +2180,7 @@ type CreateTaskReq struct { func (x *CreateTaskReq) Reset() { *x = CreateTaskReq{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[24] + mi := &file_protobuf_avs_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1942,7 +2193,7 @@ func (x *CreateTaskReq) String() string { func (*CreateTaskReq) ProtoMessage() {} func (x *CreateTaskReq) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[24] + mi := &file_protobuf_avs_proto_msgTypes[25] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1955,7 +2206,7 @@ func (x *CreateTaskReq) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateTaskReq.ProtoReflect.Descriptor instead. func (*CreateTaskReq) Descriptor() ([]byte, []int) { - return file_protobuf_avs_proto_rawDescGZIP(), []int{24} + return file_protobuf_avs_proto_rawDescGZIP(), []int{25} } func (x *CreateTaskReq) GetTrigger() *TaskTrigger { @@ -2025,7 +2276,7 @@ type CreateTaskResp struct { func (x *CreateTaskResp) Reset() { *x = CreateTaskResp{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[25] + mi := &file_protobuf_avs_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2038,7 +2289,7 @@ func (x *CreateTaskResp) String() string { func (*CreateTaskResp) ProtoMessage() {} func (x *CreateTaskResp) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[25] + mi := &file_protobuf_avs_proto_msgTypes[26] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2051,7 +2302,7 @@ func (x *CreateTaskResp) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateTaskResp.ProtoReflect.Descriptor instead. func (*CreateTaskResp) Descriptor() ([]byte, []int) { - return file_protobuf_avs_proto_rawDescGZIP(), []int{25} + return file_protobuf_avs_proto_rawDescGZIP(), []int{26} } func (x *CreateTaskResp) GetId() string { @@ -2072,7 +2323,7 @@ type NonceRequest struct { func (x *NonceRequest) Reset() { *x = NonceRequest{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[26] + mi := &file_protobuf_avs_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2085,7 +2336,7 @@ func (x *NonceRequest) String() string { func (*NonceRequest) ProtoMessage() {} func (x *NonceRequest) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[26] + mi := &file_protobuf_avs_proto_msgTypes[27] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2098,7 +2349,7 @@ func (x *NonceRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use NonceRequest.ProtoReflect.Descriptor instead. func (*NonceRequest) Descriptor() ([]byte, []int) { - return file_protobuf_avs_proto_rawDescGZIP(), []int{26} + return file_protobuf_avs_proto_rawDescGZIP(), []int{27} } func (x *NonceRequest) GetOwner() string { @@ -2119,7 +2370,7 @@ type NonceResp struct { func (x *NonceResp) Reset() { *x = NonceResp{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[27] + mi := &file_protobuf_avs_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2132,7 +2383,7 @@ func (x *NonceResp) String() string { func (*NonceResp) ProtoMessage() {} func (x *NonceResp) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[27] + mi := &file_protobuf_avs_proto_msgTypes[28] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2145,7 +2396,7 @@ func (x *NonceResp) ProtoReflect() protoreflect.Message { // Deprecated: Use NonceResp.ProtoReflect.Descriptor instead. func (*NonceResp) Descriptor() ([]byte, []int) { - return file_protobuf_avs_proto_rawDescGZIP(), []int{27} + return file_protobuf_avs_proto_rawDescGZIP(), []int{28} } func (x *NonceResp) GetNonce() string { @@ -2169,7 +2420,7 @@ type ListWalletReq struct { func (x *ListWalletReq) Reset() { *x = ListWalletReq{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[28] + mi := &file_protobuf_avs_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2182,7 +2433,7 @@ func (x *ListWalletReq) String() string { func (*ListWalletReq) ProtoMessage() {} func (x *ListWalletReq) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[28] + mi := &file_protobuf_avs_proto_msgTypes[29] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2195,7 +2446,7 @@ func (x *ListWalletReq) ProtoReflect() protoreflect.Message { // Deprecated: Use ListWalletReq.ProtoReflect.Descriptor instead. func (*ListWalletReq) Descriptor() ([]byte, []int) { - return file_protobuf_avs_proto_rawDescGZIP(), []int{28} + return file_protobuf_avs_proto_rawDescGZIP(), []int{29} } func (x *ListWalletReq) GetFactory() string { @@ -2225,7 +2476,7 @@ type SmartWallet struct { func (x *SmartWallet) Reset() { *x = SmartWallet{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[29] + mi := &file_protobuf_avs_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2238,7 +2489,7 @@ func (x *SmartWallet) String() string { func (*SmartWallet) ProtoMessage() {} func (x *SmartWallet) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[29] + mi := &file_protobuf_avs_proto_msgTypes[30] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2251,7 +2502,7 @@ func (x *SmartWallet) ProtoReflect() protoreflect.Message { // Deprecated: Use SmartWallet.ProtoReflect.Descriptor instead. func (*SmartWallet) Descriptor() ([]byte, []int) { - return file_protobuf_avs_proto_rawDescGZIP(), []int{29} + return file_protobuf_avs_proto_rawDescGZIP(), []int{30} } func (x *SmartWallet) GetAddress() string { @@ -2286,7 +2537,7 @@ type ListWalletResp struct { func (x *ListWalletResp) Reset() { *x = ListWalletResp{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[30] + mi := &file_protobuf_avs_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2299,7 +2550,7 @@ func (x *ListWalletResp) String() string { func (*ListWalletResp) ProtoMessage() {} func (x *ListWalletResp) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[30] + mi := &file_protobuf_avs_proto_msgTypes[31] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2312,7 +2563,7 @@ func (x *ListWalletResp) ProtoReflect() protoreflect.Message { // Deprecated: Use ListWalletResp.ProtoReflect.Descriptor instead. func (*ListWalletResp) Descriptor() ([]byte, []int) { - return file_protobuf_avs_proto_rawDescGZIP(), []int{30} + return file_protobuf_avs_proto_rawDescGZIP(), []int{31} } func (x *ListWalletResp) GetWallets() []*SmartWallet { @@ -2334,7 +2585,7 @@ type ListTasksReq struct { func (x *ListTasksReq) Reset() { *x = ListTasksReq{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[31] + mi := &file_protobuf_avs_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2347,7 +2598,7 @@ func (x *ListTasksReq) String() string { func (*ListTasksReq) ProtoMessage() {} func (x *ListTasksReq) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[31] + mi := &file_protobuf_avs_proto_msgTypes[32] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2360,7 +2611,7 @@ func (x *ListTasksReq) ProtoReflect() protoreflect.Message { // Deprecated: Use ListTasksReq.ProtoReflect.Descriptor instead. func (*ListTasksReq) Descriptor() ([]byte, []int) { - return file_protobuf_avs_proto_rawDescGZIP(), []int{31} + return file_protobuf_avs_proto_rawDescGZIP(), []int{32} } func (x *ListTasksReq) GetSmartWalletAddress() string { @@ -2381,7 +2632,7 @@ type ListTasksResp struct { func (x *ListTasksResp) Reset() { *x = ListTasksResp{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[32] + mi := &file_protobuf_avs_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2394,7 +2645,7 @@ func (x *ListTasksResp) String() string { func (*ListTasksResp) ProtoMessage() {} func (x *ListTasksResp) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[32] + mi := &file_protobuf_avs_proto_msgTypes[33] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2407,7 +2658,7 @@ func (x *ListTasksResp) ProtoReflect() protoreflect.Message { // Deprecated: Use ListTasksResp.ProtoReflect.Descriptor instead. func (*ListTasksResp) Descriptor() ([]byte, []int) { - return file_protobuf_avs_proto_rawDescGZIP(), []int{32} + return file_protobuf_avs_proto_rawDescGZIP(), []int{33} } func (x *ListTasksResp) GetTasks() []*Task { @@ -2430,7 +2681,7 @@ type GetKeyReq struct { func (x *GetKeyReq) Reset() { *x = GetKeyReq{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[33] + mi := &file_protobuf_avs_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2443,7 +2694,7 @@ func (x *GetKeyReq) String() string { func (*GetKeyReq) ProtoMessage() {} func (x *GetKeyReq) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[33] + mi := &file_protobuf_avs_proto_msgTypes[34] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2456,7 +2707,7 @@ func (x *GetKeyReq) ProtoReflect() protoreflect.Message { // Deprecated: Use GetKeyReq.ProtoReflect.Descriptor instead. func (*GetKeyReq) Descriptor() ([]byte, []int) { - return file_protobuf_avs_proto_rawDescGZIP(), []int{33} + return file_protobuf_avs_proto_rawDescGZIP(), []int{34} } func (x *GetKeyReq) GetOwner() string { @@ -2491,7 +2742,7 @@ type KeyResp struct { func (x *KeyResp) Reset() { *x = KeyResp{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[34] + mi := &file_protobuf_avs_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2504,7 +2755,7 @@ func (x *KeyResp) String() string { func (*KeyResp) ProtoMessage() {} func (x *KeyResp) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[34] + mi := &file_protobuf_avs_proto_msgTypes[35] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2517,7 +2768,7 @@ func (x *KeyResp) ProtoReflect() protoreflect.Message { // Deprecated: Use KeyResp.ProtoReflect.Descriptor instead. func (*KeyResp) Descriptor() ([]byte, []int) { - return file_protobuf_avs_proto_rawDescGZIP(), []int{34} + return file_protobuf_avs_proto_rawDescGZIP(), []int{35} } func (x *KeyResp) GetKey() string { @@ -2527,33 +2778,33 @@ func (x *KeyResp) GetKey() string { return "" } -type UpdateChecksReq struct { +type TriggerMark struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` - Signature string `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` - Id []string `protobuf:"bytes,3,rep,name=id,proto3" json:"id,omitempty"` + BlockNumber uint64 `protobuf:"varint,1,opt,name=block_number,json=blockNumber,proto3" json:"block_number,omitempty"` + LogIndex uint64 `protobuf:"varint,2,opt,name=log_index,json=logIndex,proto3" json:"log_index,omitempty"` + TxHash string `protobuf:"bytes,3,opt,name=tx_hash,json=txHash,proto3" json:"tx_hash,omitempty"` } -func (x *UpdateChecksReq) Reset() { - *x = UpdateChecksReq{} +func (x *TriggerMark) Reset() { + *x = TriggerMark{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[35] + mi := &file_protobuf_avs_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *UpdateChecksReq) String() string { +func (x *TriggerMark) String() string { return protoimpl.X.MessageStringOf(x) } -func (*UpdateChecksReq) ProtoMessage() {} +func (*TriggerMark) ProtoMessage() {} -func (x *UpdateChecksReq) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[35] +func (x *TriggerMark) ProtoReflect() protoreflect.Message { + mi := &file_protobuf_avs_proto_msgTypes[36] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2564,33 +2815,104 @@ func (x *UpdateChecksReq) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use UpdateChecksReq.ProtoReflect.Descriptor instead. -func (*UpdateChecksReq) Descriptor() ([]byte, []int) { - return file_protobuf_avs_proto_rawDescGZIP(), []int{35} +// Deprecated: Use TriggerMark.ProtoReflect.Descriptor instead. +func (*TriggerMark) Descriptor() ([]byte, []int) { + return file_protobuf_avs_proto_rawDescGZIP(), []int{36} +} + +func (x *TriggerMark) GetBlockNumber() uint64 { + if x != nil { + return x.BlockNumber + } + return 0 +} + +func (x *TriggerMark) GetLogIndex() uint64 { + if x != nil { + return x.LogIndex + } + return 0 +} + +func (x *TriggerMark) GetTxHash() string { + if x != nil { + return x.TxHash + } + return "" +} + +type NotifyTriggersReq struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + Signature string `protobuf:"bytes,2,opt,name=signature,proto3" json:"signature,omitempty"` + TaskId string `protobuf:"bytes,3,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` + TriggerMarker *TriggerMark `protobuf:"bytes,4,opt,name=trigger_marker,json=triggerMarker,proto3" json:"trigger_marker,omitempty"` +} + +func (x *NotifyTriggersReq) Reset() { + *x = NotifyTriggersReq{} + if protoimpl.UnsafeEnabled { + mi := &file_protobuf_avs_proto_msgTypes[37] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *NotifyTriggersReq) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*NotifyTriggersReq) ProtoMessage() {} + +func (x *NotifyTriggersReq) ProtoReflect() protoreflect.Message { + mi := &file_protobuf_avs_proto_msgTypes[37] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use NotifyTriggersReq.ProtoReflect.Descriptor instead. +func (*NotifyTriggersReq) Descriptor() ([]byte, []int) { + return file_protobuf_avs_proto_rawDescGZIP(), []int{37} } -func (x *UpdateChecksReq) GetAddress() string { +func (x *NotifyTriggersReq) GetAddress() string { if x != nil { return x.Address } return "" } -func (x *UpdateChecksReq) GetSignature() string { +func (x *NotifyTriggersReq) GetSignature() string { if x != nil { return x.Signature } return "" } -func (x *UpdateChecksReq) GetId() []string { +func (x *NotifyTriggersReq) GetTaskId() string { if x != nil { - return x.Id + return x.TaskId + } + return "" +} + +func (x *NotifyTriggersReq) GetTriggerMarker() *TriggerMark { + if x != nil { + return x.TriggerMarker } return nil } -type UpdateChecksResp struct { +type NotifyTriggersResp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -2598,23 +2920,23 @@ type UpdateChecksResp struct { UpdatedAt *timestamppb.Timestamp `protobuf:"bytes,1,opt,name=updated_at,json=updatedAt,proto3" json:"updated_at,omitempty"` } -func (x *UpdateChecksResp) Reset() { - *x = UpdateChecksResp{} +func (x *NotifyTriggersResp) Reset() { + *x = NotifyTriggersResp{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[36] + mi := &file_protobuf_avs_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *UpdateChecksResp) String() string { +func (x *NotifyTriggersResp) String() string { return protoimpl.X.MessageStringOf(x) } -func (*UpdateChecksResp) ProtoMessage() {} +func (*NotifyTriggersResp) ProtoMessage() {} -func (x *UpdateChecksResp) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[36] +func (x *NotifyTriggersResp) ProtoReflect() protoreflect.Message { + mi := &file_protobuf_avs_proto_msgTypes[38] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2625,12 +2947,12 @@ func (x *UpdateChecksResp) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use UpdateChecksResp.ProtoReflect.Descriptor instead. -func (*UpdateChecksResp) Descriptor() ([]byte, []int) { - return file_protobuf_avs_proto_rawDescGZIP(), []int{36} +// Deprecated: Use NotifyTriggersResp.ProtoReflect.Descriptor instead. +func (*NotifyTriggersResp) Descriptor() ([]byte, []int) { + return file_protobuf_avs_proto_rawDescGZIP(), []int{38} } -func (x *UpdateChecksResp) GetUpdatedAt() *timestamppb.Timestamp { +func (x *NotifyTriggersResp) GetUpdatedAt() *timestamppb.Timestamp { if x != nil { return x.UpdatedAt } @@ -2650,7 +2972,7 @@ type CreateWalletReq struct { func (x *CreateWalletReq) Reset() { *x = CreateWalletReq{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[37] + mi := &file_protobuf_avs_proto_msgTypes[39] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2663,7 +2985,7 @@ func (x *CreateWalletReq) String() string { func (*CreateWalletReq) ProtoMessage() {} func (x *CreateWalletReq) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[37] + mi := &file_protobuf_avs_proto_msgTypes[39] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2676,7 +2998,7 @@ func (x *CreateWalletReq) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateWalletReq.ProtoReflect.Descriptor instead. func (*CreateWalletReq) Descriptor() ([]byte, []int) { - return file_protobuf_avs_proto_rawDescGZIP(), []int{37} + return file_protobuf_avs_proto_rawDescGZIP(), []int{39} } func (x *CreateWalletReq) GetSalt() string { @@ -2706,7 +3028,7 @@ type CreateWalletResp struct { func (x *CreateWalletResp) Reset() { *x = CreateWalletResp{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[38] + mi := &file_protobuf_avs_proto_msgTypes[40] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2719,7 +3041,7 @@ func (x *CreateWalletResp) String() string { func (*CreateWalletResp) ProtoMessage() {} func (x *CreateWalletResp) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[38] + mi := &file_protobuf_avs_proto_msgTypes[40] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2732,7 +3054,7 @@ func (x *CreateWalletResp) ProtoReflect() protoreflect.Message { // Deprecated: Use CreateWalletResp.ProtoReflect.Descriptor instead. func (*CreateWalletResp) Descriptor() ([]byte, []int) { - return file_protobuf_avs_proto_rawDescGZIP(), []int{38} + return file_protobuf_avs_proto_rawDescGZIP(), []int{40} } func (x *CreateWalletResp) GetAddress() string { @@ -2769,7 +3091,7 @@ type Checkin_Status struct { func (x *Checkin_Status) Reset() { *x = Checkin_Status{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[39] + mi := &file_protobuf_avs_proto_msgTypes[41] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2782,7 +3104,7 @@ func (x *Checkin_Status) String() string { func (*Checkin_Status) ProtoMessage() {} func (x *Checkin_Status) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[39] + mi := &file_protobuf_avs_proto_msgTypes[41] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2819,6 +3141,158 @@ func (x *Checkin_Status) GetLastHeartbeat() *timestamppb.Timestamp { return nil } +type SyncMessagesResp_TaskMetadata struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TaskId string `protobuf:"bytes,1,opt,name=task_id,json=taskId,proto3" json:"task_id,omitempty"` + // how many time this task can run + Remain int64 `protobuf:"varint,2,opt,name=remain,proto3" json:"remain,omitempty"` + ExpiredAt int64 `protobuf:"varint,3,opt,name=expired_at,json=expiredAt,proto3" json:"expired_at,omitempty"` + Trigger *TaskTrigger `protobuf:"bytes,4,opt,name=trigger,proto3" json:"trigger,omitempty"` +} + +func (x *SyncMessagesResp_TaskMetadata) Reset() { + *x = SyncMessagesResp_TaskMetadata{} + if protoimpl.UnsafeEnabled { + mi := &file_protobuf_avs_proto_msgTypes[42] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *SyncMessagesResp_TaskMetadata) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*SyncMessagesResp_TaskMetadata) ProtoMessage() {} + +func (x *SyncMessagesResp_TaskMetadata) ProtoReflect() protoreflect.Message { + mi := &file_protobuf_avs_proto_msgTypes[42] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use SyncMessagesResp_TaskMetadata.ProtoReflect.Descriptor instead. +func (*SyncMessagesResp_TaskMetadata) Descriptor() ([]byte, []int) { + return file_protobuf_avs_proto_rawDescGZIP(), []int{4, 0} +} + +func (x *SyncMessagesResp_TaskMetadata) GetTaskId() string { + if x != nil { + return x.TaskId + } + return "" +} + +func (x *SyncMessagesResp_TaskMetadata) GetRemain() int64 { + if x != nil { + return x.Remain + } + return 0 +} + +func (x *SyncMessagesResp_TaskMetadata) GetExpiredAt() int64 { + if x != nil { + return x.ExpiredAt + } + return 0 +} + +func (x *SyncMessagesResp_TaskMetadata) GetTrigger() *TaskTrigger { + if x != nil { + return x.Trigger + } + return nil +} + +type Execution_Step struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NodeId string `protobuf:"bytes,1,opt,name=node_id,json=nodeId,proto3" json:"node_id,omitempty"` + Success bool `protobuf:"varint,2,opt,name=success,proto3" json:"success,omitempty"` + // serialize data of the result. This is the value that we bind to step variable in subsequent step + OutputData string `protobuf:"bytes,3,opt,name=output_data,json=outputData,proto3" json:"output_data,omitempty"` + Log string `protobuf:"bytes,4,opt,name=log,proto3" json:"log,omitempty"` + Error string `protobuf:"bytes,5,opt,name=error,proto3" json:"error,omitempty"` +} + +func (x *Execution_Step) Reset() { + *x = Execution_Step{} + if protoimpl.UnsafeEnabled { + mi := &file_protobuf_avs_proto_msgTypes[45] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *Execution_Step) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*Execution_Step) ProtoMessage() {} + +func (x *Execution_Step) ProtoReflect() protoreflect.Message { + mi := &file_protobuf_avs_proto_msgTypes[45] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use Execution_Step.ProtoReflect.Descriptor instead. +func (*Execution_Step) Descriptor() ([]byte, []int) { + return file_protobuf_avs_proto_rawDescGZIP(), []int{23, 0} +} + +func (x *Execution_Step) GetNodeId() string { + if x != nil { + return x.NodeId + } + return "" +} + +func (x *Execution_Step) GetSuccess() bool { + if x != nil { + return x.Success + } + return false +} + +func (x *Execution_Step) GetOutputData() string { + if x != nil { + return x.OutputData + } + return "" +} + +func (x *Execution_Step) GetLog() string { + if x != nil { + return x.Log + } + return "" +} + +func (x *Execution_Step) GetError() string { + if x != nil { + return x.Error + } + return "" +} + var File_protobuf_avs_proto protoreflect.FileDescriptor var file_protobuf_avs_proto_rawDesc = []byte{ @@ -2856,348 +3330,430 @@ var file_protobuf_avs_proto_rawDesc = []byte{ 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, - 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x7f, 0x0a, 0x0c, 0x53, 0x79, - 0x6e, 0x63, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, - 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x6d, 0x6f, 0x6e, 0x6f, 0x74, 0x6f, 0x6e, 0x69, 0x63, 0x5f, - 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x6d, 0x6f, 0x6e, - 0x6f, 0x74, 0x6f, 0x6e, 0x69, 0x63, 0x43, 0x6c, 0x6f, 0x63, 0x6b, 0x22, 0x2d, 0x0a, 0x13, 0x46, - 0x69, 0x78, 0x65, 0x64, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, - 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x18, 0x01, 0x20, 0x03, - 0x28, 0x03, 0x52, 0x06, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x22, 0x2b, 0x0a, 0x0d, 0x43, 0x72, - 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x73, - 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x73, - 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x22, 0x2c, 0x0a, 0x0e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, - 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, - 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x69, 0x6e, 0x74, - 0x65, 0x72, 0x76, 0x61, 0x6c, 0x22, 0x30, 0x0a, 0x0e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, 0x6f, - 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x72, 0x65, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x78, 0x70, - 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x92, 0x02, 0x0a, 0x0b, 0x54, 0x61, 0x73, 0x6b, - 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x06, 0x6d, 0x61, 0x6e, 0x75, 0x61, - 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x06, 0x6d, 0x61, 0x6e, 0x75, 0x61, - 0x6c, 0x12, 0x40, 0x0a, 0x0a, 0x66, 0x69, 0x78, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, - 0x6f, 0x72, 0x2e, 0x46, 0x69, 0x78, 0x65, 0x64, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x43, 0x6f, 0x6e, - 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x09, 0x66, 0x69, 0x78, 0x65, 0x64, 0x54, - 0x69, 0x6d, 0x65, 0x12, 0x2f, 0x0a, 0x04, 0x63, 0x72, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x43, - 0x72, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x04, - 0x63, 0x72, 0x6f, 0x6e, 0x12, 0x32, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x04, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, - 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x48, - 0x00, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x32, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, - 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, - 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x0e, 0x0a, 0x0c, - 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0x70, 0x0a, 0x0d, - 0x53, 0x79, 0x6e, 0x63, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x0e, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1c, 0x0a, - 0x09, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x09, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x31, 0x0a, 0x07, 0x74, - 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, - 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x72, - 0x69, 0x67, 0x67, 0x65, 0x72, 0x52, 0x07, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x22, 0x4b, - 0x0a, 0x0f, 0x45, 0x54, 0x48, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x4e, 0x6f, 0x64, - 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x7e, 0x0a, 0x11, 0x43, - 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, - 0x12, 0x29, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x74, - 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x63, - 0x61, 0x6c, 0x6c, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, - 0x63, 0x61, 0x6c, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, - 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x62, 0x69, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, - 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x62, 0x69, 0x22, 0x7d, 0x0a, 0x10, 0x43, - 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x52, 0x65, 0x61, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x12, - 0x29, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x72, - 0x61, 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x61, - 0x6c, 0x6c, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, - 0x61, 0x6c, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x72, - 0x61, 0x63, 0x74, 0x5f, 0x61, 0x62, 0x69, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, - 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x62, 0x69, 0x22, 0xc3, 0x01, 0x0a, 0x10, 0x47, - 0x72, 0x61, 0x70, 0x68, 0x51, 0x4c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4e, 0x6f, 0x64, 0x65, 0x12, - 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, - 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x49, 0x0a, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, - 0x62, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x61, 0x67, 0x67, - 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x47, 0x72, 0x61, 0x70, 0x68, 0x51, 0x4c, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x4e, 0x6f, 0x64, 0x65, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, - 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, - 0x65, 0x73, 0x1a, 0x3c, 0x0a, 0x0e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x45, - 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, - 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, - 0x22, 0xc7, 0x01, 0x0a, 0x0b, 0x52, 0x65, 0x73, 0x74, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, - 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, - 0x72, 0x6c, 0x12, 0x3e, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, - 0x2e, 0x52, 0x65, 0x73, 0x74, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x2e, 0x48, 0x65, 0x61, - 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, - 0x72, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, - 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x1a, 0x3a, - 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, - 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, - 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x58, 0x0a, 0x0e, 0x43, 0x75, - 0x73, 0x74, 0x6f, 0x6d, 0x43, 0x6f, 0x64, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x2e, 0x0a, 0x04, - 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x61, 0x67, 0x67, - 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x43, 0x6f, - 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, - 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, - 0x75, 0x72, 0x63, 0x65, 0x22, 0x4f, 0x0a, 0x09, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, - 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x72, 0x65, - 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x43, 0x0a, 0x0a, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x4e, - 0x6f, 0x64, 0x65, 0x12, 0x35, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, - 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, - 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x2c, 0x0a, 0x0a, 0x46, 0x69, - 0x6c, 0x74, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x72, - 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x78, - 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x40, 0x0a, 0x08, 0x4c, 0x6f, 0x6f, 0x70, - 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x74, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x72, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x69, 0x74, 0x65, 0x72, 0x56, 0x61, 0x72, 0x12, - 0x19, 0x0a, 0x08, 0x69, 0x74, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x07, 0x69, 0x74, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x22, 0x4a, 0x0a, 0x08, 0x54, 0x61, - 0x73, 0x6b, 0x45, 0x64, 0x67, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x16, - 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, - 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x22, 0xdd, 0x04, 0x0a, 0x08, 0x54, 0x61, 0x73, 0x6b, 0x4e, - 0x6f, 0x64, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x40, 0x0a, 0x0c, 0x65, 0x74, 0x68, 0x5f, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, - 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x45, 0x54, 0x48, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x48, 0x00, 0x52, 0x0b, 0x65, 0x74, - 0x68, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x46, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, - 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, - 0x0b, 0x32, 0x1d, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x43, - 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, - 0x48, 0x00, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x57, 0x72, 0x69, 0x74, - 0x65, 0x12, 0x43, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x72, 0x65, - 0x61, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, - 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x52, 0x65, - 0x61, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x48, 0x00, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, - 0x63, 0x74, 0x52, 0x65, 0x61, 0x64, 0x12, 0x4c, 0x0a, 0x12, 0x67, 0x72, 0x61, 0x70, 0x68, 0x71, - 0x6c, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x0d, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, - 0x47, 0x72, 0x61, 0x70, 0x68, 0x51, 0x4c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4e, 0x6f, 0x64, 0x65, - 0x48, 0x00, 0x52, 0x10, 0x67, 0x72, 0x61, 0x70, 0x68, 0x71, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x51, - 0x75, 0x65, 0x72, 0x79, 0x12, 0x34, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x74, 0x5f, 0x61, 0x70, 0x69, - 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, - 0x74, 0x6f, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x48, - 0x00, 0x52, 0x07, 0x72, 0x65, 0x73, 0x74, 0x41, 0x70, 0x69, 0x12, 0x30, 0x0a, 0x06, 0x62, 0x72, - 0x61, 0x6e, 0x63, 0x68, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x67, 0x67, - 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x4e, 0x6f, - 0x64, 0x65, 0x48, 0x00, 0x52, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x30, 0x0a, 0x06, - 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, - 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, - 0x4e, 0x6f, 0x64, 0x65, 0x48, 0x00, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x2a, - 0x0a, 0x04, 0x6c, 0x6f, 0x6f, 0x70, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x61, - 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x4c, 0x6f, 0x6f, 0x70, 0x4e, 0x6f, - 0x64, 0x65, 0x48, 0x00, 0x52, 0x04, 0x6c, 0x6f, 0x6f, 0x70, 0x12, 0x3d, 0x0a, 0x0b, 0x63, 0x75, - 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, - 0x1a, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x43, 0x75, 0x73, - 0x74, 0x6f, 0x6d, 0x43, 0x6f, 0x64, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x48, 0x00, 0x52, 0x0a, 0x63, - 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x43, 0x6f, 0x64, 0x65, 0x42, 0x0b, 0x0a, 0x09, 0x74, 0x61, 0x73, - 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0x59, 0x0a, 0x09, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, - 0x28, 0x03, 0x52, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x20, 0x0a, 0x0c, 0x75, 0x73, 0x65, - 0x72, 0x5f, 0x6f, 0x70, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0a, 0x75, 0x73, 0x65, 0x72, 0x4f, 0x70, 0x48, 0x61, 0x73, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x65, - 0x72, 0x72, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, - 0x72, 0x22, 0xe6, 0x03, 0x0a, 0x04, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, - 0x6e, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, - 0x12, 0x30, 0x0a, 0x14, 0x73, 0x6d, 0x61, 0x72, 0x74, 0x5f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, - 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, - 0x73, 0x6d, 0x61, 0x72, 0x74, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x61, 0x74, 0x18, 0x04, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x73, 0x74, 0x61, 0x72, 0x74, 0x41, 0x74, 0x12, 0x1d, 0x0a, - 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x41, 0x74, 0x12, 0x12, 0x0a, 0x04, - 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x65, 0x6d, 0x6f, - 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, - 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, - 0x64, 0x41, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x6d, 0x61, 0x78, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, - 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x45, - 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2e, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, - 0x75, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, - 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, - 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x31, 0x0a, 0x07, 0x74, 0x72, 0x69, 0x67, - 0x67, 0x65, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x67, 0x67, 0x72, - 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x72, 0x69, 0x67, 0x67, - 0x65, 0x72, 0x52, 0x07, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x12, 0x2a, 0x0a, 0x05, 0x6e, - 0x6f, 0x64, 0x65, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x61, 0x67, 0x67, - 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x4e, 0x6f, 0x64, 0x65, - 0x52, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x2a, 0x0a, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, - 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, - 0x74, 0x6f, 0x72, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, 0x64, - 0x67, 0x65, 0x73, 0x12, 0x35, 0x0a, 0x0a, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, - 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, - 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, - 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xbf, 0x02, 0x0a, 0x0d, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x12, 0x31, 0x0a, 0x07, - 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, + 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x82, 0x01, 0x0a, 0x0f, 0x53, + 0x79, 0x6e, 0x63, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, + 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0c, 0x52, 0x09, 0x73, 0x69, 0x67, + 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x6d, 0x6f, 0x6e, 0x6f, 0x74, 0x6f, + 0x6e, 0x69, 0x63, 0x5f, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x0e, 0x6d, 0x6f, 0x6e, 0x6f, 0x74, 0x6f, 0x6e, 0x69, 0x63, 0x43, 0x6c, 0x6f, 0x63, 0x6b, 0x22, + 0xad, 0x02, 0x0a, 0x10, 0x53, 0x79, 0x6e, 0x63, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, + 0x52, 0x65, 0x73, 0x70, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x02, 0x69, 0x64, 0x12, 0x25, 0x0a, 0x02, 0x6f, 0x70, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0e, + 0x32, 0x15, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, 0x52, 0x02, 0x6f, 0x70, 0x12, 0x4e, 0x0a, 0x0d, 0x74, + 0x61, 0x73, 0x6b, 0x5f, 0x6d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x29, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, + 0x53, 0x79, 0x6e, 0x63, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, + 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x52, 0x0c, 0x74, + 0x61, 0x73, 0x6b, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x1a, 0x91, 0x01, 0x0a, 0x0c, + 0x54, 0x61, 0x73, 0x6b, 0x4d, 0x65, 0x74, 0x61, 0x64, 0x61, 0x74, 0x61, 0x12, 0x17, 0x0a, 0x07, + 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, + 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x72, 0x65, 0x6d, 0x61, 0x69, 0x6e, 0x12, 0x1d, 0x0a, + 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x41, 0x74, 0x12, 0x31, 0x0a, 0x07, + 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x54, - 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x52, 0x07, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x12, - 0x19, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, - 0x03, 0x52, 0x07, 0x73, 0x74, 0x61, 0x72, 0x74, 0x41, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x78, - 0x70, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, - 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x41, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x6d, 0x61, 0x78, - 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x30, + 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x52, 0x07, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x22, + 0x1f, 0x0a, 0x0d, 0x41, 0x63, 0x6b, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, + 0x22, 0x2d, 0x0a, 0x13, 0x46, 0x69, 0x78, 0x65, 0x64, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x43, 0x6f, + 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x70, 0x6f, 0x63, 0x68, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x03, 0x52, 0x06, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x22, + 0x2b, 0x0a, 0x0d, 0x43, 0x72, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x12, 0x1a, 0x0a, 0x08, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x09, 0x52, 0x08, 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x22, 0x2c, 0x0a, 0x0e, + 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, + 0x0a, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x08, 0x69, 0x6e, 0x74, 0x65, 0x72, 0x76, 0x61, 0x6c, 0x22, 0x30, 0x0a, 0x0e, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, + 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0xa6, 0x02, 0x0a, + 0x0b, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x12, 0x12, 0x0a, 0x04, + 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, + 0x12, 0x18, 0x0a, 0x06, 0x6d, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, + 0x48, 0x00, 0x52, 0x06, 0x6d, 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x12, 0x40, 0x0a, 0x0a, 0x66, 0x69, + 0x78, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, + 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x46, 0x69, 0x78, 0x65, + 0x64, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x48, + 0x00, 0x52, 0x09, 0x66, 0x69, 0x78, 0x65, 0x64, 0x54, 0x69, 0x6d, 0x65, 0x12, 0x2f, 0x0a, 0x04, + 0x63, 0x72, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x67, 0x67, + 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x43, 0x72, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x04, 0x63, 0x72, 0x6f, 0x6e, 0x12, 0x32, 0x0a, + 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x61, + 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x43, + 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, + 0x6b, 0x12, 0x32, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x45, 0x76, + 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x05, + 0x65, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x0e, 0x0a, 0x0c, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, + 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0x4b, 0x0a, 0x0f, 0x45, 0x54, 0x48, 0x54, 0x72, 0x61, 0x6e, + 0x73, 0x66, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x74, + 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, + 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, + 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, + 0x6e, 0x74, 0x22, 0x7e, 0x0a, 0x11, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x57, 0x72, + 0x69, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x61, 0x6c, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x12, + 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x62, 0x69, 0x18, + 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, + 0x62, 0x69, 0x22, 0x7d, 0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x52, 0x65, + 0x61, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x29, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, + 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x61, 0x6c, 0x6c, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, 0x61, 0x6c, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x12, 0x21, + 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x62, 0x69, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x62, + 0x69, 0x22, 0xc3, 0x01, 0x0a, 0x10, 0x47, 0x72, 0x61, 0x70, 0x68, 0x51, 0x4c, 0x51, 0x75, 0x65, + 0x72, 0x79, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, + 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x49, + 0x0a, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x2b, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x47, + 0x72, 0x61, 0x70, 0x68, 0x51, 0x4c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4e, 0x6f, 0x64, 0x65, 0x2e, + 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, + 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x1a, 0x3c, 0x0a, 0x0e, 0x56, 0x61, 0x72, + 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, + 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, + 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0xc7, 0x01, 0x0a, 0x0b, 0x52, 0x65, 0x73, 0x74, + 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, 0x6c, 0x12, 0x3e, 0x0a, 0x07, 0x68, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x67, 0x67, + 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x41, 0x50, 0x49, 0x4e, + 0x6f, 0x64, 0x65, 0x2e, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, + 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64, + 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x16, 0x0a, + 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, + 0x65, 0x74, 0x68, 0x6f, 0x64, 0x1a, 0x3a, 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, + 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, + 0x01, 0x22, 0x58, 0x0a, 0x0e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x43, 0x6f, 0x64, 0x65, 0x4e, + 0x6f, 0x64, 0x65, 0x12, 0x2e, 0x0a, 0x04, 0x6c, 0x61, 0x6e, 0x67, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0e, 0x32, 0x1a, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x43, + 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x43, 0x6f, 0x64, 0x65, 0x4c, 0x61, 0x6e, 0x67, 0x52, 0x04, 0x6c, + 0x61, 0x6e, 0x67, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x22, 0x4f, 0x0a, 0x09, 0x43, + 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x0a, + 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x0a, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x43, 0x0a, 0x0a, + 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x35, 0x0a, 0x0a, 0x63, 0x6f, + 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, + 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x43, 0x6f, 0x6e, 0x64, + 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x22, 0x2c, 0x0a, 0x0a, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x12, + 0x1e, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x22, + 0xf2, 0x03, 0x0a, 0x08, 0x4c, 0x6f, 0x6f, 0x70, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x14, 0x0a, 0x05, + 0x69, 0x6e, 0x70, 0x75, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x69, 0x6e, 0x70, + 0x75, 0x74, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x74, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x6c, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x69, 0x74, 0x65, 0x72, 0x56, 0x61, 0x6c, 0x12, 0x19, 0x0a, + 0x08, 0x69, 0x74, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x07, 0x69, 0x74, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x12, 0x40, 0x0a, 0x0c, 0x65, 0x74, 0x68, 0x5f, + 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, + 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x45, 0x54, 0x48, 0x54, + 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x48, 0x00, 0x52, 0x0b, 0x65, + 0x74, 0x68, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x46, 0x0a, 0x0e, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x18, 0x0b, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, + 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4e, 0x6f, 0x64, + 0x65, 0x48, 0x00, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x57, 0x72, 0x69, + 0x74, 0x65, 0x12, 0x43, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x72, + 0x65, 0x61, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x61, 0x67, 0x67, 0x72, + 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x52, + 0x65, 0x61, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x48, 0x00, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x61, 0x63, 0x74, 0x52, 0x65, 0x61, 0x64, 0x12, 0x4c, 0x0a, 0x12, 0x67, 0x72, 0x61, 0x70, 0x68, + 0x71, 0x6c, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x0d, 0x20, + 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, + 0x2e, 0x47, 0x72, 0x61, 0x70, 0x68, 0x51, 0x4c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4e, 0x6f, 0x64, + 0x65, 0x48, 0x00, 0x52, 0x10, 0x67, 0x72, 0x61, 0x70, 0x68, 0x71, 0x6c, 0x44, 0x61, 0x74, 0x61, + 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x34, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x74, 0x5f, 0x61, 0x70, + 0x69, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, + 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, + 0x48, 0x00, 0x52, 0x07, 0x72, 0x65, 0x73, 0x74, 0x41, 0x70, 0x69, 0x12, 0x3d, 0x0a, 0x0b, 0x63, + 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x1a, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x43, 0x75, + 0x73, 0x74, 0x6f, 0x6d, 0x43, 0x6f, 0x64, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x48, 0x00, 0x52, 0x0a, + 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x43, 0x6f, 0x64, 0x65, 0x42, 0x08, 0x0a, 0x06, 0x72, 0x75, + 0x6e, 0x6e, 0x65, 0x72, 0x22, 0x4a, 0x0a, 0x08, 0x54, 0x61, 0x73, 0x6b, 0x45, 0x64, 0x67, 0x65, + 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, + 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x16, 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, + 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, + 0x22, 0xdd, 0x04, 0x0a, 0x08, 0x54, 0x61, 0x73, 0x6b, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, + 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, + 0x65, 0x12, 0x40, 0x0a, 0x0c, 0x65, 0x74, 0x68, 0x5f, 0x74, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, + 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, + 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x45, 0x54, 0x48, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, + 0x4e, 0x6f, 0x64, 0x65, 0x48, 0x00, 0x52, 0x0b, 0x65, 0x74, 0x68, 0x54, 0x72, 0x61, 0x6e, 0x73, + 0x66, 0x65, 0x72, 0x12, 0x46, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, + 0x77, 0x72, 0x69, 0x74, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1d, 0x2e, 0x61, 0x67, + 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, + 0x74, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x48, 0x00, 0x52, 0x0d, 0x63, 0x6f, + 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x57, 0x72, 0x69, 0x74, 0x65, 0x12, 0x43, 0x0a, 0x0d, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x72, 0x65, 0x61, 0x64, 0x18, 0x0c, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, + 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x52, 0x65, 0x61, 0x64, 0x4e, 0x6f, 0x64, 0x65, + 0x48, 0x00, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x52, 0x65, 0x61, 0x64, + 0x12, 0x4c, 0x0a, 0x12, 0x67, 0x72, 0x61, 0x70, 0x68, 0x71, 0x6c, 0x5f, 0x64, 0x61, 0x74, 0x61, + 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x61, + 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x47, 0x72, 0x61, 0x70, 0x68, 0x51, + 0x4c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4e, 0x6f, 0x64, 0x65, 0x48, 0x00, 0x52, 0x10, 0x67, 0x72, + 0x61, 0x70, 0x68, 0x71, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x34, + 0x0a, 0x08, 0x72, 0x65, 0x73, 0x74, 0x5f, 0x61, 0x70, 0x69, 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, + 0x32, 0x17, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x52, 0x65, + 0x73, 0x74, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x48, 0x00, 0x52, 0x07, 0x72, 0x65, 0x73, + 0x74, 0x41, 0x70, 0x69, 0x12, 0x30, 0x0a, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x18, 0x0f, + 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, + 0x72, 0x2e, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x4e, 0x6f, 0x64, 0x65, 0x48, 0x00, 0x52, 0x06, + 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x30, 0x0a, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, + 0x74, 0x6f, 0x72, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x48, 0x00, + 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x2a, 0x0a, 0x04, 0x6c, 0x6f, 0x6f, 0x70, + 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, + 0x74, 0x6f, 0x72, 0x2e, 0x4c, 0x6f, 0x6f, 0x70, 0x4e, 0x6f, 0x64, 0x65, 0x48, 0x00, 0x52, 0x04, + 0x6c, 0x6f, 0x6f, 0x70, 0x12, 0x3d, 0x0a, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x63, + 0x6f, 0x64, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x61, 0x67, 0x67, 0x72, + 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x43, 0x6f, 0x64, + 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x48, 0x00, 0x52, 0x0a, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x43, + 0x6f, 0x64, 0x65, 0x42, 0x0b, 0x0a, 0x09, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, + 0x22, 0xdc, 0x02, 0x0a, 0x09, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x14, + 0x0a, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x05, 0x65, + 0x70, 0x6f, 0x63, 0x68, 0x12, 0x18, 0x0a, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x14, + 0x0a, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, + 0x72, 0x72, 0x6f, 0x72, 0x12, 0x3a, 0x0a, 0x0c, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x5f, + 0x6d, 0x61, 0x72, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x67, 0x67, + 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x4d, + 0x61, 0x72, 0x6b, 0x52, 0x0b, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x4d, 0x61, 0x72, 0x6b, + 0x12, 0x16, 0x0a, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x06, 0x72, 0x65, 0x73, 0x75, 0x6c, 0x74, 0x12, 0x30, 0x0a, 0x05, 0x73, 0x74, 0x65, 0x70, + 0x73, 0x18, 0x06, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, + 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x2e, 0x53, + 0x74, 0x65, 0x70, 0x52, 0x05, 0x73, 0x74, 0x65, 0x70, 0x73, 0x1a, 0x82, 0x01, 0x0a, 0x04, 0x53, + 0x74, 0x65, 0x70, 0x12, 0x17, 0x0a, 0x07, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6e, 0x6f, 0x64, 0x65, 0x49, 0x64, 0x12, 0x18, 0x0a, 0x07, + 0x73, 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x08, 0x52, 0x07, 0x73, + 0x75, 0x63, 0x63, 0x65, 0x73, 0x73, 0x12, 0x1f, 0x0a, 0x0b, 0x6f, 0x75, 0x74, 0x70, 0x75, 0x74, + 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x6f, 0x75, 0x74, + 0x70, 0x75, 0x74, 0x44, 0x61, 0x74, 0x61, 0x12, 0x10, 0x0a, 0x03, 0x6c, 0x6f, 0x67, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6c, 0x6f, 0x67, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x72, 0x72, + 0x6f, 0x72, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, 0x72, 0x22, + 0xe6, 0x03, 0x0a, 0x04, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, + 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x30, 0x0a, 0x14, 0x73, 0x6d, 0x61, 0x72, 0x74, 0x5f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x5f, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x73, 0x6d, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x73, 0x6d, 0x61, 0x72, 0x74, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, - 0x6d, 0x65, 0x6d, 0x6f, 0x12, 0x2a, 0x0a, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x07, 0x20, - 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, - 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, - 0x12, 0x2a, 0x0a, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, - 0x14, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x54, 0x61, 0x73, - 0x6b, 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x22, 0x20, 0x0a, 0x0e, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x12, 0x0e, - 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x24, - 0x0a, 0x0c, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, - 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, - 0x77, 0x6e, 0x65, 0x72, 0x22, 0x21, 0x0a, 0x09, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, - 0x70, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x22, 0x3d, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x57, - 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x61, 0x63, 0x74, - 0x6f, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x66, 0x61, 0x63, 0x74, 0x6f, - 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x61, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x73, 0x61, 0x6c, 0x74, 0x22, 0x55, 0x0a, 0x0b, 0x53, 0x6d, 0x61, 0x72, 0x74, 0x57, - 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, - 0x12, 0x0a, 0x04, 0x73, 0x61, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, - 0x61, 0x6c, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x03, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x22, 0x43, 0x0a, - 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, - 0x31, 0x0a, 0x07, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, - 0x32, 0x17, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x53, 0x6d, - 0x61, 0x72, 0x74, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x07, 0x77, 0x61, 0x6c, 0x6c, 0x65, - 0x74, 0x73, 0x22, 0x40, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, - 0x65, 0x71, 0x12, 0x30, 0x0a, 0x14, 0x73, 0x6d, 0x61, 0x72, 0x74, 0x5f, 0x77, 0x61, 0x6c, 0x6c, - 0x65, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x12, 0x73, 0x6d, 0x61, 0x72, 0x74, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x22, 0x37, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x73, 0x6b, - 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x26, 0x0a, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x01, - 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, - 0x72, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x22, 0x5e, 0x0a, - 0x09, 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, - 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, - 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x41, 0x74, 0x12, - 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0x1b, 0x0a, - 0x07, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x59, 0x0a, 0x0f, 0x55, 0x70, - 0x64, 0x61, 0x74, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, - 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, - 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, - 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, - 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x4d, 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, - 0x68, 0x65, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, - 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, - 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, - 0x65, 0x64, 0x41, 0x74, 0x22, 0x4e, 0x0a, 0x0f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x61, - 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x61, 0x6c, 0x74, 0x18, - 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x61, 0x6c, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x66, - 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 0x22, 0x69, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x61, - 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, - 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, - 0x73, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x61, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x04, 0x73, 0x61, 0x6c, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, - 0x79, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x0e, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2a, - 0xc8, 0x01, 0x0a, 0x05, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x6e, 0x6b, - 0x6e, 0x6f, 0x77, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0c, 0x52, 0x70, - 0x63, 0x4e, 0x6f, 0x64, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0xe8, 0x07, 0x12, 0x17, 0x0a, - 0x12, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x55, 0x6e, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, - 0x62, 0x6c, 0x65, 0x10, 0xd0, 0x0f, 0x12, 0x16, 0x0a, 0x11, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, - 0x65, 0x57, 0x72, 0x69, 0x74, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0xd1, 0x0f, 0x12, 0x18, - 0x0a, 0x13, 0x53, 0x6d, 0x61, 0x72, 0x74, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x70, 0x63, - 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0xf0, 0x2e, 0x12, 0x1d, 0x0a, 0x18, 0x53, 0x6d, 0x61, 0x72, - 0x74, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x45, - 0x72, 0x72, 0x6f, 0x72, 0x10, 0xf1, 0x2e, 0x12, 0x16, 0x0a, 0x11, 0x54, 0x61, 0x73, 0x6b, 0x44, - 0x61, 0x74, 0x61, 0x43, 0x6f, 0x72, 0x72, 0x75, 0x70, 0x74, 0x65, 0x64, 0x10, 0xd8, 0x36, 0x12, - 0x19, 0x0a, 0x14, 0x54, 0x61, 0x73, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x4d, 0x69, 0x73, 0x73, 0x69, - 0x6e, 0x67, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0xd9, 0x36, 0x2a, 0x50, 0x0a, 0x0a, 0x54, 0x61, - 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x63, 0x74, 0x69, - 0x76, 0x65, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, - 0x64, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x10, 0x02, 0x12, - 0x0c, 0x0a, 0x08, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x65, 0x64, 0x10, 0x03, 0x12, 0x0d, 0x0a, - 0x09, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x10, 0x04, 0x2a, 0x20, 0x0a, 0x0e, - 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x43, 0x6f, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0e, - 0x0a, 0x0a, 0x4a, 0x61, 0x76, 0x61, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x10, 0x00, 0x32, 0x9e, - 0x06, 0x0a, 0x0a, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x36, 0x0a, - 0x06, 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x12, 0x15, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, - 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x1a, 0x13, - 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x4b, 0x65, 0x79, 0x52, - 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x3d, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x6e, 0x63, - 0x65, 0x12, 0x18, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x4e, - 0x6f, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x61, 0x67, - 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x52, 0x65, - 0x73, 0x70, 0x22, 0x00, 0x12, 0x4b, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x61, - 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x1b, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, - 0x72, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, - 0x71, 0x1a, 0x1c, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x43, - 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, - 0x00, 0x12, 0x46, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x73, - 0x12, 0x19, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x4c, 0x69, - 0x73, 0x74, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x1a, 0x2e, 0x61, 0x67, - 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x61, 0x6c, - 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x0a, 0x43, 0x72, 0x65, - 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x19, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, - 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, + 0x12, 0x19, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x61, 0x74, 0x18, 0x04, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x07, 0x73, 0x74, 0x61, 0x72, 0x74, 0x41, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x65, + 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x41, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x65, + 0x6d, 0x6f, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x12, 0x21, + 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x07, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, + 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x6d, 0x61, 0x78, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, + 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x45, 0x78, 0x65, + 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2e, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x18, 0x09, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, + 0x74, 0x6f, 0x72, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, + 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x31, 0x0a, 0x07, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, + 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, + 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, + 0x52, 0x07, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x12, 0x2a, 0x0a, 0x05, 0x6e, 0x6f, 0x64, + 0x65, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, + 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x05, + 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x2a, 0x0a, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x18, 0x0c, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, + 0x72, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, 0x64, 0x67, 0x65, + 0x73, 0x12, 0x35, 0x0a, 0x0a, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, + 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, + 0x6f, 0x72, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x65, 0x78, + 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xbf, 0x02, 0x0a, 0x0d, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x12, 0x31, 0x0a, 0x07, 0x74, 0x72, + 0x69, 0x67, 0x67, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x67, + 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x72, 0x69, + 0x67, 0x67, 0x65, 0x72, 0x52, 0x07, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x12, 0x19, 0x0a, + 0x08, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, + 0x07, 0x73, 0x74, 0x61, 0x72, 0x74, 0x41, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, + 0x72, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x78, + 0x70, 0x69, 0x72, 0x65, 0x64, 0x41, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x6d, 0x61, 0x78, 0x5f, 0x65, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, + 0x6d, 0x61, 0x78, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x30, 0x0a, 0x14, + 0x73, 0x6d, 0x61, 0x72, 0x74, 0x5f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x5f, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x73, 0x6d, 0x61, 0x72, + 0x74, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x12, + 0x0a, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x65, + 0x6d, 0x6f, 0x12, 0x2a, 0x0a, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x07, 0x20, 0x03, 0x28, + 0x0b, 0x32, 0x14, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x54, + 0x61, 0x73, 0x6b, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x2a, + 0x0a, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, + 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x45, + 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x22, 0x20, 0x0a, 0x0e, 0x43, 0x72, + 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x12, 0x0e, 0x0a, 0x02, + 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x24, 0x0a, 0x0c, + 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, 0x0a, 0x05, + 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, + 0x65, 0x72, 0x22, 0x21, 0x0a, 0x09, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x12, + 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, + 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x22, 0x3d, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x61, 0x6c, + 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, + 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, + 0x12, 0x12, 0x0a, 0x04, 0x73, 0x61, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x73, 0x61, 0x6c, 0x74, 0x22, 0x55, 0x0a, 0x0b, 0x53, 0x6d, 0x61, 0x72, 0x74, 0x57, 0x61, 0x6c, + 0x6c, 0x65, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x12, 0x0a, + 0x04, 0x73, 0x61, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x61, 0x6c, + 0x74, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x07, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x22, 0x43, 0x0a, 0x0e, 0x4c, + 0x69, 0x73, 0x74, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x31, 0x0a, + 0x07, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x17, + 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x53, 0x6d, 0x61, 0x72, + 0x74, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x07, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x73, + 0x22, 0x40, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, + 0x12, 0x30, 0x0a, 0x14, 0x73, 0x6d, 0x61, 0x72, 0x74, 0x5f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, + 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, + 0x73, 0x6d, 0x61, 0x72, 0x74, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x22, 0x37, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, + 0x65, 0x73, 0x70, 0x12, 0x26, 0x0a, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, + 0x54, 0x61, 0x73, 0x6b, 0x52, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x22, 0x5e, 0x0a, 0x09, 0x47, + 0x65, 0x74, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, + 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x12, 0x1d, + 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1c, 0x0a, + 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0x1b, 0x0a, 0x07, 0x4b, + 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x66, 0x0a, 0x0b, 0x54, 0x72, 0x69, 0x67, + 0x67, 0x65, 0x72, 0x4d, 0x61, 0x72, 0x6b, 0x12, 0x21, 0x0a, 0x0c, 0x62, 0x6c, 0x6f, 0x63, 0x6b, + 0x5f, 0x6e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x04, 0x52, 0x0b, 0x62, + 0x6c, 0x6f, 0x63, 0x6b, 0x4e, 0x75, 0x6d, 0x62, 0x65, 0x72, 0x12, 0x1b, 0x0a, 0x09, 0x6c, 0x6f, + 0x67, 0x5f, 0x69, 0x6e, 0x64, 0x65, 0x78, 0x18, 0x02, 0x20, 0x01, 0x28, 0x04, 0x52, 0x08, 0x6c, + 0x6f, 0x67, 0x49, 0x6e, 0x64, 0x65, 0x78, 0x12, 0x17, 0x0a, 0x07, 0x74, 0x78, 0x5f, 0x68, 0x61, + 0x73, 0x68, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x74, 0x78, 0x48, 0x61, 0x73, 0x68, + 0x22, 0xa4, 0x01, 0x0a, 0x11, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, 0x54, 0x72, 0x69, 0x67, 0x67, + 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x17, + 0x0a, 0x07, 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x69, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x06, 0x74, 0x61, 0x73, 0x6b, 0x49, 0x64, 0x12, 0x3e, 0x0a, 0x0e, 0x74, 0x72, 0x69, 0x67, 0x67, + 0x65, 0x72, 0x5f, 0x6d, 0x61, 0x72, 0x6b, 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x17, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x54, 0x72, 0x69, + 0x67, 0x67, 0x65, 0x72, 0x4d, 0x61, 0x72, 0x6b, 0x52, 0x0d, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, + 0x72, 0x4d, 0x61, 0x72, 0x6b, 0x65, 0x72, 0x22, 0x4f, 0x0a, 0x12, 0x4e, 0x6f, 0x74, 0x69, 0x66, + 0x79, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x39, 0x0a, + 0x0a, 0x75, 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, + 0x62, 0x75, 0x66, 0x2e, 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, + 0x70, 0x64, 0x61, 0x74, 0x65, 0x64, 0x41, 0x74, 0x22, 0x4e, 0x0a, 0x0f, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x73, + 0x61, 0x6c, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x61, 0x6c, 0x74, 0x12, + 0x27, 0x0a, 0x0f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, + 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x22, 0x69, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x18, 0x0a, 0x07, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x61, 0x6c, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x61, 0x6c, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x66, 0x61, + 0x63, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x0e, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x41, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x2a, 0x61, 0x0a, 0x09, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x4f, 0x70, + 0x12, 0x09, 0x0a, 0x05, 0x55, 0x6e, 0x73, 0x65, 0x74, 0x10, 0x00, 0x12, 0x16, 0x0a, 0x12, 0x4d, + 0x6f, 0x6e, 0x69, 0x74, 0x6f, 0x72, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, + 0x72, 0x10, 0x01, 0x12, 0x0e, 0x0a, 0x0a, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x54, 0x61, 0x73, + 0x6b, 0x10, 0x02, 0x12, 0x0e, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x73, + 0x6b, 0x10, 0x03, 0x12, 0x11, 0x0a, 0x0d, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, + 0x54, 0x61, 0x73, 0x6b, 0x10, 0x04, 0x2a, 0xc8, 0x01, 0x0a, 0x05, 0x45, 0x72, 0x72, 0x6f, 0x72, + 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x6e, 0x6b, 0x6e, 0x6f, 0x77, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, + 0x00, 0x12, 0x11, 0x0a, 0x0c, 0x52, 0x70, 0x63, 0x4e, 0x6f, 0x64, 0x65, 0x45, 0x72, 0x72, 0x6f, + 0x72, 0x10, 0xe8, 0x07, 0x12, 0x17, 0x0a, 0x12, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x55, + 0x6e, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, 0x62, 0x6c, 0x65, 0x10, 0xd0, 0x0f, 0x12, 0x16, 0x0a, + 0x11, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x57, 0x72, 0x69, 0x74, 0x65, 0x45, 0x72, 0x72, + 0x6f, 0x72, 0x10, 0xd1, 0x0f, 0x12, 0x18, 0x0a, 0x13, 0x53, 0x6d, 0x61, 0x72, 0x74, 0x57, 0x61, + 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x70, 0x63, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0xf0, 0x2e, 0x12, + 0x1d, 0x0a, 0x18, 0x53, 0x6d, 0x61, 0x72, 0x74, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x4e, 0x6f, + 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0xf1, 0x2e, 0x12, 0x16, + 0x0a, 0x11, 0x54, 0x61, 0x73, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x43, 0x6f, 0x72, 0x72, 0x75, 0x70, + 0x74, 0x65, 0x64, 0x10, 0xd8, 0x36, 0x12, 0x19, 0x0a, 0x14, 0x54, 0x61, 0x73, 0x6b, 0x44, 0x61, + 0x74, 0x61, 0x4d, 0x69, 0x73, 0x73, 0x69, 0x6e, 0x67, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0xd9, + 0x36, 0x2a, 0x50, 0x0a, 0x0a, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, + 0x0a, 0x0a, 0x06, 0x41, 0x63, 0x74, 0x69, 0x76, 0x65, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x43, + 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x61, + 0x69, 0x6c, 0x65, 0x64, 0x10, 0x02, 0x12, 0x0c, 0x0a, 0x08, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, + 0x65, 0x64, 0x10, 0x03, 0x12, 0x0d, 0x0a, 0x09, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6e, + 0x67, 0x10, 0x04, 0x2a, 0x20, 0x0a, 0x0e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x43, 0x6f, 0x64, + 0x65, 0x4c, 0x61, 0x6e, 0x67, 0x12, 0x0e, 0x0a, 0x0a, 0x4a, 0x61, 0x76, 0x61, 0x53, 0x63, 0x72, + 0x69, 0x70, 0x74, 0x10, 0x00, 0x32, 0xd3, 0x04, 0x0a, 0x0a, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, + 0x61, 0x74, 0x6f, 0x72, 0x12, 0x36, 0x0a, 0x06, 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x12, 0x15, + 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x4b, + 0x65, 0x79, 0x52, 0x65, 0x71, 0x1a, 0x13, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, + 0x6f, 0x72, 0x2e, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x3d, 0x0a, 0x08, + 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x12, 0x18, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, + 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, + 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, + 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x4b, 0x0a, 0x0c, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x1b, 0x2e, 0x61, 0x67, + 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, + 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x1c, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, + 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x61, 0x6c, 0x6c, + 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x46, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, + 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x73, 0x12, 0x19, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, + 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x1a, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, - 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, - 0x12, 0x42, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x18, 0x2e, - 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, - 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, - 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, - 0x73, 0x70, 0x22, 0x00, 0x12, 0x30, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x12, - 0x11, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x49, 0x64, 0x52, - 0x65, 0x71, 0x1a, 0x10, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, - 0x54, 0x61, 0x73, 0x6b, 0x22, 0x00, 0x12, 0x3d, 0x0a, 0x0a, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, - 0x54, 0x61, 0x73, 0x6b, 0x12, 0x11, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, - 0x72, 0x2e, 0x49, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, - 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, - 0x6c, 0x75, 0x65, 0x22, 0x00, 0x12, 0x3d, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, - 0x61, 0x73, 0x6b, 0x12, 0x11, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, - 0x2e, 0x49, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, - 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x22, 0x00, 0x12, 0x36, 0x0a, 0x04, 0x50, 0x69, 0x6e, 0x67, 0x12, 0x13, 0x2e, 0x61, + 0x4c, 0x69, 0x73, 0x74, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, + 0x12, 0x45, 0x0a, 0x0a, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x19, + 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x43, 0x72, 0x65, 0x61, + 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x1a, 0x1a, 0x2e, 0x61, 0x67, 0x67, 0x72, + 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, + 0x6b, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x42, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x54, + 0x61, 0x73, 0x6b, 0x73, 0x12, 0x18, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, + 0x72, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x19, + 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x4c, 0x69, 0x73, 0x74, + 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x30, 0x0a, 0x07, 0x47, + 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x11, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, + 0x74, 0x6f, 0x72, 0x2e, 0x49, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x10, 0x2e, 0x61, 0x67, 0x67, 0x72, + 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x22, 0x00, 0x12, 0x3d, 0x0a, + 0x0a, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x11, 0x2e, 0x61, 0x67, + 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x49, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x1a, + 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, + 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x00, 0x12, 0x3d, 0x0a, 0x0a, + 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x11, 0x2e, 0x61, 0x67, 0x67, + 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x49, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x00, 0x32, 0xa0, 0x02, 0x0a, 0x04, + 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x36, 0x0a, 0x04, 0x50, 0x69, 0x6e, 0x67, 0x12, 0x13, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x69, 0x6e, 0x1a, 0x17, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x43, - 0x68, 0x65, 0x63, 0x6b, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x44, 0x0a, 0x09, - 0x53, 0x79, 0x6e, 0x63, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x18, 0x2e, 0x61, 0x67, 0x67, 0x72, - 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x54, 0x61, 0x73, 0x6b, 0x73, - 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, - 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, - 0x30, 0x01, 0x12, 0x4b, 0x0a, 0x0c, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x68, 0x65, 0x63, - 0x6b, 0x73, 0x12, 0x1b, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, - 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x1a, - 0x1c, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x55, 0x70, 0x64, - 0x61, 0x74, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x42, - 0x0c, 0x5a, 0x0a, 0x2e, 0x2f, 0x61, 0x76, 0x73, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, - 0x72, 0x6f, 0x74, 0x6f, 0x33, + 0x68, 0x65, 0x63, 0x6b, 0x69, 0x6e, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x4d, 0x0a, 0x0c, + 0x53, 0x79, 0x6e, 0x63, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x12, 0x1b, 0x2e, 0x61, + 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x4d, 0x65, + 0x73, 0x73, 0x61, 0x67, 0x65, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x1c, 0x2e, 0x61, 0x67, 0x67, 0x72, + 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x53, 0x79, 0x6e, 0x63, 0x4d, 0x65, 0x73, 0x73, 0x61, + 0x67, 0x65, 0x73, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x30, 0x01, 0x12, 0x3e, 0x0a, 0x03, 0x41, + 0x63, 0x6b, 0x12, 0x19, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, + 0x41, 0x63, 0x6b, 0x4d, 0x65, 0x73, 0x73, 0x61, 0x67, 0x65, 0x52, 0x65, 0x71, 0x1a, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, 0x75, 0x65, 0x22, 0x00, 0x12, 0x51, 0x0a, 0x0e, 0x4e, + 0x6f, 0x74, 0x69, 0x66, 0x79, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x73, 0x12, 0x1d, 0x2e, + 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x4e, 0x6f, 0x74, 0x69, 0x66, + 0x79, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x1e, 0x2e, 0x61, + 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x4e, 0x6f, 0x74, 0x69, 0x66, 0x79, + 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x73, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x42, 0x0c, + 0x5a, 0x0a, 0x2e, 0x2f, 0x61, 0x76, 0x73, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x06, 0x70, 0x72, + 0x6f, 0x74, 0x6f, 0x33, } var ( @@ -3212,119 +3768,137 @@ func file_protobuf_avs_proto_rawDescGZIP() []byte { return file_protobuf_avs_proto_rawDescData } -var file_protobuf_avs_proto_enumTypes = make([]protoimpl.EnumInfo, 3) -var file_protobuf_avs_proto_msgTypes = make([]protoimpl.MessageInfo, 42) +var file_protobuf_avs_proto_enumTypes = make([]protoimpl.EnumInfo, 4) +var file_protobuf_avs_proto_msgTypes = make([]protoimpl.MessageInfo, 46) var file_protobuf_avs_proto_goTypes = []interface{}{ - (Error)(0), // 0: aggregator.Error - (TaskStatus)(0), // 1: aggregator.TaskStatus - (CustomCodeType)(0), // 2: aggregator.CustomCodeType - (*IdReq)(nil), // 3: aggregator.IdReq - (*Checkin)(nil), // 4: aggregator.Checkin - (*CheckinResp)(nil), // 5: aggregator.CheckinResp - (*SyncTasksReq)(nil), // 6: aggregator.SyncTasksReq - (*FixedEpochCondition)(nil), // 7: aggregator.FixedEpochCondition - (*CronCondition)(nil), // 8: aggregator.CronCondition - (*BlockCondition)(nil), // 9: aggregator.BlockCondition - (*EventCondition)(nil), // 10: aggregator.EventCondition - (*TaskTrigger)(nil), // 11: aggregator.TaskTrigger - (*SyncTasksResp)(nil), // 12: aggregator.SyncTasksResp - (*ETHTransferNode)(nil), // 13: aggregator.ETHTransferNode - (*ContractWriteNode)(nil), // 14: aggregator.ContractWriteNode - (*ContractReadNode)(nil), // 15: aggregator.ContractReadNode - (*GraphQLQueryNode)(nil), // 16: aggregator.GraphQLQueryNode - (*RestAPINode)(nil), // 17: aggregator.RestAPINode - (*CustomCodeNode)(nil), // 18: aggregator.CustomCodeNode - (*Condition)(nil), // 19: aggregator.Condition - (*BranchNode)(nil), // 20: aggregator.BranchNode - (*FilterNode)(nil), // 21: aggregator.FilterNode - (*LoopNode)(nil), // 22: aggregator.LoopNode - (*TaskEdge)(nil), // 23: aggregator.TaskEdge - (*TaskNode)(nil), // 24: aggregator.TaskNode - (*Execution)(nil), // 25: aggregator.Execution - (*Task)(nil), // 26: aggregator.Task - (*CreateTaskReq)(nil), // 27: aggregator.CreateTaskReq - (*CreateTaskResp)(nil), // 28: aggregator.CreateTaskResp - (*NonceRequest)(nil), // 29: aggregator.NonceRequest - (*NonceResp)(nil), // 30: aggregator.NonceResp - (*ListWalletReq)(nil), // 31: aggregator.ListWalletReq - (*SmartWallet)(nil), // 32: aggregator.SmartWallet - (*ListWalletResp)(nil), // 33: aggregator.ListWalletResp - (*ListTasksReq)(nil), // 34: aggregator.ListTasksReq - (*ListTasksResp)(nil), // 35: aggregator.ListTasksResp - (*GetKeyReq)(nil), // 36: aggregator.GetKeyReq - (*KeyResp)(nil), // 37: aggregator.KeyResp - (*UpdateChecksReq)(nil), // 38: aggregator.UpdateChecksReq - (*UpdateChecksResp)(nil), // 39: aggregator.UpdateChecksResp - (*CreateWalletReq)(nil), // 40: aggregator.CreateWalletReq - (*CreateWalletResp)(nil), // 41: aggregator.CreateWalletResp - (*Checkin_Status)(nil), // 42: aggregator.Checkin.Status - nil, // 43: aggregator.GraphQLQueryNode.VariablesEntry - nil, // 44: aggregator.RestAPINode.HeadersEntry - (*timestamppb.Timestamp)(nil), // 45: google.protobuf.Timestamp - (*wrapperspb.BoolValue)(nil), // 46: google.protobuf.BoolValue + (MessageOp)(0), // 0: aggregator.MessageOp + (Error)(0), // 1: aggregator.Error + (TaskStatus)(0), // 2: aggregator.TaskStatus + (CustomCodeLang)(0), // 3: aggregator.CustomCodeLang + (*IdReq)(nil), // 4: aggregator.IdReq + (*Checkin)(nil), // 5: aggregator.Checkin + (*CheckinResp)(nil), // 6: aggregator.CheckinResp + (*SyncMessagesReq)(nil), // 7: aggregator.SyncMessagesReq + (*SyncMessagesResp)(nil), // 8: aggregator.SyncMessagesResp + (*AckMessageReq)(nil), // 9: aggregator.AckMessageReq + (*FixedEpochCondition)(nil), // 10: aggregator.FixedEpochCondition + (*CronCondition)(nil), // 11: aggregator.CronCondition + (*BlockCondition)(nil), // 12: aggregator.BlockCondition + (*EventCondition)(nil), // 13: aggregator.EventCondition + (*TaskTrigger)(nil), // 14: aggregator.TaskTrigger + (*ETHTransferNode)(nil), // 15: aggregator.ETHTransferNode + (*ContractWriteNode)(nil), // 16: aggregator.ContractWriteNode + (*ContractReadNode)(nil), // 17: aggregator.ContractReadNode + (*GraphQLQueryNode)(nil), // 18: aggregator.GraphQLQueryNode + (*RestAPINode)(nil), // 19: aggregator.RestAPINode + (*CustomCodeNode)(nil), // 20: aggregator.CustomCodeNode + (*Condition)(nil), // 21: aggregator.Condition + (*BranchNode)(nil), // 22: aggregator.BranchNode + (*FilterNode)(nil), // 23: aggregator.FilterNode + (*LoopNode)(nil), // 24: aggregator.LoopNode + (*TaskEdge)(nil), // 25: aggregator.TaskEdge + (*TaskNode)(nil), // 26: aggregator.TaskNode + (*Execution)(nil), // 27: aggregator.Execution + (*Task)(nil), // 28: aggregator.Task + (*CreateTaskReq)(nil), // 29: aggregator.CreateTaskReq + (*CreateTaskResp)(nil), // 30: aggregator.CreateTaskResp + (*NonceRequest)(nil), // 31: aggregator.NonceRequest + (*NonceResp)(nil), // 32: aggregator.NonceResp + (*ListWalletReq)(nil), // 33: aggregator.ListWalletReq + (*SmartWallet)(nil), // 34: aggregator.SmartWallet + (*ListWalletResp)(nil), // 35: aggregator.ListWalletResp + (*ListTasksReq)(nil), // 36: aggregator.ListTasksReq + (*ListTasksResp)(nil), // 37: aggregator.ListTasksResp + (*GetKeyReq)(nil), // 38: aggregator.GetKeyReq + (*KeyResp)(nil), // 39: aggregator.KeyResp + (*TriggerMark)(nil), // 40: aggregator.TriggerMark + (*NotifyTriggersReq)(nil), // 41: aggregator.NotifyTriggersReq + (*NotifyTriggersResp)(nil), // 42: aggregator.NotifyTriggersResp + (*CreateWalletReq)(nil), // 43: aggregator.CreateWalletReq + (*CreateWalletResp)(nil), // 44: aggregator.CreateWalletResp + (*Checkin_Status)(nil), // 45: aggregator.Checkin.Status + (*SyncMessagesResp_TaskMetadata)(nil), // 46: aggregator.SyncMessagesResp.TaskMetadata + nil, // 47: aggregator.GraphQLQueryNode.VariablesEntry + nil, // 48: aggregator.RestAPINode.HeadersEntry + (*Execution_Step)(nil), // 49: aggregator.Execution.Step + (*timestamppb.Timestamp)(nil), // 50: google.protobuf.Timestamp + (*wrapperspb.BoolValue)(nil), // 51: google.protobuf.BoolValue } var file_protobuf_avs_proto_depIdxs = []int32{ - 42, // 0: aggregator.Checkin.status:type_name -> aggregator.Checkin.Status - 45, // 1: aggregator.CheckinResp.updated_at:type_name -> google.protobuf.Timestamp - 7, // 2: aggregator.TaskTrigger.fixed_time:type_name -> aggregator.FixedEpochCondition - 8, // 3: aggregator.TaskTrigger.cron:type_name -> aggregator.CronCondition - 9, // 4: aggregator.TaskTrigger.block:type_name -> aggregator.BlockCondition - 10, // 5: aggregator.TaskTrigger.event:type_name -> aggregator.EventCondition - 11, // 6: aggregator.SyncTasksResp.trigger:type_name -> aggregator.TaskTrigger - 43, // 7: aggregator.GraphQLQueryNode.variables:type_name -> aggregator.GraphQLQueryNode.VariablesEntry - 44, // 8: aggregator.RestAPINode.headers:type_name -> aggregator.RestAPINode.HeadersEntry - 2, // 9: aggregator.CustomCodeNode.type:type_name -> aggregator.CustomCodeType - 19, // 10: aggregator.BranchNode.conditions:type_name -> aggregator.Condition - 13, // 11: aggregator.TaskNode.eth_transfer:type_name -> aggregator.ETHTransferNode - 14, // 12: aggregator.TaskNode.contract_write:type_name -> aggregator.ContractWriteNode - 15, // 13: aggregator.TaskNode.contract_read:type_name -> aggregator.ContractReadNode - 16, // 14: aggregator.TaskNode.graphql_data_query:type_name -> aggregator.GraphQLQueryNode - 17, // 15: aggregator.TaskNode.rest_api:type_name -> aggregator.RestAPINode - 20, // 16: aggregator.TaskNode.branch:type_name -> aggregator.BranchNode - 21, // 17: aggregator.TaskNode.filter:type_name -> aggregator.FilterNode - 22, // 18: aggregator.TaskNode.loop:type_name -> aggregator.LoopNode - 18, // 19: aggregator.TaskNode.custom_code:type_name -> aggregator.CustomCodeNode - 1, // 20: aggregator.Task.status:type_name -> aggregator.TaskStatus - 11, // 21: aggregator.Task.trigger:type_name -> aggregator.TaskTrigger - 24, // 22: aggregator.Task.nodes:type_name -> aggregator.TaskNode - 23, // 23: aggregator.Task.edges:type_name -> aggregator.TaskEdge - 25, // 24: aggregator.Task.executions:type_name -> aggregator.Execution - 11, // 25: aggregator.CreateTaskReq.trigger:type_name -> aggregator.TaskTrigger - 24, // 26: aggregator.CreateTaskReq.nodes:type_name -> aggregator.TaskNode - 23, // 27: aggregator.CreateTaskReq.edges:type_name -> aggregator.TaskEdge - 32, // 28: aggregator.ListWalletResp.wallets:type_name -> aggregator.SmartWallet - 26, // 29: aggregator.ListTasksResp.tasks:type_name -> aggregator.Task - 45, // 30: aggregator.UpdateChecksResp.updated_at:type_name -> google.protobuf.Timestamp - 45, // 31: aggregator.Checkin.Status.last_heartbeat:type_name -> google.protobuf.Timestamp - 36, // 32: aggregator.Aggregator.GetKey:input_type -> aggregator.GetKeyReq - 29, // 33: aggregator.Aggregator.GetNonce:input_type -> aggregator.NonceRequest - 40, // 34: aggregator.Aggregator.CreateWallet:input_type -> aggregator.CreateWalletReq - 31, // 35: aggregator.Aggregator.ListWallets:input_type -> aggregator.ListWalletReq - 27, // 36: aggregator.Aggregator.CreateTask:input_type -> aggregator.CreateTaskReq - 34, // 37: aggregator.Aggregator.ListTasks:input_type -> aggregator.ListTasksReq - 3, // 38: aggregator.Aggregator.GetTask:input_type -> aggregator.IdReq - 3, // 39: aggregator.Aggregator.CancelTask:input_type -> aggregator.IdReq - 3, // 40: aggregator.Aggregator.DeleteTask:input_type -> aggregator.IdReq - 4, // 41: aggregator.Aggregator.Ping:input_type -> aggregator.Checkin - 6, // 42: aggregator.Aggregator.SyncTasks:input_type -> aggregator.SyncTasksReq - 38, // 43: aggregator.Aggregator.UpdateChecks:input_type -> aggregator.UpdateChecksReq - 37, // 44: aggregator.Aggregator.GetKey:output_type -> aggregator.KeyResp - 30, // 45: aggregator.Aggregator.GetNonce:output_type -> aggregator.NonceResp - 41, // 46: aggregator.Aggregator.CreateWallet:output_type -> aggregator.CreateWalletResp - 33, // 47: aggregator.Aggregator.ListWallets:output_type -> aggregator.ListWalletResp - 28, // 48: aggregator.Aggregator.CreateTask:output_type -> aggregator.CreateTaskResp - 35, // 49: aggregator.Aggregator.ListTasks:output_type -> aggregator.ListTasksResp - 26, // 50: aggregator.Aggregator.GetTask:output_type -> aggregator.Task - 46, // 51: aggregator.Aggregator.CancelTask:output_type -> google.protobuf.BoolValue - 46, // 52: aggregator.Aggregator.DeleteTask:output_type -> google.protobuf.BoolValue - 5, // 53: aggregator.Aggregator.Ping:output_type -> aggregator.CheckinResp - 12, // 54: aggregator.Aggregator.SyncTasks:output_type -> aggregator.SyncTasksResp - 39, // 55: aggregator.Aggregator.UpdateChecks:output_type -> aggregator.UpdateChecksResp - 44, // [44:56] is the sub-list for method output_type - 32, // [32:44] is the sub-list for method input_type - 32, // [32:32] is the sub-list for extension type_name - 32, // [32:32] is the sub-list for extension extendee - 0, // [0:32] is the sub-list for field type_name + 45, // 0: aggregator.Checkin.status:type_name -> aggregator.Checkin.Status + 50, // 1: aggregator.CheckinResp.updated_at:type_name -> google.protobuf.Timestamp + 0, // 2: aggregator.SyncMessagesResp.op:type_name -> aggregator.MessageOp + 46, // 3: aggregator.SyncMessagesResp.task_metadata:type_name -> aggregator.SyncMessagesResp.TaskMetadata + 10, // 4: aggregator.TaskTrigger.fixed_time:type_name -> aggregator.FixedEpochCondition + 11, // 5: aggregator.TaskTrigger.cron:type_name -> aggregator.CronCondition + 12, // 6: aggregator.TaskTrigger.block:type_name -> aggregator.BlockCondition + 13, // 7: aggregator.TaskTrigger.event:type_name -> aggregator.EventCondition + 47, // 8: aggregator.GraphQLQueryNode.variables:type_name -> aggregator.GraphQLQueryNode.VariablesEntry + 48, // 9: aggregator.RestAPINode.headers:type_name -> aggregator.RestAPINode.HeadersEntry + 3, // 10: aggregator.CustomCodeNode.lang:type_name -> aggregator.CustomCodeLang + 21, // 11: aggregator.BranchNode.conditions:type_name -> aggregator.Condition + 15, // 12: aggregator.LoopNode.eth_transfer:type_name -> aggregator.ETHTransferNode + 16, // 13: aggregator.LoopNode.contract_write:type_name -> aggregator.ContractWriteNode + 17, // 14: aggregator.LoopNode.contract_read:type_name -> aggregator.ContractReadNode + 18, // 15: aggregator.LoopNode.graphql_data_query:type_name -> aggregator.GraphQLQueryNode + 19, // 16: aggregator.LoopNode.rest_api:type_name -> aggregator.RestAPINode + 20, // 17: aggregator.LoopNode.custom_code:type_name -> aggregator.CustomCodeNode + 15, // 18: aggregator.TaskNode.eth_transfer:type_name -> aggregator.ETHTransferNode + 16, // 19: aggregator.TaskNode.contract_write:type_name -> aggregator.ContractWriteNode + 17, // 20: aggregator.TaskNode.contract_read:type_name -> aggregator.ContractReadNode + 18, // 21: aggregator.TaskNode.graphql_data_query:type_name -> aggregator.GraphQLQueryNode + 19, // 22: aggregator.TaskNode.rest_api:type_name -> aggregator.RestAPINode + 22, // 23: aggregator.TaskNode.branch:type_name -> aggregator.BranchNode + 23, // 24: aggregator.TaskNode.filter:type_name -> aggregator.FilterNode + 24, // 25: aggregator.TaskNode.loop:type_name -> aggregator.LoopNode + 20, // 26: aggregator.TaskNode.custom_code:type_name -> aggregator.CustomCodeNode + 40, // 27: aggregator.Execution.trigger_mark:type_name -> aggregator.TriggerMark + 49, // 28: aggregator.Execution.steps:type_name -> aggregator.Execution.Step + 2, // 29: aggregator.Task.status:type_name -> aggregator.TaskStatus + 14, // 30: aggregator.Task.trigger:type_name -> aggregator.TaskTrigger + 26, // 31: aggregator.Task.nodes:type_name -> aggregator.TaskNode + 25, // 32: aggregator.Task.edges:type_name -> aggregator.TaskEdge + 27, // 33: aggregator.Task.executions:type_name -> aggregator.Execution + 14, // 34: aggregator.CreateTaskReq.trigger:type_name -> aggregator.TaskTrigger + 26, // 35: aggregator.CreateTaskReq.nodes:type_name -> aggregator.TaskNode + 25, // 36: aggregator.CreateTaskReq.edges:type_name -> aggregator.TaskEdge + 34, // 37: aggregator.ListWalletResp.wallets:type_name -> aggregator.SmartWallet + 28, // 38: aggregator.ListTasksResp.tasks:type_name -> aggregator.Task + 40, // 39: aggregator.NotifyTriggersReq.trigger_marker:type_name -> aggregator.TriggerMark + 50, // 40: aggregator.NotifyTriggersResp.updated_at:type_name -> google.protobuf.Timestamp + 50, // 41: aggregator.Checkin.Status.last_heartbeat:type_name -> google.protobuf.Timestamp + 14, // 42: aggregator.SyncMessagesResp.TaskMetadata.trigger:type_name -> aggregator.TaskTrigger + 38, // 43: aggregator.Aggregator.GetKey:input_type -> aggregator.GetKeyReq + 31, // 44: aggregator.Aggregator.GetNonce:input_type -> aggregator.NonceRequest + 43, // 45: aggregator.Aggregator.CreateWallet:input_type -> aggregator.CreateWalletReq + 33, // 46: aggregator.Aggregator.ListWallets:input_type -> aggregator.ListWalletReq + 29, // 47: aggregator.Aggregator.CreateTask:input_type -> aggregator.CreateTaskReq + 36, // 48: aggregator.Aggregator.ListTasks:input_type -> aggregator.ListTasksReq + 4, // 49: aggregator.Aggregator.GetTask:input_type -> aggregator.IdReq + 4, // 50: aggregator.Aggregator.CancelTask:input_type -> aggregator.IdReq + 4, // 51: aggregator.Aggregator.DeleteTask:input_type -> aggregator.IdReq + 5, // 52: aggregator.Node.Ping:input_type -> aggregator.Checkin + 7, // 53: aggregator.Node.SyncMessages:input_type -> aggregator.SyncMessagesReq + 9, // 54: aggregator.Node.Ack:input_type -> aggregator.AckMessageReq + 41, // 55: aggregator.Node.NotifyTriggers:input_type -> aggregator.NotifyTriggersReq + 39, // 56: aggregator.Aggregator.GetKey:output_type -> aggregator.KeyResp + 32, // 57: aggregator.Aggregator.GetNonce:output_type -> aggregator.NonceResp + 44, // 58: aggregator.Aggregator.CreateWallet:output_type -> aggregator.CreateWalletResp + 35, // 59: aggregator.Aggregator.ListWallets:output_type -> aggregator.ListWalletResp + 30, // 60: aggregator.Aggregator.CreateTask:output_type -> aggregator.CreateTaskResp + 37, // 61: aggregator.Aggregator.ListTasks:output_type -> aggregator.ListTasksResp + 28, // 62: aggregator.Aggregator.GetTask:output_type -> aggregator.Task + 51, // 63: aggregator.Aggregator.CancelTask:output_type -> google.protobuf.BoolValue + 51, // 64: aggregator.Aggregator.DeleteTask:output_type -> google.protobuf.BoolValue + 6, // 65: aggregator.Node.Ping:output_type -> aggregator.CheckinResp + 8, // 66: aggregator.Node.SyncMessages:output_type -> aggregator.SyncMessagesResp + 51, // 67: aggregator.Node.Ack:output_type -> google.protobuf.BoolValue + 42, // 68: aggregator.Node.NotifyTriggers:output_type -> aggregator.NotifyTriggersResp + 56, // [56:69] is the sub-list for method output_type + 43, // [43:56] is the sub-list for method input_type + 43, // [43:43] is the sub-list for extension type_name + 43, // [43:43] is the sub-list for extension extendee + 0, // [0:43] is the sub-list for field type_name } func init() { file_protobuf_avs_proto_init() } @@ -3370,7 +3944,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[3].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SyncTasksReq); i { + switch v := v.(*SyncMessagesReq); i { case 0: return &v.state case 1: @@ -3382,7 +3956,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FixedEpochCondition); i { + switch v := v.(*SyncMessagesResp); i { case 0: return &v.state case 1: @@ -3394,7 +3968,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CronCondition); i { + switch v := v.(*AckMessageReq); i { case 0: return &v.state case 1: @@ -3406,7 +3980,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BlockCondition); i { + switch v := v.(*FixedEpochCondition); i { case 0: return &v.state case 1: @@ -3418,7 +3992,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*EventCondition); i { + switch v := v.(*CronCondition); i { case 0: return &v.state case 1: @@ -3430,7 +4004,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TaskTrigger); i { + switch v := v.(*BlockCondition); i { case 0: return &v.state case 1: @@ -3442,7 +4016,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SyncTasksResp); i { + switch v := v.(*EventCondition); i { case 0: return &v.state case 1: @@ -3454,7 +4028,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ETHTransferNode); i { + switch v := v.(*TaskTrigger); i { case 0: return &v.state case 1: @@ -3466,7 +4040,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ContractWriteNode); i { + switch v := v.(*ETHTransferNode); i { case 0: return &v.state case 1: @@ -3478,7 +4052,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ContractReadNode); i { + switch v := v.(*ContractWriteNode); i { case 0: return &v.state case 1: @@ -3490,7 +4064,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GraphQLQueryNode); i { + switch v := v.(*ContractReadNode); i { case 0: return &v.state case 1: @@ -3502,7 +4076,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*RestAPINode); i { + switch v := v.(*GraphQLQueryNode); i { case 0: return &v.state case 1: @@ -3514,7 +4088,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CustomCodeNode); i { + switch v := v.(*RestAPINode); i { case 0: return &v.state case 1: @@ -3526,7 +4100,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Condition); i { + switch v := v.(*CustomCodeNode); i { case 0: return &v.state case 1: @@ -3538,7 +4112,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BranchNode); i { + switch v := v.(*Condition); i { case 0: return &v.state case 1: @@ -3550,7 +4124,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*FilterNode); i { + switch v := v.(*BranchNode); i { case 0: return &v.state case 1: @@ -3562,7 +4136,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*LoopNode); i { + switch v := v.(*FilterNode); i { case 0: return &v.state case 1: @@ -3574,7 +4148,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TaskEdge); i { + switch v := v.(*LoopNode); i { case 0: return &v.state case 1: @@ -3586,7 +4160,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TaskNode); i { + switch v := v.(*TaskEdge); i { case 0: return &v.state case 1: @@ -3598,7 +4172,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Execution); i { + switch v := v.(*TaskNode); i { case 0: return &v.state case 1: @@ -3610,7 +4184,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Task); i { + switch v := v.(*Execution); i { case 0: return &v.state case 1: @@ -3622,7 +4196,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateTaskReq); i { + switch v := v.(*Task); i { case 0: return &v.state case 1: @@ -3634,7 +4208,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateTaskResp); i { + switch v := v.(*CreateTaskReq); i { case 0: return &v.state case 1: @@ -3646,7 +4220,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NonceRequest); i { + switch v := v.(*CreateTaskResp); i { case 0: return &v.state case 1: @@ -3658,7 +4232,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NonceResp); i { + switch v := v.(*NonceRequest); i { case 0: return &v.state case 1: @@ -3670,7 +4244,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListWalletReq); i { + switch v := v.(*NonceResp); i { case 0: return &v.state case 1: @@ -3682,7 +4256,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SmartWallet); i { + switch v := v.(*ListWalletReq); i { case 0: return &v.state case 1: @@ -3694,7 +4268,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListWalletResp); i { + switch v := v.(*SmartWallet); i { case 0: return &v.state case 1: @@ -3706,7 +4280,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListTasksReq); i { + switch v := v.(*ListWalletResp); i { case 0: return &v.state case 1: @@ -3718,7 +4292,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListTasksResp); i { + switch v := v.(*ListTasksReq); i { case 0: return &v.state case 1: @@ -3730,7 +4304,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetKeyReq); i { + switch v := v.(*ListTasksResp); i { case 0: return &v.state case 1: @@ -3742,7 +4316,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*KeyResp); i { + switch v := v.(*GetKeyReq); i { case 0: return &v.state case 1: @@ -3754,7 +4328,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateChecksReq); i { + switch v := v.(*KeyResp); i { case 0: return &v.state case 1: @@ -3766,7 +4340,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[36].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateChecksResp); i { + switch v := v.(*TriggerMark); i { case 0: return &v.state case 1: @@ -3778,7 +4352,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[37].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateWalletReq); i { + switch v := v.(*NotifyTriggersReq); i { case 0: return &v.state case 1: @@ -3790,7 +4364,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[38].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateWalletResp); i { + switch v := v.(*NotifyTriggersResp); i { case 0: return &v.state case 1: @@ -3802,6 +4376,30 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[39].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateWalletReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protobuf_avs_proto_msgTypes[40].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*CreateWalletResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protobuf_avs_proto_msgTypes[41].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Checkin_Status); i { case 0: return &v.state @@ -3813,15 +4411,47 @@ func file_protobuf_avs_proto_init() { return nil } } + file_protobuf_avs_proto_msgTypes[42].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*SyncMessagesResp_TaskMetadata); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protobuf_avs_proto_msgTypes[45].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*Execution_Step); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } } - file_protobuf_avs_proto_msgTypes[8].OneofWrappers = []interface{}{ + file_protobuf_avs_proto_msgTypes[10].OneofWrappers = []interface{}{ (*TaskTrigger_Manual)(nil), (*TaskTrigger_FixedTime)(nil), (*TaskTrigger_Cron)(nil), (*TaskTrigger_Block)(nil), (*TaskTrigger_Event)(nil), } - file_protobuf_avs_proto_msgTypes[21].OneofWrappers = []interface{}{ + file_protobuf_avs_proto_msgTypes[20].OneofWrappers = []interface{}{ + (*LoopNode_EthTransfer)(nil), + (*LoopNode_ContractWrite)(nil), + (*LoopNode_ContractRead)(nil), + (*LoopNode_GraphqlDataQuery)(nil), + (*LoopNode_RestApi)(nil), + (*LoopNode_CustomCode)(nil), + } + file_protobuf_avs_proto_msgTypes[22].OneofWrappers = []interface{}{ (*TaskNode_EthTransfer)(nil), (*TaskNode_ContractWrite)(nil), (*TaskNode_ContractRead)(nil), @@ -3837,10 +4467,10 @@ func file_protobuf_avs_proto_init() { File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_protobuf_avs_proto_rawDesc, - NumEnums: 3, - NumMessages: 42, + NumEnums: 4, + NumMessages: 46, NumExtensions: 0, - NumServices: 1, + NumServices: 2, }, GoTypes: file_protobuf_avs_proto_goTypes, DependencyIndexes: file_protobuf_avs_proto_depIdxs, diff --git a/protobuf/avs.proto b/protobuf/avs.proto index 61bc670f..475e43f5 100644 --- a/protobuf/avs.proto +++ b/protobuf/avs.proto @@ -32,13 +32,42 @@ message CheckinResp { google.protobuf.Timestamp updated_at = 1; } -message SyncTasksReq { +message SyncMessagesReq { string id = 1; string address = 2; - string signature = 3; + bytes signature = 3; int64 monotonic_clock = 4; } +enum MessageOp { + Unset = 0; + MonitorTaskTrigger = 1; + CancelTask = 2; + DeleteTask = 3; + CompletedTask = 4; +} + +message SyncMessagesResp { + // message id is used to support dedup + string id = 1; + MessageOp op = 2; + + message TaskMetadata { + string task_id = 1; + // how many time this task can run + int64 remain = 2; + int64 expired_at = 3; + TaskTrigger trigger = 4; + }; + + TaskMetadata task_metadata = 3; +} + +message AckMessageReq { + string id = 1; +} + + message FixedEpochCondition { repeated int64 epochs = 1; } @@ -66,20 +95,21 @@ message EventCondition { } message TaskTrigger { + string name = 1; oneof trigger_type { - bool manual = 1; + bool manual = 2; // run at a specific epoch, name inspired by unix `at` utility - FixedEpochCondition fixed_time = 2; + FixedEpochCondition fixed_time = 3; // interval such as every hour/day/ etc can be converted to cronsyntax by the sdk/studio - CronCondition cron = 3; + CronCondition cron = 4; // currently the only support syntax is every blocks - BlockCondition block = 4; + BlockCondition block = 5; // support filter by event expression such as topic0, topic1, topoc2 and event_data and contract_address - EventCondition event = 5; + EventCondition event = 6; } } @@ -99,19 +129,11 @@ enum Error { SmartWalletNotFoundError = 6001; // Error occurs when we failed to migrate task data and it cannot be decode - TaskDataCorrupted = 7000; + TaskDataCorrupted = 7000; TaskDataMissingError = 7001; } -message SyncTasksResp { - string id = 1; - string checkType = 2; - - TaskTrigger trigger = 3; -} - - // TaskStatus represents status of the task. The transition is as follow enum TaskStatus { Active = 0; @@ -157,12 +179,12 @@ message RestAPINode { string method = 4; } -enum CustomCodeType { +enum CustomCodeLang { JavaScript = 0; } message CustomCodeNode { - CustomCodeType type = 1; + CustomCodeLang lang = 1; string source = 2; } @@ -183,9 +205,30 @@ message FilterNode { // LoopNode currently not support, but we pre-defined to reverse the field id message LoopNode { - // name the iteration key and value. - string iter_var = 1; - string iter_key = 2; + // this is the variable name of any previous step so we can took it + string input = 1; + + // a var that the function can refer to it + string iter_val = 2; + string iter_key = 3; + + + // inside the runner, it can access to the current value of the loop iteration through the iter_val/iter_key above + oneof runner { + // Transfer eth require no calldata etc, just a destination address and an eth amount to be sent + ETHTransferNode eth_transfer = 10; + + // Run one ore more contracts. The call call also be batched with tool like + // multicall to wrap many calls. in a contract write, we need to generate signature and send as userops. + ContractWriteNode contract_write = 11; + // read data fron a target contract + ContractReadNode contract_read = 12; + // Make call to a graphql endpoint + GraphQLQueryNode graphql_data_query = 13 ; + // Make call to a HTTP endpoint + RestAPINode rest_api = 14; + CustomCodeNode custom_code = 15; + } } // The edge is relationship or direct between node @@ -220,11 +263,25 @@ message TaskNode { CustomCodeNode custom_code = 18; } } - message Execution { - int64 epoch = 1; - string user_op_hash = 2; - string error = 3; + int64 epoch = 1; + bool success = 2; + string error = 3; + + TriggerMark trigger_mark = 4; + // final return data of the whole execution of the task + string result = 5; + + message Step { + string node_id = 1; + bool success = 2; + // serialize data of the result. This is the value that we bind to step variable in subsequent step + string output_data = 3; + string log = 4; + string error = 5; + } + + repeated Step steps = 6; } message Task { @@ -319,13 +376,22 @@ message KeyResp { string key=1; } -message UpdateChecksReq { + +message TriggerMark { + uint64 block_number = 1; + uint64 log_index = 2; + string tx_hash = 3; +} + +message NotifyTriggersReq { string address = 1; string signature = 2; - repeated string id = 3; + + string task_id = 3; + TriggerMark trigger_marker = 4; } -message UpdateChecksResp { +message NotifyTriggersResp { google.protobuf.Timestamp updated_at = 1; } @@ -356,9 +422,12 @@ service Aggregator { rpc GetTask(IdReq) returns (Task) {}; rpc CancelTask(IdReq) returns (google.protobuf.BoolValue) {}; rpc DeleteTask(IdReq) returns (google.protobuf.BoolValue) {}; +} +service Node { // Operator endpoint rpc Ping(Checkin) returns (CheckinResp) {}; - rpc SyncTasks(SyncTasksReq) returns (stream SyncTasksResp) {}; - rpc UpdateChecks(UpdateChecksReq) returns (UpdateChecksResp) {}; + rpc SyncMessages(SyncMessagesReq) returns (stream SyncMessagesResp) {}; + rpc Ack(AckMessageReq) returns (google.protobuf.BoolValue) {}; + rpc NotifyTriggers(NotifyTriggersReq) returns (NotifyTriggersResp) {}; } diff --git a/protobuf/avs_grpc.pb.go b/protobuf/avs_grpc.pb.go index dee5feac..243f5fb3 100644 --- a/protobuf/avs_grpc.pb.go +++ b/protobuf/avs_grpc.pb.go @@ -35,10 +35,6 @@ type AggregatorClient interface { GetTask(ctx context.Context, in *IdReq, opts ...grpc.CallOption) (*Task, error) CancelTask(ctx context.Context, in *IdReq, opts ...grpc.CallOption) (*wrapperspb.BoolValue, error) DeleteTask(ctx context.Context, in *IdReq, opts ...grpc.CallOption) (*wrapperspb.BoolValue, error) - // Operator endpoint - Ping(ctx context.Context, in *Checkin, opts ...grpc.CallOption) (*CheckinResp, error) - SyncTasks(ctx context.Context, in *SyncTasksReq, opts ...grpc.CallOption) (Aggregator_SyncTasksClient, error) - UpdateChecks(ctx context.Context, in *UpdateChecksReq, opts ...grpc.CallOption) (*UpdateChecksResp, error) } type aggregatorClient struct { @@ -130,56 +126,6 @@ func (c *aggregatorClient) DeleteTask(ctx context.Context, in *IdReq, opts ...gr return out, nil } -func (c *aggregatorClient) Ping(ctx context.Context, in *Checkin, opts ...grpc.CallOption) (*CheckinResp, error) { - out := new(CheckinResp) - err := c.cc.Invoke(ctx, "/aggregator.Aggregator/Ping", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - -func (c *aggregatorClient) SyncTasks(ctx context.Context, in *SyncTasksReq, opts ...grpc.CallOption) (Aggregator_SyncTasksClient, error) { - stream, err := c.cc.NewStream(ctx, &Aggregator_ServiceDesc.Streams[0], "/aggregator.Aggregator/SyncTasks", opts...) - if err != nil { - return nil, err - } - x := &aggregatorSyncTasksClient{stream} - if err := x.ClientStream.SendMsg(in); err != nil { - return nil, err - } - if err := x.ClientStream.CloseSend(); err != nil { - return nil, err - } - return x, nil -} - -type Aggregator_SyncTasksClient interface { - Recv() (*SyncTasksResp, error) - grpc.ClientStream -} - -type aggregatorSyncTasksClient struct { - grpc.ClientStream -} - -func (x *aggregatorSyncTasksClient) Recv() (*SyncTasksResp, error) { - m := new(SyncTasksResp) - if err := x.ClientStream.RecvMsg(m); err != nil { - return nil, err - } - return m, nil -} - -func (c *aggregatorClient) UpdateChecks(ctx context.Context, in *UpdateChecksReq, opts ...grpc.CallOption) (*UpdateChecksResp, error) { - out := new(UpdateChecksResp) - err := c.cc.Invoke(ctx, "/aggregator.Aggregator/UpdateChecks", in, out, opts...) - if err != nil { - return nil, err - } - return out, nil -} - // AggregatorServer is the server API for Aggregator service. // All implementations must embed UnimplementedAggregatorServer // for forward compatibility @@ -196,10 +142,6 @@ type AggregatorServer interface { GetTask(context.Context, *IdReq) (*Task, error) CancelTask(context.Context, *IdReq) (*wrapperspb.BoolValue, error) DeleteTask(context.Context, *IdReq) (*wrapperspb.BoolValue, error) - // Operator endpoint - Ping(context.Context, *Checkin) (*CheckinResp, error) - SyncTasks(*SyncTasksReq, Aggregator_SyncTasksServer) error - UpdateChecks(context.Context, *UpdateChecksReq) (*UpdateChecksResp, error) mustEmbedUnimplementedAggregatorServer() } @@ -234,15 +176,6 @@ func (UnimplementedAggregatorServer) CancelTask(context.Context, *IdReq) (*wrapp func (UnimplementedAggregatorServer) DeleteTask(context.Context, *IdReq) (*wrapperspb.BoolValue, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteTask not implemented") } -func (UnimplementedAggregatorServer) Ping(context.Context, *Checkin) (*CheckinResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method Ping not implemented") -} -func (UnimplementedAggregatorServer) SyncTasks(*SyncTasksReq, Aggregator_SyncTasksServer) error { - return status.Errorf(codes.Unimplemented, "method SyncTasks not implemented") -} -func (UnimplementedAggregatorServer) UpdateChecks(context.Context, *UpdateChecksReq) (*UpdateChecksResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method UpdateChecks not implemented") -} func (UnimplementedAggregatorServer) mustEmbedUnimplementedAggregatorServer() {} // UnsafeAggregatorServer may be embedded to opt out of forward compatibility for this service. @@ -418,119 +351,272 @@ func _Aggregator_DeleteTask_Handler(srv interface{}, ctx context.Context, dec fu return interceptor(ctx, in, info, handler) } -func _Aggregator_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { +// Aggregator_ServiceDesc is the grpc.ServiceDesc for Aggregator service. +// It's only intended for direct use with grpc.RegisterService, +// and not to be introspected or modified (even as a copy) +var Aggregator_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "aggregator.Aggregator", + HandlerType: (*AggregatorServer)(nil), + Methods: []grpc.MethodDesc{ + { + MethodName: "GetKey", + Handler: _Aggregator_GetKey_Handler, + }, + { + MethodName: "GetNonce", + Handler: _Aggregator_GetNonce_Handler, + }, + { + MethodName: "CreateWallet", + Handler: _Aggregator_CreateWallet_Handler, + }, + { + MethodName: "ListWallets", + Handler: _Aggregator_ListWallets_Handler, + }, + { + MethodName: "CreateTask", + Handler: _Aggregator_CreateTask_Handler, + }, + { + MethodName: "ListTasks", + Handler: _Aggregator_ListTasks_Handler, + }, + { + MethodName: "GetTask", + Handler: _Aggregator_GetTask_Handler, + }, + { + MethodName: "CancelTask", + Handler: _Aggregator_CancelTask_Handler, + }, + { + MethodName: "DeleteTask", + Handler: _Aggregator_DeleteTask_Handler, + }, + }, + Streams: []grpc.StreamDesc{}, + Metadata: "protobuf/avs.proto", +} + +// NodeClient is the client API for Node service. +// +// For semantics around ctx use and closing/ending streaming RPCs, please refer to https://pkg.go.dev/google.golang.org/grpc/?tab=doc#ClientConn.NewStream. +type NodeClient interface { + // Operator endpoint + Ping(ctx context.Context, in *Checkin, opts ...grpc.CallOption) (*CheckinResp, error) + SyncMessages(ctx context.Context, in *SyncMessagesReq, opts ...grpc.CallOption) (Node_SyncMessagesClient, error) + Ack(ctx context.Context, in *AckMessageReq, opts ...grpc.CallOption) (*wrapperspb.BoolValue, error) + NotifyTriggers(ctx context.Context, in *NotifyTriggersReq, opts ...grpc.CallOption) (*NotifyTriggersResp, error) +} + +type nodeClient struct { + cc grpc.ClientConnInterface +} + +func NewNodeClient(cc grpc.ClientConnInterface) NodeClient { + return &nodeClient{cc} +} + +func (c *nodeClient) Ping(ctx context.Context, in *Checkin, opts ...grpc.CallOption) (*CheckinResp, error) { + out := new(CheckinResp) + err := c.cc.Invoke(ctx, "/aggregator.Node/Ping", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *nodeClient) SyncMessages(ctx context.Context, in *SyncMessagesReq, opts ...grpc.CallOption) (Node_SyncMessagesClient, error) { + stream, err := c.cc.NewStream(ctx, &Node_ServiceDesc.Streams[0], "/aggregator.Node/SyncMessages", opts...) + if err != nil { + return nil, err + } + x := &nodeSyncMessagesClient{stream} + if err := x.ClientStream.SendMsg(in); err != nil { + return nil, err + } + if err := x.ClientStream.CloseSend(); err != nil { + return nil, err + } + return x, nil +} + +type Node_SyncMessagesClient interface { + Recv() (*SyncMessagesResp, error) + grpc.ClientStream +} + +type nodeSyncMessagesClient struct { + grpc.ClientStream +} + +func (x *nodeSyncMessagesClient) Recv() (*SyncMessagesResp, error) { + m := new(SyncMessagesResp) + if err := x.ClientStream.RecvMsg(m); err != nil { + return nil, err + } + return m, nil +} + +func (c *nodeClient) Ack(ctx context.Context, in *AckMessageReq, opts ...grpc.CallOption) (*wrapperspb.BoolValue, error) { + out := new(wrapperspb.BoolValue) + err := c.cc.Invoke(ctx, "/aggregator.Node/Ack", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +func (c *nodeClient) NotifyTriggers(ctx context.Context, in *NotifyTriggersReq, opts ...grpc.CallOption) (*NotifyTriggersResp, error) { + out := new(NotifyTriggersResp) + err := c.cc.Invoke(ctx, "/aggregator.Node/NotifyTriggers", in, out, opts...) + if err != nil { + return nil, err + } + return out, nil +} + +// NodeServer is the server API for Node service. +// All implementations must embed UnimplementedNodeServer +// for forward compatibility +type NodeServer interface { + // Operator endpoint + Ping(context.Context, *Checkin) (*CheckinResp, error) + SyncMessages(*SyncMessagesReq, Node_SyncMessagesServer) error + Ack(context.Context, *AckMessageReq) (*wrapperspb.BoolValue, error) + NotifyTriggers(context.Context, *NotifyTriggersReq) (*NotifyTriggersResp, error) + mustEmbedUnimplementedNodeServer() +} + +// UnimplementedNodeServer must be embedded to have forward compatible implementations. +type UnimplementedNodeServer struct { +} + +func (UnimplementedNodeServer) Ping(context.Context, *Checkin) (*CheckinResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method Ping not implemented") +} +func (UnimplementedNodeServer) SyncMessages(*SyncMessagesReq, Node_SyncMessagesServer) error { + return status.Errorf(codes.Unimplemented, "method SyncMessages not implemented") +} +func (UnimplementedNodeServer) Ack(context.Context, *AckMessageReq) (*wrapperspb.BoolValue, error) { + return nil, status.Errorf(codes.Unimplemented, "method Ack not implemented") +} +func (UnimplementedNodeServer) NotifyTriggers(context.Context, *NotifyTriggersReq) (*NotifyTriggersResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method NotifyTriggers not implemented") +} +func (UnimplementedNodeServer) mustEmbedUnimplementedNodeServer() {} + +// UnsafeNodeServer may be embedded to opt out of forward compatibility for this service. +// Use of this interface is not recommended, as added methods to NodeServer will +// result in compilation errors. +type UnsafeNodeServer interface { + mustEmbedUnimplementedNodeServer() +} + +func RegisterNodeServer(s grpc.ServiceRegistrar, srv NodeServer) { + s.RegisterService(&Node_ServiceDesc, srv) +} + +func _Node_Ping_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { in := new(Checkin) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(AggregatorServer).Ping(ctx, in) + return srv.(NodeServer).Ping(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/aggregator.Aggregator/Ping", + FullMethod: "/aggregator.Node/Ping", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AggregatorServer).Ping(ctx, req.(*Checkin)) + return srv.(NodeServer).Ping(ctx, req.(*Checkin)) } return interceptor(ctx, in, info, handler) } -func _Aggregator_SyncTasks_Handler(srv interface{}, stream grpc.ServerStream) error { - m := new(SyncTasksReq) +func _Node_SyncMessages_Handler(srv interface{}, stream grpc.ServerStream) error { + m := new(SyncMessagesReq) if err := stream.RecvMsg(m); err != nil { return err } - return srv.(AggregatorServer).SyncTasks(m, &aggregatorSyncTasksServer{stream}) + return srv.(NodeServer).SyncMessages(m, &nodeSyncMessagesServer{stream}) } -type Aggregator_SyncTasksServer interface { - Send(*SyncTasksResp) error +type Node_SyncMessagesServer interface { + Send(*SyncMessagesResp) error grpc.ServerStream } -type aggregatorSyncTasksServer struct { +type nodeSyncMessagesServer struct { grpc.ServerStream } -func (x *aggregatorSyncTasksServer) Send(m *SyncTasksResp) error { +func (x *nodeSyncMessagesServer) Send(m *SyncMessagesResp) error { return x.ServerStream.SendMsg(m) } -func _Aggregator_UpdateChecks_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UpdateChecksReq) +func _Node_Ack_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(AckMessageReq) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(AggregatorServer).UpdateChecks(ctx, in) + return srv.(NodeServer).Ack(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/aggregator.Aggregator/UpdateChecks", + FullMethod: "/aggregator.Node/Ack", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AggregatorServer).UpdateChecks(ctx, req.(*UpdateChecksReq)) + return srv.(NodeServer).Ack(ctx, req.(*AckMessageReq)) } return interceptor(ctx, in, info, handler) } -// Aggregator_ServiceDesc is the grpc.ServiceDesc for Aggregator service. +func _Node_NotifyTriggers_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(NotifyTriggersReq) + if err := dec(in); err != nil { + return nil, err + } + if interceptor == nil { + return srv.(NodeServer).NotifyTriggers(ctx, in) + } + info := &grpc.UnaryServerInfo{ + Server: srv, + FullMethod: "/aggregator.Node/NotifyTriggers", + } + handler := func(ctx context.Context, req interface{}) (interface{}, error) { + return srv.(NodeServer).NotifyTriggers(ctx, req.(*NotifyTriggersReq)) + } + return interceptor(ctx, in, info, handler) +} + +// Node_ServiceDesc is the grpc.ServiceDesc for Node service. // It's only intended for direct use with grpc.RegisterService, // and not to be introspected or modified (even as a copy) -var Aggregator_ServiceDesc = grpc.ServiceDesc{ - ServiceName: "aggregator.Aggregator", - HandlerType: (*AggregatorServer)(nil), +var Node_ServiceDesc = grpc.ServiceDesc{ + ServiceName: "aggregator.Node", + HandlerType: (*NodeServer)(nil), Methods: []grpc.MethodDesc{ { - MethodName: "GetKey", - Handler: _Aggregator_GetKey_Handler, - }, - { - MethodName: "GetNonce", - Handler: _Aggregator_GetNonce_Handler, - }, - { - MethodName: "CreateWallet", - Handler: _Aggregator_CreateWallet_Handler, - }, - { - MethodName: "ListWallets", - Handler: _Aggregator_ListWallets_Handler, - }, - { - MethodName: "CreateTask", - Handler: _Aggregator_CreateTask_Handler, - }, - { - MethodName: "ListTasks", - Handler: _Aggregator_ListTasks_Handler, - }, - { - MethodName: "GetTask", - Handler: _Aggregator_GetTask_Handler, - }, - { - MethodName: "CancelTask", - Handler: _Aggregator_CancelTask_Handler, - }, - { - MethodName: "DeleteTask", - Handler: _Aggregator_DeleteTask_Handler, + MethodName: "Ping", + Handler: _Node_Ping_Handler, }, { - MethodName: "Ping", - Handler: _Aggregator_Ping_Handler, + MethodName: "Ack", + Handler: _Node_Ack_Handler, }, { - MethodName: "UpdateChecks", - Handler: _Aggregator_UpdateChecks_Handler, + MethodName: "NotifyTriggers", + Handler: _Node_NotifyTriggers_Handler, }, }, Streams: []grpc.StreamDesc{ { - StreamName: "SyncTasks", - Handler: _Aggregator_SyncTasks_Handler, + StreamName: "SyncMessages", + Handler: _Node_SyncMessages_Handler, ServerStreams: true, }, },