diff --git a/aggregator/aggregator.go b/aggregator/aggregator.go index 21c4767..e997a68 100644 --- a/aggregator/aggregator.go +++ b/aggregator/aggregator.go @@ -149,9 +149,7 @@ func NewAggregator(c *config.Config) (*Aggregator, error) { // Open and setup our database func (agg *Aggregator) initDB(ctx context.Context) error { var err error - agg.db, err = storage.New(&storage.Config{ - Path: agg.config.DbPath, - }) + agg.db, err = storage.NewWithPath(agg.config.DbPath) if err != nil { panic(err) diff --git a/aggregator/auth.go b/aggregator/auth.go index 2c31777..eb3fb3a 100644 --- a/aggregator/auth.go +++ b/aggregator/auth.go @@ -3,12 +3,10 @@ package aggregator import ( "context" "fmt" - "math/big" "strings" "time" "github.com/AvaProtocol/ap-avs/core/auth" - "github.com/AvaProtocol/ap-avs/core/chainio/aa" "github.com/AvaProtocol/ap-avs/model" avsproto "github.com/AvaProtocol/ap-avs/protobuf" "github.com/ethereum/go-ethereum/accounts" @@ -131,11 +129,9 @@ func (r *RpcServer) verifyAuth(ctx context.Context) (*model.User, error) { Address: common.HexToAddress(claims["sub"].(string)), } - smartAccountAddress, err := aa.GetSenderAddress(r.ethrpc, user.Address, big.NewInt(0)) - if err != nil { + if err := user.LoadDefaultSmartWallet(r.smartWalletRpc); err != nil { return nil, fmt.Errorf("Rpc error") } - user.SmartAccountAddress = smartAccountAddress return &user, nil } diff --git a/aggregator/repl.go b/aggregator/repl.go index aa5af5b..df0ab56 100644 --- a/aggregator/repl.go +++ b/aggregator/repl.go @@ -19,9 +19,18 @@ func (agg *Aggregator) stopRepl() { } } + +// Repl allow an operator to look into node storage directly with a REPL interface. +// It doesn't listen via TCP socket but directly unix socket on file system. func (agg *Aggregator) startRepl() { var err error + + if _, err := os.Stat(agg.config.SocketPath); err == nil { + // File exists, most likely result of a previous crash without cleaning, attempt to delete + os.Remove(agg.config.SocketPath) + } repListener, err = net.Listen("unix", agg.config.SocketPath) + if err != nil { return } @@ -48,6 +57,7 @@ func handleConnection(agg *Aggregator, conn net.Conn) { reader := bufio.NewReader(conn) fmt.Fprintln(conn, "AP CLI REPL") + fmt.Fprintln(conn, "Use `list *` to list key, `get ` to inspect content ") fmt.Fprintln(conn, "-------------------------") for { diff --git a/aggregator/rpc_server.go b/aggregator/rpc_server.go index 75aa9d1..da09949 100644 --- a/aggregator/rpc_server.go +++ b/aggregator/rpc_server.go @@ -164,7 +164,7 @@ func (r *RpcServer) GetTask(ctx context.Context, taskID *avsproto.UUID) (*avspro "taskID", string(taskID.Bytes), ) - task, err := r.engine.GetTaskByUser(user, string(taskID.Bytes)) + task, err := r.engine.GetTask(user, string(taskID.Bytes)) if err != nil { return nil, err } diff --git a/core/taskengine/engine.go b/core/taskengine/engine.go index 0b8245e..6d73ffb 100644 --- a/core/taskengine/engine.go +++ b/core/taskengine/engine.go @@ -6,6 +6,7 @@ import ( "fmt" "math/big" "strconv" + "strings" "sync" "time" @@ -220,6 +221,7 @@ func (n *Engine) CreateSmartWallet(user *model.User, payload *avsproto.CreateWal func (n *Engine) CreateTask(user *model.User, taskPayload *avsproto.CreateTaskReq) (*model.Task, error) { var err error + fmt.Println("user", user) if taskPayload.SmartWalletAddress != "" { if !ValidWalletAddress(taskPayload.SmartWalletAddress) { return nil, status.Errorf(codes.InvalidArgument, InvalidSmartAccountAddressError) @@ -232,7 +234,7 @@ func (n *Engine) CreateTask(user *model.User, taskPayload *avsproto.CreateTaskRe task, err := model.NewTaskFromProtobuf(user, taskPayload) if err != nil { - return nil, err + return nil, status.Errorf(codes.Code(avsproto.Error_TaskDataMissingError), err.Error()) } updates := map[string][]byte{} @@ -349,19 +351,21 @@ func (n *Engine) AggregateChecksResult(address string, ids []string) error { func (n *Engine) ListTasksByUser(user *model.User, payload *avsproto.ListTasksReq) ([]*avsproto.Task, error) { // by default show the task from the default smart wallet, if proving we look into that wallet specifically owner := user.SmartAccountAddress - if payload.SmartWalletAddress != "" { - if !ValidWalletAddress(payload.SmartWalletAddress) { - return nil, status.Errorf(codes.InvalidArgument, InvalidSmartAccountAddressError) - } + if payload.SmartWalletAddress == "" { + return nil, status.Errorf(codes.InvalidArgument, MissingSmartWalletAddressError) + } - if valid, _ := ValidWalletOwner(n.db, user, common.HexToAddress(payload.SmartWalletAddress)); !valid { - return nil, status.Errorf(codes.InvalidArgument, InvalidSmartAccountAddressError) - } + if !ValidWalletAddress(payload.SmartWalletAddress) { + return nil, status.Errorf(codes.InvalidArgument, InvalidSmartAccountAddressError) + } - smartWallet := common.HexToAddress(payload.SmartWalletAddress) - owner = &smartWallet + if valid, _ := ValidWalletOwner(n.db, user, common.HexToAddress(payload.SmartWalletAddress)); !valid { + return nil, status.Errorf(codes.InvalidArgument, InvalidSmartAccountAddressError) } + smartWallet := common.HexToAddress(payload.SmartWalletAddress) + owner = &smartWallet + taskIDs, err := n.db.GetByPrefix(SmartWalletTaskStoragePrefix(user.Address, *owner)) if err != nil { @@ -377,13 +381,11 @@ func (n *Engine) ListTasksByUser(user *model.User, payload *avsproto.ListTasksRe continue } - task := &model.Task{ - ID: taskID, - Owner: user.Address.Hex(), - } + task := model.NewTask() if err := task.FromStorageData(taskRawByte); err != nil { continue } + task.ID = taskID tasks[i], _ = task.ToProtoBuf() } @@ -391,39 +393,38 @@ func (n *Engine) ListTasksByUser(user *model.User, payload *avsproto.ListTasksRe return tasks, nil } -func (n *Engine) GetTaskByUser(user *model.User, taskID string) (*model.Task, error) { - task := &model.Task{ - ID: taskID, - Owner: user.Address.Hex(), - } - - // Get Task Status - rawStatus, err := n.db.GetKey([]byte(TaskUserKey(task))) - if err != nil { - return nil, grpcstatus.Errorf(codes.NotFound, TaskNotFoundError) - } - status, _ := strconv.Atoi(string(rawStatus)) +func (n *Engine) GetTaskByID(taskID string) (*model.Task, error) { + for status, _ := range avsproto.TaskStatus_name { + if rawTaskData, err := n.db.GetKey(TaskStorageKey(taskID, avsproto.TaskStatus(status))); err == nil { + task := model.NewTask() + err = task.FromStorageData(rawTaskData) - taskRawByte, err := n.db.GetKey(TaskStorageKey(taskID, avsproto.TaskStatus(status))) + if err == nil { + return task, nil + } - if err != nil { - taskRawByte, err = n.db.GetKey([]byte( - TaskStorageKey(taskID, avsproto.TaskStatus_Executing), - )) - if err != nil { return nil, grpcstatus.Errorf(codes.Code(avsproto.Error_TaskDataCorrupted), TaskStorageCorruptedError) } } - err = task.FromStorageData(taskRawByte) + return nil, grpcstatus.Errorf(codes.NotFound, TaskNotFoundError) +} + +func (n *Engine) GetTask(user *model.User, taskID string) (*model.Task, error) { + task, err := n.GetTaskByID(taskID) if err != nil { - return nil, grpcstatus.Errorf(codes.Code(avsproto.Error_TaskDataCorrupted), TaskStorageCorruptedError) + return nil, err + } + + if strings.ToLower(task.Owner) != strings.ToLower(user.Address.Hex()) { + return nil, grpcstatus.Errorf(codes.NotFound, TaskNotFoundError) } + return task, nil } func (n *Engine) DeleteTaskByUser(user *model.User, taskID string) (bool, error) { - task, err := n.GetTaskByUser(user, taskID) + task, err := n.GetTask(user, taskID) if err != nil { return false, grpcstatus.Errorf(codes.NotFound, TaskNotFoundError) @@ -440,7 +441,7 @@ func (n *Engine) DeleteTaskByUser(user *model.User, taskID string) (bool, error) } func (n *Engine) CancelTaskByUser(user *model.User, taskID string) (bool, error) { - task, err := n.GetTaskByUser(user, taskID) + task, err := n.GetTask(user, taskID) if err != nil { return false, grpcstatus.Errorf(codes.NotFound, TaskNotFoundError) diff --git a/core/taskengine/errors.go b/core/taskengine/errors.go index 37ae1aa..fa4395e 100644 --- a/core/taskengine/errors.go +++ b/core/taskengine/errors.go @@ -9,6 +9,8 @@ const ( SmartAccountCreationError = "cannot determine smart wallet address" NonceFetchingError = "cannot determine nonce for smart wallet" + MissingSmartWalletAddressError = "Missing smart_wallet_address" + StorageUnavailableError = "storage is not ready" StorageWriteError = "cannot write to storage" diff --git a/core/taskengine/processor.go b/core/taskengine/processor.go index 8c5ea99..39f7ab2 100644 --- a/core/taskengine/processor.go +++ b/core/taskengine/processor.go @@ -82,7 +82,8 @@ func (c *ContractProcessor) Perform(job *apqueue.Job) error { // Process entrypoint node, then from the next pointer, and flow of the node, we will follow the chain of execution action := task.Nodes[0] - if action.ContractExecution == nil { + // TODO: move to vm.go + if action.GetContractWrite() == nil { err := fmt.Errorf("invalid task action") task.AppendExecution(currentTime.Unix(), "", err) task.SetFailed() @@ -90,9 +91,9 @@ func (c *ContractProcessor) Perform(job *apqueue.Job) error { } userOpCalldata, e := aa.PackExecute( - common.HexToAddress(action.ContractExecution.ContractAddress), + common.HexToAddress(action.GetContractWrite().ContractAddress), big.NewInt(0), - common.FromHex(action.ContractExecution.CallData), + common.FromHex(action.GetContractWrite().CallData), ) //calldata := common.FromHex("b61d27f600000000000000000000000069256ca54e6296e460dec7b29b7dcd97b81a3d55000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000000600000000000000000000000000000000000000000000000000000000000000044a9059cbb000000000000000000000000e0f7d11fd714674722d325cd86062a5f1882e13a0000000000000000000000000000000000000000000000001bc16d674ec8000000000000000000000000000000000000000000000000000000000000") diff --git a/core/taskengine/schema.go b/core/taskengine/schema.go index ad028ed..29ff4aa 100644 --- a/core/taskengine/schema.go +++ b/core/taskengine/schema.go @@ -53,6 +53,12 @@ func TaskUserKey(t *model.Task) []byte { )) } +// Convert task status gRPC enum into the storage prefix +// c: completed. task is completed and no longer being check for trigger anymore +// f: failed. task is failed to executed, and no longer being check for trigger anymore +// x: executing. task is being execured currently. +// l: cancelled. task is cancelled by user, no longer being check for trigger +// a: actived. task is actived, and will be checked for triggering. task may had executed zero or more time depend on repeatable or not func TaskStatusToStorageKey(v avsproto.TaskStatus) string { switch v { case 1: diff --git a/core/taskengine/testutil.go b/core/taskengine/testutil.go new file mode 100644 index 0000000..2fdd288 --- /dev/null +++ b/core/taskengine/testutil.go @@ -0,0 +1,20 @@ +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/validation.go b/core/taskengine/validation.go index 6ea5546..89f4e31 100644 --- a/core/taskengine/validation.go +++ b/core/taskengine/validation.go @@ -12,7 +12,7 @@ func ValidWalletAddress(address string) bool { func ValidWalletOwner(db storage.Storage, u *model.User, smartWalletAddress common.Address) (bool, error) { // the smart wallet adress is the default one - if u.Address.Hex() == smartWalletAddress.Hex() { + if u.SmartAccountAddress.Hex() == smartWalletAddress.Hex() { return true, nil } diff --git a/core/taskengine/validation_test.go b/core/taskengine/validation_test.go new file mode 100644 index 0000000..3813176 --- /dev/null +++ b/core/taskengine/validation_test.go @@ -0,0 +1,50 @@ +package taskengine + +import ( + "testing" + + "github.com/AvaProtocol/ap-avs/model" + "github.com/AvaProtocol/ap-avs/storage" + "github.com/ethereum/go-ethereum/common" +) + +func TestWalletOwnerReturnTrueForDefaultAddress(t *testing.T) { + smartAddress := common.HexToAddress("0x5Df343de7d99fd64b2479189692C1dAb8f46184a") + + result, err := ValidWalletOwner(nil, &model.User{ + Address: common.HexToAddress("0xe272b72E51a5bF8cB720fc6D6DF164a4D5E321C5"), + SmartAccountAddress: &smartAddress, + }, common.HexToAddress("0x5Df343de7d99fd64b2479189692C1dAb8f46184a")) + + if !result || err != nil { + t.Errorf("expect true, got false") + } +} + +func TestWalletOwnerReturnTrueForNonDefaultAddress(t *testing.T) { + db := TestMustDB() + defer storage.Destroy(db.(*storage.BadgerStorage)) + + eoa := common.HexToAddress("0xe272b72E51a5bF8cB720fc6D6DF164a4D5E321C5") + defaultSmartWallet := common.HexToAddress("0x5Df343de7d99fd64b2479189692C1dAb8f46184a") + customSmartWallet := common.HexToAddress("0xdD85693fd14b522a819CC669D6bA388B4FCd158d") + + result, err := ValidWalletOwner(db, &model.User{ + Address: eoa, + SmartAccountAddress: &defaultSmartWallet, + }, customSmartWallet) + if result == true { + t.Errorf("expect 0xdD85693fd14b522a819CC669D6bA388B4FCd158d not owned by 0xe272b72E51a5bF8cB720fc6D6DF164a4D5E321C5, got true") + } + + // setup wallet binding + db.Set([]byte(WalletStorageKey(eoa, customSmartWallet.Hex())), []byte("1")) + + result, err = ValidWalletOwner(db, &model.User{ + Address: eoa, + SmartAccountAddress: &defaultSmartWallet, + }, customSmartWallet) + if !result || err != nil { + t.Errorf("expect 0xdD85693fd14b522a819CC669D6bA388B4FCd158d owned by 0xe272b72E51a5bF8cB720fc6D6DF164a4D5E321C5, got false") + } +} diff --git a/core/taskengine/vm.go b/core/taskengine/vm.go new file mode 100644 index 0000000..dcd181b --- /dev/null +++ b/core/taskengine/vm.go @@ -0,0 +1,5 @@ +package taskengine + +// The VM is the core component that load the node information and execute them, yield finaly result +type VM struct { +} diff --git a/examples/README.md b/examples/README.md index 340605b..a824694 100644 --- a/examples/README.md +++ b/examples/README.md @@ -1,4 +1,37 @@ -# Ava Protocol Example +# Ava Protocol Examples -Example code on how to interact with Ava Protocol RPC server to create and -manage task. +Example codes on how to interact with Ava Protocol RPC server to create and +manage tasks. + +Examples weren't written to be parameterized or extensible. Its only purpose +is to show how to run a specific example, and allow the audience to see +how the code will look like. + +Therefore, the script is harded coded, there is no parameter to provide or anything. + +If you need to change a parameter for a test, edit the code and re-run it. + +# Available example + +## Prepare depedencies + +``` +npm ci +``` + +Then run: + +``` +node example.js +``` + +it will list all available action to run. + +## Setting env + +``` +export env= +export PRIVATE_KEY= +``` + +The test example using a dummy token which anyone can mint https://sepolia.etherscan.io/address/0x2e8bdb63d09ef989a0018eeb1c47ef84e3e61f7b#writeProxyContract diff --git a/examples/example.js b/examples/example.js index 81e8138..0d2acdc 100644 --- a/examples/example.js +++ b/examples/example.js @@ -3,6 +3,7 @@ const grpc = require("@grpc/grpc-js"); const protoLoader = require("@grpc/proto-loader"); const { ethers } = require("ethers"); const { Wallet } = ethers; +const { UlidMonotonic } = require('id128'); const { TaskType, TriggerType } = require("./static_codegen/avs_pb"); @@ -112,7 +113,11 @@ async function listTask(owner, token) { smart_wallet_address: process.argv[3] }, metadata); - console.log("Tasks that has created by", process.argv[3], "\n", result); + console.log(`Found ${result.tasks.length} tasks created by`, process.argv[3]); + + for (const item of result.tasks) { + console.log("\n\ntask id:", item.id, "taskdata", item,"\n=================================\n"); + } } async function getTask(owner, token, taskId) { @@ -236,9 +241,13 @@ const main = async (cmd) => { case "create-wallet": salt = process.argv[3] || 0; let smartWalletAddress = await createWallet(owner, token, process.argv[3], process.argv[4]); - console.log("inside vm", smartWalletAddress) + console.log("generated smart wallet", smartWalletAddress) break; case "schedule": + case "schedule-cron": + case "schedule-event": + case "schedule-fixed": + case "schedule-manual": // ETH-USD pair on sepolia // https://sepolia.etherscan.io/address/0x694AA1769357215DE4FAC081bf1f309aDC325306#code // The price return is big.Int so we have to use the cmp function to compare @@ -311,12 +320,13 @@ const main = async (cmd) => { default: console.log(`Usage: - create-wallet : to create a smart wallet with a salt, and optionally a factory contract - wallet: to find smart wallet address for this eoa - tasks: to find all tasks - get : to get task detail - schedule: to schedule a task with chainlink eth-usd its condition will be matched quickly - schedule2: to schedule a task with chainlink that has a very high price target + create-wallet : to create a smart wallet with a salt, and optionally a factory contract + wallet: to list smart wallet address that has been created. note that a default wallet with salt=0 will automatically created + tasks : to list all tasks of given smart wallet address + get : to get task detail. a permission error is throw if the eoa isn't the smart wallet owner. + schedule : to schedule a task that run on every block, with chainlink eth-usd its condition will be matched quickly + 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 cancel : to cancel a task delete : to completely remove a task`); @@ -342,6 +352,12 @@ async function scheduleERC20TransferJob(owner, token, taskCondition) { // Now we can schedule a task // 1. Generate the calldata to check condition const taskBody = getTaskData(); + const smartWalletAddress = process.argv[3]; + if (!smartWalletAddress) { + console.log("invalid smart wallet address. check usage"); + return + } + console.log("\n\nTask body:", taskBody); console.log("\n\nTask condition:", taskCondition); @@ -351,31 +367,96 @@ async function scheduleERC20TransferJob(owner, token, taskCondition) { console.log("Trigger type", TriggerType.EXPRESSIONTRIGGER); + let trigger = { + trigger_type: TriggerType.BLOCKTRIGGER, + block: { + interval: 5, // run every 5 block + }, + }; + + if (process.argv[2] == "schedule-cron") { + trigger = { + trigger_type: TriggerType.TIMETRIGGER, + cron: { + cron_table: [ + // every 5 hours + "0 */5 * * *", + ], + }, + } + } else if (process.argv[2] == "schedule-event") { + trigger = { + trigger_type: TriggerType.EVENTTRIGGER, + event: { + expression: taskCondition, + } + } + } else if (process.argv[2] == "schedule-fixed") { + trigger = { + trigger_type: TriggerType.FIXEDEPOCHTRIGGER, + at: { + epoches: [Math.floor(new Date().getTime() / 1000 + 3600 ), Math.floor(new Date().getTime() / 1000 + 7200 )] + } + } + } else if (process.argv[2] == "schedule-manual") { + trigger = { + trigger_type: TriggerType.MANUALTRIGGER, + manual: true, + } + } + + const nodeIdOraclePrice = UlidMonotonic.generate().toCanonical(); + const nodeIdTransfer = UlidMonotonic.generate().toCanonical(); + const nodeIdNotification = UlidMonotonic.generate().toCanonical(); + const result = await asyncRPC( client, 'CreateTask', { - // salt = 0 - //smart_wallet_address: "0x5Df343de7d99fd64b2479189692C1dAb8f46184a", - smart_wallet_address: "0xdD85693fd14b522a819CC669D6bA388B4FCd158d", - actions: [{ - task_type: TaskType.CONTRACTEXECUTIONTASK, - // id need to be unique - id: 'transfer_erc20_1', - // name is for our note only - name: 'Transfer Test Token', - contract_execution: { + smart_wallet_address: smartWalletAddress, + nodes: [{ + task_type: TaskType.BRANCHTASK, + id: nodeIdOraclePrice, + name: 'check price', + branch: { + "if": { + expression: `bigCmp(priceChainlink("${config[env].ORACLE_PRICE_CONTRACT}"),toBigInt("10000") > 0`, + next: 'transfer_erc20_1' + } + } + }, { + task_type: TaskType.CONTRACTWRITETASK, + // id need to be unique. it will be assign to the variable + id: nodeIdTransfer, + // name is for our note only. use for display a humand friendly version + name: 'transfer token', + contract_write: { // Our ERC20 test token contract_address: config[env].TEST_TRANSFER_TOKEN, call_data: taskBody, } - }], - trigger: { - trigger_type: TriggerType.EXPRESSIONTRIGGER, - expression: { - expression: taskCondition, + }, { + task_type: TaskType.RESTAPITASK, + id: nodeIdNotification, + name: 'notification', + rest_api: { + url: "https://webhook.site/fd02e579-a58c-4dbd-8a74-0afa399c0912", } - }, + }], + + 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: nodeIdOraclePrice, + }, { + id: UlidMonotonic.generate().toCanonical(), + // __trigger__ is a special node. It doesn't appear directly in the task nodes, but it should be draw on the UI to show what is the entrypoint + source: nodeIdOraclePrice, + target: nodeIdNotification, + }], + + trigger, start_at: Math.floor(Date.now() / 1000) + 30, expired_at: Math.floor(Date.now() / 1000 + 3600 * 24 * 30), memo: `Demo Example task for ${owner}`, @@ -414,10 +495,17 @@ async function scheduleTimeTransfer(owner, token) { }, }], trigger: { - trigger_type: TriggerType.TIMETRIGGER, - schedule: { - cron: "*/2 * * * *", + //trigger_type: TriggerType.TIMETRIGGER, + //schedule: { + // cron: "*/2 * * * *", + //}, + + trigger_type: TriggerType.EVENTTRIGGER, + event: { + expression: `topic0 == "123" && topic2 == "334"`, }, + + }, start_at: Math.floor(Date.now() / 1000) + 30, diff --git a/examples/package-lock.json b/examples/package-lock.json index 81be73d..6ddccb2 100644 --- a/examples/package-lock.json +++ b/examples/package-lock.json @@ -15,6 +15,7 @@ "ethers": "^6.13.2", "google-protobuf": "^3.21.4", "grpc-tools": "^1.12.4", + "id128": "^1.6.6", "keccak256": "^1.0.6", "lodash": "^4.17.21", "secp256k1": "^5.0.0" @@ -557,6 +558,14 @@ "node": ">= 6" } }, + "node_modules/id128": { + "version": "1.6.6", + "resolved": "https://registry.npmjs.org/id128/-/id128-1.6.6.tgz", + "integrity": "sha512-ExSXL9qcyQ7X/AfyO4ouARLnztm7Nmry1rwGi1nbrtSM90tjjqKzeMKqJfkw5bDdDX7XqdXIRzYYkVj5PU28Hg==", + "engines": { + "node": ">=v6.9.0" + } + }, "node_modules/ieee754": { "version": "1.2.1", "resolved": "https://registry.npmjs.org/ieee754/-/ieee754-1.2.1.tgz", diff --git a/examples/package.json b/examples/package.json index e08db49..fa68984 100644 --- a/examples/package.json +++ b/examples/package.json @@ -17,6 +17,7 @@ "ethers": "^6.13.2", "google-protobuf": "^3.21.4", "grpc-tools": "^1.12.4", + "id128": "^1.6.6", "keccak256": "^1.0.6", "lodash": "^4.17.21", "secp256k1": "^5.0.0" diff --git a/examples/static_codegen/avs_grpc_pb.js b/examples/static_codegen/avs_grpc_pb.js index 5566222..ed3ab4b 100644 --- a/examples/static_codegen/avs_grpc_pb.js +++ b/examples/static_codegen/avs_grpc_pb.js @@ -72,6 +72,28 @@ function deserialize_aggregator_CreateTaskResp(buffer_arg) { return avs_pb.CreateTaskResp.deserializeBinary(new Uint8Array(buffer_arg)); } +function serialize_aggregator_CreateWalletReq(arg) { + if (!(arg instanceof avs_pb.CreateWalletReq)) { + throw new Error('Expected argument of type aggregator.CreateWalletReq'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_aggregator_CreateWalletReq(buffer_arg) { + return avs_pb.CreateWalletReq.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_aggregator_CreateWalletResp(arg) { + if (!(arg instanceof avs_pb.CreateWalletResp)) { + throw new Error('Expected argument of type aggregator.CreateWalletResp'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_aggregator_CreateWalletResp(buffer_arg) { + return avs_pb.CreateWalletResp.deserializeBinary(new Uint8Array(buffer_arg)); +} + function serialize_aggregator_GetKeyReq(arg) { if (!(arg instanceof avs_pb.GetKeyReq)) { throw new Error('Expected argument of type aggregator.GetKeyReq'); @@ -253,7 +275,18 @@ getNonce: { responseDeserialize: deserialize_aggregator_AddressResp, }, // Task Management -createTask: { +createWallet: { + path: '/aggregator.Aggregator/CreateWallet', + requestStream: false, + responseStream: false, + requestType: avs_pb.CreateWalletReq, + responseType: avs_pb.CreateWalletResp, + requestSerialize: serialize_aggregator_CreateWalletReq, + requestDeserialize: deserialize_aggregator_CreateWalletReq, + responseSerialize: serialize_aggregator_CreateWalletResp, + responseDeserialize: deserialize_aggregator_CreateWalletResp, + }, + createTask: { path: '/aggregator.Aggregator/CreateTask', requestStream: false, responseStream: false, diff --git a/examples/static_codegen/avs_pb.js b/examples/static_codegen/avs_pb.js index 55fe1bb..d3115be 100644 --- a/examples/static_codegen/avs_pb.js +++ b/examples/static_codegen/avs_pb.js @@ -27,37 +27,46 @@ var google_protobuf_wrappers_pb = require('google-protobuf/google/protobuf/wrapp goog.object.extend(proto, google_protobuf_wrappers_pb); goog.exportSymbol('proto.aggregator.AddressRequest', null, global); goog.exportSymbol('proto.aggregator.AddressResp', null, global); -goog.exportSymbol('proto.aggregator.BranchAction', null, global); +goog.exportSymbol('proto.aggregator.BlockCondition', null, global); +goog.exportSymbol('proto.aggregator.BranchNode', null, global); goog.exportSymbol('proto.aggregator.Checkin', null, global); goog.exportSymbol('proto.aggregator.Checkin.Status', null, global); goog.exportSymbol('proto.aggregator.CheckinResp', null, global); goog.exportSymbol('proto.aggregator.ConditionJump', null, global); -goog.exportSymbol('proto.aggregator.ContractExecution', null, global); -goog.exportSymbol('proto.aggregator.ContractQueryCondition', null, global); +goog.exportSymbol('proto.aggregator.ContractQueryNode', null, global); +goog.exportSymbol('proto.aggregator.ContractWriteNode', null, global); goog.exportSymbol('proto.aggregator.CreateTaskReq', null, global); goog.exportSymbol('proto.aggregator.CreateTaskResp', null, global); -goog.exportSymbol('proto.aggregator.CustomCode', 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.CustomCodeNode', null, global); goog.exportSymbol('proto.aggregator.CustomCodeType', null, global); -goog.exportSymbol('proto.aggregator.ETHTransfer', 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.ExpressionCondition', null, global); +goog.exportSymbol('proto.aggregator.FilterNode', null, global); +goog.exportSymbol('proto.aggregator.FixedEpochCondition', null, global); goog.exportSymbol('proto.aggregator.GetKeyReq', null, global); -goog.exportSymbol('proto.aggregator.GraphQLDataQuery', null, global); -goog.exportSymbol('proto.aggregator.HTTPAPICall', null, global); +goog.exportSymbol('proto.aggregator.GraphQLQueryNode', null, global); goog.exportSymbol('proto.aggregator.KeyResp', null, global); goog.exportSymbol('proto.aggregator.ListTasksReq', null, global); goog.exportSymbol('proto.aggregator.ListTasksResp', null, global); -goog.exportSymbol('proto.aggregator.ListTasksResp.TaskItemResp', null, global); goog.exportSymbol('proto.aggregator.NonceRequest', null, global); goog.exportSymbol('proto.aggregator.NonceResp', 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.Task', null, global); -goog.exportSymbol('proto.aggregator.TaskAction', null, global); +goog.exportSymbol('proto.aggregator.TaskEdge', null, global); +goog.exportSymbol('proto.aggregator.TaskNode', null, global); +goog.exportSymbol('proto.aggregator.TaskNode.TaskBodyCase', null, global); goog.exportSymbol('proto.aggregator.TaskStatus', null, global); goog.exportSymbol('proto.aggregator.TaskTrigger', null, global); +goog.exportSymbol('proto.aggregator.TaskTrigger.TriggerConditionCase', null, global); goog.exportSymbol('proto.aggregator.TaskType', null, global); -goog.exportSymbol('proto.aggregator.TimeCondition', null, global); goog.exportSymbol('proto.aggregator.TriggerType', null, global); goog.exportSymbol('proto.aggregator.UUID', null, global); goog.exportSymbol('proto.aggregator.UpdateChecksReq', null, global); @@ -177,16 +186,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.TaskTrigger = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.aggregator.FixedEpochCondition = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.FixedEpochCondition.repeatedFields_, null); }; -goog.inherits(proto.aggregator.TaskTrigger, jspb.Message); +goog.inherits(proto.aggregator.FixedEpochCondition, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.aggregator.TaskTrigger.displayName = 'proto.aggregator.TaskTrigger'; + proto.aggregator.FixedEpochCondition.displayName = 'proto.aggregator.FixedEpochCondition'; } /** * Generated by JsPbCodeGenerator. @@ -198,16 +207,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.TimeCondition = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.TimeCondition.repeatedFields_, null); +proto.aggregator.CronCondition = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.CronCondition.repeatedFields_, null); }; -goog.inherits(proto.aggregator.TimeCondition, jspb.Message); +goog.inherits(proto.aggregator.CronCondition, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.aggregator.TimeCondition.displayName = 'proto.aggregator.TimeCondition'; + proto.aggregator.CronCondition.displayName = 'proto.aggregator.CronCondition'; } /** * Generated by JsPbCodeGenerator. @@ -219,16 +228,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.ContractQueryCondition = function(opt_data) { +proto.aggregator.BlockCondition = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.aggregator.ContractQueryCondition, jspb.Message); +goog.inherits(proto.aggregator.BlockCondition, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.aggregator.ContractQueryCondition.displayName = 'proto.aggregator.ContractQueryCondition'; + proto.aggregator.BlockCondition.displayName = 'proto.aggregator.BlockCondition'; } /** * Generated by JsPbCodeGenerator. @@ -240,16 +249,37 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.ExpressionCondition = function(opt_data) { +proto.aggregator.EventCondition = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.aggregator.ExpressionCondition, jspb.Message); +goog.inherits(proto.aggregator.EventCondition, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.aggregator.EventCondition.displayName = 'proto.aggregator.EventCondition'; +} +/** + * 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.TaskTrigger = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.aggregator.TaskTrigger.oneofGroups_); +}; +goog.inherits(proto.aggregator.TaskTrigger, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.aggregator.ExpressionCondition.displayName = 'proto.aggregator.ExpressionCondition'; + proto.aggregator.TaskTrigger.displayName = 'proto.aggregator.TaskTrigger'; } /** * Generated by JsPbCodeGenerator. @@ -282,16 +312,37 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.ETHTransfer = function(opt_data) { +proto.aggregator.ETHTransferNode = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.aggregator.ETHTransferNode, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.aggregator.ETHTransferNode.displayName = 'proto.aggregator.ETHTransferNode'; +} +/** + * 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.ContractWriteNode = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.aggregator.ETHTransfer, jspb.Message); +goog.inherits(proto.aggregator.ContractWriteNode, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.aggregator.ETHTransfer.displayName = 'proto.aggregator.ETHTransfer'; + proto.aggregator.ContractWriteNode.displayName = 'proto.aggregator.ContractWriteNode'; } /** * Generated by JsPbCodeGenerator. @@ -303,16 +354,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.ContractExecution = function(opt_data) { +proto.aggregator.ContractQueryNode = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.aggregator.ContractExecution, jspb.Message); +goog.inherits(proto.aggregator.ContractQueryNode, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.aggregator.ContractExecution.displayName = 'proto.aggregator.ContractExecution'; + proto.aggregator.ContractQueryNode.displayName = 'proto.aggregator.ContractQueryNode'; } /** * Generated by JsPbCodeGenerator. @@ -324,16 +375,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.GraphQLDataQuery = function(opt_data) { +proto.aggregator.GraphQLQueryNode = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.aggregator.GraphQLDataQuery, jspb.Message); +goog.inherits(proto.aggregator.GraphQLQueryNode, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.aggregator.GraphQLDataQuery.displayName = 'proto.aggregator.GraphQLDataQuery'; + proto.aggregator.GraphQLQueryNode.displayName = 'proto.aggregator.GraphQLQueryNode'; } /** * Generated by JsPbCodeGenerator. @@ -345,16 +396,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.HTTPAPICall = function(opt_data) { +proto.aggregator.RestAPINode = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.aggregator.HTTPAPICall, jspb.Message); +goog.inherits(proto.aggregator.RestAPINode, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.aggregator.HTTPAPICall.displayName = 'proto.aggregator.HTTPAPICall'; + proto.aggregator.RestAPINode.displayName = 'proto.aggregator.RestAPINode'; } /** * Generated by JsPbCodeGenerator. @@ -366,16 +417,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.CustomCode = function(opt_data) { +proto.aggregator.CustomCodeNode = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.aggregator.CustomCode, jspb.Message); +goog.inherits(proto.aggregator.CustomCodeNode, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.aggregator.CustomCode.displayName = 'proto.aggregator.CustomCode'; + proto.aggregator.CustomCodeNode.displayName = 'proto.aggregator.CustomCodeNode'; } /** * Generated by JsPbCodeGenerator. @@ -408,16 +459,58 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.BranchAction = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.BranchAction.repeatedFields_, null); +proto.aggregator.BranchNode = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.BranchNode.repeatedFields_, null); +}; +goog.inherits(proto.aggregator.BranchNode, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.aggregator.BranchNode.displayName = 'proto.aggregator.BranchNode'; +} +/** + * 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.FilterNode = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.aggregator.FilterNode, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.aggregator.FilterNode.displayName = 'proto.aggregator.FilterNode'; +} +/** + * 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.TaskEdge = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.aggregator.BranchAction, jspb.Message); +goog.inherits(proto.aggregator.TaskEdge, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.aggregator.BranchAction.displayName = 'proto.aggregator.BranchAction'; + proto.aggregator.TaskEdge.displayName = 'proto.aggregator.TaskEdge'; } /** * Generated by JsPbCodeGenerator. @@ -429,16 +522,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.TaskAction = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.TaskAction.repeatedFields_, null); +proto.aggregator.TaskNode = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.aggregator.TaskNode.oneofGroups_); }; -goog.inherits(proto.aggregator.TaskAction, jspb.Message); +goog.inherits(proto.aggregator.TaskNode, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.aggregator.TaskAction.displayName = 'proto.aggregator.TaskAction'; + proto.aggregator.TaskNode.displayName = 'proto.aggregator.TaskNode'; } /** * Generated by JsPbCodeGenerator. @@ -597,16 +690,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.AddressResp = function(opt_data) { +proto.aggregator.SmartWallet = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.aggregator.AddressResp, jspb.Message); +goog.inherits(proto.aggregator.SmartWallet, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.aggregator.AddressResp.displayName = 'proto.aggregator.AddressResp'; + proto.aggregator.SmartWallet.displayName = 'proto.aggregator.SmartWallet'; } /** * Generated by JsPbCodeGenerator. @@ -618,16 +711,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.ListTasksReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.aggregator.AddressResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.AddressResp.repeatedFields_, null); }; -goog.inherits(proto.aggregator.ListTasksReq, jspb.Message); +goog.inherits(proto.aggregator.AddressResp, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.aggregator.ListTasksReq.displayName = 'proto.aggregator.ListTasksReq'; + proto.aggregator.AddressResp.displayName = 'proto.aggregator.AddressResp'; } /** * Generated by JsPbCodeGenerator. @@ -639,16 +732,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.ListTasksResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.ListTasksResp.repeatedFields_, null); +proto.aggregator.ListTasksReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.aggregator.ListTasksResp, jspb.Message); +goog.inherits(proto.aggregator.ListTasksReq, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.aggregator.ListTasksResp.displayName = 'proto.aggregator.ListTasksResp'; + proto.aggregator.ListTasksReq.displayName = 'proto.aggregator.ListTasksReq'; } /** * Generated by JsPbCodeGenerator. @@ -660,16 +753,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.ListTasksResp.TaskItemResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); +proto.aggregator.ListTasksResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.ListTasksResp.repeatedFields_, null); }; -goog.inherits(proto.aggregator.ListTasksResp.TaskItemResp, jspb.Message); +goog.inherits(proto.aggregator.ListTasksResp, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.aggregator.ListTasksResp.TaskItemResp.displayName = 'proto.aggregator.ListTasksResp.TaskItemResp'; + proto.aggregator.ListTasksResp.displayName = 'proto.aggregator.ListTasksResp'; } /** * Generated by JsPbCodeGenerator. @@ -755,6 +848,48 @@ if (goog.DEBUG && !COMPILED) { */ proto.aggregator.UpdateChecksResp.displayName = 'proto.aggregator.UpdateChecksResp'; } +/** + * 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.CreateWalletReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.aggregator.CreateWalletReq, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.aggregator.CreateWalletReq.displayName = 'proto.aggregator.CreateWalletReq'; +} +/** + * 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.CreateWalletResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.aggregator.CreateWalletResp, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.aggregator.CreateWalletResp.displayName = 'proto.aggregator.CreateWalletResp'; +} @@ -1799,6 +1934,13 @@ proto.aggregator.SyncTasksReq.prototype.setMonotonicClock = function(value) { +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.aggregator.FixedEpochCondition.repeatedFields_ = [1]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -1814,8 +1956,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); }; @@ -1824,16 +1966,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 = { - triggerType: jspb.Message.getFieldWithDefault(msg, 1, 0), - schedule: (f = msg.getSchedule()) && proto.aggregator.TimeCondition.toObject(includeInstance, f), - contractQuery: (f = msg.getContractQuery()) && proto.aggregator.ContractQueryCondition.toObject(includeInstance, f), - expression: (f = msg.getExpression()) && proto.aggregator.ExpressionCondition.toObject(includeInstance, f) + epochesList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f }; if (includeInstance) { @@ -1847,23 +1986,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; @@ -1871,23 +2010,10 @@ proto.aggregator.TaskTrigger.deserializeBinaryFromReader = function(msg, reader) var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!proto.aggregator.TriggerType} */ (reader.readEnum()); - msg.setTriggerType(value); - break; - case 2: - var value = new proto.aggregator.TimeCondition; - reader.readMessage(value,proto.aggregator.TimeCondition.deserializeBinaryFromReader); - msg.setSchedule(value); - break; - case 3: - var value = new proto.aggregator.ContractQueryCondition; - reader.readMessage(value,proto.aggregator.ContractQueryCondition.deserializeBinaryFromReader); - msg.setContractQuery(value); - break; - case 4: - var value = new proto.aggregator.ExpressionCondition; - reader.readMessage(value,proto.aggregator.ExpressionCondition.deserializeBinaryFromReader); - msg.setExpression(value); + var values = /** @type {!Array} */ (reader.isDelimited() ? reader.readPackedInt64() : [reader.readInt64()]); + for (var i = 0; i < values.length; i++) { + msg.addEpoches(values[i]); + } break; default: reader.skipField(); @@ -1902,9 +2028,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(); }; @@ -1912,126 +2038,763 @@ 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 = message.getTriggerType(); - if (f !== 0.0) { - writer.writeEnum( + f = message.getEpochesList(); + if (f.length > 0) { + writer.writePackedInt64( 1, f ); } - f = message.getSchedule(); - if (f != null) { - writer.writeMessage( - 2, - f, - proto.aggregator.TimeCondition.serializeBinaryToWriter - ); - } - f = message.getContractQuery(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.aggregator.ContractQueryCondition.serializeBinaryToWriter - ); - } - f = message.getExpression(); - if (f != null) { - writer.writeMessage( - 4, - f, - proto.aggregator.ExpressionCondition.serializeBinaryToWriter - ); - } }; /** - * optional TriggerType trigger_type = 1; - * @return {!proto.aggregator.TriggerType} + * repeated int64 epoches = 1; + * @return {!Array} */ -proto.aggregator.TaskTrigger.prototype.getTriggerType = function() { - return /** @type {!proto.aggregator.TriggerType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.aggregator.FixedEpochCondition.prototype.getEpochesList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); }; /** - * @param {!proto.aggregator.TriggerType} value - * @return {!proto.aggregator.TaskTrigger} returns this + * @param {!Array} value + * @return {!proto.aggregator.FixedEpochCondition} returns this */ -proto.aggregator.TaskTrigger.prototype.setTriggerType = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); +proto.aggregator.FixedEpochCondition.prototype.setEpochesList = function(value) { + return jspb.Message.setField(this, 1, value || []); }; /** - * optional TimeCondition schedule = 2; - * @return {?proto.aggregator.TimeCondition} + * @param {number} value + * @param {number=} opt_index + * @return {!proto.aggregator.FixedEpochCondition} returns this */ -proto.aggregator.TaskTrigger.prototype.getSchedule = function() { - return /** @type{?proto.aggregator.TimeCondition} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.TimeCondition, 2)); +proto.aggregator.FixedEpochCondition.prototype.addEpoches = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); }; /** - * @param {?proto.aggregator.TimeCondition|undefined} value - * @return {!proto.aggregator.TaskTrigger} returns this -*/ -proto.aggregator.TaskTrigger.prototype.setSchedule = function(value) { - return jspb.Message.setWrapperField(this, 2, value); + * Clears the list making it empty but non-null. + * @return {!proto.aggregator.FixedEpochCondition} returns this + */ +proto.aggregator.FixedEpochCondition.prototype.clearEpochesList = function() { + return this.setEpochesList([]); }; + /** - * Clears the message field making it undefined. - * @return {!proto.aggregator.TaskTrigger} returns this + * List of repeated fields within this message type. + * @private {!Array} + * @const */ -proto.aggregator.TaskTrigger.prototype.clearSchedule = function() { - return this.setSchedule(undefined); -}; +proto.aggregator.CronCondition.repeatedFields_ = [1]; + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Returns whether this field is set. - * @return {boolean} + * 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.TaskTrigger.prototype.hasSchedule = function() { - return jspb.Message.getField(this, 2) != null; +proto.aggregator.CronCondition.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.CronCondition.toObject(opt_includeInstance, this); }; /** - * optional ContractQueryCondition contract_query = 3; - * @return {?proto.aggregator.ContractQueryCondition} + * 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.CronCondition} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.TaskTrigger.prototype.getContractQuery = function() { - return /** @type{?proto.aggregator.ContractQueryCondition} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.ContractQueryCondition, 3)); -}; - +proto.aggregator.CronCondition.toObject = function(includeInstance, msg) { + var f, obj = { + cronTableList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f + }; -/** - * @param {?proto.aggregator.ContractQueryCondition|undefined} value - * @return {!proto.aggregator.TaskTrigger} returns this -*/ -proto.aggregator.TaskTrigger.prototype.setContractQuery = function(value) { - return jspb.Message.setWrapperField(this, 3, value); + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * Clears the message field making it undefined. + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.aggregator.CronCondition} + */ +proto.aggregator.CronCondition.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + 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.CronCondition} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.aggregator.CronCondition} + */ +proto.aggregator.CronCondition.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.addCronTable(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.aggregator.CronCondition.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.CronCondition.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.CronCondition} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.CronCondition.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getCronTableList(); + if (f.length > 0) { + writer.writeRepeatedString( + 1, + f + ); + } +}; + + +/** + * repeated string cron_table = 1; + * @return {!Array} + */ +proto.aggregator.CronCondition.prototype.getCronTableList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.aggregator.CronCondition} returns this + */ +proto.aggregator.CronCondition.prototype.setCronTableList = function(value) { + return jspb.Message.setField(this, 1, value || []); +}; + + +/** + * @param {string} value + * @param {number=} opt_index + * @return {!proto.aggregator.CronCondition} returns this + */ +proto.aggregator.CronCondition.prototype.addCronTable = 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.CronCondition} returns this + */ +proto.aggregator.CronCondition.prototype.clearCronTableList = function() { + return this.setCronTableList([]); +}; + + + + + +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.BlockCondition.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.BlockCondition.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.BlockCondition} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.BlockCondition.toObject = function(includeInstance, msg) { + var f, obj = { + interval: jspb.Message.getFieldWithDefault(msg, 1, 0) + }; + + 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.BlockCondition} + */ +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); +}; + + +/** + * 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} + */ +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; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.aggregator.BlockCondition.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.BlockCondition.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.BlockCondition} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.BlockCondition.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getInterval(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } +}; + + +/** + * optional int64 interval = 1; + * @return {number} + */ +proto.aggregator.BlockCondition.prototype.getInterval = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.aggregator.BlockCondition} returns this + */ +proto.aggregator.BlockCondition.prototype.setInterval = function(value) { + return jspb.Message.setProto3IntField(this, 1, 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} + */ +proto.aggregator.EventCondition.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.EventCondition.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.EventCondition} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.EventCondition.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.EventCondition} + */ +proto.aggregator.EventCondition.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + 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.EventCondition} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.aggregator.EventCondition} + */ +proto.aggregator.EventCondition.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.EventCondition.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.EventCondition.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.EventCondition} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.EventCondition.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.EventCondition.prototype.getExpression = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.aggregator.EventCondition} returns this + */ +proto.aggregator.EventCondition.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.TaskTrigger.oneofGroups_ = [[2,3,4,5,6]]; + +/** + * @enum {number} + */ +proto.aggregator.TaskTrigger.TriggerConditionCase = { + TRIGGER_CONDITION_NOT_SET: 0, + MANUAL: 2, + AT: 3, + CRON: 4, + BLOCK: 5, + EVENT: 6 +}; + +/** + * @return {proto.aggregator.TaskTrigger.TriggerConditionCase} + */ +proto.aggregator.TaskTrigger.prototype.getTriggerConditionCase = function() { + return /** @type {proto.aggregator.TaskTrigger.TriggerConditionCase} */(jspb.Message.computeOneofCase(this, proto.aggregator.TaskTrigger.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.TaskTrigger.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.TaskTrigger.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.TaskTrigger} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.TaskTrigger.toObject = function(includeInstance, msg) { + var f, obj = { + triggerType: jspb.Message.getFieldWithDefault(msg, 1, 0), + manual: jspb.Message.getBooleanFieldWithDefault(msg, 2, false), + at: (f = msg.getAt()) && 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) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.aggregator.TaskTrigger} + */ +proto.aggregator.TaskTrigger.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + 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.TaskTrigger} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.aggregator.TaskTrigger} + */ +proto.aggregator.TaskTrigger.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {!proto.aggregator.TriggerType} */ (reader.readEnum()); + msg.setTriggerType(value); + break; + case 2: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setManual(value); + break; + case 3: + var value = new proto.aggregator.FixedEpochCondition; + reader.readMessage(value,proto.aggregator.FixedEpochCondition.deserializeBinaryFromReader); + msg.setAt(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(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.aggregator.TaskTrigger.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.TaskTrigger.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.TaskTrigger} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.TaskTrigger.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTriggerType(); + if (f !== 0.0) { + writer.writeEnum( + 1, + f + ); + } + f = /** @type {boolean} */ (jspb.Message.getField(message, 2)); + if (f != null) { + writer.writeBool( + 2, + f + ); + } + f = message.getAt(); + if (f != null) { + writer.writeMessage( + 3, + 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 TriggerType trigger_type = 1; + * @return {!proto.aggregator.TriggerType} + */ +proto.aggregator.TaskTrigger.prototype.getTriggerType = function() { + return /** @type {!proto.aggregator.TriggerType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.aggregator.TriggerType} value + * @return {!proto.aggregator.TaskTrigger} returns this + */ +proto.aggregator.TaskTrigger.prototype.setTriggerType = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional bool manual = 2; + * @return {boolean} + */ +proto.aggregator.TaskTrigger.prototype.getManual = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 2, false)); +}; + + +/** + * @param {boolean} value + * @return {!proto.aggregator.TaskTrigger} returns this + */ +proto.aggregator.TaskTrigger.prototype.setManual = function(value) { + return jspb.Message.setOneofField(this, 2, 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, 2, 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, 2) != null; +}; + + +/** + * optional FixedEpochCondition at = 3; + * @return {?proto.aggregator.FixedEpochCondition} + */ +proto.aggregator.TaskTrigger.prototype.getAt = function() { + return /** @type{?proto.aggregator.FixedEpochCondition} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.FixedEpochCondition, 3)); +}; + + +/** + * @param {?proto.aggregator.FixedEpochCondition|undefined} value + * @return {!proto.aggregator.TaskTrigger} returns this +*/ +proto.aggregator.TaskTrigger.prototype.setAt = 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.clearContractQuery = function() { - return this.setContractQuery(undefined); +proto.aggregator.TaskTrigger.prototype.clearAt = function() { + return this.setAt(undefined); }; @@ -2039,27 +2802,27 @@ proto.aggregator.TaskTrigger.prototype.clearContractQuery = function() { * Returns whether this field is set. * @return {boolean} */ -proto.aggregator.TaskTrigger.prototype.hasContractQuery = function() { +proto.aggregator.TaskTrigger.prototype.hasAt = function() { return jspb.Message.getField(this, 3) != null; }; /** - * optional ExpressionCondition expression = 4; - * @return {?proto.aggregator.ExpressionCondition} + * optional CronCondition cron = 4; + * @return {?proto.aggregator.CronCondition} */ -proto.aggregator.TaskTrigger.prototype.getExpression = function() { - return /** @type{?proto.aggregator.ExpressionCondition} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.ExpressionCondition, 4)); +proto.aggregator.TaskTrigger.prototype.getCron = function() { + return /** @type{?proto.aggregator.CronCondition} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.CronCondition, 4)); }; /** - * @param {?proto.aggregator.ExpressionCondition|undefined} value + * @param {?proto.aggregator.CronCondition|undefined} value * @return {!proto.aggregator.TaskTrigger} returns this */ -proto.aggregator.TaskTrigger.prototype.setExpression = function(value) { - return jspb.Message.setWrapperField(this, 4, value); +proto.aggregator.TaskTrigger.prototype.setCron = function(value) { + return jspb.Message.setOneofWrapperField(this, 4, proto.aggregator.TaskTrigger.oneofGroups_[0], value); }; @@ -2067,8 +2830,8 @@ proto.aggregator.TaskTrigger.prototype.setExpression = function(value) { * Clears the message field making it undefined. * @return {!proto.aggregator.TaskTrigger} returns this */ -proto.aggregator.TaskTrigger.prototype.clearExpression = function() { - return this.setExpression(undefined); +proto.aggregator.TaskTrigger.prototype.clearCron = function() { + return this.setCron(undefined); }; @@ -2076,18 +2839,85 @@ proto.aggregator.TaskTrigger.prototype.clearExpression = function() { * Returns whether this field is set. * @return {boolean} */ -proto.aggregator.TaskTrigger.prototype.hasExpression = function() { +proto.aggregator.TaskTrigger.prototype.hasCron = function() { return jspb.Message.getField(this, 4) != null; }; +/** + * optional BlockCondition block = 5; + * @return {?proto.aggregator.BlockCondition} + */ +proto.aggregator.TaskTrigger.prototype.getBlock = function() { + return /** @type{?proto.aggregator.BlockCondition} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.BlockCondition, 5)); +}; + /** - * List of repeated fields within this message type. - * @private {!Array} - * @const + * @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.TaskTrigger.prototype.clearBlock = function() { + return this.setBlock(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.aggregator.TaskTrigger.prototype.hasBlock = function() { + return jspb.Message.getField(this, 5) != null; +}; + + +/** + * optional EventCondition event = 6; + * @return {?proto.aggregator.EventCondition} + */ +proto.aggregator.TaskTrigger.prototype.getEvent = function() { + return /** @type{?proto.aggregator.EventCondition} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.EventCondition, 6)); +}; + + +/** + * @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.TaskTrigger.prototype.clearEvent = function() { + return this.setEvent(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} */ -proto.aggregator.TimeCondition.repeatedFields_ = [1]; +proto.aggregator.TaskTrigger.prototype.hasEvent = function() { + return jspb.Message.getField(this, 6) != null; +}; + + @@ -2104,8 +2934,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.aggregator.TimeCondition.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.TimeCondition.toObject(opt_includeInstance, this); +proto.aggregator.SyncTasksResp.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.SyncTasksResp.toObject(opt_includeInstance, this); }; @@ -2114,14 +2944,15 @@ proto.aggregator.TimeCondition.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.TimeCondition} msg The msg instance to transform. + * @param {!proto.aggregator.SyncTasksResp} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.TimeCondition.toObject = function(includeInstance, msg) { +proto.aggregator.SyncTasksResp.toObject = function(includeInstance, msg) { var f, obj = { - fixedList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f, - cron: jspb.Message.getFieldWithDefault(msg, 2, "") + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + checktype: jspb.Message.getFieldWithDefault(msg, 2, ""), + trigger: (f = msg.getTrigger()) && proto.aggregator.TaskTrigger.toObject(includeInstance, f) }; if (includeInstance) { @@ -2135,23 +2966,23 @@ proto.aggregator.TimeCondition.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.TimeCondition} + * @return {!proto.aggregator.SyncTasksResp} */ -proto.aggregator.TimeCondition.deserializeBinary = function(bytes) { +proto.aggregator.SyncTasksResp.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.TimeCondition; - return proto.aggregator.TimeCondition.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.SyncTasksResp; + return proto.aggregator.SyncTasksResp.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.aggregator.TimeCondition} msg The message object to deserialize into. + * @param {!proto.aggregator.SyncTasksResp} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.TimeCondition} + * @return {!proto.aggregator.SyncTasksResp} */ -proto.aggregator.TimeCondition.deserializeBinaryFromReader = function(msg, reader) { +proto.aggregator.SyncTasksResp.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2159,14 +2990,17 @@ proto.aggregator.TimeCondition.deserializeBinaryFromReader = function(msg, reade 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.addFixed(values[i]); - } + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); break; case 2: var value = /** @type {string} */ (reader.readString()); - msg.setCron(value); + msg.setChecktype(value); + break; + case 3: + var value = new proto.aggregator.TaskTrigger; + reader.readMessage(value,proto.aggregator.TaskTrigger.deserializeBinaryFromReader); + msg.setTrigger(value); break; default: reader.skipField(); @@ -2181,9 +3015,9 @@ proto.aggregator.TimeCondition.deserializeBinaryFromReader = function(msg, reade * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.TimeCondition.prototype.serializeBinary = function() { +proto.aggregator.SyncTasksResp.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.TimeCondition.serializeBinaryToWriter(this, writer); + proto.aggregator.SyncTasksResp.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2191,81 +3025,107 @@ proto.aggregator.TimeCondition.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.TimeCondition} message + * @param {!proto.aggregator.SyncTasksResp} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.TimeCondition.serializeBinaryToWriter = function(message, writer) { +proto.aggregator.SyncTasksResp.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getFixedList(); + f = message.getId(); if (f.length > 0) { - writer.writePackedInt64( + writer.writeString( 1, f ); } - f = message.getCron(); + 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 + ); + } }; /** - * repeated int64 fixed = 1; - * @return {!Array} + * optional string id = 1; + * @return {string} */ -proto.aggregator.TimeCondition.prototype.getFixedList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +proto.aggregator.SyncTasksResp.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {!Array} value - * @return {!proto.aggregator.TimeCondition} returns this + * @param {string} value + * @return {!proto.aggregator.SyncTasksResp} returns this */ -proto.aggregator.TimeCondition.prototype.setFixedList = function(value) { - return jspb.Message.setField(this, 1, value || []); +proto.aggregator.SyncTasksResp.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; /** - * @param {number} value - * @param {number=} opt_index - * @return {!proto.aggregator.TimeCondition} returns this + * optional string checkType = 2; + * @return {string} */ -proto.aggregator.TimeCondition.prototype.addFixed = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); +proto.aggregator.SyncTasksResp.prototype.getChecktype = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.aggregator.TimeCondition} returns this + * @param {string} value + * @return {!proto.aggregator.SyncTasksResp} returns this */ -proto.aggregator.TimeCondition.prototype.clearFixedList = function() { - return this.setFixedList([]); +proto.aggregator.SyncTasksResp.prototype.setChecktype = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; /** - * optional string cron = 2; - * @return {string} + * optional TaskTrigger trigger = 3; + * @return {?proto.aggregator.TaskTrigger} */ -proto.aggregator.TimeCondition.prototype.getCron = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.aggregator.SyncTasksResp.prototype.getTrigger = function() { + return /** @type{?proto.aggregator.TaskTrigger} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.TaskTrigger, 3)); }; /** - * @param {string} value - * @return {!proto.aggregator.TimeCondition} returns this + * @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 */ -proto.aggregator.TimeCondition.prototype.setCron = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.aggregator.SyncTasksResp.prototype.clearTrigger = function() { + return this.setTrigger(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.aggregator.SyncTasksResp.prototype.hasTrigger = function() { + return jspb.Message.getField(this, 3) != null; }; @@ -2285,8 +3145,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.aggregator.ContractQueryCondition.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.ContractQueryCondition.toObject(opt_includeInstance, this); +proto.aggregator.ETHTransferNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ETHTransferNode.toObject(opt_includeInstance, this); }; @@ -2295,14 +3155,14 @@ proto.aggregator.ContractQueryCondition.prototype.toObject = function(opt_includ * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.aggregator.ContractQueryCondition} 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.ContractQueryCondition.toObject = function(includeInstance, msg) { +proto.aggregator.ETHTransferNode.toObject = function(includeInstance, msg) { var f, obj = { - contractAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), - callmsg: jspb.Message.getFieldWithDefault(msg, 2, "") + destination: jspb.Message.getFieldWithDefault(msg, 1, ""), + amount: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { @@ -2316,23 +3176,23 @@ proto.aggregator.ContractQueryCondition.toObject = function(includeInstance, msg /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.ContractQueryCondition} + * @return {!proto.aggregator.ETHTransferNode} */ -proto.aggregator.ContractQueryCondition.deserializeBinary = function(bytes) { +proto.aggregator.ETHTransferNode.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ContractQueryCondition; - return proto.aggregator.ContractQueryCondition.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.ContractQueryCondition} 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.ContractQueryCondition} + * @return {!proto.aggregator.ETHTransferNode} */ -proto.aggregator.ContractQueryCondition.deserializeBinaryFromReader = function(msg, reader) { +proto.aggregator.ETHTransferNode.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2341,11 +3201,11 @@ proto.aggregator.ContractQueryCondition.deserializeBinaryFromReader = function(m switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setContractAddress(value); + msg.setDestination(value); break; case 2: var value = /** @type {string} */ (reader.readString()); - msg.setCallmsg(value); + msg.setAmount(value); break; default: reader.skipField(); @@ -2360,9 +3220,9 @@ proto.aggregator.ContractQueryCondition.deserializeBinaryFromReader = function(m * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.ContractQueryCondition.prototype.serializeBinary = function() { +proto.aggregator.ETHTransferNode.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.ContractQueryCondition.serializeBinaryToWriter(this, writer); + proto.aggregator.ETHTransferNode.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2370,20 +3230,20 @@ proto.aggregator.ContractQueryCondition.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.ContractQueryCondition} message + * @param {!proto.aggregator.ETHTransferNode} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.ContractQueryCondition.serializeBinaryToWriter = function(message, writer) { +proto.aggregator.ETHTransferNode.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getContractAddress(); + f = message.getDestination(); if (f.length > 0) { writer.writeString( 1, f ); } - f = message.getCallmsg(); + f = message.getAmount(); if (f.length > 0) { writer.writeString( 2, @@ -2394,37 +3254,37 @@ proto.aggregator.ContractQueryCondition.serializeBinaryToWriter = function(messa /** - * optional string contract_address = 1; + * optional string destination = 1; * @return {string} */ -proto.aggregator.ContractQueryCondition.prototype.getContractAddress = function() { +proto.aggregator.ETHTransferNode.prototype.getDestination = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.aggregator.ContractQueryCondition} returns this + * @return {!proto.aggregator.ETHTransferNode} returns this */ -proto.aggregator.ContractQueryCondition.prototype.setContractAddress = function(value) { +proto.aggregator.ETHTransferNode.prototype.setDestination = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional string callmsg = 2; + * optional string amount = 2; * @return {string} */ -proto.aggregator.ContractQueryCondition.prototype.getCallmsg = function() { +proto.aggregator.ETHTransferNode.prototype.getAmount = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @return {!proto.aggregator.ContractQueryCondition} returns this + * @return {!proto.aggregator.ETHTransferNode} returns this */ -proto.aggregator.ContractQueryCondition.prototype.setCallmsg = function(value) { +proto.aggregator.ETHTransferNode.prototype.setAmount = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; @@ -2445,8 +3305,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.aggregator.ExpressionCondition.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.ExpressionCondition.toObject(opt_includeInstance, this); +proto.aggregator.ContractWriteNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ContractWriteNode.toObject(opt_includeInstance, this); }; @@ -2455,13 +3315,15 @@ proto.aggregator.ExpressionCondition.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.ExpressionCondition} 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.ExpressionCondition.toObject = function(includeInstance, msg) { +proto.aggregator.ContractWriteNode.toObject = function(includeInstance, msg) { var f, obj = { - expression: jspb.Message.getFieldWithDefault(msg, 1, "") + contractAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + callData: jspb.Message.getFieldWithDefault(msg, 2, ""), + contractAbi: jspb.Message.getFieldWithDefault(msg, 3, "") }; if (includeInstance) { @@ -2475,23 +3337,23 @@ proto.aggregator.ExpressionCondition.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.ExpressionCondition} + * @return {!proto.aggregator.ContractWriteNode} */ -proto.aggregator.ExpressionCondition.deserializeBinary = function(bytes) { +proto.aggregator.ContractWriteNode.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ExpressionCondition; - return proto.aggregator.ExpressionCondition.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.ExpressionCondition} 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.ExpressionCondition} + * @return {!proto.aggregator.ContractWriteNode} */ -proto.aggregator.ExpressionCondition.deserializeBinaryFromReader = function(msg, reader) { +proto.aggregator.ContractWriteNode.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2500,7 +3362,15 @@ proto.aggregator.ExpressionCondition.deserializeBinaryFromReader = function(msg, switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setExpression(value); + 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); break; default: reader.skipField(); @@ -2515,9 +3385,9 @@ proto.aggregator.ExpressionCondition.deserializeBinaryFromReader = function(msg, * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.ExpressionCondition.prototype.serializeBinary = function() { +proto.aggregator.ContractWriteNode.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.ExpressionCondition.serializeBinaryToWriter(this, writer); + proto.aggregator.ContractWriteNode.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2525,40 +3395,90 @@ proto.aggregator.ExpressionCondition.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.ExpressionCondition} message + * @param {!proto.aggregator.ContractWriteNode} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.ExpressionCondition.serializeBinaryToWriter = function(message, writer) { +proto.aggregator.ContractWriteNode.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getExpression(); + f = message.getContractAddress(); 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 expression = 1; + * optional string contract_address = 1; * @return {string} */ -proto.aggregator.ExpressionCondition.prototype.getExpression = function() { +proto.aggregator.ContractWriteNode.prototype.getContractAddress = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.aggregator.ExpressionCondition} returns this + * @return {!proto.aggregator.ContractWriteNode} returns this */ -proto.aggregator.ExpressionCondition.prototype.setExpression = function(value) { +proto.aggregator.ContractWriteNode.prototype.setContractAddress = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; +/** + * optional string call_data = 2; + * @return {string} + */ +proto.aggregator.ContractWriteNode.prototype.getCallData = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @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} + */ +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); +}; + + @@ -2575,8 +3495,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.ContractQueryNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ContractQueryNode.toObject(opt_includeInstance, this); }; @@ -2585,15 +3505,15 @@ 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.ContractQueryNode} 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.ContractQueryNode.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) + contractAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + callData: jspb.Message.getFieldWithDefault(msg, 2, ""), + contractAbi: jspb.Message.getFieldWithDefault(msg, 3, "") }; if (includeInstance) { @@ -2607,23 +3527,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.ContractQueryNode} */ -proto.aggregator.SyncTasksResp.deserializeBinary = function(bytes) { +proto.aggregator.ContractQueryNode.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.ContractQueryNode; + return proto.aggregator.ContractQueryNode.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.ContractQueryNode} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.SyncTasksResp} + * @return {!proto.aggregator.ContractQueryNode} */ -proto.aggregator.SyncTasksResp.deserializeBinaryFromReader = function(msg, reader) { +proto.aggregator.ContractQueryNode.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2632,16 +3552,15 @@ proto.aggregator.SyncTasksResp.deserializeBinaryFromReader = function(msg, reade 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.setChecktype(value); + msg.setCallData(value); break; case 3: - var value = new proto.aggregator.TaskTrigger; - reader.readMessage(value,proto.aggregator.TaskTrigger.deserializeBinaryFromReader); - msg.setTrigger(value); + var value = /** @type {string} */ (reader.readString()); + msg.setContractAbi(value); break; default: reader.skipField(); @@ -2656,9 +3575,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.ContractQueryNode.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.SyncTasksResp.serializeBinaryToWriter(this, writer); + proto.aggregator.ContractQueryNode.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2666,107 +3585,87 @@ 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.ContractQueryNode} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.SyncTasksResp.serializeBinaryToWriter = function(message, writer) { +proto.aggregator.ContractQueryNode.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getId(); + f = message.getContractAddress(); if (f.length > 0) { writer.writeString( 1, f ); } - f = message.getChecktype(); + f = message.getCallData(); if (f.length > 0) { writer.writeString( 2, f ); } - f = message.getTrigger(); - if (f != null) { - writer.writeMessage( + f = message.getContractAbi(); + if (f.length > 0) { + writer.writeString( 3, - f, - proto.aggregator.TaskTrigger.serializeBinaryToWriter + f ); } }; /** - * optional string id = 1; + * optional string contract_address = 1; * @return {string} */ -proto.aggregator.SyncTasksResp.prototype.getId = function() { +proto.aggregator.ContractQueryNode.prototype.getContractAddress = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.aggregator.SyncTasksResp} returns this + * @return {!proto.aggregator.ContractQueryNode} returns this */ -proto.aggregator.SyncTasksResp.prototype.setId = function(value) { +proto.aggregator.ContractQueryNode.prototype.setContractAddress = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional string checkType = 2; + * optional string call_data = 2; * @return {string} */ -proto.aggregator.SyncTasksResp.prototype.getChecktype = function() { +proto.aggregator.ContractQueryNode.prototype.getCallData = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @return {!proto.aggregator.SyncTasksResp} returns this + * @return {!proto.aggregator.ContractQueryNode} returns this */ -proto.aggregator.SyncTasksResp.prototype.setChecktype = function(value) { +proto.aggregator.ContractQueryNode.prototype.setCallData = 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 + * optional string contract_abi = 3; + * @return {string} */ -proto.aggregator.SyncTasksResp.prototype.clearTrigger = function() { - return this.setTrigger(undefined); +proto.aggregator.ContractQueryNode.prototype.getContractAbi = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {string} value + * @return {!proto.aggregator.ContractQueryNode} returns this */ -proto.aggregator.SyncTasksResp.prototype.hasTrigger = function() { - return jspb.Message.getField(this, 3) != null; +proto.aggregator.ContractQueryNode.prototype.setContractAbi = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); }; @@ -2786,8 +3685,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.aggregator.ETHTransfer.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.ETHTransfer.toObject(opt_includeInstance, this); +proto.aggregator.GraphQLQueryNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.GraphQLQueryNode.toObject(opt_includeInstance, this); }; @@ -2796,14 +3695,14 @@ proto.aggregator.ETHTransfer.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.ETHTransfer} 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.ETHTransfer.toObject = function(includeInstance, msg) { +proto.aggregator.GraphQLQueryNode.toObject = function(includeInstance, msg) { var f, obj = { - destination: jspb.Message.getFieldWithDefault(msg, 1, ""), - amount: jspb.Message.getFieldWithDefault(msg, 2, "") + url: jspb.Message.getFieldWithDefault(msg, 1, ""), + query: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { @@ -2817,23 +3716,23 @@ proto.aggregator.ETHTransfer.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.ETHTransfer} + * @return {!proto.aggregator.GraphQLQueryNode} */ -proto.aggregator.ETHTransfer.deserializeBinary = function(bytes) { +proto.aggregator.GraphQLQueryNode.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ETHTransfer; - return proto.aggregator.ETHTransfer.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.ETHTransfer} 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.ETHTransfer} + * @return {!proto.aggregator.GraphQLQueryNode} */ -proto.aggregator.ETHTransfer.deserializeBinaryFromReader = function(msg, reader) { +proto.aggregator.GraphQLQueryNode.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2842,11 +3741,11 @@ proto.aggregator.ETHTransfer.deserializeBinaryFromReader = function(msg, reader) switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setDestination(value); + msg.setUrl(value); break; case 2: var value = /** @type {string} */ (reader.readString()); - msg.setAmount(value); + msg.setQuery(value); break; default: reader.skipField(); @@ -2861,9 +3760,9 @@ proto.aggregator.ETHTransfer.deserializeBinaryFromReader = function(msg, reader) * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.ETHTransfer.prototype.serializeBinary = function() { +proto.aggregator.GraphQLQueryNode.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.ETHTransfer.serializeBinaryToWriter(this, writer); + proto.aggregator.GraphQLQueryNode.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2871,20 +3770,20 @@ proto.aggregator.ETHTransfer.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.ETHTransfer} message + * @param {!proto.aggregator.GraphQLQueryNode} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.ETHTransfer.serializeBinaryToWriter = function(message, writer) { +proto.aggregator.GraphQLQueryNode.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getDestination(); + f = message.getUrl(); if (f.length > 0) { writer.writeString( 1, f ); } - f = message.getAmount(); + f = message.getQuery(); if (f.length > 0) { writer.writeString( 2, @@ -2895,37 +3794,37 @@ proto.aggregator.ETHTransfer.serializeBinaryToWriter = function(message, writer) /** - * optional string destination = 1; + * optional string url = 1; * @return {string} */ -proto.aggregator.ETHTransfer.prototype.getDestination = function() { +proto.aggregator.GraphQLQueryNode.prototype.getUrl = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.aggregator.ETHTransfer} returns this + * @return {!proto.aggregator.GraphQLQueryNode} returns this */ -proto.aggregator.ETHTransfer.prototype.setDestination = function(value) { +proto.aggregator.GraphQLQueryNode.prototype.setUrl = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional string amount = 2; + * optional string query = 2; * @return {string} */ -proto.aggregator.ETHTransfer.prototype.getAmount = function() { +proto.aggregator.GraphQLQueryNode.prototype.getQuery = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @return {!proto.aggregator.ETHTransfer} returns this + * @return {!proto.aggregator.GraphQLQueryNode} returns this */ -proto.aggregator.ETHTransfer.prototype.setAmount = function(value) { +proto.aggregator.GraphQLQueryNode.prototype.setQuery = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; @@ -2946,8 +3845,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.aggregator.ContractExecution.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.ContractExecution.toObject(opt_includeInstance, this); +proto.aggregator.RestAPINode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.RestAPINode.toObject(opt_includeInstance, this); }; @@ -2956,16 +3855,15 @@ proto.aggregator.ContractExecution.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.ContractExecution} 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.ContractExecution.toObject = function(includeInstance, msg) { +proto.aggregator.RestAPINode.toObject = function(includeInstance, msg) { var f, obj = { - contractAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), - callData: jspb.Message.getFieldWithDefault(msg, 2, ""), - method: jspb.Message.getFieldWithDefault(msg, 3, ""), - encodedParams: jspb.Message.getFieldWithDefault(msg, 4, "") + url: jspb.Message.getFieldWithDefault(msg, 1, ""), + headersMap: (f = msg.getHeadersMap()) ? f.toObject(includeInstance, undefined) : [], + body: jspb.Message.getFieldWithDefault(msg, 3, "") }; if (includeInstance) { @@ -2979,23 +3877,23 @@ proto.aggregator.ContractExecution.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.ContractExecution} + * @return {!proto.aggregator.RestAPINode} */ -proto.aggregator.ContractExecution.deserializeBinary = function(bytes) { +proto.aggregator.RestAPINode.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ContractExecution; - return proto.aggregator.ContractExecution.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.ContractExecution} 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.ContractExecution} + * @return {!proto.aggregator.RestAPINode} */ -proto.aggregator.ContractExecution.deserializeBinaryFromReader = function(msg, reader) { +proto.aggregator.RestAPINode.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3004,19 +3902,17 @@ proto.aggregator.ContractExecution.deserializeBinaryFromReader = function(msg, r switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setContractAddress(value); + msg.setUrl(value); break; case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setCallData(value); + 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.setMethod(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setEncodedParams(value); + msg.setBody(value); break; default: reader.skipField(); @@ -3031,9 +3927,9 @@ proto.aggregator.ContractExecution.deserializeBinaryFromReader = function(msg, r * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.ContractExecution.prototype.serializeBinary = function() { +proto.aggregator.RestAPINode.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.ContractExecution.serializeBinaryToWriter(this, writer); + proto.aggregator.RestAPINode.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3041,115 +3937,91 @@ proto.aggregator.ContractExecution.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.ContractExecution} message + * @param {!proto.aggregator.RestAPINode} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.ContractExecution.serializeBinaryToWriter = function(message, writer) { +proto.aggregator.RestAPINode.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getContractAddress(); + f = message.getUrl(); if (f.length > 0) { writer.writeString( 1, f ); } - f = message.getCallData(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); + f = message.getHeadersMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(2, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); } - f = message.getMethod(); + f = message.getBody(); if (f.length > 0) { writer.writeString( 3, f ); } - f = message.getEncodedParams(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } }; /** - * optional string contract_address = 1; + * optional string url = 1; * @return {string} */ -proto.aggregator.ContractExecution.prototype.getContractAddress = function() { +proto.aggregator.RestAPINode.prototype.getUrl = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.aggregator.ContractExecution} returns this + * @return {!proto.aggregator.RestAPINode} returns this */ -proto.aggregator.ContractExecution.prototype.setContractAddress = function(value) { +proto.aggregator.RestAPINode.prototype.setUrl = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional string call_data = 2; - * @return {string} + * map headers = 2; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} */ -proto.aggregator.ContractExecution.prototype.getCallData = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.aggregator.RestAPINode.prototype.getHeadersMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 2, opt_noLazyCreate, + null)); }; /** - * @param {string} value - * @return {!proto.aggregator.ContractExecution} returns this + * Clears values from the map. The map will be non-null. + * @return {!proto.aggregator.RestAPINode} returns this */ -proto.aggregator.ContractExecution.prototype.setCallData = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; +proto.aggregator.RestAPINode.prototype.clearHeadersMap = function() { + this.getHeadersMap().clear(); + return this;}; /** - * optional string method = 3; + * optional string body = 3; * @return {string} */ -proto.aggregator.ContractExecution.prototype.getMethod = function() { +proto.aggregator.RestAPINode.prototype.getBody = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value - * @return {!proto.aggregator.ContractExecution} returns this + * @return {!proto.aggregator.RestAPINode} returns this */ -proto.aggregator.ContractExecution.prototype.setMethod = function(value) { +proto.aggregator.RestAPINode.prototype.setBody = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; -/** - * optional string encoded_params = 4; - * @return {string} - */ -proto.aggregator.ContractExecution.prototype.getEncodedParams = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); -}; - - -/** - * @param {string} value - * @return {!proto.aggregator.ContractExecution} returns this - */ -proto.aggregator.ContractExecution.prototype.setEncodedParams = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); -}; - - @@ -3166,8 +4038,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.aggregator.GraphQLDataQuery.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.GraphQLDataQuery.toObject(opt_includeInstance, this); +proto.aggregator.CustomCodeNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.CustomCodeNode.toObject(opt_includeInstance, this); }; @@ -3176,14 +4048,14 @@ proto.aggregator.GraphQLDataQuery.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.GraphQLDataQuery} 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.GraphQLDataQuery.toObject = function(includeInstance, msg) { +proto.aggregator.CustomCodeNode.toObject = function(includeInstance, msg) { var f, obj = { - url: jspb.Message.getFieldWithDefault(msg, 1, ""), - query: jspb.Message.getFieldWithDefault(msg, 2, "") + type: jspb.Message.getFieldWithDefault(msg, 1, 0), + source: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { @@ -3197,23 +4069,23 @@ proto.aggregator.GraphQLDataQuery.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.GraphQLDataQuery} + * @return {!proto.aggregator.CustomCodeNode} */ -proto.aggregator.GraphQLDataQuery.deserializeBinary = function(bytes) { +proto.aggregator.CustomCodeNode.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.GraphQLDataQuery; - return proto.aggregator.GraphQLDataQuery.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.GraphQLDataQuery} 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.GraphQLDataQuery} + * @return {!proto.aggregator.CustomCodeNode} */ -proto.aggregator.GraphQLDataQuery.deserializeBinaryFromReader = function(msg, reader) { +proto.aggregator.CustomCodeNode.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3221,12 +4093,12 @@ proto.aggregator.GraphQLDataQuery.deserializeBinaryFromReader = function(msg, re var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setUrl(value); + var value = /** @type {!proto.aggregator.CustomCodeType} */ (reader.readEnum()); + msg.setType(value); break; case 2: var value = /** @type {string} */ (reader.readString()); - msg.setQuery(value); + msg.setSource(value); break; default: reader.skipField(); @@ -3241,9 +4113,9 @@ proto.aggregator.GraphQLDataQuery.deserializeBinaryFromReader = function(msg, re * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.GraphQLDataQuery.prototype.serializeBinary = function() { +proto.aggregator.CustomCodeNode.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.GraphQLDataQuery.serializeBinaryToWriter(this, writer); + proto.aggregator.CustomCodeNode.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3251,20 +4123,20 @@ proto.aggregator.GraphQLDataQuery.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.GraphQLDataQuery} message + * @param {!proto.aggregator.CustomCodeNode} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.GraphQLDataQuery.serializeBinaryToWriter = function(message, writer) { +proto.aggregator.CustomCodeNode.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getUrl(); - if (f.length > 0) { - writer.writeString( + f = message.getType(); + if (f !== 0.0) { + writer.writeEnum( 1, f ); } - f = message.getQuery(); + f = message.getSource(); if (f.length > 0) { writer.writeString( 2, @@ -3275,37 +4147,37 @@ proto.aggregator.GraphQLDataQuery.serializeBinaryToWriter = function(message, wr /** - * optional string url = 1; - * @return {string} + * optional CustomCodeType type = 1; + * @return {!proto.aggregator.CustomCodeType} */ -proto.aggregator.GraphQLDataQuery.prototype.getUrl = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.aggregator.CustomCodeNode.prototype.getType = function() { + return /** @type {!proto.aggregator.CustomCodeType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** - * @param {string} value - * @return {!proto.aggregator.GraphQLDataQuery} returns this + * @param {!proto.aggregator.CustomCodeType} value + * @return {!proto.aggregator.CustomCodeNode} returns this */ -proto.aggregator.GraphQLDataQuery.prototype.setUrl = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); +proto.aggregator.CustomCodeNode.prototype.setType = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); }; /** - * optional string query = 2; + * optional string source = 2; * @return {string} */ -proto.aggregator.GraphQLDataQuery.prototype.getQuery = function() { +proto.aggregator.CustomCodeNode.prototype.getSource = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @return {!proto.aggregator.GraphQLDataQuery} returns this + * @return {!proto.aggregator.CustomCodeNode} returns this */ -proto.aggregator.GraphQLDataQuery.prototype.setQuery = function(value) { +proto.aggregator.CustomCodeNode.prototype.setSource = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; @@ -3326,8 +4198,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.aggregator.HTTPAPICall.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.HTTPAPICall.toObject(opt_includeInstance, this); +proto.aggregator.ConditionJump.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ConditionJump.toObject(opt_includeInstance, this); }; @@ -3336,15 +4208,14 @@ proto.aggregator.HTTPAPICall.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.HTTPAPICall} msg The msg instance to transform. + * @param {!proto.aggregator.ConditionJump} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.HTTPAPICall.toObject = function(includeInstance, msg) { +proto.aggregator.ConditionJump.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, "") + expression: jspb.Message.getFieldWithDefault(msg, 1, ""), + next: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { @@ -3358,23 +4229,23 @@ proto.aggregator.HTTPAPICall.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.HTTPAPICall} + * @return {!proto.aggregator.ConditionJump} */ -proto.aggregator.HTTPAPICall.deserializeBinary = function(bytes) { +proto.aggregator.ConditionJump.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.HTTPAPICall; - return proto.aggregator.HTTPAPICall.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.ConditionJump; + return proto.aggregator.ConditionJump.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.aggregator.HTTPAPICall} msg The message object to deserialize into. + * @param {!proto.aggregator.ConditionJump} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.HTTPAPICall} + * @return {!proto.aggregator.ConditionJump} */ -proto.aggregator.HTTPAPICall.deserializeBinaryFromReader = function(msg, reader) { +proto.aggregator.ConditionJump.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3383,17 +4254,11 @@ proto.aggregator.HTTPAPICall.deserializeBinaryFromReader = function(msg, reader) switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setUrl(value); + msg.setExpression(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); + msg.setNext(value); break; default: reader.skipField(); @@ -3408,9 +4273,9 @@ proto.aggregator.HTTPAPICall.deserializeBinaryFromReader = function(msg, reader) * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.HTTPAPICall.prototype.serializeBinary = function() { +proto.aggregator.ConditionJump.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.HTTPAPICall.serializeBinaryToWriter(this, writer); + proto.aggregator.ConditionJump.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3418,27 +4283,23 @@ proto.aggregator.HTTPAPICall.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.HTTPAPICall} message + * @param {!proto.aggregator.ConditionJump} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.HTTPAPICall.serializeBinaryToWriter = function(message, writer) { +proto.aggregator.ConditionJump.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getUrl(); + f = message.getExpression(); 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(); + f = message.getNext(); if (f.length > 0) { writer.writeString( - 3, + 2, f ); } @@ -3446,64 +4307,49 @@ proto.aggregator.HTTPAPICall.serializeBinaryToWriter = function(message, writer) /** - * optional string url = 1; + * optional string expression = 1; * @return {string} */ -proto.aggregator.HTTPAPICall.prototype.getUrl = function() { +proto.aggregator.ConditionJump.prototype.getExpression = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.aggregator.HTTPAPICall} returns this + * @return {!proto.aggregator.ConditionJump} returns this */ -proto.aggregator.HTTPAPICall.prototype.setUrl = function(value) { +proto.aggregator.ConditionJump.prototype.setExpression = 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.HTTPAPICall.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.HTTPAPICall} returns this - */ -proto.aggregator.HTTPAPICall.prototype.clearHeadersMap = function() { - this.getHeadersMap().clear(); - return this;}; - - -/** - * optional string body = 3; + * optional string next = 2; * @return {string} */ -proto.aggregator.HTTPAPICall.prototype.getBody = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.aggregator.ConditionJump.prototype.getNext = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @return {!proto.aggregator.HTTPAPICall} returns this + * @return {!proto.aggregator.ConditionJump} returns this */ -proto.aggregator.HTTPAPICall.prototype.setBody = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); +proto.aggregator.ConditionJump.prototype.setNext = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.aggregator.BranchNode.repeatedFields_ = [2]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -3519,8 +4365,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.aggregator.CustomCode.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.CustomCode.toObject(opt_includeInstance, this); +proto.aggregator.BranchNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.BranchNode.toObject(opt_includeInstance, this); }; @@ -3529,14 +4375,16 @@ proto.aggregator.CustomCode.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.CustomCode} 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.CustomCode.toObject = function(includeInstance, msg) { +proto.aggregator.BranchNode.toObject = function(includeInstance, msg) { var f, obj = { - type: jspb.Message.getFieldWithDefault(msg, 1, 0), - body: jspb.Message.getFieldWithDefault(msg, 2, "") + pb_if: (f = msg.getIf()) && proto.aggregator.ConditionJump.toObject(includeInstance, f), + elseifsList: jspb.Message.toObjectList(msg.getElseifsList(), + proto.aggregator.ConditionJump.toObject, includeInstance), + pb_else: (f = msg.getElse()) && proto.aggregator.ConditionJump.toObject(includeInstance, f) }; if (includeInstance) { @@ -3550,23 +4398,23 @@ proto.aggregator.CustomCode.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.CustomCode} + * @return {!proto.aggregator.BranchNode} */ -proto.aggregator.CustomCode.deserializeBinary = function(bytes) { +proto.aggregator.BranchNode.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.CustomCode; - return proto.aggregator.CustomCode.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.CustomCode} 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.CustomCode} + * @return {!proto.aggregator.BranchNode} */ -proto.aggregator.CustomCode.deserializeBinaryFromReader = function(msg, reader) { +proto.aggregator.BranchNode.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3574,12 +4422,19 @@ proto.aggregator.CustomCode.deserializeBinaryFromReader = function(msg, reader) var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!proto.aggregator.CustomCodeType} */ (reader.readEnum()); - msg.setType(value); + var value = new proto.aggregator.ConditionJump; + reader.readMessage(value,proto.aggregator.ConditionJump.deserializeBinaryFromReader); + msg.setIf(value); break; case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setBody(value); + var value = new proto.aggregator.ConditionJump; + reader.readMessage(value,proto.aggregator.ConditionJump.deserializeBinaryFromReader); + msg.addElseifs(value); + break; + case 3: + var value = new proto.aggregator.ConditionJump; + reader.readMessage(value,proto.aggregator.ConditionJump.deserializeBinaryFromReader); + msg.setElse(value); break; default: reader.skipField(); @@ -3591,75 +4446,161 @@ proto.aggregator.CustomCode.deserializeBinaryFromReader = function(msg, reader) /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.aggregator.BranchNode.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.BranchNode.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.BranchNode} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.BranchNode.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIf(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.aggregator.ConditionJump.serializeBinaryToWriter + ); + } + f = message.getElseifsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 2, + f, + proto.aggregator.ConditionJump.serializeBinaryToWriter + ); + } + f = message.getElse(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.aggregator.ConditionJump.serializeBinaryToWriter + ); + } +}; + + +/** + * optional ConditionJump if = 1; + * @return {?proto.aggregator.ConditionJump} + */ +proto.aggregator.BranchNode.prototype.getIf = function() { + return /** @type{?proto.aggregator.ConditionJump} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.ConditionJump, 1)); +}; + + +/** + * @param {?proto.aggregator.ConditionJump|undefined} value + * @return {!proto.aggregator.BranchNode} returns this +*/ +proto.aggregator.BranchNode.prototype.setIf = function(value) { + return jspb.Message.setWrapperField(this, 1, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.aggregator.BranchNode} returns this + */ +proto.aggregator.BranchNode.prototype.clearIf = function() { + return this.setIf(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.aggregator.BranchNode.prototype.hasIf = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * repeated ConditionJump elseIfs = 2; + * @return {!Array} */ -proto.aggregator.CustomCode.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.CustomCode.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.aggregator.BranchNode.prototype.getElseifsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.ConditionJump, 2)); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.CustomCode} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * @param {!Array} value + * @return {!proto.aggregator.BranchNode} returns this +*/ +proto.aggregator.BranchNode.prototype.setElseifsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 2, value); +}; + + +/** + * @param {!proto.aggregator.ConditionJump=} opt_value + * @param {number=} opt_index + * @return {!proto.aggregator.ConditionJump} */ -proto.aggregator.CustomCode.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getType(); - if (f !== 0.0) { - writer.writeEnum( - 1, - f - ); - } - f = message.getBody(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } +proto.aggregator.BranchNode.prototype.addElseifs = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.aggregator.ConditionJump, opt_index); }; /** - * optional CustomCodeType type = 1; - * @return {!proto.aggregator.CustomCodeType} + * Clears the list making it empty but non-null. + * @return {!proto.aggregator.BranchNode} returns this */ -proto.aggregator.CustomCode.prototype.getType = function() { - return /** @type {!proto.aggregator.CustomCodeType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.aggregator.BranchNode.prototype.clearElseifsList = function() { + return this.setElseifsList([]); }; /** - * @param {!proto.aggregator.CustomCodeType} value - * @return {!proto.aggregator.CustomCode} returns this + * optional ConditionJump else = 3; + * @return {?proto.aggregator.ConditionJump} */ -proto.aggregator.CustomCode.prototype.setType = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); +proto.aggregator.BranchNode.prototype.getElse = function() { + return /** @type{?proto.aggregator.ConditionJump} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.ConditionJump, 3)); }; /** - * optional string body = 2; - * @return {string} + * @param {?proto.aggregator.ConditionJump|undefined} value + * @return {!proto.aggregator.BranchNode} returns this +*/ +proto.aggregator.BranchNode.prototype.setElse = function(value) { + return jspb.Message.setWrapperField(this, 3, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.aggregator.BranchNode} returns this */ -proto.aggregator.CustomCode.prototype.getBody = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.aggregator.BranchNode.prototype.clearElse = function() { + return this.setElse(undefined); }; /** - * @param {string} value - * @return {!proto.aggregator.CustomCode} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.aggregator.CustomCode.prototype.setBody = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.aggregator.BranchNode.prototype.hasElse = function() { + return jspb.Message.getField(this, 3) != null; }; @@ -3679,8 +4620,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.aggregator.ConditionJump.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.ConditionJump.toObject(opt_includeInstance, this); +proto.aggregator.FilterNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.FilterNode.toObject(opt_includeInstance, this); }; @@ -3689,14 +4630,13 @@ proto.aggregator.ConditionJump.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.ConditionJump} msg The msg instance to transform. + * @param {!proto.aggregator.FilterNode} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.ConditionJump.toObject = function(includeInstance, msg) { +proto.aggregator.FilterNode.toObject = function(includeInstance, msg) { var f, obj = { - expression: jspb.Message.getFieldWithDefault(msg, 1, ""), - next: jspb.Message.getFieldWithDefault(msg, 2, "") + expression: jspb.Message.getFieldWithDefault(msg, 1, "") }; if (includeInstance) { @@ -3710,23 +4650,23 @@ proto.aggregator.ConditionJump.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.ConditionJump} + * @return {!proto.aggregator.FilterNode} */ -proto.aggregator.ConditionJump.deserializeBinary = function(bytes) { +proto.aggregator.FilterNode.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ConditionJump; - return proto.aggregator.ConditionJump.deserializeBinaryFromReader(msg, reader); + 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.ConditionJump} msg The message object to deserialize into. + * @param {!proto.aggregator.FilterNode} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.ConditionJump} + * @return {!proto.aggregator.FilterNode} */ -proto.aggregator.ConditionJump.deserializeBinaryFromReader = function(msg, reader) { +proto.aggregator.FilterNode.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3737,10 +4677,6 @@ proto.aggregator.ConditionJump.deserializeBinaryFromReader = function(msg, reade var value = /** @type {string} */ (reader.readString()); msg.setExpression(value); break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setNext(value); - break; default: reader.skipField(); break; @@ -3754,9 +4690,9 @@ proto.aggregator.ConditionJump.deserializeBinaryFromReader = function(msg, reade * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.ConditionJump.prototype.serializeBinary = function() { +proto.aggregator.FilterNode.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.ConditionJump.serializeBinaryToWriter(this, writer); + proto.aggregator.FilterNode.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3764,11 +4700,11 @@ proto.aggregator.ConditionJump.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.ConditionJump} message + * @param {!proto.aggregator.FilterNode} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.ConditionJump.serializeBinaryToWriter = function(message, writer) { +proto.aggregator.FilterNode.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getExpression(); if (f.length > 0) { @@ -3777,13 +4713,6 @@ proto.aggregator.ConditionJump.serializeBinaryToWriter = function(message, write f ); } - f = message.getNext(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } }; @@ -3791,45 +4720,20 @@ proto.aggregator.ConditionJump.serializeBinaryToWriter = function(message, write * optional string expression = 1; * @return {string} */ -proto.aggregator.ConditionJump.prototype.getExpression = function() { +proto.aggregator.FilterNode.prototype.getExpression = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.aggregator.ConditionJump} returns this + * @return {!proto.aggregator.FilterNode} returns this */ -proto.aggregator.ConditionJump.prototype.setExpression = function(value) { +proto.aggregator.FilterNode.prototype.setExpression = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; -/** - * optional string next = 2; - * @return {string} - */ -proto.aggregator.ConditionJump.prototype.getNext = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.aggregator.ConditionJump} returns this - */ -proto.aggregator.ConditionJump.prototype.setNext = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.aggregator.BranchAction.repeatedFields_ = [2]; @@ -3846,8 +4750,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.aggregator.BranchAction.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.BranchAction.toObject(opt_includeInstance, this); +proto.aggregator.TaskEdge.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.TaskEdge.toObject(opt_includeInstance, this); }; @@ -3856,16 +4760,15 @@ proto.aggregator.BranchAction.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.BranchAction} msg The msg instance to transform. + * @param {!proto.aggregator.TaskEdge} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.BranchAction.toObject = function(includeInstance, msg) { +proto.aggregator.TaskEdge.toObject = function(includeInstance, msg) { var f, obj = { - pb_if: (f = msg.getIf()) && proto.aggregator.ConditionJump.toObject(includeInstance, f), - elseifsList: jspb.Message.toObjectList(msg.getElseifsList(), - proto.aggregator.ConditionJump.toObject, includeInstance), - pb_else: (f = msg.getElse()) && proto.aggregator.ConditionJump.toObject(includeInstance, f) + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + source: jspb.Message.getFieldWithDefault(msg, 2, ""), + target: jspb.Message.getFieldWithDefault(msg, 3, "") }; if (includeInstance) { @@ -3879,23 +4782,23 @@ proto.aggregator.BranchAction.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.BranchAction} + * @return {!proto.aggregator.TaskEdge} */ -proto.aggregator.BranchAction.deserializeBinary = function(bytes) { +proto.aggregator.TaskEdge.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.BranchAction; - return proto.aggregator.BranchAction.deserializeBinaryFromReader(msg, reader); + 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.BranchAction} msg The message object to deserialize into. + * @param {!proto.aggregator.TaskEdge} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.BranchAction} + * @return {!proto.aggregator.TaskEdge} */ -proto.aggregator.BranchAction.deserializeBinaryFromReader = function(msg, reader) { +proto.aggregator.TaskEdge.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3903,19 +4806,16 @@ proto.aggregator.BranchAction.deserializeBinaryFromReader = function(msg, reader var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.aggregator.ConditionJump; - reader.readMessage(value,proto.aggregator.ConditionJump.deserializeBinaryFromReader); - msg.setIf(value); + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); break; case 2: - var value = new proto.aggregator.ConditionJump; - reader.readMessage(value,proto.aggregator.ConditionJump.deserializeBinaryFromReader); - msg.addElseifs(value); + var value = /** @type {string} */ (reader.readString()); + msg.setSource(value); break; case 3: - var value = new proto.aggregator.ConditionJump; - reader.readMessage(value,proto.aggregator.ConditionJump.deserializeBinaryFromReader); - msg.setElse(value); + var value = /** @type {string} */ (reader.readString()); + msg.setTarget(value); break; default: reader.skipField(); @@ -3930,9 +4830,9 @@ proto.aggregator.BranchAction.deserializeBinaryFromReader = function(msg, reader * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.BranchAction.prototype.serializeBinary = function() { +proto.aggregator.TaskEdge.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.BranchAction.serializeBinaryToWriter(this, writer); + proto.aggregator.TaskEdge.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3940,158 +4840,122 @@ proto.aggregator.BranchAction.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.BranchAction} message + * @param {!proto.aggregator.TaskEdge} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.BranchAction.serializeBinaryToWriter = function(message, writer) { +proto.aggregator.TaskEdge.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getIf(); - if (f != null) { - writer.writeMessage( + f = message.getId(); + if (f.length > 0) { + writer.writeString( 1, - f, - proto.aggregator.ConditionJump.serializeBinaryToWriter + f ); } - f = message.getElseifsList(); + f = message.getSource(); if (f.length > 0) { - writer.writeRepeatedMessage( + writer.writeString( 2, - f, - proto.aggregator.ConditionJump.serializeBinaryToWriter + f ); } - f = message.getElse(); - if (f != null) { - writer.writeMessage( + f = message.getTarget(); + if (f.length > 0) { + writer.writeString( 3, - f, - proto.aggregator.ConditionJump.serializeBinaryToWriter + f ); } }; /** - * optional ConditionJump If = 1; - * @return {?proto.aggregator.ConditionJump} - */ -proto.aggregator.BranchAction.prototype.getIf = function() { - return /** @type{?proto.aggregator.ConditionJump} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.ConditionJump, 1)); -}; - - -/** - * @param {?proto.aggregator.ConditionJump|undefined} value - * @return {!proto.aggregator.BranchAction} returns this -*/ -proto.aggregator.BranchAction.prototype.setIf = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.aggregator.BranchAction} returns this + * optional string id = 1; + * @return {string} */ -proto.aggregator.BranchAction.prototype.clearIf = function() { - return this.setIf(undefined); +proto.aggregator.TaskEdge.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {string} value + * @return {!proto.aggregator.TaskEdge} returns this */ -proto.aggregator.BranchAction.prototype.hasIf = function() { - return jspb.Message.getField(this, 1) != null; +proto.aggregator.TaskEdge.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; /** - * repeated ConditionJump ElseIfs = 2; - * @return {!Array} + * optional string source = 2; + * @return {string} */ -proto.aggregator.BranchAction.prototype.getElseifsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.aggregator.ConditionJump, 2)); -}; - - -/** - * @param {!Array} value - * @return {!proto.aggregator.BranchAction} returns this -*/ -proto.aggregator.BranchAction.prototype.setElseifsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); +proto.aggregator.TaskEdge.prototype.getSource = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * @param {!proto.aggregator.ConditionJump=} opt_value - * @param {number=} opt_index - * @return {!proto.aggregator.ConditionJump} + * @param {string} value + * @return {!proto.aggregator.TaskEdge} returns this */ -proto.aggregator.BranchAction.prototype.addElseifs = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.aggregator.ConditionJump, opt_index); +proto.aggregator.TaskEdge.prototype.setSource = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.aggregator.BranchAction} returns this + * optional string target = 3; + * @return {string} */ -proto.aggregator.BranchAction.prototype.clearElseifsList = function() { - return this.setElseifsList([]); +proto.aggregator.TaskEdge.prototype.getTarget = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** - * optional ConditionJump Else = 3; - * @return {?proto.aggregator.ConditionJump} + * @param {string} value + * @return {!proto.aggregator.TaskEdge} returns this */ -proto.aggregator.BranchAction.prototype.getElse = function() { - return /** @type{?proto.aggregator.ConditionJump} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.ConditionJump, 3)); +proto.aggregator.TaskEdge.prototype.setTarget = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); }; -/** - * @param {?proto.aggregator.ConditionJump|undefined} value - * @return {!proto.aggregator.BranchAction} returns this -*/ -proto.aggregator.BranchAction.prototype.setElse = function(value) { - return jspb.Message.setWrapperField(this, 3, value); -}; - /** - * Clears the message field making it undefined. - * @return {!proto.aggregator.BranchAction} returns this + * 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.BranchAction.prototype.clearElse = function() { - return this.setElse(undefined); -}; - +proto.aggregator.TaskNode.oneofGroups_ = [[10,11,12,13,14,15,16,17]]; /** - * Returns whether this field is set. - * @return {boolean} + * @enum {number} */ -proto.aggregator.BranchAction.prototype.hasElse = function() { - return jspb.Message.getField(this, 3) != null; +proto.aggregator.TaskNode.TaskBodyCase = { + TASK_BODY_NOT_SET: 0, + ETH_TRANSFER: 10, + CONTRACT_WRITE: 11, + CONTRACT_READ: 12, + GRAPHQL_DATA_QUERY: 13, + REST_API: 14, + BRANCH: 15, + FILTER: 16, + CUSTOM_CODE: 17 }; - - /** - * List of repeated fields within this message type. - * @private {!Array} - * @const + * @return {proto.aggregator.TaskNode.TaskBodyCase} */ -proto.aggregator.TaskAction.repeatedFields_ = [4]; +proto.aggregator.TaskNode.prototype.getTaskBodyCase = function() { + return /** @type {proto.aggregator.TaskNode.TaskBodyCase} */(jspb.Message.computeOneofCase(this, proto.aggregator.TaskNode.oneofGroups_[0])); +}; @@ -4108,8 +4972,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.aggregator.TaskAction.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.TaskAction.toObject(opt_includeInstance, this); +proto.aggregator.TaskNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.TaskNode.toObject(opt_includeInstance, this); }; @@ -4118,22 +4982,23 @@ proto.aggregator.TaskAction.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.TaskAction} msg The msg instance to transform. + * @param {!proto.aggregator.TaskNode} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.TaskAction.toObject = function(includeInstance, msg) { +proto.aggregator.TaskNode.toObject = function(includeInstance, msg) { var f, obj = { - taskType: jspb.Message.getFieldWithDefault(msg, 1, 0), + nodeType: jspb.Message.getFieldWithDefault(msg, 1, 0), id: jspb.Message.getFieldWithDefault(msg, 2, ""), name: jspb.Message.getFieldWithDefault(msg, 3, ""), - nextList: (f = jspb.Message.getRepeatedField(msg, 4)) == null ? undefined : f, - ethTransfer: (f = msg.getEthTransfer()) && proto.aggregator.ETHTransfer.toObject(includeInstance, f), - contractExecution: (f = msg.getContractExecution()) && proto.aggregator.ContractExecution.toObject(includeInstance, f), - graphqlDataQuery: (f = msg.getGraphqlDataQuery()) && proto.aggregator.GraphQLDataQuery.toObject(includeInstance, f), - httpDataQuery: (f = msg.getHttpDataQuery()) && proto.aggregator.HTTPAPICall.toObject(includeInstance, f), - customCode: (f = msg.getCustomCode()) && proto.aggregator.CustomCode.toObject(includeInstance, f), - branch: (f = msg.getBranch()) && proto.aggregator.BranchAction.toObject(includeInstance, f) + 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.ContractQueryNode.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), + customCode: (f = msg.getCustomCode()) && proto.aggregator.CustomCodeNode.toObject(includeInstance, f) }; if (includeInstance) { @@ -4147,23 +5012,23 @@ proto.aggregator.TaskAction.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.TaskAction} + * @return {!proto.aggregator.TaskNode} */ -proto.aggregator.TaskAction.deserializeBinary = function(bytes) { +proto.aggregator.TaskNode.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.TaskAction; - return proto.aggregator.TaskAction.deserializeBinaryFromReader(msg, reader); + 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.TaskAction} msg The message object to deserialize into. + * @param {!proto.aggregator.TaskNode} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.TaskAction} + * @return {!proto.aggregator.TaskNode} */ -proto.aggregator.TaskAction.deserializeBinaryFromReader = function(msg, reader) { +proto.aggregator.TaskNode.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -4172,7 +5037,7 @@ proto.aggregator.TaskAction.deserializeBinaryFromReader = function(msg, reader) switch (field) { case 1: var value = /** @type {!proto.aggregator.TaskType} */ (reader.readEnum()); - msg.setTaskType(value); + msg.setNodeType(value); break; case 2: var value = /** @type {string} */ (reader.readString()); @@ -4182,40 +5047,46 @@ proto.aggregator.TaskAction.deserializeBinaryFromReader = function(msg, reader) var value = /** @type {string} */ (reader.readString()); msg.setName(value); break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.addNext(value); - break; case 10: - var value = new proto.aggregator.ETHTransfer; - reader.readMessage(value,proto.aggregator.ETHTransfer.deserializeBinaryFromReader); + var value = new proto.aggregator.ETHTransferNode; + reader.readMessage(value,proto.aggregator.ETHTransferNode.deserializeBinaryFromReader); msg.setEthTransfer(value); break; case 11: - var value = new proto.aggregator.ContractExecution; - reader.readMessage(value,proto.aggregator.ContractExecution.deserializeBinaryFromReader); - msg.setContractExecution(value); + var value = new proto.aggregator.ContractWriteNode; + reader.readMessage(value,proto.aggregator.ContractWriteNode.deserializeBinaryFromReader); + msg.setContractWrite(value); break; case 12: - var value = new proto.aggregator.GraphQLDataQuery; - reader.readMessage(value,proto.aggregator.GraphQLDataQuery.deserializeBinaryFromReader); - msg.setGraphqlDataQuery(value); + var value = new proto.aggregator.ContractQueryNode; + reader.readMessage(value,proto.aggregator.ContractQueryNode.deserializeBinaryFromReader); + msg.setContractRead(value); break; case 13: - var value = new proto.aggregator.HTTPAPICall; - reader.readMessage(value,proto.aggregator.HTTPAPICall.deserializeBinaryFromReader); - msg.setHttpDataQuery(value); + var value = new proto.aggregator.GraphQLQueryNode; + reader.readMessage(value,proto.aggregator.GraphQLQueryNode.deserializeBinaryFromReader); + msg.setGraphqlDataQuery(value); break; case 14: - var value = new proto.aggregator.CustomCode; - reader.readMessage(value,proto.aggregator.CustomCode.deserializeBinaryFromReader); - msg.setCustomCode(value); + var value = new proto.aggregator.RestAPINode; + reader.readMessage(value,proto.aggregator.RestAPINode.deserializeBinaryFromReader); + msg.setRestApi(value); break; case 15: - var value = new proto.aggregator.BranchAction; - reader.readMessage(value,proto.aggregator.BranchAction.deserializeBinaryFromReader); + 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.CustomCodeNode; + reader.readMessage(value,proto.aggregator.CustomCodeNode.deserializeBinaryFromReader); + msg.setCustomCode(value); + break; default: reader.skipField(); break; @@ -4229,9 +5100,9 @@ proto.aggregator.TaskAction.deserializeBinaryFromReader = function(msg, reader) * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.TaskAction.prototype.serializeBinary = function() { +proto.aggregator.TaskNode.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.TaskAction.serializeBinaryToWriter(this, writer); + proto.aggregator.TaskNode.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -4239,13 +5110,13 @@ proto.aggregator.TaskAction.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.TaskAction} message + * @param {!proto.aggregator.TaskNode} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.TaskAction.serializeBinaryToWriter = function(message, writer) { +proto.aggregator.TaskNode.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getTaskType(); + f = message.getNodeType(); if (f !== 0.0) { writer.writeEnum( 1, @@ -4261,15 +5132,8 @@ proto.aggregator.TaskAction.serializeBinaryToWriter = function(message, writer) } f = message.getName(); if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getNextList(); - if (f.length > 0) { - writer.writeRepeatedString( - 4, + writer.writeString( + 3, f ); } @@ -4278,39 +5142,39 @@ proto.aggregator.TaskAction.serializeBinaryToWriter = function(message, writer) writer.writeMessage( 10, f, - proto.aggregator.ETHTransfer.serializeBinaryToWriter + proto.aggregator.ETHTransferNode.serializeBinaryToWriter ); } - f = message.getContractExecution(); + f = message.getContractWrite(); if (f != null) { writer.writeMessage( 11, f, - proto.aggregator.ContractExecution.serializeBinaryToWriter + proto.aggregator.ContractWriteNode.serializeBinaryToWriter ); } - f = message.getGraphqlDataQuery(); + f = message.getContractRead(); if (f != null) { writer.writeMessage( 12, f, - proto.aggregator.GraphQLDataQuery.serializeBinaryToWriter + proto.aggregator.ContractQueryNode.serializeBinaryToWriter ); } - f = message.getHttpDataQuery(); + f = message.getGraphqlDataQuery(); if (f != null) { writer.writeMessage( 13, f, - proto.aggregator.HTTPAPICall.serializeBinaryToWriter + proto.aggregator.GraphQLQueryNode.serializeBinaryToWriter ); } - f = message.getCustomCode(); + f = message.getRestApi(); if (f != null) { writer.writeMessage( 14, f, - proto.aggregator.CustomCode.serializeBinaryToWriter + proto.aggregator.RestAPINode.serializeBinaryToWriter ); } f = message.getBranch(); @@ -4318,26 +5182,42 @@ proto.aggregator.TaskAction.serializeBinaryToWriter = function(message, writer) writer.writeMessage( 15, f, - proto.aggregator.BranchAction.serializeBinaryToWriter + proto.aggregator.BranchNode.serializeBinaryToWriter + ); + } + f = message.getFilter(); + if (f != null) { + writer.writeMessage( + 16, + f, + proto.aggregator.FilterNode.serializeBinaryToWriter + ); + } + f = message.getCustomCode(); + if (f != null) { + writer.writeMessage( + 17, + f, + proto.aggregator.CustomCodeNode.serializeBinaryToWriter ); } }; /** - * optional TaskType task_type = 1; + * optional TaskType node_type = 1; * @return {!proto.aggregator.TaskType} */ -proto.aggregator.TaskAction.prototype.getTaskType = function() { +proto.aggregator.TaskNode.prototype.getNodeType = function() { return /** @type {!proto.aggregator.TaskType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** * @param {!proto.aggregator.TaskType} value - * @return {!proto.aggregator.TaskAction} returns this + * @return {!proto.aggregator.TaskNode} returns this */ -proto.aggregator.TaskAction.prototype.setTaskType = function(value) { +proto.aggregator.TaskNode.prototype.setNodeType = function(value) { return jspb.Message.setProto3EnumField(this, 1, value); }; @@ -4346,16 +5226,16 @@ proto.aggregator.TaskAction.prototype.setTaskType = function(value) { * optional string id = 2; * @return {string} */ -proto.aggregator.TaskAction.prototype.getId = function() { +proto.aggregator.TaskNode.prototype.getId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @return {!proto.aggregator.TaskAction} returns this + * @return {!proto.aggregator.TaskNode} returns this */ -proto.aggregator.TaskAction.prototype.setId = function(value) { +proto.aggregator.TaskNode.prototype.setId = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; @@ -4364,82 +5244,82 @@ proto.aggregator.TaskAction.prototype.setId = function(value) { * optional string name = 3; * @return {string} */ -proto.aggregator.TaskAction.prototype.getName = function() { +proto.aggregator.TaskNode.prototype.getName = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value - * @return {!proto.aggregator.TaskAction} returns this + * @return {!proto.aggregator.TaskNode} returns this */ -proto.aggregator.TaskAction.prototype.setName = function(value) { +proto.aggregator.TaskNode.prototype.setName = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; /** - * repeated string next = 4; - * @return {!Array} + * optional ETHTransferNode eth_transfer = 10; + * @return {?proto.aggregator.ETHTransferNode} */ -proto.aggregator.TaskAction.prototype.getNextList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 4)); +proto.aggregator.TaskNode.prototype.getEthTransfer = function() { + return /** @type{?proto.aggregator.ETHTransferNode} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.ETHTransferNode, 10)); }; /** - * @param {!Array} value - * @return {!proto.aggregator.TaskAction} returns this - */ -proto.aggregator.TaskAction.prototype.setNextList = function(value) { - return jspb.Message.setField(this, 4, value || []); + * @param {?proto.aggregator.ETHTransferNode|undefined} value + * @return {!proto.aggregator.TaskNode} returns this +*/ +proto.aggregator.TaskNode.prototype.setEthTransfer = function(value) { + return jspb.Message.setOneofWrapperField(this, 10, proto.aggregator.TaskNode.oneofGroups_[0], value); }; /** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.aggregator.TaskAction} returns this + * Clears the message field making it undefined. + * @return {!proto.aggregator.TaskNode} returns this */ -proto.aggregator.TaskAction.prototype.addNext = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 4, value, opt_index); +proto.aggregator.TaskNode.prototype.clearEthTransfer = function() { + return this.setEthTransfer(undefined); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.aggregator.TaskAction} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.aggregator.TaskAction.prototype.clearNextList = function() { - return this.setNextList([]); +proto.aggregator.TaskNode.prototype.hasEthTransfer = function() { + return jspb.Message.getField(this, 10) != null; }; /** - * optional ETHTransfer eth_transfer = 10; - * @return {?proto.aggregator.ETHTransfer} + * optional ContractWriteNode contract_write = 11; + * @return {?proto.aggregator.ContractWriteNode} */ -proto.aggregator.TaskAction.prototype.getEthTransfer = function() { - return /** @type{?proto.aggregator.ETHTransfer} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.ETHTransfer, 10)); +proto.aggregator.TaskNode.prototype.getContractWrite = function() { + return /** @type{?proto.aggregator.ContractWriteNode} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.ContractWriteNode, 11)); }; /** - * @param {?proto.aggregator.ETHTransfer|undefined} value - * @return {!proto.aggregator.TaskAction} returns this + * @param {?proto.aggregator.ContractWriteNode|undefined} value + * @return {!proto.aggregator.TaskNode} returns this */ -proto.aggregator.TaskAction.prototype.setEthTransfer = function(value) { - return jspb.Message.setWrapperField(this, 10, value); +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.TaskAction} returns this + * @return {!proto.aggregator.TaskNode} returns this */ -proto.aggregator.TaskAction.prototype.clearEthTransfer = function() { - return this.setEthTransfer(undefined); +proto.aggregator.TaskNode.prototype.clearContractWrite = function() { + return this.setContractWrite(undefined); }; @@ -4447,36 +5327,36 @@ proto.aggregator.TaskAction.prototype.clearEthTransfer = function() { * Returns whether this field is set. * @return {boolean} */ -proto.aggregator.TaskAction.prototype.hasEthTransfer = function() { - return jspb.Message.getField(this, 10) != null; +proto.aggregator.TaskNode.prototype.hasContractWrite = function() { + return jspb.Message.getField(this, 11) != null; }; /** - * optional ContractExecution contract_execution = 11; - * @return {?proto.aggregator.ContractExecution} + * optional ContractQueryNode contract_read = 12; + * @return {?proto.aggregator.ContractQueryNode} */ -proto.aggregator.TaskAction.prototype.getContractExecution = function() { - return /** @type{?proto.aggregator.ContractExecution} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.ContractExecution, 11)); +proto.aggregator.TaskNode.prototype.getContractRead = function() { + return /** @type{?proto.aggregator.ContractQueryNode} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.ContractQueryNode, 12)); }; /** - * @param {?proto.aggregator.ContractExecution|undefined} value - * @return {!proto.aggregator.TaskAction} returns this + * @param {?proto.aggregator.ContractQueryNode|undefined} value + * @return {!proto.aggregator.TaskNode} returns this */ -proto.aggregator.TaskAction.prototype.setContractExecution = function(value) { - return jspb.Message.setWrapperField(this, 11, value); +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.TaskAction} returns this + * @return {!proto.aggregator.TaskNode} returns this */ -proto.aggregator.TaskAction.prototype.clearContractExecution = function() { - return this.setContractExecution(undefined); +proto.aggregator.TaskNode.prototype.clearContractRead = function() { + return this.setContractRead(undefined); }; @@ -4484,35 +5364,35 @@ proto.aggregator.TaskAction.prototype.clearContractExecution = function() { * Returns whether this field is set. * @return {boolean} */ -proto.aggregator.TaskAction.prototype.hasContractExecution = function() { - return jspb.Message.getField(this, 11) != null; +proto.aggregator.TaskNode.prototype.hasContractRead = function() { + return jspb.Message.getField(this, 12) != null; }; /** - * optional GraphQLDataQuery graphql_data_query = 12; - * @return {?proto.aggregator.GraphQLDataQuery} + * optional GraphQLQueryNode graphql_data_query = 13; + * @return {?proto.aggregator.GraphQLQueryNode} */ -proto.aggregator.TaskAction.prototype.getGraphqlDataQuery = function() { - return /** @type{?proto.aggregator.GraphQLDataQuery} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.GraphQLDataQuery, 12)); +proto.aggregator.TaskNode.prototype.getGraphqlDataQuery = function() { + return /** @type{?proto.aggregator.GraphQLQueryNode} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.GraphQLQueryNode, 13)); }; /** - * @param {?proto.aggregator.GraphQLDataQuery|undefined} value - * @return {!proto.aggregator.TaskAction} returns this + * @param {?proto.aggregator.GraphQLQueryNode|undefined} value + * @return {!proto.aggregator.TaskNode} returns this */ -proto.aggregator.TaskAction.prototype.setGraphqlDataQuery = function(value) { - return jspb.Message.setWrapperField(this, 12, value); +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.TaskAction} returns this + * @return {!proto.aggregator.TaskNode} returns this */ -proto.aggregator.TaskAction.prototype.clearGraphqlDataQuery = function() { +proto.aggregator.TaskNode.prototype.clearGraphqlDataQuery = function() { return this.setGraphqlDataQuery(undefined); }; @@ -4521,36 +5401,36 @@ proto.aggregator.TaskAction.prototype.clearGraphqlDataQuery = function() { * Returns whether this field is set. * @return {boolean} */ -proto.aggregator.TaskAction.prototype.hasGraphqlDataQuery = function() { - return jspb.Message.getField(this, 12) != null; +proto.aggregator.TaskNode.prototype.hasGraphqlDataQuery = function() { + return jspb.Message.getField(this, 13) != null; }; /** - * optional HTTPAPICall http_data_query = 13; - * @return {?proto.aggregator.HTTPAPICall} + * optional RestAPINode rest_api = 14; + * @return {?proto.aggregator.RestAPINode} */ -proto.aggregator.TaskAction.prototype.getHttpDataQuery = function() { - return /** @type{?proto.aggregator.HTTPAPICall} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.HTTPAPICall, 13)); +proto.aggregator.TaskNode.prototype.getRestApi = function() { + return /** @type{?proto.aggregator.RestAPINode} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.RestAPINode, 14)); }; /** - * @param {?proto.aggregator.HTTPAPICall|undefined} value - * @return {!proto.aggregator.TaskAction} returns this + * @param {?proto.aggregator.RestAPINode|undefined} value + * @return {!proto.aggregator.TaskNode} returns this */ -proto.aggregator.TaskAction.prototype.setHttpDataQuery = function(value) { - return jspb.Message.setWrapperField(this, 13, value); +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.TaskAction} returns this + * @return {!proto.aggregator.TaskNode} returns this */ -proto.aggregator.TaskAction.prototype.clearHttpDataQuery = function() { - return this.setHttpDataQuery(undefined); +proto.aggregator.TaskNode.prototype.clearRestApi = function() { + return this.setRestApi(undefined); }; @@ -4558,36 +5438,36 @@ proto.aggregator.TaskAction.prototype.clearHttpDataQuery = function() { * Returns whether this field is set. * @return {boolean} */ -proto.aggregator.TaskAction.prototype.hasHttpDataQuery = function() { - return jspb.Message.getField(this, 13) != null; +proto.aggregator.TaskNode.prototype.hasRestApi = function() { + return jspb.Message.getField(this, 14) != null; }; /** - * optional CustomCode custom_code = 14; - * @return {?proto.aggregator.CustomCode} + * optional BranchNode branch = 15; + * @return {?proto.aggregator.BranchNode} */ -proto.aggregator.TaskAction.prototype.getCustomCode = function() { - return /** @type{?proto.aggregator.CustomCode} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.CustomCode, 14)); +proto.aggregator.TaskNode.prototype.getBranch = function() { + return /** @type{?proto.aggregator.BranchNode} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.BranchNode, 15)); }; /** - * @param {?proto.aggregator.CustomCode|undefined} value - * @return {!proto.aggregator.TaskAction} returns this + * @param {?proto.aggregator.BranchNode|undefined} value + * @return {!proto.aggregator.TaskNode} returns this */ -proto.aggregator.TaskAction.prototype.setCustomCode = function(value) { - return jspb.Message.setWrapperField(this, 14, value); +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.TaskAction} returns this + * @return {!proto.aggregator.TaskNode} returns this */ -proto.aggregator.TaskAction.prototype.clearCustomCode = function() { - return this.setCustomCode(undefined); +proto.aggregator.TaskNode.prototype.clearBranch = function() { + return this.setBranch(undefined); }; @@ -4595,36 +5475,36 @@ proto.aggregator.TaskAction.prototype.clearCustomCode = function() { * Returns whether this field is set. * @return {boolean} */ -proto.aggregator.TaskAction.prototype.hasCustomCode = function() { - return jspb.Message.getField(this, 14) != null; +proto.aggregator.TaskNode.prototype.hasBranch = function() { + return jspb.Message.getField(this, 15) != null; }; /** - * optional BranchAction branch = 15; - * @return {?proto.aggregator.BranchAction} + * optional FilterNode filter = 16; + * @return {?proto.aggregator.FilterNode} */ -proto.aggregator.TaskAction.prototype.getBranch = function() { - return /** @type{?proto.aggregator.BranchAction} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.BranchAction, 15)); +proto.aggregator.TaskNode.prototype.getFilter = function() { + return /** @type{?proto.aggregator.FilterNode} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.FilterNode, 16)); }; /** - * @param {?proto.aggregator.BranchAction|undefined} value - * @return {!proto.aggregator.TaskAction} returns this + * @param {?proto.aggregator.FilterNode|undefined} value + * @return {!proto.aggregator.TaskNode} returns this */ -proto.aggregator.TaskAction.prototype.setBranch = function(value) { - return jspb.Message.setWrapperField(this, 15, value); +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.TaskAction} returns this + * @return {!proto.aggregator.TaskNode} returns this */ -proto.aggregator.TaskAction.prototype.clearBranch = function() { - return this.setBranch(undefined); +proto.aggregator.TaskNode.prototype.clearFilter = function() { + return this.setFilter(undefined); }; @@ -4632,8 +5512,45 @@ proto.aggregator.TaskAction.prototype.clearBranch = function() { * Returns whether this field is set. * @return {boolean} */ -proto.aggregator.TaskAction.prototype.hasBranch = function() { - return jspb.Message.getField(this, 15) != null; +proto.aggregator.TaskNode.prototype.hasFilter = function() { + return jspb.Message.getField(this, 16) != null; +}; + + +/** + * optional CustomCodeNode custom_code = 17; + * @return {?proto.aggregator.CustomCodeNode} + */ +proto.aggregator.TaskNode.prototype.getCustomCode = function() { + return /** @type{?proto.aggregator.CustomCodeNode} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.CustomCodeNode, 17)); +}; + + +/** + * @param {?proto.aggregator.CustomCodeNode|undefined} value + * @return {!proto.aggregator.TaskNode} returns this +*/ +proto.aggregator.TaskNode.prototype.setCustomCode = function(value) { + return jspb.Message.setOneofWrapperField(this, 17, proto.aggregator.TaskNode.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.aggregator.TaskNode} returns this + */ +proto.aggregator.TaskNode.prototype.clearCustomCode = function() { + return this.setCustomCode(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.aggregator.TaskNode.prototype.hasCustomCode = function() { + return jspb.Message.getField(this, 17) != null; }; @@ -4833,7 +5750,7 @@ proto.aggregator.Execution.prototype.setError = function(value) { * @private {!Array} * @const */ -proto.aggregator.Task.repeatedFields_ = [5,12]; +proto.aggregator.Task.repeatedFields_ = [11,12,13]; @@ -4868,16 +5785,18 @@ proto.aggregator.Task.toObject = function(includeInstance, msg) { var f, obj = { id: (f = msg.getId()) && proto.aggregator.UUID.toObject(includeInstance, f), owner: jspb.Message.getFieldWithDefault(msg, 2, ""), - smartAccountAddress: jspb.Message.getFieldWithDefault(msg, 3, ""), + smartWalletAddress: jspb.Message.getFieldWithDefault(msg, 3, ""), + startAt: jspb.Message.getFieldWithDefault(msg, 5, 0), + expiredAt: jspb.Message.getFieldWithDefault(msg, 6, 0), + memo: jspb.Message.getFieldWithDefault(msg, 7, ""), + completedAt: jspb.Message.getFieldWithDefault(msg, 8, 0), + recurring: jspb.Message.getBooleanFieldWithDefault(msg, 10, false), + status: jspb.Message.getFieldWithDefault(msg, 9, 0), trigger: (f = msg.getTrigger()) && proto.aggregator.TaskTrigger.toObject(includeInstance, f), nodesList: jspb.Message.toObjectList(msg.getNodesList(), - proto.aggregator.TaskAction.toObject, includeInstance), - startAt: jspb.Message.getFieldWithDefault(msg, 6, 0), - expiredAt: jspb.Message.getFieldWithDefault(msg, 7, 0), - memo: jspb.Message.getFieldWithDefault(msg, 8, ""), - completedAt: jspb.Message.getFieldWithDefault(msg, 9, 0), - status: jspb.Message.getFieldWithDefault(msg, 10, 0), - repeatable: jspb.Message.getBooleanFieldWithDefault(msg, 11, false), + proto.aggregator.TaskNode.toObject, includeInstance), + edgesList: jspb.Message.toObjectList(msg.getEdgesList(), + proto.aggregator.TaskEdge.toObject, includeInstance), executionsList: jspb.Message.toObjectList(msg.getExecutionsList(), proto.aggregator.Execution.toObject, includeInstance) }; @@ -4927,43 +5846,48 @@ proto.aggregator.Task.deserializeBinaryFromReader = function(msg, reader) { break; case 3: var value = /** @type {string} */ (reader.readString()); - msg.setSmartAccountAddress(value); - break; - case 4: - var value = new proto.aggregator.TaskTrigger; - reader.readMessage(value,proto.aggregator.TaskTrigger.deserializeBinaryFromReader); - msg.setTrigger(value); + msg.setSmartWalletAddress(value); break; case 5: - var value = new proto.aggregator.TaskAction; - reader.readMessage(value,proto.aggregator.TaskAction.deserializeBinaryFromReader); - msg.addNodes(value); - break; - case 6: var value = /** @type {number} */ (reader.readInt64()); msg.setStartAt(value); break; - case 7: + case 6: var value = /** @type {number} */ (reader.readInt64()); msg.setExpiredAt(value); break; - case 8: + case 7: var value = /** @type {string} */ (reader.readString()); msg.setMemo(value); break; - case 9: + case 8: var value = /** @type {number} */ (reader.readInt64()); msg.setCompletedAt(value); break; case 10: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setRecurring(value); + break; + case 9: var value = /** @type {!proto.aggregator.TaskStatus} */ (reader.readEnum()); msg.setStatus(value); break; + case 4: + var value = new proto.aggregator.TaskTrigger; + reader.readMessage(value,proto.aggregator.TaskTrigger.deserializeBinaryFromReader); + msg.setTrigger(value); + break; case 11: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setRepeatable(value); + var value = new proto.aggregator.TaskNode; + reader.readMessage(value,proto.aggregator.TaskNode.deserializeBinaryFromReader); + msg.addNodes(value); break; case 12: + var value = new proto.aggregator.TaskEdge; + reader.readMessage(value,proto.aggregator.TaskEdge.deserializeBinaryFromReader); + msg.addEdges(value); + break; + case 13: var value = new proto.aggregator.Execution; reader.readMessage(value,proto.aggregator.Execution.deserializeBinaryFromReader); msg.addExecutions(value); @@ -5012,76 +5936,84 @@ proto.aggregator.Task.serializeBinaryToWriter = function(message, writer) { f ); } - f = message.getSmartAccountAddress(); + f = message.getSmartWalletAddress(); if (f.length > 0) { writer.writeString( 3, f ); } - f = message.getTrigger(); - if (f != null) { - writer.writeMessage( - 4, - f, - proto.aggregator.TaskTrigger.serializeBinaryToWriter - ); - } - f = message.getNodesList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 5, - f, - proto.aggregator.TaskAction.serializeBinaryToWriter - ); - } f = message.getStartAt(); if (f !== 0) { writer.writeInt64( - 6, + 5, f ); } f = message.getExpiredAt(); if (f !== 0) { writer.writeInt64( - 7, + 6, f ); } f = message.getMemo(); if (f.length > 0) { writer.writeString( - 8, + 7, f ); } f = message.getCompletedAt(); if (f !== 0) { writer.writeInt64( - 9, + 8, + f + ); + } + f = message.getRecurring(); + if (f) { + writer.writeBool( + 10, f ); } f = message.getStatus(); if (f !== 0.0) { writer.writeEnum( - 10, + 9, f ); } - f = message.getRepeatable(); - if (f) { - writer.writeBool( + f = message.getTrigger(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.aggregator.TaskTrigger.serializeBinaryToWriter + ); + } + f = message.getNodesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( 11, - f + f, + proto.aggregator.TaskNode.serializeBinaryToWriter ); } - f = message.getExecutionsList(); + f = message.getEdgesList(); if (f.length > 0) { writer.writeRepeatedMessage( 12, f, + proto.aggregator.TaskEdge.serializeBinaryToWriter + ); + } + f = message.getExecutionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 13, + f, proto.aggregator.Execution.serializeBinaryToWriter ); } @@ -5108,56 +6040,164 @@ proto.aggregator.Task.prototype.setId = function(value) { /** - * Clears the message field making it undefined. + * Clears the message field making it undefined. + * @return {!proto.aggregator.Task} returns this + */ +proto.aggregator.Task.prototype.clearId = function() { + return this.setId(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.aggregator.Task.prototype.hasId = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional string owner = 2; + * @return {string} + */ +proto.aggregator.Task.prototype.getOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.aggregator.Task} returns this + */ +proto.aggregator.Task.prototype.setOwner = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string smart_wallet_address = 3; + * @return {string} + */ +proto.aggregator.Task.prototype.getSmartWalletAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.aggregator.Task} returns this + */ +proto.aggregator.Task.prototype.setSmartWalletAddress = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional int64 start_at = 5; + * @return {number} + */ +proto.aggregator.Task.prototype.getStartAt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.aggregator.Task} returns this + */ +proto.aggregator.Task.prototype.setStartAt = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional int64 expired_at = 6; + * @return {number} + */ +proto.aggregator.Task.prototype.getExpiredAt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.aggregator.Task} returns this + */ +proto.aggregator.Task.prototype.setExpiredAt = function(value) { + return jspb.Message.setProto3IntField(this, 6, value); +}; + + +/** + * optional string memo = 7; + * @return {string} + */ +proto.aggregator.Task.prototype.getMemo = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); +}; + + +/** + * @param {string} value + * @return {!proto.aggregator.Task} returns this + */ +proto.aggregator.Task.prototype.setMemo = function(value) { + return jspb.Message.setProto3StringField(this, 7, value); +}; + + +/** + * optional int64 completed_at = 8; + * @return {number} + */ +proto.aggregator.Task.prototype.getCompletedAt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** + * @param {number} value * @return {!proto.aggregator.Task} returns this */ -proto.aggregator.Task.prototype.clearId = function() { - return this.setId(undefined); +proto.aggregator.Task.prototype.setCompletedAt = function(value) { + return jspb.Message.setProto3IntField(this, 8, value); }; /** - * Returns whether this field is set. + * optional bool recurring = 10; * @return {boolean} */ -proto.aggregator.Task.prototype.hasId = function() { - return jspb.Message.getField(this, 1) != null; -}; - - -/** - * optional string owner = 2; - * @return {string} - */ -proto.aggregator.Task.prototype.getOwner = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.aggregator.Task.prototype.getRecurring = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 10, false)); }; /** - * @param {string} value + * @param {boolean} value * @return {!proto.aggregator.Task} returns this */ -proto.aggregator.Task.prototype.setOwner = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.aggregator.Task.prototype.setRecurring = function(value) { + return jspb.Message.setProto3BooleanField(this, 10, value); }; /** - * optional string smart_account_address = 3; - * @return {string} + * optional TaskStatus status = 9; + * @return {!proto.aggregator.TaskStatus} */ -proto.aggregator.Task.prototype.getSmartAccountAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.aggregator.Task.prototype.getStatus = function() { + return /** @type {!proto.aggregator.TaskStatus} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); }; /** - * @param {string} value + * @param {!proto.aggregator.TaskStatus} value * @return {!proto.aggregator.Task} returns this */ -proto.aggregator.Task.prototype.setSmartAccountAddress = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); +proto.aggregator.Task.prototype.setStatus = function(value) { + return jspb.Message.setProto3EnumField(this, 9, value); }; @@ -5199,31 +6239,31 @@ proto.aggregator.Task.prototype.hasTrigger = function() { /** - * repeated TaskAction nodes = 5; - * @return {!Array} + * repeated TaskNode nodes = 11; + * @return {!Array} */ proto.aggregator.Task.prototype.getNodesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.aggregator.TaskAction, 5)); + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.TaskNode, 11)); }; /** - * @param {!Array} value + * @param {!Array} value * @return {!proto.aggregator.Task} returns this */ proto.aggregator.Task.prototype.setNodesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 5, value); + return jspb.Message.setRepeatedWrapperField(this, 11, value); }; /** - * @param {!proto.aggregator.TaskAction=} opt_value + * @param {!proto.aggregator.TaskNode=} opt_value * @param {number=} opt_index - * @return {!proto.aggregator.TaskAction} + * @return {!proto.aggregator.TaskNode} */ proto.aggregator.Task.prototype.addNodes = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.aggregator.TaskAction, opt_index); + return jspb.Message.addToRepeatedWrapperField(this, 11, opt_value, proto.aggregator.TaskNode, opt_index); }; @@ -5237,120 +6277,50 @@ proto.aggregator.Task.prototype.clearNodesList = function() { /** - * optional int64 start_at = 6; - * @return {number} - */ -proto.aggregator.Task.prototype.getStartAt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.aggregator.Task} returns this - */ -proto.aggregator.Task.prototype.setStartAt = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); -}; - - -/** - * optional int64 expired_at = 7; - * @return {number} - */ -proto.aggregator.Task.prototype.getExpiredAt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.aggregator.Task} returns this - */ -proto.aggregator.Task.prototype.setExpiredAt = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); -}; - - -/** - * optional string memo = 8; - * @return {string} - */ -proto.aggregator.Task.prototype.getMemo = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); -}; - - -/** - * @param {string} value - * @return {!proto.aggregator.Task} returns this - */ -proto.aggregator.Task.prototype.setMemo = function(value) { - return jspb.Message.setProto3StringField(this, 8, value); -}; - - -/** - * optional int64 completed_at = 9; - * @return {number} - */ -proto.aggregator.Task.prototype.getCompletedAt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); -}; - - -/** - * @param {number} value - * @return {!proto.aggregator.Task} returns this - */ -proto.aggregator.Task.prototype.setCompletedAt = function(value) { - return jspb.Message.setProto3IntField(this, 9, value); -}; - - -/** - * optional TaskStatus status = 10; - * @return {!proto.aggregator.TaskStatus} + * repeated TaskEdge edges = 12; + * @return {!Array} */ -proto.aggregator.Task.prototype.getStatus = function() { - return /** @type {!proto.aggregator.TaskStatus} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +proto.aggregator.Task.prototype.getEdgesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.TaskEdge, 12)); }; /** - * @param {!proto.aggregator.TaskStatus} value + * @param {!Array} value * @return {!proto.aggregator.Task} returns this - */ -proto.aggregator.Task.prototype.setStatus = function(value) { - return jspb.Message.setProto3EnumField(this, 10, value); +*/ +proto.aggregator.Task.prototype.setEdgesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 12, value); }; /** - * optional bool repeatable = 11; - * @return {boolean} + * @param {!proto.aggregator.TaskEdge=} opt_value + * @param {number=} opt_index + * @return {!proto.aggregator.TaskEdge} */ -proto.aggregator.Task.prototype.getRepeatable = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 11, false)); +proto.aggregator.Task.prototype.addEdges = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 12, opt_value, proto.aggregator.TaskEdge, opt_index); }; /** - * @param {boolean} value + * Clears the list making it empty but non-null. * @return {!proto.aggregator.Task} returns this */ -proto.aggregator.Task.prototype.setRepeatable = function(value) { - return jspb.Message.setProto3BooleanField(this, 11, value); +proto.aggregator.Task.prototype.clearEdgesList = function() { + return this.setEdgesList([]); }; /** - * repeated Execution executions = 12; + * repeated Execution executions = 13; * @return {!Array} */ proto.aggregator.Task.prototype.getExecutionsList = function() { return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.aggregator.Execution, 12)); + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.Execution, 13)); }; @@ -5359,7 +6329,7 @@ proto.aggregator.Task.prototype.getExecutionsList = function() { * @return {!proto.aggregator.Task} returns this */ proto.aggregator.Task.prototype.setExecutionsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 12, value); + return jspb.Message.setRepeatedWrapperField(this, 13, value); }; @@ -5369,7 +6339,7 @@ proto.aggregator.Task.prototype.setExecutionsList = function(value) { * @return {!proto.aggregator.Execution} */ proto.aggregator.Task.prototype.addExecutions = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 12, opt_value, proto.aggregator.Execution, opt_index); + return jspb.Message.addToRepeatedWrapperField(this, 13, opt_value, proto.aggregator.Execution, opt_index); }; @@ -5388,7 +6358,7 @@ proto.aggregator.Task.prototype.clearExecutionsList = function() { * @private {!Array} * @const */ -proto.aggregator.CreateTaskReq.repeatedFields_ = [2]; +proto.aggregator.CreateTaskReq.repeatedFields_ = [7,8]; @@ -5422,12 +6392,15 @@ proto.aggregator.CreateTaskReq.prototype.toObject = function(opt_includeInstance proto.aggregator.CreateTaskReq.toObject = function(includeInstance, msg) { var f, obj = { trigger: (f = msg.getTrigger()) && proto.aggregator.TaskTrigger.toObject(includeInstance, f), - actionsList: jspb.Message.toObjectList(msg.getActionsList(), - proto.aggregator.TaskAction.toObject, includeInstance), - startAt: jspb.Message.getFieldWithDefault(msg, 3, 0), - expiredAt: jspb.Message.getFieldWithDefault(msg, 4, 0), - memo: jspb.Message.getFieldWithDefault(msg, 5, ""), - repeatable: jspb.Message.getBooleanFieldWithDefault(msg, 6, false) + startAt: jspb.Message.getFieldWithDefault(msg, 2, 0), + expiredAt: jspb.Message.getFieldWithDefault(msg, 3, 0), + repeatable: jspb.Message.getBooleanFieldWithDefault(msg, 4, false), + smartWalletAddress: jspb.Message.getFieldWithDefault(msg, 5, ""), + memo: jspb.Message.getFieldWithDefault(msg, 6, ""), + nodesList: jspb.Message.toObjectList(msg.getNodesList(), + proto.aggregator.TaskNode.toObject, includeInstance), + edgesList: jspb.Message.toObjectList(msg.getEdgesList(), + proto.aggregator.TaskEdge.toObject, includeInstance) }; if (includeInstance) { @@ -5470,25 +6443,34 @@ proto.aggregator.CreateTaskReq.deserializeBinaryFromReader = function(msg, reade msg.setTrigger(value); break; case 2: - var value = new proto.aggregator.TaskAction; - reader.readMessage(value,proto.aggregator.TaskAction.deserializeBinaryFromReader); - msg.addActions(value); - break; - case 3: var value = /** @type {number} */ (reader.readInt64()); msg.setStartAt(value); break; - case 4: + case 3: var value = /** @type {number} */ (reader.readInt64()); msg.setExpiredAt(value); break; + case 4: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setRepeatable(value); + break; case 5: var value = /** @type {string} */ (reader.readString()); - msg.setMemo(value); + msg.setSmartWalletAddress(value); break; case 6: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setRepeatable(value); + var value = /** @type {string} */ (reader.readString()); + msg.setMemo(value); + break; + case 7: + var value = new proto.aggregator.TaskNode; + reader.readMessage(value,proto.aggregator.TaskNode.deserializeBinaryFromReader); + msg.addNodes(value); + break; + case 8: + var value = new proto.aggregator.TaskEdge; + reader.readMessage(value,proto.aggregator.TaskEdge.deserializeBinaryFromReader); + msg.addEdges(value); break; default: reader.skipField(); @@ -5527,42 +6509,57 @@ proto.aggregator.CreateTaskReq.serializeBinaryToWriter = function(message, write proto.aggregator.TaskTrigger.serializeBinaryToWriter ); } - f = message.getActionsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 2, - f, - proto.aggregator.TaskAction.serializeBinaryToWriter - ); - } f = message.getStartAt(); if (f !== 0) { writer.writeInt64( - 3, + 2, f ); } f = message.getExpiredAt(); if (f !== 0) { writer.writeInt64( + 3, + f + ); + } + f = message.getRepeatable(); + if (f) { + writer.writeBool( 4, f ); } - f = message.getMemo(); + f = message.getSmartWalletAddress(); if (f.length > 0) { writer.writeString( 5, f ); } - f = message.getRepeatable(); - if (f) { - writer.writeBool( + f = message.getMemo(); + if (f.length > 0) { + writer.writeString( 6, f ); } + f = message.getNodesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 7, + f, + proto.aggregator.TaskNode.serializeBinaryToWriter + ); + } + f = message.getEdgesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 8, + f, + proto.aggregator.TaskEdge.serializeBinaryToWriter + ); + } }; @@ -5604,85 +6601,83 @@ proto.aggregator.CreateTaskReq.prototype.hasTrigger = function() { /** - * repeated TaskAction actions = 2; - * @return {!Array} + * optional int64 start_at = 2; + * @return {number} */ -proto.aggregator.CreateTaskReq.prototype.getActionsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.aggregator.TaskAction, 2)); +proto.aggregator.CreateTaskReq.prototype.getStartAt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** - * @param {!Array} value + * @param {number} value * @return {!proto.aggregator.CreateTaskReq} returns this -*/ -proto.aggregator.CreateTaskReq.prototype.setActionsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); + */ +proto.aggregator.CreateTaskReq.prototype.setStartAt = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; /** - * @param {!proto.aggregator.TaskAction=} opt_value - * @param {number=} opt_index - * @return {!proto.aggregator.TaskAction} + * optional int64 expired_at = 3; + * @return {number} */ -proto.aggregator.CreateTaskReq.prototype.addActions = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.aggregator.TaskAction, opt_index); +proto.aggregator.CreateTaskReq.prototype.getExpiredAt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** - * Clears the list making it empty but non-null. + * @param {number} value * @return {!proto.aggregator.CreateTaskReq} returns this */ -proto.aggregator.CreateTaskReq.prototype.clearActionsList = function() { - return this.setActionsList([]); +proto.aggregator.CreateTaskReq.prototype.setExpiredAt = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); }; /** - * optional int64 start_at = 3; - * @return {number} + * optional bool repeatable = 4; + * @return {boolean} */ -proto.aggregator.CreateTaskReq.prototype.getStartAt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.aggregator.CreateTaskReq.prototype.getRepeatable = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 4, false)); }; /** - * @param {number} value + * @param {boolean} value * @return {!proto.aggregator.CreateTaskReq} returns this */ -proto.aggregator.CreateTaskReq.prototype.setStartAt = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); +proto.aggregator.CreateTaskReq.prototype.setRepeatable = function(value) { + return jspb.Message.setProto3BooleanField(this, 4, value); }; /** - * optional int64 expired_at = 4; - * @return {number} + * optional string smart_wallet_address = 5; + * @return {string} */ -proto.aggregator.CreateTaskReq.prototype.getExpiredAt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +proto.aggregator.CreateTaskReq.prototype.getSmartWalletAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); }; /** - * @param {number} value + * @param {string} value * @return {!proto.aggregator.CreateTaskReq} returns this */ -proto.aggregator.CreateTaskReq.prototype.setExpiredAt = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); +proto.aggregator.CreateTaskReq.prototype.setSmartWalletAddress = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); }; /** - * optional string memo = 5; + * optional string memo = 6; * @return {string} */ proto.aggregator.CreateTaskReq.prototype.getMemo = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); }; @@ -5691,25 +6686,83 @@ proto.aggregator.CreateTaskReq.prototype.getMemo = function() { * @return {!proto.aggregator.CreateTaskReq} returns this */ proto.aggregator.CreateTaskReq.prototype.setMemo = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); + return jspb.Message.setProto3StringField(this, 6, value); }; /** - * optional bool repeatable = 6; - * @return {boolean} + * repeated TaskNode nodes = 7; + * @return {!Array} */ -proto.aggregator.CreateTaskReq.prototype.getRepeatable = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); +proto.aggregator.CreateTaskReq.prototype.getNodesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.TaskNode, 7)); }; /** - * @param {boolean} value + * @param {!Array} value * @return {!proto.aggregator.CreateTaskReq} returns this +*/ +proto.aggregator.CreateTaskReq.prototype.setNodesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 7, value); +}; + + +/** + * @param {!proto.aggregator.TaskNode=} opt_value + * @param {number=} opt_index + * @return {!proto.aggregator.TaskNode} */ -proto.aggregator.CreateTaskReq.prototype.setRepeatable = function(value) { - return jspb.Message.setProto3BooleanField(this, 6, value); +proto.aggregator.CreateTaskReq.prototype.addNodes = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.aggregator.TaskNode, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.aggregator.CreateTaskReq} returns this + */ +proto.aggregator.CreateTaskReq.prototype.clearNodesList = function() { + return this.setNodesList([]); +}; + + +/** + * repeated TaskEdge edges = 8; + * @return {!Array} + */ +proto.aggregator.CreateTaskReq.prototype.getEdgesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.TaskEdge, 8)); +}; + + +/** + * @param {!Array} value + * @return {!proto.aggregator.CreateTaskReq} returns this +*/ +proto.aggregator.CreateTaskReq.prototype.setEdgesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 8, value); +}; + + +/** + * @param {!proto.aggregator.TaskEdge=} opt_value + * @param {number=} opt_index + * @return {!proto.aggregator.TaskEdge} + */ +proto.aggregator.CreateTaskReq.prototype.addEdges = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 8, opt_value, proto.aggregator.TaskEdge, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.aggregator.CreateTaskReq} returns this + */ +proto.aggregator.CreateTaskReq.prototype.clearEdgesList = function() { + return this.setEdgesList([]); }; @@ -6135,7 +7188,8 @@ proto.aggregator.AddressRequest.prototype.toObject = function(opt_includeInstanc */ proto.aggregator.AddressRequest.toObject = function(includeInstance, msg) { var f, obj = { - owner: jspb.Message.getFieldWithDefault(msg, 1, "") + factory: jspb.Message.getFieldWithDefault(msg, 1, ""), + salt: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { @@ -6174,7 +7228,11 @@ proto.aggregator.AddressRequest.deserializeBinaryFromReader = function(msg, read switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setOwner(value); + msg.setFactory(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSalt(value); break; default: reader.skipField(); @@ -6205,22 +7263,47 @@ proto.aggregator.AddressRequest.prototype.serializeBinary = function() { */ proto.aggregator.AddressRequest.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getOwner(); + f = message.getFactory(); if (f.length > 0) { writer.writeString( 1, f ); } + f = message.getSalt(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string factory = 1; + * @return {string} + */ +proto.aggregator.AddressRequest.prototype.getFactory = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * optional string owner = 1; + * @param {string} value + * @return {!proto.aggregator.AddressRequest} returns this + */ +proto.aggregator.AddressRequest.prototype.setFactory = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string salt = 2; * @return {string} */ -proto.aggregator.AddressRequest.prototype.getOwner = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.aggregator.AddressRequest.prototype.getSalt = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; @@ -6228,8 +7311,8 @@ proto.aggregator.AddressRequest.prototype.getOwner = function() { * @param {string} value * @return {!proto.aggregator.AddressRequest} returns this */ -proto.aggregator.AddressRequest.prototype.setOwner = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); +proto.aggregator.AddressRequest.prototype.setSalt = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; @@ -6249,8 +7332,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.aggregator.AddressResp.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.AddressResp.toObject(opt_includeInstance, this); +proto.aggregator.SmartWallet.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.SmartWallet.toObject(opt_includeInstance, this); }; @@ -6259,14 +7342,15 @@ proto.aggregator.AddressResp.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.AddressResp} msg The msg instance to transform. + * @param {!proto.aggregator.SmartWallet} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.AddressResp.toObject = function(includeInstance, msg) { +proto.aggregator.SmartWallet.toObject = function(includeInstance, msg) { var f, obj = { - smartAccountAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), - nonce: jspb.Message.getFieldWithDefault(msg, 2, "") + address: jspb.Message.getFieldWithDefault(msg, 1, ""), + salt: jspb.Message.getFieldWithDefault(msg, 2, ""), + factory: jspb.Message.getFieldWithDefault(msg, 3, "") }; if (includeInstance) { @@ -6280,23 +7364,23 @@ proto.aggregator.AddressResp.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.AddressResp} + * @return {!proto.aggregator.SmartWallet} */ -proto.aggregator.AddressResp.deserializeBinary = function(bytes) { +proto.aggregator.SmartWallet.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.AddressResp; - return proto.aggregator.AddressResp.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.SmartWallet; + return proto.aggregator.SmartWallet.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.aggregator.AddressResp} msg The message object to deserialize into. + * @param {!proto.aggregator.SmartWallet} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.AddressResp} + * @return {!proto.aggregator.SmartWallet} */ -proto.aggregator.AddressResp.deserializeBinaryFromReader = function(msg, reader) { +proto.aggregator.SmartWallet.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -6305,11 +7389,15 @@ proto.aggregator.AddressResp.deserializeBinaryFromReader = function(msg, reader) switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setSmartAccountAddress(value); + msg.setAddress(value); break; case 2: var value = /** @type {string} */ (reader.readString()); - msg.setNonce(value); + msg.setSalt(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setFactory(value); break; default: reader.skipField(); @@ -6324,9 +7412,9 @@ proto.aggregator.AddressResp.deserializeBinaryFromReader = function(msg, reader) * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.AddressResp.prototype.serializeBinary = function() { +proto.aggregator.SmartWallet.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.AddressResp.serializeBinaryToWriter(this, writer); + proto.aggregator.SmartWallet.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -6334,65 +7422,97 @@ proto.aggregator.AddressResp.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.AddressResp} message + * @param {!proto.aggregator.SmartWallet} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.AddressResp.serializeBinaryToWriter = function(message, writer) { +proto.aggregator.SmartWallet.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getSmartAccountAddress(); + f = message.getAddress(); if (f.length > 0) { writer.writeString( 1, f ); } - f = message.getNonce(); + f = message.getSalt(); if (f.length > 0) { writer.writeString( 2, f ); } + f = message.getFactory(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } }; /** - * optional string smart_account_address = 1; + * optional string address = 1; * @return {string} */ -proto.aggregator.AddressResp.prototype.getSmartAccountAddress = function() { +proto.aggregator.SmartWallet.prototype.getAddress = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.aggregator.AddressResp} returns this + * @return {!proto.aggregator.SmartWallet} returns this */ -proto.aggregator.AddressResp.prototype.setSmartAccountAddress = function(value) { +proto.aggregator.SmartWallet.prototype.setAddress = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional string nonce = 2; + * optional string salt = 2; * @return {string} */ -proto.aggregator.AddressResp.prototype.getNonce = function() { +proto.aggregator.SmartWallet.prototype.getSalt = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @return {!proto.aggregator.AddressResp} returns this + * @return {!proto.aggregator.SmartWallet} returns this */ -proto.aggregator.AddressResp.prototype.setNonce = function(value) { +proto.aggregator.SmartWallet.prototype.setSalt = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; +/** + * optional string factory = 3; + * @return {string} + */ +proto.aggregator.SmartWallet.prototype.getFactory = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.aggregator.SmartWallet} returns this + */ +proto.aggregator.SmartWallet.prototype.setFactory = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.aggregator.AddressResp.repeatedFields_ = [1]; @@ -6409,8 +7529,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.aggregator.ListTasksReq.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.ListTasksReq.toObject(opt_includeInstance, this); +proto.aggregator.AddressResp.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.AddressResp.toObject(opt_includeInstance, this); }; @@ -6419,13 +7539,14 @@ proto.aggregator.ListTasksReq.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.ListTasksReq} msg The msg instance to transform. + * @param {!proto.aggregator.AddressResp} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.ListTasksReq.toObject = function(includeInstance, msg) { +proto.aggregator.AddressResp.toObject = function(includeInstance, msg) { var f, obj = { - + walletsList: jspb.Message.toObjectList(msg.getWalletsList(), + proto.aggregator.SmartWallet.toObject, includeInstance) }; if (includeInstance) { @@ -6439,29 +7560,34 @@ proto.aggregator.ListTasksReq.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.ListTasksReq} + * @return {!proto.aggregator.AddressResp} */ -proto.aggregator.ListTasksReq.deserializeBinary = function(bytes) { +proto.aggregator.AddressResp.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ListTasksReq; - return proto.aggregator.ListTasksReq.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.AddressResp; + return proto.aggregator.AddressResp.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.aggregator.ListTasksReq} msg The message object to deserialize into. + * @param {!proto.aggregator.AddressResp} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.ListTasksReq} + * @return {!proto.aggregator.AddressResp} */ -proto.aggregator.ListTasksReq.deserializeBinaryFromReader = function(msg, reader) { +proto.aggregator.AddressResp.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { + case 1: + var value = new proto.aggregator.SmartWallet; + reader.readMessage(value,proto.aggregator.SmartWallet.deserializeBinaryFromReader); + msg.addWallets(value); + break; default: reader.skipField(); break; @@ -6475,9 +7601,9 @@ proto.aggregator.ListTasksReq.deserializeBinaryFromReader = function(msg, reader * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.ListTasksReq.prototype.serializeBinary = function() { +proto.aggregator.AddressResp.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.ListTasksReq.serializeBinaryToWriter(this, writer); + proto.aggregator.AddressResp.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -6485,22 +7611,61 @@ proto.aggregator.ListTasksReq.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.ListTasksReq} message + * @param {!proto.aggregator.AddressResp} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.ListTasksReq.serializeBinaryToWriter = function(message, writer) { +proto.aggregator.AddressResp.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getWalletsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.aggregator.SmartWallet.serializeBinaryToWriter + ); + } }; +/** + * repeated SmartWallet wallets = 1; + * @return {!Array} + */ +proto.aggregator.AddressResp.prototype.getWalletsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.SmartWallet, 1)); +}; + /** - * List of repeated fields within this message type. - * @private {!Array} - * @const + * @param {!Array} value + * @return {!proto.aggregator.AddressResp} returns this +*/ +proto.aggregator.AddressResp.prototype.setWalletsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.aggregator.SmartWallet=} opt_value + * @param {number=} opt_index + * @return {!proto.aggregator.SmartWallet} */ -proto.aggregator.ListTasksResp.repeatedFields_ = [1]; +proto.aggregator.AddressResp.prototype.addWallets = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.aggregator.SmartWallet, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.aggregator.AddressResp} returns this + */ +proto.aggregator.AddressResp.prototype.clearWalletsList = function() { + return this.setWalletsList([]); +}; + + @@ -6517,8 +7682,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.aggregator.ListTasksResp.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.ListTasksResp.toObject(opt_includeInstance, this); +proto.aggregator.ListTasksReq.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ListTasksReq.toObject(opt_includeInstance, this); }; @@ -6527,14 +7692,13 @@ proto.aggregator.ListTasksResp.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.ListTasksResp} msg The msg instance to transform. + * @param {!proto.aggregator.ListTasksReq} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.ListTasksResp.toObject = function(includeInstance, msg) { +proto.aggregator.ListTasksReq.toObject = function(includeInstance, msg) { var f, obj = { - tasksList: jspb.Message.toObjectList(msg.getTasksList(), - proto.aggregator.ListTasksResp.TaskItemResp.toObject, includeInstance) + smartWalletAddress: jspb.Message.getFieldWithDefault(msg, 1, "") }; if (includeInstance) { @@ -6548,23 +7712,23 @@ proto.aggregator.ListTasksResp.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.ListTasksResp} + * @return {!proto.aggregator.ListTasksReq} */ -proto.aggregator.ListTasksResp.deserializeBinary = function(bytes) { +proto.aggregator.ListTasksReq.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ListTasksResp; - return proto.aggregator.ListTasksResp.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.ListTasksReq; + return proto.aggregator.ListTasksReq.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.aggregator.ListTasksResp} msg The message object to deserialize into. + * @param {!proto.aggregator.ListTasksReq} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.ListTasksResp} + * @return {!proto.aggregator.ListTasksReq} */ -proto.aggregator.ListTasksResp.deserializeBinaryFromReader = function(msg, reader) { +proto.aggregator.ListTasksReq.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -6572,9 +7736,8 @@ proto.aggregator.ListTasksResp.deserializeBinaryFromReader = function(msg, reade var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.aggregator.ListTasksResp.TaskItemResp; - reader.readMessage(value,proto.aggregator.ListTasksResp.TaskItemResp.deserializeBinaryFromReader); - msg.addTasks(value); + var value = /** @type {string} */ (reader.readString()); + msg.setSmartWalletAddress(value); break; default: reader.skipField(); @@ -6589,9 +7752,9 @@ proto.aggregator.ListTasksResp.deserializeBinaryFromReader = function(msg, reade * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.ListTasksResp.prototype.serializeBinary = function() { +proto.aggregator.ListTasksReq.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.ListTasksResp.serializeBinaryToWriter(this, writer); + proto.aggregator.ListTasksReq.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -6599,23 +7762,47 @@ proto.aggregator.ListTasksResp.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.ListTasksResp} message + * @param {!proto.aggregator.ListTasksReq} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.ListTasksResp.serializeBinaryToWriter = function(message, writer) { +proto.aggregator.ListTasksReq.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getTasksList(); + f = message.getSmartWalletAddress(); if (f.length > 0) { - writer.writeRepeatedMessage( + writer.writeString( 1, - f, - proto.aggregator.ListTasksResp.TaskItemResp.serializeBinaryToWriter + f ); } }; +/** + * optional string smart_wallet_address = 1; + * @return {string} + */ +proto.aggregator.ListTasksReq.prototype.getSmartWalletAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.aggregator.ListTasksReq} returns this + */ +proto.aggregator.ListTasksReq.prototype.setSmartWalletAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.aggregator.ListTasksResp.repeatedFields_ = [1]; @@ -6632,8 +7819,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.aggregator.ListTasksResp.TaskItemResp.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.ListTasksResp.TaskItemResp.toObject(opt_includeInstance, this); +proto.aggregator.ListTasksResp.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ListTasksResp.toObject(opt_includeInstance, this); }; @@ -6642,14 +7829,14 @@ proto.aggregator.ListTasksResp.TaskItemResp.prototype.toObject = function(opt_in * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.aggregator.ListTasksResp.TaskItemResp} msg The msg instance to transform. + * @param {!proto.aggregator.ListTasksResp} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.ListTasksResp.TaskItemResp.toObject = function(includeInstance, msg) { +proto.aggregator.ListTasksResp.toObject = function(includeInstance, msg) { var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, ""), - status: jspb.Message.getFieldWithDefault(msg, 2, 0) + tasksList: jspb.Message.toObjectList(msg.getTasksList(), + proto.aggregator.Task.toObject, includeInstance) }; if (includeInstance) { @@ -6663,23 +7850,23 @@ proto.aggregator.ListTasksResp.TaskItemResp.toObject = function(includeInstance, /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.ListTasksResp.TaskItemResp} + * @return {!proto.aggregator.ListTasksResp} */ -proto.aggregator.ListTasksResp.TaskItemResp.deserializeBinary = function(bytes) { +proto.aggregator.ListTasksResp.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ListTasksResp.TaskItemResp; - return proto.aggregator.ListTasksResp.TaskItemResp.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.ListTasksResp; + return proto.aggregator.ListTasksResp.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.aggregator.ListTasksResp.TaskItemResp} msg The message object to deserialize into. + * @param {!proto.aggregator.ListTasksResp} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.ListTasksResp.TaskItemResp} + * @return {!proto.aggregator.ListTasksResp} */ -proto.aggregator.ListTasksResp.TaskItemResp.deserializeBinaryFromReader = function(msg, reader) { +proto.aggregator.ListTasksResp.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -6687,12 +7874,9 @@ proto.aggregator.ListTasksResp.TaskItemResp.deserializeBinaryFromReader = functi var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setId(value); - break; - case 2: - var value = /** @type {!proto.aggregator.TaskStatus} */ (reader.readEnum()); - msg.setStatus(value); + var value = new proto.aggregator.Task; + reader.readMessage(value,proto.aggregator.Task.deserializeBinaryFromReader); + msg.addTasks(value); break; default: reader.skipField(); @@ -6707,9 +7891,9 @@ proto.aggregator.ListTasksResp.TaskItemResp.deserializeBinaryFromReader = functi * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.ListTasksResp.TaskItemResp.prototype.serializeBinary = function() { +proto.aggregator.ListTasksResp.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.ListTasksResp.TaskItemResp.serializeBinaryToWriter(this, writer); + proto.aggregator.ListTasksResp.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -6717,77 +7901,35 @@ proto.aggregator.ListTasksResp.TaskItemResp.prototype.serializeBinary = function /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.ListTasksResp.TaskItemResp} message + * @param {!proto.aggregator.ListTasksResp} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.ListTasksResp.TaskItemResp.serializeBinaryToWriter = function(message, writer) { +proto.aggregator.ListTasksResp.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getId(); + f = message.getTasksList(); if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getStatus(); - if (f !== 0.0) { - writer.writeEnum( - 2, - f - ); - } -}; - - -/** - * optional string id = 1; - * @return {string} - */ -proto.aggregator.ListTasksResp.TaskItemResp.prototype.getId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.aggregator.ListTasksResp.TaskItemResp} returns this - */ -proto.aggregator.ListTasksResp.TaskItemResp.prototype.setId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); -}; - - -/** - * optional TaskStatus status = 2; - * @return {!proto.aggregator.TaskStatus} - */ -proto.aggregator.ListTasksResp.TaskItemResp.prototype.getStatus = function() { - return /** @type {!proto.aggregator.TaskStatus} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; - - -/** - * @param {!proto.aggregator.TaskStatus} value - * @return {!proto.aggregator.ListTasksResp.TaskItemResp} returns this - */ -proto.aggregator.ListTasksResp.TaskItemResp.prototype.setStatus = function(value) { - return jspb.Message.setProto3EnumField(this, 2, value); + writer.writeRepeatedMessage( + 1, + f, + proto.aggregator.Task.serializeBinaryToWriter + ); + } }; /** - * repeated TaskItemResp tasks = 1; - * @return {!Array} + * repeated Task tasks = 1; + * @return {!Array} */ proto.aggregator.ListTasksResp.prototype.getTasksList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.aggregator.ListTasksResp.TaskItemResp, 1)); + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.Task, 1)); }; /** - * @param {!Array} value + * @param {!Array} value * @return {!proto.aggregator.ListTasksResp} returns this */ proto.aggregator.ListTasksResp.prototype.setTasksList = function(value) { @@ -6796,12 +7938,12 @@ proto.aggregator.ListTasksResp.prototype.setTasksList = function(value) { /** - * @param {!proto.aggregator.ListTasksResp.TaskItemResp=} opt_value + * @param {!proto.aggregator.Task=} opt_value * @param {number=} opt_index - * @return {!proto.aggregator.ListTasksResp.TaskItemResp} + * @return {!proto.aggregator.Task} */ proto.aggregator.ListTasksResp.prototype.addTasks = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.aggregator.ListTasksResp.TaskItemResp, opt_index); + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.aggregator.Task, opt_index); }; @@ -7501,25 +8643,319 @@ proto.aggregator.UpdateChecksResp.prototype.hasUpdatedAt = function() { }; + + + +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.CreateWalletReq.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.CreateWalletReq.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.CreateWalletReq} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.CreateWalletReq.toObject = function(includeInstance, msg) { + var f, obj = { + salt: jspb.Message.getFieldWithDefault(msg, 1, ""), + factoryAddress: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + + 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.CreateWalletReq} + */ +proto.aggregator.CreateWalletReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.CreateWalletReq; + return proto.aggregator.CreateWalletReq.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.aggregator.CreateWalletReq} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.aggregator.CreateWalletReq} + */ +proto.aggregator.CreateWalletReq.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.setSalt(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setFactoryAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.aggregator.CreateWalletReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.CreateWalletReq.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.CreateWalletReq} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.CreateWalletReq.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getSalt(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getFactoryAddress(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string salt = 1; + * @return {string} + */ +proto.aggregator.CreateWalletReq.prototype.getSalt = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.aggregator.CreateWalletReq} returns this + */ +proto.aggregator.CreateWalletReq.prototype.setSalt = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string factory_address = 2; + * @return {string} + */ +proto.aggregator.CreateWalletReq.prototype.getFactoryAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.aggregator.CreateWalletReq} returns this + */ +proto.aggregator.CreateWalletReq.prototype.setFactoryAddress = function(value) { + return jspb.Message.setProto3StringField(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} + */ +proto.aggregator.CreateWalletResp.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.CreateWalletResp.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.CreateWalletResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.CreateWalletResp.toObject = function(includeInstance, msg) { + var f, obj = { + address: 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.CreateWalletResp} + */ +proto.aggregator.CreateWalletResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.CreateWalletResp; + return proto.aggregator.CreateWalletResp.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.aggregator.CreateWalletResp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.aggregator.CreateWalletResp} + */ +proto.aggregator.CreateWalletResp.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.setAddress(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.aggregator.CreateWalletResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.CreateWalletResp.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.CreateWalletResp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.CreateWalletResp.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string address = 1; + * @return {string} + */ +proto.aggregator.CreateWalletResp.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.aggregator.CreateWalletResp} returns this + */ +proto.aggregator.CreateWalletResp.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + /** * @enum {number} */ proto.aggregator.TriggerType = { - TIMETRIGGER: 0, - CONTRACTQUERYTRIGGER: 1, - EXPRESSIONTRIGGER: 2 + MANUALTRIGGER: 0, + FIXEDEPOCHTRIGGER: 1, + CRONTRIGGER: 2, + BLOCKTRIGGER: 3, + EVENTTRIGGER: 4 }; /** * @enum {number} */ -proto.aggregator.TaskType = { - ETHTRANSFERTASK: 0, - CONTRACTEXECUTIONTASK: 1, - GRAPHQLDATAQUERYTASK: 2, - HTTPAPICALLTASK: 3, - CUSTOMCODETASK: 4, - BRANCHACTIONTASK: 5 +proto.aggregator.Error = { + UNKNOWERROR: 0, + RPCNODEERROR: 1000, + STORAGEUNAVAILABLE: 2000, + STORAGEWRITEERROR: 2001, + SMARTWALLETRPCERROR: 6000, + SMARTWALLETNOTFOUNDERROR: 6001, + TASKDATACORRUPTED: 7000, + TASKDATAMISSINGERROR: 7001 }; /** @@ -7540,4 +8976,18 @@ proto.aggregator.CustomCodeType = { JAVASCRIPT: 0 }; +/** + * @enum {number} + */ +proto.aggregator.TaskType = { + ETHTRANSFERTASK: 0, + CONTRACTWRITETASK: 1, + CONTRACTREADTASK: 2, + GRAPHQLDATAQUERYTASK: 3, + RESTAPITASK: 4, + BRANCHTASK: 5, + FILTERTASK: 6, + CUSTOMCODETASK: 7 +}; + goog.object.extend(exports, proto.aggregator); diff --git a/go.mod b/go.mod index 6c2ca50..679d107 100644 --- a/go.mod +++ b/go.mod @@ -36,10 +36,11 @@ require ( 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 + github.com/gabriel-vasile/mimetype v1.4.3 // indirect github.com/go-ole/go-ole v1.3.0 // indirect 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.12.0 // indirect + github.com/go-playground/validator/v10 v10.22.1 // 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 @@ -55,7 +56,7 @@ require ( github.com/jonboulle/clockwork v0.4.0 // indirect github.com/klauspost/compress v1.17.9 // indirect github.com/labstack/gommon v0.4.2 // indirect - github.com/leodido/go-urn v1.2.2 // indirect + github.com/leodido/go-urn v1.4.0 // indirect github.com/mattn/go-colorable v0.1.13 // indirect github.com/mattn/go-isatty v0.0.20 // indirect github.com/mitchellh/mapstructure v1.5.0 // indirect diff --git a/go.sum b/go.sum index 932df7b..79b1e06 100644 --- a/go.sum +++ b/go.sum @@ -85,6 +85,8 @@ github.com/fjl/memsize v0.0.2 h1:27txuSD9or+NZlnOWdKUxeBzTAUkWCVh+4Gf2dWFOzA= github.com/fjl/memsize v0.0.2/go.mod h1:VvhXpOYNQvB+uIk2RvXzuaQtkQJzzIx6lSBe1xv7hi0= github.com/fsnotify/fsnotify v1.6.0 h1:n+5WquG0fcWoWp6xPWfHdbskMCQaFnG6PfBrh1Ky4HY= github.com/fsnotify/fsnotify v1.6.0/go.mod h1:sl3t1tCWJFWoRz9R8WJCbQihKKwmorjAbSClcnxKAGw= +github.com/gabriel-vasile/mimetype v1.4.3 h1:in2uUcidCuFcDKtdcBxlR0rJ1+fsokWf+uqxgUFjbI0= +github.com/gabriel-vasile/mimetype v1.4.3/go.mod h1:d8uq/6HKRL6CGdk+aubisF/M5GcPfT7nKyLpA0lbSSk= github.com/gballet/go-libpcsclite v0.0.0-20190607065134-2772fd86a8ff h1:tY80oXqGNY4FhTFhk+o9oFHGINQ/+vhlm8HFzi6znCI= 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= @@ -100,8 +102,8 @@ github.com/go-playground/locales v0.14.1 h1:EWaQ/wswjilfKLTECiXz7Rh+3BjFhfDFKv/o github.com/go-playground/locales v0.14.1/go.mod h1:hxrqLVvrK65+Rwrd5Fc6F2O76J/NuW9t0sjnWqG1slY= github.com/go-playground/universal-translator v0.18.1 h1:Bcnm0ZwsGyWbCzImXv+pAJnYK9S473LQFuzCbDbfSFY= github.com/go-playground/universal-translator v0.18.1/go.mod h1:xekY+UJKNuX9WP91TpwSH2VMlDf28Uj24BCp08ZFTUY= -github.com/go-playground/validator/v10 v10.12.0 h1:E4gtWgxWxp8YSxExrQFv5BpCahla0PVF2oTTEYaWQGI= -github.com/go-playground/validator/v10 v10.12.0/go.mod h1:hCAPuzYvKdP33pxWa+2+6AIKXEKqjIUyqsNCtbsSJrA= +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/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= @@ -184,8 +186,8 @@ github.com/labstack/gommon v0.4.2 h1:F8qTUNXgG1+6WQmqoUWnz8WiEU60mXVVw0P4ht1WRA0 github.com/labstack/gommon v0.4.2/go.mod h1:QlUFxVM+SNXhDL/Z7YhocGIBYOiwB0mXm1+1bAPHPyU= github.com/leanovate/gopter v0.2.9 h1:fQjYxZaynp97ozCzfOyOuAGOU4aU/z37zf/tOujFk7c= github.com/leanovate/gopter v0.2.9/go.mod h1:U2L/78B+KVFIx2VmW6onHJQzXtFb+p5y3y2Sh+Jxxv8= -github.com/leodido/go-urn v1.2.2 h1:7z68G0FCGvDk646jz1AelTYNYWrTNm0bEcFAo147wt4= -github.com/leodido/go-urn v1.2.2/go.mod h1:kUaIbLZWttglzwNuG0pgsh5vuV6u2YcGBYz1hIPjtOQ= +github.com/leodido/go-urn v1.4.0 h1:WT9HwE9SGECu3lg4d/dIA+jxlljEa1/ffXKmRjqdmIQ= +github.com/leodido/go-urn v1.4.0/go.mod h1:bvxc+MVxLKB4z00jd1z+Dvzr47oO32F/QSNjSBOlFxI= github.com/mattn/go-colorable v0.1.13 h1:fFA4WZxdEF4tXPZVKMLwD8oUnCTTo08duU7wxecdEvA= github.com/mattn/go-colorable v0.1.13/go.mod h1:7S9/ev0klgBDR4GtXTXX8a3vIGJpMovkB8vQcUbaXHg= github.com/mattn/go-isatty v0.0.16/go.mod h1:kYGgaQfpe5nmfYZH+SKPsOc2e4SrIfOl2e/yFXSvRLM= @@ -232,7 +234,6 @@ github.com/rs/cors v1.7.0 h1:+88SsELBHx5r+hZ8TCkggzSstaWNbDvThkVK8H6f9ik= github.com/rs/cors v1.7.0/go.mod h1:gFx+x8UowdsKA9AchylcLynDq+nNFfI8FkUZdN/jGCU= github.com/russross/blackfriday/v2 v2.1.0 h1:JIOH55/0cWyOuilr9/qlrm0BSXldqnqwMsf35Ld67mk= github.com/russross/blackfriday/v2 v2.1.0/go.mod h1:+Rmxgy9KzJVeS9/2gXHxylqXiyQDYRxCVz55jmeOWTM= -github.com/rwtodd/Go.Sed v0.0.0-20210816025313-55464686f9ef/go.mod h1:8AEUvGVi2uQ5b24BIhcr0GCcpd/RNAFWaN2CJFrWIIQ= 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/spf13/cobra v1.8.0 h1:7aJaZx1B85qltLMc546zn58BxxfZdR/W22ej9CFoEf0= @@ -250,7 +251,6 @@ github.com/stretchr/testify v1.4.0/go.mod h1:j7eGeouHqKxXV5pUuKE4zz7dFj8WfuZ+81P github.com/stretchr/testify v1.7.1/go.mod h1:6Fq8oRcR53rry900zMqJjRRixrwX3KX962/h/Wwjteg= github.com/stretchr/testify v1.8.0/go.mod h1:yNjHg4UonilssWZ8iaSj1OCr/vHnekPRkoO+kdMU+MU= github.com/stretchr/testify v1.8.1/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= -github.com/stretchr/testify v1.8.2/go.mod h1:w2LPCIKwWwSfY2zedu0+kehJoqGctiVI29o6fzry7u4= github.com/stretchr/testify v1.9.0 h1:HtqpIVDClZ4nwg75+f6Lvsy/wHu+3BoSGCbBAcpTsTg= github.com/stretchr/testify v1.9.0/go.mod h1:r2ic/lqez/lEtzL7wO/rwa5dbSLXVDPFyf8C91i36aY= github.com/supranational/blst v0.3.11 h1:LyU6FolezeWAhvQk0k6O/d49jqgO52MSDDfYgbeoEm4= diff --git a/model/task.go b/model/task.go index e9b7bda..87dc850 100644 --- a/model/task.go +++ b/model/task.go @@ -1,7 +1,8 @@ package model import ( - "encoding/json" + "google.golang.org/protobuf/encoding/protojson" + "fmt" "time" @@ -12,32 +13,9 @@ import ( ) type Task struct { - // a unique id identifi this task in entire system - ID string `json:"id"` - - // owner address in hex - Owner string `json:"owner"` - - // The smartwallet that deploy this, it is important to store this because - // there are maybe more than one AA per owner - SmartWalletAddress string `json:"smart_wallet_address"` - - // trigger defined whether the task can be executed - // trigger can be time based, price based, or contract call based - Trigger *avsproto.TaskTrigger `json:"trigger"` + ID string - // the actual call will be executed in ethereum, it can be a simple transfer - // a method call, or a batch call through multicall contract - Nodes []*avsproto.TaskAction `json:"nodes"` - - Memo string `json:"memo"` - ExpiredAt int64 `json:"expired_at,omitempty"` - StartAt int64 `json:"start_at,omitempty"` - CompletedAt int64 `json:"completed_at,omitempty"` - - Status avsproto.TaskStatus `json:"status"` - Executions []*avsproto.Execution `json:"executions,omitempty"` - Repeatable bool `json:"repeatable,omitempty"` + *avsproto.Task } // Generate a sorted uuid @@ -47,6 +25,12 @@ func GenerateTaskID() string { return taskId.String() } +func NewTask() *Task { + return &Task{ + Task: &avsproto.Task{}, + } +} + // Populate a task structure from proto payload func NewTaskFromProtobuf(user *User, body *avsproto.CreateTaskReq) (*Task, error) { if body == nil { @@ -62,22 +46,32 @@ func NewTaskFromProtobuf(user *User, body *avsproto.CreateTaskReq) (*Task, error taskID := GenerateTaskID() + if len(body.Edges) == 0 || len(body.Nodes) == 0 { + return nil, fmt.Errorf("Missing task data") + } + t := &Task{ ID: taskID, - - // convert back to string with EIP55-compliant - Owner: owner.Hex(), - SmartWalletAddress: aaAddress.Hex(), - - Trigger: body.Trigger, - Nodes: body.Actions, - Memo: body.Memo, - ExpiredAt: body.ExpiredAt, - StartAt: body.StartAt, - - // initial state for task - Status: avsproto.TaskStatus_Active, - Executions: []*avsproto.Execution{}, + Task: &avsproto.Task{ + Id: &avsproto.UUID{ + Bytes: taskID, + }, + + // convert back to string with EIP55-compliant + Owner: owner.Hex(), + SmartWalletAddress: aaAddress.Hex(), + + Trigger: body.Trigger, + Nodes: body.Nodes, + Edges: body.Edges, + Memo: body.Memo, + ExpiredAt: body.ExpiredAt, + StartAt: body.StartAt, + + // initial state for task + Status: avsproto.TaskStatus_Active, + Executions: []*avsproto.Execution{}, + }, } // Validate @@ -90,7 +84,14 @@ func NewTaskFromProtobuf(user *User, body *avsproto.CreateTaskReq) (*Task, error // Return a compact json ready to persist to storage func (t *Task) ToJSON() ([]byte, error) { - return json.Marshal(t) + // return json.Marshal(t) + return protojson.Marshal(t) +} + +func (t *Task) FromStorageData(body []byte) error { + // err := json.Unmarshal(body, t) + err := protojson.Unmarshal(body, t) + return err } // Return a compact json ready to persist to storage @@ -98,39 +99,13 @@ func (t *Task) Validate() bool { return true } -// Convert to protobuf func (t *Task) ToProtoBuf() (*avsproto.Task, error) { - protoTask := avsproto.Task{ - Owner: t.Owner, - SmartWalletAddress: t.SmartWalletAddress, - - Id: &avsproto.UUID{ - Bytes: t.ID, - }, - Trigger: t.Trigger, - Nodes: t.Nodes, - - StartAt: t.StartAt, - ExpiredAt: t.ExpiredAt, - Memo: t.Memo, - - Executions: t.Executions, - CompletedAt: t.CompletedAt, - Status: t.Status, - } - - return &protoTask, nil -} - -func (t *Task) FromStorageData(body []byte) error { - err := json.Unmarshal(body, t) - - return err + return t.Task, nil } // Generate a global unique key for the task in our system func (t *Task) Key() []byte { - return []byte(t.ID) + return []byte(t.Id.Bytes) } func (t *Task) SetCompleted() { diff --git a/model/user.go b/model/user.go index 32a7bf8..5f250af 100644 --- a/model/user.go +++ b/model/user.go @@ -2,9 +2,12 @@ package model import ( "encoding/json" + "fmt" "math/big" + "github.com/AvaProtocol/ap-avs/core/chainio/aa" "github.com/ethereum/go-ethereum/common" + "github.com/ethereum/go-ethereum/ethclient" ) type User struct { @@ -12,6 +15,15 @@ type User struct { SmartAccountAddress *common.Address } +func (u *User) LoadDefaultSmartWallet(rpcClient *ethclient.Client) error { + smartAccountAddress, err := aa.GetSenderAddress(rpcClient, u.Address, big.NewInt(0)) + if err != nil { + return fmt.Errorf("Rpc error") + } + u.SmartAccountAddress = smartAccountAddress + return nil +} + type SmartWallet struct { Owner *common.Address `json:"owner"` Address *common.Address `json:"address"` diff --git a/operator/worker_loop.go b/operator/worker_loop.go index 884d3da..4c2ae0a 100644 --- a/operator/worker_loop.go +++ b/operator/worker_loop.go @@ -163,7 +163,9 @@ func (o *Operator) RunChecks(block *types.Block) error { for _, check := range checks { switch check.CheckType { case "CheckTrigger": - v, e := taskengine.RunExpressionQuery(check.Trigger.Expression.Expression) + // 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 diff --git a/protobuf/avs.pb.go b/protobuf/avs.pb.go index 387af54..f41add8 100644 --- a/protobuf/avs.pb.go +++ b/protobuf/avs.pb.go @@ -25,22 +25,28 @@ const ( type TriggerType int32 const ( - TriggerType_TimeTrigger TriggerType = 0 - TriggerType_ContractQueryTrigger TriggerType = 1 - TriggerType_ExpressionTrigger TriggerType = 2 + TriggerType_ManualTrigger TriggerType = 0 + TriggerType_FixedEpochTrigger TriggerType = 1 + TriggerType_CronTrigger TriggerType = 2 + TriggerType_BlockTrigger TriggerType = 3 + TriggerType_EventTrigger TriggerType = 4 ) // Enum value maps for TriggerType. var ( TriggerType_name = map[int32]string{ - 0: "TimeTrigger", - 1: "ContractQueryTrigger", - 2: "ExpressionTrigger", + 0: "ManualTrigger", + 1: "FixedEpochTrigger", + 2: "CronTrigger", + 3: "BlockTrigger", + 4: "EventTrigger", } TriggerType_value = map[string]int32{ - "TimeTrigger": 0, - "ContractQueryTrigger": 1, - "ExpressionTrigger": 2, + "ManualTrigger": 0, + "FixedEpochTrigger": 1, + "CronTrigger": 2, + "BlockTrigger": 3, + "EventTrigger": 4, } ) @@ -87,8 +93,9 @@ const ( // target chain of smart wallet is error and cannot used to determine smartwallet info Error_SmartWalletRpcError Error = 6000 Error_SmartWalletNotFoundError Error = 6001 - // Error occurs when we failed to migrat task data and it cannot be decoden - Error_TaskDataCorrupted Error = 7000 + // Error occurs when we failed to migrate task data and it cannot be decode + Error_TaskDataCorrupted Error = 7000 + Error_TaskDataMissingError Error = 7001 ) // Enum value maps for Error. @@ -101,6 +108,7 @@ var ( 6000: "SmartWalletRpcError", 6001: "SmartWalletNotFoundError", 7000: "TaskDataCorrupted", + 7001: "TaskDataMissingError", } Error_value = map[string]int32{ "UnknowError": 0, @@ -110,6 +118,7 @@ var ( "SmartWalletRpcError": 6000, "SmartWalletNotFoundError": 6001, "TaskDataCorrupted": 7000, + "TaskDataMissingError": 7001, } ) @@ -140,73 +149,6 @@ func (Error) EnumDescriptor() ([]byte, []int) { return file_protobuf_avs_proto_rawDescGZIP(), []int{1} } -// TaskType represents what kind of work the task will perform -type TaskType int32 - -const ( - // Handle default/missing data - TaskType_ETHTransferTask TaskType = 0 - // Generic contract execution which can be used for: - // ERC20 Transfer, NFT Transfer, auto reclaim, auto restaking etc - // When executing a contract we need at least 2 things: - // - target contract address - // - the message to send to that contract - TaskType_ContractExecutionTask TaskType = 1 - TaskType_GraphQLDataQueryTask TaskType = 2 - // Make call to a HTTP endpoint - TaskType_HTTPAPICallTask TaskType = 3 - // CustomCode allow to run arbitraty JavaScript. - TaskType_CustomCodeTask TaskType = 4 - TaskType_BranchActionTask TaskType = 5 -) - -// Enum value maps for TaskType. -var ( - TaskType_name = map[int32]string{ - 0: "ETHTransferTask", - 1: "ContractExecutionTask", - 2: "GraphQLDataQueryTask", - 3: "HTTPAPICallTask", - 4: "CustomCodeTask", - 5: "BranchActionTask", - } - TaskType_value = map[string]int32{ - "ETHTransferTask": 0, - "ContractExecutionTask": 1, - "GraphQLDataQueryTask": 2, - "HTTPAPICallTask": 3, - "CustomCodeTask": 4, - "BranchActionTask": 5, - } -) - -func (x TaskType) Enum() *TaskType { - p := new(TaskType) - *p = x - return p -} - -func (x TaskType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (TaskType) Descriptor() protoreflect.EnumDescriptor { - return file_protobuf_avs_proto_enumTypes[2].Descriptor() -} - -func (TaskType) Type() protoreflect.EnumType { - return &file_protobuf_avs_proto_enumTypes[2] -} - -func (x TaskType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use TaskType.Descriptor instead. -func (TaskType) EnumDescriptor() ([]byte, []int) { - return file_protobuf_avs_proto_rawDescGZIP(), []int{2} -} - // TaskStatus represents status of the task. The transition is as follow type TaskStatus int32 @@ -247,11 +189,11 @@ func (x TaskStatus) String() string { } func (TaskStatus) Descriptor() protoreflect.EnumDescriptor { - return file_protobuf_avs_proto_enumTypes[3].Descriptor() + return file_protobuf_avs_proto_enumTypes[2].Descriptor() } func (TaskStatus) Type() protoreflect.EnumType { - return &file_protobuf_avs_proto_enumTypes[3] + return &file_protobuf_avs_proto_enumTypes[2] } func (x TaskStatus) Number() protoreflect.EnumNumber { @@ -260,7 +202,7 @@ func (x TaskStatus) Number() protoreflect.EnumNumber { // Deprecated: Use TaskStatus.Descriptor instead. func (TaskStatus) EnumDescriptor() ([]byte, []int) { - return file_protobuf_avs_proto_rawDescGZIP(), []int{3} + return file_protobuf_avs_proto_rawDescGZIP(), []int{2} } type CustomCodeType int32 @@ -290,11 +232,11 @@ func (x CustomCodeType) String() string { } func (CustomCodeType) Descriptor() protoreflect.EnumDescriptor { - return file_protobuf_avs_proto_enumTypes[4].Descriptor() + return file_protobuf_avs_proto_enumTypes[3].Descriptor() } func (CustomCodeType) Type() protoreflect.EnumType { - return &file_protobuf_avs_proto_enumTypes[4] + return &file_protobuf_avs_proto_enumTypes[3] } func (x CustomCodeType) Number() protoreflect.EnumNumber { @@ -303,6 +245,80 @@ func (x CustomCodeType) Number() protoreflect.EnumNumber { // Deprecated: Use CustomCodeType.Descriptor instead. func (CustomCodeType) EnumDescriptor() ([]byte, []int) { + return file_protobuf_avs_proto_rawDescGZIP(), []int{3} +} + +// TaskType represents what kind of work the task will perform +type TaskType int32 + +const ( + // Handle default/missing data + TaskType_ETHTransferTask TaskType = 0 + // Generic contract execution which can be used for: + // ERC20 Transfer, NFT Transfer, auto reclaim, auto restaking etc + // When executing a contract we need at least 2 things: + // - target contract address + // - the message to send to that contract + TaskType_ContractWriteTask TaskType = 1 + TaskType_ContractReadTask TaskType = 2 + // GraphQL query. Note that a graphql can also be query as a HTTP API, but having its own graphql type make writing query easiser without passing all the data in post as parameter. + TaskType_GraphQLDataQueryTask TaskType = 3 + // Make call to a HTTP endpoint + TaskType_RestAPITask TaskType = 4 + // CustomCode allow to run arbitraty JavaScript. + TaskType_BranchTask TaskType = 5 + TaskType_FilterTask TaskType = 6 + TaskType_CustomCodeTask TaskType = 7 +) + +// Enum value maps for TaskType. +var ( + TaskType_name = map[int32]string{ + 0: "ETHTransferTask", + 1: "ContractWriteTask", + 2: "ContractReadTask", + 3: "GraphQLDataQueryTask", + 4: "RestAPITask", + 5: "BranchTask", + 6: "FilterTask", + 7: "CustomCodeTask", + } + TaskType_value = map[string]int32{ + "ETHTransferTask": 0, + "ContractWriteTask": 1, + "ContractReadTask": 2, + "GraphQLDataQueryTask": 3, + "RestAPITask": 4, + "BranchTask": 5, + "FilterTask": 6, + "CustomCodeTask": 7, + } +) + +func (x TaskType) Enum() *TaskType { + p := new(TaskType) + *p = x + return p +} + +func (x TaskType) String() string { + return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) +} + +func (TaskType) Descriptor() protoreflect.EnumDescriptor { + return file_protobuf_avs_proto_enumTypes[4].Descriptor() +} + +func (TaskType) Type() protoreflect.EnumType { + return &file_protobuf_avs_proto_enumTypes[4] +} + +func (x TaskType) Number() protoreflect.EnumNumber { + return protoreflect.EnumNumber(x) +} + +// Deprecated: Use TaskType.Descriptor instead. +func (TaskType) EnumDescriptor() ([]byte, []int) { return file_protobuf_avs_proto_rawDescGZIP(), []int{4} } @@ -566,19 +582,16 @@ func (x *SyncTasksReq) GetMonotonicClock() int64 { return 0 } -type TaskTrigger struct { +type FixedEpochCondition struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - TriggerType TriggerType `protobuf:"varint,1,opt,name=trigger_type,json=triggerType,proto3,enum=aggregator.TriggerType" json:"trigger_type,omitempty"` - Schedule *TimeCondition `protobuf:"bytes,2,opt,name=schedule,proto3" json:"schedule,omitempty"` - ContractQuery *ContractQueryCondition `protobuf:"bytes,3,opt,name=contract_query,json=contractQuery,proto3" json:"contract_query,omitempty"` - Expression *ExpressionCondition `protobuf:"bytes,4,opt,name=expression,proto3" json:"expression,omitempty"` + Epoches []int64 `protobuf:"varint,1,rep,packed,name=epoches,proto3" json:"epoches,omitempty"` } -func (x *TaskTrigger) Reset() { - *x = TaskTrigger{} +func (x *FixedEpochCondition) Reset() { + *x = FixedEpochCondition{} if protoimpl.UnsafeEnabled { mi := &file_protobuf_avs_proto_msgTypes[4] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -586,13 +599,13 @@ func (x *TaskTrigger) Reset() { } } -func (x *TaskTrigger) String() string { +func (x *FixedEpochCondition) String() string { return protoimpl.X.MessageStringOf(x) } -func (*TaskTrigger) ProtoMessage() {} +func (*FixedEpochCondition) ProtoMessage() {} -func (x *TaskTrigger) ProtoReflect() protoreflect.Message { +func (x *FixedEpochCondition) ProtoReflect() protoreflect.Message { mi := &file_protobuf_avs_proto_msgTypes[4] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -604,51 +617,29 @@ func (x *TaskTrigger) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use TaskTrigger.ProtoReflect.Descriptor instead. -func (*TaskTrigger) Descriptor() ([]byte, []int) { +// Deprecated: Use FixedEpochCondition.ProtoReflect.Descriptor instead. +func (*FixedEpochCondition) Descriptor() ([]byte, []int) { return file_protobuf_avs_proto_rawDescGZIP(), []int{4} } -func (x *TaskTrigger) GetTriggerType() TriggerType { - if x != nil { - return x.TriggerType - } - return TriggerType_TimeTrigger -} - -func (x *TaskTrigger) GetSchedule() *TimeCondition { - if x != nil { - return x.Schedule - } - return nil -} - -func (x *TaskTrigger) GetContractQuery() *ContractQueryCondition { - if x != nil { - return x.ContractQuery - } - return nil -} - -func (x *TaskTrigger) GetExpression() *ExpressionCondition { +func (x *FixedEpochCondition) GetEpoches() []int64 { if x != nil { - return x.Expression + return x.Epoches } return nil } // Simple timebase or cron syntax. -type TimeCondition struct { +type CronCondition struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Fixed []int64 `protobuf:"varint,1,rep,packed,name=fixed,proto3" json:"fixed,omitempty"` - Cron string `protobuf:"bytes,2,opt,name=cron,proto3" json:"cron,omitempty"` + CronTable []string `protobuf:"bytes,1,rep,name=cron_table,json=cronTable,proto3" json:"cron_table,omitempty"` } -func (x *TimeCondition) Reset() { - *x = TimeCondition{} +func (x *CronCondition) Reset() { + *x = CronCondition{} if protoimpl.UnsafeEnabled { mi := &file_protobuf_avs_proto_msgTypes[5] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -656,13 +647,13 @@ func (x *TimeCondition) Reset() { } } -func (x *TimeCondition) String() string { +func (x *CronCondition) String() string { return protoimpl.X.MessageStringOf(x) } -func (*TimeCondition) ProtoMessage() {} +func (*CronCondition) ProtoMessage() {} -func (x *TimeCondition) ProtoReflect() protoreflect.Message { +func (x *CronCondition) ProtoReflect() protoreflect.Message { mi := &file_protobuf_avs_proto_msgTypes[5] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -674,40 +665,28 @@ func (x *TimeCondition) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use TimeCondition.ProtoReflect.Descriptor instead. -func (*TimeCondition) Descriptor() ([]byte, []int) { +// Deprecated: Use CronCondition.ProtoReflect.Descriptor instead. +func (*CronCondition) Descriptor() ([]byte, []int) { return file_protobuf_avs_proto_rawDescGZIP(), []int{5} } -func (x *TimeCondition) GetFixed() []int64 { +func (x *CronCondition) GetCronTable() []string { if x != nil { - return x.Fixed + return x.CronTable } return nil } -func (x *TimeCondition) GetCron() string { - if x != nil { - return x.Cron - } - return "" -} - -// A contract method that return true/false -// Ideally to use when we already have an existing contract that perform the -// check. -// This method will be evaluate every block -type ContractQueryCondition struct { +type BlockCondition struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - ContractAddress string `protobuf:"bytes,1,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` - Callmsg string `protobuf:"bytes,2,opt,name=callmsg,proto3" json:"callmsg,omitempty"` + Interval int64 `protobuf:"varint,1,opt,name=interval,proto3" json:"interval,omitempty"` } -func (x *ContractQueryCondition) Reset() { - *x = ContractQueryCondition{} +func (x *BlockCondition) Reset() { + *x = BlockCondition{} if protoimpl.UnsafeEnabled { mi := &file_protobuf_avs_proto_msgTypes[6] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -715,13 +694,13 @@ func (x *ContractQueryCondition) Reset() { } } -func (x *ContractQueryCondition) String() string { +func (x *BlockCondition) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ContractQueryCondition) ProtoMessage() {} +func (*BlockCondition) ProtoMessage() {} -func (x *ContractQueryCondition) ProtoReflect() protoreflect.Message { +func (x *BlockCondition) ProtoReflect() protoreflect.Message { mi := &file_protobuf_avs_proto_msgTypes[6] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -733,23 +712,16 @@ func (x *ContractQueryCondition) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ContractQueryCondition.ProtoReflect.Descriptor instead. -func (*ContractQueryCondition) Descriptor() ([]byte, []int) { +// Deprecated: Use BlockCondition.ProtoReflect.Descriptor instead. +func (*BlockCondition) Descriptor() ([]byte, []int) { return file_protobuf_avs_proto_rawDescGZIP(), []int{6} } -func (x *ContractQueryCondition) GetContractAddress() string { +func (x *BlockCondition) GetInterval() int64 { if x != nil { - return x.ContractAddress + return x.Interval } - return "" -} - -func (x *ContractQueryCondition) GetCallmsg() string { - if x != nil { - return x.Callmsg - } - return "" + return 0 } // An arbitrary expression to express the condition. @@ -764,7 +736,7 @@ func (x *ContractQueryCondition) GetCallmsg() string { // When a new block is build, our engine will execute these check // // The expression language is re-present by https://expr-lang.org/ -type ExpressionCondition struct { +type EventCondition struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -772,8 +744,8 @@ type ExpressionCondition struct { Expression string `protobuf:"bytes,1,opt,name=expression,proto3" json:"expression,omitempty"` } -func (x *ExpressionCondition) Reset() { - *x = ExpressionCondition{} +func (x *EventCondition) Reset() { + *x = EventCondition{} if protoimpl.UnsafeEnabled { mi := &file_protobuf_avs_proto_msgTypes[7] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -781,13 +753,13 @@ func (x *ExpressionCondition) Reset() { } } -func (x *ExpressionCondition) String() string { +func (x *EventCondition) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ExpressionCondition) ProtoMessage() {} +func (*EventCondition) ProtoMessage() {} -func (x *ExpressionCondition) ProtoReflect() protoreflect.Message { +func (x *EventCondition) ProtoReflect() protoreflect.Message { mi := &file_protobuf_avs_proto_msgTypes[7] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -799,18 +771,153 @@ func (x *ExpressionCondition) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ExpressionCondition.ProtoReflect.Descriptor instead. -func (*ExpressionCondition) Descriptor() ([]byte, []int) { +// Deprecated: Use EventCondition.ProtoReflect.Descriptor instead. +func (*EventCondition) Descriptor() ([]byte, []int) { return file_protobuf_avs_proto_rawDescGZIP(), []int{7} } -func (x *ExpressionCondition) GetExpression() string { +func (x *EventCondition) GetExpression() string { if x != nil { return x.Expression } return "" } +type TaskTrigger struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + TriggerType TriggerType `protobuf:"varint,1,opt,name=trigger_type,json=triggerType,proto3,enum=aggregator.TriggerType" json:"trigger_type,omitempty"` + // Types that are assignable to TriggerCondition: + // + // *TaskTrigger_Manual + // *TaskTrigger_At + // *TaskTrigger_Cron + // *TaskTrigger_Block + // *TaskTrigger_Event + TriggerCondition isTaskTrigger_TriggerCondition `protobuf_oneof:"trigger_condition"` +} + +func (x *TaskTrigger) Reset() { + *x = TaskTrigger{} + if protoimpl.UnsafeEnabled { + mi := &file_protobuf_avs_proto_msgTypes[8] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TaskTrigger) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TaskTrigger) ProtoMessage() {} + +func (x *TaskTrigger) ProtoReflect() protoreflect.Message { + mi := &file_protobuf_avs_proto_msgTypes[8] + 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 TaskTrigger.ProtoReflect.Descriptor instead. +func (*TaskTrigger) Descriptor() ([]byte, []int) { + return file_protobuf_avs_proto_rawDescGZIP(), []int{8} +} + +func (x *TaskTrigger) GetTriggerType() TriggerType { + if x != nil { + return x.TriggerType + } + return TriggerType_ManualTrigger +} + +func (m *TaskTrigger) GetTriggerCondition() isTaskTrigger_TriggerCondition { + if m != nil { + return m.TriggerCondition + } + return nil +} + +func (x *TaskTrigger) GetManual() bool { + if x, ok := x.GetTriggerCondition().(*TaskTrigger_Manual); ok { + return x.Manual + } + return false +} + +func (x *TaskTrigger) GetAt() *FixedEpochCondition { + if x, ok := x.GetTriggerCondition().(*TaskTrigger_At); ok { + return x.At + } + return nil +} + +func (x *TaskTrigger) GetCron() *CronCondition { + if x, ok := x.GetTriggerCondition().(*TaskTrigger_Cron); ok { + return x.Cron + } + return nil +} + +func (x *TaskTrigger) GetBlock() *BlockCondition { + if x, ok := x.GetTriggerCondition().(*TaskTrigger_Block); ok { + return x.Block + } + return nil +} + +func (x *TaskTrigger) GetEvent() *EventCondition { + if x, ok := x.GetTriggerCondition().(*TaskTrigger_Event); ok { + return x.Event + } + return nil +} + +type isTaskTrigger_TriggerCondition interface { + isTaskTrigger_TriggerCondition() +} + +type TaskTrigger_Manual struct { + Manual bool `protobuf:"varint,2,opt,name=manual,proto3,oneof"` +} + +type TaskTrigger_At struct { + // run at a specific epoch, name inspired by unix `at` utility + At *FixedEpochCondition `protobuf:"bytes,3,opt,name=at,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,4,opt,name=cron,proto3,oneof"` +} + +type TaskTrigger_Block struct { + // currently the only support syntax is every blocks + 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,6,opt,name=event,proto3,oneof"` +} + +func (*TaskTrigger_Manual) isTaskTrigger_TriggerCondition() {} + +func (*TaskTrigger_At) isTaskTrigger_TriggerCondition() {} + +func (*TaskTrigger_Cron) isTaskTrigger_TriggerCondition() {} + +func (*TaskTrigger_Block) isTaskTrigger_TriggerCondition() {} + +func (*TaskTrigger_Event) isTaskTrigger_TriggerCondition() {} + type SyncTasksResp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -824,7 +931,7 @@ type SyncTasksResp struct { func (x *SyncTasksResp) Reset() { *x = SyncTasksResp{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[8] + mi := &file_protobuf_avs_proto_msgTypes[9] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -837,7 +944,7 @@ func (x *SyncTasksResp) String() string { func (*SyncTasksResp) ProtoMessage() {} func (x *SyncTasksResp) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[8] + mi := &file_protobuf_avs_proto_msgTypes[9] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -850,7 +957,7 @@ func (x *SyncTasksResp) ProtoReflect() protoreflect.Message { // Deprecated: Use SyncTasksResp.ProtoReflect.Descriptor instead. func (*SyncTasksResp) Descriptor() ([]byte, []int) { - return file_protobuf_avs_proto_rawDescGZIP(), []int{8} + return file_protobuf_avs_proto_rawDescGZIP(), []int{9} } func (x *SyncTasksResp) GetId() string { @@ -874,7 +981,7 @@ func (x *SyncTasksResp) GetTrigger() *TaskTrigger { return nil } -type ETHTransfer struct { +type ETHTransferNode struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -883,23 +990,23 @@ type ETHTransfer struct { Amount string `protobuf:"bytes,2,opt,name=amount,proto3" json:"amount,omitempty"` } -func (x *ETHTransfer) Reset() { - *x = ETHTransfer{} +func (x *ETHTransferNode) Reset() { + *x = ETHTransferNode{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[9] + mi := &file_protobuf_avs_proto_msgTypes[10] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *ETHTransfer) String() string { +func (x *ETHTransferNode) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ETHTransfer) ProtoMessage() {} +func (*ETHTransferNode) ProtoMessage() {} -func (x *ETHTransfer) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[9] +func (x *ETHTransferNode) ProtoReflect() protoreflect.Message { + mi := &file_protobuf_avs_proto_msgTypes[10] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -910,53 +1017,53 @@ func (x *ETHTransfer) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ETHTransfer.ProtoReflect.Descriptor instead. -func (*ETHTransfer) Descriptor() ([]byte, []int) { - return file_protobuf_avs_proto_rawDescGZIP(), []int{9} +// Deprecated: Use ETHTransferNode.ProtoReflect.Descriptor instead. +func (*ETHTransferNode) Descriptor() ([]byte, []int) { + return file_protobuf_avs_proto_rawDescGZIP(), []int{10} } -func (x *ETHTransfer) GetDestination() string { +func (x *ETHTransferNode) GetDestination() string { if x != nil { return x.Destination } return "" } -func (x *ETHTransfer) GetAmount() string { +func (x *ETHTransferNode) GetAmount() string { if x != nil { return x.Amount } return "" } -type ContractExecution struct { +type ContractWriteNode struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields ContractAddress string `protobuf:"bytes,1,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` CallData string `protobuf:"bytes,2,opt,name=call_data,json=callData,proto3" json:"call_data,omitempty"` - Method string `protobuf:"bytes,3,opt,name=method,proto3" json:"method,omitempty"` - EncodedParams string `protobuf:"bytes,4,opt,name=encoded_params,json=encodedParams,proto3" json:"encoded_params,omitempty"` + // abi is necessary to decode the return + ContractAbi string `protobuf:"bytes,3,opt,name=contract_abi,json=contractAbi,proto3" json:"contract_abi,omitempty"` } -func (x *ContractExecution) Reset() { - *x = ContractExecution{} +func (x *ContractWriteNode) Reset() { + *x = ContractWriteNode{} 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) } } -func (x *ContractExecution) String() string { +func (x *ContractWriteNode) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ContractExecution) ProtoMessage() {} +func (*ContractWriteNode) ProtoMessage() {} -func (x *ContractExecution) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[10] +func (x *ContractWriteNode) ProtoReflect() protoreflect.Message { + mi := &file_protobuf_avs_proto_msgTypes[11] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -967,40 +1074,97 @@ func (x *ContractExecution) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ContractExecution.ProtoReflect.Descriptor instead. -func (*ContractExecution) Descriptor() ([]byte, []int) { - return file_protobuf_avs_proto_rawDescGZIP(), []int{10} +// Deprecated: Use ContractWriteNode.ProtoReflect.Descriptor instead. +func (*ContractWriteNode) Descriptor() ([]byte, []int) { + return file_protobuf_avs_proto_rawDescGZIP(), []int{11} } -func (x *ContractExecution) GetContractAddress() string { +func (x *ContractWriteNode) GetContractAddress() string { if x != nil { return x.ContractAddress } return "" } -func (x *ContractExecution) GetCallData() string { +func (x *ContractWriteNode) GetCallData() string { if x != nil { return x.CallData } return "" } -func (x *ContractExecution) GetMethod() string { +func (x *ContractWriteNode) GetContractAbi() string { if x != nil { - return x.Method + return x.ContractAbi } return "" } -func (x *ContractExecution) GetEncodedParams() string { +type ContractQueryNode struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + ContractAddress string `protobuf:"bytes,1,opt,name=contract_address,json=contractAddress,proto3" json:"contract_address,omitempty"` + CallData string `protobuf:"bytes,2,opt,name=call_data,json=callData,proto3" json:"call_data,omitempty"` + // abi is necessary to decode the return + ContractAbi string `protobuf:"bytes,3,opt,name=contract_abi,json=contractAbi,proto3" json:"contract_abi,omitempty"` +} + +func (x *ContractQueryNode) Reset() { + *x = ContractQueryNode{} + if protoimpl.UnsafeEnabled { + mi := &file_protobuf_avs_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ContractQueryNode) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ContractQueryNode) ProtoMessage() {} + +func (x *ContractQueryNode) ProtoReflect() protoreflect.Message { + mi := &file_protobuf_avs_proto_msgTypes[12] + 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 ContractQueryNode.ProtoReflect.Descriptor instead. +func (*ContractQueryNode) Descriptor() ([]byte, []int) { + return file_protobuf_avs_proto_rawDescGZIP(), []int{12} +} + +func (x *ContractQueryNode) GetContractAddress() string { if x != nil { - return x.EncodedParams + return x.ContractAddress } return "" } -type GraphQLDataQuery struct { +func (x *ContractQueryNode) GetCallData() string { + if x != nil { + return x.CallData + } + return "" +} + +func (x *ContractQueryNode) GetContractAbi() string { + if x != nil { + return x.ContractAbi + } + return "" +} + +type GraphQLQueryNode struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -1010,23 +1174,23 @@ type GraphQLDataQuery struct { Query string `protobuf:"bytes,2,opt,name=query,proto3" json:"query,omitempty"` } -func (x *GraphQLDataQuery) Reset() { - *x = GraphQLDataQuery{} +func (x *GraphQLQueryNode) Reset() { + *x = GraphQLQueryNode{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[11] + mi := &file_protobuf_avs_proto_msgTypes[13] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *GraphQLDataQuery) String() string { +func (x *GraphQLQueryNode) String() string { return protoimpl.X.MessageStringOf(x) } -func (*GraphQLDataQuery) ProtoMessage() {} +func (*GraphQLQueryNode) ProtoMessage() {} -func (x *GraphQLDataQuery) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[11] +func (x *GraphQLQueryNode) ProtoReflect() protoreflect.Message { + mi := &file_protobuf_avs_proto_msgTypes[13] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1037,26 +1201,26 @@ func (x *GraphQLDataQuery) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use GraphQLDataQuery.ProtoReflect.Descriptor instead. -func (*GraphQLDataQuery) Descriptor() ([]byte, []int) { - return file_protobuf_avs_proto_rawDescGZIP(), []int{11} +// Deprecated: Use GraphQLQueryNode.ProtoReflect.Descriptor instead. +func (*GraphQLQueryNode) Descriptor() ([]byte, []int) { + return file_protobuf_avs_proto_rawDescGZIP(), []int{13} } -func (x *GraphQLDataQuery) GetUrl() string { +func (x *GraphQLQueryNode) GetUrl() string { if x != nil { return x.Url } return "" } -func (x *GraphQLDataQuery) GetQuery() string { +func (x *GraphQLQueryNode) GetQuery() string { if x != nil { return x.Query } return "" } -type HTTPAPICall struct { +type RestAPINode struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -1064,25 +1228,26 @@ type HTTPAPICall struct { Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` Headers map[string]string `protobuf:"bytes,2,rep,name=headers,proto3" json:"headers,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` Body string `protobuf:"bytes,3,opt,name=body,proto3" json:"body,omitempty"` + Method string `protobuf:"bytes,4,opt,name=method,proto3" json:"method,omitempty"` } -func (x *HTTPAPICall) Reset() { - *x = HTTPAPICall{} +func (x *RestAPINode) Reset() { + *x = RestAPINode{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[12] + mi := &file_protobuf_avs_proto_msgTypes[14] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *HTTPAPICall) String() string { +func (x *RestAPINode) String() string { return protoimpl.X.MessageStringOf(x) } -func (*HTTPAPICall) ProtoMessage() {} +func (*RestAPINode) ProtoMessage() {} -func (x *HTTPAPICall) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[12] +func (x *RestAPINode) ProtoReflect() protoreflect.Message { + mi := &file_protobuf_avs_proto_msgTypes[14] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1093,58 +1258,65 @@ func (x *HTTPAPICall) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use HTTPAPICall.ProtoReflect.Descriptor instead. -func (*HTTPAPICall) Descriptor() ([]byte, []int) { - return file_protobuf_avs_proto_rawDescGZIP(), []int{12} +// Deprecated: Use RestAPINode.ProtoReflect.Descriptor instead. +func (*RestAPINode) Descriptor() ([]byte, []int) { + return file_protobuf_avs_proto_rawDescGZIP(), []int{14} } -func (x *HTTPAPICall) GetUrl() string { +func (x *RestAPINode) GetUrl() string { if x != nil { return x.Url } return "" } -func (x *HTTPAPICall) GetHeaders() map[string]string { +func (x *RestAPINode) GetHeaders() map[string]string { if x != nil { return x.Headers } return nil } -func (x *HTTPAPICall) GetBody() string { +func (x *RestAPINode) GetBody() string { if x != nil { return x.Body } return "" } -type CustomCode struct { +func (x *RestAPINode) GetMethod() string { + if x != nil { + return x.Method + } + return "" +} + +type CustomCodeNode struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Type CustomCodeType `protobuf:"varint,1,opt,name=type,proto3,enum=aggregator.CustomCodeType" json:"type,omitempty"` - Body string `protobuf:"bytes,2,opt,name=body,proto3" json:"body,omitempty"` + Type CustomCodeType `protobuf:"varint,1,opt,name=type,proto3,enum=aggregator.CustomCodeType" json:"type,omitempty"` + Source string `protobuf:"bytes,2,opt,name=source,proto3" json:"source,omitempty"` } -func (x *CustomCode) Reset() { - *x = CustomCode{} +func (x *CustomCodeNode) Reset() { + *x = CustomCodeNode{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[13] + mi := &file_protobuf_avs_proto_msgTypes[15] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *CustomCode) String() string { +func (x *CustomCodeNode) String() string { return protoimpl.X.MessageStringOf(x) } -func (*CustomCode) ProtoMessage() {} +func (*CustomCodeNode) ProtoMessage() {} -func (x *CustomCode) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[13] +func (x *CustomCodeNode) ProtoReflect() protoreflect.Message { + mi := &file_protobuf_avs_proto_msgTypes[15] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1155,21 +1327,21 @@ func (x *CustomCode) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use CustomCode.ProtoReflect.Descriptor instead. -func (*CustomCode) Descriptor() ([]byte, []int) { - return file_protobuf_avs_proto_rawDescGZIP(), []int{13} +// Deprecated: Use CustomCodeNode.ProtoReflect.Descriptor instead. +func (*CustomCodeNode) Descriptor() ([]byte, []int) { + return file_protobuf_avs_proto_rawDescGZIP(), []int{15} } -func (x *CustomCode) GetType() CustomCodeType { +func (x *CustomCodeNode) GetType() CustomCodeType { if x != nil { return x.Type } return CustomCodeType_JavaScript } -func (x *CustomCode) GetBody() string { +func (x *CustomCodeNode) GetSource() string { if x != nil { - return x.Body + return x.Source } return "" } @@ -1186,7 +1358,7 @@ type ConditionJump struct { func (x *ConditionJump) Reset() { *x = ConditionJump{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[14] + mi := &file_protobuf_avs_proto_msgTypes[16] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1199,7 +1371,7 @@ func (x *ConditionJump) String() string { func (*ConditionJump) ProtoMessage() {} func (x *ConditionJump) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[14] + mi := &file_protobuf_avs_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1212,7 +1384,7 @@ func (x *ConditionJump) ProtoReflect() protoreflect.Message { // Deprecated: Use ConditionJump.ProtoReflect.Descriptor instead. func (*ConditionJump) Descriptor() ([]byte, []int) { - return file_protobuf_avs_proto_rawDescGZIP(), []int{14} + return file_protobuf_avs_proto_rawDescGZIP(), []int{16} } func (x *ConditionJump) GetExpression() string { @@ -1229,33 +1401,33 @@ func (x *ConditionJump) GetNext() string { return "" } -type BranchAction struct { +type BranchNode struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - If *ConditionJump `protobuf:"bytes,1,opt,name=If,proto3" json:"If,omitempty"` - ElseIfs []*ConditionJump `protobuf:"bytes,2,rep,name=ElseIfs,proto3" json:"ElseIfs,omitempty"` - Else *ConditionJump `protobuf:"bytes,3,opt,name=Else,proto3" json:"Else,omitempty"` + If *ConditionJump `protobuf:"bytes,1,opt,name=if,proto3" json:"if,omitempty"` + ElseIfs []*ConditionJump `protobuf:"bytes,2,rep,name=elseIfs,proto3" json:"elseIfs,omitempty"` + Else *ConditionJump `protobuf:"bytes,3,opt,name=else,proto3" json:"else,omitempty"` } -func (x *BranchAction) Reset() { - *x = BranchAction{} +func (x *BranchNode) Reset() { + *x = BranchNode{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[15] + mi := &file_protobuf_avs_proto_msgTypes[17] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *BranchAction) String() string { +func (x *BranchNode) String() string { return protoimpl.X.MessageStringOf(x) } -func (*BranchAction) ProtoMessage() {} +func (*BranchNode) ProtoMessage() {} -func (x *BranchAction) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[15] +func (x *BranchNode) ProtoReflect() protoreflect.Message { + mi := &file_protobuf_avs_proto_msgTypes[17] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1266,74 +1438,58 @@ func (x *BranchAction) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use BranchAction.ProtoReflect.Descriptor instead. -func (*BranchAction) Descriptor() ([]byte, []int) { - return file_protobuf_avs_proto_rawDescGZIP(), []int{15} +// Deprecated: Use BranchNode.ProtoReflect.Descriptor instead. +func (*BranchNode) Descriptor() ([]byte, []int) { + return file_protobuf_avs_proto_rawDescGZIP(), []int{17} } -func (x *BranchAction) GetIf() *ConditionJump { +func (x *BranchNode) GetIf() *ConditionJump { if x != nil { return x.If } return nil } -func (x *BranchAction) GetElseIfs() []*ConditionJump { +func (x *BranchNode) GetElseIfs() []*ConditionJump { if x != nil { return x.ElseIfs } return nil } -func (x *BranchAction) GetElse() *ConditionJump { +func (x *BranchNode) GetElse() *ConditionJump { if x != nil { return x.Else } return nil } -type TaskAction struct { +type FilterNode struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - TaskType TaskType `protobuf:"varint,1,opt,name=task_type,json=taskType,proto3,enum=aggregator.TaskType" json:"task_type,omitempty"` - Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` - Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` - // Next can be empty. In some kind of block, such as branching, the next is - // based on branching condition - Next []string `protobuf:"bytes,4,rep,name=next,proto3" json:"next,omitempty"` - // Transfer eth - EthTransfer *ETHTransfer `protobuf:"bytes,10,opt,name=eth_transfer,json=ethTransfer,proto3" json:"eth_transfer,omitempty"` - // Run one ore more contracts. The call call also be batched with tool like - // multicall to wrap many calls - ContractExecution *ContractExecution `protobuf:"bytes,11,opt,name=contract_execution,json=contractExecution,proto3" json:"contract_execution,omitempty"` - // Make call to a graphql endpoint - GraphqlDataQuery *GraphQLDataQuery `protobuf:"bytes,12,opt,name=graphql_data_query,json=graphqlDataQuery,proto3" json:"graphql_data_query,omitempty"` - // Make call to a HTTP endpoint - HttpDataQuery *HTTPAPICall `protobuf:"bytes,13,opt,name=http_data_query,json=httpDataQuery,proto3" json:"http_data_query,omitempty"` - // CustomCode allow to run arbitraty JavaScript. - CustomCode *CustomCode `protobuf:"bytes,14,opt,name=custom_code,json=customCode,proto3" json:"custom_code,omitempty"` - Branch *BranchAction `protobuf:"bytes,15,opt,name=branch,proto3" json:"branch,omitempty"` + // Filter node acts like .select or .filter to pluck out element in an array that evaluate the expression to true + Expression string `protobuf:"bytes,1,opt,name=expression,proto3" json:"expression,omitempty"` } -func (x *TaskAction) Reset() { - *x = TaskAction{} +func (x *FilterNode) Reset() { + *x = FilterNode{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[16] + mi := &file_protobuf_avs_proto_msgTypes[18] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *TaskAction) String() string { +func (x *FilterNode) String() string { return protoimpl.X.MessageStringOf(x) } -func (*TaskAction) ProtoMessage() {} +func (*FilterNode) ProtoMessage() {} -func (x *TaskAction) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[16] +func (x *FilterNode) ProtoReflect() protoreflect.Message { + mi := &file_protobuf_avs_proto_msgTypes[18] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1344,81 +1500,280 @@ func (x *TaskAction) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use TaskAction.ProtoReflect.Descriptor instead. -func (*TaskAction) Descriptor() ([]byte, []int) { - return file_protobuf_avs_proto_rawDescGZIP(), []int{16} +// Deprecated: Use FilterNode.ProtoReflect.Descriptor instead. +func (*FilterNode) Descriptor() ([]byte, []int) { + return file_protobuf_avs_proto_rawDescGZIP(), []int{18} } -func (x *TaskAction) GetTaskType() TaskType { +func (x *FilterNode) GetExpression() string { if x != nil { - return x.TaskType + return x.Expression + } + return "" +} + +// The edge is relationship or direct between node +type TaskEdge struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Source string `protobuf:"bytes,2,opt,name=source,proto3" json:"source,omitempty"` + Target string `protobuf:"bytes,3,opt,name=target,proto3" json:"target,omitempty"` +} + +func (x *TaskEdge) Reset() { + *x = TaskEdge{} + if protoimpl.UnsafeEnabled { + mi := &file_protobuf_avs_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TaskEdge) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TaskEdge) ProtoMessage() {} + +func (x *TaskEdge) ProtoReflect() protoreflect.Message { + mi := &file_protobuf_avs_proto_msgTypes[19] + 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 TaskEdge.ProtoReflect.Descriptor instead. +func (*TaskEdge) Descriptor() ([]byte, []int) { + return file_protobuf_avs_proto_rawDescGZIP(), []int{19} +} + +func (x *TaskEdge) GetId() string { + if x != nil { + return x.Id + } + return "" +} + +func (x *TaskEdge) GetSource() string { + if x != nil { + return x.Source + } + return "" +} + +func (x *TaskEdge) GetTarget() string { + if x != nil { + return x.Target + } + return "" +} + +type TaskNode struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + NodeType TaskType `protobuf:"varint,1,opt,name=node_type,json=nodeType,proto3,enum=aggregator.TaskType" json:"node_type,omitempty"` + Id string `protobuf:"bytes,2,opt,name=id,proto3" json:"id,omitempty"` + Name string `protobuf:"bytes,3,opt,name=name,proto3" json:"name,omitempty"` + // based on node_type one and only one of these field are set + // + // Types that are assignable to TaskBody: + // + // *TaskNode_EthTransfer + // *TaskNode_ContractWrite + // *TaskNode_ContractRead + // *TaskNode_GraphqlDataQuery + // *TaskNode_RestApi + // *TaskNode_Branch + // *TaskNode_Filter + // *TaskNode_CustomCode + TaskBody isTaskNode_TaskBody `protobuf_oneof:"task_body"` +} + +func (x *TaskNode) Reset() { + *x = TaskNode{} + if protoimpl.UnsafeEnabled { + mi := &file_protobuf_avs_proto_msgTypes[20] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *TaskNode) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*TaskNode) ProtoMessage() {} + +func (x *TaskNode) ProtoReflect() protoreflect.Message { + mi := &file_protobuf_avs_proto_msgTypes[20] + 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 TaskNode.ProtoReflect.Descriptor instead. +func (*TaskNode) Descriptor() ([]byte, []int) { + return file_protobuf_avs_proto_rawDescGZIP(), []int{20} +} + +func (x *TaskNode) GetNodeType() TaskType { + if x != nil { + return x.NodeType } return TaskType_ETHTransferTask } -func (x *TaskAction) GetId() string { +func (x *TaskNode) GetId() string { if x != nil { return x.Id } return "" } -func (x *TaskAction) GetName() string { +func (x *TaskNode) GetName() string { if x != nil { return x.Name } return "" } -func (x *TaskAction) GetNext() []string { - if x != nil { - return x.Next +func (m *TaskNode) GetTaskBody() isTaskNode_TaskBody { + if m != nil { + return m.TaskBody } return nil } -func (x *TaskAction) GetEthTransfer() *ETHTransfer { - if x != nil { +func (x *TaskNode) GetEthTransfer() *ETHTransferNode { + if x, ok := x.GetTaskBody().(*TaskNode_EthTransfer); ok { return x.EthTransfer } return nil } -func (x *TaskAction) GetContractExecution() *ContractExecution { - if x != nil { - return x.ContractExecution +func (x *TaskNode) GetContractWrite() *ContractWriteNode { + if x, ok := x.GetTaskBody().(*TaskNode_ContractWrite); ok { + return x.ContractWrite } return nil } -func (x *TaskAction) GetGraphqlDataQuery() *GraphQLDataQuery { - if x != nil { +func (x *TaskNode) GetContractRead() *ContractQueryNode { + if x, ok := x.GetTaskBody().(*TaskNode_ContractRead); ok { + return x.ContractRead + } + return nil +} + +func (x *TaskNode) GetGraphqlDataQuery() *GraphQLQueryNode { + if x, ok := x.GetTaskBody().(*TaskNode_GraphqlDataQuery); ok { return x.GraphqlDataQuery } return nil } -func (x *TaskAction) GetHttpDataQuery() *HTTPAPICall { - if x != nil { - return x.HttpDataQuery +func (x *TaskNode) GetRestApi() *RestAPINode { + if x, ok := x.GetTaskBody().(*TaskNode_RestApi); ok { + return x.RestApi } return nil } -func (x *TaskAction) GetCustomCode() *CustomCode { - if x != nil { +func (x *TaskNode) GetBranch() *BranchNode { + if x, ok := x.GetTaskBody().(*TaskNode_Branch); ok { + return x.Branch + } + return nil +} + +func (x *TaskNode) GetFilter() *FilterNode { + if x, ok := x.GetTaskBody().(*TaskNode_Filter); ok { + return x.Filter + } + return nil +} + +func (x *TaskNode) GetCustomCode() *CustomCodeNode { + if x, ok := x.GetTaskBody().(*TaskNode_CustomCode); ok { return x.CustomCode } return nil } -func (x *TaskAction) GetBranch() *BranchAction { - if x != nil { - return x.Branch - } - return nil +type isTaskNode_TaskBody interface { + isTaskNode_TaskBody() +} + +type TaskNode_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 TaskNode_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 TaskNode_ContractRead struct { + // read data fron a target contract + ContractRead *ContractQueryNode `protobuf:"bytes,12,opt,name=contract_read,json=contractRead,proto3,oneof"` +} + +type TaskNode_GraphqlDataQuery struct { + // Make call to a graphql endpoint + GraphqlDataQuery *GraphQLQueryNode `protobuf:"bytes,13,opt,name=graphql_data_query,json=graphqlDataQuery,proto3,oneof"` +} + +type TaskNode_RestApi struct { + // Make call to a HTTP endpoint + RestApi *RestAPINode `protobuf:"bytes,14,opt,name=rest_api,json=restApi,proto3,oneof"` +} + +type TaskNode_Branch struct { + // CustomCode allow to run arbitraty JavaScript. + Branch *BranchNode `protobuf:"bytes,15,opt,name=branch,proto3,oneof"` +} + +type TaskNode_Filter struct { + Filter *FilterNode `protobuf:"bytes,16,opt,name=filter,proto3,oneof"` +} + +type TaskNode_CustomCode struct { + CustomCode *CustomCodeNode `protobuf:"bytes,17,opt,name=custom_code,json=customCode,proto3,oneof"` } +func (*TaskNode_EthTransfer) isTaskNode_TaskBody() {} + +func (*TaskNode_ContractWrite) isTaskNode_TaskBody() {} + +func (*TaskNode_ContractRead) isTaskNode_TaskBody() {} + +func (*TaskNode_GraphqlDataQuery) isTaskNode_TaskBody() {} + +func (*TaskNode_RestApi) isTaskNode_TaskBody() {} + +func (*TaskNode_Branch) isTaskNode_TaskBody() {} + +func (*TaskNode_Filter) isTaskNode_TaskBody() {} + +func (*TaskNode_CustomCode) isTaskNode_TaskBody() {} + type Execution struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -1432,7 +1787,7 @@ type Execution struct { func (x *Execution) Reset() { *x = Execution{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[17] + mi := &file_protobuf_avs_proto_msgTypes[21] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1445,7 +1800,7 @@ func (x *Execution) String() string { func (*Execution) ProtoMessage() {} func (x *Execution) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[17] + mi := &file_protobuf_avs_proto_msgTypes[21] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1458,7 +1813,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{17} + return file_protobuf_avs_proto_rawDescGZIP(), []int{21} } func (x *Execution) GetEpoch() int64 { @@ -1487,28 +1842,30 @@ type Task struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Id *UUID `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` - Owner string `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"` - SmartWalletAddress string `protobuf:"bytes,3,opt,name=smart_wallet_address,json=smartWalletAddress,proto3" json:"smart_wallet_address,omitempty"` - Trigger *TaskTrigger `protobuf:"bytes,4,opt,name=trigger,proto3" json:"trigger,omitempty"` - Nodes []*TaskAction `protobuf:"bytes,5,rep,name=nodes,proto3" json:"nodes,omitempty"` + Id *UUID `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Owner string `protobuf:"bytes,2,opt,name=owner,proto3" json:"owner,omitempty"` + SmartWalletAddress string `protobuf:"bytes,3,opt,name=smart_wallet_address,json=smartWalletAddress,proto3" json:"smart_wallet_address,omitempty"` // task won't be check before this - StartAt int64 `protobuf:"varint,6,opt,name=start_at,json=startAt,proto3" json:"start_at,omitempty"` + StartAt int64 `protobuf:"varint,5,opt,name=start_at,json=startAt,proto3" json:"start_at,omitempty"` // task won't be run/check after this - ExpiredAt int64 `protobuf:"varint,7,opt,name=expired_at,json=expiredAt,proto3" json:"expired_at,omitempty"` - // arbitrary data about this task - Memo string `protobuf:"bytes,8,opt,name=memo,proto3" json:"memo,omitempty"` - CompletedAt int64 `protobuf:"varint,9,opt,name=completed_at,json=completedAt,proto3" json:"completed_at,omitempty"` - Status TaskStatus `protobuf:"varint,10,opt,name=status,proto3,enum=aggregator.TaskStatus" json:"status,omitempty"` - // repeatable means a task can continue to run even after the first execution - Repeatable bool `protobuf:"varint,11,opt,name=repeatable,proto3" json:"repeatable,omitempty"` - Executions []*Execution `protobuf:"bytes,12,rep,name=executions,proto3" json:"executions,omitempty"` + ExpiredAt int64 `protobuf:"varint,6,opt,name=expired_at,json=expiredAt,proto3" json:"expired_at,omitempty"` + // arbitrary data about this task. has a limit of 255 character + Memo string `protobuf:"bytes,7,opt,name=memo,proto3" json:"memo,omitempty"` + CompletedAt int64 `protobuf:"varint,8,opt,name=completed_at,json=completedAt,proto3" json:"completed_at,omitempty"` + // repeatable means a task can continue to run even after the first execution. + // By default, recurring is false, task will only executed once. + Recurring bool `protobuf:"varint,10,opt,name=recurring,proto3" json:"recurring,omitempty"` + Status TaskStatus `protobuf:"varint,9,opt,name=status,proto3,enum=aggregator.TaskStatus" json:"status,omitempty"` + Trigger *TaskTrigger `protobuf:"bytes,4,opt,name=trigger,proto3" json:"trigger,omitempty"` + Nodes []*TaskNode `protobuf:"bytes,11,rep,name=nodes,proto3" json:"nodes,omitempty"` + Edges []*TaskEdge `protobuf:"bytes,12,rep,name=edges,proto3" json:"edges,omitempty"` + Executions []*Execution `protobuf:"bytes,13,rep,name=executions,proto3" json:"executions,omitempty"` } func (x *Task) Reset() { *x = Task{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[18] + mi := &file_protobuf_avs_proto_msgTypes[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1521,7 +1878,7 @@ func (x *Task) String() string { func (*Task) ProtoMessage() {} func (x *Task) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[18] + mi := &file_protobuf_avs_proto_msgTypes[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1534,7 +1891,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{18} + return file_protobuf_avs_proto_rawDescGZIP(), []int{22} } func (x *Task) GetId() *UUID { @@ -1558,20 +1915,6 @@ func (x *Task) GetSmartWalletAddress() string { return "" } -func (x *Task) GetTrigger() *TaskTrigger { - if x != nil { - return x.Trigger - } - return nil -} - -func (x *Task) GetNodes() []*TaskAction { - if x != nil { - return x.Nodes - } - return nil -} - func (x *Task) GetStartAt() int64 { if x != nil { return x.StartAt @@ -1600,6 +1943,13 @@ func (x *Task) GetCompletedAt() int64 { return 0 } +func (x *Task) GetRecurring() bool { + if x != nil { + return x.Recurring + } + return false +} + func (x *Task) GetStatus() TaskStatus { if x != nil { return x.Status @@ -1607,11 +1957,25 @@ func (x *Task) GetStatus() TaskStatus { return TaskStatus_Active } -func (x *Task) GetRepeatable() bool { +func (x *Task) GetTrigger() *TaskTrigger { if x != nil { - return x.Repeatable + return x.Trigger } - return false + return nil +} + +func (x *Task) GetNodes() []*TaskNode { + if x != nil { + return x.Nodes + } + return nil +} + +func (x *Task) GetEdges() []*TaskEdge { + if x != nil { + return x.Edges + } + return nil } func (x *Task) GetExecutions() []*Execution { @@ -1626,22 +1990,23 @@ type CreateTaskReq struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Trigger *TaskTrigger `protobuf:"bytes,1,opt,name=trigger,proto3" json:"trigger,omitempty"` - Actions []*TaskAction `protobuf:"bytes,2,rep,name=actions,proto3" json:"actions,omitempty"` - StartAt int64 `protobuf:"varint,3,opt,name=start_at,json=startAt,proto3" json:"start_at,omitempty"` - ExpiredAt int64 `protobuf:"varint,4,opt,name=expired_at,json=expiredAt,proto3" json:"expired_at,omitempty"` - Memo string `protobuf:"bytes,5,opt,name=memo,proto3" json:"memo,omitempty"` + Trigger *TaskTrigger `protobuf:"bytes,1,opt,name=trigger,proto3" json:"trigger,omitempty"` + StartAt int64 `protobuf:"varint,2,opt,name=start_at,json=startAt,proto3" json:"start_at,omitempty"` + ExpiredAt int64 `protobuf:"varint,3,opt,name=expired_at,json=expiredAt,proto3" json:"expired_at,omitempty"` // A repeatable task will continue to be run - Repeatable bool `protobuf:"varint,6,opt,name=repeatable,proto3" json:"repeatable,omitempty"` + Repeatable bool `protobuf:"varint,4,opt,name=repeatable,proto3" json:"repeatable,omitempty"` // the smart wallet address that will be used to run this task // When leaving out, we will use the default(salt=0) wallet - SmartWalletAddress string `protobuf:"bytes,7,opt,name=smart_wallet_address,json=smartWalletAddress,proto3" json:"smart_wallet_address,omitempty"` + SmartWalletAddress string `protobuf:"bytes,5,opt,name=smart_wallet_address,json=smartWalletAddress,proto3" json:"smart_wallet_address,omitempty"` + Memo string `protobuf:"bytes,6,opt,name=memo,proto3" json:"memo,omitempty"` + Nodes []*TaskNode `protobuf:"bytes,7,rep,name=nodes,proto3" json:"nodes,omitempty"` + Edges []*TaskEdge `protobuf:"bytes,8,rep,name=edges,proto3" json:"edges,omitempty"` } func (x *CreateTaskReq) Reset() { *x = CreateTaskReq{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[19] + mi := &file_protobuf_avs_proto_msgTypes[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1654,7 +2019,7 @@ func (x *CreateTaskReq) String() string { func (*CreateTaskReq) ProtoMessage() {} func (x *CreateTaskReq) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[19] + mi := &file_protobuf_avs_proto_msgTypes[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1667,7 +2032,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{19} + return file_protobuf_avs_proto_rawDescGZIP(), []int{23} } func (x *CreateTaskReq) GetTrigger() *TaskTrigger { @@ -1677,13 +2042,6 @@ func (x *CreateTaskReq) GetTrigger() *TaskTrigger { return nil } -func (x *CreateTaskReq) GetActions() []*TaskAction { - if x != nil { - return x.Actions - } - return nil -} - func (x *CreateTaskReq) GetStartAt() int64 { if x != nil { return x.StartAt @@ -1698,6 +2056,20 @@ func (x *CreateTaskReq) GetExpiredAt() int64 { return 0 } +func (x *CreateTaskReq) GetRepeatable() bool { + if x != nil { + return x.Repeatable + } + return false +} + +func (x *CreateTaskReq) GetSmartWalletAddress() string { + if x != nil { + return x.SmartWalletAddress + } + return "" +} + func (x *CreateTaskReq) GetMemo() string { if x != nil { return x.Memo @@ -1705,18 +2077,18 @@ func (x *CreateTaskReq) GetMemo() string { return "" } -func (x *CreateTaskReq) GetRepeatable() bool { +func (x *CreateTaskReq) GetNodes() []*TaskNode { if x != nil { - return x.Repeatable + return x.Nodes } - return false + return nil } -func (x *CreateTaskReq) GetSmartWalletAddress() string { +func (x *CreateTaskReq) GetEdges() []*TaskEdge { if x != nil { - return x.SmartWalletAddress + return x.Edges } - return "" + return nil } type CreateTaskResp struct { @@ -1730,7 +2102,7 @@ type CreateTaskResp struct { func (x *CreateTaskResp) Reset() { *x = CreateTaskResp{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[20] + mi := &file_protobuf_avs_proto_msgTypes[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1743,7 +2115,7 @@ func (x *CreateTaskResp) String() string { func (*CreateTaskResp) ProtoMessage() {} func (x *CreateTaskResp) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[20] + mi := &file_protobuf_avs_proto_msgTypes[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1756,7 +2128,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{20} + return file_protobuf_avs_proto_rawDescGZIP(), []int{24} } func (x *CreateTaskResp) GetId() string { @@ -1777,7 +2149,7 @@ type NonceRequest struct { func (x *NonceRequest) Reset() { *x = NonceRequest{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[21] + mi := &file_protobuf_avs_proto_msgTypes[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1790,7 +2162,7 @@ func (x *NonceRequest) String() string { func (*NonceRequest) ProtoMessage() {} func (x *NonceRequest) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[21] + mi := &file_protobuf_avs_proto_msgTypes[25] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1803,7 +2175,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{21} + return file_protobuf_avs_proto_rawDescGZIP(), []int{25} } func (x *NonceRequest) GetOwner() string { @@ -1824,7 +2196,7 @@ type NonceResp struct { func (x *NonceResp) Reset() { *x = NonceResp{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[22] + mi := &file_protobuf_avs_proto_msgTypes[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1837,7 +2209,7 @@ func (x *NonceResp) String() string { func (*NonceResp) ProtoMessage() {} func (x *NonceResp) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[22] + mi := &file_protobuf_avs_proto_msgTypes[26] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1850,7 +2222,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{22} + return file_protobuf_avs_proto_rawDescGZIP(), []int{26} } func (x *NonceResp) GetNonce() string { @@ -1874,7 +2246,7 @@ type AddressRequest struct { func (x *AddressRequest) Reset() { *x = AddressRequest{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[23] + mi := &file_protobuf_avs_proto_msgTypes[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1887,7 +2259,7 @@ func (x *AddressRequest) String() string { func (*AddressRequest) ProtoMessage() {} func (x *AddressRequest) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[23] + mi := &file_protobuf_avs_proto_msgTypes[27] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1900,7 +2272,7 @@ func (x *AddressRequest) ProtoReflect() protoreflect.Message { // Deprecated: Use AddressRequest.ProtoReflect.Descriptor instead. func (*AddressRequest) Descriptor() ([]byte, []int) { - return file_protobuf_avs_proto_rawDescGZIP(), []int{23} + return file_protobuf_avs_proto_rawDescGZIP(), []int{27} } func (x *AddressRequest) GetFactory() string { @@ -1930,7 +2302,7 @@ type SmartWallet struct { func (x *SmartWallet) Reset() { *x = SmartWallet{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[24] + mi := &file_protobuf_avs_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1943,7 +2315,7 @@ func (x *SmartWallet) String() string { func (*SmartWallet) ProtoMessage() {} func (x *SmartWallet) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[24] + mi := &file_protobuf_avs_proto_msgTypes[28] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1956,7 +2328,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{24} + return file_protobuf_avs_proto_rawDescGZIP(), []int{28} } func (x *SmartWallet) GetAddress() string { @@ -1991,7 +2363,7 @@ type AddressResp struct { func (x *AddressResp) Reset() { *x = AddressResp{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[25] + mi := &file_protobuf_avs_proto_msgTypes[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2004,7 +2376,7 @@ func (x *AddressResp) String() string { func (*AddressResp) ProtoMessage() {} func (x *AddressResp) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[25] + mi := &file_protobuf_avs_proto_msgTypes[29] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2017,7 +2389,7 @@ func (x *AddressResp) ProtoReflect() protoreflect.Message { // Deprecated: Use AddressResp.ProtoReflect.Descriptor instead. func (*AddressResp) Descriptor() ([]byte, []int) { - return file_protobuf_avs_proto_rawDescGZIP(), []int{25} + return file_protobuf_avs_proto_rawDescGZIP(), []int{29} } func (x *AddressResp) GetWallets() []*SmartWallet { @@ -2039,7 +2411,7 @@ type ListTasksReq struct { func (x *ListTasksReq) Reset() { *x = ListTasksReq{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[26] + mi := &file_protobuf_avs_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2052,7 +2424,7 @@ func (x *ListTasksReq) String() string { func (*ListTasksReq) ProtoMessage() {} func (x *ListTasksReq) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[26] + mi := &file_protobuf_avs_proto_msgTypes[30] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2065,7 +2437,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{26} + return file_protobuf_avs_proto_rawDescGZIP(), []int{30} } func (x *ListTasksReq) GetSmartWalletAddress() string { @@ -2086,7 +2458,7 @@ type ListTasksResp struct { func (x *ListTasksResp) Reset() { *x = ListTasksResp{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[27] + mi := &file_protobuf_avs_proto_msgTypes[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2099,7 +2471,7 @@ func (x *ListTasksResp) String() string { func (*ListTasksResp) ProtoMessage() {} func (x *ListTasksResp) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[27] + mi := &file_protobuf_avs_proto_msgTypes[31] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2112,7 +2484,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{27} + return file_protobuf_avs_proto_rawDescGZIP(), []int{31} } func (x *ListTasksResp) GetTasks() []*Task { @@ -2135,7 +2507,7 @@ type GetKeyReq struct { func (x *GetKeyReq) Reset() { *x = GetKeyReq{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[28] + mi := &file_protobuf_avs_proto_msgTypes[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2148,7 +2520,7 @@ func (x *GetKeyReq) String() string { func (*GetKeyReq) ProtoMessage() {} func (x *GetKeyReq) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[28] + mi := &file_protobuf_avs_proto_msgTypes[32] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2161,7 +2533,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{28} + return file_protobuf_avs_proto_rawDescGZIP(), []int{32} } func (x *GetKeyReq) GetOwner() string { @@ -2196,7 +2568,7 @@ type KeyResp struct { func (x *KeyResp) Reset() { *x = KeyResp{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[29] + mi := &file_protobuf_avs_proto_msgTypes[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2209,7 +2581,7 @@ func (x *KeyResp) String() string { func (*KeyResp) ProtoMessage() {} func (x *KeyResp) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[29] + mi := &file_protobuf_avs_proto_msgTypes[33] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2222,7 +2594,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{29} + return file_protobuf_avs_proto_rawDescGZIP(), []int{33} } func (x *KeyResp) GetKey() string { @@ -2245,7 +2617,7 @@ type UpdateChecksReq struct { func (x *UpdateChecksReq) Reset() { *x = UpdateChecksReq{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[30] + mi := &file_protobuf_avs_proto_msgTypes[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2258,7 +2630,7 @@ func (x *UpdateChecksReq) String() string { func (*UpdateChecksReq) ProtoMessage() {} func (x *UpdateChecksReq) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[30] + mi := &file_protobuf_avs_proto_msgTypes[34] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2271,7 +2643,7 @@ func (x *UpdateChecksReq) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateChecksReq.ProtoReflect.Descriptor instead. func (*UpdateChecksReq) Descriptor() ([]byte, []int) { - return file_protobuf_avs_proto_rawDescGZIP(), []int{30} + return file_protobuf_avs_proto_rawDescGZIP(), []int{34} } func (x *UpdateChecksReq) GetAddress() string { @@ -2306,7 +2678,7 @@ type UpdateChecksResp struct { func (x *UpdateChecksResp) Reset() { *x = UpdateChecksResp{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[31] + mi := &file_protobuf_avs_proto_msgTypes[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2319,7 +2691,7 @@ func (x *UpdateChecksResp) String() string { func (*UpdateChecksResp) ProtoMessage() {} func (x *UpdateChecksResp) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[31] + mi := &file_protobuf_avs_proto_msgTypes[35] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2332,7 +2704,7 @@ func (x *UpdateChecksResp) ProtoReflect() protoreflect.Message { // Deprecated: Use UpdateChecksResp.ProtoReflect.Descriptor instead. func (*UpdateChecksResp) Descriptor() ([]byte, []int) { - return file_protobuf_avs_proto_rawDescGZIP(), []int{31} + return file_protobuf_avs_proto_rawDescGZIP(), []int{35} } func (x *UpdateChecksResp) GetUpdatedAt() *timestamppb.Timestamp { @@ -2355,7 +2727,7 @@ type CreateWalletReq struct { func (x *CreateWalletReq) Reset() { *x = CreateWalletReq{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[32] + mi := &file_protobuf_avs_proto_msgTypes[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2368,7 +2740,7 @@ func (x *CreateWalletReq) String() string { func (*CreateWalletReq) ProtoMessage() {} func (x *CreateWalletReq) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[32] + mi := &file_protobuf_avs_proto_msgTypes[36] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2381,7 +2753,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{32} + return file_protobuf_avs_proto_rawDescGZIP(), []int{36} } func (x *CreateWalletReq) GetSalt() string { @@ -2409,7 +2781,7 @@ type CreateWalletResp struct { func (x *CreateWalletResp) Reset() { *x = CreateWalletResp{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[33] + mi := &file_protobuf_avs_proto_msgTypes[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2422,7 +2794,7 @@ func (x *CreateWalletResp) String() string { func (*CreateWalletResp) ProtoMessage() {} func (x *CreateWalletResp) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[33] + mi := &file_protobuf_avs_proto_msgTypes[37] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2435,7 +2807,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{33} + return file_protobuf_avs_proto_rawDescGZIP(), []int{37} } func (x *CreateWalletResp) GetAddress() string { @@ -2458,7 +2830,7 @@ type Checkin_Status struct { func (x *Checkin_Status) Reset() { *x = Checkin_Status{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[34] + mi := &file_protobuf_avs_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2471,7 +2843,7 @@ func (x *Checkin_Status) String() string { func (*Checkin_Status) ProtoMessage() {} func (x *Checkin_Status) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[34] + mi := &file_protobuf_avs_proto_msgTypes[38] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2554,315 +2926,350 @@ var file_protobuf_avs_proto_rawDesc = []byte{ 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, 0x8c, 0x02, 0x0a, 0x0b, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, - 0x12, 0x3a, 0x0a, 0x0c, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, - 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, - 0x74, 0x6f, 0x72, 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x52, - 0x0b, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x35, 0x0a, 0x08, - 0x73, 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, - 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x54, 0x69, 0x6d, 0x65, - 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x08, 0x73, 0x63, 0x68, 0x65, 0x64, - 0x75, 0x6c, 0x65, 0x12, 0x49, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, - 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x22, 0x2e, 0x61, 0x67, - 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, - 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, - 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x3f, - 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, - 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, - 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x22, - 0x39, 0x0a, 0x0d, 0x54, 0x69, 0x6d, 0x65, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, - 0x12, 0x14, 0x0a, 0x05, 0x66, 0x69, 0x78, 0x65, 0x64, 0x18, 0x01, 0x20, 0x03, 0x28, 0x03, 0x52, - 0x05, 0x66, 0x69, 0x78, 0x65, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x63, 0x72, 0x6f, 0x6e, 0x18, 0x02, - 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x63, 0x72, 0x6f, 0x6e, 0x22, 0x5d, 0x0a, 0x16, 0x43, 0x6f, - 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x43, 0x6f, 0x6e, 0x64, 0x69, - 0x74, 0x69, 0x6f, 0x6e, 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, - 0x18, 0x0a, 0x07, 0x63, 0x61, 0x6c, 0x6c, 0x6d, 0x73, 0x67, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x63, 0x61, 0x6c, 0x6c, 0x6d, 0x73, 0x67, 0x22, 0x35, 0x0a, 0x13, 0x45, 0x78, 0x70, - 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 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, 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, 0x47, 0x0a, 0x0b, 0x45, 0x54, 0x48, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, - 0x72, 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, 0x9a, 0x01, 0x0a, 0x11, - 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, - 0x6e, 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, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, - 0x68, 0x6f, 0x64, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, - 0x64, 0x12, 0x25, 0x0a, 0x0e, 0x65, 0x6e, 0x63, 0x6f, 0x64, 0x65, 0x64, 0x5f, 0x70, 0x61, 0x72, - 0x61, 0x6d, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0d, 0x65, 0x6e, 0x63, 0x6f, 0x64, - 0x65, 0x64, 0x50, 0x61, 0x72, 0x61, 0x6d, 0x73, 0x22, 0x3a, 0x0a, 0x10, 0x47, 0x72, 0x61, 0x70, - 0x68, 0x51, 0x4c, 0x44, 0x61, 0x74, 0x61, 0x51, 0x75, 0x65, 0x72, 0x79, 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, 0x22, 0xaf, 0x01, 0x0a, 0x0b, 0x48, 0x54, 0x54, 0x50, 0x41, 0x50, 0x49, - 0x43, 0x61, 0x6c, 0x6c, 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, 0x48, 0x54, 0x54, 0x50, 0x41, 0x50, 0x49, 0x43, 0x61, 0x6c, 0x6c, - 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, 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, 0x50, 0x0a, 0x0a, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, - 0x43, 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, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x02, 0x20, 0x01, - 0x28, 0x09, 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x22, 0x43, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x64, - 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x4a, 0x75, 0x6d, 0x70, 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, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x65, 0x78, - 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x65, 0x78, 0x74, 0x22, 0x9d, 0x01, - 0x0a, 0x0c, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x29, - 0x0a, 0x02, 0x49, 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x67, 0x67, - 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x4a, 0x75, 0x6d, 0x70, 0x52, 0x02, 0x49, 0x66, 0x12, 0x33, 0x0a, 0x07, 0x45, 0x6c, 0x73, - 0x65, 0x49, 0x66, 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x67, 0x67, - 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, - 0x6e, 0x4a, 0x75, 0x6d, 0x70, 0x52, 0x07, 0x45, 0x6c, 0x73, 0x65, 0x49, 0x66, 0x73, 0x12, 0x2d, - 0x0a, 0x04, 0x45, 0x6c, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, - 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, - 0x69, 0x6f, 0x6e, 0x4a, 0x75, 0x6d, 0x70, 0x52, 0x04, 0x45, 0x6c, 0x73, 0x65, 0x22, 0xf9, 0x03, - 0x0a, 0x0a, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x31, 0x0a, 0x09, - 0x74, 0x61, 0x73, 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, - 0x14, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x54, 0x61, 0x73, - 0x6b, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x74, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 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, 0x12, 0x0a, 0x04, 0x6e, 0x65, 0x78, 0x74, 0x18, 0x04, 0x20, 0x03, 0x28, - 0x09, 0x52, 0x04, 0x6e, 0x65, 0x78, 0x74, 0x12, 0x3a, 0x0a, 0x0c, 0x65, 0x74, 0x68, 0x5f, 0x74, - 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, - 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x45, 0x54, 0x48, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x52, 0x0b, 0x65, 0x74, 0x68, 0x54, 0x72, 0x61, 0x6e, 0x73, - 0x66, 0x65, 0x72, 0x12, 0x4c, 0x0a, 0x12, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, - 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 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, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x11, - 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, - 0x6e, 0x12, 0x4a, 0x0a, 0x12, 0x67, 0x72, 0x61, 0x70, 0x68, 0x71, 0x6c, 0x5f, 0x64, 0x61, 0x74, - 0x61, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x0c, 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, 0x44, 0x61, 0x74, 0x61, 0x51, 0x75, 0x65, 0x72, 0x79, 0x52, 0x10, 0x67, 0x72, 0x61, - 0x70, 0x68, 0x71, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x3f, 0x0a, - 0x0f, 0x68, 0x74, 0x74, 0x70, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, - 0x18, 0x0d, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, - 0x74, 0x6f, 0x72, 0x2e, 0x48, 0x54, 0x54, 0x50, 0x41, 0x50, 0x49, 0x43, 0x61, 0x6c, 0x6c, 0x52, - 0x0d, 0x68, 0x74, 0x74, 0x70, 0x44, 0x61, 0x74, 0x61, 0x51, 0x75, 0x65, 0x72, 0x79, 0x12, 0x37, - 0x0a, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x0e, 0x20, - 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, - 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x43, 0x6f, 0x64, 0x65, 0x52, 0x0a, 0x63, 0x75, 0x73, - 0x74, 0x6f, 0x6d, 0x43, 0x6f, 0x64, 0x65, 0x12, 0x30, 0x0a, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, - 0x68, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x18, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, - 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x41, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 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, 0xc9, 0x03, 0x0a, 0x04, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x20, 0x0a, - 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x67, 0x67, 0x72, - 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x55, 0x55, 0x49, 0x44, 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, 0x31, 0x0a, 0x07, 0x74, 0x72, 0x69, 0x67, 0x67, - 0x65, 0x72, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, + 0x22, 0x2f, 0x0a, 0x13, 0x46, 0x69, 0x78, 0x65, 0x64, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x43, 0x6f, + 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x18, 0x0a, 0x07, 0x65, 0x70, 0x6f, 0x63, 0x68, + 0x65, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x03, 0x52, 0x07, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x65, + 0x73, 0x22, 0x2e, 0x0a, 0x0d, 0x43, 0x72, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x1d, 0x0a, 0x0a, 0x63, 0x72, 0x6f, 0x6e, 0x5f, 0x74, 0x61, 0x62, 0x6c, 0x65, + 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x09, 0x63, 0x72, 0x6f, 0x6e, 0x54, 0x61, 0x62, 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, 0xc4, 0x02, 0x0a, 0x0b, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, + 0x72, 0x12, 0x3a, 0x0a, 0x0c, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, + 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x17, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, + 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, + 0x52, 0x0b, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x54, 0x79, 0x70, 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, 0x31, 0x0a, 0x02, 0x61, 0x74, 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, 0x02, 0x61, 0x74, 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, 0x13, 0x0a, 0x11, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x5f, 0x63, + 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 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, 0x12, 0x2c, 0x0a, 0x05, 0x6e, 0x6f, - 0x64, 0x65, 0x73, 0x18, 0x05, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x67, 0x67, 0x72, - 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x6f, - 0x6e, 0x52, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x72, - 0x74, 0x5f, 0x61, 0x74, 0x18, 0x06, 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, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, - 0x41, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x08, 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, 0x09, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x63, 0x6f, - 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x2e, 0x0a, 0x06, 0x73, 0x74, 0x61, - 0x74, 0x75, 0x73, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x61, 0x67, 0x67, 0x72, + 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, 0x7e, 0x0a, 0x11, 0x43, 0x6f, 0x6e, 0x74, 0x72, + 0x61, 0x63, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 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, 0x3a, 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, 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, 0x43, 0x0a, 0x0d, 0x43, 0x6f, 0x6e, 0x64, 0x69, + 0x74, 0x69, 0x6f, 0x6e, 0x4a, 0x75, 0x6d, 0x70, 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, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x65, 0x78, 0x74, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6e, 0x65, 0x78, 0x74, 0x22, 0x9b, 0x01, 0x0a, + 0x0a, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x29, 0x0a, 0x02, 0x69, + 0x66, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, + 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x4a, 0x75, + 0x6d, 0x70, 0x52, 0x02, 0x69, 0x66, 0x12, 0x33, 0x0a, 0x07, 0x65, 0x6c, 0x73, 0x65, 0x49, 0x66, + 0x73, 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, + 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x4a, 0x75, + 0x6d, 0x70, 0x52, 0x07, 0x65, 0x6c, 0x73, 0x65, 0x49, 0x66, 0x73, 0x12, 0x2d, 0x0a, 0x04, 0x65, + 0x6c, 0x73, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x67, 0x67, 0x72, + 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x4a, 0x75, 0x6d, 0x70, 0x52, 0x04, 0x65, 0x6c, 0x73, 0x65, 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, 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, 0xe5, 0x04, 0x0a, 0x08, 0x54, 0x61, 0x73, 0x6b, 0x4e, 0x6f, 0x64, + 0x65, 0x12, 0x31, 0x0a, 0x09, 0x6e, 0x6f, 0x64, 0x65, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, + 0x20, 0x01, 0x28, 0x0e, 0x32, 0x14, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, + 0x72, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x52, 0x08, 0x6e, 0x6f, 0x64, 0x65, + 0x54, 0x79, 0x70, 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, 0x44, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x72, + 0x65, 0x61, 0x64, 0x18, 0x0c, 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, 0x51, + 0x75, 0x65, 0x72, 0x79, 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, 0x3d, 0x0a, 0x0b, 0x63, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, + 0x11, 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, 0x62, 0x6f, 0x64, 0x79, 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, 0xf1, 0x03, 0x0a, 0x04, 0x54, 0x61, 0x73, 0x6b, + 0x12, 0x20, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, + 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x55, 0x55, 0x49, 0x44, 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, 0x05, 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, 0x06, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, + 0x65, 0x64, 0x41, 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x07, 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, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, + 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x41, 0x74, 0x12, 0x1c, 0x0a, 0x09, 0x72, + 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x08, 0x52, 0x09, + 0x72, 0x65, 0x63, 0x75, 0x72, 0x72, 0x69, 0x6e, 0x67, 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, 0x1e, 0x0a, 0x0a, 0x72, 0x65, 0x70, - 0x65, 0x61, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x72, - 0x65, 0x70, 0x65, 0x61, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x12, 0x35, 0x0a, 0x0a, 0x65, 0x78, 0x65, - 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x18, 0x0c, 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, 0x94, 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, 0x30, 0x0a, 0x07, 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, - 0x18, 0x02, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, - 0x74, 0x6f, 0x72, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x07, - 0x61, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x72, 0x74, - 0x5f, 0x61, 0x74, 0x18, 0x03, 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, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x41, - 0x74, 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, - 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x12, 0x1e, 0x0a, 0x0a, 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x61, - 0x62, 0x6c, 0x65, 0x18, 0x06, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, 0x72, 0x65, 0x70, 0x65, 0x61, - 0x74, 0x61, 0x62, 0x6c, 0x65, 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, 0x07, 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, 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, 0x3e, 0x0a, 0x0e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, - 0x75, 0x65, 0x73, 0x74, 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, 0x40, 0x0a, 0x0b, 0x41, 0x64, 0x64, - 0x72, 0x65, 0x73, 0x73, 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, 0x2c, 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, 0x2a, 0x4f, 0x0a, 0x0b, 0x54, - 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0f, 0x0a, 0x0b, 0x54, 0x69, - 0x6d, 0x65, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x10, 0x00, 0x12, 0x18, 0x0a, 0x14, 0x43, - 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x72, 0x69, 0x67, - 0x67, 0x65, 0x72, 0x10, 0x01, 0x12, 0x15, 0x0a, 0x11, 0x45, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, - 0x69, 0x6f, 0x6e, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x10, 0x02, 0x2a, 0xad, 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, 0x2a, 0x93, 0x01, 0x0a, - 0x08, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x13, 0x0a, 0x0f, 0x45, 0x54, 0x48, - 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x54, 0x61, 0x73, 0x6b, 0x10, 0x00, 0x12, 0x19, - 0x0a, 0x15, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, - 0x69, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, 0x10, 0x01, 0x12, 0x18, 0x0a, 0x14, 0x47, 0x72, 0x61, - 0x70, 0x68, 0x51, 0x4c, 0x44, 0x61, 0x74, 0x61, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x61, 0x73, - 0x6b, 0x10, 0x02, 0x12, 0x13, 0x0a, 0x0f, 0x48, 0x54, 0x54, 0x50, 0x41, 0x50, 0x49, 0x43, 0x61, - 0x6c, 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x10, 0x03, 0x12, 0x12, 0x0a, 0x0e, 0x43, 0x75, 0x73, 0x74, - 0x6f, 0x6d, 0x43, 0x6f, 0x64, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x10, 0x04, 0x12, 0x14, 0x0a, 0x10, - 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x41, 0x63, 0x74, 0x69, 0x6f, 0x6e, 0x54, 0x61, 0x73, 0x6b, - 0x10, 0x05, 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, 0xa4, 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, 0x4f, 0x0a, 0x16, - 0x47, 0x65, 0x74, 0x53, 0x6d, 0x61, 0x72, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, 0x41, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1a, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, - 0x74, 0x6f, 0x72, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, 0x65, - 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, - 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 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, 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, 0x2f, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, - 0x12, 0x10, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x55, 0x55, - 0x49, 0x44, 0x1a, 0x10, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, - 0x54, 0x61, 0x73, 0x6b, 0x22, 0x00, 0x12, 0x3c, 0x0a, 0x0a, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, - 0x54, 0x61, 0x73, 0x6b, 0x12, 0x10, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, - 0x72, 0x2e, 0x55, 0x55, 0x49, 0x44, 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, 0x3c, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, 0x61, - 0x73, 0x6b, 0x12, 0x10, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, - 0x55, 0x55, 0x49, 0x44, 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, 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, + 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 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, 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, 0xba, 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, 0x1e, 0x0a, 0x0a, 0x72, 0x65, + 0x70, 0x65, 0x61, 0x74, 0x61, 0x62, 0x6c, 0x65, 0x18, 0x04, 0x20, 0x01, 0x28, 0x08, 0x52, 0x0a, + 0x72, 0x65, 0x70, 0x65, 0x61, 0x74, 0x61, 0x62, 0x6c, 0x65, 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, 0x3e, 0x0a, 0x0e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, + 0x71, 0x75, 0x65, 0x73, 0x74, 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, 0x40, 0x0a, 0x0b, 0x41, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 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, 0x2c, + 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, 0x2a, 0x6c, 0x0a, 0x0b, + 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x54, 0x79, 0x70, 0x65, 0x12, 0x11, 0x0a, 0x0d, 0x4d, + 0x61, 0x6e, 0x75, 0x61, 0x6c, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x10, 0x00, 0x12, 0x15, + 0x0a, 0x11, 0x46, 0x69, 0x78, 0x65, 0x64, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x54, 0x72, 0x69, 0x67, + 0x67, 0x65, 0x72, 0x10, 0x01, 0x12, 0x0f, 0x0a, 0x0b, 0x43, 0x72, 0x6f, 0x6e, 0x54, 0x72, 0x69, + 0x67, 0x67, 0x65, 0x72, 0x10, 0x02, 0x12, 0x10, 0x0a, 0x0c, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x54, + 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x10, 0x03, 0x12, 0x10, 0x0a, 0x0c, 0x45, 0x76, 0x65, 0x6e, + 0x74, 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 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, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0e, 0x0a, 0x0a, 0x4a, 0x61, 0x76, + 0x61, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x10, 0x00, 0x2a, 0xab, 0x01, 0x0a, 0x08, 0x54, 0x61, + 0x73, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x13, 0x0a, 0x0f, 0x45, 0x54, 0x48, 0x54, 0x72, 0x61, + 0x6e, 0x73, 0x66, 0x65, 0x72, 0x54, 0x61, 0x73, 0x6b, 0x10, 0x00, 0x12, 0x15, 0x0a, 0x11, 0x43, + 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x57, 0x72, 0x69, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, + 0x10, 0x01, 0x12, 0x14, 0x0a, 0x10, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x52, 0x65, + 0x61, 0x64, 0x54, 0x61, 0x73, 0x6b, 0x10, 0x02, 0x12, 0x18, 0x0a, 0x14, 0x47, 0x72, 0x61, 0x70, + 0x68, 0x51, 0x4c, 0x44, 0x61, 0x74, 0x61, 0x51, 0x75, 0x65, 0x72, 0x79, 0x54, 0x61, 0x73, 0x6b, + 0x10, 0x03, 0x12, 0x0f, 0x0a, 0x0b, 0x52, 0x65, 0x73, 0x74, 0x41, 0x50, 0x49, 0x54, 0x61, 0x73, + 0x6b, 0x10, 0x04, 0x12, 0x0e, 0x0a, 0x0a, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x54, 0x61, 0x73, + 0x6b, 0x10, 0x05, 0x12, 0x0e, 0x0a, 0x0a, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x54, 0x61, 0x73, + 0x6b, 0x10, 0x06, 0x12, 0x12, 0x0a, 0x0e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x43, 0x6f, 0x64, + 0x65, 0x54, 0x61, 0x73, 0x6b, 0x10, 0x07, 0x32, 0xa4, 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, 0x4f, 0x0a, + 0x16, 0x47, 0x65, 0x74, 0x53, 0x6d, 0x61, 0x72, 0x74, 0x41, 0x63, 0x63, 0x6f, 0x75, 0x6e, 0x74, + 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1a, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, + 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x52, 0x65, 0x71, 0x75, + 0x65, 0x73, 0x74, 0x1a, 0x17, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, + 0x2e, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 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, 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, 0x2f, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, + 0x6b, 0x12, 0x10, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x55, + 0x55, 0x49, 0x44, 0x1a, 0x10, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, + 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x22, 0x00, 0x12, 0x3c, 0x0a, 0x0a, 0x43, 0x61, 0x6e, 0x63, 0x65, + 0x6c, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x10, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, + 0x6f, 0x72, 0x2e, 0x55, 0x55, 0x49, 0x44, 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, 0x3c, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, + 0x61, 0x73, 0x6b, 0x12, 0x10, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, + 0x2e, 0x55, 0x55, 0x49, 0x44, 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, 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, } var ( @@ -2878,112 +3285,121 @@ func file_protobuf_avs_proto_rawDescGZIP() []byte { } var file_protobuf_avs_proto_enumTypes = make([]protoimpl.EnumInfo, 5) -var file_protobuf_avs_proto_msgTypes = make([]protoimpl.MessageInfo, 36) +var file_protobuf_avs_proto_msgTypes = make([]protoimpl.MessageInfo, 40) var file_protobuf_avs_proto_goTypes = []interface{}{ - (TriggerType)(0), // 0: aggregator.TriggerType - (Error)(0), // 1: aggregator.Error - (TaskType)(0), // 2: aggregator.TaskType - (TaskStatus)(0), // 3: aggregator.TaskStatus - (CustomCodeType)(0), // 4: aggregator.CustomCodeType - (*UUID)(nil), // 5: aggregator.UUID - (*Checkin)(nil), // 6: aggregator.Checkin - (*CheckinResp)(nil), // 7: aggregator.CheckinResp - (*SyncTasksReq)(nil), // 8: aggregator.SyncTasksReq - (*TaskTrigger)(nil), // 9: aggregator.TaskTrigger - (*TimeCondition)(nil), // 10: aggregator.TimeCondition - (*ContractQueryCondition)(nil), // 11: aggregator.ContractQueryCondition - (*ExpressionCondition)(nil), // 12: aggregator.ExpressionCondition - (*SyncTasksResp)(nil), // 13: aggregator.SyncTasksResp - (*ETHTransfer)(nil), // 14: aggregator.ETHTransfer - (*ContractExecution)(nil), // 15: aggregator.ContractExecution - (*GraphQLDataQuery)(nil), // 16: aggregator.GraphQLDataQuery - (*HTTPAPICall)(nil), // 17: aggregator.HTTPAPICall - (*CustomCode)(nil), // 18: aggregator.CustomCode - (*ConditionJump)(nil), // 19: aggregator.ConditionJump - (*BranchAction)(nil), // 20: aggregator.BranchAction - (*TaskAction)(nil), // 21: aggregator.TaskAction - (*Execution)(nil), // 22: aggregator.Execution - (*Task)(nil), // 23: aggregator.Task - (*CreateTaskReq)(nil), // 24: aggregator.CreateTaskReq - (*CreateTaskResp)(nil), // 25: aggregator.CreateTaskResp - (*NonceRequest)(nil), // 26: aggregator.NonceRequest - (*NonceResp)(nil), // 27: aggregator.NonceResp - (*AddressRequest)(nil), // 28: aggregator.AddressRequest - (*SmartWallet)(nil), // 29: aggregator.SmartWallet - (*AddressResp)(nil), // 30: aggregator.AddressResp - (*ListTasksReq)(nil), // 31: aggregator.ListTasksReq - (*ListTasksResp)(nil), // 32: aggregator.ListTasksResp - (*GetKeyReq)(nil), // 33: aggregator.GetKeyReq - (*KeyResp)(nil), // 34: aggregator.KeyResp - (*UpdateChecksReq)(nil), // 35: aggregator.UpdateChecksReq - (*UpdateChecksResp)(nil), // 36: aggregator.UpdateChecksResp - (*CreateWalletReq)(nil), // 37: aggregator.CreateWalletReq - (*CreateWalletResp)(nil), // 38: aggregator.CreateWalletResp - (*Checkin_Status)(nil), // 39: aggregator.Checkin.Status - nil, // 40: aggregator.HTTPAPICall.HeadersEntry - (*timestamppb.Timestamp)(nil), // 41: google.protobuf.Timestamp - (*wrapperspb.BoolValue)(nil), // 42: google.protobuf.BoolValue + (TriggerType)(0), // 0: aggregator.TriggerType + (Error)(0), // 1: aggregator.Error + (TaskStatus)(0), // 2: aggregator.TaskStatus + (CustomCodeType)(0), // 3: aggregator.CustomCodeType + (TaskType)(0), // 4: aggregator.TaskType + (*UUID)(nil), // 5: aggregator.UUID + (*Checkin)(nil), // 6: aggregator.Checkin + (*CheckinResp)(nil), // 7: aggregator.CheckinResp + (*SyncTasksReq)(nil), // 8: aggregator.SyncTasksReq + (*FixedEpochCondition)(nil), // 9: aggregator.FixedEpochCondition + (*CronCondition)(nil), // 10: aggregator.CronCondition + (*BlockCondition)(nil), // 11: aggregator.BlockCondition + (*EventCondition)(nil), // 12: aggregator.EventCondition + (*TaskTrigger)(nil), // 13: aggregator.TaskTrigger + (*SyncTasksResp)(nil), // 14: aggregator.SyncTasksResp + (*ETHTransferNode)(nil), // 15: aggregator.ETHTransferNode + (*ContractWriteNode)(nil), // 16: aggregator.ContractWriteNode + (*ContractQueryNode)(nil), // 17: aggregator.ContractQueryNode + (*GraphQLQueryNode)(nil), // 18: aggregator.GraphQLQueryNode + (*RestAPINode)(nil), // 19: aggregator.RestAPINode + (*CustomCodeNode)(nil), // 20: aggregator.CustomCodeNode + (*ConditionJump)(nil), // 21: aggregator.ConditionJump + (*BranchNode)(nil), // 22: aggregator.BranchNode + (*FilterNode)(nil), // 23: aggregator.FilterNode + (*TaskEdge)(nil), // 24: aggregator.TaskEdge + (*TaskNode)(nil), // 25: aggregator.TaskNode + (*Execution)(nil), // 26: aggregator.Execution + (*Task)(nil), // 27: aggregator.Task + (*CreateTaskReq)(nil), // 28: aggregator.CreateTaskReq + (*CreateTaskResp)(nil), // 29: aggregator.CreateTaskResp + (*NonceRequest)(nil), // 30: aggregator.NonceRequest + (*NonceResp)(nil), // 31: aggregator.NonceResp + (*AddressRequest)(nil), // 32: aggregator.AddressRequest + (*SmartWallet)(nil), // 33: aggregator.SmartWallet + (*AddressResp)(nil), // 34: aggregator.AddressResp + (*ListTasksReq)(nil), // 35: aggregator.ListTasksReq + (*ListTasksResp)(nil), // 36: aggregator.ListTasksResp + (*GetKeyReq)(nil), // 37: aggregator.GetKeyReq + (*KeyResp)(nil), // 38: aggregator.KeyResp + (*UpdateChecksReq)(nil), // 39: aggregator.UpdateChecksReq + (*UpdateChecksResp)(nil), // 40: aggregator.UpdateChecksResp + (*CreateWalletReq)(nil), // 41: aggregator.CreateWalletReq + (*CreateWalletResp)(nil), // 42: aggregator.CreateWalletResp + (*Checkin_Status)(nil), // 43: aggregator.Checkin.Status + nil, // 44: aggregator.RestAPINode.HeadersEntry + (*timestamppb.Timestamp)(nil), // 45: google.protobuf.Timestamp + (*wrapperspb.BoolValue)(nil), // 46: google.protobuf.BoolValue } var file_protobuf_avs_proto_depIdxs = []int32{ - 39, // 0: aggregator.Checkin.status:type_name -> aggregator.Checkin.Status - 41, // 1: aggregator.CheckinResp.updated_at:type_name -> google.protobuf.Timestamp + 43, // 0: aggregator.Checkin.status:type_name -> aggregator.Checkin.Status + 45, // 1: aggregator.CheckinResp.updated_at:type_name -> google.protobuf.Timestamp 0, // 2: aggregator.TaskTrigger.trigger_type:type_name -> aggregator.TriggerType - 10, // 3: aggregator.TaskTrigger.schedule:type_name -> aggregator.TimeCondition - 11, // 4: aggregator.TaskTrigger.contract_query:type_name -> aggregator.ContractQueryCondition - 12, // 5: aggregator.TaskTrigger.expression:type_name -> aggregator.ExpressionCondition - 9, // 6: aggregator.SyncTasksResp.trigger:type_name -> aggregator.TaskTrigger - 40, // 7: aggregator.HTTPAPICall.headers:type_name -> aggregator.HTTPAPICall.HeadersEntry - 4, // 8: aggregator.CustomCode.type:type_name -> aggregator.CustomCodeType - 19, // 9: aggregator.BranchAction.If:type_name -> aggregator.ConditionJump - 19, // 10: aggregator.BranchAction.ElseIfs:type_name -> aggregator.ConditionJump - 19, // 11: aggregator.BranchAction.Else:type_name -> aggregator.ConditionJump - 2, // 12: aggregator.TaskAction.task_type:type_name -> aggregator.TaskType - 14, // 13: aggregator.TaskAction.eth_transfer:type_name -> aggregator.ETHTransfer - 15, // 14: aggregator.TaskAction.contract_execution:type_name -> aggregator.ContractExecution - 16, // 15: aggregator.TaskAction.graphql_data_query:type_name -> aggregator.GraphQLDataQuery - 17, // 16: aggregator.TaskAction.http_data_query:type_name -> aggregator.HTTPAPICall - 18, // 17: aggregator.TaskAction.custom_code:type_name -> aggregator.CustomCode - 20, // 18: aggregator.TaskAction.branch:type_name -> aggregator.BranchAction - 5, // 19: aggregator.Task.id:type_name -> aggregator.UUID - 9, // 20: aggregator.Task.trigger:type_name -> aggregator.TaskTrigger - 21, // 21: aggregator.Task.nodes:type_name -> aggregator.TaskAction - 3, // 22: aggregator.Task.status:type_name -> aggregator.TaskStatus - 22, // 23: aggregator.Task.executions:type_name -> aggregator.Execution - 9, // 24: aggregator.CreateTaskReq.trigger:type_name -> aggregator.TaskTrigger - 21, // 25: aggregator.CreateTaskReq.actions:type_name -> aggregator.TaskAction - 29, // 26: aggregator.AddressResp.wallets:type_name -> aggregator.SmartWallet - 23, // 27: aggregator.ListTasksResp.tasks:type_name -> aggregator.Task - 41, // 28: aggregator.UpdateChecksResp.updated_at:type_name -> google.protobuf.Timestamp - 41, // 29: aggregator.Checkin.Status.last_heartbeat:type_name -> google.protobuf.Timestamp - 33, // 30: aggregator.Aggregator.GetKey:input_type -> aggregator.GetKeyReq - 26, // 31: aggregator.Aggregator.GetNonce:input_type -> aggregator.NonceRequest - 28, // 32: aggregator.Aggregator.GetSmartAccountAddress:input_type -> aggregator.AddressRequest - 37, // 33: aggregator.Aggregator.CreateWallet:input_type -> aggregator.CreateWalletReq - 24, // 34: aggregator.Aggregator.CreateTask:input_type -> aggregator.CreateTaskReq - 31, // 35: aggregator.Aggregator.ListTasks:input_type -> aggregator.ListTasksReq - 5, // 36: aggregator.Aggregator.GetTask:input_type -> aggregator.UUID - 5, // 37: aggregator.Aggregator.CancelTask:input_type -> aggregator.UUID - 5, // 38: aggregator.Aggregator.DeleteTask:input_type -> aggregator.UUID - 6, // 39: aggregator.Aggregator.Ping:input_type -> aggregator.Checkin - 8, // 40: aggregator.Aggregator.SyncTasks:input_type -> aggregator.SyncTasksReq - 35, // 41: aggregator.Aggregator.UpdateChecks:input_type -> aggregator.UpdateChecksReq - 34, // 42: aggregator.Aggregator.GetKey:output_type -> aggregator.KeyResp - 27, // 43: aggregator.Aggregator.GetNonce:output_type -> aggregator.NonceResp - 30, // 44: aggregator.Aggregator.GetSmartAccountAddress:output_type -> aggregator.AddressResp - 38, // 45: aggregator.Aggregator.CreateWallet:output_type -> aggregator.CreateWalletResp - 25, // 46: aggregator.Aggregator.CreateTask:output_type -> aggregator.CreateTaskResp - 32, // 47: aggregator.Aggregator.ListTasks:output_type -> aggregator.ListTasksResp - 23, // 48: aggregator.Aggregator.GetTask:output_type -> aggregator.Task - 42, // 49: aggregator.Aggregator.CancelTask:output_type -> google.protobuf.BoolValue - 42, // 50: aggregator.Aggregator.DeleteTask:output_type -> google.protobuf.BoolValue - 7, // 51: aggregator.Aggregator.Ping:output_type -> aggregator.CheckinResp - 13, // 52: aggregator.Aggregator.SyncTasks:output_type -> aggregator.SyncTasksResp - 36, // 53: aggregator.Aggregator.UpdateChecks:output_type -> aggregator.UpdateChecksResp - 42, // [42:54] is the sub-list for method output_type - 30, // [30:42] is the sub-list for method input_type - 30, // [30:30] is the sub-list for extension type_name - 30, // [30:30] is the sub-list for extension extendee - 0, // [0:30] is the sub-list for field type_name + 9, // 3: aggregator.TaskTrigger.at:type_name -> aggregator.FixedEpochCondition + 10, // 4: aggregator.TaskTrigger.cron:type_name -> aggregator.CronCondition + 11, // 5: aggregator.TaskTrigger.block:type_name -> aggregator.BlockCondition + 12, // 6: aggregator.TaskTrigger.event:type_name -> aggregator.EventCondition + 13, // 7: aggregator.SyncTasksResp.trigger:type_name -> aggregator.TaskTrigger + 44, // 8: aggregator.RestAPINode.headers:type_name -> aggregator.RestAPINode.HeadersEntry + 3, // 9: aggregator.CustomCodeNode.type:type_name -> aggregator.CustomCodeType + 21, // 10: aggregator.BranchNode.if:type_name -> aggregator.ConditionJump + 21, // 11: aggregator.BranchNode.elseIfs:type_name -> aggregator.ConditionJump + 21, // 12: aggregator.BranchNode.else:type_name -> aggregator.ConditionJump + 4, // 13: aggregator.TaskNode.node_type:type_name -> aggregator.TaskType + 15, // 14: aggregator.TaskNode.eth_transfer:type_name -> aggregator.ETHTransferNode + 16, // 15: aggregator.TaskNode.contract_write:type_name -> aggregator.ContractWriteNode + 17, // 16: aggregator.TaskNode.contract_read:type_name -> aggregator.ContractQueryNode + 18, // 17: aggregator.TaskNode.graphql_data_query:type_name -> aggregator.GraphQLQueryNode + 19, // 18: aggregator.TaskNode.rest_api:type_name -> aggregator.RestAPINode + 22, // 19: aggregator.TaskNode.branch:type_name -> aggregator.BranchNode + 23, // 20: aggregator.TaskNode.filter:type_name -> aggregator.FilterNode + 20, // 21: aggregator.TaskNode.custom_code:type_name -> aggregator.CustomCodeNode + 5, // 22: aggregator.Task.id:type_name -> aggregator.UUID + 2, // 23: aggregator.Task.status:type_name -> aggregator.TaskStatus + 13, // 24: aggregator.Task.trigger:type_name -> aggregator.TaskTrigger + 25, // 25: aggregator.Task.nodes:type_name -> aggregator.TaskNode + 24, // 26: aggregator.Task.edges:type_name -> aggregator.TaskEdge + 26, // 27: aggregator.Task.executions:type_name -> aggregator.Execution + 13, // 28: aggregator.CreateTaskReq.trigger:type_name -> aggregator.TaskTrigger + 25, // 29: aggregator.CreateTaskReq.nodes:type_name -> aggregator.TaskNode + 24, // 30: aggregator.CreateTaskReq.edges:type_name -> aggregator.TaskEdge + 33, // 31: aggregator.AddressResp.wallets:type_name -> aggregator.SmartWallet + 27, // 32: aggregator.ListTasksResp.tasks:type_name -> aggregator.Task + 45, // 33: aggregator.UpdateChecksResp.updated_at:type_name -> google.protobuf.Timestamp + 45, // 34: aggregator.Checkin.Status.last_heartbeat:type_name -> google.protobuf.Timestamp + 37, // 35: aggregator.Aggregator.GetKey:input_type -> aggregator.GetKeyReq + 30, // 36: aggregator.Aggregator.GetNonce:input_type -> aggregator.NonceRequest + 32, // 37: aggregator.Aggregator.GetSmartAccountAddress:input_type -> aggregator.AddressRequest + 41, // 38: aggregator.Aggregator.CreateWallet:input_type -> aggregator.CreateWalletReq + 28, // 39: aggregator.Aggregator.CreateTask:input_type -> aggregator.CreateTaskReq + 35, // 40: aggregator.Aggregator.ListTasks:input_type -> aggregator.ListTasksReq + 5, // 41: aggregator.Aggregator.GetTask:input_type -> aggregator.UUID + 5, // 42: aggregator.Aggregator.CancelTask:input_type -> aggregator.UUID + 5, // 43: aggregator.Aggregator.DeleteTask:input_type -> aggregator.UUID + 6, // 44: aggregator.Aggregator.Ping:input_type -> aggregator.Checkin + 8, // 45: aggregator.Aggregator.SyncTasks:input_type -> aggregator.SyncTasksReq + 39, // 46: aggregator.Aggregator.UpdateChecks:input_type -> aggregator.UpdateChecksReq + 38, // 47: aggregator.Aggregator.GetKey:output_type -> aggregator.KeyResp + 31, // 48: aggregator.Aggregator.GetNonce:output_type -> aggregator.NonceResp + 34, // 49: aggregator.Aggregator.GetSmartAccountAddress:output_type -> aggregator.AddressResp + 42, // 50: aggregator.Aggregator.CreateWallet:output_type -> aggregator.CreateWalletResp + 29, // 51: aggregator.Aggregator.CreateTask:output_type -> aggregator.CreateTaskResp + 36, // 52: aggregator.Aggregator.ListTasks:output_type -> aggregator.ListTasksResp + 27, // 53: aggregator.Aggregator.GetTask:output_type -> aggregator.Task + 46, // 54: aggregator.Aggregator.CancelTask:output_type -> google.protobuf.BoolValue + 46, // 55: aggregator.Aggregator.DeleteTask:output_type -> google.protobuf.BoolValue + 7, // 56: aggregator.Aggregator.Ping:output_type -> aggregator.CheckinResp + 14, // 57: aggregator.Aggregator.SyncTasks:output_type -> aggregator.SyncTasksResp + 40, // 58: aggregator.Aggregator.UpdateChecks:output_type -> aggregator.UpdateChecksResp + 47, // [47:59] is the sub-list for method output_type + 35, // [35:47] is the sub-list for method input_type + 35, // [35:35] is the sub-list for extension type_name + 35, // [35:35] is the sub-list for extension extendee + 0, // [0:35] is the sub-list for field type_name } func init() { file_protobuf_avs_proto_init() } @@ -3041,7 +3457,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[4].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TaskTrigger); i { + switch v := v.(*FixedEpochCondition); i { case 0: return &v.state case 1: @@ -3053,7 +3469,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[5].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TimeCondition); i { + switch v := v.(*CronCondition); i { case 0: return &v.state case 1: @@ -3065,7 +3481,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[6].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ContractQueryCondition); i { + switch v := v.(*BlockCondition); i { case 0: return &v.state case 1: @@ -3077,7 +3493,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[7].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ExpressionCondition); i { + switch v := v.(*EventCondition); i { case 0: return &v.state case 1: @@ -3089,7 +3505,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[8].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SyncTasksResp); i { + switch v := v.(*TaskTrigger); i { case 0: return &v.state case 1: @@ -3101,7 +3517,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[9].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ETHTransfer); i { + switch v := v.(*SyncTasksResp); i { case 0: return &v.state case 1: @@ -3113,7 +3529,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[10].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ContractExecution); i { + switch v := v.(*ETHTransferNode); i { case 0: return &v.state case 1: @@ -3125,7 +3541,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[11].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GraphQLDataQuery); i { + switch v := v.(*ContractWriteNode); i { case 0: return &v.state case 1: @@ -3137,7 +3553,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[12].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*HTTPAPICall); i { + switch v := v.(*ContractQueryNode); i { case 0: return &v.state case 1: @@ -3149,7 +3565,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[13].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CustomCode); i { + switch v := v.(*GraphQLQueryNode); i { case 0: return &v.state case 1: @@ -3161,7 +3577,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[14].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ConditionJump); i { + switch v := v.(*RestAPINode); i { case 0: return &v.state case 1: @@ -3173,7 +3589,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[15].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*BranchAction); i { + switch v := v.(*CustomCodeNode); i { case 0: return &v.state case 1: @@ -3185,7 +3601,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[16].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*TaskAction); i { + switch v := v.(*ConditionJump); i { case 0: return &v.state case 1: @@ -3197,7 +3613,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[17].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Execution); i { + switch v := v.(*BranchNode); i { case 0: return &v.state case 1: @@ -3209,7 +3625,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[18].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*Task); i { + switch v := v.(*FilterNode); i { case 0: return &v.state case 1: @@ -3221,7 +3637,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[19].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateTaskReq); i { + switch v := v.(*TaskEdge); i { case 0: return &v.state case 1: @@ -3233,7 +3649,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[20].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateTaskResp); i { + switch v := v.(*TaskNode); i { case 0: return &v.state case 1: @@ -3245,7 +3661,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[21].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NonceRequest); i { + switch v := v.(*Execution); i { case 0: return &v.state case 1: @@ -3257,7 +3673,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[22].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*NonceResp); i { + switch v := v.(*Task); i { case 0: return &v.state case 1: @@ -3269,7 +3685,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[23].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddressRequest); i { + switch v := v.(*CreateTaskReq); i { case 0: return &v.state case 1: @@ -3281,7 +3697,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[24].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*SmartWallet); i { + switch v := v.(*CreateTaskResp); i { case 0: return &v.state case 1: @@ -3293,7 +3709,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[25].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*AddressResp); i { + switch v := v.(*NonceRequest); i { case 0: return &v.state case 1: @@ -3305,7 +3721,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[26].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListTasksReq); i { + switch v := v.(*NonceResp); i { case 0: return &v.state case 1: @@ -3317,7 +3733,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[27].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*ListTasksResp); i { + switch v := v.(*AddressRequest); i { case 0: return &v.state case 1: @@ -3329,7 +3745,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[28].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*GetKeyReq); i { + switch v := v.(*SmartWallet); i { case 0: return &v.state case 1: @@ -3341,7 +3757,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[29].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*KeyResp); i { + switch v := v.(*AddressResp); i { case 0: return &v.state case 1: @@ -3353,7 +3769,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[30].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateChecksReq); i { + switch v := v.(*ListTasksReq); i { case 0: return &v.state case 1: @@ -3365,7 +3781,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[31].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UpdateChecksResp); i { + switch v := v.(*ListTasksResp); i { case 0: return &v.state case 1: @@ -3377,7 +3793,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[32].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateWalletReq); i { + switch v := v.(*GetKeyReq); i { case 0: return &v.state case 1: @@ -3389,7 +3805,7 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[33].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*CreateWalletResp); i { + switch v := v.(*KeyResp); i { case 0: return &v.state case 1: @@ -3401,6 +3817,54 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateChecksReq); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protobuf_avs_proto_msgTypes[35].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*UpdateChecksResp); i { + case 0: + return &v.state + case 1: + return &v.sizeCache + case 2: + return &v.unknownFields + default: + return nil + } + } + file_protobuf_avs_proto_msgTypes[36].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[37].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[38].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Checkin_Status); i { case 0: return &v.state @@ -3413,13 +3877,30 @@ func file_protobuf_avs_proto_init() { } } } + file_protobuf_avs_proto_msgTypes[8].OneofWrappers = []interface{}{ + (*TaskTrigger_Manual)(nil), + (*TaskTrigger_At)(nil), + (*TaskTrigger_Cron)(nil), + (*TaskTrigger_Block)(nil), + (*TaskTrigger_Event)(nil), + } + file_protobuf_avs_proto_msgTypes[20].OneofWrappers = []interface{}{ + (*TaskNode_EthTransfer)(nil), + (*TaskNode_ContractWrite)(nil), + (*TaskNode_ContractRead)(nil), + (*TaskNode_GraphqlDataQuery)(nil), + (*TaskNode_RestApi)(nil), + (*TaskNode_Branch)(nil), + (*TaskNode_Filter)(nil), + (*TaskNode_CustomCode)(nil), + } type x struct{} out := protoimpl.TypeBuilder{ File: protoimpl.DescBuilder{ GoPackagePath: reflect.TypeOf(x{}).PkgPath(), RawDescriptor: file_protobuf_avs_proto_rawDesc, NumEnums: 5, - NumMessages: 36, + NumMessages: 40, NumExtensions: 0, NumServices: 1, }, diff --git a/protobuf/avs.proto b/protobuf/avs.proto index 9246165..8ca04e9 100644 --- a/protobuf/avs.proto +++ b/protobuf/avs.proto @@ -40,17 +40,57 @@ message SyncTasksReq { } enum TriggerType { - TimeTrigger = 0; - ContractQueryTrigger = 1; - ExpressionTrigger = 2; + ManualTrigger = 0; + FixedEpochTrigger = 1; + CronTrigger = 2; + BlockTrigger = 3; + EventTrigger = 4; +} + +message FixedEpochCondition { + repeated int64 epoches = 1; +} +// Simple timebase or cron syntax. +message CronCondition { + repeated string cron_table = 1; +} + +message BlockCondition { + int64 interval = 1; +} + +// An arbitrary expression to express the condition. +// People can define condition example +// chainlinkPrice("address-of-eth-usd-pair") > 2644500 && queryContract("contractaddress", "callmsg")[2] < = 5 +// By allow arbitrary expression, people can mix and match to create conplex +// condition that match their workload +// +// The function to be used need to be pre-defined on our task egnine runtime. +// When a new block is build, our engine will execute these check +// +// The expression language is re-present by https://expr-lang.org/ +message EventCondition { + string expression = 1; } message TaskTrigger { TriggerType trigger_type = 1; - TimeCondition schedule = 2; - ContractQueryCondition contract_query = 3; - ExpressionCondition expression = 4; + oneof trigger_condition { + bool manual = 2; + + // run at a specific epoch, name inspired by unix `at` utility + FixedEpochCondition at = 3; + + // interval such as every hour/day/ etc can be converted to cronsyntax by the sdk/studio + CronCondition cron = 4; + + // currently the only support syntax is every blocks + BlockCondition block = 5; + + // support filter by event expression such as topic0, topic1, topoc2 and event_data and contract_address + EventCondition event = 6; + } } // gRPC internal error code use up to 17, we extend and start from 1000 to avoid any conflict @@ -68,37 +108,11 @@ enum Error { SmartWalletRpcError = 6000; SmartWalletNotFoundError = 6001; - // Error occurs when we failed to migrat task data and it cannot be decoden + // Error occurs when we failed to migrate task data and it cannot be decode TaskDataCorrupted = 7000; + TaskDataMissingError = 7001; } -// Simple timebase or cron syntax. -message TimeCondition { - repeated int64 fixed = 1; - string cron = 2; -} -// A contract method that return true/false -// Ideally to use when we already have an existing contract that perform the -// check. -// This method will be evaluate every block -message ContractQueryCondition { - string contract_address = 1; - string callmsg = 2; -} - -// An arbitrary expression to express the condition. -// People can define condition example -// chainlinkPrice("address-of-eth-usd-pair") > 2644500 && queryContract("contractaddress", "callmsg")[2] < = 5 -// By allow arbitrary expression, people can mix and match to create conplex -// condition that match their workload -// -// The function to be used need to be pre-defined on our task egnine runtime. -// When a new block is build, our engine will execute these check -// -// The expression language is re-present by https://expr-lang.org/ -message ExpressionCondition { - string expression = 1; -} message SyncTasksResp { string id = 1; @@ -107,25 +121,6 @@ message SyncTasksResp { TaskTrigger trigger = 3; } -// TaskType represents what kind of work the task will perform -enum TaskType { - // Handle default/missing data - ETHTransferTask = 0; - - // Generic contract execution which can be used for: - // ERC20 Transfer, NFT Transfer, auto reclaim, auto restaking etc - // When executing a contract we need at least 2 things: - // - target contract address - // - the message to send to that contract - ContractExecutionTask = 1; - - GraphQLDataQueryTask = 2; - // Make call to a HTTP endpoint - HTTPAPICallTask = 3; - // CustomCode allow to run arbitraty JavaScript. - CustomCodeTask = 4; - BranchActionTask = 5; -} // TaskStatus represents status of the task. The transition is as follow enum TaskStatus { @@ -136,38 +131,48 @@ enum TaskStatus { Executing = 4; } -message ETHTransfer { +message ETHTransferNode { string destination = 1; string amount = 2; } -message ContractExecution { +message ContractWriteNode { + string contract_address = 1; + string call_data = 2; + + // abi is necessary to decode the return + string contract_abi = 3; +} + +message ContractQueryNode { string contract_address = 1; string call_data = 2; - string method = 3; - string encoded_params = 4; + // abi is necessary to decode the return + string contract_abi = 3; } -message GraphQLDataQuery { + +message GraphQLQueryNode { // TODO: support graphql variable string url = 1; string query = 2; } -message HTTPAPICall { +message RestAPINode { string url = 1; map headers = 2; string body = 3; + string method = 4; } enum CustomCodeType { JavaScript = 0; } -message CustomCode { +message CustomCodeNode { CustomCodeType type = 1; - string body = 2; + string source = 2; } message ConditionJump { @@ -175,76 +180,124 @@ message ConditionJump { string next = 2; } -message BranchAction { - ConditionJump If = 1; - repeated ConditionJump ElseIfs = 2; - ConditionJump Else = 3; +message BranchNode { + ConditionJump if = 1; + repeated ConditionJump elseIfs = 2; + ConditionJump else = 3; } -message TaskAction { - TaskType task_type = 1; +message FilterNode { + // Filter node acts like .select or .filter to pluck out element in an array that evaluate the expression to true + string expression = 1; +} - string id = 2; - string name = 3; +// The edge is relationship or direct between node +message TaskEdge { + string id = 1 ; + string source = 2 ; + string target = 3 ; +} + +// TaskType represents what kind of work the task will perform +enum TaskType { + // Handle default/missing data + ETHTransferTask = 0; + + // Generic contract execution which can be used for: + // ERC20 Transfer, NFT Transfer, auto reclaim, auto restaking etc + // When executing a contract we need at least 2 things: + // - target contract address + // - the message to send to that contract + ContractWriteTask = 1; + ContractReadTask = 2; + + // GraphQL query. Note that a graphql can also be query as a HTTP API, but having its own graphql type make writing query easiser without passing all the data in post as parameter. + GraphQLDataQueryTask = 3; - // Next can be empty. In some kind of block, such as branching, the next is - // based on branching condition - repeated string next = 4; - - // Transfer eth - ETHTransfer eth_transfer = 10; - // Run one ore more contracts. The call call also be batched with tool like - // multicall to wrap many calls - ContractExecution contract_execution = 11; - // Make call to a graphql endpoint - GraphQLDataQuery graphql_data_query = 12; // Make call to a HTTP endpoint - HTTPAPICall http_data_query = 13; + RestAPITask = 4; + // CustomCode allow to run arbitraty JavaScript. - CustomCode custom_code = 14; - BranchAction branch = 15; + BranchTask = 5; + FilterTask = 6; + CustomCodeTask = 7; +} + +message TaskNode { + TaskType node_type = 1; + string id = 2; + string name = 3; + + // based on node_type one and only one of these field are set + oneof task_body { + // 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 + ContractQueryNode contract_read = 12; + // Make call to a graphql endpoint + GraphQLQueryNode graphql_data_query = 13; + // Make call to a HTTP endpoint + RestAPINode rest_api = 14; + // CustomCode allow to run arbitraty JavaScript. + BranchNode branch = 15; + FilterNode filter = 16; + CustomCodeNode custom_code = 17; + } } message Execution { - int64 epoch = 1; + int64 epoch = 1; string user_op_hash = 2; - string error = 3; + string error = 3; } message Task { - UUID id = 1; - string owner = 2; - string smart_wallet_address = 3; - TaskTrigger trigger = 4; - repeated TaskAction nodes = 5; + UUID id = 1; + string owner = 2; + string smart_wallet_address = 3; + + // task won't be check before this + int64 start_at = 5; + // task won't be run/check after this + int64 expired_at = 6; + // arbitrary data about this task. has a limit of 255 character + string memo = 7; + + int64 completed_at = 8; + + // repeatable means a task can continue to run even after the first execution. + // By default, recurring is false, task will only executed once. + bool recurring = 10; - // task won't be check before this - int64 start_at = 6; - // task won't be run/check after this - int64 expired_at = 7; - // arbitrary data about this task - string memo = 8; + TaskStatus status = 9; + TaskTrigger trigger = 4; + repeated TaskNode nodes = 11; + repeated TaskEdge edges = 12; - int64 completed_at = 9; - TaskStatus status = 10; - // repeatable means a task can continue to run even after the first execution - bool repeatable = 11; - repeated Execution executions = 12; + repeated Execution executions = 13; } message CreateTaskReq { TaskTrigger trigger = 1; - repeated TaskAction actions = 2; - int64 start_at = 3; - int64 expired_at = 4; - string memo = 5; + + int64 start_at = 2; + int64 expired_at = 3; + // A repeatable task will continue to be run - bool repeatable = 6; + bool repeatable = 4; // the smart wallet address that will be used to run this task // When leaving out, we will use the default(salt=0) wallet - string smart_wallet_address = 7; + string smart_wallet_address = 5; + + string memo = 6; + repeated TaskNode nodes = 7; + repeated TaskEdge edges = 8; } message CreateTaskResp { @@ -283,17 +336,17 @@ message ListTasksReq { } message ListTasksResp { - repeated Task tasks = 1; + repeated Task tasks = 1; } message GetKeyReq { - string owner = 1; - int64 expired_at = 2; - string signature = 3; + string owner = 1; + int64 expired_at = 2; + string signature = 3; } message KeyResp { - string key=1; + string key=1; } message UpdateChecksReq { diff --git a/storage/db.go b/storage/db.go index 9ec6277..eebcde5 100644 --- a/storage/db.go +++ b/storage/db.go @@ -2,6 +2,7 @@ package storage import ( "fmt" + "os" "strings" badger "github.com/dgraph-io/badger/v4" @@ -37,6 +38,8 @@ type Storage interface { Delete(key []byte) error Vacuum() error + + DbPath() string } type KeyValueItem struct { @@ -50,6 +53,14 @@ type BadgerStorage struct { seqs []*badger.Sequence } +// Create storage pool at the particular path +func NewWithPath(path string) (Storage, error) { + return New(&Config{ + Path: path, + }) +} + +// Create storage pool with the given config func New(c *Config) (Storage, error) { opts := badger.DefaultOptions(c.Path) db, err := badger.Open( @@ -302,3 +313,13 @@ func (a *BadgerStorage) ListKeys(prefix string) ([]string, error) { func (a *BadgerStorage) Vacuum() error { return a.db.RunValueLogGC(0.7) } + +func (a *BadgerStorage) DbPath() string { + return a.config.Path +} + +// Destroy is destructive action that shutdown a database, and wipe out its entire data directory +func Destroy(a *BadgerStorage) error { + a.Close() + return os.RemoveAll(a.config.Path) +}