diff --git a/.github/workflows/pr.yml b/.github/workflows/pr.yml index cf454e9..5cefb16 100644 --- a/.github/workflows/pr.yml +++ b/.github/workflows/pr.yml @@ -5,6 +5,24 @@ on: workflow_dispatch: jobs: + test: + environment: Test + name: Unit Test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + with: + submodules: recursive + + - name: Run Go test + env: + RPC_URL: "${{ secrets.RPC_URL }}" + BUNDLER_RPC: "${{ secrets.BUNDLER_RPC }}" + run: | + # TODO Implement test for all packages + go test -v ./core/taskengine + go test -v ./pkg/timekeeper + publish-dev-build: name: Publish dev build docker image to dockerhub runs-on: 'ubuntu-latest' @@ -33,7 +51,7 @@ jobs: avaprotocol/avs-dev tags: | type=raw,value=latest,enable=${{ github.ref == format('refs/heads/{0}', 'main') }} - type=raw,value={{sha}},enable=${{ github.ref == format('refs/heads/{0}', 'main') }} + type=raw,value={{sha}} type=ref,event=branch type=ref,event=pr type=semver,pattern={{version}} diff --git a/.github/workflows/test.yml b/.github/workflows/test.yml deleted file mode 100644 index 8455f17..0000000 --- a/.github/workflows/test.yml +++ /dev/null @@ -1,34 +0,0 @@ -name: Test - -on: workflow_dispatch - -env: - FOUNDRY_PROFILE: ci - -jobs: - check: - strategy: - fail-fast: true - - name: Foundry project - runs-on: ubuntu-latest - steps: - - uses: actions/checkout@v4 - with: - submodules: recursive - - - name: Install Foundry - uses: foundry-rs/foundry-toolchain@v1 - with: - version: nightly - - - name: Run Forge build - run: | - forge --version - forge build --sizes - id: build - - - name: Run Forge tests - run: | - forge test -vvv - id: test diff --git a/Makefile b/Makefile index 1da7ac2..2dc118e 100644 --- a/Makefile +++ b/Makefile @@ -86,16 +86,15 @@ protoc-gen: --go-grpc_opt=paths=source_relative \ protobuf/avs.proto -build-docker: - docker compose build ## up: bring up docker compose stack up: docker compose up ## unstable-build: generate an unstable for internal test unstable-build: - docker build --platform=linux/amd64 --build-arg RELEASE_TAG=unstable -t avaprotocol/ap-avs:unstable -f dockerfiles/operator.Dockerfile . - docker push avaprotocol/ap-avs:unstable + docker build --platform=linux/amd64 --build-arg RELEASE_TAG=unstable -t avaprotocol/avs-dev:unstable -f dockerfiles/operator.Dockerfile . + docker push avaprotocol/avs-dev:unstable + ## dev-build: build a dev version for local development dev-build: @@ -108,3 +107,7 @@ dev-agg: ## dev-agg: run operator locally with dev build dev-op: ./out/ap operator --config=config/operator.yaml + +## dev-clean: cleanup storage data +dev-clean: + rm -rf /tmp/ap-avs /tmp/ap.sock diff --git a/aggregator/aggregator.go b/aggregator/aggregator.go index 21c4767..69d5b48 100644 --- a/aggregator/aggregator.go +++ b/aggregator/aggregator.go @@ -25,6 +25,7 @@ import ( sdkclients "github.com/Layr-Labs/eigensdk-go/chainio/clients" blsagg "github.com/Layr-Labs/eigensdk-go/services/bls_aggregation" sdktypes "github.com/Layr-Labs/eigensdk-go/types" + "github.com/allegro/bigcache/v3" "github.com/AvaProtocol/ap-avs/storage" @@ -91,6 +92,8 @@ type Aggregator struct { worker *apqueue.Worker status AggregatorStatus + + cache *bigcache.BigCache } // NewAggregator creates a new Aggregator with the provided config. @@ -130,6 +133,47 @@ func NewAggregator(c *config.Config) (*Aggregator, error) { //avsRegistryService := avsregistry.NewAvsRegistryServiceChainCaller(avsReader, operatorPubkeysService, c.Logger) // blsAggregationService := blsagg.NewBlsAggregatorService(avsRegistryService, c.Logger) + cache, err := bigcache.New(context.Background(), bigcache.Config{ + // number of shards (must be a power of 2) + Shards: 1024, + + // time after which entry can be evicted + LifeWindow: 120 * time.Minute, + + // Interval between removing expired entries (clean up). + // If set to <= 0 then no action is performed. + // Setting to < 1 second is counterproductive — bigcache has a one second resolution. + CleanWindow: 5 * time.Minute, + + // rps * lifeWindow, used only in initial memory allocation + MaxEntriesInWindow: 1000 * 10 * 60, + + // max entry size in bytes, used only in initial memory allocation + MaxEntrySize: 500, + + // prints information about additional memory allocation + Verbose: true, + + // cache will not allocate more memory than this limit, value in MB + // if value is reached then the oldest entries can be overridden for the new ones + // 0 value means no size limit + HardMaxCacheSize: 8192, + + // callback fired when the oldest entry is removed because of its expiration time or no space left + // for the new entry, or because delete was called. A bitmask representing the reason will be returned. + // Default value is nil which means no callback and it prevents from unwrapping the oldest entry. + OnRemove: nil, + + // OnRemoveWithReason is a callback fired when the oldest entry is removed because of its expiration time or no space left + // for the new entry, or because delete was called. A constant representing the reason will be passed through. + // Default value is nil which means no callback and it prevents from unwrapping the oldest entry. + // Ignored if OnRemove is specified. + OnRemoveWithReason: nil, + }) + if err != nil { + panic("cannot initialize cache storage") + } + return &Aggregator{ logger: c.Logger, avsWriter: avsWriter, @@ -143,15 +187,15 @@ func NewAggregator(c *config.Config) (*Aggregator, error) { operatorPool: &OperatorPool{}, status: initStatus, + + cache: cache, }, nil } // 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) @@ -205,12 +249,12 @@ func (agg *Aggregator) Start(ctx context.Context) error { agg.logger.Info("Starting repl") go agg.startRepl() - agg.logger.Infof("Starting http server") - go agg.startHttpServer(ctx) - agg.logger.Infof("Starting rpc server") go agg.startRpcServer(ctx) + agg.logger.Infof("Starting http server") + go agg.startHttpServer(ctx) + // Setup wait signal sigs := make(chan os.Signal, 1) signal.Notify(sigs, syscall.SIGINT, syscall.SIGTERM) diff --git a/aggregator/auth.go b/aggregator/auth.go index 2c31777..931555d 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" @@ -16,7 +14,9 @@ import ( "github.com/ethereum/go-ethereum/common/hexutil" "github.com/ethereum/go-ethereum/crypto" "github.com/golang-jwt/jwt/v5" + "google.golang.org/grpc/codes" "google.golang.org/grpc/metadata" + "google.golang.org/grpc/status" ) const ( @@ -29,6 +29,11 @@ const ( func (r *RpcServer) GetKey(ctx context.Context, payload *avsproto.GetKeyReq) (*avsproto.KeyResp, error) { submitAddress := common.HexToAddress(payload.Owner) + r.config.Logger.Info("process getkey", + "owner", payload.Owner, + "expired", payload.ExpiredAt, + ) + if strings.Contains(payload.Signature, ".") { authenticated, err := auth.VerifyJwtKeyForUser(r.config.JwtSecret, payload.Signature, submitAddress) if err != nil { @@ -48,7 +53,10 @@ func (r *RpcServer) GetKey(ctx context.Context, payload *avsproto.GetKeyReq) (*a signature, err := hexutil.Decode(payload.Signature) if err != nil { - return nil, err + return nil, status.Errorf(codes.InvalidArgument, auth.InvalidSignatureFormat) + } + if len(signature) < crypto.RecoveryIDOffset || len(signature) < crypto.RecoveryIDOffset { + return nil, status.Errorf(codes.InvalidArgument, auth.InvalidSignatureFormat) } // https://stackoverflow.com/questions/49085737/geth-ecrecover-invalid-signature-recovery-id if signature[crypto.RecoveryIDOffset] == 27 || signature[crypto.RecoveryIDOffset] == 28 { @@ -131,11 +139,19 @@ 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 { - return nil, fmt.Errorf("Rpc error") + // caching to reduce hitting eth rpc node + cachekey := "default-wallet" + user.Address.Hex() + if value, err := r.cache.Get(cachekey); err == nil { + defaultSmartWallet := common.BytesToAddress(value) + user.SmartAccountAddress = &defaultSmartWallet + } else { + if err := user.LoadDefaultSmartWallet(r.smartWalletRpc); err != nil { + return nil, fmt.Errorf("Rpc error") + } + + // We don't care if its error out in caching + r.cache.Set(cachekey, user.SmartAccountAddress.Bytes()) } - 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 d710a79..7810d3e 100644 --- a/aggregator/rpc_server.go +++ b/aggregator/rpc_server.go @@ -7,6 +7,7 @@ import ( "math/big" "net" + "github.com/allegro/bigcache/v3" "github.com/ethereum/go-ethereum/common" "github.com/ethereum/go-ethereum/ethclient" @@ -17,6 +18,7 @@ import ( timestamppb "google.golang.org/protobuf/types/known/timestamppb" wrapperspb "google.golang.org/protobuf/types/known/wrapperspb" + "github.com/AvaProtocol/ap-avs/core/auth" "github.com/AvaProtocol/ap-avs/core/chainio/aa" "github.com/AvaProtocol/ap-avs/core/config" "github.com/AvaProtocol/ap-avs/core/taskengine" @@ -28,6 +30,7 @@ import ( type RpcServer struct { avsproto.UnimplementedAggregatorServer config *config.Config + cache *bigcache.BigCache db storage.Storage engine *taskengine.Engine @@ -41,9 +44,15 @@ type RpcServer struct { // Get nonce of an existing smart wallet of a given owner func (r *RpcServer) CreateWallet(ctx context.Context, payload *avsproto.CreateWalletReq) (*avsproto.CreateWalletResp, error) { user, err := r.verifyAuth(ctx) + if err != nil { - return nil, status.Errorf(codes.Unauthenticated, "invalid authentication key") + return nil, status.Errorf(codes.Unauthenticated, "%s: %s", auth.InvalidAuthenticationKey, err.Error()) } + r.config.Logger.Info("process create wallet", + "user", user.Address.String(), + "salt", payload.Salt, + ) + return r.engine.CreateSmartWallet(user, payload) } @@ -53,7 +62,7 @@ func (r *RpcServer) GetNonce(ctx context.Context, payload *avsproto.NonceRequest nonce, err := aa.GetNonce(r.smartWalletRpc, ownerAddress, big.NewInt(0)) if err != nil { - return nil, status.Errorf(codes.Code(avsproto.Error_SmartWalletRpcError), "cannot determine nonce for smart wallet") + return nil, status.Errorf(codes.Code(avsproto.Error_SmartWalletRpcError), taskengine.NonceFetchingError) } return &avsproto.NonceResp{ @@ -62,31 +71,37 @@ func (r *RpcServer) GetNonce(ctx context.Context, payload *avsproto.NonceRequest } // GetAddress returns smart account address of the given owner in the auth key -func (r *RpcServer) GetSmartAccountAddress(ctx context.Context, payload *avsproto.AddressRequest) (*avsproto.AddressResp, error) { +func (r *RpcServer) ListWallets(ctx context.Context, payload *avsproto.ListWalletReq) (*avsproto.ListWalletResp, error) { user, err := r.verifyAuth(ctx) if err != nil { - return nil, status.Errorf(codes.Unauthenticated, "invalid authentication key") + return nil, status.Errorf(codes.Unauthenticated, "%s: %s", auth.InvalidAuthenticationKey, err.Error()) } + r.config.Logger.Info("process list wallet", + "address", user.Address.String(), + ) wallets, err := r.engine.GetSmartWallets(user.Address) + if err != nil { + return nil, status.Errorf(codes.Unavailable, "rpc server is unavailable, retry later. %s", err.Error()) + } - return &avsproto.AddressResp{ + return &avsproto.ListWalletResp{ Wallets: wallets, }, nil } -func (r *RpcServer) CancelTask(ctx context.Context, taskID *avsproto.UUID) (*wrapperspb.BoolValue, error) { +func (r *RpcServer) CancelTask(ctx context.Context, taskID *avsproto.IdReq) (*wrapperspb.BoolValue, error) { user, err := r.verifyAuth(ctx) if err != nil { - return nil, status.Errorf(codes.Unauthenticated, "invalid authentication key") + return nil, status.Errorf(codes.Unauthenticated, "%s: %s", auth.InvalidAuthenticationKey, err.Error()) } - r.config.Logger.Info("Process Cancel Task", + r.config.Logger.Info("process cancel task", "user", user.Address.String(), - "taskID", string(taskID.Bytes), + "taskID", taskID.Id, ) - result, err := r.engine.CancelTaskByUser(user, string(taskID.Bytes)) + result, err := r.engine.CancelTaskByUser(user, string(taskID.Id)) if err != nil { return nil, err @@ -95,18 +110,18 @@ func (r *RpcServer) CancelTask(ctx context.Context, taskID *avsproto.UUID) (*wra return wrapperspb.Bool(result), nil } -func (r *RpcServer) DeleteTask(ctx context.Context, taskID *avsproto.UUID) (*wrapperspb.BoolValue, error) { +func (r *RpcServer) DeleteTask(ctx context.Context, taskID *avsproto.IdReq) (*wrapperspb.BoolValue, error) { user, err := r.verifyAuth(ctx) if err != nil { - return nil, status.Errorf(codes.Unauthenticated, "invalid authentication key") + return nil, status.Errorf(codes.Unauthenticated, "%s: %s", auth.InvalidAuthenticationKey, err.Error()) } - r.config.Logger.Info("Process Delete Task", + r.config.Logger.Info("process delete task", "user", user.Address.String(), - "taskID", string(taskID.Bytes), + "taskID", string(taskID.Id), ) - result, err := r.engine.DeleteTaskByUser(user, string(taskID.Bytes)) + result, err := r.engine.DeleteTaskByUser(user, string(taskID.Id)) if err != nil { return nil, err @@ -118,7 +133,7 @@ func (r *RpcServer) DeleteTask(ctx context.Context, taskID *avsproto.UUID) (*wra func (r *RpcServer) CreateTask(ctx context.Context, taskPayload *avsproto.CreateTaskReq) (*avsproto.CreateTaskResp, error) { user, err := r.verifyAuth(ctx) if err != nil { - return nil, status.Errorf(codes.Unauthenticated, "invalid authentication key") + return nil, status.Errorf(codes.Unauthenticated, "%s: %s", auth.InvalidAuthenticationKey, err.Error()) } task, err := r.engine.CreateTask(user, taskPayload) @@ -127,17 +142,17 @@ func (r *RpcServer) CreateTask(ctx context.Context, taskPayload *avsproto.Create } return &avsproto.CreateTaskResp{ - Id: task.ID, + Id: task.Id, }, nil } func (r *RpcServer) ListTasks(ctx context.Context, payload *avsproto.ListTasksReq) (*avsproto.ListTasksResp, error) { user, err := r.verifyAuth(ctx) if err != nil { - return nil, status.Errorf(codes.Unauthenticated, "invalid authentication key") + return nil, status.Errorf(codes.Unauthenticated, "%s: %s", auth.InvalidAuthenticationKey, err.Error()) } - r.config.Logger.Info("Process List Task", + r.config.Logger.Info("process list task", "user", user.Address.String(), "smart_wallet_address", payload.SmartWalletAddress, ) @@ -152,18 +167,22 @@ func (r *RpcServer) ListTasks(ctx context.Context, payload *avsproto.ListTasksRe }, nil } -func (r *RpcServer) GetTask(ctx context.Context, taskID *avsproto.UUID) (*avsproto.Task, error) { +func (r *RpcServer) GetTask(ctx context.Context, payload *avsproto.IdReq) (*avsproto.Task, error) { user, err := r.verifyAuth(ctx) if err != nil { - return nil, status.Errorf(codes.Unauthenticated, "invalid authentication key") + return nil, status.Errorf(codes.Unauthenticated, "%s: %s", auth.InvalidAuthenticationKey, err.Error()) } - r.config.Logger.Info("Process Get Task", + r.config.Logger.Info("process get task", "user", user.Address.String(), - "taskID", string(taskID.Bytes), + "taskID", payload.Id, ) - task, err := r.engine.GetTaskByUser(user, string(taskID.Bytes)) + if payload.Id == "" { + return nil, status.Errorf(codes.InvalidArgument, taskengine.TaskIDMissing) + } + + task, err := r.engine.GetTask(user, payload.Id) if err != nil { return nil, err } @@ -213,6 +232,7 @@ func (agg *Aggregator) startRpcServer(ctx context.Context) error { } avsproto.RegisterAggregatorServer(s, &RpcServer{ + cache: agg.cache, db: agg.db, engine: agg.engine, diff --git a/core/auth/errors.go b/core/auth/errors.go new file mode 100644 index 0000000..6a2ac62 --- /dev/null +++ b/core/auth/errors.go @@ -0,0 +1,6 @@ +package auth + +const ( + InvalidAuthenticationKey = "Invalid authentication key" + InvalidSignatureFormat = "Invalid Signature Format" +) diff --git a/core/chainio/aa/aa.go b/core/chainio/aa/aa.go index 7197a26..d4e93dd 100644 --- a/core/chainio/aa/aa.go +++ b/core/chainio/aa/aa.go @@ -66,7 +66,7 @@ func GetSenderAddress(conn *ethclient.Client, ownerAddress common.Address, salt } sender, err := simpleFactory.GetAddress(nil, ownerAddress, salt) - return &sender, nil + return &sender, err } // Compute smart wallet address for a particular factory diff --git a/core/taskengine/engine.go b/core/taskengine/engine.go index 42fc007..dbc6c59 100644 --- a/core/taskengine/engine.go +++ b/core/taskengine/engine.go @@ -6,6 +6,7 @@ import ( "fmt" "math/big" "strconv" + "strings" "sync" "time" @@ -136,14 +137,13 @@ func (n *Engine) MustStart() { } func (n *Engine) GetSmartWallets(owner common.Address) ([]*avsproto.SmartWallet, error) { - // This is the default wallet with our own factory salt := big.NewInt(0) sender, err := aa.GetSenderAddress(rpcConn, owner, salt) if err != nil { - return nil, status.Errorf(codes.Code(avsproto.Error_SmartWalletNotFoundError), "cannot determine smart wallet address") + return nil, status.Errorf(codes.Code(avsproto.Error_SmartWalletNotFoundError), SmartAccountCreationError) } - // now load the customize wallet with different salt or factory that was initialed and store in our db + // This is the default wallet with our own factory wallets := []*avsproto.SmartWallet{ &avsproto.SmartWallet{ Address: sender.String(), @@ -155,9 +155,10 @@ func (n *Engine) GetSmartWallets(owner common.Address) ([]*avsproto.SmartWallet, items, err := n.db.GetByPrefix(WalletByOwnerPrefix(owner)) if err != nil { - return nil, status.Errorf(codes.Code(avsproto.Error_SmartWalletNotFoundError), "cannot determine smart wallet address") + return nil, status.Errorf(codes.Code(avsproto.Error_SmartWalletNotFoundError), SmartAccountCreationError) } + // now load the customize wallet with different salt or factory that was initialed and store in our db for _, item := range items { w := &model.SmartWallet{} w.FromStorageData(item.Value) @@ -176,7 +177,7 @@ func (n *Engine) CreateSmartWallet(user *model.User, payload *avsproto.CreateWal // Verify data // when user passing a custom factory address, we want to validate it if payload.FactoryAddress != "" && !common.IsHexAddress(payload.FactoryAddress) { - return nil, status.Errorf(codes.InvalidArgument, "invalid factory address") + return nil, status.Errorf(codes.InvalidArgument, InvalidFactoryAddressError) } salt := big.NewInt(0) @@ -184,7 +185,7 @@ func (n *Engine) CreateSmartWallet(user *model.User, payload *avsproto.CreateWal var ok bool salt, ok = math.ParseBig256(payload.Salt) if !ok { - return nil, status.Errorf(codes.InvalidArgument, "invalid salt value") + return nil, status.Errorf(codes.InvalidArgument, InvalidSmartAccountSaltError) } } @@ -208,11 +209,13 @@ func (n *Engine) CreateSmartWallet(user *model.User, payload *avsproto.CreateWal updates[string(WalletStorageKey(user.Address, sender.Hex()))], err = wallet.ToJSON() if err = n.db.BatchWrite(updates); err != nil { - return nil, status.Errorf(codes.Code(avsproto.Error_StorageWriteError), "cannot update key to storage") + return nil, status.Errorf(codes.Code(avsproto.Error_StorageWriteError), StorageWriteError) } return &avsproto.CreateWalletResp{ - Address: sender.String(), + Address: sender.Hex(), + Salt: salt.String(), + FactoryAddress: factoryAddress.Hex(), }, nil } @@ -222,22 +225,22 @@ func (n *Engine) CreateTask(user *model.User, taskPayload *avsproto.CreateTaskRe if taskPayload.SmartWalletAddress != "" { if !ValidWalletAddress(taskPayload.SmartWalletAddress) { - return nil, status.Errorf(codes.InvalidArgument, "invalid smart account address") + return nil, status.Errorf(codes.InvalidArgument, InvalidSmartAccountAddressError) } if valid, _ := ValidWalletOwner(n.db, user, common.HexToAddress(taskPayload.SmartWalletAddress)); !valid { - return nil, status.Errorf(codes.InvalidArgument, "invalid smart account address") + return nil, status.Errorf(codes.InvalidArgument, InvalidSmartAccountAddressError) } } 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{} - updates[string(TaskStorageKey(task.ID, task.Status))], err = task.ToJSON() + updates[string(TaskStorageKey(task.Id, task.Status))], err = task.ToJSON() updates[string(TaskUserKey(task))] = []byte(fmt.Sprintf("%d", avsproto.TaskStatus_Active)) if err = n.db.BatchWrite(updates); err != nil { @@ -246,7 +249,7 @@ func (n *Engine) CreateTask(user *model.User, taskPayload *avsproto.CreateTaskRe n.lock.Lock() defer n.lock.Unlock() - n.tasks[task.ID] = task + n.tasks[task.Id] = task return task, nil } @@ -290,13 +293,13 @@ func (n *Engine) StreamCheckToOperator(payload *avsproto.SyncTasksReq, srv avspr } for _, task := range n.tasks { - if _, ok := n.trackSyncedTasks[address].TaskID[task.ID]; ok { + if _, ok := n.trackSyncedTasks[address].TaskID[task.Id]; ok { continue } - n.logger.Info("stream check to operator", "taskID", task.ID, "operator", payload.Address) + n.logger.Info("stream check to operator", "taskID", task.Id, "operator", payload.Address) resp := avsproto.SyncTasksResp{ - Id: task.ID, + Id: task.Id, CheckType: "CheckTrigger", Trigger: task.Trigger, } @@ -306,7 +309,7 @@ func (n *Engine) StreamCheckToOperator(payload *avsproto.SyncTasksReq, srv avspr } n.lock.Lock() - n.trackSyncedTasks[address].TaskID[task.ID] = true + n.trackSyncedTasks[address].TaskID[task.Id] = true n.lock.Unlock() } } @@ -349,23 +352,25 @@ 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, "invalid smart account address") - } + 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, "invalid smart account address") - } + 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 { - return nil, grpcstatus.Errorf(codes.Code(avsproto.Error_StorageUnavailable), "storage is not ready") + return nil, grpcstatus.Errorf(codes.Code(avsproto.Error_StorageUnavailable), StorageUnavailableError) } tasks := make([]*avsproto.Task, len(taskIDs)) @@ -377,13 +382,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,59 +394,58 @@ 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(), - } +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) - // Get Task Status - rawStatus, err := n.db.GetKey([]byte(TaskUserKey(task))) - if err != nil { - return nil, grpcstatus.Errorf(codes.NotFound, "task not found") + if err == nil { + return task, nil + } + + return nil, grpcstatus.Errorf(codes.Code(avsproto.Error_TaskDataCorrupted), TaskStorageCorruptedError) + } } - status, _ := strconv.Atoi(string(rawStatus)) - taskRawByte, err := n.db.GetKey(TaskStorageKey(taskID, avsproto.TaskStatus(status))) + 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 { - taskRawByte, err = n.db.GetKey([]byte( - TaskStorageKey(taskID, avsproto.TaskStatus_Executing), - )) - if err != nil { - return nil, grpcstatus.Errorf(codes.Code(avsproto.Error_TaskDataCorrupted), "task data storage is corrupted") - } + return nil, err } - err = task.FromStorageData(taskRawByte) - if err != nil { - return nil, grpcstatus.Errorf(codes.Code(avsproto.Error_TaskDataCorrupted), "task data storage is corrupted") + 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, "task not found") + return false, grpcstatus.Errorf(codes.NotFound, TaskNotFoundError) } if task.Status == avsproto.TaskStatus_Executing { return false, fmt.Errorf("Only non executing task can be deleted") } - n.db.Delete(TaskStorageKey(task.ID, task.Status)) + n.db.Delete(TaskStorageKey(task.Id, task.Status)) n.db.Delete(TaskUserKey(task)) return true, nil } 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, "task not found") + return false, grpcstatus.Errorf(codes.NotFound, TaskNotFoundError) } if task.Status != avsproto.TaskStatus_Active { @@ -453,18 +455,19 @@ func (n *Engine) CancelTaskByUser(user *model.User, taskID string) (bool, error) updates := map[string][]byte{} oldStatus := task.Status task.SetCanceled() - updates[string(TaskStorageKey(task.ID, oldStatus))], err = task.ToJSON() + fmt.Println("found task", task, string(TaskStorageKey(task.Id, oldStatus)), string(TaskUserKey(task))) + updates[string(TaskStorageKey(task.Id, oldStatus))], err = task.ToJSON() updates[string(TaskUserKey(task))] = []byte(fmt.Sprintf("%d", task.Status)) if err = n.db.BatchWrite(updates); err == nil { n.db.Move( - TaskStorageKey(task.ID, oldStatus), - TaskStorageKey(task.ID, task.Status), + TaskStorageKey(task.Id, oldStatus), + TaskStorageKey(task.Id, task.Status), ) - delete(n.tasks, task.ID) + delete(n.tasks, task.Id) } else { - // TODO Gracefully handling of storage cleanup + return false, err } return true, nil diff --git a/core/taskengine/errors.go b/core/taskengine/errors.go new file mode 100644 index 0000000..54947eb --- /dev/null +++ b/core/taskengine/errors.go @@ -0,0 +1,19 @@ +package taskengine + +const ( + TaskNotFoundError = "task not found" + + InvalidSmartAccountAddressError = "invalid smart account address" + InvalidFactoryAddressError = "invalid factory address" + InvalidSmartAccountSaltError = "invalid salt value" + 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" + + TaskStorageCorruptedError = "task data storage is corrupted" + TaskIDMissing = "Missing task id in request" +) diff --git a/core/taskengine/processor.go b/core/taskengine/processor.go index 8c5ea99..da9b9bd 100644 --- a/core/taskengine/processor.go +++ b/core/taskengine/processor.go @@ -65,13 +65,13 @@ func (c *ContractProcessor) Perform(job *apqueue.Job) error { defer func() { updates := map[string][]byte{} - updates[string(TaskStorageKey(task.ID, avsproto.TaskStatus_Executing))], err = task.ToJSON() + updates[string(TaskStorageKey(task.Id, avsproto.TaskStatus_Executing))], err = task.ToJSON() updates[string(TaskUserKey(task))] = []byte(fmt.Sprintf("%d", task.Status)) if err = c.db.BatchWrite(updates); err == nil { c.db.Move( - []byte(TaskStorageKey(task.ID, avsproto.TaskStatus_Executing)), - []byte(TaskStorageKey(task.ID, task.Status)), + []byte(TaskStorageKey(task.Id, avsproto.TaskStatus_Executing)), + []byte(TaskStorageKey(task.Id, task.Status)), ) } else { // TODO Gracefully handling of storage cleanup @@ -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") @@ -106,7 +107,7 @@ func (c *ContractProcessor) Perform(job *apqueue.Job) error { return err } - c.logger.Info("send task to bundler rpc", "taskid", task.ID) + c.logger.Info("send task to bundler rpc", "taskid", task.Id) txResult, err := preset.SendUserOp( conn, bundlerClient, @@ -118,11 +119,11 @@ func (c *ContractProcessor) Perform(job *apqueue.Job) error { if txResult != "" { task.AppendExecution(currentTime.Unix(), txResult, nil) task.SetCompleted() - c.logger.Info("succesfully perform userop", "taskid", task.ID, "userop", txResult) + c.logger.Info("succesfully perform userop", "taskid", task.Id, "userop", txResult) } else { task.AppendExecution(currentTime.Unix(), "", err) task.SetFailed() - c.logger.Error("err perform userop", "taskid", task.ID, "error", err) + c.logger.Error("err perform userop", "taskid", task.Id, "error", err) } if err != nil || txResult == "" { 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/dockerfiles/operator.Dockerfile b/dockerfiles/operator.Dockerfile index 0e9db87..e57f084 100644 --- a/dockerfiles/operator.Dockerfile +++ b/dockerfiles/operator.Dockerfile @@ -1,4 +1,4 @@ -FROM golang:1.23 as builder +FROM golang:1.23 AS builder ARG RELEASE_TAG WORKDIR /app diff --git a/docs/development.md b/docs/development.md index 2a73ef5..dc6356b 100644 --- a/docs/development.md +++ b/docs/development.md @@ -17,8 +17,8 @@ For node that connect to Ava pre-deployed AVS contract on Holesky testnet, we ne After having the config file, we can run the aggregator: ``` -make build-docker -make up +make dev-build +make dev-aggregator ``` Or use docker compsose directly: @@ -45,3 +45,57 @@ For detail of each method and payload, check the protocol.md docs. We generate the client sdk for JavaScript. The code is generated based on our protobuf definition on this file. + +## Storage REPL + +To inspect storage we use a simple repl. + +``` +telnet /tmp/ap.sock +``` + +The repl support a few commands: + +``` +list * +get +set +gc +`` + +Example: + +### List everything + +``` +list * +``` + +### List active tasks + +``` +list t:a:* +``` + +### Read a key + +``` +get t:a:01JD3252QZKJPK20CPH0S179FH +``` + +### Set a key + +``` +set t:a:01JD3252QZKJPK20CPH0S179FH 'value here' +``` + +Checkout repl.go for more information + + +## Reset storage + +During development, we may have to reset storage to erase bad data due to schema change. Once we're mature we will implement migration to migrate storage. For now to wipe out storage run: + +``` +make dev-clean +``` 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..b213d0e 100644 --- a/examples/example.js +++ b/examples/example.js @@ -3,8 +3,10 @@ const grpc = require("@grpc/grpc-js"); const protoLoader = require("@grpc/proto-loader"); const { ethers } = require("ethers"); const { Wallet } = ethers; +const { UlidMonotonic } = require("id128"); +const util = require("util"); -const { TaskType, TriggerType } = require("./static_codegen/avs_pb"); +const { TaskType, TaskTrigger } = require("./static_codegen/avs_pb"); // Load the protobuf definition const packageDefinition = protoLoader.loadSync("../protobuf/avs.proto", { @@ -16,6 +18,8 @@ const packageDefinition = protoLoader.loadSync("../protobuf/avs.proto", { }); const env = process.env.ENV || "development"; + +console.log("Current environment is: ", env); const privateKey = process.env.PRIVATE_KEY; // Make sure to provide your private key with or without the '0x' prefix const config = { @@ -108,37 +112,28 @@ async function listTask(owner, token) { const metadata = new grpc.Metadata(); metadata.add("authkey", token); - const result = await asyncRPC(client, "ListTasks", { - smart_wallet_address: process.argv[3] - }, metadata); + const result = await asyncRPC( + client, + "ListTasks", + { + smart_wallet_address: process.argv[3], + }, + metadata + ); + console.log(`Found ${result.tasks.length} tasks created by`, process.argv[3]); - console.log("Tasks that has created by", process.argv[3], "\n", result); + for (const item of result.tasks) { + console.log(util.inspect(item, { depth: 4, colors: true })); + } } async function getTask(owner, token, taskId) { const metadata = new grpc.Metadata(); metadata.add("authkey", token); - const result = await asyncRPC(client, "GetTask", { bytes: taskId }, metadata); - - console.log("Inspect Task ID: ", taskId, "\n"); - for (const [key, value] of Object.entries(result)) { - if (key == "nodes") { - continue; - } + const result = await asyncRPC(client, "GetTask", { id: taskId }, metadata); - console.log(`${key}:`.padEnd(25, " "), JSON.stringify(value, null, 2)); - } - - result.nodes.filter(e => e != null).map(node => { - for (const [key, value] of Object.entries(node)) { - if (!value) { - continue; - } - - console.log(`${key}:`.padEnd(25, " "), JSON.stringify(value, null, 2)); - } - }); + console.log(util.inspect(result, { depth: 4, colors: true })); } async function cancel(owner, token, taskId) { @@ -148,11 +143,11 @@ async function cancel(owner, token, taskId) { const result = await asyncRPC( client, "CancelTask", - { bytes: taskId }, + { id: taskId }, metadata ); - console.log("Canceled Task Data for ", taskId, "\n", result); + console.log("Response:\n", result); } async function deleteTask(owner, token, taskId) { @@ -162,24 +157,31 @@ async function deleteTask(owner, token, taskId) { const result = await asyncRPC( client, "DeleteTask", - { bytes: taskId }, + { id: taskId }, metadata ); - console.log("Delete Task ", taskId, "\n", result); + console.log("Response:\n", result); } async function getWallets(owner, token) { const metadata = new grpc.Metadata(); metadata.add("authkey", token); - const walletsResp = await asyncRPC( + const walletsResp = await asyncRPC( client, - "GetSmartAccountAddress", + "ListWallets", { }, metadata ); + console.log( + `Response:\n`, + walletsResp + ); + + console.log("Fetching balances from RPC provider ..."); + // Update the provider creation const provider = new ethers.JsonRpcProvider(config[env].RPC_PROVIDER); @@ -194,22 +196,29 @@ async function getWallets(owner, token) { let wallets = []; for (const wallet of walletsResp.wallets) { - const balance = await provider.getBalance( - wallet.address - ); + const balance = await provider.getBalance(wallet.address); const balanceInEth = _.floor(ethers.formatEther(balance), 2); const tokenBalance = await tokenContract.balanceOf(wallet.address); const tokenDecimals = await tokenContract.decimals(); const tokenSymbol = await tokenContract.symbol(); - const tokenBalanceFormatted = _.floor(ethers.formatUnits(tokenBalance, tokenDecimals),2); - wallets.push({...wallet, balances: [ - `${balanceInEth} ETH`, - `${tokenBalanceFormatted} ${tokenSymbol}`, - ]}); + const tokenBalanceFormatted = _.floor( + ethers.formatUnits(tokenBalance, tokenDecimals), + 2 + ); + wallets.push({ + ...wallet, + balances: [ + `${balanceInEth} ETH`, + `${tokenBalanceFormatted} ${tokenSymbol}`, + ], + }); } - console.log("Smart wallet address for ", owner, "\n", wallets); + console.log( + `Listing smart wallet addresses for ${owner} ...\n`, + wallets + ); return wallets; } @@ -224,7 +233,7 @@ const createWallet = async (owner, token, salt, factoryAddress) => { { salt, factoryAddress }, metadata ); -} +}; const main = async (cmd) => { // 1. Generate the api token to interact with aggregator @@ -235,10 +244,22 @@ const main = async (cmd) => { switch (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) + let smartWalletAddress = await createWallet( + owner, + token, + process.argv[3], + process.argv[4] + ); + console.log( + `A new smart wallet with salt ${salt} is created for ${owner}:\nResponse:\n`, + 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 @@ -247,14 +268,24 @@ const main = async (cmd) => { priceChainlink("${config[env].ORACLE_PRICE_CONTRACT}"), toBigInt("10000") ) > 0`; - await scheduleERC20TransferJob(owner, token, taskCondition); + const resultSchedule = await scheduleERC20TransferJob( + owner, + token, + taskCondition + ); + console.log("Response: \n", resultSchedule); break; case "schedule2": taskCondition = `bigCmp( priceChainlink("${config[env].ORACLE_PRICE_CONTRACT}"), toBigInt("99228171987813")) > 0`; - await scheduleERC20TransferJob(owner, token, taskCondition); + const resultSchedule2 = await scheduleERC20TransferJob( + owner, + token, + taskCondition + ); + console.log("Response: \n", resultSchedule2); break; case "schedule-generic": @@ -278,7 +309,13 @@ const main = async (cmd) => { )[0], toBigInt("2000") ) > 0`; - await scheduleERC20TransferJob(owner, token, taskCondition); + const resultScheduleGeneric = await scheduleERC20TransferJob( + owner, + token, + taskCondition + ); + + console.log("Response: \n", resultScheduleGeneric); break; case "tasks": @@ -311,17 +348,18 @@ 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`); } -} +}; function getTaskData() { let ABI = ["function transfer(address to, uint amount)"]; @@ -342,84 +380,114 @@ async function scheduleERC20TransferJob(owner, token, taskCondition) { // Now we can schedule a task // 1. Generate the calldata to check condition const taskBody = getTaskData(); - console.log("\n\nTask body:", taskBody); + const smartWalletAddress = process.argv[3]; + if (!smartWalletAddress) { + console.log("invalid smart wallet address. check usage"); + return; + } - console.log("\n\nTask condition:", taskCondition); + console.log("Task body:", taskBody); + + console.log("\nTask condition:", taskCondition); const metadata = new grpc.Metadata(); metadata.add("authkey", token); - console.log("Trigger type", TriggerType.EXPRESSIONTRIGGER); - - 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: { - // Our ERC20 test token - contract_address: config[env].TEST_TRANSFER_TOKEN, - call_data: taskBody, - } - }], - trigger: { - trigger_type: TriggerType.EXPRESSIONTRIGGER, - expression: { - expression: taskCondition, - } - }, - start_at: Math.floor(Date.now() / 1000) + 30, - expired_at: Math.floor(Date.now() / 1000 + 3600 * 24 * 30), - memo: `Demo Example task for ${owner}`, + let trigger = { + trigger_type: TaskTrigger.TriggerTypeCase.BLOCK, + block: { + interval: 5, // run every 5 block }, - metadata - ); - - console.log("Expression Task ID is:", result); -} - -async function scheduleTimeTransfer(owner, token) { - // Now we can schedule a task - // 1. Generate the calldata to check condition - const taskBody = getTaskData(); - console.log("\n\nTask body:", taskBody); - console.log("\n\nTask condition: Timeschedule", "*/2"); + }; + + if (process.argv[2] == "schedule-cron") { + trigger = { + trigger_type: TaskTrigger.TriggerTypeCase.CRON, + cron: { + schedule: [ + // every 5 hours + "0 */5 * * *", + ], + }, + }; + } else if (process.argv[2] == "schedule-event") { + trigger = { + trigger_type: TaskTrigger.TriggerTypeCase.EVENT, + event: { + expression: taskCondition, + }, + }; + } else if (process.argv[2] == "schedule-fixed") { + trigger = { + trigger_type: TaskTrigger.TriggerTypeCase.AT, + fixed_time: { + epochs: [ + 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.MANUAL, + manual: true, + }; + } - const metadata = new grpc.Metadata(); - metadata.add("authkey", token); + const nodeIdOraclePrice = UlidMonotonic.generate().toCanonical(); + const nodeIdTransfer = UlidMonotonic.generate().toCanonical(); + const nodeIdNotification = UlidMonotonic.generate().toCanonical(); - console.log("Trigger type", TriggerType.TIMETRIGGER); + console.log("\nTrigger type", trigger.trigger_type); const result = await asyncRPC( client, "CreateTask", { - // A contract execution will be perform for this taks - task_type: TaskType.CONTRACTEXECUTIONTASK, - - actions: [{ - contract_execution: { - // Our ERC20 test token deploy on sepolia - // https://sepolia.etherscan.io/token/0x69256ca54e6296e460dec7b29b7dcd97b81a3d55#code + smart_wallet_address: smartWalletAddress, + nodes: [{ + id: nodeIdOraclePrice, + name: 'check price', + branch: { + conditions: [{ + expression: `bigCmp(priceChainlink("${config[env].ORACLE_PRICE_CONTRACT}"),toBigInt("10000") > 0`, + next: 'transfer_erc20_1' + }] + } + }, { + // 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, - }, + } + }, { + id: nodeIdNotification, + name: 'notification', + rest_api: { + url: "https://webhook.site/fd02e579-a58c-4dbd-8a74-0afa399c0912", + } }], - trigger: { - trigger_type: TriggerType.TIMETRIGGER, - schedule: { - cron: "*/2 * * * *", + + 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}`, @@ -427,10 +495,9 @@ async function scheduleTimeTransfer(owner, token) { metadata ); - console.log("Expression Task ID is:", result); + return result; } - (async () => { try { main(process.argv[2]); 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..25d3e95 100644 --- a/examples/static_codegen/avs_grpc_pb.js +++ b/examples/static_codegen/avs_grpc_pb.js @@ -6,28 +6,6 @@ var avs_pb = require('./avs_pb.js'); var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); var google_protobuf_wrappers_pb = require('google-protobuf/google/protobuf/wrappers_pb.js'); -function serialize_aggregator_AddressRequest(arg) { - if (!(arg instanceof avs_pb.AddressRequest)) { - throw new Error('Expected argument of type aggregator.AddressRequest'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_aggregator_AddressRequest(buffer_arg) { - return avs_pb.AddressRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} - -function serialize_aggregator_AddressResp(arg) { - if (!(arg instanceof avs_pb.AddressResp)) { - throw new Error('Expected argument of type aggregator.AddressResp'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_aggregator_AddressResp(buffer_arg) { - return avs_pb.AddressResp.deserializeBinary(new Uint8Array(buffer_arg)); -} - function serialize_aggregator_Checkin(arg) { if (!(arg instanceof avs_pb.Checkin)) { throw new Error('Expected argument of type aggregator.Checkin'); @@ -72,6 +50,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'); @@ -83,6 +83,17 @@ function deserialize_aggregator_GetKeyReq(buffer_arg) { return avs_pb.GetKeyReq.deserializeBinary(new Uint8Array(buffer_arg)); } +function serialize_aggregator_IdReq(arg) { + if (!(arg instanceof avs_pb.IdReq)) { + throw new Error('Expected argument of type aggregator.IdReq'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_aggregator_IdReq(buffer_arg) { + return avs_pb.IdReq.deserializeBinary(new Uint8Array(buffer_arg)); +} + function serialize_aggregator_KeyResp(arg) { if (!(arg instanceof avs_pb.KeyResp)) { throw new Error('Expected argument of type aggregator.KeyResp'); @@ -116,6 +127,28 @@ function deserialize_aggregator_ListTasksResp(buffer_arg) { return avs_pb.ListTasksResp.deserializeBinary(new Uint8Array(buffer_arg)); } +function serialize_aggregator_ListWalletReq(arg) { + if (!(arg instanceof avs_pb.ListWalletReq)) { + throw new Error('Expected argument of type aggregator.ListWalletReq'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_aggregator_ListWalletReq(buffer_arg) { + return avs_pb.ListWalletReq.deserializeBinary(new Uint8Array(buffer_arg)); +} + +function serialize_aggregator_ListWalletResp(arg) { + if (!(arg instanceof avs_pb.ListWalletResp)) { + throw new Error('Expected argument of type aggregator.ListWalletResp'); + } + return Buffer.from(arg.serializeBinary()); +} + +function deserialize_aggregator_ListWalletResp(buffer_arg) { + return avs_pb.ListWalletResp.deserializeBinary(new Uint8Array(buffer_arg)); +} + function serialize_aggregator_NonceRequest(arg) { if (!(arg instanceof avs_pb.NonceRequest)) { throw new Error('Expected argument of type aggregator.NonceRequest'); @@ -171,17 +204,6 @@ function deserialize_aggregator_Task(buffer_arg) { return avs_pb.Task.deserializeBinary(new Uint8Array(buffer_arg)); } -function serialize_aggregator_UUID(arg) { - if (!(arg instanceof avs_pb.UUID)) { - throw new Error('Expected argument of type aggregator.UUID'); - } - return Buffer.from(arg.serializeBinary()); -} - -function deserialize_aggregator_UUID(buffer_arg) { - return avs_pb.UUID.deserializeBinary(new Uint8Array(buffer_arg)); -} - function serialize_aggregator_UpdateChecksReq(arg) { if (!(arg instanceof avs_pb.UpdateChecksReq)) { throw new Error('Expected argument of type aggregator.UpdateChecksReq'); @@ -241,16 +263,27 @@ getNonce: { responseSerialize: serialize_aggregator_NonceResp, responseDeserialize: deserialize_aggregator_NonceResp, }, - getSmartAccountAddress: { - path: '/aggregator.Aggregator/GetSmartAccountAddress', + 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, + }, + listWallets: { + path: '/aggregator.Aggregator/ListWallets', requestStream: false, responseStream: false, - requestType: avs_pb.AddressRequest, - responseType: avs_pb.AddressResp, - requestSerialize: serialize_aggregator_AddressRequest, - requestDeserialize: deserialize_aggregator_AddressRequest, - responseSerialize: serialize_aggregator_AddressResp, - responseDeserialize: deserialize_aggregator_AddressResp, + requestType: avs_pb.ListWalletReq, + responseType: avs_pb.ListWalletResp, + requestSerialize: serialize_aggregator_ListWalletReq, + requestDeserialize: deserialize_aggregator_ListWalletReq, + responseSerialize: serialize_aggregator_ListWalletResp, + responseDeserialize: deserialize_aggregator_ListWalletResp, }, // Task Management createTask: { @@ -279,10 +312,10 @@ createTask: { path: '/aggregator.Aggregator/GetTask', requestStream: false, responseStream: false, - requestType: avs_pb.UUID, + requestType: avs_pb.IdReq, responseType: avs_pb.Task, - requestSerialize: serialize_aggregator_UUID, - requestDeserialize: deserialize_aggregator_UUID, + requestSerialize: serialize_aggregator_IdReq, + requestDeserialize: deserialize_aggregator_IdReq, responseSerialize: serialize_aggregator_Task, responseDeserialize: deserialize_aggregator_Task, }, @@ -290,10 +323,10 @@ createTask: { path: '/aggregator.Aggregator/CancelTask', requestStream: false, responseStream: false, - requestType: avs_pb.UUID, + requestType: avs_pb.IdReq, responseType: google_protobuf_wrappers_pb.BoolValue, - requestSerialize: serialize_aggregator_UUID, - requestDeserialize: deserialize_aggregator_UUID, + requestSerialize: serialize_aggregator_IdReq, + requestDeserialize: deserialize_aggregator_IdReq, responseSerialize: serialize_google_protobuf_BoolValue, responseDeserialize: deserialize_google_protobuf_BoolValue, }, @@ -301,10 +334,10 @@ createTask: { path: '/aggregator.Aggregator/DeleteTask', requestStream: false, responseStream: false, - requestType: avs_pb.UUID, + requestType: avs_pb.IdReq, responseType: google_protobuf_wrappers_pb.BoolValue, - requestSerialize: serialize_aggregator_UUID, - requestDeserialize: deserialize_aggregator_UUID, + requestSerialize: serialize_aggregator_IdReq, + requestDeserialize: deserialize_aggregator_IdReq, responseSerialize: serialize_google_protobuf_BoolValue, responseDeserialize: deserialize_google_protobuf_BoolValue, }, diff --git a/examples/static_codegen/avs_pb.js b/examples/static_codegen/avs_pb.js index 55fe1bb..57ec579 100644 --- a/examples/static_codegen/avs_pb.js +++ b/examples/static_codegen/avs_pb.js @@ -25,41 +25,49 @@ var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/time goog.object.extend(proto, google_protobuf_timestamp_pb); var google_protobuf_wrappers_pb = require('google-protobuf/google/protobuf/wrappers_pb.js'); goog.object.extend(proto, google_protobuf_wrappers_pb); -goog.exportSymbol('proto.aggregator.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.Condition', null, global); +goog.exportSymbol('proto.aggregator.ContractReadNode', 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.IdReq', 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.ListWalletReq', null, global); +goog.exportSymbol('proto.aggregator.ListWalletResp', null, global); +goog.exportSymbol('proto.aggregator.LoopNode', 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.TaskTypeCase', null, global); goog.exportSymbol('proto.aggregator.TaskStatus', null, global); goog.exportSymbol('proto.aggregator.TaskTrigger', 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.TaskTrigger.TriggerTypeCase', null, global); goog.exportSymbol('proto.aggregator.UpdateChecksReq', null, global); goog.exportSymbol('proto.aggregator.UpdateChecksResp', null, global); /** @@ -72,16 +80,16 @@ goog.exportSymbol('proto.aggregator.UpdateChecksResp', null, global); * @extends {jspb.Message} * @constructor */ -proto.aggregator.UUID = function(opt_data) { +proto.aggregator.IdReq = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.aggregator.UUID, jspb.Message); +goog.inherits(proto.aggregator.IdReq, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.aggregator.UUID.displayName = 'proto.aggregator.UUID'; + proto.aggregator.IdReq.displayName = 'proto.aggregator.IdReq'; } /** * Generated by JsPbCodeGenerator. @@ -177,16 +185,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 +206,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 +227,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 +248,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 +311,79 @@ 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.ContractWriteNode, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.aggregator.ContractWriteNode.displayName = 'proto.aggregator.ContractWriteNode'; +} +/** + * 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.ContractReadNode = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.aggregator.ContractReadNode, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.aggregator.ContractReadNode.displayName = 'proto.aggregator.ContractReadNode'; +} +/** + * 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.GraphQLQueryNode = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.aggregator.ETHTransfer, jspb.Message); +goog.inherits(proto.aggregator.GraphQLQueryNode, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.aggregator.ETHTransfer.displayName = 'proto.aggregator.ETHTransfer'; + proto.aggregator.GraphQLQueryNode.displayName = 'proto.aggregator.GraphQLQueryNode'; } /** * Generated by JsPbCodeGenerator. @@ -303,16 +395,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.ContractExecution = function(opt_data) { +proto.aggregator.RestAPINode = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.aggregator.ContractExecution, jspb.Message); +goog.inherits(proto.aggregator.RestAPINode, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.aggregator.ContractExecution.displayName = 'proto.aggregator.ContractExecution'; + proto.aggregator.RestAPINode.displayName = 'proto.aggregator.RestAPINode'; } /** * Generated by JsPbCodeGenerator. @@ -324,16 +416,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.GraphQLDataQuery = function(opt_data) { +proto.aggregator.CustomCodeNode = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.aggregator.GraphQLDataQuery, jspb.Message); +goog.inherits(proto.aggregator.CustomCodeNode, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.aggregator.GraphQLDataQuery.displayName = 'proto.aggregator.GraphQLDataQuery'; + proto.aggregator.CustomCodeNode.displayName = 'proto.aggregator.CustomCodeNode'; } /** * Generated by JsPbCodeGenerator. @@ -345,16 +437,37 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.HTTPAPICall = function(opt_data) { +proto.aggregator.Condition = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.aggregator.HTTPAPICall, jspb.Message); +goog.inherits(proto.aggregator.Condition, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.aggregator.Condition.displayName = 'proto.aggregator.Condition'; +} +/** + * 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.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.HTTPAPICall.displayName = 'proto.aggregator.HTTPAPICall'; + proto.aggregator.BranchNode.displayName = 'proto.aggregator.BranchNode'; } /** * Generated by JsPbCodeGenerator. @@ -366,16 +479,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.CustomCode = function(opt_data) { +proto.aggregator.FilterNode = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.aggregator.CustomCode, jspb.Message); +goog.inherits(proto.aggregator.FilterNode, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.aggregator.CustomCode.displayName = 'proto.aggregator.CustomCode'; + proto.aggregator.FilterNode.displayName = 'proto.aggregator.FilterNode'; } /** * Generated by JsPbCodeGenerator. @@ -387,16 +500,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.ConditionJump = function(opt_data) { +proto.aggregator.LoopNode = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.aggregator.ConditionJump, jspb.Message); +goog.inherits(proto.aggregator.LoopNode, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.aggregator.ConditionJump.displayName = 'proto.aggregator.ConditionJump'; + proto.aggregator.LoopNode.displayName = 'proto.aggregator.LoopNode'; } /** * Generated by JsPbCodeGenerator. @@ -408,16 +521,16 @@ 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.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 +542,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. @@ -576,16 +689,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.AddressRequest = function(opt_data) { +proto.aggregator.ListWalletReq = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.aggregator.AddressRequest, jspb.Message); +goog.inherits(proto.aggregator.ListWalletReq, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.aggregator.AddressRequest.displayName = 'proto.aggregator.AddressRequest'; + proto.aggregator.ListWalletReq.displayName = 'proto.aggregator.ListWalletReq'; } /** * Generated by JsPbCodeGenerator. @@ -597,16 +710,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 +731,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.ListWalletResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.ListWalletResp.repeatedFields_, null); }; -goog.inherits(proto.aggregator.ListTasksReq, jspb.Message); +goog.inherits(proto.aggregator.ListWalletResp, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.aggregator.ListTasksReq.displayName = 'proto.aggregator.ListTasksReq'; + proto.aggregator.ListWalletResp.displayName = 'proto.aggregator.ListWalletResp'; } /** * Generated by JsPbCodeGenerator. @@ -639,16 +752,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 +773,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 +868,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'; +} @@ -771,8 +926,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.aggregator.UUID.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.UUID.toObject(opt_includeInstance, this); +proto.aggregator.IdReq.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.IdReq.toObject(opt_includeInstance, this); }; @@ -781,13 +936,13 @@ proto.aggregator.UUID.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.UUID} msg The msg instance to transform. + * @param {!proto.aggregator.IdReq} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.UUID.toObject = function(includeInstance, msg) { +proto.aggregator.IdReq.toObject = function(includeInstance, msg) { var f, obj = { - bytes: jspb.Message.getFieldWithDefault(msg, 1, "") + id: jspb.Message.getFieldWithDefault(msg, 1, "") }; if (includeInstance) { @@ -801,23 +956,23 @@ proto.aggregator.UUID.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.UUID} + * @return {!proto.aggregator.IdReq} */ -proto.aggregator.UUID.deserializeBinary = function(bytes) { +proto.aggregator.IdReq.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.UUID; - return proto.aggregator.UUID.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.IdReq; + return proto.aggregator.IdReq.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.aggregator.UUID} msg The message object to deserialize into. + * @param {!proto.aggregator.IdReq} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.UUID} + * @return {!proto.aggregator.IdReq} */ -proto.aggregator.UUID.deserializeBinaryFromReader = function(msg, reader) { +proto.aggregator.IdReq.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -826,7 +981,7 @@ proto.aggregator.UUID.deserializeBinaryFromReader = function(msg, reader) { switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setBytes(value); + msg.setId(value); break; default: reader.skipField(); @@ -841,9 +996,9 @@ proto.aggregator.UUID.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.UUID.prototype.serializeBinary = function() { +proto.aggregator.IdReq.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.UUID.serializeBinaryToWriter(this, writer); + proto.aggregator.IdReq.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -851,13 +1006,13 @@ proto.aggregator.UUID.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.UUID} message + * @param {!proto.aggregator.IdReq} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.UUID.serializeBinaryToWriter = function(message, writer) { +proto.aggregator.IdReq.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getBytes(); + f = message.getId(); if (f.length > 0) { writer.writeString( 1, @@ -868,19 +1023,19 @@ proto.aggregator.UUID.serializeBinaryToWriter = function(message, writer) { /** - * optional string bytes = 1; + * optional string id = 1; * @return {string} */ -proto.aggregator.UUID.prototype.getBytes = function() { +proto.aggregator.IdReq.prototype.getId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.aggregator.UUID} returns this + * @return {!proto.aggregator.IdReq} returns this */ -proto.aggregator.UUID.prototype.setBytes = function(value) { +proto.aggregator.IdReq.prototype.setId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; @@ -1799,6 +1954,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 +1976,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 +1986,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) + epochsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f }; if (includeInstance) { @@ -1847,23 +2006,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 +2030,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.addEpochs(values[i]); + } break; default: reader.skipField(); @@ -1902,9 +2048,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,246 +2058,129 @@ 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.getEpochsList(); + 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 epochs = 1; + * @return {!Array} */ -proto.aggregator.TaskTrigger.prototype.getTriggerType = function() { - return /** @type {!proto.aggregator.TriggerType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.aggregator.FixedEpochCondition.prototype.getEpochsList = 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.setEpochsList = 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.addEpochs = 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.clearEpochsList = function() { + return this.setEpochsList([]); }; + /** - * 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 = { + scheduleList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; - - -/** - * @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); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.aggregator.TaskTrigger} returns this - */ -proto.aggregator.TaskTrigger.prototype.clearContractQuery = function() { - return this.setContractQuery(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.aggregator.TaskTrigger.prototype.hasContractQuery = function() { - return jspb.Message.getField(this, 3) != null; -}; - - -/** - * optional ExpressionCondition expression = 4; - * @return {?proto.aggregator.ExpressionCondition} - */ -proto.aggregator.TaskTrigger.prototype.getExpression = function() { - return /** @type{?proto.aggregator.ExpressionCondition} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.ExpressionCondition, 4)); -}; - - -/** - * @param {?proto.aggregator.ExpressionCondition|undefined} value - * @return {!proto.aggregator.TaskTrigger} returns this -*/ -proto.aggregator.TaskTrigger.prototype.setExpression = function(value) { - return jspb.Message.setWrapperField(this, 4, value); -}; - - -/** - * Clears the message field making it undefined. - * @return {!proto.aggregator.TaskTrigger} returns this - */ -proto.aggregator.TaskTrigger.prototype.clearExpression = function() { - return this.setExpression(undefined); -}; - - -/** - * Returns whether this field is set. - * @return {boolean} - */ -proto.aggregator.TaskTrigger.prototype.hasExpression = function() { - return jspb.Message.getField(this, 4) != null; -}; - - - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.aggregator.TimeCondition.repeatedFields_ = [1]; - - - -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.TimeCondition.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.TimeCondition.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.TimeCondition} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.aggregator.TimeCondition.toObject = function(includeInstance, msg) { - var f, obj = { - fixedList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f, - cron: 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.TimeCondition} + * @return {!proto.aggregator.CronCondition} */ -proto.aggregator.TimeCondition.deserializeBinary = function(bytes) { +proto.aggregator.CronCondition.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.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.TimeCondition} msg The message object to deserialize into. + * @param {!proto.aggregator.CronCondition} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.TimeCondition} + * @return {!proto.aggregator.CronCondition} */ -proto.aggregator.TimeCondition.deserializeBinaryFromReader = function(msg, reader) { +proto.aggregator.CronCondition.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2159,14 +2188,8 @@ 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]); - } - break; - case 2: var value = /** @type {string} */ (reader.readString()); - msg.setCron(value); + msg.addSchedule(value); break; default: reader.skipField(); @@ -2181,9 +2204,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.CronCondition.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.TimeCondition.serializeBinaryToWriter(this, writer); + proto.aggregator.CronCondition.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2191,81 +2214,56 @@ 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.CronCondition} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.TimeCondition.serializeBinaryToWriter = function(message, writer) { +proto.aggregator.CronCondition.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getFixedList(); + f = message.getScheduleList(); if (f.length > 0) { - writer.writePackedInt64( + writer.writeRepeatedString( 1, f ); } - f = message.getCron(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } }; /** - * repeated int64 fixed = 1; - * @return {!Array} + * repeated string schedule = 1; + * @return {!Array} */ -proto.aggregator.TimeCondition.prototype.getFixedList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); +proto.aggregator.CronCondition.prototype.getScheduleList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); }; /** - * @param {!Array} value - * @return {!proto.aggregator.TimeCondition} returns this + * @param {!Array} value + * @return {!proto.aggregator.CronCondition} returns this */ -proto.aggregator.TimeCondition.prototype.setFixedList = function(value) { +proto.aggregator.CronCondition.prototype.setScheduleList = function(value) { return jspb.Message.setField(this, 1, value || []); }; /** - * @param {number} value + * @param {string} value * @param {number=} opt_index - * @return {!proto.aggregator.TimeCondition} returns this + * @return {!proto.aggregator.CronCondition} returns this */ -proto.aggregator.TimeCondition.prototype.addFixed = function(value, opt_index) { +proto.aggregator.CronCondition.prototype.addSchedule = 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.TimeCondition} returns this - */ -proto.aggregator.TimeCondition.prototype.clearFixedList = function() { - return this.setFixedList([]); -}; - - -/** - * optional string cron = 2; - * @return {string} - */ -proto.aggregator.TimeCondition.prototype.getCron = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; - - -/** - * @param {string} value - * @return {!proto.aggregator.TimeCondition} returns this + * @return {!proto.aggregator.CronCondition} returns this */ -proto.aggregator.TimeCondition.prototype.setCron = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.aggregator.CronCondition.prototype.clearScheduleList = function() { + return this.setScheduleList([]); }; @@ -2285,8 +2283,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.BlockCondition.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.BlockCondition.toObject(opt_includeInstance, this); }; @@ -2295,14 +2293,13 @@ 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.BlockCondition} 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.BlockCondition.toObject = function(includeInstance, msg) { var f, obj = { - contractAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), - callmsg: jspb.Message.getFieldWithDefault(msg, 2, "") + interval: jspb.Message.getFieldWithDefault(msg, 1, 0) }; if (includeInstance) { @@ -2316,23 +2313,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.BlockCondition} */ -proto.aggregator.ContractQueryCondition.deserializeBinary = function(bytes) { +proto.aggregator.BlockCondition.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.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.ContractQueryCondition} msg The message object to deserialize into. + * @param {!proto.aggregator.BlockCondition} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.ContractQueryCondition} + * @return {!proto.aggregator.BlockCondition} */ -proto.aggregator.ContractQueryCondition.deserializeBinaryFromReader = function(msg, reader) { +proto.aggregator.BlockCondition.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2340,12 +2337,8 @@ proto.aggregator.ContractQueryCondition.deserializeBinaryFromReader = function(m var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setContractAddress(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setCallmsg(value); + var value = /** @type {number} */ (reader.readInt64()); + msg.setInterval(value); break; default: reader.skipField(); @@ -2360,9 +2353,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.BlockCondition.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.ContractQueryCondition.serializeBinaryToWriter(this, writer); + proto.aggregator.BlockCondition.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2370,62 +2363,37 @@ 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.BlockCondition} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.ContractQueryCondition.serializeBinaryToWriter = function(message, writer) { +proto.aggregator.BlockCondition.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getContractAddress(); - if (f.length > 0) { - writer.writeString( + f = message.getInterval(); + if (f !== 0) { + writer.writeInt64( 1, f ); } - f = message.getCallmsg(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } -}; - - -/** - * optional string contract_address = 1; - * @return {string} - */ -proto.aggregator.ContractQueryCondition.prototype.getContractAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); -}; - - -/** - * @param {string} value - * @return {!proto.aggregator.ContractQueryCondition} returns this - */ -proto.aggregator.ContractQueryCondition.prototype.setContractAddress = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional string callmsg = 2; - * @return {string} + * optional int64 interval = 1; + * @return {number} */ -proto.aggregator.ContractQueryCondition.prototype.getCallmsg = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.aggregator.BlockCondition.prototype.getInterval = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; /** - * @param {string} value - * @return {!proto.aggregator.ContractQueryCondition} returns this + * @param {number} value + * @return {!proto.aggregator.BlockCondition} returns this */ -proto.aggregator.ContractQueryCondition.prototype.setCallmsg = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.aggregator.BlockCondition.prototype.setInterval = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); }; @@ -2445,8 +2413,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.EventCondition.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.EventCondition.toObject(opt_includeInstance, this); }; @@ -2455,11 +2423,11 @@ 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.EventCondition} 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.EventCondition.toObject = function(includeInstance, msg) { var f, obj = { expression: jspb.Message.getFieldWithDefault(msg, 1, "") }; @@ -2475,23 +2443,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.EventCondition} */ -proto.aggregator.ExpressionCondition.deserializeBinary = function(bytes) { +proto.aggregator.EventCondition.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.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.ExpressionCondition} msg The message object to deserialize into. + * @param {!proto.aggregator.EventCondition} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.ExpressionCondition} + * @return {!proto.aggregator.EventCondition} */ -proto.aggregator.ExpressionCondition.deserializeBinaryFromReader = function(msg, reader) { +proto.aggregator.EventCondition.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2515,9 +2483,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.EventCondition.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.ExpressionCondition.serializeBinaryToWriter(this, writer); + proto.aggregator.EventCondition.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2525,11 +2493,11 @@ 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.EventCondition} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.ExpressionCondition.serializeBinaryToWriter = function(message, writer) { +proto.aggregator.EventCondition.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getExpression(); if (f.length > 0) { @@ -2545,21 +2513,50 @@ proto.aggregator.ExpressionCondition.serializeBinaryToWriter = function(message, * optional string expression = 1; * @return {string} */ -proto.aggregator.ExpressionCondition.prototype.getExpression = function() { +proto.aggregator.EventCondition.prototype.getExpression = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.aggregator.ExpressionCondition} returns this + * @return {!proto.aggregator.EventCondition} returns this */ -proto.aggregator.ExpressionCondition.prototype.setExpression = function(value) { +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_ = [[1,2,3,4,5]]; + +/** + * @enum {number} + */ +proto.aggregator.TaskTrigger.TriggerTypeCase = { + TRIGGER_TYPE_NOT_SET: 0, + MANUAL: 1, + FIXED_TIME: 2, + CRON: 3, + BLOCK: 4, + EVENT: 5 +}; + +/** + * @return {proto.aggregator.TaskTrigger.TriggerTypeCase} + */ +proto.aggregator.TaskTrigger.prototype.getTriggerTypeCase = function() { + return /** @type {proto.aggregator.TaskTrigger.TriggerTypeCase} */(jspb.Message.computeOneofCase(this, proto.aggregator.TaskTrigger.oneofGroups_[0])); +}; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -2575,8 +2572,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.TaskTrigger.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.TaskTrigger.toObject(opt_includeInstance, this); }; @@ -2585,15 +2582,17 @@ 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.TaskTrigger} 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.TaskTrigger.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) + manual: jspb.Message.getBooleanFieldWithDefault(msg, 1, false), + fixedTime: (f = msg.getFixedTime()) && proto.aggregator.FixedEpochCondition.toObject(includeInstance, f), + cron: (f = msg.getCron()) && proto.aggregator.CronCondition.toObject(includeInstance, f), + block: (f = msg.getBlock()) && proto.aggregator.BlockCondition.toObject(includeInstance, f), + event: (f = msg.getEvent()) && proto.aggregator.EventCondition.toObject(includeInstance, f) }; if (includeInstance) { @@ -2607,23 +2606,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.TaskTrigger} */ -proto.aggregator.SyncTasksResp.deserializeBinary = function(bytes) { +proto.aggregator.TaskTrigger.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.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.SyncTasksResp} msg The message object to deserialize into. + * @param {!proto.aggregator.TaskTrigger} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.SyncTasksResp} + * @return {!proto.aggregator.TaskTrigger} */ -proto.aggregator.SyncTasksResp.deserializeBinaryFromReader = function(msg, reader) { +proto.aggregator.TaskTrigger.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2631,17 +2630,28 @@ proto.aggregator.SyncTasksResp.deserializeBinaryFromReader = function(msg, reade var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setId(value); + var value = /** @type {boolean} */ (reader.readBool()); + msg.setManual(value); break; case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setChecktype(value); + var value = new proto.aggregator.FixedEpochCondition; + reader.readMessage(value,proto.aggregator.FixedEpochCondition.deserializeBinaryFromReader); + msg.setFixedTime(value); break; case 3: - var value = new proto.aggregator.TaskTrigger; - reader.readMessage(value,proto.aggregator.TaskTrigger.deserializeBinaryFromReader); - msg.setTrigger(value); + var value = new proto.aggregator.CronCondition; + reader.readMessage(value,proto.aggregator.CronCondition.deserializeBinaryFromReader); + msg.setCron(value); + break; + case 4: + var value = new proto.aggregator.BlockCondition; + reader.readMessage(value,proto.aggregator.BlockCondition.deserializeBinaryFromReader); + msg.setBlock(value); + break; + case 5: + var value = new proto.aggregator.EventCondition; + reader.readMessage(value,proto.aggregator.EventCondition.deserializeBinaryFromReader); + msg.setEvent(value); break; default: reader.skipField(); @@ -2656,9 +2666,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.TaskTrigger.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.SyncTasksResp.serializeBinaryToWriter(this, writer); + proto.aggregator.TaskTrigger.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -2666,98 +2676,115 @@ 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.TaskTrigger} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.SyncTasksResp.serializeBinaryToWriter = function(message, writer) { +proto.aggregator.TaskTrigger.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getId(); - if (f.length > 0) { - writer.writeString( + f = /** @type {boolean} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeBool( 1, f ); } - f = message.getChecktype(); - if (f.length > 0) { - writer.writeString( + f = message.getFixedTime(); + if (f != null) { + writer.writeMessage( 2, - f + f, + proto.aggregator.FixedEpochCondition.serializeBinaryToWriter ); } - f = message.getTrigger(); + f = message.getCron(); if (f != null) { writer.writeMessage( 3, f, - proto.aggregator.TaskTrigger.serializeBinaryToWriter + proto.aggregator.CronCondition.serializeBinaryToWriter + ); + } + f = message.getBlock(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.aggregator.BlockCondition.serializeBinaryToWriter + ); + } + f = message.getEvent(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.aggregator.EventCondition.serializeBinaryToWriter ); } }; /** - * optional string id = 1; - * @return {string} + * optional bool manual = 1; + * @return {boolean} */ -proto.aggregator.SyncTasksResp.prototype.getId = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.aggregator.TaskTrigger.prototype.getManual = function() { + return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 1, false)); }; /** - * @param {string} value - * @return {!proto.aggregator.SyncTasksResp} returns this + * @param {boolean} value + * @return {!proto.aggregator.TaskTrigger} returns this */ -proto.aggregator.SyncTasksResp.prototype.setId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); +proto.aggregator.TaskTrigger.prototype.setManual = function(value) { + return jspb.Message.setOneofField(this, 1, proto.aggregator.TaskTrigger.oneofGroups_[0], value); }; /** - * optional string checkType = 2; - * @return {string} + * Clears the field making it undefined. + * @return {!proto.aggregator.TaskTrigger} returns this */ -proto.aggregator.SyncTasksResp.prototype.getChecktype = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.aggregator.TaskTrigger.prototype.clearManual = function() { + return jspb.Message.setOneofField(this, 1, proto.aggregator.TaskTrigger.oneofGroups_[0], undefined); }; /** - * @param {string} value - * @return {!proto.aggregator.SyncTasksResp} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.aggregator.SyncTasksResp.prototype.setChecktype = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.aggregator.TaskTrigger.prototype.hasManual = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * optional TaskTrigger trigger = 3; - * @return {?proto.aggregator.TaskTrigger} + * optional FixedEpochCondition fixed_time = 2; + * @return {?proto.aggregator.FixedEpochCondition} */ -proto.aggregator.SyncTasksResp.prototype.getTrigger = function() { - return /** @type{?proto.aggregator.TaskTrigger} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.TaskTrigger, 3)); +proto.aggregator.TaskTrigger.prototype.getFixedTime = function() { + return /** @type{?proto.aggregator.FixedEpochCondition} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.FixedEpochCondition, 2)); }; /** - * @param {?proto.aggregator.TaskTrigger|undefined} value - * @return {!proto.aggregator.SyncTasksResp} returns this + * @param {?proto.aggregator.FixedEpochCondition|undefined} value + * @return {!proto.aggregator.TaskTrigger} returns this */ -proto.aggregator.SyncTasksResp.prototype.setTrigger = function(value) { - return jspb.Message.setWrapperField(this, 3, value); +proto.aggregator.TaskTrigger.prototype.setFixedTime = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.aggregator.TaskTrigger.oneofGroups_[0], value); }; /** * Clears the message field making it undefined. - * @return {!proto.aggregator.SyncTasksResp} returns this + * @return {!proto.aggregator.TaskTrigger} returns this */ -proto.aggregator.SyncTasksResp.prototype.clearTrigger = function() { - return this.setTrigger(undefined); +proto.aggregator.TaskTrigger.prototype.clearFixedTime = function() { + return this.setFixedTime(undefined); }; @@ -2765,168 +2792,119 @@ proto.aggregator.SyncTasksResp.prototype.clearTrigger = function() { * Returns whether this field is set. * @return {boolean} */ -proto.aggregator.SyncTasksResp.prototype.hasTrigger = function() { - return jspb.Message.getField(this, 3) != null; +proto.aggregator.TaskTrigger.prototype.hasFixedTime = function() { + return jspb.Message.getField(this, 2) != null; }; +/** + * optional CronCondition cron = 3; + * @return {?proto.aggregator.CronCondition} + */ +proto.aggregator.TaskTrigger.prototype.getCron = function() { + return /** @type{?proto.aggregator.CronCondition} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.CronCondition, 3)); +}; +/** + * @param {?proto.aggregator.CronCondition|undefined} value + * @return {!proto.aggregator.TaskTrigger} returns this +*/ +proto.aggregator.TaskTrigger.prototype.setCron = function(value) { + return jspb.Message.setOneofWrapperField(this, 3, proto.aggregator.TaskTrigger.oneofGroups_[0], value); +}; + -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} + * Clears the message field making it undefined. + * @return {!proto.aggregator.TaskTrigger} returns this */ -proto.aggregator.ETHTransfer.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.ETHTransfer.toObject(opt_includeInstance, this); +proto.aggregator.TaskTrigger.prototype.clearCron = function() { + return this.setCron(undefined); }; /** - * 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.ETHTransfer} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * Returns whether this field is set. + * @return {boolean} */ -proto.aggregator.ETHTransfer.toObject = function(includeInstance, msg) { - var f, obj = { - destination: jspb.Message.getFieldWithDefault(msg, 1, ""), - amount: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +proto.aggregator.TaskTrigger.prototype.hasCron = function() { + return jspb.Message.getField(this, 3) != null; }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.ETHTransfer} + * optional BlockCondition block = 4; + * @return {?proto.aggregator.BlockCondition} */ -proto.aggregator.ETHTransfer.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ETHTransfer; - return proto.aggregator.ETHTransfer.deserializeBinaryFromReader(msg, reader); +proto.aggregator.TaskTrigger.prototype.getBlock = function() { + return /** @type{?proto.aggregator.BlockCondition} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.BlockCondition, 4)); }; /** - * 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 {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.ETHTransfer} - */ -proto.aggregator.ETHTransfer.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.setDestination(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setAmount(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; + * @param {?proto.aggregator.BlockCondition|undefined} value + * @return {!proto.aggregator.TaskTrigger} returns this +*/ +proto.aggregator.TaskTrigger.prototype.setBlock = function(value) { + return jspb.Message.setOneofWrapperField(this, 4, proto.aggregator.TaskTrigger.oneofGroups_[0], value); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * Clears the message field making it undefined. + * @return {!proto.aggregator.TaskTrigger} returns this */ -proto.aggregator.ETHTransfer.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.ETHTransfer.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.aggregator.TaskTrigger.prototype.clearBlock = function() { + return this.setBlock(undefined); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.ETHTransfer} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * Returns whether this field is set. + * @return {boolean} */ -proto.aggregator.ETHTransfer.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getDestination(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getAmount(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } +proto.aggregator.TaskTrigger.prototype.hasBlock = function() { + return jspb.Message.getField(this, 4) != null; }; /** - * optional string destination = 1; - * @return {string} + * optional EventCondition event = 5; + * @return {?proto.aggregator.EventCondition} */ -proto.aggregator.ETHTransfer.prototype.getDestination = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.aggregator.TaskTrigger.prototype.getEvent = function() { + return /** @type{?proto.aggregator.EventCondition} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.EventCondition, 5)); }; /** - * @param {string} value - * @return {!proto.aggregator.ETHTransfer} returns this - */ -proto.aggregator.ETHTransfer.prototype.setDestination = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); + * @param {?proto.aggregator.EventCondition|undefined} value + * @return {!proto.aggregator.TaskTrigger} returns this +*/ +proto.aggregator.TaskTrigger.prototype.setEvent = function(value) { + return jspb.Message.setOneofWrapperField(this, 5, proto.aggregator.TaskTrigger.oneofGroups_[0], value); }; /** - * optional string amount = 2; - * @return {string} + * Clears the message field making it undefined. + * @return {!proto.aggregator.TaskTrigger} returns this */ -proto.aggregator.ETHTransfer.prototype.getAmount = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.aggregator.TaskTrigger.prototype.clearEvent = function() { + return this.setEvent(undefined); }; /** - * @param {string} value - * @return {!proto.aggregator.ETHTransfer} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.aggregator.ETHTransfer.prototype.setAmount = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.aggregator.TaskTrigger.prototype.hasEvent = function() { + return jspb.Message.getField(this, 5) != null; }; @@ -2946,8 +2924,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.SyncTasksResp.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.SyncTasksResp.toObject(opt_includeInstance, this); }; @@ -2956,16 +2934,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.SyncTasksResp} 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.SyncTasksResp.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, "") + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + checktype: jspb.Message.getFieldWithDefault(msg, 2, ""), + trigger: (f = msg.getTrigger()) && proto.aggregator.TaskTrigger.toObject(includeInstance, f) }; if (includeInstance) { @@ -2979,23 +2956,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.SyncTasksResp} */ -proto.aggregator.ContractExecution.deserializeBinary = function(bytes) { +proto.aggregator.SyncTasksResp.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.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.ContractExecution} 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.ContractExecution} + * @return {!proto.aggregator.SyncTasksResp} */ -proto.aggregator.ContractExecution.deserializeBinaryFromReader = function(msg, reader) { +proto.aggregator.SyncTasksResp.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3004,19 +2981,16 @@ proto.aggregator.ContractExecution.deserializeBinaryFromReader = function(msg, r switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setContractAddress(value); + msg.setId(value); break; case 2: var value = /** @type {string} */ (reader.readString()); - msg.setCallData(value); + msg.setChecktype(value); break; case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setMethod(value); - break; - case 4: - var value = /** @type {string} */ (reader.readString()); - msg.setEncodedParams(value); + var value = new proto.aggregator.TaskTrigger; + reader.readMessage(value,proto.aggregator.TaskTrigger.deserializeBinaryFromReader); + msg.setTrigger(value); break; default: reader.skipField(); @@ -3031,9 +3005,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.SyncTasksResp.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.ContractExecution.serializeBinaryToWriter(this, writer); + proto.aggregator.SyncTasksResp.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3041,112 +3015,107 @@ 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.SyncTasksResp} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.ContractExecution.serializeBinaryToWriter = function(message, writer) { +proto.aggregator.SyncTasksResp.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getContractAddress(); + f = message.getId(); if (f.length > 0) { writer.writeString( 1, f ); } - f = message.getCallData(); + f = message.getChecktype(); if (f.length > 0) { writer.writeString( 2, f ); } - f = message.getMethod(); - if (f.length > 0) { - writer.writeString( + f = message.getTrigger(); + if (f != null) { + writer.writeMessage( 3, - f - ); - } - f = message.getEncodedParams(); - if (f.length > 0) { - writer.writeString( - 4, - f + f, + proto.aggregator.TaskTrigger.serializeBinaryToWriter ); } }; /** - * optional string contract_address = 1; + * optional string id = 1; * @return {string} */ -proto.aggregator.ContractExecution.prototype.getContractAddress = function() { +proto.aggregator.SyncTasksResp.prototype.getId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.aggregator.ContractExecution} returns this + * @return {!proto.aggregator.SyncTasksResp} returns this */ -proto.aggregator.ContractExecution.prototype.setContractAddress = function(value) { +proto.aggregator.SyncTasksResp.prototype.setId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional string call_data = 2; + * optional string checkType = 2; * @return {string} */ -proto.aggregator.ContractExecution.prototype.getCallData = function() { +proto.aggregator.SyncTasksResp.prototype.getChecktype = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @return {!proto.aggregator.ContractExecution} returns this + * @return {!proto.aggregator.SyncTasksResp} returns this */ -proto.aggregator.ContractExecution.prototype.setCallData = function(value) { +proto.aggregator.SyncTasksResp.prototype.setChecktype = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; /** - * optional string method = 3; - * @return {string} + * optional TaskTrigger trigger = 3; + * @return {?proto.aggregator.TaskTrigger} */ -proto.aggregator.ContractExecution.prototype.getMethod = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +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.ContractExecution} returns this - */ -proto.aggregator.ContractExecution.prototype.setMethod = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); + * @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); }; /** - * optional string encoded_params = 4; - * @return {string} + * Clears the message field making it undefined. + * @return {!proto.aggregator.SyncTasksResp} returns this */ -proto.aggregator.ContractExecution.prototype.getEncodedParams = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); +proto.aggregator.SyncTasksResp.prototype.clearTrigger = function() { + return this.setTrigger(undefined); }; /** - * @param {string} value - * @return {!proto.aggregator.ContractExecution} returns this + * Returns whether this field is set. + * @return {boolean} */ -proto.aggregator.ContractExecution.prototype.setEncodedParams = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); +proto.aggregator.SyncTasksResp.prototype.hasTrigger = function() { + return jspb.Message.getField(this, 3) != null; }; @@ -3166,8 +3135,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.ETHTransferNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ETHTransferNode.toObject(opt_includeInstance, this); }; @@ -3176,14 +3145,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.ETHTransferNode} 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.ETHTransferNode.toObject = function(includeInstance, msg) { var f, obj = { - url: jspb.Message.getFieldWithDefault(msg, 1, ""), - query: jspb.Message.getFieldWithDefault(msg, 2, "") + destination: jspb.Message.getFieldWithDefault(msg, 1, ""), + amount: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { @@ -3197,23 +3166,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.ETHTransferNode} */ -proto.aggregator.GraphQLDataQuery.deserializeBinary = function(bytes) { +proto.aggregator.ETHTransferNode.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.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.GraphQLDataQuery} 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.GraphQLDataQuery} + * @return {!proto.aggregator.ETHTransferNode} */ -proto.aggregator.GraphQLDataQuery.deserializeBinaryFromReader = function(msg, reader) { +proto.aggregator.ETHTransferNode.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3222,11 +3191,11 @@ proto.aggregator.GraphQLDataQuery.deserializeBinaryFromReader = function(msg, re switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setUrl(value); + msg.setDestination(value); break; case 2: var value = /** @type {string} */ (reader.readString()); - msg.setQuery(value); + msg.setAmount(value); break; default: reader.skipField(); @@ -3241,9 +3210,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.ETHTransferNode.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.GraphQLDataQuery.serializeBinaryToWriter(this, writer); + proto.aggregator.ETHTransferNode.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3251,20 +3220,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.ETHTransferNode} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.GraphQLDataQuery.serializeBinaryToWriter = function(message, writer) { +proto.aggregator.ETHTransferNode.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getUrl(); + f = message.getDestination(); if (f.length > 0) { writer.writeString( 1, f ); } - f = message.getQuery(); + f = message.getAmount(); if (f.length > 0) { writer.writeString( 2, @@ -3275,37 +3244,37 @@ proto.aggregator.GraphQLDataQuery.serializeBinaryToWriter = function(message, wr /** - * optional string url = 1; + * optional string destination = 1; * @return {string} */ -proto.aggregator.GraphQLDataQuery.prototype.getUrl = function() { +proto.aggregator.ETHTransferNode.prototype.getDestination = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.aggregator.GraphQLDataQuery} returns this + * @return {!proto.aggregator.ETHTransferNode} returns this */ -proto.aggregator.GraphQLDataQuery.prototype.setUrl = function(value) { +proto.aggregator.ETHTransferNode.prototype.setDestination = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional string query = 2; + * optional string amount = 2; * @return {string} */ -proto.aggregator.GraphQLDataQuery.prototype.getQuery = function() { +proto.aggregator.ETHTransferNode.prototype.getAmount = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @return {!proto.aggregator.GraphQLDataQuery} returns this + * @return {!proto.aggregator.ETHTransferNode} returns this */ -proto.aggregator.GraphQLDataQuery.prototype.setQuery = function(value) { +proto.aggregator.ETHTransferNode.prototype.setAmount = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; @@ -3326,8 +3295,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.ContractWriteNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ContractWriteNode.toObject(opt_includeInstance, this); }; @@ -3336,15 +3305,15 @@ 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.ContractWriteNode} 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.ContractWriteNode.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, "") + contractAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + callData: jspb.Message.getFieldWithDefault(msg, 2, ""), + contractAbi: jspb.Message.getFieldWithDefault(msg, 3, "") }; if (includeInstance) { @@ -3358,23 +3327,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.ContractWriteNode} */ -proto.aggregator.HTTPAPICall.deserializeBinary = function(bytes) { +proto.aggregator.ContractWriteNode.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.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.HTTPAPICall} 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.HTTPAPICall} + * @return {!proto.aggregator.ContractWriteNode} */ -proto.aggregator.HTTPAPICall.deserializeBinaryFromReader = function(msg, reader) { +proto.aggregator.ContractWriteNode.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3383,17 +3352,15 @@ proto.aggregator.HTTPAPICall.deserializeBinaryFromReader = function(msg, reader) switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setUrl(value); + msg.setContractAddress(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, "", ""); - }); + var value = /** @type {string} */ (reader.readString()); + msg.setCallData(value); break; case 3: var value = /** @type {string} */ (reader.readString()); - msg.setBody(value); + msg.setContractAbi(value); break; default: reader.skipField(); @@ -3408,9 +3375,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.ContractWriteNode.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.HTTPAPICall.serializeBinaryToWriter(this, writer); + proto.aggregator.ContractWriteNode.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3418,24 +3385,27 @@ 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.ContractWriteNode} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.HTTPAPICall.serializeBinaryToWriter = function(message, writer) { +proto.aggregator.ContractWriteNode.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getUrl(); + f = message.getContractAddress(); 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.getCallData(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); } - f = message.getBody(); + f = message.getContractAbi(); if (f.length > 0) { writer.writeString( 3, @@ -3446,59 +3416,55 @@ proto.aggregator.HTTPAPICall.serializeBinaryToWriter = function(message, writer) /** - * optional string url = 1; + * optional string contract_address = 1; * @return {string} */ -proto.aggregator.HTTPAPICall.prototype.getUrl = function() { +proto.aggregator.ContractWriteNode.prototype.getContractAddress = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.aggregator.HTTPAPICall} returns this + * @return {!proto.aggregator.ContractWriteNode} returns this */ -proto.aggregator.HTTPAPICall.prototype.setUrl = function(value) { +proto.aggregator.ContractWriteNode.prototype.setContractAddress = 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} + * optional string call_data = 2; + * @return {string} */ -proto.aggregator.HTTPAPICall.prototype.getHeadersMap = function(opt_noLazyCreate) { - return /** @type {!jspb.Map} */ ( - jspb.Message.getMapField(this, 2, opt_noLazyCreate, - null)); +proto.aggregator.ContractWriteNode.prototype.getCallData = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * Clears values from the map. The map will be non-null. - * @return {!proto.aggregator.HTTPAPICall} returns this + * @param {string} value + * @return {!proto.aggregator.ContractWriteNode} returns this */ -proto.aggregator.HTTPAPICall.prototype.clearHeadersMap = function() { - this.getHeadersMap().clear(); - return this;}; +proto.aggregator.ContractWriteNode.prototype.setCallData = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; /** - * optional string body = 3; + * optional string contract_abi = 3; * @return {string} */ -proto.aggregator.HTTPAPICall.prototype.getBody = function() { +proto.aggregator.ContractWriteNode.prototype.getContractAbi = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value - * @return {!proto.aggregator.HTTPAPICall} returns this + * @return {!proto.aggregator.ContractWriteNode} returns this */ -proto.aggregator.HTTPAPICall.prototype.setBody = function(value) { +proto.aggregator.ContractWriteNode.prototype.setContractAbi = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; @@ -3519,8 +3485,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.ContractReadNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ContractReadNode.toObject(opt_includeInstance, this); }; @@ -3529,14 +3495,15 @@ 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.ContractReadNode} 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.ContractReadNode.toObject = function(includeInstance, msg) { var f, obj = { - type: jspb.Message.getFieldWithDefault(msg, 1, 0), - body: jspb.Message.getFieldWithDefault(msg, 2, "") + contractAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + callData: jspb.Message.getFieldWithDefault(msg, 2, ""), + contractAbi: jspb.Message.getFieldWithDefault(msg, 3, "") }; if (includeInstance) { @@ -3550,23 +3517,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.ContractReadNode} */ -proto.aggregator.CustomCode.deserializeBinary = function(bytes) { +proto.aggregator.ContractReadNode.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.ContractReadNode; + return proto.aggregator.ContractReadNode.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.aggregator.CustomCode} msg The message object to deserialize into. + * @param {!proto.aggregator.ContractReadNode} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.CustomCode} + * @return {!proto.aggregator.ContractReadNode} */ -proto.aggregator.CustomCode.deserializeBinaryFromReader = function(msg, reader) { +proto.aggregator.ContractReadNode.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3574,12 +3541,16 @@ 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 = /** @type {string} */ (reader.readString()); + msg.setContractAddress(value); break; case 2: var value = /** @type {string} */ (reader.readString()); - msg.setBody(value); + msg.setCallData(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setContractAbi(value); break; default: reader.skipField(); @@ -3594,9 +3565,9 @@ proto.aggregator.CustomCode.deserializeBinaryFromReader = function(msg, reader) * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.CustomCode.prototype.serializeBinary = function() { +proto.aggregator.ContractReadNode.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.CustomCode.serializeBinaryToWriter(this, writer); + proto.aggregator.ContractReadNode.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3604,65 +3575,90 @@ proto.aggregator.CustomCode.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.CustomCode} message + * @param {!proto.aggregator.ContractReadNode} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.CustomCode.serializeBinaryToWriter = function(message, writer) { +proto.aggregator.ContractReadNode.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getType(); - if (f !== 0.0) { - writer.writeEnum( + f = message.getContractAddress(); + if (f.length > 0) { + writer.writeString( 1, f ); } - f = message.getBody(); + f = message.getCallData(); if (f.length > 0) { writer.writeString( 2, f ); } + f = message.getContractAbi(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } }; /** - * optional CustomCodeType type = 1; - * @return {!proto.aggregator.CustomCodeType} + * optional string contract_address = 1; + * @return {string} */ -proto.aggregator.CustomCode.prototype.getType = function() { - return /** @type {!proto.aggregator.CustomCodeType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.aggregator.ContractReadNode.prototype.getContractAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {!proto.aggregator.CustomCodeType} value - * @return {!proto.aggregator.CustomCode} returns this + * @param {string} value + * @return {!proto.aggregator.ContractReadNode} returns this */ -proto.aggregator.CustomCode.prototype.setType = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); +proto.aggregator.ContractReadNode.prototype.setContractAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional string body = 2; + * optional string call_data = 2; * @return {string} */ -proto.aggregator.CustomCode.prototype.getBody = function() { +proto.aggregator.ContractReadNode.prototype.getCallData = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @return {!proto.aggregator.CustomCode} returns this + * @return {!proto.aggregator.ContractReadNode} returns this */ -proto.aggregator.CustomCode.prototype.setBody = function(value) { +proto.aggregator.ContractReadNode.prototype.setCallData = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; +/** + * optional string contract_abi = 3; + * @return {string} + */ +proto.aggregator.ContractReadNode.prototype.getContractAbi = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.aggregator.ContractReadNode} returns this + */ +proto.aggregator.ContractReadNode.prototype.setContractAbi = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + @@ -3679,8 +3675,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.GraphQLQueryNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.GraphQLQueryNode.toObject(opt_includeInstance, this); }; @@ -3689,14 +3685,15 @@ 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.GraphQLQueryNode} 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.GraphQLQueryNode.toObject = function(includeInstance, msg) { var f, obj = { - expression: jspb.Message.getFieldWithDefault(msg, 1, ""), - next: jspb.Message.getFieldWithDefault(msg, 2, "") + url: jspb.Message.getFieldWithDefault(msg, 1, ""), + query: jspb.Message.getFieldWithDefault(msg, 2, ""), + variablesMap: (f = msg.getVariablesMap()) ? f.toObject(includeInstance, undefined) : [] }; if (includeInstance) { @@ -3710,23 +3707,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.GraphQLQueryNode} */ -proto.aggregator.ConditionJump.deserializeBinary = function(bytes) { +proto.aggregator.GraphQLQueryNode.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.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.ConditionJump} 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.ConditionJump} + * @return {!proto.aggregator.GraphQLQueryNode} */ -proto.aggregator.ConditionJump.deserializeBinaryFromReader = function(msg, reader) { +proto.aggregator.GraphQLQueryNode.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3735,11 +3732,17 @@ proto.aggregator.ConditionJump.deserializeBinaryFromReader = function(msg, reade switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setExpression(value); + msg.setUrl(value); break; case 2: var value = /** @type {string} */ (reader.readString()); - msg.setNext(value); + msg.setQuery(value); + break; + case 3: + var value = msg.getVariablesMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); break; default: reader.skipField(); @@ -3754,9 +3757,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.GraphQLQueryNode.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.ConditionJump.serializeBinaryToWriter(this, writer); + proto.aggregator.GraphQLQueryNode.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3764,72 +3767,91 @@ 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.GraphQLQueryNode} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.ConditionJump.serializeBinaryToWriter = function(message, writer) { +proto.aggregator.GraphQLQueryNode.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getExpression(); + f = message.getUrl(); if (f.length > 0) { writer.writeString( 1, f ); } - f = message.getNext(); + f = message.getQuery(); if (f.length > 0) { writer.writeString( 2, f ); } + f = message.getVariablesMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(3, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } }; /** - * optional string expression = 1; + * optional string url = 1; * @return {string} */ -proto.aggregator.ConditionJump.prototype.getExpression = function() { +proto.aggregator.GraphQLQueryNode.prototype.getUrl = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.aggregator.ConditionJump} returns this + * @return {!proto.aggregator.GraphQLQueryNode} returns this */ -proto.aggregator.ConditionJump.prototype.setExpression = function(value) { +proto.aggregator.GraphQLQueryNode.prototype.setUrl = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional string next = 2; + * optional string query = 2; * @return {string} */ -proto.aggregator.ConditionJump.prototype.getNext = function() { +proto.aggregator.GraphQLQueryNode.prototype.getQuery = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @return {!proto.aggregator.ConditionJump} returns this + * @return {!proto.aggregator.GraphQLQueryNode} returns this */ -proto.aggregator.ConditionJump.prototype.setNext = function(value) { +proto.aggregator.GraphQLQueryNode.prototype.setQuery = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; +/** + * map variables = 3; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.aggregator.GraphQLQueryNode.prototype.getVariablesMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 3, opt_noLazyCreate, + null)); +}; + /** - * List of repeated fields within this message type. - * @private {!Array} - * @const + * Clears values from the map. The map will be non-null. + * @return {!proto.aggregator.GraphQLQueryNode} returns this */ -proto.aggregator.BranchAction.repeatedFields_ = [2]; +proto.aggregator.GraphQLQueryNode.prototype.clearVariablesMap = function() { + this.getVariablesMap().clear(); + return this;}; + + @@ -3846,8 +3868,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.RestAPINode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.RestAPINode.toObject(opt_includeInstance, this); }; @@ -3856,16 +3878,16 @@ 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.RestAPINode} 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.RestAPINode.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) + url: jspb.Message.getFieldWithDefault(msg, 1, ""), + headersMap: (f = msg.getHeadersMap()) ? f.toObject(includeInstance, undefined) : [], + body: jspb.Message.getFieldWithDefault(msg, 3, ""), + method: jspb.Message.getFieldWithDefault(msg, 4, "") }; if (includeInstance) { @@ -3879,23 +3901,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.RestAPINode} */ -proto.aggregator.BranchAction.deserializeBinary = function(bytes) { +proto.aggregator.RestAPINode.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.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.BranchAction} 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.BranchAction} + * @return {!proto.aggregator.RestAPINode} */ -proto.aggregator.BranchAction.deserializeBinaryFromReader = function(msg, reader) { +proto.aggregator.RestAPINode.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3903,19 +3925,22 @@ 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.setUrl(value); break; case 2: - var value = new proto.aggregator.ConditionJump; - reader.readMessage(value,proto.aggregator.ConditionJump.deserializeBinaryFromReader); - msg.addElseifs(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 = new proto.aggregator.ConditionJump; - reader.readMessage(value,proto.aggregator.ConditionJump.deserializeBinaryFromReader); - msg.setElse(value); + var value = /** @type {string} */ (reader.readString()); + msg.setBody(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setMethod(value); break; default: reader.skipField(); @@ -3930,9 +3955,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.RestAPINode.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.BranchAction.serializeBinaryToWriter(this, writer); + proto.aggregator.RestAPINode.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -3940,159 +3965,117 @@ 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.RestAPINode} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.BranchAction.serializeBinaryToWriter = function(message, writer) { +proto.aggregator.RestAPINode.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getIf(); - if (f != null) { - writer.writeMessage( + f = message.getUrl(); + if (f.length > 0) { + writer.writeString( 1, - f, - proto.aggregator.ConditionJump.serializeBinaryToWriter + f ); } - f = message.getElseifsList(); + f = message.getHeadersMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(2, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } + f = message.getBody(); if (f.length > 0) { - writer.writeRepeatedMessage( - 2, - f, - proto.aggregator.ConditionJump.serializeBinaryToWriter + writer.writeString( + 3, + f ); } - f = message.getElse(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.aggregator.ConditionJump.serializeBinaryToWriter + f = message.getMethod(); + if (f.length > 0) { + writer.writeString( + 4, + 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 url = 1; + * @return {string} */ -proto.aggregator.BranchAction.prototype.clearIf = function() { - return this.setIf(undefined); +proto.aggregator.RestAPINode.prototype.getUrl = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {string} value + * @return {!proto.aggregator.RestAPINode} returns this */ -proto.aggregator.BranchAction.prototype.hasIf = function() { - return jspb.Message.getField(this, 1) != null; +proto.aggregator.RestAPINode.prototype.setUrl = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; /** - * repeated ConditionJump ElseIfs = 2; - * @return {!Array} + * map headers = 2; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} */ -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.RestAPINode.prototype.getHeadersMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 2, opt_noLazyCreate, + null)); }; /** - * @param {!proto.aggregator.ConditionJump=} opt_value - * @param {number=} opt_index - * @return {!proto.aggregator.ConditionJump} + * Clears values from the map. The map will be non-null. + * @return {!proto.aggregator.RestAPINode} 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.RestAPINode.prototype.clearHeadersMap = function() { + this.getHeadersMap().clear(); + return this;}; /** - * Clears the list making it empty but non-null. - * @return {!proto.aggregator.BranchAction} returns this + * optional string body = 3; + * @return {string} */ -proto.aggregator.BranchAction.prototype.clearElseifsList = function() { - return this.setElseifsList([]); +proto.aggregator.RestAPINode.prototype.getBody = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** - * optional ConditionJump Else = 3; - * @return {?proto.aggregator.ConditionJump} + * @param {string} value + * @return {!proto.aggregator.RestAPINode} returns this */ -proto.aggregator.BranchAction.prototype.getElse = function() { - return /** @type{?proto.aggregator.ConditionJump} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.ConditionJump, 3)); -}; - - -/** - * @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); +proto.aggregator.RestAPINode.prototype.setBody = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.aggregator.BranchAction} returns this + * optional string method = 4; + * @return {string} */ -proto.aggregator.BranchAction.prototype.clearElse = function() { - return this.setElse(undefined); +proto.aggregator.RestAPINode.prototype.getMethod = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {string} value + * @return {!proto.aggregator.RestAPINode} returns this */ -proto.aggregator.BranchAction.prototype.hasElse = function() { - return jspb.Message.getField(this, 3) != null; +proto.aggregator.RestAPINode.prototype.setMethod = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); }; -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.aggregator.TaskAction.repeatedFields_ = [4]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -4108,8 +4091,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.CustomCodeNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.CustomCodeNode.toObject(opt_includeInstance, this); }; @@ -4118,22 +4101,14 @@ 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.CustomCodeNode} 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.CustomCodeNode.toObject = function(includeInstance, msg) { var f, obj = { - taskType: 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) + type: jspb.Message.getFieldWithDefault(msg, 1, 0), + source: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { @@ -4147,23 +4122,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.CustomCodeNode} */ -proto.aggregator.TaskAction.deserializeBinary = function(bytes) { +proto.aggregator.CustomCodeNode.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.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.TaskAction} 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.TaskAction} + * @return {!proto.aggregator.CustomCodeNode} */ -proto.aggregator.TaskAction.deserializeBinaryFromReader = function(msg, reader) { +proto.aggregator.CustomCodeNode.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -4171,53 +4146,15 @@ proto.aggregator.TaskAction.deserializeBinaryFromReader = function(msg, reader) var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {!proto.aggregator.TaskType} */ (reader.readEnum()); - msg.setTaskType(value); + var value = /** @type {!proto.aggregator.CustomCodeType} */ (reader.readEnum()); + msg.setType(value); break; case 2: var value = /** @type {string} */ (reader.readString()); - msg.setId(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setName(value); - break; - case 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); - msg.setEthTransfer(value); - break; - case 11: - var value = new proto.aggregator.ContractExecution; - reader.readMessage(value,proto.aggregator.ContractExecution.deserializeBinaryFromReader); - msg.setContractExecution(value); + msg.setSource(value); break; - case 12: - var value = new proto.aggregator.GraphQLDataQuery; - reader.readMessage(value,proto.aggregator.GraphQLDataQuery.deserializeBinaryFromReader); - msg.setGraphqlDataQuery(value); - break; - case 13: - var value = new proto.aggregator.HTTPAPICall; - reader.readMessage(value,proto.aggregator.HTTPAPICall.deserializeBinaryFromReader); - msg.setHttpDataQuery(value); - break; - case 14: - var value = new proto.aggregator.CustomCode; - reader.readMessage(value,proto.aggregator.CustomCode.deserializeBinaryFromReader); - msg.setCustomCode(value); - break; - case 15: - var value = new proto.aggregator.BranchAction; - reader.readMessage(value,proto.aggregator.BranchAction.deserializeBinaryFromReader); - msg.setBranch(value); - break; - default: - reader.skipField(); + default: + reader.skipField(); break; } } @@ -4229,9 +4166,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.CustomCodeNode.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.TaskAction.serializeBinaryToWriter(this, writer); + proto.aggregator.CustomCodeNode.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -4239,392 +4176,2198 @@ 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.CustomCodeNode} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.TaskAction.serializeBinaryToWriter = function(message, writer) { +proto.aggregator.CustomCodeNode.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getTaskType(); + f = message.getType(); if (f !== 0.0) { writer.writeEnum( 1, f ); } - f = message.getId(); + f = message.getSource(); if (f.length > 0) { writer.writeString( 2, f ); } - f = message.getName(); +}; + + +/** + * optional CustomCodeType type = 1; + * @return {!proto.aggregator.CustomCodeType} + */ +proto.aggregator.CustomCodeNode.prototype.getType = function() { + return /** @type {!proto.aggregator.CustomCodeType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {!proto.aggregator.CustomCodeType} value + * @return {!proto.aggregator.CustomCodeNode} returns this + */ +proto.aggregator.CustomCodeNode.prototype.setType = function(value) { + return jspb.Message.setProto3EnumField(this, 1, value); +}; + + +/** + * optional string source = 2; + * @return {string} + */ +proto.aggregator.CustomCodeNode.prototype.getSource = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.aggregator.CustomCodeNode} returns this + */ +proto.aggregator.CustomCodeNode.prototype.setSource = 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.Condition.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.Condition.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.Condition} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.Condition.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + type: jspb.Message.getFieldWithDefault(msg, 2, ""), + expression: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + 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.Condition} + */ +proto.aggregator.Condition.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.Condition; + return proto.aggregator.Condition.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.aggregator.Condition} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.aggregator.Condition} + */ +proto.aggregator.Condition.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setType(value); + break; + case 3: + 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.Condition.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.Condition.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.Condition} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.Condition.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); if (f.length > 0) { writer.writeString( - 3, + 1, f ); } - f = message.getNextList(); + f = message.getType(); if (f.length > 0) { - writer.writeRepeatedString( - 4, + writer.writeString( + 2, f ); } - f = message.getEthTransfer(); - if (f != null) { - writer.writeMessage( - 10, - f, - proto.aggregator.ETHTransfer.serializeBinaryToWriter - ); - } - f = message.getContractExecution(); - if (f != null) { - writer.writeMessage( - 11, - f, - proto.aggregator.ContractExecution.serializeBinaryToWriter - ); - } - f = message.getGraphqlDataQuery(); - if (f != null) { - writer.writeMessage( - 12, - f, - proto.aggregator.GraphQLDataQuery.serializeBinaryToWriter - ); - } - f = message.getHttpDataQuery(); - if (f != null) { - writer.writeMessage( - 13, - f, - proto.aggregator.HTTPAPICall.serializeBinaryToWriter - ); - } - f = message.getCustomCode(); - if (f != null) { - writer.writeMessage( - 14, - f, - proto.aggregator.CustomCode.serializeBinaryToWriter - ); - } - f = message.getBranch(); - if (f != null) { - writer.writeMessage( - 15, - f, - proto.aggregator.BranchAction.serializeBinaryToWriter + f = message.getExpression(); + if (f.length > 0) { + writer.writeString( + 3, + f ); } }; /** - * optional TaskType task_type = 1; - * @return {!proto.aggregator.TaskType} + * optional string id = 1; + * @return {string} */ -proto.aggregator.TaskAction.prototype.getTaskType = function() { - return /** @type {!proto.aggregator.TaskType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.aggregator.Condition.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {!proto.aggregator.TaskType} value - * @return {!proto.aggregator.TaskAction} returns this + * @param {string} value + * @return {!proto.aggregator.Condition} returns this */ -proto.aggregator.TaskAction.prototype.setTaskType = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); +proto.aggregator.Condition.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional string id = 2; + * optional string type = 2; * @return {string} */ -proto.aggregator.TaskAction.prototype.getId = function() { +proto.aggregator.Condition.prototype.getType = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @return {!proto.aggregator.TaskAction} returns this + * @return {!proto.aggregator.Condition} returns this */ -proto.aggregator.TaskAction.prototype.setId = function(value) { +proto.aggregator.Condition.prototype.setType = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; /** - * optional string name = 3; + * optional string expression = 3; * @return {string} */ -proto.aggregator.TaskAction.prototype.getName = function() { +proto.aggregator.Condition.prototype.getExpression = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value - * @return {!proto.aggregator.TaskAction} returns this + * @return {!proto.aggregator.Condition} returns this */ -proto.aggregator.TaskAction.prototype.setName = function(value) { +proto.aggregator.Condition.prototype.setExpression = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; + /** - * repeated string next = 4; - * @return {!Array} + * List of repeated fields within this message type. + * @private {!Array} + * @const */ -proto.aggregator.TaskAction.prototype.getNextList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 4)); -}; +proto.aggregator.BranchNode.repeatedFields_ = [1]; + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * @param {!Array} value - * @return {!proto.aggregator.TaskAction} returns this + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} */ -proto.aggregator.TaskAction.prototype.setNextList = function(value) { - return jspb.Message.setField(this, 4, value || []); +proto.aggregator.BranchNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.BranchNode.toObject(opt_includeInstance, this); }; /** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.aggregator.TaskAction} returns 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.BranchNode} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.TaskAction.prototype.addNext = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 4, value, opt_index); +proto.aggregator.BranchNode.toObject = function(includeInstance, msg) { + var f, obj = { + conditionsList: jspb.Message.toObjectList(msg.getConditionsList(), + proto.aggregator.Condition.toObject, includeInstance) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * Clears the list making it empty but non-null. - * @return {!proto.aggregator.TaskAction} returns this + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.aggregator.BranchNode} */ -proto.aggregator.TaskAction.prototype.clearNextList = function() { - return this.setNextList([]); +proto.aggregator.BranchNode.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.BranchNode; + return proto.aggregator.BranchNode.deserializeBinaryFromReader(msg, reader); }; /** - * optional ETHTransfer eth_transfer = 10; - * @return {?proto.aggregator.ETHTransfer} + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.aggregator.BranchNode} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.aggregator.BranchNode} */ -proto.aggregator.TaskAction.prototype.getEthTransfer = function() { - return /** @type{?proto.aggregator.ETHTransfer} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.ETHTransfer, 10)); +proto.aggregator.BranchNode.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.aggregator.Condition; + reader.readMessage(value,proto.aggregator.Condition.deserializeBinaryFromReader); + msg.addConditions(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * @param {?proto.aggregator.ETHTransfer|undefined} value - * @return {!proto.aggregator.TaskAction} returns this -*/ -proto.aggregator.TaskAction.prototype.setEthTransfer = function(value) { - return jspb.Message.setWrapperField(this, 10, value); + * 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.getConditionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.aggregator.Condition.serializeBinaryToWriter + ); + } +}; + + +/** + * repeated Condition conditions = 1; + * @return {!Array} + */ +proto.aggregator.BranchNode.prototype.getConditionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.Condition, 1)); +}; + + +/** + * @param {!Array} value + * @return {!proto.aggregator.BranchNode} returns this +*/ +proto.aggregator.BranchNode.prototype.setConditionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); +}; + + +/** + * @param {!proto.aggregator.Condition=} opt_value + * @param {number=} opt_index + * @return {!proto.aggregator.Condition} + */ +proto.aggregator.BranchNode.prototype.addConditions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.aggregator.Condition, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.aggregator.BranchNode} returns this + */ +proto.aggregator.BranchNode.prototype.clearConditionsList = function() { + return this.setConditionsList([]); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.aggregator.FilterNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.FilterNode.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.aggregator.FilterNode} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.FilterNode.toObject = function(includeInstance, msg) { + var f, obj = { + expression: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.aggregator.FilterNode} + */ +proto.aggregator.FilterNode.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.FilterNode; + return proto.aggregator.FilterNode.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.aggregator.FilterNode} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.aggregator.FilterNode} + */ +proto.aggregator.FilterNode.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setExpression(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.aggregator.FilterNode.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.FilterNode.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.aggregator.FilterNode} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.FilterNode.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getExpression(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } +}; + + +/** + * optional string expression = 1; + * @return {string} + */ +proto.aggregator.FilterNode.prototype.getExpression = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.aggregator.FilterNode} returns this + */ +proto.aggregator.FilterNode.prototype.setExpression = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.aggregator.LoopNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.LoopNode.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.aggregator.LoopNode} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.LoopNode.toObject = function(includeInstance, msg) { + var f, obj = { + iterVar: jspb.Message.getFieldWithDefault(msg, 1, ""), + iterKey: 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.LoopNode} + */ +proto.aggregator.LoopNode.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.LoopNode; + return proto.aggregator.LoopNode.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.aggregator.LoopNode} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.aggregator.LoopNode} + */ +proto.aggregator.LoopNode.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setIterVar(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setIterKey(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.aggregator.LoopNode.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.LoopNode.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.aggregator.LoopNode} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.LoopNode.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getIterVar(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getIterKey(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } +}; + + +/** + * optional string iter_var = 1; + * @return {string} + */ +proto.aggregator.LoopNode.prototype.getIterVar = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.aggregator.LoopNode} returns this + */ +proto.aggregator.LoopNode.prototype.setIterVar = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string iter_key = 2; + * @return {string} + */ +proto.aggregator.LoopNode.prototype.getIterKey = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.aggregator.LoopNode} returns this + */ +proto.aggregator.LoopNode.prototype.setIterKey = 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.TaskEdge.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.TaskEdge.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.aggregator.TaskEdge} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.TaskEdge.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + source: jspb.Message.getFieldWithDefault(msg, 2, ""), + target: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.aggregator.TaskEdge} + */ +proto.aggregator.TaskEdge.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.TaskEdge; + return proto.aggregator.TaskEdge.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.aggregator.TaskEdge} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.aggregator.TaskEdge} + */ +proto.aggregator.TaskEdge.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSource(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setTarget(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.aggregator.TaskEdge.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.TaskEdge.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.aggregator.TaskEdge} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.TaskEdge.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSource(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getTarget(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.aggregator.TaskEdge.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.aggregator.TaskEdge} returns this + */ +proto.aggregator.TaskEdge.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string source = 2; + * @return {string} + */ +proto.aggregator.TaskEdge.prototype.getSource = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.aggregator.TaskEdge} returns this + */ +proto.aggregator.TaskEdge.prototype.setSource = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string target = 3; + * @return {string} + */ +proto.aggregator.TaskEdge.prototype.getTarget = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.aggregator.TaskEdge} returns this + */ +proto.aggregator.TaskEdge.prototype.setTarget = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + +/** + * Oneof group definitions for this message. Each group defines the field + * numbers belonging to that group. When of these fields' value is set, all + * other fields in the group are cleared. During deserialization, if multiple + * fields are encountered for a group, only the last value seen will be kept. + * @private {!Array>} + * @const + */ +proto.aggregator.TaskNode.oneofGroups_ = [[10,11,12,13,14,15,16,17,18]]; + +/** + * @enum {number} + */ +proto.aggregator.TaskNode.TaskTypeCase = { + TASK_TYPE_NOT_SET: 0, + ETH_TRANSFER: 10, + CONTRACT_WRITE: 11, + CONTRACT_READ: 12, + GRAPHQL_DATA_QUERY: 13, + REST_API: 14, + BRANCH: 15, + FILTER: 16, + LOOP: 17, + CUSTOM_CODE: 18 +}; + +/** + * @return {proto.aggregator.TaskNode.TaskTypeCase} + */ +proto.aggregator.TaskNode.prototype.getTaskTypeCase = function() { + return /** @type {proto.aggregator.TaskNode.TaskTypeCase} */(jspb.Message.computeOneofCase(this, proto.aggregator.TaskNode.oneofGroups_[0])); +}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.aggregator.TaskNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.TaskNode.toObject(opt_includeInstance, this); +}; + + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.aggregator.TaskNode} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.TaskNode.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 2, ""), + name: jspb.Message.getFieldWithDefault(msg, 3, ""), + ethTransfer: (f = msg.getEthTransfer()) && proto.aggregator.ETHTransferNode.toObject(includeInstance, f), + contractWrite: (f = msg.getContractWrite()) && proto.aggregator.ContractWriteNode.toObject(includeInstance, f), + contractRead: (f = msg.getContractRead()) && proto.aggregator.ContractReadNode.toObject(includeInstance, f), + graphqlDataQuery: (f = msg.getGraphqlDataQuery()) && proto.aggregator.GraphQLQueryNode.toObject(includeInstance, f), + restApi: (f = msg.getRestApi()) && proto.aggregator.RestAPINode.toObject(includeInstance, f), + branch: (f = msg.getBranch()) && proto.aggregator.BranchNode.toObject(includeInstance, f), + filter: (f = msg.getFilter()) && proto.aggregator.FilterNode.toObject(includeInstance, f), + loop: (f = msg.getLoop()) && proto.aggregator.LoopNode.toObject(includeInstance, f), + customCode: (f = msg.getCustomCode()) && proto.aggregator.CustomCodeNode.toObject(includeInstance, f) + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.aggregator.TaskNode} + */ +proto.aggregator.TaskNode.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.TaskNode; + return proto.aggregator.TaskNode.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.aggregator.TaskNode} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.aggregator.TaskNode} + */ +proto.aggregator.TaskNode.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setName(value); + break; + case 10: + var value = new proto.aggregator.ETHTransferNode; + reader.readMessage(value,proto.aggregator.ETHTransferNode.deserializeBinaryFromReader); + msg.setEthTransfer(value); + break; + case 11: + var value = new proto.aggregator.ContractWriteNode; + reader.readMessage(value,proto.aggregator.ContractWriteNode.deserializeBinaryFromReader); + msg.setContractWrite(value); + break; + case 12: + var value = new proto.aggregator.ContractReadNode; + reader.readMessage(value,proto.aggregator.ContractReadNode.deserializeBinaryFromReader); + msg.setContractRead(value); + break; + case 13: + var value = new proto.aggregator.GraphQLQueryNode; + reader.readMessage(value,proto.aggregator.GraphQLQueryNode.deserializeBinaryFromReader); + msg.setGraphqlDataQuery(value); + break; + case 14: + var value = new proto.aggregator.RestAPINode; + reader.readMessage(value,proto.aggregator.RestAPINode.deserializeBinaryFromReader); + msg.setRestApi(value); + break; + case 15: + var value = new proto.aggregator.BranchNode; + reader.readMessage(value,proto.aggregator.BranchNode.deserializeBinaryFromReader); + msg.setBranch(value); + break; + case 16: + var value = new proto.aggregator.FilterNode; + reader.readMessage(value,proto.aggregator.FilterNode.deserializeBinaryFromReader); + msg.setFilter(value); + break; + case 17: + var value = new proto.aggregator.LoopNode; + reader.readMessage(value,proto.aggregator.LoopNode.deserializeBinaryFromReader); + msg.setLoop(value); + break; + case 18: + var value = new proto.aggregator.CustomCodeNode; + reader.readMessage(value,proto.aggregator.CustomCodeNode.deserializeBinaryFromReader); + msg.setCustomCode(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.aggregator.TaskNode.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.TaskNode.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + + +/** + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.aggregator.TaskNode} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.TaskNode.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getName(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getEthTransfer(); + if (f != null) { + writer.writeMessage( + 10, + f, + proto.aggregator.ETHTransferNode.serializeBinaryToWriter + ); + } + f = message.getContractWrite(); + if (f != null) { + writer.writeMessage( + 11, + f, + proto.aggregator.ContractWriteNode.serializeBinaryToWriter + ); + } + f = message.getContractRead(); + if (f != null) { + writer.writeMessage( + 12, + f, + proto.aggregator.ContractReadNode.serializeBinaryToWriter + ); + } + f = message.getGraphqlDataQuery(); + if (f != null) { + writer.writeMessage( + 13, + f, + proto.aggregator.GraphQLQueryNode.serializeBinaryToWriter + ); + } + f = message.getRestApi(); + if (f != null) { + writer.writeMessage( + 14, + f, + proto.aggregator.RestAPINode.serializeBinaryToWriter + ); + } + f = message.getBranch(); + if (f != null) { + writer.writeMessage( + 15, + f, + proto.aggregator.BranchNode.serializeBinaryToWriter + ); + } + f = message.getFilter(); + if (f != null) { + writer.writeMessage( + 16, + f, + proto.aggregator.FilterNode.serializeBinaryToWriter + ); + } + f = message.getLoop(); + if (f != null) { + writer.writeMessage( + 17, + f, + proto.aggregator.LoopNode.serializeBinaryToWriter + ); + } + f = message.getCustomCode(); + if (f != null) { + writer.writeMessage( + 18, + f, + proto.aggregator.CustomCodeNode.serializeBinaryToWriter + ); + } +}; + + +/** + * optional string id = 2; + * @return {string} + */ +proto.aggregator.TaskNode.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.aggregator.TaskNode} returns this + */ +proto.aggregator.TaskNode.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string name = 3; + * @return {string} + */ +proto.aggregator.TaskNode.prototype.getName = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.aggregator.TaskNode} returns this + */ +proto.aggregator.TaskNode.prototype.setName = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional ETHTransferNode eth_transfer = 10; + * @return {?proto.aggregator.ETHTransferNode} + */ +proto.aggregator.TaskNode.prototype.getEthTransfer = function() { + return /** @type{?proto.aggregator.ETHTransferNode} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.ETHTransferNode, 10)); +}; + + +/** + * @param {?proto.aggregator.ETHTransferNode|undefined} value + * @return {!proto.aggregator.TaskNode} returns this +*/ +proto.aggregator.TaskNode.prototype.setEthTransfer = function(value) { + return jspb.Message.setOneofWrapperField(this, 10, proto.aggregator.TaskNode.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.aggregator.TaskNode} returns this + */ +proto.aggregator.TaskNode.prototype.clearEthTransfer = function() { + return this.setEthTransfer(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.aggregator.TaskNode.prototype.hasEthTransfer = function() { + return jspb.Message.getField(this, 10) != null; +}; + + +/** + * optional ContractWriteNode contract_write = 11; + * @return {?proto.aggregator.ContractWriteNode} + */ +proto.aggregator.TaskNode.prototype.getContractWrite = function() { + return /** @type{?proto.aggregator.ContractWriteNode} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.ContractWriteNode, 11)); +}; + + +/** + * @param {?proto.aggregator.ContractWriteNode|undefined} value + * @return {!proto.aggregator.TaskNode} returns this +*/ +proto.aggregator.TaskNode.prototype.setContractWrite = function(value) { + return jspb.Message.setOneofWrapperField(this, 11, proto.aggregator.TaskNode.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.aggregator.TaskNode} returns this + */ +proto.aggregator.TaskNode.prototype.clearContractWrite = function() { + return this.setContractWrite(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.aggregator.TaskNode.prototype.hasContractWrite = function() { + return jspb.Message.getField(this, 11) != null; +}; + + +/** + * optional ContractReadNode contract_read = 12; + * @return {?proto.aggregator.ContractReadNode} + */ +proto.aggregator.TaskNode.prototype.getContractRead = function() { + return /** @type{?proto.aggregator.ContractReadNode} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.ContractReadNode, 12)); +}; + + +/** + * @param {?proto.aggregator.ContractReadNode|undefined} value + * @return {!proto.aggregator.TaskNode} returns this +*/ +proto.aggregator.TaskNode.prototype.setContractRead = function(value) { + return jspb.Message.setOneofWrapperField(this, 12, proto.aggregator.TaskNode.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.aggregator.TaskNode} returns this + */ +proto.aggregator.TaskNode.prototype.clearContractRead = function() { + return this.setContractRead(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.aggregator.TaskNode.prototype.hasContractRead = function() { + return jspb.Message.getField(this, 12) != null; +}; + + +/** + * optional GraphQLQueryNode graphql_data_query = 13; + * @return {?proto.aggregator.GraphQLQueryNode} + */ +proto.aggregator.TaskNode.prototype.getGraphqlDataQuery = function() { + return /** @type{?proto.aggregator.GraphQLQueryNode} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.GraphQLQueryNode, 13)); +}; + + +/** + * @param {?proto.aggregator.GraphQLQueryNode|undefined} value + * @return {!proto.aggregator.TaskNode} returns this +*/ +proto.aggregator.TaskNode.prototype.setGraphqlDataQuery = function(value) { + return jspb.Message.setOneofWrapperField(this, 13, proto.aggregator.TaskNode.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.aggregator.TaskNode} returns this + */ +proto.aggregator.TaskNode.prototype.clearGraphqlDataQuery = function() { + return this.setGraphqlDataQuery(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.aggregator.TaskNode.prototype.hasGraphqlDataQuery = function() { + return jspb.Message.getField(this, 13) != null; +}; + + +/** + * optional RestAPINode rest_api = 14; + * @return {?proto.aggregator.RestAPINode} + */ +proto.aggregator.TaskNode.prototype.getRestApi = function() { + return /** @type{?proto.aggregator.RestAPINode} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.RestAPINode, 14)); +}; + + +/** + * @param {?proto.aggregator.RestAPINode|undefined} value + * @return {!proto.aggregator.TaskNode} returns this +*/ +proto.aggregator.TaskNode.prototype.setRestApi = function(value) { + return jspb.Message.setOneofWrapperField(this, 14, proto.aggregator.TaskNode.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.aggregator.TaskNode} returns this + */ +proto.aggregator.TaskNode.prototype.clearRestApi = function() { + return this.setRestApi(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.aggregator.TaskNode.prototype.hasRestApi = function() { + return jspb.Message.getField(this, 14) != null; +}; + + +/** + * optional BranchNode branch = 15; + * @return {?proto.aggregator.BranchNode} + */ +proto.aggregator.TaskNode.prototype.getBranch = function() { + return /** @type{?proto.aggregator.BranchNode} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.BranchNode, 15)); +}; + + +/** + * @param {?proto.aggregator.BranchNode|undefined} value + * @return {!proto.aggregator.TaskNode} returns this +*/ +proto.aggregator.TaskNode.prototype.setBranch = function(value) { + return jspb.Message.setOneofWrapperField(this, 15, proto.aggregator.TaskNode.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.aggregator.TaskNode} returns this + */ +proto.aggregator.TaskNode.prototype.clearBranch = function() { + return this.setBranch(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.aggregator.TaskNode.prototype.hasBranch = function() { + return jspb.Message.getField(this, 15) != null; +}; + + +/** + * optional FilterNode filter = 16; + * @return {?proto.aggregator.FilterNode} + */ +proto.aggregator.TaskNode.prototype.getFilter = function() { + return /** @type{?proto.aggregator.FilterNode} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.FilterNode, 16)); +}; + + +/** + * @param {?proto.aggregator.FilterNode|undefined} value + * @return {!proto.aggregator.TaskNode} returns this +*/ +proto.aggregator.TaskNode.prototype.setFilter = function(value) { + return jspb.Message.setOneofWrapperField(this, 16, proto.aggregator.TaskNode.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.aggregator.TaskNode} returns this + */ +proto.aggregator.TaskNode.prototype.clearFilter = function() { + return this.setFilter(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.aggregator.TaskNode.prototype.hasFilter = function() { + return jspb.Message.getField(this, 16) != null; +}; + + +/** + * optional LoopNode loop = 17; + * @return {?proto.aggregator.LoopNode} + */ +proto.aggregator.TaskNode.prototype.getLoop = function() { + return /** @type{?proto.aggregator.LoopNode} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.LoopNode, 17)); +}; + + +/** + * @param {?proto.aggregator.LoopNode|undefined} value + * @return {!proto.aggregator.TaskNode} returns this +*/ +proto.aggregator.TaskNode.prototype.setLoop = function(value) { + return jspb.Message.setOneofWrapperField(this, 17, proto.aggregator.TaskNode.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.aggregator.TaskNode} returns this + */ +proto.aggregator.TaskNode.prototype.clearLoop = function() { + return this.setLoop(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.aggregator.TaskNode.prototype.hasLoop = function() { + return jspb.Message.getField(this, 17) != null; +}; + + +/** + * optional CustomCodeNode custom_code = 18; + * @return {?proto.aggregator.CustomCodeNode} + */ +proto.aggregator.TaskNode.prototype.getCustomCode = function() { + return /** @type{?proto.aggregator.CustomCodeNode} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.CustomCodeNode, 18)); +}; + + +/** + * @param {?proto.aggregator.CustomCodeNode|undefined} value + * @return {!proto.aggregator.TaskNode} returns this +*/ +proto.aggregator.TaskNode.prototype.setCustomCode = function(value) { + return jspb.Message.setOneofWrapperField(this, 18, proto.aggregator.TaskNode.oneofGroups_[0], value); +}; + + +/** + * 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, 18) != null; +}; + + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} + */ +proto.aggregator.Execution.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.Execution.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.Execution} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.Execution.toObject = function(includeInstance, msg) { + var f, obj = { + epoch: jspb.Message.getFieldWithDefault(msg, 1, 0), + userOpHash: jspb.Message.getFieldWithDefault(msg, 2, ""), + error: jspb.Message.getFieldWithDefault(msg, 3, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; +} + + +/** + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.aggregator.Execution} + */ +proto.aggregator.Execution.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.Execution; + return proto.aggregator.Execution.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.aggregator.Execution} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.aggregator.Execution} + */ +proto.aggregator.Execution.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setEpoch(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setUserOpHash(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setError(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.aggregator.Execution.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.Execution.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.Execution} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.Execution.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getEpoch(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); + } + f = message.getUserOpHash(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getError(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional int64 epoch = 1; + * @return {number} + */ +proto.aggregator.Execution.prototype.getEpoch = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.aggregator.Execution} returns this + */ +proto.aggregator.Execution.prototype.setEpoch = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); +}; + + +/** + * optional string user_op_hash = 2; + * @return {string} + */ +proto.aggregator.Execution.prototype.getUserOpHash = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.aggregator.Execution} returns this + */ +proto.aggregator.Execution.prototype.setUserOpHash = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string error = 3; + * @return {string} + */ +proto.aggregator.Execution.prototype.getError = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.aggregator.Execution} returns this + */ +proto.aggregator.Execution.prototype.setError = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.aggregator.Task.repeatedFields_ = [11,12,13]; + + + +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.Task.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.Task.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.Task} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.Task.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + owner: jspb.Message.getFieldWithDefault(msg, 2, ""), + smartWalletAddress: jspb.Message.getFieldWithDefault(msg, 3, ""), + startAt: jspb.Message.getFieldWithDefault(msg, 4, 0), + expiredAt: jspb.Message.getFieldWithDefault(msg, 5, 0), + memo: jspb.Message.getFieldWithDefault(msg, 6, ""), + completedAt: jspb.Message.getFieldWithDefault(msg, 7, 0), + maxExecution: jspb.Message.getFieldWithDefault(msg, 8, 0), + 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.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) + }; + + 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.Task} + */ +proto.aggregator.Task.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.Task; + return proto.aggregator.Task.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.aggregator.Task} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.aggregator.Task} + */ +proto.aggregator.Task.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setOwner(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setSmartWalletAddress(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setStartAt(value); + break; + case 5: + var value = /** @type {number} */ (reader.readInt64()); + msg.setExpiredAt(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setMemo(value); + break; + case 7: + var value = /** @type {number} */ (reader.readInt64()); + msg.setCompletedAt(value); + break; + case 8: + var value = /** @type {number} */ (reader.readInt64()); + msg.setMaxExecution(value); + break; + case 9: + var value = /** @type {!proto.aggregator.TaskStatus} */ (reader.readEnum()); + msg.setStatus(value); + break; + case 10: + var value = new proto.aggregator.TaskTrigger; + reader.readMessage(value,proto.aggregator.TaskTrigger.deserializeBinaryFromReader); + msg.setTrigger(value); + break; + case 11: + 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); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + + +/** + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} + */ +proto.aggregator.Task.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.Task.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.Task} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.Task.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getOwner(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getSmartWalletAddress(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getStartAt(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } + f = message.getExpiredAt(); + if (f !== 0) { + writer.writeInt64( + 5, + f + ); + } + f = message.getMemo(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getCompletedAt(); + if (f !== 0) { + writer.writeInt64( + 7, + f + ); + } + f = message.getMaxExecution(); + if (f !== 0) { + writer.writeInt64( + 8, + f + ); + } + f = message.getStatus(); + if (f !== 0.0) { + writer.writeEnum( + 9, + f + ); + } + f = message.getTrigger(); + if (f != null) { + writer.writeMessage( + 10, + f, + proto.aggregator.TaskTrigger.serializeBinaryToWriter + ); + } + f = message.getNodesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 11, + f, + proto.aggregator.TaskNode.serializeBinaryToWriter + ); + } + 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 + ); + } }; /** - * Clears the message field making it undefined. - * @return {!proto.aggregator.TaskAction} returns this + * optional string id = 1; + * @return {string} */ -proto.aggregator.TaskAction.prototype.clearEthTransfer = function() { - return this.setEthTransfer(undefined); +proto.aggregator.Task.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.Task} returns this */ -proto.aggregator.TaskAction.prototype.hasEthTransfer = function() { - return jspb.Message.getField(this, 10) != null; +proto.aggregator.Task.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional ContractExecution contract_execution = 11; - * @return {?proto.aggregator.ContractExecution} + * optional string owner = 2; + * @return {string} */ -proto.aggregator.TaskAction.prototype.getContractExecution = function() { - return /** @type{?proto.aggregator.ContractExecution} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.ContractExecution, 11)); +proto.aggregator.Task.prototype.getOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * @param {?proto.aggregator.ContractExecution|undefined} value - * @return {!proto.aggregator.TaskAction} returns this -*/ -proto.aggregator.TaskAction.prototype.setContractExecution = function(value) { - return jspb.Message.setWrapperField(this, 11, value); + * @param {string} value + * @return {!proto.aggregator.Task} returns this + */ +proto.aggregator.Task.prototype.setOwner = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.aggregator.TaskAction} returns this + * optional string smart_wallet_address = 3; + * @return {string} */ -proto.aggregator.TaskAction.prototype.clearContractExecution = function() { - return this.setContractExecution(undefined); +proto.aggregator.Task.prototype.getSmartWalletAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {string} value + * @return {!proto.aggregator.Task} returns this */ -proto.aggregator.TaskAction.prototype.hasContractExecution = function() { - return jspb.Message.getField(this, 11) != null; +proto.aggregator.Task.prototype.setSmartWalletAddress = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); }; /** - * optional GraphQLDataQuery graphql_data_query = 12; - * @return {?proto.aggregator.GraphQLDataQuery} + * optional int64 start_at = 4; + * @return {number} */ -proto.aggregator.TaskAction.prototype.getGraphqlDataQuery = function() { - return /** @type{?proto.aggregator.GraphQLDataQuery} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.GraphQLDataQuery, 12)); +proto.aggregator.Task.prototype.getStartAt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** - * @param {?proto.aggregator.GraphQLDataQuery|undefined} value - * @return {!proto.aggregator.TaskAction} returns this -*/ -proto.aggregator.TaskAction.prototype.setGraphqlDataQuery = function(value) { - return jspb.Message.setWrapperField(this, 12, value); + * @param {number} value + * @return {!proto.aggregator.Task} returns this + */ +proto.aggregator.Task.prototype.setStartAt = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.aggregator.TaskAction} returns this + * optional int64 expired_at = 5; + * @return {number} */ -proto.aggregator.TaskAction.prototype.clearGraphqlDataQuery = function() { - return this.setGraphqlDataQuery(undefined); +proto.aggregator.Task.prototype.getExpiredAt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {number} value + * @return {!proto.aggregator.Task} returns this */ -proto.aggregator.TaskAction.prototype.hasGraphqlDataQuery = function() { - return jspb.Message.getField(this, 12) != null; +proto.aggregator.Task.prototype.setExpiredAt = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); }; /** - * optional HTTPAPICall http_data_query = 13; - * @return {?proto.aggregator.HTTPAPICall} + * optional string memo = 6; + * @return {string} */ -proto.aggregator.TaskAction.prototype.getHttpDataQuery = function() { - return /** @type{?proto.aggregator.HTTPAPICall} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.HTTPAPICall, 13)); +proto.aggregator.Task.prototype.getMemo = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); }; /** - * @param {?proto.aggregator.HTTPAPICall|undefined} value - * @return {!proto.aggregator.TaskAction} returns this -*/ -proto.aggregator.TaskAction.prototype.setHttpDataQuery = function(value) { - return jspb.Message.setWrapperField(this, 13, value); + * @param {string} value + * @return {!proto.aggregator.Task} returns this + */ +proto.aggregator.Task.prototype.setMemo = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.aggregator.TaskAction} returns this + * optional int64 completed_at = 7; + * @return {number} */ -proto.aggregator.TaskAction.prototype.clearHttpDataQuery = function() { - return this.setHttpDataQuery(undefined); +proto.aggregator.Task.prototype.getCompletedAt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {number} value + * @return {!proto.aggregator.Task} returns this */ -proto.aggregator.TaskAction.prototype.hasHttpDataQuery = function() { - return jspb.Message.getField(this, 13) != null; +proto.aggregator.Task.prototype.setCompletedAt = function(value) { + return jspb.Message.setProto3IntField(this, 7, value); }; /** - * optional CustomCode custom_code = 14; - * @return {?proto.aggregator.CustomCode} + * optional int64 max_execution = 8; + * @return {number} */ -proto.aggregator.TaskAction.prototype.getCustomCode = function() { - return /** @type{?proto.aggregator.CustomCode} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.CustomCode, 14)); +proto.aggregator.Task.prototype.getMaxExecution = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); }; /** - * @param {?proto.aggregator.CustomCode|undefined} value - * @return {!proto.aggregator.TaskAction} returns this -*/ -proto.aggregator.TaskAction.prototype.setCustomCode = function(value) { - return jspb.Message.setWrapperField(this, 14, value); + * @param {number} value + * @return {!proto.aggregator.Task} returns this + */ +proto.aggregator.Task.prototype.setMaxExecution = function(value) { + return jspb.Message.setProto3IntField(this, 8, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.aggregator.TaskAction} returns this + * optional TaskStatus status = 9; + * @return {!proto.aggregator.TaskStatus} */ -proto.aggregator.TaskAction.prototype.clearCustomCode = function() { - return this.setCustomCode(undefined); +proto.aggregator.Task.prototype.getStatus = function() { + return /** @type {!proto.aggregator.TaskStatus} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {!proto.aggregator.TaskStatus} value + * @return {!proto.aggregator.Task} returns this */ -proto.aggregator.TaskAction.prototype.hasCustomCode = function() { - return jspb.Message.getField(this, 14) != null; +proto.aggregator.Task.prototype.setStatus = function(value) { + return jspb.Message.setProto3EnumField(this, 9, value); }; /** - * optional BranchAction branch = 15; - * @return {?proto.aggregator.BranchAction} + * optional TaskTrigger trigger = 10; + * @return {?proto.aggregator.TaskTrigger} */ -proto.aggregator.TaskAction.prototype.getBranch = function() { - return /** @type{?proto.aggregator.BranchAction} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.BranchAction, 15)); +proto.aggregator.Task.prototype.getTrigger = function() { + return /** @type{?proto.aggregator.TaskTrigger} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.TaskTrigger, 10)); }; /** - * @param {?proto.aggregator.BranchAction|undefined} value - * @return {!proto.aggregator.TaskAction} returns this + * @param {?proto.aggregator.TaskTrigger|undefined} value + * @return {!proto.aggregator.Task} returns this */ -proto.aggregator.TaskAction.prototype.setBranch = function(value) { - return jspb.Message.setWrapperField(this, 15, value); +proto.aggregator.Task.prototype.setTrigger = function(value) { + return jspb.Message.setWrapperField(this, 10, value); }; /** * Clears the message field making it undefined. - * @return {!proto.aggregator.TaskAction} returns this + * @return {!proto.aggregator.Task} returns this */ -proto.aggregator.TaskAction.prototype.clearBranch = function() { - return this.setBranch(undefined); +proto.aggregator.Task.prototype.clearTrigger = function() { + return this.setTrigger(undefined); }; @@ -4632,198 +6375,122 @@ 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.Task.prototype.hasTrigger = function() { + return jspb.Message.getField(this, 10) != null; }; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} + * repeated TaskNode nodes = 11; + * @return {!Array} */ -proto.aggregator.Execution.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.Execution.toObject(opt_includeInstance, this); +proto.aggregator.Task.prototype.getNodesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.TaskNode, 11)); }; /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.aggregator.Execution} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.aggregator.Execution.toObject = function(includeInstance, msg) { - var f, obj = { - epoch: jspb.Message.getFieldWithDefault(msg, 1, 0), - userOpHash: jspb.Message.getFieldWithDefault(msg, 2, ""), - error: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + * @param {!Array} value + * @return {!proto.aggregator.Task} returns this +*/ +proto.aggregator.Task.prototype.setNodesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 11, value); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.Execution} + * @param {!proto.aggregator.TaskNode=} opt_value + * @param {number=} opt_index + * @return {!proto.aggregator.TaskNode} */ -proto.aggregator.Execution.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.Execution; - return proto.aggregator.Execution.deserializeBinaryFromReader(msg, reader); +proto.aggregator.Task.prototype.addNodes = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 11, opt_value, proto.aggregator.TaskNode, opt_index); }; /** - * Deserializes binary data (in protobuf wire format) from the - * given reader into the given message object. - * @param {!proto.aggregator.Execution} msg The message object to deserialize into. - * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.Execution} + * Clears the list making it empty but non-null. + * @return {!proto.aggregator.Task} returns this */ -proto.aggregator.Execution.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = /** @type {number} */ (reader.readInt64()); - msg.setEpoch(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setUserOpHash(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setError(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.aggregator.Task.prototype.clearNodesList = function() { + return this.setNodesList([]); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * repeated TaskEdge edges = 12; + * @return {!Array} */ -proto.aggregator.Execution.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.Execution.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.aggregator.Task.prototype.getEdgesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.TaskEdge, 12)); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.Execution} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.aggregator.Execution.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getEpoch(); - if (f !== 0) { - writer.writeInt64( - 1, - f - ); - } - f = message.getUserOpHash(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getError(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } + * @param {!Array} value + * @return {!proto.aggregator.Task} returns this +*/ +proto.aggregator.Task.prototype.setEdgesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 12, value); }; /** - * optional int64 epoch = 1; - * @return {number} + * @param {!proto.aggregator.TaskEdge=} opt_value + * @param {number=} opt_index + * @return {!proto.aggregator.TaskEdge} */ -proto.aggregator.Execution.prototype.getEpoch = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +proto.aggregator.Task.prototype.addEdges = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 12, opt_value, proto.aggregator.TaskEdge, opt_index); }; /** - * @param {number} value - * @return {!proto.aggregator.Execution} returns this + * Clears the list making it empty but non-null. + * @return {!proto.aggregator.Task} returns this */ -proto.aggregator.Execution.prototype.setEpoch = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); +proto.aggregator.Task.prototype.clearEdgesList = function() { + return this.setEdgesList([]); }; /** - * optional string user_op_hash = 2; - * @return {string} + * repeated Execution executions = 13; + * @return {!Array} */ -proto.aggregator.Execution.prototype.getUserOpHash = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.aggregator.Task.prototype.getExecutionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.Execution, 13)); }; /** - * @param {string} value - * @return {!proto.aggregator.Execution} returns this - */ -proto.aggregator.Execution.prototype.setUserOpHash = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); + * @param {!Array} value + * @return {!proto.aggregator.Task} returns this +*/ +proto.aggregator.Task.prototype.setExecutionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 13, value); }; /** - * optional string error = 3; - * @return {string} + * @param {!proto.aggregator.Execution=} opt_value + * @param {number=} opt_index + * @return {!proto.aggregator.Execution} */ -proto.aggregator.Execution.prototype.getError = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.aggregator.Task.prototype.addExecutions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 13, opt_value, proto.aggregator.Execution, opt_index); }; /** - * @param {string} value - * @return {!proto.aggregator.Execution} returns this + * Clears the list making it empty but non-null. + * @return {!proto.aggregator.Task} returns this */ -proto.aggregator.Execution.prototype.setError = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); +proto.aggregator.Task.prototype.clearExecutionsList = function() { + return this.setExecutionsList([]); }; @@ -4833,7 +6500,7 @@ proto.aggregator.Execution.prototype.setError = function(value) { * @private {!Array} * @const */ -proto.aggregator.Task.repeatedFields_ = [5,12]; +proto.aggregator.CreateTaskReq.repeatedFields_ = [7,8]; @@ -4850,8 +6517,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.aggregator.Task.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.Task.toObject(opt_includeInstance, this); +proto.aggregator.CreateTaskReq.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.CreateTaskReq.toObject(opt_includeInstance, this); }; @@ -4860,26 +6527,22 @@ proto.aggregator.Task.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.Task} msg The msg instance to transform. + * @param {!proto.aggregator.CreateTaskReq} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.Task.toObject = function(includeInstance, msg) { +proto.aggregator.CreateTaskReq.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, ""), trigger: (f = msg.getTrigger()) && proto.aggregator.TaskTrigger.toObject(includeInstance, f), + startAt: jspb.Message.getFieldWithDefault(msg, 2, 0), + expiredAt: jspb.Message.getFieldWithDefault(msg, 3, 0), + maxExecution: jspb.Message.getFieldWithDefault(msg, 4, 0), + smartWalletAddress: jspb.Message.getFieldWithDefault(msg, 5, ""), + memo: jspb.Message.getFieldWithDefault(msg, 6, ""), 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), - executionsList: jspb.Message.toObjectList(msg.getExecutionsList(), - proto.aggregator.Execution.toObject, includeInstance) + proto.aggregator.TaskNode.toObject, includeInstance), + edgesList: jspb.Message.toObjectList(msg.getEdgesList(), + proto.aggregator.TaskEdge.toObject, includeInstance) }; if (includeInstance) { @@ -4893,23 +6556,23 @@ proto.aggregator.Task.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.Task} + * @return {!proto.aggregator.CreateTaskReq} */ -proto.aggregator.Task.deserializeBinary = function(bytes) { +proto.aggregator.CreateTaskReq.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.Task; - return proto.aggregator.Task.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.CreateTaskReq; + return proto.aggregator.CreateTaskReq.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.aggregator.Task} msg The message object to deserialize into. + * @param {!proto.aggregator.CreateTaskReq} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.Task} + * @return {!proto.aggregator.CreateTaskReq} */ -proto.aggregator.Task.deserializeBinaryFromReader = function(msg, reader) { +proto.aggregator.CreateTaskReq.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -4917,56 +6580,39 @@ proto.aggregator.Task.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.aggregator.UUID; - reader.readMessage(value,proto.aggregator.UUID.deserializeBinaryFromReader); - msg.setId(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setOwner(value); - 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); break; - case 5: - var value = new proto.aggregator.TaskAction; - reader.readMessage(value,proto.aggregator.TaskAction.deserializeBinaryFromReader); - msg.addNodes(value); - break; - case 6: + case 2: var value = /** @type {number} */ (reader.readInt64()); msg.setStartAt(value); break; - case 7: + case 3: var value = /** @type {number} */ (reader.readInt64()); msg.setExpiredAt(value); break; - case 8: - var value = /** @type {string} */ (reader.readString()); - msg.setMemo(value); - break; - case 9: + case 4: var value = /** @type {number} */ (reader.readInt64()); - msg.setCompletedAt(value); + msg.setMaxExecution(value); break; - case 10: - var value = /** @type {!proto.aggregator.TaskStatus} */ (reader.readEnum()); - msg.setStatus(value); + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setSmartWalletAddress(value); break; - case 11: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setRepeatable(value); + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setMemo(value); break; - case 12: - var value = new proto.aggregator.Execution; - reader.readMessage(value,proto.aggregator.Execution.deserializeBinaryFromReader); - msg.addExecutions(value); + 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(); @@ -4981,9 +6627,9 @@ proto.aggregator.Task.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.Task.prototype.serializeBinary = function() { +proto.aggregator.CreateTaskReq.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.Task.serializeBinaryToWriter(this, writer); + proto.aggregator.CreateTaskReq.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -4991,200 +6637,98 @@ proto.aggregator.Task.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.Task} message + * @param {!proto.aggregator.CreateTaskReq} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.Task.serializeBinaryToWriter = function(message, writer) { +proto.aggregator.CreateTaskReq.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getId(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.aggregator.UUID.serializeBinaryToWriter - ); - } - f = message.getOwner(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getSmartAccountAddress(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } f = message.getTrigger(); if (f != null) { writer.writeMessage( - 4, + 1, 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, + 2, f ); } f = message.getExpiredAt(); if (f !== 0) { writer.writeInt64( - 7, - f - ); - } - f = message.getMemo(); - if (f.length > 0) { - writer.writeString( - 8, + 3, f ); } - f = message.getCompletedAt(); + f = message.getMaxExecution(); if (f !== 0) { writer.writeInt64( - 9, + 4, f ); } - f = message.getStatus(); - if (f !== 0.0) { - writer.writeEnum( - 10, + f = message.getSmartWalletAddress(); + if (f.length > 0) { + writer.writeString( + 5, f ); } - f = message.getRepeatable(); - if (f) { - writer.writeBool( - 11, + f = message.getMemo(); + if (f.length > 0) { + writer.writeString( + 6, f ); } - f = message.getExecutionsList(); + f = message.getNodesList(); if (f.length > 0) { writer.writeRepeatedMessage( - 12, + 7, f, - proto.aggregator.Execution.serializeBinaryToWriter + proto.aggregator.TaskNode.serializeBinaryToWriter + ); + } + f = message.getEdgesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 8, + f, + proto.aggregator.TaskEdge.serializeBinaryToWriter ); } }; /** - * optional UUID id = 1; - * @return {?proto.aggregator.UUID} - */ -proto.aggregator.Task.prototype.getId = function() { - return /** @type{?proto.aggregator.UUID} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.UUID, 1)); -}; - - -/** - * @param {?proto.aggregator.UUID|undefined} value - * @return {!proto.aggregator.Task} returns this -*/ -proto.aggregator.Task.prototype.setId = function(value) { - return jspb.Message.setWrapperField(this, 1, value); -}; - - -/** - * 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_account_address = 3; - * @return {string} - */ -proto.aggregator.Task.prototype.getSmartAccountAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; - - -/** - * @param {string} value - * @return {!proto.aggregator.Task} returns this - */ -proto.aggregator.Task.prototype.setSmartAccountAddress = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - - -/** - * optional TaskTrigger trigger = 4; + * optional TaskTrigger trigger = 1; * @return {?proto.aggregator.TaskTrigger} */ -proto.aggregator.Task.prototype.getTrigger = function() { +proto.aggregator.CreateTaskReq.prototype.getTrigger = function() { return /** @type{?proto.aggregator.TaskTrigger} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.TaskTrigger, 4)); + jspb.Message.getWrapperField(this, proto.aggregator.TaskTrigger, 1)); }; /** * @param {?proto.aggregator.TaskTrigger|undefined} value - * @return {!proto.aggregator.Task} returns this + * @return {!proto.aggregator.CreateTaskReq} returns this */ -proto.aggregator.Task.prototype.setTrigger = function(value) { - return jspb.Message.setWrapperField(this, 4, value); +proto.aggregator.CreateTaskReq.prototype.setTrigger = function(value) { + return jspb.Message.setWrapperField(this, 1, value); }; /** * Clears the message field making it undefined. - * @return {!proto.aggregator.Task} returns this + * @return {!proto.aggregator.CreateTaskReq} returns this */ -proto.aggregator.Task.prototype.clearTrigger = function() { +proto.aggregator.CreateTaskReq.prototype.clearTrigger = function() { return this.setTrigger(undefined); }; @@ -5193,203 +6737,178 @@ proto.aggregator.Task.prototype.clearTrigger = function() { * Returns whether this field is set. * @return {boolean} */ -proto.aggregator.Task.prototype.hasTrigger = function() { - return jspb.Message.getField(this, 4) != null; -}; - - -/** - * repeated TaskAction nodes = 5; - * @return {!Array} - */ -proto.aggregator.Task.prototype.getNodesList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.aggregator.TaskAction, 5)); -}; - - -/** - * @param {!Array} value - * @return {!proto.aggregator.Task} returns this -*/ -proto.aggregator.Task.prototype.setNodesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 5, value); +proto.aggregator.CreateTaskReq.prototype.hasTrigger = function() { + return jspb.Message.getField(this, 1) != null; }; /** - * @param {!proto.aggregator.TaskAction=} opt_value - * @param {number=} opt_index - * @return {!proto.aggregator.TaskAction} + * optional int64 start_at = 2; + * @return {number} */ -proto.aggregator.Task.prototype.addNodes = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 5, opt_value, proto.aggregator.TaskAction, opt_index); +proto.aggregator.CreateTaskReq.prototype.getStartAt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.aggregator.Task} returns this + * @param {number} value + * @return {!proto.aggregator.CreateTaskReq} returns this */ -proto.aggregator.Task.prototype.clearNodesList = function() { - return this.setNodesList([]); +proto.aggregator.CreateTaskReq.prototype.setStartAt = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; /** - * optional int64 start_at = 6; + * optional int64 expired_at = 3; * @return {number} */ -proto.aggregator.Task.prototype.getStartAt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +proto.aggregator.CreateTaskReq.prototype.getExpiredAt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); }; /** * @param {number} value - * @return {!proto.aggregator.Task} returns this + * @return {!proto.aggregator.CreateTaskReq} returns this */ -proto.aggregator.Task.prototype.setStartAt = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); +proto.aggregator.CreateTaskReq.prototype.setExpiredAt = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); }; /** - * optional int64 expired_at = 7; + * optional int64 max_execution = 4; * @return {number} */ -proto.aggregator.Task.prototype.getExpiredAt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +proto.aggregator.CreateTaskReq.prototype.getMaxExecution = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; /** * @param {number} value - * @return {!proto.aggregator.Task} returns this + * @return {!proto.aggregator.CreateTaskReq} returns this */ -proto.aggregator.Task.prototype.setExpiredAt = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); +proto.aggregator.CreateTaskReq.prototype.setMaxExecution = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); }; /** - * optional string memo = 8; + * optional string smart_wallet_address = 5; * @return {string} */ -proto.aggregator.Task.prototype.getMemo = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +proto.aggregator.CreateTaskReq.prototype.getSmartWalletAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); }; /** * @param {string} value - * @return {!proto.aggregator.Task} returns this + * @return {!proto.aggregator.CreateTaskReq} returns this */ -proto.aggregator.Task.prototype.setMemo = function(value) { - return jspb.Message.setProto3StringField(this, 8, value); +proto.aggregator.CreateTaskReq.prototype.setSmartWalletAddress = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); }; /** - * optional int64 completed_at = 9; - * @return {number} + * optional string memo = 6; + * @return {string} */ -proto.aggregator.Task.prototype.getCompletedAt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +proto.aggregator.CreateTaskReq.prototype.getMemo = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); }; /** - * @param {number} value - * @return {!proto.aggregator.Task} returns this + * @param {string} value + * @return {!proto.aggregator.CreateTaskReq} returns this */ -proto.aggregator.Task.prototype.setCompletedAt = function(value) { - return jspb.Message.setProto3IntField(this, 9, value); +proto.aggregator.CreateTaskReq.prototype.setMemo = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); }; /** - * optional TaskStatus status = 10; - * @return {!proto.aggregator.TaskStatus} + * repeated TaskNode nodes = 7; + * @return {!Array} */ -proto.aggregator.Task.prototype.getStatus = function() { - return /** @type {!proto.aggregator.TaskStatus} */ (jspb.Message.getFieldWithDefault(this, 10, 0)); +proto.aggregator.CreateTaskReq.prototype.getNodesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.TaskNode, 7)); }; /** - * @param {!proto.aggregator.TaskStatus} value - * @return {!proto.aggregator.Task} returns this - */ -proto.aggregator.Task.prototype.setStatus = function(value) { - return jspb.Message.setProto3EnumField(this, 10, value); + * @param {!Array} value + * @return {!proto.aggregator.CreateTaskReq} returns this +*/ +proto.aggregator.CreateTaskReq.prototype.setNodesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 7, value); }; /** - * optional bool repeatable = 11; - * @return {boolean} + * @param {!proto.aggregator.TaskNode=} opt_value + * @param {number=} opt_index + * @return {!proto.aggregator.TaskNode} */ -proto.aggregator.Task.prototype.getRepeatable = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 11, false)); +proto.aggregator.CreateTaskReq.prototype.addNodes = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.aggregator.TaskNode, opt_index); }; /** - * @param {boolean} value - * @return {!proto.aggregator.Task} returns this + * Clears the list making it empty but non-null. + * @return {!proto.aggregator.CreateTaskReq} returns this */ -proto.aggregator.Task.prototype.setRepeatable = function(value) { - return jspb.Message.setProto3BooleanField(this, 11, value); +proto.aggregator.CreateTaskReq.prototype.clearNodesList = function() { + return this.setNodesList([]); }; /** - * repeated Execution executions = 12; - * @return {!Array} + * repeated TaskEdge edges = 8; + * @return {!Array} */ -proto.aggregator.Task.prototype.getExecutionsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.aggregator.Execution, 12)); +proto.aggregator.CreateTaskReq.prototype.getEdgesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.TaskEdge, 8)); }; /** - * @param {!Array} value - * @return {!proto.aggregator.Task} returns this + * @param {!Array} value + * @return {!proto.aggregator.CreateTaskReq} returns this */ -proto.aggregator.Task.prototype.setExecutionsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 12, value); +proto.aggregator.CreateTaskReq.prototype.setEdgesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 8, value); }; /** - * @param {!proto.aggregator.Execution=} opt_value + * @param {!proto.aggregator.TaskEdge=} opt_value * @param {number=} opt_index - * @return {!proto.aggregator.Execution} + * @return {!proto.aggregator.TaskEdge} */ -proto.aggregator.Task.prototype.addExecutions = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 12, opt_value, proto.aggregator.Execution, opt_index); +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.Task} returns this + * @return {!proto.aggregator.CreateTaskReq} returns this */ -proto.aggregator.Task.prototype.clearExecutionsList = function() { - return this.setExecutionsList([]); +proto.aggregator.CreateTaskReq.prototype.clearEdgesList = function() { + return this.setEdgesList([]); }; -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.aggregator.CreateTaskReq.repeatedFields_ = [2]; - if (jspb.Message.GENERATE_TO_OBJECT) { @@ -5405,8 +6924,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.aggregator.CreateTaskReq.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.CreateTaskReq.toObject(opt_includeInstance, this); +proto.aggregator.CreateTaskResp.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.CreateTaskResp.toObject(opt_includeInstance, this); }; @@ -5415,19 +6934,13 @@ proto.aggregator.CreateTaskReq.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.CreateTaskReq} msg The msg instance to transform. + * @param {!proto.aggregator.CreateTaskResp} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.CreateTaskReq.toObject = function(includeInstance, msg) { +proto.aggregator.CreateTaskResp.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) + id: jspb.Message.getFieldWithDefault(msg, 1, "") }; if (includeInstance) { @@ -5441,23 +6954,23 @@ proto.aggregator.CreateTaskReq.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.CreateTaskReq} + * @return {!proto.aggregator.CreateTaskResp} */ -proto.aggregator.CreateTaskReq.deserializeBinary = function(bytes) { +proto.aggregator.CreateTaskResp.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.CreateTaskReq; - return proto.aggregator.CreateTaskReq.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.CreateTaskResp; + return proto.aggregator.CreateTaskResp.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.aggregator.CreateTaskReq} msg The message object to deserialize into. + * @param {!proto.aggregator.CreateTaskResp} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.CreateTaskReq} + * @return {!proto.aggregator.CreateTaskResp} */ -proto.aggregator.CreateTaskReq.deserializeBinaryFromReader = function(msg, reader) { +proto.aggregator.CreateTaskResp.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -5465,30 +6978,8 @@ proto.aggregator.CreateTaskReq.deserializeBinaryFromReader = function(msg, reade var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.aggregator.TaskTrigger; - reader.readMessage(value,proto.aggregator.TaskTrigger.deserializeBinaryFromReader); - 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: - var value = /** @type {number} */ (reader.readInt64()); - msg.setExpiredAt(value); - break; - case 5: var value = /** @type {string} */ (reader.readString()); - msg.setMemo(value); - break; - case 6: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setRepeatable(value); + msg.setId(value); break; default: reader.skipField(); @@ -5503,9 +6994,9 @@ proto.aggregator.CreateTaskReq.deserializeBinaryFromReader = function(msg, reade * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.CreateTaskReq.prototype.serializeBinary = function() { +proto.aggregator.CreateTaskResp.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.CreateTaskReq.serializeBinaryToWriter(this, writer); + proto.aggregator.CreateTaskResp.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -5513,53 +7004,16 @@ proto.aggregator.CreateTaskReq.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.CreateTaskReq} message + * @param {!proto.aggregator.CreateTaskResp} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.CreateTaskReq.serializeBinaryToWriter = function(message, writer) { +proto.aggregator.CreateTaskResp.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getTrigger(); - if (f != null) { - writer.writeMessage( - 1, - f, - 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, - f - ); - } - f = message.getExpiredAt(); - if (f !== 0) { - writer.writeInt64( - 4, - f - ); - } - f = message.getMemo(); + f = message.getId(); if (f.length > 0) { writer.writeString( - 5, - f - ); - } - f = message.getRepeatable(); - if (f) { - writer.writeBool( - 6, + 1, f ); } @@ -5567,149 +7021,280 @@ proto.aggregator.CreateTaskReq.serializeBinaryToWriter = function(message, write /** - * optional TaskTrigger trigger = 1; - * @return {?proto.aggregator.TaskTrigger} + * optional string id = 1; + * @return {string} */ -proto.aggregator.CreateTaskReq.prototype.getTrigger = function() { - return /** @type{?proto.aggregator.TaskTrigger} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.TaskTrigger, 1)); +proto.aggregator.CreateTaskResp.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {?proto.aggregator.TaskTrigger|undefined} value - * @return {!proto.aggregator.CreateTaskReq} returns this -*/ -proto.aggregator.CreateTaskReq.prototype.setTrigger = function(value) { - return jspb.Message.setWrapperField(this, 1, value); + * @param {string} value + * @return {!proto.aggregator.CreateTaskResp} returns this + */ +proto.aggregator.CreateTaskResp.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Clears the message field making it undefined. - * @return {!proto.aggregator.CreateTaskReq} returns this + * Creates an object representation of this proto. + * Field names that are reserved in JavaScript and will be renamed to pb_name. + * Optional fields that are not set will be set to undefined. + * To access a reserved field use, foo.pb_, eg, foo.pb_default. + * For the list of reserved names please see: + * net/proto2/compiler/js/internal/generator.cc#kKeyword. + * @param {boolean=} opt_includeInstance Deprecated. whether to include the + * JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @return {!Object} */ -proto.aggregator.CreateTaskReq.prototype.clearTrigger = function() { - return this.setTrigger(undefined); +proto.aggregator.NonceRequest.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.NonceRequest.toObject(opt_includeInstance, this); }; /** - * Returns whether this field is set. - * @return {boolean} + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.aggregator.NonceRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.CreateTaskReq.prototype.hasTrigger = function() { - return jspb.Message.getField(this, 1) != null; +proto.aggregator.NonceRequest.toObject = function(includeInstance, msg) { + var f, obj = { + owner: 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.NonceRequest} + */ +proto.aggregator.NonceRequest.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.NonceRequest; + return proto.aggregator.NonceRequest.deserializeBinaryFromReader(msg, reader); +}; + + +/** + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.aggregator.NonceRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.aggregator.NonceRequest} + */ +proto.aggregator.NonceRequest.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.setOwner(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * repeated TaskAction actions = 2; - * @return {!Array} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.aggregator.CreateTaskReq.prototype.getActionsList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.aggregator.TaskAction, 2)); +proto.aggregator.NonceRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.NonceRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * @param {!Array} value - * @return {!proto.aggregator.CreateTaskReq} returns this -*/ -proto.aggregator.CreateTaskReq.prototype.setActionsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.aggregator.NonceRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.NonceRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOwner(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } }; /** - * @param {!proto.aggregator.TaskAction=} opt_value - * @param {number=} opt_index - * @return {!proto.aggregator.TaskAction} + * optional string owner = 1; + * @return {string} */ -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.NonceRequest.prototype.getOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * Clears the list making it empty but non-null. - * @return {!proto.aggregator.CreateTaskReq} returns this + * @param {string} value + * @return {!proto.aggregator.NonceRequest} returns this */ -proto.aggregator.CreateTaskReq.prototype.clearActionsList = function() { - return this.setActionsList([]); +proto.aggregator.NonceRequest.prototype.setOwner = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * optional int64 start_at = 3; - * @return {number} + * 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.CreateTaskReq.prototype.getStartAt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +proto.aggregator.NonceResp.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.NonceResp.toObject(opt_includeInstance, this); }; /** - * @param {number} value - * @return {!proto.aggregator.CreateTaskReq} returns 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.NonceResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.CreateTaskReq.prototype.setStartAt = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); +proto.aggregator.NonceResp.toObject = function(includeInstance, msg) { + var f, obj = { + nonce: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} /** - * optional int64 expired_at = 4; - * @return {number} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.aggregator.NonceResp} */ -proto.aggregator.CreateTaskReq.prototype.getExpiredAt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +proto.aggregator.NonceResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.NonceResp; + return proto.aggregator.NonceResp.deserializeBinaryFromReader(msg, reader); }; /** - * @param {number} value - * @return {!proto.aggregator.CreateTaskReq} returns this + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.aggregator.NonceResp} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.aggregator.NonceResp} */ -proto.aggregator.CreateTaskReq.prototype.setExpiredAt = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); +proto.aggregator.NonceResp.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.setNonce(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; /** - * optional string memo = 5; - * @return {string} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.aggregator.CreateTaskReq.prototype.getMemo = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +proto.aggregator.NonceResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.NonceResp.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; /** - * @param {string} value - * @return {!proto.aggregator.CreateTaskReq} returns this + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.aggregator.NonceResp} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.CreateTaskReq.prototype.setMemo = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); +proto.aggregator.NonceResp.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getNonce(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } }; /** - * optional bool repeatable = 6; - * @return {boolean} + * optional string nonce = 1; + * @return {string} */ -proto.aggregator.CreateTaskReq.prototype.getRepeatable = function() { - return /** @type {boolean} */ (jspb.Message.getBooleanFieldWithDefault(this, 6, false)); +proto.aggregator.NonceResp.prototype.getNonce = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {boolean} value - * @return {!proto.aggregator.CreateTaskReq} returns this + * @param {string} value + * @return {!proto.aggregator.NonceResp} returns this */ -proto.aggregator.CreateTaskReq.prototype.setRepeatable = function(value) { - return jspb.Message.setProto3BooleanField(this, 6, value); +proto.aggregator.NonceResp.prototype.setNonce = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; @@ -5729,8 +7314,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.aggregator.CreateTaskResp.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.CreateTaskResp.toObject(opt_includeInstance, this); +proto.aggregator.ListWalletReq.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ListWalletReq.toObject(opt_includeInstance, this); }; @@ -5739,13 +7324,14 @@ proto.aggregator.CreateTaskResp.prototype.toObject = function(opt_includeInstanc * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.aggregator.CreateTaskResp} msg The msg instance to transform. + * @param {!proto.aggregator.ListWalletReq} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.CreateTaskResp.toObject = function(includeInstance, msg) { +proto.aggregator.ListWalletReq.toObject = function(includeInstance, msg) { var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, "") + factory: jspb.Message.getFieldWithDefault(msg, 1, ""), + salt: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { @@ -5759,23 +7345,23 @@ proto.aggregator.CreateTaskResp.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.CreateTaskResp} + * @return {!proto.aggregator.ListWalletReq} */ -proto.aggregator.CreateTaskResp.deserializeBinary = function(bytes) { +proto.aggregator.ListWalletReq.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.CreateTaskResp; - return proto.aggregator.CreateTaskResp.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.ListWalletReq; + return proto.aggregator.ListWalletReq.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.aggregator.CreateTaskResp} msg The message object to deserialize into. + * @param {!proto.aggregator.ListWalletReq} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.CreateTaskResp} + * @return {!proto.aggregator.ListWalletReq} */ -proto.aggregator.CreateTaskResp.deserializeBinaryFromReader = function(msg, reader) { +proto.aggregator.ListWalletReq.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -5784,7 +7370,11 @@ proto.aggregator.CreateTaskResp.deserializeBinaryFromReader = function(msg, read switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setId(value); + msg.setFactory(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSalt(value); break; default: reader.skipField(); @@ -5799,9 +7389,9 @@ proto.aggregator.CreateTaskResp.deserializeBinaryFromReader = function(msg, read * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.CreateTaskResp.prototype.serializeBinary = function() { +proto.aggregator.ListWalletReq.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.CreateTaskResp.serializeBinaryToWriter(this, writer); + proto.aggregator.ListWalletReq.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -5809,40 +7399,65 @@ proto.aggregator.CreateTaskResp.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.CreateTaskResp} message + * @param {!proto.aggregator.ListWalletReq} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.CreateTaskResp.serializeBinaryToWriter = function(message, writer) { +proto.aggregator.ListWalletReq.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getId(); + f = message.getFactory(); if (f.length > 0) { writer.writeString( 1, f ); } + f = message.getSalt(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } }; /** - * optional string id = 1; + * optional string factory = 1; * @return {string} */ -proto.aggregator.CreateTaskResp.prototype.getId = function() { +proto.aggregator.ListWalletReq.prototype.getFactory = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.aggregator.CreateTaskResp} returns this + * @return {!proto.aggregator.ListWalletReq} returns this */ -proto.aggregator.CreateTaskResp.prototype.setId = function(value) { +proto.aggregator.ListWalletReq.prototype.setFactory = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; +/** + * optional string salt = 2; + * @return {string} + */ +proto.aggregator.ListWalletReq.prototype.getSalt = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.aggregator.ListWalletReq} returns this + */ +proto.aggregator.ListWalletReq.prototype.setSalt = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + @@ -5859,8 +7474,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.aggregator.NonceRequest.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.NonceRequest.toObject(opt_includeInstance, this); +proto.aggregator.SmartWallet.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.SmartWallet.toObject(opt_includeInstance, this); }; @@ -5869,13 +7484,15 @@ proto.aggregator.NonceRequest.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.NonceRequest} 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.NonceRequest.toObject = function(includeInstance, msg) { +proto.aggregator.SmartWallet.toObject = function(includeInstance, msg) { var f, obj = { - owner: jspb.Message.getFieldWithDefault(msg, 1, "") + address: jspb.Message.getFieldWithDefault(msg, 1, ""), + salt: jspb.Message.getFieldWithDefault(msg, 2, ""), + factory: jspb.Message.getFieldWithDefault(msg, 3, "") }; if (includeInstance) { @@ -5889,23 +7506,23 @@ proto.aggregator.NonceRequest.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.NonceRequest} + * @return {!proto.aggregator.SmartWallet} */ -proto.aggregator.NonceRequest.deserializeBinary = function(bytes) { +proto.aggregator.SmartWallet.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.NonceRequest; - return proto.aggregator.NonceRequest.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.NonceRequest} 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.NonceRequest} + * @return {!proto.aggregator.SmartWallet} */ -proto.aggregator.NonceRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.aggregator.SmartWallet.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -5914,7 +7531,15 @@ proto.aggregator.NonceRequest.deserializeBinaryFromReader = function(msg, reader switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setOwner(value); + msg.setAddress(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSalt(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setFactory(value); break; default: reader.skipField(); @@ -5929,9 +7554,9 @@ proto.aggregator.NonceRequest.deserializeBinaryFromReader = function(msg, reader * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.NonceRequest.prototype.serializeBinary = function() { +proto.aggregator.SmartWallet.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.NonceRequest.serializeBinaryToWriter(this, writer); + proto.aggregator.SmartWallet.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -5939,41 +7564,98 @@ proto.aggregator.NonceRequest.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.NonceRequest} message + * @param {!proto.aggregator.SmartWallet} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.NonceRequest.serializeBinaryToWriter = function(message, writer) { +proto.aggregator.SmartWallet.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getOwner(); + f = message.getAddress(); if (f.length > 0) { writer.writeString( 1, f ); } + f = message.getSalt(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getFactory(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } +}; + + +/** + * optional string address = 1; + * @return {string} + */ +proto.aggregator.SmartWallet.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.aggregator.SmartWallet} returns this + */ +proto.aggregator.SmartWallet.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string salt = 2; + * @return {string} + */ +proto.aggregator.SmartWallet.prototype.getSalt = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.aggregator.SmartWallet} returns this + */ +proto.aggregator.SmartWallet.prototype.setSalt = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; /** - * optional string owner = 1; + * optional string factory = 3; * @return {string} */ -proto.aggregator.NonceRequest.prototype.getOwner = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.aggregator.SmartWallet.prototype.getFactory = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** * @param {string} value - * @return {!proto.aggregator.NonceRequest} returns this + * @return {!proto.aggregator.SmartWallet} returns this */ -proto.aggregator.NonceRequest.prototype.setOwner = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); +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.ListWalletResp.repeatedFields_ = [1]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -5989,8 +7671,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.aggregator.NonceResp.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.NonceResp.toObject(opt_includeInstance, this); +proto.aggregator.ListWalletResp.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ListWalletResp.toObject(opt_includeInstance, this); }; @@ -5999,13 +7681,14 @@ proto.aggregator.NonceResp.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.NonceResp} msg The msg instance to transform. + * @param {!proto.aggregator.ListWalletResp} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.NonceResp.toObject = function(includeInstance, msg) { +proto.aggregator.ListWalletResp.toObject = function(includeInstance, msg) { var f, obj = { - nonce: jspb.Message.getFieldWithDefault(msg, 1, "") + walletsList: jspb.Message.toObjectList(msg.getWalletsList(), + proto.aggregator.SmartWallet.toObject, includeInstance) }; if (includeInstance) { @@ -6019,23 +7702,23 @@ proto.aggregator.NonceResp.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.NonceResp} + * @return {!proto.aggregator.ListWalletResp} */ -proto.aggregator.NonceResp.deserializeBinary = function(bytes) { +proto.aggregator.ListWalletResp.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.NonceResp; - return proto.aggregator.NonceResp.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.ListWalletResp; + return proto.aggregator.ListWalletResp.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.aggregator.NonceResp} msg The message object to deserialize into. + * @param {!proto.aggregator.ListWalletResp} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.NonceResp} + * @return {!proto.aggregator.ListWalletResp} */ -proto.aggregator.NonceResp.deserializeBinaryFromReader = function(msg, reader) { +proto.aggregator.ListWalletResp.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -6043,8 +7726,9 @@ proto.aggregator.NonceResp.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setNonce(value); + var value = new proto.aggregator.SmartWallet; + reader.readMessage(value,proto.aggregator.SmartWallet.deserializeBinaryFromReader); + msg.addWallets(value); break; default: reader.skipField(); @@ -6059,9 +7743,9 @@ proto.aggregator.NonceResp.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.NonceResp.prototype.serializeBinary = function() { +proto.aggregator.ListWalletResp.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.NonceResp.serializeBinaryToWriter(this, writer); + proto.aggregator.ListWalletResp.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -6069,37 +7753,58 @@ proto.aggregator.NonceResp.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.NonceResp} message + * @param {!proto.aggregator.ListWalletResp} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.NonceResp.serializeBinaryToWriter = function(message, writer) { +proto.aggregator.ListWalletResp.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getNonce(); + f = message.getWalletsList(); if (f.length > 0) { - writer.writeString( + writer.writeRepeatedMessage( 1, - f + f, + proto.aggregator.SmartWallet.serializeBinaryToWriter ); } }; /** - * optional string nonce = 1; - * @return {string} + * repeated SmartWallet wallets = 1; + * @return {!Array} */ -proto.aggregator.NonceResp.prototype.getNonce = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.aggregator.ListWalletResp.prototype.getWalletsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.SmartWallet, 1)); }; /** - * @param {string} value - * @return {!proto.aggregator.NonceResp} returns this + * @param {!Array} value + * @return {!proto.aggregator.ListWalletResp} returns this +*/ +proto.aggregator.ListWalletResp.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.NonceResp.prototype.setNonce = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); +proto.aggregator.ListWalletResp.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.ListWalletResp} returns this + */ +proto.aggregator.ListWalletResp.prototype.clearWalletsList = function() { + return this.setWalletsList([]); }; @@ -6119,8 +7824,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.aggregator.AddressRequest.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.AddressRequest.toObject(opt_includeInstance, this); +proto.aggregator.ListTasksReq.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ListTasksReq.toObject(opt_includeInstance, this); }; @@ -6129,13 +7834,13 @@ proto.aggregator.AddressRequest.prototype.toObject = function(opt_includeInstanc * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.aggregator.AddressRequest} 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.AddressRequest.toObject = function(includeInstance, msg) { +proto.aggregator.ListTasksReq.toObject = function(includeInstance, msg) { var f, obj = { - owner: jspb.Message.getFieldWithDefault(msg, 1, "") + smartWalletAddress: jspb.Message.getFieldWithDefault(msg, 1, "") }; if (includeInstance) { @@ -6149,23 +7854,23 @@ proto.aggregator.AddressRequest.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.AddressRequest} + * @return {!proto.aggregator.ListTasksReq} */ -proto.aggregator.AddressRequest.deserializeBinary = function(bytes) { +proto.aggregator.ListTasksReq.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.AddressRequest; - return proto.aggregator.AddressRequest.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.AddressRequest} 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.AddressRequest} + * @return {!proto.aggregator.ListTasksReq} */ -proto.aggregator.AddressRequest.deserializeBinaryFromReader = function(msg, reader) { +proto.aggregator.ListTasksReq.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -6174,7 +7879,7 @@ proto.aggregator.AddressRequest.deserializeBinaryFromReader = function(msg, read switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setOwner(value); + msg.setSmartWalletAddress(value); break; default: reader.skipField(); @@ -6189,9 +7894,9 @@ proto.aggregator.AddressRequest.deserializeBinaryFromReader = function(msg, read * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.AddressRequest.prototype.serializeBinary = function() { +proto.aggregator.ListTasksReq.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.AddressRequest.serializeBinaryToWriter(this, writer); + proto.aggregator.ListTasksReq.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -6199,13 +7904,13 @@ proto.aggregator.AddressRequest.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.AddressRequest} message + * @param {!proto.aggregator.ListTasksReq} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.AddressRequest.serializeBinaryToWriter = function(message, writer) { +proto.aggregator.ListTasksReq.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getOwner(); + f = message.getSmartWalletAddress(); if (f.length > 0) { writer.writeString( 1, @@ -6216,24 +7921,31 @@ proto.aggregator.AddressRequest.serializeBinaryToWriter = function(message, writ /** - * optional string owner = 1; + * optional string smart_wallet_address = 1; * @return {string} */ -proto.aggregator.AddressRequest.prototype.getOwner = function() { +proto.aggregator.ListTasksReq.prototype.getSmartWalletAddress = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.aggregator.AddressRequest} returns this + * @return {!proto.aggregator.ListTasksReq} returns this */ -proto.aggregator.AddressRequest.prototype.setOwner = function(value) { +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]; + if (jspb.Message.GENERATE_TO_OBJECT) { @@ -6249,8 +7961,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.ListTasksResp.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ListTasksResp.toObject(opt_includeInstance, this); }; @@ -6259,14 +7971,14 @@ 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.ListTasksResp} 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.ListTasksResp.toObject = function(includeInstance, msg) { var f, obj = { - smartAccountAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), - nonce: jspb.Message.getFieldWithDefault(msg, 2, "") + tasksList: jspb.Message.toObjectList(msg.getTasksList(), + proto.aggregator.Task.toObject, includeInstance) }; if (includeInstance) { @@ -6280,23 +7992,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.ListTasksResp} */ -proto.aggregator.AddressResp.deserializeBinary = function(bytes) { +proto.aggregator.ListTasksResp.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.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.AddressResp} 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.AddressResp} + * @return {!proto.aggregator.ListTasksResp} */ -proto.aggregator.AddressResp.deserializeBinaryFromReader = function(msg, reader) { +proto.aggregator.ListTasksResp.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -6304,12 +8016,9 @@ proto.aggregator.AddressResp.deserializeBinaryFromReader = function(msg, reader) var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setSmartAccountAddress(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setNonce(value); + var value = new proto.aggregator.Task; + reader.readMessage(value,proto.aggregator.Task.deserializeBinaryFromReader); + msg.addTasks(value); break; default: reader.skipField(); @@ -6324,9 +8033,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.ListTasksResp.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.AddressResp.serializeBinaryToWriter(this, writer); + proto.aggregator.ListTasksResp.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -6334,62 +8043,58 @@ 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.ListTasksResp} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.AddressResp.serializeBinaryToWriter = function(message, writer) { +proto.aggregator.ListTasksResp.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getSmartAccountAddress(); + f = message.getTasksList(); if (f.length > 0) { - writer.writeString( + writer.writeRepeatedMessage( 1, - f - ); - } - f = message.getNonce(); - if (f.length > 0) { - writer.writeString( - 2, - f + f, + proto.aggregator.Task.serializeBinaryToWriter ); } }; /** - * optional string smart_account_address = 1; - * @return {string} + * repeated Task tasks = 1; + * @return {!Array} */ -proto.aggregator.AddressResp.prototype.getSmartAccountAddress = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.aggregator.ListTasksResp.prototype.getTasksList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.Task, 1)); }; /** - * @param {string} value - * @return {!proto.aggregator.AddressResp} returns this - */ -proto.aggregator.AddressResp.prototype.setSmartAccountAddress = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); + * @param {!Array} value + * @return {!proto.aggregator.ListTasksResp} returns this +*/ +proto.aggregator.ListTasksResp.prototype.setTasksList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; /** - * optional string nonce = 2; - * @return {string} + * @param {!proto.aggregator.Task=} opt_value + * @param {number=} opt_index + * @return {!proto.aggregator.Task} */ -proto.aggregator.AddressResp.prototype.getNonce = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.aggregator.ListTasksResp.prototype.addTasks = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.aggregator.Task, opt_index); }; /** - * @param {string} value - * @return {!proto.aggregator.AddressResp} returns this + * Clears the list making it empty but non-null. + * @return {!proto.aggregator.ListTasksResp} returns this */ -proto.aggregator.AddressResp.prototype.setNonce = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.aggregator.ListTasksResp.prototype.clearTasksList = function() { + return this.setTasksList([]); }; @@ -6409,8 +8114,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.GetKeyReq.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.GetKeyReq.toObject(opt_includeInstance, this); }; @@ -6419,13 +8124,15 @@ 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.GetKeyReq} 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.GetKeyReq.toObject = function(includeInstance, msg) { var f, obj = { - + owner: jspb.Message.getFieldWithDefault(msg, 1, ""), + expiredAt: jspb.Message.getFieldWithDefault(msg, 2, 0), + signature: jspb.Message.getFieldWithDefault(msg, 3, "") }; if (includeInstance) { @@ -6439,29 +8146,41 @@ 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.GetKeyReq} */ -proto.aggregator.ListTasksReq.deserializeBinary = function(bytes) { +proto.aggregator.GetKeyReq.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.GetKeyReq; + return proto.aggregator.GetKeyReq.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.GetKeyReq} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.ListTasksReq} + * @return {!proto.aggregator.GetKeyReq} */ -proto.aggregator.ListTasksReq.deserializeBinaryFromReader = function(msg, reader) { +proto.aggregator.GetKeyReq.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.setOwner(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setExpiredAt(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setSignature(value); + break; default: reader.skipField(); break; @@ -6475,9 +8194,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.GetKeyReq.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.ListTasksReq.serializeBinaryToWriter(this, writer); + proto.aggregator.GetKeyReq.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -6485,134 +8204,87 @@ 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.GetKeyReq} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.ListTasksReq.serializeBinaryToWriter = function(message, writer) { +proto.aggregator.GetKeyReq.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getOwner(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getExpiredAt(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getSignature(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } }; - -/** - * List of repeated fields within this message type. - * @private {!Array} - * @const - */ -proto.aggregator.ListTasksResp.repeatedFields_ = [1]; - - - -if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} + * optional string owner = 1; + * @return {string} */ -proto.aggregator.ListTasksResp.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.ListTasksResp.toObject(opt_includeInstance, this); +proto.aggregator.GetKeyReq.prototype.getOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * 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.ListTasksResp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ -proto.aggregator.ListTasksResp.toObject = function(includeInstance, msg) { - var f, obj = { - tasksList: jspb.Message.toObjectList(msg.getTasksList(), - proto.aggregator.ListTasksResp.TaskItemResp.toObject, includeInstance) - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + * @param {string} value + * @return {!proto.aggregator.GetKeyReq} returns this + */ +proto.aggregator.GetKeyReq.prototype.setOwner = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.ListTasksResp} + * optional int64 expired_at = 2; + * @return {number} */ -proto.aggregator.ListTasksResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ListTasksResp; - return proto.aggregator.ListTasksResp.deserializeBinaryFromReader(msg, reader); +proto.aggregator.GetKeyReq.prototype.getExpiredAt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; /** - * 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 {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.ListTasksResp} + * @param {number} value + * @return {!proto.aggregator.GetKeyReq} returns this */ -proto.aggregator.ListTasksResp.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - 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); - break; - default: - reader.skipField(); - break; - } - } - return msg; +proto.aggregator.GetKeyReq.prototype.setExpiredAt = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} + * optional string signature = 3; + * @return {string} */ -proto.aggregator.ListTasksResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.ListTasksResp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); +proto.aggregator.GetKeyReq.prototype.getSignature = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; /** - * Serializes the given message to binary data (in protobuf wire - * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.ListTasksResp} message - * @param {!jspb.BinaryWriter} writer - * @suppress {unusedLocalVariables} f is only used for nested messages + * @param {string} value + * @return {!proto.aggregator.GetKeyReq} returns this */ -proto.aggregator.ListTasksResp.serializeBinaryToWriter = function(message, writer) { - var f = undefined; - f = message.getTasksList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.aggregator.ListTasksResp.TaskItemResp.serializeBinaryToWriter - ); - } +proto.aggregator.GetKeyReq.prototype.setSignature = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); }; @@ -6632,8 +8304,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.KeyResp.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.KeyResp.toObject(opt_includeInstance, this); }; @@ -6642,14 +8314,13 @@ 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.KeyResp} 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.KeyResp.toObject = function(includeInstance, msg) { var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, ""), - status: jspb.Message.getFieldWithDefault(msg, 2, 0) + key: jspb.Message.getFieldWithDefault(msg, 1, "") }; if (includeInstance) { @@ -6663,23 +8334,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.KeyResp} */ -proto.aggregator.ListTasksResp.TaskItemResp.deserializeBinary = function(bytes) { +proto.aggregator.KeyResp.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.KeyResp; + return proto.aggregator.KeyResp.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.KeyResp} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.ListTasksResp.TaskItemResp} + * @return {!proto.aggregator.KeyResp} */ -proto.aggregator.ListTasksResp.TaskItemResp.deserializeBinaryFromReader = function(msg, reader) { +proto.aggregator.KeyResp.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -6688,11 +8359,7 @@ proto.aggregator.ListTasksResp.TaskItemResp.deserializeBinaryFromReader = functi 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); + msg.setKey(value); break; default: reader.skipField(); @@ -6707,9 +8374,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.KeyResp.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.ListTasksResp.TaskItemResp.serializeBinaryToWriter(this, writer); + proto.aggregator.KeyResp.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -6717,103 +8384,47 @@ 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.KeyResp} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.ListTasksResp.TaskItemResp.serializeBinaryToWriter = function(message, writer) { +proto.aggregator.KeyResp.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getId(); + f = message.getKey(); if (f.length > 0) { writer.writeString( 1, f ); } - f = message.getStatus(); - if (f !== 0.0) { - writer.writeEnum( - 2, - f - ); - } }; /** - * optional string id = 1; + * optional string key = 1; * @return {string} */ -proto.aggregator.ListTasksResp.TaskItemResp.prototype.getId = function() { +proto.aggregator.KeyResp.prototype.getKey = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.aggregator.ListTasksResp.TaskItemResp} returns this + * @return {!proto.aggregator.KeyResp} returns this */ -proto.aggregator.ListTasksResp.TaskItemResp.prototype.setId = function(value) { +proto.aggregator.KeyResp.prototype.setKey = 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); -}; - - -/** - * repeated TaskItemResp tasks = 1; - * @return {!Array} - */ -proto.aggregator.ListTasksResp.prototype.getTasksList = function() { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.aggregator.ListTasksResp.TaskItemResp, 1)); -}; - - -/** - * @param {!Array} value - * @return {!proto.aggregator.ListTasksResp} returns this -*/ -proto.aggregator.ListTasksResp.prototype.setTasksList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; - - -/** - * @param {!proto.aggregator.ListTasksResp.TaskItemResp=} opt_value - * @param {number=} opt_index - * @return {!proto.aggregator.ListTasksResp.TaskItemResp} - */ -proto.aggregator.ListTasksResp.prototype.addTasks = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.aggregator.ListTasksResp.TaskItemResp, opt_index); -}; - /** - * Clears the list making it empty but non-null. - * @return {!proto.aggregator.ListTasksResp} returns this + * List of repeated fields within this message type. + * @private {!Array} + * @const */ -proto.aggregator.ListTasksResp.prototype.clearTasksList = function() { - return this.setTasksList([]); -}; - - +proto.aggregator.UpdateChecksReq.repeatedFields_ = [3]; @@ -6830,8 +8441,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.aggregator.GetKeyReq.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.GetKeyReq.toObject(opt_includeInstance, this); +proto.aggregator.UpdateChecksReq.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.UpdateChecksReq.toObject(opt_includeInstance, this); }; @@ -6840,15 +8451,15 @@ proto.aggregator.GetKeyReq.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.GetKeyReq} msg The msg instance to transform. + * @param {!proto.aggregator.UpdateChecksReq} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.GetKeyReq.toObject = function(includeInstance, msg) { +proto.aggregator.UpdateChecksReq.toObject = function(includeInstance, msg) { var f, obj = { - owner: jspb.Message.getFieldWithDefault(msg, 1, ""), - expiredAt: jspb.Message.getFieldWithDefault(msg, 2, 0), - signature: jspb.Message.getFieldWithDefault(msg, 3, "") + address: jspb.Message.getFieldWithDefault(msg, 1, ""), + signature: jspb.Message.getFieldWithDefault(msg, 2, ""), + idList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f }; if (includeInstance) { @@ -6862,23 +8473,23 @@ proto.aggregator.GetKeyReq.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.GetKeyReq} + * @return {!proto.aggregator.UpdateChecksReq} */ -proto.aggregator.GetKeyReq.deserializeBinary = function(bytes) { +proto.aggregator.UpdateChecksReq.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.GetKeyReq; - return proto.aggregator.GetKeyReq.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.UpdateChecksReq; + return proto.aggregator.UpdateChecksReq.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.aggregator.GetKeyReq} msg The message object to deserialize into. + * @param {!proto.aggregator.UpdateChecksReq} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.GetKeyReq} + * @return {!proto.aggregator.UpdateChecksReq} */ -proto.aggregator.GetKeyReq.deserializeBinaryFromReader = function(msg, reader) { +proto.aggregator.UpdateChecksReq.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -6887,15 +8498,15 @@ proto.aggregator.GetKeyReq.deserializeBinaryFromReader = function(msg, reader) { switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setOwner(value); + msg.setAddress(value); break; case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setExpiredAt(value); + var value = /** @type {string} */ (reader.readString()); + msg.setSignature(value); break; case 3: var value = /** @type {string} */ (reader.readString()); - msg.setSignature(value); + msg.addId(value); break; default: reader.skipField(); @@ -6910,9 +8521,9 @@ proto.aggregator.GetKeyReq.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.GetKeyReq.prototype.serializeBinary = function() { +proto.aggregator.UpdateChecksReq.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.GetKeyReq.serializeBinaryToWriter(this, writer); + proto.aggregator.UpdateChecksReq.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -6920,29 +8531,29 @@ proto.aggregator.GetKeyReq.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.GetKeyReq} message + * @param {!proto.aggregator.UpdateChecksReq} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.GetKeyReq.serializeBinaryToWriter = function(message, writer) { +proto.aggregator.UpdateChecksReq.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getOwner(); + f = message.getAddress(); if (f.length > 0) { writer.writeString( 1, f ); } - f = message.getExpiredAt(); - if (f !== 0) { - writer.writeInt64( + f = message.getSignature(); + if (f.length > 0) { + writer.writeString( 2, f ); } - f = message.getSignature(); + f = message.getIdList(); if (f.length > 0) { - writer.writeString( + writer.writeRepeatedString( 3, f ); @@ -6951,56 +8562,75 @@ proto.aggregator.GetKeyReq.serializeBinaryToWriter = function(message, writer) { /** - * optional string owner = 1; + * optional string address = 1; * @return {string} */ -proto.aggregator.GetKeyReq.prototype.getOwner = function() { +proto.aggregator.UpdateChecksReq.prototype.getAddress = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.aggregator.GetKeyReq} returns this + * @return {!proto.aggregator.UpdateChecksReq} returns this */ -proto.aggregator.GetKeyReq.prototype.setOwner = function(value) { +proto.aggregator.UpdateChecksReq.prototype.setAddress = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional int64 expired_at = 2; - * @return {number} + * optional string signature = 2; + * @return {string} */ -proto.aggregator.GetKeyReq.prototype.getExpiredAt = function() { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +proto.aggregator.UpdateChecksReq.prototype.getSignature = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * @param {number} value - * @return {!proto.aggregator.GetKeyReq} returns this + * @param {string} value + * @return {!proto.aggregator.UpdateChecksReq} returns this */ -proto.aggregator.GetKeyReq.prototype.setExpiredAt = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); +proto.aggregator.UpdateChecksReq.prototype.setSignature = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; /** - * optional string signature = 3; - * @return {string} + * repeated string id = 3; + * @return {!Array} */ -proto.aggregator.GetKeyReq.prototype.getSignature = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.aggregator.UpdateChecksReq.prototype.getIdList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); +}; + + +/** + * @param {!Array} value + * @return {!proto.aggregator.UpdateChecksReq} returns this + */ +proto.aggregator.UpdateChecksReq.prototype.setIdList = function(value) { + return jspb.Message.setField(this, 3, value || []); }; /** * @param {string} value - * @return {!proto.aggregator.GetKeyReq} returns this + * @param {number=} opt_index + * @return {!proto.aggregator.UpdateChecksReq} returns this + */ +proto.aggregator.UpdateChecksReq.prototype.addId = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 3, value, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.aggregator.UpdateChecksReq} returns this */ -proto.aggregator.GetKeyReq.prototype.setSignature = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); +proto.aggregator.UpdateChecksReq.prototype.clearIdList = function() { + return this.setIdList([]); }; @@ -7020,8 +8650,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.aggregator.KeyResp.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.KeyResp.toObject(opt_includeInstance, this); +proto.aggregator.UpdateChecksResp.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.UpdateChecksResp.toObject(opt_includeInstance, this); }; @@ -7030,13 +8660,13 @@ proto.aggregator.KeyResp.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.KeyResp} msg The msg instance to transform. + * @param {!proto.aggregator.UpdateChecksResp} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.KeyResp.toObject = function(includeInstance, msg) { +proto.aggregator.UpdateChecksResp.toObject = function(includeInstance, msg) { var f, obj = { - key: jspb.Message.getFieldWithDefault(msg, 1, "") + updatedAt: (f = msg.getUpdatedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) }; if (includeInstance) { @@ -7050,23 +8680,23 @@ proto.aggregator.KeyResp.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.KeyResp} + * @return {!proto.aggregator.UpdateChecksResp} */ -proto.aggregator.KeyResp.deserializeBinary = function(bytes) { +proto.aggregator.UpdateChecksResp.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.KeyResp; - return proto.aggregator.KeyResp.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.UpdateChecksResp; + return proto.aggregator.UpdateChecksResp.deserializeBinaryFromReader(msg, reader); }; /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.aggregator.KeyResp} msg The message object to deserialize into. + * @param {!proto.aggregator.UpdateChecksResp} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.KeyResp} + * @return {!proto.aggregator.UpdateChecksResp} */ -proto.aggregator.KeyResp.deserializeBinaryFromReader = function(msg, reader) { +proto.aggregator.UpdateChecksResp.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -7074,8 +8704,9 @@ proto.aggregator.KeyResp.deserializeBinaryFromReader = function(msg, reader) { var field = reader.getFieldNumber(); switch (field) { case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setKey(value); + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setUpdatedAt(value); break; default: reader.skipField(); @@ -7090,9 +8721,9 @@ proto.aggregator.KeyResp.deserializeBinaryFromReader = function(msg, reader) { * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.KeyResp.prototype.serializeBinary = function() { +proto.aggregator.UpdateChecksResp.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.KeyResp.serializeBinaryToWriter(this, writer); + proto.aggregator.UpdateChecksResp.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -7100,47 +8731,60 @@ proto.aggregator.KeyResp.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.KeyResp} message + * @param {!proto.aggregator.UpdateChecksResp} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.KeyResp.serializeBinaryToWriter = function(message, writer) { +proto.aggregator.UpdateChecksResp.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getKey(); - if (f.length > 0) { - writer.writeString( + f = message.getUpdatedAt(); + if (f != null) { + writer.writeMessage( 1, - f + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter ); } }; /** - * optional string key = 1; - * @return {string} + * optional google.protobuf.Timestamp updated_at = 1; + * @return {?proto.google.protobuf.Timestamp} */ -proto.aggregator.KeyResp.prototype.getKey = function() { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.aggregator.UpdateChecksResp.prototype.getUpdatedAt = function() { + return /** @type{?proto.google.protobuf.Timestamp} */ ( + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 1)); }; /** - * @param {string} value - * @return {!proto.aggregator.KeyResp} returns this - */ -proto.aggregator.KeyResp.prototype.setKey = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); + * @param {?proto.google.protobuf.Timestamp|undefined} value + * @return {!proto.aggregator.UpdateChecksResp} returns this +*/ +proto.aggregator.UpdateChecksResp.prototype.setUpdatedAt = function(value) { + return jspb.Message.setWrapperField(this, 1, value); }; +/** + * Clears the message field making it undefined. + * @return {!proto.aggregator.UpdateChecksResp} returns this + */ +proto.aggregator.UpdateChecksResp.prototype.clearUpdatedAt = function() { + return this.setUpdatedAt(undefined); +}; + /** - * List of repeated fields within this message type. - * @private {!Array} - * @const + * Returns whether this field is set. + * @return {boolean} */ -proto.aggregator.UpdateChecksReq.repeatedFields_ = [3]; +proto.aggregator.UpdateChecksResp.prototype.hasUpdatedAt = function() { + return jspb.Message.getField(this, 1) != null; +}; + + @@ -7157,8 +8801,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.aggregator.UpdateChecksReq.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.UpdateChecksReq.toObject(opt_includeInstance, this); +proto.aggregator.CreateWalletReq.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.CreateWalletReq.toObject(opt_includeInstance, this); }; @@ -7167,15 +8811,14 @@ proto.aggregator.UpdateChecksReq.prototype.toObject = function(opt_includeInstan * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.aggregator.UpdateChecksReq} msg The msg instance to transform. + * @param {!proto.aggregator.CreateWalletReq} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.UpdateChecksReq.toObject = function(includeInstance, msg) { +proto.aggregator.CreateWalletReq.toObject = function(includeInstance, msg) { var f, obj = { - address: jspb.Message.getFieldWithDefault(msg, 1, ""), - signature: jspb.Message.getFieldWithDefault(msg, 2, ""), - idList: (f = jspb.Message.getRepeatedField(msg, 3)) == null ? undefined : f + salt: jspb.Message.getFieldWithDefault(msg, 1, ""), + factoryAddress: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { @@ -7189,23 +8832,23 @@ proto.aggregator.UpdateChecksReq.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.UpdateChecksReq} + * @return {!proto.aggregator.CreateWalletReq} */ -proto.aggregator.UpdateChecksReq.deserializeBinary = function(bytes) { +proto.aggregator.CreateWalletReq.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.UpdateChecksReq; - return proto.aggregator.UpdateChecksReq.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.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.UpdateChecksReq} msg The message object to deserialize into. + * @param {!proto.aggregator.CreateWalletReq} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.UpdateChecksReq} + * @return {!proto.aggregator.CreateWalletReq} */ -proto.aggregator.UpdateChecksReq.deserializeBinaryFromReader = function(msg, reader) { +proto.aggregator.CreateWalletReq.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -7214,15 +8857,11 @@ proto.aggregator.UpdateChecksReq.deserializeBinaryFromReader = function(msg, rea switch (field) { case 1: var value = /** @type {string} */ (reader.readString()); - msg.setAddress(value); + msg.setSalt(value); break; case 2: var value = /** @type {string} */ (reader.readString()); - msg.setSignature(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.addId(value); + msg.setFactoryAddress(value); break; default: reader.skipField(); @@ -7237,9 +8876,9 @@ proto.aggregator.UpdateChecksReq.deserializeBinaryFromReader = function(msg, rea * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.UpdateChecksReq.prototype.serializeBinary = function() { +proto.aggregator.CreateWalletReq.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.UpdateChecksReq.serializeBinaryToWriter(this, writer); + proto.aggregator.CreateWalletReq.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -7247,109 +8886,65 @@ proto.aggregator.UpdateChecksReq.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.UpdateChecksReq} message + * @param {!proto.aggregator.CreateWalletReq} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.UpdateChecksReq.serializeBinaryToWriter = function(message, writer) { +proto.aggregator.CreateWalletReq.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getAddress(); + f = message.getSalt(); if (f.length > 0) { writer.writeString( 1, f ); } - f = message.getSignature(); + f = message.getFactoryAddress(); if (f.length > 0) { writer.writeString( 2, f ); } - f = message.getIdList(); - if (f.length > 0) { - writer.writeRepeatedString( - 3, - f - ); - } }; /** - * optional string address = 1; + * optional string salt = 1; * @return {string} */ -proto.aggregator.UpdateChecksReq.prototype.getAddress = function() { +proto.aggregator.CreateWalletReq.prototype.getSalt = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** * @param {string} value - * @return {!proto.aggregator.UpdateChecksReq} returns this + * @return {!proto.aggregator.CreateWalletReq} returns this */ -proto.aggregator.UpdateChecksReq.prototype.setAddress = function(value) { +proto.aggregator.CreateWalletReq.prototype.setSalt = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; /** - * optional string signature = 2; + * optional string factory_address = 2; * @return {string} */ -proto.aggregator.UpdateChecksReq.prototype.getSignature = function() { +proto.aggregator.CreateWalletReq.prototype.getFactoryAddress = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** * @param {string} value - * @return {!proto.aggregator.UpdateChecksReq} returns this + * @return {!proto.aggregator.CreateWalletReq} returns this */ -proto.aggregator.UpdateChecksReq.prototype.setSignature = function(value) { +proto.aggregator.CreateWalletReq.prototype.setFactoryAddress = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; -/** - * repeated string id = 3; - * @return {!Array} - */ -proto.aggregator.UpdateChecksReq.prototype.getIdList = function() { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 3)); -}; - - -/** - * @param {!Array} value - * @return {!proto.aggregator.UpdateChecksReq} returns this - */ -proto.aggregator.UpdateChecksReq.prototype.setIdList = function(value) { - return jspb.Message.setField(this, 3, value || []); -}; - - -/** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.aggregator.UpdateChecksReq} returns this - */ -proto.aggregator.UpdateChecksReq.prototype.addId = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 3, value, opt_index); -}; - - -/** - * Clears the list making it empty but non-null. - * @return {!proto.aggregator.UpdateChecksReq} returns this - */ -proto.aggregator.UpdateChecksReq.prototype.clearIdList = function() { - return this.setIdList([]); -}; - - @@ -7366,8 +8961,8 @@ if (jspb.Message.GENERATE_TO_OBJECT) { * http://goto/soy-param-migration * @return {!Object} */ -proto.aggregator.UpdateChecksResp.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.UpdateChecksResp.toObject(opt_includeInstance, this); +proto.aggregator.CreateWalletResp.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.CreateWalletResp.toObject(opt_includeInstance, this); }; @@ -7376,13 +8971,15 @@ proto.aggregator.UpdateChecksResp.prototype.toObject = function(opt_includeInsta * @param {boolean|undefined} includeInstance Deprecated. Whether to include * the JSPB instance for transitional soy proto support: * http://goto/soy-param-migration - * @param {!proto.aggregator.UpdateChecksResp} msg The msg instance to transform. + * @param {!proto.aggregator.CreateWalletResp} msg The msg instance to transform. * @return {!Object} * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.UpdateChecksResp.toObject = function(includeInstance, msg) { +proto.aggregator.CreateWalletResp.toObject = function(includeInstance, msg) { var f, obj = { - updatedAt: (f = msg.getUpdatedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) + address: jspb.Message.getFieldWithDefault(msg, 1, ""), + salt: jspb.Message.getFieldWithDefault(msg, 2, ""), + factoryAddress: jspb.Message.getFieldWithDefault(msg, 3, "") }; if (includeInstance) { @@ -7396,23 +8993,23 @@ proto.aggregator.UpdateChecksResp.toObject = function(includeInstance, msg) { /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.UpdateChecksResp} + * @return {!proto.aggregator.CreateWalletResp} */ -proto.aggregator.UpdateChecksResp.deserializeBinary = function(bytes) { +proto.aggregator.CreateWalletResp.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.UpdateChecksResp; - return proto.aggregator.UpdateChecksResp.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.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.UpdateChecksResp} msg The message object to deserialize into. + * @param {!proto.aggregator.CreateWalletResp} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.UpdateChecksResp} + * @return {!proto.aggregator.CreateWalletResp} */ -proto.aggregator.UpdateChecksResp.deserializeBinaryFromReader = function(msg, reader) { +proto.aggregator.CreateWalletResp.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -7420,9 +9017,16 @@ proto.aggregator.UpdateChecksResp.deserializeBinaryFromReader = function(msg, re var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new google_protobuf_timestamp_pb.Timestamp; - reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setUpdatedAt(value); + var value = /** @type {string} */ (reader.readString()); + msg.setAddress(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSalt(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setFactoryAddress(value); break; default: reader.skipField(); @@ -7437,9 +9041,9 @@ proto.aggregator.UpdateChecksResp.deserializeBinaryFromReader = function(msg, re * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.UpdateChecksResp.prototype.serializeBinary = function() { +proto.aggregator.CreateWalletResp.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.UpdateChecksResp.serializeBinaryToWriter(this, writer); + proto.aggregator.CreateWalletResp.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; @@ -7447,79 +9051,102 @@ proto.aggregator.UpdateChecksResp.prototype.serializeBinary = function() { /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.UpdateChecksResp} message + * @param {!proto.aggregator.CreateWalletResp} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.UpdateChecksResp.serializeBinaryToWriter = function(message, writer) { +proto.aggregator.CreateWalletResp.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getUpdatedAt(); - if (f != null) { - writer.writeMessage( + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( 1, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + f + ); + } + f = message.getSalt(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getFactoryAddress(); + if (f.length > 0) { + writer.writeString( + 3, + f ); } }; /** - * optional google.protobuf.Timestamp updated_at = 1; - * @return {?proto.google.protobuf.Timestamp} + * optional string address = 1; + * @return {string} */ -proto.aggregator.UpdateChecksResp.prototype.getUpdatedAt = function() { - return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 1)); +proto.aggregator.CreateWalletResp.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; /** - * @param {?proto.google.protobuf.Timestamp|undefined} value - * @return {!proto.aggregator.UpdateChecksResp} returns this -*/ -proto.aggregator.UpdateChecksResp.prototype.setUpdatedAt = function(value) { - return jspb.Message.setWrapperField(this, 1, value); + * @param {string} value + * @return {!proto.aggregator.CreateWalletResp} returns this + */ +proto.aggregator.CreateWalletResp.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; /** - * Clears the message field making it undefined. - * @return {!proto.aggregator.UpdateChecksResp} returns this + * optional string salt = 2; + * @return {string} */ -proto.aggregator.UpdateChecksResp.prototype.clearUpdatedAt = function() { - return this.setUpdatedAt(undefined); +proto.aggregator.CreateWalletResp.prototype.getSalt = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; /** - * Returns whether this field is set. - * @return {boolean} + * @param {string} value + * @return {!proto.aggregator.CreateWalletResp} returns this */ -proto.aggregator.UpdateChecksResp.prototype.hasUpdatedAt = function() { - return jspb.Message.getField(this, 1) != null; +proto.aggregator.CreateWalletResp.prototype.setSalt = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; /** - * @enum {number} + * optional string factory_address = 3; + * @return {string} + */ +proto.aggregator.CreateWalletResp.prototype.getFactoryAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.aggregator.CreateWalletResp} returns this */ -proto.aggregator.TriggerType = { - TIMETRIGGER: 0, - CONTRACTQUERYTRIGGER: 1, - EXPRESSIONTRIGGER: 2 +proto.aggregator.CreateWalletResp.prototype.setFactoryAddress = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); }; + /** * @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 }; /** diff --git a/go.mod b/go.mod index 6c2ca50..00962a4 100644 --- a/go.mod +++ b/go.mod @@ -23,6 +23,7 @@ require ( require ( github.com/Microsoft/go-winio v0.6.1 // indirect github.com/StackExchange/wmi v1.2.1 // indirect + github.com/allegro/bigcache/v3 v3.1.0 // indirect github.com/beorn7/perks v1.0.1 // indirect github.com/bits-and-blooms/bitset v1.10.0 // indirect github.com/btcsuite/btcd/btcec/v2 v2.2.0 // indirect @@ -36,10 +37,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 +57,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..2af08e5 100644 --- a/go.sum +++ b/go.sum @@ -12,6 +12,8 @@ github.com/StackExchange/wmi v1.2.1 h1:VIkavFPXSjcnS+O8yTq7NI32k0R5Aj+v39y29VYDO github.com/StackExchange/wmi v1.2.1/go.mod h1:rcmrprowKIVzvc+NUiLncP2uuArMWLCbu9SBzvHz7e8= github.com/VictoriaMetrics/fastcache v1.12.1 h1:i0mICQuojGDL3KblA7wUNlY5lOK6a4bwt3uRKnkZU40= github.com/VictoriaMetrics/fastcache v1.12.1/go.mod h1:tX04vaqcNoQeGLD+ra5pU5sWkuxnzWhEzLwhP9w653o= +github.com/allegro/bigcache/v3 v3.1.0 h1:H2Vp8VOvxcrB91o86fUSVJFqeuz8kpyyB02eH3bSzwk= +github.com/allegro/bigcache/v3 v3.1.0/go.mod h1:aPyh7jEvrog9zAwx5N7+JUQX5dZTSGpxF1LAR4dr35I= github.com/beorn7/perks v1.0.1 h1:VlbKKnNfV8bJzeqoa4cOKqO6bYr3WgKZxO8Z16+hsOM= github.com/beorn7/perks v1.0.1/go.mod h1:G2ZrVWU2WbWT9wwq4/hrbKbnv/1ERSJQ0ibhJ6rlkpw= github.com/bits-and-blooms/bitset v1.10.0 h1:ePXTeiPEazB5+opbv5fr8umg2R/1NlzgDsyepwsSr88= @@ -85,6 +87,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 +104,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 +188,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 +236,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 +253,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 2a3588c..e417fc5 100644 --- a/model/task.go +++ b/model/task.go @@ -1,45 +1,19 @@ package model import ( - "encoding/json" + "google.golang.org/protobuf/encoding/protojson" + "fmt" "time" "github.com/ethereum/go-ethereum/common" "github.com/oklog/ulid/v2" - "google.golang.org/grpc/codes" - "google.golang.org/grpc/status" avsproto "github.com/AvaProtocol/ap-avs/protobuf" ) 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"` - - // 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 @@ -49,6 +23,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 { @@ -59,30 +39,34 @@ func NewTaskFromProtobuf(user *User, body *avsproto.CreateTaskReq) (*Task, error aaAddress := *user.SmartAccountAddress if body.SmartWalletAddress != "" { - if !common.IsHexAddress(body.SmartWalletAddress) { - return nil, status.Errorf(codes.InvalidArgument, "invalid smart account address") - } aaAddress = common.HexToAddress(body.SmartWalletAddress) } taskID := GenerateTaskID() - 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, + if len(body.Edges) == 0 || len(body.Nodes) == 0 { + return nil, fmt.Errorf("Missing task data") + } - // initial state for task - Status: avsproto.TaskStatus_Active, - Executions: []*avsproto.Execution{}, + t := &Task{ + Task: &avsproto.Task{ + Id: 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 @@ -95,7 +79,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 @@ -103,39 +94,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) } 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..2a58a67 100644 --- a/protobuf/avs.pb.go +++ b/protobuf/avs.pb.go @@ -22,55 +22,6 @@ const ( _ = protoimpl.EnforceVersion(protoimpl.MaxVersion - 20) ) -type TriggerType int32 - -const ( - TriggerType_TimeTrigger TriggerType = 0 - TriggerType_ContractQueryTrigger TriggerType = 1 - TriggerType_ExpressionTrigger TriggerType = 2 -) - -// Enum value maps for TriggerType. -var ( - TriggerType_name = map[int32]string{ - 0: "TimeTrigger", - 1: "ContractQueryTrigger", - 2: "ExpressionTrigger", - } - TriggerType_value = map[string]int32{ - "TimeTrigger": 0, - "ContractQueryTrigger": 1, - "ExpressionTrigger": 2, - } -) - -func (x TriggerType) Enum() *TriggerType { - p := new(TriggerType) - *p = x - return p -} - -func (x TriggerType) String() string { - return protoimpl.X.EnumStringOf(x.Descriptor(), protoreflect.EnumNumber(x)) -} - -func (TriggerType) Descriptor() protoreflect.EnumDescriptor { - return file_protobuf_avs_proto_enumTypes[0].Descriptor() -} - -func (TriggerType) Type() protoreflect.EnumType { - return &file_protobuf_avs_proto_enumTypes[0] -} - -func (x TriggerType) Number() protoreflect.EnumNumber { - return protoreflect.EnumNumber(x) -} - -// Deprecated: Use TriggerType.Descriptor instead. -func (TriggerType) EnumDescriptor() ([]byte, []int) { - return file_protobuf_avs_proto_rawDescGZIP(), []int{0} -} - // gRPC internal error code use up to 17, we extend and start from 1000 to avoid any conflict // Guide: https://grpc.io/docs/guides/error/ // Go: https://github.com/grpc/grpc-go/blob/master/codes/codes.go#L199 @@ -87,8 +38,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 +53,7 @@ var ( 6000: "SmartWalletRpcError", 6001: "SmartWalletNotFoundError", 7000: "TaskDataCorrupted", + 7001: "TaskDataMissingError", } Error_value = map[string]int32{ "UnknowError": 0, @@ -110,6 +63,7 @@ var ( "SmartWalletRpcError": 6000, "SmartWalletNotFoundError": 6001, "TaskDataCorrupted": 7000, + "TaskDataMissingError": 7001, } ) @@ -124,11 +78,11 @@ func (x Error) String() string { } func (Error) Descriptor() protoreflect.EnumDescriptor { - return file_protobuf_avs_proto_enumTypes[1].Descriptor() + return file_protobuf_avs_proto_enumTypes[0].Descriptor() } func (Error) Type() protoreflect.EnumType { - return &file_protobuf_avs_proto_enumTypes[1] + return &file_protobuf_avs_proto_enumTypes[0] } func (x Error) Number() protoreflect.EnumNumber { @@ -137,74 +91,7 @@ func (x Error) Number() protoreflect.EnumNumber { // Deprecated: Use Error.Descriptor instead. 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} + return file_protobuf_avs_proto_rawDescGZIP(), []int{0} } // TaskStatus represents status of the task. The transition is as follow @@ -247,11 +134,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[1].Descriptor() } func (TaskStatus) Type() protoreflect.EnumType { - return &file_protobuf_avs_proto_enumTypes[3] + return &file_protobuf_avs_proto_enumTypes[1] } func (x TaskStatus) Number() protoreflect.EnumNumber { @@ -260,7 +147,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{1} } type CustomCodeType int32 @@ -290,11 +177,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[2].Descriptor() } func (CustomCodeType) Type() protoreflect.EnumType { - return &file_protobuf_avs_proto_enumTypes[4] + return &file_protobuf_avs_proto_enumTypes[2] } func (x CustomCodeType) Number() protoreflect.EnumNumber { @@ -303,19 +190,19 @@ func (x CustomCodeType) Number() protoreflect.EnumNumber { // Deprecated: Use CustomCodeType.Descriptor instead. func (CustomCodeType) EnumDescriptor() ([]byte, []int) { - return file_protobuf_avs_proto_rawDescGZIP(), []int{4} + return file_protobuf_avs_proto_rawDescGZIP(), []int{2} } -type UUID struct { +type IdReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Bytes string `protobuf:"bytes,1,opt,name=bytes,proto3" json:"bytes,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` } -func (x *UUID) Reset() { - *x = UUID{} +func (x *IdReq) Reset() { + *x = IdReq{} if protoimpl.UnsafeEnabled { mi := &file_protobuf_avs_proto_msgTypes[0] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -323,13 +210,13 @@ func (x *UUID) Reset() { } } -func (x *UUID) String() string { +func (x *IdReq) String() string { return protoimpl.X.MessageStringOf(x) } -func (*UUID) ProtoMessage() {} +func (*IdReq) ProtoMessage() {} -func (x *UUID) ProtoReflect() protoreflect.Message { +func (x *IdReq) ProtoReflect() protoreflect.Message { mi := &file_protobuf_avs_proto_msgTypes[0] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) @@ -341,14 +228,14 @@ func (x *UUID) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use UUID.ProtoReflect.Descriptor instead. -func (*UUID) Descriptor() ([]byte, []int) { +// Deprecated: Use IdReq.ProtoReflect.Descriptor instead. +func (*IdReq) Descriptor() ([]byte, []int) { return file_protobuf_avs_proto_rawDescGZIP(), []int{0} } -func (x *UUID) GetBytes() string { +func (x *IdReq) GetId() string { if x != nil { - return x.Bytes + return x.Id } return "" } @@ -566,19 +453,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"` + Epochs []int64 `protobuf:"varint,1,rep,packed,name=epochs,proto3" json:"epochs,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 +470,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 +488,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 { +func (x *FixedEpochCondition) GetEpochs() []int64 { 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 { - if x != nil { - return x.Expression + return x.Epochs } 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"` + Schedule []string `protobuf:"bytes,1,rep,name=schedule,proto3" json:"schedule,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 +518,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 +536,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) GetSchedule() []string { if x != nil { - return x.Fixed + return x.Schedule } 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 +565,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 +583,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 { - if x != nil { - return x.ContractAddress - } - return "" -} - -func (x *ContractQueryCondition) GetCallmsg() string { +func (x *BlockCondition) GetInterval() int64 { if x != nil { - return x.Callmsg + return x.Interval } - return "" + return 0 } // An arbitrary expression to express the condition. @@ -764,7 +607,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 +615,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 +624,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 +642,145 @@ 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 + + // Types that are assignable to TriggerType: + // + // *TaskTrigger_Manual + // *TaskTrigger_FixedTime + // *TaskTrigger_Cron + // *TaskTrigger_Block + // *TaskTrigger_Event + TriggerType isTaskTrigger_TriggerType `protobuf_oneof:"trigger_type"` +} + +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 (m *TaskTrigger) GetTriggerType() isTaskTrigger_TriggerType { + if m != nil { + return m.TriggerType + } + return nil +} + +func (x *TaskTrigger) GetManual() bool { + if x, ok := x.GetTriggerType().(*TaskTrigger_Manual); ok { + return x.Manual + } + return false +} + +func (x *TaskTrigger) GetFixedTime() *FixedEpochCondition { + if x, ok := x.GetTriggerType().(*TaskTrigger_FixedTime); ok { + return x.FixedTime + } + return nil +} + +func (x *TaskTrigger) GetCron() *CronCondition { + if x, ok := x.GetTriggerType().(*TaskTrigger_Cron); ok { + return x.Cron + } + return nil +} + +func (x *TaskTrigger) GetBlock() *BlockCondition { + if x, ok := x.GetTriggerType().(*TaskTrigger_Block); ok { + return x.Block + } + return nil +} + +func (x *TaskTrigger) GetEvent() *EventCondition { + if x, ok := x.GetTriggerType().(*TaskTrigger_Event); ok { + return x.Event + } + return nil +} + +type isTaskTrigger_TriggerType interface { + isTaskTrigger_TriggerType() +} + +type TaskTrigger_Manual struct { + Manual bool `protobuf:"varint,1,opt,name=manual,proto3,oneof"` +} + +type TaskTrigger_FixedTime struct { + // run at a specific epoch, name inspired by unix `at` utility + FixedTime *FixedEpochCondition `protobuf:"bytes,2,opt,name=fixed_time,json=fixedTime,proto3,oneof"` +} + +type TaskTrigger_Cron struct { + // interval such as every hour/day/ etc can be converted to cronsyntax by the sdk/studio + Cron *CronCondition `protobuf:"bytes,3,opt,name=cron,proto3,oneof"` +} + +type TaskTrigger_Block struct { + // currently the only support syntax is every blocks + Block *BlockCondition `protobuf:"bytes,4,opt,name=block,proto3,oneof"` +} + +type TaskTrigger_Event struct { + // support filter by event expression such as topic0, topic1, topoc2 and event_data and contract_address + Event *EventCondition `protobuf:"bytes,5,opt,name=event,proto3,oneof"` +} + +func (*TaskTrigger_Manual) isTaskTrigger_TriggerType() {} + +func (*TaskTrigger_FixedTime) isTaskTrigger_TriggerType() {} + +func (*TaskTrigger_Cron) isTaskTrigger_TriggerType() {} + +func (*TaskTrigger_Block) isTaskTrigger_TriggerType() {} + +func (*TaskTrigger_Event) isTaskTrigger_TriggerType() {} + type SyncTasksResp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -824,7 +794,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 +807,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 +820,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 +844,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 +853,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 +880,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,66 +937,123 @@ 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 "" +} + +type ContractReadNode 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 *ContractReadNode) Reset() { + *x = ContractReadNode{} + if protoimpl.UnsafeEnabled { + mi := &file_protobuf_avs_proto_msgTypes[12] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *ContractReadNode) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*ContractReadNode) ProtoMessage() {} + +func (x *ContractReadNode) 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 ContractReadNode.ProtoReflect.Descriptor instead. +func (*ContractReadNode) Descriptor() ([]byte, []int) { + return file_protobuf_avs_proto_rawDescGZIP(), []int{12} +} + +func (x *ContractReadNode) GetContractAddress() string { + if x != nil { + return x.ContractAddress } return "" } -func (x *ContractExecution) GetEncodedParams() string { +func (x *ContractReadNode) GetCallData() string { if x != nil { - return x.EncodedParams + return x.CallData + } + return "" +} + +func (x *ContractReadNode) GetContractAbi() string { + if x != nil { + return x.ContractAbi } return "" } -type GraphQLDataQuery struct { +type GraphQLQueryNode struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - // TODO: support graphql variable - Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` - Query string `protobuf:"bytes,2,opt,name=query,proto3" json:"query,omitempty"` + Url string `protobuf:"bytes,1,opt,name=url,proto3" json:"url,omitempty"` + Query string `protobuf:"bytes,2,opt,name=query,proto3" json:"query,omitempty"` + Variables map[string]string `protobuf:"bytes,3,rep,name=variables,proto3" json:"variables,omitempty" protobuf_key:"bytes,1,opt,name=key,proto3" protobuf_val:"bytes,2,opt,name=value,proto3"` } -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 +1064,33 @@ 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 { +func (x *GraphQLQueryNode) GetVariables() map[string]string { + if x != nil { + return x.Variables + } + return nil +} + +type RestAPINode struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -1064,25 +1098,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 +1128,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,51 +1197,52 @@ 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 "" } -type ConditionJump struct { +type Condition struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Expression string `protobuf:"bytes,1,opt,name=expression,proto3" json:"expression,omitempty"` - Next string `protobuf:"bytes,2,opt,name=next,proto3" json:"next,omitempty"` + Id string `protobuf:"bytes,1,opt,name=id,proto3" json:"id,omitempty"` + Type string `protobuf:"bytes,2,opt,name=type,proto3" json:"type,omitempty"` + Expression string `protobuf:"bytes,3,opt,name=expression,proto3" json:"expression,omitempty"` } -func (x *ConditionJump) Reset() { - *x = ConditionJump{} +func (x *Condition) Reset() { + *x = Condition{} 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) } } -func (x *ConditionJump) String() string { +func (x *Condition) String() string { return protoimpl.X.MessageStringOf(x) } -func (*ConditionJump) ProtoMessage() {} +func (*Condition) ProtoMessage() {} -func (x *ConditionJump) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[14] +func (x *Condition) ProtoReflect() protoreflect.Message { + mi := &file_protobuf_avs_proto_msgTypes[16] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1210,52 +1253,57 @@ func (x *ConditionJump) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use ConditionJump.ProtoReflect.Descriptor instead. -func (*ConditionJump) Descriptor() ([]byte, []int) { - return file_protobuf_avs_proto_rawDescGZIP(), []int{14} +// Deprecated: Use Condition.ProtoReflect.Descriptor instead. +func (*Condition) Descriptor() ([]byte, []int) { + return file_protobuf_avs_proto_rawDescGZIP(), []int{16} } -func (x *ConditionJump) GetExpression() string { +func (x *Condition) GetId() string { if x != nil { - return x.Expression + return x.Id } return "" } -func (x *ConditionJump) GetNext() string { +func (x *Condition) GetType() string { if x != nil { - return x.Next + return x.Type } return "" } -type BranchAction struct { +func (x *Condition) GetExpression() string { + if x != nil { + return x.Expression + } + return "" +} + +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"` + Conditions []*Condition `protobuf:"bytes,1,rep,name=conditions,proto3" json:"conditions,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 +1314,151 @@ 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) GetConditions() []*Condition { if x != nil { - return x.If + return x.Conditions } return nil } -func (x *BranchAction) GetElseIfs() []*ConditionJump { +type FilterNode struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // 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 *FilterNode) Reset() { + *x = FilterNode{} + if protoimpl.UnsafeEnabled { + mi := &file_protobuf_avs_proto_msgTypes[18] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *FilterNode) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*FilterNode) ProtoMessage() {} + +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 { + ms.StoreMessageInfo(mi) + } + return ms + } + return mi.MessageOf(x) +} + +// Deprecated: Use FilterNode.ProtoReflect.Descriptor instead. +func (*FilterNode) Descriptor() ([]byte, []int) { + return file_protobuf_avs_proto_rawDescGZIP(), []int{18} +} + +func (x *FilterNode) GetExpression() string { if x != nil { - return x.ElseIfs + return x.Expression } - return nil + return "" +} + +// LoopNode currently not support, but we pre-defined to reverse the field id +type LoopNode struct { + state protoimpl.MessageState + sizeCache protoimpl.SizeCache + unknownFields protoimpl.UnknownFields + + // name the iteration key and value. + IterVar string `protobuf:"bytes,1,opt,name=iter_var,json=iterVar,proto3" json:"iter_var,omitempty"` + IterKey string `protobuf:"bytes,2,opt,name=iter_key,json=iterKey,proto3" json:"iter_key,omitempty"` +} + +func (x *LoopNode) Reset() { + *x = LoopNode{} + if protoimpl.UnsafeEnabled { + mi := &file_protobuf_avs_proto_msgTypes[19] + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + ms.StoreMessageInfo(mi) + } +} + +func (x *LoopNode) String() string { + return protoimpl.X.MessageStringOf(x) +} + +func (*LoopNode) ProtoMessage() {} + +func (x *LoopNode) 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 LoopNode.ProtoReflect.Descriptor instead. +func (*LoopNode) Descriptor() ([]byte, []int) { + return file_protobuf_avs_proto_rawDescGZIP(), []int{19} } -func (x *BranchAction) GetElse() *ConditionJump { +func (x *LoopNode) GetIterVar() string { if x != nil { - return x.Else + return x.IterVar } - return nil + return "" } -type TaskAction struct { +func (x *LoopNode) GetIterKey() string { + if x != nil { + return x.IterKey + } + return "" +} + +// The edge is relationship or direct between node +type TaskEdge 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"` + 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 *TaskAction) Reset() { - *x = TaskAction{} +func (x *TaskEdge) Reset() { + *x = TaskEdge{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[16] + mi := &file_protobuf_avs_proto_msgTypes[20] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *TaskAction) String() string { +func (x *TaskEdge) String() string { return protoimpl.X.MessageStringOf(x) } -func (*TaskAction) ProtoMessage() {} +func (*TaskEdge) ProtoMessage() {} -func (x *TaskAction) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[16] +func (x *TaskEdge) 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 { @@ -1344,80 +1469,235 @@ 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 TaskEdge.ProtoReflect.Descriptor instead. +func (*TaskEdge) Descriptor() ([]byte, []int) { + return file_protobuf_avs_proto_rawDescGZIP(), []int{20} } -func (x *TaskAction) GetTaskType() TaskType { +func (x *TaskEdge) GetId() string { if x != nil { - return x.TaskType + 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 + + 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 TaskType: + // + // *TaskNode_EthTransfer + // *TaskNode_ContractWrite + // *TaskNode_ContractRead + // *TaskNode_GraphqlDataQuery + // *TaskNode_RestApi + // *TaskNode_Branch + // *TaskNode_Filter + // *TaskNode_Loop + // *TaskNode_CustomCode + TaskType isTaskNode_TaskType `protobuf_oneof:"task_type"` +} + +func (x *TaskNode) Reset() { + *x = TaskNode{} + if protoimpl.UnsafeEnabled { + mi := &file_protobuf_avs_proto_msgTypes[21] + 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[21] + if protoimpl.UnsafeEnabled && x != nil { + ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) + if ms.LoadMessageInfo() == nil { + ms.StoreMessageInfo(mi) + } + return ms } - return TaskType_ETHTransferTask + return mi.MessageOf(x) } -func (x *TaskAction) GetId() string { +// Deprecated: Use TaskNode.ProtoReflect.Descriptor instead. +func (*TaskNode) Descriptor() ([]byte, []int) { + return file_protobuf_avs_proto_rawDescGZIP(), []int{21} +} + +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) GetTaskType() isTaskNode_TaskType { + if m != nil { + return m.TaskType } return nil } -func (x *TaskAction) GetEthTransfer() *ETHTransfer { - if x != nil { +func (x *TaskNode) GetEthTransfer() *ETHTransferNode { + if x, ok := x.GetTaskType().(*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.GetTaskType().(*TaskNode_ContractWrite); ok { + return x.ContractWrite } return nil } -func (x *TaskAction) GetGraphqlDataQuery() *GraphQLDataQuery { - if x != nil { +func (x *TaskNode) GetContractRead() *ContractReadNode { + if x, ok := x.GetTaskType().(*TaskNode_ContractRead); ok { + return x.ContractRead + } + return nil +} + +func (x *TaskNode) GetGraphqlDataQuery() *GraphQLQueryNode { + if x, ok := x.GetTaskType().(*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.GetTaskType().(*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.GetTaskType().(*TaskNode_Branch); ok { + return x.Branch + } + return nil +} + +func (x *TaskNode) GetFilter() *FilterNode { + if x, ok := x.GetTaskType().(*TaskNode_Filter); ok { + return x.Filter + } + return nil +} + +func (x *TaskNode) GetLoop() *LoopNode { + if x, ok := x.GetTaskType().(*TaskNode_Loop); ok { + return x.Loop + } + return nil +} + +func (x *TaskNode) GetCustomCode() *CustomCodeNode { + if x, ok := x.GetTaskType().(*TaskNode_CustomCode); ok { return x.CustomCode } return nil } -func (x *TaskAction) GetBranch() *BranchAction { - if x != nil { - return x.Branch - } - return nil -} +type isTaskNode_TaskType interface { + isTaskNode_TaskType() +} + +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 *ContractReadNode `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_Loop struct { + Loop *LoopNode `protobuf:"bytes,17,opt,name=loop,proto3,oneof"` +} + +type TaskNode_CustomCode struct { + CustomCode *CustomCodeNode `protobuf:"bytes,18,opt,name=custom_code,json=customCode,proto3,oneof"` +} + +func (*TaskNode_EthTransfer) isTaskNode_TaskType() {} + +func (*TaskNode_ContractWrite) isTaskNode_TaskType() {} + +func (*TaskNode_ContractRead) isTaskNode_TaskType() {} + +func (*TaskNode_GraphqlDataQuery) isTaskNode_TaskType() {} + +func (*TaskNode_RestApi) isTaskNode_TaskType() {} + +func (*TaskNode_Branch) isTaskNode_TaskType() {} + +func (*TaskNode_Filter) isTaskNode_TaskType() {} + +func (*TaskNode_Loop) isTaskNode_TaskType() {} + +func (*TaskNode_CustomCode) isTaskNode_TaskType() {} type Execution struct { state protoimpl.MessageState @@ -1432,7 +1712,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[22] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1445,7 +1725,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[22] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1458,7 +1738,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{22} } func (x *Execution) GetEpoch() int64 { @@ -1487,28 +1767,29 @@ 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 string `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,4,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,5,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,6,opt,name=memo,proto3" json:"memo,omitempty"` + CompletedAt int64 `protobuf:"varint,7,opt,name=completed_at,json=completedAt,proto3" json:"completed_at,omitempty"` + // limit on how many time this task can run. Set to 0 will make it run unlimited until cancelling or reaching its expired time + MaxExecution int64 `protobuf:"varint,8,opt,name=max_execution,json=maxExecution,proto3" json:"max_execution,omitempty"` + Status TaskStatus `protobuf:"varint,9,opt,name=status,proto3,enum=aggregator.TaskStatus" json:"status,omitempty"` + Trigger *TaskTrigger `protobuf:"bytes,10,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[23] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1521,7 +1802,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[23] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1534,14 +1815,14 @@ 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{23} } -func (x *Task) GetId() *UUID { +func (x *Task) GetId() string { if x != nil { return x.Id } - return nil + return "" } func (x *Task) GetOwner() string { @@ -1558,20 +1839,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 +1867,13 @@ func (x *Task) GetCompletedAt() int64 { return 0 } +func (x *Task) GetMaxExecution() int64 { + if x != nil { + return x.MaxExecution + } + return 0 +} + func (x *Task) GetStatus() TaskStatus { if x != nil { return x.Status @@ -1607,11 +1881,25 @@ func (x *Task) GetStatus() TaskStatus { return TaskStatus_Active } -func (x *Task) GetRepeatable() bool { +func (x *Task) GetTrigger() *TaskTrigger { + if x != nil { + return x.Trigger + } + return nil +} + +func (x *Task) GetNodes() []*TaskNode { if x != nil { - return x.Repeatable + return x.Nodes } - return false + return nil +} + +func (x *Task) GetEdges() []*TaskEdge { + if x != nil { + return x.Edges + } + return nil } func (x *Task) GetExecutions() []*Execution { @@ -1626,22 +1914,22 @@ 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"` - // A repeatable task will continue to be run - Repeatable bool `protobuf:"varint,6,opt,name=repeatable,proto3" json:"repeatable,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"` + MaxExecution int64 `protobuf:"varint,4,opt,name=max_execution,json=maxExecution,proto3" json:"max_execution,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[24] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1654,7 +1942,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[24] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1667,7 +1955,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{24} } func (x *CreateTaskReq) GetTrigger() *TaskTrigger { @@ -1677,13 +1965,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 +1979,20 @@ func (x *CreateTaskReq) GetExpiredAt() int64 { return 0 } +func (x *CreateTaskReq) GetMaxExecution() int64 { + if x != nil { + return x.MaxExecution + } + return 0 +} + +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 +2000,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 +2025,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[25] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1743,7 +2038,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[25] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1756,7 +2051,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{25} } func (x *CreateTaskResp) GetId() string { @@ -1777,7 +2072,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[26] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1790,7 +2085,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[26] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1803,7 +2098,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{26} } func (x *NonceRequest) GetOwner() string { @@ -1824,7 +2119,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[27] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1837,7 +2132,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[27] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1850,7 +2145,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{27} } func (x *NonceResp) GetNonce() string { @@ -1860,7 +2155,7 @@ func (x *NonceResp) GetNonce() string { return "" } -type AddressRequest struct { +type ListWalletReq struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -1871,23 +2166,23 @@ type AddressRequest struct { Salt string `protobuf:"bytes,2,opt,name=salt,proto3" json:"salt,omitempty"` } -func (x *AddressRequest) Reset() { - *x = AddressRequest{} +func (x *ListWalletReq) Reset() { + *x = ListWalletReq{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[23] + mi := &file_protobuf_avs_proto_msgTypes[28] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *AddressRequest) String() string { +func (x *ListWalletReq) String() string { return protoimpl.X.MessageStringOf(x) } -func (*AddressRequest) ProtoMessage() {} +func (*ListWalletReq) ProtoMessage() {} -func (x *AddressRequest) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[23] +func (x *ListWalletReq) ProtoReflect() protoreflect.Message { + mi := &file_protobuf_avs_proto_msgTypes[28] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1898,19 +2193,19 @@ func (x *AddressRequest) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use AddressRequest.ProtoReflect.Descriptor instead. -func (*AddressRequest) Descriptor() ([]byte, []int) { - return file_protobuf_avs_proto_rawDescGZIP(), []int{23} +// Deprecated: Use ListWalletReq.ProtoReflect.Descriptor instead. +func (*ListWalletReq) Descriptor() ([]byte, []int) { + return file_protobuf_avs_proto_rawDescGZIP(), []int{28} } -func (x *AddressRequest) GetFactory() string { +func (x *ListWalletReq) GetFactory() string { if x != nil { return x.Factory } return "" } -func (x *AddressRequest) GetSalt() string { +func (x *ListWalletReq) GetSalt() string { if x != nil { return x.Salt } @@ -1930,7 +2225,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[29] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -1943,7 +2238,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[29] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -1956,7 +2251,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{29} } func (x *SmartWallet) GetAddress() string { @@ -1980,7 +2275,7 @@ func (x *SmartWallet) GetFactory() string { return "" } -type AddressResp struct { +type ListWalletResp struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields @@ -1988,23 +2283,23 @@ type AddressResp struct { Wallets []*SmartWallet `protobuf:"bytes,1,rep,name=wallets,proto3" json:"wallets,omitempty"` } -func (x *AddressResp) Reset() { - *x = AddressResp{} +func (x *ListWalletResp) Reset() { + *x = ListWalletResp{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[25] + mi := &file_protobuf_avs_proto_msgTypes[30] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } } -func (x *AddressResp) String() string { +func (x *ListWalletResp) String() string { return protoimpl.X.MessageStringOf(x) } -func (*AddressResp) ProtoMessage() {} +func (*ListWalletResp) ProtoMessage() {} -func (x *AddressResp) ProtoReflect() protoreflect.Message { - mi := &file_protobuf_avs_proto_msgTypes[25] +func (x *ListWalletResp) ProtoReflect() protoreflect.Message { + mi := &file_protobuf_avs_proto_msgTypes[30] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2015,12 +2310,12 @@ func (x *AddressResp) ProtoReflect() protoreflect.Message { return mi.MessageOf(x) } -// Deprecated: Use AddressResp.ProtoReflect.Descriptor instead. -func (*AddressResp) Descriptor() ([]byte, []int) { - return file_protobuf_avs_proto_rawDescGZIP(), []int{25} +// Deprecated: Use ListWalletResp.ProtoReflect.Descriptor instead. +func (*ListWalletResp) Descriptor() ([]byte, []int) { + return file_protobuf_avs_proto_rawDescGZIP(), []int{30} } -func (x *AddressResp) GetWallets() []*SmartWallet { +func (x *ListWalletResp) GetWallets() []*SmartWallet { if x != nil { return x.Wallets } @@ -2039,7 +2334,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[31] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2052,7 +2347,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[31] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2065,7 +2360,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{31} } func (x *ListTasksReq) GetSmartWalletAddress() string { @@ -2086,7 +2381,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[32] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2099,7 +2394,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[32] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2112,7 +2407,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{32} } func (x *ListTasksResp) GetTasks() []*Task { @@ -2135,7 +2430,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[33] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2148,7 +2443,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[33] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2161,7 +2456,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{33} } func (x *GetKeyReq) GetOwner() string { @@ -2196,7 +2491,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[34] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2209,7 +2504,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[34] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2222,7 +2517,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{34} } func (x *KeyResp) GetKey() string { @@ -2245,7 +2540,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[35] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2258,7 +2553,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[35] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2271,7 +2566,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{35} } func (x *UpdateChecksReq) GetAddress() string { @@ -2306,7 +2601,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[36] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2319,7 +2614,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[36] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2332,7 +2627,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{36} } func (x *UpdateChecksResp) GetUpdatedAt() *timestamppb.Timestamp { @@ -2355,7 +2650,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[37] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2368,7 +2663,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[37] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2381,7 +2676,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{37} } func (x *CreateWalletReq) GetSalt() string { @@ -2403,13 +2698,15 @@ type CreateWalletResp struct { sizeCache protoimpl.SizeCache unknownFields protoimpl.UnknownFields - Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + Address string `protobuf:"bytes,1,opt,name=address,proto3" json:"address,omitempty"` + Salt string `protobuf:"bytes,2,opt,name=salt,proto3" json:"salt,omitempty"` + FactoryAddress string `protobuf:"bytes,3,opt,name=factory_address,json=factoryAddress,proto3" json:"factory_address,omitempty"` } func (x *CreateWalletResp) Reset() { *x = CreateWalletResp{} if protoimpl.UnsafeEnabled { - mi := &file_protobuf_avs_proto_msgTypes[33] + mi := &file_protobuf_avs_proto_msgTypes[38] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2422,7 +2719,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[38] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2435,7 +2732,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{38} } func (x *CreateWalletResp) GetAddress() string { @@ -2445,6 +2742,20 @@ func (x *CreateWalletResp) GetAddress() string { return "" } +func (x *CreateWalletResp) GetSalt() string { + if x != nil { + return x.Salt + } + return "" +} + +func (x *CreateWalletResp) GetFactoryAddress() string { + if x != nil { + return x.FactoryAddress + } + return "" +} + type Checkin_Status struct { state protoimpl.MessageState sizeCache protoimpl.SizeCache @@ -2458,7 +2769,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[39] ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) ms.StoreMessageInfo(mi) } @@ -2471,7 +2782,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[39] if protoimpl.UnsafeEnabled && x != nil { ms := protoimpl.X.MessageStateOf(protoimpl.Pointer(x)) if ms.LoadMessageInfo() == nil { @@ -2517,352 +2828,376 @@ var file_protobuf_avs_proto_rawDesc = []byte{ 0x66, 0x2f, 0x74, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x1a, 0x1e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2f, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2f, 0x77, 0x72, 0x61, 0x70, 0x70, 0x65, 0x72, 0x73, 0x2e, 0x70, 0x72, 0x6f, 0x74, - 0x6f, 0x22, 0x1c, 0x0a, 0x04, 0x55, 0x55, 0x49, 0x44, 0x12, 0x14, 0x0a, 0x05, 0x62, 0x79, 0x74, - 0x65, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x62, 0x79, 0x74, 0x65, 0x73, 0x22, - 0xe3, 0x02, 0x0a, 0x07, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x69, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, - 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x61, - 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, - 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, - 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, - 0x75, 0x72, 0x65, 0x12, 0x32, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, + 0x6f, 0x22, 0x17, 0x0a, 0x05, 0x49, 0x64, 0x52, 0x65, 0x71, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0xe3, 0x02, 0x0a, 0x07, 0x43, + 0x68, 0x65, 0x63, 0x6b, 0x69, 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, + 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x32, + 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, + 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x43, 0x68, 0x65, 0x63, + 0x6b, 0x69, 0x6e, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x05, 0x20, + 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, 0x6e, 0x12, 0x20, 0x0a, 0x0b, + 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x50, 0x6f, 0x72, 0x74, 0x18, 0x06, 0x20, 0x01, 0x28, + 0x05, 0x52, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x50, 0x6f, 0x72, 0x74, 0x12, 0x1a, + 0x0a, 0x08, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x49, 0x50, 0x18, 0x07, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x08, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x49, 0x50, 0x1a, 0x83, 0x01, 0x0a, 0x06, 0x53, + 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x70, 0x74, 0x69, 0x6d, 0x65, 0x12, 0x1e, 0x0a, + 0x0a, 0x71, 0x75, 0x65, 0x75, 0x65, 0x44, 0x65, 0x70, 0x74, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x0a, 0x71, 0x75, 0x65, 0x75, 0x65, 0x44, 0x65, 0x70, 0x74, 0x68, 0x12, 0x41, 0x0a, + 0x0e, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, 0x18, + 0x03, 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, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x48, 0x65, 0x61, 0x72, 0x74, 0x62, 0x65, 0x61, 0x74, + 0x22, 0x48, 0x0a, 0x0b, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x69, 0x6e, 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, 0x7f, 0x0a, 0x0c, 0x53, 0x79, + 0x6e, 0x63, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, + 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, + 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, + 0x72, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x6d, 0x6f, 0x6e, 0x6f, 0x74, 0x6f, 0x6e, 0x69, 0x63, 0x5f, + 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0e, 0x6d, 0x6f, 0x6e, + 0x6f, 0x74, 0x6f, 0x6e, 0x69, 0x63, 0x43, 0x6c, 0x6f, 0x63, 0x6b, 0x22, 0x2d, 0x0a, 0x13, 0x46, + 0x69, 0x78, 0x65, 0x64, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, + 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x18, 0x01, 0x20, 0x03, + 0x28, 0x03, 0x52, 0x06, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x73, 0x22, 0x2b, 0x0a, 0x0d, 0x43, 0x72, + 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x73, + 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x18, 0x01, 0x20, 0x03, 0x28, 0x09, 0x52, 0x08, 0x73, + 0x63, 0x68, 0x65, 0x64, 0x75, 0x6c, 0x65, 0x22, 0x2c, 0x0a, 0x0e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, + 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1a, 0x0a, 0x08, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x76, 0x61, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x08, 0x69, 0x6e, 0x74, + 0x65, 0x72, 0x76, 0x61, 0x6c, 0x22, 0x30, 0x0a, 0x0e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, 0x6f, + 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x72, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x78, 0x70, + 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x92, 0x02, 0x0a, 0x0b, 0x54, 0x61, 0x73, 0x6b, + 0x54, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x12, 0x18, 0x0a, 0x06, 0x6d, 0x61, 0x6e, 0x75, 0x61, + 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x08, 0x48, 0x00, 0x52, 0x06, 0x6d, 0x61, 0x6e, 0x75, 0x61, + 0x6c, 0x12, 0x40, 0x0a, 0x0a, 0x66, 0x69, 0x78, 0x65, 0x64, 0x5f, 0x74, 0x69, 0x6d, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1f, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, + 0x6f, 0x72, 0x2e, 0x46, 0x69, 0x78, 0x65, 0x64, 0x45, 0x70, 0x6f, 0x63, 0x68, 0x43, 0x6f, 0x6e, + 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x09, 0x66, 0x69, 0x78, 0x65, 0x64, 0x54, + 0x69, 0x6d, 0x65, 0x12, 0x2f, 0x0a, 0x04, 0x63, 0x72, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x19, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x43, + 0x72, 0x6f, 0x6e, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x04, + 0x63, 0x72, 0x6f, 0x6e, 0x12, 0x32, 0x0a, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, - 0x2e, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x69, 0x6e, 0x2e, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x52, - 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x18, 0x0a, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, - 0x6f, 0x6e, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x76, 0x65, 0x72, 0x73, 0x69, 0x6f, - 0x6e, 0x12, 0x20, 0x0a, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x50, 0x6f, 0x72, 0x74, - 0x18, 0x06, 0x20, 0x01, 0x28, 0x05, 0x52, 0x0b, 0x6d, 0x65, 0x74, 0x72, 0x69, 0x63, 0x73, 0x50, - 0x6f, 0x72, 0x74, 0x12, 0x1a, 0x0a, 0x08, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x49, 0x50, 0x18, - 0x07, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x72, 0x65, 0x6d, 0x6f, 0x74, 0x65, 0x49, 0x50, 0x1a, - 0x83, 0x01, 0x0a, 0x06, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x16, 0x0a, 0x06, 0x75, 0x70, - 0x74, 0x69, 0x6d, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x03, 0x52, 0x06, 0x75, 0x70, 0x74, 0x69, - 0x6d, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x71, 0x75, 0x65, 0x75, 0x65, 0x44, 0x65, 0x70, 0x74, 0x68, - 0x18, 0x02, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0a, 0x71, 0x75, 0x65, 0x75, 0x65, 0x44, 0x65, 0x70, - 0x74, 0x68, 0x12, 0x41, 0x0a, 0x0e, 0x6c, 0x61, 0x73, 0x74, 0x5f, 0x68, 0x65, 0x61, 0x72, 0x74, - 0x62, 0x65, 0x61, 0x74, 0x18, 0x03, 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, 0x0d, 0x6c, 0x61, 0x73, 0x74, 0x48, 0x65, 0x61, 0x72, - 0x74, 0x62, 0x65, 0x61, 0x74, 0x22, 0x48, 0x0a, 0x0b, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x69, 0x6e, - 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, - 0x7f, 0x0a, 0x0c, 0x53, 0x79, 0x6e, 0x63, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x12, - 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, - 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, - 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, - 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, - 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x27, 0x0a, 0x0f, 0x6d, 0x6f, 0x6e, 0x6f, 0x74, - 0x6f, 0x6e, 0x69, 0x63, 0x5f, 0x63, 0x6c, 0x6f, 0x63, 0x6b, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, - 0x52, 0x0e, 0x6d, 0x6f, 0x6e, 0x6f, 0x74, 0x6f, 0x6e, 0x69, 0x63, 0x43, 0x6c, 0x6f, 0x63, 0x6b, - 0x22, 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, + 0x2e, 0x42, 0x6c, 0x6f, 0x63, 0x6b, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x48, + 0x00, 0x52, 0x05, 0x62, 0x6c, 0x6f, 0x63, 0x6b, 0x12, 0x32, 0x0a, 0x05, 0x65, 0x76, 0x65, 0x6e, + 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, + 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x45, 0x76, 0x65, 0x6e, 0x74, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, + 0x69, 0x6f, 0x6e, 0x48, 0x00, 0x52, 0x05, 0x65, 0x76, 0x65, 0x6e, 0x74, 0x42, 0x0e, 0x0a, 0x0c, + 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0x70, 0x0a, 0x0d, + 0x53, 0x79, 0x6e, 0x63, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x0e, 0x0a, + 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x1c, 0x0a, + 0x09, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x09, 0x63, 0x68, 0x65, 0x63, 0x6b, 0x54, 0x79, 0x70, 0x65, 0x12, 0x31, 0x0a, 0x07, 0x74, + 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, + 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x72, + 0x69, 0x67, 0x67, 0x65, 0x72, 0x52, 0x07, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x22, 0x4b, + 0x0a, 0x0f, 0x45, 0x54, 0x48, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x4e, 0x6f, 0x64, + 0x65, 0x12, 0x20, 0x0a, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x64, 0x65, 0x73, 0x74, 0x69, 0x6e, 0x61, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x16, 0x0a, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x18, 0x02, 0x20, - 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 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, + 0x01, 0x28, 0x09, 0x52, 0x06, 0x61, 0x6d, 0x6f, 0x75, 0x6e, 0x74, 0x22, 0x7e, 0x0a, 0x11, 0x43, + 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, + 0x12, 0x29, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x61, 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x63, + 0x61, 0x6c, 0x6c, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, + 0x63, 0x61, 0x6c, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, + 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x62, 0x69, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, + 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x62, 0x69, 0x22, 0x7d, 0x0a, 0x10, 0x43, + 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x52, 0x65, 0x61, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x12, + 0x29, 0x0a, 0x10, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0f, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x61, 0x63, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1b, 0x0a, 0x09, 0x63, 0x61, + 0x6c, 0x6c, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x08, 0x63, + 0x61, 0x6c, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x72, + 0x61, 0x63, 0x74, 0x5f, 0x61, 0x62, 0x69, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0b, 0x63, + 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x41, 0x62, 0x69, 0x22, 0xc3, 0x01, 0x0a, 0x10, 0x47, + 0x72, 0x61, 0x70, 0x68, 0x51, 0x4c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4e, 0x6f, 0x64, 0x65, 0x12, + 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, 0x72, + 0x6c, 0x12, 0x14, 0x0a, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x71, 0x75, 0x65, 0x72, 0x79, 0x12, 0x49, 0x0a, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, + 0x62, 0x6c, 0x65, 0x73, 0x18, 0x03, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x2b, 0x2e, 0x61, 0x67, 0x67, + 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x47, 0x72, 0x61, 0x70, 0x68, 0x51, 0x4c, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x4e, 0x6f, 0x64, 0x65, 0x2e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, + 0x65, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x09, 0x76, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, + 0x65, 0x73, 0x1a, 0x3c, 0x0a, 0x0e, 0x56, 0x61, 0x72, 0x69, 0x61, 0x62, 0x6c, 0x65, 0x73, 0x45, + 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, + 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, + 0x22, 0xc7, 0x01, 0x0a, 0x0b, 0x52, 0x65, 0x73, 0x74, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, + 0x12, 0x10, 0x0a, 0x03, 0x75, 0x72, 0x6c, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x75, + 0x72, 0x6c, 0x12, 0x3e, 0x0a, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x18, 0x02, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x24, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, + 0x2e, 0x52, 0x65, 0x73, 0x74, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x2e, 0x48, 0x65, 0x61, + 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x52, 0x07, 0x68, 0x65, 0x61, 0x64, 0x65, + 0x72, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x62, 0x6f, 0x64, 0x79, 0x12, 0x16, 0x0a, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, + 0x18, 0x04, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x6d, 0x65, 0x74, 0x68, 0x6f, 0x64, 0x1a, 0x3a, + 0x0a, 0x0c, 0x48, 0x65, 0x61, 0x64, 0x65, 0x72, 0x73, 0x45, 0x6e, 0x74, 0x72, 0x79, 0x12, 0x10, + 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, + 0x12, 0x14, 0x0a, 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x05, 0x76, 0x61, 0x6c, 0x75, 0x65, 0x3a, 0x02, 0x38, 0x01, 0x22, 0x58, 0x0a, 0x0e, 0x43, 0x75, + 0x73, 0x74, 0x6f, 0x6d, 0x43, 0x6f, 0x64, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x2e, 0x0a, 0x04, + 0x74, 0x79, 0x70, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x1a, 0x2e, 0x61, 0x67, 0x67, + 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x43, 0x6f, + 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, 0x52, 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x16, 0x0a, 0x06, + 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, + 0x75, 0x72, 0x63, 0x65, 0x22, 0x4f, 0x0a, 0x09, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, + 0x6e, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, + 0x64, 0x12, 0x12, 0x0a, 0x04, 0x74, 0x79, 0x70, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x04, 0x74, 0x79, 0x70, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x72, 0x65, 0x73, 0x73, + 0x69, 0x6f, 0x6e, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x78, 0x70, 0x72, 0x65, + 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x43, 0x0a, 0x0a, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x4e, + 0x6f, 0x64, 0x65, 0x12, 0x35, 0x0a, 0x0a, 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, + 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x43, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, + 0x63, 0x6f, 0x6e, 0x64, 0x69, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0x2c, 0x0a, 0x0a, 0x46, 0x69, + 0x6c, 0x74, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x1e, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x72, + 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x0a, 0x65, 0x78, + 0x70, 0x72, 0x65, 0x73, 0x73, 0x69, 0x6f, 0x6e, 0x22, 0x40, 0x0a, 0x08, 0x4c, 0x6f, 0x6f, 0x70, + 0x4e, 0x6f, 0x64, 0x65, 0x12, 0x19, 0x0a, 0x08, 0x69, 0x74, 0x65, 0x72, 0x5f, 0x76, 0x61, 0x72, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x69, 0x74, 0x65, 0x72, 0x56, 0x61, 0x72, 0x12, + 0x19, 0x0a, 0x08, 0x69, 0x74, 0x65, 0x72, 0x5f, 0x6b, 0x65, 0x79, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x07, 0x69, 0x74, 0x65, 0x72, 0x4b, 0x65, 0x79, 0x22, 0x4a, 0x0a, 0x08, 0x54, 0x61, + 0x73, 0x6b, 0x45, 0x64, 0x67, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x16, 0x0a, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, + 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, 0x73, 0x6f, 0x75, 0x72, 0x63, 0x65, 0x12, 0x16, + 0x0a, 0x06, 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x06, + 0x74, 0x61, 0x72, 0x67, 0x65, 0x74, 0x22, 0xdd, 0x04, 0x0a, 0x08, 0x54, 0x61, 0x73, 0x6b, 0x4e, + 0x6f, 0x64, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x02, 0x69, 0x64, 0x12, 0x12, 0x0a, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x18, 0x03, 0x20, 0x01, 0x28, + 0x09, 0x52, 0x04, 0x6e, 0x61, 0x6d, 0x65, 0x12, 0x40, 0x0a, 0x0c, 0x65, 0x74, 0x68, 0x5f, 0x74, + 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1b, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x45, 0x54, 0x48, 0x54, 0x72, - 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 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, - 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, - 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, + 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x4e, 0x6f, 0x64, 0x65, 0x48, 0x00, 0x52, 0x0b, 0x65, 0x74, + 0x68, 0x54, 0x72, 0x61, 0x6e, 0x73, 0x66, 0x65, 0x72, 0x12, 0x46, 0x0a, 0x0e, 0x63, 0x6f, 0x6e, + 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x77, 0x72, 0x69, 0x74, 0x65, 0x18, 0x0b, 0x20, 0x01, 0x28, + 0x0b, 0x32, 0x1d, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x43, + 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x57, 0x72, 0x69, 0x74, 0x65, 0x4e, 0x6f, 0x64, 0x65, + 0x48, 0x00, 0x52, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x57, 0x72, 0x69, 0x74, + 0x65, 0x12, 0x43, 0x0a, 0x0d, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x5f, 0x72, 0x65, + 0x61, 0x64, 0x18, 0x0c, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, + 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x43, 0x6f, 0x6e, 0x74, 0x72, 0x61, 0x63, 0x74, 0x52, 0x65, + 0x61, 0x64, 0x4e, 0x6f, 0x64, 0x65, 0x48, 0x00, 0x52, 0x0c, 0x63, 0x6f, 0x6e, 0x74, 0x72, 0x61, + 0x63, 0x74, 0x52, 0x65, 0x61, 0x64, 0x12, 0x4c, 0x0a, 0x12, 0x67, 0x72, 0x61, 0x70, 0x68, 0x71, + 0x6c, 0x5f, 0x64, 0x61, 0x74, 0x61, 0x5f, 0x71, 0x75, 0x65, 0x72, 0x79, 0x18, 0x0d, 0x20, 0x01, + 0x28, 0x0b, 0x32, 0x1c, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, + 0x47, 0x72, 0x61, 0x70, 0x68, 0x51, 0x4c, 0x51, 0x75, 0x65, 0x72, 0x79, 0x4e, 0x6f, 0x64, 0x65, + 0x48, 0x00, 0x52, 0x10, 0x67, 0x72, 0x61, 0x70, 0x68, 0x71, 0x6c, 0x44, 0x61, 0x74, 0x61, 0x51, + 0x75, 0x65, 0x72, 0x79, 0x12, 0x34, 0x0a, 0x08, 0x72, 0x65, 0x73, 0x74, 0x5f, 0x61, 0x70, 0x69, + 0x18, 0x0e, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, + 0x74, 0x6f, 0x72, 0x2e, 0x52, 0x65, 0x73, 0x74, 0x41, 0x50, 0x49, 0x4e, 0x6f, 0x64, 0x65, 0x48, + 0x00, 0x52, 0x07, 0x72, 0x65, 0x73, 0x74, 0x41, 0x70, 0x69, 0x12, 0x30, 0x0a, 0x06, 0x62, 0x72, + 0x61, 0x6e, 0x63, 0x68, 0x18, 0x0f, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, 0x67, 0x67, + 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x42, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x4e, 0x6f, + 0x64, 0x65, 0x48, 0x00, 0x52, 0x06, 0x62, 0x72, 0x61, 0x6e, 0x63, 0x68, 0x12, 0x30, 0x0a, 0x06, + 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x18, 0x10, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x16, 0x2e, 0x61, + 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x46, 0x69, 0x6c, 0x74, 0x65, 0x72, + 0x4e, 0x6f, 0x64, 0x65, 0x48, 0x00, 0x52, 0x06, 0x66, 0x69, 0x6c, 0x74, 0x65, 0x72, 0x12, 0x2a, + 0x0a, 0x04, 0x6c, 0x6f, 0x6f, 0x70, 0x18, 0x11, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x61, + 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x4c, 0x6f, 0x6f, 0x70, 0x4e, 0x6f, + 0x64, 0x65, 0x48, 0x00, 0x52, 0x04, 0x6c, 0x6f, 0x6f, 0x70, 0x12, 0x3d, 0x0a, 0x0b, 0x63, 0x75, + 0x73, 0x74, 0x6f, 0x6d, 0x5f, 0x63, 0x6f, 0x64, 0x65, 0x18, 0x12, 0x20, 0x01, 0x28, 0x0b, 0x32, + 0x1a, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x43, 0x75, 0x73, + 0x74, 0x6f, 0x6d, 0x43, 0x6f, 0x64, 0x65, 0x4e, 0x6f, 0x64, 0x65, 0x48, 0x00, 0x52, 0x0a, 0x63, + 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x43, 0x6f, 0x64, 0x65, 0x42, 0x0b, 0x0a, 0x09, 0x74, 0x61, 0x73, + 0x6b, 0x5f, 0x74, 0x79, 0x70, 0x65, 0x22, 0x59, 0x0a, 0x09, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, + 0x69, 0x6f, 0x6e, 0x12, 0x14, 0x0a, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x18, 0x01, 0x20, 0x01, + 0x28, 0x03, 0x52, 0x05, 0x65, 0x70, 0x6f, 0x63, 0x68, 0x12, 0x20, 0x0a, 0x0c, 0x75, 0x73, 0x65, + 0x72, 0x5f, 0x6f, 0x70, 0x5f, 0x68, 0x61, 0x73, 0x68, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0a, 0x75, 0x73, 0x65, 0x72, 0x4f, 0x70, 0x48, 0x61, 0x73, 0x68, 0x12, 0x14, 0x0a, 0x05, 0x65, + 0x72, 0x72, 0x6f, 0x72, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x65, 0x72, 0x72, 0x6f, + 0x72, 0x22, 0xe6, 0x03, 0x0a, 0x04, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, + 0x6e, 0x65, 0x72, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, + 0x12, 0x30, 0x0a, 0x14, 0x73, 0x6d, 0x61, 0x72, 0x74, 0x5f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, + 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, + 0x73, 0x6d, 0x61, 0x72, 0x74, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x12, 0x19, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x61, 0x74, 0x18, 0x04, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x07, 0x73, 0x74, 0x61, 0x72, 0x74, 0x41, 0x74, 0x12, 0x1d, 0x0a, + 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x05, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x41, 0x74, 0x12, 0x12, 0x0a, 0x04, + 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x6d, 0x65, 0x6d, 0x6f, + 0x12, 0x21, 0x0a, 0x0c, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, + 0x18, 0x07, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0b, 0x63, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, + 0x64, 0x41, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x6d, 0x61, 0x78, 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, + 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x08, 0x20, 0x01, 0x28, 0x03, 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x45, + 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x2e, 0x0a, 0x06, 0x73, 0x74, 0x61, 0x74, + 0x75, 0x73, 0x18, 0x09, 0x20, 0x01, 0x28, 0x0e, 0x32, 0x16, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, + 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, + 0x52, 0x06, 0x73, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x31, 0x0a, 0x07, 0x74, 0x72, 0x69, 0x67, + 0x67, 0x65, 0x72, 0x18, 0x0a, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, 0x61, 0x67, 0x67, 0x72, + 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x54, 0x72, 0x69, 0x67, 0x67, + 0x65, 0x72, 0x52, 0x07, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x12, 0x2a, 0x0a, 0x05, 0x6e, + 0x6f, 0x64, 0x65, 0x73, 0x18, 0x0b, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x61, 0x67, 0x67, + 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x4e, 0x6f, 0x64, 0x65, + 0x52, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x12, 0x2a, 0x0a, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, + 0x18, 0x0c, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, + 0x74, 0x6f, 0x72, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, 0x64, + 0x67, 0x65, 0x73, 0x12, 0x35, 0x0a, 0x0a, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, + 0x73, 0x18, 0x0d, 0x20, 0x03, 0x28, 0x0b, 0x32, 0x15, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, + 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x52, 0x0a, + 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x73, 0x22, 0xbf, 0x02, 0x0a, 0x0d, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x71, 0x12, 0x31, 0x0a, 0x07, + 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x17, 0x2e, + 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x54, + 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x52, 0x07, 0x74, 0x72, 0x69, 0x67, 0x67, 0x65, 0x72, 0x12, + 0x19, 0x0a, 0x08, 0x73, 0x74, 0x61, 0x72, 0x74, 0x5f, 0x61, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, + 0x03, 0x52, 0x07, 0x73, 0x74, 0x61, 0x72, 0x74, 0x41, 0x74, 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x78, + 0x70, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x03, 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, + 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x41, 0x74, 0x12, 0x23, 0x0a, 0x0d, 0x6d, 0x61, 0x78, + 0x5f, 0x65, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x18, 0x04, 0x20, 0x01, 0x28, 0x03, + 0x52, 0x0c, 0x6d, 0x61, 0x78, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6f, 0x6e, 0x12, 0x30, + 0x0a, 0x14, 0x73, 0x6d, 0x61, 0x72, 0x74, 0x5f, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x5f, 0x61, + 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x05, 0x20, 0x01, 0x28, 0x09, 0x52, 0x12, 0x73, 0x6d, + 0x61, 0x72, 0x74, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x12, 0x12, 0x0a, 0x04, 0x6d, 0x65, 0x6d, 0x6f, 0x18, 0x06, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, + 0x6d, 0x65, 0x6d, 0x6f, 0x12, 0x2a, 0x0a, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, 0x18, 0x07, 0x20, + 0x03, 0x28, 0x0b, 0x32, 0x14, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, + 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x4e, 0x6f, 0x64, 0x65, 0x52, 0x05, 0x6e, 0x6f, 0x64, 0x65, 0x73, + 0x12, 0x2a, 0x0a, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x18, 0x08, 0x20, 0x03, 0x28, 0x0b, 0x32, + 0x14, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x54, 0x61, 0x73, + 0x6b, 0x45, 0x64, 0x67, 0x65, 0x52, 0x05, 0x65, 0x64, 0x67, 0x65, 0x73, 0x22, 0x20, 0x0a, 0x0e, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x12, 0x0e, + 0x0a, 0x02, 0x69, 0x64, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x24, + 0x0a, 0x0c, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x12, 0x14, + 0x0a, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, + 0x77, 0x6e, 0x65, 0x72, 0x22, 0x21, 0x0a, 0x09, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x73, + 0x70, 0x12, 0x14, 0x0a, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x05, 0x6e, 0x6f, 0x6e, 0x63, 0x65, 0x22, 0x3d, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x57, + 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x61, 0x63, 0x74, + 0x6f, 0x72, 0x79, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x66, 0x61, 0x63, 0x74, 0x6f, + 0x72, 0x79, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x61, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x73, 0x61, 0x6c, 0x74, 0x22, 0x55, 0x0a, 0x0b, 0x53, 0x6d, 0x61, 0x72, 0x74, 0x57, + 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, + 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, + 0x12, 0x0a, 0x04, 0x73, 0x61, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, + 0x61, 0x6c, 0x74, 0x12, 0x18, 0x0a, 0x07, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x18, 0x03, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x22, 0x43, 0x0a, + 0x0e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, + 0x31, 0x0a, 0x07, 0x77, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x73, 0x18, 0x01, 0x20, 0x03, 0x28, 0x0b, + 0x32, 0x17, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x53, 0x6d, + 0x61, 0x72, 0x74, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x07, 0x77, 0x61, 0x6c, 0x6c, 0x65, + 0x74, 0x73, 0x22, 0x40, 0x0a, 0x0c, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, + 0x65, 0x71, 0x12, 0x30, 0x0a, 0x14, 0x73, 0x6d, 0x61, 0x72, 0x74, 0x5f, 0x77, 0x61, 0x6c, 0x6c, + 0x65, 0x74, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x12, 0x73, 0x6d, 0x61, 0x72, 0x74, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x22, 0x37, 0x0a, 0x0d, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x73, 0x6b, + 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x26, 0x0a, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x18, 0x01, + 0x20, 0x03, 0x28, 0x0b, 0x32, 0x10, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, + 0x72, 0x2e, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x05, 0x74, 0x61, 0x73, 0x6b, 0x73, 0x22, 0x5e, 0x0a, + 0x09, 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x12, 0x14, 0x0a, 0x05, 0x6f, 0x77, + 0x6e, 0x65, 0x72, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x05, 0x6f, 0x77, 0x6e, 0x65, 0x72, + 0x12, 0x1d, 0x0a, 0x0a, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x03, 0x52, 0x09, 0x65, 0x78, 0x70, 0x69, 0x72, 0x65, 0x64, 0x41, 0x74, 0x12, + 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x18, 0x03, 0x20, 0x01, + 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, 0x74, 0x75, 0x72, 0x65, 0x22, 0x1b, 0x0a, + 0x07, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x73, 0x70, 0x12, 0x10, 0x0a, 0x03, 0x6b, 0x65, 0x79, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x03, 0x6b, 0x65, 0x79, 0x22, 0x59, 0x0a, 0x0f, 0x55, 0x70, + 0x64, 0x61, 0x74, 0x65, 0x43, 0x68, 0x65, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x12, 0x18, 0x0a, + 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, + 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x12, 0x1c, 0x0a, 0x09, 0x73, 0x69, 0x67, 0x6e, 0x61, + 0x74, 0x75, 0x72, 0x65, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, 0x52, 0x09, 0x73, 0x69, 0x67, 0x6e, + 0x61, 0x74, 0x75, 0x72, 0x65, 0x12, 0x0e, 0x0a, 0x02, 0x69, 0x64, 0x18, 0x03, 0x20, 0x03, 0x28, + 0x09, 0x52, 0x02, 0x69, 0x64, 0x22, 0x4d, 0x0a, 0x10, 0x55, 0x70, 0x64, 0x61, 0x74, 0x65, 0x43, + 0x68, 0x65, 0x63, 0x6b, 0x73, 0x52, 0x65, 0x73, 0x70, 0x12, 0x39, 0x0a, 0x0a, 0x75, 0x70, 0x64, + 0x61, 0x74, 0x65, 0x64, 0x5f, 0x61, 0x74, 0x18, 0x01, 0x20, 0x01, 0x28, 0x0b, 0x32, 0x1a, 0x2e, + 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, + 0x54, 0x69, 0x6d, 0x65, 0x73, 0x74, 0x61, 0x6d, 0x70, 0x52, 0x09, 0x75, 0x70, 0x64, 0x61, 0x74, + 0x65, 0x64, 0x41, 0x74, 0x22, 0x4e, 0x0a, 0x0f, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x61, + 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x61, 0x6c, 0x74, 0x18, + 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x04, 0x73, 0x61, 0x6c, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x66, + 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x02, + 0x20, 0x01, 0x28, 0x09, 0x52, 0x0e, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x41, 0x64, 0x64, + 0x72, 0x65, 0x73, 0x73, 0x22, 0x69, 0x0a, 0x10, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x61, + 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x12, 0x18, 0x0a, 0x07, 0x61, 0x64, 0x64, 0x72, + 0x65, 0x73, 0x73, 0x18, 0x01, 0x20, 0x01, 0x28, 0x09, 0x52, 0x07, 0x61, 0x64, 0x64, 0x72, 0x65, + 0x73, 0x73, 0x12, 0x12, 0x0a, 0x04, 0x73, 0x61, 0x6c, 0x74, 0x18, 0x02, 0x20, 0x01, 0x28, 0x09, + 0x52, 0x04, 0x73, 0x61, 0x6c, 0x74, 0x12, 0x27, 0x0a, 0x0f, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, + 0x79, 0x5f, 0x61, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x18, 0x03, 0x20, 0x01, 0x28, 0x09, 0x52, + 0x0e, 0x66, 0x61, 0x63, 0x74, 0x6f, 0x72, 0x79, 0x41, 0x64, 0x64, 0x72, 0x65, 0x73, 0x73, 0x2a, + 0xc8, 0x01, 0x0a, 0x05, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x12, 0x0f, 0x0a, 0x0b, 0x55, 0x6e, 0x6b, + 0x6e, 0x6f, 0x77, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0x00, 0x12, 0x11, 0x0a, 0x0c, 0x52, 0x70, + 0x63, 0x4e, 0x6f, 0x64, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0xe8, 0x07, 0x12, 0x17, 0x0a, + 0x12, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, 0x65, 0x55, 0x6e, 0x61, 0x76, 0x61, 0x69, 0x6c, 0x61, + 0x62, 0x6c, 0x65, 0x10, 0xd0, 0x0f, 0x12, 0x16, 0x0a, 0x11, 0x53, 0x74, 0x6f, 0x72, 0x61, 0x67, + 0x65, 0x57, 0x72, 0x69, 0x74, 0x65, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0xd1, 0x0f, 0x12, 0x18, + 0x0a, 0x13, 0x53, 0x6d, 0x61, 0x72, 0x74, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x70, 0x63, + 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0xf0, 0x2e, 0x12, 0x1d, 0x0a, 0x18, 0x53, 0x6d, 0x61, 0x72, + 0x74, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x4e, 0x6f, 0x74, 0x46, 0x6f, 0x75, 0x6e, 0x64, 0x45, + 0x72, 0x72, 0x6f, 0x72, 0x10, 0xf1, 0x2e, 0x12, 0x16, 0x0a, 0x11, 0x54, 0x61, 0x73, 0x6b, 0x44, + 0x61, 0x74, 0x61, 0x43, 0x6f, 0x72, 0x72, 0x75, 0x70, 0x74, 0x65, 0x64, 0x10, 0xd8, 0x36, 0x12, + 0x19, 0x0a, 0x14, 0x54, 0x61, 0x73, 0x6b, 0x44, 0x61, 0x74, 0x61, 0x4d, 0x69, 0x73, 0x73, 0x69, + 0x6e, 0x67, 0x45, 0x72, 0x72, 0x6f, 0x72, 0x10, 0xd9, 0x36, 0x2a, 0x50, 0x0a, 0x0a, 0x54, 0x61, + 0x73, 0x6b, 0x53, 0x74, 0x61, 0x74, 0x75, 0x73, 0x12, 0x0a, 0x0a, 0x06, 0x41, 0x63, 0x74, 0x69, + 0x76, 0x65, 0x10, 0x00, 0x12, 0x0d, 0x0a, 0x09, 0x43, 0x6f, 0x6d, 0x70, 0x6c, 0x65, 0x74, 0x65, + 0x64, 0x10, 0x01, 0x12, 0x0a, 0x0a, 0x06, 0x46, 0x61, 0x69, 0x6c, 0x65, 0x64, 0x10, 0x02, 0x12, + 0x0c, 0x0a, 0x08, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, 0x65, 0x64, 0x10, 0x03, 0x12, 0x0d, 0x0a, + 0x09, 0x45, 0x78, 0x65, 0x63, 0x75, 0x74, 0x69, 0x6e, 0x67, 0x10, 0x04, 0x2a, 0x20, 0x0a, 0x0e, + 0x43, 0x75, 0x73, 0x74, 0x6f, 0x6d, 0x43, 0x6f, 0x64, 0x65, 0x54, 0x79, 0x70, 0x65, 0x12, 0x0e, + 0x0a, 0x0a, 0x4a, 0x61, 0x76, 0x61, 0x53, 0x63, 0x72, 0x69, 0x70, 0x74, 0x10, 0x00, 0x32, 0x9e, + 0x06, 0x0a, 0x0a, 0x41, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x12, 0x36, 0x0a, + 0x06, 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x12, 0x15, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, + 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x47, 0x65, 0x74, 0x4b, 0x65, 0x79, 0x52, 0x65, 0x71, 0x1a, 0x13, + 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x4b, 0x65, 0x79, 0x52, + 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x3d, 0x0a, 0x08, 0x47, 0x65, 0x74, 0x4e, 0x6f, 0x6e, 0x63, + 0x65, 0x12, 0x18, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x4e, + 0x6f, 0x6e, 0x63, 0x65, 0x52, 0x65, 0x71, 0x75, 0x65, 0x73, 0x74, 0x1a, 0x15, 0x2e, 0x61, 0x67, + 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x4e, 0x6f, 0x6e, 0x63, 0x65, 0x52, 0x65, + 0x73, 0x70, 0x22, 0x00, 0x12, 0x4b, 0x0a, 0x0c, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x61, + 0x6c, 0x6c, 0x65, 0x74, 0x12, 0x1b, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, + 0x72, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, + 0x71, 0x1a, 0x1c, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x43, + 0x72, 0x65, 0x61, 0x74, 0x65, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, + 0x00, 0x12, 0x46, 0x0a, 0x0b, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x73, + 0x12, 0x19, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x4c, 0x69, + 0x73, 0x74, 0x57, 0x61, 0x6c, 0x6c, 0x65, 0x74, 0x52, 0x65, 0x71, 0x1a, 0x1a, 0x2e, 0x61, 0x67, + 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x57, 0x61, 0x6c, + 0x6c, 0x65, 0x74, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, 0x12, 0x45, 0x0a, 0x0a, 0x43, 0x72, 0x65, + 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x12, 0x19, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, + 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, + 0x65, 0x71, 0x1a, 0x1a, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, + 0x43, 0x72, 0x65, 0x61, 0x74, 0x65, 0x54, 0x61, 0x73, 0x6b, 0x52, 0x65, 0x73, 0x70, 0x22, 0x00, + 0x12, 0x42, 0x0a, 0x09, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x12, 0x18, 0x2e, + 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, + 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, 0x71, 0x1a, 0x19, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, + 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x4c, 0x69, 0x73, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x73, 0x52, 0x65, + 0x73, 0x70, 0x22, 0x00, 0x12, 0x30, 0x0a, 0x07, 0x47, 0x65, 0x74, 0x54, 0x61, 0x73, 0x6b, 0x12, + 0x11, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, 0x49, 0x64, 0x52, + 0x65, 0x71, 0x1a, 0x10, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, 0x2e, + 0x54, 0x61, 0x73, 0x6b, 0x22, 0x00, 0x12, 0x3d, 0x0a, 0x0a, 0x43, 0x61, 0x6e, 0x63, 0x65, 0x6c, + 0x54, 0x61, 0x73, 0x6b, 0x12, 0x11, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, + 0x72, 0x2e, 0x49, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, + 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, + 0x6c, 0x75, 0x65, 0x22, 0x00, 0x12, 0x3d, 0x0a, 0x0a, 0x44, 0x65, 0x6c, 0x65, 0x74, 0x65, 0x54, + 0x61, 0x73, 0x6b, 0x12, 0x11, 0x2e, 0x61, 0x67, 0x67, 0x72, 0x65, 0x67, 0x61, 0x74, 0x6f, 0x72, + 0x2e, 0x49, 0x64, 0x52, 0x65, 0x71, 0x1a, 0x1a, 0x2e, 0x67, 0x6f, 0x6f, 0x67, 0x6c, 0x65, 0x2e, 0x70, 0x72, 0x6f, 0x74, 0x6f, 0x62, 0x75, 0x66, 0x2e, 0x42, 0x6f, 0x6f, 0x6c, 0x56, 0x61, 0x6c, - 0x75, 0x65, 0x22, 0x00, 0x12, 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, + 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 ( @@ -2877,113 +3212,119 @@ func file_protobuf_avs_proto_rawDescGZIP() []byte { return file_protobuf_avs_proto_rawDescData } -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_enumTypes = make([]protoimpl.EnumInfo, 3) +var file_protobuf_avs_proto_msgTypes = make([]protoimpl.MessageInfo, 42) 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 + (Error)(0), // 0: aggregator.Error + (TaskStatus)(0), // 1: aggregator.TaskStatus + (CustomCodeType)(0), // 2: aggregator.CustomCodeType + (*IdReq)(nil), // 3: aggregator.IdReq + (*Checkin)(nil), // 4: aggregator.Checkin + (*CheckinResp)(nil), // 5: aggregator.CheckinResp + (*SyncTasksReq)(nil), // 6: aggregator.SyncTasksReq + (*FixedEpochCondition)(nil), // 7: aggregator.FixedEpochCondition + (*CronCondition)(nil), // 8: aggregator.CronCondition + (*BlockCondition)(nil), // 9: aggregator.BlockCondition + (*EventCondition)(nil), // 10: aggregator.EventCondition + (*TaskTrigger)(nil), // 11: aggregator.TaskTrigger + (*SyncTasksResp)(nil), // 12: aggregator.SyncTasksResp + (*ETHTransferNode)(nil), // 13: aggregator.ETHTransferNode + (*ContractWriteNode)(nil), // 14: aggregator.ContractWriteNode + (*ContractReadNode)(nil), // 15: aggregator.ContractReadNode + (*GraphQLQueryNode)(nil), // 16: aggregator.GraphQLQueryNode + (*RestAPINode)(nil), // 17: aggregator.RestAPINode + (*CustomCodeNode)(nil), // 18: aggregator.CustomCodeNode + (*Condition)(nil), // 19: aggregator.Condition + (*BranchNode)(nil), // 20: aggregator.BranchNode + (*FilterNode)(nil), // 21: aggregator.FilterNode + (*LoopNode)(nil), // 22: aggregator.LoopNode + (*TaskEdge)(nil), // 23: aggregator.TaskEdge + (*TaskNode)(nil), // 24: aggregator.TaskNode + (*Execution)(nil), // 25: aggregator.Execution + (*Task)(nil), // 26: aggregator.Task + (*CreateTaskReq)(nil), // 27: aggregator.CreateTaskReq + (*CreateTaskResp)(nil), // 28: aggregator.CreateTaskResp + (*NonceRequest)(nil), // 29: aggregator.NonceRequest + (*NonceResp)(nil), // 30: aggregator.NonceResp + (*ListWalletReq)(nil), // 31: aggregator.ListWalletReq + (*SmartWallet)(nil), // 32: aggregator.SmartWallet + (*ListWalletResp)(nil), // 33: aggregator.ListWalletResp + (*ListTasksReq)(nil), // 34: aggregator.ListTasksReq + (*ListTasksResp)(nil), // 35: aggregator.ListTasksResp + (*GetKeyReq)(nil), // 36: aggregator.GetKeyReq + (*KeyResp)(nil), // 37: aggregator.KeyResp + (*UpdateChecksReq)(nil), // 38: aggregator.UpdateChecksReq + (*UpdateChecksResp)(nil), // 39: aggregator.UpdateChecksResp + (*CreateWalletReq)(nil), // 40: aggregator.CreateWalletReq + (*CreateWalletResp)(nil), // 41: aggregator.CreateWalletResp + (*Checkin_Status)(nil), // 42: aggregator.Checkin.Status + nil, // 43: aggregator.GraphQLQueryNode.VariablesEntry + nil, // 44: aggregator.RestAPINode.HeadersEntry + (*timestamppb.Timestamp)(nil), // 45: google.protobuf.Timestamp + (*wrapperspb.BoolValue)(nil), // 46: google.protobuf.BoolValue } 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 - 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 + 42, // 0: aggregator.Checkin.status:type_name -> aggregator.Checkin.Status + 45, // 1: aggregator.CheckinResp.updated_at:type_name -> google.protobuf.Timestamp + 7, // 2: aggregator.TaskTrigger.fixed_time:type_name -> aggregator.FixedEpochCondition + 8, // 3: aggregator.TaskTrigger.cron:type_name -> aggregator.CronCondition + 9, // 4: aggregator.TaskTrigger.block:type_name -> aggregator.BlockCondition + 10, // 5: aggregator.TaskTrigger.event:type_name -> aggregator.EventCondition + 11, // 6: aggregator.SyncTasksResp.trigger:type_name -> aggregator.TaskTrigger + 43, // 7: aggregator.GraphQLQueryNode.variables:type_name -> aggregator.GraphQLQueryNode.VariablesEntry + 44, // 8: aggregator.RestAPINode.headers:type_name -> aggregator.RestAPINode.HeadersEntry + 2, // 9: aggregator.CustomCodeNode.type:type_name -> aggregator.CustomCodeType + 19, // 10: aggregator.BranchNode.conditions:type_name -> aggregator.Condition + 13, // 11: aggregator.TaskNode.eth_transfer:type_name -> aggregator.ETHTransferNode + 14, // 12: aggregator.TaskNode.contract_write:type_name -> aggregator.ContractWriteNode + 15, // 13: aggregator.TaskNode.contract_read:type_name -> aggregator.ContractReadNode + 16, // 14: aggregator.TaskNode.graphql_data_query:type_name -> aggregator.GraphQLQueryNode + 17, // 15: aggregator.TaskNode.rest_api:type_name -> aggregator.RestAPINode + 20, // 16: aggregator.TaskNode.branch:type_name -> aggregator.BranchNode + 21, // 17: aggregator.TaskNode.filter:type_name -> aggregator.FilterNode + 22, // 18: aggregator.TaskNode.loop:type_name -> aggregator.LoopNode + 18, // 19: aggregator.TaskNode.custom_code:type_name -> aggregator.CustomCodeNode + 1, // 20: aggregator.Task.status:type_name -> aggregator.TaskStatus + 11, // 21: aggregator.Task.trigger:type_name -> aggregator.TaskTrigger + 24, // 22: aggregator.Task.nodes:type_name -> aggregator.TaskNode + 23, // 23: aggregator.Task.edges:type_name -> aggregator.TaskEdge + 25, // 24: aggregator.Task.executions:type_name -> aggregator.Execution + 11, // 25: aggregator.CreateTaskReq.trigger:type_name -> aggregator.TaskTrigger + 24, // 26: aggregator.CreateTaskReq.nodes:type_name -> aggregator.TaskNode + 23, // 27: aggregator.CreateTaskReq.edges:type_name -> aggregator.TaskEdge + 32, // 28: aggregator.ListWalletResp.wallets:type_name -> aggregator.SmartWallet + 26, // 29: aggregator.ListTasksResp.tasks:type_name -> aggregator.Task + 45, // 30: aggregator.UpdateChecksResp.updated_at:type_name -> google.protobuf.Timestamp + 45, // 31: aggregator.Checkin.Status.last_heartbeat:type_name -> google.protobuf.Timestamp + 36, // 32: aggregator.Aggregator.GetKey:input_type -> aggregator.GetKeyReq + 29, // 33: aggregator.Aggregator.GetNonce:input_type -> aggregator.NonceRequest + 40, // 34: aggregator.Aggregator.CreateWallet:input_type -> aggregator.CreateWalletReq + 31, // 35: aggregator.Aggregator.ListWallets:input_type -> aggregator.ListWalletReq + 27, // 36: aggregator.Aggregator.CreateTask:input_type -> aggregator.CreateTaskReq + 34, // 37: aggregator.Aggregator.ListTasks:input_type -> aggregator.ListTasksReq + 3, // 38: aggregator.Aggregator.GetTask:input_type -> aggregator.IdReq + 3, // 39: aggregator.Aggregator.CancelTask:input_type -> aggregator.IdReq + 3, // 40: aggregator.Aggregator.DeleteTask:input_type -> aggregator.IdReq + 4, // 41: aggregator.Aggregator.Ping:input_type -> aggregator.Checkin + 6, // 42: aggregator.Aggregator.SyncTasks:input_type -> aggregator.SyncTasksReq + 38, // 43: aggregator.Aggregator.UpdateChecks:input_type -> aggregator.UpdateChecksReq + 37, // 44: aggregator.Aggregator.GetKey:output_type -> aggregator.KeyResp + 30, // 45: aggregator.Aggregator.GetNonce:output_type -> aggregator.NonceResp + 41, // 46: aggregator.Aggregator.CreateWallet:output_type -> aggregator.CreateWalletResp + 33, // 47: aggregator.Aggregator.ListWallets:output_type -> aggregator.ListWalletResp + 28, // 48: aggregator.Aggregator.CreateTask:output_type -> aggregator.CreateTaskResp + 35, // 49: aggregator.Aggregator.ListTasks:output_type -> aggregator.ListTasksResp + 26, // 50: aggregator.Aggregator.GetTask:output_type -> aggregator.Task + 46, // 51: aggregator.Aggregator.CancelTask:output_type -> google.protobuf.BoolValue + 46, // 52: aggregator.Aggregator.DeleteTask:output_type -> google.protobuf.BoolValue + 5, // 53: aggregator.Aggregator.Ping:output_type -> aggregator.CheckinResp + 12, // 54: aggregator.Aggregator.SyncTasks:output_type -> aggregator.SyncTasksResp + 39, // 55: aggregator.Aggregator.UpdateChecks:output_type -> aggregator.UpdateChecksResp + 44, // [44:56] is the sub-list for method output_type + 32, // [32:44] is the sub-list for method input_type + 32, // [32:32] is the sub-list for extension type_name + 32, // [32:32] is the sub-list for extension extendee + 0, // [0:32] is the sub-list for field type_name } func init() { file_protobuf_avs_proto_init() } @@ -2993,7 +3334,7 @@ func file_protobuf_avs_proto_init() { } if !protoimpl.UnsafeEnabled { file_protobuf_avs_proto_msgTypes[0].Exporter = func(v interface{}, i int) interface{} { - switch v := v.(*UUID); i { + switch v := v.(*IdReq); i { case 0: return &v.state case 1: @@ -3041,7 +3382,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 +3394,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 +3406,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 +3418,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 +3430,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 +3442,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 +3454,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 +3466,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 +3478,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.(*ContractReadNode); i { case 0: return &v.state case 1: @@ -3149,7 +3490,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 +3502,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 +3514,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 +3526,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.(*Condition); i { case 0: return &v.state case 1: @@ -3197,7 +3538,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 +3550,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 +3562,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.(*LoopNode); i { case 0: return &v.state case 1: @@ -3233,7 +3574,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.(*TaskEdge); i { case 0: return &v.state case 1: @@ -3245,7 +3586,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.(*TaskNode); i { case 0: return &v.state case 1: @@ -3257,7 +3598,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.(*Execution); i { case 0: return &v.state case 1: @@ -3269,7 +3610,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.(*Task); i { case 0: return &v.state case 1: @@ -3281,7 +3622,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.(*CreateTaskReq); i { case 0: return &v.state case 1: @@ -3293,7 +3634,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.(*CreateTaskResp); i { case 0: return &v.state case 1: @@ -3305,7 +3646,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.(*NonceRequest); i { case 0: return &v.state case 1: @@ -3317,7 +3658,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.(*NonceResp); i { case 0: return &v.state case 1: @@ -3329,7 +3670,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.(*ListWalletReq); i { case 0: return &v.state case 1: @@ -3341,7 +3682,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.(*SmartWallet); i { case 0: return &v.state case 1: @@ -3353,7 +3694,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.(*ListWalletResp); i { case 0: return &v.state case 1: @@ -3365,7 +3706,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.(*ListTasksReq); i { case 0: return &v.state case 1: @@ -3377,7 +3718,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.(*ListTasksResp); i { case 0: return &v.state case 1: @@ -3389,7 +3730,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.(*GetKeyReq); i { case 0: return &v.state case 1: @@ -3401,6 +3742,66 @@ func file_protobuf_avs_proto_init() { } } file_protobuf_avs_proto_msgTypes[34].Exporter = func(v interface{}, i int) interface{} { + switch v := v.(*KeyResp); 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.(*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[36].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[37].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[38].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[39].Exporter = func(v interface{}, i int) interface{} { switch v := v.(*Checkin_Status); i { case 0: return &v.state @@ -3413,13 +3814,31 @@ func file_protobuf_avs_proto_init() { } } } + file_protobuf_avs_proto_msgTypes[8].OneofWrappers = []interface{}{ + (*TaskTrigger_Manual)(nil), + (*TaskTrigger_FixedTime)(nil), + (*TaskTrigger_Cron)(nil), + (*TaskTrigger_Block)(nil), + (*TaskTrigger_Event)(nil), + } + file_protobuf_avs_proto_msgTypes[21].OneofWrappers = []interface{}{ + (*TaskNode_EthTransfer)(nil), + (*TaskNode_ContractWrite)(nil), + (*TaskNode_ContractRead)(nil), + (*TaskNode_GraphqlDataQuery)(nil), + (*TaskNode_RestApi)(nil), + (*TaskNode_Branch)(nil), + (*TaskNode_Filter)(nil), + (*TaskNode_Loop)(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, + NumEnums: 3, + NumMessages: 42, NumExtensions: 0, NumServices: 1, }, diff --git a/protobuf/avs.proto b/protobuf/avs.proto index 9246165..61bc670 100644 --- a/protobuf/avs.proto +++ b/protobuf/avs.proto @@ -6,8 +6,8 @@ option go_package = "./avsproto"; import "google/protobuf/timestamp.proto"; import "google/protobuf/wrappers.proto"; -message UUID { - string bytes = 1; +message IdReq { + string id = 1; } message Checkin { @@ -39,18 +39,48 @@ message SyncTasksReq { int64 monotonic_clock = 4; } -enum TriggerType { - TimeTrigger = 0; - ContractQueryTrigger = 1; - ExpressionTrigger = 2; +message FixedEpochCondition { + repeated int64 epochs = 1; +} +// Simple timebase or cron syntax. +message CronCondition { + repeated string schedule = 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; + oneof trigger_type { + bool manual = 1; + + // run at a specific epoch, name inspired by unix `at` utility + FixedEpochCondition fixed_time = 2; - TimeCondition schedule = 2; - ContractQueryCondition contract_query = 3; - ExpressionCondition expression = 4; + // interval such as every hour/day/ etc can be converted to cronsyntax by the sdk/studio + CronCondition cron = 3; + + // currently the only support syntax is every blocks + BlockCondition block = 4; + + // support filter by event expression such as topic0, topic1, topoc2 and event_data and contract_address + EventCondition event = 5; + } } // gRPC internal error code use up to 17, we extend and start from 1000 to avoid any conflict @@ -68,37 +98,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,144 +111,163 @@ 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 { - Active = 0; + Active = 0; Completed = 1; - Failed = 2; - Canceled = 3; + Failed = 2; + Canceled = 3; Executing = 4; } -message ETHTransfer { +message ETHTransferNode { string destination = 1; string amount = 2; } -message ContractExecution { +message ContractWriteNode { 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 { - // TODO: support graphql variable +message ContractReadNode { + string contract_address = 1; + string call_data = 2; + + // abi is necessary to decode the return + string contract_abi = 3; +} + + +message GraphQLQueryNode { string url = 1; string query = 2; + + map variables = 3; } -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 { - string expression = 1; - string next = 2; +message Condition { + string id = 1; + string type = 2; + string expression = 3; } -message BranchAction { - ConditionJump If = 1; - repeated ConditionJump ElseIfs = 2; - ConditionJump Else = 3; +message BranchNode { + repeated Condition conditions = 1; } -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; +// LoopNode currently not support, but we pre-defined to reverse the field id +message LoopNode { + // name the iteration key and value. + string iter_var = 1; + string iter_key = 2; +} + +// The edge is relationship or direct between node +message TaskEdge { + string id = 1 ; + string source = 2 ; + string target = 3 ; +} - // Next can be empty. In some kind of block, such as branching, the next is - // based on branching condition - repeated string next = 4; +message TaskNode { + string id = 2; + string name = 3; - // 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; - // CustomCode allow to run arbitraty JavaScript. - CustomCode custom_code = 14; - BranchAction branch = 15; + // based on node_type one and only one of these field are set + oneof task_type { + // Transfer eth require no calldata etc, just a destination address and an eth amount to be sent + ETHTransferNode eth_transfer = 10; + + // Run one ore more contracts. The call call also be batched with tool like + // multicall to wrap many calls. in a contract write, we need to generate signature and send as userops. + ContractWriteNode contract_write = 11; + // read data fron a target contract + ContractReadNode contract_read = 12; + // Make call to a graphql endpoint + GraphQLQueryNode graphql_data_query = 13; + // Make call to a HTTP endpoint + RestAPINode rest_api = 14; + // CustomCode allow to run arbitraty JavaScript. + BranchNode branch = 15; + FilterNode filter = 16; + LoopNode loop = 17; + CustomCodeNode custom_code = 18; + } } 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; + string id = 1; + string owner = 2; + string smart_wallet_address = 3; + + // task won't be check before this + int64 start_at = 4; + // task won't be run/check after this + int64 expired_at = 5; + // arbitrary data about this task. has a limit of 255 character + string memo = 6; + + int64 completed_at = 7; + + // limit on how many time this task can run. Set to 0 will make it run unlimited until cancelling or reaching its expired time + int64 max_execution = 8; - // 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 = 10; + 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; - // A repeatable task will continue to be run - bool repeatable = 6; + + int64 start_at = 2; + int64 expired_at = 3; + + int64 max_execution = 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 { @@ -259,7 +282,7 @@ message NonceResp { string nonce = 1; } -message AddressRequest { +message ListWalletReq { // filter out by factory address or salt // otherwise return all the wallet string factory = 1; @@ -272,7 +295,7 @@ message SmartWallet { string factory = 3; } -message AddressResp { +message ListWalletResp { repeated SmartWallet wallets = 1; } @@ -283,17 +306,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 { @@ -314,6 +337,8 @@ message CreateWalletReq { message CreateWalletResp { string address = 1; + string salt = 2; + string factory_address = 3; } service Aggregator { @@ -322,15 +347,15 @@ service Aggregator { // Smart Acccount rpc GetNonce(NonceRequest) returns (NonceResp) {}; - rpc GetSmartAccountAddress(AddressRequest) returns (AddressResp) {}; + rpc CreateWallet(CreateWalletReq) returns (CreateWalletResp) {}; + rpc ListWallets(ListWalletReq) returns (ListWalletResp) {}; // Task Management - rpc CreateWallet(CreateWalletReq) returns (CreateWalletResp) {}; rpc CreateTask(CreateTaskReq) returns (CreateTaskResp) {}; rpc ListTasks(ListTasksReq) returns (ListTasksResp) {}; - rpc GetTask(UUID) returns (Task) {}; - rpc CancelTask(UUID) returns (google.protobuf.BoolValue) {}; - rpc DeleteTask(UUID) returns (google.protobuf.BoolValue) {}; + rpc GetTask(IdReq) returns (Task) {}; + rpc CancelTask(IdReq) returns (google.protobuf.BoolValue) {}; + rpc DeleteTask(IdReq) returns (google.protobuf.BoolValue) {}; // Operator endpoint rpc Ping(Checkin) returns (CheckinResp) {}; diff --git a/protobuf/avs_grpc.pb.go b/protobuf/avs_grpc.pb.go index 80dbc55..dee5fea 100644 --- a/protobuf/avs_grpc.pb.go +++ b/protobuf/avs_grpc.pb.go @@ -27,14 +27,14 @@ type AggregatorClient interface { GetKey(ctx context.Context, in *GetKeyReq, opts ...grpc.CallOption) (*KeyResp, error) // Smart Acccount GetNonce(ctx context.Context, in *NonceRequest, opts ...grpc.CallOption) (*NonceResp, error) - GetSmartAccountAddress(ctx context.Context, in *AddressRequest, opts ...grpc.CallOption) (*AddressResp, error) - // Task Management CreateWallet(ctx context.Context, in *CreateWalletReq, opts ...grpc.CallOption) (*CreateWalletResp, error) + ListWallets(ctx context.Context, in *ListWalletReq, opts ...grpc.CallOption) (*ListWalletResp, error) + // Task Management CreateTask(ctx context.Context, in *CreateTaskReq, opts ...grpc.CallOption) (*CreateTaskResp, error) ListTasks(ctx context.Context, in *ListTasksReq, opts ...grpc.CallOption) (*ListTasksResp, error) - GetTask(ctx context.Context, in *UUID, opts ...grpc.CallOption) (*Task, error) - CancelTask(ctx context.Context, in *UUID, opts ...grpc.CallOption) (*wrapperspb.BoolValue, error) - DeleteTask(ctx context.Context, in *UUID, opts ...grpc.CallOption) (*wrapperspb.BoolValue, error) + GetTask(ctx context.Context, in *IdReq, opts ...grpc.CallOption) (*Task, error) + CancelTask(ctx context.Context, in *IdReq, opts ...grpc.CallOption) (*wrapperspb.BoolValue, error) + DeleteTask(ctx context.Context, in *IdReq, opts ...grpc.CallOption) (*wrapperspb.BoolValue, error) // Operator endpoint Ping(ctx context.Context, in *Checkin, opts ...grpc.CallOption) (*CheckinResp, error) SyncTasks(ctx context.Context, in *SyncTasksReq, opts ...grpc.CallOption) (Aggregator_SyncTasksClient, error) @@ -67,18 +67,18 @@ func (c *aggregatorClient) GetNonce(ctx context.Context, in *NonceRequest, opts return out, nil } -func (c *aggregatorClient) GetSmartAccountAddress(ctx context.Context, in *AddressRequest, opts ...grpc.CallOption) (*AddressResp, error) { - out := new(AddressResp) - err := c.cc.Invoke(ctx, "/aggregator.Aggregator/GetSmartAccountAddress", in, out, opts...) +func (c *aggregatorClient) CreateWallet(ctx context.Context, in *CreateWalletReq, opts ...grpc.CallOption) (*CreateWalletResp, error) { + out := new(CreateWalletResp) + err := c.cc.Invoke(ctx, "/aggregator.Aggregator/CreateWallet", in, out, opts...) if err != nil { return nil, err } return out, nil } -func (c *aggregatorClient) CreateWallet(ctx context.Context, in *CreateWalletReq, opts ...grpc.CallOption) (*CreateWalletResp, error) { - out := new(CreateWalletResp) - err := c.cc.Invoke(ctx, "/aggregator.Aggregator/CreateWallet", in, out, opts...) +func (c *aggregatorClient) ListWallets(ctx context.Context, in *ListWalletReq, opts ...grpc.CallOption) (*ListWalletResp, error) { + out := new(ListWalletResp) + err := c.cc.Invoke(ctx, "/aggregator.Aggregator/ListWallets", in, out, opts...) if err != nil { return nil, err } @@ -103,7 +103,7 @@ func (c *aggregatorClient) ListTasks(ctx context.Context, in *ListTasksReq, opts return out, nil } -func (c *aggregatorClient) GetTask(ctx context.Context, in *UUID, opts ...grpc.CallOption) (*Task, error) { +func (c *aggregatorClient) GetTask(ctx context.Context, in *IdReq, opts ...grpc.CallOption) (*Task, error) { out := new(Task) err := c.cc.Invoke(ctx, "/aggregator.Aggregator/GetTask", in, out, opts...) if err != nil { @@ -112,7 +112,7 @@ func (c *aggregatorClient) GetTask(ctx context.Context, in *UUID, opts ...grpc.C return out, nil } -func (c *aggregatorClient) CancelTask(ctx context.Context, in *UUID, opts ...grpc.CallOption) (*wrapperspb.BoolValue, error) { +func (c *aggregatorClient) CancelTask(ctx context.Context, in *IdReq, opts ...grpc.CallOption) (*wrapperspb.BoolValue, error) { out := new(wrapperspb.BoolValue) err := c.cc.Invoke(ctx, "/aggregator.Aggregator/CancelTask", in, out, opts...) if err != nil { @@ -121,7 +121,7 @@ func (c *aggregatorClient) CancelTask(ctx context.Context, in *UUID, opts ...grp return out, nil } -func (c *aggregatorClient) DeleteTask(ctx context.Context, in *UUID, opts ...grpc.CallOption) (*wrapperspb.BoolValue, error) { +func (c *aggregatorClient) DeleteTask(ctx context.Context, in *IdReq, opts ...grpc.CallOption) (*wrapperspb.BoolValue, error) { out := new(wrapperspb.BoolValue) err := c.cc.Invoke(ctx, "/aggregator.Aggregator/DeleteTask", in, out, opts...) if err != nil { @@ -188,14 +188,14 @@ type AggregatorServer interface { GetKey(context.Context, *GetKeyReq) (*KeyResp, error) // Smart Acccount GetNonce(context.Context, *NonceRequest) (*NonceResp, error) - GetSmartAccountAddress(context.Context, *AddressRequest) (*AddressResp, error) - // Task Management CreateWallet(context.Context, *CreateWalletReq) (*CreateWalletResp, error) + ListWallets(context.Context, *ListWalletReq) (*ListWalletResp, error) + // Task Management CreateTask(context.Context, *CreateTaskReq) (*CreateTaskResp, error) ListTasks(context.Context, *ListTasksReq) (*ListTasksResp, error) - GetTask(context.Context, *UUID) (*Task, error) - CancelTask(context.Context, *UUID) (*wrapperspb.BoolValue, error) - DeleteTask(context.Context, *UUID) (*wrapperspb.BoolValue, error) + GetTask(context.Context, *IdReq) (*Task, error) + CancelTask(context.Context, *IdReq) (*wrapperspb.BoolValue, error) + DeleteTask(context.Context, *IdReq) (*wrapperspb.BoolValue, error) // Operator endpoint Ping(context.Context, *Checkin) (*CheckinResp, error) SyncTasks(*SyncTasksReq, Aggregator_SyncTasksServer) error @@ -213,25 +213,25 @@ func (UnimplementedAggregatorServer) GetKey(context.Context, *GetKeyReq) (*KeyRe func (UnimplementedAggregatorServer) GetNonce(context.Context, *NonceRequest) (*NonceResp, error) { return nil, status.Errorf(codes.Unimplemented, "method GetNonce not implemented") } -func (UnimplementedAggregatorServer) GetSmartAccountAddress(context.Context, *AddressRequest) (*AddressResp, error) { - return nil, status.Errorf(codes.Unimplemented, "method GetSmartAccountAddress not implemented") -} func (UnimplementedAggregatorServer) CreateWallet(context.Context, *CreateWalletReq) (*CreateWalletResp, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateWallet not implemented") } +func (UnimplementedAggregatorServer) ListWallets(context.Context, *ListWalletReq) (*ListWalletResp, error) { + return nil, status.Errorf(codes.Unimplemented, "method ListWallets not implemented") +} func (UnimplementedAggregatorServer) CreateTask(context.Context, *CreateTaskReq) (*CreateTaskResp, error) { return nil, status.Errorf(codes.Unimplemented, "method CreateTask not implemented") } func (UnimplementedAggregatorServer) ListTasks(context.Context, *ListTasksReq) (*ListTasksResp, error) { return nil, status.Errorf(codes.Unimplemented, "method ListTasks not implemented") } -func (UnimplementedAggregatorServer) GetTask(context.Context, *UUID) (*Task, error) { +func (UnimplementedAggregatorServer) GetTask(context.Context, *IdReq) (*Task, error) { return nil, status.Errorf(codes.Unimplemented, "method GetTask not implemented") } -func (UnimplementedAggregatorServer) CancelTask(context.Context, *UUID) (*wrapperspb.BoolValue, error) { +func (UnimplementedAggregatorServer) CancelTask(context.Context, *IdReq) (*wrapperspb.BoolValue, error) { return nil, status.Errorf(codes.Unimplemented, "method CancelTask not implemented") } -func (UnimplementedAggregatorServer) DeleteTask(context.Context, *UUID) (*wrapperspb.BoolValue, error) { +func (UnimplementedAggregatorServer) DeleteTask(context.Context, *IdReq) (*wrapperspb.BoolValue, error) { return nil, status.Errorf(codes.Unimplemented, "method DeleteTask not implemented") } func (UnimplementedAggregatorServer) Ping(context.Context, *Checkin) (*CheckinResp, error) { @@ -292,38 +292,38 @@ func _Aggregator_GetNonce_Handler(srv interface{}, ctx context.Context, dec func return interceptor(ctx, in, info, handler) } -func _Aggregator_GetSmartAccountAddress_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(AddressRequest) +func _Aggregator_CreateWallet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(CreateWalletReq) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(AggregatorServer).GetSmartAccountAddress(ctx, in) + return srv.(AggregatorServer).CreateWallet(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/aggregator.Aggregator/GetSmartAccountAddress", + FullMethod: "/aggregator.Aggregator/CreateWallet", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AggregatorServer).GetSmartAccountAddress(ctx, req.(*AddressRequest)) + return srv.(AggregatorServer).CreateWallet(ctx, req.(*CreateWalletReq)) } return interceptor(ctx, in, info, handler) } -func _Aggregator_CreateWallet_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(CreateWalletReq) +func _Aggregator_ListWallets_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { + in := new(ListWalletReq) if err := dec(in); err != nil { return nil, err } if interceptor == nil { - return srv.(AggregatorServer).CreateWallet(ctx, in) + return srv.(AggregatorServer).ListWallets(ctx, in) } info := &grpc.UnaryServerInfo{ Server: srv, - FullMethod: "/aggregator.Aggregator/CreateWallet", + FullMethod: "/aggregator.Aggregator/ListWallets", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AggregatorServer).CreateWallet(ctx, req.(*CreateWalletReq)) + return srv.(AggregatorServer).ListWallets(ctx, req.(*ListWalletReq)) } return interceptor(ctx, in, info, handler) } @@ -365,7 +365,7 @@ func _Aggregator_ListTasks_Handler(srv interface{}, ctx context.Context, dec fun } func _Aggregator_GetTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UUID) + in := new(IdReq) if err := dec(in); err != nil { return nil, err } @@ -377,13 +377,13 @@ func _Aggregator_GetTask_Handler(srv interface{}, ctx context.Context, dec func( FullMethod: "/aggregator.Aggregator/GetTask", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AggregatorServer).GetTask(ctx, req.(*UUID)) + return srv.(AggregatorServer).GetTask(ctx, req.(*IdReq)) } return interceptor(ctx, in, info, handler) } func _Aggregator_CancelTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UUID) + in := new(IdReq) if err := dec(in); err != nil { return nil, err } @@ -395,13 +395,13 @@ func _Aggregator_CancelTask_Handler(srv interface{}, ctx context.Context, dec fu FullMethod: "/aggregator.Aggregator/CancelTask", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AggregatorServer).CancelTask(ctx, req.(*UUID)) + return srv.(AggregatorServer).CancelTask(ctx, req.(*IdReq)) } return interceptor(ctx, in, info, handler) } func _Aggregator_DeleteTask_Handler(srv interface{}, ctx context.Context, dec func(interface{}) error, interceptor grpc.UnaryServerInterceptor) (interface{}, error) { - in := new(UUID) + in := new(IdReq) if err := dec(in); err != nil { return nil, err } @@ -413,7 +413,7 @@ func _Aggregator_DeleteTask_Handler(srv interface{}, ctx context.Context, dec fu FullMethod: "/aggregator.Aggregator/DeleteTask", } handler := func(ctx context.Context, req interface{}) (interface{}, error) { - return srv.(AggregatorServer).DeleteTask(ctx, req.(*UUID)) + return srv.(AggregatorServer).DeleteTask(ctx, req.(*IdReq)) } return interceptor(ctx, in, info, handler) } @@ -490,14 +490,14 @@ var Aggregator_ServiceDesc = grpc.ServiceDesc{ MethodName: "GetNonce", Handler: _Aggregator_GetNonce_Handler, }, - { - MethodName: "GetSmartAccountAddress", - Handler: _Aggregator_GetSmartAccountAddress_Handler, - }, { MethodName: "CreateWallet", Handler: _Aggregator_CreateWallet_Handler, }, + { + MethodName: "ListWallets", + Handler: _Aggregator_ListWallets_Handler, + }, { MethodName: "CreateTask", Handler: _Aggregator_CreateTask_Handler, 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) +}