diff --git a/.github/workflows/dev-test-on-pr.yml b/.github/workflows/dev-test-on-pr.yml new file mode 100644 index 0000000..41ece6a --- /dev/null +++ b/.github/workflows/dev-test-on-pr.yml @@ -0,0 +1,52 @@ +name: Run tests againts dev version on PR + +on: + pull_request: + branches: [ main ] + +jobs: + local-test: + runs-on: ubuntu-latest + environment: test # The below environment variables are only available in the test environment + + env: + TEST_PRIVATE_KEY: ${{ secrets.TEST_PRIVATE_KEY }} + TOKEN_CONTRACT: ${{ vars.TOKEN_CONTRACT }} + ORACLE_CONTRACT: ${{ vars.ORACLE_CONTRACT }} + ENDPOINT: "localhost:2206" + + steps: + - name: Checkout repository + uses: actions/checkout@v4 + + - name: Bring up docker compose + run: | + docker compose up -d + + - name: Debug environment variables + run: | + echo "TOKEN_CONTRACT: $TOKEN_CONTRACT" + echo "ORACLE_CONTRACT: $ORACLE_CONTRACT" + echo "ENDPOINT: $ENDPOINT" + + - name: Use Node.js + uses: actions/setup-node@v4 + with: + node-version: '18.x' + cache: 'npm' + + - name: Install dependencies + run: npm ci + + - name: ensure the aggregator and env is ready + run: | + until curl --output /dev/null --silent --fail http://localhost:1323/up; do + printf '.' + sleep 5 + done + + - name: Run tests againts local AVS + run: | + export TEST_API_KEY="$(docker compose exec aggregator /ava create-api-key --role=admin --subject=apikey)" + export ENDPOINT="localhost:2206" + npm test \ No newline at end of file diff --git a/.github/workflows/run-test-on-pr.yml b/.github/workflows/staging-test-on-pr.yml similarity index 83% rename from .github/workflows/run-test-on-pr.yml rename to .github/workflows/staging-test-on-pr.yml index 685e99d..7b39402 100644 --- a/.github/workflows/run-test-on-pr.yml +++ b/.github/workflows/staging-test-on-pr.yml @@ -1,11 +1,11 @@ -name: Run tests on PR +name: Run tests against staging on PR on: pull_request: branches: [ main ] jobs: - test: + staging-test: runs-on: ubuntu-latest environment: test # The below environment variables are only available in the test environment @@ -15,26 +15,26 @@ jobs: TOKEN_CONTRACT: ${{ vars.TOKEN_CONTRACT }} ORACLE_CONTRACT: ${{ vars.ORACLE_CONTRACT }} ENDPOINT: ${{ vars.ENDPOINT }} - + steps: - name: Checkout repository uses: actions/checkout@v4 - + + - name: Debug environment variables + run: | + echo "TOKEN_CONTRACT: $TOKEN_CONTRACT" + echo "ORACLE_CONTRACT: $ORACLE_CONTRACT" + echo "ENDPOINT: $ENDPOINT" + - name: Use Node.js uses: actions/setup-node@v4 with: node-version: '18.x' cache: 'npm' - + - name: Install dependencies run: npm ci - - - name: Debug environment variables + + - name: Run tests againts staging AVS run: | - echo "TOKEN_CONTRACT: $TOKEN_CONTRACT" - echo "ORACLE_CONTRACT: $ORACLE_CONTRACT" - echo "ENDPOINT: $ENDPOINT" - echo "TEST_PRIVATE_KEY is set: ${{ env.TEST_PRIVATE_KEY != '' }}" - - - name: Run tests - run: npm test \ No newline at end of file + npm test \ No newline at end of file diff --git a/README.md b/README.md index f8af585..d78ed33 100644 --- a/README.md +++ b/README.md @@ -33,9 +33,7 @@ import { AvaSDK } from "ava-sdk-js"; ## Development -### Regenerating gRPC Types - -In the case of `.proto` files at https://github.com/AvaProtocol/EigenLayer-AVS/blob/main/protobuf/avs.proto changes, the gRPC types needs to be regenerated.Before regenerating the types from the protocol buffers, ensure that `grpc_tools_node_protoc` is installed globally on your system. You can install it using npm: +### Install Dependencies and Download Proto Files ```bash npm install # install grpc-tools, etc. as dev dependencies @@ -49,9 +47,10 @@ npm run proto-download # Generate the TypeScript types and gRPC code based on the downloaded .proto file npm run gen-protoc -``` -> Important: the last line of the `grpc_codegen/avs_pb.js` needs to be manually added after the `gen-protoc` command. These type definitions must be exported; otherwise they will be undefined in the SDK. For example: `export const { Task, CreateTaskReq, CreateTaskResp, GetKeyReq, KeyResp, UpdateChecksReq, UpdateChecksResp, AddressResp, AddressRequest } = proto.aggregator;` +# Build the source files in to ./dist folder +npm run build +``` ### Running Tests @@ -67,19 +66,23 @@ To ensure the SDK is functioning correctly, we have a comprehensive test suite. 3. Bring up a locally environment for aggregator ```bash - docker compose up -d + docker compose up -d --pull always ``` - When running test, you will want to test against different aggregator. You can do so by finding the hash of the branch/commit of EigenLayer-AVS code and run it like this + > By default the above command will pull the docker image of the latest commit on the `main` branch of https://github.com/AvaProtocol/EigenLayer-AVS. Alternatively, we could also run tests against a specific commit with the below command. + > + > ``` + > export AVS_BUILD_VERSION=git-commit-hash-123 + > docker compose up -d --pull always + > ``` - ``` - export AVS_BUILD_VERSION=git-commit-hash-123 - docker compose down - docker compose pull - docker compose up -d - ``` +4. Generate a test API key for the local tests with the following command. It will automatically save the output to the `TEST_API_KEY` variable in `.env.test`. -3. Run the test command. This will test the SDK against test server, configured in `.env.test`. + ```bash + npm run gen-apikey + ``` + +5. Run the test command with env variables set in `.env.test`. ```bash # Run all tests @@ -89,12 +92,13 @@ To ensure the SDK is functioning correctly, we have a comprehensive test suite. npm run test:select -- ``` -4. In order to individually test `cancelTask` or `deleteTask`, `createTask` test needs to run first. - ```bash - npm run test:select -- "createTask|cancelTask" - ``` + > Note: In order to individually test `cancelTask` or `deleteTask`, `createTask` test needs to run first. + + > ```bash + > npm run test:select -- "createTask|cancelTask" + > ``` -This will execute all unit and integration tests. Make sure all tests pass before submitting a pull request or deploying changes. + This will execute all unit and integration tests. Make sure all tests pass in local dev environment before submitting a pull request or deploying changes. ## Release Process diff --git a/config/aggregator.yaml b/config/aggregator.yaml index 83f1733..4fcf810 100644 --- a/config/aggregator.yaml +++ b/config/aggregator.yaml @@ -1,4 +1,5 @@ # Dummy unsecure test key. do not deposit real fund to here +# Wallet: 0x578B110b0a7c06e66b7B1a33C39635304aaF733c ecdsa_private_key: e0502ddd5a0d05ec7b5c22614a01c8ce783810edaa98e44cc82f5fa5a819aaa9 eth_rpc_url: https://holesky.gateway.tenderly.co/6PJfDJkrMGBl3f4MuyU5M @@ -23,7 +24,7 @@ jwt_secret: "1b7db1c64236d92de3b3ed32e5d6bf56" # account abstraction config # Sepolia smart_wallet: - eth_rpc_url: https://sepolia.gateway.tenderly.co + eth_rpc_url: "https://sepolia-rpc.asa.town/?apikey=gvbYpyPMZtS8c3ye801OHMmSJy8WndPcg3AWaFYcs3nSkgI4" eth_ws_url: wss://sepolia.gateway.tenderly.co bundler_url: https://bundler-sepolia.avaprotocol.org factory_address: 0x29adA1b5217242DEaBB142BC3b1bCfFdd56008e7 diff --git a/dist/index.cjs b/dist/index.cjs deleted file mode 100644 index 0082c65..0000000 --- a/dist/index.cjs +++ /dev/null @@ -1,4506 +0,0 @@ -"use strict"; -var __create = Object.create; -var __defProp = Object.defineProperty; -var __getOwnPropDesc = Object.getOwnPropertyDescriptor; -var __getOwnPropNames = Object.getOwnPropertyNames; -var __getProtoOf = Object.getPrototypeOf; -var __hasOwnProp = Object.prototype.hasOwnProperty; -var __esm = (fn, res) => function __init() { - return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res; -}; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); -}; -var __copyProps = (to, from, except, desc) => { - if (from && typeof from === "object" || typeof from === "function") { - for (let key of __getOwnPropNames(from)) - if (!__hasOwnProp.call(to, key) && key !== except) - __defProp(to, key, { get: () => from[key], enumerable: !(desc = __getOwnPropDesc(from, key)) || desc.enumerable }); - } - return to; -}; -var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( - // If the importer is in node compatibility mode or this is not an ESM - // file that has been converted to a CommonJS file using a Babel- - // compatible transform (i.e. "__esModule" has not been set), then set - // "default" to the CommonJS "module.exports" for node compatibility. - isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, - mod -)); -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); - -// grpc_codegen/avs_pb.js -var avs_pb_exports = {}; -__export(avs_pb_exports, { - CreateTaskReq: () => CreateTaskReq, - CreateTaskResp: () => CreateTaskResp, - GetKeyReq: () => GetKeyReq, - KeyResp: () => KeyResp, - Task: () => Task, - UpdateChecksReq: () => UpdateChecksReq, - UpdateChecksResp: () => UpdateChecksResp -}); -var jspb, goog, global, google_protobuf_timestamp_pb, google_protobuf_wrappers_pb, Task, CreateTaskReq, CreateTaskResp, GetKeyReq, KeyResp, UpdateChecksReq, UpdateChecksResp; -var init_avs_pb = __esm({ - "grpc_codegen/avs_pb.js"() { - "use strict"; - jspb = require("google-protobuf"); - goog = jspb; - global = function() { - if (this) { - return this; - } - if (typeof window !== "undefined") { - return window; - } - if (typeof global !== "undefined") { - return global; - } - if (typeof self !== "undefined") { - return self; - } - return Function("return this")(); - }.call(null); - google_protobuf_timestamp_pb = require("google-protobuf/google/protobuf/timestamp_pb.js"); - goog.object.extend(proto, google_protobuf_timestamp_pb); - 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.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.CreateTaskReq", null, global); - goog.exportSymbol("proto.aggregator.CreateTaskResp", null, global); - goog.exportSymbol("proto.aggregator.CustomCode", null, global); - goog.exportSymbol("proto.aggregator.CustomCodeType", null, global); - goog.exportSymbol("proto.aggregator.ETHTransfer", null, global); - goog.exportSymbol("proto.aggregator.Execution", null, global); - goog.exportSymbol("proto.aggregator.ExpressionCondition", 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.KeyResp", null, global); - goog.exportSymbol("proto.aggregator.ListTasksReq", null, global); - goog.exportSymbol("proto.aggregator.ListTasksResp", null, global); - goog.exportSymbol("proto.aggregator.ListTasksResp.TaskItemResp", null, global); - goog.exportSymbol("proto.aggregator.NonceRequest", null, global); - goog.exportSymbol("proto.aggregator.NonceResp", null, global); - goog.exportSymbol("proto.aggregator.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.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.UpdateChecksReq", null, global); - goog.exportSymbol("proto.aggregator.UpdateChecksResp", null, global); - proto.aggregator.UUID = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.UUID, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.UUID.displayName = "proto.aggregator.UUID"; - } - proto.aggregator.Checkin = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.Checkin, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.Checkin.displayName = "proto.aggregator.Checkin"; - } - proto.aggregator.Checkin.Status = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.Checkin.Status, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.Checkin.Status.displayName = "proto.aggregator.Checkin.Status"; - } - proto.aggregator.CheckinResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.CheckinResp, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.CheckinResp.displayName = "proto.aggregator.CheckinResp"; - } - proto.aggregator.SyncTasksReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.SyncTasksReq, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.SyncTasksReq.displayName = "proto.aggregator.SyncTasksReq"; - } - proto.aggregator.TaskTrigger = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.TaskTrigger, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.TaskTrigger.displayName = "proto.aggregator.TaskTrigger"; - } - proto.aggregator.TimeCondition = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.TimeCondition.repeatedFields_, null); - }; - goog.inherits(proto.aggregator.TimeCondition, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.TimeCondition.displayName = "proto.aggregator.TimeCondition"; - } - proto.aggregator.ContractQueryCondition = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.ContractQueryCondition, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.ContractQueryCondition.displayName = "proto.aggregator.ContractQueryCondition"; - } - proto.aggregator.ExpressionCondition = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.ExpressionCondition, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.ExpressionCondition.displayName = "proto.aggregator.ExpressionCondition"; - } - proto.aggregator.SyncTasksResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.SyncTasksResp, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.SyncTasksResp.displayName = "proto.aggregator.SyncTasksResp"; - } - proto.aggregator.ETHTransfer = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.ETHTransfer, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.ETHTransfer.displayName = "proto.aggregator.ETHTransfer"; - } - proto.aggregator.ContractExecution = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.ContractExecution, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.ContractExecution.displayName = "proto.aggregator.ContractExecution"; - } - proto.aggregator.GraphQLDataQuery = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.GraphQLDataQuery, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.GraphQLDataQuery.displayName = "proto.aggregator.GraphQLDataQuery"; - } - proto.aggregator.HTTPAPICall = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.HTTPAPICall, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.HTTPAPICall.displayName = "proto.aggregator.HTTPAPICall"; - } - proto.aggregator.CustomCode = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.CustomCode, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.CustomCode.displayName = "proto.aggregator.CustomCode"; - } - proto.aggregator.ConditionJump = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.ConditionJump, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.ConditionJump.displayName = "proto.aggregator.ConditionJump"; - } - proto.aggregator.BranchAction = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.BranchAction.repeatedFields_, null); - }; - goog.inherits(proto.aggregator.BranchAction, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.BranchAction.displayName = "proto.aggregator.BranchAction"; - } - proto.aggregator.TaskAction = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.TaskAction.repeatedFields_, null); - }; - goog.inherits(proto.aggregator.TaskAction, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.TaskAction.displayName = "proto.aggregator.TaskAction"; - } - proto.aggregator.Execution = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.Execution, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.Execution.displayName = "proto.aggregator.Execution"; - } - proto.aggregator.Task = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.Task.repeatedFields_, null); - }; - goog.inherits(proto.aggregator.Task, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.Task.displayName = "proto.aggregator.Task"; - } - proto.aggregator.CreateTaskReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.CreateTaskReq.repeatedFields_, null); - }; - goog.inherits(proto.aggregator.CreateTaskReq, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.CreateTaskReq.displayName = "proto.aggregator.CreateTaskReq"; - } - proto.aggregator.CreateTaskResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.CreateTaskResp, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.CreateTaskResp.displayName = "proto.aggregator.CreateTaskResp"; - } - proto.aggregator.NonceRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.NonceRequest, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.NonceRequest.displayName = "proto.aggregator.NonceRequest"; - } - proto.aggregator.NonceResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.NonceResp, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.NonceResp.displayName = "proto.aggregator.NonceResp"; - } - proto.aggregator.AddressRequest = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.AddressRequest, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.AddressRequest.displayName = "proto.aggregator.AddressRequest"; - } - proto.aggregator.AddressResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.AddressResp, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.AddressResp.displayName = "proto.aggregator.AddressResp"; - } - proto.aggregator.ListTasksReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.ListTasksReq, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.ListTasksReq.displayName = "proto.aggregator.ListTasksReq"; - } - proto.aggregator.ListTasksResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.ListTasksResp.repeatedFields_, null); - }; - goog.inherits(proto.aggregator.ListTasksResp, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.ListTasksResp.displayName = "proto.aggregator.ListTasksResp"; - } - proto.aggregator.ListTasksResp.TaskItemResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.ListTasksResp.TaskItemResp, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.ListTasksResp.TaskItemResp.displayName = "proto.aggregator.ListTasksResp.TaskItemResp"; - } - proto.aggregator.GetKeyReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.GetKeyReq, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.GetKeyReq.displayName = "proto.aggregator.GetKeyReq"; - } - proto.aggregator.KeyResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.KeyResp, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.KeyResp.displayName = "proto.aggregator.KeyResp"; - } - proto.aggregator.UpdateChecksReq = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.UpdateChecksReq.repeatedFields_, null); - }; - goog.inherits(proto.aggregator.UpdateChecksReq, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.UpdateChecksReq.displayName = "proto.aggregator.UpdateChecksReq"; - } - proto.aggregator.UpdateChecksResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.UpdateChecksResp, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.UpdateChecksResp.displayName = "proto.aggregator.UpdateChecksResp"; - } - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.UUID.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.UUID.toObject(opt_includeInstance, this); - }; - proto.aggregator.UUID.toObject = function(includeInstance, msg) { - var f, obj = { - bytes: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.UUID.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.UUID(); - return proto.aggregator.UUID.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.UUID.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.setBytes(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.UUID.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.UUID.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.UUID.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getBytes(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - }; - proto.aggregator.UUID.prototype.getBytes = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.UUID.prototype.setBytes = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.Checkin.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.Checkin.toObject(opt_includeInstance, this); - }; - proto.aggregator.Checkin.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, ""), - address: jspb.Message.getFieldWithDefault(msg, 2, ""), - signature: jspb.Message.getFieldWithDefault(msg, 3, ""), - status: (f = msg.getStatus()) && proto.aggregator.Checkin.Status.toObject(includeInstance, f), - version: jspb.Message.getFieldWithDefault(msg, 5, ""), - metricsport: jspb.Message.getFieldWithDefault(msg, 6, 0), - remoteip: jspb.Message.getFieldWithDefault(msg, 7, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.Checkin.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.Checkin(); - return proto.aggregator.Checkin.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.Checkin.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.setAddress(value); - break; - case 3: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setSignature(value); - break; - case 4: - var value = new proto.aggregator.Checkin.Status(); - reader.readMessage(value, proto.aggregator.Checkin.Status.deserializeBinaryFromReader); - msg.setStatus(value); - break; - case 5: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setVersion(value); - break; - case 6: - var value = ( - /** @type {number} */ - reader.readInt32() - ); - msg.setMetricsport(value); - break; - case 7: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setRemoteip(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.Checkin.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.Checkin.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.Checkin.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getAddress(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getSignature(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getStatus(); - if (f != null) { - writer.writeMessage( - 4, - f, - proto.aggregator.Checkin.Status.serializeBinaryToWriter - ); - } - f = message.getVersion(); - if (f.length > 0) { - writer.writeString( - 5, - f - ); - } - f = message.getMetricsport(); - if (f !== 0) { - writer.writeInt32( - 6, - f - ); - } - f = message.getRemoteip(); - if (f.length > 0) { - writer.writeString( - 7, - f - ); - } - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.Checkin.Status.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.Checkin.Status.toObject(opt_includeInstance, this); - }; - proto.aggregator.Checkin.Status.toObject = function(includeInstance, msg) { - var f, obj = { - uptime: jspb.Message.getFieldWithDefault(msg, 1, 0), - queuedepth: jspb.Message.getFieldWithDefault(msg, 2, 0), - lastHeartbeat: (f = msg.getLastHeartbeat()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.Checkin.Status.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.Checkin.Status(); - return proto.aggregator.Checkin.Status.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.Checkin.Status.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.setUptime(value); - break; - case 2: - var value = ( - /** @type {number} */ - reader.readInt64() - ); - msg.setQueuedepth(value); - break; - case 3: - var value = new google_protobuf_timestamp_pb.Timestamp(); - reader.readMessage(value, google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); - msg.setLastHeartbeat(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.Checkin.Status.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.Checkin.Status.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.Checkin.Status.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getUptime(); - if (f !== 0) { - writer.writeInt64( - 1, - f - ); - } - f = message.getQueuedepth(); - if (f !== 0) { - writer.writeInt64( - 2, - f - ); - } - f = message.getLastHeartbeat(); - if (f != null) { - writer.writeMessage( - 3, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - }; - proto.aggregator.Checkin.Status.prototype.getUptime = function() { - return ( - /** @type {number} */ - jspb.Message.getFieldWithDefault(this, 1, 0) - ); - }; - proto.aggregator.Checkin.Status.prototype.setUptime = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); - }; - proto.aggregator.Checkin.Status.prototype.getQueuedepth = function() { - return ( - /** @type {number} */ - jspb.Message.getFieldWithDefault(this, 2, 0) - ); - }; - proto.aggregator.Checkin.Status.prototype.setQueuedepth = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); - }; - proto.aggregator.Checkin.Status.prototype.getLastHeartbeat = function() { - return ( - /** @type{?proto.google.protobuf.Timestamp} */ - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3) - ); - }; - proto.aggregator.Checkin.Status.prototype.setLastHeartbeat = function(value) { - return jspb.Message.setWrapperField(this, 3, value); - }; - proto.aggregator.Checkin.Status.prototype.clearLastHeartbeat = function() { - return this.setLastHeartbeat(void 0); - }; - proto.aggregator.Checkin.Status.prototype.hasLastHeartbeat = function() { - return jspb.Message.getField(this, 3) != null; - }; - proto.aggregator.Checkin.prototype.getId = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.Checkin.prototype.setId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.Checkin.prototype.getAddress = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.Checkin.prototype.setAddress = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); - }; - proto.aggregator.Checkin.prototype.getSignature = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 3, "") - ); - }; - proto.aggregator.Checkin.prototype.setSignature = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); - }; - proto.aggregator.Checkin.prototype.getStatus = function() { - return ( - /** @type{?proto.aggregator.Checkin.Status} */ - jspb.Message.getWrapperField(this, proto.aggregator.Checkin.Status, 4) - ); - }; - proto.aggregator.Checkin.prototype.setStatus = function(value) { - return jspb.Message.setWrapperField(this, 4, value); - }; - proto.aggregator.Checkin.prototype.clearStatus = function() { - return this.setStatus(void 0); - }; - proto.aggregator.Checkin.prototype.hasStatus = function() { - return jspb.Message.getField(this, 4) != null; - }; - proto.aggregator.Checkin.prototype.getVersion = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 5, "") - ); - }; - proto.aggregator.Checkin.prototype.setVersion = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); - }; - proto.aggregator.Checkin.prototype.getMetricsport = function() { - return ( - /** @type {number} */ - jspb.Message.getFieldWithDefault(this, 6, 0) - ); - }; - proto.aggregator.Checkin.prototype.setMetricsport = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); - }; - proto.aggregator.Checkin.prototype.getRemoteip = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 7, "") - ); - }; - proto.aggregator.Checkin.prototype.setRemoteip = function(value) { - return jspb.Message.setProto3StringField(this, 7, value); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.CheckinResp.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.CheckinResp.toObject(opt_includeInstance, this); - }; - proto.aggregator.CheckinResp.toObject = function(includeInstance, msg) { - var f, obj = { - updatedAt: (f = msg.getUpdatedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.CheckinResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.CheckinResp(); - return proto.aggregator.CheckinResp.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.CheckinResp.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - 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); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.CheckinResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.CheckinResp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.CheckinResp.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getUpdatedAt(); - if (f != null) { - writer.writeMessage( - 1, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - }; - proto.aggregator.CheckinResp.prototype.getUpdatedAt = function() { - return ( - /** @type{?proto.google.protobuf.Timestamp} */ - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 1) - ); - }; - proto.aggregator.CheckinResp.prototype.setUpdatedAt = function(value) { - return jspb.Message.setWrapperField(this, 1, value); - }; - proto.aggregator.CheckinResp.prototype.clearUpdatedAt = function() { - return this.setUpdatedAt(void 0); - }; - proto.aggregator.CheckinResp.prototype.hasUpdatedAt = function() { - return jspb.Message.getField(this, 1) != null; - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.SyncTasksReq.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.SyncTasksReq.toObject(opt_includeInstance, this); - }; - proto.aggregator.SyncTasksReq.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, ""), - address: jspb.Message.getFieldWithDefault(msg, 2, ""), - signature: jspb.Message.getFieldWithDefault(msg, 3, ""), - monotonicClock: jspb.Message.getFieldWithDefault(msg, 4, 0) - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.SyncTasksReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.SyncTasksReq(); - return proto.aggregator.SyncTasksReq.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.SyncTasksReq.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.setAddress(value); - break; - case 3: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setSignature(value); - break; - case 4: - var value = ( - /** @type {number} */ - reader.readInt64() - ); - msg.setMonotonicClock(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.SyncTasksReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.SyncTasksReq.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.SyncTasksReq.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getAddress(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getSignature(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getMonotonicClock(); - if (f !== 0) { - writer.writeInt64( - 4, - f - ); - } - }; - proto.aggregator.SyncTasksReq.prototype.getId = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.SyncTasksReq.prototype.setId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.SyncTasksReq.prototype.getAddress = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.SyncTasksReq.prototype.setAddress = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); - }; - proto.aggregator.SyncTasksReq.prototype.getSignature = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 3, "") - ); - }; - proto.aggregator.SyncTasksReq.prototype.setSignature = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); - }; - proto.aggregator.SyncTasksReq.prototype.getMonotonicClock = function() { - return ( - /** @type {number} */ - jspb.Message.getFieldWithDefault(this, 4, 0) - ); - }; - proto.aggregator.SyncTasksReq.prototype.setMonotonicClock = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.TaskTrigger.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.TaskTrigger.toObject(opt_includeInstance, this); - }; - proto.aggregator.TaskTrigger.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) - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.TaskTrigger.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.TaskTrigger(); - return proto.aggregator.TaskTrigger.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.TaskTrigger.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {!proto.aggregator.TriggerType} */ - reader.readEnum() - ); - msg.setTriggerType(value); - break; - case 2: - var value = 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); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.TaskTrigger.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.TaskTrigger.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.TaskTrigger.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getTriggerType(); - if (f !== 0) { - writer.writeEnum( - 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 - ); - } - }; - proto.aggregator.TaskTrigger.prototype.getTriggerType = function() { - return ( - /** @type {!proto.aggregator.TriggerType} */ - jspb.Message.getFieldWithDefault(this, 1, 0) - ); - }; - proto.aggregator.TaskTrigger.prototype.setTriggerType = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); - }; - proto.aggregator.TaskTrigger.prototype.getSchedule = function() { - return ( - /** @type{?proto.aggregator.TimeCondition} */ - jspb.Message.getWrapperField(this, proto.aggregator.TimeCondition, 2) - ); - }; - proto.aggregator.TaskTrigger.prototype.setSchedule = function(value) { - return jspb.Message.setWrapperField(this, 2, value); - }; - proto.aggregator.TaskTrigger.prototype.clearSchedule = function() { - return this.setSchedule(void 0); - }; - proto.aggregator.TaskTrigger.prototype.hasSchedule = function() { - return jspb.Message.getField(this, 2) != null; - }; - proto.aggregator.TaskTrigger.prototype.getContractQuery = function() { - return ( - /** @type{?proto.aggregator.ContractQueryCondition} */ - jspb.Message.getWrapperField(this, proto.aggregator.ContractQueryCondition, 3) - ); - }; - proto.aggregator.TaskTrigger.prototype.setContractQuery = function(value) { - return jspb.Message.setWrapperField(this, 3, value); - }; - proto.aggregator.TaskTrigger.prototype.clearContractQuery = function() { - return this.setContractQuery(void 0); - }; - proto.aggregator.TaskTrigger.prototype.hasContractQuery = function() { - return jspb.Message.getField(this, 3) != null; - }; - proto.aggregator.TaskTrigger.prototype.getExpression = function() { - return ( - /** @type{?proto.aggregator.ExpressionCondition} */ - jspb.Message.getWrapperField(this, proto.aggregator.ExpressionCondition, 4) - ); - }; - proto.aggregator.TaskTrigger.prototype.setExpression = function(value) { - return jspb.Message.setWrapperField(this, 4, value); - }; - proto.aggregator.TaskTrigger.prototype.clearExpression = function() { - return this.setExpression(void 0); - }; - proto.aggregator.TaskTrigger.prototype.hasExpression = function() { - return jspb.Message.getField(this, 4) != null; - }; - proto.aggregator.TimeCondition.repeatedFields_ = [1]; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.TimeCondition.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.TimeCondition.toObject(opt_includeInstance, this); - }; - proto.aggregator.TimeCondition.toObject = function(includeInstance, msg) { - var f, obj = { - fixedList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? void 0 : f, - cron: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.TimeCondition.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.TimeCondition(); - return proto.aggregator.TimeCondition.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.TimeCondition.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - 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); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.TimeCondition.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.TimeCondition.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.TimeCondition.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getFixedList(); - if (f.length > 0) { - writer.writePackedInt64( - 1, - f - ); - } - f = message.getCron(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - }; - proto.aggregator.TimeCondition.prototype.getFixedList = function() { - return ( - /** @type {!Array} */ - jspb.Message.getRepeatedField(this, 1) - ); - }; - proto.aggregator.TimeCondition.prototype.setFixedList = function(value) { - return jspb.Message.setField(this, 1, value || []); - }; - proto.aggregator.TimeCondition.prototype.addFixed = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 1, value, opt_index); - }; - proto.aggregator.TimeCondition.prototype.clearFixedList = function() { - return this.setFixedList([]); - }; - proto.aggregator.TimeCondition.prototype.getCron = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.TimeCondition.prototype.setCron = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.ContractQueryCondition.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.ContractQueryCondition.toObject(opt_includeInstance, this); - }; - proto.aggregator.ContractQueryCondition.toObject = function(includeInstance, msg) { - var f, obj = { - contractAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), - callmsg: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.ContractQueryCondition.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ContractQueryCondition(); - return proto.aggregator.ContractQueryCondition.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.ContractQueryCondition.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.setContractAddress(value); - break; - case 2: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setCallmsg(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.ContractQueryCondition.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.ContractQueryCondition.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.ContractQueryCondition.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getContractAddress(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getCallmsg(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - }; - proto.aggregator.ContractQueryCondition.prototype.getContractAddress = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.ContractQueryCondition.prototype.setContractAddress = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.ContractQueryCondition.prototype.getCallmsg = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.ContractQueryCondition.prototype.setCallmsg = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.ExpressionCondition.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.ExpressionCondition.toObject(opt_includeInstance, this); - }; - proto.aggregator.ExpressionCondition.toObject = function(includeInstance, msg) { - var f, obj = { - expression: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.ExpressionCondition.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ExpressionCondition(); - return proto.aggregator.ExpressionCondition.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.ExpressionCondition.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; - }; - proto.aggregator.ExpressionCondition.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.ExpressionCondition.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.ExpressionCondition.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getExpression(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - }; - proto.aggregator.ExpressionCondition.prototype.getExpression = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.ExpressionCondition.prototype.setExpression = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.SyncTasksResp.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.SyncTasksResp.toObject(opt_includeInstance, this); - }; - proto.aggregator.SyncTasksResp.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) - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.SyncTasksResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.SyncTasksResp(); - return proto.aggregator.SyncTasksResp.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.SyncTasksResp.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.setChecktype(value); - break; - case 3: - var value = new proto.aggregator.TaskTrigger(); - reader.readMessage(value, proto.aggregator.TaskTrigger.deserializeBinaryFromReader); - msg.setTrigger(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.SyncTasksResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.SyncTasksResp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.SyncTasksResp.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getChecktype(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getTrigger(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.aggregator.TaskTrigger.serializeBinaryToWriter - ); - } - }; - proto.aggregator.SyncTasksResp.prototype.getId = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.SyncTasksResp.prototype.setId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.SyncTasksResp.prototype.getChecktype = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.SyncTasksResp.prototype.setChecktype = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); - }; - proto.aggregator.SyncTasksResp.prototype.getTrigger = function() { - return ( - /** @type{?proto.aggregator.TaskTrigger} */ - jspb.Message.getWrapperField(this, proto.aggregator.TaskTrigger, 3) - ); - }; - proto.aggregator.SyncTasksResp.prototype.setTrigger = function(value) { - return jspb.Message.setWrapperField(this, 3, value); - }; - proto.aggregator.SyncTasksResp.prototype.clearTrigger = function() { - return this.setTrigger(void 0); - }; - proto.aggregator.SyncTasksResp.prototype.hasTrigger = function() { - return jspb.Message.getField(this, 3) != null; - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.ETHTransfer.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.ETHTransfer.toObject(opt_includeInstance, this); - }; - 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.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.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; - }; - proto.aggregator.ETHTransfer.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.ETHTransfer.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.ETHTransfer.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getDestination(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getAmount(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - }; - proto.aggregator.ETHTransfer.prototype.getDestination = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.ETHTransfer.prototype.setDestination = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.ETHTransfer.prototype.getAmount = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.ETHTransfer.prototype.setAmount = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.ContractExecution.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.ContractExecution.toObject(opt_includeInstance, this); - }; - proto.aggregator.ContractExecution.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, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.ContractExecution.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ContractExecution(); - return proto.aggregator.ContractExecution.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.ContractExecution.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.setContractAddress(value); - break; - case 2: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setCallData(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); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.ContractExecution.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.ContractExecution.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.ContractExecution.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getContractAddress(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getCallData(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getMethod(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getEncodedParams(); - if (f.length > 0) { - writer.writeString( - 4, - f - ); - } - }; - proto.aggregator.ContractExecution.prototype.getContractAddress = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.ContractExecution.prototype.setContractAddress = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.ContractExecution.prototype.getCallData = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.ContractExecution.prototype.setCallData = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); - }; - proto.aggregator.ContractExecution.prototype.getMethod = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 3, "") - ); - }; - proto.aggregator.ContractExecution.prototype.setMethod = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); - }; - proto.aggregator.ContractExecution.prototype.getEncodedParams = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 4, "") - ); - }; - proto.aggregator.ContractExecution.prototype.setEncodedParams = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.GraphQLDataQuery.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.GraphQLDataQuery.toObject(opt_includeInstance, this); - }; - proto.aggregator.GraphQLDataQuery.toObject = function(includeInstance, msg) { - var f, obj = { - url: jspb.Message.getFieldWithDefault(msg, 1, ""), - query: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.GraphQLDataQuery.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.GraphQLDataQuery(); - return proto.aggregator.GraphQLDataQuery.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.GraphQLDataQuery.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setUrl(value); - break; - case 2: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setQuery(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.GraphQLDataQuery.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.GraphQLDataQuery.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.GraphQLDataQuery.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getUrl(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getQuery(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - }; - proto.aggregator.GraphQLDataQuery.prototype.getUrl = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.GraphQLDataQuery.prototype.setUrl = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.GraphQLDataQuery.prototype.getQuery = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.GraphQLDataQuery.prototype.setQuery = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.HTTPAPICall.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.HTTPAPICall.toObject(opt_includeInstance, this); - }; - proto.aggregator.HTTPAPICall.toObject = function(includeInstance, msg) { - var f, obj = { - url: jspb.Message.getFieldWithDefault(msg, 1, ""), - headersMap: (f = msg.getHeadersMap()) ? f.toObject(includeInstance, void 0) : [], - body: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.HTTPAPICall.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.HTTPAPICall(); - return proto.aggregator.HTTPAPICall.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.HTTPAPICall.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setUrl(value); - break; - case 2: - var value = msg.getHeadersMap(); - reader.readMessage(value, function(message, reader2) { - jspb.Map.deserializeBinary(message, reader2, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); - }); - break; - case 3: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setBody(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.HTTPAPICall.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.HTTPAPICall.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.HTTPAPICall.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getUrl(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getHeadersMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary(2, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); - } - f = message.getBody(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - }; - proto.aggregator.HTTPAPICall.prototype.getUrl = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.HTTPAPICall.prototype.setUrl = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.HTTPAPICall.prototype.getHeadersMap = function(opt_noLazyCreate) { - return ( - /** @type {!jspb.Map} */ - jspb.Message.getMapField( - this, - 2, - opt_noLazyCreate, - null - ) - ); - }; - proto.aggregator.HTTPAPICall.prototype.clearHeadersMap = function() { - this.getHeadersMap().clear(); - return this; - }; - proto.aggregator.HTTPAPICall.prototype.getBody = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 3, "") - ); - }; - proto.aggregator.HTTPAPICall.prototype.setBody = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.CustomCode.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.CustomCode.toObject(opt_includeInstance, this); - }; - proto.aggregator.CustomCode.toObject = function(includeInstance, msg) { - var f, obj = { - type: jspb.Message.getFieldWithDefault(msg, 1, 0), - body: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.CustomCode.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.CustomCode(); - return proto.aggregator.CustomCode.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.CustomCode.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {!proto.aggregator.CustomCodeType} */ - reader.readEnum() - ); - msg.setType(value); - break; - case 2: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setBody(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.CustomCode.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.CustomCode.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.CustomCode.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getType(); - if (f !== 0) { - writer.writeEnum( - 1, - f - ); - } - f = message.getBody(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - }; - proto.aggregator.CustomCode.prototype.getType = function() { - return ( - /** @type {!proto.aggregator.CustomCodeType} */ - jspb.Message.getFieldWithDefault(this, 1, 0) - ); - }; - proto.aggregator.CustomCode.prototype.setType = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); - }; - proto.aggregator.CustomCode.prototype.getBody = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.CustomCode.prototype.setBody = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.ConditionJump.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.ConditionJump.toObject(opt_includeInstance, this); - }; - proto.aggregator.ConditionJump.toObject = function(includeInstance, msg) { - var f, obj = { - expression: jspb.Message.getFieldWithDefault(msg, 1, ""), - next: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.ConditionJump.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ConditionJump(); - return proto.aggregator.ConditionJump.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.ConditionJump.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; - case 2: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setNext(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.ConditionJump.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.ConditionJump.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.ConditionJump.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getExpression(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getNext(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - }; - proto.aggregator.ConditionJump.prototype.getExpression = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.ConditionJump.prototype.setExpression = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.ConditionJump.prototype.getNext = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.ConditionJump.prototype.setNext = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); - }; - proto.aggregator.BranchAction.repeatedFields_ = [2]; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.BranchAction.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.BranchAction.toObject(opt_includeInstance, this); - }; - proto.aggregator.BranchAction.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) - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.BranchAction.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.BranchAction(); - return proto.aggregator.BranchAction.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.BranchAction.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = new proto.aggregator.ConditionJump(); - reader.readMessage(value, proto.aggregator.ConditionJump.deserializeBinaryFromReader); - msg.setIf(value); - break; - case 2: - var value = new proto.aggregator.ConditionJump(); - reader.readMessage(value, proto.aggregator.ConditionJump.deserializeBinaryFromReader); - msg.addElseifs(value); - break; - case 3: - var value = new proto.aggregator.ConditionJump(); - reader.readMessage(value, proto.aggregator.ConditionJump.deserializeBinaryFromReader); - msg.setElse(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.BranchAction.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.BranchAction.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.BranchAction.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getIf(); - if (f != null) { - writer.writeMessage( - 1, - f, - proto.aggregator.ConditionJump.serializeBinaryToWriter - ); - } - f = message.getElseifsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 2, - f, - proto.aggregator.ConditionJump.serializeBinaryToWriter - ); - } - f = message.getElse(); - if (f != null) { - writer.writeMessage( - 3, - f, - proto.aggregator.ConditionJump.serializeBinaryToWriter - ); - } - }; - proto.aggregator.BranchAction.prototype.getIf = function() { - return ( - /** @type{?proto.aggregator.ConditionJump} */ - jspb.Message.getWrapperField(this, proto.aggregator.ConditionJump, 1) - ); - }; - proto.aggregator.BranchAction.prototype.setIf = function(value) { - return jspb.Message.setWrapperField(this, 1, value); - }; - proto.aggregator.BranchAction.prototype.clearIf = function() { - return this.setIf(void 0); - }; - proto.aggregator.BranchAction.prototype.hasIf = function() { - return jspb.Message.getField(this, 1) != null; - }; - proto.aggregator.BranchAction.prototype.getElseifsList = function() { - return ( - /** @type{!Array} */ - jspb.Message.getRepeatedWrapperField(this, proto.aggregator.ConditionJump, 2) - ); - }; - proto.aggregator.BranchAction.prototype.setElseifsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); - }; - 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.BranchAction.prototype.clearElseifsList = function() { - return this.setElseifsList([]); - }; - proto.aggregator.BranchAction.prototype.getElse = function() { - return ( - /** @type{?proto.aggregator.ConditionJump} */ - jspb.Message.getWrapperField(this, proto.aggregator.ConditionJump, 3) - ); - }; - proto.aggregator.BranchAction.prototype.setElse = function(value) { - return jspb.Message.setWrapperField(this, 3, value); - }; - proto.aggregator.BranchAction.prototype.clearElse = function() { - return this.setElse(void 0); - }; - proto.aggregator.BranchAction.prototype.hasElse = function() { - return jspb.Message.getField(this, 3) != null; - }; - proto.aggregator.TaskAction.repeatedFields_ = [4]; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.TaskAction.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.TaskAction.toObject(opt_includeInstance, this); - }; - proto.aggregator.TaskAction.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 ? void 0 : 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) - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.TaskAction.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.TaskAction(); - return proto.aggregator.TaskAction.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.TaskAction.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {!proto.aggregator.TaskType} */ - reader.readEnum() - ); - msg.setTaskType(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); - 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(); - break; - } - } - return msg; - }; - proto.aggregator.TaskAction.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.TaskAction.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.TaskAction.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getTaskType(); - if (f !== 0) { - writer.writeEnum( - 1, - f - ); - } - f = message.getId(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getName(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - f = message.getNextList(); - if (f.length > 0) { - writer.writeRepeatedString( - 4, - 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 - ); - } - }; - proto.aggregator.TaskAction.prototype.getTaskType = function() { - return ( - /** @type {!proto.aggregator.TaskType} */ - jspb.Message.getFieldWithDefault(this, 1, 0) - ); - }; - proto.aggregator.TaskAction.prototype.setTaskType = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); - }; - proto.aggregator.TaskAction.prototype.getId = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.TaskAction.prototype.setId = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); - }; - proto.aggregator.TaskAction.prototype.getName = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 3, "") - ); - }; - proto.aggregator.TaskAction.prototype.setName = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); - }; - proto.aggregator.TaskAction.prototype.getNextList = function() { - return ( - /** @type {!Array} */ - jspb.Message.getRepeatedField(this, 4) - ); - }; - proto.aggregator.TaskAction.prototype.setNextList = function(value) { - return jspb.Message.setField(this, 4, value || []); - }; - proto.aggregator.TaskAction.prototype.addNext = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 4, value, opt_index); - }; - proto.aggregator.TaskAction.prototype.clearNextList = function() { - return this.setNextList([]); - }; - proto.aggregator.TaskAction.prototype.getEthTransfer = function() { - return ( - /** @type{?proto.aggregator.ETHTransfer} */ - jspb.Message.getWrapperField(this, proto.aggregator.ETHTransfer, 10) - ); - }; - proto.aggregator.TaskAction.prototype.setEthTransfer = function(value) { - return jspb.Message.setWrapperField(this, 10, value); - }; - proto.aggregator.TaskAction.prototype.clearEthTransfer = function() { - return this.setEthTransfer(void 0); - }; - proto.aggregator.TaskAction.prototype.hasEthTransfer = function() { - return jspb.Message.getField(this, 10) != null; - }; - proto.aggregator.TaskAction.prototype.getContractExecution = function() { - return ( - /** @type{?proto.aggregator.ContractExecution} */ - jspb.Message.getWrapperField(this, proto.aggregator.ContractExecution, 11) - ); - }; - proto.aggregator.TaskAction.prototype.setContractExecution = function(value) { - return jspb.Message.setWrapperField(this, 11, value); - }; - proto.aggregator.TaskAction.prototype.clearContractExecution = function() { - return this.setContractExecution(void 0); - }; - proto.aggregator.TaskAction.prototype.hasContractExecution = function() { - return jspb.Message.getField(this, 11) != null; - }; - proto.aggregator.TaskAction.prototype.getGraphqlDataQuery = function() { - return ( - /** @type{?proto.aggregator.GraphQLDataQuery} */ - jspb.Message.getWrapperField(this, proto.aggregator.GraphQLDataQuery, 12) - ); - }; - proto.aggregator.TaskAction.prototype.setGraphqlDataQuery = function(value) { - return jspb.Message.setWrapperField(this, 12, value); - }; - proto.aggregator.TaskAction.prototype.clearGraphqlDataQuery = function() { - return this.setGraphqlDataQuery(void 0); - }; - proto.aggregator.TaskAction.prototype.hasGraphqlDataQuery = function() { - return jspb.Message.getField(this, 12) != null; - }; - proto.aggregator.TaskAction.prototype.getHttpDataQuery = function() { - return ( - /** @type{?proto.aggregator.HTTPAPICall} */ - jspb.Message.getWrapperField(this, proto.aggregator.HTTPAPICall, 13) - ); - }; - proto.aggregator.TaskAction.prototype.setHttpDataQuery = function(value) { - return jspb.Message.setWrapperField(this, 13, value); - }; - proto.aggregator.TaskAction.prototype.clearHttpDataQuery = function() { - return this.setHttpDataQuery(void 0); - }; - proto.aggregator.TaskAction.prototype.hasHttpDataQuery = function() { - return jspb.Message.getField(this, 13) != null; - }; - proto.aggregator.TaskAction.prototype.getCustomCode = function() { - return ( - /** @type{?proto.aggregator.CustomCode} */ - jspb.Message.getWrapperField(this, proto.aggregator.CustomCode, 14) - ); - }; - proto.aggregator.TaskAction.prototype.setCustomCode = function(value) { - return jspb.Message.setWrapperField(this, 14, value); - }; - proto.aggregator.TaskAction.prototype.clearCustomCode = function() { - return this.setCustomCode(void 0); - }; - proto.aggregator.TaskAction.prototype.hasCustomCode = function() { - return jspb.Message.getField(this, 14) != null; - }; - proto.aggregator.TaskAction.prototype.getBranch = function() { - return ( - /** @type{?proto.aggregator.BranchAction} */ - jspb.Message.getWrapperField(this, proto.aggregator.BranchAction, 15) - ); - }; - proto.aggregator.TaskAction.prototype.setBranch = function(value) { - return jspb.Message.setWrapperField(this, 15, value); - }; - proto.aggregator.TaskAction.prototype.clearBranch = function() { - return this.setBranch(void 0); - }; - proto.aggregator.TaskAction.prototype.hasBranch = function() { - return jspb.Message.getField(this, 15) != null; - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.Execution.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.Execution.toObject(opt_includeInstance, this); - }; - proto.aggregator.Execution.toObject = function(includeInstance, msg) { - var f, obj = { - epoch: jspb.Message.getFieldWithDefault(msg, 1, 0), - userOpHash: jspb.Message.getFieldWithDefault(msg, 2, ""), - error: jspb.Message.getFieldWithDefault(msg, 3, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.Execution.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.Execution(); - return proto.aggregator.Execution.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.Execution.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.Execution.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.Execution.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.Execution.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getEpoch(); - if (f !== 0) { - writer.writeInt64( - 1, - f - ); - } - f = message.getUserOpHash(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getError(); - if (f.length > 0) { - writer.writeString( - 3, - f - ); - } - }; - proto.aggregator.Execution.prototype.getEpoch = function() { - return ( - /** @type {number} */ - jspb.Message.getFieldWithDefault(this, 1, 0) - ); - }; - proto.aggregator.Execution.prototype.setEpoch = function(value) { - return jspb.Message.setProto3IntField(this, 1, value); - }; - proto.aggregator.Execution.prototype.getUserOpHash = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.Execution.prototype.setUserOpHash = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); - }; - proto.aggregator.Execution.prototype.getError = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 3, "") - ); - }; - proto.aggregator.Execution.prototype.setError = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); - }; - proto.aggregator.Task.repeatedFields_ = [5, 12]; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.Task.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.Task.toObject(opt_includeInstance, this); - }; - proto.aggregator.Task.toObject = function(includeInstance, msg) { - var f, obj = { - id: (f = msg.getId()) && proto.aggregator.UUID.toObject(includeInstance, f), - owner: jspb.Message.getFieldWithDefault(msg, 2, ""), - smartAccountAddress: jspb.Message.getFieldWithDefault(msg, 3, ""), - trigger: (f = msg.getTrigger()) && proto.aggregator.TaskTrigger.toObject(includeInstance, f), - nodesList: jspb.Message.toObjectList( - msg.getNodesList(), - proto.aggregator.TaskAction.toObject, - includeInstance - ), - startAt: jspb.Message.getFieldWithDefault(msg, 6, 0), - expiredAt: jspb.Message.getFieldWithDefault(msg, 7, 0), - memo: jspb.Message.getFieldWithDefault(msg, 8, ""), - completedAt: jspb.Message.getFieldWithDefault(msg, 9, 0), - status: jspb.Message.getFieldWithDefault(msg, 10, 0), - repeatable: jspb.Message.getBooleanFieldWithDefault(msg, 11, false), - executionsList: jspb.Message.toObjectList( - msg.getExecutionsList(), - proto.aggregator.Execution.toObject, - includeInstance - ) - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - 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); - }; - proto.aggregator.Task.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - 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: - var value = ( - /** @type {number} */ - reader.readInt64() - ); - msg.setStartAt(value); - break; - case 7: - var value = ( - /** @type {number} */ - reader.readInt64() - ); - msg.setExpiredAt(value); - break; - case 8: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setMemo(value); - break; - case 9: - var value = ( - /** @type {number} */ - reader.readInt64() - ); - msg.setCompletedAt(value); - break; - case 10: - var value = ( - /** @type {!proto.aggregator.TaskStatus} */ - reader.readEnum() - ); - msg.setStatus(value); - break; - case 11: - var value = ( - /** @type {boolean} */ - reader.readBool() - ); - msg.setRepeatable(value); - break; - case 12: - var value = new proto.aggregator.Execution(); - reader.readMessage(value, proto.aggregator.Execution.deserializeBinaryFromReader); - msg.addExecutions(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.Task.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.Task.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.Task.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - 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, - 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, - f - ); - } - f = message.getExpiredAt(); - if (f !== 0) { - writer.writeInt64( - 7, - f - ); - } - f = message.getMemo(); - if (f.length > 0) { - writer.writeString( - 8, - f - ); - } - f = message.getCompletedAt(); - if (f !== 0) { - writer.writeInt64( - 9, - f - ); - } - f = message.getStatus(); - if (f !== 0) { - writer.writeEnum( - 10, - f - ); - } - f = message.getRepeatable(); - if (f) { - writer.writeBool( - 11, - f - ); - } - f = message.getExecutionsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 12, - f, - proto.aggregator.Execution.serializeBinaryToWriter - ); - } - }; - proto.aggregator.Task.prototype.getId = function() { - return ( - /** @type{?proto.aggregator.UUID} */ - jspb.Message.getWrapperField(this, proto.aggregator.UUID, 1) - ); - }; - proto.aggregator.Task.prototype.setId = function(value) { - return jspb.Message.setWrapperField(this, 1, value); - }; - proto.aggregator.Task.prototype.clearId = function() { - return this.setId(void 0); - }; - proto.aggregator.Task.prototype.hasId = function() { - return jspb.Message.getField(this, 1) != null; - }; - proto.aggregator.Task.prototype.getOwner = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.Task.prototype.setOwner = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); - }; - proto.aggregator.Task.prototype.getSmartAccountAddress = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 3, "") - ); - }; - proto.aggregator.Task.prototype.setSmartAccountAddress = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); - }; - proto.aggregator.Task.prototype.getTrigger = function() { - return ( - /** @type{?proto.aggregator.TaskTrigger} */ - jspb.Message.getWrapperField(this, proto.aggregator.TaskTrigger, 4) - ); - }; - proto.aggregator.Task.prototype.setTrigger = function(value) { - return jspb.Message.setWrapperField(this, 4, value); - }; - proto.aggregator.Task.prototype.clearTrigger = function() { - return this.setTrigger(void 0); - }; - proto.aggregator.Task.prototype.hasTrigger = function() { - return jspb.Message.getField(this, 4) != null; - }; - proto.aggregator.Task.prototype.getNodesList = function() { - return ( - /** @type{!Array} */ - jspb.Message.getRepeatedWrapperField(this, proto.aggregator.TaskAction, 5) - ); - }; - proto.aggregator.Task.prototype.setNodesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 5, value); - }; - 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.Task.prototype.clearNodesList = function() { - return this.setNodesList([]); - }; - proto.aggregator.Task.prototype.getStartAt = function() { - return ( - /** @type {number} */ - jspb.Message.getFieldWithDefault(this, 6, 0) - ); - }; - proto.aggregator.Task.prototype.setStartAt = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); - }; - proto.aggregator.Task.prototype.getExpiredAt = function() { - return ( - /** @type {number} */ - jspb.Message.getFieldWithDefault(this, 7, 0) - ); - }; - proto.aggregator.Task.prototype.setExpiredAt = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); - }; - proto.aggregator.Task.prototype.getMemo = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 8, "") - ); - }; - proto.aggregator.Task.prototype.setMemo = function(value) { - return jspb.Message.setProto3StringField(this, 8, value); - }; - proto.aggregator.Task.prototype.getCompletedAt = function() { - return ( - /** @type {number} */ - jspb.Message.getFieldWithDefault(this, 9, 0) - ); - }; - proto.aggregator.Task.prototype.setCompletedAt = function(value) { - return jspb.Message.setProto3IntField(this, 9, value); - }; - proto.aggregator.Task.prototype.getStatus = function() { - return ( - /** @type {!proto.aggregator.TaskStatus} */ - jspb.Message.getFieldWithDefault(this, 10, 0) - ); - }; - proto.aggregator.Task.prototype.setStatus = function(value) { - return jspb.Message.setProto3EnumField(this, 10, value); - }; - proto.aggregator.Task.prototype.getRepeatable = function() { - return ( - /** @type {boolean} */ - jspb.Message.getBooleanFieldWithDefault(this, 11, false) - ); - }; - proto.aggregator.Task.prototype.setRepeatable = function(value) { - return jspb.Message.setProto3BooleanField(this, 11, value); - }; - proto.aggregator.Task.prototype.getExecutionsList = function() { - return ( - /** @type{!Array} */ - jspb.Message.getRepeatedWrapperField(this, proto.aggregator.Execution, 12) - ); - }; - proto.aggregator.Task.prototype.setExecutionsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 12, value); - }; - 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.Task.prototype.clearExecutionsList = function() { - return this.setExecutionsList([]); - }; - proto.aggregator.CreateTaskReq.repeatedFields_ = [2]; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.CreateTaskReq.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.CreateTaskReq.toObject(opt_includeInstance, this); - }; - proto.aggregator.CreateTaskReq.toObject = function(includeInstance, msg) { - var f, obj = { - trigger: (f = msg.getTrigger()) && proto.aggregator.TaskTrigger.toObject(includeInstance, f), - actionsList: jspb.Message.toObjectList( - msg.getActionsList(), - proto.aggregator.TaskAction.toObject, - includeInstance - ), - startAt: jspb.Message.getFieldWithDefault(msg, 3, 0), - expiredAt: jspb.Message.getFieldWithDefault(msg, 4, 0), - memo: jspb.Message.getFieldWithDefault(msg, 5, ""), - repeatable: jspb.Message.getBooleanFieldWithDefault(msg, 6, false) - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.CreateTaskReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.CreateTaskReq(); - return proto.aggregator.CreateTaskReq.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.CreateTaskReq.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - 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); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.CreateTaskReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.CreateTaskReq.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.CreateTaskReq.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - 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(); - if (f.length > 0) { - writer.writeString( - 5, - f - ); - } - f = message.getRepeatable(); - if (f) { - writer.writeBool( - 6, - f - ); - } - }; - proto.aggregator.CreateTaskReq.prototype.getTrigger = function() { - return ( - /** @type{?proto.aggregator.TaskTrigger} */ - jspb.Message.getWrapperField(this, proto.aggregator.TaskTrigger, 1) - ); - }; - proto.aggregator.CreateTaskReq.prototype.setTrigger = function(value) { - return jspb.Message.setWrapperField(this, 1, value); - }; - proto.aggregator.CreateTaskReq.prototype.clearTrigger = function() { - return this.setTrigger(void 0); - }; - proto.aggregator.CreateTaskReq.prototype.hasTrigger = function() { - return jspb.Message.getField(this, 1) != null; - }; - proto.aggregator.CreateTaskReq.prototype.getActionsList = function() { - return ( - /** @type{!Array} */ - jspb.Message.getRepeatedWrapperField(this, proto.aggregator.TaskAction, 2) - ); - }; - proto.aggregator.CreateTaskReq.prototype.setActionsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); - }; - proto.aggregator.CreateTaskReq.prototype.addActions = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 2, opt_value, proto.aggregator.TaskAction, opt_index); - }; - proto.aggregator.CreateTaskReq.prototype.clearActionsList = function() { - return this.setActionsList([]); - }; - proto.aggregator.CreateTaskReq.prototype.getStartAt = function() { - return ( - /** @type {number} */ - jspb.Message.getFieldWithDefault(this, 3, 0) - ); - }; - proto.aggregator.CreateTaskReq.prototype.setStartAt = function(value) { - return jspb.Message.setProto3IntField(this, 3, value); - }; - proto.aggregator.CreateTaskReq.prototype.getExpiredAt = function() { - return ( - /** @type {number} */ - jspb.Message.getFieldWithDefault(this, 4, 0) - ); - }; - proto.aggregator.CreateTaskReq.prototype.setExpiredAt = function(value) { - return jspb.Message.setProto3IntField(this, 4, value); - }; - proto.aggregator.CreateTaskReq.prototype.getMemo = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 5, "") - ); - }; - proto.aggregator.CreateTaskReq.prototype.setMemo = function(value) { - return jspb.Message.setProto3StringField(this, 5, value); - }; - proto.aggregator.CreateTaskReq.prototype.getRepeatable = function() { - return ( - /** @type {boolean} */ - jspb.Message.getBooleanFieldWithDefault(this, 6, false) - ); - }; - proto.aggregator.CreateTaskReq.prototype.setRepeatable = function(value) { - return jspb.Message.setProto3BooleanField(this, 6, value); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.CreateTaskResp.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.CreateTaskResp.toObject(opt_includeInstance, this); - }; - proto.aggregator.CreateTaskResp.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.CreateTaskResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.CreateTaskResp(); - return proto.aggregator.CreateTaskResp.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.CreateTaskResp.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; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.CreateTaskResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.CreateTaskResp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.CreateTaskResp.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - }; - proto.aggregator.CreateTaskResp.prototype.getId = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.CreateTaskResp.prototype.setId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.NonceRequest.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.NonceRequest.toObject(opt_includeInstance, this); - }; - proto.aggregator.NonceRequest.toObject = function(includeInstance, msg) { - var f, obj = { - owner: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - 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); - }; - 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; - }; - proto.aggregator.NonceRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.NonceRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.NonceRequest.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getOwner(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - }; - proto.aggregator.NonceRequest.prototype.getOwner = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.NonceRequest.prototype.setOwner = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.NonceResp.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.NonceResp.toObject(opt_includeInstance, this); - }; - proto.aggregator.NonceResp.toObject = function(includeInstance, msg) { - var f, obj = { - nonce: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - 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); - }; - 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; - }; - proto.aggregator.NonceResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.NonceResp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.NonceResp.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getNonce(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - }; - proto.aggregator.NonceResp.prototype.getNonce = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.NonceResp.prototype.setNonce = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.AddressRequest.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.AddressRequest.toObject(opt_includeInstance, this); - }; - proto.aggregator.AddressRequest.toObject = function(includeInstance, msg) { - var f, obj = { - owner: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.AddressRequest.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.AddressRequest(); - return proto.aggregator.AddressRequest.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.AddressRequest.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; - }; - proto.aggregator.AddressRequest.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.AddressRequest.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.AddressRequest.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getOwner(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - }; - proto.aggregator.AddressRequest.prototype.getOwner = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.AddressRequest.prototype.setOwner = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.AddressResp.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.AddressResp.toObject(opt_includeInstance, this); - }; - proto.aggregator.AddressResp.toObject = function(includeInstance, msg) { - var f, obj = { - smartAccountAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), - nonce: jspb.Message.getFieldWithDefault(msg, 2, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.AddressResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.AddressResp(); - return proto.aggregator.AddressResp.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.AddressResp.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setSmartAccountAddress(value); - break; - case 2: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setNonce(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.AddressResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.AddressResp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.AddressResp.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getSmartAccountAddress(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getNonce(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - }; - proto.aggregator.AddressResp.prototype.getSmartAccountAddress = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.AddressResp.prototype.setSmartAccountAddress = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.AddressResp.prototype.getNonce = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.AddressResp.prototype.setNonce = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.ListTasksReq.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.ListTasksReq.toObject(opt_includeInstance, this); - }; - proto.aggregator.ListTasksReq.toObject = function(includeInstance, msg) { - var f, obj = {}; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.ListTasksReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ListTasksReq(); - return proto.aggregator.ListTasksReq.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.ListTasksReq.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.ListTasksReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.ListTasksReq.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.ListTasksReq.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - }; - proto.aggregator.ListTasksResp.repeatedFields_ = [1]; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.ListTasksResp.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.ListTasksResp.toObject(opt_includeInstance, this); - }; - 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; - }; - } - 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.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.ListTasksResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.ListTasksResp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.ListTasksResp.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getTasksList(); - if (f.length > 0) { - writer.writeRepeatedMessage( - 1, - f, - proto.aggregator.ListTasksResp.TaskItemResp.serializeBinaryToWriter - ); - } - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.ListTasksResp.TaskItemResp.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.ListTasksResp.TaskItemResp.toObject(opt_includeInstance, this); - }; - proto.aggregator.ListTasksResp.TaskItemResp.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, ""), - status: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.ListTasksResp.TaskItemResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ListTasksResp.TaskItemResp(); - return proto.aggregator.ListTasksResp.TaskItemResp.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.ListTasksResp.TaskItemResp.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 {!proto.aggregator.TaskStatus} */ - reader.readEnum() - ); - msg.setStatus(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.ListTasksResp.TaskItemResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.ListTasksResp.TaskItemResp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.ListTasksResp.TaskItemResp.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getId(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getStatus(); - if (f !== 0) { - writer.writeEnum( - 2, - f - ); - } - }; - proto.aggregator.ListTasksResp.TaskItemResp.prototype.getId = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.ListTasksResp.TaskItemResp.prototype.setId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.ListTasksResp.TaskItemResp.prototype.getStatus = function() { - return ( - /** @type {!proto.aggregator.TaskStatus} */ - jspb.Message.getFieldWithDefault(this, 2, 0) - ); - }; - proto.aggregator.ListTasksResp.TaskItemResp.prototype.setStatus = function(value) { - return jspb.Message.setProto3EnumField(this, 2, value); - }; - proto.aggregator.ListTasksResp.prototype.getTasksList = function() { - return ( - /** @type{!Array} */ - jspb.Message.getRepeatedWrapperField(this, proto.aggregator.ListTasksResp.TaskItemResp, 1) - ); - }; - proto.aggregator.ListTasksResp.prototype.setTasksList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); - }; - proto.aggregator.ListTasksResp.prototype.addTasks = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.aggregator.ListTasksResp.TaskItemResp, opt_index); - }; - proto.aggregator.ListTasksResp.prototype.clearTasksList = function() { - return this.setTasksList([]); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.GetKeyReq.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.GetKeyReq.toObject(opt_includeInstance, this); - }; - 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) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.GetKeyReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.GetKeyReq(); - return proto.aggregator.GetKeyReq.deserializeBinaryFromReader(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; - } - } - return msg; - }; - proto.aggregator.GetKeyReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.GetKeyReq.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.GetKeyReq.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - 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 - ); - } - }; - proto.aggregator.GetKeyReq.prototype.getOwner = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.GetKeyReq.prototype.setOwner = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.GetKeyReq.prototype.getExpiredAt = function() { - return ( - /** @type {number} */ - jspb.Message.getFieldWithDefault(this, 2, 0) - ); - }; - proto.aggregator.GetKeyReq.prototype.setExpiredAt = function(value) { - return jspb.Message.setProto3IntField(this, 2, value); - }; - proto.aggregator.GetKeyReq.prototype.getSignature = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 3, "") - ); - }; - proto.aggregator.GetKeyReq.prototype.setSignature = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.KeyResp.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.KeyResp.toObject(opt_includeInstance, this); - }; - proto.aggregator.KeyResp.toObject = function(includeInstance, msg) { - var f, obj = { - key: jspb.Message.getFieldWithDefault(msg, 1, "") - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.KeyResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.KeyResp(); - return proto.aggregator.KeyResp.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.KeyResp.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.setKey(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.KeyResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.KeyResp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.KeyResp.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getKey(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - }; - proto.aggregator.KeyResp.prototype.getKey = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.KeyResp.prototype.setKey = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.UpdateChecksReq.repeatedFields_ = [3]; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.UpdateChecksReq.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.UpdateChecksReq.toObject(opt_includeInstance, this); - }; - proto.aggregator.UpdateChecksReq.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 ? void 0 : f - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.UpdateChecksReq.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.UpdateChecksReq(); - return proto.aggregator.UpdateChecksReq.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.UpdateChecksReq.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - var field = reader.getFieldNumber(); - switch (field) { - case 1: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setAddress(value); - break; - case 2: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setSignature(value); - break; - case 3: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.addId(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.UpdateChecksReq.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.UpdateChecksReq.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.UpdateChecksReq.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getAddress(); - if (f.length > 0) { - writer.writeString( - 1, - f - ); - } - f = message.getSignature(); - if (f.length > 0) { - writer.writeString( - 2, - f - ); - } - f = message.getIdList(); - if (f.length > 0) { - writer.writeRepeatedString( - 3, - f - ); - } - }; - proto.aggregator.UpdateChecksReq.prototype.getAddress = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.UpdateChecksReq.prototype.setAddress = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.UpdateChecksReq.prototype.getSignature = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.UpdateChecksReq.prototype.setSignature = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); - }; - proto.aggregator.UpdateChecksReq.prototype.getIdList = function() { - return ( - /** @type {!Array} */ - jspb.Message.getRepeatedField(this, 3) - ); - }; - proto.aggregator.UpdateChecksReq.prototype.setIdList = function(value) { - return jspb.Message.setField(this, 3, value || []); - }; - proto.aggregator.UpdateChecksReq.prototype.addId = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 3, value, opt_index); - }; - proto.aggregator.UpdateChecksReq.prototype.clearIdList = function() { - return this.setIdList([]); - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.UpdateChecksResp.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.UpdateChecksResp.toObject(opt_includeInstance, this); - }; - proto.aggregator.UpdateChecksResp.toObject = function(includeInstance, msg) { - var f, obj = { - updatedAt: (f = msg.getUpdatedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.UpdateChecksResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.UpdateChecksResp(); - return proto.aggregator.UpdateChecksResp.deserializeBinaryFromReader(msg, reader); - }; - proto.aggregator.UpdateChecksResp.deserializeBinaryFromReader = function(msg, reader) { - while (reader.nextField()) { - if (reader.isEndGroup()) { - break; - } - 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); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.UpdateChecksResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.UpdateChecksResp.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); - }; - proto.aggregator.UpdateChecksResp.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getUpdatedAt(); - if (f != null) { - writer.writeMessage( - 1, - f, - google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter - ); - } - }; - proto.aggregator.UpdateChecksResp.prototype.getUpdatedAt = function() { - return ( - /** @type{?proto.google.protobuf.Timestamp} */ - jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 1) - ); - }; - proto.aggregator.UpdateChecksResp.prototype.setUpdatedAt = function(value) { - return jspb.Message.setWrapperField(this, 1, value); - }; - proto.aggregator.UpdateChecksResp.prototype.clearUpdatedAt = function() { - return this.setUpdatedAt(void 0); - }; - proto.aggregator.UpdateChecksResp.prototype.hasUpdatedAt = function() { - return jspb.Message.getField(this, 1) != null; - }; - proto.aggregator.TriggerType = { - TIMETRIGGER: 0, - CONTRACTQUERYTRIGGER: 1, - EXPRESSIONTRIGGER: 2 - }; - proto.aggregator.TaskType = { - ETHTRANSFERTASK: 0, - CONTRACTEXECUTIONTASK: 1, - GRAPHQLDATAQUERYTASK: 2, - HTTPAPICALLTASK: 3, - CUSTOMCODETASK: 4, - BRANCHACTIONTASK: 5 - }; - proto.aggregator.TaskStatus = { - ACTIVE: 0, - COMPLETED: 1, - FAILED: 2, - CANCELED: 3, - EXECUTING: 4 - }; - proto.aggregator.CustomCodeType = { - JAVASCRIPT: 0 - }; - goog.object.extend(exports, proto.aggregator); - ({ Task, CreateTaskReq, CreateTaskResp, GetKeyReq, KeyResp, UpdateChecksReq, UpdateChecksResp } = proto.aggregator); - } -}); - -// src/index.ts -var src_exports = {}; -__export(src_exports, { - default: () => Client, - getKeyRequestMessage: () => getKeyRequestMessage -}); -module.exports = __toCommonJS(src_exports); -var grpc2 = __toESM(require("@grpc/grpc-js"), 1); - -// src/auth.ts -var getKeyRequestMessage = (address, expiredAt) => { - return `key request for ${address} expired at ${expiredAt}`; -}; - -// grpc_codegen/avs_grpc_pb.js -var grpc = require("@grpc/grpc-js"); -var avs_pb = (init_avs_pb(), __toCommonJS(avs_pb_exports)); -var google_protobuf_timestamp_pb2 = require("google-protobuf/google/protobuf/timestamp_pb.js"); -var google_protobuf_wrappers_pb2 = 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"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_Checkin(buffer_arg) { - return avs_pb.Checkin.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_CheckinResp(arg) { - if (!(arg instanceof avs_pb.CheckinResp)) { - throw new Error("Expected argument of type aggregator.CheckinResp"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_CheckinResp(buffer_arg) { - return avs_pb.CheckinResp.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_CreateTaskReq(arg) { - if (!(arg instanceof avs_pb.CreateTaskReq)) { - throw new Error("Expected argument of type aggregator.CreateTaskReq"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_CreateTaskReq(buffer_arg) { - return avs_pb.CreateTaskReq.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_CreateTaskResp(arg) { - if (!(arg instanceof avs_pb.CreateTaskResp)) { - throw new Error("Expected argument of type aggregator.CreateTaskResp"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_CreateTaskResp(buffer_arg) { - return avs_pb.CreateTaskResp.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"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_GetKeyReq(buffer_arg) { - return avs_pb.GetKeyReq.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"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_KeyResp(buffer_arg) { - return avs_pb.KeyResp.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_ListTasksReq(arg) { - if (!(arg instanceof avs_pb.ListTasksReq)) { - throw new Error("Expected argument of type aggregator.ListTasksReq"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_ListTasksReq(buffer_arg) { - return avs_pb.ListTasksReq.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_ListTasksResp(arg) { - if (!(arg instanceof avs_pb.ListTasksResp)) { - throw new Error("Expected argument of type aggregator.ListTasksResp"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_ListTasksResp(buffer_arg) { - return avs_pb.ListTasksResp.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"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_NonceRequest(buffer_arg) { - return avs_pb.NonceRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_NonceResp(arg) { - if (!(arg instanceof avs_pb.NonceResp)) { - throw new Error("Expected argument of type aggregator.NonceResp"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_NonceResp(buffer_arg) { - return avs_pb.NonceResp.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_SyncTasksReq(arg) { - if (!(arg instanceof avs_pb.SyncTasksReq)) { - throw new Error("Expected argument of type aggregator.SyncTasksReq"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_SyncTasksReq(buffer_arg) { - return avs_pb.SyncTasksReq.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_SyncTasksResp(arg) { - if (!(arg instanceof avs_pb.SyncTasksResp)) { - throw new Error("Expected argument of type aggregator.SyncTasksResp"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_SyncTasksResp(buffer_arg) { - return avs_pb.SyncTasksResp.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_Task(arg) { - if (!(arg instanceof avs_pb.Task)) { - throw new Error("Expected argument of type aggregator.Task"); - } - return Buffer.from(arg.serializeBinary()); -} -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"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_UpdateChecksReq(buffer_arg) { - return avs_pb.UpdateChecksReq.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_UpdateChecksResp(arg) { - if (!(arg instanceof avs_pb.UpdateChecksResp)) { - throw new Error("Expected argument of type aggregator.UpdateChecksResp"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_UpdateChecksResp(buffer_arg) { - return avs_pb.UpdateChecksResp.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_google_protobuf_BoolValue(arg) { - if (!(arg instanceof google_protobuf_wrappers_pb2.BoolValue)) { - throw new Error("Expected argument of type google.protobuf.BoolValue"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_google_protobuf_BoolValue(buffer_arg) { - return google_protobuf_wrappers_pb2.BoolValue.deserializeBinary(new Uint8Array(buffer_arg)); -} -var AggregatorService = { - // Auth - getKey: { - path: "/aggregator.Aggregator/GetKey", - requestStream: false, - responseStream: false, - requestType: avs_pb.GetKeyReq, - responseType: avs_pb.KeyResp, - requestSerialize: serialize_aggregator_GetKeyReq, - requestDeserialize: deserialize_aggregator_GetKeyReq, - responseSerialize: serialize_aggregator_KeyResp, - responseDeserialize: deserialize_aggregator_KeyResp - }, - // Smart Acccount - getNonce: { - path: "/aggregator.Aggregator/GetNonce", - requestStream: false, - responseStream: false, - requestType: avs_pb.NonceRequest, - responseType: avs_pb.NonceResp, - requestSerialize: serialize_aggregator_NonceRequest, - requestDeserialize: deserialize_aggregator_NonceRequest, - responseSerialize: serialize_aggregator_NonceResp, - responseDeserialize: deserialize_aggregator_NonceResp - }, - getSmartAccountAddress: { - path: "/aggregator.Aggregator/GetSmartAccountAddress", - 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 - }, - // Task Management - createTask: { - path: "/aggregator.Aggregator/CreateTask", - requestStream: false, - responseStream: false, - requestType: avs_pb.CreateTaskReq, - responseType: avs_pb.CreateTaskResp, - requestSerialize: serialize_aggregator_CreateTaskReq, - requestDeserialize: deserialize_aggregator_CreateTaskReq, - responseSerialize: serialize_aggregator_CreateTaskResp, - responseDeserialize: deserialize_aggregator_CreateTaskResp - }, - listTasks: { - path: "/aggregator.Aggregator/ListTasks", - requestStream: false, - responseStream: false, - requestType: avs_pb.ListTasksReq, - responseType: avs_pb.ListTasksResp, - requestSerialize: serialize_aggregator_ListTasksReq, - requestDeserialize: deserialize_aggregator_ListTasksReq, - responseSerialize: serialize_aggregator_ListTasksResp, - responseDeserialize: deserialize_aggregator_ListTasksResp - }, - getTask: { - path: "/aggregator.Aggregator/GetTask", - requestStream: false, - responseStream: false, - requestType: avs_pb.UUID, - responseType: avs_pb.Task, - requestSerialize: serialize_aggregator_UUID, - requestDeserialize: deserialize_aggregator_UUID, - responseSerialize: serialize_aggregator_Task, - responseDeserialize: deserialize_aggregator_Task - }, - cancelTask: { - path: "/aggregator.Aggregator/CancelTask", - requestStream: false, - responseStream: false, - requestType: avs_pb.UUID, - responseType: google_protobuf_wrappers_pb2.BoolValue, - requestSerialize: serialize_aggregator_UUID, - requestDeserialize: deserialize_aggregator_UUID, - responseSerialize: serialize_google_protobuf_BoolValue, - responseDeserialize: deserialize_google_protobuf_BoolValue - }, - deleteTask: { - path: "/aggregator.Aggregator/DeleteTask", - requestStream: false, - responseStream: false, - requestType: avs_pb.UUID, - responseType: google_protobuf_wrappers_pb2.BoolValue, - requestSerialize: serialize_aggregator_UUID, - requestDeserialize: deserialize_aggregator_UUID, - responseSerialize: serialize_google_protobuf_BoolValue, - responseDeserialize: deserialize_google_protobuf_BoolValue - }, - // Operator endpoint - ping: { - path: "/aggregator.Aggregator/Ping", - requestStream: false, - responseStream: false, - requestType: avs_pb.Checkin, - responseType: avs_pb.CheckinResp, - requestSerialize: serialize_aggregator_Checkin, - requestDeserialize: deserialize_aggregator_Checkin, - responseSerialize: serialize_aggregator_CheckinResp, - responseDeserialize: deserialize_aggregator_CheckinResp - }, - syncTasks: { - path: "/aggregator.Aggregator/SyncTasks", - requestStream: false, - responseStream: true, - requestType: avs_pb.SyncTasksReq, - responseType: avs_pb.SyncTasksResp, - requestSerialize: serialize_aggregator_SyncTasksReq, - requestDeserialize: deserialize_aggregator_SyncTasksReq, - responseSerialize: serialize_aggregator_SyncTasksResp, - responseDeserialize: deserialize_aggregator_SyncTasksResp - }, - updateChecks: { - path: "/aggregator.Aggregator/UpdateChecks", - requestStream: false, - responseStream: false, - requestType: avs_pb.UpdateChecksReq, - responseType: avs_pb.UpdateChecksResp, - requestSerialize: serialize_aggregator_UpdateChecksReq, - requestDeserialize: deserialize_aggregator_UpdateChecksReq, - responseSerialize: serialize_aggregator_UpdateChecksResp, - responseDeserialize: deserialize_aggregator_UpdateChecksResp - } -}; -var AggregatorClient = grpc.makeGenericClientConstructor(AggregatorService); - -// src/index.ts -init_avs_pb(); -var metadata = new grpc2.Metadata(); -var BaseClient = class { - // protected wallet?: any; - constructor(opts) { - this.endpoint = opts.endpoint; - this.rpcClient = new AggregatorClient( - this.endpoint, - // TODO: switch to the TLS after we're able to update all the operator - grpc2.ChannelCredentials.createInsecure() - ); - console.log("this.rpcClient:", this.rpcClient); - } - // async authWithJwtToken( - // address: string, - // jwtToken: string, - // expiredAt?: number - // ): Promise { - // console.log("Authenticating with JWT token: ", jwtToken); - // // Use the provided expiredAt or set it to 24 hours from now if not provided - // const expirationTime = - // expiredAt || Math.floor(Date.now() / 1000) + DEFAULT_JWT_EXPIRATION; - // const result: avsPb.KeyResp = await this._callRPC< - // avsPb.KeyResp, - // avsPb.GetKeyReq - // >("getKey", { - // owner: address, - // expired_at: expirationTime, - // signature: jwtToken, - // }); - // this.authkey = result.getKey(); - // return { key: result.getKey() }; - // } - // This flow can be used where the signature is generate from outside, such as in front-end and pass in - async authWithSignature(address, signature, expiredAtEpoch) { - console.log( - "Authenticating with signature:", - signature, - "Expired at epoch:", - expiredAtEpoch - ); - const request = new GetKeyReq(); - request.setOwner(address); - request.setExpiredAt(expiredAtEpoch); - request.setSignature(signature); - let result = await this._callRPC( - "getKey", - request - ); - console.log("result:", result); - this.authkey = result.getKey(); - return { key: result.getKey() }; - } - isAuthenticated() { - return !!this.authkey; - } - _callRPC(method, request) { - return new Promise((resolve, reject) => { - this.rpcClient[method].bind(this.rpcClient)( - request, - metadata, - (error, response) => { - if (error) reject(error); - else resolve(response); - } - ); - }); - } -}; -var Client = class extends BaseClient { - constructor(config) { - super(config); - } -}; -// Annotate the CommonJS export names for ESM import in node: -0 && (module.exports = { - getKeyRequestMessage -}); diff --git a/dist/index.d.cts b/dist/index.d.cts deleted file mode 100644 index 6839ee1..0000000 --- a/dist/index.d.cts +++ /dev/null @@ -1,1499 +0,0 @@ -import * as grpc from '@grpc/grpc-js'; -import * as jspb from 'google-protobuf'; -import * as google_protobuf_timestamp_pb from 'google-protobuf/google/protobuf/timestamp_pb'; -import * as google_protobuf_wrappers_pb from 'google-protobuf/google/protobuf/wrappers_pb'; - -declare const getKeyRequestMessage: (address: string, expiredAt: number) => string; - -// package: aggregator -// file: avs.proto - - - -declare class UUID extends jspb.Message { - getBytes(): string; - setBytes(value: string): UUID; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UUID.AsObject; - static toObject(includeInstance: boolean, msg: UUID): UUID.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: UUID, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UUID; - static deserializeBinaryFromReader(message: UUID, reader: jspb.BinaryReader): UUID; -} - -declare namespace UUID { - export type AsObject = { - bytes: string, - } -} - -declare class Checkin extends jspb.Message { - getId(): string; - setId(value: string): Checkin; - getAddress(): string; - setAddress(value: string): Checkin; - getSignature(): string; - setSignature(value: string): Checkin; - - hasStatus(): boolean; - clearStatus(): void; - getStatus(): Checkin.Status | undefined; - setStatus(value?: Checkin.Status): Checkin; - getVersion(): string; - setVersion(value: string): Checkin; - getMetricsport(): number; - setMetricsport(value: number): Checkin; - getRemoteip(): string; - setRemoteip(value: string): Checkin; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Checkin.AsObject; - static toObject(includeInstance: boolean, msg: Checkin): Checkin.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Checkin, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Checkin; - static deserializeBinaryFromReader(message: Checkin, reader: jspb.BinaryReader): Checkin; -} - -declare namespace Checkin { - export type AsObject = { - id: string, - address: string, - signature: string, - status?: Checkin.Status.AsObject, - version: string, - metricsport: number, - remoteip: string, - } - - - export class Status extends jspb.Message { - getUptime(): number; - setUptime(value: number): Status; - getQueuedepth(): number; - setQueuedepth(value: number): Status; - - hasLastHeartbeat(): boolean; - clearLastHeartbeat(): void; - getLastHeartbeat(): google_protobuf_timestamp_pb.Timestamp | undefined; - setLastHeartbeat(value?: google_protobuf_timestamp_pb.Timestamp): Status; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Status.AsObject; - static toObject(includeInstance: boolean, msg: Status): Status.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Status, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Status; - static deserializeBinaryFromReader(message: Status, reader: jspb.BinaryReader): Status; - } - - export namespace Status { - export type AsObject = { - uptime: number, - queuedepth: number, - lastHeartbeat?: google_protobuf_timestamp_pb.Timestamp.AsObject, - } - } - -} - -declare class CheckinResp extends jspb.Message { - - hasUpdatedAt(): boolean; - clearUpdatedAt(): void; - getUpdatedAt(): google_protobuf_timestamp_pb.Timestamp | undefined; - setUpdatedAt(value?: google_protobuf_timestamp_pb.Timestamp): CheckinResp; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CheckinResp.AsObject; - static toObject(includeInstance: boolean, msg: CheckinResp): CheckinResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CheckinResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CheckinResp; - static deserializeBinaryFromReader(message: CheckinResp, reader: jspb.BinaryReader): CheckinResp; -} - -declare namespace CheckinResp { - export type AsObject = { - updatedAt?: google_protobuf_timestamp_pb.Timestamp.AsObject, - } -} - -declare class SyncTasksReq extends jspb.Message { - getId(): string; - setId(value: string): SyncTasksReq; - getAddress(): string; - setAddress(value: string): SyncTasksReq; - getSignature(): string; - setSignature(value: string): SyncTasksReq; - getMonotonicClock(): number; - setMonotonicClock(value: number): SyncTasksReq; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SyncTasksReq.AsObject; - static toObject(includeInstance: boolean, msg: SyncTasksReq): SyncTasksReq.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SyncTasksReq, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SyncTasksReq; - static deserializeBinaryFromReader(message: SyncTasksReq, reader: jspb.BinaryReader): SyncTasksReq; -} - -declare namespace SyncTasksReq { - export type AsObject = { - id: string, - address: string, - signature: string, - monotonicClock: number, - } -} - -declare class TaskTrigger extends jspb.Message { - getTriggerType(): TriggerType; - setTriggerType(value: TriggerType): TaskTrigger; - - hasSchedule(): boolean; - clearSchedule(): void; - getSchedule(): TimeCondition | undefined; - setSchedule(value?: TimeCondition): TaskTrigger; - - hasContractQuery(): boolean; - clearContractQuery(): void; - getContractQuery(): ContractQueryCondition | undefined; - setContractQuery(value?: ContractQueryCondition): TaskTrigger; - - hasExpression(): boolean; - clearExpression(): void; - getExpression(): ExpressionCondition | undefined; - setExpression(value?: ExpressionCondition): TaskTrigger; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TaskTrigger.AsObject; - static toObject(includeInstance: boolean, msg: TaskTrigger): TaskTrigger.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TaskTrigger, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TaskTrigger; - static deserializeBinaryFromReader(message: TaskTrigger, reader: jspb.BinaryReader): TaskTrigger; -} - -declare namespace TaskTrigger { - export type AsObject = { - triggerType: TriggerType, - schedule?: TimeCondition.AsObject, - contractQuery?: ContractQueryCondition.AsObject, - expression?: ExpressionCondition.AsObject, - } -} - -declare class TimeCondition extends jspb.Message { - clearFixedList(): void; - getFixedList(): Array; - setFixedList(value: Array): TimeCondition; - addFixed(value: number, index?: number): number; - getCron(): string; - setCron(value: string): TimeCondition; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TimeCondition.AsObject; - static toObject(includeInstance: boolean, msg: TimeCondition): TimeCondition.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TimeCondition, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TimeCondition; - static deserializeBinaryFromReader(message: TimeCondition, reader: jspb.BinaryReader): TimeCondition; -} - -declare namespace TimeCondition { - export type AsObject = { - fixedList: Array, - cron: string, - } -} - -declare class ContractQueryCondition extends jspb.Message { - getContractAddress(): string; - setContractAddress(value: string): ContractQueryCondition; - getCallmsg(): string; - setCallmsg(value: string): ContractQueryCondition; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ContractQueryCondition.AsObject; - static toObject(includeInstance: boolean, msg: ContractQueryCondition): ContractQueryCondition.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ContractQueryCondition, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ContractQueryCondition; - static deserializeBinaryFromReader(message: ContractQueryCondition, reader: jspb.BinaryReader): ContractQueryCondition; -} - -declare namespace ContractQueryCondition { - export type AsObject = { - contractAddress: string, - callmsg: string, - } -} - -declare class ExpressionCondition extends jspb.Message { - getExpression(): string; - setExpression(value: string): ExpressionCondition; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ExpressionCondition.AsObject; - static toObject(includeInstance: boolean, msg: ExpressionCondition): ExpressionCondition.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ExpressionCondition, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ExpressionCondition; - static deserializeBinaryFromReader(message: ExpressionCondition, reader: jspb.BinaryReader): ExpressionCondition; -} - -declare namespace ExpressionCondition { - export type AsObject = { - expression: string, - } -} - -declare class SyncTasksResp extends jspb.Message { - getId(): string; - setId(value: string): SyncTasksResp; - getChecktype(): string; - setChecktype(value: string): SyncTasksResp; - - hasTrigger(): boolean; - clearTrigger(): void; - getTrigger(): TaskTrigger | undefined; - setTrigger(value?: TaskTrigger): SyncTasksResp; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): SyncTasksResp.AsObject; - static toObject(includeInstance: boolean, msg: SyncTasksResp): SyncTasksResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: SyncTasksResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): SyncTasksResp; - static deserializeBinaryFromReader(message: SyncTasksResp, reader: jspb.BinaryReader): SyncTasksResp; -} - -declare namespace SyncTasksResp { - export type AsObject = { - id: string, - checktype: string, - trigger?: TaskTrigger.AsObject, - } -} - -declare class ETHTransfer extends jspb.Message { - getDestination(): string; - setDestination(value: string): ETHTransfer; - getAmount(): string; - setAmount(value: string): ETHTransfer; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ETHTransfer.AsObject; - static toObject(includeInstance: boolean, msg: ETHTransfer): ETHTransfer.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ETHTransfer, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ETHTransfer; - static deserializeBinaryFromReader(message: ETHTransfer, reader: jspb.BinaryReader): ETHTransfer; -} - -declare namespace ETHTransfer { - export type AsObject = { - destination: string, - amount: string, - } -} - -declare class ContractExecution extends jspb.Message { - getContractAddress(): string; - setContractAddress(value: string): ContractExecution; - getCallData(): string; - setCallData(value: string): ContractExecution; - getMethod(): string; - setMethod(value: string): ContractExecution; - getEncodedParams(): string; - setEncodedParams(value: string): ContractExecution; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ContractExecution.AsObject; - static toObject(includeInstance: boolean, msg: ContractExecution): ContractExecution.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ContractExecution, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ContractExecution; - static deserializeBinaryFromReader(message: ContractExecution, reader: jspb.BinaryReader): ContractExecution; -} - -declare namespace ContractExecution { - export type AsObject = { - contractAddress: string, - callData: string, - method: string, - encodedParams: string, - } -} - -declare class GraphQLDataQuery extends jspb.Message { - getUrl(): string; - setUrl(value: string): GraphQLDataQuery; - getQuery(): string; - setQuery(value: string): GraphQLDataQuery; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GraphQLDataQuery.AsObject; - static toObject(includeInstance: boolean, msg: GraphQLDataQuery): GraphQLDataQuery.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GraphQLDataQuery, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GraphQLDataQuery; - static deserializeBinaryFromReader(message: GraphQLDataQuery, reader: jspb.BinaryReader): GraphQLDataQuery; -} - -declare namespace GraphQLDataQuery { - export type AsObject = { - url: string, - query: string, - } -} - -declare class HTTPAPICall extends jspb.Message { - getUrl(): string; - setUrl(value: string): HTTPAPICall; - - getHeadersMap(): jspb.Map; - clearHeadersMap(): void; - getBody(): string; - setBody(value: string): HTTPAPICall; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): HTTPAPICall.AsObject; - static toObject(includeInstance: boolean, msg: HTTPAPICall): HTTPAPICall.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: HTTPAPICall, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): HTTPAPICall; - static deserializeBinaryFromReader(message: HTTPAPICall, reader: jspb.BinaryReader): HTTPAPICall; -} - -declare namespace HTTPAPICall { - export type AsObject = { - url: string, - - headersMap: Array<[string, string]>, - body: string, - } -} - -declare class CustomCode extends jspb.Message { - getType(): CustomCodeType; - setType(value: CustomCodeType): CustomCode; - getBody(): string; - setBody(value: string): CustomCode; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CustomCode.AsObject; - static toObject(includeInstance: boolean, msg: CustomCode): CustomCode.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CustomCode, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CustomCode; - static deserializeBinaryFromReader(message: CustomCode, reader: jspb.BinaryReader): CustomCode; -} - -declare namespace CustomCode { - export type AsObject = { - type: CustomCodeType, - body: string, - } -} - -declare class ConditionJump extends jspb.Message { - getExpression(): string; - setExpression(value: string): ConditionJump; - getNext(): string; - setNext(value: string): ConditionJump; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ConditionJump.AsObject; - static toObject(includeInstance: boolean, msg: ConditionJump): ConditionJump.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ConditionJump, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ConditionJump; - static deserializeBinaryFromReader(message: ConditionJump, reader: jspb.BinaryReader): ConditionJump; -} - -declare namespace ConditionJump { - export type AsObject = { - expression: string, - next: string, - } -} - -declare class BranchAction extends jspb.Message { - - hasIf(): boolean; - clearIf(): void; - getIf(): ConditionJump | undefined; - setIf(value?: ConditionJump): BranchAction; - clearElseifsList(): void; - getElseifsList(): Array; - setElseifsList(value: Array): BranchAction; - addElseifs(value?: ConditionJump, index?: number): ConditionJump; - - hasElse(): boolean; - clearElse(): void; - getElse(): ConditionJump | undefined; - setElse(value?: ConditionJump): BranchAction; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): BranchAction.AsObject; - static toObject(includeInstance: boolean, msg: BranchAction): BranchAction.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: BranchAction, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): BranchAction; - static deserializeBinaryFromReader(message: BranchAction, reader: jspb.BinaryReader): BranchAction; -} - -declare namespace BranchAction { - export type AsObject = { - pb_if?: ConditionJump.AsObject, - elseifsList: Array, - pb_else?: ConditionJump.AsObject, - } -} - -declare class TaskAction extends jspb.Message { - getTaskType(): TaskType; - setTaskType(value: TaskType): TaskAction; - getId(): string; - setId(value: string): TaskAction; - getName(): string; - setName(value: string): TaskAction; - clearNextList(): void; - getNextList(): Array; - setNextList(value: Array): TaskAction; - addNext(value: string, index?: number): string; - - hasEthTransfer(): boolean; - clearEthTransfer(): void; - getEthTransfer(): ETHTransfer | undefined; - setEthTransfer(value?: ETHTransfer): TaskAction; - - hasContractExecution(): boolean; - clearContractExecution(): void; - getContractExecution(): ContractExecution | undefined; - setContractExecution(value?: ContractExecution): TaskAction; - - hasGraphqlDataQuery(): boolean; - clearGraphqlDataQuery(): void; - getGraphqlDataQuery(): GraphQLDataQuery | undefined; - setGraphqlDataQuery(value?: GraphQLDataQuery): TaskAction; - - hasHttpDataQuery(): boolean; - clearHttpDataQuery(): void; - getHttpDataQuery(): HTTPAPICall | undefined; - setHttpDataQuery(value?: HTTPAPICall): TaskAction; - - hasCustomCode(): boolean; - clearCustomCode(): void; - getCustomCode(): CustomCode | undefined; - setCustomCode(value?: CustomCode): TaskAction; - - hasBranch(): boolean; - clearBranch(): void; - getBranch(): BranchAction | undefined; - setBranch(value?: BranchAction): TaskAction; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TaskAction.AsObject; - static toObject(includeInstance: boolean, msg: TaskAction): TaskAction.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TaskAction, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TaskAction; - static deserializeBinaryFromReader(message: TaskAction, reader: jspb.BinaryReader): TaskAction; -} - -declare namespace TaskAction { - export type AsObject = { - taskType: TaskType, - id: string, - name: string, - nextList: Array, - ethTransfer?: ETHTransfer.AsObject, - contractExecution?: ContractExecution.AsObject, - graphqlDataQuery?: GraphQLDataQuery.AsObject, - httpDataQuery?: HTTPAPICall.AsObject, - customCode?: CustomCode.AsObject, - branch?: BranchAction.AsObject, - } -} - -declare class Execution extends jspb.Message { - getEpoch(): number; - setEpoch(value: number): Execution; - getUserOpHash(): string; - setUserOpHash(value: string): Execution; - getError(): string; - setError(value: string): Execution; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Execution.AsObject; - static toObject(includeInstance: boolean, msg: Execution): Execution.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Execution, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Execution; - static deserializeBinaryFromReader(message: Execution, reader: jspb.BinaryReader): Execution; -} - -declare namespace Execution { - export type AsObject = { - epoch: number, - userOpHash: string, - error: string, - } -} - -declare class Task extends jspb.Message { - - hasId(): boolean; - clearId(): void; - getId(): UUID | undefined; - setId(value?: UUID): Task; - getOwner(): string; - setOwner(value: string): Task; - getSmartAccountAddress(): string; - setSmartAccountAddress(value: string): Task; - - hasTrigger(): boolean; - clearTrigger(): void; - getTrigger(): TaskTrigger | undefined; - setTrigger(value?: TaskTrigger): Task; - clearNodesList(): void; - getNodesList(): Array; - setNodesList(value: Array): Task; - addNodes(value?: TaskAction, index?: number): TaskAction; - getStartAt(): number; - setStartAt(value: number): Task; - getExpiredAt(): number; - setExpiredAt(value: number): Task; - getMemo(): string; - setMemo(value: string): Task; - getCompletedAt(): number; - setCompletedAt(value: number): Task; - getStatus(): TaskStatus; - setStatus(value: TaskStatus): Task; - getRepeatable(): boolean; - setRepeatable(value: boolean): Task; - clearExecutionsList(): void; - getExecutionsList(): Array; - setExecutionsList(value: Array): Task; - addExecutions(value?: Execution, index?: number): Execution; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Task.AsObject; - static toObject(includeInstance: boolean, msg: Task): Task.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Task, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Task; - static deserializeBinaryFromReader(message: Task, reader: jspb.BinaryReader): Task; -} - -declare namespace Task { - export type AsObject = { - id?: UUID.AsObject, - owner: string, - smartAccountAddress: string, - trigger?: TaskTrigger.AsObject, - nodesList: Array, - startAt: number, - expiredAt: number, - memo: string, - completedAt: number, - status: TaskStatus, - repeatable: boolean, - executionsList: Array, - } -} - -declare class CreateTaskReq extends jspb.Message { - - hasTrigger(): boolean; - clearTrigger(): void; - getTrigger(): TaskTrigger | undefined; - setTrigger(value?: TaskTrigger): CreateTaskReq; - clearActionsList(): void; - getActionsList(): Array; - setActionsList(value: Array): CreateTaskReq; - addActions(value?: TaskAction, index?: number): TaskAction; - getStartAt(): number; - setStartAt(value: number): CreateTaskReq; - getExpiredAt(): number; - setExpiredAt(value: number): CreateTaskReq; - getMemo(): string; - setMemo(value: string): CreateTaskReq; - getRepeatable(): boolean; - setRepeatable(value: boolean): CreateTaskReq; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateTaskReq.AsObject; - static toObject(includeInstance: boolean, msg: CreateTaskReq): CreateTaskReq.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CreateTaskReq, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CreateTaskReq; - static deserializeBinaryFromReader(message: CreateTaskReq, reader: jspb.BinaryReader): CreateTaskReq; -} - -declare namespace CreateTaskReq { - export type AsObject = { - trigger?: TaskTrigger.AsObject, - actionsList: Array, - startAt: number, - expiredAt: number, - memo: string, - repeatable: boolean, - } -} - -declare class CreateTaskResp extends jspb.Message { - getId(): string; - setId(value: string): CreateTaskResp; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CreateTaskResp.AsObject; - static toObject(includeInstance: boolean, msg: CreateTaskResp): CreateTaskResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CreateTaskResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CreateTaskResp; - static deserializeBinaryFromReader(message: CreateTaskResp, reader: jspb.BinaryReader): CreateTaskResp; -} - -declare namespace CreateTaskResp { - export type AsObject = { - id: string, - } -} - -declare class NonceRequest extends jspb.Message { - getOwner(): string; - setOwner(value: string): NonceRequest; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): NonceRequest.AsObject; - static toObject(includeInstance: boolean, msg: NonceRequest): NonceRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: NonceRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): NonceRequest; - static deserializeBinaryFromReader(message: NonceRequest, reader: jspb.BinaryReader): NonceRequest; -} - -declare namespace NonceRequest { - export type AsObject = { - owner: string, - } -} - -declare class NonceResp extends jspb.Message { - getNonce(): string; - setNonce(value: string): NonceResp; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): NonceResp.AsObject; - static toObject(includeInstance: boolean, msg: NonceResp): NonceResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: NonceResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): NonceResp; - static deserializeBinaryFromReader(message: NonceResp, reader: jspb.BinaryReader): NonceResp; -} - -declare namespace NonceResp { - export type AsObject = { - nonce: string, - } -} - -declare class AddressRequest extends jspb.Message { - getOwner(): string; - setOwner(value: string): AddressRequest; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AddressRequest.AsObject; - static toObject(includeInstance: boolean, msg: AddressRequest): AddressRequest.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AddressRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AddressRequest; - static deserializeBinaryFromReader(message: AddressRequest, reader: jspb.BinaryReader): AddressRequest; -} - -declare namespace AddressRequest { - export type AsObject = { - owner: string, - } -} - -declare class AddressResp extends jspb.Message { - getSmartAccountAddress(): string; - setSmartAccountAddress(value: string): AddressResp; - getNonce(): string; - setNonce(value: string): AddressResp; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AddressResp.AsObject; - static toObject(includeInstance: boolean, msg: AddressResp): AddressResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AddressResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AddressResp; - static deserializeBinaryFromReader(message: AddressResp, reader: jspb.BinaryReader): AddressResp; -} - -declare namespace AddressResp { - export type AsObject = { - smartAccountAddress: string, - nonce: string, - } -} - -declare class ListTasksReq extends jspb.Message { - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListTasksReq.AsObject; - static toObject(includeInstance: boolean, msg: ListTasksReq): ListTasksReq.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ListTasksReq, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListTasksReq; - static deserializeBinaryFromReader(message: ListTasksReq, reader: jspb.BinaryReader): ListTasksReq; -} - -declare namespace ListTasksReq { - export type AsObject = { - } -} - -declare class ListTasksResp extends jspb.Message { - clearTasksList(): void; - getTasksList(): Array; - setTasksList(value: Array): ListTasksResp; - addTasks(value?: ListTasksResp.TaskItemResp, index?: number): ListTasksResp.TaskItemResp; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ListTasksResp.AsObject; - static toObject(includeInstance: boolean, msg: ListTasksResp): ListTasksResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ListTasksResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ListTasksResp; - static deserializeBinaryFromReader(message: ListTasksResp, reader: jspb.BinaryReader): ListTasksResp; -} - -declare namespace ListTasksResp { - export type AsObject = { - tasksList: Array, - } - - - export class TaskItemResp extends jspb.Message { - getId(): string; - setId(value: string): TaskItemResp; - getStatus(): TaskStatus; - setStatus(value: TaskStatus): TaskItemResp; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TaskItemResp.AsObject; - static toObject(includeInstance: boolean, msg: TaskItemResp): TaskItemResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TaskItemResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TaskItemResp; - static deserializeBinaryFromReader(message: TaskItemResp, reader: jspb.BinaryReader): TaskItemResp; - } - - export namespace TaskItemResp { - export type AsObject = { - id: string, - status: TaskStatus, - } - } - -} - -declare class GetKeyReq extends jspb.Message { - getOwner(): string; - setOwner(value: string): GetKeyReq; - getExpiredAt(): number; - setExpiredAt(value: number): GetKeyReq; - getSignature(): string; - setSignature(value: string): GetKeyReq; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GetKeyReq.AsObject; - static toObject(includeInstance: boolean, msg: GetKeyReq): GetKeyReq.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GetKeyReq, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GetKeyReq; - static deserializeBinaryFromReader(message: GetKeyReq, reader: jspb.BinaryReader): GetKeyReq; -} - -declare namespace GetKeyReq { - export type AsObject = { - owner: string, - expiredAt: number, - signature: string, - } -} - -declare class KeyResp extends jspb.Message { - getKey(): string; - setKey(value: string): KeyResp; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): KeyResp.AsObject; - static toObject(includeInstance: boolean, msg: KeyResp): KeyResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: KeyResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): KeyResp; - static deserializeBinaryFromReader(message: KeyResp, reader: jspb.BinaryReader): KeyResp; -} - -declare namespace KeyResp { - export type AsObject = { - key: string, - } -} - -declare class UpdateChecksReq extends jspb.Message { - getAddress(): string; - setAddress(value: string): UpdateChecksReq; - getSignature(): string; - setSignature(value: string): UpdateChecksReq; - clearIdList(): void; - getIdList(): Array; - setIdList(value: Array): UpdateChecksReq; - addId(value: string, index?: number): string; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UpdateChecksReq.AsObject; - static toObject(includeInstance: boolean, msg: UpdateChecksReq): UpdateChecksReq.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: UpdateChecksReq, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UpdateChecksReq; - static deserializeBinaryFromReader(message: UpdateChecksReq, reader: jspb.BinaryReader): UpdateChecksReq; -} - -declare namespace UpdateChecksReq { - export type AsObject = { - address: string, - signature: string, - idList: Array, - } -} - -declare class UpdateChecksResp extends jspb.Message { - - hasUpdatedAt(): boolean; - clearUpdatedAt(): void; - getUpdatedAt(): google_protobuf_timestamp_pb.Timestamp | undefined; - setUpdatedAt(value?: google_protobuf_timestamp_pb.Timestamp): UpdateChecksResp; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UpdateChecksResp.AsObject; - static toObject(includeInstance: boolean, msg: UpdateChecksResp): UpdateChecksResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: UpdateChecksResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UpdateChecksResp; - static deserializeBinaryFromReader(message: UpdateChecksResp, reader: jspb.BinaryReader): UpdateChecksResp; -} - -declare namespace UpdateChecksResp { - export type AsObject = { - updatedAt?: google_protobuf_timestamp_pb.Timestamp.AsObject, - } -} - -declare enum TriggerType { - TIMETRIGGER = 0, - CONTRACTQUERYTRIGGER = 1, - EXPRESSIONTRIGGER = 2, -} - -declare enum TaskType { - ETHTRANSFERTASK = 0, - CONTRACTEXECUTIONTASK = 1, - GRAPHQLDATAQUERYTASK = 2, - HTTPAPICALLTASK = 3, - CUSTOMCODETASK = 4, - BRANCHACTIONTASK = 5, -} - -declare enum TaskStatus { - ACTIVE = 0, - COMPLETED = 1, - FAILED = 2, - CANCELED = 3, - EXECUTING = 4, -} - -declare enum CustomCodeType { - JAVASCRIPT = 0, -} - -// package: aggregator -// file: avs.proto - - - -interface IAggregatorClient { - getKey( - request: GetKeyReq, - callback: ( - error: grpc.ServiceError | null, - response: KeyResp - ) => void - ): grpc.ClientUnaryCall; - getKey( - request: GetKeyReq, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: KeyResp - ) => void - ): grpc.ClientUnaryCall; - getKey( - request: GetKeyReq, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: KeyResp - ) => void - ): grpc.ClientUnaryCall; - getNonce( - request: NonceRequest, - callback: ( - error: grpc.ServiceError | null, - response: NonceResp - ) => void - ): grpc.ClientUnaryCall; - getNonce( - request: NonceRequest, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: NonceResp - ) => void - ): grpc.ClientUnaryCall; - getNonce( - request: NonceRequest, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: NonceResp - ) => void - ): grpc.ClientUnaryCall; - getSmartAccountAddress( - request: AddressRequest, - callback: ( - error: grpc.ServiceError | null, - response: AddressResp - ) => void - ): grpc.ClientUnaryCall; - getSmartAccountAddress( - request: AddressRequest, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: AddressResp - ) => void - ): grpc.ClientUnaryCall; - getSmartAccountAddress( - request: AddressRequest, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: AddressResp - ) => void - ): grpc.ClientUnaryCall; - createTask( - request: CreateTaskReq, - callback: ( - error: grpc.ServiceError | null, - response: CreateTaskResp - ) => void - ): grpc.ClientUnaryCall; - createTask( - request: CreateTaskReq, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: CreateTaskResp - ) => void - ): grpc.ClientUnaryCall; - createTask( - request: CreateTaskReq, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: CreateTaskResp - ) => void - ): grpc.ClientUnaryCall; - listTasks( - request: ListTasksReq, - callback: ( - error: grpc.ServiceError | null, - response: ListTasksResp - ) => void - ): grpc.ClientUnaryCall; - listTasks( - request: ListTasksReq, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: ListTasksResp - ) => void - ): grpc.ClientUnaryCall; - listTasks( - request: ListTasksReq, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: ListTasksResp - ) => void - ): grpc.ClientUnaryCall; - getTask( - request: UUID, - callback: (error: grpc.ServiceError | null, response: Task) => void - ): grpc.ClientUnaryCall; - getTask( - request: UUID, - metadata: grpc.Metadata, - callback: (error: grpc.ServiceError | null, response: Task) => void - ): grpc.ClientUnaryCall; - getTask( - request: UUID, - metadata: grpc.Metadata, - options: Partial, - callback: (error: grpc.ServiceError | null, response: Task) => void - ): grpc.ClientUnaryCall; - cancelTask( - request: UUID, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - cancelTask( - request: UUID, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - cancelTask( - request: UUID, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - deleteTask( - request: UUID, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - deleteTask( - request: UUID, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - deleteTask( - request: UUID, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - ping( - request: Checkin, - callback: ( - error: grpc.ServiceError | null, - response: CheckinResp - ) => void - ): grpc.ClientUnaryCall; - ping( - request: Checkin, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: CheckinResp - ) => void - ): grpc.ClientUnaryCall; - ping( - request: Checkin, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: CheckinResp - ) => void - ): grpc.ClientUnaryCall; - syncTasks( - request: SyncTasksReq, - options?: Partial - ): grpc.ClientReadableStream; - syncTasks( - request: SyncTasksReq, - metadata?: grpc.Metadata, - options?: Partial - ): grpc.ClientReadableStream; - updateChecks( - request: UpdateChecksReq, - callback: ( - error: grpc.ServiceError | null, - response: UpdateChecksResp - ) => void - ): grpc.ClientUnaryCall; - updateChecks( - request: UpdateChecksReq, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: UpdateChecksResp - ) => void - ): grpc.ClientUnaryCall; - updateChecks( - request: UpdateChecksReq, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: UpdateChecksResp - ) => void - ): grpc.ClientUnaryCall; -} - -declare class AggregatorClient extends grpc.Client implements IAggregatorClient { - constructor( - address: string, - credentials: grpc.ChannelCredentials, - options?: Partial - ); - public getKey( - request: GetKeyReq, - callback: ( - error: grpc.ServiceError | null, - response: KeyResp - ) => void - ): grpc.ClientUnaryCall; - public getKey( - request: GetKeyReq, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: KeyResp - ) => void - ): grpc.ClientUnaryCall; - public getKey( - request: GetKeyReq, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: KeyResp - ) => void - ): grpc.ClientUnaryCall; - public getNonce( - request: NonceRequest, - callback: ( - error: grpc.ServiceError | null, - response: NonceResp - ) => void - ): grpc.ClientUnaryCall; - public getNonce( - request: NonceRequest, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: NonceResp - ) => void - ): grpc.ClientUnaryCall; - public getNonce( - request: NonceRequest, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: NonceResp - ) => void - ): grpc.ClientUnaryCall; - public getSmartAccountAddress( - request: AddressRequest, - callback: ( - error: grpc.ServiceError | null, - response: AddressResp - ) => void - ): grpc.ClientUnaryCall; - public getSmartAccountAddress( - request: AddressRequest, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: AddressResp - ) => void - ): grpc.ClientUnaryCall; - public getSmartAccountAddress( - request: AddressRequest, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: AddressResp - ) => void - ): grpc.ClientUnaryCall; - public createTask( - request: CreateTaskReq, - callback: ( - error: grpc.ServiceError | null, - response: CreateTaskResp - ) => void - ): grpc.ClientUnaryCall; - public createTask( - request: CreateTaskReq, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: CreateTaskResp - ) => void - ): grpc.ClientUnaryCall; - public createTask( - request: CreateTaskReq, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: CreateTaskResp - ) => void - ): grpc.ClientUnaryCall; - public listTasks( - request: ListTasksReq, - callback: ( - error: grpc.ServiceError | null, - response: ListTasksResp - ) => void - ): grpc.ClientUnaryCall; - public listTasks( - request: ListTasksReq, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: ListTasksResp - ) => void - ): grpc.ClientUnaryCall; - public listTasks( - request: ListTasksReq, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: ListTasksResp - ) => void - ): grpc.ClientUnaryCall; - public getTask( - request: UUID, - callback: (error: grpc.ServiceError | null, response: Task) => void - ): grpc.ClientUnaryCall; - public getTask( - request: UUID, - metadata: grpc.Metadata, - callback: (error: grpc.ServiceError | null, response: Task) => void - ): grpc.ClientUnaryCall; - public getTask( - request: UUID, - metadata: grpc.Metadata, - options: Partial, - callback: (error: grpc.ServiceError | null, response: Task) => void - ): grpc.ClientUnaryCall; - public cancelTask( - request: UUID, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - public cancelTask( - request: UUID, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - public cancelTask( - request: UUID, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - public deleteTask( - request: UUID, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - public deleteTask( - request: UUID, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - public deleteTask( - request: UUID, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - public ping( - request: Checkin, - callback: ( - error: grpc.ServiceError | null, - response: CheckinResp - ) => void - ): grpc.ClientUnaryCall; - public ping( - request: Checkin, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: CheckinResp - ) => void - ): grpc.ClientUnaryCall; - public ping( - request: Checkin, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: CheckinResp - ) => void - ): grpc.ClientUnaryCall; - public syncTasks( - request: SyncTasksReq, - options?: Partial - ): grpc.ClientReadableStream; - public syncTasks( - request: SyncTasksReq, - metadata?: grpc.Metadata, - options?: Partial - ): grpc.ClientReadableStream; - public updateChecks( - request: UpdateChecksReq, - callback: ( - error: grpc.ServiceError | null, - response: UpdateChecksResp - ) => void - ): grpc.ClientUnaryCall; - public updateChecks( - request: UpdateChecksReq, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: UpdateChecksResp - ) => void - ): grpc.ClientUnaryCall; - public updateChecks( - request: UpdateChecksReq, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: UpdateChecksResp - ) => void - ): grpc.ClientUnaryCall; -} - -type Environment = "production" | "development" | "staging"; -interface KeyExchangeResp { - key: string; -} -interface ClientOption { - endpoint: string; - jwtApiKey?: string; -} -interface TaskResp { - id: string; - status: string; - result?: any; - error?: string; -} -interface TaskListResp { - tasks: TaskResp[]; -} -interface SmartWalletResp { - address: string; - smart_account_address: string; -} -interface TransactionResp { - hash: string; -} -interface BalanceResp { - balance: string; -} - -declare class BaseClient { - readonly endpoint: string; - readonly rpcClient: AggregatorClient; - protected authkey?: string; - constructor(opts: ClientOption); - authWithSignature(address: string, signature: string, expiredAtEpoch: number): Promise; - isAuthenticated(): boolean; - protected _callRPC(method: string, request: TRequest | any): Promise; -} -declare class Client extends BaseClient { - constructor(config: ClientOption); -} - -export { type BalanceResp, type ClientOption, type Environment, type KeyExchangeResp, type SmartWalletResp, type TaskListResp, type TaskResp, type TransactionResp, Client as default, getKeyRequestMessage }; diff --git a/dist/index.d.mts b/dist/index.d.mts index 4ba3997..b7d14e6 100644 --- a/dist/index.d.mts +++ b/dist/index.d.mts @@ -11,23 +11,23 @@ declare const getKeyRequestMessage: (address: string, expiredAt: number) => stri -declare class UUID extends jspb.Message { - getBytes(): string; - setBytes(value: string): UUID; +declare class IdReq extends jspb.Message { + getId(): string; + setId(value: string): IdReq; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UUID.AsObject; - static toObject(includeInstance: boolean, msg: UUID): UUID.AsObject; + toObject(includeInstance?: boolean): IdReq.AsObject; + static toObject(includeInstance: boolean, msg: IdReq): IdReq.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: UUID, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UUID; - static deserializeBinaryFromReader(message: UUID, reader: jspb.BinaryReader): UUID; + static serializeBinaryToWriter(message: IdReq, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): IdReq; + static deserializeBinaryFromReader(message: IdReq, reader: jspb.BinaryReader): IdReq; } -declare namespace UUID { +declare namespace IdReq { export type AsObject = { - bytes: string, + id: string, } } @@ -155,110 +155,147 @@ declare namespace SyncTasksReq { } } -declare class TaskTrigger extends jspb.Message { - getTriggerType(): TriggerType; - setTriggerType(value: TriggerType): TaskTrigger; +declare class FixedEpochCondition extends jspb.Message { + clearEpochsList(): void; + getEpochsList(): Array; + setEpochsList(value: Array): FixedEpochCondition; + addEpochs(value: number, index?: number): number; - hasSchedule(): boolean; - clearSchedule(): void; - getSchedule(): TimeCondition | undefined; - setSchedule(value?: TimeCondition): TaskTrigger; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FixedEpochCondition.AsObject; + static toObject(includeInstance: boolean, msg: FixedEpochCondition): FixedEpochCondition.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FixedEpochCondition, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FixedEpochCondition; + static deserializeBinaryFromReader(message: FixedEpochCondition, reader: jspb.BinaryReader): FixedEpochCondition; +} - hasContractQuery(): boolean; - clearContractQuery(): void; - getContractQuery(): ContractQueryCondition | undefined; - setContractQuery(value?: ContractQueryCondition): TaskTrigger; +declare namespace FixedEpochCondition { + export type AsObject = { + epochsList: Array, + } +} - hasExpression(): boolean; - clearExpression(): void; - getExpression(): ExpressionCondition | undefined; - setExpression(value?: ExpressionCondition): TaskTrigger; +declare class CronCondition extends jspb.Message { + clearScheduleList(): void; + getScheduleList(): Array; + setScheduleList(value: Array): CronCondition; + addSchedule(value: string, index?: number): string; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TaskTrigger.AsObject; - static toObject(includeInstance: boolean, msg: TaskTrigger): TaskTrigger.AsObject; + toObject(includeInstance?: boolean): CronCondition.AsObject; + static toObject(includeInstance: boolean, msg: CronCondition): CronCondition.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TaskTrigger, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TaskTrigger; - static deserializeBinaryFromReader(message: TaskTrigger, reader: jspb.BinaryReader): TaskTrigger; + static serializeBinaryToWriter(message: CronCondition, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CronCondition; + static deserializeBinaryFromReader(message: CronCondition, reader: jspb.BinaryReader): CronCondition; } -declare namespace TaskTrigger { +declare namespace CronCondition { export type AsObject = { - triggerType: TriggerType, - schedule?: TimeCondition.AsObject, - contractQuery?: ContractQueryCondition.AsObject, - expression?: ExpressionCondition.AsObject, + scheduleList: Array, } } -declare class TimeCondition extends jspb.Message { - clearFixedList(): void; - getFixedList(): Array; - setFixedList(value: Array): TimeCondition; - addFixed(value: number, index?: number): number; - getCron(): string; - setCron(value: string): TimeCondition; +declare class BlockCondition extends jspb.Message { + getInterval(): number; + setInterval(value: number): BlockCondition; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TimeCondition.AsObject; - static toObject(includeInstance: boolean, msg: TimeCondition): TimeCondition.AsObject; + toObject(includeInstance?: boolean): BlockCondition.AsObject; + static toObject(includeInstance: boolean, msg: BlockCondition): BlockCondition.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TimeCondition, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TimeCondition; - static deserializeBinaryFromReader(message: TimeCondition, reader: jspb.BinaryReader): TimeCondition; + static serializeBinaryToWriter(message: BlockCondition, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BlockCondition; + static deserializeBinaryFromReader(message: BlockCondition, reader: jspb.BinaryReader): BlockCondition; } -declare namespace TimeCondition { +declare namespace BlockCondition { export type AsObject = { - fixedList: Array, - cron: string, + interval: number, } } -declare class ContractQueryCondition extends jspb.Message { - getContractAddress(): string; - setContractAddress(value: string): ContractQueryCondition; - getCallmsg(): string; - setCallmsg(value: string): ContractQueryCondition; +declare class EventCondition extends jspb.Message { + getExpression(): string; + setExpression(value: string): EventCondition; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ContractQueryCondition.AsObject; - static toObject(includeInstance: boolean, msg: ContractQueryCondition): ContractQueryCondition.AsObject; + toObject(includeInstance?: boolean): EventCondition.AsObject; + static toObject(includeInstance: boolean, msg: EventCondition): EventCondition.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ContractQueryCondition, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ContractQueryCondition; - static deserializeBinaryFromReader(message: ContractQueryCondition, reader: jspb.BinaryReader): ContractQueryCondition; + static serializeBinaryToWriter(message: EventCondition, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EventCondition; + static deserializeBinaryFromReader(message: EventCondition, reader: jspb.BinaryReader): EventCondition; } -declare namespace ContractQueryCondition { +declare namespace EventCondition { export type AsObject = { - contractAddress: string, - callmsg: string, + expression: string, } } -declare class ExpressionCondition extends jspb.Message { - getExpression(): string; - setExpression(value: string): ExpressionCondition; +declare class TaskTrigger$1 extends jspb.Message { + + hasManual(): boolean; + clearManual(): void; + getManual(): boolean; + setManual(value: boolean): TaskTrigger$1; + + hasFixedTime(): boolean; + clearFixedTime(): void; + getFixedTime(): FixedEpochCondition | undefined; + setFixedTime(value?: FixedEpochCondition): TaskTrigger$1; + + hasCron(): boolean; + clearCron(): void; + getCron(): CronCondition | undefined; + setCron(value?: CronCondition): TaskTrigger$1; + + hasBlock(): boolean; + clearBlock(): void; + getBlock(): BlockCondition | undefined; + setBlock(value?: BlockCondition): TaskTrigger$1; + + hasEvent(): boolean; + clearEvent(): void; + getEvent(): EventCondition | undefined; + setEvent(value?: EventCondition): TaskTrigger$1; + + getTriggerTypeCase(): TaskTrigger$1.TriggerTypeCase; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ExpressionCondition.AsObject; - static toObject(includeInstance: boolean, msg: ExpressionCondition): ExpressionCondition.AsObject; + toObject(includeInstance?: boolean): TaskTrigger$1.AsObject; + static toObject(includeInstance: boolean, msg: TaskTrigger$1): TaskTrigger$1.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ExpressionCondition, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ExpressionCondition; - static deserializeBinaryFromReader(message: ExpressionCondition, reader: jspb.BinaryReader): ExpressionCondition; + static serializeBinaryToWriter(message: TaskTrigger$1, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TaskTrigger$1; + static deserializeBinaryFromReader(message: TaskTrigger$1, reader: jspb.BinaryReader): TaskTrigger$1; } -declare namespace ExpressionCondition { +declare namespace TaskTrigger$1 { export type AsObject = { - expression: string, + manual: boolean, + fixedTime?: FixedEpochCondition.AsObject, + cron?: CronCondition.AsObject, + block?: BlockCondition.AsObject, + event?: EventCondition.AsObject, } + + export enum TriggerTypeCase { + TRIGGER_TYPE_NOT_SET = 0, + MANUAL = 1, + FIXED_TIME = 2, + CRON = 3, + BLOCK = 4, + EVENT = 5, + } + } declare class SyncTasksResp extends jspb.Message { @@ -269,8 +306,8 @@ declare class SyncTasksResp extends jspb.Message { hasTrigger(): boolean; clearTrigger(): void; - getTrigger(): TaskTrigger | undefined; - setTrigger(value?: TaskTrigger): SyncTasksResp; + getTrigger(): TaskTrigger$1 | undefined; + setTrigger(value?: TaskTrigger$1): SyncTasksResp; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): SyncTasksResp.AsObject; @@ -286,279 +323,396 @@ declare namespace SyncTasksResp { export type AsObject = { id: string, checktype: string, - trigger?: TaskTrigger.AsObject, + trigger?: TaskTrigger$1.AsObject, } } -declare class ETHTransfer extends jspb.Message { +declare class ETHTransferNode extends jspb.Message { getDestination(): string; - setDestination(value: string): ETHTransfer; + setDestination(value: string): ETHTransferNode; getAmount(): string; - setAmount(value: string): ETHTransfer; + setAmount(value: string): ETHTransferNode; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ETHTransfer.AsObject; - static toObject(includeInstance: boolean, msg: ETHTransfer): ETHTransfer.AsObject; + toObject(includeInstance?: boolean): ETHTransferNode.AsObject; + static toObject(includeInstance: boolean, msg: ETHTransferNode): ETHTransferNode.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ETHTransfer, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ETHTransfer; - static deserializeBinaryFromReader(message: ETHTransfer, reader: jspb.BinaryReader): ETHTransfer; + static serializeBinaryToWriter(message: ETHTransferNode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ETHTransferNode; + static deserializeBinaryFromReader(message: ETHTransferNode, reader: jspb.BinaryReader): ETHTransferNode; } -declare namespace ETHTransfer { +declare namespace ETHTransferNode { export type AsObject = { destination: string, amount: string, } } -declare class ContractExecution extends jspb.Message { +declare class ContractWriteNode extends jspb.Message { getContractAddress(): string; - setContractAddress(value: string): ContractExecution; + setContractAddress(value: string): ContractWriteNode; getCallData(): string; - setCallData(value: string): ContractExecution; - getMethod(): string; - setMethod(value: string): ContractExecution; - getEncodedParams(): string; - setEncodedParams(value: string): ContractExecution; + setCallData(value: string): ContractWriteNode; + getContractAbi(): string; + setContractAbi(value: string): ContractWriteNode; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ContractExecution.AsObject; - static toObject(includeInstance: boolean, msg: ContractExecution): ContractExecution.AsObject; + toObject(includeInstance?: boolean): ContractWriteNode.AsObject; + static toObject(includeInstance: boolean, msg: ContractWriteNode): ContractWriteNode.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ContractExecution, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ContractExecution; - static deserializeBinaryFromReader(message: ContractExecution, reader: jspb.BinaryReader): ContractExecution; + static serializeBinaryToWriter(message: ContractWriteNode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ContractWriteNode; + static deserializeBinaryFromReader(message: ContractWriteNode, reader: jspb.BinaryReader): ContractWriteNode; } -declare namespace ContractExecution { +declare namespace ContractWriteNode { export type AsObject = { contractAddress: string, callData: string, - method: string, - encodedParams: string, + contractAbi: string, } } -declare class GraphQLDataQuery extends jspb.Message { +declare class ContractReadNode extends jspb.Message { + getContractAddress(): string; + setContractAddress(value: string): ContractReadNode; + getCallData(): string; + setCallData(value: string): ContractReadNode; + getContractAbi(): string; + setContractAbi(value: string): ContractReadNode; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ContractReadNode.AsObject; + static toObject(includeInstance: boolean, msg: ContractReadNode): ContractReadNode.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ContractReadNode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ContractReadNode; + static deserializeBinaryFromReader(message: ContractReadNode, reader: jspb.BinaryReader): ContractReadNode; +} + +declare namespace ContractReadNode { + export type AsObject = { + contractAddress: string, + callData: string, + contractAbi: string, + } +} + +declare class GraphQLQueryNode extends jspb.Message { getUrl(): string; - setUrl(value: string): GraphQLDataQuery; + setUrl(value: string): GraphQLQueryNode; getQuery(): string; - setQuery(value: string): GraphQLDataQuery; + setQuery(value: string): GraphQLQueryNode; + + getVariablesMap(): jspb.Map; + clearVariablesMap(): void; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GraphQLDataQuery.AsObject; - static toObject(includeInstance: boolean, msg: GraphQLDataQuery): GraphQLDataQuery.AsObject; + toObject(includeInstance?: boolean): GraphQLQueryNode.AsObject; + static toObject(includeInstance: boolean, msg: GraphQLQueryNode): GraphQLQueryNode.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GraphQLDataQuery, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GraphQLDataQuery; - static deserializeBinaryFromReader(message: GraphQLDataQuery, reader: jspb.BinaryReader): GraphQLDataQuery; + static serializeBinaryToWriter(message: GraphQLQueryNode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GraphQLQueryNode; + static deserializeBinaryFromReader(message: GraphQLQueryNode, reader: jspb.BinaryReader): GraphQLQueryNode; } -declare namespace GraphQLDataQuery { +declare namespace GraphQLQueryNode { export type AsObject = { url: string, query: string, + + variablesMap: Array<[string, string]>, } } -declare class HTTPAPICall extends jspb.Message { +declare class RestAPINode extends jspb.Message { getUrl(): string; - setUrl(value: string): HTTPAPICall; + setUrl(value: string): RestAPINode; getHeadersMap(): jspb.Map; clearHeadersMap(): void; getBody(): string; - setBody(value: string): HTTPAPICall; + setBody(value: string): RestAPINode; + getMethod(): string; + setMethod(value: string): RestAPINode; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): HTTPAPICall.AsObject; - static toObject(includeInstance: boolean, msg: HTTPAPICall): HTTPAPICall.AsObject; + toObject(includeInstance?: boolean): RestAPINode.AsObject; + static toObject(includeInstance: boolean, msg: RestAPINode): RestAPINode.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: HTTPAPICall, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): HTTPAPICall; - static deserializeBinaryFromReader(message: HTTPAPICall, reader: jspb.BinaryReader): HTTPAPICall; + static serializeBinaryToWriter(message: RestAPINode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RestAPINode; + static deserializeBinaryFromReader(message: RestAPINode, reader: jspb.BinaryReader): RestAPINode; } -declare namespace HTTPAPICall { +declare namespace RestAPINode { export type AsObject = { url: string, headersMap: Array<[string, string]>, body: string, + method: string, } } -declare class CustomCode extends jspb.Message { +declare class CustomCodeNode extends jspb.Message { getType(): CustomCodeType; - setType(value: CustomCodeType): CustomCode; - getBody(): string; - setBody(value: string): CustomCode; + setType(value: CustomCodeType): CustomCodeNode; + getSource(): string; + setSource(value: string): CustomCodeNode; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CustomCode.AsObject; - static toObject(includeInstance: boolean, msg: CustomCode): CustomCode.AsObject; + toObject(includeInstance?: boolean): CustomCodeNode.AsObject; + static toObject(includeInstance: boolean, msg: CustomCodeNode): CustomCodeNode.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CustomCode, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CustomCode; - static deserializeBinaryFromReader(message: CustomCode, reader: jspb.BinaryReader): CustomCode; + static serializeBinaryToWriter(message: CustomCodeNode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CustomCodeNode; + static deserializeBinaryFromReader(message: CustomCodeNode, reader: jspb.BinaryReader): CustomCodeNode; } -declare namespace CustomCode { +declare namespace CustomCodeNode { export type AsObject = { type: CustomCodeType, - body: string, + source: string, } } -declare class ConditionJump extends jspb.Message { +declare class Condition extends jspb.Message { + getId(): string; + setId(value: string): Condition; + getType(): string; + setType(value: string): Condition; getExpression(): string; - setExpression(value: string): ConditionJump; - getNext(): string; - setNext(value: string): ConditionJump; + setExpression(value: string): Condition; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ConditionJump.AsObject; - static toObject(includeInstance: boolean, msg: ConditionJump): ConditionJump.AsObject; + toObject(includeInstance?: boolean): Condition.AsObject; + static toObject(includeInstance: boolean, msg: Condition): Condition.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ConditionJump, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ConditionJump; - static deserializeBinaryFromReader(message: ConditionJump, reader: jspb.BinaryReader): ConditionJump; + static serializeBinaryToWriter(message: Condition, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Condition; + static deserializeBinaryFromReader(message: Condition, reader: jspb.BinaryReader): Condition; } -declare namespace ConditionJump { +declare namespace Condition { export type AsObject = { + id: string, + type: string, expression: string, - next: string, } } -declare class BranchAction extends jspb.Message { +declare class BranchNode extends jspb.Message { + clearConditionsList(): void; + getConditionsList(): Array; + setConditionsList(value: Array): BranchNode; + addConditions(value?: Condition, index?: number): Condition; - hasIf(): boolean; - clearIf(): void; - getIf(): ConditionJump | undefined; - setIf(value?: ConditionJump): BranchAction; - clearElseifsList(): void; - getElseifsList(): Array; - setElseifsList(value: Array): BranchAction; - addElseifs(value?: ConditionJump, index?: number): ConditionJump; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BranchNode.AsObject; + static toObject(includeInstance: boolean, msg: BranchNode): BranchNode.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BranchNode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BranchNode; + static deserializeBinaryFromReader(message: BranchNode, reader: jspb.BinaryReader): BranchNode; +} + +declare namespace BranchNode { + export type AsObject = { + conditionsList: Array, + } +} - hasElse(): boolean; - clearElse(): void; - getElse(): ConditionJump | undefined; - setElse(value?: ConditionJump): BranchAction; +declare class FilterNode extends jspb.Message { + getExpression(): string; + setExpression(value: string): FilterNode; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): BranchAction.AsObject; - static toObject(includeInstance: boolean, msg: BranchAction): BranchAction.AsObject; + toObject(includeInstance?: boolean): FilterNode.AsObject; + static toObject(includeInstance: boolean, msg: FilterNode): FilterNode.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: BranchAction, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): BranchAction; - static deserializeBinaryFromReader(message: BranchAction, reader: jspb.BinaryReader): BranchAction; + static serializeBinaryToWriter(message: FilterNode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FilterNode; + static deserializeBinaryFromReader(message: FilterNode, reader: jspb.BinaryReader): FilterNode; } -declare namespace BranchAction { +declare namespace FilterNode { export type AsObject = { - pb_if?: ConditionJump.AsObject, - elseifsList: Array, - pb_else?: ConditionJump.AsObject, + expression: string, } } -declare class TaskAction extends jspb.Message { - getTaskType(): TaskType$1; - setTaskType(value: TaskType$1): TaskAction; +declare class LoopNode extends jspb.Message { + getIterVar(): string; + setIterVar(value: string): LoopNode; + getIterKey(): string; + setIterKey(value: string): LoopNode; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): LoopNode.AsObject; + static toObject(includeInstance: boolean, msg: LoopNode): LoopNode.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: LoopNode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): LoopNode; + static deserializeBinaryFromReader(message: LoopNode, reader: jspb.BinaryReader): LoopNode; +} + +declare namespace LoopNode { + export type AsObject = { + iterVar: string, + iterKey: string, + } +} + +declare class TaskEdge$1 extends jspb.Message { getId(): string; - setId(value: string): TaskAction; + setId(value: string): TaskEdge$1; + getSource(): string; + setSource(value: string): TaskEdge$1; + getTarget(): string; + setTarget(value: string): TaskEdge$1; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TaskEdge$1.AsObject; + static toObject(includeInstance: boolean, msg: TaskEdge$1): TaskEdge$1.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TaskEdge$1, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TaskEdge$1; + static deserializeBinaryFromReader(message: TaskEdge$1, reader: jspb.BinaryReader): TaskEdge$1; +} + +declare namespace TaskEdge$1 { + export type AsObject = { + id: string, + source: string, + target: string, + } +} + +declare class TaskNode$1 extends jspb.Message { + getId(): string; + setId(value: string): TaskNode$1; getName(): string; - setName(value: string): TaskAction; - clearNextList(): void; - getNextList(): Array; - setNextList(value: Array): TaskAction; - addNext(value: string, index?: number): string; + setName(value: string): TaskNode$1; hasEthTransfer(): boolean; clearEthTransfer(): void; - getEthTransfer(): ETHTransfer | undefined; - setEthTransfer(value?: ETHTransfer): TaskAction; + getEthTransfer(): ETHTransferNode | undefined; + setEthTransfer(value?: ETHTransferNode): TaskNode$1; + + hasContractWrite(): boolean; + clearContractWrite(): void; + getContractWrite(): ContractWriteNode | undefined; + setContractWrite(value?: ContractWriteNode): TaskNode$1; - hasContractExecution(): boolean; - clearContractExecution(): void; - getContractExecution(): ContractExecution | undefined; - setContractExecution(value?: ContractExecution): TaskAction; + hasContractRead(): boolean; + clearContractRead(): void; + getContractRead(): ContractReadNode | undefined; + setContractRead(value?: ContractReadNode): TaskNode$1; hasGraphqlDataQuery(): boolean; clearGraphqlDataQuery(): void; - getGraphqlDataQuery(): GraphQLDataQuery | undefined; - setGraphqlDataQuery(value?: GraphQLDataQuery): TaskAction; + getGraphqlDataQuery(): GraphQLQueryNode | undefined; + setGraphqlDataQuery(value?: GraphQLQueryNode): TaskNode$1; + + hasRestApi(): boolean; + clearRestApi(): void; + getRestApi(): RestAPINode | undefined; + setRestApi(value?: RestAPINode): TaskNode$1; + + hasBranch(): boolean; + clearBranch(): void; + getBranch(): BranchNode | undefined; + setBranch(value?: BranchNode): TaskNode$1; + + hasFilter(): boolean; + clearFilter(): void; + getFilter(): FilterNode | undefined; + setFilter(value?: FilterNode): TaskNode$1; - hasHttpDataQuery(): boolean; - clearHttpDataQuery(): void; - getHttpDataQuery(): HTTPAPICall | undefined; - setHttpDataQuery(value?: HTTPAPICall): TaskAction; + hasLoop(): boolean; + clearLoop(): void; + getLoop(): LoopNode | undefined; + setLoop(value?: LoopNode): TaskNode$1; hasCustomCode(): boolean; clearCustomCode(): void; - getCustomCode(): CustomCode | undefined; - setCustomCode(value?: CustomCode): TaskAction; + getCustomCode(): CustomCodeNode | undefined; + setCustomCode(value?: CustomCodeNode): TaskNode$1; - hasBranch(): boolean; - clearBranch(): void; - getBranch(): BranchAction | undefined; - setBranch(value?: BranchAction): TaskAction; + getTaskTypeCase(): TaskNode$1.TaskTypeCase; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TaskAction.AsObject; - static toObject(includeInstance: boolean, msg: TaskAction): TaskAction.AsObject; + toObject(includeInstance?: boolean): TaskNode$1.AsObject; + static toObject(includeInstance: boolean, msg: TaskNode$1): TaskNode$1.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TaskAction, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TaskAction; - static deserializeBinaryFromReader(message: TaskAction, reader: jspb.BinaryReader): TaskAction; + static serializeBinaryToWriter(message: TaskNode$1, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TaskNode$1; + static deserializeBinaryFromReader(message: TaskNode$1, reader: jspb.BinaryReader): TaskNode$1; } -declare namespace TaskAction { +declare namespace TaskNode$1 { export type AsObject = { - taskType: TaskType$1, id: string, name: string, - nextList: Array, - ethTransfer?: ETHTransfer.AsObject, - contractExecution?: ContractExecution.AsObject, - graphqlDataQuery?: GraphQLDataQuery.AsObject, - httpDataQuery?: HTTPAPICall.AsObject, - customCode?: CustomCode.AsObject, - branch?: BranchAction.AsObject, + ethTransfer?: ETHTransferNode.AsObject, + contractWrite?: ContractWriteNode.AsObject, + contractRead?: ContractReadNode.AsObject, + graphqlDataQuery?: GraphQLQueryNode.AsObject, + restApi?: RestAPINode.AsObject, + branch?: BranchNode.AsObject, + filter?: FilterNode.AsObject, + loop?: LoopNode.AsObject, + customCode?: CustomCodeNode.AsObject, + } + + export enum 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, } + } -declare class Execution extends jspb.Message { +declare class Execution$1 extends jspb.Message { getEpoch(): number; - setEpoch(value: number): Execution; + setEpoch(value: number): Execution$1; getUserOpHash(): string; - setUserOpHash(value: string): Execution; + setUserOpHash(value: string): Execution$1; getError(): string; - setError(value: string): Execution; + setError(value: string): Execution$1; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Execution.AsObject; - static toObject(includeInstance: boolean, msg: Execution): Execution.AsObject; + toObject(includeInstance?: boolean): Execution$1.AsObject; + static toObject(includeInstance: boolean, msg: Execution$1): Execution$1.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Execution, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Execution; - static deserializeBinaryFromReader(message: Execution, reader: jspb.BinaryReader): Execution; + static serializeBinaryToWriter(message: Execution$1, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Execution$1; + static deserializeBinaryFromReader(message: Execution$1, reader: jspb.BinaryReader): Execution$1; } -declare namespace Execution { +declare namespace Execution$1 { export type AsObject = { epoch: number, userOpHash: string, @@ -566,66 +720,68 @@ declare namespace Execution { } } -declare class Task extends jspb.Message { - - hasId(): boolean; - clearId(): void; - getId(): UUID | undefined; - setId(value?: UUID): Task; +declare class Task$1 extends jspb.Message { + getId(): string; + setId(value: string): Task$1; getOwner(): string; - setOwner(value: string): Task; - getSmartAccountAddress(): string; - setSmartAccountAddress(value: string): Task; - - hasTrigger(): boolean; - clearTrigger(): void; - getTrigger(): TaskTrigger | undefined; - setTrigger(value?: TaskTrigger): Task; - clearNodesList(): void; - getNodesList(): Array; - setNodesList(value: Array): Task; - addNodes(value?: TaskAction, index?: number): TaskAction; + setOwner(value: string): Task$1; + getSmartWalletAddress(): string; + setSmartWalletAddress(value: string): Task$1; getStartAt(): number; - setStartAt(value: number): Task; + setStartAt(value: number): Task$1; getExpiredAt(): number; - setExpiredAt(value: number): Task; + setExpiredAt(value: number): Task$1; getMemo(): string; - setMemo(value: string): Task; + setMemo(value: string): Task$1; getCompletedAt(): number; - setCompletedAt(value: number): Task; + setCompletedAt(value: number): Task$1; + getMaxExecution(): number; + setMaxExecution(value: number): Task$1; getStatus(): TaskStatus; - setStatus(value: TaskStatus): Task; - getRepeatable(): boolean; - setRepeatable(value: boolean): Task; + setStatus(value: TaskStatus): Task$1; + + hasTrigger(): boolean; + clearTrigger(): void; + getTrigger(): TaskTrigger$1 | undefined; + setTrigger(value?: TaskTrigger$1): Task$1; + clearNodesList(): void; + getNodesList(): Array; + setNodesList(value: Array): Task$1; + addNodes(value?: TaskNode$1, index?: number): TaskNode$1; + clearEdgesList(): void; + getEdgesList(): Array; + setEdgesList(value: Array): Task$1; + addEdges(value?: TaskEdge$1, index?: number): TaskEdge$1; clearExecutionsList(): void; - getExecutionsList(): Array; - setExecutionsList(value: Array): Task; - addExecutions(value?: Execution, index?: number): Execution; + getExecutionsList(): Array; + setExecutionsList(value: Array): Task$1; + addExecutions(value?: Execution$1, index?: number): Execution$1; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Task.AsObject; - static toObject(includeInstance: boolean, msg: Task): Task.AsObject; + toObject(includeInstance?: boolean): Task$1.AsObject; + static toObject(includeInstance: boolean, msg: Task$1): Task$1.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Task, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Task; - static deserializeBinaryFromReader(message: Task, reader: jspb.BinaryReader): Task; + static serializeBinaryToWriter(message: Task$1, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Task$1; + static deserializeBinaryFromReader(message: Task$1, reader: jspb.BinaryReader): Task$1; } -declare namespace Task { +declare namespace Task$1 { export type AsObject = { - id?: UUID.AsObject, + id: string, owner: string, - smartAccountAddress: string, - trigger?: TaskTrigger.AsObject, - nodesList: Array, + smartWalletAddress: string, startAt: number, expiredAt: number, memo: string, completedAt: number, + maxExecution: number, status: TaskStatus, - repeatable: boolean, - executionsList: Array, + trigger?: TaskTrigger$1.AsObject, + nodesList: Array, + edgesList: Array, + executionsList: Array, } } @@ -633,20 +789,26 @@ declare class CreateTaskReq extends jspb.Message { hasTrigger(): boolean; clearTrigger(): void; - getTrigger(): TaskTrigger | undefined; - setTrigger(value?: TaskTrigger): CreateTaskReq; - clearActionsList(): void; - getActionsList(): Array; - setActionsList(value: Array): CreateTaskReq; - addActions(value?: TaskAction, index?: number): TaskAction; + getTrigger(): TaskTrigger$1 | undefined; + setTrigger(value?: TaskTrigger$1): CreateTaskReq; getStartAt(): number; setStartAt(value: number): CreateTaskReq; getExpiredAt(): number; setExpiredAt(value: number): CreateTaskReq; + getMaxExecution(): number; + setMaxExecution(value: number): CreateTaskReq; + getSmartWalletAddress(): string; + setSmartWalletAddress(value: string): CreateTaskReq; getMemo(): string; setMemo(value: string): CreateTaskReq; - getRepeatable(): boolean; - setRepeatable(value: boolean): CreateTaskReq; + clearNodesList(): void; + getNodesList(): Array; + setNodesList(value: Array): CreateTaskReq; + addNodes(value?: TaskNode$1, index?: number): TaskNode$1; + clearEdgesList(): void; + getEdgesList(): Array; + setEdgesList(value: Array): CreateTaskReq; + addEdges(value?: TaskEdge$1, index?: number): TaskEdge$1; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): CreateTaskReq.AsObject; @@ -660,12 +822,14 @@ declare class CreateTaskReq extends jspb.Message { declare namespace CreateTaskReq { export type AsObject = { - trigger?: TaskTrigger.AsObject, - actionsList: Array, + trigger?: TaskTrigger$1.AsObject, startAt: number, expiredAt: number, + maxExecution: number, + smartWalletAddress: string, memo: string, - repeatable: boolean, + nodesList: Array, + edgesList: Array, } } @@ -729,50 +893,80 @@ declare namespace NonceResp { } } -declare class AddressRequest extends jspb.Message { - getOwner(): string; - setOwner(value: string): AddressRequest; +declare class ListWalletReq extends jspb.Message { + getFactory(): string; + setFactory(value: string): ListWalletReq; + getSalt(): string; + setSalt(value: string): ListWalletReq; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AddressRequest.AsObject; - static toObject(includeInstance: boolean, msg: AddressRequest): AddressRequest.AsObject; + toObject(includeInstance?: boolean): ListWalletReq.AsObject; + static toObject(includeInstance: boolean, msg: ListWalletReq): ListWalletReq.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AddressRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AddressRequest; - static deserializeBinaryFromReader(message: AddressRequest, reader: jspb.BinaryReader): AddressRequest; + static serializeBinaryToWriter(message: ListWalletReq, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListWalletReq; + static deserializeBinaryFromReader(message: ListWalletReq, reader: jspb.BinaryReader): ListWalletReq; } -declare namespace AddressRequest { +declare namespace ListWalletReq { export type AsObject = { - owner: string, + factory: string, + salt: string, } } -declare class AddressResp extends jspb.Message { - getSmartAccountAddress(): string; - setSmartAccountAddress(value: string): AddressResp; - getNonce(): string; - setNonce(value: string): AddressResp; +declare class SmartWallet$1 extends jspb.Message { + getAddress(): string; + setAddress(value: string): SmartWallet$1; + getSalt(): string; + setSalt(value: string): SmartWallet$1; + getFactory(): string; + setFactory(value: string): SmartWallet$1; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AddressResp.AsObject; - static toObject(includeInstance: boolean, msg: AddressResp): AddressResp.AsObject; + toObject(includeInstance?: boolean): SmartWallet$1.AsObject; + static toObject(includeInstance: boolean, msg: SmartWallet$1): SmartWallet$1.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AddressResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AddressResp; - static deserializeBinaryFromReader(message: AddressResp, reader: jspb.BinaryReader): AddressResp; + static serializeBinaryToWriter(message: SmartWallet$1, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SmartWallet$1; + static deserializeBinaryFromReader(message: SmartWallet$1, reader: jspb.BinaryReader): SmartWallet$1; } -declare namespace AddressResp { +declare namespace SmartWallet$1 { export type AsObject = { - smartAccountAddress: string, - nonce: string, + address: string, + salt: string, + factory: string, + } +} + +declare class ListWalletResp extends jspb.Message { + clearWalletsList(): void; + getWalletsList(): Array; + setWalletsList(value: Array): ListWalletResp; + addWallets(value?: SmartWallet$1, index?: number): SmartWallet$1; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListWalletResp.AsObject; + static toObject(includeInstance: boolean, msg: ListWalletResp): ListWalletResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ListWalletResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListWalletResp; + static deserializeBinaryFromReader(message: ListWalletResp, reader: jspb.BinaryReader): ListWalletResp; +} + +declare namespace ListWalletResp { + export type AsObject = { + walletsList: Array, } } declare class ListTasksReq extends jspb.Message { + getSmartWalletAddress(): string; + setSmartWalletAddress(value: string): ListTasksReq; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): ListTasksReq.AsObject; @@ -786,14 +980,15 @@ declare class ListTasksReq extends jspb.Message { declare namespace ListTasksReq { export type AsObject = { + smartWalletAddress: string, } } declare class ListTasksResp extends jspb.Message { clearTasksList(): void; - getTasksList(): Array; - setTasksList(value: Array): ListTasksResp; - addTasks(value?: ListTasksResp.TaskItemResp, index?: number): ListTasksResp.TaskItemResp; + getTasksList(): Array; + setTasksList(value: Array): ListTasksResp; + addTasks(value?: Task$1, index?: number): Task$1; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): ListTasksResp.AsObject; @@ -807,33 +1002,8 @@ declare class ListTasksResp extends jspb.Message { declare namespace ListTasksResp { export type AsObject = { - tasksList: Array, - } - - - export class TaskItemResp extends jspb.Message { - getId(): string; - setId(value: string): TaskItemResp; - getStatus(): TaskStatus; - setStatus(value: TaskStatus): TaskItemResp; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TaskItemResp.AsObject; - static toObject(includeInstance: boolean, msg: TaskItemResp): TaskItemResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TaskItemResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TaskItemResp; - static deserializeBinaryFromReader(message: TaskItemResp, reader: jspb.BinaryReader): TaskItemResp; - } - - export namespace TaskItemResp { - export type AsObject = { - id: string, - status: TaskStatus, - } + tasksList: Array, } - } declare class GetKeyReq extends jspb.Message { @@ -933,19 +1103,53 @@ declare namespace UpdateChecksResp { } } -declare enum TriggerType { - TIMETRIGGER = 0, - CONTRACTQUERYTRIGGER = 1, - EXPRESSIONTRIGGER = 2, +declare class CreateWalletReq$1 extends jspb.Message { + getSalt(): string; + setSalt(value: string): CreateWalletReq$1; + getFactoryAddress(): string; + setFactoryAddress(value: string): CreateWalletReq$1; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CreateWalletReq$1.AsObject; + static toObject(includeInstance: boolean, msg: CreateWalletReq$1): CreateWalletReq$1.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CreateWalletReq$1, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CreateWalletReq$1; + static deserializeBinaryFromReader(message: CreateWalletReq$1, reader: jspb.BinaryReader): CreateWalletReq$1; +} + +declare namespace CreateWalletReq$1 { + export type AsObject = { + salt: string, + factoryAddress: string, + } +} + +declare class CreateWalletResp extends jspb.Message { + getAddress(): string; + setAddress(value: string): CreateWalletResp; + getSalt(): string; + setSalt(value: string): CreateWalletResp; + getFactoryAddress(): string; + setFactoryAddress(value: string): CreateWalletResp; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CreateWalletResp.AsObject; + static toObject(includeInstance: boolean, msg: CreateWalletResp): CreateWalletResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CreateWalletResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CreateWalletResp; + static deserializeBinaryFromReader(message: CreateWalletResp, reader: jspb.BinaryReader): CreateWalletResp; } -declare enum TaskType$1 { - ETHTRANSFERTASK = 0, - CONTRACTEXECUTIONTASK = 1, - GRAPHQLDATAQUERYTASK = 2, - HTTPAPICALLTASK = 3, - CUSTOMCODETASK = 4, - BRANCHACTIONTASK = 5, +declare namespace CreateWalletResp { + export type AsObject = { + address: string, + salt: string, + factoryAddress: string, + } } declare enum TaskStatus { @@ -966,498 +1170,84 @@ declare enum CustomCodeType { interface IAggregatorClient { - getKey( - request: GetKeyReq, - callback: ( - error: grpc.ServiceError | null, - response: KeyResp - ) => void - ): grpc.ClientUnaryCall; - getKey( - request: GetKeyReq, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: KeyResp - ) => void - ): grpc.ClientUnaryCall; - getKey( - request: GetKeyReq, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: KeyResp - ) => void - ): grpc.ClientUnaryCall; - getNonce( - request: NonceRequest, - callback: ( - error: grpc.ServiceError | null, - response: NonceResp - ) => void - ): grpc.ClientUnaryCall; - getNonce( - request: NonceRequest, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: NonceResp - ) => void - ): grpc.ClientUnaryCall; - getNonce( - request: NonceRequest, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: NonceResp - ) => void - ): grpc.ClientUnaryCall; - getSmartAccountAddress( - request: AddressRequest, - callback: ( - error: grpc.ServiceError | null, - response: AddressResp - ) => void - ): grpc.ClientUnaryCall; - getSmartAccountAddress( - request: AddressRequest, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: AddressResp - ) => void - ): grpc.ClientUnaryCall; - getSmartAccountAddress( - request: AddressRequest, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: AddressResp - ) => void - ): grpc.ClientUnaryCall; - createTask( - request: CreateTaskReq, - callback: ( - error: grpc.ServiceError | null, - response: CreateTaskResp - ) => void - ): grpc.ClientUnaryCall; - createTask( - request: CreateTaskReq, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: CreateTaskResp - ) => void - ): grpc.ClientUnaryCall; - createTask( - request: CreateTaskReq, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: CreateTaskResp - ) => void - ): grpc.ClientUnaryCall; - listTasks( - request: ListTasksReq, - callback: ( - error: grpc.ServiceError | null, - response: ListTasksResp - ) => void - ): grpc.ClientUnaryCall; - listTasks( - request: ListTasksReq, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: ListTasksResp - ) => void - ): grpc.ClientUnaryCall; - listTasks( - request: ListTasksReq, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: ListTasksResp - ) => void - ): grpc.ClientUnaryCall; - getTask( - request: UUID, - callback: (error: grpc.ServiceError | null, response: Task) => void - ): grpc.ClientUnaryCall; - getTask( - request: UUID, - metadata: grpc.Metadata, - callback: (error: grpc.ServiceError | null, response: Task) => void - ): grpc.ClientUnaryCall; - getTask( - request: UUID, - metadata: grpc.Metadata, - options: Partial, - callback: (error: grpc.ServiceError | null, response: Task) => void - ): grpc.ClientUnaryCall; - cancelTask( - request: UUID, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - cancelTask( - request: UUID, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - cancelTask( - request: UUID, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - deleteTask( - request: UUID, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - deleteTask( - request: UUID, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - deleteTask( - request: UUID, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - ping( - request: Checkin, - callback: ( - error: grpc.ServiceError | null, - response: CheckinResp - ) => void - ): grpc.ClientUnaryCall; - ping( - request: Checkin, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: CheckinResp - ) => void - ): grpc.ClientUnaryCall; - ping( - request: Checkin, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: CheckinResp - ) => void - ): grpc.ClientUnaryCall; - syncTasks( - request: SyncTasksReq, - options?: Partial - ): grpc.ClientReadableStream; - syncTasks( - request: SyncTasksReq, - metadata?: grpc.Metadata, - options?: Partial - ): grpc.ClientReadableStream; - updateChecks( - request: UpdateChecksReq, - callback: ( - error: grpc.ServiceError | null, - response: UpdateChecksResp - ) => void - ): grpc.ClientUnaryCall; - updateChecks( - request: UpdateChecksReq, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: UpdateChecksResp - ) => void - ): grpc.ClientUnaryCall; - updateChecks( - request: UpdateChecksReq, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: UpdateChecksResp - ) => void - ): grpc.ClientUnaryCall; + getKey(request: GetKeyReq, callback: (error: grpc.ServiceError | null, response: KeyResp) => void): grpc.ClientUnaryCall; + getKey(request: GetKeyReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: KeyResp) => void): grpc.ClientUnaryCall; + getKey(request: GetKeyReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: KeyResp) => void): grpc.ClientUnaryCall; + getNonce(request: NonceRequest, callback: (error: grpc.ServiceError | null, response: NonceResp) => void): grpc.ClientUnaryCall; + getNonce(request: NonceRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: NonceResp) => void): grpc.ClientUnaryCall; + getNonce(request: NonceRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: NonceResp) => void): grpc.ClientUnaryCall; + createWallet(request: CreateWalletReq$1, callback: (error: grpc.ServiceError | null, response: CreateWalletResp) => void): grpc.ClientUnaryCall; + createWallet(request: CreateWalletReq$1, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: CreateWalletResp) => void): grpc.ClientUnaryCall; + createWallet(request: CreateWalletReq$1, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: CreateWalletResp) => void): grpc.ClientUnaryCall; + listWallets(request: ListWalletReq, callback: (error: grpc.ServiceError | null, response: ListWalletResp) => void): grpc.ClientUnaryCall; + listWallets(request: ListWalletReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ListWalletResp) => void): grpc.ClientUnaryCall; + listWallets(request: ListWalletReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ListWalletResp) => void): grpc.ClientUnaryCall; + createTask(request: CreateTaskReq, callback: (error: grpc.ServiceError | null, response: CreateTaskResp) => void): grpc.ClientUnaryCall; + createTask(request: CreateTaskReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: CreateTaskResp) => void): grpc.ClientUnaryCall; + createTask(request: CreateTaskReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: CreateTaskResp) => void): grpc.ClientUnaryCall; + listTasks(request: ListTasksReq, callback: (error: grpc.ServiceError | null, response: ListTasksResp) => void): grpc.ClientUnaryCall; + listTasks(request: ListTasksReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ListTasksResp) => void): grpc.ClientUnaryCall; + listTasks(request: ListTasksReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ListTasksResp) => void): grpc.ClientUnaryCall; + getTask(request: IdReq, callback: (error: grpc.ServiceError | null, response: Task$1) => void): grpc.ClientUnaryCall; + getTask(request: IdReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Task$1) => void): grpc.ClientUnaryCall; + getTask(request: IdReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Task$1) => void): grpc.ClientUnaryCall; + cancelTask(request: IdReq, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + cancelTask(request: IdReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + cancelTask(request: IdReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + deleteTask(request: IdReq, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + deleteTask(request: IdReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + deleteTask(request: IdReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + ping(request: Checkin, callback: (error: grpc.ServiceError | null, response: CheckinResp) => void): grpc.ClientUnaryCall; + ping(request: Checkin, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: CheckinResp) => void): grpc.ClientUnaryCall; + ping(request: Checkin, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: CheckinResp) => void): grpc.ClientUnaryCall; + syncTasks(request: SyncTasksReq, options?: Partial): grpc.ClientReadableStream; + syncTasks(request: SyncTasksReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + updateChecks(request: UpdateChecksReq, callback: (error: grpc.ServiceError | null, response: UpdateChecksResp) => void): grpc.ClientUnaryCall; + updateChecks(request: UpdateChecksReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: UpdateChecksResp) => void): grpc.ClientUnaryCall; + updateChecks(request: UpdateChecksReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: UpdateChecksResp) => void): grpc.ClientUnaryCall; } declare class AggregatorClient extends grpc.Client implements IAggregatorClient { - constructor( - address: string, - credentials: grpc.ChannelCredentials, - options?: Partial - ); - public getKey( - request: GetKeyReq, - callback: ( - error: grpc.ServiceError | null, - response: KeyResp - ) => void - ): grpc.ClientUnaryCall; - public getKey( - request: GetKeyReq, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: KeyResp - ) => void - ): grpc.ClientUnaryCall; - public getKey( - request: GetKeyReq, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: KeyResp - ) => void - ): grpc.ClientUnaryCall; - public getNonce( - request: NonceRequest, - callback: ( - error: grpc.ServiceError | null, - response: NonceResp - ) => void - ): grpc.ClientUnaryCall; - public getNonce( - request: NonceRequest, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: NonceResp - ) => void - ): grpc.ClientUnaryCall; - public getNonce( - request: NonceRequest, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: NonceResp - ) => void - ): grpc.ClientUnaryCall; - public getSmartAccountAddress( - request: AddressRequest, - callback: ( - error: grpc.ServiceError | null, - response: AddressResp - ) => void - ): grpc.ClientUnaryCall; - public getSmartAccountAddress( - request: AddressRequest, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: AddressResp - ) => void - ): grpc.ClientUnaryCall; - public getSmartAccountAddress( - request: AddressRequest, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: AddressResp - ) => void - ): grpc.ClientUnaryCall; - public createTask( - request: CreateTaskReq, - callback: ( - error: grpc.ServiceError | null, - response: CreateTaskResp - ) => void - ): grpc.ClientUnaryCall; - public createTask( - request: CreateTaskReq, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: CreateTaskResp - ) => void - ): grpc.ClientUnaryCall; - public createTask( - request: CreateTaskReq, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: CreateTaskResp - ) => void - ): grpc.ClientUnaryCall; - public listTasks( - request: ListTasksReq, - callback: ( - error: grpc.ServiceError | null, - response: ListTasksResp - ) => void - ): grpc.ClientUnaryCall; - public listTasks( - request: ListTasksReq, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: ListTasksResp - ) => void - ): grpc.ClientUnaryCall; - public listTasks( - request: ListTasksReq, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: ListTasksResp - ) => void - ): grpc.ClientUnaryCall; - public getTask( - request: UUID, - callback: (error: grpc.ServiceError | null, response: Task) => void - ): grpc.ClientUnaryCall; - public getTask( - request: UUID, - metadata: grpc.Metadata, - callback: (error: grpc.ServiceError | null, response: Task) => void - ): grpc.ClientUnaryCall; - public getTask( - request: UUID, - metadata: grpc.Metadata, - options: Partial, - callback: (error: grpc.ServiceError | null, response: Task) => void - ): grpc.ClientUnaryCall; - public cancelTask( - request: UUID, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - public cancelTask( - request: UUID, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - public cancelTask( - request: UUID, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - public deleteTask( - request: UUID, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - public deleteTask( - request: UUID, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - public deleteTask( - request: UUID, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - public ping( - request: Checkin, - callback: ( - error: grpc.ServiceError | null, - response: CheckinResp - ) => void - ): grpc.ClientUnaryCall; - public ping( - request: Checkin, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: CheckinResp - ) => void - ): grpc.ClientUnaryCall; - public ping( - request: Checkin, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: CheckinResp - ) => void - ): grpc.ClientUnaryCall; - public syncTasks( - request: SyncTasksReq, - options?: Partial - ): grpc.ClientReadableStream; - public syncTasks( - request: SyncTasksReq, - metadata?: grpc.Metadata, - options?: Partial - ): grpc.ClientReadableStream; - public updateChecks( - request: UpdateChecksReq, - callback: ( - error: grpc.ServiceError | null, - response: UpdateChecksResp - ) => void - ): grpc.ClientUnaryCall; - public updateChecks( - request: UpdateChecksReq, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: UpdateChecksResp - ) => void - ): grpc.ClientUnaryCall; - public updateChecks( - request: UpdateChecksReq, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: UpdateChecksResp - ) => void - ): grpc.ClientUnaryCall; + constructor(address: string, credentials: grpc.ChannelCredentials, options?: Partial); + public getKey(request: GetKeyReq, callback: (error: grpc.ServiceError | null, response: KeyResp) => void): grpc.ClientUnaryCall; + public getKey(request: GetKeyReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: KeyResp) => void): grpc.ClientUnaryCall; + public getKey(request: GetKeyReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: KeyResp) => void): grpc.ClientUnaryCall; + public getNonce(request: NonceRequest, callback: (error: grpc.ServiceError | null, response: NonceResp) => void): grpc.ClientUnaryCall; + public getNonce(request: NonceRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: NonceResp) => void): grpc.ClientUnaryCall; + public getNonce(request: NonceRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: NonceResp) => void): grpc.ClientUnaryCall; + public createWallet(request: CreateWalletReq$1, callback: (error: grpc.ServiceError | null, response: CreateWalletResp) => void): grpc.ClientUnaryCall; + public createWallet(request: CreateWalletReq$1, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: CreateWalletResp) => void): grpc.ClientUnaryCall; + public createWallet(request: CreateWalletReq$1, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: CreateWalletResp) => void): grpc.ClientUnaryCall; + public listWallets(request: ListWalletReq, callback: (error: grpc.ServiceError | null, response: ListWalletResp) => void): grpc.ClientUnaryCall; + public listWallets(request: ListWalletReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ListWalletResp) => void): grpc.ClientUnaryCall; + public listWallets(request: ListWalletReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ListWalletResp) => void): grpc.ClientUnaryCall; + public createTask(request: CreateTaskReq, callback: (error: grpc.ServiceError | null, response: CreateTaskResp) => void): grpc.ClientUnaryCall; + public createTask(request: CreateTaskReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: CreateTaskResp) => void): grpc.ClientUnaryCall; + public createTask(request: CreateTaskReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: CreateTaskResp) => void): grpc.ClientUnaryCall; + public listTasks(request: ListTasksReq, callback: (error: grpc.ServiceError | null, response: ListTasksResp) => void): grpc.ClientUnaryCall; + public listTasks(request: ListTasksReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ListTasksResp) => void): grpc.ClientUnaryCall; + public listTasks(request: ListTasksReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ListTasksResp) => void): grpc.ClientUnaryCall; + public getTask(request: IdReq, callback: (error: grpc.ServiceError | null, response: Task$1) => void): grpc.ClientUnaryCall; + public getTask(request: IdReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Task$1) => void): grpc.ClientUnaryCall; + public getTask(request: IdReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Task$1) => void): grpc.ClientUnaryCall; + public cancelTask(request: IdReq, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + public cancelTask(request: IdReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + public cancelTask(request: IdReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + public deleteTask(request: IdReq, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + public deleteTask(request: IdReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + public deleteTask(request: IdReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + public ping(request: Checkin, callback: (error: grpc.ServiceError | null, response: CheckinResp) => void): grpc.ClientUnaryCall; + public ping(request: Checkin, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: CheckinResp) => void): grpc.ClientUnaryCall; + public ping(request: Checkin, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: CheckinResp) => void): grpc.ClientUnaryCall; + public syncTasks(request: SyncTasksReq, options?: Partial): grpc.ClientReadableStream; + public syncTasks(request: SyncTasksReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + public updateChecks(request: UpdateChecksReq, callback: (error: grpc.ServiceError | null, response: UpdateChecksResp) => void): grpc.ClientUnaryCall; + public updateChecks(request: UpdateChecksReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: UpdateChecksResp) => void): grpc.ClientUnaryCall; + public updateChecks(request: UpdateChecksReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: UpdateChecksResp) => void): grpc.ClientUnaryCall; } type Environment = "production" | "development" | "staging"; -declare const AUTH_KEY_HEADER = "authKey"; +declare const AUTH_KEY_HEADER = "authkey"; interface RequestOptions { authKey: string; } @@ -1467,37 +1257,48 @@ interface GetKeyResponse { interface ClientOption { endpoint: string; } +interface TaskTrigger { + triggerType: number; + manual?: boolean; + cron?: { + schedule: string[]; + }; + event?: { + expression: string; + }; + fixedTime?: { + epochs: number[]; + }; + block?: { + interval: number; + }; +} +interface TaskNode { + taskType: number; + id: string; + name: string; + ethTransfer?: any; + contractWrite?: any; + contractRead?: any; + restApi?: any; + customCode?: any; + branch?: any; + filter?: any; +} interface TaskType { id: string; owner: string; - smartAccountAddress: string; - trigger: { - triggerType: number; - schedule?: any; - contractQuery?: any; - expression: { - expression: string; - }; - }; - nodesList: Array<{ - taskType: number; - id: string; - name: string; - nextList: any[]; - ethTransfer?: any; - contractExecution: any; - graphqlDataQuery?: any; - httpDataQuery?: any; - customCode?: any; - branch?: any; - }>; + smartWalletAddress: string; + trigger: TaskTrigger; + nodes: TaskNode[]; + edges: TaskEdge[]; startAt: number; expiredAt: number; memo: string; completedAt: number; status: number; - repeatable: boolean; - executionsList: any[]; + maxExecution: number; + executions: Execution[]; } interface CreateTaskResponse { id: string; @@ -1514,9 +1315,41 @@ interface CancelTaskResponse { interface DeleteTaskResponse { value: boolean; } -interface GetAddressesResponse { +interface SmartWallet { + address: string; + salt: string; + factory: string; +} +interface CreateWalletReq { + salt: string; + factoryAddress?: string; +} +interface Execution { + epoch: number; + userOpHash: string; + error: string; +} +interface TaskEdge { + id: string; + source: string; + target: string; +} + +declare class Task implements TaskType { + id: string; + status: number; owner: string; - smart_account_address: string; + smartWalletAddress: string; + trigger: TaskTrigger; + nodes: TaskNode[]; + edges: TaskEdge[]; + startAt: number; + expiredAt: number; + memo: string; + completedAt: number; + maxExecution: number; + executions: Execution[]; + constructor(task: Task$1); } declare class BaseClient { @@ -1525,34 +1358,20 @@ declare class BaseClient { protected metadata: Metadata; constructor(opts: ClientOption); isAuthKeyValid(key: string): boolean; - authWithAPIKey(apiKey: string, expiredAtEpoch: number): Promise; + authWithAPIKey(address: string, apiKey: string, expiredAtEpoch: number): Promise; authWithSignature(address: string, signature: string, expiredAtEpoch: number): Promise; protected _callRPC(method: string, request: TRequest | any, options?: RequestOptions): Promise; + protected _callAnonRPC(method: string, request: TRequest | any, options?: RequestOptions): Promise; } declare class Client extends BaseClient { constructor(config: ClientOption); - getAddresses(address: string, { authKey }: { - authKey: string; - }): Promise; - createTask({ address, oracleContract, tokenContract, }: { - address: string; - tokenContract: string; - oracleContract: string; - }, { authKey }: { - authKey: string; - }): Promise; - listTasks(address: string, { authKey }: { - authKey: string; - }): Promise; - getTask(id: string, { authKey }: { - authKey: string; - }): Promise; - cancelTask(id: string, { authKey }: { - authKey: string; - }): Promise; - deleteTask(id: string, { authKey }: { - authKey: string; - }): Promise; -} - -export { AUTH_KEY_HEADER, type CancelTaskResponse, type ClientOption, type CreateTaskResponse, type DeleteTaskResponse, type Environment, type GetAddressesResponse, type GetKeyResponse, type ListTasksResponse, type RequestOptions, type TaskType, Client as default, getKeyRequestMessage }; + listSmartWallets(options: RequestOptions): Promise; + createWallet({ salt, factoryAddress }: CreateWalletReq, options: RequestOptions): Promise; + createTask(payload: any, options: RequestOptions): Promise; + listTasks(address: string, options: RequestOptions): Promise; + getTask(id: string, options: RequestOptions): Promise; + cancelTask(id: string, options: RequestOptions): Promise; + deleteTask(id: string, options: RequestOptions): Promise; +} + +export { AUTH_KEY_HEADER, type CancelTaskResponse, type ClientOption, type CreateTaskResponse, type CreateWalletReq, type DeleteTaskResponse, type Environment, type Execution, type GetKeyResponse, type ListTasksResponse, type RequestOptions, type SmartWallet, type TaskEdge, type TaskNode, type TaskTrigger, type TaskType, Client as default, getKeyRequestMessage }; diff --git a/dist/index.d.ts b/dist/index.d.ts index 4ba3997..b7d14e6 100644 --- a/dist/index.d.ts +++ b/dist/index.d.ts @@ -11,23 +11,23 @@ declare const getKeyRequestMessage: (address: string, expiredAt: number) => stri -declare class UUID extends jspb.Message { - getBytes(): string; - setBytes(value: string): UUID; +declare class IdReq extends jspb.Message { + getId(): string; + setId(value: string): IdReq; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UUID.AsObject; - static toObject(includeInstance: boolean, msg: UUID): UUID.AsObject; + toObject(includeInstance?: boolean): IdReq.AsObject; + static toObject(includeInstance: boolean, msg: IdReq): IdReq.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: UUID, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UUID; - static deserializeBinaryFromReader(message: UUID, reader: jspb.BinaryReader): UUID; + static serializeBinaryToWriter(message: IdReq, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): IdReq; + static deserializeBinaryFromReader(message: IdReq, reader: jspb.BinaryReader): IdReq; } -declare namespace UUID { +declare namespace IdReq { export type AsObject = { - bytes: string, + id: string, } } @@ -155,110 +155,147 @@ declare namespace SyncTasksReq { } } -declare class TaskTrigger extends jspb.Message { - getTriggerType(): TriggerType; - setTriggerType(value: TriggerType): TaskTrigger; +declare class FixedEpochCondition extends jspb.Message { + clearEpochsList(): void; + getEpochsList(): Array; + setEpochsList(value: Array): FixedEpochCondition; + addEpochs(value: number, index?: number): number; - hasSchedule(): boolean; - clearSchedule(): void; - getSchedule(): TimeCondition | undefined; - setSchedule(value?: TimeCondition): TaskTrigger; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FixedEpochCondition.AsObject; + static toObject(includeInstance: boolean, msg: FixedEpochCondition): FixedEpochCondition.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FixedEpochCondition, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FixedEpochCondition; + static deserializeBinaryFromReader(message: FixedEpochCondition, reader: jspb.BinaryReader): FixedEpochCondition; +} - hasContractQuery(): boolean; - clearContractQuery(): void; - getContractQuery(): ContractQueryCondition | undefined; - setContractQuery(value?: ContractQueryCondition): TaskTrigger; +declare namespace FixedEpochCondition { + export type AsObject = { + epochsList: Array, + } +} - hasExpression(): boolean; - clearExpression(): void; - getExpression(): ExpressionCondition | undefined; - setExpression(value?: ExpressionCondition): TaskTrigger; +declare class CronCondition extends jspb.Message { + clearScheduleList(): void; + getScheduleList(): Array; + setScheduleList(value: Array): CronCondition; + addSchedule(value: string, index?: number): string; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TaskTrigger.AsObject; - static toObject(includeInstance: boolean, msg: TaskTrigger): TaskTrigger.AsObject; + toObject(includeInstance?: boolean): CronCondition.AsObject; + static toObject(includeInstance: boolean, msg: CronCondition): CronCondition.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TaskTrigger, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TaskTrigger; - static deserializeBinaryFromReader(message: TaskTrigger, reader: jspb.BinaryReader): TaskTrigger; + static serializeBinaryToWriter(message: CronCondition, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CronCondition; + static deserializeBinaryFromReader(message: CronCondition, reader: jspb.BinaryReader): CronCondition; } -declare namespace TaskTrigger { +declare namespace CronCondition { export type AsObject = { - triggerType: TriggerType, - schedule?: TimeCondition.AsObject, - contractQuery?: ContractQueryCondition.AsObject, - expression?: ExpressionCondition.AsObject, + scheduleList: Array, } } -declare class TimeCondition extends jspb.Message { - clearFixedList(): void; - getFixedList(): Array; - setFixedList(value: Array): TimeCondition; - addFixed(value: number, index?: number): number; - getCron(): string; - setCron(value: string): TimeCondition; +declare class BlockCondition extends jspb.Message { + getInterval(): number; + setInterval(value: number): BlockCondition; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TimeCondition.AsObject; - static toObject(includeInstance: boolean, msg: TimeCondition): TimeCondition.AsObject; + toObject(includeInstance?: boolean): BlockCondition.AsObject; + static toObject(includeInstance: boolean, msg: BlockCondition): BlockCondition.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TimeCondition, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TimeCondition; - static deserializeBinaryFromReader(message: TimeCondition, reader: jspb.BinaryReader): TimeCondition; + static serializeBinaryToWriter(message: BlockCondition, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BlockCondition; + static deserializeBinaryFromReader(message: BlockCondition, reader: jspb.BinaryReader): BlockCondition; } -declare namespace TimeCondition { +declare namespace BlockCondition { export type AsObject = { - fixedList: Array, - cron: string, + interval: number, } } -declare class ContractQueryCondition extends jspb.Message { - getContractAddress(): string; - setContractAddress(value: string): ContractQueryCondition; - getCallmsg(): string; - setCallmsg(value: string): ContractQueryCondition; +declare class EventCondition extends jspb.Message { + getExpression(): string; + setExpression(value: string): EventCondition; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ContractQueryCondition.AsObject; - static toObject(includeInstance: boolean, msg: ContractQueryCondition): ContractQueryCondition.AsObject; + toObject(includeInstance?: boolean): EventCondition.AsObject; + static toObject(includeInstance: boolean, msg: EventCondition): EventCondition.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ContractQueryCondition, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ContractQueryCondition; - static deserializeBinaryFromReader(message: ContractQueryCondition, reader: jspb.BinaryReader): ContractQueryCondition; + static serializeBinaryToWriter(message: EventCondition, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EventCondition; + static deserializeBinaryFromReader(message: EventCondition, reader: jspb.BinaryReader): EventCondition; } -declare namespace ContractQueryCondition { +declare namespace EventCondition { export type AsObject = { - contractAddress: string, - callmsg: string, + expression: string, } } -declare class ExpressionCondition extends jspb.Message { - getExpression(): string; - setExpression(value: string): ExpressionCondition; +declare class TaskTrigger$1 extends jspb.Message { + + hasManual(): boolean; + clearManual(): void; + getManual(): boolean; + setManual(value: boolean): TaskTrigger$1; + + hasFixedTime(): boolean; + clearFixedTime(): void; + getFixedTime(): FixedEpochCondition | undefined; + setFixedTime(value?: FixedEpochCondition): TaskTrigger$1; + + hasCron(): boolean; + clearCron(): void; + getCron(): CronCondition | undefined; + setCron(value?: CronCondition): TaskTrigger$1; + + hasBlock(): boolean; + clearBlock(): void; + getBlock(): BlockCondition | undefined; + setBlock(value?: BlockCondition): TaskTrigger$1; + + hasEvent(): boolean; + clearEvent(): void; + getEvent(): EventCondition | undefined; + setEvent(value?: EventCondition): TaskTrigger$1; + + getTriggerTypeCase(): TaskTrigger$1.TriggerTypeCase; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ExpressionCondition.AsObject; - static toObject(includeInstance: boolean, msg: ExpressionCondition): ExpressionCondition.AsObject; + toObject(includeInstance?: boolean): TaskTrigger$1.AsObject; + static toObject(includeInstance: boolean, msg: TaskTrigger$1): TaskTrigger$1.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ExpressionCondition, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ExpressionCondition; - static deserializeBinaryFromReader(message: ExpressionCondition, reader: jspb.BinaryReader): ExpressionCondition; + static serializeBinaryToWriter(message: TaskTrigger$1, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TaskTrigger$1; + static deserializeBinaryFromReader(message: TaskTrigger$1, reader: jspb.BinaryReader): TaskTrigger$1; } -declare namespace ExpressionCondition { +declare namespace TaskTrigger$1 { export type AsObject = { - expression: string, + manual: boolean, + fixedTime?: FixedEpochCondition.AsObject, + cron?: CronCondition.AsObject, + block?: BlockCondition.AsObject, + event?: EventCondition.AsObject, } + + export enum TriggerTypeCase { + TRIGGER_TYPE_NOT_SET = 0, + MANUAL = 1, + FIXED_TIME = 2, + CRON = 3, + BLOCK = 4, + EVENT = 5, + } + } declare class SyncTasksResp extends jspb.Message { @@ -269,8 +306,8 @@ declare class SyncTasksResp extends jspb.Message { hasTrigger(): boolean; clearTrigger(): void; - getTrigger(): TaskTrigger | undefined; - setTrigger(value?: TaskTrigger): SyncTasksResp; + getTrigger(): TaskTrigger$1 | undefined; + setTrigger(value?: TaskTrigger$1): SyncTasksResp; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): SyncTasksResp.AsObject; @@ -286,279 +323,396 @@ declare namespace SyncTasksResp { export type AsObject = { id: string, checktype: string, - trigger?: TaskTrigger.AsObject, + trigger?: TaskTrigger$1.AsObject, } } -declare class ETHTransfer extends jspb.Message { +declare class ETHTransferNode extends jspb.Message { getDestination(): string; - setDestination(value: string): ETHTransfer; + setDestination(value: string): ETHTransferNode; getAmount(): string; - setAmount(value: string): ETHTransfer; + setAmount(value: string): ETHTransferNode; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ETHTransfer.AsObject; - static toObject(includeInstance: boolean, msg: ETHTransfer): ETHTransfer.AsObject; + toObject(includeInstance?: boolean): ETHTransferNode.AsObject; + static toObject(includeInstance: boolean, msg: ETHTransferNode): ETHTransferNode.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ETHTransfer, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ETHTransfer; - static deserializeBinaryFromReader(message: ETHTransfer, reader: jspb.BinaryReader): ETHTransfer; + static serializeBinaryToWriter(message: ETHTransferNode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ETHTransferNode; + static deserializeBinaryFromReader(message: ETHTransferNode, reader: jspb.BinaryReader): ETHTransferNode; } -declare namespace ETHTransfer { +declare namespace ETHTransferNode { export type AsObject = { destination: string, amount: string, } } -declare class ContractExecution extends jspb.Message { +declare class ContractWriteNode extends jspb.Message { getContractAddress(): string; - setContractAddress(value: string): ContractExecution; + setContractAddress(value: string): ContractWriteNode; getCallData(): string; - setCallData(value: string): ContractExecution; - getMethod(): string; - setMethod(value: string): ContractExecution; - getEncodedParams(): string; - setEncodedParams(value: string): ContractExecution; + setCallData(value: string): ContractWriteNode; + getContractAbi(): string; + setContractAbi(value: string): ContractWriteNode; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ContractExecution.AsObject; - static toObject(includeInstance: boolean, msg: ContractExecution): ContractExecution.AsObject; + toObject(includeInstance?: boolean): ContractWriteNode.AsObject; + static toObject(includeInstance: boolean, msg: ContractWriteNode): ContractWriteNode.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ContractExecution, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ContractExecution; - static deserializeBinaryFromReader(message: ContractExecution, reader: jspb.BinaryReader): ContractExecution; + static serializeBinaryToWriter(message: ContractWriteNode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ContractWriteNode; + static deserializeBinaryFromReader(message: ContractWriteNode, reader: jspb.BinaryReader): ContractWriteNode; } -declare namespace ContractExecution { +declare namespace ContractWriteNode { export type AsObject = { contractAddress: string, callData: string, - method: string, - encodedParams: string, + contractAbi: string, } } -declare class GraphQLDataQuery extends jspb.Message { +declare class ContractReadNode extends jspb.Message { + getContractAddress(): string; + setContractAddress(value: string): ContractReadNode; + getCallData(): string; + setCallData(value: string): ContractReadNode; + getContractAbi(): string; + setContractAbi(value: string): ContractReadNode; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ContractReadNode.AsObject; + static toObject(includeInstance: boolean, msg: ContractReadNode): ContractReadNode.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ContractReadNode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ContractReadNode; + static deserializeBinaryFromReader(message: ContractReadNode, reader: jspb.BinaryReader): ContractReadNode; +} + +declare namespace ContractReadNode { + export type AsObject = { + contractAddress: string, + callData: string, + contractAbi: string, + } +} + +declare class GraphQLQueryNode extends jspb.Message { getUrl(): string; - setUrl(value: string): GraphQLDataQuery; + setUrl(value: string): GraphQLQueryNode; getQuery(): string; - setQuery(value: string): GraphQLDataQuery; + setQuery(value: string): GraphQLQueryNode; + + getVariablesMap(): jspb.Map; + clearVariablesMap(): void; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GraphQLDataQuery.AsObject; - static toObject(includeInstance: boolean, msg: GraphQLDataQuery): GraphQLDataQuery.AsObject; + toObject(includeInstance?: boolean): GraphQLQueryNode.AsObject; + static toObject(includeInstance: boolean, msg: GraphQLQueryNode): GraphQLQueryNode.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GraphQLDataQuery, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GraphQLDataQuery; - static deserializeBinaryFromReader(message: GraphQLDataQuery, reader: jspb.BinaryReader): GraphQLDataQuery; + static serializeBinaryToWriter(message: GraphQLQueryNode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GraphQLQueryNode; + static deserializeBinaryFromReader(message: GraphQLQueryNode, reader: jspb.BinaryReader): GraphQLQueryNode; } -declare namespace GraphQLDataQuery { +declare namespace GraphQLQueryNode { export type AsObject = { url: string, query: string, + + variablesMap: Array<[string, string]>, } } -declare class HTTPAPICall extends jspb.Message { +declare class RestAPINode extends jspb.Message { getUrl(): string; - setUrl(value: string): HTTPAPICall; + setUrl(value: string): RestAPINode; getHeadersMap(): jspb.Map; clearHeadersMap(): void; getBody(): string; - setBody(value: string): HTTPAPICall; + setBody(value: string): RestAPINode; + getMethod(): string; + setMethod(value: string): RestAPINode; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): HTTPAPICall.AsObject; - static toObject(includeInstance: boolean, msg: HTTPAPICall): HTTPAPICall.AsObject; + toObject(includeInstance?: boolean): RestAPINode.AsObject; + static toObject(includeInstance: boolean, msg: RestAPINode): RestAPINode.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: HTTPAPICall, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): HTTPAPICall; - static deserializeBinaryFromReader(message: HTTPAPICall, reader: jspb.BinaryReader): HTTPAPICall; + static serializeBinaryToWriter(message: RestAPINode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RestAPINode; + static deserializeBinaryFromReader(message: RestAPINode, reader: jspb.BinaryReader): RestAPINode; } -declare namespace HTTPAPICall { +declare namespace RestAPINode { export type AsObject = { url: string, headersMap: Array<[string, string]>, body: string, + method: string, } } -declare class CustomCode extends jspb.Message { +declare class CustomCodeNode extends jspb.Message { getType(): CustomCodeType; - setType(value: CustomCodeType): CustomCode; - getBody(): string; - setBody(value: string): CustomCode; + setType(value: CustomCodeType): CustomCodeNode; + getSource(): string; + setSource(value: string): CustomCodeNode; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CustomCode.AsObject; - static toObject(includeInstance: boolean, msg: CustomCode): CustomCode.AsObject; + toObject(includeInstance?: boolean): CustomCodeNode.AsObject; + static toObject(includeInstance: boolean, msg: CustomCodeNode): CustomCodeNode.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CustomCode, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CustomCode; - static deserializeBinaryFromReader(message: CustomCode, reader: jspb.BinaryReader): CustomCode; + static serializeBinaryToWriter(message: CustomCodeNode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CustomCodeNode; + static deserializeBinaryFromReader(message: CustomCodeNode, reader: jspb.BinaryReader): CustomCodeNode; } -declare namespace CustomCode { +declare namespace CustomCodeNode { export type AsObject = { type: CustomCodeType, - body: string, + source: string, } } -declare class ConditionJump extends jspb.Message { +declare class Condition extends jspb.Message { + getId(): string; + setId(value: string): Condition; + getType(): string; + setType(value: string): Condition; getExpression(): string; - setExpression(value: string): ConditionJump; - getNext(): string; - setNext(value: string): ConditionJump; + setExpression(value: string): Condition; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ConditionJump.AsObject; - static toObject(includeInstance: boolean, msg: ConditionJump): ConditionJump.AsObject; + toObject(includeInstance?: boolean): Condition.AsObject; + static toObject(includeInstance: boolean, msg: Condition): Condition.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ConditionJump, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ConditionJump; - static deserializeBinaryFromReader(message: ConditionJump, reader: jspb.BinaryReader): ConditionJump; + static serializeBinaryToWriter(message: Condition, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Condition; + static deserializeBinaryFromReader(message: Condition, reader: jspb.BinaryReader): Condition; } -declare namespace ConditionJump { +declare namespace Condition { export type AsObject = { + id: string, + type: string, expression: string, - next: string, } } -declare class BranchAction extends jspb.Message { +declare class BranchNode extends jspb.Message { + clearConditionsList(): void; + getConditionsList(): Array; + setConditionsList(value: Array): BranchNode; + addConditions(value?: Condition, index?: number): Condition; - hasIf(): boolean; - clearIf(): void; - getIf(): ConditionJump | undefined; - setIf(value?: ConditionJump): BranchAction; - clearElseifsList(): void; - getElseifsList(): Array; - setElseifsList(value: Array): BranchAction; - addElseifs(value?: ConditionJump, index?: number): ConditionJump; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BranchNode.AsObject; + static toObject(includeInstance: boolean, msg: BranchNode): BranchNode.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BranchNode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BranchNode; + static deserializeBinaryFromReader(message: BranchNode, reader: jspb.BinaryReader): BranchNode; +} + +declare namespace BranchNode { + export type AsObject = { + conditionsList: Array, + } +} - hasElse(): boolean; - clearElse(): void; - getElse(): ConditionJump | undefined; - setElse(value?: ConditionJump): BranchAction; +declare class FilterNode extends jspb.Message { + getExpression(): string; + setExpression(value: string): FilterNode; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): BranchAction.AsObject; - static toObject(includeInstance: boolean, msg: BranchAction): BranchAction.AsObject; + toObject(includeInstance?: boolean): FilterNode.AsObject; + static toObject(includeInstance: boolean, msg: FilterNode): FilterNode.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: BranchAction, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): BranchAction; - static deserializeBinaryFromReader(message: BranchAction, reader: jspb.BinaryReader): BranchAction; + static serializeBinaryToWriter(message: FilterNode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FilterNode; + static deserializeBinaryFromReader(message: FilterNode, reader: jspb.BinaryReader): FilterNode; } -declare namespace BranchAction { +declare namespace FilterNode { export type AsObject = { - pb_if?: ConditionJump.AsObject, - elseifsList: Array, - pb_else?: ConditionJump.AsObject, + expression: string, } } -declare class TaskAction extends jspb.Message { - getTaskType(): TaskType$1; - setTaskType(value: TaskType$1): TaskAction; +declare class LoopNode extends jspb.Message { + getIterVar(): string; + setIterVar(value: string): LoopNode; + getIterKey(): string; + setIterKey(value: string): LoopNode; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): LoopNode.AsObject; + static toObject(includeInstance: boolean, msg: LoopNode): LoopNode.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: LoopNode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): LoopNode; + static deserializeBinaryFromReader(message: LoopNode, reader: jspb.BinaryReader): LoopNode; +} + +declare namespace LoopNode { + export type AsObject = { + iterVar: string, + iterKey: string, + } +} + +declare class TaskEdge$1 extends jspb.Message { getId(): string; - setId(value: string): TaskAction; + setId(value: string): TaskEdge$1; + getSource(): string; + setSource(value: string): TaskEdge$1; + getTarget(): string; + setTarget(value: string): TaskEdge$1; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): TaskEdge$1.AsObject; + static toObject(includeInstance: boolean, msg: TaskEdge$1): TaskEdge$1.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: TaskEdge$1, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TaskEdge$1; + static deserializeBinaryFromReader(message: TaskEdge$1, reader: jspb.BinaryReader): TaskEdge$1; +} + +declare namespace TaskEdge$1 { + export type AsObject = { + id: string, + source: string, + target: string, + } +} + +declare class TaskNode$1 extends jspb.Message { + getId(): string; + setId(value: string): TaskNode$1; getName(): string; - setName(value: string): TaskAction; - clearNextList(): void; - getNextList(): Array; - setNextList(value: Array): TaskAction; - addNext(value: string, index?: number): string; + setName(value: string): TaskNode$1; hasEthTransfer(): boolean; clearEthTransfer(): void; - getEthTransfer(): ETHTransfer | undefined; - setEthTransfer(value?: ETHTransfer): TaskAction; + getEthTransfer(): ETHTransferNode | undefined; + setEthTransfer(value?: ETHTransferNode): TaskNode$1; + + hasContractWrite(): boolean; + clearContractWrite(): void; + getContractWrite(): ContractWriteNode | undefined; + setContractWrite(value?: ContractWriteNode): TaskNode$1; - hasContractExecution(): boolean; - clearContractExecution(): void; - getContractExecution(): ContractExecution | undefined; - setContractExecution(value?: ContractExecution): TaskAction; + hasContractRead(): boolean; + clearContractRead(): void; + getContractRead(): ContractReadNode | undefined; + setContractRead(value?: ContractReadNode): TaskNode$1; hasGraphqlDataQuery(): boolean; clearGraphqlDataQuery(): void; - getGraphqlDataQuery(): GraphQLDataQuery | undefined; - setGraphqlDataQuery(value?: GraphQLDataQuery): TaskAction; + getGraphqlDataQuery(): GraphQLQueryNode | undefined; + setGraphqlDataQuery(value?: GraphQLQueryNode): TaskNode$1; + + hasRestApi(): boolean; + clearRestApi(): void; + getRestApi(): RestAPINode | undefined; + setRestApi(value?: RestAPINode): TaskNode$1; + + hasBranch(): boolean; + clearBranch(): void; + getBranch(): BranchNode | undefined; + setBranch(value?: BranchNode): TaskNode$1; + + hasFilter(): boolean; + clearFilter(): void; + getFilter(): FilterNode | undefined; + setFilter(value?: FilterNode): TaskNode$1; - hasHttpDataQuery(): boolean; - clearHttpDataQuery(): void; - getHttpDataQuery(): HTTPAPICall | undefined; - setHttpDataQuery(value?: HTTPAPICall): TaskAction; + hasLoop(): boolean; + clearLoop(): void; + getLoop(): LoopNode | undefined; + setLoop(value?: LoopNode): TaskNode$1; hasCustomCode(): boolean; clearCustomCode(): void; - getCustomCode(): CustomCode | undefined; - setCustomCode(value?: CustomCode): TaskAction; + getCustomCode(): CustomCodeNode | undefined; + setCustomCode(value?: CustomCodeNode): TaskNode$1; - hasBranch(): boolean; - clearBranch(): void; - getBranch(): BranchAction | undefined; - setBranch(value?: BranchAction): TaskAction; + getTaskTypeCase(): TaskNode$1.TaskTypeCase; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TaskAction.AsObject; - static toObject(includeInstance: boolean, msg: TaskAction): TaskAction.AsObject; + toObject(includeInstance?: boolean): TaskNode$1.AsObject; + static toObject(includeInstance: boolean, msg: TaskNode$1): TaskNode$1.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TaskAction, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TaskAction; - static deserializeBinaryFromReader(message: TaskAction, reader: jspb.BinaryReader): TaskAction; + static serializeBinaryToWriter(message: TaskNode$1, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TaskNode$1; + static deserializeBinaryFromReader(message: TaskNode$1, reader: jspb.BinaryReader): TaskNode$1; } -declare namespace TaskAction { +declare namespace TaskNode$1 { export type AsObject = { - taskType: TaskType$1, id: string, name: string, - nextList: Array, - ethTransfer?: ETHTransfer.AsObject, - contractExecution?: ContractExecution.AsObject, - graphqlDataQuery?: GraphQLDataQuery.AsObject, - httpDataQuery?: HTTPAPICall.AsObject, - customCode?: CustomCode.AsObject, - branch?: BranchAction.AsObject, + ethTransfer?: ETHTransferNode.AsObject, + contractWrite?: ContractWriteNode.AsObject, + contractRead?: ContractReadNode.AsObject, + graphqlDataQuery?: GraphQLQueryNode.AsObject, + restApi?: RestAPINode.AsObject, + branch?: BranchNode.AsObject, + filter?: FilterNode.AsObject, + loop?: LoopNode.AsObject, + customCode?: CustomCodeNode.AsObject, + } + + export enum 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, } + } -declare class Execution extends jspb.Message { +declare class Execution$1 extends jspb.Message { getEpoch(): number; - setEpoch(value: number): Execution; + setEpoch(value: number): Execution$1; getUserOpHash(): string; - setUserOpHash(value: string): Execution; + setUserOpHash(value: string): Execution$1; getError(): string; - setError(value: string): Execution; + setError(value: string): Execution$1; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Execution.AsObject; - static toObject(includeInstance: boolean, msg: Execution): Execution.AsObject; + toObject(includeInstance?: boolean): Execution$1.AsObject; + static toObject(includeInstance: boolean, msg: Execution$1): Execution$1.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Execution, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Execution; - static deserializeBinaryFromReader(message: Execution, reader: jspb.BinaryReader): Execution; + static serializeBinaryToWriter(message: Execution$1, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Execution$1; + static deserializeBinaryFromReader(message: Execution$1, reader: jspb.BinaryReader): Execution$1; } -declare namespace Execution { +declare namespace Execution$1 { export type AsObject = { epoch: number, userOpHash: string, @@ -566,66 +720,68 @@ declare namespace Execution { } } -declare class Task extends jspb.Message { - - hasId(): boolean; - clearId(): void; - getId(): UUID | undefined; - setId(value?: UUID): Task; +declare class Task$1 extends jspb.Message { + getId(): string; + setId(value: string): Task$1; getOwner(): string; - setOwner(value: string): Task; - getSmartAccountAddress(): string; - setSmartAccountAddress(value: string): Task; - - hasTrigger(): boolean; - clearTrigger(): void; - getTrigger(): TaskTrigger | undefined; - setTrigger(value?: TaskTrigger): Task; - clearNodesList(): void; - getNodesList(): Array; - setNodesList(value: Array): Task; - addNodes(value?: TaskAction, index?: number): TaskAction; + setOwner(value: string): Task$1; + getSmartWalletAddress(): string; + setSmartWalletAddress(value: string): Task$1; getStartAt(): number; - setStartAt(value: number): Task; + setStartAt(value: number): Task$1; getExpiredAt(): number; - setExpiredAt(value: number): Task; + setExpiredAt(value: number): Task$1; getMemo(): string; - setMemo(value: string): Task; + setMemo(value: string): Task$1; getCompletedAt(): number; - setCompletedAt(value: number): Task; + setCompletedAt(value: number): Task$1; + getMaxExecution(): number; + setMaxExecution(value: number): Task$1; getStatus(): TaskStatus; - setStatus(value: TaskStatus): Task; - getRepeatable(): boolean; - setRepeatable(value: boolean): Task; + setStatus(value: TaskStatus): Task$1; + + hasTrigger(): boolean; + clearTrigger(): void; + getTrigger(): TaskTrigger$1 | undefined; + setTrigger(value?: TaskTrigger$1): Task$1; + clearNodesList(): void; + getNodesList(): Array; + setNodesList(value: Array): Task$1; + addNodes(value?: TaskNode$1, index?: number): TaskNode$1; + clearEdgesList(): void; + getEdgesList(): Array; + setEdgesList(value: Array): Task$1; + addEdges(value?: TaskEdge$1, index?: number): TaskEdge$1; clearExecutionsList(): void; - getExecutionsList(): Array; - setExecutionsList(value: Array): Task; - addExecutions(value?: Execution, index?: number): Execution; + getExecutionsList(): Array; + setExecutionsList(value: Array): Task$1; + addExecutions(value?: Execution$1, index?: number): Execution$1; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): Task.AsObject; - static toObject(includeInstance: boolean, msg: Task): Task.AsObject; + toObject(includeInstance?: boolean): Task$1.AsObject; + static toObject(includeInstance: boolean, msg: Task$1): Task$1.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: Task, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): Task; - static deserializeBinaryFromReader(message: Task, reader: jspb.BinaryReader): Task; + static serializeBinaryToWriter(message: Task$1, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Task$1; + static deserializeBinaryFromReader(message: Task$1, reader: jspb.BinaryReader): Task$1; } -declare namespace Task { +declare namespace Task$1 { export type AsObject = { - id?: UUID.AsObject, + id: string, owner: string, - smartAccountAddress: string, - trigger?: TaskTrigger.AsObject, - nodesList: Array, + smartWalletAddress: string, startAt: number, expiredAt: number, memo: string, completedAt: number, + maxExecution: number, status: TaskStatus, - repeatable: boolean, - executionsList: Array, + trigger?: TaskTrigger$1.AsObject, + nodesList: Array, + edgesList: Array, + executionsList: Array, } } @@ -633,20 +789,26 @@ declare class CreateTaskReq extends jspb.Message { hasTrigger(): boolean; clearTrigger(): void; - getTrigger(): TaskTrigger | undefined; - setTrigger(value?: TaskTrigger): CreateTaskReq; - clearActionsList(): void; - getActionsList(): Array; - setActionsList(value: Array): CreateTaskReq; - addActions(value?: TaskAction, index?: number): TaskAction; + getTrigger(): TaskTrigger$1 | undefined; + setTrigger(value?: TaskTrigger$1): CreateTaskReq; getStartAt(): number; setStartAt(value: number): CreateTaskReq; getExpiredAt(): number; setExpiredAt(value: number): CreateTaskReq; + getMaxExecution(): number; + setMaxExecution(value: number): CreateTaskReq; + getSmartWalletAddress(): string; + setSmartWalletAddress(value: string): CreateTaskReq; getMemo(): string; setMemo(value: string): CreateTaskReq; - getRepeatable(): boolean; - setRepeatable(value: boolean): CreateTaskReq; + clearNodesList(): void; + getNodesList(): Array; + setNodesList(value: Array): CreateTaskReq; + addNodes(value?: TaskNode$1, index?: number): TaskNode$1; + clearEdgesList(): void; + getEdgesList(): Array; + setEdgesList(value: Array): CreateTaskReq; + addEdges(value?: TaskEdge$1, index?: number): TaskEdge$1; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): CreateTaskReq.AsObject; @@ -660,12 +822,14 @@ declare class CreateTaskReq extends jspb.Message { declare namespace CreateTaskReq { export type AsObject = { - trigger?: TaskTrigger.AsObject, - actionsList: Array, + trigger?: TaskTrigger$1.AsObject, startAt: number, expiredAt: number, + maxExecution: number, + smartWalletAddress: string, memo: string, - repeatable: boolean, + nodesList: Array, + edgesList: Array, } } @@ -729,50 +893,80 @@ declare namespace NonceResp { } } -declare class AddressRequest extends jspb.Message { - getOwner(): string; - setOwner(value: string): AddressRequest; +declare class ListWalletReq extends jspb.Message { + getFactory(): string; + setFactory(value: string): ListWalletReq; + getSalt(): string; + setSalt(value: string): ListWalletReq; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AddressRequest.AsObject; - static toObject(includeInstance: boolean, msg: AddressRequest): AddressRequest.AsObject; + toObject(includeInstance?: boolean): ListWalletReq.AsObject; + static toObject(includeInstance: boolean, msg: ListWalletReq): ListWalletReq.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AddressRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AddressRequest; - static deserializeBinaryFromReader(message: AddressRequest, reader: jspb.BinaryReader): AddressRequest; + static serializeBinaryToWriter(message: ListWalletReq, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListWalletReq; + static deserializeBinaryFromReader(message: ListWalletReq, reader: jspb.BinaryReader): ListWalletReq; } -declare namespace AddressRequest { +declare namespace ListWalletReq { export type AsObject = { - owner: string, + factory: string, + salt: string, } } -declare class AddressResp extends jspb.Message { - getSmartAccountAddress(): string; - setSmartAccountAddress(value: string): AddressResp; - getNonce(): string; - setNonce(value: string): AddressResp; +declare class SmartWallet$1 extends jspb.Message { + getAddress(): string; + setAddress(value: string): SmartWallet$1; + getSalt(): string; + setSalt(value: string): SmartWallet$1; + getFactory(): string; + setFactory(value: string): SmartWallet$1; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AddressResp.AsObject; - static toObject(includeInstance: boolean, msg: AddressResp): AddressResp.AsObject; + toObject(includeInstance?: boolean): SmartWallet$1.AsObject; + static toObject(includeInstance: boolean, msg: SmartWallet$1): SmartWallet$1.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AddressResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AddressResp; - static deserializeBinaryFromReader(message: AddressResp, reader: jspb.BinaryReader): AddressResp; + static serializeBinaryToWriter(message: SmartWallet$1, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SmartWallet$1; + static deserializeBinaryFromReader(message: SmartWallet$1, reader: jspb.BinaryReader): SmartWallet$1; } -declare namespace AddressResp { +declare namespace SmartWallet$1 { export type AsObject = { - smartAccountAddress: string, - nonce: string, + address: string, + salt: string, + factory: string, + } +} + +declare class ListWalletResp extends jspb.Message { + clearWalletsList(): void; + getWalletsList(): Array; + setWalletsList(value: Array): ListWalletResp; + addWallets(value?: SmartWallet$1, index?: number): SmartWallet$1; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListWalletResp.AsObject; + static toObject(includeInstance: boolean, msg: ListWalletResp): ListWalletResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ListWalletResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListWalletResp; + static deserializeBinaryFromReader(message: ListWalletResp, reader: jspb.BinaryReader): ListWalletResp; +} + +declare namespace ListWalletResp { + export type AsObject = { + walletsList: Array, } } declare class ListTasksReq extends jspb.Message { + getSmartWalletAddress(): string; + setSmartWalletAddress(value: string): ListTasksReq; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): ListTasksReq.AsObject; @@ -786,14 +980,15 @@ declare class ListTasksReq extends jspb.Message { declare namespace ListTasksReq { export type AsObject = { + smartWalletAddress: string, } } declare class ListTasksResp extends jspb.Message { clearTasksList(): void; - getTasksList(): Array; - setTasksList(value: Array): ListTasksResp; - addTasks(value?: ListTasksResp.TaskItemResp, index?: number): ListTasksResp.TaskItemResp; + getTasksList(): Array; + setTasksList(value: Array): ListTasksResp; + addTasks(value?: Task$1, index?: number): Task$1; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): ListTasksResp.AsObject; @@ -807,33 +1002,8 @@ declare class ListTasksResp extends jspb.Message { declare namespace ListTasksResp { export type AsObject = { - tasksList: Array, - } - - - export class TaskItemResp extends jspb.Message { - getId(): string; - setId(value: string): TaskItemResp; - getStatus(): TaskStatus; - setStatus(value: TaskStatus): TaskItemResp; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TaskItemResp.AsObject; - static toObject(includeInstance: boolean, msg: TaskItemResp): TaskItemResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TaskItemResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TaskItemResp; - static deserializeBinaryFromReader(message: TaskItemResp, reader: jspb.BinaryReader): TaskItemResp; - } - - export namespace TaskItemResp { - export type AsObject = { - id: string, - status: TaskStatus, - } + tasksList: Array, } - } declare class GetKeyReq extends jspb.Message { @@ -933,19 +1103,53 @@ declare namespace UpdateChecksResp { } } -declare enum TriggerType { - TIMETRIGGER = 0, - CONTRACTQUERYTRIGGER = 1, - EXPRESSIONTRIGGER = 2, +declare class CreateWalletReq$1 extends jspb.Message { + getSalt(): string; + setSalt(value: string): CreateWalletReq$1; + getFactoryAddress(): string; + setFactoryAddress(value: string): CreateWalletReq$1; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CreateWalletReq$1.AsObject; + static toObject(includeInstance: boolean, msg: CreateWalletReq$1): CreateWalletReq$1.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CreateWalletReq$1, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CreateWalletReq$1; + static deserializeBinaryFromReader(message: CreateWalletReq$1, reader: jspb.BinaryReader): CreateWalletReq$1; +} + +declare namespace CreateWalletReq$1 { + export type AsObject = { + salt: string, + factoryAddress: string, + } +} + +declare class CreateWalletResp extends jspb.Message { + getAddress(): string; + setAddress(value: string): CreateWalletResp; + getSalt(): string; + setSalt(value: string): CreateWalletResp; + getFactoryAddress(): string; + setFactoryAddress(value: string): CreateWalletResp; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CreateWalletResp.AsObject; + static toObject(includeInstance: boolean, msg: CreateWalletResp): CreateWalletResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CreateWalletResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CreateWalletResp; + static deserializeBinaryFromReader(message: CreateWalletResp, reader: jspb.BinaryReader): CreateWalletResp; } -declare enum TaskType$1 { - ETHTRANSFERTASK = 0, - CONTRACTEXECUTIONTASK = 1, - GRAPHQLDATAQUERYTASK = 2, - HTTPAPICALLTASK = 3, - CUSTOMCODETASK = 4, - BRANCHACTIONTASK = 5, +declare namespace CreateWalletResp { + export type AsObject = { + address: string, + salt: string, + factoryAddress: string, + } } declare enum TaskStatus { @@ -966,498 +1170,84 @@ declare enum CustomCodeType { interface IAggregatorClient { - getKey( - request: GetKeyReq, - callback: ( - error: grpc.ServiceError | null, - response: KeyResp - ) => void - ): grpc.ClientUnaryCall; - getKey( - request: GetKeyReq, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: KeyResp - ) => void - ): grpc.ClientUnaryCall; - getKey( - request: GetKeyReq, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: KeyResp - ) => void - ): grpc.ClientUnaryCall; - getNonce( - request: NonceRequest, - callback: ( - error: grpc.ServiceError | null, - response: NonceResp - ) => void - ): grpc.ClientUnaryCall; - getNonce( - request: NonceRequest, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: NonceResp - ) => void - ): grpc.ClientUnaryCall; - getNonce( - request: NonceRequest, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: NonceResp - ) => void - ): grpc.ClientUnaryCall; - getSmartAccountAddress( - request: AddressRequest, - callback: ( - error: grpc.ServiceError | null, - response: AddressResp - ) => void - ): grpc.ClientUnaryCall; - getSmartAccountAddress( - request: AddressRequest, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: AddressResp - ) => void - ): grpc.ClientUnaryCall; - getSmartAccountAddress( - request: AddressRequest, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: AddressResp - ) => void - ): grpc.ClientUnaryCall; - createTask( - request: CreateTaskReq, - callback: ( - error: grpc.ServiceError | null, - response: CreateTaskResp - ) => void - ): grpc.ClientUnaryCall; - createTask( - request: CreateTaskReq, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: CreateTaskResp - ) => void - ): grpc.ClientUnaryCall; - createTask( - request: CreateTaskReq, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: CreateTaskResp - ) => void - ): grpc.ClientUnaryCall; - listTasks( - request: ListTasksReq, - callback: ( - error: grpc.ServiceError | null, - response: ListTasksResp - ) => void - ): grpc.ClientUnaryCall; - listTasks( - request: ListTasksReq, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: ListTasksResp - ) => void - ): grpc.ClientUnaryCall; - listTasks( - request: ListTasksReq, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: ListTasksResp - ) => void - ): grpc.ClientUnaryCall; - getTask( - request: UUID, - callback: (error: grpc.ServiceError | null, response: Task) => void - ): grpc.ClientUnaryCall; - getTask( - request: UUID, - metadata: grpc.Metadata, - callback: (error: grpc.ServiceError | null, response: Task) => void - ): grpc.ClientUnaryCall; - getTask( - request: UUID, - metadata: grpc.Metadata, - options: Partial, - callback: (error: grpc.ServiceError | null, response: Task) => void - ): grpc.ClientUnaryCall; - cancelTask( - request: UUID, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - cancelTask( - request: UUID, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - cancelTask( - request: UUID, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - deleteTask( - request: UUID, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - deleteTask( - request: UUID, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - deleteTask( - request: UUID, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - ping( - request: Checkin, - callback: ( - error: grpc.ServiceError | null, - response: CheckinResp - ) => void - ): grpc.ClientUnaryCall; - ping( - request: Checkin, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: CheckinResp - ) => void - ): grpc.ClientUnaryCall; - ping( - request: Checkin, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: CheckinResp - ) => void - ): grpc.ClientUnaryCall; - syncTasks( - request: SyncTasksReq, - options?: Partial - ): grpc.ClientReadableStream; - syncTasks( - request: SyncTasksReq, - metadata?: grpc.Metadata, - options?: Partial - ): grpc.ClientReadableStream; - updateChecks( - request: UpdateChecksReq, - callback: ( - error: grpc.ServiceError | null, - response: UpdateChecksResp - ) => void - ): grpc.ClientUnaryCall; - updateChecks( - request: UpdateChecksReq, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: UpdateChecksResp - ) => void - ): grpc.ClientUnaryCall; - updateChecks( - request: UpdateChecksReq, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: UpdateChecksResp - ) => void - ): grpc.ClientUnaryCall; + getKey(request: GetKeyReq, callback: (error: grpc.ServiceError | null, response: KeyResp) => void): grpc.ClientUnaryCall; + getKey(request: GetKeyReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: KeyResp) => void): grpc.ClientUnaryCall; + getKey(request: GetKeyReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: KeyResp) => void): grpc.ClientUnaryCall; + getNonce(request: NonceRequest, callback: (error: grpc.ServiceError | null, response: NonceResp) => void): grpc.ClientUnaryCall; + getNonce(request: NonceRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: NonceResp) => void): grpc.ClientUnaryCall; + getNonce(request: NonceRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: NonceResp) => void): grpc.ClientUnaryCall; + createWallet(request: CreateWalletReq$1, callback: (error: grpc.ServiceError | null, response: CreateWalletResp) => void): grpc.ClientUnaryCall; + createWallet(request: CreateWalletReq$1, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: CreateWalletResp) => void): grpc.ClientUnaryCall; + createWallet(request: CreateWalletReq$1, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: CreateWalletResp) => void): grpc.ClientUnaryCall; + listWallets(request: ListWalletReq, callback: (error: grpc.ServiceError | null, response: ListWalletResp) => void): grpc.ClientUnaryCall; + listWallets(request: ListWalletReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ListWalletResp) => void): grpc.ClientUnaryCall; + listWallets(request: ListWalletReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ListWalletResp) => void): grpc.ClientUnaryCall; + createTask(request: CreateTaskReq, callback: (error: grpc.ServiceError | null, response: CreateTaskResp) => void): grpc.ClientUnaryCall; + createTask(request: CreateTaskReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: CreateTaskResp) => void): grpc.ClientUnaryCall; + createTask(request: CreateTaskReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: CreateTaskResp) => void): grpc.ClientUnaryCall; + listTasks(request: ListTasksReq, callback: (error: grpc.ServiceError | null, response: ListTasksResp) => void): grpc.ClientUnaryCall; + listTasks(request: ListTasksReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ListTasksResp) => void): grpc.ClientUnaryCall; + listTasks(request: ListTasksReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ListTasksResp) => void): grpc.ClientUnaryCall; + getTask(request: IdReq, callback: (error: grpc.ServiceError | null, response: Task$1) => void): grpc.ClientUnaryCall; + getTask(request: IdReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Task$1) => void): grpc.ClientUnaryCall; + getTask(request: IdReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Task$1) => void): grpc.ClientUnaryCall; + cancelTask(request: IdReq, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + cancelTask(request: IdReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + cancelTask(request: IdReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + deleteTask(request: IdReq, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + deleteTask(request: IdReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + deleteTask(request: IdReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + ping(request: Checkin, callback: (error: grpc.ServiceError | null, response: CheckinResp) => void): grpc.ClientUnaryCall; + ping(request: Checkin, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: CheckinResp) => void): grpc.ClientUnaryCall; + ping(request: Checkin, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: CheckinResp) => void): grpc.ClientUnaryCall; + syncTasks(request: SyncTasksReq, options?: Partial): grpc.ClientReadableStream; + syncTasks(request: SyncTasksReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + updateChecks(request: UpdateChecksReq, callback: (error: grpc.ServiceError | null, response: UpdateChecksResp) => void): grpc.ClientUnaryCall; + updateChecks(request: UpdateChecksReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: UpdateChecksResp) => void): grpc.ClientUnaryCall; + updateChecks(request: UpdateChecksReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: UpdateChecksResp) => void): grpc.ClientUnaryCall; } declare class AggregatorClient extends grpc.Client implements IAggregatorClient { - constructor( - address: string, - credentials: grpc.ChannelCredentials, - options?: Partial - ); - public getKey( - request: GetKeyReq, - callback: ( - error: grpc.ServiceError | null, - response: KeyResp - ) => void - ): grpc.ClientUnaryCall; - public getKey( - request: GetKeyReq, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: KeyResp - ) => void - ): grpc.ClientUnaryCall; - public getKey( - request: GetKeyReq, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: KeyResp - ) => void - ): grpc.ClientUnaryCall; - public getNonce( - request: NonceRequest, - callback: ( - error: grpc.ServiceError | null, - response: NonceResp - ) => void - ): grpc.ClientUnaryCall; - public getNonce( - request: NonceRequest, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: NonceResp - ) => void - ): grpc.ClientUnaryCall; - public getNonce( - request: NonceRequest, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: NonceResp - ) => void - ): grpc.ClientUnaryCall; - public getSmartAccountAddress( - request: AddressRequest, - callback: ( - error: grpc.ServiceError | null, - response: AddressResp - ) => void - ): grpc.ClientUnaryCall; - public getSmartAccountAddress( - request: AddressRequest, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: AddressResp - ) => void - ): grpc.ClientUnaryCall; - public getSmartAccountAddress( - request: AddressRequest, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: AddressResp - ) => void - ): grpc.ClientUnaryCall; - public createTask( - request: CreateTaskReq, - callback: ( - error: grpc.ServiceError | null, - response: CreateTaskResp - ) => void - ): grpc.ClientUnaryCall; - public createTask( - request: CreateTaskReq, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: CreateTaskResp - ) => void - ): grpc.ClientUnaryCall; - public createTask( - request: CreateTaskReq, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: CreateTaskResp - ) => void - ): grpc.ClientUnaryCall; - public listTasks( - request: ListTasksReq, - callback: ( - error: grpc.ServiceError | null, - response: ListTasksResp - ) => void - ): grpc.ClientUnaryCall; - public listTasks( - request: ListTasksReq, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: ListTasksResp - ) => void - ): grpc.ClientUnaryCall; - public listTasks( - request: ListTasksReq, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: ListTasksResp - ) => void - ): grpc.ClientUnaryCall; - public getTask( - request: UUID, - callback: (error: grpc.ServiceError | null, response: Task) => void - ): grpc.ClientUnaryCall; - public getTask( - request: UUID, - metadata: grpc.Metadata, - callback: (error: grpc.ServiceError | null, response: Task) => void - ): grpc.ClientUnaryCall; - public getTask( - request: UUID, - metadata: grpc.Metadata, - options: Partial, - callback: (error: grpc.ServiceError | null, response: Task) => void - ): grpc.ClientUnaryCall; - public cancelTask( - request: UUID, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - public cancelTask( - request: UUID, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - public cancelTask( - request: UUID, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - public deleteTask( - request: UUID, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - public deleteTask( - request: UUID, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - public deleteTask( - request: UUID, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - public ping( - request: Checkin, - callback: ( - error: grpc.ServiceError | null, - response: CheckinResp - ) => void - ): grpc.ClientUnaryCall; - public ping( - request: Checkin, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: CheckinResp - ) => void - ): grpc.ClientUnaryCall; - public ping( - request: Checkin, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: CheckinResp - ) => void - ): grpc.ClientUnaryCall; - public syncTasks( - request: SyncTasksReq, - options?: Partial - ): grpc.ClientReadableStream; - public syncTasks( - request: SyncTasksReq, - metadata?: grpc.Metadata, - options?: Partial - ): grpc.ClientReadableStream; - public updateChecks( - request: UpdateChecksReq, - callback: ( - error: grpc.ServiceError | null, - response: UpdateChecksResp - ) => void - ): grpc.ClientUnaryCall; - public updateChecks( - request: UpdateChecksReq, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: UpdateChecksResp - ) => void - ): grpc.ClientUnaryCall; - public updateChecks( - request: UpdateChecksReq, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: UpdateChecksResp - ) => void - ): grpc.ClientUnaryCall; + constructor(address: string, credentials: grpc.ChannelCredentials, options?: Partial); + public getKey(request: GetKeyReq, callback: (error: grpc.ServiceError | null, response: KeyResp) => void): grpc.ClientUnaryCall; + public getKey(request: GetKeyReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: KeyResp) => void): grpc.ClientUnaryCall; + public getKey(request: GetKeyReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: KeyResp) => void): grpc.ClientUnaryCall; + public getNonce(request: NonceRequest, callback: (error: grpc.ServiceError | null, response: NonceResp) => void): grpc.ClientUnaryCall; + public getNonce(request: NonceRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: NonceResp) => void): grpc.ClientUnaryCall; + public getNonce(request: NonceRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: NonceResp) => void): grpc.ClientUnaryCall; + public createWallet(request: CreateWalletReq$1, callback: (error: grpc.ServiceError | null, response: CreateWalletResp) => void): grpc.ClientUnaryCall; + public createWallet(request: CreateWalletReq$1, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: CreateWalletResp) => void): grpc.ClientUnaryCall; + public createWallet(request: CreateWalletReq$1, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: CreateWalletResp) => void): grpc.ClientUnaryCall; + public listWallets(request: ListWalletReq, callback: (error: grpc.ServiceError | null, response: ListWalletResp) => void): grpc.ClientUnaryCall; + public listWallets(request: ListWalletReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ListWalletResp) => void): grpc.ClientUnaryCall; + public listWallets(request: ListWalletReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ListWalletResp) => void): grpc.ClientUnaryCall; + public createTask(request: CreateTaskReq, callback: (error: grpc.ServiceError | null, response: CreateTaskResp) => void): grpc.ClientUnaryCall; + public createTask(request: CreateTaskReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: CreateTaskResp) => void): grpc.ClientUnaryCall; + public createTask(request: CreateTaskReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: CreateTaskResp) => void): grpc.ClientUnaryCall; + public listTasks(request: ListTasksReq, callback: (error: grpc.ServiceError | null, response: ListTasksResp) => void): grpc.ClientUnaryCall; + public listTasks(request: ListTasksReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: ListTasksResp) => void): grpc.ClientUnaryCall; + public listTasks(request: ListTasksReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: ListTasksResp) => void): grpc.ClientUnaryCall; + public getTask(request: IdReq, callback: (error: grpc.ServiceError | null, response: Task$1) => void): grpc.ClientUnaryCall; + public getTask(request: IdReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: Task$1) => void): grpc.ClientUnaryCall; + public getTask(request: IdReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: Task$1) => void): grpc.ClientUnaryCall; + public cancelTask(request: IdReq, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + public cancelTask(request: IdReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + public cancelTask(request: IdReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + public deleteTask(request: IdReq, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + public deleteTask(request: IdReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + public deleteTask(request: IdReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + public ping(request: Checkin, callback: (error: grpc.ServiceError | null, response: CheckinResp) => void): grpc.ClientUnaryCall; + public ping(request: Checkin, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: CheckinResp) => void): grpc.ClientUnaryCall; + public ping(request: Checkin, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: CheckinResp) => void): grpc.ClientUnaryCall; + public syncTasks(request: SyncTasksReq, options?: Partial): grpc.ClientReadableStream; + public syncTasks(request: SyncTasksReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + public updateChecks(request: UpdateChecksReq, callback: (error: grpc.ServiceError | null, response: UpdateChecksResp) => void): grpc.ClientUnaryCall; + public updateChecks(request: UpdateChecksReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: UpdateChecksResp) => void): grpc.ClientUnaryCall; + public updateChecks(request: UpdateChecksReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: UpdateChecksResp) => void): grpc.ClientUnaryCall; } type Environment = "production" | "development" | "staging"; -declare const AUTH_KEY_HEADER = "authKey"; +declare const AUTH_KEY_HEADER = "authkey"; interface RequestOptions { authKey: string; } @@ -1467,37 +1257,48 @@ interface GetKeyResponse { interface ClientOption { endpoint: string; } +interface TaskTrigger { + triggerType: number; + manual?: boolean; + cron?: { + schedule: string[]; + }; + event?: { + expression: string; + }; + fixedTime?: { + epochs: number[]; + }; + block?: { + interval: number; + }; +} +interface TaskNode { + taskType: number; + id: string; + name: string; + ethTransfer?: any; + contractWrite?: any; + contractRead?: any; + restApi?: any; + customCode?: any; + branch?: any; + filter?: any; +} interface TaskType { id: string; owner: string; - smartAccountAddress: string; - trigger: { - triggerType: number; - schedule?: any; - contractQuery?: any; - expression: { - expression: string; - }; - }; - nodesList: Array<{ - taskType: number; - id: string; - name: string; - nextList: any[]; - ethTransfer?: any; - contractExecution: any; - graphqlDataQuery?: any; - httpDataQuery?: any; - customCode?: any; - branch?: any; - }>; + smartWalletAddress: string; + trigger: TaskTrigger; + nodes: TaskNode[]; + edges: TaskEdge[]; startAt: number; expiredAt: number; memo: string; completedAt: number; status: number; - repeatable: boolean; - executionsList: any[]; + maxExecution: number; + executions: Execution[]; } interface CreateTaskResponse { id: string; @@ -1514,9 +1315,41 @@ interface CancelTaskResponse { interface DeleteTaskResponse { value: boolean; } -interface GetAddressesResponse { +interface SmartWallet { + address: string; + salt: string; + factory: string; +} +interface CreateWalletReq { + salt: string; + factoryAddress?: string; +} +interface Execution { + epoch: number; + userOpHash: string; + error: string; +} +interface TaskEdge { + id: string; + source: string; + target: string; +} + +declare class Task implements TaskType { + id: string; + status: number; owner: string; - smart_account_address: string; + smartWalletAddress: string; + trigger: TaskTrigger; + nodes: TaskNode[]; + edges: TaskEdge[]; + startAt: number; + expiredAt: number; + memo: string; + completedAt: number; + maxExecution: number; + executions: Execution[]; + constructor(task: Task$1); } declare class BaseClient { @@ -1525,34 +1358,20 @@ declare class BaseClient { protected metadata: Metadata; constructor(opts: ClientOption); isAuthKeyValid(key: string): boolean; - authWithAPIKey(apiKey: string, expiredAtEpoch: number): Promise; + authWithAPIKey(address: string, apiKey: string, expiredAtEpoch: number): Promise; authWithSignature(address: string, signature: string, expiredAtEpoch: number): Promise; protected _callRPC(method: string, request: TRequest | any, options?: RequestOptions): Promise; + protected _callAnonRPC(method: string, request: TRequest | any, options?: RequestOptions): Promise; } declare class Client extends BaseClient { constructor(config: ClientOption); - getAddresses(address: string, { authKey }: { - authKey: string; - }): Promise; - createTask({ address, oracleContract, tokenContract, }: { - address: string; - tokenContract: string; - oracleContract: string; - }, { authKey }: { - authKey: string; - }): Promise; - listTasks(address: string, { authKey }: { - authKey: string; - }): Promise; - getTask(id: string, { authKey }: { - authKey: string; - }): Promise; - cancelTask(id: string, { authKey }: { - authKey: string; - }): Promise; - deleteTask(id: string, { authKey }: { - authKey: string; - }): Promise; -} - -export { AUTH_KEY_HEADER, type CancelTaskResponse, type ClientOption, type CreateTaskResponse, type DeleteTaskResponse, type Environment, type GetAddressesResponse, type GetKeyResponse, type ListTasksResponse, type RequestOptions, type TaskType, Client as default, getKeyRequestMessage }; + listSmartWallets(options: RequestOptions): Promise; + createWallet({ salt, factoryAddress }: CreateWalletReq, options: RequestOptions): Promise; + createTask(payload: any, options: RequestOptions): Promise; + listTasks(address: string, options: RequestOptions): Promise; + getTask(id: string, options: RequestOptions): Promise; + cancelTask(id: string, options: RequestOptions): Promise; + deleteTask(id: string, options: RequestOptions): Promise; +} + +export { AUTH_KEY_HEADER, type CancelTaskResponse, type ClientOption, type CreateTaskResponse, type CreateWalletReq, type DeleteTaskResponse, type Environment, type Execution, type GetKeyResponse, type ListTasksResponse, type RequestOptions, type SmartWallet, type TaskEdge, type TaskNode, type TaskTrigger, type TaskType, Client as default, getKeyRequestMessage }; diff --git a/dist/index.js b/dist/index.js index 457ff92..0b04d1f 100644 --- a/dist/index.js +++ b/dist/index.js @@ -5,8 +5,8 @@ var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; var __getProtoOf = Object.getPrototypeOf; var __hasOwnProp = Object.prototype.hasOwnProperty; -var __esm = (fn, res) => function __init() { - return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res; +var __commonJS = (cb, mod) => function __require() { + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; }; var __export = (target, all) => { for (var name in all) @@ -31,35 +31,12 @@ var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__ge var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); // grpc_codegen/avs_pb.js -var avs_pb_exports = {}; -__export(avs_pb_exports, { - ActionType: () => ActionType, - AddressRequest: () => AddressRequest, - AddressResp: () => AddressResp, - ContractExecution: () => ContractExecution, - CreateTaskReq: () => CreateTaskReq, - CreateTaskResp: () => CreateTaskResp, - ExpressionCondition: () => ExpressionCondition, - GetKeyReq: () => GetKeyReq, - KeyResp: () => KeyResp, - ListTasksReq: () => ListTasksReq, - ListTasksResp: () => ListTasksResp, - Task: () => Task, - TaskAction: () => TaskAction, - TaskTrigger: () => TaskTrigger, - TaskType: () => TaskType, - TriggerType: () => TriggerType, - UUID: () => UUID, - UpdateChecksReq: () => UpdateChecksReq, - UpdateChecksResp: () => UpdateChecksResp -}); -var jspb, goog, global, google_protobuf_timestamp_pb, google_protobuf_wrappers_pb, Task, CreateTaskReq, CreateTaskResp, GetKeyReq, KeyResp, UpdateChecksReq, UpdateChecksResp, AddressResp, AddressRequest, ListTasksReq, ListTasksResp, TaskTrigger, TriggerType, ExpressionCondition, TaskAction, ActionType, ContractExecution, TaskType, UUID; -var init_avs_pb = __esm({ - "grpc_codegen/avs_pb.js"() { +var require_avs_pb = __commonJS({ + "grpc_codegen/avs_pb.js"(exports2) { "use strict"; - jspb = require("google-protobuf"); - goog = jspb; - global = function() { + var jspb = require("google-protobuf"); + var goog = jspb; + var global = function() { if (this) { return this; } @@ -74,53 +51,61 @@ var init_avs_pb = __esm({ } return Function("return this")(); }.call(null); - google_protobuf_timestamp_pb = require("google-protobuf/google/protobuf/timestamp_pb.js"); + var google_protobuf_timestamp_pb = require("google-protobuf/google/protobuf/timestamp_pb.js"); goog.object.extend(proto, google_protobuf_timestamp_pb); - google_protobuf_wrappers_pb = require("google-protobuf/google/protobuf/wrappers_pb.js"); + 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); - 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) { - proto.aggregator.UUID.displayName = "proto.aggregator.UUID"; + proto.aggregator.IdReq.displayName = "proto.aggregator.IdReq"; } proto.aggregator.Checkin = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); @@ -150,40 +135,40 @@ var init_avs_pb = __esm({ if (goog.DEBUG && !COMPILED) { proto.aggregator.SyncTasksReq.displayName = "proto.aggregator.SyncTasksReq"; } - 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) { - proto.aggregator.TaskTrigger.displayName = "proto.aggregator.TaskTrigger"; + proto.aggregator.FixedEpochCondition.displayName = "proto.aggregator.FixedEpochCondition"; } - 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) { - proto.aggregator.TimeCondition.displayName = "proto.aggregator.TimeCondition"; + proto.aggregator.CronCondition.displayName = "proto.aggregator.CronCondition"; } - 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) { - proto.aggregator.ContractQueryCondition.displayName = "proto.aggregator.ContractQueryCondition"; + proto.aggregator.BlockCondition.displayName = "proto.aggregator.BlockCondition"; } - 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) { + proto.aggregator.EventCondition.displayName = "proto.aggregator.EventCondition"; + } + 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) { - proto.aggregator.ExpressionCondition.displayName = "proto.aggregator.ExpressionCondition"; + proto.aggregator.TaskTrigger.displayName = "proto.aggregator.TaskTrigger"; } proto.aggregator.SyncTasksResp = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); @@ -192,75 +177,89 @@ var init_avs_pb = __esm({ if (goog.DEBUG && !COMPILED) { proto.aggregator.SyncTasksResp.displayName = "proto.aggregator.SyncTasksResp"; } - 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.ETHTransfer, jspb.Message); + goog.inherits(proto.aggregator.ETHTransferNode, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.aggregator.ETHTransfer.displayName = "proto.aggregator.ETHTransfer"; + proto.aggregator.ETHTransferNode.displayName = "proto.aggregator.ETHTransferNode"; } - proto.aggregator.ContractExecution = function(opt_data) { + proto.aggregator.ContractWriteNode = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; - goog.inherits(proto.aggregator.ContractExecution, jspb.Message); + goog.inherits(proto.aggregator.ContractWriteNode, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.aggregator.ContractExecution.displayName = "proto.aggregator.ContractExecution"; + proto.aggregator.ContractWriteNode.displayName = "proto.aggregator.ContractWriteNode"; } - proto.aggregator.GraphQLDataQuery = function(opt_data) { + proto.aggregator.ContractReadNode = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; - goog.inherits(proto.aggregator.GraphQLDataQuery, jspb.Message); + goog.inherits(proto.aggregator.ContractReadNode, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.aggregator.GraphQLDataQuery.displayName = "proto.aggregator.GraphQLDataQuery"; + proto.aggregator.ContractReadNode.displayName = "proto.aggregator.ContractReadNode"; } - proto.aggregator.HTTPAPICall = function(opt_data) { + proto.aggregator.GraphQLQueryNode = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; - goog.inherits(proto.aggregator.HTTPAPICall, jspb.Message); + goog.inherits(proto.aggregator.GraphQLQueryNode, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.aggregator.HTTPAPICall.displayName = "proto.aggregator.HTTPAPICall"; + proto.aggregator.GraphQLQueryNode.displayName = "proto.aggregator.GraphQLQueryNode"; } - proto.aggregator.CustomCode = function(opt_data) { + proto.aggregator.RestAPINode = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; - goog.inherits(proto.aggregator.CustomCode, jspb.Message); + goog.inherits(proto.aggregator.RestAPINode, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.aggregator.CustomCode.displayName = "proto.aggregator.CustomCode"; + proto.aggregator.RestAPINode.displayName = "proto.aggregator.RestAPINode"; } - proto.aggregator.ConditionJump = function(opt_data) { + proto.aggregator.CustomCodeNode = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; - goog.inherits(proto.aggregator.ConditionJump, jspb.Message); + goog.inherits(proto.aggregator.CustomCodeNode, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.aggregator.ConditionJump.displayName = "proto.aggregator.ConditionJump"; - } - proto.aggregator.BranchAction = function(opt_data) { - jspb.Message.initialize( - this, - opt_data, - 0, - -1, - proto.aggregator.BranchAction.repeatedFields_, - null - ); + proto.aggregator.CustomCodeNode.displayName = "proto.aggregator.CustomCodeNode"; + } + proto.aggregator.Condition = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; - goog.inherits(proto.aggregator.BranchAction, jspb.Message); + goog.inherits(proto.aggregator.Condition, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.aggregator.BranchAction.displayName = "proto.aggregator.BranchAction"; - } - proto.aggregator.TaskAction = function(opt_data) { - jspb.Message.initialize( - this, - opt_data, - 0, - -1, - proto.aggregator.TaskAction.repeatedFields_, - null - ); + proto.aggregator.Condition.displayName = "proto.aggregator.Condition"; + } + 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) { + proto.aggregator.BranchNode.displayName = "proto.aggregator.BranchNode"; + } + proto.aggregator.FilterNode = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.FilterNode, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.FilterNode.displayName = "proto.aggregator.FilterNode"; + } + proto.aggregator.LoopNode = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.LoopNode, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.LoopNode.displayName = "proto.aggregator.LoopNode"; + } + proto.aggregator.TaskEdge = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.TaskEdge, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.TaskEdge.displayName = "proto.aggregator.TaskEdge"; + } + 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) { - proto.aggregator.TaskAction.displayName = "proto.aggregator.TaskAction"; + proto.aggregator.TaskNode.displayName = "proto.aggregator.TaskNode"; } proto.aggregator.Execution = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); @@ -270,28 +269,14 @@ var init_avs_pb = __esm({ proto.aggregator.Execution.displayName = "proto.aggregator.Execution"; } proto.aggregator.Task = function(opt_data) { - jspb.Message.initialize( - this, - opt_data, - 0, - -1, - proto.aggregator.Task.repeatedFields_, - null - ); + jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.Task.repeatedFields_, null); }; goog.inherits(proto.aggregator.Task, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.aggregator.Task.displayName = "proto.aggregator.Task"; } proto.aggregator.CreateTaskReq = function(opt_data) { - jspb.Message.initialize( - this, - opt_data, - 0, - -1, - proto.aggregator.CreateTaskReq.repeatedFields_, - null - ); + jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.CreateTaskReq.repeatedFields_, null); }; goog.inherits(proto.aggregator.CreateTaskReq, jspb.Message); if (goog.DEBUG && !COMPILED) { @@ -318,19 +303,26 @@ var init_avs_pb = __esm({ if (goog.DEBUG && !COMPILED) { proto.aggregator.NonceResp.displayName = "proto.aggregator.NonceResp"; } - 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) { - proto.aggregator.AddressRequest.displayName = "proto.aggregator.AddressRequest"; + proto.aggregator.ListWalletReq.displayName = "proto.aggregator.ListWalletReq"; } - 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) { + proto.aggregator.SmartWallet.displayName = "proto.aggregator.SmartWallet"; + } + proto.aggregator.ListWalletResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.ListWalletResp.repeatedFields_, null); + }; + goog.inherits(proto.aggregator.ListWalletResp, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.aggregator.AddressResp.displayName = "proto.aggregator.AddressResp"; + proto.aggregator.ListWalletResp.displayName = "proto.aggregator.ListWalletResp"; } proto.aggregator.ListTasksReq = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); @@ -340,26 +332,12 @@ var init_avs_pb = __esm({ proto.aggregator.ListTasksReq.displayName = "proto.aggregator.ListTasksReq"; } proto.aggregator.ListTasksResp = function(opt_data) { - jspb.Message.initialize( - this, - opt_data, - 0, - -1, - proto.aggregator.ListTasksResp.repeatedFields_, - null - ); + jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.ListTasksResp.repeatedFields_, null); }; goog.inherits(proto.aggregator.ListTasksResp, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.aggregator.ListTasksResp.displayName = "proto.aggregator.ListTasksResp"; } - proto.aggregator.ListTasksResp.TaskItemResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.ListTasksResp.TaskItemResp, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.ListTasksResp.TaskItemResp.displayName = "proto.aggregator.ListTasksResp.TaskItemResp"; - } proto.aggregator.GetKeyReq = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; @@ -375,14 +353,7 @@ var init_avs_pb = __esm({ proto.aggregator.KeyResp.displayName = "proto.aggregator.KeyResp"; } proto.aggregator.UpdateChecksReq = function(opt_data) { - jspb.Message.initialize( - this, - opt_data, - 0, - -1, - proto.aggregator.UpdateChecksReq.repeatedFields_, - null - ); + jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.UpdateChecksReq.repeatedFields_, null); }; goog.inherits(proto.aggregator.UpdateChecksReq, jspb.Message); if (goog.DEBUG && !COMPILED) { @@ -395,13 +366,27 @@ var init_avs_pb = __esm({ if (goog.DEBUG && !COMPILED) { proto.aggregator.UpdateChecksResp.displayName = "proto.aggregator.UpdateChecksResp"; } + 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) { + proto.aggregator.CreateWalletReq.displayName = "proto.aggregator.CreateWalletReq"; + } + 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) { + proto.aggregator.CreateWalletResp.displayName = "proto.aggregator.CreateWalletResp"; + } if (jspb.Message.GENERATE_TO_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); }; - 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) { obj.$jspbMessageInstance = msg; @@ -409,12 +394,12 @@ var init_avs_pb = __esm({ return obj; }; } - 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); }; - proto.aggregator.UUID.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.IdReq.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -426,7 +411,7 @@ var init_avs_pb = __esm({ /** @type {string} */ reader.readString() ); - msg.setBytes(value); + msg.setId(value); break; default: reader.skipField(); @@ -435,25 +420,28 @@ var init_avs_pb = __esm({ } return msg; }; - 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(); }; - proto.aggregator.UUID.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.IdReq.serializeBinaryToWriter = function(message, writer) { var f = void 0; - f = message.getBytes(); + f = message.getId(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } }; - proto.aggregator.UUID.prototype.getBytes = function() { + proto.aggregator.IdReq.prototype.getId = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 1, "") ); }; - proto.aggregator.UUID.prototype.setBytes = function(value) { + proto.aggregator.IdReq.prototype.setId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; if (jspb.Message.GENERATE_TO_OBJECT) { @@ -511,10 +499,7 @@ var init_avs_pb = __esm({ break; case 4: var value = new proto.aggregator.Checkin.Status(); - reader.readMessage( - value, - proto.aggregator.Checkin.Status.deserializeBinaryFromReader - ); + reader.readMessage(value, proto.aggregator.Checkin.Status.deserializeBinaryFromReader); msg.setStatus(value); break; case 5: @@ -554,15 +539,24 @@ var init_avs_pb = __esm({ var f = void 0; f = message.getId(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } f = message.getAddress(); if (f.length > 0) { - writer.writeString(2, f); + writer.writeString( + 2, + f + ); } f = message.getSignature(); if (f.length > 0) { - writer.writeString(3, f); + writer.writeString( + 3, + f + ); } f = message.getStatus(); if (f != null) { @@ -574,15 +568,24 @@ var init_avs_pb = __esm({ } f = message.getVersion(); if (f.length > 0) { - writer.writeString(5, f); + writer.writeString( + 5, + f + ); } f = message.getMetricsport(); if (f !== 0) { - writer.writeInt32(6, f); + writer.writeInt32( + 6, + f + ); } f = message.getRemoteip(); if (f.length > 0) { - writer.writeString(7, f); + writer.writeString( + 7, + f + ); } }; if (jspb.Message.GENERATE_TO_OBJECT) { @@ -604,10 +607,7 @@ var init_avs_pb = __esm({ proto.aggregator.Checkin.Status.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.aggregator.Checkin.Status(); - return proto.aggregator.Checkin.Status.deserializeBinaryFromReader( - msg, - reader - ); + return proto.aggregator.Checkin.Status.deserializeBinaryFromReader(msg, reader); }; proto.aggregator.Checkin.Status.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { @@ -632,10 +632,7 @@ var init_avs_pb = __esm({ break; case 3: var value = new google_protobuf_timestamp_pb.Timestamp(); - reader.readMessage( - value, - google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader - ); + reader.readMessage(value, google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); msg.setLastHeartbeat(value); break; default: @@ -654,11 +651,17 @@ var init_avs_pb = __esm({ var f = void 0; f = message.getUptime(); if (f !== 0) { - writer.writeInt64(1, f); + writer.writeInt64( + 1, + f + ); } f = message.getQueuedepth(); if (f !== 0) { - writer.writeInt64(2, f); + writer.writeInt64( + 2, + f + ); } f = message.getLastHeartbeat(); if (f != null) { @@ -690,11 +693,7 @@ var init_avs_pb = __esm({ proto.aggregator.Checkin.Status.prototype.getLastHeartbeat = function() { return ( /** @type{?proto.google.protobuf.Timestamp} */ - jspb.Message.getWrapperField( - this, - google_protobuf_timestamp_pb.Timestamp, - 3 - ) + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3) ); }; proto.aggregator.Checkin.Status.prototype.setLastHeartbeat = function(value) { @@ -803,10 +802,7 @@ var init_avs_pb = __esm({ switch (field) { case 1: var value = new google_protobuf_timestamp_pb.Timestamp(); - reader.readMessage( - value, - google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader - ); + reader.readMessage(value, google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); msg.setUpdatedAt(value); break; default: @@ -835,11 +831,7 @@ var init_avs_pb = __esm({ proto.aggregator.CheckinResp.prototype.getUpdatedAt = function() { return ( /** @type{?proto.google.protobuf.Timestamp} */ - jspb.Message.getWrapperField( - this, - google_protobuf_timestamp_pb.Timestamp, - 1 - ) + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 1) ); }; proto.aggregator.CheckinResp.prototype.setUpdatedAt = function(value) { @@ -924,19 +916,31 @@ var init_avs_pb = __esm({ var f = void 0; f = message.getId(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } f = message.getAddress(); if (f.length > 0) { - writer.writeString(2, f); + writer.writeString( + 2, + f + ); } f = message.getSignature(); if (f.length > 0) { - writer.writeString(3, f); + writer.writeString( + 3, + f + ); } f = message.getMonotonicClock(); if (f !== 0) { - writer.writeInt64(4, f); + writer.writeInt64( + 4, + f + ); } }; proto.aggregator.SyncTasksReq.prototype.getId = function() { @@ -975,16 +979,14 @@ var init_avs_pb = __esm({ proto.aggregator.SyncTasksReq.prototype.setMonotonicClock = function(value) { return jspb.Message.setProto3IntField(this, 4, value); }; + proto.aggregator.FixedEpochCondition.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_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); }; - 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 ? void 0 : f }; if (includeInstance) { obj.$jspbMessageInstance = msg; @@ -992,12 +994,12 @@ var init_avs_pb = __esm({ return obj; }; } - 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); }; - proto.aggregator.TaskTrigger.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.FixedEpochCondition.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1005,35 +1007,13 @@ var init_avs_pb = __esm({ 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 + var values = ( + /** @type {!Array} */ + reader.isDelimited() ? reader.readPackedInt64() : [reader.readInt64()] ); - msg.setExpression(value); + for (var i = 0; i < values.length; i++) { + msg.addEpochs(values[i]); + } break; default: reader.skipField(); @@ -1042,109 +1022,44 @@ var init_avs_pb = __esm({ } return msg; }; - 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(); }; - proto.aggregator.TaskTrigger.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.FixedEpochCondition.serializeBinaryToWriter = function(message, writer) { var f = void 0; - f = message.getTriggerType(); - if (f !== 0) { - writer.writeEnum(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 + f = message.getEpochsList(); + if (f.length > 0) { + writer.writePackedInt64( + 1, + f ); } }; - proto.aggregator.TaskTrigger.prototype.getTriggerType = function() { - return ( - /** @type {!proto.aggregator.TriggerType} */ - jspb.Message.getFieldWithDefault(this, 1, 0) - ); - }; - proto.aggregator.TaskTrigger.prototype.setTriggerType = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); - }; - proto.aggregator.TaskTrigger.prototype.getSchedule = function() { - return ( - /** @type{?proto.aggregator.TimeCondition} */ - jspb.Message.getWrapperField(this, proto.aggregator.TimeCondition, 2) - ); - }; - proto.aggregator.TaskTrigger.prototype.setSchedule = function(value) { - return jspb.Message.setWrapperField(this, 2, value); - }; - proto.aggregator.TaskTrigger.prototype.clearSchedule = function() { - return this.setSchedule(void 0); - }; - proto.aggregator.TaskTrigger.prototype.hasSchedule = function() { - return jspb.Message.getField(this, 2) != null; - }; - proto.aggregator.TaskTrigger.prototype.getContractQuery = function() { - return ( - /** @type{?proto.aggregator.ContractQueryCondition} */ - jspb.Message.getWrapperField( - this, - proto.aggregator.ContractQueryCondition, - 3 - ) - ); - }; - proto.aggregator.TaskTrigger.prototype.setContractQuery = function(value) { - return jspb.Message.setWrapperField(this, 3, value); - }; - proto.aggregator.TaskTrigger.prototype.clearContractQuery = function() { - return this.setContractQuery(void 0); - }; - proto.aggregator.TaskTrigger.prototype.hasContractQuery = function() { - return jspb.Message.getField(this, 3) != null; - }; - proto.aggregator.TaskTrigger.prototype.getExpression = function() { + proto.aggregator.FixedEpochCondition.prototype.getEpochsList = function() { return ( - /** @type{?proto.aggregator.ExpressionCondition} */ - jspb.Message.getWrapperField(this, proto.aggregator.ExpressionCondition, 4) + /** @type {!Array} */ + jspb.Message.getRepeatedField(this, 1) ); }; - proto.aggregator.TaskTrigger.prototype.setExpression = function(value) { - return jspb.Message.setWrapperField(this, 4, value); + proto.aggregator.FixedEpochCondition.prototype.setEpochsList = function(value) { + return jspb.Message.setField(this, 1, value || []); }; - proto.aggregator.TaskTrigger.prototype.clearExpression = function() { - return this.setExpression(void 0); + proto.aggregator.FixedEpochCondition.prototype.addEpochs = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); }; - proto.aggregator.TaskTrigger.prototype.hasExpression = function() { - return jspb.Message.getField(this, 4) != null; + proto.aggregator.FixedEpochCondition.prototype.clearEpochsList = function() { + return this.setEpochsList([]); }; - proto.aggregator.TimeCondition.repeatedFields_ = [1]; + proto.aggregator.CronCondition.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.TimeCondition.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.TimeCondition.toObject(opt_includeInstance, this); + proto.aggregator.CronCondition.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.CronCondition.toObject(opt_includeInstance, this); }; - proto.aggregator.TimeCondition.toObject = function(includeInstance, msg) { + proto.aggregator.CronCondition.toObject = function(includeInstance, msg) { var f, obj = { - fixedList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? void 0 : f, - cron: jspb.Message.getFieldWithDefault(msg, 2, "") + scheduleList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? void 0 : f }; if (includeInstance) { obj.$jspbMessageInstance = msg; @@ -1152,15 +1067,12 @@ var init_avs_pb = __esm({ return obj; }; } - 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); }; - proto.aggregator.TimeCondition.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.CronCondition.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1168,20 +1080,11 @@ var init_avs_pb = __esm({ 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(); @@ -1190,57 +1093,43 @@ var init_avs_pb = __esm({ } return msg; }; - 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(); }; - proto.aggregator.TimeCondition.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.CronCondition.serializeBinaryToWriter = function(message, writer) { var f = void 0; - f = message.getFixedList(); - if (f.length > 0) { - writer.writePackedInt64(1, f); - } - f = message.getCron(); + f = message.getScheduleList(); if (f.length > 0) { - writer.writeString(2, f); + writer.writeRepeatedString( + 1, + f + ); } }; - proto.aggregator.TimeCondition.prototype.getFixedList = function() { + proto.aggregator.CronCondition.prototype.getScheduleList = function() { return ( - /** @type {!Array} */ + /** @type {!Array} */ jspb.Message.getRepeatedField(this, 1) ); }; - proto.aggregator.TimeCondition.prototype.setFixedList = function(value) { + proto.aggregator.CronCondition.prototype.setScheduleList = function(value) { return jspb.Message.setField(this, 1, value || []); }; - 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); }; - proto.aggregator.TimeCondition.prototype.clearFixedList = function() { - return this.setFixedList([]); - }; - proto.aggregator.TimeCondition.prototype.getCron = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.TimeCondition.prototype.setCron = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); + proto.aggregator.CronCondition.prototype.clearScheduleList = function() { + return this.setScheduleList([]); }; if (jspb.Message.GENERATE_TO_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); }; - 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) { obj.$jspbMessageInstance = msg; @@ -1248,15 +1137,12 @@ var init_avs_pb = __esm({ return obj; }; } - 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); }; - proto.aggregator.ContractQueryCondition.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.BlockCondition.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1265,17 +1151,10 @@ var init_avs_pb = __esm({ switch (field) { case 1: var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setContractAddress(value); - break; - case 2: - var value = ( - /** @type {string} */ - reader.readString() + /** @type {number} */ + reader.readInt64() ); - msg.setCallmsg(value); + msg.setInterval(value); break; default: reader.skipField(); @@ -1284,51 +1163,35 @@ var init_avs_pb = __esm({ } return msg; }; - 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(); }; - proto.aggregator.ContractQueryCondition.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.BlockCondition.serializeBinaryToWriter = function(message, writer) { var f = void 0; - f = message.getContractAddress(); - if (f.length > 0) { - writer.writeString(1, f); - } - f = message.getCallmsg(); - if (f.length > 0) { - writer.writeString(2, f); + f = message.getInterval(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); } }; - proto.aggregator.ContractQueryCondition.prototype.getContractAddress = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.ContractQueryCondition.prototype.setContractAddress = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.ContractQueryCondition.prototype.getCallmsg = function() { + proto.aggregator.BlockCondition.prototype.getInterval = function() { return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") + /** @type {number} */ + jspb.Message.getFieldWithDefault(this, 1, 0) ); }; - 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); }; if (jspb.Message.GENERATE_TO_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); }; - proto.aggregator.ExpressionCondition.toObject = function(includeInstance, msg) { + proto.aggregator.EventCondition.toObject = function(includeInstance, msg) { var f, obj = { expression: jspb.Message.getFieldWithDefault(msg, 1, "") }; @@ -1338,15 +1201,12 @@ var init_avs_pb = __esm({ return obj; }; } - 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); }; - proto.aggregator.ExpressionCondition.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.EventCondition.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1367,36 +1227,56 @@ var init_avs_pb = __esm({ } return msg; }; - 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(); }; - proto.aggregator.ExpressionCondition.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.EventCondition.serializeBinaryToWriter = function(message, writer) { var f = void 0; f = message.getExpression(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } }; - proto.aggregator.ExpressionCondition.prototype.getExpression = function() { + proto.aggregator.EventCondition.prototype.getExpression = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 1, "") ); }; - proto.aggregator.ExpressionCondition.prototype.setExpression = function(value) { + proto.aggregator.EventCondition.prototype.setExpression = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; + proto.aggregator.TaskTrigger.oneofGroups_ = [[1, 2, 3, 4, 5]]; + proto.aggregator.TaskTrigger.TriggerTypeCase = { + TRIGGER_TYPE_NOT_SET: 0, + MANUAL: 1, + FIXED_TIME: 2, + CRON: 3, + BLOCK: 4, + EVENT: 5 + }; + 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) { - 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); }; - 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) { obj.$jspbMessageInstance = msg; @@ -1404,15 +1284,12 @@ var init_avs_pb = __esm({ return obj; }; } - 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); }; - proto.aggregator.SyncTasksResp.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.TaskTrigger.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1421,24 +1298,206 @@ var init_avs_pb = __esm({ switch (field) { case 1: var value = ( - /** @type {string} */ - reader.readString() + /** @type {boolean} */ + reader.readBool() ); - msg.setId(value); + msg.setManual(value); break; case 2: - var value = ( - /** @type {string} */ - reader.readString() - ); + var value = new proto.aggregator.FixedEpochCondition(); + reader.readMessage(value, proto.aggregator.FixedEpochCondition.deserializeBinaryFromReader); + msg.setFixedTime(value); + break; + case 3: + var value = new proto.aggregator.CronCondition(); + reader.readMessage(value, proto.aggregator.CronCondition.deserializeBinaryFromReader); + msg.setCron(value); + break; + case 4: + var value = new proto.aggregator.BlockCondition(); + reader.readMessage(value, proto.aggregator.BlockCondition.deserializeBinaryFromReader); + msg.setBlock(value); + break; + case 5: + var value = new proto.aggregator.EventCondition(); + reader.readMessage(value, proto.aggregator.EventCondition.deserializeBinaryFromReader); + msg.setEvent(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.TaskTrigger.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.TaskTrigger.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.TaskTrigger.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = /** @type {boolean} */ + jspb.Message.getField(message, 1); + if (f != null) { + writer.writeBool( + 1, + f + ); + } + f = message.getFixedTime(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.aggregator.FixedEpochCondition.serializeBinaryToWriter + ); + } + f = message.getCron(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.aggregator.CronCondition.serializeBinaryToWriter + ); + } + f = message.getBlock(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.aggregator.BlockCondition.serializeBinaryToWriter + ); + } + f = message.getEvent(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.aggregator.EventCondition.serializeBinaryToWriter + ); + } + }; + proto.aggregator.TaskTrigger.prototype.getManual = function() { + return ( + /** @type {boolean} */ + jspb.Message.getBooleanFieldWithDefault(this, 1, false) + ); + }; + proto.aggregator.TaskTrigger.prototype.setManual = function(value) { + return jspb.Message.setOneofField(this, 1, proto.aggregator.TaskTrigger.oneofGroups_[0], value); + }; + proto.aggregator.TaskTrigger.prototype.clearManual = function() { + return jspb.Message.setOneofField(this, 1, proto.aggregator.TaskTrigger.oneofGroups_[0], void 0); + }; + proto.aggregator.TaskTrigger.prototype.hasManual = function() { + return jspb.Message.getField(this, 1) != null; + }; + proto.aggregator.TaskTrigger.prototype.getFixedTime = function() { + return ( + /** @type{?proto.aggregator.FixedEpochCondition} */ + jspb.Message.getWrapperField(this, proto.aggregator.FixedEpochCondition, 2) + ); + }; + proto.aggregator.TaskTrigger.prototype.setFixedTime = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.aggregator.TaskTrigger.oneofGroups_[0], value); + }; + proto.aggregator.TaskTrigger.prototype.clearFixedTime = function() { + return this.setFixedTime(void 0); + }; + proto.aggregator.TaskTrigger.prototype.hasFixedTime = function() { + return jspb.Message.getField(this, 2) != null; + }; + proto.aggregator.TaskTrigger.prototype.getCron = function() { + return ( + /** @type{?proto.aggregator.CronCondition} */ + jspb.Message.getWrapperField(this, proto.aggregator.CronCondition, 3) + ); + }; + proto.aggregator.TaskTrigger.prototype.setCron = function(value) { + return jspb.Message.setOneofWrapperField(this, 3, proto.aggregator.TaskTrigger.oneofGroups_[0], value); + }; + proto.aggregator.TaskTrigger.prototype.clearCron = function() { + return this.setCron(void 0); + }; + proto.aggregator.TaskTrigger.prototype.hasCron = function() { + return jspb.Message.getField(this, 3) != null; + }; + proto.aggregator.TaskTrigger.prototype.getBlock = function() { + return ( + /** @type{?proto.aggregator.BlockCondition} */ + jspb.Message.getWrapperField(this, proto.aggregator.BlockCondition, 4) + ); + }; + proto.aggregator.TaskTrigger.prototype.setBlock = function(value) { + return jspb.Message.setOneofWrapperField(this, 4, proto.aggregator.TaskTrigger.oneofGroups_[0], value); + }; + proto.aggregator.TaskTrigger.prototype.clearBlock = function() { + return this.setBlock(void 0); + }; + proto.aggregator.TaskTrigger.prototype.hasBlock = function() { + return jspb.Message.getField(this, 4) != null; + }; + proto.aggregator.TaskTrigger.prototype.getEvent = function() { + return ( + /** @type{?proto.aggregator.EventCondition} */ + jspb.Message.getWrapperField(this, proto.aggregator.EventCondition, 5) + ); + }; + proto.aggregator.TaskTrigger.prototype.setEvent = function(value) { + return jspb.Message.setOneofWrapperField(this, 5, proto.aggregator.TaskTrigger.oneofGroups_[0], value); + }; + proto.aggregator.TaskTrigger.prototype.clearEvent = function() { + return this.setEvent(void 0); + }; + proto.aggregator.TaskTrigger.prototype.hasEvent = function() { + return jspb.Message.getField(this, 5) != null; + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.SyncTasksResp.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.SyncTasksResp.toObject(opt_includeInstance, this); + }; + proto.aggregator.SyncTasksResp.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) + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.SyncTasksResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.SyncTasksResp(); + return proto.aggregator.SyncTasksResp.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.SyncTasksResp.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.setChecktype(value); break; case 3: var value = new proto.aggregator.TaskTrigger(); - reader.readMessage( - value, - proto.aggregator.TaskTrigger.deserializeBinaryFromReader - ); + reader.readMessage(value, proto.aggregator.TaskTrigger.deserializeBinaryFromReader); msg.setTrigger(value); break; default: @@ -1457,11 +1516,17 @@ var init_avs_pb = __esm({ var f = void 0; f = message.getId(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } f = message.getChecktype(); if (f.length > 0) { - writer.writeString(2, f); + writer.writeString( + 2, + f + ); } f = message.getTrigger(); if (f != null) { @@ -1506,10 +1571,10 @@ var init_avs_pb = __esm({ return jspb.Message.getField(this, 3) != null; }; if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.ETHTransfer.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.ETHTransfer.toObject(opt_includeInstance, this); + proto.aggregator.ETHTransferNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ETHTransferNode.toObject(opt_includeInstance, this); }; - proto.aggregator.ETHTransfer.toObject = function(includeInstance, msg) { + proto.aggregator.ETHTransferNode.toObject = function(includeInstance, msg) { var f, obj = { destination: jspb.Message.getFieldWithDefault(msg, 1, ""), amount: jspb.Message.getFieldWithDefault(msg, 2, "") @@ -1520,12 +1585,12 @@ var init_avs_pb = __esm({ return obj; }; } - proto.aggregator.ETHTransfer.deserializeBinary = function(bytes) { + proto.aggregator.ETHTransferNode.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ETHTransfer(); - return proto.aggregator.ETHTransfer.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.ETHTransferNode(); + return proto.aggregator.ETHTransferNode.deserializeBinaryFromReader(msg, reader); }; - proto.aggregator.ETHTransfer.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.ETHTransferNode.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1553,53 +1618,55 @@ var init_avs_pb = __esm({ } return msg; }; - proto.aggregator.ETHTransfer.prototype.serializeBinary = function() { + proto.aggregator.ETHTransferNode.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.ETHTransfer.serializeBinaryToWriter(this, writer); + proto.aggregator.ETHTransferNode.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; - proto.aggregator.ETHTransfer.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.ETHTransferNode.serializeBinaryToWriter = function(message, writer) { var f = void 0; f = message.getDestination(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } f = message.getAmount(); if (f.length > 0) { - writer.writeString(2, f); + writer.writeString( + 2, + f + ); } }; - proto.aggregator.ETHTransfer.prototype.getDestination = function() { + proto.aggregator.ETHTransferNode.prototype.getDestination = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 1, "") ); }; - proto.aggregator.ETHTransfer.prototype.setDestination = function(value) { + proto.aggregator.ETHTransferNode.prototype.setDestination = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; - proto.aggregator.ETHTransfer.prototype.getAmount = function() { + proto.aggregator.ETHTransferNode.prototype.getAmount = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 2, "") ); }; - proto.aggregator.ETHTransfer.prototype.setAmount = function(value) { + proto.aggregator.ETHTransferNode.prototype.setAmount = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.ContractExecution.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.ContractExecution.toObject( - opt_includeInstance, - this - ); + proto.aggregator.ContractWriteNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ContractWriteNode.toObject(opt_includeInstance, this); }; - proto.aggregator.ContractExecution.toObject = function(includeInstance, msg) { + proto.aggregator.ContractWriteNode.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, "") + contractAbi: jspb.Message.getFieldWithDefault(msg, 3, "") }; if (includeInstance) { obj.$jspbMessageInstance = msg; @@ -1607,15 +1674,12 @@ var init_avs_pb = __esm({ return obj; }; } - proto.aggregator.ContractExecution.deserializeBinary = function(bytes) { + proto.aggregator.ContractWriteNode.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.ContractWriteNode(); + return proto.aggregator.ContractWriteNode.deserializeBinaryFromReader(msg, reader); }; - proto.aggregator.ContractExecution.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.ContractWriteNode.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1641,14 +1705,7 @@ var init_avs_pb = __esm({ /** @type {string} */ reader.readString() ); - msg.setMethod(value); - break; - case 4: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setEncodedParams(value); + msg.setContractAbi(value); break; default: reader.skipField(); @@ -1657,77 +1714,71 @@ var init_avs_pb = __esm({ } return msg; }; - proto.aggregator.ContractExecution.prototype.serializeBinary = function() { + proto.aggregator.ContractWriteNode.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.ContractExecution.serializeBinaryToWriter(this, writer); + proto.aggregator.ContractWriteNode.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; - proto.aggregator.ContractExecution.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.ContractWriteNode.serializeBinaryToWriter = function(message, writer) { var f = void 0; f = message.getContractAddress(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } f = message.getCallData(); if (f.length > 0) { - writer.writeString(2, f); - } - f = message.getMethod(); - if (f.length > 0) { - writer.writeString(3, f); + writer.writeString( + 2, + f + ); } - f = message.getEncodedParams(); + f = message.getContractAbi(); if (f.length > 0) { - writer.writeString(4, f); + writer.writeString( + 3, + f + ); } }; - proto.aggregator.ContractExecution.prototype.getContractAddress = function() { + proto.aggregator.ContractWriteNode.prototype.getContractAddress = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 1, "") ); }; - proto.aggregator.ContractExecution.prototype.setContractAddress = function(value) { + proto.aggregator.ContractWriteNode.prototype.setContractAddress = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; - proto.aggregator.ContractExecution.prototype.getCallData = function() { + proto.aggregator.ContractWriteNode.prototype.getCallData = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 2, "") ); }; - proto.aggregator.ContractExecution.prototype.setCallData = function(value) { + proto.aggregator.ContractWriteNode.prototype.setCallData = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; - proto.aggregator.ContractExecution.prototype.getMethod = function() { + proto.aggregator.ContractWriteNode.prototype.getContractAbi = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 3, "") ); }; - proto.aggregator.ContractExecution.prototype.setMethod = function(value) { + proto.aggregator.ContractWriteNode.prototype.setContractAbi = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; - proto.aggregator.ContractExecution.prototype.getEncodedParams = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 4, "") - ); - }; - proto.aggregator.ContractExecution.prototype.setEncodedParams = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); - }; if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.GraphQLDataQuery.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.GraphQLDataQuery.toObject( - opt_includeInstance, - this - ); + proto.aggregator.ContractReadNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ContractReadNode.toObject(opt_includeInstance, this); }; - proto.aggregator.GraphQLDataQuery.toObject = function(includeInstance, msg) { + proto.aggregator.ContractReadNode.toObject = function(includeInstance, msg) { var f, obj = { - url: jspb.Message.getFieldWithDefault(msg, 1, ""), - query: 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) { obj.$jspbMessageInstance = msg; @@ -1735,15 +1786,12 @@ var init_avs_pb = __esm({ return obj; }; } - proto.aggregator.GraphQLDataQuery.deserializeBinary = function(bytes) { + proto.aggregator.ContractReadNode.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.ContractReadNode(); + return proto.aggregator.ContractReadNode.deserializeBinaryFromReader(msg, reader); }; - proto.aggregator.GraphQLDataQuery.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.ContractReadNode.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1755,14 +1803,21 @@ var init_avs_pb = __esm({ /** @type {string} */ reader.readString() ); - msg.setUrl(value); + msg.setContractAddress(value); break; case 2: var value = ( /** @type {string} */ reader.readString() ); - msg.setQuery(value); + msg.setCallData(value); + break; + case 3: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setContractAbi(value); break; default: reader.skipField(); @@ -1771,49 +1826,71 @@ var init_avs_pb = __esm({ } return msg; }; - proto.aggregator.GraphQLDataQuery.prototype.serializeBinary = function() { + proto.aggregator.ContractReadNode.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.GraphQLDataQuery.serializeBinaryToWriter(this, writer); + proto.aggregator.ContractReadNode.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; - proto.aggregator.GraphQLDataQuery.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.ContractReadNode.serializeBinaryToWriter = function(message, writer) { var f = void 0; - f = message.getUrl(); + f = message.getContractAddress(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } - f = message.getQuery(); + f = message.getCallData(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getContractAbi(); if (f.length > 0) { - writer.writeString(2, f); + writer.writeString( + 3, + f + ); } }; - proto.aggregator.GraphQLDataQuery.prototype.getUrl = function() { + proto.aggregator.ContractReadNode.prototype.getContractAddress = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 1, "") ); }; - proto.aggregator.GraphQLDataQuery.prototype.setUrl = function(value) { + proto.aggregator.ContractReadNode.prototype.setContractAddress = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; - proto.aggregator.GraphQLDataQuery.prototype.getQuery = function() { + proto.aggregator.ContractReadNode.prototype.getCallData = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 2, "") ); }; - proto.aggregator.GraphQLDataQuery.prototype.setQuery = function(value) { + proto.aggregator.ContractReadNode.prototype.setCallData = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; + proto.aggregator.ContractReadNode.prototype.getContractAbi = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 3, "") + ); + }; + proto.aggregator.ContractReadNode.prototype.setContractAbi = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); + }; if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.HTTPAPICall.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.HTTPAPICall.toObject(opt_includeInstance, this); + proto.aggregator.GraphQLQueryNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.GraphQLQueryNode.toObject(opt_includeInstance, this); }; - proto.aggregator.HTTPAPICall.toObject = function(includeInstance, msg) { + proto.aggregator.GraphQLQueryNode.toObject = function(includeInstance, msg) { var f, obj = { url: jspb.Message.getFieldWithDefault(msg, 1, ""), - headersMap: (f = msg.getHeadersMap()) ? f.toObject(includeInstance, void 0) : [], - body: jspb.Message.getFieldWithDefault(msg, 3, "") + query: jspb.Message.getFieldWithDefault(msg, 2, ""), + variablesMap: (f = msg.getVariablesMap()) ? f.toObject(includeInstance, void 0) : [] }; if (includeInstance) { obj.$jspbMessageInstance = msg; @@ -1821,12 +1898,12 @@ var init_avs_pb = __esm({ return obj; }; } - proto.aggregator.HTTPAPICall.deserializeBinary = function(bytes) { + proto.aggregator.GraphQLQueryNode.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.GraphQLQueryNode(); + return proto.aggregator.GraphQLQueryNode.deserializeBinaryFromReader(msg, reader); }; - proto.aggregator.HTTPAPICall.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.GraphQLQueryNode.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1841,25 +1918,17 @@ var init_avs_pb = __esm({ msg.setUrl(value); break; case 2: - var value = msg.getHeadersMap(); - reader.readMessage(value, function(message, reader2) { - jspb.Map.deserializeBinary( - message, - reader2, - jspb.BinaryReader.prototype.readString, - jspb.BinaryReader.prototype.readString, - null, - "", - "" - ); - }); - break; - case 3: var value = ( /** @type {string} */ reader.readString() ); - msg.setBody(value); + msg.setQuery(value); + break; + case 3: + var value = msg.getVariablesMap(); + reader.readMessage(value, function(message, reader2) { + jspb.Map.deserializeBinary(message, reader2, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); break; default: reader.skipField(); @@ -1868,67 +1937,75 @@ var init_avs_pb = __esm({ } return msg; }; - proto.aggregator.HTTPAPICall.prototype.serializeBinary = function() { + proto.aggregator.GraphQLQueryNode.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.HTTPAPICall.serializeBinaryToWriter(this, writer); + proto.aggregator.GraphQLQueryNode.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; - proto.aggregator.HTTPAPICall.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.GraphQLQueryNode.serializeBinaryToWriter = function(message, writer) { var f = void 0; f = message.getUrl(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } - f = message.getHeadersMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary( + f = message.getQuery(); + if (f.length > 0) { + writer.writeString( 2, - writer, - jspb.BinaryWriter.prototype.writeString, - jspb.BinaryWriter.prototype.writeString + f ); } - f = message.getBody(); - if (f.length > 0) { - writer.writeString(3, f); + f = message.getVariablesMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(3, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); } }; - proto.aggregator.HTTPAPICall.prototype.getUrl = function() { + proto.aggregator.GraphQLQueryNode.prototype.getUrl = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 1, "") ); }; - proto.aggregator.HTTPAPICall.prototype.setUrl = function(value) { + proto.aggregator.GraphQLQueryNode.prototype.setUrl = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; - proto.aggregator.HTTPAPICall.prototype.getHeadersMap = function(opt_noLazyCreate) { + proto.aggregator.GraphQLQueryNode.prototype.getQuery = function() { return ( - /** @type {!jspb.Map} */ - jspb.Message.getMapField(this, 2, opt_noLazyCreate, null) + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 2, "") ); }; - proto.aggregator.HTTPAPICall.prototype.clearHeadersMap = function() { - this.getHeadersMap().clear(); - return this; + proto.aggregator.GraphQLQueryNode.prototype.setQuery = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; - proto.aggregator.HTTPAPICall.prototype.getBody = function() { + proto.aggregator.GraphQLQueryNode.prototype.getVariablesMap = function(opt_noLazyCreate) { return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 3, "") + /** @type {!jspb.Map} */ + jspb.Message.getMapField( + this, + 3, + opt_noLazyCreate, + null + ) ); }; - proto.aggregator.HTTPAPICall.prototype.setBody = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); + proto.aggregator.GraphQLQueryNode.prototype.clearVariablesMap = function() { + this.getVariablesMap().clear(); + return this; }; if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.CustomCode.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.CustomCode.toObject(opt_includeInstance, this); + proto.aggregator.RestAPINode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.RestAPINode.toObject(opt_includeInstance, this); }; - proto.aggregator.CustomCode.toObject = function(includeInstance, msg) { + proto.aggregator.RestAPINode.toObject = function(includeInstance, msg) { var f, obj = { - type: jspb.Message.getFieldWithDefault(msg, 1, 0), - body: jspb.Message.getFieldWithDefault(msg, 2, "") + url: jspb.Message.getFieldWithDefault(msg, 1, ""), + headersMap: (f = msg.getHeadersMap()) ? f.toObject(includeInstance, void 0) : [], + body: jspb.Message.getFieldWithDefault(msg, 3, ""), + method: jspb.Message.getFieldWithDefault(msg, 4, "") }; if (includeInstance) { obj.$jspbMessageInstance = msg; @@ -1936,12 +2013,12 @@ var init_avs_pb = __esm({ return obj; }; } - proto.aggregator.CustomCode.deserializeBinary = function(bytes) { + proto.aggregator.RestAPINode.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.RestAPINode(); + return proto.aggregator.RestAPINode.deserializeBinaryFromReader(msg, reader); }; - proto.aggregator.CustomCode.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.RestAPINode.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1950,18 +2027,31 @@ var init_avs_pb = __esm({ switch (field) { case 1: var value = ( - /** @type {!proto.aggregator.CustomCodeType} */ - reader.readEnum() + /** @type {string} */ + reader.readString() ); - msg.setType(value); + msg.setUrl(value); break; case 2: + var value = msg.getHeadersMap(); + reader.readMessage(value, function(message, reader2) { + jspb.Map.deserializeBinary(message, reader2, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; + case 3: var value = ( /** @type {string} */ reader.readString() ); msg.setBody(value); break; + case 4: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setMethod(value); + break; default: reader.skipField(); break; @@ -1969,48 +2059,293 @@ var init_avs_pb = __esm({ } return msg; }; - proto.aggregator.CustomCode.prototype.serializeBinary = function() { + proto.aggregator.RestAPINode.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.CustomCode.serializeBinaryToWriter(this, writer); + proto.aggregator.RestAPINode.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; - proto.aggregator.CustomCode.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.RestAPINode.serializeBinaryToWriter = function(message, writer) { var f = void 0; - f = message.getType(); - if (f !== 0) { - writer.writeEnum(1, f); - } - f = message.getBody(); + f = message.getUrl(); if (f.length > 0) { - writer.writeString(2, f); - } + writer.writeString( + 1, + f + ); + } + f = message.getHeadersMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(2, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } + f = message.getBody(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getMethod(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + }; + proto.aggregator.RestAPINode.prototype.getUrl = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.RestAPINode.prototype.setUrl = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + proto.aggregator.RestAPINode.prototype.getHeadersMap = function(opt_noLazyCreate) { + return ( + /** @type {!jspb.Map} */ + jspb.Message.getMapField( + this, + 2, + opt_noLazyCreate, + null + ) + ); + }; + proto.aggregator.RestAPINode.prototype.clearHeadersMap = function() { + this.getHeadersMap().clear(); + return this; + }; + proto.aggregator.RestAPINode.prototype.getBody = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 3, "") + ); + }; + proto.aggregator.RestAPINode.prototype.setBody = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); }; - proto.aggregator.CustomCode.prototype.getType = function() { + proto.aggregator.RestAPINode.prototype.getMethod = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 4, "") + ); + }; + proto.aggregator.RestAPINode.prototype.setMethod = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.CustomCodeNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.CustomCodeNode.toObject(opt_includeInstance, this); + }; + proto.aggregator.CustomCodeNode.toObject = function(includeInstance, msg) { + var f, obj = { + type: jspb.Message.getFieldWithDefault(msg, 1, 0), + source: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.CustomCodeNode.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.CustomCodeNode(); + return proto.aggregator.CustomCodeNode.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.CustomCodeNode.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {!proto.aggregator.CustomCodeType} */ + reader.readEnum() + ); + msg.setType(value); + break; + case 2: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setSource(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.CustomCodeNode.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.CustomCodeNode.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.CustomCodeNode.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getType(); + if (f !== 0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getSource(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + }; + proto.aggregator.CustomCodeNode.prototype.getType = function() { return ( /** @type {!proto.aggregator.CustomCodeType} */ jspb.Message.getFieldWithDefault(this, 1, 0) ); }; - proto.aggregator.CustomCode.prototype.setType = function(value) { + proto.aggregator.CustomCodeNode.prototype.setType = function(value) { return jspb.Message.setProto3EnumField(this, 1, value); }; - proto.aggregator.CustomCode.prototype.getBody = function() { + proto.aggregator.CustomCodeNode.prototype.getSource = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 2, "") + ); + }; + proto.aggregator.CustomCodeNode.prototype.setSource = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.Condition.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.Condition.toObject(opt_includeInstance, this); + }; + 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; + }; + } + 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); + }; + 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; + }; + proto.aggregator.Condition.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.Condition.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.Condition.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getType(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getExpression(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + }; + proto.aggregator.Condition.prototype.getId = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.Condition.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + proto.aggregator.Condition.prototype.getType = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 2, "") ); }; - proto.aggregator.CustomCode.prototype.setBody = function(value) { + proto.aggregator.Condition.prototype.setType = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; + proto.aggregator.Condition.prototype.getExpression = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 3, "") + ); + }; + proto.aggregator.Condition.prototype.setExpression = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); + }; + proto.aggregator.BranchNode.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.ConditionJump.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.ConditionJump.toObject(opt_includeInstance, this); + proto.aggregator.BranchNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.BranchNode.toObject(opt_includeInstance, this); }; - proto.aggregator.ConditionJump.toObject = function(includeInstance, msg) { + proto.aggregator.BranchNode.toObject = function(includeInstance, msg) { var f, obj = { - expression: jspb.Message.getFieldWithDefault(msg, 1, ""), - next: jspb.Message.getFieldWithDefault(msg, 2, "") + conditionsList: jspb.Message.toObjectList( + msg.getConditionsList(), + proto.aggregator.Condition.toObject, + includeInstance + ) }; if (includeInstance) { obj.$jspbMessageInstance = msg; @@ -2018,15 +2353,81 @@ var init_avs_pb = __esm({ return obj; }; } - proto.aggregator.ConditionJump.deserializeBinary = function(bytes) { + proto.aggregator.BranchNode.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.BranchNode(); + return proto.aggregator.BranchNode.deserializeBinaryFromReader(msg, reader); + }; + 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; + }; + proto.aggregator.BranchNode.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.BranchNode.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.BranchNode.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getConditionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.aggregator.Condition.serializeBinaryToWriter + ); + } + }; + proto.aggregator.BranchNode.prototype.getConditionsList = function() { + return ( + /** @type{!Array} */ + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.Condition, 1) ); }; - proto.aggregator.ConditionJump.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.BranchNode.prototype.setConditionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); + }; + proto.aggregator.BranchNode.prototype.addConditions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.aggregator.Condition, opt_index); + }; + proto.aggregator.BranchNode.prototype.clearConditionsList = function() { + return this.setConditionsList([]); + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.FilterNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.FilterNode.toObject(opt_includeInstance, this); + }; + proto.aggregator.FilterNode.toObject = function(includeInstance, msg) { + var f, obj = { + expression: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + 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); + }; + proto.aggregator.FilterNode.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2040,12 +2441,77 @@ var init_avs_pb = __esm({ ); msg.setExpression(value); break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.FilterNode.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.FilterNode.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.FilterNode.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getExpression(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + }; + proto.aggregator.FilterNode.prototype.getExpression = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.FilterNode.prototype.setExpression = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.LoopNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.LoopNode.toObject(opt_includeInstance, this); + }; + 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; + }; + } + 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); + }; + 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.setNext(value); + msg.setIterKey(value); break; default: reader.skipField(); @@ -2054,54 +2520,55 @@ var init_avs_pb = __esm({ } return msg; }; - proto.aggregator.ConditionJump.prototype.serializeBinary = function() { + proto.aggregator.LoopNode.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.ConditionJump.serializeBinaryToWriter(this, writer); + proto.aggregator.LoopNode.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; - proto.aggregator.ConditionJump.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.LoopNode.serializeBinaryToWriter = function(message, writer) { var f = void 0; - f = message.getExpression(); + f = message.getIterVar(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } - f = message.getNext(); + f = message.getIterKey(); if (f.length > 0) { - writer.writeString(2, f); + writer.writeString( + 2, + f + ); } }; - proto.aggregator.ConditionJump.prototype.getExpression = function() { + proto.aggregator.LoopNode.prototype.getIterVar = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 1, "") ); }; - proto.aggregator.ConditionJump.prototype.setExpression = function(value) { + proto.aggregator.LoopNode.prototype.setIterVar = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; - proto.aggregator.ConditionJump.prototype.getNext = function() { + proto.aggregator.LoopNode.prototype.getIterKey = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 2, "") ); }; - proto.aggregator.ConditionJump.prototype.setNext = function(value) { + proto.aggregator.LoopNode.prototype.setIterKey = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; - proto.aggregator.BranchAction.repeatedFields_ = [2]; if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.BranchAction.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.BranchAction.toObject(opt_includeInstance, this); + proto.aggregator.TaskEdge.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.TaskEdge.toObject(opt_includeInstance, this); }; - proto.aggregator.BranchAction.toObject = function(includeInstance, msg) { + proto.aggregator.TaskEdge.toObject = function(includeInstance, msg) { var f, obj = { - pb_if: (f = msg.getIf()) && proto.aggregator.ConditionJump.toObject(includeInstance, f), - elseifsList: jspb.Message.toObjectList( - msg.getElseifsList(), - proto.aggregator.ConditionJump.toObject, - includeInstance - ), - pb_else: (f = msg.getElse()) && proto.aggregator.ConditionJump.toObject(includeInstance, f) + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + source: jspb.Message.getFieldWithDefault(msg, 2, ""), + target: jspb.Message.getFieldWithDefault(msg, 3, "") }; if (includeInstance) { obj.$jspbMessageInstance = msg; @@ -2109,12 +2576,12 @@ var init_avs_pb = __esm({ return obj; }; } - proto.aggregator.BranchAction.deserializeBinary = function(bytes) { + proto.aggregator.TaskEdge.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.BranchAction(); - return proto.aggregator.BranchAction.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.TaskEdge(); + return proto.aggregator.TaskEdge.deserializeBinaryFromReader(msg, reader); }; - proto.aggregator.BranchAction.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.TaskEdge.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2122,28 +2589,25 @@ var init_avs_pb = __esm({ var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.aggregator.ConditionJump(); - reader.readMessage( - value, - proto.aggregator.ConditionJump.deserializeBinaryFromReader + var value = ( + /** @type {string} */ + reader.readString() ); - msg.setIf(value); + msg.setId(value); break; case 2: - var value = new proto.aggregator.ConditionJump(); - reader.readMessage( - value, - proto.aggregator.ConditionJump.deserializeBinaryFromReader + var value = ( + /** @type {string} */ + reader.readString() ); - msg.addElseifs(value); + msg.setSource(value); break; case 3: - var value = new proto.aggregator.ConditionJump(); - reader.readMessage( - value, - proto.aggregator.ConditionJump.deserializeBinaryFromReader + var value = ( + /** @type {string} */ + reader.readString() ); - msg.setElse(value); + msg.setTarget(value); break; default: reader.skipField(); @@ -2152,110 +2616,98 @@ var init_avs_pb = __esm({ } return msg; }; - proto.aggregator.BranchAction.prototype.serializeBinary = function() { + proto.aggregator.TaskEdge.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.BranchAction.serializeBinaryToWriter(this, writer); + proto.aggregator.TaskEdge.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; - proto.aggregator.BranchAction.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.TaskEdge.serializeBinaryToWriter = function(message, writer) { var f = void 0; - f = message.getIf(); - if (f != null) { - writer.writeMessage( + f = message.getId(); + if (f.length > 0) { + writer.writeString( 1, - f, - proto.aggregator.ConditionJump.serializeBinaryToWriter + f ); } - f = message.getElseifsList(); + f = message.getSource(); if (f.length > 0) { - writer.writeRepeatedMessage( + writer.writeString( 2, - f, - proto.aggregator.ConditionJump.serializeBinaryToWriter + f ); } - f = message.getElse(); - if (f != null) { - writer.writeMessage( + f = message.getTarget(); + if (f.length > 0) { + writer.writeString( 3, - f, - proto.aggregator.ConditionJump.serializeBinaryToWriter + f ); } }; - proto.aggregator.BranchAction.prototype.getIf = function() { + proto.aggregator.TaskEdge.prototype.getId = function() { return ( - /** @type{?proto.aggregator.ConditionJump} */ - jspb.Message.getWrapperField(this, proto.aggregator.ConditionJump, 1) + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") ); }; - proto.aggregator.BranchAction.prototype.setIf = function(value) { - return jspb.Message.setWrapperField(this, 1, value); - }; - proto.aggregator.BranchAction.prototype.clearIf = function() { - return this.setIf(void 0); - }; - proto.aggregator.BranchAction.prototype.hasIf = function() { - return jspb.Message.getField(this, 1) != null; + proto.aggregator.TaskEdge.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; - proto.aggregator.BranchAction.prototype.getElseifsList = function() { + proto.aggregator.TaskEdge.prototype.getSource = function() { return ( - /** @type{!Array} */ - jspb.Message.getRepeatedWrapperField( - this, - proto.aggregator.ConditionJump, - 2 - ) + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 2, "") ); }; - proto.aggregator.BranchAction.prototype.setElseifsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); + proto.aggregator.TaskEdge.prototype.setSource = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; - proto.aggregator.BranchAction.prototype.addElseifs = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField( - this, - 2, - opt_value, - proto.aggregator.ConditionJump, - opt_index + proto.aggregator.TaskEdge.prototype.getTarget = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 3, "") ); }; - proto.aggregator.BranchAction.prototype.clearElseifsList = function() { - return this.setElseifsList([]); + proto.aggregator.TaskEdge.prototype.setTarget = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); }; - proto.aggregator.BranchAction.prototype.getElse = function() { + proto.aggregator.TaskNode.oneofGroups_ = [[10, 11, 12, 13, 14, 15, 16, 17, 18]]; + 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 + }; + proto.aggregator.TaskNode.prototype.getTaskTypeCase = function() { return ( - /** @type{?proto.aggregator.ConditionJump} */ - jspb.Message.getWrapperField(this, proto.aggregator.ConditionJump, 3) + /** @type {proto.aggregator.TaskNode.TaskTypeCase} */ + jspb.Message.computeOneofCase(this, proto.aggregator.TaskNode.oneofGroups_[0]) ); }; - proto.aggregator.BranchAction.prototype.setElse = function(value) { - return jspb.Message.setWrapperField(this, 3, value); - }; - proto.aggregator.BranchAction.prototype.clearElse = function() { - return this.setElse(void 0); - }; - proto.aggregator.BranchAction.prototype.hasElse = function() { - return jspb.Message.getField(this, 3) != null; - }; - proto.aggregator.TaskAction.repeatedFields_ = [4]; if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.TaskAction.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.TaskAction.toObject(opt_includeInstance, this); + proto.aggregator.TaskNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.TaskNode.toObject(opt_includeInstance, this); }; - proto.aggregator.TaskAction.toObject = function(includeInstance, msg) { + proto.aggregator.TaskNode.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 ? void 0 : f, - ethTransfer: (f = msg.getEthTransfer()) && proto.aggregator.ETHTransfer.toObject(includeInstance, f), - contractExecution: (f = msg.getContractExecution()) && proto.aggregator.ContractExecution.toObject(includeInstance, f), - graphqlDataQuery: (f = msg.getGraphqlDataQuery()) && proto.aggregator.GraphQLDataQuery.toObject(includeInstance, f), - httpDataQuery: (f = msg.getHttpDataQuery()) && proto.aggregator.HTTPAPICall.toObject(includeInstance, f), - customCode: (f = msg.getCustomCode()) && proto.aggregator.CustomCode.toObject(includeInstance, f), - branch: (f = msg.getBranch()) && proto.aggregator.BranchAction.toObject(includeInstance, f) + ethTransfer: (f = msg.getEthTransfer()) && proto.aggregator.ETHTransferNode.toObject(includeInstance, f), + contractWrite: (f = msg.getContractWrite()) && proto.aggregator.ContractWriteNode.toObject(includeInstance, f), + contractRead: (f = msg.getContractRead()) && proto.aggregator.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; @@ -2263,25 +2715,18 @@ var init_avs_pb = __esm({ return obj; }; } - proto.aggregator.TaskAction.deserializeBinary = function(bytes) { + proto.aggregator.TaskNode.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.TaskAction(); - return proto.aggregator.TaskAction.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.TaskNode(); + return proto.aggregator.TaskNode.deserializeBinaryFromReader(msg, reader); }; - proto.aggregator.TaskAction.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.TaskNode.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = ( - /** @type {!proto.aggregator.TaskType} */ - reader.readEnum() - ); - msg.setTaskType(value); - break; case 2: var value = ( /** @type {string} */ @@ -2296,61 +2741,51 @@ var init_avs_pb = __esm({ ); msg.setName(value); break; - case 4: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.addNext(value); - break; case 10: - var value = new proto.aggregator.ETHTransfer(); - reader.readMessage( - value, - proto.aggregator.ETHTransfer.deserializeBinaryFromReader - ); + var value = new proto.aggregator.ETHTransferNode(); + reader.readMessage(value, proto.aggregator.ETHTransferNode.deserializeBinaryFromReader); msg.setEthTransfer(value); break; case 11: - var value = new proto.aggregator.ContractExecution(); - reader.readMessage( - value, - proto.aggregator.ContractExecution.deserializeBinaryFromReader - ); - msg.setContractExecution(value); + var value = new proto.aggregator.ContractWriteNode(); + reader.readMessage(value, proto.aggregator.ContractWriteNode.deserializeBinaryFromReader); + msg.setContractWrite(value); break; case 12: - var value = new proto.aggregator.GraphQLDataQuery(); - reader.readMessage( - value, - proto.aggregator.GraphQLDataQuery.deserializeBinaryFromReader - ); - msg.setGraphqlDataQuery(value); + var value = new proto.aggregator.ContractReadNode(); + reader.readMessage(value, proto.aggregator.ContractReadNode.deserializeBinaryFromReader); + msg.setContractRead(value); break; case 13: - var value = new proto.aggregator.HTTPAPICall(); - reader.readMessage( - value, - proto.aggregator.HTTPAPICall.deserializeBinaryFromReader - ); - msg.setHttpDataQuery(value); + var value = new proto.aggregator.GraphQLQueryNode(); + reader.readMessage(value, proto.aggregator.GraphQLQueryNode.deserializeBinaryFromReader); + msg.setGraphqlDataQuery(value); break; case 14: - var value = new proto.aggregator.CustomCode(); - reader.readMessage( - value, - proto.aggregator.CustomCode.deserializeBinaryFromReader - ); - msg.setCustomCode(value); + var value = new proto.aggregator.RestAPINode(); + reader.readMessage(value, proto.aggregator.RestAPINode.deserializeBinaryFromReader); + msg.setRestApi(value); break; case 15: - var value = new proto.aggregator.BranchAction(); - reader.readMessage( - value, - proto.aggregator.BranchAction.deserializeBinaryFromReader - ); + var value = new proto.aggregator.BranchNode(); + reader.readMessage(value, proto.aggregator.BranchNode.deserializeBinaryFromReader); msg.setBranch(value); break; + case 16: + var value = new proto.aggregator.FilterNode(); + reader.readMessage(value, proto.aggregator.FilterNode.deserializeBinaryFromReader); + msg.setFilter(value); + break; + case 17: + var value = new proto.aggregator.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; @@ -2358,67 +2793,65 @@ var init_avs_pb = __esm({ } return msg; }; - proto.aggregator.TaskAction.prototype.serializeBinary = function() { + proto.aggregator.TaskNode.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.TaskAction.serializeBinaryToWriter(this, writer); + proto.aggregator.TaskNode.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; - proto.aggregator.TaskAction.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.TaskNode.serializeBinaryToWriter = function(message, writer) { var f = void 0; - f = message.getTaskType(); - if (f !== 0) { - writer.writeEnum(1, f); - } f = message.getId(); if (f.length > 0) { - writer.writeString(2, f); + writer.writeString( + 2, + f + ); } f = message.getName(); if (f.length > 0) { - writer.writeString(3, f); - } - f = message.getNextList(); - if (f.length > 0) { - writer.writeRepeatedString(4, f); + writer.writeString( + 3, + f + ); } f = message.getEthTransfer(); if (f != null) { writer.writeMessage( 10, f, - proto.aggregator.ETHTransfer.serializeBinaryToWriter + proto.aggregator.ETHTransferNode.serializeBinaryToWriter ); } - f = message.getContractExecution(); + f = message.getContractWrite(); if (f != null) { writer.writeMessage( 11, f, - proto.aggregator.ContractExecution.serializeBinaryToWriter + proto.aggregator.ContractWriteNode.serializeBinaryToWriter ); } - f = message.getGraphqlDataQuery(); + f = message.getContractRead(); if (f != null) { writer.writeMessage( 12, f, - proto.aggregator.GraphQLDataQuery.serializeBinaryToWriter + proto.aggregator.ContractReadNode.serializeBinaryToWriter ); } - f = message.getHttpDataQuery(); + f = message.getGraphqlDataQuery(); if (f != null) { writer.writeMessage( 13, f, - proto.aggregator.HTTPAPICall.serializeBinaryToWriter + proto.aggregator.GraphQLQueryNode.serializeBinaryToWriter ); } - f = message.getCustomCode(); + f = message.getRestApi(); if (f != null) { writer.writeMessage( 14, f, - proto.aggregator.CustomCode.serializeBinaryToWriter + proto.aggregator.RestAPINode.serializeBinaryToWriter ); } f = message.getBranch(); @@ -2426,142 +2859,187 @@ var init_avs_pb = __esm({ writer.writeMessage( 15, f, - proto.aggregator.BranchAction.serializeBinaryToWriter + proto.aggregator.BranchNode.serializeBinaryToWriter + ); + } + f = message.getFilter(); + if (f != null) { + writer.writeMessage( + 16, + f, + proto.aggregator.FilterNode.serializeBinaryToWriter + ); + } + f = message.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 ); } }; - proto.aggregator.TaskAction.prototype.getTaskType = function() { - return ( - /** @type {!proto.aggregator.TaskType} */ - jspb.Message.getFieldWithDefault(this, 1, 0) - ); - }; - proto.aggregator.TaskAction.prototype.setTaskType = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); - }; - proto.aggregator.TaskAction.prototype.getId = function() { + proto.aggregator.TaskNode.prototype.getId = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 2, "") ); }; - proto.aggregator.TaskAction.prototype.setId = function(value) { + proto.aggregator.TaskNode.prototype.setId = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; - proto.aggregator.TaskAction.prototype.getName = function() { + proto.aggregator.TaskNode.prototype.getName = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 3, "") ); }; - proto.aggregator.TaskAction.prototype.setName = function(value) { + proto.aggregator.TaskNode.prototype.setName = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; - proto.aggregator.TaskAction.prototype.getNextList = function() { + proto.aggregator.TaskNode.prototype.getEthTransfer = function() { return ( - /** @type {!Array} */ - jspb.Message.getRepeatedField(this, 4) - ); - }; - proto.aggregator.TaskAction.prototype.setNextList = function(value) { - return jspb.Message.setField(this, 4, value || []); - }; - proto.aggregator.TaskAction.prototype.addNext = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 4, value, opt_index); - }; - proto.aggregator.TaskAction.prototype.clearNextList = function() { - return this.setNextList([]); - }; - proto.aggregator.TaskAction.prototype.getEthTransfer = function() { - return ( - /** @type{?proto.aggregator.ETHTransfer} */ - jspb.Message.getWrapperField(this, proto.aggregator.ETHTransfer, 10) + /** @type{?proto.aggregator.ETHTransferNode} */ + jspb.Message.getWrapperField(this, proto.aggregator.ETHTransferNode, 10) ); }; - proto.aggregator.TaskAction.prototype.setEthTransfer = function(value) { - return jspb.Message.setWrapperField(this, 10, value); + proto.aggregator.TaskNode.prototype.setEthTransfer = function(value) { + return jspb.Message.setOneofWrapperField(this, 10, proto.aggregator.TaskNode.oneofGroups_[0], value); }; - proto.aggregator.TaskAction.prototype.clearEthTransfer = function() { + proto.aggregator.TaskNode.prototype.clearEthTransfer = function() { return this.setEthTransfer(void 0); }; - proto.aggregator.TaskAction.prototype.hasEthTransfer = function() { + proto.aggregator.TaskNode.prototype.hasEthTransfer = function() { return jspb.Message.getField(this, 10) != null; }; - proto.aggregator.TaskAction.prototype.getContractExecution = function() { + proto.aggregator.TaskNode.prototype.getContractWrite = function() { return ( - /** @type{?proto.aggregator.ContractExecution} */ - jspb.Message.getWrapperField(this, proto.aggregator.ContractExecution, 11) + /** @type{?proto.aggregator.ContractWriteNode} */ + jspb.Message.getWrapperField(this, proto.aggregator.ContractWriteNode, 11) ); }; - proto.aggregator.TaskAction.prototype.setContractExecution = function(value) { - return jspb.Message.setWrapperField(this, 11, value); + proto.aggregator.TaskNode.prototype.setContractWrite = function(value) { + return jspb.Message.setOneofWrapperField(this, 11, proto.aggregator.TaskNode.oneofGroups_[0], value); }; - proto.aggregator.TaskAction.prototype.clearContractExecution = function() { - return this.setContractExecution(void 0); + proto.aggregator.TaskNode.prototype.clearContractWrite = function() { + return this.setContractWrite(void 0); }; - proto.aggregator.TaskAction.prototype.hasContractExecution = function() { + proto.aggregator.TaskNode.prototype.hasContractWrite = function() { return jspb.Message.getField(this, 11) != null; }; - proto.aggregator.TaskAction.prototype.getGraphqlDataQuery = function() { + proto.aggregator.TaskNode.prototype.getContractRead = function() { return ( - /** @type{?proto.aggregator.GraphQLDataQuery} */ - jspb.Message.getWrapperField(this, proto.aggregator.GraphQLDataQuery, 12) + /** @type{?proto.aggregator.ContractReadNode} */ + jspb.Message.getWrapperField(this, proto.aggregator.ContractReadNode, 12) ); }; - proto.aggregator.TaskAction.prototype.setGraphqlDataQuery = function(value) { - return jspb.Message.setWrapperField(this, 12, value); + proto.aggregator.TaskNode.prototype.setContractRead = function(value) { + return jspb.Message.setOneofWrapperField(this, 12, proto.aggregator.TaskNode.oneofGroups_[0], value); }; - proto.aggregator.TaskAction.prototype.clearGraphqlDataQuery = function() { - return this.setGraphqlDataQuery(void 0); + proto.aggregator.TaskNode.prototype.clearContractRead = function() { + return this.setContractRead(void 0); }; - proto.aggregator.TaskAction.prototype.hasGraphqlDataQuery = function() { + proto.aggregator.TaskNode.prototype.hasContractRead = function() { return jspb.Message.getField(this, 12) != null; }; - proto.aggregator.TaskAction.prototype.getHttpDataQuery = function() { + proto.aggregator.TaskNode.prototype.getGraphqlDataQuery = function() { return ( - /** @type{?proto.aggregator.HTTPAPICall} */ - jspb.Message.getWrapperField(this, proto.aggregator.HTTPAPICall, 13) + /** @type{?proto.aggregator.GraphQLQueryNode} */ + jspb.Message.getWrapperField(this, proto.aggregator.GraphQLQueryNode, 13) ); }; - proto.aggregator.TaskAction.prototype.setHttpDataQuery = function(value) { - return jspb.Message.setWrapperField(this, 13, value); + proto.aggregator.TaskNode.prototype.setGraphqlDataQuery = function(value) { + return jspb.Message.setOneofWrapperField(this, 13, proto.aggregator.TaskNode.oneofGroups_[0], value); }; - proto.aggregator.TaskAction.prototype.clearHttpDataQuery = function() { - return this.setHttpDataQuery(void 0); + proto.aggregator.TaskNode.prototype.clearGraphqlDataQuery = function() { + return this.setGraphqlDataQuery(void 0); }; - proto.aggregator.TaskAction.prototype.hasHttpDataQuery = function() { + proto.aggregator.TaskNode.prototype.hasGraphqlDataQuery = function() { return jspb.Message.getField(this, 13) != null; }; - proto.aggregator.TaskAction.prototype.getCustomCode = function() { + proto.aggregator.TaskNode.prototype.getRestApi = function() { return ( - /** @type{?proto.aggregator.CustomCode} */ - jspb.Message.getWrapperField(this, proto.aggregator.CustomCode, 14) + /** @type{?proto.aggregator.RestAPINode} */ + jspb.Message.getWrapperField(this, proto.aggregator.RestAPINode, 14) ); }; - proto.aggregator.TaskAction.prototype.setCustomCode = function(value) { - return jspb.Message.setWrapperField(this, 14, value); + proto.aggregator.TaskNode.prototype.setRestApi = function(value) { + return jspb.Message.setOneofWrapperField(this, 14, proto.aggregator.TaskNode.oneofGroups_[0], value); }; - proto.aggregator.TaskAction.prototype.clearCustomCode = function() { - return this.setCustomCode(void 0); + proto.aggregator.TaskNode.prototype.clearRestApi = function() { + return this.setRestApi(void 0); }; - proto.aggregator.TaskAction.prototype.hasCustomCode = function() { + proto.aggregator.TaskNode.prototype.hasRestApi = function() { return jspb.Message.getField(this, 14) != null; }; - proto.aggregator.TaskAction.prototype.getBranch = function() { + proto.aggregator.TaskNode.prototype.getBranch = function() { return ( - /** @type{?proto.aggregator.BranchAction} */ - jspb.Message.getWrapperField(this, proto.aggregator.BranchAction, 15) + /** @type{?proto.aggregator.BranchNode} */ + jspb.Message.getWrapperField(this, proto.aggregator.BranchNode, 15) ); }; - proto.aggregator.TaskAction.prototype.setBranch = function(value) { - return jspb.Message.setWrapperField(this, 15, value); + proto.aggregator.TaskNode.prototype.setBranch = function(value) { + return jspb.Message.setOneofWrapperField(this, 15, proto.aggregator.TaskNode.oneofGroups_[0], value); }; - proto.aggregator.TaskAction.prototype.clearBranch = function() { + proto.aggregator.TaskNode.prototype.clearBranch = function() { return this.setBranch(void 0); }; - proto.aggregator.TaskAction.prototype.hasBranch = function() { + proto.aggregator.TaskNode.prototype.hasBranch = function() { return jspb.Message.getField(this, 15) != null; }; + proto.aggregator.TaskNode.prototype.getFilter = function() { + return ( + /** @type{?proto.aggregator.FilterNode} */ + jspb.Message.getWrapperField(this, proto.aggregator.FilterNode, 16) + ); + }; + proto.aggregator.TaskNode.prototype.setFilter = function(value) { + return jspb.Message.setOneofWrapperField(this, 16, proto.aggregator.TaskNode.oneofGroups_[0], value); + }; + proto.aggregator.TaskNode.prototype.clearFilter = function() { + return this.setFilter(void 0); + }; + proto.aggregator.TaskNode.prototype.hasFilter = function() { + return jspb.Message.getField(this, 16) != null; + }; + proto.aggregator.TaskNode.prototype.getLoop = function() { + return ( + /** @type{?proto.aggregator.LoopNode} */ + jspb.Message.getWrapperField(this, proto.aggregator.LoopNode, 17) + ); + }; + proto.aggregator.TaskNode.prototype.setLoop = function(value) { + return jspb.Message.setOneofWrapperField(this, 17, proto.aggregator.TaskNode.oneofGroups_[0], value); + }; + proto.aggregator.TaskNode.prototype.clearLoop = function() { + return this.setLoop(void 0); + }; + proto.aggregator.TaskNode.prototype.hasLoop = function() { + return jspb.Message.getField(this, 17) != null; + }; + proto.aggregator.TaskNode.prototype.getCustomCode = function() { + return ( + /** @type{?proto.aggregator.CustomCodeNode} */ + jspb.Message.getWrapperField(this, proto.aggregator.CustomCodeNode, 18) + ); + }; + proto.aggregator.TaskNode.prototype.setCustomCode = function(value) { + return jspb.Message.setOneofWrapperField(this, 18, proto.aggregator.TaskNode.oneofGroups_[0], value); + }; + proto.aggregator.TaskNode.prototype.clearCustomCode = function() { + return this.setCustomCode(void 0); + }; + proto.aggregator.TaskNode.prototype.hasCustomCode = function() { + return jspb.Message.getField(this, 18) != null; + }; if (jspb.Message.GENERATE_TO_OBJECT) { proto.aggregator.Execution.prototype.toObject = function(opt_includeInstance) { return proto.aggregator.Execution.toObject(opt_includeInstance, this); @@ -2627,15 +3105,24 @@ var init_avs_pb = __esm({ var f = void 0; f = message.getEpoch(); if (f !== 0) { - writer.writeInt64(1, f); + writer.writeInt64( + 1, + f + ); } f = message.getUserOpHash(); if (f.length > 0) { - writer.writeString(2, f); + writer.writeString( + 2, + f + ); } f = message.getError(); if (f.length > 0) { - writer.writeString(3, f); + writer.writeString( + 3, + f + ); } }; proto.aggregator.Execution.prototype.getEpoch = function() { @@ -2665,28 +3152,33 @@ var init_avs_pb = __esm({ proto.aggregator.Execution.prototype.setError = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; - proto.aggregator.Task.repeatedFields_ = [5, 12]; + proto.aggregator.Task.repeatedFields_ = [11, 12, 13]; if (jspb.Message.GENERATE_TO_OBJECT) { proto.aggregator.Task.prototype.toObject = function(opt_includeInstance) { return proto.aggregator.Task.toObject(opt_includeInstance, this); }; proto.aggregator.Task.toObject = function(includeInstance, msg) { var f, obj = { - id: (f = msg.getId()) && proto.aggregator.UUID.toObject(includeInstance, f), + id: jspb.Message.getFieldWithDefault(msg, 1, ""), owner: jspb.Message.getFieldWithDefault(msg, 2, ""), - smartAccountAddress: jspb.Message.getFieldWithDefault(msg, 3, ""), + 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.TaskAction.toObject, + proto.aggregator.TaskNode.toObject, + includeInstance + ), + edgesList: jspb.Message.toObjectList( + msg.getEdgesList(), + proto.aggregator.TaskEdge.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, @@ -2712,10 +3204,9 @@ var init_avs_pb = __esm({ var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.aggregator.UUID(); - reader.readMessage( - value, - proto.aggregator.UUID.deserializeBinaryFromReader + var value = ( + /** @type {string} */ + reader.readString() ); msg.setId(value); break; @@ -2731,72 +3222,68 @@ var init_avs_pb = __esm({ /** @type {string} */ reader.readString() ); - msg.setSmartAccountAddress(value); + msg.setSmartWalletAddress(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: var value = ( /** @type {number} */ reader.readInt64() ); msg.setStartAt(value); break; - case 7: + case 5: var value = ( /** @type {number} */ reader.readInt64() ); msg.setExpiredAt(value); break; - case 8: + case 6: var value = ( /** @type {string} */ reader.readString() ); msg.setMemo(value); break; - case 9: + case 7: var value = ( /** @type {number} */ reader.readInt64() ); msg.setCompletedAt(value); break; - case 10: + 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 = ( - /** @type {boolean} */ - reader.readBool() - ); - msg.setRepeatable(value); + var value = new proto.aggregator.TaskNode(); + reader.readMessage(value, proto.aggregator.TaskNode.deserializeBinaryFromReader); + msg.addNodes(value); break; case 12: + var value = new proto.aggregator.TaskEdge(); + reader.readMessage(value, proto.aggregator.TaskEdge.deserializeBinaryFromReader); + msg.addEdges(value); + break; + case 13: var value = new proto.aggregator.Execution(); - reader.readMessage( - value, - proto.aggregator.Execution.deserializeBinaryFromReader - ); + reader.readMessage(value, proto.aggregator.Execution.deserializeBinaryFromReader); msg.addExecutions(value); break; default: @@ -2814,61 +3301,96 @@ var init_avs_pb = __esm({ proto.aggregator.Task.serializeBinaryToWriter = function(message, writer) { var f = void 0; 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); + writer.writeString( + 1, + f + ); } - f = message.getSmartAccountAddress(); + f = message.getOwner(); if (f.length > 0) { - writer.writeString(3, f); - } - f = message.getTrigger(); - if (f != null) { - writer.writeMessage( - 4, - f, - proto.aggregator.TaskTrigger.serializeBinaryToWriter + writer.writeString( + 2, + f ); } - f = message.getNodesList(); + f = message.getSmartWalletAddress(); if (f.length > 0) { - writer.writeRepeatedMessage( - 5, - f, - proto.aggregator.TaskAction.serializeBinaryToWriter + writer.writeString( + 3, + f ); } f = message.getStartAt(); if (f !== 0) { - writer.writeInt64(6, f); + writer.writeInt64( + 4, + f + ); } f = message.getExpiredAt(); if (f !== 0) { - writer.writeInt64(7, f); + writer.writeInt64( + 5, + f + ); } f = message.getMemo(); if (f.length > 0) { - writer.writeString(8, f); + writer.writeString( + 6, + f + ); } f = message.getCompletedAt(); if (f !== 0) { - writer.writeInt64(9, f); + writer.writeInt64( + 7, + f + ); + } + f = message.getMaxExecution(); + if (f !== 0) { + writer.writeInt64( + 8, + f + ); } f = message.getStatus(); if (f !== 0) { - writer.writeEnum(10, f); + 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.getRepeatable(); - if (f) { - writer.writeBool(11, f); + f = message.getEdgesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 12, + f, + proto.aggregator.TaskEdge.serializeBinaryToWriter + ); } f = message.getExecutionsList(); if (f.length > 0) { writer.writeRepeatedMessage( - 12, + 13, f, proto.aggregator.Execution.serializeBinaryToWriter ); @@ -2876,18 +3398,12 @@ var init_avs_pb = __esm({ }; proto.aggregator.Task.prototype.getId = function() { return ( - /** @type{?proto.aggregator.UUID} */ - jspb.Message.getWrapperField(this, proto.aggregator.UUID, 1) + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") ); }; proto.aggregator.Task.prototype.setId = function(value) { - return jspb.Message.setWrapperField(this, 1, value); - }; - proto.aggregator.Task.prototype.clearId = function() { - return this.setId(void 0); - }; - proto.aggregator.Task.prototype.hasId = function() { - return jspb.Message.getField(this, 1) != null; + return jspb.Message.setProto3StringField(this, 1, value); }; proto.aggregator.Task.prototype.getOwner = function() { return ( @@ -2898,127 +3414,130 @@ var init_avs_pb = __esm({ proto.aggregator.Task.prototype.setOwner = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; - proto.aggregator.Task.prototype.getSmartAccountAddress = function() { + proto.aggregator.Task.prototype.getSmartWalletAddress = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 3, "") ); }; - proto.aggregator.Task.prototype.setSmartAccountAddress = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); - }; - proto.aggregator.Task.prototype.getTrigger = function() { - return ( - /** @type{?proto.aggregator.TaskTrigger} */ - jspb.Message.getWrapperField(this, proto.aggregator.TaskTrigger, 4) - ); - }; - proto.aggregator.Task.prototype.setTrigger = function(value) { - return jspb.Message.setWrapperField(this, 4, value); - }; - proto.aggregator.Task.prototype.clearTrigger = function() { - return this.setTrigger(void 0); - }; - proto.aggregator.Task.prototype.hasTrigger = function() { - return jspb.Message.getField(this, 4) != null; - }; - proto.aggregator.Task.prototype.getNodesList = function() { - return ( - /** @type{!Array} */ - jspb.Message.getRepeatedWrapperField(this, proto.aggregator.TaskAction, 5) - ); - }; - proto.aggregator.Task.prototype.setNodesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 5, value); - }; - 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.Task.prototype.clearNodesList = function() { - return this.setNodesList([]); + proto.aggregator.Task.prototype.setSmartWalletAddress = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); }; proto.aggregator.Task.prototype.getStartAt = function() { return ( /** @type {number} */ - jspb.Message.getFieldWithDefault(this, 6, 0) + jspb.Message.getFieldWithDefault(this, 4, 0) ); }; proto.aggregator.Task.prototype.setStartAt = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); + return jspb.Message.setProto3IntField(this, 4, value); }; proto.aggregator.Task.prototype.getExpiredAt = function() { return ( /** @type {number} */ - jspb.Message.getFieldWithDefault(this, 7, 0) + jspb.Message.getFieldWithDefault(this, 5, 0) ); }; proto.aggregator.Task.prototype.setExpiredAt = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); + return jspb.Message.setProto3IntField(this, 5, value); }; proto.aggregator.Task.prototype.getMemo = function() { return ( /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 8, "") + jspb.Message.getFieldWithDefault(this, 6, "") ); }; proto.aggregator.Task.prototype.setMemo = function(value) { - return jspb.Message.setProto3StringField(this, 8, value); + return jspb.Message.setProto3StringField(this, 6, value); }; proto.aggregator.Task.prototype.getCompletedAt = function() { return ( /** @type {number} */ - jspb.Message.getFieldWithDefault(this, 9, 0) + jspb.Message.getFieldWithDefault(this, 7, 0) ); }; proto.aggregator.Task.prototype.setCompletedAt = function(value) { - return jspb.Message.setProto3IntField(this, 9, value); + return jspb.Message.setProto3IntField(this, 7, value); + }; + proto.aggregator.Task.prototype.getMaxExecution = function() { + return ( + /** @type {number} */ + jspb.Message.getFieldWithDefault(this, 8, 0) + ); + }; + proto.aggregator.Task.prototype.setMaxExecution = function(value) { + return jspb.Message.setProto3IntField(this, 8, value); }; proto.aggregator.Task.prototype.getStatus = function() { return ( /** @type {!proto.aggregator.TaskStatus} */ - jspb.Message.getFieldWithDefault(this, 10, 0) + jspb.Message.getFieldWithDefault(this, 9, 0) ); }; proto.aggregator.Task.prototype.setStatus = function(value) { - return jspb.Message.setProto3EnumField(this, 10, value); + return jspb.Message.setProto3EnumField(this, 9, value); }; - proto.aggregator.Task.prototype.getRepeatable = function() { + proto.aggregator.Task.prototype.getTrigger = function() { return ( - /** @type {boolean} */ - jspb.Message.getBooleanFieldWithDefault(this, 11, false) + /** @type{?proto.aggregator.TaskTrigger} */ + jspb.Message.getWrapperField(this, proto.aggregator.TaskTrigger, 10) + ); + }; + proto.aggregator.Task.prototype.setTrigger = function(value) { + return jspb.Message.setWrapperField(this, 10, value); + }; + proto.aggregator.Task.prototype.clearTrigger = function() { + return this.setTrigger(void 0); + }; + proto.aggregator.Task.prototype.hasTrigger = function() { + return jspb.Message.getField(this, 10) != null; + }; + proto.aggregator.Task.prototype.getNodesList = function() { + return ( + /** @type{!Array} */ + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.TaskNode, 11) + ); + }; + proto.aggregator.Task.prototype.setNodesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 11, value); + }; + proto.aggregator.Task.prototype.addNodes = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 11, opt_value, proto.aggregator.TaskNode, opt_index); + }; + proto.aggregator.Task.prototype.clearNodesList = function() { + return this.setNodesList([]); + }; + proto.aggregator.Task.prototype.getEdgesList = function() { + return ( + /** @type{!Array} */ + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.TaskEdge, 12) ); }; - proto.aggregator.Task.prototype.setRepeatable = function(value) { - return jspb.Message.setProto3BooleanField(this, 11, value); + proto.aggregator.Task.prototype.setEdgesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 12, value); + }; + proto.aggregator.Task.prototype.addEdges = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 12, opt_value, proto.aggregator.TaskEdge, opt_index); + }; + proto.aggregator.Task.prototype.clearEdgesList = function() { + return this.setEdgesList([]); }; proto.aggregator.Task.prototype.getExecutionsList = function() { return ( /** @type{!Array} */ - jspb.Message.getRepeatedWrapperField(this, proto.aggregator.Execution, 12) + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.Execution, 13) ); }; proto.aggregator.Task.prototype.setExecutionsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 12, value); + return jspb.Message.setRepeatedWrapperField(this, 13, value); }; proto.aggregator.Task.prototype.addExecutions = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField( - this, - 12, - opt_value, - proto.aggregator.Execution, - opt_index - ); + return jspb.Message.addToRepeatedWrapperField(this, 13, opt_value, proto.aggregator.Execution, opt_index); }; proto.aggregator.Task.prototype.clearExecutionsList = function() { return this.setExecutionsList([]); }; - proto.aggregator.CreateTaskReq.repeatedFields_ = [2]; + proto.aggregator.CreateTaskReq.repeatedFields_ = [7, 8]; if (jspb.Message.GENERATE_TO_OBJECT) { proto.aggregator.CreateTaskReq.prototype.toObject = function(opt_includeInstance) { return proto.aggregator.CreateTaskReq.toObject(opt_includeInstance, this); @@ -3026,15 +3545,21 @@ var init_avs_pb = __esm({ proto.aggregator.CreateTaskReq.toObject = function(includeInstance, msg) { var f, obj = { trigger: (f = msg.getTrigger()) && proto.aggregator.TaskTrigger.toObject(includeInstance, f), - actionsList: jspb.Message.toObjectList( - msg.getActionsList(), - proto.aggregator.TaskAction.toObject, + 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.TaskNode.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) + edgesList: jspb.Message.toObjectList( + msg.getEdgesList(), + proto.aggregator.TaskEdge.toObject, + includeInstance + ) }; if (includeInstance) { obj.$jspbMessageInstance = msg; @@ -3045,10 +3570,7 @@ var init_avs_pb = __esm({ proto.aggregator.CreateTaskReq.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.aggregator.CreateTaskReq(); - return proto.aggregator.CreateTaskReq.deserializeBinaryFromReader( - msg, - reader - ); + return proto.aggregator.CreateTaskReq.deserializeBinaryFromReader(msg, reader); }; proto.aggregator.CreateTaskReq.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { @@ -3059,47 +3581,53 @@ var init_avs_pb = __esm({ switch (field) { case 1: var value = new proto.aggregator.TaskTrigger(); - reader.readMessage( - value, - proto.aggregator.TaskTrigger.deserializeBinaryFromReader - ); + 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 + var value = ( + /** @type {number} */ + reader.readInt64() ); - msg.addActions(value); + msg.setStartAt(value); break; case 3: var value = ( /** @type {number} */ reader.readInt64() ); - msg.setStartAt(value); + msg.setExpiredAt(value); break; case 4: var value = ( /** @type {number} */ reader.readInt64() ); - msg.setExpiredAt(value); + msg.setMaxExecution(value); break; case 5: var value = ( /** @type {string} */ reader.readString() ); - msg.setMemo(value); + msg.setSmartWalletAddress(value); break; case 6: var value = ( - /** @type {boolean} */ - reader.readBool() + /** @type {string} */ + reader.readString() ); - msg.setRepeatable(value); + msg.setMemo(value); + break; + case 7: + var value = new proto.aggregator.TaskNode(); + reader.readMessage(value, proto.aggregator.TaskNode.deserializeBinaryFromReader); + msg.addNodes(value); + break; + case 8: + var value = new proto.aggregator.TaskEdge(); + reader.readMessage(value, proto.aggregator.TaskEdge.deserializeBinaryFromReader); + msg.addEdges(value); break; default: reader.skipField(); @@ -3123,29 +3651,56 @@ var init_avs_pb = __esm({ proto.aggregator.TaskTrigger.serializeBinaryToWriter ); } - f = message.getActionsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( + f = message.getStartAt(); + if (f !== 0) { + writer.writeInt64( 2, - f, - proto.aggregator.TaskAction.serializeBinaryToWriter + f ); } - f = message.getStartAt(); + f = message.getExpiredAt(); if (f !== 0) { - writer.writeInt64(3, f); + writer.writeInt64( + 3, + f + ); } - f = message.getExpiredAt(); + f = message.getMaxExecution(); if (f !== 0) { - writer.writeInt64(4, f); + writer.writeInt64( + 4, + f + ); + } + f = message.getSmartWalletAddress(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); } f = message.getMemo(); if (f.length > 0) { - writer.writeString(5, f); + writer.writeString( + 6, + f + ); + } + f = message.getNodesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 7, + f, + proto.aggregator.TaskNode.serializeBinaryToWriter + ); } - f = message.getRepeatable(); - if (f) { - writer.writeBool(6, f); + f = message.getEdgesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 8, + f, + proto.aggregator.TaskEdge.serializeBinaryToWriter + ); } }; proto.aggregator.CreateTaskReq.prototype.getTrigger = function() { @@ -3163,62 +3718,80 @@ var init_avs_pb = __esm({ proto.aggregator.CreateTaskReq.prototype.hasTrigger = function() { return jspb.Message.getField(this, 1) != null; }; - proto.aggregator.CreateTaskReq.prototype.getActionsList = function() { + proto.aggregator.CreateTaskReq.prototype.getStartAt = function() { return ( - /** @type{!Array} */ - jspb.Message.getRepeatedWrapperField(this, proto.aggregator.TaskAction, 2) - ); - }; - proto.aggregator.CreateTaskReq.prototype.setActionsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); - }; - proto.aggregator.CreateTaskReq.prototype.addActions = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField( - this, - 2, - opt_value, - proto.aggregator.TaskAction, - opt_index + /** @type {number} */ + jspb.Message.getFieldWithDefault(this, 2, 0) ); }; - proto.aggregator.CreateTaskReq.prototype.clearActionsList = function() { - return this.setActionsList([]); + proto.aggregator.CreateTaskReq.prototype.setStartAt = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; - proto.aggregator.CreateTaskReq.prototype.getStartAt = function() { + proto.aggregator.CreateTaskReq.prototype.getExpiredAt = function() { return ( /** @type {number} */ jspb.Message.getFieldWithDefault(this, 3, 0) ); }; - proto.aggregator.CreateTaskReq.prototype.setStartAt = function(value) { + proto.aggregator.CreateTaskReq.prototype.setExpiredAt = function(value) { return jspb.Message.setProto3IntField(this, 3, value); }; - proto.aggregator.CreateTaskReq.prototype.getExpiredAt = function() { + proto.aggregator.CreateTaskReq.prototype.getMaxExecution = function() { return ( /** @type {number} */ jspb.Message.getFieldWithDefault(this, 4, 0) ); }; - proto.aggregator.CreateTaskReq.prototype.setExpiredAt = function(value) { + proto.aggregator.CreateTaskReq.prototype.setMaxExecution = function(value) { return jspb.Message.setProto3IntField(this, 4, value); }; - proto.aggregator.CreateTaskReq.prototype.getMemo = function() { + proto.aggregator.CreateTaskReq.prototype.getSmartWalletAddress = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 5, "") ); }; - proto.aggregator.CreateTaskReq.prototype.setMemo = function(value) { + proto.aggregator.CreateTaskReq.prototype.setSmartWalletAddress = function(value) { return jspb.Message.setProto3StringField(this, 5, value); }; - proto.aggregator.CreateTaskReq.prototype.getRepeatable = function() { + proto.aggregator.CreateTaskReq.prototype.getMemo = function() { return ( - /** @type {boolean} */ - jspb.Message.getBooleanFieldWithDefault(this, 6, false) + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 6, "") + ); + }; + proto.aggregator.CreateTaskReq.prototype.setMemo = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); + }; + proto.aggregator.CreateTaskReq.prototype.getNodesList = function() { + return ( + /** @type{!Array} */ + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.TaskNode, 7) + ); + }; + proto.aggregator.CreateTaskReq.prototype.setNodesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 7, value); + }; + proto.aggregator.CreateTaskReq.prototype.addNodes = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.aggregator.TaskNode, opt_index); + }; + proto.aggregator.CreateTaskReq.prototype.clearNodesList = function() { + return this.setNodesList([]); + }; + proto.aggregator.CreateTaskReq.prototype.getEdgesList = function() { + return ( + /** @type{!Array} */ + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.TaskEdge, 8) ); }; - proto.aggregator.CreateTaskReq.prototype.setRepeatable = function(value) { - return jspb.Message.setProto3BooleanField(this, 6, value); + proto.aggregator.CreateTaskReq.prototype.setEdgesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 8, value); + }; + proto.aggregator.CreateTaskReq.prototype.addEdges = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 8, opt_value, proto.aggregator.TaskEdge, opt_index); + }; + proto.aggregator.CreateTaskReq.prototype.clearEdgesList = function() { + return this.setEdgesList([]); }; if (jspb.Message.GENERATE_TO_OBJECT) { proto.aggregator.CreateTaskResp.prototype.toObject = function(opt_includeInstance) { @@ -3237,10 +3810,7 @@ var init_avs_pb = __esm({ proto.aggregator.CreateTaskResp.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.aggregator.CreateTaskResp(); - return proto.aggregator.CreateTaskResp.deserializeBinaryFromReader( - msg, - reader - ); + return proto.aggregator.CreateTaskResp.deserializeBinaryFromReader(msg, reader); }; proto.aggregator.CreateTaskResp.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { @@ -3272,7 +3842,10 @@ var init_avs_pb = __esm({ var f = void 0; f = message.getId(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } }; proto.aggregator.CreateTaskResp.prototype.getId = function() { @@ -3333,7 +3906,10 @@ var init_avs_pb = __esm({ var f = void 0; f = message.getOwner(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } }; proto.aggregator.NonceRequest.prototype.getOwner = function() { @@ -3394,7 +3970,10 @@ var init_avs_pb = __esm({ var f = void 0; f = message.getNonce(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } }; proto.aggregator.NonceResp.prototype.getNonce = function() { @@ -3407,12 +3986,13 @@ var init_avs_pb = __esm({ return jspb.Message.setProto3StringField(this, 1, value); }; if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.AddressRequest.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.AddressRequest.toObject(opt_includeInstance, this); + proto.aggregator.ListWalletReq.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ListWalletReq.toObject(opt_includeInstance, this); }; - proto.aggregator.AddressRequest.toObject = function(includeInstance, msg) { + proto.aggregator.ListWalletReq.toObject = function(includeInstance, msg) { var f, obj = { - owner: jspb.Message.getFieldWithDefault(msg, 1, "") + factory: jspb.Message.getFieldWithDefault(msg, 1, ""), + salt: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { obj.$jspbMessageInstance = msg; @@ -3420,15 +4000,12 @@ var init_avs_pb = __esm({ return obj; }; } - proto.aggregator.AddressRequest.deserializeBinary = function(bytes) { + proto.aggregator.ListWalletReq.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.ListWalletReq(); + return proto.aggregator.ListWalletReq.deserializeBinaryFromReader(msg, reader); }; - proto.aggregator.AddressRequest.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.ListWalletReq.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3440,7 +4017,14 @@ var init_avs_pb = __esm({ /** @type {string} */ reader.readString() ); - msg.setOwner(value); + msg.setFactory(value); + break; + case 2: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setSalt(value); break; default: reader.skipField(); @@ -3449,35 +4033,55 @@ var init_avs_pb = __esm({ } return msg; }; - proto.aggregator.AddressRequest.prototype.serializeBinary = function() { + proto.aggregator.ListWalletReq.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.AddressRequest.serializeBinaryToWriter(this, writer); + proto.aggregator.ListWalletReq.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; - proto.aggregator.AddressRequest.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.ListWalletReq.serializeBinaryToWriter = function(message, writer) { var f = void 0; - f = message.getOwner(); + f = message.getFactory(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSalt(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 2, + f + ); } }; - proto.aggregator.AddressRequest.prototype.getOwner = function() { + proto.aggregator.ListWalletReq.prototype.getFactory = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 1, "") ); }; - proto.aggregator.AddressRequest.prototype.setOwner = function(value) { + proto.aggregator.ListWalletReq.prototype.setFactory = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; + proto.aggregator.ListWalletReq.prototype.getSalt = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 2, "") + ); + }; + proto.aggregator.ListWalletReq.prototype.setSalt = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); + }; if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.AddressResp.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.AddressResp.toObject(opt_includeInstance, this); + proto.aggregator.SmartWallet.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.SmartWallet.toObject(opt_includeInstance, this); }; - proto.aggregator.AddressResp.toObject = function(includeInstance, msg) { + proto.aggregator.SmartWallet.toObject = function(includeInstance, msg) { var f, obj = { - smartAccountAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), - nonce: jspb.Message.getFieldWithDefault(msg, 2, "") + address: jspb.Message.getFieldWithDefault(msg, 1, ""), + salt: jspb.Message.getFieldWithDefault(msg, 2, ""), + factory: jspb.Message.getFieldWithDefault(msg, 3, "") }; if (includeInstance) { obj.$jspbMessageInstance = msg; @@ -3485,12 +4089,12 @@ var init_avs_pb = __esm({ return obj; }; } - proto.aggregator.AddressResp.deserializeBinary = function(bytes) { + proto.aggregator.SmartWallet.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.AddressResp(); - return proto.aggregator.AddressResp.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.SmartWallet(); + return proto.aggregator.SmartWallet.deserializeBinaryFromReader(msg, reader); }; - proto.aggregator.AddressResp.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.SmartWallet.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3502,14 +4106,21 @@ var init_avs_pb = __esm({ /** @type {string} */ reader.readString() ); - msg.setSmartAccountAddress(value); + msg.setAddress(value); break; case 2: var value = ( /** @type {string} */ reader.readString() ); - msg.setNonce(value); + msg.setSalt(value); + break; + case 3: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setFactory(value); break; default: reader.skipField(); @@ -3518,46 +4129,144 @@ var init_avs_pb = __esm({ } return msg; }; - proto.aggregator.AddressResp.prototype.serializeBinary = function() { + proto.aggregator.SmartWallet.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.AddressResp.serializeBinaryToWriter(this, writer); + proto.aggregator.SmartWallet.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; - proto.aggregator.AddressResp.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.SmartWallet.serializeBinaryToWriter = function(message, writer) { var f = void 0; - f = message.getSmartAccountAddress(); + f = message.getAddress(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } - f = message.getNonce(); + f = message.getSalt(); if (f.length > 0) { - writer.writeString(2, f); + writer.writeString( + 2, + f + ); + } + f = message.getFactory(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); } }; - proto.aggregator.AddressResp.prototype.getSmartAccountAddress = function() { + proto.aggregator.SmartWallet.prototype.getAddress = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 1, "") ); }; - proto.aggregator.AddressResp.prototype.setSmartAccountAddress = function(value) { + proto.aggregator.SmartWallet.prototype.setAddress = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; - proto.aggregator.AddressResp.prototype.getNonce = function() { + proto.aggregator.SmartWallet.prototype.getSalt = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 2, "") ); }; - proto.aggregator.AddressResp.prototype.setNonce = function(value) { + proto.aggregator.SmartWallet.prototype.setSalt = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; + proto.aggregator.SmartWallet.prototype.getFactory = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 3, "") + ); + }; + proto.aggregator.SmartWallet.prototype.setFactory = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); + }; + proto.aggregator.ListWalletResp.repeatedFields_ = [1]; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.ListWalletResp.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ListWalletResp.toObject(opt_includeInstance, this); + }; + proto.aggregator.ListWalletResp.toObject = function(includeInstance, msg) { + var f, obj = { + walletsList: jspb.Message.toObjectList( + msg.getWalletsList(), + proto.aggregator.SmartWallet.toObject, + includeInstance + ) + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.ListWalletResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.ListWalletResp(); + return proto.aggregator.ListWalletResp.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.ListWalletResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.aggregator.SmartWallet(); + reader.readMessage(value, proto.aggregator.SmartWallet.deserializeBinaryFromReader); + msg.addWallets(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.ListWalletResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.ListWalletResp.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.ListWalletResp.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getWalletsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.aggregator.SmartWallet.serializeBinaryToWriter + ); + } + }; + proto.aggregator.ListWalletResp.prototype.getWalletsList = function() { + return ( + /** @type{!Array} */ + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.SmartWallet, 1) + ); + }; + proto.aggregator.ListWalletResp.prototype.setWalletsList = function(value) { + return jspb.Message.setRepeatedWrapperField(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); + }; + proto.aggregator.ListWalletResp.prototype.clearWalletsList = function() { + return this.setWalletsList([]); + }; if (jspb.Message.GENERATE_TO_OBJECT) { proto.aggregator.ListTasksReq.prototype.toObject = function(opt_includeInstance) { return proto.aggregator.ListTasksReq.toObject(opt_includeInstance, this); }; proto.aggregator.ListTasksReq.toObject = function(includeInstance, msg) { - var f, obj = {}; + var f, obj = { + smartWalletAddress: jspb.Message.getFieldWithDefault(msg, 1, "") + }; if (includeInstance) { obj.$jspbMessageInstance = msg; } @@ -3576,6 +4285,13 @@ var init_avs_pb = __esm({ } var field = reader.getFieldNumber(); switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setSmartWalletAddress(value); + break; default: reader.skipField(); break; @@ -3588,8 +4304,24 @@ var init_avs_pb = __esm({ proto.aggregator.ListTasksReq.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; - proto.aggregator.ListTasksReq.serializeBinaryToWriter = function(message, writer) { - var f = void 0; + proto.aggregator.ListTasksReq.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getSmartWalletAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + }; + proto.aggregator.ListTasksReq.prototype.getSmartWalletAddress = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.ListTasksReq.prototype.setSmartWalletAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; proto.aggregator.ListTasksResp.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { @@ -3600,7 +4332,7 @@ var init_avs_pb = __esm({ var f, obj = { tasksList: jspb.Message.toObjectList( msg.getTasksList(), - proto.aggregator.ListTasksResp.TaskItemResp.toObject, + proto.aggregator.Task.toObject, includeInstance ) }; @@ -3613,10 +4345,7 @@ var init_avs_pb = __esm({ 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 - ); + return proto.aggregator.ListTasksResp.deserializeBinaryFromReader(msg, reader); }; proto.aggregator.ListTasksResp.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { @@ -3626,11 +4355,8 @@ var init_avs_pb = __esm({ var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.aggregator.ListTasksResp.TaskItemResp(); - reader.readMessage( - value, - proto.aggregator.ListTasksResp.TaskItemResp.deserializeBinaryFromReader - ); + var value = new proto.aggregator.Task(); + reader.readMessage(value, proto.aggregator.Task.deserializeBinaryFromReader); msg.addTasks(value); break; default: @@ -3652,122 +4378,21 @@ var init_avs_pb = __esm({ writer.writeRepeatedMessage( 1, f, - proto.aggregator.ListTasksResp.TaskItemResp.serializeBinaryToWriter - ); - } - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.ListTasksResp.TaskItemResp.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.ListTasksResp.TaskItemResp.toObject( - opt_includeInstance, - this + proto.aggregator.Task.serializeBinaryToWriter ); - }; - proto.aggregator.ListTasksResp.TaskItemResp.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, ""), - status: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.ListTasksResp.TaskItemResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ListTasksResp.TaskItemResp(); - return proto.aggregator.ListTasksResp.TaskItemResp.deserializeBinaryFromReader( - msg, - reader - ); - }; - proto.aggregator.ListTasksResp.TaskItemResp.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 {!proto.aggregator.TaskStatus} */ - reader.readEnum() - ); - msg.setStatus(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.ListTasksResp.TaskItemResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.ListTasksResp.TaskItemResp.serializeBinaryToWriter( - this, - writer - ); - return writer.getResultBuffer(); - }; - proto.aggregator.ListTasksResp.TaskItemResp.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getId(); - if (f.length > 0) { - writer.writeString(1, f); } - f = message.getStatus(); - if (f !== 0) { - writer.writeEnum(2, f); - } - }; - proto.aggregator.ListTasksResp.TaskItemResp.prototype.getId = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.ListTasksResp.TaskItemResp.prototype.setId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.ListTasksResp.TaskItemResp.prototype.getStatus = function() { - return ( - /** @type {!proto.aggregator.TaskStatus} */ - jspb.Message.getFieldWithDefault(this, 2, 0) - ); - }; - proto.aggregator.ListTasksResp.TaskItemResp.prototype.setStatus = function(value) { - return jspb.Message.setProto3EnumField(this, 2, value); }; proto.aggregator.ListTasksResp.prototype.getTasksList = function() { return ( - /** @type{!Array} */ - jspb.Message.getRepeatedWrapperField( - this, - proto.aggregator.ListTasksResp.TaskItemResp, - 1 - ) + /** @type{!Array} */ + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.Task, 1) ); }; proto.aggregator.ListTasksResp.prototype.setTasksList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 1, value); }; proto.aggregator.ListTasksResp.prototype.addTasks = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField( - this, - 1, - opt_value, - proto.aggregator.ListTasksResp.TaskItemResp, - opt_index - ); + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.aggregator.Task, opt_index); }; proto.aggregator.ListTasksResp.prototype.clearTasksList = function() { return this.setTasksList([]); @@ -3837,15 +4462,24 @@ var init_avs_pb = __esm({ var f = void 0; f = message.getOwner(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } f = message.getExpiredAt(); if (f !== 0) { - writer.writeInt64(2, f); + writer.writeInt64( + 2, + f + ); } f = message.getSignature(); if (f.length > 0) { - writer.writeString(3, f); + writer.writeString( + 3, + f + ); } }; proto.aggregator.GetKeyReq.prototype.getOwner = function() { @@ -3924,7 +4558,10 @@ var init_avs_pb = __esm({ var f = void 0; f = message.getKey(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } }; proto.aggregator.KeyResp.prototype.getKey = function() { @@ -3941,11 +4578,197 @@ var init_avs_pb = __esm({ proto.aggregator.UpdateChecksReq.prototype.toObject = function(opt_includeInstance) { return proto.aggregator.UpdateChecksReq.toObject(opt_includeInstance, this); }; - proto.aggregator.UpdateChecksReq.toObject = function(includeInstance, msg) { + proto.aggregator.UpdateChecksReq.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 ? void 0 : f + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.UpdateChecksReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.UpdateChecksReq(); + return proto.aggregator.UpdateChecksReq.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.UpdateChecksReq.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setAddress(value); + break; + case 2: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setSignature(value); + break; + case 3: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.addId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.UpdateChecksReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.UpdateChecksReq.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.UpdateChecksReq.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSignature(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getIdList(); + if (f.length > 0) { + writer.writeRepeatedString( + 3, + f + ); + } + }; + proto.aggregator.UpdateChecksReq.prototype.getAddress = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.UpdateChecksReq.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + proto.aggregator.UpdateChecksReq.prototype.getSignature = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 2, "") + ); + }; + proto.aggregator.UpdateChecksReq.prototype.setSignature = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); + }; + proto.aggregator.UpdateChecksReq.prototype.getIdList = function() { + return ( + /** @type {!Array} */ + jspb.Message.getRepeatedField(this, 3) + ); + }; + proto.aggregator.UpdateChecksReq.prototype.setIdList = function(value) { + return jspb.Message.setField(this, 3, value || []); + }; + proto.aggregator.UpdateChecksReq.prototype.addId = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 3, value, opt_index); + }; + proto.aggregator.UpdateChecksReq.prototype.clearIdList = function() { + return this.setIdList([]); + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.UpdateChecksResp.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.UpdateChecksResp.toObject(opt_includeInstance, this); + }; + proto.aggregator.UpdateChecksResp.toObject = function(includeInstance, msg) { + var f, obj = { + updatedAt: (f = msg.getUpdatedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.UpdateChecksResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.UpdateChecksResp(); + return proto.aggregator.UpdateChecksResp.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.UpdateChecksResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + 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); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.UpdateChecksResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.UpdateChecksResp.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.UpdateChecksResp.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getUpdatedAt(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + }; + proto.aggregator.UpdateChecksResp.prototype.getUpdatedAt = function() { + return ( + /** @type{?proto.google.protobuf.Timestamp} */ + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 1) + ); + }; + proto.aggregator.UpdateChecksResp.prototype.setUpdatedAt = function(value) { + return jspb.Message.setWrapperField(this, 1, value); + }; + proto.aggregator.UpdateChecksResp.prototype.clearUpdatedAt = function() { + return this.setUpdatedAt(void 0); + }; + proto.aggregator.UpdateChecksResp.prototype.hasUpdatedAt = function() { + return jspb.Message.getField(this, 1) != null; + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.CreateWalletReq.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.CreateWalletReq.toObject(opt_includeInstance, this); + }; + 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 ? void 0 : f + salt: jspb.Message.getFieldWithDefault(msg, 1, ""), + factoryAddress: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { obj.$jspbMessageInstance = msg; @@ -3953,15 +4776,12 @@ var init_avs_pb = __esm({ return obj; }; } - 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); }; - proto.aggregator.UpdateChecksReq.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.CreateWalletReq.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3973,21 +4793,14 @@ var init_avs_pb = __esm({ /** @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(); @@ -3996,69 +4809,55 @@ var init_avs_pb = __esm({ } return msg; }; - 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(); }; - proto.aggregator.UpdateChecksReq.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.CreateWalletReq.serializeBinaryToWriter = function(message, writer) { var f = void 0; - f = message.getAddress(); - if (f.length > 0) { - writer.writeString(1, f); - } - f = message.getSignature(); + f = message.getSalt(); if (f.length > 0) { - writer.writeString(2, f); + writer.writeString( + 1, + f + ); } - f = message.getIdList(); + f = message.getFactoryAddress(); if (f.length > 0) { - writer.writeRepeatedString(3, f); + writer.writeString( + 2, + f + ); } }; - proto.aggregator.UpdateChecksReq.prototype.getAddress = function() { + proto.aggregator.CreateWalletReq.prototype.getSalt = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 1, "") ); }; - proto.aggregator.UpdateChecksReq.prototype.setAddress = function(value) { + proto.aggregator.CreateWalletReq.prototype.setSalt = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; - proto.aggregator.UpdateChecksReq.prototype.getSignature = function() { + proto.aggregator.CreateWalletReq.prototype.getFactoryAddress = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 2, "") ); }; - proto.aggregator.UpdateChecksReq.prototype.setSignature = function(value) { + proto.aggregator.CreateWalletReq.prototype.setFactoryAddress = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; - proto.aggregator.UpdateChecksReq.prototype.getIdList = function() { - return ( - /** @type {!Array} */ - jspb.Message.getRepeatedField(this, 3) - ); - }; - proto.aggregator.UpdateChecksReq.prototype.setIdList = function(value) { - return jspb.Message.setField(this, 3, value || []); - }; - proto.aggregator.UpdateChecksReq.prototype.addId = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 3, value, opt_index); - }; - proto.aggregator.UpdateChecksReq.prototype.clearIdList = function() { - return this.setIdList([]); - }; if (jspb.Message.GENERATE_TO_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); }; - 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) { obj.$jspbMessageInstance = msg; @@ -4066,15 +4865,12 @@ var init_avs_pb = __esm({ return obj; }; } - 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); }; - proto.aggregator.UpdateChecksResp.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.CreateWalletResp.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -4082,12 +4878,25 @@ var init_avs_pb = __esm({ 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 + var value = ( + /** @type {string} */ + reader.readString() ); - msg.setUpdatedAt(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.setFactoryAddress(value); break; default: reader.skipField(); @@ -4096,53 +4905,71 @@ var init_avs_pb = __esm({ } return msg; }; - 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(); }; - proto.aggregator.UpdateChecksResp.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.CreateWalletResp.serializeBinaryToWriter = function(message, writer) { var f = void 0; - 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 ); } }; - proto.aggregator.UpdateChecksResp.prototype.getUpdatedAt = function() { + proto.aggregator.CreateWalletResp.prototype.getAddress = function() { return ( - /** @type{?proto.google.protobuf.Timestamp} */ - jspb.Message.getWrapperField( - this, - google_protobuf_timestamp_pb.Timestamp, - 1 - ) + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") ); }; - proto.aggregator.UpdateChecksResp.prototype.setUpdatedAt = function(value) { - return jspb.Message.setWrapperField(this, 1, value); + proto.aggregator.CreateWalletResp.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; - proto.aggregator.UpdateChecksResp.prototype.clearUpdatedAt = function() { - return this.setUpdatedAt(void 0); + proto.aggregator.CreateWalletResp.prototype.getSalt = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 2, "") + ); }; - 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); }; - proto.aggregator.TriggerType = { - TIMETRIGGER: 0, - CONTRACTQUERYTRIGGER: 1, - EXPRESSIONTRIGGER: 2 + proto.aggregator.CreateWalletResp.prototype.getFactoryAddress = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 3, "") + ); }; - proto.aggregator.TaskType = { - ETHTRANSFERTASK: 0, - CONTRACTEXECUTIONTASK: 1, - GRAPHQLDATAQUERYTASK: 2, - HTTPAPICALLTASK: 3, - CUSTOMCODETASK: 4, - BRANCHACTIONTASK: 5 + proto.aggregator.CreateWalletResp.prototype.setFactoryAddress = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); + }; + proto.aggregator.Error = { + UNKNOWERROR: 0, + RPCNODEERROR: 1e3, + STORAGEUNAVAILABLE: 2e3, + STORAGEWRITEERROR: 2001, + SMARTWALLETRPCERROR: 6e3, + SMARTWALLETNOTFOUNDERROR: 6001, + TASKDATACORRUPTED: 7e3, + TASKDATAMISSINGERROR: 7001 }; proto.aggregator.TaskStatus = { ACTIVE: 0, @@ -4154,28 +4981,346 @@ var init_avs_pb = __esm({ proto.aggregator.CustomCodeType = { JAVASCRIPT: 0 }; - goog.object.extend(exports, proto.aggregator); - ({ - Task, - CreateTaskReq, - CreateTaskResp, - GetKeyReq, - KeyResp, - UpdateChecksReq, - UpdateChecksResp, - AddressResp, - AddressRequest, - ListTasksReq, - ListTasksResp, - TaskTrigger, - TriggerType, - ExpressionCondition, - TaskAction, - ActionType, - ContractExecution, - TaskType, - UUID - } = proto.aggregator); + goog.object.extend(exports2, proto.aggregator); + } +}); + +// grpc_codegen/avs_grpc_pb.js +var require_avs_grpc_pb = __commonJS({ + "grpc_codegen/avs_grpc_pb.js"(exports2) { + "use strict"; + var grpc2 = require("@grpc/grpc-js"); + var avs_pb3 = require_avs_pb(); + 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_Checkin(arg) { + if (!(arg instanceof avs_pb3.Checkin)) { + throw new Error("Expected argument of type aggregator.Checkin"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_Checkin(buffer_arg) { + return avs_pb3.Checkin.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_CheckinResp(arg) { + if (!(arg instanceof avs_pb3.CheckinResp)) { + throw new Error("Expected argument of type aggregator.CheckinResp"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_CheckinResp(buffer_arg) { + return avs_pb3.CheckinResp.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_CreateTaskReq(arg) { + if (!(arg instanceof avs_pb3.CreateTaskReq)) { + throw new Error("Expected argument of type aggregator.CreateTaskReq"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_CreateTaskReq(buffer_arg) { + return avs_pb3.CreateTaskReq.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_CreateTaskResp(arg) { + if (!(arg instanceof avs_pb3.CreateTaskResp)) { + throw new Error("Expected argument of type aggregator.CreateTaskResp"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_CreateTaskResp(buffer_arg) { + return avs_pb3.CreateTaskResp.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_CreateWalletReq(arg) { + if (!(arg instanceof avs_pb3.CreateWalletReq)) { + throw new Error("Expected argument of type aggregator.CreateWalletReq"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_CreateWalletReq(buffer_arg) { + return avs_pb3.CreateWalletReq.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_CreateWalletResp(arg) { + if (!(arg instanceof avs_pb3.CreateWalletResp)) { + throw new Error("Expected argument of type aggregator.CreateWalletResp"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_CreateWalletResp(buffer_arg) { + return avs_pb3.CreateWalletResp.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_GetKeyReq(arg) { + if (!(arg instanceof avs_pb3.GetKeyReq)) { + throw new Error("Expected argument of type aggregator.GetKeyReq"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_GetKeyReq(buffer_arg) { + return avs_pb3.GetKeyReq.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_IdReq(arg) { + if (!(arg instanceof avs_pb3.IdReq)) { + throw new Error("Expected argument of type aggregator.IdReq"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_IdReq(buffer_arg) { + return avs_pb3.IdReq.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_KeyResp(arg) { + if (!(arg instanceof avs_pb3.KeyResp)) { + throw new Error("Expected argument of type aggregator.KeyResp"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_KeyResp(buffer_arg) { + return avs_pb3.KeyResp.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_ListTasksReq(arg) { + if (!(arg instanceof avs_pb3.ListTasksReq)) { + throw new Error("Expected argument of type aggregator.ListTasksReq"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_ListTasksReq(buffer_arg) { + return avs_pb3.ListTasksReq.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_ListTasksResp(arg) { + if (!(arg instanceof avs_pb3.ListTasksResp)) { + throw new Error("Expected argument of type aggregator.ListTasksResp"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_ListTasksResp(buffer_arg) { + return avs_pb3.ListTasksResp.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_ListWalletReq(arg) { + if (!(arg instanceof avs_pb3.ListWalletReq)) { + throw new Error("Expected argument of type aggregator.ListWalletReq"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_ListWalletReq(buffer_arg) { + return avs_pb3.ListWalletReq.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_ListWalletResp(arg) { + if (!(arg instanceof avs_pb3.ListWalletResp)) { + throw new Error("Expected argument of type aggregator.ListWalletResp"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_ListWalletResp(buffer_arg) { + return avs_pb3.ListWalletResp.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_NonceRequest(arg) { + if (!(arg instanceof avs_pb3.NonceRequest)) { + throw new Error("Expected argument of type aggregator.NonceRequest"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_NonceRequest(buffer_arg) { + return avs_pb3.NonceRequest.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_NonceResp(arg) { + if (!(arg instanceof avs_pb3.NonceResp)) { + throw new Error("Expected argument of type aggregator.NonceResp"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_NonceResp(buffer_arg) { + return avs_pb3.NonceResp.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_SyncTasksReq(arg) { + if (!(arg instanceof avs_pb3.SyncTasksReq)) { + throw new Error("Expected argument of type aggregator.SyncTasksReq"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_SyncTasksReq(buffer_arg) { + return avs_pb3.SyncTasksReq.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_SyncTasksResp(arg) { + if (!(arg instanceof avs_pb3.SyncTasksResp)) { + throw new Error("Expected argument of type aggregator.SyncTasksResp"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_SyncTasksResp(buffer_arg) { + return avs_pb3.SyncTasksResp.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_Task(arg) { + if (!(arg instanceof avs_pb3.Task)) { + throw new Error("Expected argument of type aggregator.Task"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_Task(buffer_arg) { + return avs_pb3.Task.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_UpdateChecksReq(arg) { + if (!(arg instanceof avs_pb3.UpdateChecksReq)) { + throw new Error("Expected argument of type aggregator.UpdateChecksReq"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_UpdateChecksReq(buffer_arg) { + return avs_pb3.UpdateChecksReq.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_UpdateChecksResp(arg) { + if (!(arg instanceof avs_pb3.UpdateChecksResp)) { + throw new Error("Expected argument of type aggregator.UpdateChecksResp"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_UpdateChecksResp(buffer_arg) { + return avs_pb3.UpdateChecksResp.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_google_protobuf_BoolValue(arg) { + if (!(arg instanceof google_protobuf_wrappers_pb.BoolValue)) { + throw new Error("Expected argument of type google.protobuf.BoolValue"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_google_protobuf_BoolValue(buffer_arg) { + return google_protobuf_wrappers_pb.BoolValue.deserializeBinary(new Uint8Array(buffer_arg)); + } + var AggregatorService = exports2.AggregatorService = { + // Auth + getKey: { + path: "/aggregator.Aggregator/GetKey", + requestStream: false, + responseStream: false, + requestType: avs_pb3.GetKeyReq, + responseType: avs_pb3.KeyResp, + requestSerialize: serialize_aggregator_GetKeyReq, + requestDeserialize: deserialize_aggregator_GetKeyReq, + responseSerialize: serialize_aggregator_KeyResp, + responseDeserialize: deserialize_aggregator_KeyResp + }, + // Smart Acccount + getNonce: { + path: "/aggregator.Aggregator/GetNonce", + requestStream: false, + responseStream: false, + requestType: avs_pb3.NonceRequest, + responseType: avs_pb3.NonceResp, + requestSerialize: serialize_aggregator_NonceRequest, + requestDeserialize: deserialize_aggregator_NonceRequest, + responseSerialize: serialize_aggregator_NonceResp, + responseDeserialize: deserialize_aggregator_NonceResp + }, + createWallet: { + path: "/aggregator.Aggregator/CreateWallet", + requestStream: false, + responseStream: false, + requestType: avs_pb3.CreateWalletReq, + responseType: avs_pb3.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_pb3.ListWalletReq, + responseType: avs_pb3.ListWalletResp, + requestSerialize: serialize_aggregator_ListWalletReq, + requestDeserialize: deserialize_aggregator_ListWalletReq, + responseSerialize: serialize_aggregator_ListWalletResp, + responseDeserialize: deserialize_aggregator_ListWalletResp + }, + // Task Management + createTask: { + path: "/aggregator.Aggregator/CreateTask", + requestStream: false, + responseStream: false, + requestType: avs_pb3.CreateTaskReq, + responseType: avs_pb3.CreateTaskResp, + requestSerialize: serialize_aggregator_CreateTaskReq, + requestDeserialize: deserialize_aggregator_CreateTaskReq, + responseSerialize: serialize_aggregator_CreateTaskResp, + responseDeserialize: deserialize_aggregator_CreateTaskResp + }, + listTasks: { + path: "/aggregator.Aggregator/ListTasks", + requestStream: false, + responseStream: false, + requestType: avs_pb3.ListTasksReq, + responseType: avs_pb3.ListTasksResp, + requestSerialize: serialize_aggregator_ListTasksReq, + requestDeserialize: deserialize_aggregator_ListTasksReq, + responseSerialize: serialize_aggregator_ListTasksResp, + responseDeserialize: deserialize_aggregator_ListTasksResp + }, + getTask: { + path: "/aggregator.Aggregator/GetTask", + requestStream: false, + responseStream: false, + requestType: avs_pb3.IdReq, + responseType: avs_pb3.Task, + requestSerialize: serialize_aggregator_IdReq, + requestDeserialize: deserialize_aggregator_IdReq, + responseSerialize: serialize_aggregator_Task, + responseDeserialize: deserialize_aggregator_Task + }, + cancelTask: { + path: "/aggregator.Aggregator/CancelTask", + requestStream: false, + responseStream: false, + requestType: avs_pb3.IdReq, + responseType: google_protobuf_wrappers_pb.BoolValue, + requestSerialize: serialize_aggregator_IdReq, + requestDeserialize: deserialize_aggregator_IdReq, + responseSerialize: serialize_google_protobuf_BoolValue, + responseDeserialize: deserialize_google_protobuf_BoolValue + }, + deleteTask: { + path: "/aggregator.Aggregator/DeleteTask", + requestStream: false, + responseStream: false, + requestType: avs_pb3.IdReq, + responseType: google_protobuf_wrappers_pb.BoolValue, + requestSerialize: serialize_aggregator_IdReq, + requestDeserialize: deserialize_aggregator_IdReq, + responseSerialize: serialize_google_protobuf_BoolValue, + responseDeserialize: deserialize_google_protobuf_BoolValue + }, + // Operator endpoint + ping: { + path: "/aggregator.Aggregator/Ping", + requestStream: false, + responseStream: false, + requestType: avs_pb3.Checkin, + responseType: avs_pb3.CheckinResp, + requestSerialize: serialize_aggregator_Checkin, + requestDeserialize: deserialize_aggregator_Checkin, + responseSerialize: serialize_aggregator_CheckinResp, + responseDeserialize: deserialize_aggregator_CheckinResp + }, + syncTasks: { + path: "/aggregator.Aggregator/SyncTasks", + requestStream: false, + responseStream: true, + requestType: avs_pb3.SyncTasksReq, + responseType: avs_pb3.SyncTasksResp, + requestSerialize: serialize_aggregator_SyncTasksReq, + requestDeserialize: deserialize_aggregator_SyncTasksReq, + responseSerialize: serialize_aggregator_SyncTasksResp, + responseDeserialize: deserialize_aggregator_SyncTasksResp + }, + updateChecks: { + path: "/aggregator.Aggregator/UpdateChecks", + requestStream: false, + responseStream: false, + requestType: avs_pb3.UpdateChecksReq, + responseType: avs_pb3.UpdateChecksResp, + requestSerialize: serialize_aggregator_UpdateChecksReq, + requestDeserialize: deserialize_aggregator_UpdateChecksReq, + responseSerialize: serialize_aggregator_UpdateChecksResp, + responseDeserialize: deserialize_aggregator_UpdateChecksResp + } + }; + exports2.AggregatorClient = grpc2.makeGenericClientConstructor(AggregatorService); } }); @@ -4188,8 +5333,7 @@ __export(src_exports, { }); module.exports = __toCommonJS(src_exports); var import_lodash = __toESM(require("lodash")); -var import_ethers = require("ethers"); -var grpc2 = __toESM(require("@grpc/grpc-js")); +var grpc = __toESM(require("@grpc/grpc-js")); var import_grpc_js = require("@grpc/grpc-js"); // src/auth.ts @@ -4197,352 +5341,245 @@ var getKeyRequestMessage = (address, expiredAt) => { return `key request for ${address} expired at ${expiredAt}`; }; -// grpc_codegen/avs_grpc_pb.js -var grpc = require("@grpc/grpc-js"); -var avs_pb = (init_avs_pb(), __toCommonJS(avs_pb_exports)); -var google_protobuf_timestamp_pb2 = require("google-protobuf/google/protobuf/timestamp_pb.js"); -var google_protobuf_wrappers_pb2 = 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"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_Checkin(buffer_arg) { - return avs_pb.Checkin.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_CheckinResp(arg) { - if (!(arg instanceof avs_pb.CheckinResp)) { - throw new Error("Expected argument of type aggregator.CheckinResp"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_CheckinResp(buffer_arg) { - return avs_pb.CheckinResp.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_CreateTaskReq(arg) { - if (!(arg instanceof avs_pb.CreateTaskReq)) { - throw new Error("Expected argument of type aggregator.CreateTaskReq"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_CreateTaskReq(buffer_arg) { - return avs_pb.CreateTaskReq.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_CreateTaskResp(arg) { - if (!(arg instanceof avs_pb.CreateTaskResp)) { - throw new Error("Expected argument of type aggregator.CreateTaskResp"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_CreateTaskResp(buffer_arg) { - return avs_pb.CreateTaskResp.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"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_GetKeyReq(buffer_arg) { - return avs_pb.GetKeyReq.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"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_KeyResp(buffer_arg) { - return avs_pb.KeyResp.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_ListTasksReq(arg) { - if (!(arg instanceof avs_pb.ListTasksReq)) { - throw new Error("Expected argument of type aggregator.ListTasksReq"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_ListTasksReq(buffer_arg) { - return avs_pb.ListTasksReq.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_ListTasksResp(arg) { - if (!(arg instanceof avs_pb.ListTasksResp)) { - throw new Error("Expected argument of type aggregator.ListTasksResp"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_ListTasksResp(buffer_arg) { - return avs_pb.ListTasksResp.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"); +// src/index.ts +var import_avs_grpc_pb = __toESM(require_avs_grpc_pb()); +var avs_pb2 = __toESM(require_avs_pb()); + +// src/builder.ts +var avs_pb = __toESM(require_avs_pb()); +var buildContractWrite = ({ contractAddress: contractAddress2, callData, contractABI }) => { + const n = new avs_pb.ContractWriteNode(); + n.setContractAddress(contractAddress2); + n.setCallData(callData); + if (contractABI) { + n.setContractAbi(contractABI); } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_NonceRequest(buffer_arg) { - return avs_pb.NonceRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_NonceResp(arg) { - if (!(arg instanceof avs_pb.NonceResp)) { - throw new Error("Expected argument of type aggregator.NonceResp"); + return n; +}; +var buildContractRead = ({ contract_ddress, callData, contractABI }) => { + const n = new avs_pb.ContractReadNode(); + n.setContractAddress(contractAddress); + n.setCallData(callData); + if (n.contractABI) { + n.setContractAbi(n.contractABI); } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_NonceResp(buffer_arg) { - return avs_pb.NonceResp.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_SyncTasksReq(arg) { - if (!(arg instanceof avs_pb.SyncTasksReq)) { - throw new Error("Expected argument of type aggregator.SyncTasksReq"); + return n; +}; +var buildGraphQL = ({ url, query, variables }) => { + const n = new avs_pb.GraphQLQueryNode(); + n.setUrl(url); + n.setQuery(query); + for (const [k, v] of Object.entries(variables || {})) { + n.getVariablesMap().set(k, v); } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_SyncTasksReq(buffer_arg) { - return avs_pb.SyncTasksReq.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_SyncTasksResp(arg) { - if (!(arg instanceof avs_pb.SyncTasksResp)) { - throw new Error("Expected argument of type aggregator.SyncTasksResp"); + return n; +}; +var buildRestAPI = ({ url, body, method, headers }) => { + const n = new avs_pb.RestAPINode(); + n.setUrl(url); + n.setBody(body); + n.setMethod(method); + for (const [k, v] of Object.entries(headers || {})) { + n.getHeadersMap().set(k, v); } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_SyncTasksResp(buffer_arg) { - return avs_pb.SyncTasksResp.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_Task(arg) { - if (!(arg instanceof avs_pb.Task)) { - throw new Error("Expected argument of type aggregator.Task"); + return n; +}; +var buildBranch = ({ conditions }) => { + const n = new avs_pb.BranchNode(); + for (const item of conditions) { + const condition = new avs_pb.Condition(); + condition.setId(item.id); + condition.setType(item.type); + condition.setExpression(item.expression); + n.addConditions(condition); } - return Buffer.from(arg.serializeBinary()); -} -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 n; +}; +var buildFilter = ({ expression }) => { + const n = new avs_pb.FilterNode(); + n.setExpression(expression); + return n; +}; +var buildTaskEdge = ({ id, source, target }) => { + const edge = new avs_pb.TaskEdge(); + edge.setId(id); + edge.setSource(source); + edge.setTarget(target); + return edge; +}; +var buildTaskNode = (node) => { + const n = new avs_pb.TaskNode(); + n.setId(node.id); + n.setName(node.name); + if (node.ethTransfer) { + const ethTransfer = new avs_pb.ETHTransferNode(); + ethTransfer.setDestination(node.ethTransfer.destination); + ethTransfer.setAmount(node.ethTransfer.amount); + n.setEthTransfer(ethTransfer); + } else if (node.contractWrite) { + n.setContractWrite(buildContractWrite(node.contractWrite)); + } else if (node.contractRead) { + n.setContractRead(buildContractRead(node.contractRead)); + } else if (node.graphqlDataQuery) { + n.setGraphqlDataQuery(buildGraphQL(node.graphqlDataQuery)); + } else if (node.restApi) { + n.setRestApi(buildRestAPI(node.restApi)); + } else if (node.branch) { + n.setBranch(buildBranch(node.branch)); + } else if (node["filter"]) { + n.setfilter(buildFilter(node["filter"])); + } else if (node.customCode) { + const code = new avs_pb.CustomCodeNode(); + code.setType(node.customCode.type); + n.setCustomCode(node.customCode); + } else { + throw new Error("missing task payload"); } - 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"); + return n; +}; +var buildTrigger = (payload) => { + const trigger = new avs_pb.TaskTrigger(); + for (const [key, value] of Object.entries(payload)) { + if (key == "manual") { + trigger.setManual(value); + return trigger; + } + if (key == "fixedTime") { + let schedule = new avs_pb.FixedEpochCondition(); + schedule.setEpochsList(value.epochs); + trigger.setFixedTime(schedule); + return trigger; + } + if (key == "cron") { + const cron = new avs_pb.CronCondition(); + cron.setScheduleList(value.schedule); + trigger.setCron(cron); + return trigger; + } + if (key == "block") { + const block = new avs_pb.BlockCondition(); + block.setInterval(value.interval); + trigger.setBlock(block); + return trigger; + } + if (key == "event") { + const event = new avs_pb.EventCondition(); + event.setExpression(payload.event.expression); + trigger.setEvent(event); + return trigger; + } + throw new Error("missing trigger"); } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_UpdateChecksReq(buffer_arg) { - return avs_pb.UpdateChecksReq.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_UpdateChecksResp(arg) { - if (!(arg instanceof avs_pb.UpdateChecksResp)) { - throw new Error("Expected argument of type aggregator.UpdateChecksResp"); +}; +var triggerFromGRPC = (trigger) => { + if (!trigger) { + return { triggerType: avs_pb.TaskTrigger.TriggerTypeCase.TRIGGER_TYPE_NOT_SET }; } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_UpdateChecksResp(buffer_arg) { - return avs_pb.UpdateChecksResp.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_google_protobuf_BoolValue(arg) { - if (!(arg instanceof google_protobuf_wrappers_pb2.BoolValue)) { - throw new Error("Expected argument of type google.protobuf.BoolValue"); + const base = { + triggerType: trigger.getTriggerTypeCase() + }; + switch (trigger.getTriggerTypeCase()) { + case avs_pb.TaskTrigger.TriggerTypeCase.MANUAL: + base.manual = trigger.getManual(); + break; + case avs_pb.TaskTrigger.TriggerTypeCase.FIXED_TIME: + base.fixedTime = { epochs: trigger.getFixedTime().getEpochsList() }; + break; + case avs_pb.TaskTrigger.TriggerTypeCase.CRON: + base.cron = { schedule: trigger.getCron().getScheduleList() }; + break; + case avs_pb.TaskTrigger.TriggerTypeCase.BLOCK: + base.block = { interval: trigger.getBlock().getInterval() }; + break; + case avs_pb.TaskTrigger.TriggerTypeCase.EVENT: + base.event = { expression: trigger.getEvent().getExpression() }; + break; } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_google_protobuf_BoolValue(buffer_arg) { - return google_protobuf_wrappers_pb2.BoolValue.deserializeBinary(new Uint8Array(buffer_arg)); -} -var AggregatorService = { - // Auth - getKey: { - path: "/aggregator.Aggregator/GetKey", - requestStream: false, - responseStream: false, - requestType: avs_pb.GetKeyReq, - responseType: avs_pb.KeyResp, - requestSerialize: serialize_aggregator_GetKeyReq, - requestDeserialize: deserialize_aggregator_GetKeyReq, - responseSerialize: serialize_aggregator_KeyResp, - responseDeserialize: deserialize_aggregator_KeyResp - }, - // Smart Acccount - getNonce: { - path: "/aggregator.Aggregator/GetNonce", - requestStream: false, - responseStream: false, - requestType: avs_pb.NonceRequest, - responseType: avs_pb.NonceResp, - requestSerialize: serialize_aggregator_NonceRequest, - requestDeserialize: deserialize_aggregator_NonceRequest, - responseSerialize: serialize_aggregator_NonceResp, - responseDeserialize: deserialize_aggregator_NonceResp - }, - getSmartAccountAddress: { - path: "/aggregator.Aggregator/GetSmartAccountAddress", - 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 - }, - // Task Management - createTask: { - path: "/aggregator.Aggregator/CreateTask", - requestStream: false, - responseStream: false, - requestType: avs_pb.CreateTaskReq, - responseType: avs_pb.CreateTaskResp, - requestSerialize: serialize_aggregator_CreateTaskReq, - requestDeserialize: deserialize_aggregator_CreateTaskReq, - responseSerialize: serialize_aggregator_CreateTaskResp, - responseDeserialize: deserialize_aggregator_CreateTaskResp - }, - listTasks: { - path: "/aggregator.Aggregator/ListTasks", - requestStream: false, - responseStream: false, - requestType: avs_pb.ListTasksReq, - responseType: avs_pb.ListTasksResp, - requestSerialize: serialize_aggregator_ListTasksReq, - requestDeserialize: deserialize_aggregator_ListTasksReq, - responseSerialize: serialize_aggregator_ListTasksResp, - responseDeserialize: deserialize_aggregator_ListTasksResp - }, - getTask: { - path: "/aggregator.Aggregator/GetTask", - requestStream: false, - responseStream: false, - requestType: avs_pb.UUID, - responseType: avs_pb.Task, - requestSerialize: serialize_aggregator_UUID, - requestDeserialize: deserialize_aggregator_UUID, - responseSerialize: serialize_aggregator_Task, - responseDeserialize: deserialize_aggregator_Task - }, - cancelTask: { - path: "/aggregator.Aggregator/CancelTask", - requestStream: false, - responseStream: false, - requestType: avs_pb.UUID, - responseType: google_protobuf_wrappers_pb2.BoolValue, - requestSerialize: serialize_aggregator_UUID, - requestDeserialize: deserialize_aggregator_UUID, - responseSerialize: serialize_google_protobuf_BoolValue, - responseDeserialize: deserialize_google_protobuf_BoolValue - }, - deleteTask: { - path: "/aggregator.Aggregator/DeleteTask", - requestStream: false, - responseStream: false, - requestType: avs_pb.UUID, - responseType: google_protobuf_wrappers_pb2.BoolValue, - requestSerialize: serialize_aggregator_UUID, - requestDeserialize: deserialize_aggregator_UUID, - responseSerialize: serialize_google_protobuf_BoolValue, - responseDeserialize: deserialize_google_protobuf_BoolValue - }, - // Operator endpoint - ping: { - path: "/aggregator.Aggregator/Ping", - requestStream: false, - responseStream: false, - requestType: avs_pb.Checkin, - responseType: avs_pb.CheckinResp, - requestSerialize: serialize_aggregator_Checkin, - requestDeserialize: deserialize_aggregator_Checkin, - responseSerialize: serialize_aggregator_CheckinResp, - responseDeserialize: deserialize_aggregator_CheckinResp - }, - syncTasks: { - path: "/aggregator.Aggregator/SyncTasks", - requestStream: false, - responseStream: true, - requestType: avs_pb.SyncTasksReq, - responseType: avs_pb.SyncTasksResp, - requestSerialize: serialize_aggregator_SyncTasksReq, - requestDeserialize: deserialize_aggregator_SyncTasksReq, - responseSerialize: serialize_aggregator_SyncTasksResp, - responseDeserialize: deserialize_aggregator_SyncTasksResp - }, - updateChecks: { - path: "/aggregator.Aggregator/UpdateChecks", - requestStream: false, - responseStream: false, - requestType: avs_pb.UpdateChecksReq, - responseType: avs_pb.UpdateChecksResp, - requestSerialize: serialize_aggregator_UpdateChecksReq, - requestDeserialize: deserialize_aggregator_UpdateChecksReq, - responseSerialize: serialize_aggregator_UpdateChecksResp, - responseDeserialize: deserialize_aggregator_UpdateChecksResp + return base; +}; +var nodeFromGRPC = (node) => { + const base = node.toObject(); + const standarize = { + taskType: node.getTaskTypeCase() + }; + switch (node.getTaskTypeCase()) { + case avs_pb.TaskNode.TaskTypeCase.ETH_TRANSFER: + standarize.ethTransfer = base.ethTransfer; + break; + case avs_pb.TaskNode.TaskTypeCase.CONTRACT_WRITE: + standarize.contractWrite = base.contractWrite; + break; + case avs_pb.TaskNode.TaskTypeCase.CONTRACT_READ: + standarize.contractRead = base.contractRead; + break; + case avs_pb.TaskNode.TaskTypeCase.GRAPHQL_DATA_QUERY: + standarize.graphqlDataQuery = base.graphqlDataQuery; + break; + case avs_pb.TaskNode.TaskTypeCase.REST_API: + standarize.restApi = base.restApi; + break; + case avs_pb.TaskNode.TaskTypeCase.BRANCH: + standarize.branch = { + conditions: base.branch.conditionsList + }; + break; + case avs_pb.TaskNode.TaskTypeCase.FILTER: + standarize.filter = base.filter; + break; + case avs_pb.TaskNode.TaskTypeCase.LOOP: + standarize.loop = base.loop; + break; + case avs_pb.TaskNode.TaskTypeCase.CUSTOM_CODE: + standarize.custom_code = base.custom_code; + break; } + return standarize; +}; +var taskEdgeFromGRPC = (edge) => { + return { + id: edge.getId(), + source: edge.getSource(), + target: edge.getTarget() + }; }; -var AggregatorClient = grpc.makeGenericClientConstructor(AggregatorService); - -// src/index.ts -init_avs_pb(); - -// src/types.ts -var AUTH_KEY_HEADER = "authKey"; // src/task.ts -var Task2 = class { - // Add other missing properties here +var Task = class { constructor(task) { - this.id = task.getId()?.toString() || ""; - this.status = task.getStatus().toString(); + this.id = task.getId() || ""; + this.status = task.getStatus(); this.owner = task.getOwner(); - this.smartAccountAddress = task.getSmartAccountAddress(); - this.trigger = { - triggerType: task.getTrigger()?.getTriggerType() || 0, - schedule: task.getTrigger()?.getSchedule()?.toObject(), - contractQuery: task.getTrigger()?.getContractQuery()?.toObject(), - expression: task.getTrigger()?.getExpression()?.toObject() || { - expression: "" - } - }; - this.nodesList = task.getNodesList(); + this.smartWalletAddress = task.getSmartWalletAddress(); + this.nodes = task.getNodesList().map((node) => nodeFromGRPC(node)); + this.trigger = triggerFromGRPC(task.getTrigger()); + this.edges = task.getEdgesList().map((edge) => taskEdgeFromGRPC(edge)); this.startAt = task.getStartAt(); this.expiredAt = task.getExpiredAt(); this.memo = task.getMemo(); this.completedAt = task.getCompletedAt(); this.status = task.getStatus(); - this.repeatable = task.getRepeatable(); - this.executionsList = task.getExecutionsList(); + this.executions = task.getExecutionsList().map((execution) => { + return { + epoch: execution.getEpoch(), + userOpHash: execution.getUserOpHash(), + error: execution.getError() + }; + }); + this.maxExecution = task.getMaxExecution(); } }; -var task_default = Task2; +var task_default = Task; + +// src/types.ts +var AUTH_KEY_HEADER = "authkey"; // src/index.ts var BaseClient = class { constructor(opts) { this.endpoint = opts.endpoint; - this.rpcClient = new AggregatorClient( + this.rpcClient = new import_avs_grpc_pb.AggregatorClient( this.endpoint, - grpc2.credentials.createInsecure() + grpc.credentials.createInsecure() ); this.metadata = new import_grpc_js.Metadata(); } @@ -4557,21 +5594,22 @@ var BaseClient = class { return false; } } - async authWithAPIKey(apiKey, expiredAtEpoch) { - const request = new GetKeyReq(); - request.setOwner(""); + // When using the APIkey, depends on scope of the key, it may have access to one ore more account + async authWithAPIKey(address, apiKey, expiredAtEpoch) { + const request = new avs_pb2.GetKeyReq(); + request.setOwner(address); request.setExpiredAt(expiredAtEpoch); request.setSignature(apiKey); - const result = await this._callRPC("getKey", request); + const result = await this._callAnonRPC("getKey", request); return { authKey: result.getKey() }; } // This flow can be used where the signature is generate from outside, such as in front-end and pass in async authWithSignature(address, signature, expiredAtEpoch) { - const request = new GetKeyReq(); + const request = new avs_pb2.GetKeyReq(); request.setOwner(address); request.setExpiredAt(expiredAtEpoch); request.setSignature(signature); - let result = await this._callRPC( + let result = await this._callAnonRPC( "getKey", request ); @@ -4579,9 +5617,23 @@ var BaseClient = class { } _callRPC(method, request, options) { const metadata = import_lodash.default.cloneDeep(this.metadata); - if (options?.authKey) { - metadata.set(AUTH_KEY_HEADER, options.authKey); + if (!options?.authKey) { + throw new Error("missing auth header"); } + metadata.set(AUTH_KEY_HEADER, options.authKey); + return new Promise((resolve, reject) => { + this.rpcClient[method].bind(this.rpcClient)( + request, + metadata, + (error, response) => { + if (error) reject(error); + else resolve(response); + } + ); + }); + } + _callAnonRPC(method, request, options) { + const metadata = import_lodash.default.cloneDeep(this.metadata); return new Promise((resolve, reject) => { this.rpcClient[method].bind(this.rpcClient)( request, @@ -4598,101 +5650,82 @@ var Client = class extends BaseClient { constructor(config) { super(config); } - async getAddresses(address, { authKey }) { - const request = new AddressRequest(); - request.setOwner(address); - const result = await this._callRPC("getSmartAccountAddress", request, { authKey }); - return { - owner: address, - smart_account_address: result.getSmartAccountAddress() - }; + async listSmartWallets(options) { + const request = new avs_pb2.ListWalletReq(); + const result = await this._callRPC("listWallets", request, options); + return result.getWalletsList().map((item) => item.toObject()); } - async createTask({ - address, - oracleContract, - tokenContract - }, { authKey }) { - const trigger = new TaskTrigger(); - trigger.setTriggerType(TriggerType.EXPRESSIONTRIGGER); - trigger.setExpression( - new ExpressionCondition().setExpression(` - bigCmp( - priceChainlink("${oracleContract}"), - toBigInt("10000") - ) > 0`) - ); - const action = new TaskAction(); - action.setTaskType(TaskType.CONTRACTEXECUTIONTASK); - action.setId("transfer_erc20_1"); - action.setName("Transfer Test Token"); - const execution = new ContractExecution(); - execution.setContractAddress(tokenContract); - let ABI = ["function transfer(address to, uint amount)"]; - let iface = new import_ethers.ethers.Interface(ABI); - const callData = iface.encodeFunctionData("transfer", [ - address, - import_ethers.ethers.parseUnits("12", 18) - ]); - execution.setCallData(callData); - action.setContractExecution(execution); - const request = new CreateTaskReq().setTrigger(trigger).setActionsList([action]).setExpiredAt(Math.floor(Date.now() / 1e3) + 1e6); - const result = await this._callRPC("createTask", request, { authKey }); + async createWallet({ + salt, + factoryAddress + }, options) { + const request = new avs_pb2.CreateWalletReq(); + request.setSalt(salt); + if (factoryAddress) { + request.setFactoryAddress(factoryAddress); + } + const result = await this._callRPC("createWallet", request, options); return { - id: result.getId() + address: result.getAddress(), + salt: result.getSalt(), + factory: result.getFactoryAddress() }; } - async listTasks(address, { authKey }) { - const request = new ListTasksReq(); - const result = await this._callRPC("listTasks", request, { authKey }); - const tasks = import_lodash.default.map( - result.getTasksList(), - (obj) => { - return { - id: obj.getId(), - status: import_lodash.default.capitalize(obj.getStatus().toString()) - }; - } - ); - return { - tasks - }; + async createTask(payload, options) { + const request = new avs_pb2.CreateTaskReq(); + request.setSmartWalletAddress(payload.smartWalletAddress); + request.setStartAt(payload.startAt); + request.setExpiredAt(payload.expiredAt || -1); + request.setMemo(payload.memo || ""); + request.setMaxExecution(payload.maxExecution || 0); + request.setTrigger(buildTrigger(payload.trigger)); + for (const node of payload.nodes) { + request.addNodes(buildTaskNode(node)); + } + const edges = []; + for (const edge of payload.edges) { + edges.push(buildTaskEdge(edge)); + } + request.setEdgesList(edges); + const result = await this._callRPC("createTask", request, options); + return result.getId(); + } + async listTasks(address, options) { + const request = new avs_pb2.ListTasksReq(); + request.setSmartWalletAddress(address); + const result = await this._callRPC("listTasks", request, options); + return result.getTasksList().map((item) => new task_default(item)); } // TODO: specify the return type to match client’s requirements - // Right now we simply return the original object from the server - async getTask(id, { authKey }) { - const request = new UUID(); - request.setBytes(id); - ``; + async getTask(id, options) { + const request = new avs_pb2.IdReq(); + request.setId(id); const result = await this._callRPC( "getTask", request, - { authKey } + options ); return new task_default(result); } - async cancelTask(id, { authKey }) { - const request = new UUID(); - request.setBytes(id); + async cancelTask(id, options) { + const request = new avs_pb2.IdReq(); + request.setId(id); const result = await this._callRPC( "cancelTask", request, - { authKey } + options ); - return { - value: result.getValue() - }; + return result.getValue(); } - async deleteTask(id, { authKey }) { - const request = new UUID(); - request.setBytes(id); + async deleteTask(id, options) { + const request = new avs_pb2.IdReq(); + request.setId(id); const result = await this._callRPC( "deleteTask", request, - { authKey } + options ); - return { - value: result.getValue() - }; + return result.getValue(); } }; // Annotate the CommonJS export names for ESM import in node: diff --git a/dist/index.mjs b/dist/index.mjs index 328fea8..b0b0208 100644 --- a/dist/index.mjs +++ b/dist/index.mjs @@ -1,6 +1,8 @@ +var __create = Object.create; var __defProp = Object.defineProperty; var __getOwnPropDesc = Object.getOwnPropertyDescriptor; var __getOwnPropNames = Object.getOwnPropertyNames; +var __getProtoOf = Object.getPrototypeOf; var __hasOwnProp = Object.prototype.hasOwnProperty; var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require : typeof Proxy !== "undefined" ? new Proxy(x, { get: (a, b) => (typeof require !== "undefined" ? require : a)[b] @@ -8,12 +10,8 @@ var __require = /* @__PURE__ */ ((x) => typeof require !== "undefined" ? require if (typeof require !== "undefined") return require.apply(this, arguments); throw Error('Dynamic require of "' + x + '" is not supported'); }); -var __esm = (fn, res) => function __init() { - return fn && (res = (0, fn[__getOwnPropNames(fn)[0]])(fn = 0)), res; -}; -var __export = (target, all) => { - for (var name in all) - __defProp(target, name, { get: all[name], enumerable: true }); +var __commonJS = (cb, mod) => function __require2() { + return mod || (0, cb[__getOwnPropNames(cb)[0]])((mod = { exports: {} }).exports, mod), mod.exports; }; var __copyProps = (to, from, except, desc) => { if (from && typeof from === "object" || typeof from === "function") { @@ -23,38 +21,22 @@ var __copyProps = (to, from, except, desc) => { } return to; }; -var __toCommonJS = (mod) => __copyProps(__defProp({}, "__esModule", { value: true }), mod); +var __toESM = (mod, isNodeMode, target) => (target = mod != null ? __create(__getProtoOf(mod)) : {}, __copyProps( + // If the importer is in node compatibility mode or this is not an ESM + // file that has been converted to a CommonJS file using a Babel- + // compatible transform (i.e. "__esModule" has not been set), then set + // "default" to the CommonJS "module.exports" for node compatibility. + isNodeMode || !mod || !mod.__esModule ? __defProp(target, "default", { value: mod, enumerable: true }) : target, + mod +)); // grpc_codegen/avs_pb.js -var avs_pb_exports = {}; -__export(avs_pb_exports, { - ActionType: () => ActionType, - AddressRequest: () => AddressRequest, - AddressResp: () => AddressResp, - ContractExecution: () => ContractExecution, - CreateTaskReq: () => CreateTaskReq, - CreateTaskResp: () => CreateTaskResp, - ExpressionCondition: () => ExpressionCondition, - GetKeyReq: () => GetKeyReq, - KeyResp: () => KeyResp, - ListTasksReq: () => ListTasksReq, - ListTasksResp: () => ListTasksResp, - Task: () => Task, - TaskAction: () => TaskAction, - TaskTrigger: () => TaskTrigger, - TaskType: () => TaskType, - TriggerType: () => TriggerType, - UUID: () => UUID, - UpdateChecksReq: () => UpdateChecksReq, - UpdateChecksResp: () => UpdateChecksResp -}); -var jspb, goog, global, google_protobuf_timestamp_pb, google_protobuf_wrappers_pb, Task, CreateTaskReq, CreateTaskResp, GetKeyReq, KeyResp, UpdateChecksReq, UpdateChecksResp, AddressResp, AddressRequest, ListTasksReq, ListTasksResp, TaskTrigger, TriggerType, ExpressionCondition, TaskAction, ActionType, ContractExecution, TaskType, UUID; -var init_avs_pb = __esm({ - "grpc_codegen/avs_pb.js"() { +var require_avs_pb = __commonJS({ + "grpc_codegen/avs_pb.js"(exports) { "use strict"; - jspb = __require("google-protobuf"); - goog = jspb; - global = function() { + var jspb = __require("google-protobuf"); + var goog = jspb; + var global = function() { if (this) { return this; } @@ -69,53 +51,61 @@ var init_avs_pb = __esm({ } return Function("return this")(); }.call(null); - google_protobuf_timestamp_pb = __require("google-protobuf/google/protobuf/timestamp_pb.js"); + var google_protobuf_timestamp_pb = __require("google-protobuf/google/protobuf/timestamp_pb.js"); goog.object.extend(proto, google_protobuf_timestamp_pb); - google_protobuf_wrappers_pb = __require("google-protobuf/google/protobuf/wrappers_pb.js"); + 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); - 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) { - proto.aggregator.UUID.displayName = "proto.aggregator.UUID"; + proto.aggregator.IdReq.displayName = "proto.aggregator.IdReq"; } proto.aggregator.Checkin = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); @@ -145,40 +135,40 @@ var init_avs_pb = __esm({ if (goog.DEBUG && !COMPILED) { proto.aggregator.SyncTasksReq.displayName = "proto.aggregator.SyncTasksReq"; } - 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) { - proto.aggregator.TaskTrigger.displayName = "proto.aggregator.TaskTrigger"; + proto.aggregator.FixedEpochCondition.displayName = "proto.aggregator.FixedEpochCondition"; } - 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) { - proto.aggregator.TimeCondition.displayName = "proto.aggregator.TimeCondition"; + proto.aggregator.CronCondition.displayName = "proto.aggregator.CronCondition"; } - 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) { - proto.aggregator.ContractQueryCondition.displayName = "proto.aggregator.ContractQueryCondition"; + proto.aggregator.BlockCondition.displayName = "proto.aggregator.BlockCondition"; } - 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) { + proto.aggregator.EventCondition.displayName = "proto.aggregator.EventCondition"; + } + 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) { - proto.aggregator.ExpressionCondition.displayName = "proto.aggregator.ExpressionCondition"; + proto.aggregator.TaskTrigger.displayName = "proto.aggregator.TaskTrigger"; } proto.aggregator.SyncTasksResp = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); @@ -187,75 +177,89 @@ var init_avs_pb = __esm({ if (goog.DEBUG && !COMPILED) { proto.aggregator.SyncTasksResp.displayName = "proto.aggregator.SyncTasksResp"; } - 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.ETHTransfer, jspb.Message); + goog.inherits(proto.aggregator.ETHTransferNode, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.aggregator.ETHTransfer.displayName = "proto.aggregator.ETHTransfer"; + proto.aggregator.ETHTransferNode.displayName = "proto.aggregator.ETHTransferNode"; } - proto.aggregator.ContractExecution = function(opt_data) { + proto.aggregator.ContractWriteNode = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; - goog.inherits(proto.aggregator.ContractExecution, jspb.Message); + goog.inherits(proto.aggregator.ContractWriteNode, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.aggregator.ContractExecution.displayName = "proto.aggregator.ContractExecution"; + proto.aggregator.ContractWriteNode.displayName = "proto.aggregator.ContractWriteNode"; } - proto.aggregator.GraphQLDataQuery = function(opt_data) { + proto.aggregator.ContractReadNode = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; - goog.inherits(proto.aggregator.GraphQLDataQuery, jspb.Message); + goog.inherits(proto.aggregator.ContractReadNode, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.aggregator.GraphQLDataQuery.displayName = "proto.aggregator.GraphQLDataQuery"; + proto.aggregator.ContractReadNode.displayName = "proto.aggregator.ContractReadNode"; } - proto.aggregator.HTTPAPICall = function(opt_data) { + proto.aggregator.GraphQLQueryNode = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; - goog.inherits(proto.aggregator.HTTPAPICall, jspb.Message); + goog.inherits(proto.aggregator.GraphQLQueryNode, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.aggregator.HTTPAPICall.displayName = "proto.aggregator.HTTPAPICall"; + proto.aggregator.GraphQLQueryNode.displayName = "proto.aggregator.GraphQLQueryNode"; } - proto.aggregator.CustomCode = function(opt_data) { + proto.aggregator.RestAPINode = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; - goog.inherits(proto.aggregator.CustomCode, jspb.Message); + goog.inherits(proto.aggregator.RestAPINode, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.aggregator.CustomCode.displayName = "proto.aggregator.CustomCode"; + proto.aggregator.RestAPINode.displayName = "proto.aggregator.RestAPINode"; } - proto.aggregator.ConditionJump = function(opt_data) { + proto.aggregator.CustomCodeNode = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; - goog.inherits(proto.aggregator.ConditionJump, jspb.Message); + goog.inherits(proto.aggregator.CustomCodeNode, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.aggregator.ConditionJump.displayName = "proto.aggregator.ConditionJump"; - } - proto.aggregator.BranchAction = function(opt_data) { - jspb.Message.initialize( - this, - opt_data, - 0, - -1, - proto.aggregator.BranchAction.repeatedFields_, - null - ); + proto.aggregator.CustomCodeNode.displayName = "proto.aggregator.CustomCodeNode"; + } + proto.aggregator.Condition = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; - goog.inherits(proto.aggregator.BranchAction, jspb.Message); + goog.inherits(proto.aggregator.Condition, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.aggregator.BranchAction.displayName = "proto.aggregator.BranchAction"; - } - proto.aggregator.TaskAction = function(opt_data) { - jspb.Message.initialize( - this, - opt_data, - 0, - -1, - proto.aggregator.TaskAction.repeatedFields_, - null - ); + proto.aggregator.Condition.displayName = "proto.aggregator.Condition"; + } + 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) { + proto.aggregator.BranchNode.displayName = "proto.aggregator.BranchNode"; + } + proto.aggregator.FilterNode = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.FilterNode, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.FilterNode.displayName = "proto.aggregator.FilterNode"; + } + proto.aggregator.LoopNode = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.LoopNode, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.LoopNode.displayName = "proto.aggregator.LoopNode"; + } + proto.aggregator.TaskEdge = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); + }; + goog.inherits(proto.aggregator.TaskEdge, jspb.Message); + if (goog.DEBUG && !COMPILED) { + proto.aggregator.TaskEdge.displayName = "proto.aggregator.TaskEdge"; + } + 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) { - proto.aggregator.TaskAction.displayName = "proto.aggregator.TaskAction"; + proto.aggregator.TaskNode.displayName = "proto.aggregator.TaskNode"; } proto.aggregator.Execution = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); @@ -265,28 +269,14 @@ var init_avs_pb = __esm({ proto.aggregator.Execution.displayName = "proto.aggregator.Execution"; } proto.aggregator.Task = function(opt_data) { - jspb.Message.initialize( - this, - opt_data, - 0, - -1, - proto.aggregator.Task.repeatedFields_, - null - ); + jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.Task.repeatedFields_, null); }; goog.inherits(proto.aggregator.Task, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.aggregator.Task.displayName = "proto.aggregator.Task"; } proto.aggregator.CreateTaskReq = function(opt_data) { - jspb.Message.initialize( - this, - opt_data, - 0, - -1, - proto.aggregator.CreateTaskReq.repeatedFields_, - null - ); + jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.CreateTaskReq.repeatedFields_, null); }; goog.inherits(proto.aggregator.CreateTaskReq, jspb.Message); if (goog.DEBUG && !COMPILED) { @@ -313,19 +303,26 @@ var init_avs_pb = __esm({ if (goog.DEBUG && !COMPILED) { proto.aggregator.NonceResp.displayName = "proto.aggregator.NonceResp"; } - 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) { - proto.aggregator.AddressRequest.displayName = "proto.aggregator.AddressRequest"; + proto.aggregator.ListWalletReq.displayName = "proto.aggregator.ListWalletReq"; } - 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) { + proto.aggregator.SmartWallet.displayName = "proto.aggregator.SmartWallet"; + } + proto.aggregator.ListWalletResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.ListWalletResp.repeatedFields_, null); + }; + goog.inherits(proto.aggregator.ListWalletResp, jspb.Message); if (goog.DEBUG && !COMPILED) { - proto.aggregator.AddressResp.displayName = "proto.aggregator.AddressResp"; + proto.aggregator.ListWalletResp.displayName = "proto.aggregator.ListWalletResp"; } proto.aggregator.ListTasksReq = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); @@ -335,26 +332,12 @@ var init_avs_pb = __esm({ proto.aggregator.ListTasksReq.displayName = "proto.aggregator.ListTasksReq"; } proto.aggregator.ListTasksResp = function(opt_data) { - jspb.Message.initialize( - this, - opt_data, - 0, - -1, - proto.aggregator.ListTasksResp.repeatedFields_, - null - ); + jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.ListTasksResp.repeatedFields_, null); }; goog.inherits(proto.aggregator.ListTasksResp, jspb.Message); if (goog.DEBUG && !COMPILED) { proto.aggregator.ListTasksResp.displayName = "proto.aggregator.ListTasksResp"; } - proto.aggregator.ListTasksResp.TaskItemResp = function(opt_data) { - jspb.Message.initialize(this, opt_data, 0, -1, null, null); - }; - goog.inherits(proto.aggregator.ListTasksResp.TaskItemResp, jspb.Message); - if (goog.DEBUG && !COMPILED) { - proto.aggregator.ListTasksResp.TaskItemResp.displayName = "proto.aggregator.ListTasksResp.TaskItemResp"; - } proto.aggregator.GetKeyReq = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; @@ -370,14 +353,7 @@ var init_avs_pb = __esm({ proto.aggregator.KeyResp.displayName = "proto.aggregator.KeyResp"; } proto.aggregator.UpdateChecksReq = function(opt_data) { - jspb.Message.initialize( - this, - opt_data, - 0, - -1, - proto.aggregator.UpdateChecksReq.repeatedFields_, - null - ); + jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.UpdateChecksReq.repeatedFields_, null); }; goog.inherits(proto.aggregator.UpdateChecksReq, jspb.Message); if (goog.DEBUG && !COMPILED) { @@ -390,13 +366,27 @@ var init_avs_pb = __esm({ if (goog.DEBUG && !COMPILED) { proto.aggregator.UpdateChecksResp.displayName = "proto.aggregator.UpdateChecksResp"; } + 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) { + proto.aggregator.CreateWalletReq.displayName = "proto.aggregator.CreateWalletReq"; + } + 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) { + proto.aggregator.CreateWalletResp.displayName = "proto.aggregator.CreateWalletResp"; + } if (jspb.Message.GENERATE_TO_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); }; - 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) { obj.$jspbMessageInstance = msg; @@ -404,12 +394,12 @@ var init_avs_pb = __esm({ return obj; }; } - 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); }; - proto.aggregator.UUID.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.IdReq.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -421,7 +411,7 @@ var init_avs_pb = __esm({ /** @type {string} */ reader.readString() ); - msg.setBytes(value); + msg.setId(value); break; default: reader.skipField(); @@ -430,25 +420,28 @@ var init_avs_pb = __esm({ } return msg; }; - 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(); }; - proto.aggregator.UUID.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.IdReq.serializeBinaryToWriter = function(message, writer) { var f = void 0; - f = message.getBytes(); + f = message.getId(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } }; - proto.aggregator.UUID.prototype.getBytes = function() { + proto.aggregator.IdReq.prototype.getId = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 1, "") ); }; - proto.aggregator.UUID.prototype.setBytes = function(value) { + proto.aggregator.IdReq.prototype.setId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; if (jspb.Message.GENERATE_TO_OBJECT) { @@ -506,10 +499,7 @@ var init_avs_pb = __esm({ break; case 4: var value = new proto.aggregator.Checkin.Status(); - reader.readMessage( - value, - proto.aggregator.Checkin.Status.deserializeBinaryFromReader - ); + reader.readMessage(value, proto.aggregator.Checkin.Status.deserializeBinaryFromReader); msg.setStatus(value); break; case 5: @@ -549,15 +539,24 @@ var init_avs_pb = __esm({ var f = void 0; f = message.getId(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } f = message.getAddress(); if (f.length > 0) { - writer.writeString(2, f); + writer.writeString( + 2, + f + ); } f = message.getSignature(); if (f.length > 0) { - writer.writeString(3, f); + writer.writeString( + 3, + f + ); } f = message.getStatus(); if (f != null) { @@ -569,15 +568,24 @@ var init_avs_pb = __esm({ } f = message.getVersion(); if (f.length > 0) { - writer.writeString(5, f); + writer.writeString( + 5, + f + ); } f = message.getMetricsport(); if (f !== 0) { - writer.writeInt32(6, f); + writer.writeInt32( + 6, + f + ); } f = message.getRemoteip(); if (f.length > 0) { - writer.writeString(7, f); + writer.writeString( + 7, + f + ); } }; if (jspb.Message.GENERATE_TO_OBJECT) { @@ -599,10 +607,7 @@ var init_avs_pb = __esm({ proto.aggregator.Checkin.Status.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.aggregator.Checkin.Status(); - return proto.aggregator.Checkin.Status.deserializeBinaryFromReader( - msg, - reader - ); + return proto.aggregator.Checkin.Status.deserializeBinaryFromReader(msg, reader); }; proto.aggregator.Checkin.Status.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { @@ -627,10 +632,7 @@ var init_avs_pb = __esm({ break; case 3: var value = new google_protobuf_timestamp_pb.Timestamp(); - reader.readMessage( - value, - google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader - ); + reader.readMessage(value, google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); msg.setLastHeartbeat(value); break; default: @@ -649,11 +651,17 @@ var init_avs_pb = __esm({ var f = void 0; f = message.getUptime(); if (f !== 0) { - writer.writeInt64(1, f); + writer.writeInt64( + 1, + f + ); } f = message.getQueuedepth(); if (f !== 0) { - writer.writeInt64(2, f); + writer.writeInt64( + 2, + f + ); } f = message.getLastHeartbeat(); if (f != null) { @@ -685,11 +693,7 @@ var init_avs_pb = __esm({ proto.aggregator.Checkin.Status.prototype.getLastHeartbeat = function() { return ( /** @type{?proto.google.protobuf.Timestamp} */ - jspb.Message.getWrapperField( - this, - google_protobuf_timestamp_pb.Timestamp, - 3 - ) + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3) ); }; proto.aggregator.Checkin.Status.prototype.setLastHeartbeat = function(value) { @@ -798,10 +802,7 @@ var init_avs_pb = __esm({ switch (field) { case 1: var value = new google_protobuf_timestamp_pb.Timestamp(); - reader.readMessage( - value, - google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader - ); + reader.readMessage(value, google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); msg.setUpdatedAt(value); break; default: @@ -830,11 +831,7 @@ var init_avs_pb = __esm({ proto.aggregator.CheckinResp.prototype.getUpdatedAt = function() { return ( /** @type{?proto.google.protobuf.Timestamp} */ - jspb.Message.getWrapperField( - this, - google_protobuf_timestamp_pb.Timestamp, - 1 - ) + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 1) ); }; proto.aggregator.CheckinResp.prototype.setUpdatedAt = function(value) { @@ -919,19 +916,31 @@ var init_avs_pb = __esm({ var f = void 0; f = message.getId(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } f = message.getAddress(); if (f.length > 0) { - writer.writeString(2, f); + writer.writeString( + 2, + f + ); } f = message.getSignature(); if (f.length > 0) { - writer.writeString(3, f); + writer.writeString( + 3, + f + ); } f = message.getMonotonicClock(); if (f !== 0) { - writer.writeInt64(4, f); + writer.writeInt64( + 4, + f + ); } }; proto.aggregator.SyncTasksReq.prototype.getId = function() { @@ -970,16 +979,14 @@ var init_avs_pb = __esm({ proto.aggregator.SyncTasksReq.prototype.setMonotonicClock = function(value) { return jspb.Message.setProto3IntField(this, 4, value); }; + proto.aggregator.FixedEpochCondition.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_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); }; - 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 ? void 0 : f }; if (includeInstance) { obj.$jspbMessageInstance = msg; @@ -987,12 +994,12 @@ var init_avs_pb = __esm({ return obj; }; } - 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); }; - proto.aggregator.TaskTrigger.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.FixedEpochCondition.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1000,35 +1007,13 @@ var init_avs_pb = __esm({ 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 + var values = ( + /** @type {!Array} */ + reader.isDelimited() ? reader.readPackedInt64() : [reader.readInt64()] ); - msg.setExpression(value); + for (var i = 0; i < values.length; i++) { + msg.addEpochs(values[i]); + } break; default: reader.skipField(); @@ -1037,109 +1022,44 @@ var init_avs_pb = __esm({ } return msg; }; - 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(); }; - proto.aggregator.TaskTrigger.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.FixedEpochCondition.serializeBinaryToWriter = function(message, writer) { var f = void 0; - f = message.getTriggerType(); - if (f !== 0) { - writer.writeEnum(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 + f = message.getEpochsList(); + if (f.length > 0) { + writer.writePackedInt64( + 1, + f ); } }; - proto.aggregator.TaskTrigger.prototype.getTriggerType = function() { - return ( - /** @type {!proto.aggregator.TriggerType} */ - jspb.Message.getFieldWithDefault(this, 1, 0) - ); - }; - proto.aggregator.TaskTrigger.prototype.setTriggerType = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); - }; - proto.aggregator.TaskTrigger.prototype.getSchedule = function() { - return ( - /** @type{?proto.aggregator.TimeCondition} */ - jspb.Message.getWrapperField(this, proto.aggregator.TimeCondition, 2) - ); - }; - proto.aggregator.TaskTrigger.prototype.setSchedule = function(value) { - return jspb.Message.setWrapperField(this, 2, value); - }; - proto.aggregator.TaskTrigger.prototype.clearSchedule = function() { - return this.setSchedule(void 0); - }; - proto.aggregator.TaskTrigger.prototype.hasSchedule = function() { - return jspb.Message.getField(this, 2) != null; - }; - proto.aggregator.TaskTrigger.prototype.getContractQuery = function() { - return ( - /** @type{?proto.aggregator.ContractQueryCondition} */ - jspb.Message.getWrapperField( - this, - proto.aggregator.ContractQueryCondition, - 3 - ) - ); - }; - proto.aggregator.TaskTrigger.prototype.setContractQuery = function(value) { - return jspb.Message.setWrapperField(this, 3, value); - }; - proto.aggregator.TaskTrigger.prototype.clearContractQuery = function() { - return this.setContractQuery(void 0); - }; - proto.aggregator.TaskTrigger.prototype.hasContractQuery = function() { - return jspb.Message.getField(this, 3) != null; - }; - proto.aggregator.TaskTrigger.prototype.getExpression = function() { + proto.aggregator.FixedEpochCondition.prototype.getEpochsList = function() { return ( - /** @type{?proto.aggregator.ExpressionCondition} */ - jspb.Message.getWrapperField(this, proto.aggregator.ExpressionCondition, 4) + /** @type {!Array} */ + jspb.Message.getRepeatedField(this, 1) ); }; - proto.aggregator.TaskTrigger.prototype.setExpression = function(value) { - return jspb.Message.setWrapperField(this, 4, value); + proto.aggregator.FixedEpochCondition.prototype.setEpochsList = function(value) { + return jspb.Message.setField(this, 1, value || []); }; - proto.aggregator.TaskTrigger.prototype.clearExpression = function() { - return this.setExpression(void 0); + proto.aggregator.FixedEpochCondition.prototype.addEpochs = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); }; - proto.aggregator.TaskTrigger.prototype.hasExpression = function() { - return jspb.Message.getField(this, 4) != null; + proto.aggregator.FixedEpochCondition.prototype.clearEpochsList = function() { + return this.setEpochsList([]); }; - proto.aggregator.TimeCondition.repeatedFields_ = [1]; + proto.aggregator.CronCondition.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.TimeCondition.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.TimeCondition.toObject(opt_includeInstance, this); + proto.aggregator.CronCondition.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.CronCondition.toObject(opt_includeInstance, this); }; - proto.aggregator.TimeCondition.toObject = function(includeInstance, msg) { + proto.aggregator.CronCondition.toObject = function(includeInstance, msg) { var f, obj = { - fixedList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? void 0 : f, - cron: jspb.Message.getFieldWithDefault(msg, 2, "") + scheduleList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? void 0 : f }; if (includeInstance) { obj.$jspbMessageInstance = msg; @@ -1147,15 +1067,12 @@ var init_avs_pb = __esm({ return obj; }; } - 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); }; - proto.aggregator.TimeCondition.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.CronCondition.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1163,20 +1080,11 @@ var init_avs_pb = __esm({ 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(); @@ -1185,57 +1093,43 @@ var init_avs_pb = __esm({ } return msg; }; - 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(); }; - proto.aggregator.TimeCondition.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.CronCondition.serializeBinaryToWriter = function(message, writer) { var f = void 0; - f = message.getFixedList(); - if (f.length > 0) { - writer.writePackedInt64(1, f); - } - f = message.getCron(); + f = message.getScheduleList(); if (f.length > 0) { - writer.writeString(2, f); + writer.writeRepeatedString( + 1, + f + ); } }; - proto.aggregator.TimeCondition.prototype.getFixedList = function() { + proto.aggregator.CronCondition.prototype.getScheduleList = function() { return ( - /** @type {!Array} */ + /** @type {!Array} */ jspb.Message.getRepeatedField(this, 1) ); }; - proto.aggregator.TimeCondition.prototype.setFixedList = function(value) { + proto.aggregator.CronCondition.prototype.setScheduleList = function(value) { return jspb.Message.setField(this, 1, value || []); }; - 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); }; - proto.aggregator.TimeCondition.prototype.clearFixedList = function() { - return this.setFixedList([]); - }; - proto.aggregator.TimeCondition.prototype.getCron = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") - ); - }; - proto.aggregator.TimeCondition.prototype.setCron = function(value) { - return jspb.Message.setProto3StringField(this, 2, value); + proto.aggregator.CronCondition.prototype.clearScheduleList = function() { + return this.setScheduleList([]); }; if (jspb.Message.GENERATE_TO_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); }; - 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) { obj.$jspbMessageInstance = msg; @@ -1243,15 +1137,12 @@ var init_avs_pb = __esm({ return obj; }; } - 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); }; - proto.aggregator.ContractQueryCondition.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.BlockCondition.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1260,17 +1151,10 @@ var init_avs_pb = __esm({ switch (field) { case 1: var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setContractAddress(value); - break; - case 2: - var value = ( - /** @type {string} */ - reader.readString() + /** @type {number} */ + reader.readInt64() ); - msg.setCallmsg(value); + msg.setInterval(value); break; default: reader.skipField(); @@ -1279,51 +1163,35 @@ var init_avs_pb = __esm({ } return msg; }; - 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(); }; - proto.aggregator.ContractQueryCondition.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.BlockCondition.serializeBinaryToWriter = function(message, writer) { var f = void 0; - f = message.getContractAddress(); - if (f.length > 0) { - writer.writeString(1, f); - } - f = message.getCallmsg(); - if (f.length > 0) { - writer.writeString(2, f); + f = message.getInterval(); + if (f !== 0) { + writer.writeInt64( + 1, + f + ); } }; - proto.aggregator.ContractQueryCondition.prototype.getContractAddress = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.ContractQueryCondition.prototype.setContractAddress = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.ContractQueryCondition.prototype.getCallmsg = function() { + proto.aggregator.BlockCondition.prototype.getInterval = function() { return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 2, "") + /** @type {number} */ + jspb.Message.getFieldWithDefault(this, 1, 0) ); }; - 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); }; if (jspb.Message.GENERATE_TO_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); }; - proto.aggregator.ExpressionCondition.toObject = function(includeInstance, msg) { + proto.aggregator.EventCondition.toObject = function(includeInstance, msg) { var f, obj = { expression: jspb.Message.getFieldWithDefault(msg, 1, "") }; @@ -1333,15 +1201,12 @@ var init_avs_pb = __esm({ return obj; }; } - 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); }; - proto.aggregator.ExpressionCondition.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.EventCondition.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1362,36 +1227,56 @@ var init_avs_pb = __esm({ } return msg; }; - 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(); }; - proto.aggregator.ExpressionCondition.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.EventCondition.serializeBinaryToWriter = function(message, writer) { var f = void 0; f = message.getExpression(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } }; - proto.aggregator.ExpressionCondition.prototype.getExpression = function() { + proto.aggregator.EventCondition.prototype.getExpression = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 1, "") ); }; - proto.aggregator.ExpressionCondition.prototype.setExpression = function(value) { + proto.aggregator.EventCondition.prototype.setExpression = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; + proto.aggregator.TaskTrigger.oneofGroups_ = [[1, 2, 3, 4, 5]]; + proto.aggregator.TaskTrigger.TriggerTypeCase = { + TRIGGER_TYPE_NOT_SET: 0, + MANUAL: 1, + FIXED_TIME: 2, + CRON: 3, + BLOCK: 4, + EVENT: 5 + }; + 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) { - 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); }; - 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) { obj.$jspbMessageInstance = msg; @@ -1399,15 +1284,12 @@ var init_avs_pb = __esm({ return obj; }; } - 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); }; - proto.aggregator.SyncTasksResp.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.TaskTrigger.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1416,24 +1298,206 @@ var init_avs_pb = __esm({ switch (field) { case 1: var value = ( - /** @type {string} */ - reader.readString() + /** @type {boolean} */ + reader.readBool() ); - msg.setId(value); + msg.setManual(value); break; case 2: - var value = ( - /** @type {string} */ - reader.readString() + var value = new proto.aggregator.FixedEpochCondition(); + reader.readMessage(value, proto.aggregator.FixedEpochCondition.deserializeBinaryFromReader); + msg.setFixedTime(value); + break; + case 3: + var value = new proto.aggregator.CronCondition(); + reader.readMessage(value, proto.aggregator.CronCondition.deserializeBinaryFromReader); + msg.setCron(value); + break; + case 4: + var value = new proto.aggregator.BlockCondition(); + reader.readMessage(value, proto.aggregator.BlockCondition.deserializeBinaryFromReader); + msg.setBlock(value); + break; + case 5: + var value = new proto.aggregator.EventCondition(); + reader.readMessage(value, proto.aggregator.EventCondition.deserializeBinaryFromReader); + msg.setEvent(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.TaskTrigger.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.TaskTrigger.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.TaskTrigger.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = /** @type {boolean} */ + jspb.Message.getField(message, 1); + if (f != null) { + writer.writeBool( + 1, + f + ); + } + f = message.getFixedTime(); + if (f != null) { + writer.writeMessage( + 2, + f, + proto.aggregator.FixedEpochCondition.serializeBinaryToWriter + ); + } + f = message.getCron(); + if (f != null) { + writer.writeMessage( + 3, + f, + proto.aggregator.CronCondition.serializeBinaryToWriter + ); + } + f = message.getBlock(); + if (f != null) { + writer.writeMessage( + 4, + f, + proto.aggregator.BlockCondition.serializeBinaryToWriter + ); + } + f = message.getEvent(); + if (f != null) { + writer.writeMessage( + 5, + f, + proto.aggregator.EventCondition.serializeBinaryToWriter + ); + } + }; + proto.aggregator.TaskTrigger.prototype.getManual = function() { + return ( + /** @type {boolean} */ + jspb.Message.getBooleanFieldWithDefault(this, 1, false) + ); + }; + proto.aggregator.TaskTrigger.prototype.setManual = function(value) { + return jspb.Message.setOneofField(this, 1, proto.aggregator.TaskTrigger.oneofGroups_[0], value); + }; + proto.aggregator.TaskTrigger.prototype.clearManual = function() { + return jspb.Message.setOneofField(this, 1, proto.aggregator.TaskTrigger.oneofGroups_[0], void 0); + }; + proto.aggregator.TaskTrigger.prototype.hasManual = function() { + return jspb.Message.getField(this, 1) != null; + }; + proto.aggregator.TaskTrigger.prototype.getFixedTime = function() { + return ( + /** @type{?proto.aggregator.FixedEpochCondition} */ + jspb.Message.getWrapperField(this, proto.aggregator.FixedEpochCondition, 2) + ); + }; + proto.aggregator.TaskTrigger.prototype.setFixedTime = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.aggregator.TaskTrigger.oneofGroups_[0], value); + }; + proto.aggregator.TaskTrigger.prototype.clearFixedTime = function() { + return this.setFixedTime(void 0); + }; + proto.aggregator.TaskTrigger.prototype.hasFixedTime = function() { + return jspb.Message.getField(this, 2) != null; + }; + proto.aggregator.TaskTrigger.prototype.getCron = function() { + return ( + /** @type{?proto.aggregator.CronCondition} */ + jspb.Message.getWrapperField(this, proto.aggregator.CronCondition, 3) + ); + }; + proto.aggregator.TaskTrigger.prototype.setCron = function(value) { + return jspb.Message.setOneofWrapperField(this, 3, proto.aggregator.TaskTrigger.oneofGroups_[0], value); + }; + proto.aggregator.TaskTrigger.prototype.clearCron = function() { + return this.setCron(void 0); + }; + proto.aggregator.TaskTrigger.prototype.hasCron = function() { + return jspb.Message.getField(this, 3) != null; + }; + proto.aggregator.TaskTrigger.prototype.getBlock = function() { + return ( + /** @type{?proto.aggregator.BlockCondition} */ + jspb.Message.getWrapperField(this, proto.aggregator.BlockCondition, 4) + ); + }; + proto.aggregator.TaskTrigger.prototype.setBlock = function(value) { + return jspb.Message.setOneofWrapperField(this, 4, proto.aggregator.TaskTrigger.oneofGroups_[0], value); + }; + proto.aggregator.TaskTrigger.prototype.clearBlock = function() { + return this.setBlock(void 0); + }; + proto.aggregator.TaskTrigger.prototype.hasBlock = function() { + return jspb.Message.getField(this, 4) != null; + }; + proto.aggregator.TaskTrigger.prototype.getEvent = function() { + return ( + /** @type{?proto.aggregator.EventCondition} */ + jspb.Message.getWrapperField(this, proto.aggregator.EventCondition, 5) + ); + }; + proto.aggregator.TaskTrigger.prototype.setEvent = function(value) { + return jspb.Message.setOneofWrapperField(this, 5, proto.aggregator.TaskTrigger.oneofGroups_[0], value); + }; + proto.aggregator.TaskTrigger.prototype.clearEvent = function() { + return this.setEvent(void 0); + }; + proto.aggregator.TaskTrigger.prototype.hasEvent = function() { + return jspb.Message.getField(this, 5) != null; + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.SyncTasksResp.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.SyncTasksResp.toObject(opt_includeInstance, this); + }; + proto.aggregator.SyncTasksResp.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) + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.SyncTasksResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.SyncTasksResp(); + return proto.aggregator.SyncTasksResp.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.SyncTasksResp.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.setChecktype(value); break; case 3: var value = new proto.aggregator.TaskTrigger(); - reader.readMessage( - value, - proto.aggregator.TaskTrigger.deserializeBinaryFromReader - ); + reader.readMessage(value, proto.aggregator.TaskTrigger.deserializeBinaryFromReader); msg.setTrigger(value); break; default: @@ -1452,11 +1516,17 @@ var init_avs_pb = __esm({ var f = void 0; f = message.getId(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } f = message.getChecktype(); if (f.length > 0) { - writer.writeString(2, f); + writer.writeString( + 2, + f + ); } f = message.getTrigger(); if (f != null) { @@ -1501,10 +1571,10 @@ var init_avs_pb = __esm({ return jspb.Message.getField(this, 3) != null; }; if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.ETHTransfer.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.ETHTransfer.toObject(opt_includeInstance, this); + proto.aggregator.ETHTransferNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ETHTransferNode.toObject(opt_includeInstance, this); }; - proto.aggregator.ETHTransfer.toObject = function(includeInstance, msg) { + proto.aggregator.ETHTransferNode.toObject = function(includeInstance, msg) { var f, obj = { destination: jspb.Message.getFieldWithDefault(msg, 1, ""), amount: jspb.Message.getFieldWithDefault(msg, 2, "") @@ -1515,12 +1585,12 @@ var init_avs_pb = __esm({ return obj; }; } - proto.aggregator.ETHTransfer.deserializeBinary = function(bytes) { + proto.aggregator.ETHTransferNode.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ETHTransfer(); - return proto.aggregator.ETHTransfer.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.ETHTransferNode(); + return proto.aggregator.ETHTransferNode.deserializeBinaryFromReader(msg, reader); }; - proto.aggregator.ETHTransfer.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.ETHTransferNode.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1548,53 +1618,55 @@ var init_avs_pb = __esm({ } return msg; }; - proto.aggregator.ETHTransfer.prototype.serializeBinary = function() { + proto.aggregator.ETHTransferNode.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.ETHTransfer.serializeBinaryToWriter(this, writer); + proto.aggregator.ETHTransferNode.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; - proto.aggregator.ETHTransfer.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.ETHTransferNode.serializeBinaryToWriter = function(message, writer) { var f = void 0; f = message.getDestination(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } f = message.getAmount(); if (f.length > 0) { - writer.writeString(2, f); + writer.writeString( + 2, + f + ); } }; - proto.aggregator.ETHTransfer.prototype.getDestination = function() { + proto.aggregator.ETHTransferNode.prototype.getDestination = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 1, "") ); }; - proto.aggregator.ETHTransfer.prototype.setDestination = function(value) { + proto.aggregator.ETHTransferNode.prototype.setDestination = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; - proto.aggregator.ETHTransfer.prototype.getAmount = function() { + proto.aggregator.ETHTransferNode.prototype.getAmount = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 2, "") ); }; - proto.aggregator.ETHTransfer.prototype.setAmount = function(value) { + proto.aggregator.ETHTransferNode.prototype.setAmount = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.ContractExecution.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.ContractExecution.toObject( - opt_includeInstance, - this - ); + proto.aggregator.ContractWriteNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ContractWriteNode.toObject(opt_includeInstance, this); }; - proto.aggregator.ContractExecution.toObject = function(includeInstance, msg) { + proto.aggregator.ContractWriteNode.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, "") + contractAbi: jspb.Message.getFieldWithDefault(msg, 3, "") }; if (includeInstance) { obj.$jspbMessageInstance = msg; @@ -1602,15 +1674,12 @@ var init_avs_pb = __esm({ return obj; }; } - proto.aggregator.ContractExecution.deserializeBinary = function(bytes) { + proto.aggregator.ContractWriteNode.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.ContractWriteNode(); + return proto.aggregator.ContractWriteNode.deserializeBinaryFromReader(msg, reader); }; - proto.aggregator.ContractExecution.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.ContractWriteNode.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1636,14 +1705,7 @@ var init_avs_pb = __esm({ /** @type {string} */ reader.readString() ); - msg.setMethod(value); - break; - case 4: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.setEncodedParams(value); + msg.setContractAbi(value); break; default: reader.skipField(); @@ -1652,77 +1714,71 @@ var init_avs_pb = __esm({ } return msg; }; - proto.aggregator.ContractExecution.prototype.serializeBinary = function() { + proto.aggregator.ContractWriteNode.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.ContractExecution.serializeBinaryToWriter(this, writer); + proto.aggregator.ContractWriteNode.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; - proto.aggregator.ContractExecution.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.ContractWriteNode.serializeBinaryToWriter = function(message, writer) { var f = void 0; f = message.getContractAddress(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } f = message.getCallData(); if (f.length > 0) { - writer.writeString(2, f); - } - f = message.getMethod(); - if (f.length > 0) { - writer.writeString(3, f); + writer.writeString( + 2, + f + ); } - f = message.getEncodedParams(); + f = message.getContractAbi(); if (f.length > 0) { - writer.writeString(4, f); + writer.writeString( + 3, + f + ); } }; - proto.aggregator.ContractExecution.prototype.getContractAddress = function() { + proto.aggregator.ContractWriteNode.prototype.getContractAddress = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 1, "") ); }; - proto.aggregator.ContractExecution.prototype.setContractAddress = function(value) { + proto.aggregator.ContractWriteNode.prototype.setContractAddress = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; - proto.aggregator.ContractExecution.prototype.getCallData = function() { + proto.aggregator.ContractWriteNode.prototype.getCallData = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 2, "") ); }; - proto.aggregator.ContractExecution.prototype.setCallData = function(value) { + proto.aggregator.ContractWriteNode.prototype.setCallData = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; - proto.aggregator.ContractExecution.prototype.getMethod = function() { + proto.aggregator.ContractWriteNode.prototype.getContractAbi = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 3, "") ); }; - proto.aggregator.ContractExecution.prototype.setMethod = function(value) { + proto.aggregator.ContractWriteNode.prototype.setContractAbi = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; - proto.aggregator.ContractExecution.prototype.getEncodedParams = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 4, "") - ); - }; - proto.aggregator.ContractExecution.prototype.setEncodedParams = function(value) { - return jspb.Message.setProto3StringField(this, 4, value); - }; if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.GraphQLDataQuery.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.GraphQLDataQuery.toObject( - opt_includeInstance, - this - ); + proto.aggregator.ContractReadNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ContractReadNode.toObject(opt_includeInstance, this); }; - proto.aggregator.GraphQLDataQuery.toObject = function(includeInstance, msg) { + proto.aggregator.ContractReadNode.toObject = function(includeInstance, msg) { var f, obj = { - url: jspb.Message.getFieldWithDefault(msg, 1, ""), - query: 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) { obj.$jspbMessageInstance = msg; @@ -1730,15 +1786,12 @@ var init_avs_pb = __esm({ return obj; }; } - proto.aggregator.GraphQLDataQuery.deserializeBinary = function(bytes) { + proto.aggregator.ContractReadNode.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.ContractReadNode(); + return proto.aggregator.ContractReadNode.deserializeBinaryFromReader(msg, reader); }; - proto.aggregator.GraphQLDataQuery.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.ContractReadNode.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1750,14 +1803,21 @@ var init_avs_pb = __esm({ /** @type {string} */ reader.readString() ); - msg.setUrl(value); + msg.setContractAddress(value); break; case 2: var value = ( /** @type {string} */ reader.readString() ); - msg.setQuery(value); + msg.setCallData(value); + break; + case 3: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setContractAbi(value); break; default: reader.skipField(); @@ -1766,49 +1826,71 @@ var init_avs_pb = __esm({ } return msg; }; - proto.aggregator.GraphQLDataQuery.prototype.serializeBinary = function() { + proto.aggregator.ContractReadNode.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.GraphQLDataQuery.serializeBinaryToWriter(this, writer); + proto.aggregator.ContractReadNode.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; - proto.aggregator.GraphQLDataQuery.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.ContractReadNode.serializeBinaryToWriter = function(message, writer) { var f = void 0; - f = message.getUrl(); + f = message.getContractAddress(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } - f = message.getQuery(); + f = message.getCallData(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getContractAbi(); if (f.length > 0) { - writer.writeString(2, f); + writer.writeString( + 3, + f + ); } }; - proto.aggregator.GraphQLDataQuery.prototype.getUrl = function() { + proto.aggregator.ContractReadNode.prototype.getContractAddress = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 1, "") ); }; - proto.aggregator.GraphQLDataQuery.prototype.setUrl = function(value) { + proto.aggregator.ContractReadNode.prototype.setContractAddress = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; - proto.aggregator.GraphQLDataQuery.prototype.getQuery = function() { + proto.aggregator.ContractReadNode.prototype.getCallData = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 2, "") ); }; - proto.aggregator.GraphQLDataQuery.prototype.setQuery = function(value) { + proto.aggregator.ContractReadNode.prototype.setCallData = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; + proto.aggregator.ContractReadNode.prototype.getContractAbi = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 3, "") + ); + }; + proto.aggregator.ContractReadNode.prototype.setContractAbi = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); + }; if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.HTTPAPICall.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.HTTPAPICall.toObject(opt_includeInstance, this); + proto.aggregator.GraphQLQueryNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.GraphQLQueryNode.toObject(opt_includeInstance, this); }; - proto.aggregator.HTTPAPICall.toObject = function(includeInstance, msg) { + proto.aggregator.GraphQLQueryNode.toObject = function(includeInstance, msg) { var f, obj = { url: jspb.Message.getFieldWithDefault(msg, 1, ""), - headersMap: (f = msg.getHeadersMap()) ? f.toObject(includeInstance, void 0) : [], - body: jspb.Message.getFieldWithDefault(msg, 3, "") + query: jspb.Message.getFieldWithDefault(msg, 2, ""), + variablesMap: (f = msg.getVariablesMap()) ? f.toObject(includeInstance, void 0) : [] }; if (includeInstance) { obj.$jspbMessageInstance = msg; @@ -1816,12 +1898,12 @@ var init_avs_pb = __esm({ return obj; }; } - proto.aggregator.HTTPAPICall.deserializeBinary = function(bytes) { + proto.aggregator.GraphQLQueryNode.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.GraphQLQueryNode(); + return proto.aggregator.GraphQLQueryNode.deserializeBinaryFromReader(msg, reader); }; - proto.aggregator.HTTPAPICall.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.GraphQLQueryNode.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1836,25 +1918,17 @@ var init_avs_pb = __esm({ msg.setUrl(value); break; case 2: - var value = msg.getHeadersMap(); - reader.readMessage(value, function(message, reader2) { - jspb.Map.deserializeBinary( - message, - reader2, - jspb.BinaryReader.prototype.readString, - jspb.BinaryReader.prototype.readString, - null, - "", - "" - ); - }); - break; - case 3: var value = ( /** @type {string} */ reader.readString() ); - msg.setBody(value); + msg.setQuery(value); + break; + case 3: + var value = msg.getVariablesMap(); + reader.readMessage(value, function(message, reader2) { + jspb.Map.deserializeBinary(message, reader2, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); break; default: reader.skipField(); @@ -1863,67 +1937,75 @@ var init_avs_pb = __esm({ } return msg; }; - proto.aggregator.HTTPAPICall.prototype.serializeBinary = function() { + proto.aggregator.GraphQLQueryNode.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.HTTPAPICall.serializeBinaryToWriter(this, writer); + proto.aggregator.GraphQLQueryNode.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; - proto.aggregator.HTTPAPICall.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.GraphQLQueryNode.serializeBinaryToWriter = function(message, writer) { var f = void 0; f = message.getUrl(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } - f = message.getHeadersMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary( + f = message.getQuery(); + if (f.length > 0) { + writer.writeString( 2, - writer, - jspb.BinaryWriter.prototype.writeString, - jspb.BinaryWriter.prototype.writeString + f ); } - f = message.getBody(); - if (f.length > 0) { - writer.writeString(3, f); + f = message.getVariablesMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(3, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); } }; - proto.aggregator.HTTPAPICall.prototype.getUrl = function() { + proto.aggregator.GraphQLQueryNode.prototype.getUrl = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 1, "") ); }; - proto.aggregator.HTTPAPICall.prototype.setUrl = function(value) { + proto.aggregator.GraphQLQueryNode.prototype.setUrl = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; - proto.aggregator.HTTPAPICall.prototype.getHeadersMap = function(opt_noLazyCreate) { + proto.aggregator.GraphQLQueryNode.prototype.getQuery = function() { return ( - /** @type {!jspb.Map} */ - jspb.Message.getMapField(this, 2, opt_noLazyCreate, null) + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 2, "") ); }; - proto.aggregator.HTTPAPICall.prototype.clearHeadersMap = function() { - this.getHeadersMap().clear(); - return this; + proto.aggregator.GraphQLQueryNode.prototype.setQuery = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; - proto.aggregator.HTTPAPICall.prototype.getBody = function() { + proto.aggregator.GraphQLQueryNode.prototype.getVariablesMap = function(opt_noLazyCreate) { return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 3, "") + /** @type {!jspb.Map} */ + jspb.Message.getMapField( + this, + 3, + opt_noLazyCreate, + null + ) ); }; - proto.aggregator.HTTPAPICall.prototype.setBody = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); + proto.aggregator.GraphQLQueryNode.prototype.clearVariablesMap = function() { + this.getVariablesMap().clear(); + return this; }; if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.CustomCode.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.CustomCode.toObject(opt_includeInstance, this); + proto.aggregator.RestAPINode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.RestAPINode.toObject(opt_includeInstance, this); }; - proto.aggregator.CustomCode.toObject = function(includeInstance, msg) { + proto.aggregator.RestAPINode.toObject = function(includeInstance, msg) { var f, obj = { - type: jspb.Message.getFieldWithDefault(msg, 1, 0), - body: jspb.Message.getFieldWithDefault(msg, 2, "") + url: jspb.Message.getFieldWithDefault(msg, 1, ""), + headersMap: (f = msg.getHeadersMap()) ? f.toObject(includeInstance, void 0) : [], + body: jspb.Message.getFieldWithDefault(msg, 3, ""), + method: jspb.Message.getFieldWithDefault(msg, 4, "") }; if (includeInstance) { obj.$jspbMessageInstance = msg; @@ -1931,12 +2013,12 @@ var init_avs_pb = __esm({ return obj; }; } - proto.aggregator.CustomCode.deserializeBinary = function(bytes) { + proto.aggregator.RestAPINode.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.RestAPINode(); + return proto.aggregator.RestAPINode.deserializeBinaryFromReader(msg, reader); }; - proto.aggregator.CustomCode.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.RestAPINode.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -1945,18 +2027,31 @@ var init_avs_pb = __esm({ switch (field) { case 1: var value = ( - /** @type {!proto.aggregator.CustomCodeType} */ - reader.readEnum() + /** @type {string} */ + reader.readString() ); - msg.setType(value); + msg.setUrl(value); break; case 2: + var value = msg.getHeadersMap(); + reader.readMessage(value, function(message, reader2) { + jspb.Map.deserializeBinary(message, reader2, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; + case 3: var value = ( /** @type {string} */ reader.readString() ); msg.setBody(value); break; + case 4: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setMethod(value); + break; default: reader.skipField(); break; @@ -1964,48 +2059,178 @@ var init_avs_pb = __esm({ } return msg; }; - proto.aggregator.CustomCode.prototype.serializeBinary = function() { + proto.aggregator.RestAPINode.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.CustomCode.serializeBinaryToWriter(this, writer); + proto.aggregator.RestAPINode.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; - proto.aggregator.CustomCode.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.RestAPINode.serializeBinaryToWriter = function(message, writer) { var f = void 0; - f = message.getType(); - if (f !== 0) { - writer.writeEnum(1, f); - } - f = message.getBody(); + f = message.getUrl(); if (f.length > 0) { - writer.writeString(2, f); + writer.writeString( + 1, + f + ); } + f = message.getHeadersMap(true); + if (f && f.getLength() > 0) { + f.serializeBinary(2, writer, jspb.BinaryWriter.prototype.writeString, jspb.BinaryWriter.prototype.writeString); + } + f = message.getBody(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + f = message.getMethod(); + if (f.length > 0) { + writer.writeString( + 4, + f + ); + } + }; + proto.aggregator.RestAPINode.prototype.getUrl = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.RestAPINode.prototype.setUrl = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + proto.aggregator.RestAPINode.prototype.getHeadersMap = function(opt_noLazyCreate) { + return ( + /** @type {!jspb.Map} */ + jspb.Message.getMapField( + this, + 2, + opt_noLazyCreate, + null + ) + ); + }; + proto.aggregator.RestAPINode.prototype.clearHeadersMap = function() { + this.getHeadersMap().clear(); + return this; + }; + proto.aggregator.RestAPINode.prototype.getBody = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 3, "") + ); + }; + proto.aggregator.RestAPINode.prototype.setBody = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); + }; + proto.aggregator.RestAPINode.prototype.getMethod = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 4, "") + ); + }; + proto.aggregator.RestAPINode.prototype.setMethod = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.CustomCodeNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.CustomCodeNode.toObject(opt_includeInstance, this); + }; + proto.aggregator.CustomCodeNode.toObject = function(includeInstance, msg) { + var f, obj = { + type: jspb.Message.getFieldWithDefault(msg, 1, 0), + source: jspb.Message.getFieldWithDefault(msg, 2, "") + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.CustomCodeNode.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.CustomCodeNode(); + return proto.aggregator.CustomCodeNode.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.CustomCodeNode.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {!proto.aggregator.CustomCodeType} */ + reader.readEnum() + ); + msg.setType(value); + break; + case 2: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setSource(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; - proto.aggregator.CustomCode.prototype.getType = function() { + proto.aggregator.CustomCodeNode.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.CustomCodeNode.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.CustomCodeNode.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getType(); + if (f !== 0) { + writer.writeEnum( + 1, + f + ); + } + f = message.getSource(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + }; + proto.aggregator.CustomCodeNode.prototype.getType = function() { return ( /** @type {!proto.aggregator.CustomCodeType} */ jspb.Message.getFieldWithDefault(this, 1, 0) ); }; - proto.aggregator.CustomCode.prototype.setType = function(value) { + proto.aggregator.CustomCodeNode.prototype.setType = function(value) { return jspb.Message.setProto3EnumField(this, 1, value); }; - proto.aggregator.CustomCode.prototype.getBody = function() { + proto.aggregator.CustomCodeNode.prototype.getSource = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 2, "") ); }; - proto.aggregator.CustomCode.prototype.setBody = function(value) { + proto.aggregator.CustomCodeNode.prototype.setSource = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.ConditionJump.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.ConditionJump.toObject(opt_includeInstance, this); + proto.aggregator.Condition.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.Condition.toObject(opt_includeInstance, this); }; - proto.aggregator.ConditionJump.toObject = function(includeInstance, msg) { + proto.aggregator.Condition.toObject = function(includeInstance, msg) { var f, obj = { - expression: jspb.Message.getFieldWithDefault(msg, 1, ""), - next: jspb.Message.getFieldWithDefault(msg, 2, "") + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + type: jspb.Message.getFieldWithDefault(msg, 2, ""), + expression: jspb.Message.getFieldWithDefault(msg, 3, "") }; if (includeInstance) { obj.$jspbMessageInstance = msg; @@ -2013,15 +2238,196 @@ var init_avs_pb = __esm({ return obj; }; } - proto.aggregator.ConditionJump.deserializeBinary = function(bytes) { + proto.aggregator.Condition.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.Condition(); + return proto.aggregator.Condition.deserializeBinaryFromReader(msg, reader); + }; + 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; + }; + proto.aggregator.Condition.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.Condition.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.Condition.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getType(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getExpression(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } + }; + proto.aggregator.Condition.prototype.getId = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") ); }; - proto.aggregator.ConditionJump.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.Condition.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + proto.aggregator.Condition.prototype.getType = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 2, "") + ); + }; + proto.aggregator.Condition.prototype.setType = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); + }; + proto.aggregator.Condition.prototype.getExpression = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 3, "") + ); + }; + proto.aggregator.Condition.prototype.setExpression = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); + }; + proto.aggregator.BranchNode.repeatedFields_ = [1]; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.BranchNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.BranchNode.toObject(opt_includeInstance, this); + }; + 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; + }; + } + 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); + }; + 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; + }; + proto.aggregator.BranchNode.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.BranchNode.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.BranchNode.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getConditionsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.aggregator.Condition.serializeBinaryToWriter + ); + } + }; + proto.aggregator.BranchNode.prototype.getConditionsList = function() { + return ( + /** @type{!Array} */ + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.Condition, 1) + ); + }; + proto.aggregator.BranchNode.prototype.setConditionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); + }; + proto.aggregator.BranchNode.prototype.addConditions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.aggregator.Condition, opt_index); + }; + proto.aggregator.BranchNode.prototype.clearConditionsList = function() { + return this.setConditionsList([]); + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.FilterNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.FilterNode.toObject(opt_includeInstance, this); + }; + proto.aggregator.FilterNode.toObject = function(includeInstance, msg) { + var f, obj = { + expression: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + 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); + }; + proto.aggregator.FilterNode.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2035,12 +2441,77 @@ var init_avs_pb = __esm({ ); msg.setExpression(value); break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.FilterNode.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.FilterNode.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.FilterNode.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getExpression(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + }; + proto.aggregator.FilterNode.prototype.getExpression = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.FilterNode.prototype.setExpression = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.LoopNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.LoopNode.toObject(opt_includeInstance, this); + }; + 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; + }; + } + 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); + }; + 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.setNext(value); + msg.setIterKey(value); break; default: reader.skipField(); @@ -2049,54 +2520,55 @@ var init_avs_pb = __esm({ } return msg; }; - proto.aggregator.ConditionJump.prototype.serializeBinary = function() { + proto.aggregator.LoopNode.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.ConditionJump.serializeBinaryToWriter(this, writer); + proto.aggregator.LoopNode.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; - proto.aggregator.ConditionJump.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.LoopNode.serializeBinaryToWriter = function(message, writer) { var f = void 0; - f = message.getExpression(); + f = message.getIterVar(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } - f = message.getNext(); + f = message.getIterKey(); if (f.length > 0) { - writer.writeString(2, f); + writer.writeString( + 2, + f + ); } }; - proto.aggregator.ConditionJump.prototype.getExpression = function() { + proto.aggregator.LoopNode.prototype.getIterVar = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 1, "") ); }; - proto.aggregator.ConditionJump.prototype.setExpression = function(value) { + proto.aggregator.LoopNode.prototype.setIterVar = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; - proto.aggregator.ConditionJump.prototype.getNext = function() { + proto.aggregator.LoopNode.prototype.getIterKey = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 2, "") ); }; - proto.aggregator.ConditionJump.prototype.setNext = function(value) { + proto.aggregator.LoopNode.prototype.setIterKey = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; - proto.aggregator.BranchAction.repeatedFields_ = [2]; if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.BranchAction.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.BranchAction.toObject(opt_includeInstance, this); + proto.aggregator.TaskEdge.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.TaskEdge.toObject(opt_includeInstance, this); }; - proto.aggregator.BranchAction.toObject = function(includeInstance, msg) { + proto.aggregator.TaskEdge.toObject = function(includeInstance, msg) { var f, obj = { - pb_if: (f = msg.getIf()) && proto.aggregator.ConditionJump.toObject(includeInstance, f), - elseifsList: jspb.Message.toObjectList( - msg.getElseifsList(), - proto.aggregator.ConditionJump.toObject, - includeInstance - ), - pb_else: (f = msg.getElse()) && proto.aggregator.ConditionJump.toObject(includeInstance, f) + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + source: jspb.Message.getFieldWithDefault(msg, 2, ""), + target: jspb.Message.getFieldWithDefault(msg, 3, "") }; if (includeInstance) { obj.$jspbMessageInstance = msg; @@ -2104,12 +2576,12 @@ var init_avs_pb = __esm({ return obj; }; } - proto.aggregator.BranchAction.deserializeBinary = function(bytes) { + proto.aggregator.TaskEdge.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.BranchAction(); - return proto.aggregator.BranchAction.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.TaskEdge(); + return proto.aggregator.TaskEdge.deserializeBinaryFromReader(msg, reader); }; - proto.aggregator.BranchAction.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.TaskEdge.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -2117,28 +2589,25 @@ var init_avs_pb = __esm({ var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.aggregator.ConditionJump(); - reader.readMessage( - value, - proto.aggregator.ConditionJump.deserializeBinaryFromReader + var value = ( + /** @type {string} */ + reader.readString() ); - msg.setIf(value); + msg.setId(value); break; case 2: - var value = new proto.aggregator.ConditionJump(); - reader.readMessage( - value, - proto.aggregator.ConditionJump.deserializeBinaryFromReader + var value = ( + /** @type {string} */ + reader.readString() ); - msg.addElseifs(value); + msg.setSource(value); break; case 3: - var value = new proto.aggregator.ConditionJump(); - reader.readMessage( - value, - proto.aggregator.ConditionJump.deserializeBinaryFromReader + var value = ( + /** @type {string} */ + reader.readString() ); - msg.setElse(value); + msg.setTarget(value); break; default: reader.skipField(); @@ -2147,110 +2616,98 @@ var init_avs_pb = __esm({ } return msg; }; - proto.aggregator.BranchAction.prototype.serializeBinary = function() { + proto.aggregator.TaskEdge.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.BranchAction.serializeBinaryToWriter(this, writer); + proto.aggregator.TaskEdge.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; - proto.aggregator.BranchAction.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.TaskEdge.serializeBinaryToWriter = function(message, writer) { var f = void 0; - f = message.getIf(); - if (f != null) { - writer.writeMessage( + f = message.getId(); + if (f.length > 0) { + writer.writeString( 1, - f, - proto.aggregator.ConditionJump.serializeBinaryToWriter + f ); } - f = message.getElseifsList(); + f = message.getSource(); if (f.length > 0) { - writer.writeRepeatedMessage( + writer.writeString( 2, - f, - proto.aggregator.ConditionJump.serializeBinaryToWriter + f ); } - f = message.getElse(); - if (f != null) { - writer.writeMessage( + f = message.getTarget(); + if (f.length > 0) { + writer.writeString( 3, - f, - proto.aggregator.ConditionJump.serializeBinaryToWriter + f ); } }; - proto.aggregator.BranchAction.prototype.getIf = function() { + proto.aggregator.TaskEdge.prototype.getId = function() { return ( - /** @type{?proto.aggregator.ConditionJump} */ - jspb.Message.getWrapperField(this, proto.aggregator.ConditionJump, 1) + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") ); }; - proto.aggregator.BranchAction.prototype.setIf = function(value) { - return jspb.Message.setWrapperField(this, 1, value); - }; - proto.aggregator.BranchAction.prototype.clearIf = function() { - return this.setIf(void 0); - }; - proto.aggregator.BranchAction.prototype.hasIf = function() { - return jspb.Message.getField(this, 1) != null; + proto.aggregator.TaskEdge.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; - proto.aggregator.BranchAction.prototype.getElseifsList = function() { + proto.aggregator.TaskEdge.prototype.getSource = function() { return ( - /** @type{!Array} */ - jspb.Message.getRepeatedWrapperField( - this, - proto.aggregator.ConditionJump, - 2 - ) + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 2, "") ); }; - proto.aggregator.BranchAction.prototype.setElseifsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); + proto.aggregator.TaskEdge.prototype.setSource = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; - proto.aggregator.BranchAction.prototype.addElseifs = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField( - this, - 2, - opt_value, - proto.aggregator.ConditionJump, - opt_index + proto.aggregator.TaskEdge.prototype.getTarget = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 3, "") ); }; - proto.aggregator.BranchAction.prototype.clearElseifsList = function() { - return this.setElseifsList([]); + proto.aggregator.TaskEdge.prototype.setTarget = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); }; - proto.aggregator.BranchAction.prototype.getElse = function() { + proto.aggregator.TaskNode.oneofGroups_ = [[10, 11, 12, 13, 14, 15, 16, 17, 18]]; + 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 + }; + proto.aggregator.TaskNode.prototype.getTaskTypeCase = function() { return ( - /** @type{?proto.aggregator.ConditionJump} */ - jspb.Message.getWrapperField(this, proto.aggregator.ConditionJump, 3) + /** @type {proto.aggregator.TaskNode.TaskTypeCase} */ + jspb.Message.computeOneofCase(this, proto.aggregator.TaskNode.oneofGroups_[0]) ); }; - proto.aggregator.BranchAction.prototype.setElse = function(value) { - return jspb.Message.setWrapperField(this, 3, value); - }; - proto.aggregator.BranchAction.prototype.clearElse = function() { - return this.setElse(void 0); - }; - proto.aggregator.BranchAction.prototype.hasElse = function() { - return jspb.Message.getField(this, 3) != null; - }; - proto.aggregator.TaskAction.repeatedFields_ = [4]; if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.TaskAction.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.TaskAction.toObject(opt_includeInstance, this); + proto.aggregator.TaskNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.TaskNode.toObject(opt_includeInstance, this); }; - proto.aggregator.TaskAction.toObject = function(includeInstance, msg) { + proto.aggregator.TaskNode.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 ? void 0 : f, - ethTransfer: (f = msg.getEthTransfer()) && proto.aggregator.ETHTransfer.toObject(includeInstance, f), - contractExecution: (f = msg.getContractExecution()) && proto.aggregator.ContractExecution.toObject(includeInstance, f), - graphqlDataQuery: (f = msg.getGraphqlDataQuery()) && proto.aggregator.GraphQLDataQuery.toObject(includeInstance, f), - httpDataQuery: (f = msg.getHttpDataQuery()) && proto.aggregator.HTTPAPICall.toObject(includeInstance, f), - customCode: (f = msg.getCustomCode()) && proto.aggregator.CustomCode.toObject(includeInstance, f), - branch: (f = msg.getBranch()) && proto.aggregator.BranchAction.toObject(includeInstance, f) + ethTransfer: (f = msg.getEthTransfer()) && proto.aggregator.ETHTransferNode.toObject(includeInstance, f), + contractWrite: (f = msg.getContractWrite()) && proto.aggregator.ContractWriteNode.toObject(includeInstance, f), + contractRead: (f = msg.getContractRead()) && proto.aggregator.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; @@ -2258,25 +2715,18 @@ var init_avs_pb = __esm({ return obj; }; } - proto.aggregator.TaskAction.deserializeBinary = function(bytes) { + proto.aggregator.TaskNode.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.TaskAction(); - return proto.aggregator.TaskAction.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.TaskNode(); + return proto.aggregator.TaskNode.deserializeBinaryFromReader(msg, reader); }; - proto.aggregator.TaskAction.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.TaskNode.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = ( - /** @type {!proto.aggregator.TaskType} */ - reader.readEnum() - ); - msg.setTaskType(value); - break; case 2: var value = ( /** @type {string} */ @@ -2291,61 +2741,51 @@ var init_avs_pb = __esm({ ); msg.setName(value); break; - case 4: - var value = ( - /** @type {string} */ - reader.readString() - ); - msg.addNext(value); - break; case 10: - var value = new proto.aggregator.ETHTransfer(); - reader.readMessage( - value, - proto.aggregator.ETHTransfer.deserializeBinaryFromReader - ); + var value = new proto.aggregator.ETHTransferNode(); + reader.readMessage(value, proto.aggregator.ETHTransferNode.deserializeBinaryFromReader); msg.setEthTransfer(value); break; case 11: - var value = new proto.aggregator.ContractExecution(); - reader.readMessage( - value, - proto.aggregator.ContractExecution.deserializeBinaryFromReader - ); - msg.setContractExecution(value); + var value = new proto.aggregator.ContractWriteNode(); + reader.readMessage(value, proto.aggregator.ContractWriteNode.deserializeBinaryFromReader); + msg.setContractWrite(value); break; case 12: - var value = new proto.aggregator.GraphQLDataQuery(); - reader.readMessage( - value, - proto.aggregator.GraphQLDataQuery.deserializeBinaryFromReader - ); - msg.setGraphqlDataQuery(value); + var value = new proto.aggregator.ContractReadNode(); + reader.readMessage(value, proto.aggregator.ContractReadNode.deserializeBinaryFromReader); + msg.setContractRead(value); break; case 13: - var value = new proto.aggregator.HTTPAPICall(); - reader.readMessage( - value, - proto.aggregator.HTTPAPICall.deserializeBinaryFromReader - ); - msg.setHttpDataQuery(value); + var value = new proto.aggregator.GraphQLQueryNode(); + reader.readMessage(value, proto.aggregator.GraphQLQueryNode.deserializeBinaryFromReader); + msg.setGraphqlDataQuery(value); break; case 14: - var value = new proto.aggregator.CustomCode(); - reader.readMessage( - value, - proto.aggregator.CustomCode.deserializeBinaryFromReader - ); - msg.setCustomCode(value); + var value = new proto.aggregator.RestAPINode(); + reader.readMessage(value, proto.aggregator.RestAPINode.deserializeBinaryFromReader); + msg.setRestApi(value); break; case 15: - var value = new proto.aggregator.BranchAction(); - reader.readMessage( - value, - proto.aggregator.BranchAction.deserializeBinaryFromReader - ); + var value = new proto.aggregator.BranchNode(); + reader.readMessage(value, proto.aggregator.BranchNode.deserializeBinaryFromReader); msg.setBranch(value); break; + case 16: + var value = new proto.aggregator.FilterNode(); + reader.readMessage(value, proto.aggregator.FilterNode.deserializeBinaryFromReader); + msg.setFilter(value); + break; + case 17: + var value = new proto.aggregator.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; @@ -2353,67 +2793,65 @@ var init_avs_pb = __esm({ } return msg; }; - proto.aggregator.TaskAction.prototype.serializeBinary = function() { + proto.aggregator.TaskNode.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.TaskAction.serializeBinaryToWriter(this, writer); + proto.aggregator.TaskNode.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; - proto.aggregator.TaskAction.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.TaskNode.serializeBinaryToWriter = function(message, writer) { var f = void 0; - f = message.getTaskType(); - if (f !== 0) { - writer.writeEnum(1, f); - } f = message.getId(); if (f.length > 0) { - writer.writeString(2, f); + writer.writeString( + 2, + f + ); } f = message.getName(); if (f.length > 0) { - writer.writeString(3, f); - } - f = message.getNextList(); - if (f.length > 0) { - writer.writeRepeatedString(4, f); + writer.writeString( + 3, + f + ); } f = message.getEthTransfer(); if (f != null) { writer.writeMessage( 10, f, - proto.aggregator.ETHTransfer.serializeBinaryToWriter + proto.aggregator.ETHTransferNode.serializeBinaryToWriter ); } - f = message.getContractExecution(); + f = message.getContractWrite(); if (f != null) { writer.writeMessage( 11, f, - proto.aggregator.ContractExecution.serializeBinaryToWriter + proto.aggregator.ContractWriteNode.serializeBinaryToWriter ); } - f = message.getGraphqlDataQuery(); + f = message.getContractRead(); if (f != null) { writer.writeMessage( 12, f, - proto.aggregator.GraphQLDataQuery.serializeBinaryToWriter + proto.aggregator.ContractReadNode.serializeBinaryToWriter ); } - f = message.getHttpDataQuery(); + f = message.getGraphqlDataQuery(); if (f != null) { writer.writeMessage( 13, f, - proto.aggregator.HTTPAPICall.serializeBinaryToWriter + proto.aggregator.GraphQLQueryNode.serializeBinaryToWriter ); } - f = message.getCustomCode(); + f = message.getRestApi(); if (f != null) { writer.writeMessage( 14, f, - proto.aggregator.CustomCode.serializeBinaryToWriter + proto.aggregator.RestAPINode.serializeBinaryToWriter ); } f = message.getBranch(); @@ -2421,142 +2859,187 @@ var init_avs_pb = __esm({ writer.writeMessage( 15, f, - proto.aggregator.BranchAction.serializeBinaryToWriter + proto.aggregator.BranchNode.serializeBinaryToWriter + ); + } + f = message.getFilter(); + if (f != null) { + writer.writeMessage( + 16, + f, + proto.aggregator.FilterNode.serializeBinaryToWriter + ); + } + f = message.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 ); } }; - proto.aggregator.TaskAction.prototype.getTaskType = function() { - return ( - /** @type {!proto.aggregator.TaskType} */ - jspb.Message.getFieldWithDefault(this, 1, 0) - ); - }; - proto.aggregator.TaskAction.prototype.setTaskType = function(value) { - return jspb.Message.setProto3EnumField(this, 1, value); - }; - proto.aggregator.TaskAction.prototype.getId = function() { + proto.aggregator.TaskNode.prototype.getId = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 2, "") ); }; - proto.aggregator.TaskAction.prototype.setId = function(value) { + proto.aggregator.TaskNode.prototype.setId = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; - proto.aggregator.TaskAction.prototype.getName = function() { + proto.aggregator.TaskNode.prototype.getName = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 3, "") ); }; - proto.aggregator.TaskAction.prototype.setName = function(value) { + proto.aggregator.TaskNode.prototype.setName = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; - proto.aggregator.TaskAction.prototype.getNextList = function() { + proto.aggregator.TaskNode.prototype.getEthTransfer = function() { return ( - /** @type {!Array} */ - jspb.Message.getRepeatedField(this, 4) - ); - }; - proto.aggregator.TaskAction.prototype.setNextList = function(value) { - return jspb.Message.setField(this, 4, value || []); - }; - proto.aggregator.TaskAction.prototype.addNext = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 4, value, opt_index); - }; - proto.aggregator.TaskAction.prototype.clearNextList = function() { - return this.setNextList([]); - }; - proto.aggregator.TaskAction.prototype.getEthTransfer = function() { - return ( - /** @type{?proto.aggregator.ETHTransfer} */ - jspb.Message.getWrapperField(this, proto.aggregator.ETHTransfer, 10) + /** @type{?proto.aggregator.ETHTransferNode} */ + jspb.Message.getWrapperField(this, proto.aggregator.ETHTransferNode, 10) ); }; - proto.aggregator.TaskAction.prototype.setEthTransfer = function(value) { - return jspb.Message.setWrapperField(this, 10, value); + proto.aggregator.TaskNode.prototype.setEthTransfer = function(value) { + return jspb.Message.setOneofWrapperField(this, 10, proto.aggregator.TaskNode.oneofGroups_[0], value); }; - proto.aggregator.TaskAction.prototype.clearEthTransfer = function() { + proto.aggregator.TaskNode.prototype.clearEthTransfer = function() { return this.setEthTransfer(void 0); }; - proto.aggregator.TaskAction.prototype.hasEthTransfer = function() { + proto.aggregator.TaskNode.prototype.hasEthTransfer = function() { return jspb.Message.getField(this, 10) != null; }; - proto.aggregator.TaskAction.prototype.getContractExecution = function() { + proto.aggregator.TaskNode.prototype.getContractWrite = function() { return ( - /** @type{?proto.aggregator.ContractExecution} */ - jspb.Message.getWrapperField(this, proto.aggregator.ContractExecution, 11) + /** @type{?proto.aggregator.ContractWriteNode} */ + jspb.Message.getWrapperField(this, proto.aggregator.ContractWriteNode, 11) ); }; - proto.aggregator.TaskAction.prototype.setContractExecution = function(value) { - return jspb.Message.setWrapperField(this, 11, value); + proto.aggregator.TaskNode.prototype.setContractWrite = function(value) { + return jspb.Message.setOneofWrapperField(this, 11, proto.aggregator.TaskNode.oneofGroups_[0], value); }; - proto.aggregator.TaskAction.prototype.clearContractExecution = function() { - return this.setContractExecution(void 0); + proto.aggregator.TaskNode.prototype.clearContractWrite = function() { + return this.setContractWrite(void 0); }; - proto.aggregator.TaskAction.prototype.hasContractExecution = function() { + proto.aggregator.TaskNode.prototype.hasContractWrite = function() { return jspb.Message.getField(this, 11) != null; }; - proto.aggregator.TaskAction.prototype.getGraphqlDataQuery = function() { + proto.aggregator.TaskNode.prototype.getContractRead = function() { return ( - /** @type{?proto.aggregator.GraphQLDataQuery} */ - jspb.Message.getWrapperField(this, proto.aggregator.GraphQLDataQuery, 12) + /** @type{?proto.aggregator.ContractReadNode} */ + jspb.Message.getWrapperField(this, proto.aggregator.ContractReadNode, 12) ); }; - proto.aggregator.TaskAction.prototype.setGraphqlDataQuery = function(value) { - return jspb.Message.setWrapperField(this, 12, value); + proto.aggregator.TaskNode.prototype.setContractRead = function(value) { + return jspb.Message.setOneofWrapperField(this, 12, proto.aggregator.TaskNode.oneofGroups_[0], value); }; - proto.aggregator.TaskAction.prototype.clearGraphqlDataQuery = function() { - return this.setGraphqlDataQuery(void 0); + proto.aggregator.TaskNode.prototype.clearContractRead = function() { + return this.setContractRead(void 0); }; - proto.aggregator.TaskAction.prototype.hasGraphqlDataQuery = function() { + proto.aggregator.TaskNode.prototype.hasContractRead = function() { return jspb.Message.getField(this, 12) != null; }; - proto.aggregator.TaskAction.prototype.getHttpDataQuery = function() { + proto.aggregator.TaskNode.prototype.getGraphqlDataQuery = function() { return ( - /** @type{?proto.aggregator.HTTPAPICall} */ - jspb.Message.getWrapperField(this, proto.aggregator.HTTPAPICall, 13) + /** @type{?proto.aggregator.GraphQLQueryNode} */ + jspb.Message.getWrapperField(this, proto.aggregator.GraphQLQueryNode, 13) ); }; - proto.aggregator.TaskAction.prototype.setHttpDataQuery = function(value) { - return jspb.Message.setWrapperField(this, 13, value); + proto.aggregator.TaskNode.prototype.setGraphqlDataQuery = function(value) { + return jspb.Message.setOneofWrapperField(this, 13, proto.aggregator.TaskNode.oneofGroups_[0], value); }; - proto.aggregator.TaskAction.prototype.clearHttpDataQuery = function() { - return this.setHttpDataQuery(void 0); + proto.aggregator.TaskNode.prototype.clearGraphqlDataQuery = function() { + return this.setGraphqlDataQuery(void 0); }; - proto.aggregator.TaskAction.prototype.hasHttpDataQuery = function() { + proto.aggregator.TaskNode.prototype.hasGraphqlDataQuery = function() { return jspb.Message.getField(this, 13) != null; }; - proto.aggregator.TaskAction.prototype.getCustomCode = function() { + proto.aggregator.TaskNode.prototype.getRestApi = function() { return ( - /** @type{?proto.aggregator.CustomCode} */ - jspb.Message.getWrapperField(this, proto.aggregator.CustomCode, 14) + /** @type{?proto.aggregator.RestAPINode} */ + jspb.Message.getWrapperField(this, proto.aggregator.RestAPINode, 14) ); }; - proto.aggregator.TaskAction.prototype.setCustomCode = function(value) { - return jspb.Message.setWrapperField(this, 14, value); + proto.aggregator.TaskNode.prototype.setRestApi = function(value) { + return jspb.Message.setOneofWrapperField(this, 14, proto.aggregator.TaskNode.oneofGroups_[0], value); }; - proto.aggregator.TaskAction.prototype.clearCustomCode = function() { - return this.setCustomCode(void 0); + proto.aggregator.TaskNode.prototype.clearRestApi = function() { + return this.setRestApi(void 0); }; - proto.aggregator.TaskAction.prototype.hasCustomCode = function() { + proto.aggregator.TaskNode.prototype.hasRestApi = function() { return jspb.Message.getField(this, 14) != null; }; - proto.aggregator.TaskAction.prototype.getBranch = function() { + proto.aggregator.TaskNode.prototype.getBranch = function() { return ( - /** @type{?proto.aggregator.BranchAction} */ - jspb.Message.getWrapperField(this, proto.aggregator.BranchAction, 15) + /** @type{?proto.aggregator.BranchNode} */ + jspb.Message.getWrapperField(this, proto.aggregator.BranchNode, 15) ); }; - proto.aggregator.TaskAction.prototype.setBranch = function(value) { - return jspb.Message.setWrapperField(this, 15, value); + proto.aggregator.TaskNode.prototype.setBranch = function(value) { + return jspb.Message.setOneofWrapperField(this, 15, proto.aggregator.TaskNode.oneofGroups_[0], value); }; - proto.aggregator.TaskAction.prototype.clearBranch = function() { + proto.aggregator.TaskNode.prototype.clearBranch = function() { return this.setBranch(void 0); }; - proto.aggregator.TaskAction.prototype.hasBranch = function() { + proto.aggregator.TaskNode.prototype.hasBranch = function() { return jspb.Message.getField(this, 15) != null; }; + proto.aggregator.TaskNode.prototype.getFilter = function() { + return ( + /** @type{?proto.aggregator.FilterNode} */ + jspb.Message.getWrapperField(this, proto.aggregator.FilterNode, 16) + ); + }; + proto.aggregator.TaskNode.prototype.setFilter = function(value) { + return jspb.Message.setOneofWrapperField(this, 16, proto.aggregator.TaskNode.oneofGroups_[0], value); + }; + proto.aggregator.TaskNode.prototype.clearFilter = function() { + return this.setFilter(void 0); + }; + proto.aggregator.TaskNode.prototype.hasFilter = function() { + return jspb.Message.getField(this, 16) != null; + }; + proto.aggregator.TaskNode.prototype.getLoop = function() { + return ( + /** @type{?proto.aggregator.LoopNode} */ + jspb.Message.getWrapperField(this, proto.aggregator.LoopNode, 17) + ); + }; + proto.aggregator.TaskNode.prototype.setLoop = function(value) { + return jspb.Message.setOneofWrapperField(this, 17, proto.aggregator.TaskNode.oneofGroups_[0], value); + }; + proto.aggregator.TaskNode.prototype.clearLoop = function() { + return this.setLoop(void 0); + }; + proto.aggregator.TaskNode.prototype.hasLoop = function() { + return jspb.Message.getField(this, 17) != null; + }; + proto.aggregator.TaskNode.prototype.getCustomCode = function() { + return ( + /** @type{?proto.aggregator.CustomCodeNode} */ + jspb.Message.getWrapperField(this, proto.aggregator.CustomCodeNode, 18) + ); + }; + proto.aggregator.TaskNode.prototype.setCustomCode = function(value) { + return jspb.Message.setOneofWrapperField(this, 18, proto.aggregator.TaskNode.oneofGroups_[0], value); + }; + proto.aggregator.TaskNode.prototype.clearCustomCode = function() { + return this.setCustomCode(void 0); + }; + proto.aggregator.TaskNode.prototype.hasCustomCode = function() { + return jspb.Message.getField(this, 18) != null; + }; if (jspb.Message.GENERATE_TO_OBJECT) { proto.aggregator.Execution.prototype.toObject = function(opt_includeInstance) { return proto.aggregator.Execution.toObject(opt_includeInstance, this); @@ -2622,15 +3105,24 @@ var init_avs_pb = __esm({ var f = void 0; f = message.getEpoch(); if (f !== 0) { - writer.writeInt64(1, f); + writer.writeInt64( + 1, + f + ); } f = message.getUserOpHash(); if (f.length > 0) { - writer.writeString(2, f); + writer.writeString( + 2, + f + ); } f = message.getError(); if (f.length > 0) { - writer.writeString(3, f); + writer.writeString( + 3, + f + ); } }; proto.aggregator.Execution.prototype.getEpoch = function() { @@ -2660,28 +3152,33 @@ var init_avs_pb = __esm({ proto.aggregator.Execution.prototype.setError = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; - proto.aggregator.Task.repeatedFields_ = [5, 12]; + proto.aggregator.Task.repeatedFields_ = [11, 12, 13]; if (jspb.Message.GENERATE_TO_OBJECT) { proto.aggregator.Task.prototype.toObject = function(opt_includeInstance) { return proto.aggregator.Task.toObject(opt_includeInstance, this); }; proto.aggregator.Task.toObject = function(includeInstance, msg) { var f, obj = { - id: (f = msg.getId()) && proto.aggregator.UUID.toObject(includeInstance, f), + id: jspb.Message.getFieldWithDefault(msg, 1, ""), owner: jspb.Message.getFieldWithDefault(msg, 2, ""), - smartAccountAddress: jspb.Message.getFieldWithDefault(msg, 3, ""), + 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.TaskAction.toObject, + proto.aggregator.TaskNode.toObject, + includeInstance + ), + edgesList: jspb.Message.toObjectList( + msg.getEdgesList(), + proto.aggregator.TaskEdge.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, @@ -2707,10 +3204,9 @@ var init_avs_pb = __esm({ var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.aggregator.UUID(); - reader.readMessage( - value, - proto.aggregator.UUID.deserializeBinaryFromReader + var value = ( + /** @type {string} */ + reader.readString() ); msg.setId(value); break; @@ -2726,72 +3222,68 @@ var init_avs_pb = __esm({ /** @type {string} */ reader.readString() ); - msg.setSmartAccountAddress(value); + msg.setSmartWalletAddress(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: var value = ( /** @type {number} */ reader.readInt64() ); msg.setStartAt(value); break; - case 7: + case 5: var value = ( /** @type {number} */ reader.readInt64() ); msg.setExpiredAt(value); break; - case 8: + case 6: var value = ( /** @type {string} */ reader.readString() ); msg.setMemo(value); break; - case 9: + case 7: var value = ( /** @type {number} */ reader.readInt64() ); msg.setCompletedAt(value); break; - case 10: + 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 = ( - /** @type {boolean} */ - reader.readBool() - ); - msg.setRepeatable(value); + var value = new proto.aggregator.TaskNode(); + reader.readMessage(value, proto.aggregator.TaskNode.deserializeBinaryFromReader); + msg.addNodes(value); break; case 12: + var value = new proto.aggregator.TaskEdge(); + reader.readMessage(value, proto.aggregator.TaskEdge.deserializeBinaryFromReader); + msg.addEdges(value); + break; + case 13: var value = new proto.aggregator.Execution(); - reader.readMessage( - value, - proto.aggregator.Execution.deserializeBinaryFromReader - ); + reader.readMessage(value, proto.aggregator.Execution.deserializeBinaryFromReader); msg.addExecutions(value); break; default: @@ -2809,61 +3301,96 @@ var init_avs_pb = __esm({ proto.aggregator.Task.serializeBinaryToWriter = function(message, writer) { var f = void 0; 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); + writer.writeString( + 1, + f + ); } - f = message.getSmartAccountAddress(); + f = message.getOwner(); if (f.length > 0) { - writer.writeString(3, f); - } - f = message.getTrigger(); - if (f != null) { - writer.writeMessage( - 4, - f, - proto.aggregator.TaskTrigger.serializeBinaryToWriter + writer.writeString( + 2, + f ); } - f = message.getNodesList(); + f = message.getSmartWalletAddress(); if (f.length > 0) { - writer.writeRepeatedMessage( - 5, - f, - proto.aggregator.TaskAction.serializeBinaryToWriter + writer.writeString( + 3, + f ); } f = message.getStartAt(); if (f !== 0) { - writer.writeInt64(6, f); + writer.writeInt64( + 4, + f + ); } f = message.getExpiredAt(); if (f !== 0) { - writer.writeInt64(7, f); + writer.writeInt64( + 5, + f + ); } f = message.getMemo(); if (f.length > 0) { - writer.writeString(8, f); + writer.writeString( + 6, + f + ); } f = message.getCompletedAt(); if (f !== 0) { - writer.writeInt64(9, f); + writer.writeInt64( + 7, + f + ); + } + f = message.getMaxExecution(); + if (f !== 0) { + writer.writeInt64( + 8, + f + ); } f = message.getStatus(); if (f !== 0) { - writer.writeEnum(10, f); + 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.getRepeatable(); - if (f) { - writer.writeBool(11, f); + f = message.getEdgesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 12, + f, + proto.aggregator.TaskEdge.serializeBinaryToWriter + ); } f = message.getExecutionsList(); if (f.length > 0) { writer.writeRepeatedMessage( - 12, + 13, f, proto.aggregator.Execution.serializeBinaryToWriter ); @@ -2871,18 +3398,12 @@ var init_avs_pb = __esm({ }; proto.aggregator.Task.prototype.getId = function() { return ( - /** @type{?proto.aggregator.UUID} */ - jspb.Message.getWrapperField(this, proto.aggregator.UUID, 1) + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") ); }; proto.aggregator.Task.prototype.setId = function(value) { - return jspb.Message.setWrapperField(this, 1, value); - }; - proto.aggregator.Task.prototype.clearId = function() { - return this.setId(void 0); - }; - proto.aggregator.Task.prototype.hasId = function() { - return jspb.Message.getField(this, 1) != null; + return jspb.Message.setProto3StringField(this, 1, value); }; proto.aggregator.Task.prototype.getOwner = function() { return ( @@ -2893,127 +3414,130 @@ var init_avs_pb = __esm({ proto.aggregator.Task.prototype.setOwner = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; - proto.aggregator.Task.prototype.getSmartAccountAddress = function() { + proto.aggregator.Task.prototype.getSmartWalletAddress = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 3, "") ); }; - proto.aggregator.Task.prototype.setSmartAccountAddress = function(value) { - return jspb.Message.setProto3StringField(this, 3, value); - }; - proto.aggregator.Task.prototype.getTrigger = function() { - return ( - /** @type{?proto.aggregator.TaskTrigger} */ - jspb.Message.getWrapperField(this, proto.aggregator.TaskTrigger, 4) - ); - }; - proto.aggregator.Task.prototype.setTrigger = function(value) { - return jspb.Message.setWrapperField(this, 4, value); - }; - proto.aggregator.Task.prototype.clearTrigger = function() { - return this.setTrigger(void 0); - }; - proto.aggregator.Task.prototype.hasTrigger = function() { - return jspb.Message.getField(this, 4) != null; - }; - proto.aggregator.Task.prototype.getNodesList = function() { - return ( - /** @type{!Array} */ - jspb.Message.getRepeatedWrapperField(this, proto.aggregator.TaskAction, 5) - ); - }; - proto.aggregator.Task.prototype.setNodesList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 5, value); - }; - 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.Task.prototype.clearNodesList = function() { - return this.setNodesList([]); + proto.aggregator.Task.prototype.setSmartWalletAddress = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); }; proto.aggregator.Task.prototype.getStartAt = function() { return ( /** @type {number} */ - jspb.Message.getFieldWithDefault(this, 6, 0) + jspb.Message.getFieldWithDefault(this, 4, 0) ); }; proto.aggregator.Task.prototype.setStartAt = function(value) { - return jspb.Message.setProto3IntField(this, 6, value); + return jspb.Message.setProto3IntField(this, 4, value); }; proto.aggregator.Task.prototype.getExpiredAt = function() { return ( /** @type {number} */ - jspb.Message.getFieldWithDefault(this, 7, 0) + jspb.Message.getFieldWithDefault(this, 5, 0) ); }; proto.aggregator.Task.prototype.setExpiredAt = function(value) { - return jspb.Message.setProto3IntField(this, 7, value); + return jspb.Message.setProto3IntField(this, 5, value); }; proto.aggregator.Task.prototype.getMemo = function() { return ( /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 8, "") + jspb.Message.getFieldWithDefault(this, 6, "") ); }; proto.aggregator.Task.prototype.setMemo = function(value) { - return jspb.Message.setProto3StringField(this, 8, value); + return jspb.Message.setProto3StringField(this, 6, value); }; proto.aggregator.Task.prototype.getCompletedAt = function() { return ( /** @type {number} */ - jspb.Message.getFieldWithDefault(this, 9, 0) + jspb.Message.getFieldWithDefault(this, 7, 0) ); }; proto.aggregator.Task.prototype.setCompletedAt = function(value) { - return jspb.Message.setProto3IntField(this, 9, value); + return jspb.Message.setProto3IntField(this, 7, value); + }; + proto.aggregator.Task.prototype.getMaxExecution = function() { + return ( + /** @type {number} */ + jspb.Message.getFieldWithDefault(this, 8, 0) + ); + }; + proto.aggregator.Task.prototype.setMaxExecution = function(value) { + return jspb.Message.setProto3IntField(this, 8, value); }; proto.aggregator.Task.prototype.getStatus = function() { return ( /** @type {!proto.aggregator.TaskStatus} */ - jspb.Message.getFieldWithDefault(this, 10, 0) + jspb.Message.getFieldWithDefault(this, 9, 0) ); }; proto.aggregator.Task.prototype.setStatus = function(value) { - return jspb.Message.setProto3EnumField(this, 10, value); + return jspb.Message.setProto3EnumField(this, 9, value); }; - proto.aggregator.Task.prototype.getRepeatable = function() { + proto.aggregator.Task.prototype.getTrigger = function() { return ( - /** @type {boolean} */ - jspb.Message.getBooleanFieldWithDefault(this, 11, false) + /** @type{?proto.aggregator.TaskTrigger} */ + jspb.Message.getWrapperField(this, proto.aggregator.TaskTrigger, 10) + ); + }; + proto.aggregator.Task.prototype.setTrigger = function(value) { + return jspb.Message.setWrapperField(this, 10, value); + }; + proto.aggregator.Task.prototype.clearTrigger = function() { + return this.setTrigger(void 0); + }; + proto.aggregator.Task.prototype.hasTrigger = function() { + return jspb.Message.getField(this, 10) != null; + }; + proto.aggregator.Task.prototype.getNodesList = function() { + return ( + /** @type{!Array} */ + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.TaskNode, 11) + ); + }; + proto.aggregator.Task.prototype.setNodesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 11, value); + }; + proto.aggregator.Task.prototype.addNodes = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 11, opt_value, proto.aggregator.TaskNode, opt_index); + }; + proto.aggregator.Task.prototype.clearNodesList = function() { + return this.setNodesList([]); + }; + proto.aggregator.Task.prototype.getEdgesList = function() { + return ( + /** @type{!Array} */ + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.TaskEdge, 12) ); }; - proto.aggregator.Task.prototype.setRepeatable = function(value) { - return jspb.Message.setProto3BooleanField(this, 11, value); + proto.aggregator.Task.prototype.setEdgesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 12, value); + }; + proto.aggregator.Task.prototype.addEdges = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 12, opt_value, proto.aggregator.TaskEdge, opt_index); + }; + proto.aggregator.Task.prototype.clearEdgesList = function() { + return this.setEdgesList([]); }; proto.aggregator.Task.prototype.getExecutionsList = function() { return ( /** @type{!Array} */ - jspb.Message.getRepeatedWrapperField(this, proto.aggregator.Execution, 12) + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.Execution, 13) ); }; proto.aggregator.Task.prototype.setExecutionsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 12, value); + return jspb.Message.setRepeatedWrapperField(this, 13, value); }; proto.aggregator.Task.prototype.addExecutions = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField( - this, - 12, - opt_value, - proto.aggregator.Execution, - opt_index - ); + return jspb.Message.addToRepeatedWrapperField(this, 13, opt_value, proto.aggregator.Execution, opt_index); }; proto.aggregator.Task.prototype.clearExecutionsList = function() { return this.setExecutionsList([]); }; - proto.aggregator.CreateTaskReq.repeatedFields_ = [2]; + proto.aggregator.CreateTaskReq.repeatedFields_ = [7, 8]; if (jspb.Message.GENERATE_TO_OBJECT) { proto.aggregator.CreateTaskReq.prototype.toObject = function(opt_includeInstance) { return proto.aggregator.CreateTaskReq.toObject(opt_includeInstance, this); @@ -3021,15 +3545,21 @@ var init_avs_pb = __esm({ proto.aggregator.CreateTaskReq.toObject = function(includeInstance, msg) { var f, obj = { trigger: (f = msg.getTrigger()) && proto.aggregator.TaskTrigger.toObject(includeInstance, f), - actionsList: jspb.Message.toObjectList( - msg.getActionsList(), - proto.aggregator.TaskAction.toObject, + 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.TaskNode.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) + edgesList: jspb.Message.toObjectList( + msg.getEdgesList(), + proto.aggregator.TaskEdge.toObject, + includeInstance + ) }; if (includeInstance) { obj.$jspbMessageInstance = msg; @@ -3040,10 +3570,7 @@ var init_avs_pb = __esm({ proto.aggregator.CreateTaskReq.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.aggregator.CreateTaskReq(); - return proto.aggregator.CreateTaskReq.deserializeBinaryFromReader( - msg, - reader - ); + return proto.aggregator.CreateTaskReq.deserializeBinaryFromReader(msg, reader); }; proto.aggregator.CreateTaskReq.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { @@ -3054,47 +3581,53 @@ var init_avs_pb = __esm({ switch (field) { case 1: var value = new proto.aggregator.TaskTrigger(); - reader.readMessage( - value, - proto.aggregator.TaskTrigger.deserializeBinaryFromReader - ); + 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 + var value = ( + /** @type {number} */ + reader.readInt64() ); - msg.addActions(value); + msg.setStartAt(value); break; case 3: var value = ( /** @type {number} */ reader.readInt64() ); - msg.setStartAt(value); + msg.setExpiredAt(value); break; case 4: var value = ( /** @type {number} */ reader.readInt64() ); - msg.setExpiredAt(value); + msg.setMaxExecution(value); break; case 5: var value = ( /** @type {string} */ reader.readString() ); - msg.setMemo(value); + msg.setSmartWalletAddress(value); break; case 6: var value = ( - /** @type {boolean} */ - reader.readBool() + /** @type {string} */ + reader.readString() ); - msg.setRepeatable(value); + msg.setMemo(value); + break; + case 7: + var value = new proto.aggregator.TaskNode(); + reader.readMessage(value, proto.aggregator.TaskNode.deserializeBinaryFromReader); + msg.addNodes(value); + break; + case 8: + var value = new proto.aggregator.TaskEdge(); + reader.readMessage(value, proto.aggregator.TaskEdge.deserializeBinaryFromReader); + msg.addEdges(value); break; default: reader.skipField(); @@ -3118,29 +3651,56 @@ var init_avs_pb = __esm({ proto.aggregator.TaskTrigger.serializeBinaryToWriter ); } - f = message.getActionsList(); - if (f.length > 0) { - writer.writeRepeatedMessage( + f = message.getStartAt(); + if (f !== 0) { + writer.writeInt64( 2, - f, - proto.aggregator.TaskAction.serializeBinaryToWriter + f ); } - f = message.getStartAt(); + f = message.getExpiredAt(); if (f !== 0) { - writer.writeInt64(3, f); + writer.writeInt64( + 3, + f + ); } - f = message.getExpiredAt(); + f = message.getMaxExecution(); if (f !== 0) { - writer.writeInt64(4, f); + writer.writeInt64( + 4, + f + ); + } + f = message.getSmartWalletAddress(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); } f = message.getMemo(); if (f.length > 0) { - writer.writeString(5, f); + writer.writeString( + 6, + f + ); + } + f = message.getNodesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 7, + f, + proto.aggregator.TaskNode.serializeBinaryToWriter + ); } - f = message.getRepeatable(); - if (f) { - writer.writeBool(6, f); + f = message.getEdgesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 8, + f, + proto.aggregator.TaskEdge.serializeBinaryToWriter + ); } }; proto.aggregator.CreateTaskReq.prototype.getTrigger = function() { @@ -3158,62 +3718,80 @@ var init_avs_pb = __esm({ proto.aggregator.CreateTaskReq.prototype.hasTrigger = function() { return jspb.Message.getField(this, 1) != null; }; - proto.aggregator.CreateTaskReq.prototype.getActionsList = function() { + proto.aggregator.CreateTaskReq.prototype.getStartAt = function() { return ( - /** @type{!Array} */ - jspb.Message.getRepeatedWrapperField(this, proto.aggregator.TaskAction, 2) - ); - }; - proto.aggregator.CreateTaskReq.prototype.setActionsList = function(value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); - }; - proto.aggregator.CreateTaskReq.prototype.addActions = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField( - this, - 2, - opt_value, - proto.aggregator.TaskAction, - opt_index + /** @type {number} */ + jspb.Message.getFieldWithDefault(this, 2, 0) ); }; - proto.aggregator.CreateTaskReq.prototype.clearActionsList = function() { - return this.setActionsList([]); + proto.aggregator.CreateTaskReq.prototype.setStartAt = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); }; - proto.aggregator.CreateTaskReq.prototype.getStartAt = function() { + proto.aggregator.CreateTaskReq.prototype.getExpiredAt = function() { return ( /** @type {number} */ jspb.Message.getFieldWithDefault(this, 3, 0) ); }; - proto.aggregator.CreateTaskReq.prototype.setStartAt = function(value) { + proto.aggregator.CreateTaskReq.prototype.setExpiredAt = function(value) { return jspb.Message.setProto3IntField(this, 3, value); }; - proto.aggregator.CreateTaskReq.prototype.getExpiredAt = function() { + proto.aggregator.CreateTaskReq.prototype.getMaxExecution = function() { return ( /** @type {number} */ jspb.Message.getFieldWithDefault(this, 4, 0) ); }; - proto.aggregator.CreateTaskReq.prototype.setExpiredAt = function(value) { + proto.aggregator.CreateTaskReq.prototype.setMaxExecution = function(value) { return jspb.Message.setProto3IntField(this, 4, value); }; - proto.aggregator.CreateTaskReq.prototype.getMemo = function() { + proto.aggregator.CreateTaskReq.prototype.getSmartWalletAddress = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 5, "") ); }; - proto.aggregator.CreateTaskReq.prototype.setMemo = function(value) { + proto.aggregator.CreateTaskReq.prototype.setSmartWalletAddress = function(value) { return jspb.Message.setProto3StringField(this, 5, value); }; - proto.aggregator.CreateTaskReq.prototype.getRepeatable = function() { + proto.aggregator.CreateTaskReq.prototype.getMemo = function() { return ( - /** @type {boolean} */ - jspb.Message.getBooleanFieldWithDefault(this, 6, false) + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 6, "") + ); + }; + proto.aggregator.CreateTaskReq.prototype.setMemo = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); + }; + proto.aggregator.CreateTaskReq.prototype.getNodesList = function() { + return ( + /** @type{!Array} */ + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.TaskNode, 7) + ); + }; + proto.aggregator.CreateTaskReq.prototype.setNodesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 7, value); + }; + proto.aggregator.CreateTaskReq.prototype.addNodes = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.aggregator.TaskNode, opt_index); + }; + proto.aggregator.CreateTaskReq.prototype.clearNodesList = function() { + return this.setNodesList([]); + }; + proto.aggregator.CreateTaskReq.prototype.getEdgesList = function() { + return ( + /** @type{!Array} */ + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.TaskEdge, 8) ); }; - proto.aggregator.CreateTaskReq.prototype.setRepeatable = function(value) { - return jspb.Message.setProto3BooleanField(this, 6, value); + proto.aggregator.CreateTaskReq.prototype.setEdgesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 8, value); + }; + proto.aggregator.CreateTaskReq.prototype.addEdges = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 8, opt_value, proto.aggregator.TaskEdge, opt_index); + }; + proto.aggregator.CreateTaskReq.prototype.clearEdgesList = function() { + return this.setEdgesList([]); }; if (jspb.Message.GENERATE_TO_OBJECT) { proto.aggregator.CreateTaskResp.prototype.toObject = function(opt_includeInstance) { @@ -3232,10 +3810,7 @@ var init_avs_pb = __esm({ proto.aggregator.CreateTaskResp.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); var msg = new proto.aggregator.CreateTaskResp(); - return proto.aggregator.CreateTaskResp.deserializeBinaryFromReader( - msg, - reader - ); + return proto.aggregator.CreateTaskResp.deserializeBinaryFromReader(msg, reader); }; proto.aggregator.CreateTaskResp.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { @@ -3267,7 +3842,10 @@ var init_avs_pb = __esm({ var f = void 0; f = message.getId(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } }; proto.aggregator.CreateTaskResp.prototype.getId = function() { @@ -3328,7 +3906,10 @@ var init_avs_pb = __esm({ var f = void 0; f = message.getOwner(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } }; proto.aggregator.NonceRequest.prototype.getOwner = function() { @@ -3389,7 +3970,10 @@ var init_avs_pb = __esm({ var f = void 0; f = message.getNonce(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } }; proto.aggregator.NonceResp.prototype.getNonce = function() { @@ -3402,12 +3986,13 @@ var init_avs_pb = __esm({ return jspb.Message.setProto3StringField(this, 1, value); }; if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.AddressRequest.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.AddressRequest.toObject(opt_includeInstance, this); + proto.aggregator.ListWalletReq.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ListWalletReq.toObject(opt_includeInstance, this); }; - proto.aggregator.AddressRequest.toObject = function(includeInstance, msg) { + proto.aggregator.ListWalletReq.toObject = function(includeInstance, msg) { var f, obj = { - owner: jspb.Message.getFieldWithDefault(msg, 1, "") + factory: jspb.Message.getFieldWithDefault(msg, 1, ""), + salt: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { obj.$jspbMessageInstance = msg; @@ -3415,15 +4000,12 @@ var init_avs_pb = __esm({ return obj; }; } - proto.aggregator.AddressRequest.deserializeBinary = function(bytes) { + proto.aggregator.ListWalletReq.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.ListWalletReq(); + return proto.aggregator.ListWalletReq.deserializeBinaryFromReader(msg, reader); }; - proto.aggregator.AddressRequest.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.ListWalletReq.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3435,7 +4017,14 @@ var init_avs_pb = __esm({ /** @type {string} */ reader.readString() ); - msg.setOwner(value); + msg.setFactory(value); + break; + case 2: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setSalt(value); break; default: reader.skipField(); @@ -3444,35 +4033,55 @@ var init_avs_pb = __esm({ } return msg; }; - proto.aggregator.AddressRequest.prototype.serializeBinary = function() { + proto.aggregator.ListWalletReq.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.AddressRequest.serializeBinaryToWriter(this, writer); + proto.aggregator.ListWalletReq.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; - proto.aggregator.AddressRequest.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.ListWalletReq.serializeBinaryToWriter = function(message, writer) { var f = void 0; - f = message.getOwner(); + f = message.getFactory(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSalt(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 2, + f + ); } }; - proto.aggregator.AddressRequest.prototype.getOwner = function() { + proto.aggregator.ListWalletReq.prototype.getFactory = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 1, "") ); }; - proto.aggregator.AddressRequest.prototype.setOwner = function(value) { + proto.aggregator.ListWalletReq.prototype.setFactory = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; + proto.aggregator.ListWalletReq.prototype.getSalt = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 2, "") + ); + }; + proto.aggregator.ListWalletReq.prototype.setSalt = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); + }; if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.AddressResp.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.AddressResp.toObject(opt_includeInstance, this); + proto.aggregator.SmartWallet.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.SmartWallet.toObject(opt_includeInstance, this); }; - proto.aggregator.AddressResp.toObject = function(includeInstance, msg) { + proto.aggregator.SmartWallet.toObject = function(includeInstance, msg) { var f, obj = { - smartAccountAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), - nonce: jspb.Message.getFieldWithDefault(msg, 2, "") + address: jspb.Message.getFieldWithDefault(msg, 1, ""), + salt: jspb.Message.getFieldWithDefault(msg, 2, ""), + factory: jspb.Message.getFieldWithDefault(msg, 3, "") }; if (includeInstance) { obj.$jspbMessageInstance = msg; @@ -3480,12 +4089,12 @@ var init_avs_pb = __esm({ return obj; }; } - proto.aggregator.AddressResp.deserializeBinary = function(bytes) { + proto.aggregator.SmartWallet.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.AddressResp(); - return proto.aggregator.AddressResp.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.SmartWallet(); + return proto.aggregator.SmartWallet.deserializeBinaryFromReader(msg, reader); }; - proto.aggregator.AddressResp.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.SmartWallet.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3497,14 +4106,21 @@ var init_avs_pb = __esm({ /** @type {string} */ reader.readString() ); - msg.setSmartAccountAddress(value); + msg.setAddress(value); break; case 2: var value = ( /** @type {string} */ reader.readString() ); - msg.setNonce(value); + msg.setSalt(value); + break; + case 3: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setFactory(value); break; default: reader.skipField(); @@ -3513,46 +4129,144 @@ var init_avs_pb = __esm({ } return msg; }; - proto.aggregator.AddressResp.prototype.serializeBinary = function() { + proto.aggregator.SmartWallet.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.AddressResp.serializeBinaryToWriter(this, writer); + proto.aggregator.SmartWallet.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; - proto.aggregator.AddressResp.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.SmartWallet.serializeBinaryToWriter = function(message, writer) { var f = void 0; - f = message.getSmartAccountAddress(); + f = message.getAddress(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } - f = message.getNonce(); + f = message.getSalt(); if (f.length > 0) { - writer.writeString(2, f); + writer.writeString( + 2, + f + ); + } + f = message.getFactory(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); } }; - proto.aggregator.AddressResp.prototype.getSmartAccountAddress = function() { + proto.aggregator.SmartWallet.prototype.getAddress = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 1, "") ); }; - proto.aggregator.AddressResp.prototype.setSmartAccountAddress = function(value) { + proto.aggregator.SmartWallet.prototype.setAddress = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; - proto.aggregator.AddressResp.prototype.getNonce = function() { + proto.aggregator.SmartWallet.prototype.getSalt = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 2, "") ); }; - proto.aggregator.AddressResp.prototype.setNonce = function(value) { + proto.aggregator.SmartWallet.prototype.setSalt = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; + proto.aggregator.SmartWallet.prototype.getFactory = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 3, "") + ); + }; + proto.aggregator.SmartWallet.prototype.setFactory = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); + }; + proto.aggregator.ListWalletResp.repeatedFields_ = [1]; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.ListWalletResp.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ListWalletResp.toObject(opt_includeInstance, this); + }; + proto.aggregator.ListWalletResp.toObject = function(includeInstance, msg) { + var f, obj = { + walletsList: jspb.Message.toObjectList( + msg.getWalletsList(), + proto.aggregator.SmartWallet.toObject, + includeInstance + ) + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.ListWalletResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.ListWalletResp(); + return proto.aggregator.ListWalletResp.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.ListWalletResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = new proto.aggregator.SmartWallet(); + reader.readMessage(value, proto.aggregator.SmartWallet.deserializeBinaryFromReader); + msg.addWallets(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.ListWalletResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.ListWalletResp.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.ListWalletResp.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getWalletsList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.aggregator.SmartWallet.serializeBinaryToWriter + ); + } + }; + proto.aggregator.ListWalletResp.prototype.getWalletsList = function() { + return ( + /** @type{!Array} */ + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.SmartWallet, 1) + ); + }; + proto.aggregator.ListWalletResp.prototype.setWalletsList = function(value) { + return jspb.Message.setRepeatedWrapperField(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); + }; + proto.aggregator.ListWalletResp.prototype.clearWalletsList = function() { + return this.setWalletsList([]); + }; if (jspb.Message.GENERATE_TO_OBJECT) { proto.aggregator.ListTasksReq.prototype.toObject = function(opt_includeInstance) { return proto.aggregator.ListTasksReq.toObject(opt_includeInstance, this); }; proto.aggregator.ListTasksReq.toObject = function(includeInstance, msg) { - var f, obj = {}; + var f, obj = { + smartWalletAddress: jspb.Message.getFieldWithDefault(msg, 1, "") + }; if (includeInstance) { obj.$jspbMessageInstance = msg; } @@ -3571,6 +4285,13 @@ var init_avs_pb = __esm({ } var field = reader.getFieldNumber(); switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setSmartWalletAddress(value); + break; default: reader.skipField(); break; @@ -3583,8 +4304,24 @@ var init_avs_pb = __esm({ proto.aggregator.ListTasksReq.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; - proto.aggregator.ListTasksReq.serializeBinaryToWriter = function(message, writer) { - var f = void 0; + proto.aggregator.ListTasksReq.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getSmartWalletAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + }; + proto.aggregator.ListTasksReq.prototype.getSmartWalletAddress = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.ListTasksReq.prototype.setSmartWalletAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; proto.aggregator.ListTasksResp.repeatedFields_ = [1]; if (jspb.Message.GENERATE_TO_OBJECT) { @@ -3595,7 +4332,7 @@ var init_avs_pb = __esm({ var f, obj = { tasksList: jspb.Message.toObjectList( msg.getTasksList(), - proto.aggregator.ListTasksResp.TaskItemResp.toObject, + proto.aggregator.Task.toObject, includeInstance ) }; @@ -3608,10 +4345,7 @@ var init_avs_pb = __esm({ 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 - ); + return proto.aggregator.ListTasksResp.deserializeBinaryFromReader(msg, reader); }; proto.aggregator.ListTasksResp.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { @@ -3621,11 +4355,8 @@ var init_avs_pb = __esm({ var field = reader.getFieldNumber(); switch (field) { case 1: - var value = new proto.aggregator.ListTasksResp.TaskItemResp(); - reader.readMessage( - value, - proto.aggregator.ListTasksResp.TaskItemResp.deserializeBinaryFromReader - ); + var value = new proto.aggregator.Task(); + reader.readMessage(value, proto.aggregator.Task.deserializeBinaryFromReader); msg.addTasks(value); break; default: @@ -3647,122 +4378,21 @@ var init_avs_pb = __esm({ writer.writeRepeatedMessage( 1, f, - proto.aggregator.ListTasksResp.TaskItemResp.serializeBinaryToWriter - ); - } - }; - if (jspb.Message.GENERATE_TO_OBJECT) { - proto.aggregator.ListTasksResp.TaskItemResp.prototype.toObject = function(opt_includeInstance) { - return proto.aggregator.ListTasksResp.TaskItemResp.toObject( - opt_includeInstance, - this + proto.aggregator.Task.serializeBinaryToWriter ); - }; - proto.aggregator.ListTasksResp.TaskItemResp.toObject = function(includeInstance, msg) { - var f, obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, ""), - status: jspb.Message.getFieldWithDefault(msg, 2, 0) - }; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; - } - proto.aggregator.ListTasksResp.TaskItemResp.deserializeBinary = function(bytes) { - var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ListTasksResp.TaskItemResp(); - return proto.aggregator.ListTasksResp.TaskItemResp.deserializeBinaryFromReader( - msg, - reader - ); - }; - proto.aggregator.ListTasksResp.TaskItemResp.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 {!proto.aggregator.TaskStatus} */ - reader.readEnum() - ); - msg.setStatus(value); - break; - default: - reader.skipField(); - break; - } - } - return msg; - }; - proto.aggregator.ListTasksResp.TaskItemResp.prototype.serializeBinary = function() { - var writer = new jspb.BinaryWriter(); - proto.aggregator.ListTasksResp.TaskItemResp.serializeBinaryToWriter( - this, - writer - ); - return writer.getResultBuffer(); - }; - proto.aggregator.ListTasksResp.TaskItemResp.serializeBinaryToWriter = function(message, writer) { - var f = void 0; - f = message.getId(); - if (f.length > 0) { - writer.writeString(1, f); } - f = message.getStatus(); - if (f !== 0) { - writer.writeEnum(2, f); - } - }; - proto.aggregator.ListTasksResp.TaskItemResp.prototype.getId = function() { - return ( - /** @type {string} */ - jspb.Message.getFieldWithDefault(this, 1, "") - ); - }; - proto.aggregator.ListTasksResp.TaskItemResp.prototype.setId = function(value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; - proto.aggregator.ListTasksResp.TaskItemResp.prototype.getStatus = function() { - return ( - /** @type {!proto.aggregator.TaskStatus} */ - jspb.Message.getFieldWithDefault(this, 2, 0) - ); - }; - proto.aggregator.ListTasksResp.TaskItemResp.prototype.setStatus = function(value) { - return jspb.Message.setProto3EnumField(this, 2, value); }; proto.aggregator.ListTasksResp.prototype.getTasksList = function() { return ( - /** @type{!Array} */ - jspb.Message.getRepeatedWrapperField( - this, - proto.aggregator.ListTasksResp.TaskItemResp, - 1 - ) + /** @type{!Array} */ + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.Task, 1) ); }; proto.aggregator.ListTasksResp.prototype.setTasksList = function(value) { return jspb.Message.setRepeatedWrapperField(this, 1, value); }; proto.aggregator.ListTasksResp.prototype.addTasks = function(opt_value, opt_index) { - return jspb.Message.addToRepeatedWrapperField( - this, - 1, - opt_value, - proto.aggregator.ListTasksResp.TaskItemResp, - opt_index - ); + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.aggregator.Task, opt_index); }; proto.aggregator.ListTasksResp.prototype.clearTasksList = function() { return this.setTasksList([]); @@ -3832,15 +4462,24 @@ var init_avs_pb = __esm({ var f = void 0; f = message.getOwner(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } f = message.getExpiredAt(); if (f !== 0) { - writer.writeInt64(2, f); + writer.writeInt64( + 2, + f + ); } f = message.getSignature(); if (f.length > 0) { - writer.writeString(3, f); + writer.writeString( + 3, + f + ); } }; proto.aggregator.GetKeyReq.prototype.getOwner = function() { @@ -3919,7 +4558,10 @@ var init_avs_pb = __esm({ var f = void 0; f = message.getKey(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } }; proto.aggregator.KeyResp.prototype.getKey = function() { @@ -3936,11 +4578,197 @@ var init_avs_pb = __esm({ proto.aggregator.UpdateChecksReq.prototype.toObject = function(opt_includeInstance) { return proto.aggregator.UpdateChecksReq.toObject(opt_includeInstance, this); }; - proto.aggregator.UpdateChecksReq.toObject = function(includeInstance, msg) { + proto.aggregator.UpdateChecksReq.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 ? void 0 : f + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.UpdateChecksReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.UpdateChecksReq(); + return proto.aggregator.UpdateChecksReq.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.UpdateChecksReq.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setAddress(value); + break; + case 2: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.setSignature(value); + break; + case 3: + var value = ( + /** @type {string} */ + reader.readString() + ); + msg.addId(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.UpdateChecksReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.UpdateChecksReq.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.UpdateChecksReq.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getAddress(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSignature(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getIdList(); + if (f.length > 0) { + writer.writeRepeatedString( + 3, + f + ); + } + }; + proto.aggregator.UpdateChecksReq.prototype.getAddress = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") + ); + }; + proto.aggregator.UpdateChecksReq.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); + }; + proto.aggregator.UpdateChecksReq.prototype.getSignature = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 2, "") + ); + }; + proto.aggregator.UpdateChecksReq.prototype.setSignature = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); + }; + proto.aggregator.UpdateChecksReq.prototype.getIdList = function() { + return ( + /** @type {!Array} */ + jspb.Message.getRepeatedField(this, 3) + ); + }; + proto.aggregator.UpdateChecksReq.prototype.setIdList = function(value) { + return jspb.Message.setField(this, 3, value || []); + }; + proto.aggregator.UpdateChecksReq.prototype.addId = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 3, value, opt_index); + }; + proto.aggregator.UpdateChecksReq.prototype.clearIdList = function() { + return this.setIdList([]); + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.UpdateChecksResp.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.UpdateChecksResp.toObject(opt_includeInstance, this); + }; + proto.aggregator.UpdateChecksResp.toObject = function(includeInstance, msg) { + var f, obj = { + updatedAt: (f = msg.getUpdatedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) + }; + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; + }; + } + proto.aggregator.UpdateChecksResp.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + var msg = new proto.aggregator.UpdateChecksResp(); + return proto.aggregator.UpdateChecksResp.deserializeBinaryFromReader(msg, reader); + }; + proto.aggregator.UpdateChecksResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + 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); + break; + default: + reader.skipField(); + break; + } + } + return msg; + }; + proto.aggregator.UpdateChecksResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.UpdateChecksResp.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); + }; + proto.aggregator.UpdateChecksResp.serializeBinaryToWriter = function(message, writer) { + var f = void 0; + f = message.getUpdatedAt(); + if (f != null) { + writer.writeMessage( + 1, + f, + google_protobuf_timestamp_pb.Timestamp.serializeBinaryToWriter + ); + } + }; + proto.aggregator.UpdateChecksResp.prototype.getUpdatedAt = function() { + return ( + /** @type{?proto.google.protobuf.Timestamp} */ + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 1) + ); + }; + proto.aggregator.UpdateChecksResp.prototype.setUpdatedAt = function(value) { + return jspb.Message.setWrapperField(this, 1, value); + }; + proto.aggregator.UpdateChecksResp.prototype.clearUpdatedAt = function() { + return this.setUpdatedAt(void 0); + }; + proto.aggregator.UpdateChecksResp.prototype.hasUpdatedAt = function() { + return jspb.Message.getField(this, 1) != null; + }; + if (jspb.Message.GENERATE_TO_OBJECT) { + proto.aggregator.CreateWalletReq.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.CreateWalletReq.toObject(opt_includeInstance, this); + }; + 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 ? void 0 : f + salt: jspb.Message.getFieldWithDefault(msg, 1, ""), + factoryAddress: jspb.Message.getFieldWithDefault(msg, 2, "") }; if (includeInstance) { obj.$jspbMessageInstance = msg; @@ -3948,15 +4776,12 @@ var init_avs_pb = __esm({ return obj; }; } - 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); }; - proto.aggregator.UpdateChecksReq.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.CreateWalletReq.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -3968,21 +4793,14 @@ var init_avs_pb = __esm({ /** @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(); @@ -3991,69 +4809,55 @@ var init_avs_pb = __esm({ } return msg; }; - 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(); }; - proto.aggregator.UpdateChecksReq.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.CreateWalletReq.serializeBinaryToWriter = function(message, writer) { var f = void 0; - f = message.getAddress(); - if (f.length > 0) { - writer.writeString(1, f); - } - f = message.getSignature(); + f = message.getSalt(); if (f.length > 0) { - writer.writeString(2, f); + writer.writeString( + 1, + f + ); } - f = message.getIdList(); + f = message.getFactoryAddress(); if (f.length > 0) { - writer.writeRepeatedString(3, f); + writer.writeString( + 2, + f + ); } }; - proto.aggregator.UpdateChecksReq.prototype.getAddress = function() { + proto.aggregator.CreateWalletReq.prototype.getSalt = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 1, "") ); }; - proto.aggregator.UpdateChecksReq.prototype.setAddress = function(value) { + proto.aggregator.CreateWalletReq.prototype.setSalt = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; - proto.aggregator.UpdateChecksReq.prototype.getSignature = function() { + proto.aggregator.CreateWalletReq.prototype.getFactoryAddress = function() { return ( /** @type {string} */ jspb.Message.getFieldWithDefault(this, 2, "") ); }; - proto.aggregator.UpdateChecksReq.prototype.setSignature = function(value) { + proto.aggregator.CreateWalletReq.prototype.setFactoryAddress = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; - proto.aggregator.UpdateChecksReq.prototype.getIdList = function() { - return ( - /** @type {!Array} */ - jspb.Message.getRepeatedField(this, 3) - ); - }; - proto.aggregator.UpdateChecksReq.prototype.setIdList = function(value) { - return jspb.Message.setField(this, 3, value || []); - }; - proto.aggregator.UpdateChecksReq.prototype.addId = function(value, opt_index) { - return jspb.Message.addToRepeatedField(this, 3, value, opt_index); - }; - proto.aggregator.UpdateChecksReq.prototype.clearIdList = function() { - return this.setIdList([]); - }; if (jspb.Message.GENERATE_TO_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); }; - 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) { obj.$jspbMessageInstance = msg; @@ -4061,15 +4865,12 @@ var init_avs_pb = __esm({ return obj; }; } - 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); }; - proto.aggregator.UpdateChecksResp.deserializeBinaryFromReader = function(msg, reader) { + proto.aggregator.CreateWalletResp.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; @@ -4077,12 +4878,25 @@ var init_avs_pb = __esm({ 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 + var value = ( + /** @type {string} */ + reader.readString() ); - msg.setUpdatedAt(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.setFactoryAddress(value); break; default: reader.skipField(); @@ -4091,53 +4905,71 @@ var init_avs_pb = __esm({ } return msg; }; - 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(); }; - proto.aggregator.UpdateChecksResp.serializeBinaryToWriter = function(message, writer) { + proto.aggregator.CreateWalletResp.serializeBinaryToWriter = function(message, writer) { var f = void 0; - 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 ); } }; - proto.aggregator.UpdateChecksResp.prototype.getUpdatedAt = function() { + proto.aggregator.CreateWalletResp.prototype.getAddress = function() { return ( - /** @type{?proto.google.protobuf.Timestamp} */ - jspb.Message.getWrapperField( - this, - google_protobuf_timestamp_pb.Timestamp, - 1 - ) + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 1, "") ); }; - proto.aggregator.UpdateChecksResp.prototype.setUpdatedAt = function(value) { - return jspb.Message.setWrapperField(this, 1, value); + proto.aggregator.CreateWalletResp.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; - proto.aggregator.UpdateChecksResp.prototype.clearUpdatedAt = function() { - return this.setUpdatedAt(void 0); + proto.aggregator.CreateWalletResp.prototype.getSalt = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 2, "") + ); }; - 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); }; - proto.aggregator.TriggerType = { - TIMETRIGGER: 0, - CONTRACTQUERYTRIGGER: 1, - EXPRESSIONTRIGGER: 2 + proto.aggregator.CreateWalletResp.prototype.getFactoryAddress = function() { + return ( + /** @type {string} */ + jspb.Message.getFieldWithDefault(this, 3, "") + ); }; - proto.aggregator.TaskType = { - ETHTRANSFERTASK: 0, - CONTRACTEXECUTIONTASK: 1, - GRAPHQLDATAQUERYTASK: 2, - HTTPAPICALLTASK: 3, - CUSTOMCODETASK: 4, - BRANCHACTIONTASK: 5 + proto.aggregator.CreateWalletResp.prototype.setFactoryAddress = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); + }; + proto.aggregator.Error = { + UNKNOWERROR: 0, + RPCNODEERROR: 1e3, + STORAGEUNAVAILABLE: 2e3, + STORAGEWRITEERROR: 2001, + SMARTWALLETRPCERROR: 6e3, + SMARTWALLETNOTFOUNDERROR: 6001, + TASKDATACORRUPTED: 7e3, + TASKDATAMISSINGERROR: 7001 }; proto.aggregator.TaskStatus = { ACTIVE: 0, @@ -4150,34 +4982,351 @@ var init_avs_pb = __esm({ JAVASCRIPT: 0 }; goog.object.extend(exports, proto.aggregator); - ({ - Task, - CreateTaskReq, - CreateTaskResp, - GetKeyReq, - KeyResp, - UpdateChecksReq, - UpdateChecksResp, - AddressResp, - AddressRequest, - ListTasksReq, - ListTasksResp, - TaskTrigger, - TriggerType, - ExpressionCondition, - TaskAction, - ActionType, - ContractExecution, - TaskType, - UUID - } = proto.aggregator); + } +}); + +// grpc_codegen/avs_grpc_pb.js +var require_avs_grpc_pb = __commonJS({ + "grpc_codegen/avs_grpc_pb.js"(exports) { + "use strict"; + var grpc2 = __require("@grpc/grpc-js"); + var avs_pb3 = require_avs_pb(); + 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_Checkin(arg) { + if (!(arg instanceof avs_pb3.Checkin)) { + throw new Error("Expected argument of type aggregator.Checkin"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_Checkin(buffer_arg) { + return avs_pb3.Checkin.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_CheckinResp(arg) { + if (!(arg instanceof avs_pb3.CheckinResp)) { + throw new Error("Expected argument of type aggregator.CheckinResp"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_CheckinResp(buffer_arg) { + return avs_pb3.CheckinResp.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_CreateTaskReq(arg) { + if (!(arg instanceof avs_pb3.CreateTaskReq)) { + throw new Error("Expected argument of type aggregator.CreateTaskReq"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_CreateTaskReq(buffer_arg) { + return avs_pb3.CreateTaskReq.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_CreateTaskResp(arg) { + if (!(arg instanceof avs_pb3.CreateTaskResp)) { + throw new Error("Expected argument of type aggregator.CreateTaskResp"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_CreateTaskResp(buffer_arg) { + return avs_pb3.CreateTaskResp.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_CreateWalletReq(arg) { + if (!(arg instanceof avs_pb3.CreateWalletReq)) { + throw new Error("Expected argument of type aggregator.CreateWalletReq"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_CreateWalletReq(buffer_arg) { + return avs_pb3.CreateWalletReq.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_CreateWalletResp(arg) { + if (!(arg instanceof avs_pb3.CreateWalletResp)) { + throw new Error("Expected argument of type aggregator.CreateWalletResp"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_CreateWalletResp(buffer_arg) { + return avs_pb3.CreateWalletResp.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_GetKeyReq(arg) { + if (!(arg instanceof avs_pb3.GetKeyReq)) { + throw new Error("Expected argument of type aggregator.GetKeyReq"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_GetKeyReq(buffer_arg) { + return avs_pb3.GetKeyReq.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_IdReq(arg) { + if (!(arg instanceof avs_pb3.IdReq)) { + throw new Error("Expected argument of type aggregator.IdReq"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_IdReq(buffer_arg) { + return avs_pb3.IdReq.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_KeyResp(arg) { + if (!(arg instanceof avs_pb3.KeyResp)) { + throw new Error("Expected argument of type aggregator.KeyResp"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_KeyResp(buffer_arg) { + return avs_pb3.KeyResp.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_ListTasksReq(arg) { + if (!(arg instanceof avs_pb3.ListTasksReq)) { + throw new Error("Expected argument of type aggregator.ListTasksReq"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_ListTasksReq(buffer_arg) { + return avs_pb3.ListTasksReq.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_ListTasksResp(arg) { + if (!(arg instanceof avs_pb3.ListTasksResp)) { + throw new Error("Expected argument of type aggregator.ListTasksResp"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_ListTasksResp(buffer_arg) { + return avs_pb3.ListTasksResp.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_ListWalletReq(arg) { + if (!(arg instanceof avs_pb3.ListWalletReq)) { + throw new Error("Expected argument of type aggregator.ListWalletReq"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_ListWalletReq(buffer_arg) { + return avs_pb3.ListWalletReq.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_ListWalletResp(arg) { + if (!(arg instanceof avs_pb3.ListWalletResp)) { + throw new Error("Expected argument of type aggregator.ListWalletResp"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_ListWalletResp(buffer_arg) { + return avs_pb3.ListWalletResp.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_NonceRequest(arg) { + if (!(arg instanceof avs_pb3.NonceRequest)) { + throw new Error("Expected argument of type aggregator.NonceRequest"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_NonceRequest(buffer_arg) { + return avs_pb3.NonceRequest.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_NonceResp(arg) { + if (!(arg instanceof avs_pb3.NonceResp)) { + throw new Error("Expected argument of type aggregator.NonceResp"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_NonceResp(buffer_arg) { + return avs_pb3.NonceResp.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_SyncTasksReq(arg) { + if (!(arg instanceof avs_pb3.SyncTasksReq)) { + throw new Error("Expected argument of type aggregator.SyncTasksReq"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_SyncTasksReq(buffer_arg) { + return avs_pb3.SyncTasksReq.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_SyncTasksResp(arg) { + if (!(arg instanceof avs_pb3.SyncTasksResp)) { + throw new Error("Expected argument of type aggregator.SyncTasksResp"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_SyncTasksResp(buffer_arg) { + return avs_pb3.SyncTasksResp.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_Task(arg) { + if (!(arg instanceof avs_pb3.Task)) { + throw new Error("Expected argument of type aggregator.Task"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_Task(buffer_arg) { + return avs_pb3.Task.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_UpdateChecksReq(arg) { + if (!(arg instanceof avs_pb3.UpdateChecksReq)) { + throw new Error("Expected argument of type aggregator.UpdateChecksReq"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_UpdateChecksReq(buffer_arg) { + return avs_pb3.UpdateChecksReq.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_aggregator_UpdateChecksResp(arg) { + if (!(arg instanceof avs_pb3.UpdateChecksResp)) { + throw new Error("Expected argument of type aggregator.UpdateChecksResp"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_aggregator_UpdateChecksResp(buffer_arg) { + return avs_pb3.UpdateChecksResp.deserializeBinary(new Uint8Array(buffer_arg)); + } + function serialize_google_protobuf_BoolValue(arg) { + if (!(arg instanceof google_protobuf_wrappers_pb.BoolValue)) { + throw new Error("Expected argument of type google.protobuf.BoolValue"); + } + return Buffer.from(arg.serializeBinary()); + } + function deserialize_google_protobuf_BoolValue(buffer_arg) { + return google_protobuf_wrappers_pb.BoolValue.deserializeBinary(new Uint8Array(buffer_arg)); + } + var AggregatorService = exports.AggregatorService = { + // Auth + getKey: { + path: "/aggregator.Aggregator/GetKey", + requestStream: false, + responseStream: false, + requestType: avs_pb3.GetKeyReq, + responseType: avs_pb3.KeyResp, + requestSerialize: serialize_aggregator_GetKeyReq, + requestDeserialize: deserialize_aggregator_GetKeyReq, + responseSerialize: serialize_aggregator_KeyResp, + responseDeserialize: deserialize_aggregator_KeyResp + }, + // Smart Acccount + getNonce: { + path: "/aggregator.Aggregator/GetNonce", + requestStream: false, + responseStream: false, + requestType: avs_pb3.NonceRequest, + responseType: avs_pb3.NonceResp, + requestSerialize: serialize_aggregator_NonceRequest, + requestDeserialize: deserialize_aggregator_NonceRequest, + responseSerialize: serialize_aggregator_NonceResp, + responseDeserialize: deserialize_aggregator_NonceResp + }, + createWallet: { + path: "/aggregator.Aggregator/CreateWallet", + requestStream: false, + responseStream: false, + requestType: avs_pb3.CreateWalletReq, + responseType: avs_pb3.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_pb3.ListWalletReq, + responseType: avs_pb3.ListWalletResp, + requestSerialize: serialize_aggregator_ListWalletReq, + requestDeserialize: deserialize_aggregator_ListWalletReq, + responseSerialize: serialize_aggregator_ListWalletResp, + responseDeserialize: deserialize_aggregator_ListWalletResp + }, + // Task Management + createTask: { + path: "/aggregator.Aggregator/CreateTask", + requestStream: false, + responseStream: false, + requestType: avs_pb3.CreateTaskReq, + responseType: avs_pb3.CreateTaskResp, + requestSerialize: serialize_aggregator_CreateTaskReq, + requestDeserialize: deserialize_aggregator_CreateTaskReq, + responseSerialize: serialize_aggregator_CreateTaskResp, + responseDeserialize: deserialize_aggregator_CreateTaskResp + }, + listTasks: { + path: "/aggregator.Aggregator/ListTasks", + requestStream: false, + responseStream: false, + requestType: avs_pb3.ListTasksReq, + responseType: avs_pb3.ListTasksResp, + requestSerialize: serialize_aggregator_ListTasksReq, + requestDeserialize: deserialize_aggregator_ListTasksReq, + responseSerialize: serialize_aggregator_ListTasksResp, + responseDeserialize: deserialize_aggregator_ListTasksResp + }, + getTask: { + path: "/aggregator.Aggregator/GetTask", + requestStream: false, + responseStream: false, + requestType: avs_pb3.IdReq, + responseType: avs_pb3.Task, + requestSerialize: serialize_aggregator_IdReq, + requestDeserialize: deserialize_aggregator_IdReq, + responseSerialize: serialize_aggregator_Task, + responseDeserialize: deserialize_aggregator_Task + }, + cancelTask: { + path: "/aggregator.Aggregator/CancelTask", + requestStream: false, + responseStream: false, + requestType: avs_pb3.IdReq, + responseType: google_protobuf_wrappers_pb.BoolValue, + requestSerialize: serialize_aggregator_IdReq, + requestDeserialize: deserialize_aggregator_IdReq, + responseSerialize: serialize_google_protobuf_BoolValue, + responseDeserialize: deserialize_google_protobuf_BoolValue + }, + deleteTask: { + path: "/aggregator.Aggregator/DeleteTask", + requestStream: false, + responseStream: false, + requestType: avs_pb3.IdReq, + responseType: google_protobuf_wrappers_pb.BoolValue, + requestSerialize: serialize_aggregator_IdReq, + requestDeserialize: deserialize_aggregator_IdReq, + responseSerialize: serialize_google_protobuf_BoolValue, + responseDeserialize: deserialize_google_protobuf_BoolValue + }, + // Operator endpoint + ping: { + path: "/aggregator.Aggregator/Ping", + requestStream: false, + responseStream: false, + requestType: avs_pb3.Checkin, + responseType: avs_pb3.CheckinResp, + requestSerialize: serialize_aggregator_Checkin, + requestDeserialize: deserialize_aggregator_Checkin, + responseSerialize: serialize_aggregator_CheckinResp, + responseDeserialize: deserialize_aggregator_CheckinResp + }, + syncTasks: { + path: "/aggregator.Aggregator/SyncTasks", + requestStream: false, + responseStream: true, + requestType: avs_pb3.SyncTasksReq, + responseType: avs_pb3.SyncTasksResp, + requestSerialize: serialize_aggregator_SyncTasksReq, + requestDeserialize: deserialize_aggregator_SyncTasksReq, + responseSerialize: serialize_aggregator_SyncTasksResp, + responseDeserialize: deserialize_aggregator_SyncTasksResp + }, + updateChecks: { + path: "/aggregator.Aggregator/UpdateChecks", + requestStream: false, + responseStream: false, + requestType: avs_pb3.UpdateChecksReq, + responseType: avs_pb3.UpdateChecksResp, + requestSerialize: serialize_aggregator_UpdateChecksReq, + requestDeserialize: deserialize_aggregator_UpdateChecksReq, + responseSerialize: serialize_aggregator_UpdateChecksResp, + responseDeserialize: deserialize_aggregator_UpdateChecksResp + } + }; + exports.AggregatorClient = grpc2.makeGenericClientConstructor(AggregatorService); } }); // src/index.ts import _ from "lodash"; -import { ethers } from "ethers"; -import * as grpc2 from "@grpc/grpc-js"; +import * as grpc from "@grpc/grpc-js"; import { Metadata } from "@grpc/grpc-js"; // src/auth.ts @@ -4185,352 +5334,245 @@ var getKeyRequestMessage = (address, expiredAt) => { return `key request for ${address} expired at ${expiredAt}`; }; -// grpc_codegen/avs_grpc_pb.js -var grpc = __require("@grpc/grpc-js"); -var avs_pb = (init_avs_pb(), __toCommonJS(avs_pb_exports)); -var google_protobuf_timestamp_pb2 = __require("google-protobuf/google/protobuf/timestamp_pb.js"); -var google_protobuf_wrappers_pb2 = __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"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_Checkin(buffer_arg) { - return avs_pb.Checkin.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_CheckinResp(arg) { - if (!(arg instanceof avs_pb.CheckinResp)) { - throw new Error("Expected argument of type aggregator.CheckinResp"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_CheckinResp(buffer_arg) { - return avs_pb.CheckinResp.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_CreateTaskReq(arg) { - if (!(arg instanceof avs_pb.CreateTaskReq)) { - throw new Error("Expected argument of type aggregator.CreateTaskReq"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_CreateTaskReq(buffer_arg) { - return avs_pb.CreateTaskReq.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_CreateTaskResp(arg) { - if (!(arg instanceof avs_pb.CreateTaskResp)) { - throw new Error("Expected argument of type aggregator.CreateTaskResp"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_CreateTaskResp(buffer_arg) { - return avs_pb.CreateTaskResp.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"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_GetKeyReq(buffer_arg) { - return avs_pb.GetKeyReq.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"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_KeyResp(buffer_arg) { - return avs_pb.KeyResp.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_ListTasksReq(arg) { - if (!(arg instanceof avs_pb.ListTasksReq)) { - throw new Error("Expected argument of type aggregator.ListTasksReq"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_ListTasksReq(buffer_arg) { - return avs_pb.ListTasksReq.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_ListTasksResp(arg) { - if (!(arg instanceof avs_pb.ListTasksResp)) { - throw new Error("Expected argument of type aggregator.ListTasksResp"); - } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_ListTasksResp(buffer_arg) { - return avs_pb.ListTasksResp.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"); +// src/index.ts +var import_avs_grpc_pb = __toESM(require_avs_grpc_pb()); +var avs_pb2 = __toESM(require_avs_pb()); + +// src/builder.ts +var avs_pb = __toESM(require_avs_pb()); +var buildContractWrite = ({ contractAddress: contractAddress2, callData, contractABI }) => { + const n = new avs_pb.ContractWriteNode(); + n.setContractAddress(contractAddress2); + n.setCallData(callData); + if (contractABI) { + n.setContractAbi(contractABI); } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_NonceRequest(buffer_arg) { - return avs_pb.NonceRequest.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_NonceResp(arg) { - if (!(arg instanceof avs_pb.NonceResp)) { - throw new Error("Expected argument of type aggregator.NonceResp"); + return n; +}; +var buildContractRead = ({ contract_ddress, callData, contractABI }) => { + const n = new avs_pb.ContractReadNode(); + n.setContractAddress(contractAddress); + n.setCallData(callData); + if (n.contractABI) { + n.setContractAbi(n.contractABI); } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_NonceResp(buffer_arg) { - return avs_pb.NonceResp.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_SyncTasksReq(arg) { - if (!(arg instanceof avs_pb.SyncTasksReq)) { - throw new Error("Expected argument of type aggregator.SyncTasksReq"); + return n; +}; +var buildGraphQL = ({ url, query, variables }) => { + const n = new avs_pb.GraphQLQueryNode(); + n.setUrl(url); + n.setQuery(query); + for (const [k, v] of Object.entries(variables || {})) { + n.getVariablesMap().set(k, v); } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_SyncTasksReq(buffer_arg) { - return avs_pb.SyncTasksReq.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_SyncTasksResp(arg) { - if (!(arg instanceof avs_pb.SyncTasksResp)) { - throw new Error("Expected argument of type aggregator.SyncTasksResp"); + return n; +}; +var buildRestAPI = ({ url, body, method, headers }) => { + const n = new avs_pb.RestAPINode(); + n.setUrl(url); + n.setBody(body); + n.setMethod(method); + for (const [k, v] of Object.entries(headers || {})) { + n.getHeadersMap().set(k, v); } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_SyncTasksResp(buffer_arg) { - return avs_pb.SyncTasksResp.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_Task(arg) { - if (!(arg instanceof avs_pb.Task)) { - throw new Error("Expected argument of type aggregator.Task"); + return n; +}; +var buildBranch = ({ conditions }) => { + const n = new avs_pb.BranchNode(); + for (const item of conditions) { + const condition = new avs_pb.Condition(); + condition.setId(item.id); + condition.setType(item.type); + condition.setExpression(item.expression); + n.addConditions(condition); } - return Buffer.from(arg.serializeBinary()); -} -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 n; +}; +var buildFilter = ({ expression }) => { + const n = new avs_pb.FilterNode(); + n.setExpression(expression); + return n; +}; +var buildTaskEdge = ({ id, source, target }) => { + const edge = new avs_pb.TaskEdge(); + edge.setId(id); + edge.setSource(source); + edge.setTarget(target); + return edge; +}; +var buildTaskNode = (node) => { + const n = new avs_pb.TaskNode(); + n.setId(node.id); + n.setName(node.name); + if (node.ethTransfer) { + const ethTransfer = new avs_pb.ETHTransferNode(); + ethTransfer.setDestination(node.ethTransfer.destination); + ethTransfer.setAmount(node.ethTransfer.amount); + n.setEthTransfer(ethTransfer); + } else if (node.contractWrite) { + n.setContractWrite(buildContractWrite(node.contractWrite)); + } else if (node.contractRead) { + n.setContractRead(buildContractRead(node.contractRead)); + } else if (node.graphqlDataQuery) { + n.setGraphqlDataQuery(buildGraphQL(node.graphqlDataQuery)); + } else if (node.restApi) { + n.setRestApi(buildRestAPI(node.restApi)); + } else if (node.branch) { + n.setBranch(buildBranch(node.branch)); + } else if (node["filter"]) { + n.setfilter(buildFilter(node["filter"])); + } else if (node.customCode) { + const code = new avs_pb.CustomCodeNode(); + code.setType(node.customCode.type); + n.setCustomCode(node.customCode); + } else { + throw new Error("missing task payload"); } - 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"); + return n; +}; +var buildTrigger = (payload) => { + const trigger = new avs_pb.TaskTrigger(); + for (const [key, value] of Object.entries(payload)) { + if (key == "manual") { + trigger.setManual(value); + return trigger; + } + if (key == "fixedTime") { + let schedule = new avs_pb.FixedEpochCondition(); + schedule.setEpochsList(value.epochs); + trigger.setFixedTime(schedule); + return trigger; + } + if (key == "cron") { + const cron = new avs_pb.CronCondition(); + cron.setScheduleList(value.schedule); + trigger.setCron(cron); + return trigger; + } + if (key == "block") { + const block = new avs_pb.BlockCondition(); + block.setInterval(value.interval); + trigger.setBlock(block); + return trigger; + } + if (key == "event") { + const event = new avs_pb.EventCondition(); + event.setExpression(payload.event.expression); + trigger.setEvent(event); + return trigger; + } + throw new Error("missing trigger"); } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_UpdateChecksReq(buffer_arg) { - return avs_pb.UpdateChecksReq.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_aggregator_UpdateChecksResp(arg) { - if (!(arg instanceof avs_pb.UpdateChecksResp)) { - throw new Error("Expected argument of type aggregator.UpdateChecksResp"); +}; +var triggerFromGRPC = (trigger) => { + if (!trigger) { + return { triggerType: avs_pb.TaskTrigger.TriggerTypeCase.TRIGGER_TYPE_NOT_SET }; } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_aggregator_UpdateChecksResp(buffer_arg) { - return avs_pb.UpdateChecksResp.deserializeBinary(new Uint8Array(buffer_arg)); -} -function serialize_google_protobuf_BoolValue(arg) { - if (!(arg instanceof google_protobuf_wrappers_pb2.BoolValue)) { - throw new Error("Expected argument of type google.protobuf.BoolValue"); + const base = { + triggerType: trigger.getTriggerTypeCase() + }; + switch (trigger.getTriggerTypeCase()) { + case avs_pb.TaskTrigger.TriggerTypeCase.MANUAL: + base.manual = trigger.getManual(); + break; + case avs_pb.TaskTrigger.TriggerTypeCase.FIXED_TIME: + base.fixedTime = { epochs: trigger.getFixedTime().getEpochsList() }; + break; + case avs_pb.TaskTrigger.TriggerTypeCase.CRON: + base.cron = { schedule: trigger.getCron().getScheduleList() }; + break; + case avs_pb.TaskTrigger.TriggerTypeCase.BLOCK: + base.block = { interval: trigger.getBlock().getInterval() }; + break; + case avs_pb.TaskTrigger.TriggerTypeCase.EVENT: + base.event = { expression: trigger.getEvent().getExpression() }; + break; } - return Buffer.from(arg.serializeBinary()); -} -function deserialize_google_protobuf_BoolValue(buffer_arg) { - return google_protobuf_wrappers_pb2.BoolValue.deserializeBinary(new Uint8Array(buffer_arg)); -} -var AggregatorService = { - // Auth - getKey: { - path: "/aggregator.Aggregator/GetKey", - requestStream: false, - responseStream: false, - requestType: avs_pb.GetKeyReq, - responseType: avs_pb.KeyResp, - requestSerialize: serialize_aggregator_GetKeyReq, - requestDeserialize: deserialize_aggregator_GetKeyReq, - responseSerialize: serialize_aggregator_KeyResp, - responseDeserialize: deserialize_aggregator_KeyResp - }, - // Smart Acccount - getNonce: { - path: "/aggregator.Aggregator/GetNonce", - requestStream: false, - responseStream: false, - requestType: avs_pb.NonceRequest, - responseType: avs_pb.NonceResp, - requestSerialize: serialize_aggregator_NonceRequest, - requestDeserialize: deserialize_aggregator_NonceRequest, - responseSerialize: serialize_aggregator_NonceResp, - responseDeserialize: deserialize_aggregator_NonceResp - }, - getSmartAccountAddress: { - path: "/aggregator.Aggregator/GetSmartAccountAddress", - 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 - }, - // Task Management - createTask: { - path: "/aggregator.Aggregator/CreateTask", - requestStream: false, - responseStream: false, - requestType: avs_pb.CreateTaskReq, - responseType: avs_pb.CreateTaskResp, - requestSerialize: serialize_aggregator_CreateTaskReq, - requestDeserialize: deserialize_aggregator_CreateTaskReq, - responseSerialize: serialize_aggregator_CreateTaskResp, - responseDeserialize: deserialize_aggregator_CreateTaskResp - }, - listTasks: { - path: "/aggregator.Aggregator/ListTasks", - requestStream: false, - responseStream: false, - requestType: avs_pb.ListTasksReq, - responseType: avs_pb.ListTasksResp, - requestSerialize: serialize_aggregator_ListTasksReq, - requestDeserialize: deserialize_aggregator_ListTasksReq, - responseSerialize: serialize_aggregator_ListTasksResp, - responseDeserialize: deserialize_aggregator_ListTasksResp - }, - getTask: { - path: "/aggregator.Aggregator/GetTask", - requestStream: false, - responseStream: false, - requestType: avs_pb.UUID, - responseType: avs_pb.Task, - requestSerialize: serialize_aggregator_UUID, - requestDeserialize: deserialize_aggregator_UUID, - responseSerialize: serialize_aggregator_Task, - responseDeserialize: deserialize_aggregator_Task - }, - cancelTask: { - path: "/aggregator.Aggregator/CancelTask", - requestStream: false, - responseStream: false, - requestType: avs_pb.UUID, - responseType: google_protobuf_wrappers_pb2.BoolValue, - requestSerialize: serialize_aggregator_UUID, - requestDeserialize: deserialize_aggregator_UUID, - responseSerialize: serialize_google_protobuf_BoolValue, - responseDeserialize: deserialize_google_protobuf_BoolValue - }, - deleteTask: { - path: "/aggregator.Aggregator/DeleteTask", - requestStream: false, - responseStream: false, - requestType: avs_pb.UUID, - responseType: google_protobuf_wrappers_pb2.BoolValue, - requestSerialize: serialize_aggregator_UUID, - requestDeserialize: deserialize_aggregator_UUID, - responseSerialize: serialize_google_protobuf_BoolValue, - responseDeserialize: deserialize_google_protobuf_BoolValue - }, - // Operator endpoint - ping: { - path: "/aggregator.Aggregator/Ping", - requestStream: false, - responseStream: false, - requestType: avs_pb.Checkin, - responseType: avs_pb.CheckinResp, - requestSerialize: serialize_aggregator_Checkin, - requestDeserialize: deserialize_aggregator_Checkin, - responseSerialize: serialize_aggregator_CheckinResp, - responseDeserialize: deserialize_aggregator_CheckinResp - }, - syncTasks: { - path: "/aggregator.Aggregator/SyncTasks", - requestStream: false, - responseStream: true, - requestType: avs_pb.SyncTasksReq, - responseType: avs_pb.SyncTasksResp, - requestSerialize: serialize_aggregator_SyncTasksReq, - requestDeserialize: deserialize_aggregator_SyncTasksReq, - responseSerialize: serialize_aggregator_SyncTasksResp, - responseDeserialize: deserialize_aggregator_SyncTasksResp - }, - updateChecks: { - path: "/aggregator.Aggregator/UpdateChecks", - requestStream: false, - responseStream: false, - requestType: avs_pb.UpdateChecksReq, - responseType: avs_pb.UpdateChecksResp, - requestSerialize: serialize_aggregator_UpdateChecksReq, - requestDeserialize: deserialize_aggregator_UpdateChecksReq, - responseSerialize: serialize_aggregator_UpdateChecksResp, - responseDeserialize: deserialize_aggregator_UpdateChecksResp + return base; +}; +var nodeFromGRPC = (node) => { + const base = node.toObject(); + const standarize = { + taskType: node.getTaskTypeCase() + }; + switch (node.getTaskTypeCase()) { + case avs_pb.TaskNode.TaskTypeCase.ETH_TRANSFER: + standarize.ethTransfer = base.ethTransfer; + break; + case avs_pb.TaskNode.TaskTypeCase.CONTRACT_WRITE: + standarize.contractWrite = base.contractWrite; + break; + case avs_pb.TaskNode.TaskTypeCase.CONTRACT_READ: + standarize.contractRead = base.contractRead; + break; + case avs_pb.TaskNode.TaskTypeCase.GRAPHQL_DATA_QUERY: + standarize.graphqlDataQuery = base.graphqlDataQuery; + break; + case avs_pb.TaskNode.TaskTypeCase.REST_API: + standarize.restApi = base.restApi; + break; + case avs_pb.TaskNode.TaskTypeCase.BRANCH: + standarize.branch = { + conditions: base.branch.conditionsList + }; + break; + case avs_pb.TaskNode.TaskTypeCase.FILTER: + standarize.filter = base.filter; + break; + case avs_pb.TaskNode.TaskTypeCase.LOOP: + standarize.loop = base.loop; + break; + case avs_pb.TaskNode.TaskTypeCase.CUSTOM_CODE: + standarize.custom_code = base.custom_code; + break; } + return standarize; +}; +var taskEdgeFromGRPC = (edge) => { + return { + id: edge.getId(), + source: edge.getSource(), + target: edge.getTarget() + }; }; -var AggregatorClient = grpc.makeGenericClientConstructor(AggregatorService); - -// src/index.ts -init_avs_pb(); - -// src/types.ts -var AUTH_KEY_HEADER = "authKey"; // src/task.ts -var Task2 = class { - // Add other missing properties here +var Task = class { constructor(task) { - this.id = task.getId()?.toString() || ""; - this.status = task.getStatus().toString(); + this.id = task.getId() || ""; + this.status = task.getStatus(); this.owner = task.getOwner(); - this.smartAccountAddress = task.getSmartAccountAddress(); - this.trigger = { - triggerType: task.getTrigger()?.getTriggerType() || 0, - schedule: task.getTrigger()?.getSchedule()?.toObject(), - contractQuery: task.getTrigger()?.getContractQuery()?.toObject(), - expression: task.getTrigger()?.getExpression()?.toObject() || { - expression: "" - } - }; - this.nodesList = task.getNodesList(); + this.smartWalletAddress = task.getSmartWalletAddress(); + this.nodes = task.getNodesList().map((node) => nodeFromGRPC(node)); + this.trigger = triggerFromGRPC(task.getTrigger()); + this.edges = task.getEdgesList().map((edge) => taskEdgeFromGRPC(edge)); this.startAt = task.getStartAt(); this.expiredAt = task.getExpiredAt(); this.memo = task.getMemo(); this.completedAt = task.getCompletedAt(); this.status = task.getStatus(); - this.repeatable = task.getRepeatable(); - this.executionsList = task.getExecutionsList(); + this.executions = task.getExecutionsList().map((execution) => { + return { + epoch: execution.getEpoch(), + userOpHash: execution.getUserOpHash(), + error: execution.getError() + }; + }); + this.maxExecution = task.getMaxExecution(); } }; -var task_default = Task2; +var task_default = Task; + +// src/types.ts +var AUTH_KEY_HEADER = "authkey"; // src/index.ts var BaseClient = class { constructor(opts) { this.endpoint = opts.endpoint; - this.rpcClient = new AggregatorClient( + this.rpcClient = new import_avs_grpc_pb.AggregatorClient( this.endpoint, - grpc2.credentials.createInsecure() + grpc.credentials.createInsecure() ); this.metadata = new Metadata(); } @@ -4545,21 +5587,22 @@ var BaseClient = class { return false; } } - async authWithAPIKey(apiKey, expiredAtEpoch) { - const request = new GetKeyReq(); - request.setOwner(""); + // When using the APIkey, depends on scope of the key, it may have access to one ore more account + async authWithAPIKey(address, apiKey, expiredAtEpoch) { + const request = new avs_pb2.GetKeyReq(); + request.setOwner(address); request.setExpiredAt(expiredAtEpoch); request.setSignature(apiKey); - const result = await this._callRPC("getKey", request); + const result = await this._callAnonRPC("getKey", request); return { authKey: result.getKey() }; } // This flow can be used where the signature is generate from outside, such as in front-end and pass in async authWithSignature(address, signature, expiredAtEpoch) { - const request = new GetKeyReq(); + const request = new avs_pb2.GetKeyReq(); request.setOwner(address); request.setExpiredAt(expiredAtEpoch); request.setSignature(signature); - let result = await this._callRPC( + let result = await this._callAnonRPC( "getKey", request ); @@ -4567,9 +5610,23 @@ var BaseClient = class { } _callRPC(method, request, options) { const metadata = _.cloneDeep(this.metadata); - if (options?.authKey) { - metadata.set(AUTH_KEY_HEADER, options.authKey); + if (!options?.authKey) { + throw new Error("missing auth header"); } + metadata.set(AUTH_KEY_HEADER, options.authKey); + return new Promise((resolve, reject) => { + this.rpcClient[method].bind(this.rpcClient)( + request, + metadata, + (error, response) => { + if (error) reject(error); + else resolve(response); + } + ); + }); + } + _callAnonRPC(method, request, options) { + const metadata = _.cloneDeep(this.metadata); return new Promise((resolve, reject) => { this.rpcClient[method].bind(this.rpcClient)( request, @@ -4586,101 +5643,82 @@ var Client = class extends BaseClient { constructor(config) { super(config); } - async getAddresses(address, { authKey }) { - const request = new AddressRequest(); - request.setOwner(address); - const result = await this._callRPC("getSmartAccountAddress", request, { authKey }); - return { - owner: address, - smart_account_address: result.getSmartAccountAddress() - }; + async listSmartWallets(options) { + const request = new avs_pb2.ListWalletReq(); + const result = await this._callRPC("listWallets", request, options); + return result.getWalletsList().map((item) => item.toObject()); } - async createTask({ - address, - oracleContract, - tokenContract - }, { authKey }) { - const trigger = new TaskTrigger(); - trigger.setTriggerType(TriggerType.EXPRESSIONTRIGGER); - trigger.setExpression( - new ExpressionCondition().setExpression(` - bigCmp( - priceChainlink("${oracleContract}"), - toBigInt("10000") - ) > 0`) - ); - const action = new TaskAction(); - action.setTaskType(TaskType.CONTRACTEXECUTIONTASK); - action.setId("transfer_erc20_1"); - action.setName("Transfer Test Token"); - const execution = new ContractExecution(); - execution.setContractAddress(tokenContract); - let ABI = ["function transfer(address to, uint amount)"]; - let iface = new ethers.Interface(ABI); - const callData = iface.encodeFunctionData("transfer", [ - address, - ethers.parseUnits("12", 18) - ]); - execution.setCallData(callData); - action.setContractExecution(execution); - const request = new CreateTaskReq().setTrigger(trigger).setActionsList([action]).setExpiredAt(Math.floor(Date.now() / 1e3) + 1e6); - const result = await this._callRPC("createTask", request, { authKey }); + async createWallet({ + salt, + factoryAddress + }, options) { + const request = new avs_pb2.CreateWalletReq(); + request.setSalt(salt); + if (factoryAddress) { + request.setFactoryAddress(factoryAddress); + } + const result = await this._callRPC("createWallet", request, options); return { - id: result.getId() + address: result.getAddress(), + salt: result.getSalt(), + factory: result.getFactoryAddress() }; } - async listTasks(address, { authKey }) { - const request = new ListTasksReq(); - const result = await this._callRPC("listTasks", request, { authKey }); - const tasks = _.map( - result.getTasksList(), - (obj) => { - return { - id: obj.getId(), - status: _.capitalize(obj.getStatus().toString()) - }; - } - ); - return { - tasks - }; + async createTask(payload, options) { + const request = new avs_pb2.CreateTaskReq(); + request.setSmartWalletAddress(payload.smartWalletAddress); + request.setStartAt(payload.startAt); + request.setExpiredAt(payload.expiredAt || -1); + request.setMemo(payload.memo || ""); + request.setMaxExecution(payload.maxExecution || 0); + request.setTrigger(buildTrigger(payload.trigger)); + for (const node of payload.nodes) { + request.addNodes(buildTaskNode(node)); + } + const edges = []; + for (const edge of payload.edges) { + edges.push(buildTaskEdge(edge)); + } + request.setEdgesList(edges); + const result = await this._callRPC("createTask", request, options); + return result.getId(); + } + async listTasks(address, options) { + const request = new avs_pb2.ListTasksReq(); + request.setSmartWalletAddress(address); + const result = await this._callRPC("listTasks", request, options); + return result.getTasksList().map((item) => new task_default(item)); } // TODO: specify the return type to match client’s requirements - // Right now we simply return the original object from the server - async getTask(id, { authKey }) { - const request = new UUID(); - request.setBytes(id); - ``; + async getTask(id, options) { + const request = new avs_pb2.IdReq(); + request.setId(id); const result = await this._callRPC( "getTask", request, - { authKey } + options ); return new task_default(result); } - async cancelTask(id, { authKey }) { - const request = new UUID(); - request.setBytes(id); + async cancelTask(id, options) { + const request = new avs_pb2.IdReq(); + request.setId(id); const result = await this._callRPC( "cancelTask", request, - { authKey } + options ); - return { - value: result.getValue() - }; + return result.getValue(); } - async deleteTask(id, { authKey }) { - const request = new UUID(); - request.setBytes(id); + async deleteTask(id, options) { + const request = new avs_pb2.IdReq(); + request.setId(id); const result = await this._callRPC( "deleteTask", request, - { authKey } + options ); - return { - value: result.getValue() - }; + return result.getValue(); } }; export { diff --git a/grpc_codegen/avs.proto b/grpc_codegen/avs.proto index a7cfeb8..61bc670 100644 --- a/grpc_codegen/avs.proto +++ b/grpc_codegen/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,32 +39,16 @@ message SyncTasksReq { int64 monotonic_clock = 4; } -enum TriggerType { - TimeTrigger = 0; - ContractQueryTrigger = 1; - ExpressionTrigger = 2; +message FixedEpochCondition { + repeated int64 epochs = 1; } - -message TaskTrigger { - TriggerType trigger_type = 1; - - TimeCondition schedule = 2; - ContractQueryCondition contract_query = 3; - ExpressionCondition expression = 4; +// Simple timebase or cron syntax. +message CronCondition { + repeated string schedule = 1; } -// 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; +message BlockCondition { + int64 interval = 1; } // An arbitrary expression to express the condition. @@ -77,10 +61,49 @@ message ContractQueryCondition { // 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 { +message EventCondition { string expression = 1; } +message TaskTrigger { + oneof trigger_type { + bool manual = 1; + + // run at a specific epoch, name inspired by unix `at` utility + FixedEpochCondition fixed_time = 2; + + // 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 +// Guide: https://grpc.io/docs/guides/error/ +// Go: https://github.com/grpc/grpc-go/blob/master/codes/codes.go#L199 +enum Error { + // An error that happen when the app can be recovered but the cause is unknow, rarely use, we try to use specific error as much as we can + UnknowError = 0; + // internal rpc node error + RpcNodeError = 1000; + // storage system isn't available to respond to query + StorageUnavailable = 2000; + StorageWriteError = 2001; + // target chain of smart wallet is error and cannot used to determine smartwallet info + SmartWalletRpcError = 6000; + SmartWalletNotFoundError = 6001; + + // Error occurs when we failed to migrate task data and it cannot be decode + TaskDataCorrupted = 7000; + TaskDataMissingError = 7001; +} + + message SyncTasksResp { string id = 1; string checkType = 2; @@ -88,181 +111,212 @@ 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_account_address = 3; - TaskTrigger trigger = 4; - repeated TaskAction nodes = 5; - - // 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; - - 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; + 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; + + TaskStatus status = 9; + TaskTrigger trigger = 10; + repeated TaskNode nodes = 11; + repeated TaskEdge edges = 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; + TaskTrigger trigger = 1; + + 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 = 5; + + string memo = 6; + repeated TaskNode nodes = 7; + repeated TaskEdge edges = 8; } message CreateTaskResp { - string id = 1; + string id = 1; } message NonceRequest { - string owner = 1; + string owner = 1; } message NonceResp { - string nonce = 1; + string nonce = 1; } -message AddressRequest { - string owner = 1; +message ListWalletReq { + // filter out by factory address or salt + // otherwise return all the wallet + string factory = 1; + string salt = 2; } -message AddressResp { - string smart_account_address = 1; - string nonce = 2; +message SmartWallet { + string address = 1; + string salt = 2; + string factory = 3; } -message ListTasksReq {} +message ListWalletResp { + repeated SmartWallet wallets = 1; +} -message ListTasksResp { - message TaskItemResp { - string id = 1; - TaskStatus status = 2; - } - repeated TaskItemResp tasks = 1; +message ListTasksReq { + // Filter out by the smart_wallet_address + string smart_wallet_address = 1; +} + +message ListTasksResp { + 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 { @@ -275,20 +329,33 @@ message UpdateChecksResp { google.protobuf.Timestamp updated_at = 1; } +message CreateWalletReq { + string salt = 1; + // this is the factory address for the wallet, when leaving its empty, we will use our default factory address + string factory_address = 2; +} + +message CreateWalletResp { + string address = 1; + string salt = 2; + string factory_address = 3; +} + service Aggregator { // Auth rpc GetKey(GetKeyReq) returns (KeyResp) {}; // Smart Acccount - rpc GetNonce(NonceRequest) returns (NonceResp) {}; - rpc GetSmartAccountAddress(AddressRequest) returns (AddressResp) {}; + rpc GetNonce(NonceRequest) returns (NonceResp) {}; + rpc CreateWallet(CreateWalletReq) returns (CreateWalletResp) {}; + rpc ListWallets(ListWalletReq) returns (ListWalletResp) {}; // Task Management - 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 CreateTask(CreateTaskReq) returns (CreateTaskResp) {}; + rpc ListTasks(ListTasksReq) returns (ListTasksResp) {}; + 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/grpc_codegen/avs.ts b/grpc_codegen/avs.ts deleted file mode 100644 index d8b0972..0000000 --- a/grpc_codegen/avs.ts +++ /dev/null @@ -1,3720 +0,0 @@ -// Code generated by protoc-gen-ts_proto. DO NOT EDIT. -// versions: -// protoc-gen-ts_proto v2.2.5 -// protoc v3.19.1 -// source: avs.proto - -/* eslint-disable */ -import { BinaryReader, BinaryWriter } from "@bufbuild/protobuf/wire"; -import { Observable } from "rxjs"; -import { map } from "rxjs/operators"; -import { Timestamp } from "./google/protobuf/timestamp"; -import { BoolValue } from "./google/protobuf/wrappers"; - -export const protobufPackage = "aggregator"; - -export enum TriggerType { - TimeTrigger = 0, - ContractQueryTrigger = 1, - ExpressionTrigger = 2, - UNRECOGNIZED = -1, -} - -export function triggerTypeFromJSON(object: any): TriggerType { - switch (object) { - case 0: - case "TimeTrigger": - return TriggerType.TimeTrigger; - case 1: - case "ContractQueryTrigger": - return TriggerType.ContractQueryTrigger; - case 2: - case "ExpressionTrigger": - return TriggerType.ExpressionTrigger; - case -1: - case "UNRECOGNIZED": - default: - return TriggerType.UNRECOGNIZED; - } -} - -export function triggerTypeToJSON(object: TriggerType): string { - switch (object) { - case TriggerType.TimeTrigger: - return "TimeTrigger"; - case TriggerType.ContractQueryTrigger: - return "ContractQueryTrigger"; - case TriggerType.ExpressionTrigger: - return "ExpressionTrigger"; - case TriggerType.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -/** TaskType represents what kind of work the task will perform */ -export enum TaskType { - /** ETHTransferTask - Handle default/missing data */ - ETHTransferTask = 0, - /** - * ContractExecutionTask - 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, - /** HTTPAPICallTask - Make call to a HTTP endpoint */ - HTTPAPICallTask = 3, - /** CustomCodeTask - CustomCode allow to run arbitraty JavaScript. */ - CustomCodeTask = 4, - BranchActionTask = 5, - UNRECOGNIZED = -1, -} - -export function taskTypeFromJSON(object: any): TaskType { - switch (object) { - case 0: - case "ETHTransferTask": - return TaskType.ETHTransferTask; - case 1: - case "ContractExecutionTask": - return TaskType.ContractExecutionTask; - case 2: - case "GraphQLDataQueryTask": - return TaskType.GraphQLDataQueryTask; - case 3: - case "HTTPAPICallTask": - return TaskType.HTTPAPICallTask; - case 4: - case "CustomCodeTask": - return TaskType.CustomCodeTask; - case 5: - case "BranchActionTask": - return TaskType.BranchActionTask; - case -1: - case "UNRECOGNIZED": - default: - return TaskType.UNRECOGNIZED; - } -} - -export function taskTypeToJSON(object: TaskType): string { - switch (object) { - case TaskType.ETHTransferTask: - return "ETHTransferTask"; - case TaskType.ContractExecutionTask: - return "ContractExecutionTask"; - case TaskType.GraphQLDataQueryTask: - return "GraphQLDataQueryTask"; - case TaskType.HTTPAPICallTask: - return "HTTPAPICallTask"; - case TaskType.CustomCodeTask: - return "CustomCodeTask"; - case TaskType.BranchActionTask: - return "BranchActionTask"; - case TaskType.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -/** TaskStatus represents status of the task. The transition is as follow */ -export enum TaskStatus { - Active = 0, - Completed = 1, - Failed = 2, - Canceled = 3, - Executing = 4, - UNRECOGNIZED = -1, -} - -export function taskStatusFromJSON(object: any): TaskStatus { - switch (object) { - case 0: - case "Active": - return TaskStatus.Active; - case 1: - case "Completed": - return TaskStatus.Completed; - case 2: - case "Failed": - return TaskStatus.Failed; - case 3: - case "Canceled": - return TaskStatus.Canceled; - case 4: - case "Executing": - return TaskStatus.Executing; - case -1: - case "UNRECOGNIZED": - default: - return TaskStatus.UNRECOGNIZED; - } -} - -export function taskStatusToJSON(object: TaskStatus): string { - switch (object) { - case TaskStatus.Active: - return "Active"; - case TaskStatus.Completed: - return "Completed"; - case TaskStatus.Failed: - return "Failed"; - case TaskStatus.Canceled: - return "Canceled"; - case TaskStatus.Executing: - return "Executing"; - case TaskStatus.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -export enum CustomCodeType { - JavaScript = 0, - UNRECOGNIZED = -1, -} - -export function customCodeTypeFromJSON(object: any): CustomCodeType { - switch (object) { - case 0: - case "JavaScript": - return CustomCodeType.JavaScript; - case -1: - case "UNRECOGNIZED": - default: - return CustomCodeType.UNRECOGNIZED; - } -} - -export function customCodeTypeToJSON(object: CustomCodeType): string { - switch (object) { - case CustomCodeType.JavaScript: - return "JavaScript"; - case CustomCodeType.UNRECOGNIZED: - default: - return "UNRECOGNIZED"; - } -} - -export interface UUID { - bytes: string; -} - -export interface Checkin { - id: string; - address: string; - signature: string; - status: Checkin_Status | undefined; - version: string; - metricsPort: number; - remoteIP: string; -} - -export interface Checkin_Status { - uptime: number; - queueDepth: number; - lastHeartbeat: Date | undefined; -} - -export interface CheckinResp { - updatedAt: Date | undefined; -} - -export interface SyncTasksReq { - id: string; - address: string; - signature: string; - monotonicClock: number; -} - -export interface TaskTrigger { - triggerType: TriggerType; - schedule: TimeCondition | undefined; - contractQuery: ContractQueryCondition | undefined; - expression: ExpressionCondition | undefined; -} - -/** Simple timebase or cron syntax. */ -export interface TimeCondition { - fixed: number[]; - cron: string; -} - -/** - * 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 - */ -export interface ContractQueryCondition { - contractAddress: string; - callmsg: string; -} - -/** - * 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/ - */ -export interface ExpressionCondition { - expression: string; -} - -export interface SyncTasksResp { - id: string; - checkType: string; - trigger: TaskTrigger | undefined; -} - -export interface ETHTransfer { - destination: string; - amount: string; -} - -export interface ContractExecution { - contractAddress: string; - callData: string; - method: string; - encodedParams: string; -} - -export interface GraphQLDataQuery { - /** TODO: support graphql variable */ - url: string; - query: string; -} - -export interface HTTPAPICall { - url: string; - headers: { [key: string]: string }; - body: string; -} - -export interface HTTPAPICall_HeadersEntry { - key: string; - value: string; -} - -export interface CustomCode { - type: CustomCodeType; - body: string; -} - -export interface ConditionJump { - expression: string; - next: string; -} - -export interface BranchAction { - If: ConditionJump | undefined; - ElseIfs: ConditionJump[]; - Else: ConditionJump | undefined; -} - -export interface TaskAction { - taskType: TaskType; - id: string; - name: string; - /** - * Next can be empty. In some kind of block, such as branching, the next is - * based on branching condition - */ - next: string[]; - /** Transfer eth */ - ethTransfer: - | ETHTransfer - | undefined; - /** - * Run one ore more contracts. The call call also be batched with tool like - * multicall to wrap many calls - */ - contractExecution: - | ContractExecution - | undefined; - /** Make call to a graphql endpoint */ - graphqlDataQuery: - | GraphQLDataQuery - | undefined; - /** Make call to a HTTP endpoint */ - httpDataQuery: - | HTTPAPICall - | undefined; - /** CustomCode allow to run arbitraty JavaScript. */ - customCode: CustomCode | undefined; - branch: BranchAction | undefined; -} - -export interface Execution { - epoch: number; - userOpHash: string; - error: string; -} - -export interface Task { - id: UUID | undefined; - owner: string; - smartAccountAddress: string; - trigger: TaskTrigger | undefined; - nodes: TaskAction[]; - /** task won't be check before this */ - startAt: number; - /** task won't be run/check after this */ - expiredAt: number; - /** arbitrary data about this task */ - memo: string; - completedAt: number; - status: TaskStatus; - /** repeatable means a task can continue to run even after the first execution */ - repeatable: boolean; - executions: Execution[]; -} - -export interface CreateTaskReq { - trigger: TaskTrigger | undefined; - actions: TaskAction[]; - startAt: number; - expiredAt: number; - memo: string; - /** A repeatable task will continue to be run */ - repeatable: boolean; -} - -export interface CreateTaskResp { - id: string; -} - -export interface NonceRequest { - owner: string; -} - -export interface NonceResp { - nonce: string; -} - -export interface AddressRequest { - owner: string; -} - -export interface AddressResp { - smartAccountAddress: string; - nonce: string; -} - -export interface ListTasksReq { -} - -export interface ListTasksResp { - tasks: ListTasksResp_TaskItemResp[]; -} - -export interface ListTasksResp_TaskItemResp { - id: string; - status: TaskStatus; -} - -export interface GetKeyReq { - owner: string; - expiredAt: number; - signature: string; -} - -export interface KeyResp { - key: string; -} - -export interface UpdateChecksReq { - address: string; - signature: string; - id: string[]; -} - -export interface UpdateChecksResp { - updatedAt: Date | undefined; -} - -function createBaseUUID(): UUID { - return { bytes: "" }; -} - -export const UUID: MessageFns = { - encode(message: UUID, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.bytes !== "") { - writer.uint32(10).string(message.bytes); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): UUID { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUUID(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break; - } - - message.bytes = reader.string(); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): UUID { - return { bytes: isSet(object.bytes) ? globalThis.String(object.bytes) : "" }; - }, - - toJSON(message: UUID): unknown { - const obj: any = {}; - if (message.bytes !== "") { - obj.bytes = message.bytes; - } - return obj; - }, - - create, I>>(base?: I): UUID { - return UUID.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): UUID { - const message = createBaseUUID(); - message.bytes = object.bytes ?? ""; - return message; - }, -}; - -function createBaseCheckin(): Checkin { - return { id: "", address: "", signature: "", status: undefined, version: "", metricsPort: 0, remoteIP: "" }; -} - -export const Checkin: MessageFns = { - encode(message: Checkin, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.id !== "") { - writer.uint32(10).string(message.id); - } - if (message.address !== "") { - writer.uint32(18).string(message.address); - } - if (message.signature !== "") { - writer.uint32(26).string(message.signature); - } - if (message.status !== undefined) { - Checkin_Status.encode(message.status, writer.uint32(34).fork()).join(); - } - if (message.version !== "") { - writer.uint32(42).string(message.version); - } - if (message.metricsPort !== 0) { - writer.uint32(48).int32(message.metricsPort); - } - if (message.remoteIP !== "") { - writer.uint32(58).string(message.remoteIP); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): Checkin { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCheckin(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break; - } - - message.id = reader.string(); - continue; - } - case 2: { - if (tag !== 18) { - break; - } - - message.address = reader.string(); - continue; - } - case 3: { - if (tag !== 26) { - break; - } - - message.signature = reader.string(); - continue; - } - case 4: { - if (tag !== 34) { - break; - } - - message.status = Checkin_Status.decode(reader, reader.uint32()); - continue; - } - case 5: { - if (tag !== 42) { - break; - } - - message.version = reader.string(); - continue; - } - case 6: { - if (tag !== 48) { - break; - } - - message.metricsPort = reader.int32(); - continue; - } - case 7: { - if (tag !== 58) { - break; - } - - message.remoteIP = reader.string(); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): Checkin { - return { - id: isSet(object.id) ? globalThis.String(object.id) : "", - address: isSet(object.address) ? globalThis.String(object.address) : "", - signature: isSet(object.signature) ? globalThis.String(object.signature) : "", - status: isSet(object.status) ? Checkin_Status.fromJSON(object.status) : undefined, - version: isSet(object.version) ? globalThis.String(object.version) : "", - metricsPort: isSet(object.metricsPort) ? globalThis.Number(object.metricsPort) : 0, - remoteIP: isSet(object.remoteIP) ? globalThis.String(object.remoteIP) : "", - }; - }, - - toJSON(message: Checkin): unknown { - const obj: any = {}; - if (message.id !== "") { - obj.id = message.id; - } - if (message.address !== "") { - obj.address = message.address; - } - if (message.signature !== "") { - obj.signature = message.signature; - } - if (message.status !== undefined) { - obj.status = Checkin_Status.toJSON(message.status); - } - if (message.version !== "") { - obj.version = message.version; - } - if (message.metricsPort !== 0) { - obj.metricsPort = Math.round(message.metricsPort); - } - if (message.remoteIP !== "") { - obj.remoteIP = message.remoteIP; - } - return obj; - }, - - create, I>>(base?: I): Checkin { - return Checkin.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): Checkin { - const message = createBaseCheckin(); - message.id = object.id ?? ""; - message.address = object.address ?? ""; - message.signature = object.signature ?? ""; - message.status = (object.status !== undefined && object.status !== null) - ? Checkin_Status.fromPartial(object.status) - : undefined; - message.version = object.version ?? ""; - message.metricsPort = object.metricsPort ?? 0; - message.remoteIP = object.remoteIP ?? ""; - return message; - }, -}; - -function createBaseCheckin_Status(): Checkin_Status { - return { uptime: 0, queueDepth: 0, lastHeartbeat: undefined }; -} - -export const Checkin_Status: MessageFns = { - encode(message: Checkin_Status, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.uptime !== 0) { - writer.uint32(8).int64(message.uptime); - } - if (message.queueDepth !== 0) { - writer.uint32(16).int64(message.queueDepth); - } - if (message.lastHeartbeat !== undefined) { - Timestamp.encode(toTimestamp(message.lastHeartbeat), writer.uint32(26).fork()).join(); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): Checkin_Status { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCheckin_Status(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 8) { - break; - } - - message.uptime = longToNumber(reader.int64()); - continue; - } - case 2: { - if (tag !== 16) { - break; - } - - message.queueDepth = longToNumber(reader.int64()); - continue; - } - case 3: { - if (tag !== 26) { - break; - } - - message.lastHeartbeat = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): Checkin_Status { - return { - uptime: isSet(object.uptime) ? globalThis.Number(object.uptime) : 0, - queueDepth: isSet(object.queueDepth) ? globalThis.Number(object.queueDepth) : 0, - lastHeartbeat: isSet(object.lastHeartbeat) ? fromJsonTimestamp(object.lastHeartbeat) : undefined, - }; - }, - - toJSON(message: Checkin_Status): unknown { - const obj: any = {}; - if (message.uptime !== 0) { - obj.uptime = Math.round(message.uptime); - } - if (message.queueDepth !== 0) { - obj.queueDepth = Math.round(message.queueDepth); - } - if (message.lastHeartbeat !== undefined) { - obj.lastHeartbeat = message.lastHeartbeat.toISOString(); - } - return obj; - }, - - create, I>>(base?: I): Checkin_Status { - return Checkin_Status.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): Checkin_Status { - const message = createBaseCheckin_Status(); - message.uptime = object.uptime ?? 0; - message.queueDepth = object.queueDepth ?? 0; - message.lastHeartbeat = object.lastHeartbeat ?? undefined; - return message; - }, -}; - -function createBaseCheckinResp(): CheckinResp { - return { updatedAt: undefined }; -} - -export const CheckinResp: MessageFns = { - encode(message: CheckinResp, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.updatedAt !== undefined) { - Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(10).fork()).join(); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): CheckinResp { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCheckinResp(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break; - } - - message.updatedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): CheckinResp { - return { updatedAt: isSet(object.updatedAt) ? fromJsonTimestamp(object.updatedAt) : undefined }; - }, - - toJSON(message: CheckinResp): unknown { - const obj: any = {}; - if (message.updatedAt !== undefined) { - obj.updatedAt = message.updatedAt.toISOString(); - } - return obj; - }, - - create, I>>(base?: I): CheckinResp { - return CheckinResp.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): CheckinResp { - const message = createBaseCheckinResp(); - message.updatedAt = object.updatedAt ?? undefined; - return message; - }, -}; - -function createBaseSyncTasksReq(): SyncTasksReq { - return { id: "", address: "", signature: "", monotonicClock: 0 }; -} - -export const SyncTasksReq: MessageFns = { - encode(message: SyncTasksReq, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.id !== "") { - writer.uint32(10).string(message.id); - } - if (message.address !== "") { - writer.uint32(18).string(message.address); - } - if (message.signature !== "") { - writer.uint32(26).string(message.signature); - } - if (message.monotonicClock !== 0) { - writer.uint32(32).int64(message.monotonicClock); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): SyncTasksReq { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSyncTasksReq(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break; - } - - message.id = reader.string(); - continue; - } - case 2: { - if (tag !== 18) { - break; - } - - message.address = reader.string(); - continue; - } - case 3: { - if (tag !== 26) { - break; - } - - message.signature = reader.string(); - continue; - } - case 4: { - if (tag !== 32) { - break; - } - - message.monotonicClock = longToNumber(reader.int64()); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): SyncTasksReq { - return { - id: isSet(object.id) ? globalThis.String(object.id) : "", - address: isSet(object.address) ? globalThis.String(object.address) : "", - signature: isSet(object.signature) ? globalThis.String(object.signature) : "", - monotonicClock: isSet(object.monotonicClock) ? globalThis.Number(object.monotonicClock) : 0, - }; - }, - - toJSON(message: SyncTasksReq): unknown { - const obj: any = {}; - if (message.id !== "") { - obj.id = message.id; - } - if (message.address !== "") { - obj.address = message.address; - } - if (message.signature !== "") { - obj.signature = message.signature; - } - if (message.monotonicClock !== 0) { - obj.monotonicClock = Math.round(message.monotonicClock); - } - return obj; - }, - - create, I>>(base?: I): SyncTasksReq { - return SyncTasksReq.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): SyncTasksReq { - const message = createBaseSyncTasksReq(); - message.id = object.id ?? ""; - message.address = object.address ?? ""; - message.signature = object.signature ?? ""; - message.monotonicClock = object.monotonicClock ?? 0; - return message; - }, -}; - -function createBaseTaskTrigger(): TaskTrigger { - return { triggerType: 0, schedule: undefined, contractQuery: undefined, expression: undefined }; -} - -export const TaskTrigger: MessageFns = { - encode(message: TaskTrigger, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.triggerType !== 0) { - writer.uint32(8).int32(message.triggerType); - } - if (message.schedule !== undefined) { - TimeCondition.encode(message.schedule, writer.uint32(18).fork()).join(); - } - if (message.contractQuery !== undefined) { - ContractQueryCondition.encode(message.contractQuery, writer.uint32(26).fork()).join(); - } - if (message.expression !== undefined) { - ExpressionCondition.encode(message.expression, writer.uint32(34).fork()).join(); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): TaskTrigger { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTaskTrigger(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 8) { - break; - } - - message.triggerType = reader.int32() as any; - continue; - } - case 2: { - if (tag !== 18) { - break; - } - - message.schedule = TimeCondition.decode(reader, reader.uint32()); - continue; - } - case 3: { - if (tag !== 26) { - break; - } - - message.contractQuery = ContractQueryCondition.decode(reader, reader.uint32()); - continue; - } - case 4: { - if (tag !== 34) { - break; - } - - message.expression = ExpressionCondition.decode(reader, reader.uint32()); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): TaskTrigger { - return { - triggerType: isSet(object.triggerType) ? triggerTypeFromJSON(object.triggerType) : 0, - schedule: isSet(object.schedule) ? TimeCondition.fromJSON(object.schedule) : undefined, - contractQuery: isSet(object.contractQuery) ? ContractQueryCondition.fromJSON(object.contractQuery) : undefined, - expression: isSet(object.expression) ? ExpressionCondition.fromJSON(object.expression) : undefined, - }; - }, - - toJSON(message: TaskTrigger): unknown { - const obj: any = {}; - if (message.triggerType !== 0) { - obj.triggerType = triggerTypeToJSON(message.triggerType); - } - if (message.schedule !== undefined) { - obj.schedule = TimeCondition.toJSON(message.schedule); - } - if (message.contractQuery !== undefined) { - obj.contractQuery = ContractQueryCondition.toJSON(message.contractQuery); - } - if (message.expression !== undefined) { - obj.expression = ExpressionCondition.toJSON(message.expression); - } - return obj; - }, - - create, I>>(base?: I): TaskTrigger { - return TaskTrigger.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): TaskTrigger { - const message = createBaseTaskTrigger(); - message.triggerType = object.triggerType ?? 0; - message.schedule = (object.schedule !== undefined && object.schedule !== null) - ? TimeCondition.fromPartial(object.schedule) - : undefined; - message.contractQuery = (object.contractQuery !== undefined && object.contractQuery !== null) - ? ContractQueryCondition.fromPartial(object.contractQuery) - : undefined; - message.expression = (object.expression !== undefined && object.expression !== null) - ? ExpressionCondition.fromPartial(object.expression) - : undefined; - return message; - }, -}; - -function createBaseTimeCondition(): TimeCondition { - return { fixed: [], cron: "" }; -} - -export const TimeCondition: MessageFns = { - encode(message: TimeCondition, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - writer.uint32(10).fork(); - for (const v of message.fixed) { - writer.int64(v); - } - writer.join(); - if (message.cron !== "") { - writer.uint32(18).string(message.cron); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): TimeCondition { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTimeCondition(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag === 8) { - message.fixed.push(longToNumber(reader.int64())); - - continue; - } - - if (tag === 10) { - const end2 = reader.uint32() + reader.pos; - while (reader.pos < end2) { - message.fixed.push(longToNumber(reader.int64())); - } - - continue; - } - - break; - } - case 2: { - if (tag !== 18) { - break; - } - - message.cron = reader.string(); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): TimeCondition { - return { - fixed: globalThis.Array.isArray(object?.fixed) ? object.fixed.map((e: any) => globalThis.Number(e)) : [], - cron: isSet(object.cron) ? globalThis.String(object.cron) : "", - }; - }, - - toJSON(message: TimeCondition): unknown { - const obj: any = {}; - if (message.fixed?.length) { - obj.fixed = message.fixed.map((e) => Math.round(e)); - } - if (message.cron !== "") { - obj.cron = message.cron; - } - return obj; - }, - - create, I>>(base?: I): TimeCondition { - return TimeCondition.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): TimeCondition { - const message = createBaseTimeCondition(); - message.fixed = object.fixed?.map((e) => e) || []; - message.cron = object.cron ?? ""; - return message; - }, -}; - -function createBaseContractQueryCondition(): ContractQueryCondition { - return { contractAddress: "", callmsg: "" }; -} - -export const ContractQueryCondition: MessageFns = { - encode(message: ContractQueryCondition, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.contractAddress !== "") { - writer.uint32(10).string(message.contractAddress); - } - if (message.callmsg !== "") { - writer.uint32(18).string(message.callmsg); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): ContractQueryCondition { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseContractQueryCondition(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break; - } - - message.contractAddress = reader.string(); - continue; - } - case 2: { - if (tag !== 18) { - break; - } - - message.callmsg = reader.string(); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): ContractQueryCondition { - return { - contractAddress: isSet(object.contractAddress) ? globalThis.String(object.contractAddress) : "", - callmsg: isSet(object.callmsg) ? globalThis.String(object.callmsg) : "", - }; - }, - - toJSON(message: ContractQueryCondition): unknown { - const obj: any = {}; - if (message.contractAddress !== "") { - obj.contractAddress = message.contractAddress; - } - if (message.callmsg !== "") { - obj.callmsg = message.callmsg; - } - return obj; - }, - - create, I>>(base?: I): ContractQueryCondition { - return ContractQueryCondition.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): ContractQueryCondition { - const message = createBaseContractQueryCondition(); - message.contractAddress = object.contractAddress ?? ""; - message.callmsg = object.callmsg ?? ""; - return message; - }, -}; - -function createBaseExpressionCondition(): ExpressionCondition { - return { expression: "" }; -} - -export const ExpressionCondition: MessageFns = { - encode(message: ExpressionCondition, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.expression !== "") { - writer.uint32(10).string(message.expression); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): ExpressionCondition { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseExpressionCondition(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break; - } - - message.expression = reader.string(); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): ExpressionCondition { - return { expression: isSet(object.expression) ? globalThis.String(object.expression) : "" }; - }, - - toJSON(message: ExpressionCondition): unknown { - const obj: any = {}; - if (message.expression !== "") { - obj.expression = message.expression; - } - return obj; - }, - - create, I>>(base?: I): ExpressionCondition { - return ExpressionCondition.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): ExpressionCondition { - const message = createBaseExpressionCondition(); - message.expression = object.expression ?? ""; - return message; - }, -}; - -function createBaseSyncTasksResp(): SyncTasksResp { - return { id: "", checkType: "", trigger: undefined }; -} - -export const SyncTasksResp: MessageFns = { - encode(message: SyncTasksResp, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.id !== "") { - writer.uint32(10).string(message.id); - } - if (message.checkType !== "") { - writer.uint32(18).string(message.checkType); - } - if (message.trigger !== undefined) { - TaskTrigger.encode(message.trigger, writer.uint32(26).fork()).join(); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): SyncTasksResp { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseSyncTasksResp(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break; - } - - message.id = reader.string(); - continue; - } - case 2: { - if (tag !== 18) { - break; - } - - message.checkType = reader.string(); - continue; - } - case 3: { - if (tag !== 26) { - break; - } - - message.trigger = TaskTrigger.decode(reader, reader.uint32()); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): SyncTasksResp { - return { - id: isSet(object.id) ? globalThis.String(object.id) : "", - checkType: isSet(object.checkType) ? globalThis.String(object.checkType) : "", - trigger: isSet(object.trigger) ? TaskTrigger.fromJSON(object.trigger) : undefined, - }; - }, - - toJSON(message: SyncTasksResp): unknown { - const obj: any = {}; - if (message.id !== "") { - obj.id = message.id; - } - if (message.checkType !== "") { - obj.checkType = message.checkType; - } - if (message.trigger !== undefined) { - obj.trigger = TaskTrigger.toJSON(message.trigger); - } - return obj; - }, - - create, I>>(base?: I): SyncTasksResp { - return SyncTasksResp.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): SyncTasksResp { - const message = createBaseSyncTasksResp(); - message.id = object.id ?? ""; - message.checkType = object.checkType ?? ""; - message.trigger = (object.trigger !== undefined && object.trigger !== null) - ? TaskTrigger.fromPartial(object.trigger) - : undefined; - return message; - }, -}; - -function createBaseETHTransfer(): ETHTransfer { - return { destination: "", amount: "" }; -} - -export const ETHTransfer: MessageFns = { - encode(message: ETHTransfer, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.destination !== "") { - writer.uint32(10).string(message.destination); - } - if (message.amount !== "") { - writer.uint32(18).string(message.amount); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): ETHTransfer { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseETHTransfer(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break; - } - - message.destination = reader.string(); - continue; - } - case 2: { - if (tag !== 18) { - break; - } - - message.amount = reader.string(); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): ETHTransfer { - return { - destination: isSet(object.destination) ? globalThis.String(object.destination) : "", - amount: isSet(object.amount) ? globalThis.String(object.amount) : "", - }; - }, - - toJSON(message: ETHTransfer): unknown { - const obj: any = {}; - if (message.destination !== "") { - obj.destination = message.destination; - } - if (message.amount !== "") { - obj.amount = message.amount; - } - return obj; - }, - - create, I>>(base?: I): ETHTransfer { - return ETHTransfer.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): ETHTransfer { - const message = createBaseETHTransfer(); - message.destination = object.destination ?? ""; - message.amount = object.amount ?? ""; - return message; - }, -}; - -function createBaseContractExecution(): ContractExecution { - return { contractAddress: "", callData: "", method: "", encodedParams: "" }; -} - -export const ContractExecution: MessageFns = { - encode(message: ContractExecution, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.contractAddress !== "") { - writer.uint32(10).string(message.contractAddress); - } - if (message.callData !== "") { - writer.uint32(18).string(message.callData); - } - if (message.method !== "") { - writer.uint32(26).string(message.method); - } - if (message.encodedParams !== "") { - writer.uint32(34).string(message.encodedParams); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): ContractExecution { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseContractExecution(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break; - } - - message.contractAddress = reader.string(); - continue; - } - case 2: { - if (tag !== 18) { - break; - } - - message.callData = reader.string(); - continue; - } - case 3: { - if (tag !== 26) { - break; - } - - message.method = reader.string(); - continue; - } - case 4: { - if (tag !== 34) { - break; - } - - message.encodedParams = reader.string(); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): ContractExecution { - return { - contractAddress: isSet(object.contractAddress) ? globalThis.String(object.contractAddress) : "", - callData: isSet(object.callData) ? globalThis.String(object.callData) : "", - method: isSet(object.method) ? globalThis.String(object.method) : "", - encodedParams: isSet(object.encodedParams) ? globalThis.String(object.encodedParams) : "", - }; - }, - - toJSON(message: ContractExecution): unknown { - const obj: any = {}; - if (message.contractAddress !== "") { - obj.contractAddress = message.contractAddress; - } - if (message.callData !== "") { - obj.callData = message.callData; - } - if (message.method !== "") { - obj.method = message.method; - } - if (message.encodedParams !== "") { - obj.encodedParams = message.encodedParams; - } - return obj; - }, - - create, I>>(base?: I): ContractExecution { - return ContractExecution.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): ContractExecution { - const message = createBaseContractExecution(); - message.contractAddress = object.contractAddress ?? ""; - message.callData = object.callData ?? ""; - message.method = object.method ?? ""; - message.encodedParams = object.encodedParams ?? ""; - return message; - }, -}; - -function createBaseGraphQLDataQuery(): GraphQLDataQuery { - return { url: "", query: "" }; -} - -export const GraphQLDataQuery: MessageFns = { - encode(message: GraphQLDataQuery, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.url !== "") { - writer.uint32(10).string(message.url); - } - if (message.query !== "") { - writer.uint32(18).string(message.query); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): GraphQLDataQuery { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGraphQLDataQuery(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break; - } - - message.url = reader.string(); - continue; - } - case 2: { - if (tag !== 18) { - break; - } - - message.query = reader.string(); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): GraphQLDataQuery { - return { - url: isSet(object.url) ? globalThis.String(object.url) : "", - query: isSet(object.query) ? globalThis.String(object.query) : "", - }; - }, - - toJSON(message: GraphQLDataQuery): unknown { - const obj: any = {}; - if (message.url !== "") { - obj.url = message.url; - } - if (message.query !== "") { - obj.query = message.query; - } - return obj; - }, - - create, I>>(base?: I): GraphQLDataQuery { - return GraphQLDataQuery.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): GraphQLDataQuery { - const message = createBaseGraphQLDataQuery(); - message.url = object.url ?? ""; - message.query = object.query ?? ""; - return message; - }, -}; - -function createBaseHTTPAPICall(): HTTPAPICall { - return { url: "", headers: {}, body: "" }; -} - -export const HTTPAPICall: MessageFns = { - encode(message: HTTPAPICall, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.url !== "") { - writer.uint32(10).string(message.url); - } - Object.entries(message.headers).forEach(([key, value]) => { - HTTPAPICall_HeadersEntry.encode({ key: key as any, value }, writer.uint32(18).fork()).join(); - }); - if (message.body !== "") { - writer.uint32(26).string(message.body); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): HTTPAPICall { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseHTTPAPICall(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break; - } - - message.url = reader.string(); - continue; - } - case 2: { - if (tag !== 18) { - break; - } - - const entry2 = HTTPAPICall_HeadersEntry.decode(reader, reader.uint32()); - if (entry2.value !== undefined) { - message.headers[entry2.key] = entry2.value; - } - continue; - } - case 3: { - if (tag !== 26) { - break; - } - - message.body = reader.string(); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): HTTPAPICall { - return { - url: isSet(object.url) ? globalThis.String(object.url) : "", - headers: isObject(object.headers) - ? Object.entries(object.headers).reduce<{ [key: string]: string }>((acc, [key, value]) => { - acc[key] = String(value); - return acc; - }, {}) - : {}, - body: isSet(object.body) ? globalThis.String(object.body) : "", - }; - }, - - toJSON(message: HTTPAPICall): unknown { - const obj: any = {}; - if (message.url !== "") { - obj.url = message.url; - } - if (message.headers) { - const entries = Object.entries(message.headers); - if (entries.length > 0) { - obj.headers = {}; - entries.forEach(([k, v]) => { - obj.headers[k] = v; - }); - } - } - if (message.body !== "") { - obj.body = message.body; - } - return obj; - }, - - create, I>>(base?: I): HTTPAPICall { - return HTTPAPICall.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): HTTPAPICall { - const message = createBaseHTTPAPICall(); - message.url = object.url ?? ""; - message.headers = Object.entries(object.headers ?? {}).reduce<{ [key: string]: string }>((acc, [key, value]) => { - if (value !== undefined) { - acc[key] = globalThis.String(value); - } - return acc; - }, {}); - message.body = object.body ?? ""; - return message; - }, -}; - -function createBaseHTTPAPICall_HeadersEntry(): HTTPAPICall_HeadersEntry { - return { key: "", value: "" }; -} - -export const HTTPAPICall_HeadersEntry: MessageFns = { - encode(message: HTTPAPICall_HeadersEntry, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.key !== "") { - writer.uint32(10).string(message.key); - } - if (message.value !== "") { - writer.uint32(18).string(message.value); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): HTTPAPICall_HeadersEntry { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseHTTPAPICall_HeadersEntry(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break; - } - - message.key = reader.string(); - continue; - } - case 2: { - if (tag !== 18) { - break; - } - - message.value = reader.string(); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): HTTPAPICall_HeadersEntry { - return { - key: isSet(object.key) ? globalThis.String(object.key) : "", - value: isSet(object.value) ? globalThis.String(object.value) : "", - }; - }, - - toJSON(message: HTTPAPICall_HeadersEntry): unknown { - const obj: any = {}; - if (message.key !== "") { - obj.key = message.key; - } - if (message.value !== "") { - obj.value = message.value; - } - return obj; - }, - - create, I>>(base?: I): HTTPAPICall_HeadersEntry { - return HTTPAPICall_HeadersEntry.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): HTTPAPICall_HeadersEntry { - const message = createBaseHTTPAPICall_HeadersEntry(); - message.key = object.key ?? ""; - message.value = object.value ?? ""; - return message; - }, -}; - -function createBaseCustomCode(): CustomCode { - return { type: 0, body: "" }; -} - -export const CustomCode: MessageFns = { - encode(message: CustomCode, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.type !== 0) { - writer.uint32(8).int32(message.type); - } - if (message.body !== "") { - writer.uint32(18).string(message.body); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): CustomCode { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCustomCode(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 8) { - break; - } - - message.type = reader.int32() as any; - continue; - } - case 2: { - if (tag !== 18) { - break; - } - - message.body = reader.string(); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): CustomCode { - return { - type: isSet(object.type) ? customCodeTypeFromJSON(object.type) : 0, - body: isSet(object.body) ? globalThis.String(object.body) : "", - }; - }, - - toJSON(message: CustomCode): unknown { - const obj: any = {}; - if (message.type !== 0) { - obj.type = customCodeTypeToJSON(message.type); - } - if (message.body !== "") { - obj.body = message.body; - } - return obj; - }, - - create, I>>(base?: I): CustomCode { - return CustomCode.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): CustomCode { - const message = createBaseCustomCode(); - message.type = object.type ?? 0; - message.body = object.body ?? ""; - return message; - }, -}; - -function createBaseConditionJump(): ConditionJump { - return { expression: "", next: "" }; -} - -export const ConditionJump: MessageFns = { - encode(message: ConditionJump, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.expression !== "") { - writer.uint32(10).string(message.expression); - } - if (message.next !== "") { - writer.uint32(18).string(message.next); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): ConditionJump { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseConditionJump(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break; - } - - message.expression = reader.string(); - continue; - } - case 2: { - if (tag !== 18) { - break; - } - - message.next = reader.string(); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): ConditionJump { - return { - expression: isSet(object.expression) ? globalThis.String(object.expression) : "", - next: isSet(object.next) ? globalThis.String(object.next) : "", - }; - }, - - toJSON(message: ConditionJump): unknown { - const obj: any = {}; - if (message.expression !== "") { - obj.expression = message.expression; - } - if (message.next !== "") { - obj.next = message.next; - } - return obj; - }, - - create, I>>(base?: I): ConditionJump { - return ConditionJump.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): ConditionJump { - const message = createBaseConditionJump(); - message.expression = object.expression ?? ""; - message.next = object.next ?? ""; - return message; - }, -}; - -function createBaseBranchAction(): BranchAction { - return { If: undefined, ElseIfs: [], Else: undefined }; -} - -export const BranchAction: MessageFns = { - encode(message: BranchAction, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.If !== undefined) { - ConditionJump.encode(message.If, writer.uint32(10).fork()).join(); - } - for (const v of message.ElseIfs) { - ConditionJump.encode(v!, writer.uint32(18).fork()).join(); - } - if (message.Else !== undefined) { - ConditionJump.encode(message.Else, writer.uint32(26).fork()).join(); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): BranchAction { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseBranchAction(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break; - } - - message.If = ConditionJump.decode(reader, reader.uint32()); - continue; - } - case 2: { - if (tag !== 18) { - break; - } - - message.ElseIfs.push(ConditionJump.decode(reader, reader.uint32())); - continue; - } - case 3: { - if (tag !== 26) { - break; - } - - message.Else = ConditionJump.decode(reader, reader.uint32()); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): BranchAction { - return { - If: isSet(object.If) ? ConditionJump.fromJSON(object.If) : undefined, - ElseIfs: globalThis.Array.isArray(object?.ElseIfs) - ? object.ElseIfs.map((e: any) => ConditionJump.fromJSON(e)) - : [], - Else: isSet(object.Else) ? ConditionJump.fromJSON(object.Else) : undefined, - }; - }, - - toJSON(message: BranchAction): unknown { - const obj: any = {}; - if (message.If !== undefined) { - obj.If = ConditionJump.toJSON(message.If); - } - if (message.ElseIfs?.length) { - obj.ElseIfs = message.ElseIfs.map((e) => ConditionJump.toJSON(e)); - } - if (message.Else !== undefined) { - obj.Else = ConditionJump.toJSON(message.Else); - } - return obj; - }, - - create, I>>(base?: I): BranchAction { - return BranchAction.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): BranchAction { - const message = createBaseBranchAction(); - message.If = (object.If !== undefined && object.If !== null) ? ConditionJump.fromPartial(object.If) : undefined; - message.ElseIfs = object.ElseIfs?.map((e) => ConditionJump.fromPartial(e)) || []; - message.Else = (object.Else !== undefined && object.Else !== null) - ? ConditionJump.fromPartial(object.Else) - : undefined; - return message; - }, -}; - -function createBaseTaskAction(): TaskAction { - return { - taskType: 0, - id: "", - name: "", - next: [], - ethTransfer: undefined, - contractExecution: undefined, - graphqlDataQuery: undefined, - httpDataQuery: undefined, - customCode: undefined, - branch: undefined, - }; -} - -export const TaskAction: MessageFns = { - encode(message: TaskAction, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.taskType !== 0) { - writer.uint32(8).int32(message.taskType); - } - if (message.id !== "") { - writer.uint32(18).string(message.id); - } - if (message.name !== "") { - writer.uint32(26).string(message.name); - } - for (const v of message.next) { - writer.uint32(34).string(v!); - } - if (message.ethTransfer !== undefined) { - ETHTransfer.encode(message.ethTransfer, writer.uint32(82).fork()).join(); - } - if (message.contractExecution !== undefined) { - ContractExecution.encode(message.contractExecution, writer.uint32(90).fork()).join(); - } - if (message.graphqlDataQuery !== undefined) { - GraphQLDataQuery.encode(message.graphqlDataQuery, writer.uint32(98).fork()).join(); - } - if (message.httpDataQuery !== undefined) { - HTTPAPICall.encode(message.httpDataQuery, writer.uint32(106).fork()).join(); - } - if (message.customCode !== undefined) { - CustomCode.encode(message.customCode, writer.uint32(114).fork()).join(); - } - if (message.branch !== undefined) { - BranchAction.encode(message.branch, writer.uint32(122).fork()).join(); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): TaskAction { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTaskAction(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 8) { - break; - } - - message.taskType = reader.int32() as any; - continue; - } - case 2: { - if (tag !== 18) { - break; - } - - message.id = reader.string(); - continue; - } - case 3: { - if (tag !== 26) { - break; - } - - message.name = reader.string(); - continue; - } - case 4: { - if (tag !== 34) { - break; - } - - message.next.push(reader.string()); - continue; - } - case 10: { - if (tag !== 82) { - break; - } - - message.ethTransfer = ETHTransfer.decode(reader, reader.uint32()); - continue; - } - case 11: { - if (tag !== 90) { - break; - } - - message.contractExecution = ContractExecution.decode(reader, reader.uint32()); - continue; - } - case 12: { - if (tag !== 98) { - break; - } - - message.graphqlDataQuery = GraphQLDataQuery.decode(reader, reader.uint32()); - continue; - } - case 13: { - if (tag !== 106) { - break; - } - - message.httpDataQuery = HTTPAPICall.decode(reader, reader.uint32()); - continue; - } - case 14: { - if (tag !== 114) { - break; - } - - message.customCode = CustomCode.decode(reader, reader.uint32()); - continue; - } - case 15: { - if (tag !== 122) { - break; - } - - message.branch = BranchAction.decode(reader, reader.uint32()); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): TaskAction { - return { - taskType: isSet(object.taskType) ? taskTypeFromJSON(object.taskType) : 0, - id: isSet(object.id) ? globalThis.String(object.id) : "", - name: isSet(object.name) ? globalThis.String(object.name) : "", - next: globalThis.Array.isArray(object?.next) ? object.next.map((e: any) => globalThis.String(e)) : [], - ethTransfer: isSet(object.ethTransfer) ? ETHTransfer.fromJSON(object.ethTransfer) : undefined, - contractExecution: isSet(object.contractExecution) - ? ContractExecution.fromJSON(object.contractExecution) - : undefined, - graphqlDataQuery: isSet(object.graphqlDataQuery) ? GraphQLDataQuery.fromJSON(object.graphqlDataQuery) : undefined, - httpDataQuery: isSet(object.httpDataQuery) ? HTTPAPICall.fromJSON(object.httpDataQuery) : undefined, - customCode: isSet(object.customCode) ? CustomCode.fromJSON(object.customCode) : undefined, - branch: isSet(object.branch) ? BranchAction.fromJSON(object.branch) : undefined, - }; - }, - - toJSON(message: TaskAction): unknown { - const obj: any = {}; - if (message.taskType !== 0) { - obj.taskType = taskTypeToJSON(message.taskType); - } - if (message.id !== "") { - obj.id = message.id; - } - if (message.name !== "") { - obj.name = message.name; - } - if (message.next?.length) { - obj.next = message.next; - } - if (message.ethTransfer !== undefined) { - obj.ethTransfer = ETHTransfer.toJSON(message.ethTransfer); - } - if (message.contractExecution !== undefined) { - obj.contractExecution = ContractExecution.toJSON(message.contractExecution); - } - if (message.graphqlDataQuery !== undefined) { - obj.graphqlDataQuery = GraphQLDataQuery.toJSON(message.graphqlDataQuery); - } - if (message.httpDataQuery !== undefined) { - obj.httpDataQuery = HTTPAPICall.toJSON(message.httpDataQuery); - } - if (message.customCode !== undefined) { - obj.customCode = CustomCode.toJSON(message.customCode); - } - if (message.branch !== undefined) { - obj.branch = BranchAction.toJSON(message.branch); - } - return obj; - }, - - create, I>>(base?: I): TaskAction { - return TaskAction.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): TaskAction { - const message = createBaseTaskAction(); - message.taskType = object.taskType ?? 0; - message.id = object.id ?? ""; - message.name = object.name ?? ""; - message.next = object.next?.map((e) => e) || []; - message.ethTransfer = (object.ethTransfer !== undefined && object.ethTransfer !== null) - ? ETHTransfer.fromPartial(object.ethTransfer) - : undefined; - message.contractExecution = (object.contractExecution !== undefined && object.contractExecution !== null) - ? ContractExecution.fromPartial(object.contractExecution) - : undefined; - message.graphqlDataQuery = (object.graphqlDataQuery !== undefined && object.graphqlDataQuery !== null) - ? GraphQLDataQuery.fromPartial(object.graphqlDataQuery) - : undefined; - message.httpDataQuery = (object.httpDataQuery !== undefined && object.httpDataQuery !== null) - ? HTTPAPICall.fromPartial(object.httpDataQuery) - : undefined; - message.customCode = (object.customCode !== undefined && object.customCode !== null) - ? CustomCode.fromPartial(object.customCode) - : undefined; - message.branch = (object.branch !== undefined && object.branch !== null) - ? BranchAction.fromPartial(object.branch) - : undefined; - return message; - }, -}; - -function createBaseExecution(): Execution { - return { epoch: 0, userOpHash: "", error: "" }; -} - -export const Execution: MessageFns = { - encode(message: Execution, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.epoch !== 0) { - writer.uint32(8).int64(message.epoch); - } - if (message.userOpHash !== "") { - writer.uint32(18).string(message.userOpHash); - } - if (message.error !== "") { - writer.uint32(26).string(message.error); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): Execution { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseExecution(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 8) { - break; - } - - message.epoch = longToNumber(reader.int64()); - continue; - } - case 2: { - if (tag !== 18) { - break; - } - - message.userOpHash = reader.string(); - continue; - } - case 3: { - if (tag !== 26) { - break; - } - - message.error = reader.string(); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): Execution { - return { - epoch: isSet(object.epoch) ? globalThis.Number(object.epoch) : 0, - userOpHash: isSet(object.userOpHash) ? globalThis.String(object.userOpHash) : "", - error: isSet(object.error) ? globalThis.String(object.error) : "", - }; - }, - - toJSON(message: Execution): unknown { - const obj: any = {}; - if (message.epoch !== 0) { - obj.epoch = Math.round(message.epoch); - } - if (message.userOpHash !== "") { - obj.userOpHash = message.userOpHash; - } - if (message.error !== "") { - obj.error = message.error; - } - return obj; - }, - - create, I>>(base?: I): Execution { - return Execution.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): Execution { - const message = createBaseExecution(); - message.epoch = object.epoch ?? 0; - message.userOpHash = object.userOpHash ?? ""; - message.error = object.error ?? ""; - return message; - }, -}; - -function createBaseTask(): Task { - return { - id: undefined, - owner: "", - smartAccountAddress: "", - trigger: undefined, - nodes: [], - startAt: 0, - expiredAt: 0, - memo: "", - completedAt: 0, - status: 0, - repeatable: false, - executions: [], - }; -} - -export const Task: MessageFns = { - encode(message: Task, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.id !== undefined) { - UUID.encode(message.id, writer.uint32(10).fork()).join(); - } - if (message.owner !== "") { - writer.uint32(18).string(message.owner); - } - if (message.smartAccountAddress !== "") { - writer.uint32(26).string(message.smartAccountAddress); - } - if (message.trigger !== undefined) { - TaskTrigger.encode(message.trigger, writer.uint32(34).fork()).join(); - } - for (const v of message.nodes) { - TaskAction.encode(v!, writer.uint32(42).fork()).join(); - } - if (message.startAt !== 0) { - writer.uint32(48).int64(message.startAt); - } - if (message.expiredAt !== 0) { - writer.uint32(56).int64(message.expiredAt); - } - if (message.memo !== "") { - writer.uint32(66).string(message.memo); - } - if (message.completedAt !== 0) { - writer.uint32(72).int64(message.completedAt); - } - if (message.status !== 0) { - writer.uint32(80).int32(message.status); - } - if (message.repeatable !== false) { - writer.uint32(88).bool(message.repeatable); - } - for (const v of message.executions) { - Execution.encode(v!, writer.uint32(98).fork()).join(); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): Task { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseTask(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break; - } - - message.id = UUID.decode(reader, reader.uint32()); - continue; - } - case 2: { - if (tag !== 18) { - break; - } - - message.owner = reader.string(); - continue; - } - case 3: { - if (tag !== 26) { - break; - } - - message.smartAccountAddress = reader.string(); - continue; - } - case 4: { - if (tag !== 34) { - break; - } - - message.trigger = TaskTrigger.decode(reader, reader.uint32()); - continue; - } - case 5: { - if (tag !== 42) { - break; - } - - message.nodes.push(TaskAction.decode(reader, reader.uint32())); - continue; - } - case 6: { - if (tag !== 48) { - break; - } - - message.startAt = longToNumber(reader.int64()); - continue; - } - case 7: { - if (tag !== 56) { - break; - } - - message.expiredAt = longToNumber(reader.int64()); - continue; - } - case 8: { - if (tag !== 66) { - break; - } - - message.memo = reader.string(); - continue; - } - case 9: { - if (tag !== 72) { - break; - } - - message.completedAt = longToNumber(reader.int64()); - continue; - } - case 10: { - if (tag !== 80) { - break; - } - - message.status = reader.int32() as any; - continue; - } - case 11: { - if (tag !== 88) { - break; - } - - message.repeatable = reader.bool(); - continue; - } - case 12: { - if (tag !== 98) { - break; - } - - message.executions.push(Execution.decode(reader, reader.uint32())); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): Task { - return { - id: isSet(object.id) ? UUID.fromJSON(object.id) : undefined, - owner: isSet(object.owner) ? globalThis.String(object.owner) : "", - smartAccountAddress: isSet(object.smartAccountAddress) ? globalThis.String(object.smartAccountAddress) : "", - trigger: isSet(object.trigger) ? TaskTrigger.fromJSON(object.trigger) : undefined, - nodes: globalThis.Array.isArray(object?.nodes) ? object.nodes.map((e: any) => TaskAction.fromJSON(e)) : [], - startAt: isSet(object.startAt) ? globalThis.Number(object.startAt) : 0, - expiredAt: isSet(object.expiredAt) ? globalThis.Number(object.expiredAt) : 0, - memo: isSet(object.memo) ? globalThis.String(object.memo) : "", - completedAt: isSet(object.completedAt) ? globalThis.Number(object.completedAt) : 0, - status: isSet(object.status) ? taskStatusFromJSON(object.status) : 0, - repeatable: isSet(object.repeatable) ? globalThis.Boolean(object.repeatable) : false, - executions: globalThis.Array.isArray(object?.executions) - ? object.executions.map((e: any) => Execution.fromJSON(e)) - : [], - }; - }, - - toJSON(message: Task): unknown { - const obj: any = {}; - if (message.id !== undefined) { - obj.id = UUID.toJSON(message.id); - } - if (message.owner !== "") { - obj.owner = message.owner; - } - if (message.smartAccountAddress !== "") { - obj.smartAccountAddress = message.smartAccountAddress; - } - if (message.trigger !== undefined) { - obj.trigger = TaskTrigger.toJSON(message.trigger); - } - if (message.nodes?.length) { - obj.nodes = message.nodes.map((e) => TaskAction.toJSON(e)); - } - if (message.startAt !== 0) { - obj.startAt = Math.round(message.startAt); - } - if (message.expiredAt !== 0) { - obj.expiredAt = Math.round(message.expiredAt); - } - if (message.memo !== "") { - obj.memo = message.memo; - } - if (message.completedAt !== 0) { - obj.completedAt = Math.round(message.completedAt); - } - if (message.status !== 0) { - obj.status = taskStatusToJSON(message.status); - } - if (message.repeatable !== false) { - obj.repeatable = message.repeatable; - } - if (message.executions?.length) { - obj.executions = message.executions.map((e) => Execution.toJSON(e)); - } - return obj; - }, - - create, I>>(base?: I): Task { - return Task.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): Task { - const message = createBaseTask(); - message.id = (object.id !== undefined && object.id !== null) ? UUID.fromPartial(object.id) : undefined; - message.owner = object.owner ?? ""; - message.smartAccountAddress = object.smartAccountAddress ?? ""; - message.trigger = (object.trigger !== undefined && object.trigger !== null) - ? TaskTrigger.fromPartial(object.trigger) - : undefined; - message.nodes = object.nodes?.map((e) => TaskAction.fromPartial(e)) || []; - message.startAt = object.startAt ?? 0; - message.expiredAt = object.expiredAt ?? 0; - message.memo = object.memo ?? ""; - message.completedAt = object.completedAt ?? 0; - message.status = object.status ?? 0; - message.repeatable = object.repeatable ?? false; - message.executions = object.executions?.map((e) => Execution.fromPartial(e)) || []; - return message; - }, -}; - -function createBaseCreateTaskReq(): CreateTaskReq { - return { trigger: undefined, actions: [], startAt: 0, expiredAt: 0, memo: "", repeatable: false }; -} - -export const CreateTaskReq: MessageFns = { - encode(message: CreateTaskReq, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.trigger !== undefined) { - TaskTrigger.encode(message.trigger, writer.uint32(10).fork()).join(); - } - for (const v of message.actions) { - TaskAction.encode(v!, writer.uint32(18).fork()).join(); - } - if (message.startAt !== 0) { - writer.uint32(24).int64(message.startAt); - } - if (message.expiredAt !== 0) { - writer.uint32(32).int64(message.expiredAt); - } - if (message.memo !== "") { - writer.uint32(42).string(message.memo); - } - if (message.repeatable !== false) { - writer.uint32(48).bool(message.repeatable); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): CreateTaskReq { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCreateTaskReq(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break; - } - - message.trigger = TaskTrigger.decode(reader, reader.uint32()); - continue; - } - case 2: { - if (tag !== 18) { - break; - } - - message.actions.push(TaskAction.decode(reader, reader.uint32())); - continue; - } - case 3: { - if (tag !== 24) { - break; - } - - message.startAt = longToNumber(reader.int64()); - continue; - } - case 4: { - if (tag !== 32) { - break; - } - - message.expiredAt = longToNumber(reader.int64()); - continue; - } - case 5: { - if (tag !== 42) { - break; - } - - message.memo = reader.string(); - continue; - } - case 6: { - if (tag !== 48) { - break; - } - - message.repeatable = reader.bool(); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): CreateTaskReq { - return { - trigger: isSet(object.trigger) ? TaskTrigger.fromJSON(object.trigger) : undefined, - actions: globalThis.Array.isArray(object?.actions) ? object.actions.map((e: any) => TaskAction.fromJSON(e)) : [], - startAt: isSet(object.startAt) ? globalThis.Number(object.startAt) : 0, - expiredAt: isSet(object.expiredAt) ? globalThis.Number(object.expiredAt) : 0, - memo: isSet(object.memo) ? globalThis.String(object.memo) : "", - repeatable: isSet(object.repeatable) ? globalThis.Boolean(object.repeatable) : false, - }; - }, - - toJSON(message: CreateTaskReq): unknown { - const obj: any = {}; - if (message.trigger !== undefined) { - obj.trigger = TaskTrigger.toJSON(message.trigger); - } - if (message.actions?.length) { - obj.actions = message.actions.map((e) => TaskAction.toJSON(e)); - } - if (message.startAt !== 0) { - obj.startAt = Math.round(message.startAt); - } - if (message.expiredAt !== 0) { - obj.expiredAt = Math.round(message.expiredAt); - } - if (message.memo !== "") { - obj.memo = message.memo; - } - if (message.repeatable !== false) { - obj.repeatable = message.repeatable; - } - return obj; - }, - - create, I>>(base?: I): CreateTaskReq { - return CreateTaskReq.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): CreateTaskReq { - const message = createBaseCreateTaskReq(); - message.trigger = (object.trigger !== undefined && object.trigger !== null) - ? TaskTrigger.fromPartial(object.trigger) - : undefined; - message.actions = object.actions?.map((e) => TaskAction.fromPartial(e)) || []; - message.startAt = object.startAt ?? 0; - message.expiredAt = object.expiredAt ?? 0; - message.memo = object.memo ?? ""; - message.repeatable = object.repeatable ?? false; - return message; - }, -}; - -function createBaseCreateTaskResp(): CreateTaskResp { - return { id: "" }; -} - -export const CreateTaskResp: MessageFns = { - encode(message: CreateTaskResp, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.id !== "") { - writer.uint32(10).string(message.id); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): CreateTaskResp { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseCreateTaskResp(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break; - } - - message.id = reader.string(); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): CreateTaskResp { - return { id: isSet(object.id) ? globalThis.String(object.id) : "" }; - }, - - toJSON(message: CreateTaskResp): unknown { - const obj: any = {}; - if (message.id !== "") { - obj.id = message.id; - } - return obj; - }, - - create, I>>(base?: I): CreateTaskResp { - return CreateTaskResp.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): CreateTaskResp { - const message = createBaseCreateTaskResp(); - message.id = object.id ?? ""; - return message; - }, -}; - -function createBaseNonceRequest(): NonceRequest { - return { owner: "" }; -} - -export const NonceRequest: MessageFns = { - encode(message: NonceRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.owner !== "") { - writer.uint32(10).string(message.owner); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): NonceRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseNonceRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break; - } - - message.owner = reader.string(); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): NonceRequest { - return { owner: isSet(object.owner) ? globalThis.String(object.owner) : "" }; - }, - - toJSON(message: NonceRequest): unknown { - const obj: any = {}; - if (message.owner !== "") { - obj.owner = message.owner; - } - return obj; - }, - - create, I>>(base?: I): NonceRequest { - return NonceRequest.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): NonceRequest { - const message = createBaseNonceRequest(); - message.owner = object.owner ?? ""; - return message; - }, -}; - -function createBaseNonceResp(): NonceResp { - return { nonce: "" }; -} - -export const NonceResp: MessageFns = { - encode(message: NonceResp, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.nonce !== "") { - writer.uint32(10).string(message.nonce); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): NonceResp { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseNonceResp(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break; - } - - message.nonce = reader.string(); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): NonceResp { - return { nonce: isSet(object.nonce) ? globalThis.String(object.nonce) : "" }; - }, - - toJSON(message: NonceResp): unknown { - const obj: any = {}; - if (message.nonce !== "") { - obj.nonce = message.nonce; - } - return obj; - }, - - create, I>>(base?: I): NonceResp { - return NonceResp.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): NonceResp { - const message = createBaseNonceResp(); - message.nonce = object.nonce ?? ""; - return message; - }, -}; - -function createBaseAddressRequest(): AddressRequest { - return { owner: "" }; -} - -export const AddressRequest: MessageFns = { - encode(message: AddressRequest, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.owner !== "") { - writer.uint32(10).string(message.owner); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): AddressRequest { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAddressRequest(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break; - } - - message.owner = reader.string(); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): AddressRequest { - return { owner: isSet(object.owner) ? globalThis.String(object.owner) : "" }; - }, - - toJSON(message: AddressRequest): unknown { - const obj: any = {}; - if (message.owner !== "") { - obj.owner = message.owner; - } - return obj; - }, - - create, I>>(base?: I): AddressRequest { - return AddressRequest.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): AddressRequest { - const message = createBaseAddressRequest(); - message.owner = object.owner ?? ""; - return message; - }, -}; - -function createBaseAddressResp(): AddressResp { - return { smartAccountAddress: "", nonce: "" }; -} - -export const AddressResp: MessageFns = { - encode(message: AddressResp, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.smartAccountAddress !== "") { - writer.uint32(10).string(message.smartAccountAddress); - } - if (message.nonce !== "") { - writer.uint32(18).string(message.nonce); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): AddressResp { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseAddressResp(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break; - } - - message.smartAccountAddress = reader.string(); - continue; - } - case 2: { - if (tag !== 18) { - break; - } - - message.nonce = reader.string(); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): AddressResp { - return { - smartAccountAddress: isSet(object.smartAccountAddress) ? globalThis.String(object.smartAccountAddress) : "", - nonce: isSet(object.nonce) ? globalThis.String(object.nonce) : "", - }; - }, - - toJSON(message: AddressResp): unknown { - const obj: any = {}; - if (message.smartAccountAddress !== "") { - obj.smartAccountAddress = message.smartAccountAddress; - } - if (message.nonce !== "") { - obj.nonce = message.nonce; - } - return obj; - }, - - create, I>>(base?: I): AddressResp { - return AddressResp.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): AddressResp { - const message = createBaseAddressResp(); - message.smartAccountAddress = object.smartAccountAddress ?? ""; - message.nonce = object.nonce ?? ""; - return message; - }, -}; - -function createBaseListTasksReq(): ListTasksReq { - return {}; -} - -export const ListTasksReq: MessageFns = { - encode(_: ListTasksReq, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): ListTasksReq { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseListTasksReq(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(_: any): ListTasksReq { - return {}; - }, - - toJSON(_: ListTasksReq): unknown { - const obj: any = {}; - return obj; - }, - - create, I>>(base?: I): ListTasksReq { - return ListTasksReq.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(_: I): ListTasksReq { - const message = createBaseListTasksReq(); - return message; - }, -}; - -function createBaseListTasksResp(): ListTasksResp { - return { tasks: [] }; -} - -export const ListTasksResp: MessageFns = { - encode(message: ListTasksResp, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - for (const v of message.tasks) { - ListTasksResp_TaskItemResp.encode(v!, writer.uint32(10).fork()).join(); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): ListTasksResp { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseListTasksResp(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break; - } - - message.tasks.push(ListTasksResp_TaskItemResp.decode(reader, reader.uint32())); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): ListTasksResp { - return { - tasks: globalThis.Array.isArray(object?.tasks) - ? object.tasks.map((e: any) => ListTasksResp_TaskItemResp.fromJSON(e)) - : [], - }; - }, - - toJSON(message: ListTasksResp): unknown { - const obj: any = {}; - if (message.tasks?.length) { - obj.tasks = message.tasks.map((e) => ListTasksResp_TaskItemResp.toJSON(e)); - } - return obj; - }, - - create, I>>(base?: I): ListTasksResp { - return ListTasksResp.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): ListTasksResp { - const message = createBaseListTasksResp(); - message.tasks = object.tasks?.map((e) => ListTasksResp_TaskItemResp.fromPartial(e)) || []; - return message; - }, -}; - -function createBaseListTasksResp_TaskItemResp(): ListTasksResp_TaskItemResp { - return { id: "", status: 0 }; -} - -export const ListTasksResp_TaskItemResp: MessageFns = { - encode(message: ListTasksResp_TaskItemResp, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.id !== "") { - writer.uint32(10).string(message.id); - } - if (message.status !== 0) { - writer.uint32(16).int32(message.status); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): ListTasksResp_TaskItemResp { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseListTasksResp_TaskItemResp(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break; - } - - message.id = reader.string(); - continue; - } - case 2: { - if (tag !== 16) { - break; - } - - message.status = reader.int32() as any; - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): ListTasksResp_TaskItemResp { - return { - id: isSet(object.id) ? globalThis.String(object.id) : "", - status: isSet(object.status) ? taskStatusFromJSON(object.status) : 0, - }; - }, - - toJSON(message: ListTasksResp_TaskItemResp): unknown { - const obj: any = {}; - if (message.id !== "") { - obj.id = message.id; - } - if (message.status !== 0) { - obj.status = taskStatusToJSON(message.status); - } - return obj; - }, - - create, I>>(base?: I): ListTasksResp_TaskItemResp { - return ListTasksResp_TaskItemResp.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): ListTasksResp_TaskItemResp { - const message = createBaseListTasksResp_TaskItemResp(); - message.id = object.id ?? ""; - message.status = object.status ?? 0; - return message; - }, -}; - -function createBaseGetKeyReq(): GetKeyReq { - return { owner: "", expiredAt: 0, signature: "" }; -} - -export const GetKeyReq: MessageFns = { - encode(message: GetKeyReq, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.owner !== "") { - writer.uint32(10).string(message.owner); - } - if (message.expiredAt !== 0) { - writer.uint32(16).int64(message.expiredAt); - } - if (message.signature !== "") { - writer.uint32(26).string(message.signature); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): GetKeyReq { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseGetKeyReq(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break; - } - - message.owner = reader.string(); - continue; - } - case 2: { - if (tag !== 16) { - break; - } - - message.expiredAt = longToNumber(reader.int64()); - continue; - } - case 3: { - if (tag !== 26) { - break; - } - - message.signature = reader.string(); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): GetKeyReq { - return { - owner: isSet(object.owner) ? globalThis.String(object.owner) : "", - expiredAt: isSet(object.expiredAt) ? globalThis.Number(object.expiredAt) : 0, - signature: isSet(object.signature) ? globalThis.String(object.signature) : "", - }; - }, - - toJSON(message: GetKeyReq): unknown { - const obj: any = {}; - if (message.owner !== "") { - obj.owner = message.owner; - } - if (message.expiredAt !== 0) { - obj.expiredAt = Math.round(message.expiredAt); - } - if (message.signature !== "") { - obj.signature = message.signature; - } - return obj; - }, - - create, I>>(base?: I): GetKeyReq { - return GetKeyReq.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): GetKeyReq { - const message = createBaseGetKeyReq(); - message.owner = object.owner ?? ""; - message.expiredAt = object.expiredAt ?? 0; - message.signature = object.signature ?? ""; - return message; - }, -}; - -function createBaseKeyResp(): KeyResp { - return { key: "" }; -} - -export const KeyResp: MessageFns = { - encode(message: KeyResp, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.key !== "") { - writer.uint32(10).string(message.key); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): KeyResp { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseKeyResp(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break; - } - - message.key = reader.string(); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): KeyResp { - return { key: isSet(object.key) ? globalThis.String(object.key) : "" }; - }, - - toJSON(message: KeyResp): unknown { - const obj: any = {}; - if (message.key !== "") { - obj.key = message.key; - } - return obj; - }, - - create, I>>(base?: I): KeyResp { - return KeyResp.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): KeyResp { - const message = createBaseKeyResp(); - message.key = object.key ?? ""; - return message; - }, -}; - -function createBaseUpdateChecksReq(): UpdateChecksReq { - return { address: "", signature: "", id: [] }; -} - -export const UpdateChecksReq: MessageFns = { - encode(message: UpdateChecksReq, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.address !== "") { - writer.uint32(10).string(message.address); - } - if (message.signature !== "") { - writer.uint32(18).string(message.signature); - } - for (const v of message.id) { - writer.uint32(26).string(v!); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): UpdateChecksReq { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUpdateChecksReq(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break; - } - - message.address = reader.string(); - continue; - } - case 2: { - if (tag !== 18) { - break; - } - - message.signature = reader.string(); - continue; - } - case 3: { - if (tag !== 26) { - break; - } - - message.id.push(reader.string()); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): UpdateChecksReq { - return { - address: isSet(object.address) ? globalThis.String(object.address) : "", - signature: isSet(object.signature) ? globalThis.String(object.signature) : "", - id: globalThis.Array.isArray(object?.id) ? object.id.map((e: any) => globalThis.String(e)) : [], - }; - }, - - toJSON(message: UpdateChecksReq): unknown { - const obj: any = {}; - if (message.address !== "") { - obj.address = message.address; - } - if (message.signature !== "") { - obj.signature = message.signature; - } - if (message.id?.length) { - obj.id = message.id; - } - return obj; - }, - - create, I>>(base?: I): UpdateChecksReq { - return UpdateChecksReq.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): UpdateChecksReq { - const message = createBaseUpdateChecksReq(); - message.address = object.address ?? ""; - message.signature = object.signature ?? ""; - message.id = object.id?.map((e) => e) || []; - return message; - }, -}; - -function createBaseUpdateChecksResp(): UpdateChecksResp { - return { updatedAt: undefined }; -} - -export const UpdateChecksResp: MessageFns = { - encode(message: UpdateChecksResp, writer: BinaryWriter = new BinaryWriter()): BinaryWriter { - if (message.updatedAt !== undefined) { - Timestamp.encode(toTimestamp(message.updatedAt), writer.uint32(10).fork()).join(); - } - return writer; - }, - - decode(input: BinaryReader | Uint8Array, length?: number): UpdateChecksResp { - const reader = input instanceof BinaryReader ? input : new BinaryReader(input); - let end = length === undefined ? reader.len : reader.pos + length; - const message = createBaseUpdateChecksResp(); - while (reader.pos < end) { - const tag = reader.uint32(); - switch (tag >>> 3) { - case 1: { - if (tag !== 10) { - break; - } - - message.updatedAt = fromTimestamp(Timestamp.decode(reader, reader.uint32())); - continue; - } - } - if ((tag & 7) === 4 || tag === 0) { - break; - } - reader.skip(tag & 7); - } - return message; - }, - - fromJSON(object: any): UpdateChecksResp { - return { updatedAt: isSet(object.updatedAt) ? fromJsonTimestamp(object.updatedAt) : undefined }; - }, - - toJSON(message: UpdateChecksResp): unknown { - const obj: any = {}; - if (message.updatedAt !== undefined) { - obj.updatedAt = message.updatedAt.toISOString(); - } - return obj; - }, - - create, I>>(base?: I): UpdateChecksResp { - return UpdateChecksResp.fromPartial(base ?? ({} as any)); - }, - fromPartial, I>>(object: I): UpdateChecksResp { - const message = createBaseUpdateChecksResp(); - message.updatedAt = object.updatedAt ?? undefined; - return message; - }, -}; - -export interface Aggregator { - /** Auth */ - GetKey(request: GetKeyReq): Promise; - /** Smart Acccount */ - GetNonce(request: NonceRequest): Promise; - GetSmartAccountAddress(request: AddressRequest): Promise; - /** Task Management */ - CreateTask(request: CreateTaskReq): Promise; - ListTasks(request: ListTasksReq): Promise; - GetTask(request: UUID): Promise; - CancelTask(request: UUID): Promise; - DeleteTask(request: UUID): Promise; - /** Operator endpoint */ - Ping(request: Checkin): Promise; - SyncTasks(request: SyncTasksReq): Observable; - UpdateChecks(request: UpdateChecksReq): Promise; -} - -export const AggregatorServiceName = "aggregator.Aggregator"; -export class AggregatorClientImpl implements Aggregator { - private readonly rpc: Rpc; - private readonly service: string; - constructor(rpc: Rpc, opts?: { service?: string }) { - this.service = opts?.service || AggregatorServiceName; - this.rpc = rpc; - this.GetKey = this.GetKey.bind(this); - this.GetNonce = this.GetNonce.bind(this); - this.GetSmartAccountAddress = this.GetSmartAccountAddress.bind(this); - this.CreateTask = this.CreateTask.bind(this); - this.ListTasks = this.ListTasks.bind(this); - this.GetTask = this.GetTask.bind(this); - this.CancelTask = this.CancelTask.bind(this); - this.DeleteTask = this.DeleteTask.bind(this); - this.Ping = this.Ping.bind(this); - this.SyncTasks = this.SyncTasks.bind(this); - this.UpdateChecks = this.UpdateChecks.bind(this); - } - GetKey(request: GetKeyReq): Promise { - const data = GetKeyReq.encode(request).finish(); - const promise = this.rpc.request(this.service, "GetKey", data); - return promise.then((data) => KeyResp.decode(new BinaryReader(data))); - } - - GetNonce(request: NonceRequest): Promise { - const data = NonceRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, "GetNonce", data); - return promise.then((data) => NonceResp.decode(new BinaryReader(data))); - } - - GetSmartAccountAddress(request: AddressRequest): Promise { - const data = AddressRequest.encode(request).finish(); - const promise = this.rpc.request(this.service, "GetSmartAccountAddress", data); - return promise.then((data) => AddressResp.decode(new BinaryReader(data))); - } - - CreateTask(request: CreateTaskReq): Promise { - const data = CreateTaskReq.encode(request).finish(); - const promise = this.rpc.request(this.service, "CreateTask", data); - return promise.then((data) => CreateTaskResp.decode(new BinaryReader(data))); - } - - ListTasks(request: ListTasksReq): Promise { - const data = ListTasksReq.encode(request).finish(); - const promise = this.rpc.request(this.service, "ListTasks", data); - return promise.then((data) => ListTasksResp.decode(new BinaryReader(data))); - } - - GetTask(request: UUID): Promise { - const data = UUID.encode(request).finish(); - const promise = this.rpc.request(this.service, "GetTask", data); - return promise.then((data) => Task.decode(new BinaryReader(data))); - } - - CancelTask(request: UUID): Promise { - const data = UUID.encode(request).finish(); - const promise = this.rpc.request(this.service, "CancelTask", data); - return promise.then((data) => BoolValue.decode(new BinaryReader(data))); - } - - DeleteTask(request: UUID): Promise { - const data = UUID.encode(request).finish(); - const promise = this.rpc.request(this.service, "DeleteTask", data); - return promise.then((data) => BoolValue.decode(new BinaryReader(data))); - } - - Ping(request: Checkin): Promise { - const data = Checkin.encode(request).finish(); - const promise = this.rpc.request(this.service, "Ping", data); - return promise.then((data) => CheckinResp.decode(new BinaryReader(data))); - } - - SyncTasks(request: SyncTasksReq): Observable { - const data = SyncTasksReq.encode(request).finish(); - const result = this.rpc.serverStreamingRequest(this.service, "SyncTasks", data); - return result.pipe(map((data) => SyncTasksResp.decode(new BinaryReader(data)))); - } - - UpdateChecks(request: UpdateChecksReq): Promise { - const data = UpdateChecksReq.encode(request).finish(); - const promise = this.rpc.request(this.service, "UpdateChecks", data); - return promise.then((data) => UpdateChecksResp.decode(new BinaryReader(data))); - } -} - -export interface Rpc { - request(service: string, method: string, data: Uint8Array): Promise; - clientStreamingRequest(service: string, method: string, data: Observable): Promise; - serverStreamingRequest(service: string, method: string, data: Uint8Array): Observable; - bidirectionalStreamingRequest(service: string, method: string, data: Observable): Observable; -} - -type Builtin = Date | Function | Uint8Array | string | number | boolean | undefined; - -export type DeepPartial = T extends Builtin ? T - : T extends globalThis.Array ? globalThis.Array> - : T extends ReadonlyArray ? ReadonlyArray> - : T extends {} ? { [K in keyof T]?: DeepPartial } - : Partial; - -type KeysOfUnion = T extends T ? keyof T : never; -export type Exact = P extends Builtin ? P - : P & { [K in keyof P]: Exact } & { [K in Exclude>]: never }; - -function toTimestamp(date: Date): Timestamp { - const seconds = Math.trunc(date.getTime() / 1_000); - const nanos = (date.getTime() % 1_000) * 1_000_000; - return { seconds, nanos }; -} - -function fromTimestamp(t: Timestamp): Date { - let millis = (t.seconds || 0) * 1_000; - millis += (t.nanos || 0) / 1_000_000; - return new globalThis.Date(millis); -} - -function fromJsonTimestamp(o: any): Date { - if (o instanceof globalThis.Date) { - return o; - } else if (typeof o === "string") { - return new globalThis.Date(o); - } else { - return fromTimestamp(Timestamp.fromJSON(o)); - } -} - -function longToNumber(int64: { toString(): string }): number { - const num = globalThis.Number(int64.toString()); - if (num > globalThis.Number.MAX_SAFE_INTEGER) { - throw new globalThis.Error("Value is larger than Number.MAX_SAFE_INTEGER"); - } - if (num < globalThis.Number.MIN_SAFE_INTEGER) { - throw new globalThis.Error("Value is smaller than Number.MIN_SAFE_INTEGER"); - } - return num; -} - -function isObject(value: any): boolean { - return typeof value === "object" && value !== null; -} - -function isSet(value: any): boolean { - return value !== null && value !== undefined; -} - -export interface MessageFns { - encode(message: T, writer?: BinaryWriter): BinaryWriter; - decode(input: BinaryReader | Uint8Array, length?: number): T; - fromJSON(object: any): T; - toJSON(message: T): unknown; - create, I>>(base?: I): T; - fromPartial, I>>(object: I): T; -} diff --git a/grpc_codegen/avs_grpc_pb.d.ts b/grpc_codegen/avs_grpc_pb.d.ts index f4a9c9c..5e1ecdf 100644 --- a/grpc_codegen/avs_grpc_pb.d.ts +++ b/grpc_codegen/avs_grpc_pb.d.ts @@ -9,657 +9,220 @@ import * as avs_pb from "./avs_pb"; import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; import * as google_protobuf_wrappers_pb from "google-protobuf/google/protobuf/wrappers_pb"; -interface IAggregatorService - extends grpc.ServiceDefinition { - getKey: IAggregatorService_IGetKey; - getNonce: IAggregatorService_IGetNonce; - getSmartAccountAddress: IAggregatorService_IGetSmartAccountAddress; - createTask: IAggregatorService_ICreateTask; - listTasks: IAggregatorService_IListTasks; - getTask: IAggregatorService_IGetTask; - cancelTask: IAggregatorService_ICancelTask; - deleteTask: IAggregatorService_IDeleteTask; - ping: IAggregatorService_IPing; - syncTasks: IAggregatorService_ISyncTasks; - updateChecks: IAggregatorService_IUpdateChecks; +interface IAggregatorService extends grpc.ServiceDefinition { + getKey: IAggregatorService_IGetKey; + getNonce: IAggregatorService_IGetNonce; + createWallet: IAggregatorService_ICreateWallet; + listWallets: IAggregatorService_IListWallets; + createTask: IAggregatorService_ICreateTask; + listTasks: IAggregatorService_IListTasks; + getTask: IAggregatorService_IGetTask; + cancelTask: IAggregatorService_ICancelTask; + deleteTask: IAggregatorService_IDeleteTask; + ping: IAggregatorService_IPing; + syncTasks: IAggregatorService_ISyncTasks; + updateChecks: IAggregatorService_IUpdateChecks; } -interface IAggregatorService_IGetKey - extends grpc.MethodDefinition { - path: "/aggregator.Aggregator/GetKey"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; +interface IAggregatorService_IGetKey extends grpc.MethodDefinition { + path: "/aggregator.Aggregator/GetKey"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; } -interface IAggregatorService_IGetNonce - extends grpc.MethodDefinition { - path: "/aggregator.Aggregator/GetNonce"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; +interface IAggregatorService_IGetNonce extends grpc.MethodDefinition { + path: "/aggregator.Aggregator/GetNonce"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; } -interface IAggregatorService_IGetSmartAccountAddress - extends grpc.MethodDefinition { - path: "/aggregator.Aggregator/GetSmartAccountAddress"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; +interface IAggregatorService_ICreateWallet extends grpc.MethodDefinition { + path: "/aggregator.Aggregator/CreateWallet"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; } -interface IAggregatorService_ICreateTask - extends grpc.MethodDefinition { - path: "/aggregator.Aggregator/CreateTask"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; +interface IAggregatorService_IListWallets extends grpc.MethodDefinition { + path: "/aggregator.Aggregator/ListWallets"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; } -interface IAggregatorService_IListTasks - extends grpc.MethodDefinition { - path: "/aggregator.Aggregator/ListTasks"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; +interface IAggregatorService_ICreateTask extends grpc.MethodDefinition { + path: "/aggregator.Aggregator/CreateTask"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; } -interface IAggregatorService_IGetTask - extends grpc.MethodDefinition { - path: "/aggregator.Aggregator/GetTask"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; +interface IAggregatorService_IListTasks extends grpc.MethodDefinition { + path: "/aggregator.Aggregator/ListTasks"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; } -interface IAggregatorService_ICancelTask - extends grpc.MethodDefinition< - avs_pb.UUID, - google_protobuf_wrappers_pb.BoolValue - > { - path: "/aggregator.Aggregator/CancelTask"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; +interface IAggregatorService_IGetTask extends grpc.MethodDefinition { + path: "/aggregator.Aggregator/GetTask"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; } -interface IAggregatorService_IDeleteTask - extends grpc.MethodDefinition< - avs_pb.UUID, - google_protobuf_wrappers_pb.BoolValue - > { - path: "/aggregator.Aggregator/DeleteTask"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; +interface IAggregatorService_ICancelTask extends grpc.MethodDefinition { + path: "/aggregator.Aggregator/CancelTask"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; } -interface IAggregatorService_IPing - extends grpc.MethodDefinition { - path: "/aggregator.Aggregator/Ping"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; +interface IAggregatorService_IDeleteTask extends grpc.MethodDefinition { + path: "/aggregator.Aggregator/DeleteTask"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; } -interface IAggregatorService_ISyncTasks - extends grpc.MethodDefinition { - path: "/aggregator.Aggregator/SyncTasks"; - requestStream: false; - responseStream: true; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; +interface IAggregatorService_IPing extends grpc.MethodDefinition { + path: "/aggregator.Aggregator/Ping"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; } -interface IAggregatorService_IUpdateChecks - extends grpc.MethodDefinition< - avs_pb.UpdateChecksReq, - avs_pb.UpdateChecksResp - > { - path: "/aggregator.Aggregator/UpdateChecks"; - requestStream: false; - responseStream: false; - requestSerialize: grpc.serialize; - requestDeserialize: grpc.deserialize; - responseSerialize: grpc.serialize; - responseDeserialize: grpc.deserialize; +interface IAggregatorService_ISyncTasks extends grpc.MethodDefinition { + path: "/aggregator.Aggregator/SyncTasks"; + requestStream: false; + responseStream: true; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; } +interface IAggregatorService_IUpdateChecks extends grpc.MethodDefinition { + path: "/aggregator.Aggregator/UpdateChecks"; + requestStream: false; + responseStream: false; + requestSerialize: grpc.serialize; + requestDeserialize: grpc.deserialize; + responseSerialize: grpc.serialize; + responseDeserialize: grpc.deserialize; +} + +export const AggregatorService: IAggregatorService; export interface IAggregatorServer extends grpc.UntypedServiceImplementation { - getKey: grpc.handleUnaryCall; - getNonce: grpc.handleUnaryCall; - getSmartAccountAddress: grpc.handleUnaryCall< - avs_pb.AddressRequest, - avs_pb.AddressResp - >; - createTask: grpc.handleUnaryCall; - listTasks: grpc.handleUnaryCall; - getTask: grpc.handleUnaryCall; - cancelTask: grpc.handleUnaryCall< - avs_pb.UUID, - google_protobuf_wrappers_pb.BoolValue - >; - deleteTask: grpc.handleUnaryCall< - avs_pb.UUID, - google_protobuf_wrappers_pb.BoolValue - >; - ping: grpc.handleUnaryCall; - syncTasks: grpc.handleServerStreamingCall< - avs_pb.SyncTasksReq, - avs_pb.SyncTasksResp - >; - updateChecks: grpc.handleUnaryCall< - avs_pb.UpdateChecksReq, - avs_pb.UpdateChecksResp - >; + getKey: grpc.handleUnaryCall; + getNonce: grpc.handleUnaryCall; + createWallet: grpc.handleUnaryCall; + listWallets: grpc.handleUnaryCall; + createTask: grpc.handleUnaryCall; + listTasks: grpc.handleUnaryCall; + getTask: grpc.handleUnaryCall; + cancelTask: grpc.handleUnaryCall; + deleteTask: grpc.handleUnaryCall; + ping: grpc.handleUnaryCall; + syncTasks: grpc.handleServerStreamingCall; + updateChecks: grpc.handleUnaryCall; } export interface IAggregatorClient { - getKey( - request: avs_pb.GetKeyReq, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.KeyResp - ) => void - ): grpc.ClientUnaryCall; - getKey( - request: avs_pb.GetKeyReq, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.KeyResp - ) => void - ): grpc.ClientUnaryCall; - getKey( - request: avs_pb.GetKeyReq, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.KeyResp - ) => void - ): grpc.ClientUnaryCall; - getNonce( - request: avs_pb.NonceRequest, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.NonceResp - ) => void - ): grpc.ClientUnaryCall; - getNonce( - request: avs_pb.NonceRequest, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.NonceResp - ) => void - ): grpc.ClientUnaryCall; - getNonce( - request: avs_pb.NonceRequest, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.NonceResp - ) => void - ): grpc.ClientUnaryCall; - getSmartAccountAddress( - request: avs_pb.AddressRequest, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.AddressResp - ) => void - ): grpc.ClientUnaryCall; - getSmartAccountAddress( - request: avs_pb.AddressRequest, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.AddressResp - ) => void - ): grpc.ClientUnaryCall; - getSmartAccountAddress( - request: avs_pb.AddressRequest, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.AddressResp - ) => void - ): grpc.ClientUnaryCall; - createTask( - request: avs_pb.CreateTaskReq, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.CreateTaskResp - ) => void - ): grpc.ClientUnaryCall; - createTask( - request: avs_pb.CreateTaskReq, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.CreateTaskResp - ) => void - ): grpc.ClientUnaryCall; - createTask( - request: avs_pb.CreateTaskReq, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.CreateTaskResp - ) => void - ): grpc.ClientUnaryCall; - listTasks( - request: avs_pb.ListTasksReq, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.ListTasksResp - ) => void - ): grpc.ClientUnaryCall; - listTasks( - request: avs_pb.ListTasksReq, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.ListTasksResp - ) => void - ): grpc.ClientUnaryCall; - listTasks( - request: avs_pb.ListTasksReq, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.ListTasksResp - ) => void - ): grpc.ClientUnaryCall; - getTask( - request: avs_pb.UUID, - callback: (error: grpc.ServiceError | null, response: avs_pb.Task) => void - ): grpc.ClientUnaryCall; - getTask( - request: avs_pb.UUID, - metadata: grpc.Metadata, - callback: (error: grpc.ServiceError | null, response: avs_pb.Task) => void - ): grpc.ClientUnaryCall; - getTask( - request: avs_pb.UUID, - metadata: grpc.Metadata, - options: Partial, - callback: (error: grpc.ServiceError | null, response: avs_pb.Task) => void - ): grpc.ClientUnaryCall; - cancelTask( - request: avs_pb.UUID, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - cancelTask( - request: avs_pb.UUID, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - cancelTask( - request: avs_pb.UUID, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - deleteTask( - request: avs_pb.UUID, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - deleteTask( - request: avs_pb.UUID, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - deleteTask( - request: avs_pb.UUID, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - ping( - request: avs_pb.Checkin, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.CheckinResp - ) => void - ): grpc.ClientUnaryCall; - ping( - request: avs_pb.Checkin, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.CheckinResp - ) => void - ): grpc.ClientUnaryCall; - ping( - request: avs_pb.Checkin, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.CheckinResp - ) => void - ): grpc.ClientUnaryCall; - syncTasks( - request: avs_pb.SyncTasksReq, - options?: Partial - ): grpc.ClientReadableStream; - syncTasks( - request: avs_pb.SyncTasksReq, - metadata?: grpc.Metadata, - options?: Partial - ): grpc.ClientReadableStream; - updateChecks( - request: avs_pb.UpdateChecksReq, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.UpdateChecksResp - ) => void - ): grpc.ClientUnaryCall; - updateChecks( - request: avs_pb.UpdateChecksReq, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.UpdateChecksResp - ) => void - ): grpc.ClientUnaryCall; - updateChecks( - request: avs_pb.UpdateChecksReq, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.UpdateChecksResp - ) => void - ): grpc.ClientUnaryCall; + getKey(request: avs_pb.GetKeyReq, callback: (error: grpc.ServiceError | null, response: avs_pb.KeyResp) => void): grpc.ClientUnaryCall; + getKey(request: avs_pb.GetKeyReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: avs_pb.KeyResp) => void): grpc.ClientUnaryCall; + getKey(request: avs_pb.GetKeyReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: avs_pb.KeyResp) => void): grpc.ClientUnaryCall; + getNonce(request: avs_pb.NonceRequest, callback: (error: grpc.ServiceError | null, response: avs_pb.NonceResp) => void): grpc.ClientUnaryCall; + getNonce(request: avs_pb.NonceRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: avs_pb.NonceResp) => void): grpc.ClientUnaryCall; + getNonce(request: avs_pb.NonceRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: avs_pb.NonceResp) => void): grpc.ClientUnaryCall; + createWallet(request: avs_pb.CreateWalletReq, callback: (error: grpc.ServiceError | null, response: avs_pb.CreateWalletResp) => void): grpc.ClientUnaryCall; + createWallet(request: avs_pb.CreateWalletReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: avs_pb.CreateWalletResp) => void): grpc.ClientUnaryCall; + createWallet(request: avs_pb.CreateWalletReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: avs_pb.CreateWalletResp) => void): grpc.ClientUnaryCall; + listWallets(request: avs_pb.ListWalletReq, callback: (error: grpc.ServiceError | null, response: avs_pb.ListWalletResp) => void): grpc.ClientUnaryCall; + listWallets(request: avs_pb.ListWalletReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: avs_pb.ListWalletResp) => void): grpc.ClientUnaryCall; + listWallets(request: avs_pb.ListWalletReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: avs_pb.ListWalletResp) => void): grpc.ClientUnaryCall; + createTask(request: avs_pb.CreateTaskReq, callback: (error: grpc.ServiceError | null, response: avs_pb.CreateTaskResp) => void): grpc.ClientUnaryCall; + createTask(request: avs_pb.CreateTaskReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: avs_pb.CreateTaskResp) => void): grpc.ClientUnaryCall; + createTask(request: avs_pb.CreateTaskReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: avs_pb.CreateTaskResp) => void): grpc.ClientUnaryCall; + listTasks(request: avs_pb.ListTasksReq, callback: (error: grpc.ServiceError | null, response: avs_pb.ListTasksResp) => void): grpc.ClientUnaryCall; + listTasks(request: avs_pb.ListTasksReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: avs_pb.ListTasksResp) => void): grpc.ClientUnaryCall; + listTasks(request: avs_pb.ListTasksReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: avs_pb.ListTasksResp) => void): grpc.ClientUnaryCall; + getTask(request: avs_pb.IdReq, callback: (error: grpc.ServiceError | null, response: avs_pb.Task) => void): grpc.ClientUnaryCall; + getTask(request: avs_pb.IdReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: avs_pb.Task) => void): grpc.ClientUnaryCall; + getTask(request: avs_pb.IdReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: avs_pb.Task) => void): grpc.ClientUnaryCall; + cancelTask(request: avs_pb.IdReq, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + cancelTask(request: avs_pb.IdReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + cancelTask(request: avs_pb.IdReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + deleteTask(request: avs_pb.IdReq, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + deleteTask(request: avs_pb.IdReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + deleteTask(request: avs_pb.IdReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + ping(request: avs_pb.Checkin, callback: (error: grpc.ServiceError | null, response: avs_pb.CheckinResp) => void): grpc.ClientUnaryCall; + ping(request: avs_pb.Checkin, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: avs_pb.CheckinResp) => void): grpc.ClientUnaryCall; + ping(request: avs_pb.Checkin, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: avs_pb.CheckinResp) => void): grpc.ClientUnaryCall; + syncTasks(request: avs_pb.SyncTasksReq, options?: Partial): grpc.ClientReadableStream; + syncTasks(request: avs_pb.SyncTasksReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + updateChecks(request: avs_pb.UpdateChecksReq, callback: (error: grpc.ServiceError | null, response: avs_pb.UpdateChecksResp) => void): grpc.ClientUnaryCall; + updateChecks(request: avs_pb.UpdateChecksReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: avs_pb.UpdateChecksResp) => void): grpc.ClientUnaryCall; + updateChecks(request: avs_pb.UpdateChecksReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: avs_pb.UpdateChecksResp) => void): grpc.ClientUnaryCall; } export class AggregatorClient extends grpc.Client implements IAggregatorClient { - constructor( - address: string, - credentials: grpc.ChannelCredentials, - options?: Partial - ); - public getKey( - request: avs_pb.GetKeyReq, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.KeyResp - ) => void - ): grpc.ClientUnaryCall; - public getKey( - request: avs_pb.GetKeyReq, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.KeyResp - ) => void - ): grpc.ClientUnaryCall; - public getKey( - request: avs_pb.GetKeyReq, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.KeyResp - ) => void - ): grpc.ClientUnaryCall; - public getNonce( - request: avs_pb.NonceRequest, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.NonceResp - ) => void - ): grpc.ClientUnaryCall; - public getNonce( - request: avs_pb.NonceRequest, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.NonceResp - ) => void - ): grpc.ClientUnaryCall; - public getNonce( - request: avs_pb.NonceRequest, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.NonceResp - ) => void - ): grpc.ClientUnaryCall; - public getSmartAccountAddress( - request: avs_pb.AddressRequest, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.AddressResp - ) => void - ): grpc.ClientUnaryCall; - public getSmartAccountAddress( - request: avs_pb.AddressRequest, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.AddressResp - ) => void - ): grpc.ClientUnaryCall; - public getSmartAccountAddress( - request: avs_pb.AddressRequest, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.AddressResp - ) => void - ): grpc.ClientUnaryCall; - public createTask( - request: avs_pb.CreateTaskReq, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.CreateTaskResp - ) => void - ): grpc.ClientUnaryCall; - public createTask( - request: avs_pb.CreateTaskReq, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.CreateTaskResp - ) => void - ): grpc.ClientUnaryCall; - public createTask( - request: avs_pb.CreateTaskReq, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.CreateTaskResp - ) => void - ): grpc.ClientUnaryCall; - public listTasks( - request: avs_pb.ListTasksReq, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.ListTasksResp - ) => void - ): grpc.ClientUnaryCall; - public listTasks( - request: avs_pb.ListTasksReq, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.ListTasksResp - ) => void - ): grpc.ClientUnaryCall; - public listTasks( - request: avs_pb.ListTasksReq, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.ListTasksResp - ) => void - ): grpc.ClientUnaryCall; - public getTask( - request: avs_pb.UUID, - callback: (error: grpc.ServiceError | null, response: avs_pb.Task) => void - ): grpc.ClientUnaryCall; - public getTask( - request: avs_pb.UUID, - metadata: grpc.Metadata, - callback: (error: grpc.ServiceError | null, response: avs_pb.Task) => void - ): grpc.ClientUnaryCall; - public getTask( - request: avs_pb.UUID, - metadata: grpc.Metadata, - options: Partial, - callback: (error: grpc.ServiceError | null, response: avs_pb.Task) => void - ): grpc.ClientUnaryCall; - public cancelTask( - request: avs_pb.UUID, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - public cancelTask( - request: avs_pb.UUID, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - public cancelTask( - request: avs_pb.UUID, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - public deleteTask( - request: avs_pb.UUID, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - public deleteTask( - request: avs_pb.UUID, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - public deleteTask( - request: avs_pb.UUID, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: google_protobuf_wrappers_pb.BoolValue - ) => void - ): grpc.ClientUnaryCall; - public ping( - request: avs_pb.Checkin, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.CheckinResp - ) => void - ): grpc.ClientUnaryCall; - public ping( - request: avs_pb.Checkin, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.CheckinResp - ) => void - ): grpc.ClientUnaryCall; - public ping( - request: avs_pb.Checkin, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.CheckinResp - ) => void - ): grpc.ClientUnaryCall; - public syncTasks( - request: avs_pb.SyncTasksReq, - options?: Partial - ): grpc.ClientReadableStream; - public syncTasks( - request: avs_pb.SyncTasksReq, - metadata?: grpc.Metadata, - options?: Partial - ): grpc.ClientReadableStream; - public updateChecks( - request: avs_pb.UpdateChecksReq, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.UpdateChecksResp - ) => void - ): grpc.ClientUnaryCall; - public updateChecks( - request: avs_pb.UpdateChecksReq, - metadata: grpc.Metadata, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.UpdateChecksResp - ) => void - ): grpc.ClientUnaryCall; - public updateChecks( - request: avs_pb.UpdateChecksReq, - metadata: grpc.Metadata, - options: Partial, - callback: ( - error: grpc.ServiceError | null, - response: avs_pb.UpdateChecksResp - ) => void - ): grpc.ClientUnaryCall; + constructor(address: string, credentials: grpc.ChannelCredentials, options?: Partial); + public getKey(request: avs_pb.GetKeyReq, callback: (error: grpc.ServiceError | null, response: avs_pb.KeyResp) => void): grpc.ClientUnaryCall; + public getKey(request: avs_pb.GetKeyReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: avs_pb.KeyResp) => void): grpc.ClientUnaryCall; + public getKey(request: avs_pb.GetKeyReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: avs_pb.KeyResp) => void): grpc.ClientUnaryCall; + public getNonce(request: avs_pb.NonceRequest, callback: (error: grpc.ServiceError | null, response: avs_pb.NonceResp) => void): grpc.ClientUnaryCall; + public getNonce(request: avs_pb.NonceRequest, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: avs_pb.NonceResp) => void): grpc.ClientUnaryCall; + public getNonce(request: avs_pb.NonceRequest, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: avs_pb.NonceResp) => void): grpc.ClientUnaryCall; + public createWallet(request: avs_pb.CreateWalletReq, callback: (error: grpc.ServiceError | null, response: avs_pb.CreateWalletResp) => void): grpc.ClientUnaryCall; + public createWallet(request: avs_pb.CreateWalletReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: avs_pb.CreateWalletResp) => void): grpc.ClientUnaryCall; + public createWallet(request: avs_pb.CreateWalletReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: avs_pb.CreateWalletResp) => void): grpc.ClientUnaryCall; + public listWallets(request: avs_pb.ListWalletReq, callback: (error: grpc.ServiceError | null, response: avs_pb.ListWalletResp) => void): grpc.ClientUnaryCall; + public listWallets(request: avs_pb.ListWalletReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: avs_pb.ListWalletResp) => void): grpc.ClientUnaryCall; + public listWallets(request: avs_pb.ListWalletReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: avs_pb.ListWalletResp) => void): grpc.ClientUnaryCall; + public createTask(request: avs_pb.CreateTaskReq, callback: (error: grpc.ServiceError | null, response: avs_pb.CreateTaskResp) => void): grpc.ClientUnaryCall; + public createTask(request: avs_pb.CreateTaskReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: avs_pb.CreateTaskResp) => void): grpc.ClientUnaryCall; + public createTask(request: avs_pb.CreateTaskReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: avs_pb.CreateTaskResp) => void): grpc.ClientUnaryCall; + public listTasks(request: avs_pb.ListTasksReq, callback: (error: grpc.ServiceError | null, response: avs_pb.ListTasksResp) => void): grpc.ClientUnaryCall; + public listTasks(request: avs_pb.ListTasksReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: avs_pb.ListTasksResp) => void): grpc.ClientUnaryCall; + public listTasks(request: avs_pb.ListTasksReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: avs_pb.ListTasksResp) => void): grpc.ClientUnaryCall; + public getTask(request: avs_pb.IdReq, callback: (error: grpc.ServiceError | null, response: avs_pb.Task) => void): grpc.ClientUnaryCall; + public getTask(request: avs_pb.IdReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: avs_pb.Task) => void): grpc.ClientUnaryCall; + public getTask(request: avs_pb.IdReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: avs_pb.Task) => void): grpc.ClientUnaryCall; + public cancelTask(request: avs_pb.IdReq, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + public cancelTask(request: avs_pb.IdReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + public cancelTask(request: avs_pb.IdReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + public deleteTask(request: avs_pb.IdReq, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + public deleteTask(request: avs_pb.IdReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + public deleteTask(request: avs_pb.IdReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: google_protobuf_wrappers_pb.BoolValue) => void): grpc.ClientUnaryCall; + public ping(request: avs_pb.Checkin, callback: (error: grpc.ServiceError | null, response: avs_pb.CheckinResp) => void): grpc.ClientUnaryCall; + public ping(request: avs_pb.Checkin, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: avs_pb.CheckinResp) => void): grpc.ClientUnaryCall; + public ping(request: avs_pb.Checkin, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: avs_pb.CheckinResp) => void): grpc.ClientUnaryCall; + public syncTasks(request: avs_pb.SyncTasksReq, options?: Partial): grpc.ClientReadableStream; + public syncTasks(request: avs_pb.SyncTasksReq, metadata?: grpc.Metadata, options?: Partial): grpc.ClientReadableStream; + public updateChecks(request: avs_pb.UpdateChecksReq, callback: (error: grpc.ServiceError | null, response: avs_pb.UpdateChecksResp) => void): grpc.ClientUnaryCall; + public updateChecks(request: avs_pb.UpdateChecksReq, metadata: grpc.Metadata, callback: (error: grpc.ServiceError | null, response: avs_pb.UpdateChecksResp) => void): grpc.ClientUnaryCall; + public updateChecks(request: avs_pb.UpdateChecksReq, metadata: grpc.Metadata, options: Partial, callback: (error: grpc.ServiceError | null, response: avs_pb.UpdateChecksResp) => void): grpc.ClientUnaryCall; } diff --git a/grpc_codegen/avs_grpc_pb.js b/grpc_codegen/avs_grpc_pb.js index 004d689..25d3e95 100644 --- a/grpc_codegen/avs_grpc_pb.js +++ b/grpc_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'); @@ -216,7 +238,7 @@ function deserialize_google_protobuf_BoolValue(buffer_arg) { } -const AggregatorService = { +var AggregatorService = exports.AggregatorService = { // Auth getKey: { path: '/aggregator.Aggregator/GetKey', @@ -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, }, @@ -344,6 +377,4 @@ ping: { }, }; -const AggregatorClient = grpc.makeGenericClientConstructor(AggregatorService); - -export { AggregatorService, AggregatorClient }; +exports.AggregatorClient = grpc.makeGenericClientConstructor(AggregatorService); diff --git a/grpc_codegen/avs_pb.d.ts b/grpc_codegen/avs_pb.d.ts index 8fdb35f..ac66f5d 100644 --- a/grpc_codegen/avs_pb.d.ts +++ b/grpc_codegen/avs_pb.d.ts @@ -8,23 +8,23 @@ import * as jspb from "google-protobuf"; import * as google_protobuf_timestamp_pb from "google-protobuf/google/protobuf/timestamp_pb"; import * as google_protobuf_wrappers_pb from "google-protobuf/google/protobuf/wrappers_pb"; -export class UUID extends jspb.Message { - getBytes(): string; - setBytes(value: string): UUID; +export class IdReq extends jspb.Message { + getId(): string; + setId(value: string): IdReq; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): UUID.AsObject; - static toObject(includeInstance: boolean, msg: UUID): UUID.AsObject; + toObject(includeInstance?: boolean): IdReq.AsObject; + static toObject(includeInstance: boolean, msg: IdReq): IdReq.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: UUID, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): UUID; - static deserializeBinaryFromReader(message: UUID, reader: jspb.BinaryReader): UUID; + static serializeBinaryToWriter(message: IdReq, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): IdReq; + static deserializeBinaryFromReader(message: IdReq, reader: jspb.BinaryReader): IdReq; } -export namespace UUID { +export namespace IdReq { export type AsObject = { - bytes: string, + id: string, } } @@ -152,110 +152,147 @@ export namespace SyncTasksReq { } } -export class TaskTrigger extends jspb.Message { - getTriggerType(): TriggerType; - setTriggerType(value: TriggerType): TaskTrigger; +export class FixedEpochCondition extends jspb.Message { + clearEpochsList(): void; + getEpochsList(): Array; + setEpochsList(value: Array): FixedEpochCondition; + addEpochs(value: number, index?: number): number; - hasSchedule(): boolean; - clearSchedule(): void; - getSchedule(): TimeCondition | undefined; - setSchedule(value?: TimeCondition): TaskTrigger; + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FixedEpochCondition.AsObject; + static toObject(includeInstance: boolean, msg: FixedEpochCondition): FixedEpochCondition.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FixedEpochCondition, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FixedEpochCondition; + static deserializeBinaryFromReader(message: FixedEpochCondition, reader: jspb.BinaryReader): FixedEpochCondition; +} - hasContractQuery(): boolean; - clearContractQuery(): void; - getContractQuery(): ContractQueryCondition | undefined; - setContractQuery(value?: ContractQueryCondition): TaskTrigger; +export namespace FixedEpochCondition { + export type AsObject = { + epochsList: Array, + } +} - hasExpression(): boolean; - clearExpression(): void; - getExpression(): ExpressionCondition | undefined; - setExpression(value?: ExpressionCondition): TaskTrigger; +export class CronCondition extends jspb.Message { + clearScheduleList(): void; + getScheduleList(): Array; + setScheduleList(value: Array): CronCondition; + addSchedule(value: string, index?: number): string; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TaskTrigger.AsObject; - static toObject(includeInstance: boolean, msg: TaskTrigger): TaskTrigger.AsObject; + toObject(includeInstance?: boolean): CronCondition.AsObject; + static toObject(includeInstance: boolean, msg: CronCondition): CronCondition.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TaskTrigger, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TaskTrigger; - static deserializeBinaryFromReader(message: TaskTrigger, reader: jspb.BinaryReader): TaskTrigger; + static serializeBinaryToWriter(message: CronCondition, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CronCondition; + static deserializeBinaryFromReader(message: CronCondition, reader: jspb.BinaryReader): CronCondition; } -export namespace TaskTrigger { +export namespace CronCondition { export type AsObject = { - triggerType: TriggerType, - schedule?: TimeCondition.AsObject, - contractQuery?: ContractQueryCondition.AsObject, - expression?: ExpressionCondition.AsObject, + scheduleList: Array, } } -export class TimeCondition extends jspb.Message { - clearFixedList(): void; - getFixedList(): Array; - setFixedList(value: Array): TimeCondition; - addFixed(value: number, index?: number): number; - getCron(): string; - setCron(value: string): TimeCondition; +export class BlockCondition extends jspb.Message { + getInterval(): number; + setInterval(value: number): BlockCondition; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TimeCondition.AsObject; - static toObject(includeInstance: boolean, msg: TimeCondition): TimeCondition.AsObject; + toObject(includeInstance?: boolean): BlockCondition.AsObject; + static toObject(includeInstance: boolean, msg: BlockCondition): BlockCondition.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TimeCondition, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TimeCondition; - static deserializeBinaryFromReader(message: TimeCondition, reader: jspb.BinaryReader): TimeCondition; + static serializeBinaryToWriter(message: BlockCondition, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BlockCondition; + static deserializeBinaryFromReader(message: BlockCondition, reader: jspb.BinaryReader): BlockCondition; } -export namespace TimeCondition { +export namespace BlockCondition { export type AsObject = { - fixedList: Array, - cron: string, + interval: number, } } -export class ContractQueryCondition extends jspb.Message { - getContractAddress(): string; - setContractAddress(value: string): ContractQueryCondition; - getCallmsg(): string; - setCallmsg(value: string): ContractQueryCondition; +export class EventCondition extends jspb.Message { + getExpression(): string; + setExpression(value: string): EventCondition; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ContractQueryCondition.AsObject; - static toObject(includeInstance: boolean, msg: ContractQueryCondition): ContractQueryCondition.AsObject; + toObject(includeInstance?: boolean): EventCondition.AsObject; + static toObject(includeInstance: boolean, msg: EventCondition): EventCondition.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ContractQueryCondition, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ContractQueryCondition; - static deserializeBinaryFromReader(message: ContractQueryCondition, reader: jspb.BinaryReader): ContractQueryCondition; + static serializeBinaryToWriter(message: EventCondition, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): EventCondition; + static deserializeBinaryFromReader(message: EventCondition, reader: jspb.BinaryReader): EventCondition; } -export namespace ContractQueryCondition { +export namespace EventCondition { export type AsObject = { - contractAddress: string, - callmsg: string, + expression: string, } } -export class ExpressionCondition extends jspb.Message { - getExpression(): string; - setExpression(value: string): ExpressionCondition; +export class TaskTrigger extends jspb.Message { + + hasManual(): boolean; + clearManual(): void; + getManual(): boolean; + setManual(value: boolean): TaskTrigger; + + hasFixedTime(): boolean; + clearFixedTime(): void; + getFixedTime(): FixedEpochCondition | undefined; + setFixedTime(value?: FixedEpochCondition): TaskTrigger; + + hasCron(): boolean; + clearCron(): void; + getCron(): CronCondition | undefined; + setCron(value?: CronCondition): TaskTrigger; + + hasBlock(): boolean; + clearBlock(): void; + getBlock(): BlockCondition | undefined; + setBlock(value?: BlockCondition): TaskTrigger; + + hasEvent(): boolean; + clearEvent(): void; + getEvent(): EventCondition | undefined; + setEvent(value?: EventCondition): TaskTrigger; + + getTriggerTypeCase(): TaskTrigger.TriggerTypeCase; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ExpressionCondition.AsObject; - static toObject(includeInstance: boolean, msg: ExpressionCondition): ExpressionCondition.AsObject; + toObject(includeInstance?: boolean): TaskTrigger.AsObject; + static toObject(includeInstance: boolean, msg: TaskTrigger): TaskTrigger.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ExpressionCondition, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ExpressionCondition; - static deserializeBinaryFromReader(message: ExpressionCondition, reader: jspb.BinaryReader): ExpressionCondition; + static serializeBinaryToWriter(message: TaskTrigger, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TaskTrigger; + static deserializeBinaryFromReader(message: TaskTrigger, reader: jspb.BinaryReader): TaskTrigger; } -export namespace ExpressionCondition { +export namespace TaskTrigger { export type AsObject = { - expression: string, + manual: boolean, + fixedTime?: FixedEpochCondition.AsObject, + cron?: CronCondition.AsObject, + block?: BlockCondition.AsObject, + event?: EventCondition.AsObject, } + + export enum TriggerTypeCase { + TRIGGER_TYPE_NOT_SET = 0, + MANUAL = 1, + FIXED_TIME = 2, + CRON = 3, + BLOCK = 4, + EVENT = 5, + } + } export class SyncTasksResp extends jspb.Message { @@ -287,254 +324,371 @@ export namespace SyncTasksResp { } } -export class ETHTransfer extends jspb.Message { +export class ETHTransferNode extends jspb.Message { getDestination(): string; - setDestination(value: string): ETHTransfer; + setDestination(value: string): ETHTransferNode; getAmount(): string; - setAmount(value: string): ETHTransfer; + setAmount(value: string): ETHTransferNode; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ETHTransfer.AsObject; - static toObject(includeInstance: boolean, msg: ETHTransfer): ETHTransfer.AsObject; + toObject(includeInstance?: boolean): ETHTransferNode.AsObject; + static toObject(includeInstance: boolean, msg: ETHTransferNode): ETHTransferNode.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ETHTransfer, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ETHTransfer; - static deserializeBinaryFromReader(message: ETHTransfer, reader: jspb.BinaryReader): ETHTransfer; + static serializeBinaryToWriter(message: ETHTransferNode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ETHTransferNode; + static deserializeBinaryFromReader(message: ETHTransferNode, reader: jspb.BinaryReader): ETHTransferNode; } -export namespace ETHTransfer { +export namespace ETHTransferNode { export type AsObject = { destination: string, amount: string, } } -export class ContractExecution extends jspb.Message { +export class ContractWriteNode extends jspb.Message { getContractAddress(): string; - setContractAddress(value: string): ContractExecution; + setContractAddress(value: string): ContractWriteNode; getCallData(): string; - setCallData(value: string): ContractExecution; - getMethod(): string; - setMethod(value: string): ContractExecution; - getEncodedParams(): string; - setEncodedParams(value: string): ContractExecution; + setCallData(value: string): ContractWriteNode; + getContractAbi(): string; + setContractAbi(value: string): ContractWriteNode; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ContractExecution.AsObject; - static toObject(includeInstance: boolean, msg: ContractExecution): ContractExecution.AsObject; + toObject(includeInstance?: boolean): ContractWriteNode.AsObject; + static toObject(includeInstance: boolean, msg: ContractWriteNode): ContractWriteNode.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ContractExecution, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ContractExecution; - static deserializeBinaryFromReader(message: ContractExecution, reader: jspb.BinaryReader): ContractExecution; + static serializeBinaryToWriter(message: ContractWriteNode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ContractWriteNode; + static deserializeBinaryFromReader(message: ContractWriteNode, reader: jspb.BinaryReader): ContractWriteNode; } -export namespace ContractExecution { +export namespace ContractWriteNode { export type AsObject = { contractAddress: string, callData: string, - method: string, - encodedParams: string, + contractAbi: string, + } +} + +export class ContractReadNode extends jspb.Message { + getContractAddress(): string; + setContractAddress(value: string): ContractReadNode; + getCallData(): string; + setCallData(value: string): ContractReadNode; + getContractAbi(): string; + setContractAbi(value: string): ContractReadNode; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ContractReadNode.AsObject; + static toObject(includeInstance: boolean, msg: ContractReadNode): ContractReadNode.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ContractReadNode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ContractReadNode; + static deserializeBinaryFromReader(message: ContractReadNode, reader: jspb.BinaryReader): ContractReadNode; +} + +export namespace ContractReadNode { + export type AsObject = { + contractAddress: string, + callData: string, + contractAbi: string, } } -export class GraphQLDataQuery extends jspb.Message { +export class GraphQLQueryNode extends jspb.Message { getUrl(): string; - setUrl(value: string): GraphQLDataQuery; + setUrl(value: string): GraphQLQueryNode; getQuery(): string; - setQuery(value: string): GraphQLDataQuery; + setQuery(value: string): GraphQLQueryNode; + + getVariablesMap(): jspb.Map; + clearVariablesMap(): void; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): GraphQLDataQuery.AsObject; - static toObject(includeInstance: boolean, msg: GraphQLDataQuery): GraphQLDataQuery.AsObject; + toObject(includeInstance?: boolean): GraphQLQueryNode.AsObject; + static toObject(includeInstance: boolean, msg: GraphQLQueryNode): GraphQLQueryNode.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: GraphQLDataQuery, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): GraphQLDataQuery; - static deserializeBinaryFromReader(message: GraphQLDataQuery, reader: jspb.BinaryReader): GraphQLDataQuery; + static serializeBinaryToWriter(message: GraphQLQueryNode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): GraphQLQueryNode; + static deserializeBinaryFromReader(message: GraphQLQueryNode, reader: jspb.BinaryReader): GraphQLQueryNode; } -export namespace GraphQLDataQuery { +export namespace GraphQLQueryNode { export type AsObject = { url: string, query: string, + + variablesMap: Array<[string, string]>, } } -export class HTTPAPICall extends jspb.Message { +export class RestAPINode extends jspb.Message { getUrl(): string; - setUrl(value: string): HTTPAPICall; + setUrl(value: string): RestAPINode; getHeadersMap(): jspb.Map; clearHeadersMap(): void; getBody(): string; - setBody(value: string): HTTPAPICall; + setBody(value: string): RestAPINode; + getMethod(): string; + setMethod(value: string): RestAPINode; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): HTTPAPICall.AsObject; - static toObject(includeInstance: boolean, msg: HTTPAPICall): HTTPAPICall.AsObject; + toObject(includeInstance?: boolean): RestAPINode.AsObject; + static toObject(includeInstance: boolean, msg: RestAPINode): RestAPINode.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: HTTPAPICall, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): HTTPAPICall; - static deserializeBinaryFromReader(message: HTTPAPICall, reader: jspb.BinaryReader): HTTPAPICall; + static serializeBinaryToWriter(message: RestAPINode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): RestAPINode; + static deserializeBinaryFromReader(message: RestAPINode, reader: jspb.BinaryReader): RestAPINode; } -export namespace HTTPAPICall { +export namespace RestAPINode { export type AsObject = { url: string, headersMap: Array<[string, string]>, body: string, + method: string, } } -export class CustomCode extends jspb.Message { +export class CustomCodeNode extends jspb.Message { getType(): CustomCodeType; - setType(value: CustomCodeType): CustomCode; - getBody(): string; - setBody(value: string): CustomCode; + setType(value: CustomCodeType): CustomCodeNode; + getSource(): string; + setSource(value: string): CustomCodeNode; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): CustomCode.AsObject; - static toObject(includeInstance: boolean, msg: CustomCode): CustomCode.AsObject; + toObject(includeInstance?: boolean): CustomCodeNode.AsObject; + static toObject(includeInstance: boolean, msg: CustomCodeNode): CustomCodeNode.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: CustomCode, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): CustomCode; - static deserializeBinaryFromReader(message: CustomCode, reader: jspb.BinaryReader): CustomCode; + static serializeBinaryToWriter(message: CustomCodeNode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CustomCodeNode; + static deserializeBinaryFromReader(message: CustomCodeNode, reader: jspb.BinaryReader): CustomCodeNode; } -export namespace CustomCode { +export namespace CustomCodeNode { export type AsObject = { type: CustomCodeType, - body: string, + source: string, } } -export class ConditionJump extends jspb.Message { +export class Condition extends jspb.Message { + getId(): string; + setId(value: string): Condition; + getType(): string; + setType(value: string): Condition; getExpression(): string; - setExpression(value: string): ConditionJump; - getNext(): string; - setNext(value: string): ConditionJump; + setExpression(value: string): Condition; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): ConditionJump.AsObject; - static toObject(includeInstance: boolean, msg: ConditionJump): ConditionJump.AsObject; + toObject(includeInstance?: boolean): Condition.AsObject; + static toObject(includeInstance: boolean, msg: Condition): Condition.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: ConditionJump, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): ConditionJump; - static deserializeBinaryFromReader(message: ConditionJump, reader: jspb.BinaryReader): ConditionJump; + static serializeBinaryToWriter(message: Condition, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): Condition; + static deserializeBinaryFromReader(message: Condition, reader: jspb.BinaryReader): Condition; } -export namespace ConditionJump { +export namespace Condition { export type AsObject = { + id: string, + type: string, expression: string, - next: string, } } -export class BranchAction extends jspb.Message { +export class BranchNode extends jspb.Message { + clearConditionsList(): void; + getConditionsList(): Array; + setConditionsList(value: Array): BranchNode; + addConditions(value?: Condition, index?: number): Condition; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): BranchNode.AsObject; + static toObject(includeInstance: boolean, msg: BranchNode): BranchNode.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: BranchNode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): BranchNode; + static deserializeBinaryFromReader(message: BranchNode, reader: jspb.BinaryReader): BranchNode; +} + +export namespace BranchNode { + export type AsObject = { + conditionsList: Array, + } +} + +export class FilterNode extends jspb.Message { + getExpression(): string; + setExpression(value: string): FilterNode; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): FilterNode.AsObject; + static toObject(includeInstance: boolean, msg: FilterNode): FilterNode.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: FilterNode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): FilterNode; + static deserializeBinaryFromReader(message: FilterNode, reader: jspb.BinaryReader): FilterNode; +} + +export namespace FilterNode { + export type AsObject = { + expression: string, + } +} + +export class LoopNode extends jspb.Message { + getIterVar(): string; + setIterVar(value: string): LoopNode; + getIterKey(): string; + setIterKey(value: string): LoopNode; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): LoopNode.AsObject; + static toObject(includeInstance: boolean, msg: LoopNode): LoopNode.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: LoopNode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): LoopNode; + static deserializeBinaryFromReader(message: LoopNode, reader: jspb.BinaryReader): LoopNode; +} - hasIf(): boolean; - clearIf(): void; - getIf(): ConditionJump | undefined; - setIf(value?: ConditionJump): BranchAction; - clearElseifsList(): void; - getElseifsList(): Array; - setElseifsList(value: Array): BranchAction; - addElseifs(value?: ConditionJump, index?: number): ConditionJump; +export namespace LoopNode { + export type AsObject = { + iterVar: string, + iterKey: string, + } +} - hasElse(): boolean; - clearElse(): void; - getElse(): ConditionJump | undefined; - setElse(value?: ConditionJump): BranchAction; +export class TaskEdge extends jspb.Message { + getId(): string; + setId(value: string): TaskEdge; + getSource(): string; + setSource(value: string): TaskEdge; + getTarget(): string; + setTarget(value: string): TaskEdge; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): BranchAction.AsObject; - static toObject(includeInstance: boolean, msg: BranchAction): BranchAction.AsObject; + toObject(includeInstance?: boolean): TaskEdge.AsObject; + static toObject(includeInstance: boolean, msg: TaskEdge): TaskEdge.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: BranchAction, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): BranchAction; - static deserializeBinaryFromReader(message: BranchAction, reader: jspb.BinaryReader): BranchAction; + static serializeBinaryToWriter(message: TaskEdge, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TaskEdge; + static deserializeBinaryFromReader(message: TaskEdge, reader: jspb.BinaryReader): TaskEdge; } -export namespace BranchAction { +export namespace TaskEdge { export type AsObject = { - pb_if?: ConditionJump.AsObject, - elseifsList: Array, - pb_else?: ConditionJump.AsObject, + id: string, + source: string, + target: string, } } -export class TaskAction extends jspb.Message { - getTaskType(): TaskType; - setTaskType(value: TaskType): TaskAction; +export class TaskNode extends jspb.Message { getId(): string; - setId(value: string): TaskAction; + setId(value: string): TaskNode; getName(): string; - setName(value: string): TaskAction; - clearNextList(): void; - getNextList(): Array; - setNextList(value: Array): TaskAction; - addNext(value: string, index?: number): string; + setName(value: string): TaskNode; hasEthTransfer(): boolean; clearEthTransfer(): void; - getEthTransfer(): ETHTransfer | undefined; - setEthTransfer(value?: ETHTransfer): TaskAction; + getEthTransfer(): ETHTransferNode | undefined; + setEthTransfer(value?: ETHTransferNode): TaskNode; + + hasContractWrite(): boolean; + clearContractWrite(): void; + getContractWrite(): ContractWriteNode | undefined; + setContractWrite(value?: ContractWriteNode): TaskNode; - hasContractExecution(): boolean; - clearContractExecution(): void; - getContractExecution(): ContractExecution | undefined; - setContractExecution(value?: ContractExecution): TaskAction; + hasContractRead(): boolean; + clearContractRead(): void; + getContractRead(): ContractReadNode | undefined; + setContractRead(value?: ContractReadNode): TaskNode; hasGraphqlDataQuery(): boolean; clearGraphqlDataQuery(): void; - getGraphqlDataQuery(): GraphQLDataQuery | undefined; - setGraphqlDataQuery(value?: GraphQLDataQuery): TaskAction; + getGraphqlDataQuery(): GraphQLQueryNode | undefined; + setGraphqlDataQuery(value?: GraphQLQueryNode): TaskNode; + + hasRestApi(): boolean; + clearRestApi(): void; + getRestApi(): RestAPINode | undefined; + setRestApi(value?: RestAPINode): TaskNode; + + hasBranch(): boolean; + clearBranch(): void; + getBranch(): BranchNode | undefined; + setBranch(value?: BranchNode): TaskNode; + + hasFilter(): boolean; + clearFilter(): void; + getFilter(): FilterNode | undefined; + setFilter(value?: FilterNode): TaskNode; - hasHttpDataQuery(): boolean; - clearHttpDataQuery(): void; - getHttpDataQuery(): HTTPAPICall | undefined; - setHttpDataQuery(value?: HTTPAPICall): TaskAction; + hasLoop(): boolean; + clearLoop(): void; + getLoop(): LoopNode | undefined; + setLoop(value?: LoopNode): TaskNode; hasCustomCode(): boolean; clearCustomCode(): void; - getCustomCode(): CustomCode | undefined; - setCustomCode(value?: CustomCode): TaskAction; + getCustomCode(): CustomCodeNode | undefined; + setCustomCode(value?: CustomCodeNode): TaskNode; - hasBranch(): boolean; - clearBranch(): void; - getBranch(): BranchAction | undefined; - setBranch(value?: BranchAction): TaskAction; + getTaskTypeCase(): TaskNode.TaskTypeCase; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TaskAction.AsObject; - static toObject(includeInstance: boolean, msg: TaskAction): TaskAction.AsObject; + toObject(includeInstance?: boolean): TaskNode.AsObject; + static toObject(includeInstance: boolean, msg: TaskNode): TaskNode.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TaskAction, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TaskAction; - static deserializeBinaryFromReader(message: TaskAction, reader: jspb.BinaryReader): TaskAction; + static serializeBinaryToWriter(message: TaskNode, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): TaskNode; + static deserializeBinaryFromReader(message: TaskNode, reader: jspb.BinaryReader): TaskNode; } -export namespace TaskAction { +export namespace TaskNode { export type AsObject = { - taskType: TaskType, id: string, name: string, - nextList: Array, - ethTransfer?: ETHTransfer.AsObject, - contractExecution?: ContractExecution.AsObject, - graphqlDataQuery?: GraphQLDataQuery.AsObject, - httpDataQuery?: HTTPAPICall.AsObject, - customCode?: CustomCode.AsObject, - branch?: BranchAction.AsObject, + ethTransfer?: ETHTransferNode.AsObject, + contractWrite?: ContractWriteNode.AsObject, + contractRead?: ContractReadNode.AsObject, + graphqlDataQuery?: GraphQLQueryNode.AsObject, + restApi?: RestAPINode.AsObject, + branch?: BranchNode.AsObject, + filter?: FilterNode.AsObject, + loop?: LoopNode.AsObject, + customCode?: CustomCodeNode.AsObject, } + + export enum 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, + } + } export class Execution extends jspb.Message { @@ -564,24 +718,12 @@ export namespace Execution { } export class Task extends jspb.Message { - - hasId(): boolean; - clearId(): void; - getId(): UUID | undefined; - setId(value?: UUID): Task; + getId(): string; + setId(value: string): Task; getOwner(): string; setOwner(value: string): Task; - getSmartAccountAddress(): string; - setSmartAccountAddress(value: string): Task; - - hasTrigger(): boolean; - clearTrigger(): void; - getTrigger(): TaskTrigger | undefined; - setTrigger(value?: TaskTrigger): Task; - clearNodesList(): void; - getNodesList(): Array; - setNodesList(value: Array): Task; - addNodes(value?: TaskAction, index?: number): TaskAction; + getSmartWalletAddress(): string; + setSmartWalletAddress(value: string): Task; getStartAt(): number; setStartAt(value: number): Task; getExpiredAt(): number; @@ -590,10 +732,23 @@ export class Task extends jspb.Message { setMemo(value: string): Task; getCompletedAt(): number; setCompletedAt(value: number): Task; + getMaxExecution(): number; + setMaxExecution(value: number): Task; getStatus(): TaskStatus; setStatus(value: TaskStatus): Task; - getRepeatable(): boolean; - setRepeatable(value: boolean): Task; + + hasTrigger(): boolean; + clearTrigger(): void; + getTrigger(): TaskTrigger | undefined; + setTrigger(value?: TaskTrigger): Task; + clearNodesList(): void; + getNodesList(): Array; + setNodesList(value: Array): Task; + addNodes(value?: TaskNode, index?: number): TaskNode; + clearEdgesList(): void; + getEdgesList(): Array; + setEdgesList(value: Array): Task; + addEdges(value?: TaskEdge, index?: number): TaskEdge; clearExecutionsList(): void; getExecutionsList(): Array; setExecutionsList(value: Array): Task; @@ -611,17 +766,18 @@ export class Task extends jspb.Message { export namespace Task { export type AsObject = { - id?: UUID.AsObject, + id: string, owner: string, - smartAccountAddress: string, - trigger?: TaskTrigger.AsObject, - nodesList: Array, + smartWalletAddress: string, startAt: number, expiredAt: number, memo: string, completedAt: number, + maxExecution: number, status: TaskStatus, - repeatable: boolean, + trigger?: TaskTrigger.AsObject, + nodesList: Array, + edgesList: Array, executionsList: Array, } } @@ -632,18 +788,24 @@ export class CreateTaskReq extends jspb.Message { clearTrigger(): void; getTrigger(): TaskTrigger | undefined; setTrigger(value?: TaskTrigger): CreateTaskReq; - clearActionsList(): void; - getActionsList(): Array; - setActionsList(value: Array): CreateTaskReq; - addActions(value?: TaskAction, index?: number): TaskAction; getStartAt(): number; setStartAt(value: number): CreateTaskReq; getExpiredAt(): number; setExpiredAt(value: number): CreateTaskReq; + getMaxExecution(): number; + setMaxExecution(value: number): CreateTaskReq; + getSmartWalletAddress(): string; + setSmartWalletAddress(value: string): CreateTaskReq; getMemo(): string; setMemo(value: string): CreateTaskReq; - getRepeatable(): boolean; - setRepeatable(value: boolean): CreateTaskReq; + clearNodesList(): void; + getNodesList(): Array; + setNodesList(value: Array): CreateTaskReq; + addNodes(value?: TaskNode, index?: number): TaskNode; + clearEdgesList(): void; + getEdgesList(): Array; + setEdgesList(value: Array): CreateTaskReq; + addEdges(value?: TaskEdge, index?: number): TaskEdge; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): CreateTaskReq.AsObject; @@ -658,11 +820,13 @@ export class CreateTaskReq extends jspb.Message { export namespace CreateTaskReq { export type AsObject = { trigger?: TaskTrigger.AsObject, - actionsList: Array, startAt: number, expiredAt: number, + maxExecution: number, + smartWalletAddress: string, memo: string, - repeatable: boolean, + nodesList: Array, + edgesList: Array, } } @@ -726,50 +890,80 @@ export namespace NonceResp { } } -export class AddressRequest extends jspb.Message { - getOwner(): string; - setOwner(value: string): AddressRequest; +export class ListWalletReq extends jspb.Message { + getFactory(): string; + setFactory(value: string): ListWalletReq; + getSalt(): string; + setSalt(value: string): ListWalletReq; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AddressRequest.AsObject; - static toObject(includeInstance: boolean, msg: AddressRequest): AddressRequest.AsObject; + toObject(includeInstance?: boolean): ListWalletReq.AsObject; + static toObject(includeInstance: boolean, msg: ListWalletReq): ListWalletReq.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AddressRequest, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AddressRequest; - static deserializeBinaryFromReader(message: AddressRequest, reader: jspb.BinaryReader): AddressRequest; + static serializeBinaryToWriter(message: ListWalletReq, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListWalletReq; + static deserializeBinaryFromReader(message: ListWalletReq, reader: jspb.BinaryReader): ListWalletReq; } -export namespace AddressRequest { +export namespace ListWalletReq { export type AsObject = { - owner: string, + factory: string, + salt: string, } } -export class AddressResp extends jspb.Message { - getSmartAccountAddress(): string; - setSmartAccountAddress(value: string): AddressResp; - getNonce(): string; - setNonce(value: string): AddressResp; +export class SmartWallet extends jspb.Message { + getAddress(): string; + setAddress(value: string): SmartWallet; + getSalt(): string; + setSalt(value: string): SmartWallet; + getFactory(): string; + setFactory(value: string): SmartWallet; serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): AddressResp.AsObject; - static toObject(includeInstance: boolean, msg: AddressResp): AddressResp.AsObject; + toObject(includeInstance?: boolean): SmartWallet.AsObject; + static toObject(includeInstance: boolean, msg: SmartWallet): SmartWallet.AsObject; static extensions: {[key: number]: jspb.ExtensionFieldInfo}; static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: AddressResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): AddressResp; - static deserializeBinaryFromReader(message: AddressResp, reader: jspb.BinaryReader): AddressResp; + static serializeBinaryToWriter(message: SmartWallet, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): SmartWallet; + static deserializeBinaryFromReader(message: SmartWallet, reader: jspb.BinaryReader): SmartWallet; } -export namespace AddressResp { +export namespace SmartWallet { export type AsObject = { - smartAccountAddress: string, - nonce: string, + address: string, + salt: string, + factory: string, + } +} + +export class ListWalletResp extends jspb.Message { + clearWalletsList(): void; + getWalletsList(): Array; + setWalletsList(value: Array): ListWalletResp; + addWallets(value?: SmartWallet, index?: number): SmartWallet; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): ListWalletResp.AsObject; + static toObject(includeInstance: boolean, msg: ListWalletResp): ListWalletResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: ListWalletResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): ListWalletResp; + static deserializeBinaryFromReader(message: ListWalletResp, reader: jspb.BinaryReader): ListWalletResp; +} + +export namespace ListWalletResp { + export type AsObject = { + walletsList: Array, } } export class ListTasksReq extends jspb.Message { + getSmartWalletAddress(): string; + setSmartWalletAddress(value: string): ListTasksReq; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): ListTasksReq.AsObject; @@ -783,14 +977,15 @@ export class ListTasksReq extends jspb.Message { export namespace ListTasksReq { export type AsObject = { + smartWalletAddress: string, } } export class ListTasksResp extends jspb.Message { clearTasksList(): void; - getTasksList(): Array; - setTasksList(value: Array): ListTasksResp; - addTasks(value?: ListTasksResp.TaskItemResp, index?: number): ListTasksResp.TaskItemResp; + getTasksList(): Array; + setTasksList(value: Array): ListTasksResp; + addTasks(value?: Task, index?: number): Task; serializeBinary(): Uint8Array; toObject(includeInstance?: boolean): ListTasksResp.AsObject; @@ -804,33 +999,8 @@ export class ListTasksResp extends jspb.Message { export namespace ListTasksResp { export type AsObject = { - tasksList: Array, - } - - - export class TaskItemResp extends jspb.Message { - getId(): string; - setId(value: string): TaskItemResp; - getStatus(): TaskStatus; - setStatus(value: TaskStatus): TaskItemResp; - - serializeBinary(): Uint8Array; - toObject(includeInstance?: boolean): TaskItemResp.AsObject; - static toObject(includeInstance: boolean, msg: TaskItemResp): TaskItemResp.AsObject; - static extensions: {[key: number]: jspb.ExtensionFieldInfo}; - static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; - static serializeBinaryToWriter(message: TaskItemResp, writer: jspb.BinaryWriter): void; - static deserializeBinary(bytes: Uint8Array): TaskItemResp; - static deserializeBinaryFromReader(message: TaskItemResp, reader: jspb.BinaryReader): TaskItemResp; + tasksList: Array, } - - export namespace TaskItemResp { - export type AsObject = { - id: string, - status: TaskStatus, - } - } - } export class GetKeyReq extends jspb.Message { @@ -930,19 +1100,64 @@ export namespace UpdateChecksResp { } } -export enum TriggerType { - TIMETRIGGER = 0, - CONTRACTQUERYTRIGGER = 1, - EXPRESSIONTRIGGER = 2, +export class CreateWalletReq extends jspb.Message { + getSalt(): string; + setSalt(value: string): CreateWalletReq; + getFactoryAddress(): string; + setFactoryAddress(value: string): CreateWalletReq; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CreateWalletReq.AsObject; + static toObject(includeInstance: boolean, msg: CreateWalletReq): CreateWalletReq.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CreateWalletReq, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CreateWalletReq; + static deserializeBinaryFromReader(message: CreateWalletReq, reader: jspb.BinaryReader): CreateWalletReq; } -export enum TaskType { - ETHTRANSFERTASK = 0, - CONTRACTEXECUTIONTASK = 1, - GRAPHQLDATAQUERYTASK = 2, - HTTPAPICALLTASK = 3, - CUSTOMCODETASK = 4, - BRANCHACTIONTASK = 5, +export namespace CreateWalletReq { + export type AsObject = { + salt: string, + factoryAddress: string, + } +} + +export class CreateWalletResp extends jspb.Message { + getAddress(): string; + setAddress(value: string): CreateWalletResp; + getSalt(): string; + setSalt(value: string): CreateWalletResp; + getFactoryAddress(): string; + setFactoryAddress(value: string): CreateWalletResp; + + serializeBinary(): Uint8Array; + toObject(includeInstance?: boolean): CreateWalletResp.AsObject; + static toObject(includeInstance: boolean, msg: CreateWalletResp): CreateWalletResp.AsObject; + static extensions: {[key: number]: jspb.ExtensionFieldInfo}; + static extensionsBinary: {[key: number]: jspb.ExtensionFieldBinaryInfo}; + static serializeBinaryToWriter(message: CreateWalletResp, writer: jspb.BinaryWriter): void; + static deserializeBinary(bytes: Uint8Array): CreateWalletResp; + static deserializeBinaryFromReader(message: CreateWalletResp, reader: jspb.BinaryReader): CreateWalletResp; +} + +export namespace CreateWalletResp { + export type AsObject = { + address: string, + salt: string, + factoryAddress: string, + } +} + +export enum Error { + UNKNOWERROR = 0, + RPCNODEERROR = 1000, + STORAGEUNAVAILABLE = 2000, + STORAGEWRITEERROR = 2001, + SMARTWALLETRPCERROR = 6000, + SMARTWALLETNOTFOUNDERROR = 6001, + TASKDATACORRUPTED = 7000, + TASKDATAMISSINGERROR = 7001, } export enum TaskStatus { @@ -955,4 +1170,4 @@ export enum TaskStatus { export enum CustomCodeType { JAVASCRIPT = 0, -} \ No newline at end of file +} diff --git a/grpc_codegen/avs_pb.js b/grpc_codegen/avs_pb.js index 4bb625f..57ec579 100644 --- a/grpc_codegen/avs_pb.js +++ b/grpc_codegen/avs_pb.js @@ -11,65 +11,65 @@ /* eslint-disable */ // @ts-nocheck -var jspb = require("google-protobuf"); +var jspb = require('google-protobuf'); var goog = jspb; -var global = function () { - if (this) { - return this; - } - if (typeof window !== "undefined") { - return window; - } - if (typeof global !== "undefined") { - return global; - } - if (typeof self !== "undefined") { - return self; - } - return Function("return this")(); -}.call(null); - -var google_protobuf_timestamp_pb = require("google-protobuf/google/protobuf/timestamp_pb.js"); +var global = (function() { + if (this) { return this; } + if (typeof window !== 'undefined') { return window; } + if (typeof global !== 'undefined') { return global; } + if (typeof self !== 'undefined') { return self; } + return Function('return this')(); +}.call(null)); + +var google_protobuf_timestamp_pb = require('google-protobuf/google/protobuf/timestamp_pb.js'); goog.object.extend(proto, google_protobuf_timestamp_pb); -var google_protobuf_wrappers_pb = require("google-protobuf/google/protobuf/wrappers_pb.js"); +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.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.CreateTaskReq", null, global); -goog.exportSymbol("proto.aggregator.CreateTaskResp", null, global); -goog.exportSymbol("proto.aggregator.CustomCode", null, global); -goog.exportSymbol("proto.aggregator.CustomCodeType", null, global); -goog.exportSymbol("proto.aggregator.ETHTransfer", null, global); -goog.exportSymbol("proto.aggregator.Execution", null, global); -goog.exportSymbol("proto.aggregator.ExpressionCondition", 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.KeyResp", null, global); -goog.exportSymbol("proto.aggregator.ListTasksReq", null, global); -goog.exportSymbol("proto.aggregator.ListTasksResp", null, global); -goog.exportSymbol("proto.aggregator.ListTasksResp.TaskItemResp", null, global); -goog.exportSymbol("proto.aggregator.NonceRequest", null, global); -goog.exportSymbol("proto.aggregator.NonceResp", null, global); -goog.exportSymbol("proto.aggregator.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.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.UpdateChecksReq", null, global); -goog.exportSymbol("proto.aggregator.UpdateChecksResp", 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.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.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.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.FilterNode', null, global); +goog.exportSymbol('proto.aggregator.FixedEpochCondition', null, global); +goog.exportSymbol('proto.aggregator.GetKeyReq', 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.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.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.TaskTrigger.TriggerTypeCase', null, global); +goog.exportSymbol('proto.aggregator.UpdateChecksReq', null, global); +goog.exportSymbol('proto.aggregator.UpdateChecksResp', null, global); /** * Generated by JsPbCodeGenerator. * @param {Array=} opt_data Optional initial data array, typically from a @@ -80,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. @@ -101,7 +101,7 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.Checkin = function (opt_data) { +proto.aggregator.Checkin = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.aggregator.Checkin, jspb.Message); @@ -110,7 +110,7 @@ if (goog.DEBUG && !COMPILED) { * @public * @override */ - proto.aggregator.Checkin.displayName = "proto.aggregator.Checkin"; + proto.aggregator.Checkin.displayName = 'proto.aggregator.Checkin'; } /** * Generated by JsPbCodeGenerator. @@ -122,7 +122,7 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.Checkin.Status = function (opt_data) { +proto.aggregator.Checkin.Status = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.aggregator.Checkin.Status, jspb.Message); @@ -131,8 +131,7 @@ if (goog.DEBUG && !COMPILED) { * @public * @override */ - proto.aggregator.Checkin.Status.displayName = - "proto.aggregator.Checkin.Status"; + proto.aggregator.Checkin.Status.displayName = 'proto.aggregator.Checkin.Status'; } /** * Generated by JsPbCodeGenerator. @@ -144,7 +143,7 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.CheckinResp = function (opt_data) { +proto.aggregator.CheckinResp = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.aggregator.CheckinResp, jspb.Message); @@ -153,7 +152,7 @@ if (goog.DEBUG && !COMPILED) { * @public * @override */ - proto.aggregator.CheckinResp.displayName = "proto.aggregator.CheckinResp"; + proto.aggregator.CheckinResp.displayName = 'proto.aggregator.CheckinResp'; } /** * Generated by JsPbCodeGenerator. @@ -165,7 +164,7 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.SyncTasksReq = function (opt_data) { +proto.aggregator.SyncTasksReq = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.aggregator.SyncTasksReq, jspb.Message); @@ -174,7 +173,70 @@ if (goog.DEBUG && !COMPILED) { * @public * @override */ - proto.aggregator.SyncTasksReq.displayName = "proto.aggregator.SyncTasksReq"; + proto.aggregator.SyncTasksReq.displayName = 'proto.aggregator.SyncTasksReq'; +} +/** + * 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.FixedEpochCondition = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.FixedEpochCondition.repeatedFields_, null); +}; +goog.inherits(proto.aggregator.FixedEpochCondition, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.aggregator.FixedEpochCondition.displayName = 'proto.aggregator.FixedEpochCondition'; +} +/** + * 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.CronCondition = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.CronCondition.repeatedFields_, null); +}; +goog.inherits(proto.aggregator.CronCondition, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.aggregator.CronCondition.displayName = 'proto.aggregator.CronCondition'; +} +/** + * 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.BlockCondition = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.aggregator.BlockCondition, jspb.Message); +if (goog.DEBUG && !COMPILED) { + /** + * @public + * @override + */ + proto.aggregator.BlockCondition.displayName = 'proto.aggregator.BlockCondition'; } /** * Generated by JsPbCodeGenerator. @@ -186,16 +248,37 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.TaskTrigger = function (opt_data) { +proto.aggregator.EventCondition = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; +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.TaskTrigger.displayName = "proto.aggregator.TaskTrigger"; + proto.aggregator.TaskTrigger.displayName = 'proto.aggregator.TaskTrigger'; } /** * Generated by JsPbCodeGenerator. @@ -207,23 +290,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 - ); -}; -goog.inherits(proto.aggregator.TimeCondition, jspb.Message); +proto.aggregator.SyncTasksResp = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +goog.inherits(proto.aggregator.SyncTasksResp, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.aggregator.TimeCondition.displayName = "proto.aggregator.TimeCondition"; + proto.aggregator.SyncTasksResp.displayName = 'proto.aggregator.SyncTasksResp'; } /** * Generated by JsPbCodeGenerator. @@ -235,17 +311,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.ContractQueryCondition = function (opt_data) { +proto.aggregator.ETHTransferNode = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.aggregator.ContractQueryCondition, jspb.Message); +goog.inherits(proto.aggregator.ETHTransferNode, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.aggregator.ContractQueryCondition.displayName = - "proto.aggregator.ContractQueryCondition"; + proto.aggregator.ETHTransferNode.displayName = 'proto.aggregator.ETHTransferNode'; } /** * Generated by JsPbCodeGenerator. @@ -257,17 +332,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.ExpressionCondition = function (opt_data) { +proto.aggregator.ContractWriteNode = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.aggregator.ExpressionCondition, jspb.Message); +goog.inherits(proto.aggregator.ContractWriteNode, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.aggregator.ExpressionCondition.displayName = - "proto.aggregator.ExpressionCondition"; + proto.aggregator.ContractWriteNode.displayName = 'proto.aggregator.ContractWriteNode'; } /** * Generated by JsPbCodeGenerator. @@ -279,16 +353,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.SyncTasksResp = function (opt_data) { +proto.aggregator.ContractReadNode = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; -goog.inherits(proto.aggregator.SyncTasksResp, jspb.Message); +goog.inherits(proto.aggregator.ContractReadNode, jspb.Message); if (goog.DEBUG && !COMPILED) { /** * @public * @override */ - proto.aggregator.SyncTasksResp.displayName = "proto.aggregator.SyncTasksResp"; + proto.aggregator.ContractReadNode.displayName = 'proto.aggregator.ContractReadNode'; } /** * Generated by JsPbCodeGenerator. @@ -300,16 +374,16 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.ETHTransfer = function (opt_data) { +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. @@ -321,17 +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. @@ -343,17 +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. @@ -365,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. @@ -386,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. @@ -407,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. @@ -428,23 +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 - ); -}; -goog.inherits(proto.aggregator.BranchAction, jspb.Message); +proto.aggregator.TaskEdge = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, null); +}; +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. @@ -456,23 +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 - ); -}; -goog.inherits(proto.aggregator.TaskAction, jspb.Message); +proto.aggregator.TaskNode = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, null, proto.aggregator.TaskNode.oneofGroups_); +}; +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. @@ -484,7 +563,7 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.Execution = function (opt_data) { +proto.aggregator.Execution = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.aggregator.Execution, jspb.Message); @@ -493,7 +572,7 @@ if (goog.DEBUG && !COMPILED) { * @public * @override */ - proto.aggregator.Execution.displayName = "proto.aggregator.Execution"; + proto.aggregator.Execution.displayName = 'proto.aggregator.Execution'; } /** * Generated by JsPbCodeGenerator. @@ -505,15 +584,8 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.Task = function (opt_data) { - jspb.Message.initialize( - this, - opt_data, - 0, - -1, - proto.aggregator.Task.repeatedFields_, - null - ); +proto.aggregator.Task = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.Task.repeatedFields_, null); }; goog.inherits(proto.aggregator.Task, jspb.Message); if (goog.DEBUG && !COMPILED) { @@ -521,7 +593,7 @@ if (goog.DEBUG && !COMPILED) { * @public * @override */ - proto.aggregator.Task.displayName = "proto.aggregator.Task"; + proto.aggregator.Task.displayName = 'proto.aggregator.Task'; } /** * Generated by JsPbCodeGenerator. @@ -533,15 +605,8 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.CreateTaskReq = function (opt_data) { - jspb.Message.initialize( - this, - opt_data, - 0, - -1, - proto.aggregator.CreateTaskReq.repeatedFields_, - null - ); +proto.aggregator.CreateTaskReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.CreateTaskReq.repeatedFields_, null); }; goog.inherits(proto.aggregator.CreateTaskReq, jspb.Message); if (goog.DEBUG && !COMPILED) { @@ -549,7 +614,7 @@ if (goog.DEBUG && !COMPILED) { * @public * @override */ - proto.aggregator.CreateTaskReq.displayName = "proto.aggregator.CreateTaskReq"; + proto.aggregator.CreateTaskReq.displayName = 'proto.aggregator.CreateTaskReq'; } /** * Generated by JsPbCodeGenerator. @@ -561,7 +626,7 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.CreateTaskResp = function (opt_data) { +proto.aggregator.CreateTaskResp = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.aggregator.CreateTaskResp, jspb.Message); @@ -570,8 +635,7 @@ if (goog.DEBUG && !COMPILED) { * @public * @override */ - proto.aggregator.CreateTaskResp.displayName = - "proto.aggregator.CreateTaskResp"; + proto.aggregator.CreateTaskResp.displayName = 'proto.aggregator.CreateTaskResp'; } /** * Generated by JsPbCodeGenerator. @@ -583,7 +647,7 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.NonceRequest = function (opt_data) { +proto.aggregator.NonceRequest = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.aggregator.NonceRequest, jspb.Message); @@ -592,7 +656,7 @@ if (goog.DEBUG && !COMPILED) { * @public * @override */ - proto.aggregator.NonceRequest.displayName = "proto.aggregator.NonceRequest"; + proto.aggregator.NonceRequest.displayName = 'proto.aggregator.NonceRequest'; } /** * Generated by JsPbCodeGenerator. @@ -604,7 +668,7 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.NonceResp = function (opt_data) { +proto.aggregator.NonceResp = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.aggregator.NonceResp, jspb.Message); @@ -613,7 +677,7 @@ if (goog.DEBUG && !COMPILED) { * @public * @override */ - proto.aggregator.NonceResp.displayName = "proto.aggregator.NonceResp"; + proto.aggregator.NonceResp.displayName = 'proto.aggregator.NonceResp'; } /** * Generated by JsPbCodeGenerator. @@ -625,17 +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. @@ -647,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. @@ -668,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. @@ -689,23 +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. @@ -717,17 +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. @@ -739,7 +794,7 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.GetKeyReq = function (opt_data) { +proto.aggregator.GetKeyReq = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.aggregator.GetKeyReq, jspb.Message); @@ -748,7 +803,7 @@ if (goog.DEBUG && !COMPILED) { * @public * @override */ - proto.aggregator.GetKeyReq.displayName = "proto.aggregator.GetKeyReq"; + proto.aggregator.GetKeyReq.displayName = 'proto.aggregator.GetKeyReq'; } /** * Generated by JsPbCodeGenerator. @@ -760,7 +815,7 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.KeyResp = function (opt_data) { +proto.aggregator.KeyResp = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.aggregator.KeyResp, jspb.Message); @@ -769,7 +824,7 @@ if (goog.DEBUG && !COMPILED) { * @public * @override */ - proto.aggregator.KeyResp.displayName = "proto.aggregator.KeyResp"; + proto.aggregator.KeyResp.displayName = 'proto.aggregator.KeyResp'; } /** * Generated by JsPbCodeGenerator. @@ -781,15 +836,8 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.UpdateChecksReq = function (opt_data) { - jspb.Message.initialize( - this, - opt_data, - 0, - -1, - proto.aggregator.UpdateChecksReq.repeatedFields_, - null - ); +proto.aggregator.UpdateChecksReq = function(opt_data) { + jspb.Message.initialize(this, opt_data, 0, -1, proto.aggregator.UpdateChecksReq.repeatedFields_, null); }; goog.inherits(proto.aggregator.UpdateChecksReq, jspb.Message); if (goog.DEBUG && !COMPILED) { @@ -797,8 +845,7 @@ if (goog.DEBUG && !COMPILED) { * @public * @override */ - proto.aggregator.UpdateChecksReq.displayName = - "proto.aggregator.UpdateChecksReq"; + proto.aggregator.UpdateChecksReq.displayName = 'proto.aggregator.UpdateChecksReq'; } /** * Generated by JsPbCodeGenerator. @@ -810,7 +857,7 @@ if (goog.DEBUG && !COMPILED) { * @extends {jspb.Message} * @constructor */ -proto.aggregator.UpdateChecksResp = function (opt_data) { +proto.aggregator.UpdateChecksResp = function(opt_data) { jspb.Message.initialize(this, opt_data, 0, -1, null, null); }; goog.inherits(proto.aggregator.UpdateChecksResp, jspb.Message); @@ -819,185 +866,241 @@ if (goog.DEBUG && !COMPILED) { * @public * @override */ - proto.aggregator.UpdateChecksResp.displayName = - "proto.aggregator.UpdateChecksResp"; + proto.aggregator.UpdateChecksResp.displayName = 'proto.aggregator.UpdateChecksResp'; } - -if (jspb.Message.GENERATE_TO_OBJECT) { +/** + * 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) { /** - * 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} + * @public + * @override */ - proto.aggregator.UUID.prototype.toObject = function (opt_includeInstance) { - return proto.aggregator.UUID.toObject(opt_includeInstance, this); - }; - + 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) { /** - * 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.UUID} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages + * @public + * @override */ - proto.aggregator.UUID.toObject = function (includeInstance, msg) { - var f, - obj = { - bytes: jspb.Message.getFieldWithDefault(msg, 1, ""), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + proto.aggregator.CreateWalletResp.displayName = 'proto.aggregator.CreateWalletResp'; +} + + + +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.IdReq.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.IdReq.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.IdReq} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.IdReq.toObject = function(includeInstance, msg) { + var f, obj = { + id: 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.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; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setBytes(value); - break; - default: - reader.skipField(); - break; + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + default: + reader.skipField(); + break; } } return msg; }; + /** * 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(); }; + /** * 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, f); + writer.writeString( + 1, + f + ); } }; + /** - * 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); }; + + + + 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.Checkin.prototype.toObject = function (opt_includeInstance) { - return proto.aggregator.Checkin.toObject(opt_includeInstance, 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.Checkin.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.Checkin.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.Checkin} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.aggregator.Checkin.toObject = function (includeInstance, msg) { - var f, - obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, ""), - address: jspb.Message.getFieldWithDefault(msg, 2, ""), - signature: jspb.Message.getFieldWithDefault(msg, 3, ""), - status: - (f = msg.getStatus()) && - proto.aggregator.Checkin.Status.toObject(includeInstance, f), - version: jspb.Message.getFieldWithDefault(msg, 5, ""), - metricsport: jspb.Message.getFieldWithDefault(msg, 6, 0), - remoteip: jspb.Message.getFieldWithDefault(msg, 7, ""), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + +/** + * 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.Checkin} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.Checkin.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + address: jspb.Message.getFieldWithDefault(msg, 2, ""), + signature: jspb.Message.getFieldWithDefault(msg, 3, ""), + status: (f = msg.getStatus()) && proto.aggregator.Checkin.Status.toObject(includeInstance, f), + version: jspb.Message.getFieldWithDefault(msg, 5, ""), + metricsport: jspb.Message.getFieldWithDefault(msg, 6, 0), + remoteip: jspb.Message.getFieldWithDefault(msg, 7, "") }; + + 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.Checkin} */ -proto.aggregator.Checkin.deserializeBinary = function (bytes) { +proto.aggregator.Checkin.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.Checkin(); + var msg = new proto.aggregator.Checkin; return proto.aggregator.Checkin.deserializeBinaryFromReader(msg, reader); }; + /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. @@ -1005,63 +1108,62 @@ proto.aggregator.Checkin.deserializeBinary = function (bytes) { * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.aggregator.Checkin} */ -proto.aggregator.Checkin.deserializeBinaryFromReader = function (msg, reader) { +proto.aggregator.Checkin.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.setAddress(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setSignature(value); - break; - case 4: - var value = new proto.aggregator.Checkin.Status(); - reader.readMessage( - value, - proto.aggregator.Checkin.Status.deserializeBinaryFromReader - ); - msg.setStatus(value); - break; - case 5: - var value = /** @type {string} */ (reader.readString()); - msg.setVersion(value); - break; - case 6: - var value = /** @type {number} */ (reader.readInt32()); - msg.setMetricsport(value); - break; - case 7: - var value = /** @type {string} */ (reader.readString()); - msg.setRemoteip(value); - break; - default: - reader.skipField(); - break; + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setAddress(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setSignature(value); + break; + case 4: + var value = new proto.aggregator.Checkin.Status; + reader.readMessage(value,proto.aggregator.Checkin.Status.deserializeBinaryFromReader); + msg.setStatus(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setVersion(value); + break; + case 6: + var value = /** @type {number} */ (reader.readInt32()); + msg.setMetricsport(value); + break; + case 7: + var value = /** @type {string} */ (reader.readString()); + msg.setRemoteip(value); + break; + default: + reader.skipField(); + break; } } return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.Checkin.prototype.serializeBinary = function () { +proto.aggregator.Checkin.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.aggregator.Checkin.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; + /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. @@ -1069,19 +1171,28 @@ proto.aggregator.Checkin.prototype.serializeBinary = function () { * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.Checkin.serializeBinaryToWriter = function (message, writer) { +proto.aggregator.Checkin.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getId(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } f = message.getAddress(); if (f.length > 0) { - writer.writeString(2, f); + writer.writeString( + 2, + f + ); } f = message.getSignature(); if (f.length > 0) { - writer.writeString(3, f); + writer.writeString( + 3, + f + ); } f = message.getStatus(); if (f != null) { @@ -1093,77 +1204,85 @@ proto.aggregator.Checkin.serializeBinaryToWriter = function (message, writer) { } f = message.getVersion(); if (f.length > 0) { - writer.writeString(5, f); + writer.writeString( + 5, + f + ); } f = message.getMetricsport(); if (f !== 0) { - writer.writeInt32(6, f); + writer.writeInt32( + 6, + f + ); } f = message.getRemoteip(); if (f.length > 0) { - writer.writeString(7, f); + writer.writeString( + 7, + f + ); } }; + + + + 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.Checkin.Status.prototype.toObject = function ( - opt_includeInstance - ) { - return proto.aggregator.Checkin.Status.toObject(opt_includeInstance, 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.Checkin.Status.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.Checkin.Status.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.Checkin.Status} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.aggregator.Checkin.Status.toObject = function (includeInstance, msg) { - var f, - obj = { - uptime: jspb.Message.getFieldWithDefault(msg, 1, 0), - queuedepth: jspb.Message.getFieldWithDefault(msg, 2, 0), - lastHeartbeat: - (f = msg.getLastHeartbeat()) && - google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + +/** + * 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.Checkin.Status} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.Checkin.Status.toObject = function(includeInstance, msg) { + var f, obj = { + uptime: jspb.Message.getFieldWithDefault(msg, 1, 0), + queuedepth: jspb.Message.getFieldWithDefault(msg, 2, 0), + lastHeartbeat: (f = msg.getLastHeartbeat()) && google_protobuf_timestamp_pb.Timestamp.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.Checkin.Status} */ -proto.aggregator.Checkin.Status.deserializeBinary = function (bytes) { +proto.aggregator.Checkin.Status.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.Checkin.Status(); - return proto.aggregator.Checkin.Status.deserializeBinaryFromReader( - msg, - reader - ); + var msg = new proto.aggregator.Checkin.Status; + return proto.aggregator.Checkin.Status.deserializeBinaryFromReader(msg, reader); }; + /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. @@ -1171,50 +1290,46 @@ proto.aggregator.Checkin.Status.deserializeBinary = function (bytes) { * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.aggregator.Checkin.Status} */ -proto.aggregator.Checkin.Status.deserializeBinaryFromReader = function ( - msg, - reader -) { +proto.aggregator.Checkin.Status.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.setUptime(value); - break; - case 2: - var value = /** @type {number} */ (reader.readInt64()); - msg.setQueuedepth(value); - break; - case 3: - var value = new google_protobuf_timestamp_pb.Timestamp(); - reader.readMessage( - value, - google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader - ); - msg.setLastHeartbeat(value); - break; - default: - reader.skipField(); - break; + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setUptime(value); + break; + case 2: + var value = /** @type {number} */ (reader.readInt64()); + msg.setQueuedepth(value); + break; + case 3: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setLastHeartbeat(value); + break; + default: + reader.skipField(); + break; } } return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.Checkin.Status.prototype.serializeBinary = function () { +proto.aggregator.Checkin.Status.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.aggregator.Checkin.Status.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; + /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. @@ -1222,18 +1337,21 @@ proto.aggregator.Checkin.Status.prototype.serializeBinary = function () { * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.Checkin.Status.serializeBinaryToWriter = function ( - message, - writer -) { +proto.aggregator.Checkin.Status.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getUptime(); if (f !== 0) { - writer.writeInt64(1, f); + writer.writeInt64( + 1, + f + ); } f = message.getQueuedepth(); if (f !== 0) { - writer.writeInt64(2, f); + writer.writeInt64( + 2, + f + ); } f = message.getLastHeartbeat(); if (f != null) { @@ -1245,260 +1363,280 @@ proto.aggregator.Checkin.Status.serializeBinaryToWriter = function ( } }; + /** * optional int64 uptime = 1; * @return {number} */ -proto.aggregator.Checkin.Status.prototype.getUptime = function () { +proto.aggregator.Checkin.Status.prototype.getUptime = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; + /** * @param {number} value * @return {!proto.aggregator.Checkin.Status} returns this */ -proto.aggregator.Checkin.Status.prototype.setUptime = function (value) { +proto.aggregator.Checkin.Status.prototype.setUptime = function(value) { return jspb.Message.setProto3IntField(this, 1, value); }; + /** * optional int64 queueDepth = 2; * @return {number} */ -proto.aggregator.Checkin.Status.prototype.getQueuedepth = function () { +proto.aggregator.Checkin.Status.prototype.getQueuedepth = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); }; + /** * @param {number} value * @return {!proto.aggregator.Checkin.Status} returns this */ -proto.aggregator.Checkin.Status.prototype.setQueuedepth = function (value) { +proto.aggregator.Checkin.Status.prototype.setQueuedepth = function(value) { return jspb.Message.setProto3IntField(this, 2, value); }; + /** * optional google.protobuf.Timestamp last_heartbeat = 3; * @return {?proto.google.protobuf.Timestamp} */ -proto.aggregator.Checkin.Status.prototype.getLastHeartbeat = function () { +proto.aggregator.Checkin.Status.prototype.getLastHeartbeat = function() { return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField( - this, - google_protobuf_timestamp_pb.Timestamp, - 3 - ) - ); + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 3)); }; + /** * @param {?proto.google.protobuf.Timestamp|undefined} value * @return {!proto.aggregator.Checkin.Status} returns this - */ -proto.aggregator.Checkin.Status.prototype.setLastHeartbeat = function (value) { +*/ +proto.aggregator.Checkin.Status.prototype.setLastHeartbeat = function(value) { return jspb.Message.setWrapperField(this, 3, value); }; + /** * Clears the message field making it undefined. * @return {!proto.aggregator.Checkin.Status} returns this */ -proto.aggregator.Checkin.Status.prototype.clearLastHeartbeat = function () { +proto.aggregator.Checkin.Status.prototype.clearLastHeartbeat = function() { return this.setLastHeartbeat(undefined); }; + /** * Returns whether this field is set. * @return {boolean} */ -proto.aggregator.Checkin.Status.prototype.hasLastHeartbeat = function () { +proto.aggregator.Checkin.Status.prototype.hasLastHeartbeat = function() { return jspb.Message.getField(this, 3) != null; }; + /** * optional string id = 1; * @return {string} */ -proto.aggregator.Checkin.prototype.getId = function () { +proto.aggregator.Checkin.prototype.getId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; + /** * @param {string} value * @return {!proto.aggregator.Checkin} returns this */ -proto.aggregator.Checkin.prototype.setId = function (value) { +proto.aggregator.Checkin.prototype.setId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; + /** * optional string address = 2; * @return {string} */ -proto.aggregator.Checkin.prototype.getAddress = function () { +proto.aggregator.Checkin.prototype.getAddress = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; + /** * @param {string} value * @return {!proto.aggregator.Checkin} returns this */ -proto.aggregator.Checkin.prototype.setAddress = function (value) { +proto.aggregator.Checkin.prototype.setAddress = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; + /** * optional string signature = 3; * @return {string} */ -proto.aggregator.Checkin.prototype.getSignature = function () { +proto.aggregator.Checkin.prototype.getSignature = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; + /** * @param {string} value * @return {!proto.aggregator.Checkin} returns this */ -proto.aggregator.Checkin.prototype.setSignature = function (value) { +proto.aggregator.Checkin.prototype.setSignature = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; + /** * optional Status status = 4; * @return {?proto.aggregator.Checkin.Status} */ -proto.aggregator.Checkin.prototype.getStatus = function () { +proto.aggregator.Checkin.prototype.getStatus = function() { return /** @type{?proto.aggregator.Checkin.Status} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.Checkin.Status, 4) - ); + jspb.Message.getWrapperField(this, proto.aggregator.Checkin.Status, 4)); }; + /** * @param {?proto.aggregator.Checkin.Status|undefined} value * @return {!proto.aggregator.Checkin} returns this - */ -proto.aggregator.Checkin.prototype.setStatus = function (value) { +*/ +proto.aggregator.Checkin.prototype.setStatus = function(value) { return jspb.Message.setWrapperField(this, 4, value); }; + /** * Clears the message field making it undefined. * @return {!proto.aggregator.Checkin} returns this */ -proto.aggregator.Checkin.prototype.clearStatus = function () { +proto.aggregator.Checkin.prototype.clearStatus = function() { return this.setStatus(undefined); }; + /** * Returns whether this field is set. * @return {boolean} */ -proto.aggregator.Checkin.prototype.hasStatus = function () { +proto.aggregator.Checkin.prototype.hasStatus = function() { return jspb.Message.getField(this, 4) != null; }; + /** * optional string version = 5; * @return {string} */ -proto.aggregator.Checkin.prototype.getVersion = function () { +proto.aggregator.Checkin.prototype.getVersion = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); }; + /** * @param {string} value * @return {!proto.aggregator.Checkin} returns this */ -proto.aggregator.Checkin.prototype.setVersion = function (value) { +proto.aggregator.Checkin.prototype.setVersion = function(value) { return jspb.Message.setProto3StringField(this, 5, value); }; + /** * optional int32 metricsPort = 6; * @return {number} */ -proto.aggregator.Checkin.prototype.getMetricsport = function () { +proto.aggregator.Checkin.prototype.getMetricsport = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); }; + /** * @param {number} value * @return {!proto.aggregator.Checkin} returns this */ -proto.aggregator.Checkin.prototype.setMetricsport = function (value) { +proto.aggregator.Checkin.prototype.setMetricsport = function(value) { return jspb.Message.setProto3IntField(this, 6, value); }; + /** * optional string remoteIP = 7; * @return {string} */ -proto.aggregator.Checkin.prototype.getRemoteip = function () { +proto.aggregator.Checkin.prototype.getRemoteip = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 7, "")); }; + /** * @param {string} value * @return {!proto.aggregator.Checkin} returns this */ -proto.aggregator.Checkin.prototype.setRemoteip = function (value) { +proto.aggregator.Checkin.prototype.setRemoteip = function(value) { return jspb.Message.setProto3StringField(this, 7, 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.CheckinResp.prototype.toObject = function ( - opt_includeInstance - ) { - return proto.aggregator.CheckinResp.toObject(opt_includeInstance, 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.CheckinResp.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.CheckinResp.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.CheckinResp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.aggregator.CheckinResp.toObject = function (includeInstance, msg) { - var f, - obj = { - updatedAt: - (f = msg.getUpdatedAt()) && - google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + +/** + * 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.CheckinResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.CheckinResp.toObject = function(includeInstance, msg) { + var f, obj = { + updatedAt: (f = msg.getUpdatedAt()) && google_protobuf_timestamp_pb.Timestamp.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.CheckinResp} */ -proto.aggregator.CheckinResp.deserializeBinary = function (bytes) { +proto.aggregator.CheckinResp.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.CheckinResp(); + var msg = new proto.aggregator.CheckinResp; return proto.aggregator.CheckinResp.deserializeBinaryFromReader(msg, reader); }; + /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. @@ -1506,42 +1644,38 @@ proto.aggregator.CheckinResp.deserializeBinary = function (bytes) { * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.aggregator.CheckinResp} */ -proto.aggregator.CheckinResp.deserializeBinaryFromReader = function ( - msg, - reader -) { +proto.aggregator.CheckinResp.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } 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); - break; - default: - reader.skipField(); - break; + case 1: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setUpdatedAt(value); + break; + default: + reader.skipField(); + break; } } return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.CheckinResp.prototype.serializeBinary = function () { +proto.aggregator.CheckinResp.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.aggregator.CheckinResp.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; + /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. @@ -1549,10 +1683,7 @@ proto.aggregator.CheckinResp.prototype.serializeBinary = function () { * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.CheckinResp.serializeBinaryToWriter = function ( - message, - writer -) { +proto.aggregator.CheckinResp.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getUpdatedAt(); if (f != null) { @@ -1564,99 +1695,102 @@ proto.aggregator.CheckinResp.serializeBinaryToWriter = function ( } }; + /** * optional google.protobuf.Timestamp updated_at = 1; * @return {?proto.google.protobuf.Timestamp} */ -proto.aggregator.CheckinResp.prototype.getUpdatedAt = function () { +proto.aggregator.CheckinResp.prototype.getUpdatedAt = function() { return /** @type{?proto.google.protobuf.Timestamp} */ ( - jspb.Message.getWrapperField( - this, - google_protobuf_timestamp_pb.Timestamp, - 1 - ) - ); + jspb.Message.getWrapperField(this, google_protobuf_timestamp_pb.Timestamp, 1)); }; + /** * @param {?proto.google.protobuf.Timestamp|undefined} value * @return {!proto.aggregator.CheckinResp} returns this - */ -proto.aggregator.CheckinResp.prototype.setUpdatedAt = function (value) { +*/ +proto.aggregator.CheckinResp.prototype.setUpdatedAt = function(value) { return jspb.Message.setWrapperField(this, 1, value); }; + /** * Clears the message field making it undefined. * @return {!proto.aggregator.CheckinResp} returns this */ -proto.aggregator.CheckinResp.prototype.clearUpdatedAt = function () { +proto.aggregator.CheckinResp.prototype.clearUpdatedAt = function() { return this.setUpdatedAt(undefined); }; + /** * Returns whether this field is set. * @return {boolean} */ -proto.aggregator.CheckinResp.prototype.hasUpdatedAt = function () { +proto.aggregator.CheckinResp.prototype.hasUpdatedAt = function() { return jspb.Message.getField(this, 1) != 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.SyncTasksReq.prototype.toObject = function ( - opt_includeInstance - ) { - return proto.aggregator.SyncTasksReq.toObject(opt_includeInstance, 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.SyncTasksReq.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.SyncTasksReq.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.SyncTasksReq} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.aggregator.SyncTasksReq.toObject = function (includeInstance, msg) { - var f, - obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, ""), - address: jspb.Message.getFieldWithDefault(msg, 2, ""), - signature: jspb.Message.getFieldWithDefault(msg, 3, ""), - monotonicClock: jspb.Message.getFieldWithDefault(msg, 4, 0), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + +/** + * 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.SyncTasksReq} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.SyncTasksReq.toObject = function(includeInstance, msg) { + var f, obj = { + id: jspb.Message.getFieldWithDefault(msg, 1, ""), + address: jspb.Message.getFieldWithDefault(msg, 2, ""), + signature: jspb.Message.getFieldWithDefault(msg, 3, ""), + monotonicClock: jspb.Message.getFieldWithDefault(msg, 4, 0) }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; } + /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. * @return {!proto.aggregator.SyncTasksReq} */ -proto.aggregator.SyncTasksReq.deserializeBinary = function (bytes) { +proto.aggregator.SyncTasksReq.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.SyncTasksReq(); + var msg = new proto.aggregator.SyncTasksReq; return proto.aggregator.SyncTasksReq.deserializeBinaryFromReader(msg, reader); }; + /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. @@ -1664,50 +1798,49 @@ proto.aggregator.SyncTasksReq.deserializeBinary = function (bytes) { * @param {!jspb.BinaryReader} reader The BinaryReader to use. * @return {!proto.aggregator.SyncTasksReq} */ -proto.aggregator.SyncTasksReq.deserializeBinaryFromReader = function ( - msg, - reader -) { +proto.aggregator.SyncTasksReq.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.setAddress(value); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setSignature(value); - break; - case 4: - var value = /** @type {number} */ (reader.readInt64()); - msg.setMonotonicClock(value); - break; - default: - reader.skipField(); - break; + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setAddress(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setSignature(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setMonotonicClock(value); + break; + default: + reader.skipField(); + break; } } return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.SyncTasksReq.prototype.serializeBinary = function () { +proto.aggregator.SyncTasksReq.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); proto.aggregator.SyncTasksReq.serializeBinaryToWriter(this, writer); return writer.getResultBuffer(); }; + /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. @@ -1715,5757 +1848,7305 @@ proto.aggregator.SyncTasksReq.prototype.serializeBinary = function () { * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.SyncTasksReq.serializeBinaryToWriter = function ( - message, - writer -) { +proto.aggregator.SyncTasksReq.serializeBinaryToWriter = function(message, writer) { var f = undefined; f = message.getId(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } f = message.getAddress(); if (f.length > 0) { - writer.writeString(2, f); + writer.writeString( + 2, + f + ); } f = message.getSignature(); if (f.length > 0) { - writer.writeString(3, f); + writer.writeString( + 3, + f + ); } f = message.getMonotonicClock(); if (f !== 0) { - writer.writeInt64(4, f); + writer.writeInt64( + 4, + f + ); } }; + /** * optional string id = 1; * @return {string} */ -proto.aggregator.SyncTasksReq.prototype.getId = function () { +proto.aggregator.SyncTasksReq.prototype.getId = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; + /** * @param {string} value * @return {!proto.aggregator.SyncTasksReq} returns this */ -proto.aggregator.SyncTasksReq.prototype.setId = function (value) { +proto.aggregator.SyncTasksReq.prototype.setId = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; + /** * optional string address = 2; * @return {string} */ -proto.aggregator.SyncTasksReq.prototype.getAddress = function () { +proto.aggregator.SyncTasksReq.prototype.getAddress = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; + /** * @param {string} value * @return {!proto.aggregator.SyncTasksReq} returns this */ -proto.aggregator.SyncTasksReq.prototype.setAddress = function (value) { +proto.aggregator.SyncTasksReq.prototype.setAddress = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; + /** * optional string signature = 3; * @return {string} */ -proto.aggregator.SyncTasksReq.prototype.getSignature = function () { +proto.aggregator.SyncTasksReq.prototype.getSignature = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; + /** * @param {string} value * @return {!proto.aggregator.SyncTasksReq} returns this */ -proto.aggregator.SyncTasksReq.prototype.setSignature = function (value) { +proto.aggregator.SyncTasksReq.prototype.setSignature = function(value) { return jspb.Message.setProto3StringField(this, 3, value); }; + /** * optional int64 monotonic_clock = 4; * @return {number} */ -proto.aggregator.SyncTasksReq.prototype.getMonotonicClock = function () { +proto.aggregator.SyncTasksReq.prototype.getMonotonicClock = function() { return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); }; + /** * @param {number} value * @return {!proto.aggregator.SyncTasksReq} returns this */ -proto.aggregator.SyncTasksReq.prototype.setMonotonicClock = function (value) { +proto.aggregator.SyncTasksReq.prototype.setMonotonicClock = function(value) { return jspb.Message.setProto3IntField(this, 4, value); }; + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.aggregator.FixedEpochCondition.repeatedFields_ = [1]; + + + if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.aggregator.TaskTrigger.prototype.toObject = function ( - opt_includeInstance - ) { - return proto.aggregator.TaskTrigger.toObject(opt_includeInstance, this); - }; +/** + * 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.FixedEpochCondition.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.FixedEpochCondition.toObject(opt_includeInstance, this); +}; - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.aggregator.TaskTrigger} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.aggregator.TaskTrigger.toObject = function (includeInstance, msg) { - var f, - obj = { - triggerType: jspb.Message.getFieldWithDefault(msg, 1, 0), - 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), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + +/** + * 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.FixedEpochCondition} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.FixedEpochCondition.toObject = function(includeInstance, msg) { + var f, obj = { + epochsList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; } + /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.TaskTrigger} + * @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; } 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); - break; - default: - reader.skipField(); - break; + case 1: + 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(); + break; } } return msg; }; + /** * 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(); }; + /** * 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(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 + f = message.getEpochsList(); + if (f.length > 0) { + writer.writePackedInt64( + 1, + f ); } }; -/** - * optional TriggerType trigger_type = 1; - * @return {!proto.aggregator.TriggerType} - */ -proto.aggregator.TaskTrigger.prototype.getTriggerType = function () { - return /** @type {!proto.aggregator.TriggerType} */ ( - jspb.Message.getFieldWithDefault(this, 1, 0) - ); -}; /** - * @param {!proto.aggregator.TriggerType} value - * @return {!proto.aggregator.TaskTrigger} returns this + * repeated int64 epochs = 1; + * @return {!Array} */ -proto.aggregator.TaskTrigger.prototype.setTriggerType = function (value) { - return jspb.Message.setProto3EnumField(this, 1, value); +proto.aggregator.FixedEpochCondition.prototype.getEpochsList = function() { + return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 1)); }; -/** - * optional TimeCondition schedule = 2; - * @return {?proto.aggregator.TimeCondition} - */ -proto.aggregator.TaskTrigger.prototype.getSchedule = function () { - return /** @type{?proto.aggregator.TimeCondition} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.TimeCondition, 2) - ); -}; /** - * @param {?proto.aggregator.TimeCondition|undefined} value - * @return {!proto.aggregator.TaskTrigger} returns this + * @param {!Array} value + * @return {!proto.aggregator.FixedEpochCondition} returns this */ -proto.aggregator.TaskTrigger.prototype.setSchedule = function (value) { - return jspb.Message.setWrapperField(this, 2, value); +proto.aggregator.FixedEpochCondition.prototype.setEpochsList = function(value) { + return jspb.Message.setField(this, 1, value || []); }; -/** - * Clears the message field making it undefined. - * @return {!proto.aggregator.TaskTrigger} returns this - */ -proto.aggregator.TaskTrigger.prototype.clearSchedule = function () { - return this.setSchedule(undefined); -}; /** - * Returns whether this field is set. - * @return {boolean} + * @param {number} value + * @param {number=} opt_index + * @return {!proto.aggregator.FixedEpochCondition} returns this */ -proto.aggregator.TaskTrigger.prototype.hasSchedule = function () { - return jspb.Message.getField(this, 2) != null; +proto.aggregator.FixedEpochCondition.prototype.addEpochs = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 1, value, opt_index); }; -/** - * optional ContractQueryCondition contract_query = 3; - * @return {?proto.aggregator.ContractQueryCondition} - */ -proto.aggregator.TaskTrigger.prototype.getContractQuery = function () { - return /** @type{?proto.aggregator.ContractQueryCondition} */ ( - jspb.Message.getWrapperField( - this, - proto.aggregator.ContractQueryCondition, - 3 - ) - ); -}; /** - * @param {?proto.aggregator.ContractQueryCondition|undefined} value - * @return {!proto.aggregator.TaskTrigger} returns this + * Clears the list making it empty but non-null. + * @return {!proto.aggregator.FixedEpochCondition} returns this */ -proto.aggregator.TaskTrigger.prototype.setContractQuery = function (value) { - return jspb.Message.setWrapperField(this, 3, value); +proto.aggregator.FixedEpochCondition.prototype.clearEpochsList = function() { + return this.setEpochsList([]); }; -/** - * Clears the message field making it undefined. - * @return {!proto.aggregator.TaskTrigger} returns this - */ -proto.aggregator.TaskTrigger.prototype.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} + * List of repeated fields within this message type. + * @private {!Array} + * @const */ -proto.aggregator.TaskTrigger.prototype.getExpression = function () { - return /** @type{?proto.aggregator.ExpressionCondition} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.ExpressionCondition, 4) - ); -}; +proto.aggregator.CronCondition.repeatedFields_ = [1]; -/** - * @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); -}; +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.hasExpression = function () { - return jspb.Message.getField(this, 4) != null; +proto.aggregator.CronCondition.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.CronCondition.toObject(opt_includeInstance, this); }; + /** - * List of repeated fields within this message type. - * @private {!Array} - * @const + * 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.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); +proto.aggregator.CronCondition.toObject = function(includeInstance, msg) { + var f, obj = { + scheduleList: (f = jspb.Message.getRepeatedField(msg, 1)) == null ? undefined : f }; - /** - * 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; - }; + 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; } 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); - break; - default: - reader.skipField(); - break; + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.addSchedule(value); + break; + default: + reader.skipField(); + break; } } return msg; }; + /** * 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(); }; + /** * 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(); - if (f.length > 0) { - writer.writePackedInt64(1, f); - } - f = message.getCron(); + f = message.getScheduleList(); if (f.length > 0) { - writer.writeString(2, f); + writer.writeRepeatedString( + 1, + 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 + * @return {!proto.aggregator.CronCondition} returns this */ -proto.aggregator.TimeCondition.prototype.clearFixedList = function () { - return this.setFixedList([]); +proto.aggregator.CronCondition.prototype.clearScheduleList = function() { + return this.setScheduleList([]); }; + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * optional string cron = 2; - * @return {string} + * 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.getCron = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.aggregator.BlockCondition.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.BlockCondition.toObject(opt_includeInstance, this); }; + /** - * @param {string} value - * @return {!proto.aggregator.TimeCondition} 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.BlockCondition} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.TimeCondition.prototype.setCron = 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.ContractQueryCondition.prototype.toObject = function ( - opt_includeInstance - ) { - return proto.aggregator.ContractQueryCondition.toObject( - opt_includeInstance, - this - ); +proto.aggregator.BlockCondition.toObject = function(includeInstance, msg) { + var f, obj = { + interval: jspb.Message.getFieldWithDefault(msg, 1, 0) }; - /** - * 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.ContractQueryCondition} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.aggregator.ContractQueryCondition.toObject = function ( - includeInstance, - msg - ) { - var f, - obj = { - contractAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), - callmsg: jspb.Message.getFieldWithDefault(msg, 2, ""), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; + 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.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; } 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); - break; - default: - reader.skipField(); - break; + case 1: + var value = /** @type {number} */ (reader.readInt64()); + msg.setInterval(value); + break; + default: + reader.skipField(); + break; } } return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.ContractQueryCondition.prototype.serializeBinary = - function () { - var writer = new jspb.BinaryWriter(); - proto.aggregator.ContractQueryCondition.serializeBinaryToWriter( - this, - writer - ); - return writer.getResultBuffer(); - }; +proto.aggregator.BlockCondition.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.BlockCondition.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); +}; + /** * Serializes the given message to binary data (in protobuf wire * format), writing to the given BinaryWriter. - * @param {!proto.aggregator.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(1, f); - } - f = message.getCallmsg(); - if (f.length > 0) { - writer.writeString(2, f); + f = message.getInterval(); + if (f !== 0) { + writer.writeInt64( + 1, + 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 + * optional int64 interval = 1; + * @return {number} */ -proto.aggregator.ContractQueryCondition.prototype.setContractAddress = - function (value) { - return jspb.Message.setProto3StringField(this, 1, value); - }; +proto.aggregator.BlockCondition.prototype.getInterval = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); +}; + /** - * optional string callmsg = 2; - * @return {string} + * @param {number} value + * @return {!proto.aggregator.BlockCondition} returns this */ -proto.aggregator.ContractQueryCondition.prototype.getCallmsg = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.aggregator.BlockCondition.prototype.setInterval = function(value) { + return jspb.Message.setProto3IntField(this, 1, value); }; + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * @param {string} value - * @return {!proto.aggregator.ContractQueryCondition} 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.ContractQueryCondition.prototype.setCallmsg = function ( - value -) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.aggregator.EventCondition.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.EventCondition.toObject(opt_includeInstance, this); }; -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.ExpressionCondition.prototype.toObject = function ( - opt_includeInstance - ) { - return proto.aggregator.ExpressionCondition.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.ExpressionCondition} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.aggregator.ExpressionCondition.toObject = function ( - includeInstance, - msg - ) { - var f, - obj = { - expression: jspb.Message.getFieldWithDefault(msg, 1, ""), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.aggregator.EventCondition} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.EventCondition.toObject = function(includeInstance, msg) { + var f, obj = { + expression: jspb.Message.getFieldWithDefault(msg, 1, "") }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; } + /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.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; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setExpression(value); - break; - default: - reader.skipField(); - break; + 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.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(); }; + /** * 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) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } }; + /** * 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) { - /** - * 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.SyncTasksResp.prototype.toObject = function ( - opt_includeInstance - ) { - return proto.aggregator.SyncTasksResp.toObject(opt_includeInstance, 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.TaskTrigger.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.TaskTrigger.toObject(opt_includeInstance, this); +}; - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.aggregator.SyncTasksResp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.aggregator.SyncTasksResp.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), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.aggregator.TaskTrigger} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.TaskTrigger.toObject = function(includeInstance, msg) { + var f, obj = { + 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) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; } + /** * 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; } 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.setChecktype(value); - break; - case 3: - var value = new proto.aggregator.TaskTrigger(); - reader.readMessage( - value, - proto.aggregator.TaskTrigger.deserializeBinaryFromReader - ); - msg.setTrigger(value); - break; - default: - reader.skipField(); - break; + case 1: + var value = /** @type {boolean} */ (reader.readBool()); + msg.setManual(value); + break; + case 2: + var value = new proto.aggregator.FixedEpochCondition; + reader.readMessage(value,proto.aggregator.FixedEpochCondition.deserializeBinaryFromReader); + msg.setFixedTime(value); + break; + case 3: + var value = new proto.aggregator.CronCondition; + reader.readMessage(value,proto.aggregator.CronCondition.deserializeBinaryFromReader); + msg.setCron(value); + break; + case 4: + var value = new proto.aggregator.BlockCondition; + reader.readMessage(value,proto.aggregator.BlockCondition.deserializeBinaryFromReader); + msg.setBlock(value); + break; + case 5: + var value = new proto.aggregator.EventCondition; + reader.readMessage(value,proto.aggregator.EventCondition.deserializeBinaryFromReader); + msg.setEvent(value); + break; + default: + reader.skipField(); + break; } } return msg; }; + /** * 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(); }; + /** * 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(1, f); + f = /** @type {boolean} */ (jspb.Message.getField(message, 1)); + if (f != null) { + writer.writeBool( + 1, + f + ); } - f = message.getChecktype(); - if (f.length > 0) { - writer.writeString(2, f); + f = message.getFixedTime(); + if (f != null) { + writer.writeMessage( + 2, + 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 - */ -proto.aggregator.SyncTasksResp.prototype.setTrigger = function (value) { - return jspb.Message.setWrapperField(this, 3, value); + * @param {?proto.aggregator.FixedEpochCondition|undefined} value + * @return {!proto.aggregator.TaskTrigger} returns this +*/ +proto.aggregator.TaskTrigger.prototype.setFixedTime = function(value) { + return jspb.Message.setOneofWrapperField(this, 2, proto.aggregator.TaskTrigger.oneofGroups_[0], value); }; + /** * Clears the message field making it undefined. - * @return {!proto.aggregator.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); }; + /** * 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; }; -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.ETHTransfer.prototype.toObject = function ( - opt_includeInstance - ) { - return proto.aggregator.ETHTransfer.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.ETHTransfer} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - 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; - }; -} /** - * Deserializes binary data (in protobuf wire format). - * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.ETHTransfer} + * optional CronCondition cron = 3; + * @return {?proto.aggregator.CronCondition} */ -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.getCron = function() { + return /** @type{?proto.aggregator.CronCondition} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.CronCondition, 3)); }; -/** - * 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; -}; /** - * Serializes the message to binary data (in protobuf wire format). - * @return {!Uint8Array} - */ -proto.aggregator.ETHTransfer.prototype.serializeBinary = function () { - var writer = new jspb.BinaryWriter(); - proto.aggregator.ETHTransfer.serializeBinaryToWriter(this, writer); - return writer.getResultBuffer(); + * @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); }; + /** - * 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 + * Clears the message field making it undefined. + * @return {!proto.aggregator.TaskTrigger} returns this */ -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.clearCron = function() { + return this.setCron(undefined); }; + /** - * optional string destination = 1; - * @return {string} + * Returns whether this field is set. + * @return {boolean} */ -proto.aggregator.ETHTransfer.prototype.getDestination = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +proto.aggregator.TaskTrigger.prototype.hasCron = function() { + return jspb.Message.getField(this, 3) != null; }; + /** - * @param {string} value - * @return {!proto.aggregator.ETHTransfer} returns this + * optional BlockCondition block = 4; + * @return {?proto.aggregator.BlockCondition} */ -proto.aggregator.ETHTransfer.prototype.setDestination = function (value) { - return jspb.Message.setProto3StringField(this, 1, value); +proto.aggregator.TaskTrigger.prototype.getBlock = function() { + return /** @type{?proto.aggregator.BlockCondition} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.BlockCondition, 4)); }; + /** - * optional string amount = 2; - * @return {string} + * @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); +}; + + +/** + * 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.clearBlock = function() { + return this.setBlock(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.hasBlock = function() { + return jspb.Message.getField(this, 4) != null; +}; + + +/** + * optional EventCondition event = 5; + * @return {?proto.aggregator.EventCondition} + */ +proto.aggregator.TaskTrigger.prototype.getEvent = function() { + return /** @type{?proto.aggregator.EventCondition} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.EventCondition, 5)); +}; + + +/** + * @param {?proto.aggregator.EventCondition|undefined} value + * @return {!proto.aggregator.TaskTrigger} returns this +*/ +proto.aggregator.TaskTrigger.prototype.setEvent = function(value) { + return jspb.Message.setOneofWrapperField(this, 5, proto.aggregator.TaskTrigger.oneofGroups_[0], value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.aggregator.TaskTrigger} returns this + */ +proto.aggregator.TaskTrigger.prototype.clearEvent = function() { + return this.setEvent(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.aggregator.TaskTrigger.prototype.hasEvent = function() { + return jspb.Message.getField(this, 5) != 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.ContractExecution.prototype.toObject = function ( - opt_includeInstance - ) { - return proto.aggregator.ContractExecution.toObject( - opt_includeInstance, - 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.SyncTasksResp.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.SyncTasksResp.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.ContractExecution} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.aggregator.ContractExecution.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, ""), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + +/** + * 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.SyncTasksResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.SyncTasksResp.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) }; + + 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.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; } 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.setCallData(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); - break; - default: - reader.skipField(); - break; + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setChecktype(value); + break; + case 3: + var value = new proto.aggregator.TaskTrigger; + reader.readMessage(value,proto.aggregator.TaskTrigger.deserializeBinaryFromReader); + msg.setTrigger(value); + break; + default: + reader.skipField(); + break; } } return msg; }; + /** * 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(); }; + /** * 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(); - if (f.length > 0) { - writer.writeString(1, f); - } - f = message.getCallData(); + f = message.getId(); if (f.length > 0) { - writer.writeString(2, f); + writer.writeString( + 1, + f + ); } - f = message.getMethod(); + f = message.getChecktype(); if (f.length > 0) { - writer.writeString(3, f); + writer.writeString( + 2, + f + ); } - f = message.getEncodedParams(); - if (f.length > 0) { - writer.writeString(4, f); + f = message.getTrigger(); + if (f != null) { + writer.writeMessage( + 3, + 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; }; + + + + 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.GraphQLDataQuery.prototype.toObject = function ( - opt_includeInstance - ) { - return proto.aggregator.GraphQLDataQuery.toObject( - opt_includeInstance, - 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.ETHTransferNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ETHTransferNode.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.GraphQLDataQuery} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.aggregator.GraphQLDataQuery.toObject = function (includeInstance, msg) { - var f, - obj = { - url: jspb.Message.getFieldWithDefault(msg, 1, ""), - query: jspb.Message.getFieldWithDefault(msg, 2, ""), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + +/** + * 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.ETHTransferNode} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.ETHTransferNode.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; +}; } + /** * 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; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setUrl(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setQuery(value); - break; - default: - reader.skipField(); - break; + 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; }; + /** * 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(); }; + /** * 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); + writer.writeString( + 1, + f + ); } - f = message.getQuery(); + f = message.getAmount(); if (f.length > 0) { - writer.writeString(2, f); + writer.writeString( + 2, + f + ); } }; + /** - * 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); }; + + + + 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.HTTPAPICall.prototype.toObject = function ( - opt_includeInstance - ) { - return proto.aggregator.HTTPAPICall.toObject(opt_includeInstance, 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.ContractWriteNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ContractWriteNode.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.HTTPAPICall} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.aggregator.HTTPAPICall.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, ""), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + +/** + * 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.ContractWriteNode} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.ContractWriteNode.toObject = function(includeInstance, msg) { + var f, obj = { + contractAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + callData: jspb.Message.getFieldWithDefault(msg, 2, ""), + contractAbi: jspb.Message.getFieldWithDefault(msg, 3, "") }; + + 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.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; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setUrl(value); - break; - case 2: - var value = msg.getHeadersMap(); - reader.readMessage(value, function (message, reader) { - jspb.Map.deserializeBinary( - message, - reader, - jspb.BinaryReader.prototype.readString, - jspb.BinaryReader.prototype.readString, - null, - "", - "" - ); - }); - break; - case 3: - var value = /** @type {string} */ (reader.readString()); - msg.setBody(value); - break; - default: - reader.skipField(); - break; + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setContractAddress(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setCallData(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setContractAbi(value); + break; + default: + reader.skipField(); + break; } } return msg; }; + /** * 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(); }; + /** * 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); + writer.writeString( + 1, + f + ); } - f = message.getHeadersMap(true); - if (f && f.getLength() > 0) { - f.serializeBinary( + f = message.getCallData(); + if (f.length > 0) { + writer.writeString( 2, - writer, - jspb.BinaryWriter.prototype.writeString, - jspb.BinaryWriter.prototype.writeString + f ); } - f = message.getBody(); + f = message.getContractAbi(); if (f.length > 0) { - writer.writeString(3, f); + writer.writeString( + 3, + f + ); } }; + /** - * 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); }; + + + + 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.CustomCode.prototype.toObject = function ( - opt_includeInstance - ) { - return proto.aggregator.CustomCode.toObject(opt_includeInstance, 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.ContractReadNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ContractReadNode.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.CustomCode} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.aggregator.CustomCode.toObject = function (includeInstance, msg) { - var f, - obj = { - type: jspb.Message.getFieldWithDefault(msg, 1, 0), - body: jspb.Message.getFieldWithDefault(msg, 2, ""), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + +/** + * 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.ContractReadNode} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.ContractReadNode.toObject = function(includeInstance, msg) { + var f, obj = { + contractAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), + callData: jspb.Message.getFieldWithDefault(msg, 2, ""), + contractAbi: jspb.Message.getFieldWithDefault(msg, 3, "") }; + + 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.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; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = /** @type {!proto.aggregator.CustomCodeType} */ ( - reader.readEnum() - ); - msg.setType(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setBody(value); - break; - default: - reader.skipField(); - break; - } + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setContractAddress(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setCallData(value); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setContractAbi(value); + break; + default: + reader.skipField(); + break; + } } return msg; }; + /** * 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(); }; + /** * 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(1, f); + 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(2, f); + 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); +}; + + + + + 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.ConditionJump.prototype.toObject = function ( - opt_includeInstance - ) { - return proto.aggregator.ConditionJump.toObject(opt_includeInstance, 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.GraphQLQueryNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.GraphQLQueryNode.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.ConditionJump} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.aggregator.ConditionJump.toObject = function (includeInstance, msg) { - var f, - obj = { - expression: jspb.Message.getFieldWithDefault(msg, 1, ""), - next: jspb.Message.getFieldWithDefault(msg, 2, ""), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.aggregator.GraphQLQueryNode} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.GraphQLQueryNode.toObject = function(includeInstance, msg) { + var f, obj = { + url: jspb.Message.getFieldWithDefault(msg, 1, ""), + query: jspb.Message.getFieldWithDefault(msg, 2, ""), + variablesMap: (f = msg.getVariablesMap()) ? f.toObject(includeInstance, undefined) : [] }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; } + /** * 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; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setExpression(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setNext(value); - break; - default: - reader.skipField(); - break; + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setUrl(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setQuery(value); + break; + case 3: + var value = msg.getVariablesMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; + default: + reader.skipField(); + break; } } return msg; }; + /** * 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(); }; + /** * 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); + writer.writeString( + 1, + f + ); } - f = message.getNext(); + f = message.getQuery(); if (f.length > 0) { - writer.writeString(2, f); + 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); }; + /** - * List of repeated fields within this message type. - * @private {!Array} - * @const + * map variables = 3; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} + */ +proto.aggregator.GraphQLQueryNode.prototype.getVariablesMap = function(opt_noLazyCreate) { + return /** @type {!jspb.Map} */ ( + jspb.Message.getMapField(this, 3, opt_noLazyCreate, + null)); +}; + + +/** + * Clears values from the map. The map will be non-null. + * @return {!proto.aggregator.GraphQLQueryNode} returns this */ -proto.aggregator.BranchAction.repeatedFields_ = [2]; +proto.aggregator.GraphQLQueryNode.prototype.clearVariablesMap = function() { + this.getVariablesMap().clear(); + return this;}; + + + + 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.BranchAction.prototype.toObject = function ( - opt_includeInstance - ) { - return proto.aggregator.BranchAction.toObject(opt_includeInstance, 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.RestAPINode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.RestAPINode.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.BranchAction} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.aggregator.BranchAction.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), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + +/** + * 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.RestAPINode} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.RestAPINode.toObject = function(includeInstance, msg) { + var f, obj = { + url: jspb.Message.getFieldWithDefault(msg, 1, ""), + headersMap: (f = msg.getHeadersMap()) ? f.toObject(includeInstance, undefined) : [], + body: jspb.Message.getFieldWithDefault(msg, 3, ""), + method: jspb.Message.getFieldWithDefault(msg, 4, "") }; + + 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.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; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = new proto.aggregator.ConditionJump(); - reader.readMessage( - value, - proto.aggregator.ConditionJump.deserializeBinaryFromReader - ); - msg.setIf(value); - break; - case 2: - var value = new proto.aggregator.ConditionJump(); - reader.readMessage( - value, - proto.aggregator.ConditionJump.deserializeBinaryFromReader - ); - msg.addElseifs(value); - break; - case 3: - var value = new proto.aggregator.ConditionJump(); - reader.readMessage( - value, - proto.aggregator.ConditionJump.deserializeBinaryFromReader - ); - msg.setElse(value); - break; - default: - reader.skipField(); - break; + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setUrl(value); + break; + case 2: + var value = msg.getHeadersMap(); + reader.readMessage(value, function(message, reader) { + jspb.Map.deserializeBinary(message, reader, jspb.BinaryReader.prototype.readString, jspb.BinaryReader.prototype.readString, null, "", ""); + }); + break; + case 3: + var value = /** @type {string} */ (reader.readString()); + msg.setBody(value); + break; + case 4: + var value = /** @type {string} */ (reader.readString()); + msg.setMethod(value); + break; + default: + reader.skipField(); + break; } } return msg; }; + /** * 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(); }; + /** * 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 + * optional string url = 1; + * @return {string} */ -proto.aggregator.BranchAction.prototype.setIf = function (value) { - return jspb.Message.setWrapperField(this, 1, value); +proto.aggregator.RestAPINode.prototype.getUrl = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; -/** - * Clears the message field making it undefined. - * @return {!proto.aggregator.BranchAction} returns this - */ -proto.aggregator.BranchAction.prototype.clearIf = function () { - return this.setIf(undefined); -}; /** - * 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} - */ -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 + * map headers = 2; + * @param {boolean=} opt_noLazyCreate Do not create the map if + * empty, instead returning `undefined` + * @return {!jspb.Map} */ -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) - ); +proto.aggregator.RestAPINode.prototype.setBody = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); }; + /** - * @param {?proto.aggregator.ConditionJump|undefined} value - * @return {!proto.aggregator.BranchAction} returns this + * optional string method = 4; + * @return {string} */ -proto.aggregator.BranchAction.prototype.setElse = function (value) { - return jspb.Message.setWrapperField(this, 3, value); +proto.aggregator.RestAPINode.prototype.getMethod = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 4, "")); }; + /** - * Clears the message field making it undefined. - * @return {!proto.aggregator.BranchAction} returns this + * @param {string} value + * @return {!proto.aggregator.RestAPINode} returns this */ -proto.aggregator.BranchAction.prototype.clearElse = function () { - return this.setElse(undefined); +proto.aggregator.RestAPINode.prototype.setMethod = function(value) { + return jspb.Message.setProto3StringField(this, 4, value); }; + + + + +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.BranchAction.prototype.hasElse = function () { - return jspb.Message.getField(this, 3) != null; +proto.aggregator.CustomCodeNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.CustomCodeNode.toObject(opt_includeInstance, this); }; + /** - * List of repeated fields within this message type. - * @private {!Array} - * @const + * 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.CustomCodeNode} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.TaskAction.repeatedFields_ = [4]; - -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.TaskAction.prototype.toObject = function ( - opt_includeInstance - ) { - return proto.aggregator.TaskAction.toObject(opt_includeInstance, this); +proto.aggregator.CustomCodeNode.toObject = function(includeInstance, msg) { + var f, obj = { + type: jspb.Message.getFieldWithDefault(msg, 1, 0), + source: jspb.Message.getFieldWithDefault(msg, 2, "") }; - /** - * 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.TaskAction} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.aggregator.TaskAction.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), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; + 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.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; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = /** @type {!proto.aggregator.TaskType} */ ( - reader.readEnum() - ); - msg.setTaskType(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); - 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(); - break; + case 1: + var value = /** @type {!proto.aggregator.CustomCodeType} */ (reader.readEnum()); + msg.setType(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSource(value); + break; + default: + reader.skipField(); + break; } } return msg; }; + /** * 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(); }; + /** * 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(); - if (f.length > 0) { - writer.writeString(2, f); - } - f = message.getName(); - if (f.length > 0) { - writer.writeString(3, f); - } - f = message.getNextList(); - if (f.length > 0) { - writer.writeRepeatedString(4, f); - } - f = message.getEthTransfer(); - if (f != null) { - writer.writeMessage( - 10, - f, - proto.aggregator.ETHTransfer.serializeBinaryToWriter + writer.writeEnum( + 1, + f ); } - 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.getSource(); + if (f.length > 0) { + writer.writeString( + 2, + f ); } }; + /** - * optional TaskType task_type = 1; - * @return {!proto.aggregator.TaskType} + * optional CustomCodeType type = 1; + * @return {!proto.aggregator.CustomCodeType} */ -proto.aggregator.TaskAction.prototype.getTaskType = function () { - return /** @type {!proto.aggregator.TaskType} */ ( - jspb.Message.getFieldWithDefault(this, 1, 0) - ); +proto.aggregator.CustomCodeNode.prototype.getType = function() { + return /** @type {!proto.aggregator.CustomCodeType} */ (jspb.Message.getFieldWithDefault(this, 1, 0)); }; + /** - * @param {!proto.aggregator.TaskType} value - * @return {!proto.aggregator.TaskAction} returns this + * @param {!proto.aggregator.CustomCodeType} value + * @return {!proto.aggregator.CustomCodeNode} returns this */ -proto.aggregator.TaskAction.prototype.setTaskType = function (value) { +proto.aggregator.CustomCodeNode.prototype.setType = function(value) { return jspb.Message.setProto3EnumField(this, 1, value); }; + /** - * optional string id = 2; + * optional string source = 2; * @return {string} */ -proto.aggregator.TaskAction.prototype.getId = function () { +proto.aggregator.CustomCodeNode.prototype.getSource = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; + /** * @param {string} value - * @return {!proto.aggregator.TaskAction} returns this + * @return {!proto.aggregator.CustomCodeNode} returns this */ -proto.aggregator.TaskAction.prototype.setId = function (value) { +proto.aggregator.CustomCodeNode.prototype.setSource = function(value) { return jspb.Message.setProto3StringField(this, 2, value); }; -/** - * optional string name = 3; - * @return {string} - */ -proto.aggregator.TaskAction.prototype.getName = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; -/** - * @param {string} value - * @return {!proto.aggregator.TaskAction} returns this - */ -proto.aggregator.TaskAction.prototype.setName = function (value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; -/** - * repeated string next = 4; - * @return {!Array} - */ -proto.aggregator.TaskAction.prototype.getNextList = function () { - return /** @type {!Array} */ (jspb.Message.getRepeatedField(this, 4)); -}; -/** - * @param {!Array} value - * @return {!proto.aggregator.TaskAction} returns this - */ -proto.aggregator.TaskAction.prototype.setNextList = function (value) { - return jspb.Message.setField(this, 4, value || []); -}; +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * @param {string} value - * @param {number=} opt_index - * @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.addNext = function (value, opt_index) { - return jspb.Message.addToRepeatedField(this, 4, value, opt_index); +proto.aggregator.Condition.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.Condition.toObject(opt_includeInstance, this); }; -/** - * Clears the list making it empty but non-null. - * @return {!proto.aggregator.TaskAction} returns this - */ -proto.aggregator.TaskAction.prototype.clearNextList = function () { - return this.setNextList([]); -}; /** - * optional ETHTransfer eth_transfer = 10; - * @return {?proto.aggregator.ETHTransfer} + * 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.TaskAction.prototype.getEthTransfer = function () { - return /** @type{?proto.aggregator.ETHTransfer} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.ETHTransfer, 10) - ); +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; }; +} + /** - * @param {?proto.aggregator.ETHTransfer|undefined} value - * @return {!proto.aggregator.TaskAction} returns this + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.aggregator.Condition} */ -proto.aggregator.TaskAction.prototype.setEthTransfer = function (value) { - return jspb.Message.setWrapperField(this, 10, value); +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); }; + /** - * Clears the message field making it undefined. - * @return {!proto.aggregator.TaskAction} returns this + * 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.TaskAction.prototype.clearEthTransfer = function () { - return this.setEthTransfer(undefined); +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; }; + /** - * Returns whether this field is set. - * @return {boolean} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.aggregator.TaskAction.prototype.hasEthTransfer = function () { - return jspb.Message.getField(this, 10) != null; +proto.aggregator.Condition.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.Condition.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; + /** - * optional ContractExecution contract_execution = 11; - * @return {?proto.aggregator.ContractExecution} + * 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.TaskAction.prototype.getContractExecution = function () { - return /** @type{?proto.aggregator.ContractExecution} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.ContractExecution, 11) - ); +proto.aggregator.Condition.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getId(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getType(); + if (f.length > 0) { + writer.writeString( + 2, + f + ); + } + f = message.getExpression(); + if (f.length > 0) { + writer.writeString( + 3, + f + ); + } }; + /** - * @param {?proto.aggregator.ContractExecution|undefined} value - * @return {!proto.aggregator.TaskAction} returns this + * optional string id = 1; + * @return {string} */ -proto.aggregator.TaskAction.prototype.setContractExecution = function (value) { - return jspb.Message.setWrapperField(this, 11, value); +proto.aggregator.Condition.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; + /** - * Clears the message field making it undefined. - * @return {!proto.aggregator.TaskAction} returns this + * @param {string} value + * @return {!proto.aggregator.Condition} returns this */ -proto.aggregator.TaskAction.prototype.clearContractExecution = function () { - return this.setContractExecution(undefined); +proto.aggregator.Condition.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; + /** - * Returns whether this field is set. - * @return {boolean} + * optional string type = 2; + * @return {string} */ -proto.aggregator.TaskAction.prototype.hasContractExecution = function () { - return jspb.Message.getField(this, 11) != null; +proto.aggregator.Condition.prototype.getType = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; + /** - * optional GraphQLDataQuery graphql_data_query = 12; - * @return {?proto.aggregator.GraphQLDataQuery} + * @param {string} value + * @return {!proto.aggregator.Condition} returns this */ -proto.aggregator.TaskAction.prototype.getGraphqlDataQuery = function () { - return /** @type{?proto.aggregator.GraphQLDataQuery} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.GraphQLDataQuery, 12) - ); +proto.aggregator.Condition.prototype.setType = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; + /** - * @param {?proto.aggregator.GraphQLDataQuery|undefined} value - * @return {!proto.aggregator.TaskAction} returns this + * optional string expression = 3; + * @return {string} */ -proto.aggregator.TaskAction.prototype.setGraphqlDataQuery = function (value) { - return jspb.Message.setWrapperField(this, 12, value); +proto.aggregator.Condition.prototype.getExpression = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; + /** - * Clears the message field making it undefined. - * @return {!proto.aggregator.TaskAction} returns this + * @param {string} value + * @return {!proto.aggregator.Condition} returns this */ -proto.aggregator.TaskAction.prototype.clearGraphqlDataQuery = function () { - return this.setGraphqlDataQuery(undefined); +proto.aggregator.Condition.prototype.setExpression = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); }; + + /** - * Returns whether this field is set. - * @return {boolean} + * List of repeated fields within this message type. + * @private {!Array} + * @const */ -proto.aggregator.TaskAction.prototype.hasGraphqlDataQuery = function () { - return jspb.Message.getField(this, 12) != null; -}; +proto.aggregator.BranchNode.repeatedFields_ = [1]; + + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * optional HTTPAPICall http_data_query = 13; - * @return {?proto.aggregator.HTTPAPICall} + * 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.getHttpDataQuery = function () { - return /** @type{?proto.aggregator.HTTPAPICall} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.HTTPAPICall, 13) - ); +proto.aggregator.BranchNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.BranchNode.toObject(opt_includeInstance, this); }; + /** - * @param {?proto.aggregator.HTTPAPICall|undefined} value - * @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.setHttpDataQuery = function (value) { - return jspb.Message.setWrapperField(this, 13, value); +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 message field making it undefined. - * @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.clearHttpDataQuery = function () { - return this.setHttpDataQuery(undefined); +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); }; + /** - * Returns whether this field is set. - * @return {boolean} + * Deserializes binary data (in protobuf wire format) from the + * given reader into the given message object. + * @param {!proto.aggregator.BranchNode} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.aggregator.BranchNode} */ -proto.aggregator.TaskAction.prototype.hasHttpDataQuery = function () { - return jspb.Message.getField(this, 13) != null; +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; }; + /** - * optional CustomCode custom_code = 14; - * @return {?proto.aggregator.CustomCode} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.aggregator.TaskAction.prototype.getCustomCode = function () { - return /** @type{?proto.aggregator.CustomCode} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.CustomCode, 14) - ); +proto.aggregator.BranchNode.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.BranchNode.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; + /** - * @param {?proto.aggregator.CustomCode|undefined} value - * @return {!proto.aggregator.TaskAction} returns this + * 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.TaskAction.prototype.setCustomCode = function (value) { - return jspb.Message.setWrapperField(this, 14, value); +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 + ); + } }; + /** - * Clears the message field making it undefined. - * @return {!proto.aggregator.TaskAction} returns this + * repeated Condition conditions = 1; + * @return {!Array} */ -proto.aggregator.TaskAction.prototype.clearCustomCode = function () { - return this.setCustomCode(undefined); +proto.aggregator.BranchNode.prototype.getConditionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.Condition, 1)); }; + /** - * Returns whether this field is set. - * @return {boolean} - */ -proto.aggregator.TaskAction.prototype.hasCustomCode = function () { - return jspb.Message.getField(this, 14) != null; + * @param {!Array} value + * @return {!proto.aggregator.BranchNode} returns this +*/ +proto.aggregator.BranchNode.prototype.setConditionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 1, value); }; + /** - * optional BranchAction branch = 15; - * @return {?proto.aggregator.BranchAction} + * @param {!proto.aggregator.Condition=} opt_value + * @param {number=} opt_index + * @return {!proto.aggregator.Condition} */ -proto.aggregator.TaskAction.prototype.getBranch = function () { - return /** @type{?proto.aggregator.BranchAction} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.BranchAction, 15) - ); +proto.aggregator.BranchNode.prototype.addConditions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.aggregator.Condition, opt_index); }; + /** - * @param {?proto.aggregator.BranchAction|undefined} value - * @return {!proto.aggregator.TaskAction} returns this + * Clears the list making it empty but non-null. + * @return {!proto.aggregator.BranchNode} returns this */ -proto.aggregator.TaskAction.prototype.setBranch = function (value) { - return jspb.Message.setWrapperField(this, 15, value); +proto.aggregator.BranchNode.prototype.clearConditionsList = function() { + return this.setConditionsList([]); }; + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Clears the message field making it undefined. - * @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.clearBranch = function () { - return this.setBranch(undefined); +proto.aggregator.FilterNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.FilterNode.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.FilterNode} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.TaskAction.prototype.hasBranch = function () { - return jspb.Message.getField(this, 15) != null; -}; - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.aggregator.Execution.prototype.toObject = function ( - opt_includeInstance - ) { - return proto.aggregator.Execution.toObject(opt_includeInstance, this); +proto.aggregator.FilterNode.toObject = function(includeInstance, msg) { + var f, obj = { + expression: jspb.Message.getFieldWithDefault(msg, 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.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; - }; + 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} + * @return {!proto.aggregator.FilterNode} */ -proto.aggregator.Execution.deserializeBinary = function (bytes) { +proto.aggregator.FilterNode.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.Execution(); - return proto.aggregator.Execution.deserializeBinaryFromReader(msg, reader); + var msg = new proto.aggregator.FilterNode; + return proto.aggregator.FilterNode.deserializeBinaryFromReader(msg, reader); }; + /** * Deserializes binary data (in protobuf wire format) from the * given reader into the given message object. - * @param {!proto.aggregator.Execution} msg The message object to deserialize into. + * @param {!proto.aggregator.FilterNode} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.Execution} + * @return {!proto.aggregator.FilterNode} */ -proto.aggregator.Execution.deserializeBinaryFromReader = function ( - msg, - reader -) { +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 {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; + 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.Execution.prototype.serializeBinary = function () { +proto.aggregator.FilterNode.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.Execution.serializeBinaryToWriter(this, writer); + 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.Execution} message + * @param {!proto.aggregator.FilterNode} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.Execution.serializeBinaryToWriter = function ( - message, - writer -) { +proto.aggregator.FilterNode.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getEpoch(); - if (f !== 0) { - writer.writeInt64(1, f); - } - f = message.getUserOpHash(); + f = message.getExpression(); if (f.length > 0) { - writer.writeString(2, f); + writer.writeString( + 1, + 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; + * optional string expression = 1; * @return {string} */ -proto.aggregator.Execution.prototype.getUserOpHash = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +proto.aggregator.FilterNode.prototype.getExpression = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; + /** * @param {string} value - * @return {!proto.aggregator.Execution} returns this + * @return {!proto.aggregator.FilterNode} returns this */ -proto.aggregator.Execution.prototype.setUserOpHash = function (value) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.aggregator.FilterNode.prototype.setExpression = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; -/** - * optional string error = 3; - * @return {string} - */ -proto.aggregator.Execution.prototype.getError = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); -}; + + + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * @param {string} value - * @return {!proto.aggregator.Execution} 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.Execution.prototype.setError = function (value) { - return jspb.Message.setProto3StringField(this, 3, value); +proto.aggregator.LoopNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.LoopNode.toObject(opt_includeInstance, this); }; + /** - * List of repeated fields within this message type. - * @private {!Array} - * @const + * 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.Task.repeatedFields_ = [5, 12]; - -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); +proto.aggregator.LoopNode.toObject = function(includeInstance, msg) { + var f, obj = { + iterVar: jspb.Message.getFieldWithDefault(msg, 1, ""), + iterKey: jspb.Message.getFieldWithDefault(msg, 2, "") }; - /** - * 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: - (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), - 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 - ), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; + 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} + * @return {!proto.aggregator.LoopNode} */ -proto.aggregator.Task.deserializeBinary = function (bytes) { +proto.aggregator.LoopNode.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.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.Task} msg The message object to deserialize into. + * @param {!proto.aggregator.LoopNode} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.Task} + * @return {!proto.aggregator.LoopNode} */ -proto.aggregator.Task.deserializeBinaryFromReader = function (msg, reader) { +proto.aggregator.LoopNode.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } 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: - var value = /** @type {number} */ (reader.readInt64()); - msg.setStartAt(value); - break; - case 7: - var value = /** @type {number} */ (reader.readInt64()); - msg.setExpiredAt(value); - break; - case 8: - var value = /** @type {string} */ (reader.readString()); - msg.setMemo(value); - break; - case 9: - var value = /** @type {number} */ (reader.readInt64()); - msg.setCompletedAt(value); - break; - case 10: - var value = /** @type {!proto.aggregator.TaskStatus} */ ( - reader.readEnum() - ); - msg.setStatus(value); - break; - case 11: - var value = /** @type {boolean} */ (reader.readBool()); - msg.setRepeatable(value); - break; - case 12: - var value = new proto.aggregator.Execution(); - reader.readMessage( - value, - proto.aggregator.Execution.deserializeBinaryFromReader - ); - msg.addExecutions(value); - break; - default: - reader.skipField(); - break; + 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.Task.prototype.serializeBinary = function () { +proto.aggregator.LoopNode.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.Task.serializeBinaryToWriter(this, writer); + 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.Task} message + * @param {!proto.aggregator.LoopNode} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.Task.serializeBinaryToWriter = function (message, writer) { +proto.aggregator.LoopNode.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, - f, - proto.aggregator.TaskTrigger.serializeBinaryToWriter - ); - } - f = message.getNodesList(); + f = message.getIterVar(); if (f.length > 0) { - writer.writeRepeatedMessage( - 5, - f, - proto.aggregator.TaskAction.serializeBinaryToWriter + writer.writeString( + 1, + f ); } - f = message.getStartAt(); - if (f !== 0) { - writer.writeInt64(6, f); - } - f = message.getExpiredAt(); - if (f !== 0) { - writer.writeInt64(7, f); - } - f = message.getMemo(); - if (f.length > 0) { - writer.writeString(8, f); - } - f = message.getCompletedAt(); - if (f !== 0) { - writer.writeInt64(9, f); - } - f = message.getStatus(); - if (f !== 0.0) { - writer.writeEnum(10, f); - } - f = message.getRepeatable(); - if (f) { - writer.writeBool(11, f); - } - f = message.getExecutionsList(); + f = message.getIterKey(); if (f.length > 0) { - writer.writeRepeatedMessage( - 12, - f, - proto.aggregator.Execution.serializeBinaryToWriter + writer.writeString( + 2, + f ); } }; -/** - * 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 + * optional string iter_var = 1; + * @return {string} */ -proto.aggregator.Task.prototype.setId = function (value) { - return jspb.Message.setWrapperField(this, 1, value); +proto.aggregator.LoopNode.prototype.getIterVar = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; -/** - * 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} + * @param {string} value + * @return {!proto.aggregator.LoopNode} returns this */ -proto.aggregator.Task.prototype.hasId = function () { - return jspb.Message.getField(this, 1) != null; +proto.aggregator.LoopNode.prototype.setIterVar = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; + /** - * optional string owner = 2; + * optional string iter_key = 2; * @return {string} */ -proto.aggregator.Task.prototype.getOwner = function () { +proto.aggregator.LoopNode.prototype.getIterKey = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; + /** * @param {string} value - * @return {!proto.aggregator.Task} returns this + * @return {!proto.aggregator.LoopNode} returns this */ -proto.aggregator.Task.prototype.setOwner = function (value) { +proto.aggregator.LoopNode.prototype.setIterKey = 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; - * @return {?proto.aggregator.TaskTrigger} - */ -proto.aggregator.Task.prototype.getTrigger = function () { - return /** @type{?proto.aggregator.TaskTrigger} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.TaskTrigger, 4) - ); -}; -/** - * @param {?proto.aggregator.TaskTrigger|undefined} value - * @return {!proto.aggregator.Task} returns this - */ -proto.aggregator.Task.prototype.setTrigger = function (value) { - return jspb.Message.setWrapperField(this, 4, value); -}; +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * Clears the message field making it undefined. - * @return {!proto.aggregator.Task} 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.Task.prototype.clearTrigger = function () { - return this.setTrigger(undefined); +proto.aggregator.TaskEdge.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.TaskEdge.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.TaskEdge} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.Task.prototype.hasTrigger = function () { - return jspb.Message.getField(this, 4) != null; +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; }; +} + /** - * repeated TaskAction nodes = 5; - * @return {!Array} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.aggregator.TaskEdge} */ -proto.aggregator.Task.prototype.getNodesList = function () { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.aggregator.TaskAction, 5) - ); +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); }; + /** - * @param {!Array} value - * @return {!proto.aggregator.Task} returns this + * 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.Task.prototype.setNodesList = function (value) { - return jspb.Message.setRepeatedWrapperField(this, 5, value); +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; }; + /** - * @param {!proto.aggregator.TaskAction=} opt_value - * @param {number=} opt_index - * @return {!proto.aggregator.TaskAction} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -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.TaskEdge.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.TaskEdge.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; + /** - * Clears the list making it empty but non-null. - * @return {!proto.aggregator.Task} returns this + * 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.Task.prototype.clearNodesList = function () { - return this.setNodesList([]); +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 int64 start_at = 6; - * @return {number} + * optional string id = 1; + * @return {string} */ -proto.aggregator.Task.prototype.getStartAt = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 6, 0)); +proto.aggregator.TaskEdge.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; + /** - * @param {number} value - * @return {!proto.aggregator.Task} returns this + * @param {string} value + * @return {!proto.aggregator.TaskEdge} returns this */ -proto.aggregator.Task.prototype.setStartAt = function (value) { - return jspb.Message.setProto3IntField(this, 6, value); +proto.aggregator.TaskEdge.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; + /** - * optional int64 expired_at = 7; - * @return {number} + * optional string source = 2; + * @return {string} */ -proto.aggregator.Task.prototype.getExpiredAt = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +proto.aggregator.TaskEdge.prototype.getSource = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); }; + /** - * @param {number} value - * @return {!proto.aggregator.Task} returns this + * @param {string} value + * @return {!proto.aggregator.TaskEdge} returns this */ -proto.aggregator.Task.prototype.setExpiredAt = function (value) { - return jspb.Message.setProto3IntField(this, 7, value); +proto.aggregator.TaskEdge.prototype.setSource = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); }; + /** - * optional string memo = 8; + * optional string target = 3; * @return {string} */ -proto.aggregator.Task.prototype.getMemo = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 8, "")); +proto.aggregator.TaskEdge.prototype.getTarget = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); }; + /** * @param {string} value - * @return {!proto.aggregator.Task} returns this + * @return {!proto.aggregator.TaskEdge} returns this */ -proto.aggregator.Task.prototype.setMemo = function (value) { - return jspb.Message.setProto3StringField(this, 8, value); +proto.aggregator.TaskEdge.prototype.setTarget = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); }; + + /** - * optional int64 completed_at = 9; - * @return {number} + * 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.Task.prototype.getCompletedAt = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); -}; +proto.aggregator.TaskNode.oneofGroups_ = [[10,11,12,13,14,15,16,17,18]]; /** - * @param {number} value - * @return {!proto.aggregator.Task} returns this + * @enum {number} */ -proto.aggregator.Task.prototype.setCompletedAt = function (value) { - return jspb.Message.setProto3IntField(this, 9, value); +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 }; /** - * optional TaskStatus status = 10; - * @return {!proto.aggregator.TaskStatus} + * @return {proto.aggregator.TaskNode.TaskTypeCase} */ -proto.aggregator.Task.prototype.getStatus = function () { - return /** @type {!proto.aggregator.TaskStatus} */ ( - jspb.Message.getFieldWithDefault(this, 10, 0) - ); +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) { /** - * @param {!proto.aggregator.TaskStatus} value - * @return {!proto.aggregator.Task} 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.Task.prototype.setStatus = function (value) { - return jspb.Message.setProto3EnumField(this, 10, value); +proto.aggregator.TaskNode.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.TaskNode.toObject(opt_includeInstance, this); }; + /** - * optional bool repeatable = 11; - * @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.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 + ); + } +}; + + +/** + * optional string id = 1; + * @return {string} + */ +proto.aggregator.Task.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.aggregator.Task} returns this + */ +proto.aggregator.Task.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string owner = 2; + * @return {string} + */ +proto.aggregator.Task.prototype.getOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.aggregator.Task} returns this + */ +proto.aggregator.Task.prototype.setOwner = function(value) { + return jspb.Message.setProto3StringField(this, 2, value); +}; + + +/** + * optional string smart_wallet_address = 3; + * @return {string} + */ +proto.aggregator.Task.prototype.getSmartWalletAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.aggregator.Task} returns this + */ +proto.aggregator.Task.prototype.setSmartWalletAddress = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + +/** + * optional int64 start_at = 4; + * @return {number} + */ +proto.aggregator.Task.prototype.getStartAt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.aggregator.Task} returns this + */ +proto.aggregator.Task.prototype.setStartAt = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional int64 expired_at = 5; + * @return {number} + */ +proto.aggregator.Task.prototype.getExpiredAt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 5, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.aggregator.Task} returns this + */ +proto.aggregator.Task.prototype.setExpiredAt = function(value) { + return jspb.Message.setProto3IntField(this, 5, value); +}; + + +/** + * optional string memo = 6; + * @return {string} + */ +proto.aggregator.Task.prototype.getMemo = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.aggregator.Task} returns this + */ +proto.aggregator.Task.prototype.setMemo = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * optional int64 completed_at = 7; + * @return {number} + */ +proto.aggregator.Task.prototype.getCompletedAt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 7, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.aggregator.Task} returns this + */ +proto.aggregator.Task.prototype.setCompletedAt = function(value) { + return jspb.Message.setProto3IntField(this, 7, value); +}; + + +/** + * optional int64 max_execution = 8; + * @return {number} + */ +proto.aggregator.Task.prototype.getMaxExecution = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 8, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.aggregator.Task} returns this + */ +proto.aggregator.Task.prototype.setMaxExecution = function(value) { + return jspb.Message.setProto3IntField(this, 8, value); +}; + + +/** + * optional TaskStatus status = 9; + * @return {!proto.aggregator.TaskStatus} + */ +proto.aggregator.Task.prototype.getStatus = function() { + return /** @type {!proto.aggregator.TaskStatus} */ (jspb.Message.getFieldWithDefault(this, 9, 0)); +}; + + +/** + * @param {!proto.aggregator.TaskStatus} value + * @return {!proto.aggregator.Task} returns this + */ +proto.aggregator.Task.prototype.setStatus = function(value) { + return jspb.Message.setProto3EnumField(this, 9, value); +}; + + +/** + * optional TaskTrigger trigger = 10; + * @return {?proto.aggregator.TaskTrigger} + */ +proto.aggregator.Task.prototype.getTrigger = function() { + return /** @type{?proto.aggregator.TaskTrigger} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.TaskTrigger, 10)); +}; + + +/** + * @param {?proto.aggregator.TaskTrigger|undefined} value + * @return {!proto.aggregator.Task} returns this +*/ +proto.aggregator.Task.prototype.setTrigger = function(value) { + return jspb.Message.setWrapperField(this, 10, value); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.aggregator.Task} returns this + */ +proto.aggregator.Task.prototype.clearTrigger = function() { + return this.setTrigger(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.aggregator.Task.prototype.hasTrigger = function() { + return jspb.Message.getField(this, 10) != null; +}; + + +/** + * repeated TaskNode nodes = 11; + * @return {!Array} + */ +proto.aggregator.Task.prototype.getNodesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.TaskNode, 11)); +}; + + +/** + * @param {!Array} value + * @return {!proto.aggregator.Task} returns this +*/ +proto.aggregator.Task.prototype.setNodesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 11, value); +}; + + +/** + * @param {!proto.aggregator.TaskNode=} opt_value + * @param {number=} opt_index + * @return {!proto.aggregator.TaskNode} + */ +proto.aggregator.Task.prototype.addNodes = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 11, opt_value, proto.aggregator.TaskNode, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.aggregator.Task} returns this + */ +proto.aggregator.Task.prototype.clearNodesList = function() { + return this.setNodesList([]); +}; + + +/** + * repeated TaskEdge edges = 12; + * @return {!Array} + */ +proto.aggregator.Task.prototype.getEdgesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.TaskEdge, 12)); +}; + + +/** + * @param {!Array} value + * @return {!proto.aggregator.Task} returns this +*/ +proto.aggregator.Task.prototype.setEdgesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 12, value); +}; + + +/** + * @param {!proto.aggregator.TaskEdge=} opt_value + * @param {number=} opt_index + * @return {!proto.aggregator.TaskEdge} + */ +proto.aggregator.Task.prototype.addEdges = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 12, opt_value, proto.aggregator.TaskEdge, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.aggregator.Task} returns this + */ +proto.aggregator.Task.prototype.clearEdgesList = function() { + return this.setEdgesList([]); +}; + + +/** + * repeated Execution executions = 13; + * @return {!Array} + */ +proto.aggregator.Task.prototype.getExecutionsList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.Execution, 13)); +}; + + +/** + * @param {!Array} value + * @return {!proto.aggregator.Task} returns this +*/ +proto.aggregator.Task.prototype.setExecutionsList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 13, value); +}; + + +/** + * @param {!proto.aggregator.Execution=} opt_value + * @param {number=} opt_index + * @return {!proto.aggregator.Execution} + */ +proto.aggregator.Task.prototype.addExecutions = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 13, opt_value, proto.aggregator.Execution, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.aggregator.Task} returns this + */ +proto.aggregator.Task.prototype.clearExecutionsList = function() { + return this.setExecutionsList([]); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.aggregator.CreateTaskReq.repeatedFields_ = [7,8]; + + + +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.CreateTaskReq.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.CreateTaskReq.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.CreateTaskReq} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.CreateTaskReq.toObject = function(includeInstance, msg) { + var f, obj = { + 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.TaskNode.toObject, includeInstance), + edgesList: jspb.Message.toObjectList(msg.getEdgesList(), + proto.aggregator.TaskEdge.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.CreateTaskReq} + */ +proto.aggregator.CreateTaskReq.deserializeBinary = function(bytes) { + var reader = new jspb.BinaryReader(bytes); + 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.CreateTaskReq} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.aggregator.CreateTaskReq} */ -proto.aggregator.Task.prototype.getRepeatable = function () { - return /** @type {boolean} */ ( - jspb.Message.getBooleanFieldWithDefault(this, 11, false) - ); +proto.aggregator.CreateTaskReq.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; + } + 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 = /** @type {number} */ (reader.readInt64()); + msg.setStartAt(value); + break; + case 3: + var value = /** @type {number} */ (reader.readInt64()); + msg.setExpiredAt(value); + break; + case 4: + var value = /** @type {number} */ (reader.readInt64()); + msg.setMaxExecution(value); + break; + case 5: + var value = /** @type {string} */ (reader.readString()); + msg.setSmartWalletAddress(value); + break; + case 6: + var value = /** @type {string} */ (reader.readString()); + msg.setMemo(value); + break; + case 7: + var value = new proto.aggregator.TaskNode; + reader.readMessage(value,proto.aggregator.TaskNode.deserializeBinaryFromReader); + msg.addNodes(value); + break; + case 8: + var value = new proto.aggregator.TaskEdge; + reader.readMessage(value,proto.aggregator.TaskEdge.deserializeBinaryFromReader); + msg.addEdges(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; }; + /** - * @param {boolean} value - * @return {!proto.aggregator.Task} returns this + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.aggregator.Task.prototype.setRepeatable = function (value) { - return jspb.Message.setProto3BooleanField(this, 11, value); +proto.aggregator.CreateTaskReq.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.CreateTaskReq.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; + /** - * repeated Execution executions = 12; - * @return {!Array} + * Serializes the given message to binary data (in protobuf wire + * format), writing to the given BinaryWriter. + * @param {!proto.aggregator.CreateTaskReq} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.Task.prototype.getExecutionsList = function () { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.aggregator.Execution, 12) - ); +proto.aggregator.CreateTaskReq.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getTrigger(); + if (f != null) { + writer.writeMessage( + 1, + f, + proto.aggregator.TaskTrigger.serializeBinaryToWriter + ); + } + f = message.getStartAt(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getExpiredAt(); + if (f !== 0) { + writer.writeInt64( + 3, + f + ); + } + f = message.getMaxExecution(); + if (f !== 0) { + writer.writeInt64( + 4, + f + ); + } + f = message.getSmartWalletAddress(); + if (f.length > 0) { + writer.writeString( + 5, + f + ); + } + f = message.getMemo(); + if (f.length > 0) { + writer.writeString( + 6, + f + ); + } + f = message.getNodesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 7, + f, + proto.aggregator.TaskNode.serializeBinaryToWriter + ); + } + f = message.getEdgesList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 8, + f, + proto.aggregator.TaskEdge.serializeBinaryToWriter + ); + } }; + /** - * @param {!Array} value - * @return {!proto.aggregator.Task} returns this + * optional TaskTrigger trigger = 1; + * @return {?proto.aggregator.TaskTrigger} */ -proto.aggregator.Task.prototype.setExecutionsList = function (value) { - return jspb.Message.setRepeatedWrapperField(this, 12, value); +proto.aggregator.CreateTaskReq.prototype.getTrigger = function() { + return /** @type{?proto.aggregator.TaskTrigger} */ ( + jspb.Message.getWrapperField(this, proto.aggregator.TaskTrigger, 1)); }; + /** - * @param {!proto.aggregator.Execution=} opt_value + * @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); +}; + + +/** + * Clears the message field making it undefined. + * @return {!proto.aggregator.CreateTaskReq} returns this + */ +proto.aggregator.CreateTaskReq.prototype.clearTrigger = function() { + return this.setTrigger(undefined); +}; + + +/** + * Returns whether this field is set. + * @return {boolean} + */ +proto.aggregator.CreateTaskReq.prototype.hasTrigger = function() { + return jspb.Message.getField(this, 1) != null; +}; + + +/** + * optional int64 start_at = 2; + * @return {number} + */ +proto.aggregator.CreateTaskReq.prototype.getStartAt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.aggregator.CreateTaskReq} returns this + */ +proto.aggregator.CreateTaskReq.prototype.setStartAt = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional int64 expired_at = 3; + * @return {number} + */ +proto.aggregator.CreateTaskReq.prototype.getExpiredAt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.aggregator.CreateTaskReq} returns this + */ +proto.aggregator.CreateTaskReq.prototype.setExpiredAt = function(value) { + return jspb.Message.setProto3IntField(this, 3, value); +}; + + +/** + * optional int64 max_execution = 4; + * @return {number} + */ +proto.aggregator.CreateTaskReq.prototype.getMaxExecution = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.aggregator.CreateTaskReq} returns this + */ +proto.aggregator.CreateTaskReq.prototype.setMaxExecution = function(value) { + return jspb.Message.setProto3IntField(this, 4, value); +}; + + +/** + * optional string smart_wallet_address = 5; + * @return {string} + */ +proto.aggregator.CreateTaskReq.prototype.getSmartWalletAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +}; + + +/** + * @param {string} value + * @return {!proto.aggregator.CreateTaskReq} returns this + */ +proto.aggregator.CreateTaskReq.prototype.setSmartWalletAddress = function(value) { + return jspb.Message.setProto3StringField(this, 5, value); +}; + + +/** + * optional string memo = 6; + * @return {string} + */ +proto.aggregator.CreateTaskReq.prototype.getMemo = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 6, "")); +}; + + +/** + * @param {string} value + * @return {!proto.aggregator.CreateTaskReq} returns this + */ +proto.aggregator.CreateTaskReq.prototype.setMemo = function(value) { + return jspb.Message.setProto3StringField(this, 6, value); +}; + + +/** + * repeated TaskNode nodes = 7; + * @return {!Array} + */ +proto.aggregator.CreateTaskReq.prototype.getNodesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.TaskNode, 7)); +}; + + +/** + * @param {!Array} value + * @return {!proto.aggregator.CreateTaskReq} returns this +*/ +proto.aggregator.CreateTaskReq.prototype.setNodesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 7, value); +}; + + +/** + * @param {!proto.aggregator.TaskNode=} opt_value * @param {number=} opt_index - * @return {!proto.aggregator.Execution} + * @return {!proto.aggregator.TaskNode} */ -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.addNodes = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 7, opt_value, proto.aggregator.TaskNode, opt_index); }; + /** * Clears the list making it empty but non-null. - * @return {!proto.aggregator.Task} returns this + * @return {!proto.aggregator.CreateTaskReq} returns this */ -proto.aggregator.Task.prototype.clearExecutionsList = function () { - return this.setExecutionsList([]); +proto.aggregator.CreateTaskReq.prototype.clearNodesList = function() { + return this.setNodesList([]); +}; + + +/** + * repeated TaskEdge edges = 8; + * @return {!Array} + */ +proto.aggregator.CreateTaskReq.prototype.getEdgesList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.TaskEdge, 8)); }; + /** - * List of repeated fields within this message type. - * @private {!Array} - * @const + * @param {!Array} value + * @return {!proto.aggregator.CreateTaskReq} returns this +*/ +proto.aggregator.CreateTaskReq.prototype.setEdgesList = function(value) { + return jspb.Message.setRepeatedWrapperField(this, 8, value); +}; + + +/** + * @param {!proto.aggregator.TaskEdge=} opt_value + * @param {number=} opt_index + * @return {!proto.aggregator.TaskEdge} + */ +proto.aggregator.CreateTaskReq.prototype.addEdges = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 8, opt_value, proto.aggregator.TaskEdge, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.aggregator.CreateTaskReq} returns this */ -proto.aggregator.CreateTaskReq.repeatedFields_ = [2]; +proto.aggregator.CreateTaskReq.prototype.clearEdgesList = function() { + return this.setEdgesList([]); +}; + + + + 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.CreateTaskReq.prototype.toObject = function ( - opt_includeInstance - ) { - return proto.aggregator.CreateTaskReq.toObject(opt_includeInstance, 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.CreateTaskResp.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.CreateTaskResp.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.CreateTaskReq} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.aggregator.CreateTaskReq.toObject = function (includeInstance, msg) { - var f, - obj = { - trigger: - (f = msg.getTrigger()) && - proto.aggregator.TaskTrigger.toObject(includeInstance, f), - actionsList: jspb.Message.toObjectList( - msg.getActionsList(), - proto.aggregator.TaskAction.toObject, - includeInstance - ), - startAt: jspb.Message.getFieldWithDefault(msg, 3, 0), - expiredAt: jspb.Message.getFieldWithDefault(msg, 4, 0), - memo: jspb.Message.getFieldWithDefault(msg, 5, ""), - repeatable: jspb.Message.getBooleanFieldWithDefault(msg, 6, false), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + +/** + * 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.CreateTaskResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.CreateTaskResp.toObject = function(includeInstance, msg) { + var f, obj = { + id: 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.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; } 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); - break; - default: - reader.skipField(); - break; + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setId(value); + break; + default: + reader.skipField(); + break; } } return msg; }; + /** * 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(); }; + /** * 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(); + f = message.getId(); if (f.length > 0) { - writer.writeRepeatedMessage( - 2, - f, - proto.aggregator.TaskAction.serializeBinaryToWriter + writer.writeString( + 1, + f ); } - f = message.getStartAt(); - if (f !== 0) { - writer.writeInt64(3, f); - } - f = message.getExpiredAt(); - if (f !== 0) { - writer.writeInt64(4, f); - } - f = message.getMemo(); - if (f.length > 0) { - writer.writeString(5, f); - } - f = message.getRepeatable(); - if (f) { - writer.writeBool(6, f); - } }; -/** - * optional TaskTrigger trigger = 1; - * @return {?proto.aggregator.TaskTrigger} - */ -proto.aggregator.CreateTaskReq.prototype.getTrigger = function () { - return /** @type{?proto.aggregator.TaskTrigger} */ ( - jspb.Message.getWrapperField(this, proto.aggregator.TaskTrigger, 1) - ); -}; /** - * @param {?proto.aggregator.TaskTrigger|undefined} value - * @return {!proto.aggregator.CreateTaskReq} returns this + * optional string id = 1; + * @return {string} */ -proto.aggregator.CreateTaskReq.prototype.setTrigger = function (value) { - return jspb.Message.setWrapperField(this, 1, value); +proto.aggregator.CreateTaskResp.prototype.getId = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; -/** - * Clears the message field making it undefined. - * @return {!proto.aggregator.CreateTaskReq} returns this - */ -proto.aggregator.CreateTaskReq.prototype.clearTrigger = function () { - return this.setTrigger(undefined); -}; /** - * Returns whether this field is set. - * @return {boolean} + * @param {string} value + * @return {!proto.aggregator.CreateTaskResp} returns this */ -proto.aggregator.CreateTaskReq.prototype.hasTrigger = function () { - return jspb.Message.getField(this, 1) != null; +proto.aggregator.CreateTaskResp.prototype.setId = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; -/** - * repeated TaskAction actions = 2; - * @return {!Array} - */ -proto.aggregator.CreateTaskReq.prototype.getActionsList = function () { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField(this, proto.aggregator.TaskAction, 2) - ); -}; -/** - * @param {!Array} value - * @return {!proto.aggregator.CreateTaskReq} returns this - */ -proto.aggregator.CreateTaskReq.prototype.setActionsList = function (value) { - return jspb.Message.setRepeatedWrapperField(this, 2, value); -}; + + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * @param {!proto.aggregator.TaskAction=} opt_value - * @param {number=} opt_index - * @return {!proto.aggregator.TaskAction} + * 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.addActions = function ( - opt_value, - opt_index -) { - return jspb.Message.addToRepeatedWrapperField( - this, - 2, - opt_value, - proto.aggregator.TaskAction, - opt_index - ); +proto.aggregator.NonceRequest.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.NonceRequest.toObject(opt_includeInstance, this); }; + /** - * Clears the list making it empty but non-null. - * @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.NonceRequest} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.CreateTaskReq.prototype.clearActionsList = function () { - return this.setActionsList([]); +proto.aggregator.NonceRequest.toObject = function(includeInstance, msg) { + var f, obj = { + owner: jspb.Message.getFieldWithDefault(msg, 1, "") + }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; }; +} + /** - * optional int64 start_at = 3; - * @return {number} + * Deserializes binary data (in protobuf wire format). + * @param {jspb.ByteSource} bytes The bytes to deserialize. + * @return {!proto.aggregator.NonceRequest} */ -proto.aggregator.CreateTaskReq.prototype.getStartAt = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 3, 0)); +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); }; + /** - * @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.NonceRequest} msg The message object to deserialize into. + * @param {!jspb.BinaryReader} reader The BinaryReader to use. + * @return {!proto.aggregator.NonceRequest} */ -proto.aggregator.CreateTaskReq.prototype.setStartAt = function (value) { - return jspb.Message.setProto3IntField(this, 3, value); +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; }; + /** - * optional int64 expired_at = 4; - * @return {number} + * Serializes the message to binary data (in protobuf wire format). + * @return {!Uint8Array} */ -proto.aggregator.CreateTaskReq.prototype.getExpiredAt = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 4, 0)); +proto.aggregator.NonceRequest.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.NonceRequest.serializeBinaryToWriter(this, writer); + return writer.getResultBuffer(); }; + /** - * @param {number} 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.NonceRequest} message + * @param {!jspb.BinaryWriter} writer + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.CreateTaskReq.prototype.setExpiredAt = function (value) { - return jspb.Message.setProto3IntField(this, 4, value); +proto.aggregator.NonceRequest.serializeBinaryToWriter = function(message, writer) { + var f = undefined; + f = message.getOwner(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } }; + /** - * optional string memo = 5; + * optional string owner = 1; * @return {string} */ -proto.aggregator.CreateTaskReq.prototype.getMemo = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 5, "")); +proto.aggregator.NonceRequest.prototype.getOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; + /** * @param {string} value - * @return {!proto.aggregator.CreateTaskReq} returns this + * @return {!proto.aggregator.NonceRequest} returns this */ -proto.aggregator.CreateTaskReq.prototype.setMemo = function (value) { - return jspb.Message.setProto3StringField(this, 5, value); +proto.aggregator.NonceRequest.prototype.setOwner = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); }; + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * optional bool repeatable = 6; - * @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.CreateTaskReq.prototype.getRepeatable = function () { - return /** @type {boolean} */ ( - jspb.Message.getBooleanFieldWithDefault(this, 6, false) - ); +proto.aggregator.NonceResp.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.NonceResp.toObject(opt_includeInstance, this); }; + /** - * @param {boolean} 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.setRepeatable = function (value) { - return jspb.Message.setProto3BooleanField(this, 6, 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.CreateTaskResp.prototype.toObject = function ( - opt_includeInstance - ) { - return proto.aggregator.CreateTaskResp.toObject(opt_includeInstance, this); +proto.aggregator.NonceResp.toObject = function(includeInstance, msg) { + var f, obj = { + nonce: jspb.Message.getFieldWithDefault(msg, 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.CreateTaskResp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.aggregator.CreateTaskResp.toObject = function (includeInstance, msg) { - var f, - obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, ""), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; + 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.CreateTaskResp} + * @return {!proto.aggregator.NonceResp} */ -proto.aggregator.CreateTaskResp.deserializeBinary = function (bytes) { +proto.aggregator.NonceResp.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.NonceResp; + return proto.aggregator.NonceResp.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.NonceResp} msg The message object to deserialize into. * @param {!jspb.BinaryReader} reader The BinaryReader to use. - * @return {!proto.aggregator.CreateTaskResp} + * @return {!proto.aggregator.NonceResp} */ -proto.aggregator.CreateTaskResp.deserializeBinaryFromReader = function ( - msg, - reader -) { +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.setId(value); - break; - default: - reader.skipField(); - break; + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setNonce(value); + break; + default: + reader.skipField(); + break; } } return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.CreateTaskResp.prototype.serializeBinary = function () { +proto.aggregator.NonceResp.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.CreateTaskResp.serializeBinaryToWriter(this, writer); + proto.aggregator.NonceResp.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.CreateTaskResp} message + * @param {!proto.aggregator.NonceResp} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.CreateTaskResp.serializeBinaryToWriter = function ( - message, - writer -) { +proto.aggregator.NonceResp.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getId(); + f = message.getNonce(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 1, + f + ); } }; + /** - * optional string id = 1; + * optional string nonce = 1; * @return {string} */ -proto.aggregator.CreateTaskResp.prototype.getId = function () { +proto.aggregator.NonceResp.prototype.getNonce = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; + /** * @param {string} value - * @return {!proto.aggregator.CreateTaskResp} returns this + * @return {!proto.aggregator.NonceResp} returns this */ -proto.aggregator.CreateTaskResp.prototype.setId = function (value) { +proto.aggregator.NonceResp.prototype.setNonce = 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.NonceRequest.prototype.toObject = function ( - opt_includeInstance - ) { - return proto.aggregator.NonceRequest.toObject(opt_includeInstance, 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.ListWalletReq.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ListWalletReq.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.NonceRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.aggregator.NonceRequest.toObject = function (includeInstance, msg) { - var f, - obj = { - owner: jspb.Message.getFieldWithDefault(msg, 1, ""), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + +/** + * 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.ListWalletReq} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.ListWalletReq.toObject = function(includeInstance, msg) { + var f, obj = { + factory: jspb.Message.getFieldWithDefault(msg, 1, ""), + salt: 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.NonceRequest} + * @return {!proto.aggregator.ListWalletReq} */ -proto.aggregator.NonceRequest.deserializeBinary = function (bytes) { +proto.aggregator.ListWalletReq.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.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.NonceRequest} 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.NonceRequest} + * @return {!proto.aggregator.ListWalletReq} */ -proto.aggregator.NonceRequest.deserializeBinaryFromReader = function ( - msg, - reader -) { +proto.aggregator.ListWalletReq.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; + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setFactory(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setSalt(value); + break; + default: + reader.skipField(); + break; } } return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.NonceRequest.prototype.serializeBinary = function () { +proto.aggregator.ListWalletReq.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.NonceRequest.serializeBinaryToWriter(this, writer); + proto.aggregator.ListWalletReq.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.NonceRequest} message + * @param {!proto.aggregator.ListWalletReq} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.NonceRequest.serializeBinaryToWriter = function ( - message, - writer -) { +proto.aggregator.ListWalletReq.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getOwner(); + f = message.getFactory(); + if (f.length > 0) { + writer.writeString( + 1, + f + ); + } + f = message.getSalt(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeString( + 2, + f + ); } }; + /** - * optional string owner = 1; + * optional string factory = 1; * @return {string} */ -proto.aggregator.NonceRequest.prototype.getOwner = function () { +proto.aggregator.ListWalletReq.prototype.getFactory = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; + /** * @param {string} value - * @return {!proto.aggregator.NonceRequest} returns this + * @return {!proto.aggregator.ListWalletReq} returns this */ -proto.aggregator.NonceRequest.prototype.setOwner = 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); +}; + + + + + 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.NonceResp.prototype.toObject = function ( - opt_includeInstance - ) { - return proto.aggregator.NonceResp.toObject(opt_includeInstance, 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.SmartWallet.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.SmartWallet.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.SmartWallet} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.SmartWallet.toObject = function(includeInstance, msg) { + var f, obj = { + address: jspb.Message.getFieldWithDefault(msg, 1, ""), + salt: jspb.Message.getFieldWithDefault(msg, 2, ""), + factory: jspb.Message.getFieldWithDefault(msg, 3, "") }; - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.aggregator.NonceResp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.aggregator.NonceResp.toObject = function (includeInstance, msg) { - var f, - obj = { - nonce: jspb.Message.getFieldWithDefault(msg, 1, ""), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; + 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.NonceResp} + * @return {!proto.aggregator.SmartWallet} */ -proto.aggregator.NonceResp.deserializeBinary = function (bytes) { +proto.aggregator.SmartWallet.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.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.NonceResp} 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.NonceResp} + * @return {!proto.aggregator.SmartWallet} */ -proto.aggregator.NonceResp.deserializeBinaryFromReader = function ( - msg, - reader -) { +proto.aggregator.SmartWallet.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; + case 1: + 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.setFactory(value); + break; + default: + reader.skipField(); + break; } } return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.NonceResp.prototype.serializeBinary = function () { +proto.aggregator.SmartWallet.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.NonceResp.serializeBinaryToWriter(this, writer); + proto.aggregator.SmartWallet.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.NonceResp} message + * @param {!proto.aggregator.SmartWallet} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.NonceResp.serializeBinaryToWriter = function ( - message, - writer -) { +proto.aggregator.SmartWallet.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getNonce(); + 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(1, f); + writer.writeString( + 3, + f + ); } }; + /** - * optional string nonce = 1; + * optional string address = 1; * @return {string} */ -proto.aggregator.NonceResp.prototype.getNonce = function () { +proto.aggregator.SmartWallet.prototype.getAddress = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; + /** * @param {string} value - * @return {!proto.aggregator.NonceResp} returns this + * @return {!proto.aggregator.SmartWallet} returns this */ -proto.aggregator.NonceResp.prototype.setNonce = function (value) { +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 factory = 3; + * @return {string} + */ +proto.aggregator.SmartWallet.prototype.getFactory = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.aggregator.SmartWallet} returns this + */ +proto.aggregator.SmartWallet.prototype.setFactory = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + +/** + * List of repeated fields within this message type. + * @private {!Array} + * @const + */ +proto.aggregator.ListWalletResp.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.AddressRequest.prototype.toObject = function ( - opt_includeInstance - ) { - return proto.aggregator.AddressRequest.toObject(opt_includeInstance, 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.ListWalletResp.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ListWalletResp.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.AddressRequest} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.aggregator.AddressRequest.toObject = function (includeInstance, msg) { - var f, - obj = { - owner: jspb.Message.getFieldWithDefault(msg, 1, ""), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + +/** + * 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.ListWalletResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.ListWalletResp.toObject = function(includeInstance, msg) { + var f, obj = { + walletsList: jspb.Message.toObjectList(msg.getWalletsList(), + proto.aggregator.SmartWallet.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.AddressRequest} + * @return {!proto.aggregator.ListWalletResp} */ -proto.aggregator.AddressRequest.deserializeBinary = function (bytes) { +proto.aggregator.ListWalletResp.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.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.AddressRequest} 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.AddressRequest} + * @return {!proto.aggregator.ListWalletResp} */ -proto.aggregator.AddressRequest.deserializeBinaryFromReader = function ( - msg, - reader -) { +proto.aggregator.ListWalletResp.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; + case 1: + var value = new proto.aggregator.SmartWallet; + reader.readMessage(value,proto.aggregator.SmartWallet.deserializeBinaryFromReader); + msg.addWallets(value); + break; + default: + reader.skipField(); + break; } } return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.AddressRequest.prototype.serializeBinary = function () { +proto.aggregator.ListWalletResp.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.AddressRequest.serializeBinaryToWriter(this, writer); + proto.aggregator.ListWalletResp.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.AddressRequest} message + * @param {!proto.aggregator.ListWalletResp} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.AddressRequest.serializeBinaryToWriter = function ( - message, - writer -) { +proto.aggregator.ListWalletResp.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getOwner(); + f = message.getWalletsList(); if (f.length > 0) { - writer.writeString(1, f); + writer.writeRepeatedMessage( + 1, + f, + proto.aggregator.SmartWallet.serializeBinaryToWriter + ); } }; + /** - * optional string owner = 1; - * @return {string} + * repeated SmartWallet wallets = 1; + * @return {!Array} */ -proto.aggregator.AddressRequest.prototype.getOwner = 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.AddressRequest} 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.AddressRequest.prototype.setOwner = 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([]); }; + + + + 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.AddressResp.prototype.toObject = function ( - opt_includeInstance - ) { - return proto.aggregator.AddressResp.toObject(opt_includeInstance, 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.ListTasksReq.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ListTasksReq.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.AddressResp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.aggregator.AddressResp.toObject = function (includeInstance, msg) { - var f, - obj = { - smartAccountAddress: jspb.Message.getFieldWithDefault(msg, 1, ""), - nonce: jspb.Message.getFieldWithDefault(msg, 2, ""), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + +/** + * 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.ListTasksReq} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.ListTasksReq.toObject = function(includeInstance, msg) { + var f, obj = { + smartWalletAddress: 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.AddressResp} + * @return {!proto.aggregator.ListTasksReq} */ -proto.aggregator.AddressResp.deserializeBinary = function (bytes) { +proto.aggregator.ListTasksReq.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.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.AddressResp} 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.AddressResp} + * @return {!proto.aggregator.ListTasksReq} */ -proto.aggregator.AddressResp.deserializeBinaryFromReader = function ( - msg, - reader -) { +proto.aggregator.ListTasksReq.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.setSmartAccountAddress(value); - break; - case 2: - var value = /** @type {string} */ (reader.readString()); - msg.setNonce(value); - break; - default: - reader.skipField(); - break; + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setSmartWalletAddress(value); + break; + default: + reader.skipField(); + break; } } return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.AddressResp.prototype.serializeBinary = function () { +proto.aggregator.ListTasksReq.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.AddressResp.serializeBinaryToWriter(this, writer); + proto.aggregator.ListTasksReq.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.AddressResp} message + * @param {!proto.aggregator.ListTasksReq} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.AddressResp.serializeBinaryToWriter = function ( - message, - writer -) { +proto.aggregator.ListTasksReq.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getSmartAccountAddress(); - if (f.length > 0) { - writer.writeString(1, f); - } - f = message.getNonce(); + f = message.getSmartWalletAddress(); if (f.length > 0) { - writer.writeString(2, f); + writer.writeString( + 1, + f + ); } }; + /** - * optional string smart_account_address = 1; + * optional string smart_wallet_address = 1; * @return {string} */ -proto.aggregator.AddressResp.prototype.getSmartAccountAddress = function () { +proto.aggregator.ListTasksReq.prototype.getSmartWalletAddress = function() { return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); }; + /** * @param {string} value - * @return {!proto.aggregator.AddressResp} returns this + * @return {!proto.aggregator.ListTasksReq} returns this */ -proto.aggregator.AddressResp.prototype.setSmartAccountAddress = function ( - value -) { +proto.aggregator.ListTasksReq.prototype.setSmartWalletAddress = function(value) { return jspb.Message.setProto3StringField(this, 1, value); }; + + /** - * optional string nonce = 2; - * @return {string} + * List of repeated fields within this message type. + * @private {!Array} + * @const */ -proto.aggregator.AddressResp.prototype.getNonce = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); -}; +proto.aggregator.ListTasksResp.repeatedFields_ = [1]; + + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * @param {string} value - * @return {!proto.aggregator.AddressResp} 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.AddressResp.prototype.setNonce = function (value) { - return jspb.Message.setProto3StringField(this, 2, value); +proto.aggregator.ListTasksResp.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.ListTasksResp.toObject(opt_includeInstance, this); }; -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.ListTasksReq.prototype.toObject = function ( - opt_includeInstance - ) { - return proto.aggregator.ListTasksReq.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.ListTasksReq} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.aggregator.ListTasksReq.toObject = function (includeInstance, msg) { - var f, - obj = {}; - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; +/** + * 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.Task.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.ListTasksReq} + * @return {!proto.aggregator.ListTasksResp} */ -proto.aggregator.ListTasksReq.deserializeBinary = function (bytes) { +proto.aggregator.ListTasksResp.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.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.ListTasksReq} 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.ListTasksReq} + * @return {!proto.aggregator.ListTasksResp} */ -proto.aggregator.ListTasksReq.deserializeBinaryFromReader = function ( - msg, - reader -) { +proto.aggregator.ListTasksResp.deserializeBinaryFromReader = function(msg, reader) { while (reader.nextField()) { if (reader.isEndGroup()) { break; } var field = reader.getFieldNumber(); switch (field) { - default: - reader.skipField(); - break; + case 1: + var value = new proto.aggregator.Task; + reader.readMessage(value,proto.aggregator.Task.deserializeBinaryFromReader); + msg.addTasks(value); + break; + default: + reader.skipField(); + break; } } return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.ListTasksReq.prototype.serializeBinary = function () { +proto.aggregator.ListTasksResp.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.ListTasksReq.serializeBinaryToWriter(this, writer); + proto.aggregator.ListTasksResp.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.ListTasksReq} message + * @param {!proto.aggregator.ListTasksResp} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.ListTasksReq.serializeBinaryToWriter = function ( - message, - writer -) { +proto.aggregator.ListTasksResp.serializeBinaryToWriter = function(message, writer) { var f = undefined; + f = message.getTasksList(); + if (f.length > 0) { + writer.writeRepeatedMessage( + 1, + f, + proto.aggregator.Task.serializeBinaryToWriter + ); + } }; + /** - * List of repeated fields within this message type. - * @private {!Array} - * @const + * repeated Task tasks = 1; + * @return {!Array} */ -proto.aggregator.ListTasksResp.repeatedFields_ = [1]; +proto.aggregator.ListTasksResp.prototype.getTasksList = function() { + return /** @type{!Array} */ ( + jspb.Message.getRepeatedWrapperField(this, proto.aggregator.Task, 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.Task=} opt_value + * @param {number=} opt_index + * @return {!proto.aggregator.Task} + */ +proto.aggregator.ListTasksResp.prototype.addTasks = function(opt_value, opt_index) { + return jspb.Message.addToRepeatedWrapperField(this, 1, opt_value, proto.aggregator.Task, opt_index); +}; + + +/** + * Clears the list making it empty but non-null. + * @return {!proto.aggregator.ListTasksResp} returns this + */ +proto.aggregator.ListTasksResp.prototype.clearTasksList = function() { + return this.setTasksList([]); +}; + + + + 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.ListTasksResp.prototype.toObject = function ( - opt_includeInstance - ) { - return proto.aggregator.ListTasksResp.toObject(opt_includeInstance, 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.GetKeyReq.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.GetKeyReq.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.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; + +/** + * 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.GetKeyReq} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +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) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; } + /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.ListTasksResp} + * @return {!proto.aggregator.GetKeyReq} */ -proto.aggregator.ListTasksResp.deserializeBinary = function (bytes) { +proto.aggregator.GetKeyReq.deserializeBinary = function(bytes) { var reader = new jspb.BinaryReader(bytes); - var msg = new proto.aggregator.ListTasksResp(); - return proto.aggregator.ListTasksResp.deserializeBinaryFromReader( - msg, - reader - ); + var msg = new proto.aggregator.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.ListTasksResp} 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.ListTasksResp} + * @return {!proto.aggregator.GetKeyReq} */ -proto.aggregator.ListTasksResp.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 = new proto.aggregator.ListTasksResp.TaskItemResp(); - reader.readMessage( - value, - proto.aggregator.ListTasksResp.TaskItemResp - .deserializeBinaryFromReader - ); - msg.addTasks(value); - break; - default: - reader.skipField(); - break; + 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; } } return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.ListTasksResp.prototype.serializeBinary = function () { +proto.aggregator.GetKeyReq.prototype.serializeBinary = function() { var writer = new jspb.BinaryWriter(); - proto.aggregator.ListTasksResp.serializeBinaryToWriter(this, writer); + proto.aggregator.GetKeyReq.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.ListTasksResp} message + * @param {!proto.aggregator.GetKeyReq} message * @param {!jspb.BinaryWriter} writer * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.ListTasksResp.serializeBinaryToWriter = function ( - message, - writer -) { +proto.aggregator.GetKeyReq.serializeBinaryToWriter = function(message, writer) { var f = undefined; - f = message.getTasksList(); + f = message.getOwner(); if (f.length > 0) { - writer.writeRepeatedMessage( + writer.writeString( 1, - f, - proto.aggregator.ListTasksResp.TaskItemResp.serializeBinaryToWriter + f + ); + } + f = message.getExpiredAt(); + if (f !== 0) { + writer.writeInt64( + 2, + f + ); + } + f = message.getSignature(); + if (f.length > 0) { + writer.writeString( + 3, + f ); } }; + +/** + * optional string owner = 1; + * @return {string} + */ +proto.aggregator.GetKeyReq.prototype.getOwner = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.aggregator.GetKeyReq} returns this + */ +proto.aggregator.GetKeyReq.prototype.setOwner = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional int64 expired_at = 2; + * @return {number} + */ +proto.aggregator.GetKeyReq.prototype.getExpiredAt = function() { + return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); +}; + + +/** + * @param {number} value + * @return {!proto.aggregator.GetKeyReq} returns this + */ +proto.aggregator.GetKeyReq.prototype.setExpiredAt = function(value) { + return jspb.Message.setProto3IntField(this, 2, value); +}; + + +/** + * optional string signature = 3; + * @return {string} + */ +proto.aggregator.GetKeyReq.prototype.getSignature = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +}; + + +/** + * @param {string} value + * @return {!proto.aggregator.GetKeyReq} returns this + */ +proto.aggregator.GetKeyReq.prototype.setSignature = function(value) { + return jspb.Message.setProto3StringField(this, 3, value); +}; + + + + + if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.aggregator.ListTasksResp.TaskItemResp.prototype.toObject = function ( - opt_includeInstance - ) { - return proto.aggregator.ListTasksResp.TaskItemResp.toObject( - opt_includeInstance, - 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.KeyResp.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.KeyResp.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.ListTasksResp.TaskItemResp} 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 - ) { - var f, - obj = { - id: jspb.Message.getFieldWithDefault(msg, 1, ""), - status: jspb.Message.getFieldWithDefault(msg, 2, 0), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + +/** + * 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.KeyResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.KeyResp.toObject = function(includeInstance, msg) { + var f, obj = { + key: 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.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) { - 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 {!proto.aggregator.TaskStatus} */ ( - reader.readEnum() - ); - msg.setStatus(value); - break; - default: - reader.skipField(); - break; - } +proto.aggregator.KeyResp.deserializeBinaryFromReader = function(msg, reader) { + while (reader.nextField()) { + if (reader.isEndGroup()) { + break; } - return msg; - }; + var field = reader.getFieldNumber(); + switch (field) { + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setKey(value); + break; + default: + reader.skipField(); + break; + } + } + return msg; +}; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.ListTasksResp.TaskItemResp.prototype.serializeBinary = - function () { - var writer = new jspb.BinaryWriter(); - proto.aggregator.ListTasksResp.TaskItemResp.serializeBinaryToWriter( - this, - writer - ); - return writer.getResultBuffer(); - }; +proto.aggregator.KeyResp.prototype.serializeBinary = function() { + var writer = new jspb.BinaryWriter(); + proto.aggregator.KeyResp.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.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); + writer.writeString( + 1, + 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} + * List of repeated fields within this message type. + * @private {!Array} + * @const */ -proto.aggregator.ListTasksResp.prototype.getTasksList = function () { - return /** @type{!Array} */ ( - jspb.Message.getRepeatedWrapperField( - this, - proto.aggregator.ListTasksResp.TaskItemResp, - 1 - ) - ); -}; +proto.aggregator.UpdateChecksReq.repeatedFields_ = [3]; -/** - * @param {!Array} value - * @return {!proto.aggregator.ListTasksResp} returns this - */ -proto.aggregator.ListTasksResp.prototype.setTasksList = function (value) { - return jspb.Message.setRepeatedWrapperField(this, 1, value); -}; + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * @param {!proto.aggregator.ListTasksResp.TaskItemResp=} opt_value - * @param {number=} opt_index - * @return {!proto.aggregator.ListTasksResp.TaskItemResp} + * 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.ListTasksResp.prototype.addTasks = function ( - opt_value, - opt_index -) { - return jspb.Message.addToRepeatedWrapperField( - this, - 1, - opt_value, - proto.aggregator.ListTasksResp.TaskItemResp, - opt_index - ); +proto.aggregator.UpdateChecksReq.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.UpdateChecksReq.toObject(opt_includeInstance, this); }; + /** - * Clears the list making it empty but non-null. - * @return {!proto.aggregator.ListTasksResp} 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.UpdateChecksReq} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.ListTasksResp.prototype.clearTasksList = function () { - return this.setTasksList([]); -}; - -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.GetKeyReq.prototype.toObject = function ( - opt_includeInstance - ) { - return proto.aggregator.GetKeyReq.toObject(opt_includeInstance, this); +proto.aggregator.UpdateChecksReq.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 }; - /** - * 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.GetKeyReq} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - 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) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; + 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.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; } 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; + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setAddress(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); + break; + default: + reader.skipField(); + break; } } return msg; }; + /** * 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(); }; + /** * 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(2, f); + writer.writeString( + 1, + f + ); } f = message.getSignature(); if (f.length > 0) { - writer.writeString(3, f); + writer.writeString( + 2, + f + ); + } + f = message.getIdList(); + if (f.length > 0) { + writer.writeRepeatedString( + 3, + f + ); } }; + +/** + * optional string address = 1; + * @return {string} + */ +proto.aggregator.UpdateChecksReq.prototype.getAddress = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +}; + + +/** + * @param {string} value + * @return {!proto.aggregator.UpdateChecksReq} returns this + */ +proto.aggregator.UpdateChecksReq.prototype.setAddress = function(value) { + return jspb.Message.setProto3StringField(this, 1, value); +}; + + +/** + * optional string signature = 2; + * @return {string} + */ +proto.aggregator.UpdateChecksReq.prototype.getSignature = function() { + return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 2, "")); +}; + + +/** + * @param {string} value + * @return {!proto.aggregator.UpdateChecksReq} returns this + */ +proto.aggregator.UpdateChecksReq.prototype.setSignature = 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)); +}; + + /** - * optional string owner = 1; - * @return {string} + * @param {!Array} value + * @return {!proto.aggregator.UpdateChecksReq} returns this */ -proto.aggregator.GetKeyReq.prototype.getOwner = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 1, "")); +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.GetKeyReq.prototype.setOwner = function (value) { - return jspb.Message.setProto3StringField(this, 1, value); +proto.aggregator.UpdateChecksReq.prototype.addId = function(value, opt_index) { + return jspb.Message.addToRepeatedField(this, 3, value, opt_index); }; -/** - * optional int64 expired_at = 2; - * @return {number} - */ -proto.aggregator.GetKeyReq.prototype.getExpiredAt = function () { - return /** @type {number} */ (jspb.Message.getFieldWithDefault(this, 2, 0)); -}; /** - * @param {number} value - * @return {!proto.aggregator.GetKeyReq} returns this + * Clears the list making it empty but non-null. + * @return {!proto.aggregator.UpdateChecksReq} returns this */ -proto.aggregator.GetKeyReq.prototype.setExpiredAt = function (value) { - return jspb.Message.setProto3IntField(this, 2, value); +proto.aggregator.UpdateChecksReq.prototype.clearIdList = function() { + return this.setIdList([]); }; + + + + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * optional string signature = 3; - * @return {string} + * 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.GetKeyReq.prototype.getSignature = function () { - return /** @type {string} */ (jspb.Message.getFieldWithDefault(this, 3, "")); +proto.aggregator.UpdateChecksResp.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.UpdateChecksResp.toObject(opt_includeInstance, this); }; + /** - * @param {string} value - * @return {!proto.aggregator.GetKeyReq} 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.UpdateChecksResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.GetKeyReq.prototype.setSignature = function (value) { - return jspb.Message.setProto3StringField(this, 3, value); -}; - -if (jspb.Message.GENERATE_TO_OBJECT) { - /** - * Creates an object representation of this proto. - * Field names that are reserved in JavaScript and will be renamed to pb_name. - * Optional fields that are not set will be set to undefined. - * To access a reserved field use, foo.pb_, eg, foo.pb_default. - * For the list of reserved names please see: - * net/proto2/compiler/js/internal/generator.cc#kKeyword. - * @param {boolean=} opt_includeInstance Deprecated. whether to include the - * JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @return {!Object} - */ - proto.aggregator.KeyResp.prototype.toObject = function (opt_includeInstance) { - return proto.aggregator.KeyResp.toObject(opt_includeInstance, this); +proto.aggregator.UpdateChecksResp.toObject = function(includeInstance, msg) { + var f, obj = { + updatedAt: (f = msg.getUpdatedAt()) && google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f) }; - /** - * 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.KeyResp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.aggregator.KeyResp.toObject = function (includeInstance, msg) { - var f, - obj = { - key: jspb.Message.getFieldWithDefault(msg, 1, ""), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; + 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.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; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setKey(value); - break; - default: - reader.skipField(); - break; + case 1: + var value = new google_protobuf_timestamp_pb.Timestamp; + reader.readMessage(value,google_protobuf_timestamp_pb.Timestamp.deserializeBinaryFromReader); + msg.setUpdatedAt(value); + break; + default: + reader.skipField(); + break; } } return msg; }; + /** * 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(); }; + /** * 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(1, f); + f = message.getUpdatedAt(); + if (f != null) { + writer.writeMessage( + 1, + 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 + * @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.KeyResp.prototype.setKey = function (value) { - return jspb.Message.setProto3StringField(this, 1, value); +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; +}; + + + + 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.UpdateChecksReq.prototype.toObject = function ( - opt_includeInstance - ) { - return proto.aggregator.UpdateChecksReq.toObject(opt_includeInstance, 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.CreateWalletReq.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.CreateWalletReq.toObject(opt_includeInstance, this); +}; - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.aggregator.UpdateChecksReq} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.aggregator.UpdateChecksReq.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, - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; + +/** + * Static version of the {@see toObject} method. + * @param {boolean|undefined} includeInstance Deprecated. Whether to include + * the JSPB instance for transitional soy proto support: + * http://goto/soy-param-migration + * @param {!proto.aggregator.CreateWalletReq} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages + */ +proto.aggregator.CreateWalletReq.toObject = function(includeInstance, msg) { + var f, obj = { + salt: jspb.Message.getFieldWithDefault(msg, 1, ""), + factoryAddress: jspb.Message.getFieldWithDefault(msg, 2, "") }; + + if (includeInstance) { + obj.$jspbMessageInstance = msg; + } + return obj; +}; } + /** * Deserializes binary data (in protobuf wire format). * @param {jspb.ByteSource} bytes The bytes to deserialize. - * @return {!proto.aggregator.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; } var field = reader.getFieldNumber(); switch (field) { - case 1: - var value = /** @type {string} */ (reader.readString()); - msg.setAddress(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); - break; - default: - reader.skipField(); - break; + case 1: + var value = /** @type {string} */ (reader.readString()); + msg.setSalt(value); + break; + case 2: + var value = /** @type {string} */ (reader.readString()); + msg.setFactoryAddress(value); + break; + default: + reader.skipField(); + break; } } return msg; }; + /** * Serializes the message to binary data (in protobuf wire format). * @return {!Uint8Array} */ -proto.aggregator.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(); }; + /** * 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(); - if (f.length > 0) { - writer.writeString(1, f); - } - f = message.getSignature(); + f = message.getSalt(); if (f.length > 0) { - writer.writeString(2, f); + writer.writeString( + 1, + f + ); } - f = message.getIdList(); + f = message.getFactoryAddress(); if (f.length > 0) { - writer.writeRepeatedString(3, f); + writer.writeString( + 2, + 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 || []); -}; + + +if (jspb.Message.GENERATE_TO_OBJECT) { /** - * @param {string} value - * @param {number=} opt_index - * @return {!proto.aggregator.UpdateChecksReq} 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.UpdateChecksReq.prototype.addId = function (value, opt_index) { - return jspb.Message.addToRepeatedField(this, 3, value, opt_index); +proto.aggregator.CreateWalletResp.prototype.toObject = function(opt_includeInstance) { + return proto.aggregator.CreateWalletResp.toObject(opt_includeInstance, this); }; + /** - * Clears the list making it empty but non-null. - * @return {!proto.aggregator.UpdateChecksReq} 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.CreateWalletResp} msg The msg instance to transform. + * @return {!Object} + * @suppress {unusedLocalVariables} f is only used for nested messages */ -proto.aggregator.UpdateChecksReq.prototype.clearIdList = function () { - return this.setIdList([]); -}; - -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.UpdateChecksResp.prototype.toObject = function ( - opt_includeInstance - ) { - return proto.aggregator.UpdateChecksResp.toObject( - opt_includeInstance, - this - ); +proto.aggregator.CreateWalletResp.toObject = function(includeInstance, msg) { + var f, obj = { + address: jspb.Message.getFieldWithDefault(msg, 1, ""), + salt: jspb.Message.getFieldWithDefault(msg, 2, ""), + factoryAddress: jspb.Message.getFieldWithDefault(msg, 3, "") }; - /** - * Static version of the {@see toObject} method. - * @param {boolean|undefined} includeInstance Deprecated. Whether to include - * the JSPB instance for transitional soy proto support: - * http://goto/soy-param-migration - * @param {!proto.aggregator.UpdateChecksResp} msg The msg instance to transform. - * @return {!Object} - * @suppress {unusedLocalVariables} f is only used for nested messages - */ - proto.aggregator.UpdateChecksResp.toObject = function (includeInstance, msg) { - var f, - obj = { - updatedAt: - (f = msg.getUpdatedAt()) && - google_protobuf_timestamp_pb.Timestamp.toObject(includeInstance, f), - }; - - if (includeInstance) { - obj.$jspbMessageInstance = msg; - } - return obj; - }; + 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.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; } 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); - break; - default: - reader.skipField(); - break; + case 1: + 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(); + break; } } return msg; }; + /** * 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(); }; + /** * 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 + * @param {string} value + * @return {!proto.aggregator.CreateWalletResp} returns this */ -proto.aggregator.UpdateChecksResp.prototype.setUpdatedAt = function (value) { - return jspb.Message.setWrapperField(this, 1, value); +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 }; /** @@ -7476,37 +9157,14 @@ proto.aggregator.TaskStatus = { COMPLETED: 1, FAILED: 2, CANCELED: 3, - EXECUTING: 4, + EXECUTING: 4 }; /** * @enum {number} */ proto.aggregator.CustomCodeType = { - JAVASCRIPT: 0, + JAVASCRIPT: 0 }; goog.object.extend(exports, proto.aggregator); - -// !Important: These type definitions must be exported; otherwise they will be undefined in the SDK -export const { - Task, - CreateTaskReq, - CreateTaskResp, - GetKeyReq, - KeyResp, - UpdateChecksReq, - UpdateChecksResp, - AddressResp, - AddressRequest, - ListTasksReq, - ListTasksResp, - TaskTrigger, - TriggerType, - ExpressionCondition, - TaskAction, - ActionType, - ContractExecution, - TaskType, - UUID, -} = proto.aggregator; diff --git a/package-lock.json b/package-lock.json index c1e9b3f..59b08c2 100644 --- a/package-lock.json +++ b/package-lock.json @@ -1,12 +1,12 @@ { "name": "@avaprotocol/sdk-js", - "version": "0.6.13", + "version": "0.7.3", "lockfileVersion": 3, "requires": true, "packages": { "": { "name": "@avaprotocol/sdk-js", - "version": "0.6.13", + "version": "0.7.3", "license": "Apache-2.0", "dependencies": { "@grpc/grpc-js": "^1.11.3", @@ -14,6 +14,7 @@ "dotenv": "^16.4.5", "ethers": "^6.13.2", "google-protobuf": "^3.21.4", + "id128": "^1.6.6", "lodash": "^4.17.21" }, "devDependencies": { @@ -27,6 +28,7 @@ "@types/lodash": "^4.17.12", "babel-jest": "^29.7.0", "grpc_tools_node_protoc_ts": "^5.3.3", + "grpc-tools": "^1.12.4", "jest": "^29.7.0", "ts-jest": "^29.2.5", "tsup": "^8.0.2", @@ -3170,6 +3172,62 @@ "node": ">=6 <7 || >=8" } }, + "node_modules/@mapbox/node-pre-gyp": { + "version": "1.0.11", + "resolved": "https://registry.npmjs.org/@mapbox/node-pre-gyp/-/node-pre-gyp-1.0.11.tgz", + "integrity": "sha512-Yhlar6v9WQgUp/He7BdgzOz8lqMQ8sU+jkCq7Wx8Myc5YFJLbEe7lgui/V7G1qB1DJykHSGwreceSaD60Y0PUQ==", + "dev": true, + "dependencies": { + "detect-libc": "^2.0.0", + "https-proxy-agent": "^5.0.0", + "make-dir": "^3.1.0", + "node-fetch": "^2.6.7", + "nopt": "^5.0.0", + "npmlog": "^5.0.1", + "rimraf": "^3.0.2", + "semver": "^7.3.5", + "tar": "^6.1.11" + }, + "bin": { + "node-pre-gyp": "bin/node-pre-gyp" + } + }, + "node_modules/@mapbox/node-pre-gyp/node_modules/make-dir": { + "version": "3.1.0", + "resolved": "https://registry.npmjs.org/make-dir/-/make-dir-3.1.0.tgz", + "integrity": "sha512-g3FeP20LNwhALb/6Cz6Dd4F2ngze0jz7tbzrD2wAV+o9FeNHe4rL+yK2md0J/fiSf1sa1ADhXqi5+oVwOM/eGw==", + "dev": true, + "dependencies": { + "semver": "^6.0.0" + }, + "engines": { + "node": ">=8" + }, + "funding": { + "url": "https://github.com/sponsors/sindresorhus" + } + }, + "node_modules/@mapbox/node-pre-gyp/node_modules/make-dir/node_modules/semver": { + "version": "6.3.1", + "resolved": "https://registry.npmjs.org/semver/-/semver-6.3.1.tgz", + "integrity": "sha512-BR7VvDCVHO+q2xBEWskxS6DJE1qRnb7DxzUrogb71CWoSficBxYsiAGd+Kl0mmq/MprG9yArRkyrQxTO6XjMzA==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + } + }, + "node_modules/@mapbox/node-pre-gyp/node_modules/semver": { + "version": "7.6.3", + "resolved": "https://registry.npmjs.org/semver/-/semver-7.6.3.tgz", + "integrity": "sha512-oVekP1cKtI+CTDvHWYFUcMtsK/00wmAEfyqKfNdARm8u1wNVhSgaX7A8d4UuIlUI5e84iEwOhs7ZPYRmzU9U6A==", + "dev": true, + "bin": { + "semver": "bin/semver.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/@noble/curves": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/@noble/curves/-/curves-1.2.0.tgz", @@ -3704,12 +3762,30 @@ "dev": true, "license": "MIT" }, + "node_modules/abbrev": { + "version": "1.1.1", + "resolved": "https://registry.npmjs.org/abbrev/-/abbrev-1.1.1.tgz", + "integrity": "sha512-nne9/IiQ/hzIhY6pdDnbBtz7DjPTKrY00P/zvPSm5pOFkl6xuGrGnXn/VtTNNfNtAfZ9/1RtehkszU9qcTii0Q==", + "dev": true + }, "node_modules/aes-js": { "version": "4.0.0-beta.5", "resolved": "https://registry.npmjs.org/aes-js/-/aes-js-4.0.0-beta.5.tgz", "integrity": "sha512-G965FqalsNyrPqgEGON7nIx1e/OVENSgiEIzyC63haUMuvNnwIgIjMs52hlTCKhkBny7A2ORNlfY9Zu+jmGk1Q==", "license": "MIT" }, + "node_modules/agent-base": { + "version": "6.0.2", + "resolved": "https://registry.npmjs.org/agent-base/-/agent-base-6.0.2.tgz", + "integrity": "sha512-RZNwNclF7+MS/8bDg70amg32dyeZGZxiDuQmZxKLAlQjr3jGyLx+4Kkk58UO7D2QdgFIQCovuSuZESne6RG6XQ==", + "dev": true, + "dependencies": { + "debug": "4" + }, + "engines": { + "node": ">= 6.0.0" + } + }, "node_modules/ansi-colors": { "version": "4.1.3", "resolved": "https://registry.npmjs.org/ansi-colors/-/ansi-colors-4.1.3.tgz", @@ -3781,6 +3857,26 @@ "node": ">= 8" } }, + "node_modules/aproba": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/aproba/-/aproba-2.0.0.tgz", + "integrity": "sha512-lYe4Gx7QT+MKGbDsA+Z+he/Wtef0BiwDOlK/XkBrdfsh9J/jPPXbX0tE9x9cl27Tmu5gg3QUbUrQYa/y+KOHPQ==", + "dev": true + }, + "node_modules/are-we-there-yet": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/are-we-there-yet/-/are-we-there-yet-2.0.0.tgz", + "integrity": "sha512-Ci/qENmwHnsYo9xKIcUJN5LeDKdJ6R1Z1j9V/J5wyq8nh/mYPEpIKJbBZXtZjG04HiK7zV/p6Vs9952MrMeUIw==", + "deprecated": "This package is no longer supported.", + "dev": true, + "dependencies": { + "delegates": "^1.0.0", + "readable-stream": "^3.6.0" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/argparse": { "version": "1.0.10", "resolved": "https://registry.npmjs.org/argparse/-/argparse-1.0.10.tgz", @@ -4212,6 +4308,15 @@ "fsevents": "~2.3.2" } }, + "node_modules/chownr": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/chownr/-/chownr-2.0.0.tgz", + "integrity": "sha512-bIomtDF5KGpdogkLd9VspvFzk9KfpyyGlS8YFVZl7TGPBHL5snIOnxeshwVgPteQ9b4Eydl+pVbIyE1DcvCWgQ==", + "dev": true, + "engines": { + "node": ">=10" + } + }, "node_modules/ci-info": { "version": "3.9.0", "resolved": "https://registry.npmjs.org/ci-info/-/ci-info-3.9.0.tgz", @@ -4285,6 +4390,15 @@ "integrity": "sha512-dOy+3AuW3a2wNbZHIuMZpTcgjGuLU/uBL/ubcZF9OXbDo8ff4O8yVp5Bf0efS8uEoYo5q4Fx7dY9OgQGXgAsQA==", "license": "MIT" }, + "node_modules/color-support": { + "version": "1.1.3", + "resolved": "https://registry.npmjs.org/color-support/-/color-support-1.1.3.tgz", + "integrity": "sha512-qiBjkpbMLO/HL68y+lh4q0/O1MZFj2RX6X/KmMa3+gJD3z+WwI1ZzDHysvqHGS3mP6mznPckpXmw1nI9cJjyRg==", + "dev": true, + "bin": { + "color-support": "bin.js" + } + }, "node_modules/commander": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/commander/-/commander-4.1.1.tgz", @@ -4312,6 +4426,12 @@ "node": "^14.18.0 || >=16.10.0" } }, + "node_modules/console-control-strings": { + "version": "1.1.0", + "resolved": "https://registry.npmjs.org/console-control-strings/-/console-control-strings-1.1.0.tgz", + "integrity": "sha512-ty/fTekppD2fIwRvnZAVdeOiGd1c7YXEixbgJTNzqcxJWKQnjJ/V1bNEEE6hygpM3WjwHFUVK6HTjWSzV4a8sQ==", + "dev": true + }, "node_modules/convert-source-map": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/convert-source-map/-/convert-source-map-2.0.0.tgz", @@ -4413,6 +4533,12 @@ "node": ">=0.10.0" } }, + "node_modules/delegates": { + "version": "1.0.0", + "resolved": "https://registry.npmjs.org/delegates/-/delegates-1.0.0.tgz", + "integrity": "sha512-bd2L678uiWATM6m5Z1VzNCErI3jiGzt6HGY8OVICs40JQq/HALfbyNJmp0UDakEY4pMMaN0Ly5om/B1VI/+xfQ==", + "dev": true + }, "node_modules/detect-indent": { "version": "6.1.0", "resolved": "https://registry.npmjs.org/detect-indent/-/detect-indent-6.1.0.tgz", @@ -4423,6 +4549,15 @@ "node": ">=8" } }, + "node_modules/detect-libc": { + "version": "2.0.3", + "resolved": "https://registry.npmjs.org/detect-libc/-/detect-libc-2.0.3.tgz", + "integrity": "sha512-bwy0MGW55bG41VqxxypOsdSdGqLwXPI/focwgTYCFMbdUiBAxLg9CFzG08sz2aqzknwiX7Hkl0bQENjg8iLByw==", + "dev": true, + "engines": { + "node": ">=8" + } + }, "node_modules/detect-newline": { "version": "3.1.0", "resolved": "https://registry.npmjs.org/detect-newline/-/detect-newline-3.1.0.tgz", @@ -4872,6 +5007,36 @@ "node": ">=6 <7 || >=8" } }, + "node_modules/fs-minipass": { + "version": "2.1.0", + "resolved": "https://registry.npmjs.org/fs-minipass/-/fs-minipass-2.1.0.tgz", + "integrity": "sha512-V/JgOLFCS+R6Vcq0slCuaeWEdNC3ouDlJMNIsacH2VtALiu9mV4LPrHc5cDl8k5aw6J8jwgWWpiTo5RYhmIzvg==", + "dev": true, + "dependencies": { + "minipass": "^3.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/fs-minipass/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/fs-minipass/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, "node_modules/fs.realpath": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/fs.realpath/-/fs.realpath-1.0.0.tgz", @@ -4904,6 +5069,27 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/gauge": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/gauge/-/gauge-3.0.2.tgz", + "integrity": "sha512-+5J6MS/5XksCuXq++uFRsnUd7Ovu1XenbeuIuNRJxYWjgQbPuFhT14lAvsWfqfAmnwluf1OwMjz39HjfLPci0Q==", + "deprecated": "This package is no longer supported.", + "dev": true, + "dependencies": { + "aproba": "^1.0.3 || ^2.0.0", + "color-support": "^1.1.2", + "console-control-strings": "^1.0.0", + "has-unicode": "^2.0.1", + "object-assign": "^4.1.1", + "signal-exit": "^3.0.0", + "string-width": "^4.2.3", + "strip-ansi": "^6.0.1", + "wide-align": "^1.1.2" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/gensync": { "version": "1.0.0-beta.2", "resolved": "https://registry.npmjs.org/gensync/-/gensync-1.0.0-beta.2.tgz", @@ -5046,6 +5232,20 @@ "dev": true, "license": "BSD-3-Clause" }, + "node_modules/grpc-tools": { + "version": "1.12.4", + "resolved": "https://registry.npmjs.org/grpc-tools/-/grpc-tools-1.12.4.tgz", + "integrity": "sha512-5+mLAJJma3BjnW/KQp6JBjUMgvu7Mu3dBvBPd1dcbNIb+qiR0817zDpgPjS7gRb+l/8EVNIa3cB02xI9JLToKg==", + "dev": true, + "hasInstallScript": true, + "dependencies": { + "@mapbox/node-pre-gyp": "^1.0.5" + }, + "bin": { + "grpc_tools_node_protoc": "bin/protoc.js", + "grpc_tools_node_protoc_plugin": "bin/protoc_plugin.js" + } + }, "node_modules/handlebars": { "version": "4.7.7", "resolved": "https://registry.npmjs.org/handlebars/-/handlebars-4.7.7.tgz", @@ -5088,6 +5288,12 @@ "node": ">=8" } }, + "node_modules/has-unicode": { + "version": "2.0.1", + "resolved": "https://registry.npmjs.org/has-unicode/-/has-unicode-2.0.1.tgz", + "integrity": "sha512-8Rf9Y83NBReMnx0gFzA8JImQACstCYWUplepDa9xprwwtmgEZUF0h/i5xSA625zB/I37EtrswSST6OXxwaaIJQ==", + "dev": true + }, "node_modules/hasown": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/hasown/-/hasown-2.0.2.tgz", @@ -5108,6 +5314,19 @@ "dev": true, "license": "MIT" }, + "node_modules/https-proxy-agent": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/https-proxy-agent/-/https-proxy-agent-5.0.1.tgz", + "integrity": "sha512-dFcAjpTQFgoLMzC2VwU+C/CbS7uRL0lWmxDITmqm7C+7F0Odmj6s9l6alZc6AELXhrnggM2CeWSXHGOdX2YtwA==", + "dev": true, + "dependencies": { + "agent-base": "6", + "debug": "4" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/human-id": { "version": "1.0.2", "resolved": "https://registry.npmjs.org/human-id/-/human-id-1.0.2.tgz", @@ -5138,6 +5357,14 @@ "node": ">=0.10.0" } }, + "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/ignore": { "version": "5.3.2", "resolved": "https://registry.npmjs.org/ignore/-/ignore-5.3.2.tgz", @@ -6362,6 +6589,49 @@ "node": ">=8" } }, + "node_modules/minizlib": { + "version": "2.1.2", + "resolved": "https://registry.npmjs.org/minizlib/-/minizlib-2.1.2.tgz", + "integrity": "sha512-bAxsR8BVfj60DWXHE3u30oHzfl4G7khkSuPW+qvpd7jFRHm7dLxOjUk1EHACJ/hxLY8phGJ0YhYHZo7jil7Qdg==", + "dev": true, + "dependencies": { + "minipass": "^3.0.0", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">= 8" + } + }, + "node_modules/minizlib/node_modules/minipass": { + "version": "3.3.6", + "resolved": "https://registry.npmjs.org/minipass/-/minipass-3.3.6.tgz", + "integrity": "sha512-DxiNidxSEK+tHG6zOIklvNOwm3hvCrbUrdtzY74U6HKTJxvIDfOUL5W5P2Ghd3DTkhhKPYGqeNUIh5qcM4YBfw==", + "dev": true, + "dependencies": { + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=8" + } + }, + "node_modules/minizlib/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, + "node_modules/mkdirp": { + "version": "1.0.4", + "resolved": "https://registry.npmjs.org/mkdirp/-/mkdirp-1.0.4.tgz", + "integrity": "sha512-vVqVZQyf3WLx2Shd0qJ9xuvqgAyKPLAiqITEtqW0oIUjzo3PePDd6fW9iFz30ef7Ysp/oiWqbhszeGWW2T6Gzw==", + "dev": true, + "bin": { + "mkdirp": "bin/cmd.js" + }, + "engines": { + "node": ">=10" + } + }, "node_modules/mri": { "version": "1.2.0", "resolved": "https://registry.npmjs.org/mri/-/mri-1.2.0.tgz", @@ -6405,6 +6675,26 @@ "dev": true, "license": "MIT" }, + "node_modules/node-fetch": { + "version": "2.7.0", + "resolved": "https://registry.npmjs.org/node-fetch/-/node-fetch-2.7.0.tgz", + "integrity": "sha512-c4FRfUm/dbcWZ7U+1Wq0AwCyFL+3nt2bEw05wfxSz+DWpWsitgmSgYmy2dQdWyKC1694ELPqMs/YzUSNozLt8A==", + "dev": true, + "dependencies": { + "whatwg-url": "^5.0.0" + }, + "engines": { + "node": "4.x || >=6.0.0" + }, + "peerDependencies": { + "encoding": "^0.1.0" + }, + "peerDependenciesMeta": { + "encoding": { + "optional": true + } + } + }, "node_modules/node-int64": { "version": "0.4.0", "resolved": "https://registry.npmjs.org/node-int64/-/node-int64-0.4.0.tgz", @@ -6419,6 +6709,21 @@ "dev": true, "license": "MIT" }, + "node_modules/nopt": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/nopt/-/nopt-5.0.0.tgz", + "integrity": "sha512-Tbj67rffqceeLpcRXrT7vKAN8CwfPeIBgM7E6iBkmKLV7bEMwpGgYLGv0jACUsECaa/vuxP0IjEont6umdMgtQ==", + "dev": true, + "dependencies": { + "abbrev": "1" + }, + "bin": { + "nopt": "bin/nopt.js" + }, + "engines": { + "node": ">=6" + } + }, "node_modules/normalize-path": { "version": "3.0.0", "resolved": "https://registry.npmjs.org/normalize-path/-/normalize-path-3.0.0.tgz", @@ -6442,6 +6747,19 @@ "node": ">=8" } }, + "node_modules/npmlog": { + "version": "5.0.1", + "resolved": "https://registry.npmjs.org/npmlog/-/npmlog-5.0.1.tgz", + "integrity": "sha512-AqZtDUWOMKs1G/8lwylVjrdYgqA4d9nu8hc+0gzRxlDb1I10+FHBGMXs6aiQHFdCUUlqH99MUMuLfzWDNDtfxw==", + "deprecated": "This package is no longer supported.", + "dev": true, + "dependencies": { + "are-we-there-yet": "^2.0.0", + "console-control-strings": "^1.1.0", + "gauge": "^3.0.0", + "set-blocking": "^2.0.0" + } + }, "node_modules/object-assign": { "version": "4.1.1", "resolved": "https://registry.npmjs.org/object-assign/-/object-assign-4.1.1.tgz", @@ -6829,7 +7147,6 @@ "resolved": "https://registry.npmjs.org/protobufjs/-/protobufjs-7.4.0.tgz", "integrity": "sha512-mRUWCc3KUU4w1jU8sGxICXH/gNS94DvI1gxqDvBzhj1JpcsimQkYiOJfwsPUykUI5ZaspFbSgmBLER8IrQ3tqw==", "hasInstallScript": true, - "license": "BSD-3-Clause", "dependencies": { "@protobufjs/aspromise": "^1.1.2", "@protobufjs/base64": "^1.1.2", @@ -6936,6 +7253,20 @@ "node": ">=4" } }, + "node_modules/readable-stream": { + "version": "3.6.2", + "resolved": "https://registry.npmjs.org/readable-stream/-/readable-stream-3.6.2.tgz", + "integrity": "sha512-9u/sniCrY3D5WdsERHzHE4G2YCXqoG5FTHUiCC4SIbr6XcLZBY05ya9EKjYek9O5xOAwjGq+1JdGBAS7Q9ScoA==", + "dev": true, + "dependencies": { + "inherits": "^2.0.3", + "string_decoder": "^1.1.1", + "util-deprecate": "^1.0.1" + }, + "engines": { + "node": ">= 6" + } + }, "node_modules/readdirp": { "version": "3.6.0", "resolved": "https://registry.npmjs.org/readdirp/-/readdirp-3.6.0.tgz", @@ -7095,6 +7426,22 @@ "node": ">=0.10.0" } }, + "node_modules/rimraf": { + "version": "3.0.2", + "resolved": "https://registry.npmjs.org/rimraf/-/rimraf-3.0.2.tgz", + "integrity": "sha512-JZkJMZkAGFFPP2YqXZXPbMlMBgsxzE8ILs4lMIX/2o0L9UBw9O/Y3o6wFw/i9YLapcUJWwqbi3kdxIPdC62TIA==", + "deprecated": "Rimraf versions prior to v4 are no longer supported", + "dev": true, + "dependencies": { + "glob": "^7.1.3" + }, + "bin": { + "rimraf": "bin.js" + }, + "funding": { + "url": "https://github.com/sponsors/isaacs" + } + }, "node_modules/rollup": { "version": "4.24.0", "resolved": "https://registry.npmjs.org/rollup/-/rollup-4.24.0.tgz", @@ -7155,6 +7502,26 @@ "queue-microtask": "^1.2.2" } }, + "node_modules/safe-buffer": { + "version": "5.2.1", + "resolved": "https://registry.npmjs.org/safe-buffer/-/safe-buffer-5.2.1.tgz", + "integrity": "sha512-rp3So07KcdmmKbGvgaNxQSJr7bGVSVk5S9Eq1F+ppbRo70+YeaDxkw5Dd8NPN+GD6bjnYm2VuPuCXmpuYvmCXQ==", + "dev": true, + "funding": [ + { + "type": "github", + "url": "https://github.com/sponsors/feross" + }, + { + "type": "patreon", + "url": "https://www.patreon.com/feross" + }, + { + "type": "consulting", + "url": "https://feross.org/support" + } + ] + }, "node_modules/safer-buffer": { "version": "2.1.2", "resolved": "https://registry.npmjs.org/safer-buffer/-/safer-buffer-2.1.2.tgz", @@ -7172,6 +7539,12 @@ "semver": "bin/semver.js" } }, + "node_modules/set-blocking": { + "version": "2.0.0", + "resolved": "https://registry.npmjs.org/set-blocking/-/set-blocking-2.0.0.tgz", + "integrity": "sha512-KiKBS8AnWGEyLzofFfmvKwpdPzqiy16LvQfK3yv/fVH7Bj13/wl3JSR1J+rfgRE9q7xUJK4qvgS8raSOeLUehw==", + "dev": true + }, "node_modules/shebang-command": { "version": "2.0.0", "resolved": "https://registry.npmjs.org/shebang-command/-/shebang-command-2.0.0.tgz", @@ -7379,6 +7752,15 @@ "node": ">=10" } }, + "node_modules/string_decoder": { + "version": "1.3.0", + "resolved": "https://registry.npmjs.org/string_decoder/-/string_decoder-1.3.0.tgz", + "integrity": "sha512-hkRX8U1WjJFd8LsDJ2yQ/wWWxaopEsABU1XfkM8A+j0+85JAGppt16cr1Whg6KIbb4okU6Mql6BOj+uup/wKeA==", + "dev": true, + "dependencies": { + "safe-buffer": "~5.2.0" + } + }, "node_modules/string-length": { "version": "4.0.2", "resolved": "https://registry.npmjs.org/string-length/-/string-length-4.0.2.tgz", @@ -7588,6 +7970,29 @@ "url": "https://github.com/sponsors/ljharb" } }, + "node_modules/tar": { + "version": "6.2.1", + "resolved": "https://registry.npmjs.org/tar/-/tar-6.2.1.tgz", + "integrity": "sha512-DZ4yORTwrbTj/7MZYq2w+/ZFdI6OZ/f9SFHR+71gIVUZhOQPHzVCLpvRnPgyaMpfWxxk/4ONva3GQSyNIKRv6A==", + "dev": true, + "dependencies": { + "chownr": "^2.0.0", + "fs-minipass": "^2.0.0", + "minipass": "^5.0.0", + "minizlib": "^2.1.1", + "mkdirp": "^1.0.3", + "yallist": "^4.0.0" + }, + "engines": { + "node": ">=10" + } + }, + "node_modules/tar/node_modules/yallist": { + "version": "4.0.0", + "resolved": "https://registry.npmjs.org/yallist/-/yallist-4.0.0.tgz", + "integrity": "sha512-3wdGidZyq5PB084XLES5TpOSRA3wjXAlIWMhum2kRcv/41Sn2emQ0dycQW4uZXLejwKvg6EsvbdlVL+FYEct7A==", + "dev": true + }, "node_modules/term-size": { "version": "2.2.1", "resolved": "https://registry.npmjs.org/term-size/-/term-size-2.2.1.tgz", @@ -7714,6 +8119,12 @@ "node": ">=8.0" } }, + "node_modules/tr46": { + "version": "0.0.3", + "resolved": "https://registry.npmjs.org/tr46/-/tr46-0.0.3.tgz", + "integrity": "sha512-N3WMsuqV66lT30CrXNbEjx4GEwlow3v6rr4mCcv6prnfwhS01rkgyFdjPNBYd9br7LpXV1+Emh01fHnq2Gdgrw==", + "dev": true + }, "node_modules/tree-kill": { "version": "1.2.2", "resolved": "https://registry.npmjs.org/tree-kill/-/tree-kill-1.2.2.tgz", @@ -7993,6 +8404,12 @@ "browserslist": ">= 4.21.0" } }, + "node_modules/util-deprecate": { + "version": "1.0.2", + "resolved": "https://registry.npmjs.org/util-deprecate/-/util-deprecate-1.0.2.tgz", + "integrity": "sha512-EPD5q1uXyFxJpCrLnCc1nHnq3gOa6DZBocAIiI2TaSCA7VCJ1UJDMagCzIkXNsUYfD1daK//LTEQ8xiIbrHtcw==", + "dev": true + }, "node_modules/v8-to-istanbul": { "version": "9.3.0", "resolved": "https://registry.npmjs.org/v8-to-istanbul/-/v8-to-istanbul-9.3.0.tgz", @@ -8018,6 +8435,22 @@ "makeerror": "1.0.12" } }, + "node_modules/webidl-conversions": { + "version": "3.0.1", + "resolved": "https://registry.npmjs.org/webidl-conversions/-/webidl-conversions-3.0.1.tgz", + "integrity": "sha512-2JAn3z8AR6rjK8Sm8orRC0h/bcl/DqL7tRPdGZ4I1CjdF+EaMLmYxBHyXuKL849eucPFhvBoxMsflfOb8kxaeQ==", + "dev": true + }, + "node_modules/whatwg-url": { + "version": "5.0.0", + "resolved": "https://registry.npmjs.org/whatwg-url/-/whatwg-url-5.0.0.tgz", + "integrity": "sha512-saE57nupxk6v3HY35+jzBwYa0rKSy0XR8JSxZPwgLr7ys0IBzhGviA1/TUGJLmSVqs8pb9AnvICXEuOHLprYTw==", + "dev": true, + "dependencies": { + "tr46": "~0.0.3", + "webidl-conversions": "^3.0.0" + } + }, "node_modules/which": { "version": "2.0.2", "resolved": "https://registry.npmjs.org/which/-/which-2.0.2.tgz", @@ -8034,6 +8467,15 @@ "node": ">= 8" } }, + "node_modules/wide-align": { + "version": "1.1.5", + "resolved": "https://registry.npmjs.org/wide-align/-/wide-align-1.1.5.tgz", + "integrity": "sha512-eDMORYaPNZ4sQIuuYPDHdQvf4gyCF9rEEV/yPxGfwPkRodwEgiMUUXTx/dex+Me0wxx53S+NgUHaP7y3MGlDmg==", + "dev": true, + "dependencies": { + "string-width": "^1.0.2 || 2 || 3 || 4" + } + }, "node_modules/wordwrap": { "version": "1.0.0", "resolved": "https://registry.npmjs.org/wordwrap/-/wordwrap-1.0.0.tgz", diff --git a/package.json b/package.json index b8248f0..60b0218 100644 --- a/package.json +++ b/package.json @@ -25,6 +25,7 @@ "proto-download": "curl -s https://raw.githubusercontent.com/AvaProtocol/EigenLayer-AVS/main/protobuf/avs.proto > grpc_codegen/avs.proto", "gen-protoc": "grpc_tools_node_protoc --js_out=import_style=commonjs,binary:./grpc_codegen/ --grpc_out=grpc_js:./grpc_codegen/ --plugin=protoc-gen-ts=./node_modules/.bin/protoc-gen-ts --ts_out=grpc_js:./grpc_codegen --proto_path=./grpc_codegen grpc_codegen/avs.proto", "build": "tsup src/index.ts --format cjs,esm --dts", + "gen-apikey": "sh -c 'API_KEY=$(docker compose exec aggregator /ava create-api-key --role=admin --subject=apikey) && echo \"Generated API key for tests: $API_KEY\" && echo \"Writing to .env.test to replace the TEST_API_KEY env variable\" && sed -i \"\" -e \"s/^TEST_API_KEY=.*/TEST_API_KEY=$API_KEY/\" .env.test && echo \"Done.\"'", "test": "jest --config jest.config.cjs", "test:select": "npm run test -- --testNamePattern", "changeset": "changeset", @@ -36,6 +37,7 @@ "dotenv": "^16.4.5", "ethers": "^6.13.2", "google-protobuf": "^3.21.4", + "id128": "^1.6.6", "lodash": "^4.17.21" }, "devDependencies": { @@ -49,6 +51,7 @@ "@types/lodash": "^4.17.12", "babel-jest": "^29.7.0", "grpc_tools_node_protoc_ts": "^5.3.3", + "grpc-tools": "^1.12.4", "jest": "^29.7.0", "ts-jest": "^29.2.5", "tsup": "^8.0.2", diff --git a/src/builder.ts b/src/builder.ts new file mode 100644 index 0000000..b178959 --- /dev/null +++ b/src/builder.ts @@ -0,0 +1,235 @@ +import * as avs_pb from "../grpc_codegen/avs_pb"; + +import { + TaskTrigger, TaskEdge +} from "./types"; + +export const buildContractWrite = ({contractAddress, callData, contractABI}): avs_pb.ContractWriteNode => { + const n = new avs_pb.ContractWriteNode(); + n.setContractAddress(contractAddress); + n.setCallData(callData); + if (contractABI) { + // not everytine the Abi is available on Etherscan + n.setContractAbi(contractABI); + } + + return n; +} + +export const buildContractRead = ({contract_ddress, callData, contractABI}): avs_pb.ContractReadNode => { + const n = new avs_pb.ContractReadNode(); + n.setContractAddress(contractAddress); + n.setCallData(callData); + if (n.contractABI) { + // not everytine the Abi is available on Etherscan + n.setContractAbi(n.contractABI); + } + + return n; +} + +export const buildGraphQL = ({url, query, variables}): avs_pb.GraphQLQueryNode => { + const n = new avs_pb.GraphQLQueryNode(); + n.setUrl(url); + n.setQuery(query); + for (const [k,v ] of Object.entries(variables || {})) { + n.getVariablesMap().set(k, v); + } + return n; +} + +export const buildRestAPI = ({url, body, method, headers}): avs_pb.RestAPINode => { + const n = new avs_pb.RestAPINode(); + n.setUrl(url); + n.setBody(body); + n.setMethod(method); + for (const [k,v ] of Object.entries(headers || {})) { + n.getHeadersMap().set(k, v); + } + + return n; +} + +export const buildBranch = ({conditions}): avs_pb.BranchNode => { + const n = new avs_pb.BranchNode(); + + for (const item of conditions) { + const condition = new avs_pb.Condition(); + condition.setId(item.id); + condition.setType(item.type); + condition.setExpression(item.expression); + + n.addConditions(condition); + } + return n; +} + +export const buildFilter = ({expression}): avs_pb.FilterNode => { + const n = new avs_pb.FilterNode(); + n.setExpression(expression); + return n; +} + +export const buildTaskEdge = ({id, source, target}): avs_pb.TaskEdge => { + const edge = new avs_pb.TaskEdge(); + edge.setId(id); + edge.setSource(source); + edge.setTarget(target); + + return edge; +} + +export const buildTaskNode = (node): avs_pb.TaskNode => { + const n = new avs_pb.TaskNode(); + n.setId(node.id); + n.setName(node.name); + + if (node.ethTransfer) { + const ethTransfer = new avs_pb.ETHTransferNode(); + ethTransfer.setDestination(node.ethTransfer.destination); + ethTransfer.setAmount(node.ethTransfer.amount); + n.setEthTransfer(ethTransfer); + } else if (node.contractWrite) { + n.setContractWrite(buildContractWrite(node.contractWrite)); + } else if (node.contractRead) { + n.setContractRead(buildContractRead(node.contractRead)); + } else if (node.graphqlDataQuery) { + n.setGraphqlDataQuery(buildGraphQL(node.graphqlDataQuery)); + } else if (node.restApi) { + n.setRestApi(buildRestAPI(node.restApi)); + } else if (node.branch) { + n.setBranch(buildBranch(node.branch)); + } else if (node["filter"]) { + n.setfilter(buildFilter(node["filter"])); + } else if (node.customCode) { + const code = new avs_pb.CustomCodeNode; + code.setType(node.customCode.type); + n.setCustomCode(node.customCode); + } else { + throw new Error("missing task payload"); + } + return n +} + +export const buildTrigger = (payload): avs_pb.TaskTrigger => { + const trigger = new avs_pb.TaskTrigger(); + + for (const [key, value] of Object.entries(payload)) { + if (key == "manual") { + trigger.setManual(value); + return trigger; + } + + if (key == "fixedTime") { + let schedule = new avs_pb.FixedEpochCondition(); + schedule.setEpochsList(value.epochs); + trigger.setFixedTime(schedule); + + return trigger; + } + + if (key == "cron") { + const cron = new avs_pb.CronCondition(); + cron.setScheduleList(value.schedule); + trigger.setCron(cron); + return trigger; + } + + if (key == "block") { + const block = new avs_pb.BlockCondition(); + block.setInterval(value.interval); + trigger.setBlock(block); + return trigger; + } + + if (key == "event") { + const event = new avs_pb.EventCondition(); + event.setExpression(payload.event.expression); + + trigger.setEvent(event); + + return trigger; + } + + throw new Error("missing trigger"); + } +} + +export const triggerFromGRPC = (trigger: avs_pb.TaskTrigger | undefined): TaskTrigger => { + if (!trigger) { + return { triggerType: avs_pb.TaskTrigger.TriggerTypeCase.TRIGGER_TYPE_NOT_SET } + } + + const base = { + triggerType: trigger.getTriggerTypeCase() + } + + switch (trigger.getTriggerTypeCase()) { + case avs_pb.TaskTrigger.TriggerTypeCase.MANUAL: + base.manual = trigger.getManual(); + break; + case avs_pb.TaskTrigger.TriggerTypeCase.FIXED_TIME: + base.fixedTime = { epochs: trigger.getFixedTime().getEpochsList() } + break; + case avs_pb.TaskTrigger.TriggerTypeCase.CRON: + base.cron = { schedule: trigger.getCron().getScheduleList() } + break; + case avs_pb.TaskTrigger.TriggerTypeCase.BLOCK: + base.block = { interval: trigger.getBlock().getInterval() } + break; + case avs_pb.TaskTrigger.TriggerTypeCase.EVENT: + base.event = { expression: trigger.getEvent().getExpression() } + break; + } + + return base; +} + +export const nodeFromGRPC = (node): TaskNode => { + const base = node.toObject(); + const standarize = { + taskType: node.getTaskTypeCase() + } + + switch (node.getTaskTypeCase()) { + case avs_pb.TaskNode.TaskTypeCase.ETH_TRANSFER: + standarize.ethTransfer = base.ethTransfer; + break; + case avs_pb.TaskNode.TaskTypeCase.CONTRACT_WRITE: + standarize.contractWrite = base.contractWrite; + break; + case avs_pb.TaskNode.TaskTypeCase.CONTRACT_READ: + standarize.contractRead = base.contractRead; + break; + case avs_pb.TaskNode.TaskTypeCase.GRAPHQL_DATA_QUERY: + standarize.graphqlDataQuery = base.graphqlDataQuery; + break; + case avs_pb.TaskNode.TaskTypeCase.REST_API: + standarize.restApi = base.restApi; + break; + case avs_pb.TaskNode.TaskTypeCase.BRANCH: + standarize.branch = { + conditions: base.branch.conditionsList, + } + break; + case avs_pb.TaskNode.TaskTypeCase.FILTER: + standarize.filter = base.filter; + break; + case avs_pb.TaskNode.TaskTypeCase.LOOP: + standarize.loop = base.loop; + break; + case avs_pb.TaskNode.TaskTypeCase.CUSTOM_CODE: + standarize.custom_code = base.custom_code; + break; + } + + return standarize; +} + +export const taskEdgeFromGRPC = (edge: avs_pb.TaskEdge): TaskEdge => { + return { + id: edge.getId(), + source: edge.getSource(), + target: edge.getTarget(), + } +} diff --git a/src/index.ts b/src/index.ts index 697feb7..7cbbc25 100644 --- a/src/index.ts +++ b/src/index.ts @@ -6,28 +6,35 @@ import { getKeyRequestMessage } from "./auth"; import { AggregatorClient } from "../grpc_codegen/avs_grpc_pb"; import * as avs_pb from "../grpc_codegen/avs_pb"; import { BoolValue } from "google-protobuf/google/protobuf/wrappers_pb"; +import Task from "./task"; import { AUTH_KEY_HEADER, CancelTaskResponse, DeleteTaskResponse, RequestOptions, TaskType, -} from "./types"; -import Task from "./task"; -// Move interfaces to a separate file, e.g., types.ts -import { ClientOption, CreateTaskResponse, - GetAddressesResponse, + CreateWalletReq, + SmartWallet, GetKeyResponse, ListTasksResponse, } from "./types"; +import { + buildContractRead, + buildContractWrite, + buildTaskEdge, + buildTrigger, + buildTaskNode, +} from "./builder"; + class BaseClient { readonly endpoint: string; readonly rpcClient; protected metadata: Metadata; + constructor(opts: ClientOption) { this.endpoint = opts.endpoint; this.rpcClient = new AggregatorClient( @@ -54,17 +61,20 @@ class BaseClient { } } + // When using the APIkey, depends on scope of the key, it may have access to one ore more account async authWithAPIKey( + address: string, apiKey: string, expiredAtEpoch: number ): Promise { // Create a new GetKeyReq message const request = new avs_pb.GetKeyReq(); - request.setOwner(""); + request.setOwner(address); request.setExpiredAt(expiredAtEpoch); request.setSignature(apiKey); - const result: avs_pb.KeyResp = await this._callRPC< + // when exchanging the key, we don't set the token yet + const result: avs_pb.KeyResp = await this._callAnonRPC< avs_pb.KeyResp, avs_pb.GetKeyReq >("getKey", request); @@ -84,7 +94,8 @@ class BaseClient { request.setExpiredAt(expiredAtEpoch); request.setSignature(signature); - let result = await this._callRPC( + // when exchanging the key, we don't set the token yet + let result = await this._callAnonRPC( "getKey", request ); @@ -100,10 +111,30 @@ class BaseClient { // Clone the existing metadata from the client const metadata = _.cloneDeep(this.metadata); - // Add the auth key to the metadata as a header - if (options?.authKey) { - metadata.set(AUTH_KEY_HEADER, options.authKey); + if (!options?.authKey) { + throw new Error("missing auth header"); } + metadata.set(AUTH_KEY_HEADER, options.authKey); + + return new Promise((resolve, reject) => { + (this.rpcClient as any)[method].bind(this.rpcClient)( + request as any, + metadata, + (error: any, response: TResponse) => { + if (error) reject(error); + else resolve(response); + } + ); + }); + } + + protected _callAnonRPC( + method: string, + request: TRequest | any, + options?: RequestOptions + ): Promise { + // Clone the existing metadata from the client + const metadata = _.cloneDeep(this.metadata); return new Promise((resolve, reject) => { (this.rpcClient as any)[method].bind(this.rpcClient)( @@ -123,157 +154,123 @@ export default class Client extends BaseClient { super(config); } - async getAddresses( - address: string, - { authKey }: { authKey: string } - ): Promise { - const request = new avs_pb.AddressRequest(); - request.setOwner(address); + async listSmartWallets( + options: RequestOptions, + ): Promise { + const request = new avs_pb.ListWalletReq(); const result = await this._callRPC< - avs_pb.AddressResp, - avs_pb.AddressRequest - >("getSmartAccountAddress", request, { authKey }); + avs_pb.ListWalletResp, + avs_pb.ListWalletReq + >("listWallets", request, options); - return { - owner: address, - smart_account_address: result.getSmartAccountAddress(), - }; + return result.getWalletsList().map(item => item.toObject()); } - async createTask( + async createWallet( { - address, - oracleContract, - tokenContract, - }: { - address: string; - tokenContract: string; - oracleContract: string; - }, - { authKey }: { authKey: string } - ): Promise { - const trigger = new avs_pb.TaskTrigger(); - trigger.setTriggerType(avs_pb.TriggerType.EXPRESSIONTRIGGER); - trigger.setExpression( - new avs_pb.ExpressionCondition().setExpression(` - bigCmp( - priceChainlink("${oracleContract}"), - toBigInt("10000") - ) > 0`) - ); + salt, + factoryAddress + }: CreateWalletReq, + options: RequestOptions, + ): Promise { + const request = new avs_pb.CreateWalletReq(); + request.setSalt(salt); + if (factoryAddress) { + request.setFactoryAddress(factoryAddress); + } - const action = new avs_pb.TaskAction(); - action.setTaskType(avs_pb.TaskType.CONTRACTEXECUTIONTASK); - action.setId("transfer_erc20_1"); - action.setName("Transfer Test Token"); - const execution = new avs_pb.ContractExecution(); - execution.setContractAddress(tokenContract); + const result = await this._callRPC< + avs_pb.CreateWalletResp, + avs_pb.CreateWalletReq + >("createWallet", request, options); - let ABI = ["function transfer(address to, uint amount)"]; - let iface = new ethers.Interface(ABI); - const callData = iface.encodeFunctionData("transfer", [ - address, - ethers.parseUnits("12", 18), - ]); - execution.setCallData(callData); + return { + address: result.getAddress(), + salt: result.getSalt(), + factory: result.getFactoryAddress(), + } + } - action.setContractExecution(execution); + async createTask(payload: any, options: RequestOptions): Promise { + const request = new avs_pb.CreateTaskReq(); + // TODO: add client side validation + request.setSmartWalletAddress(payload.smartWalletAddress); + request.setStartAt(payload.startAt); + request.setExpiredAt(payload.expiredAt || -1); + request.setMemo(payload.memo || ""); + request.setMaxExecution(payload.maxExecution || 0); - const request = new avs_pb.CreateTaskReq() - .setTrigger(trigger) - .setActionsList([action]) - .setExpiredAt(Math.floor(Date.now() / 1000) + 1000000); + request.setTrigger(buildTrigger(payload.trigger)); + + for (const node of payload.nodes) { + request.addNodes(buildTaskNode(node)); + } + + const edges = []; + for (const edge of payload.edges) { + edges.push(buildTaskEdge(edge)); + } + request.setEdgesList(edges); const result = await this._callRPC< avs_pb.CreateTaskResp, avs_pb.CreateTaskReq - >("createTask", request, { authKey }); + >("createTask", request, options); - return { - id: result.getId(), - }; + return result.getId(); } - async listTasks( - address: string, - { authKey }: { authKey: string } - ): Promise { + async listTasks(address: string, options: RequestOptions): Promise { const request = new avs_pb.ListTasksReq(); + request.setSmartWalletAddress(address); const result = await this._callRPC< avs_pb.ListTasksResp, avs_pb.ListTasksReq - >("listTasks", request, { authKey }); - - const tasks = _.map( - result.getTasksList(), - (obj: avs_pb.ListTasksResp.TaskItemResp) => { - return { - id: obj.getId(), - status: _.capitalize(obj.getStatus().toString()), - }; - } - ); + >("listTasks", request, options); - return { - tasks: tasks, - }; + return result.getTasksList().map(item => new Task(item)); } // TODO: specify the return type to match client’s requirements - // Right now we simply return the original object from the server - async getTask( - id: string, - { authKey }: { authKey: string } - ): Promise { - const request = new avs_pb.UUID(); - request.setBytes(id); - ``; - - const result = await this._callRPC( + async getTask(id: string, options: RequestOptions): Promise { + const request = new avs_pb.IdReq(); + request.setId(id); + + const result = await this._callRPC( "getTask", request, - { authKey } + options ); return new Task(result); } - async cancelTask( - id: string, - { authKey }: { authKey: string } - ): Promise { - const request = new avs_pb.UUID(); - request.setBytes(id); + async cancelTask(id: string, options: RequestOptions): Promise { + const request = new avs_pb.IdReq(); + request.setId(id); - const result = await this._callRPC( + const result = await this._callRPC( "cancelTask", request, - { authKey } + options ); - return { - value: result.getValue(), - }; + return result.getValue(); } - async deleteTask( - id: string, - { authKey }: { authKey: string } - ): Promise { - const request = new avs_pb.UUID(); - request.setBytes(id); + async deleteTask(id: string, options: RequestOptions): Promise { + const request = new avs_pb.IdReq(); + request.setId(id); - const result = await this._callRPC( + const result = await this._callRPC( "deleteTask", request, - { authKey } + options ); - return { - value: result.getValue(), - }; + return result.getValue(); } } diff --git a/src/task.ts b/src/task.ts index a8c1e77..3019c71 100644 --- a/src/task.ts +++ b/src/task.ts @@ -1,47 +1,43 @@ import * as avs_pb from "../grpc_codegen/avs_pb"; -import { TaskType } from "./types"; +import { TaskType, TaskTrigger, Execution, TaskEdge, TaskNode } from "./types"; +import { triggerFromGRPC, nodeFromGRPC, taskEdgeFromGRPC } from "./builder"; class Task implements TaskType { id: string; status: number; owner: string; - smartAccountAddress: string; - trigger: { - triggerType: number; - schedule?: any; - contractQuery?: any; - expression: { expression: string }; - }; - nodesList: any[]; + smartWalletAddress: string; + trigger: TaskTrigger; + nodes: TaskNode[]; + edges: TaskEdge[]; startAt: number; expiredAt: number; memo: string; completedAt: number; - repeatable: boolean; - executionsList: any[]; - // Add other missing properties here + maxExecution: number; + executions: Execution[]; constructor(task: avs_pb.Task) { - this.id = task.getId()?.toString() || ""; - this.status = task.getStatus().toString(); + this.id = task.getId() || ""; + this.status = task.getStatus(); this.owner = task.getOwner(); - this.smartAccountAddress = task.getSmartAccountAddress(); - this.trigger = { - triggerType: task.getTrigger()?.getTriggerType() || 0, - schedule: task.getTrigger()?.getSchedule()?.toObject(), - contractQuery: task.getTrigger()?.getContractQuery()?.toObject(), - expression: task.getTrigger()?.getExpression()?.toObject() || { - expression: "", - }, - }; - this.nodesList = task.getNodesList(); + this.smartWalletAddress = task.getSmartWalletAddress(); + this.nodes = task.getNodesList().map(node => nodeFromGRPC(node)); + this.trigger = triggerFromGRPC(task.getTrigger()); + this.edges = task.getEdgesList().map(edge => taskEdgeFromGRPC(edge)); this.startAt = task.getStartAt(); this.expiredAt = task.getExpiredAt(); this.memo = task.getMemo(); this.completedAt = task.getCompletedAt(); this.status = task.getStatus(); - this.repeatable = task.getRepeatable(); - this.executionsList = task.getExecutionsList(); + this.executions = task.getExecutionsList().map(execution => { + return { + epoch: execution.getEpoch(), + userOpHash: execution.getUserOpHash(), + error: execution.getError(), + } + }); + this.maxExecution = task.getMaxExecution(); } } diff --git a/src/types.ts b/src/types.ts index d54cf9a..ee87b54 100644 --- a/src/types.ts +++ b/src/types.ts @@ -3,7 +3,7 @@ import _ from "lodash"; // Define the environment type export type Environment = "production" | "development" | "staging"; -export const AUTH_KEY_HEADER = "authKey"; +export const AUTH_KEY_HEADER = "authkey"; export interface RequestOptions { authKey: string; @@ -17,37 +17,50 @@ export interface ClientOption { endpoint: string; } +export interface TaskTrigger { + triggerType: number; + manual?: boolean; + cron?: { + schedule: string[]; + }; + event?: { + expression: string; + }; + fixedTime?: { + epochs: number[], + } + block?: { + interval: number; + } +} + +export interface TaskNode { + taskType: number; + id: string; + name: string; + ethTransfer?: any; + contractWrite?: any; + contractRead?: any; + restApi?: any; + customCode?: any; + branch?: any; + filter?: any; +} + export interface TaskType { id: string; owner: string; - smartAccountAddress: string; - trigger: { - triggerType: number; - schedule?: any; - contractQuery?: any; - expression: { - expression: string; - }; - }; - nodesList: Array<{ - taskType: number; - id: string; - name: string; - nextList: any[]; - ethTransfer?: any; - contractExecution: any; - graphqlDataQuery?: any; - httpDataQuery?: any; - customCode?: any; - branch?: any; - }>; + smartWalletAddress: string; + trigger: TaskTrigger; + nodes: TaskNode[]; + edges: TaskEdge[]; startAt: number; expiredAt: number; memo: string; completedAt: number; status: number; - repeatable: boolean; - executionsList: any[]; + maxExecution: number; + executions: Execution[]; } export interface CreateTaskResponse { @@ -69,7 +82,25 @@ export interface DeleteTaskResponse { value: boolean; } -export interface GetAddressesResponse { - owner: string; - smart_account_address: string; +export interface SmartWallet { + address: string; + salt: string; + factory: string; +} + +export interface CreateWalletReq { + salt: string; + factoryAddress?: string; +} + +export interface Execution { + epoch: number; + userOpHash: string; + error: string; +} + +export interface TaskEdge { + id: string; + source: string; + target: string; } \ No newline at end of file diff --git a/tests/basic.test.ts b/tests/basic.test.ts index 5987e4e..4fd728f 100644 --- a/tests/basic.test.ts +++ b/tests/basic.test.ts @@ -1,11 +1,14 @@ +import * as avs_pb from "../grpc_codegen/avs_pb"; import { describe, beforeAll, test, expect } from "@jest/globals"; -import Client from "../dist/index.js"; +import Client from "../dist"; import dotenv from "dotenv"; import path from "path"; import { getAddress, generateSignature, requireEnvVar } from "./utils"; +import { erc20TransferTask, DUMMY_PRIVATE_KEY } from "./fixture"; // Update the dotenv configuration dotenv.config({ path: path.resolve(__dirname, "..", ".env.test") }); + // Get environment variables with type safety const { TEST_API_KEY, @@ -24,7 +27,7 @@ const { // Define EXPIRED_AT as a constant const EXPIRED_AT = Math.floor(Date.now() / 1000) + 24 * 60 * 60; // 24 hours from now -describe("Client E2E Tests", () => { +describe("Basic Tests", () => { let client: Client; let walletAddress: string; // Add this line to declare the variable @@ -40,14 +43,13 @@ describe("Client E2E Tests", () => { }); test("should authenticate and return valid JWT token when using API key", async () => { - const res = await client.authWithAPIKey(TEST_API_KEY, EXPIRED_AT); + const res = await client.authWithAPIKey(walletAddress, TEST_API_KEY, EXPIRED_AT); expect(res).toBeDefined(); - expect(res).toHaveProperty("key"); - expect(typeof res.key).toBe("string"); + expect(res).toHaveProperty("authKey"); // Check if the key is a valid JWT token - const keyParts = res.key.split("."); + const keyParts = res.authKey.split("."); expect(keyParts).toHaveLength(3); // The format of the parsed key payload is @@ -80,11 +82,10 @@ describe("Client E2E Tests", () => { ); expect(res).toBeDefined(); - expect(res).toHaveProperty("key"); - expect(typeof res.key).toBe("string"); + expect(res).toHaveProperty("authKey"); // Check if the key is a valid JWT token - const keyParts = res.key.split("."); + const keyParts = res.authKey.split("."); expect(keyParts).toHaveLength(3); // Decode the base64 token and check the payload @@ -99,6 +100,7 @@ describe("Client E2E Tests", () => { let walletAddress: string; let client: Client; let createdTaskId: string; // Add this line to declare the variable + let authKey: string; beforeAll(async () => { // Initialize the client with test credentials @@ -106,8 +108,8 @@ describe("Client E2E Tests", () => { endpoint: ENDPOINT, }); - walletAddress = await getAddress(TEST_PRIVATE_KEY); - const signature = await generateSignature(TEST_PRIVATE_KEY, EXPIRED_AT); + walletAddress = await getAddress(DUMMY_PRIVATE_KEY); + const signature = await generateSignature(DUMMY_PRIVATE_KEY, EXPIRED_AT); if (!signature) { throw new Error( @@ -115,60 +117,94 @@ describe("Client E2E Tests", () => { ); } - await client.authWithSignature(walletAddress, signature, EXPIRED_AT); + const result = await client.authWithSignature(walletAddress, signature, EXPIRED_AT); + authKey = result.authKey; }); - test("getAddresses", async () => { - const result = await client.getAddresses(walletAddress); - // Example result: - // { - // address: '0xD3a07BA3264839d2D3B5FD5c4546a94Ce4ad5eEc', - // smart_account_address: '0xD3a07BA3264839d2D3B5FD5c4546a94Ce4ad5eEc', - // } - expect(result).toBeDefined(); - expect(result.owner).toMatch(/^0x[a-fA-F0-9]{40}$/); // Ethereum address format - expect(result.smart_account_address).toMatch(/^0x[a-fA-F0-9]{40}$/); + test("createWallet", async () => { + const result = await client.createWallet({salt: "123"}, { authKey }); + expect(result?.address).toHaveLength(42); + expect(result?.salt).toEqual("123"); + expect(result?.factory).toEqual("0x29adA1b5217242DEaBB142BC3b1bCfFdd56008e7"); + }); + + test("listSmartWallets", async () => { + const wallets = await client.listSmartWallets({ authKey }); + expect(wallets.length).toBeGreaterThanOrEqual(1); + + expect(wallets[0].address).toEqual("0x6B5103D06B53Cc2386243A09f4EAf3140f4FaD41"); + expect(wallets[0].salt).toEqual("0"); + expect(wallets[0].factory).toEqual("0x29adA1b5217242DEaBB142BC3b1bCfFdd56008e7"); }); test("createTask", async () => { - const result = await client.createTask({ - address: walletAddress, - tokenContract: TOKEN_CONTRACT, - oracleContract: ORACLE_CONTRACT, - }); + const result = await client.createTask(erc20TransferTask, { authKey }); expect(result).toBeDefined(); - expect(result).toHaveProperty("id"); - - // Important: save the task ID to the suite for the following tests - createdTaskId = result.id; + expect(result).toHaveLength(26); }); test("getTask", async () => { - // Use the saved task ID - if (createdTaskId) { - const result = await client.getTask(createdTaskId); - expect(result).toBeDefined(); - } else { - console.warn("No task ID available to test getTask"); - } + const result = await client.createTask(erc20TransferTask, { authKey }); + expect(result).toHaveLength(26); + + const task = await client.getTask(result, { authKey }); + expect(task.status).toEqual(avs_pb.TaskStatus.ACTIVE); + expect(task.nodes).toHaveLength(1); + expect(task.nodes[0].contractWrite.contractAddress).toEqual(erc20TransferTask.nodes[0].contractWrite.contractAddress); + expect(task.nodes[0].contractWrite.callData).toEqual(erc20TransferTask.nodes[0].contractWrite.callData); + expect(task.trigger.block.interval).toEqual(5); + }); + + test("listTask", async () => { + // ensure the smart wallet is created + const smartWallet = await client.createWallet({salt: "345"}, { authKey }); + + // populate tasks for default wallet and the custom salt smart wallet above + const result1 = await client.createTask({...erc20TransferTask, memo: 'task1 test', smartWalletAddress: smartWallet.address}, { authKey }); + const tasks1 = await client.listTasks(smartWallet.address, { authKey }); + + const result2 = await client.createTask({...erc20TransferTask, memo: 'default wallet test'}, { authKey }); + const tasks2 = await client.listTasks("0x6B5103D06B53Cc2386243A09f4EAf3140f4FaD41", { authKey }); + + expect(tasks1.length).toBeGreaterThanOrEqual(1); + expect(tasks2.length).toBeGreaterThanOrEqual(1); + + const task1 = tasks1.find(t => t.id == result1); + expect(tasks1.find(t => t.id == result2)).toBe(undefined); + expect(task1?.id).toEqual(result1); + expect(task1?.memo).toEqual('task1 test'); + + const task2 = tasks2.find(t => t.id == result2); + expect(tasks2.find(t => t.id == result1)).toBe(undefined); + expect(task2?.id).toEqual(result2); + expect(task2?.memo).toEqual('default wallet test'); }); test("cancelTask", async () => { - if (createdTaskId) { - const result = await client.cancelTask(createdTaskId); - expect(result).toBe(true); - } else { - console.warn("No task ID available to test cancelTask"); - } + const result = await client.createTask(erc20TransferTask, { authKey }); + const task = await client.getTask(result, { authKey }); + expect(task.status).toEqual( avs_pb.TaskStatus.ACTIVE); + + const cancelResult = await client.cancelTask(task.id, { authKey }); + expect(cancelResult).toEqual(true); + const updatedTask = await client.getTask(task.id, { authKey }); + expect(updatedTask.status).toEqual( avs_pb.TaskStatus.CANCELED); }); test("deleteTask", async () => { - if (createdTaskId) { - const result = await client.deleteTask(createdTaskId); - expect(result).toBe(true); - } else { - console.warn("No task ID available to test deleteTask"); + const result = await client.createTask(erc20TransferTask, { authKey }); + const task = await client.getTask(result, { authKey }); + expect(task.status).toEqual(avs_pb.TaskStatus.ACTIVE); + expect(task.id).toHaveLength(26); + + const deleteResult = await client.deleteTask(task.id, { authKey }); + expect(deleteResult).toEqual(true); + try { + await client.getTask(task.id, { authKey }); + } catch (e) { + expect(e.code).toEqual(5); + expect(e.message).toEqual('5 NOT_FOUND: task not found'); } }); }); diff --git a/tests/cancelTask.test.ts b/tests/cancelTask.test.ts index 41bcaed..07e3330 100644 --- a/tests/cancelTask.test.ts +++ b/tests/cancelTask.test.ts @@ -1,9 +1,12 @@ +import * as avs_pb from "../grpc_codegen/avs_pb"; import { describe, beforeAll, test, expect } from "@jest/globals"; -import Client from "../dist/index.js"; +import Client from "../dist"; import dotenv from "dotenv"; import path from "path"; import { getAddress, generateSignature, requireEnvVar } from "./utils"; +import { erc20TransferTask } from "./fixture"; + // Update the dotenv configuration dotenv.config({ path: path.resolve(__dirname, "..", ".env.test") }); @@ -16,7 +19,7 @@ const { ENDPOINT, } = { TEST_API_KEY: requireEnvVar("TEST_API_KEY"), - TEST_PRIVATE_KEY: requireEnvVar("TEST_PRIVATE_KEY"), + TEST_PRIVATE_KEY: requireEnvVar('TEST_PRIVATE_KEY'), TOKEN_CONTRACT: requireEnvVar("TOKEN_CONTRACT"), ORACLE_CONTRACT: requireEnvVar("ORACLE_CONTRACT"), ENDPOINT: requireEnvVar("ENDPOINT"), @@ -41,7 +44,7 @@ describe("cancelTask Tests", () => { describe("Auth with Signature", () => { let authKey: string; - let smartWallet: string; + let smartWalletAddress: string; let createdTaskId: string; beforeAll(async () => { @@ -55,92 +58,72 @@ describe("cancelTask Tests", () => { authKey = res.authKey; console.log(`Retrieving smart wallet for owner ${ownerAddress} ...`); - const getAddressesRes = await client.getAddresses(ownerAddress, { - authKey, - }); - smartWallet = getAddressesRes.smart_account_address; - console.log(`Smart wallet created: ${smartWallet}`); + const result = await client.listSmartWallets({ authKey }); + smartWalletAddress = result[0].address; + console.log(`Smart wallet created: ${smartWalletAddress}`); console.log("Creating a task to use for the following tests"); - const createTaskRes = await client.createTask( - { - address: smartWallet, - tokenContract: TOKEN_CONTRACT, - oracleContract: ORACLE_CONTRACT, - }, + createdTaskId = await client.createTask( + { ...erc20TransferTask, smartWalletAddress }, { authKey } ); - - createdTaskId = createTaskRes.id; }); test("should cancel task when authenticated with signature", async () => { const result = await client.cancelTask(createdTaskId, { authKey }); - expect(result.value).toBe(true); + expect(result).toBe(true); - const listRes = await client.listTasks(smartWallet, { authKey }); - expect(Array.isArray(listRes.tasks)).toBe(true); - expect(listRes.tasks.some((task) => task.id === createdTaskId)).toBe( - true - ); + const cancelTask = await client.getTask(createdTaskId, { authKey }); + expect(cancelTask.id).toEqual(createdTaskId); + expect(cancelTask.status).toEqual(avs_pb.TaskStatus.CANCELED); }); test("should throw error when canceling an non-existent task", async () => { // This fails because the current error message is "2 UNKNOWN: Key not found", which is not a clear error message await expect(client.cancelTask("non-existent-task-id", { authKey })) - .rejects.toThrow("Task Id not found"); + .rejects.toThrow("5 NOT_FOUND: task not found"); }); }); describe("Auth with API key", () => { let authKey: string; - let smartWallet: string; + let smartWalletAddress: string; let createdTaskId: string; beforeAll(async () => { console.log("Authenticating with API key ..."); - const res = await client.authWithAPIKey(TEST_API_KEY, EXPIRED_AT); + const res = await client.authWithAPIKey(ownerAddress, TEST_API_KEY, EXPIRED_AT); authKey = res.authKey; console.log(`Retrieving smart wallet for owner ${ownerAddress} ...`); - const getAddressesRes = await client.getAddresses(ownerAddress, { - authKey, - }); - smartWallet = getAddressesRes.smart_account_address; - console.log(`Smart wallet created: ${smartWallet}`); + const wallets = await client.listSmartWallets({ authKey }); + smartWalletAddress = wallets[0].address; + console.log(`Smart wallet created: ${smartWalletAddress}`); console.log("Creating a task to use for the following tests"); - const createTaskRes = await client.createTask( - { - address: smartWallet, - tokenContract: TOKEN_CONTRACT, - oracleContract: ORACLE_CONTRACT, - }, + createdTaskId = await client.createTask( + { ...erc20TransferTask, smartWalletAddress }, { authKey } ); - - createdTaskId = createTaskRes.id; }); test("should cancel task when authenticated with API key", async () => { const result = await client.cancelTask(createdTaskId, { authKey }); - expect(result.value).toBe(true); + expect(result).toBe(true); - const listRes = await client.listTasks(smartWallet, { authKey }); - expect(Array.isArray(listRes.tasks)).toBe(true); - expect(listRes.tasks.some((task) => task.id === createdTaskId)).toBe( - true - ); + const cancelTask = await client.getTask(createdTaskId, { authKey }); + expect(cancelTask.id).toEqual(createdTaskId); + expect(cancelTask.status).toEqual(avs_pb.TaskStatus.CANCELED); }); test("should throw error when canceling an non-existent task", async () => { await expect(client.cancelTask("non-existent-task-id", { authKey })) - .rejects.toThrow("Task Id not found"); + .rejects.toThrow("5 NOT_FOUND: task not found"); }); }); describe("Without authentication", () => { - let smartWallet: string; + let smartWalletAddress: string; let authKey: string; let createdTaskId: string; @@ -155,23 +138,18 @@ describe("cancelTask Tests", () => { authKey = res.authKey; console.log(`Retrieving smart wallet for owner ${ownerAddress} ...`); - const getAddressesRes = await client.getAddresses(ownerAddress, { - authKey, - }); - smartWallet = getAddressesRes.smart_account_address; - console.log(`Smart wallet created: ${smartWallet}`); + const wallets = await client.listSmartWallets({ authKey }); + smartWalletAddress = wallets[0].address; + console.log(`Smart wallet created: ${smartWalletAddress}`); console.log("Creating a task to use for the following tests"); - const createTaskRes = await client.createTask( + createdTaskId = await client.createTask( { - address: smartWallet, - tokenContract: TOKEN_CONTRACT, - oracleContract: ORACLE_CONTRACT, + ...erc20TransferTask, + smartWalletAddress }, { authKey } ); - - createdTaskId = createTaskRes.id; }); test("should throw error when canceling a task without authentication", async () => { diff --git a/tests/createTask.test.ts b/tests/createTask.test.ts index ee03367..88288f2 100644 --- a/tests/createTask.test.ts +++ b/tests/createTask.test.ts @@ -1,9 +1,12 @@ +import * as avs_pb from "../grpc_codegen/avs_pb"; import { describe, beforeAll, test, expect } from "@jest/globals"; -import Client from "../dist/index.js"; +import Client from "../dist"; import dotenv from "dotenv"; import path from "path"; import { getAddress, generateSignature, requireEnvVar } from "./utils"; +import { erc20TransferTask, multiNodeBranchingTask } from "./fixture"; + // Update the dotenv configuration dotenv.config({ path: path.resolve(__dirname, "..", ".env.test") }); @@ -16,7 +19,7 @@ const { ENDPOINT, } = { TEST_API_KEY: requireEnvVar("TEST_API_KEY"), - TEST_PRIVATE_KEY: requireEnvVar("TEST_PRIVATE_KEY"), + TEST_PRIVATE_KEY: requireEnvVar('TEST_PRIVATE_KEY'), TOKEN_CONTRACT: requireEnvVar("TOKEN_CONTRACT"), ORACLE_CONTRACT: requireEnvVar("ORACLE_CONTRACT"), ENDPOINT: requireEnvVar("ENDPOINT"), @@ -39,7 +42,7 @@ describe("createTask Tests", () => { }); describe("Auth with Signature", () => { - let smartWallet: string; + let smartWalletAddress: string; let authKey: string; beforeAll(async () => { @@ -53,111 +56,223 @@ describe("createTask Tests", () => { authKey = res.authKey; console.log(`Retrieving smart wallet for owner ${ownerAddress} ...`); - const result = await client.getAddresses(ownerAddress, { authKey }); - smartWallet = result.smart_account_address; - console.log(`Smart wallet created: ${smartWallet}`); + const result = await client.listSmartWallets({ authKey }); + smartWalletAddress = result[0].address; + console.log(`Smart wallet created: ${smartWalletAddress}`); }); test("should create a task when authenticated with signature", async () => { const result = await client.createTask( - { - address: smartWallet, - tokenContract: TOKEN_CONTRACT, - oracleContract: ORACLE_CONTRACT, - }, + { ...erc20TransferTask, smartWalletAddress }, { authKey } ); console.log("Create task result:", result); expect(result).toBeDefined(); - expect(result).toHaveProperty("id"); + expect(result).toHaveLength(26); }); test("should throw error when creating a task with owner address using signature", async () => { await expect(client.createTask( + { ...erc20TransferTask, smartWalletAddress: ownerAddress }, + { authKey } + )).rejects.toThrow("3 INVALID_ARGUMENT: invalid smart account address"); + }); + + test("create cron trigger", async () => { + const result = await client.createTask( + { + ...erc20TransferTask, + smartWalletAddress, + // https://crontab.guru/ for syntax + trigger: { + cron: { schedule: ["5 4 * * *", "5 0 * 8 *"] }, + } + }, + { authKey } + ); + + const task = await client.getTask(result, { authKey }); + expect(task.id).toEqual(result); + expect(task.status).toEqual(avs_pb.TaskStatus.ACTIVE); + expect(task.nodes).toHaveLength(1); + expect(task.nodes[0].contractWrite.contractAddress).toEqual(erc20TransferTask.nodes[0].contractWrite.contractAddress); + expect(task.nodes[0].contractWrite.callData).toEqual(erc20TransferTask.nodes[0].contractWrite.callData); + + expect(task.trigger.triggerType).toEqual(avs_pb.TaskTrigger.TriggerTypeCase.CRON); + expect(task.trigger.cron.schedule[0]).toEqual("5 4 * * *"); + expect(task.trigger.cron.schedule[1]).toEqual("5 0 * 8 *"); + }); + + test("create fixed time trigger", async () => { + const result = await client.createTask( + { + ...erc20TransferTask, + smartWalletAddress, + // https://crontab.guru/ for syntax + trigger: { + fixedTime: { epochs: [10, 20, 30] }, + } + }, + { authKey } + ); + + const task = await client.getTask(result, { authKey }); + expect(task.id).toEqual(result); + expect(task.status).toEqual(avs_pb.TaskStatus.ACTIVE); + expect(task.nodes).toHaveLength(1); + expect(task.nodes[0].contractWrite.contractAddress).toEqual(erc20TransferTask.nodes[0].contractWrite.contractAddress); + expect(task.nodes[0].contractWrite.callData).toEqual(erc20TransferTask.nodes[0].contractWrite.callData); + + expect(task.trigger.triggerType).toEqual(avs_pb.TaskTrigger.TriggerTypeCase.FIXED_TIME); + expect(task.trigger.fixedTime.epochs).toEqual([10, 20, 30]); + }); + + test("create event trigger", async () => { + const result = await client.createTask( { - address: ownerAddress, - tokenContract: TOKEN_CONTRACT, - oracleContract: ORACLE_CONTRACT, + ...erc20TransferTask, + smartWalletAddress, + // https://crontab.guru/ for syntax + trigger: { + event: { expression: `topic0 == "0x123" && topic2 == "0xdef"` }, + } }, { authKey } - )).rejects.toThrow("invalid address"); + ); + + const task = await client.getTask(result, { authKey }); + expect(task.id).toEqual(result); + expect(task.status).toEqual(avs_pb.TaskStatus.ACTIVE); + expect(task.nodes).toHaveLength(1); + expect(task.nodes[0].contractWrite.contractAddress).toEqual(erc20TransferTask.nodes[0].contractWrite.contractAddress); + expect(task.nodes[0].contractWrite.callData).toEqual(erc20TransferTask.nodes[0].contractWrite.callData); + + expect(task.trigger.triggerType).toEqual(avs_pb.TaskTrigger.TriggerTypeCase.EVENT); + expect(task.trigger.event.expression).toEqual(`topic0 == "0x123" && topic2 == "0xdef"` ); }); + + test("create manual trigger", async () => { + const result = await client.createTask( + { + ...erc20TransferTask, + smartWalletAddress, + // https://crontab.guru/ for syntax + trigger: { + manual: true, + } + }, + { authKey } + ); + + const task = await client.getTask(result, { authKey }); + expect(task.id).toEqual(result); + expect(task.status).toEqual(avs_pb.TaskStatus.ACTIVE); + expect(task.nodes).toHaveLength(1); + expect(task.nodes[0].contractWrite.contractAddress).toEqual(erc20TransferTask.nodes[0].contractWrite.contractAddress); + expect(task.nodes[0].contractWrite.callData).toEqual(erc20TransferTask.nodes[0].contractWrite.callData); + + expect(task.trigger.triggerType).toEqual(avs_pb.TaskTrigger.TriggerTypeCase.MANUAL); + expect(task.trigger.manual).toBe(true); + }); + + test("create block trigger", async () => { + const result = await client.createTask( + { + ...erc20TransferTask, + smartWalletAddress, + // https://crontab.guru/ for syntax + trigger: { + block: { + interval: 102, + } + } + }, + { authKey } + ); + + const task = await client.getTask(result, { authKey }); + expect(task.id).toEqual(result); + expect(task.status).toEqual(avs_pb.TaskStatus.ACTIVE); + expect(task.nodes).toHaveLength(1); + expect(task.nodes[0].contractWrite.contractAddress).toEqual(erc20TransferTask.nodes[0].contractWrite.contractAddress); + expect(task.nodes[0].contractWrite.callData).toEqual(erc20TransferTask.nodes[0].contractWrite.callData); + + expect(task.trigger.triggerType).toEqual(avs_pb.TaskTrigger.TriggerTypeCase.BLOCK); + expect(task.trigger.block.interval).toEqual(102); + }); + + test("create complex task with multi nodes and edge ", async() => { + const result = await client.createTask( + { + ...multiNodeBranchingTask, + smartWalletAddress, + }, + { authKey }); + + const task = await client.getTask(result, { authKey }); + + expect(task.id).toEqual(result); + expect(task.status).toEqual(avs_pb.TaskStatus.ACTIVE); + expect(task.nodes).toHaveLength(6); + expect(task.nodes[0].contractWrite.contractAddress).toEqual(erc20TransferTask.nodes[0].contractWrite.contractAddress); + expect(task.nodes[0].contractWrite.callData).toEqual(erc20TransferTask.nodes[0].contractWrite.callData); + + expect(task.nodes[5].branch.conditions).toHaveLength(3); + expect(task.nodes[5].branch.conditions[0].type).toEqual("if"); + expect(task.nodes[5].branch.conditions[1].type).toEqual("if"); + expect(task.nodes[5].branch.conditions[2].type).toEqual("else"); + + expect(task.edges).toHaveLength(6); + expect(task.edges[3].source).toEqual("t100.b1"); + expect(task.edges[4].source).toEqual("t100.b2"); + + expect(task.trigger.triggerType).toEqual(avs_pb.TaskTrigger.TriggerTypeCase.BLOCK); + expect(task.trigger.block.interval).toEqual(5); + + }) }); describe("Auth with API key", () => { let authKey: string; - let smartWallet: string; + let smartWalletAddress: string; beforeAll(async () => { console.log("Authenticating with API key ..."); - const res = await client.authWithAPIKey(TEST_API_KEY, EXPIRED_AT); + const res = await client.authWithAPIKey(ownerAddress,TEST_API_KEY, EXPIRED_AT); authKey = res.authKey; console.log(`Retrieving smart wallet for owner ${ownerAddress} ...`); - const result = await client.getAddresses(ownerAddress, { authKey }); - smartWallet = result.smart_account_address; - console.log(`Smart wallet created: ${smartWallet}`); + const result = await client.listSmartWallets({ authKey }); + smartWalletAddress = result[0].address; + console.log(`Smart wallet created: ${smartWalletAddress}`); }); test("should create a task when authenticated with API key", async () => { const result = await client.createTask( - { - address: smartWallet, - tokenContract: TOKEN_CONTRACT, - oracleContract: ORACLE_CONTRACT, - }, + { ...erc20TransferTask, smartWalletAddress }, { authKey } ); console.log("Create task result:", result); expect(result).toBeDefined(); - expect(result).toHaveProperty("id"); + expect(result).toHaveLength(26); }); test("should throw error when creating a task with owner address using API key", async () => { await expect(client.createTask( - { - address: ownerAddress, - tokenContract: TOKEN_CONTRACT, - oracleContract: ORACLE_CONTRACT, - }, - { authKey } - ) - ).rejects.toThrow("invalid address"); + { ...erc20TransferTask, smartWalletAddress: ownerAddress }, + { authKey } + )).rejects.toThrow("3 INVALID_ARGUMENT: invalid smart account addres"); }); }); describe("Without authentication", () => { - let smartWallet: string; + let smartWalletAddress: string; let authKey: string; - beforeAll(async () => { - console.log("Authenticating with signature ..."); - const signature = await generateSignature(TEST_PRIVATE_KEY, EXPIRED_AT); - const res = await client.authWithSignature( - ownerAddress, - signature, - EXPIRED_AT - ); - authKey = res.authKey; - - console.log(`Retrieving smart wallet for owner ${ownerAddress} ...`); - const getAddressesRes = await client.getAddresses(ownerAddress, { - authKey, - }); - smartWallet = getAddressesRes.smart_account_address; - console.log(`Smart wallet created: ${smartWallet}`); - }); - test("should throw error when creating a task without authentication", async () => { await expect(client.createTask( - { - address: smartWallet, - tokenContract: TOKEN_CONTRACT, - oracleContract: ORACLE_CONTRACT, - }, - { authKey: "" } - ) - ).rejects.toThrow("missing auth header"); + { ...erc20TransferTask, smartWalletAddress } + )).rejects.toThrow("missing auth header"); }); }); }); diff --git a/tests/deleteTask.test.ts b/tests/deleteTask.test.ts index ab2c995..f143627 100644 --- a/tests/deleteTask.test.ts +++ b/tests/deleteTask.test.ts @@ -1,9 +1,11 @@ import { describe, beforeAll, test, expect } from "@jest/globals"; -import Client from "../dist/index.js"; +import Client from "../dist"; import dotenv from "dotenv"; import path from "path"; import { getAddress, generateSignature, requireEnvVar } from "./utils"; +import { erc20TransferTask } from "./fixture"; + // Update the dotenv configuration dotenv.config({ path: path.resolve(__dirname, "..", ".env.test") }); @@ -16,7 +18,7 @@ const { ENDPOINT, } = { TEST_API_KEY: requireEnvVar("TEST_API_KEY"), - TEST_PRIVATE_KEY: requireEnvVar("TEST_PRIVATE_KEY"), + TEST_PRIVATE_KEY: requireEnvVar('TEST_PRIVATE_KEY'), TOKEN_CONTRACT: requireEnvVar("TOKEN_CONTRACT"), ORACLE_CONTRACT: requireEnvVar("ORACLE_CONTRACT"), ENDPOINT: requireEnvVar("ENDPOINT"), @@ -41,7 +43,7 @@ describe("deleteTask Tests", () => { describe("Auth with Signature", () => { let authKey: string; - let smartWallet: string; + let smartWalletAddress: string; let createdTaskId: string; beforeAll(async () => { @@ -55,32 +57,24 @@ describe("deleteTask Tests", () => { authKey = res.authKey; console.log(`Retrieving smart wallet for owner ${ownerAddress} ...`); - const getAddressesRes = await client.getAddresses(ownerAddress, { - authKey, - }); - smartWallet = getAddressesRes.smart_account_address; - console.log(`Smart wallet created: ${smartWallet}`); + const result = await client.listSmartWallets({ authKey }); + smartWalletAddress = result[0].address; + console.log(`Smart wallet created: ${smartWalletAddress}`); console.log("Creating a task to use for the following tests"); - const createTaskRes = await client.createTask( - { - address: smartWallet, - tokenContract: TOKEN_CONTRACT, - oracleContract: ORACLE_CONTRACT, - }, + createdTaskId = await client.createTask( + { ...erc20TransferTask, smartWalletAddress }, { authKey } ); - - createdTaskId = createTaskRes.id; }); test("should delete task when authenticated with signature", async () => { const result = await client.deleteTask(createdTaskId, { authKey }); - expect(result.value).toBe(true); + expect(result).toBe(true); - const listRes = await client.listTasks(smartWallet, { authKey }); - expect(Array.isArray(listRes.tasks)).toBe(true); - expect(listRes.tasks.some((task) => task.id === createdTaskId)).toBe( + const listRes = await client.listTasks(smartWalletAddress, { authKey }); + expect(Array.isArray(listRes)).toBe(true); + expect(listRes.some((task) => task.id === createdTaskId)).toBe( false ); }); @@ -88,59 +82,55 @@ describe("deleteTask Tests", () => { test("should throw error when deleting an non-existent task", async () => { // This fails because the current error message is "2 UNKNOWN: Key not found", which is not a clear error message await expect(client.deleteTask("non-existent-task-id", { authKey })) - .rejects.toThrow("Task Id not found"); + .rejects.toThrow("5 NOT_FOUND: task not found"); }); }); describe("Auth with API key", () => { let authKey: string; - let smartWallet: string; + let smartWalletAddress: string; let createdTaskId: string; beforeAll(async () => { console.log("Authenticating with API key ..."); - const res = await client.authWithAPIKey(TEST_API_KEY, EXPIRED_AT); + const res = await client.authWithAPIKey(ownerAddress, TEST_API_KEY, EXPIRED_AT); authKey = res.authKey; + console.log("Got key exchange...", authKey); console.log(`Retrieving smart wallet for owner ${ownerAddress} ...`); - const getAddressesRes = await client.getAddresses(ownerAddress, { - authKey, - }); - smartWallet = getAddressesRes.smart_account_address; - console.log(`Smart wallet created: ${smartWallet}`); + const getAddressesRes = await client.listSmartWallets({ authKey }); + smartWalletAddress = getAddressesRes[0].address; + console.log(`Smart wallet created: ${smartWalletAddress}`); console.log("Creating a task to use for the following tests"); - const createTaskRes = await client.createTask( - { - address: smartWallet, - tokenContract: TOKEN_CONTRACT, - oracleContract: ORACLE_CONTRACT, - }, + createdTaskId = await client.createTask( + { ...erc20TransferTask, smartWalletAddress }, { authKey } ); - createdTaskId = createTaskRes.id; + console.log("crate task", createdTaskId); }); test("should delete task when authenticated with API key", async () => { + console.log("delete task with authkey...", authKey); const result = await client.deleteTask(createdTaskId, { authKey }); - expect(result.value).toBe(true); + expect(result).toBe(true); - const listRes = await client.listTasks(smartWallet, { authKey }); - expect(Array.isArray(listRes.tasks)).toBe(true); - expect(listRes.tasks.some((task) => task.id === createdTaskId)).toBe( + const listRes = await client.listTasks(smartWalletAddress, { authKey }); + expect(Array.isArray(listRes)).toBe(true); + expect(listRes.some((task) => task.id === createdTaskId)).toBe( false ); }); test("should throw error when deleting an non-existent task", async () => { await expect(client.deleteTask("non-existent-task-id", { authKey })) - .rejects.toThrow("Task Id not found"); + .rejects.toThrow("5 NOT_FOUND: task not found"); }); }); describe("Without authentication", () => { - let smartWallet: string; + let smartWalletAddress: string; let authKey: string; let createdTaskId: string; @@ -155,23 +145,16 @@ describe("deleteTask Tests", () => { authKey = res.authKey; console.log(`Retrieving smart wallet for owner ${ownerAddress} ...`); - const getAddressesRes = await client.getAddresses(ownerAddress, { - authKey, - }); - smartWallet = getAddressesRes.smart_account_address; - console.log(`Smart wallet created: ${smartWallet}`); + const getAddressesRes = await client.listSmartWallets({ authKey }); + console.log(`got wallet`, getAddressesRes); + smartWalletAddress = getAddressesRes[0].address; + console.log(`Smart wallet created: ${smartWalletAddress}`); console.log("Creating a task to use for the following tests"); - const createTaskRes = await client.createTask( - { - address: smartWallet, - tokenContract: TOKEN_CONTRACT, - oracleContract: ORACLE_CONTRACT, - }, + createdTaskId = await client.createTask( + { ...erc20TransferTask, smartWalletAddress }, { authKey } ); - - createdTaskId = createTaskRes.id; }); test("should throw error when deleting a task without authentication", async () => { diff --git a/tests/fixture.ts b/tests/fixture.ts new file mode 100644 index 0000000..e617f09 --- /dev/null +++ b/tests/fixture.ts @@ -0,0 +1,145 @@ +import * as avs_pb from "../grpc_codegen/avs_pb"; +import { UlidMonotonic } from "id128"; +import { requireEnvVar } from "./utils"; + +// Dummy private key for determinictics test +export const DUMMY_PRIVATE_KEY = "0x677240d3b2d8a167e536969785de1bb9f893ed0593682dc8c4dbaf8980d325ee" + +export const erc20TransferTask = { + smartWalletAddress: '0x6B5103D06B53Cc2386243A09f4EAf3140f4FaD41', + startAt: Math.floor(Date.now() / 1000) + 30, + expiredAt: Math.floor(Date.now() / 1000 + 3600 * 24 * 30), + memo: `Test task`, + + trigger: { + block: { + interval: 5, // run every 5 block + }, + }, + nodes: [{ + // id need to be unique. it will be assign to the variable + id: "uuid123", + // name is for our note only. use for display a humand friendly version + name: 'transfer token', + contractWrite: { + contractAddress: "0x2e8bdb63d09ef989a0018eeb1c47ef84e3e61f7b", + callData: "0x123cdef", + } + }], + edges: [{ + id: UlidMonotonic.generate().toCanonical(), + source: "__TRIGGER__", + target: "uuid123", + }], +}; + +export const multiNodeBranchingTask = { + smartWalletAddress: '0x6B5103D06B53Cc2386243A09f4EAf3140f4FaD41', + startAt: Math.floor(Date.now() / 1000) + 30, + expiredAt: Math.floor(Date.now() / 1000 + 3600 * 24 * 30), + memo: `Test task`, + + trigger: { + block: { + interval: 5, // run every 5 block + }, + }, + nodes: [ + { + // id need to be unique. it will be assign to the variable + id: "t000", + // name is for our note only. use for display a humand friendly version + name: 'transfer token', + contractWrite: { + contractAddress: "0x2e8bdb63d09ef989a0018eeb1c47ef84e3e61f7b", + callData: "0x123cdef", + } + }, + { + // id need to be unique. it will be assign to the variable + id: "t001", + // name is for our note only. use for display a humand friendly version + name: "send eth", + ethTransfer: { + destination: "0x2e8bdb63d09ef989a0018eeb1c47ef84e3e61f7b", + amount: "0x123cdef", + } + }, + { + // id need to be unique. it will be assign to the variable + id: "t002", + // name is for our note only. use for display a humand friendly version + name: 'make rest call', + restApi: { + url: "http://endpoint002", + method: "post", + body: `{"a":1}`, + } + }, + { + // id need to be unique. it will be assign to the variable + id: "t003", + // name is for our note only. use for display a humand friendly version + name: 'make graphql call', + graphqlDataQuery: { + url: "http://endpoint003", + query: `foo bar`, + } + }, + { + // id need to be unique. it will be assign to the variable + id: "t004", + // name is for our note only. use for display a humand friendly version + name: 'make graphql call 2', + graphqlDataQuery: { + url: "http://endpoint004", + query: `other test`, + } + }, + { + id: "t100", + name: "branch ", + branch: { + conditions: [ + { id: "b1", type: "if", expression: "foo >= 5" }, + { id: "b2", type: "if", expression: "foo <= -1" }, + { id: "b3", type: "else" } + ] + } + }, + ], + edges: [ + { + id: UlidMonotonic.generate().toCanonical(), + source: "__TRIGGER__", + target: "t000", + }, + { + id: UlidMonotonic.generate().toCanonical(), + source: "t000", + target: "t001", + }, + { + id: UlidMonotonic.generate().toCanonical(), + source: "t001", + target: "t100", + }, + { + id: UlidMonotonic.generate().toCanonical(), + source: "t100.b1", + target: "t002", + }, + { + id: UlidMonotonic.generate().toCanonical(), + source: "t100.b2", + target: "t003", + }, + { + id: UlidMonotonic.generate().toCanonical(), + source: "t100.b3", + target: "t004", + }, + ], +}; + + diff --git a/tests/getAddresses.test.ts b/tests/getAddresses.test.ts index 5c985e9..7ec7dc0 100644 --- a/tests/getAddresses.test.ts +++ b/tests/getAddresses.test.ts @@ -1,12 +1,12 @@ import { describe, beforeAll, test, expect } from "@jest/globals"; -import Client from "../dist/index.js"; +import Client from "../dist"; import dotenv from "dotenv"; import path from "path"; import { getAddress, generateSignature, requireEnvVar } from "./utils"; +import { DUMMY_PRIVATE_KEY } from "./fixture"; // Update the dotenv configuration dotenv.config({ path: path.resolve(__dirname, "..", ".env.test") }); - // Get environment variables with type safety const { TEST_API_KEY, @@ -16,7 +16,7 @@ const { ENDPOINT, } = { TEST_API_KEY: requireEnvVar("TEST_API_KEY"), - TEST_PRIVATE_KEY: requireEnvVar("TEST_PRIVATE_KEY"), + TEST_PRIVATE_KEY: requireEnvVar('TEST_PRIVATE_KEY'), TOKEN_CONTRACT: requireEnvVar("TOKEN_CONTRACT"), ORACLE_CONTRACT: requireEnvVar("ORACLE_CONTRACT"), ENDPOINT: requireEnvVar("ENDPOINT"), @@ -25,12 +25,12 @@ const { // Define EXPIRED_AT as a constant const EXPIRED_AT = Math.floor(Date.now() / 1000) + 24 * 60 * 60; // 24 hours from now -describe("getAddresses Tests", () => { +describe("listSmartWalletses Tests", () => { let ownerAddress: string; let client: Client; beforeAll(async () => { - ownerAddress = await getAddress(TEST_PRIVATE_KEY); + ownerAddress = await getAddress(DUMMY_PRIVATE_KEY); console.log("Client endpoint:", ENDPOINT, "\nOwner address:", ownerAddress); // Initialize the client with test credentials @@ -45,7 +45,7 @@ describe("getAddresses Tests", () => { beforeAll(async () => { console.log("Authenticating with signature ..."); - const signature = await generateSignature(TEST_PRIVATE_KEY, EXPIRED_AT); + const signature = await generateSignature(DUMMY_PRIVATE_KEY, EXPIRED_AT); const res = await client.authWithSignature( ownerAddress, signature, @@ -54,16 +54,21 @@ describe("getAddresses Tests", () => { authKey = res.authKey; }); - test("should get addresses when authenticated with signature", async () => { - const result = await client.getAddresses(ownerAddress, { authKey }); - expect(result.smart_account_address).toBeDefined(); - smartWallet = result.smart_account_address; - console.log("Smart wallet address:", smartWallet); + test("should include default smart wallet when authenticated with signature", async () => { + const result = await client.listSmartWallets({ authKey }); + expect(result).toBeDefined(); + expect(result.length).toBeGreaterThanOrEqual(1); + expect(result[0].salt).toEqual("0"); + expect(result[0].factory).toEqual("0x29adA1b5217242DEaBB142BC3b1bCfFdd56008e7"); + expect(result[0].address).toHaveLength(42); }); - test("should return empty when getting address with smartWallet using signature", async () => { - const result = await client.getAddresses(smartWallet, { authKey }); - expect(result.smart_account_address).toBe(undefined); + test("should include custom salt wallet when getting address with smartWallet using signature", async () => { + await client.createWallet({salt: "12345"}, { authKey }); + + const wallets = await client.listSmartWallets({ authKey }); + expect(wallets.length).toBeGreaterThanOrEqual(2); + expect(wallets.some(item => item.salt === "12345")).toBe(true); }); }); @@ -73,25 +78,30 @@ describe("getAddresses Tests", () => { beforeAll(async () => { console.log("Authenticating with API key ..."); - const res = await client.authWithAPIKey(TEST_API_KEY, EXPIRED_AT); + const res = await client.authWithAPIKey(ownerAddress, TEST_API_KEY, EXPIRED_AT); authKey = res.authKey; }); - test("should get addresses when authenticated with API key", async () => { - const result = await client.getAddresses(ownerAddress, { authKey }); - expect(result.smart_account_address).toBeDefined(); - smartWallet = result.smart_account_address; + test("should include default smart wallet when authenticated with API key", async () => { + const result = await client.listSmartWallets({ authKey }); + expect(result.length).toBeGreaterThanOrEqual(1); + expect(result[0].salt).toEqual("0"); + expect(result[0].factory).toEqual("0x29adA1b5217242DEaBB142BC3b1bCfFdd56008e7"); + expect(result[0].address).toHaveLength(42); }); - test("should return empty when getting address with smartWallet using API key", async () => { - const result = await client.getAddresses(smartWallet, { authKey }); - expect(result.smart_account_address).toBe(undefined); + test("should include custom salt wallet when getting address with API key", async () => { + await client.createWallet({salt: "78910"}, { authKey }); + + const wallets = await client.listSmartWallets({ authKey }); + expect(wallets.length).toBeGreaterThanOrEqual(2); + expect(wallets.some(item => item.salt === "78910")).toBe(true); }); }); test("should throw error when getting address without authentication", async () => { await expect( - client.getAddresses(ownerAddress, { authKey: "" }) + client.listSmartWallets({ authKey: "" }) ).rejects.toThrow("missing auth header"); }); }); diff --git a/tests/getTask.test.ts b/tests/getTask.test.ts index acf18ec..8789e25 100644 --- a/tests/getTask.test.ts +++ b/tests/getTask.test.ts @@ -1,9 +1,12 @@ +import * as avs_pb from "../grpc_codegen/avs_pb"; import { describe, beforeAll, test, expect } from "@jest/globals"; -import Client from "../dist/index.js"; +import Client from "../dist"; import dotenv from "dotenv"; import path from "path"; import { getAddress, generateSignature, requireEnvVar } from "./utils"; +import { erc20TransferTask } from "./fixture"; + // Update the dotenv configuration dotenv.config({ path: path.resolve(__dirname, "..", ".env.test") }); @@ -16,7 +19,7 @@ const { ENDPOINT, } = { TEST_API_KEY: requireEnvVar("TEST_API_KEY"), - TEST_PRIVATE_KEY: requireEnvVar("TEST_PRIVATE_KEY"), + TEST_PRIVATE_KEY: requireEnvVar('TEST_PRIVATE_KEY'), TOKEN_CONTRACT: requireEnvVar("TOKEN_CONTRACT"), ORACLE_CONTRACT: requireEnvVar("ORACLE_CONTRACT"), ENDPOINT: requireEnvVar("ENDPOINT"), @@ -41,7 +44,7 @@ describe("getTask Tests", () => { describe("Auth with Signature", () => { let authKey: string; - let smartWallet: string; + let smartWalletAddress: string; let createdTaskId: string; beforeAll(async () => { @@ -55,95 +58,83 @@ describe("getTask Tests", () => { authKey = res.authKey; console.log(`Retrieving smart wallet for owner ${ownerAddress} ...`); - const getAddressesRes = await client.getAddresses(ownerAddress, { - authKey, - }); - smartWallet = getAddressesRes.smart_account_address; - console.log(`Smart wallet created: ${smartWallet}`); + const listSmartWalletsRes = await client.listSmartWallets({ authKey }); + smartWalletAddress = listSmartWalletsRes[0].address; + console.log(`Smart wallet created: ${smartWalletAddress}`); console.log("Creating a task to use for the following tests"); - const createTaskRes = await client.createTask( + createdTaskId = await client.createTask( { - address: smartWallet, - tokenContract: TOKEN_CONTRACT, - oracleContract: ORACLE_CONTRACT, + ...erc20TransferTask, smartWalletAddress }, { authKey } ); - - createdTaskId = createTaskRes.id; }); test("should get task when authenticated with signature", async () => { const result = await client.getTask(createdTaskId, { authKey }); - console.log("first test", result); // Check if the result is an object and has the expected properties expect(result).toBeDefined(); - expect(result.status).toBe(0); + expect(result.status).toBe(avs_pb.TaskStatus.ACTIVE); expect(result.id).toBe(createdTaskId); - expect(result.smartAccountAddress).toBe(smartWallet); - expect(result.trigger).toBeDefined(); - expect(result.expiredAt).toBeDefined(); + expect(result.smartWalletAddress).toEqual(smartWalletAddress); + //expect(result.trigger).toBeDefined(); + expect(result.nodes).toHaveLength(1); + expect(result.expiredAt).toEqual(erc20TransferTask.expiredAt); + expect(result.memo).toEqual(erc20TransferTask.memo); }); - test("should return undefined when getting an non-existent task", async () => { - // This fails because the current error message is "2 UNKNOWN: Key not found", which is not a clear error message - const result = await client.getTask("non-existent-task-id", { authKey }); - - expect(result).toEqual(undefined); + test("should throw task not found when getting an non-existent task", async () => { + await expect(client.getTask("non-existent-task-id", { authKey })).rejects.toThrow("5 NOT_FOUND: task not found"); }); }); describe("Auth with API key", () => { let authKey: string; - let smartWallet: string; + let smartWalletAddress: string; let createdTaskId: string; beforeAll(async () => { console.log("Authenticating with API key ..."); - const res = await client.authWithAPIKey(TEST_API_KEY, EXPIRED_AT); + const res = await client.authWithAPIKey(ownerAddress, TEST_API_KEY, EXPIRED_AT); authKey = res.authKey; console.log(`Retrieving smart wallet for owner ${ownerAddress} ...`); - const getAddressesRes = await client.getAddresses(ownerAddress, { - authKey, - }); - smartWallet = getAddressesRes.smart_account_address; - console.log(`Smart wallet created: ${smartWallet}`); + const listSmartWalletsRes = await client.listSmartWallets({ authKey }); + smartWalletAddress = listSmartWalletsRes[0].address; + console.log(`Smart wallet created: ${smartWalletAddress}`); console.log("Creating a task to use for the following tests"); - const createTaskRes = await client.createTask( - { - address: smartWallet, - tokenContract: TOKEN_CONTRACT, - oracleContract: ORACLE_CONTRACT, - }, + createdTaskId = await client.createTask( + { ...erc20TransferTask, smartWalletAddress }, { authKey } ); - - createdTaskId = createTaskRes.id; }); test("should get task when authenticated with API key", async () => { const result = await client.getTask(createdTaskId, { authKey }); - expect(result).toBe(true); - const listRes = await client.listTasks(smartWallet, { authKey }); - expect(Array.isArray(listRes.tasks)).toBe(true); - expect(listRes.tasks.some((task) => task.id === createdTaskId)).toBe( - false - ); + console.log("trask is ", result); + // Check if the result is an object and has the expected properties + expect(result).toBeDefined(); + expect(result.status).toBe(avs_pb.TaskStatus.ACTIVE); + expect(result.id).toBe(createdTaskId); + expect(result.smartWalletAddress).toEqual(smartWalletAddress); + expect(result.trigger).toBeDefined(); + expect(result.trigger.triggerType).toEqual(avs_pb.TaskTrigger.TriggerTypeCase.BLOCK); + expect(result.nodes).toHaveLength(1); + expect(result.expiredAt).toEqual(erc20TransferTask.expiredAt); + expect(result.memo).toEqual(erc20TransferTask.memo); }); - test("should return undefined when getting an non-existent task", async () => { - const result = await client.getTask("non-existent-task-id", { authKey }); - expect(result).toEqual(undefined); + test("should throw task not found when getting an non-existent task", async () => { + await expect(client.getTask("non-existent-task-id", { authKey })).rejects.toThrow("5 NOT_FOUND: task not found"); }); }); describe("Without authentication", () => { - let smartWallet: string; + let smartWalletAddress: string; let authKey: string; let createdTaskId: string; @@ -158,23 +149,15 @@ describe("getTask Tests", () => { authKey = res.authKey; console.log(`Retrieving smart wallet for owner ${ownerAddress} ...`); - const getAddressesRes = await client.getAddresses(ownerAddress, { - authKey, - }); - smartWallet = getAddressesRes.smart_account_address; - console.log(`Smart wallet created: ${smartWallet}`); + const listSmartWalletsRes = await client.listSmartWallets({ authKey }); + smartWalletAddress = listSmartWalletsRes[0].address; + console.log(`Smart wallet created: ${smartWalletAddress}`); console.log("Creating a task to use for the following tests"); - const createTaskRes = await client.createTask( - { - address: smartWallet, - tokenContract: TOKEN_CONTRACT, - oracleContract: ORACLE_CONTRACT, - }, + createdTaskId = await client.createTask( + { ...erc20TransferTask, smartWalletAddress }, { authKey } ); - - createdTaskId = createTaskRes.id; }); test("should throw error when getting a task without authentication", async () => { diff --git a/tests/listTasks.test.ts b/tests/listTasks.test.ts index b3e09b0..bd71c21 100644 --- a/tests/listTasks.test.ts +++ b/tests/listTasks.test.ts @@ -1,9 +1,11 @@ import { describe, beforeAll, test, expect } from "@jest/globals"; -import Client from "../dist/index.js"; +import Client from "../dist"; import dotenv from "dotenv"; import path from "path"; import { getAddress, generateSignature, requireEnvVar } from "./utils"; +import { erc20TransferTask } from "./fixture"; + // Update the dotenv configuration dotenv.config({ path: path.resolve(__dirname, "..", ".env.test") }); @@ -16,7 +18,7 @@ const { ENDPOINT, } = { TEST_API_KEY: requireEnvVar("TEST_API_KEY"), - TEST_PRIVATE_KEY: requireEnvVar("TEST_PRIVATE_KEY"), + TEST_PRIVATE_KEY: requireEnvVar('TEST_PRIVATE_KEY'), TOKEN_CONTRACT: requireEnvVar("TOKEN_CONTRACT"), ORACLE_CONTRACT: requireEnvVar("ORACLE_CONTRACT"), ENDPOINT: requireEnvVar("ENDPOINT"), @@ -41,7 +43,7 @@ describe("listTasks Tests", () => { describe("Auth with Signature", () => { let authKey: string; - let smartWallet: string; + let smartWalletAddress: string; let createdTaskId: string; beforeAll(async () => { @@ -55,83 +57,77 @@ describe("listTasks Tests", () => { authKey = res.authKey; console.log(`Retrieving smart wallet for owner ${ownerAddress} ...`); - const getAddressesRes = await client.getAddresses(ownerAddress, { - authKey, - }); - smartWallet = getAddressesRes.smart_account_address; - console.log(`Smart wallet created: ${smartWallet}`); + const listSmartWalletsRes = await client.listSmartWallets({ authKey }); + smartWalletAddress = listSmartWalletsRes[0].address; + console.log(`Smart wallet created: ${smartWalletAddress}`); console.log("Creating a task to use for the following tests"); - const createTaskRes = await client.createTask( - { - address: smartWallet, - tokenContract: TOKEN_CONTRACT, - oracleContract: ORACLE_CONTRACT, - }, + createdTaskId = await client.createTask( + { ...erc20TransferTask, smartWalletAddress }, { authKey } ); - - createdTaskId = createTaskRes.id; }); test("should list tasks when authenticated with signature", async () => { - const result = await client.listTasks(smartWallet, { authKey }); - expect(Array.isArray(result.tasks)).toBe(true); - expect(result.tasks.some((task) => task.id === createdTaskId)).toBe(true); + const result = await client.listTasks(smartWalletAddress, { authKey }); + expect(Array.isArray(result)).toBe(true); + expect(result.length).toBeGreaterThanOrEqual(1); + expect(result.some((task) => task.id === createdTaskId)).toBe(true); }); - test("should return empty when listing owner address using signature", async () => { - const result = await client.listTasks(ownerAddress, { authKey }); - expect(Array.isArray(result.tasks)).toBe(true); - expect(result.tasks.length).toBe(0); + test("should throw error when not sending a valid smart wallet address", async () => { + await expect( + client.listTasks(ownerAddress, { authKey }) + ).rejects.toThrow("3 INVALID_ARGUMENT: invalid smart account address"); + + await expect( + client.listTasks("0x000000000000000000000000000000000000dead", { authKey }) + ).rejects.toThrow("3 INVALID_ARGUMENT: invalid smart account address"); }); }); describe("Auth with API key", () => { let authKey: string; - let smartWallet: string; + let smartWalletAddress: string; let createdTaskId: string; beforeAll(async () => { console.log("Authenticating with API key ..."); - const res = await client.authWithAPIKey(TEST_API_KEY, EXPIRED_AT); + const res = await client.authWithAPIKey(ownerAddress, TEST_API_KEY, EXPIRED_AT); authKey = res.authKey; console.log(`Retrieving smart wallet for owner ${ownerAddress} ...`); - const getAddressesRes = await client.getAddresses(ownerAddress, { - authKey, - }); - smartWallet = getAddressesRes.smart_account_address; - console.log(`Smart wallet created: ${smartWallet}`); + const listSmartWalletsRes = await client.listSmartWallets({ authKey }); + smartWalletAddress = listSmartWalletsRes[0].address; + console.log(`Smart wallet created: ${smartWalletAddress}`); console.log("Creating a task to use for the following tests"); - const createTaskRes = await client.createTask( - { - address: smartWallet, - tokenContract: TOKEN_CONTRACT, - oracleContract: ORACLE_CONTRACT, - }, + createdTaskId = await client.createTask( + { ...erc20TransferTask, smartWalletAddress }, { authKey } ); - - createdTaskId = createTaskRes.id; }); test("should list tasks when authenticated with API key", async () => { - const result = await client.listTasks(smartWallet, { authKey }); - expect(Array.isArray(result.tasks)).toBe(true); - expect(result.tasks.some((task) => task.id === createdTaskId)).toBe(true); + const result = await client.listTasks(smartWalletAddress, { authKey }); + expect(Array.isArray(result)).toBe(true); + expect(result.length).toBeGreaterThanOrEqual(1); + expect(result.some((task) => task.id === createdTaskId)).toBe(true); }); - test("should return empty when listing owner address using API key", async () => { - const result = await client.listTasks(ownerAddress, { authKey }); - expect(Array.isArray(result.tasks)).toBe(true); - expect(result.tasks.length).toBe(0); + test("should throw error when not sending a valid smart wallet address using API key", async () => { + await expect( + client.listTasks(ownerAddress, { authKey }) + ).rejects.toThrow("3 INVALID_ARGUMENT: invalid smart account address"); + + await expect( + client.listTasks("0x000000000000000000000000000000000000dead", { authKey }) + ).rejects.toThrow("3 INVALID_ARGUMENT: invalid smart account address"); }); }); describe("Without authentication", () => { - let smartWallet: string; + let smartWalletAddress: string; let authKey: string; beforeAll(async () => { @@ -145,16 +141,14 @@ describe("listTasks Tests", () => { authKey = res.authKey; console.log(`Retrieving smart wallet for owner ${ownerAddress} ...`); - const getAddressesRes = await client.getAddresses(ownerAddress, { - authKey, - }); - smartWallet = getAddressesRes.smart_account_address; - console.log(`Smart wallet created: ${smartWallet}`); + const listSmartWalletsRes = await client.listSmartWallets({ authKey }); + smartWalletAddress = listSmartWalletsRes[0].address; + console.log(`Smart wallet created: ${smartWalletAddress}`); }); test("should throw error when listing tasks without authentication", async () => { await expect( - client.listTasks(smartWallet, { authKey: "" }) + client.listTasks(smartWalletAddress, { authKey: "" }) ).rejects.toThrow("missing auth header"); }); }); diff --git a/tests/utils.ts b/tests/utils.ts index 544bde7..9bf3eda 100644 --- a/tests/utils.ts +++ b/tests/utils.ts @@ -1,4 +1,4 @@ -import { getKeyRequestMessage } from "../dist/index.js"; +import { getKeyRequestMessage } from "../dist"; import { ethers } from "ethers"; import _ from "lodash"; // Get wallet address from private key